Class: OpenEHR::RM::DataTypes::Text::TermMapping

Inherits:
Object
  • Object
show all
Defined in:
lib/open_ehr/rm/data_types/text.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ TermMapping

Returns a new instance of TermMapping.



13
14
15
16
17
# File 'lib/open_ehr/rm/data_types/text.rb', line 13

def initialize(args ={})
  self.match = args[:match]
  self.purpose = args[:purpose]
  self.target = args[:target]
end

Instance Attribute Details

#matchObject

Returns the value of attribute match.



11
12
13
# File 'lib/open_ehr/rm/data_types/text.rb', line 11

def match
  @match
end

#purposeObject

Returns the value of attribute purpose.



11
12
13
# File 'lib/open_ehr/rm/data_types/text.rb', line 11

def purpose
  @purpose
end

#targetObject

Returns the value of attribute target.



11
12
13
# File 'lib/open_ehr/rm/data_types/text.rb', line 11

def target
  @target
end

Class Method Details

.is_valid_mach_code?(c) ⇒ Boolean

Returns:

  • (Boolean)


55
56
57
# File 'lib/open_ehr/rm/data_types/text.rb', line 55

def TermMapping.is_valid_mach_code?(c)
  c == '>' or c == '=' or c == '<' or c == '?'
end

Instance Method Details

#broader?Boolean

Returns:

  • (Boolean)


39
40
41
# File 'lib/open_ehr/rm/data_types/text.rb', line 39

def broader?
  match == '>'
end

#equivalent?Boolean

Returns:

  • (Boolean)


43
44
45
# File 'lib/open_ehr/rm/data_types/text.rb', line 43

def equivalent?
  match == '='
end

#narrower?Boolean

Returns:

  • (Boolean)


47
48
49
# File 'lib/open_ehr/rm/data_types/text.rb', line 47

def narrower?
  match == '<'
end

#unknown?Boolean

Returns:

  • (Boolean)


51
52
53
# File 'lib/open_ehr/rm/data_types/text.rb', line 51

def unknown?
  match == '?'
end