class OpenEHR::RM::DataTypes::Text::TermMapping
Attributes
match[R]
purpose[R]
target[R]
Public Class Methods
is_valid_mach_code?(c)
click to toggle source
# 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
new(args ={})
click to toggle source
# 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
Public Instance Methods
broader?()
click to toggle source
# File lib/open_ehr/rm/data_types/text.rb, line 39 def broader? match == '>' end
equivalent?()
click to toggle source
# File lib/open_ehr/rm/data_types/text.rb, line 43 def equivalent? match == '=' end
match=(match)
click to toggle source
# File lib/open_ehr/rm/data_types/text.rb, line 19 def match=(match) unless TermMapping.is_valid_mach_code? match raise ArgumentError, 'invalid match character' end @match = match end
narrower?()
click to toggle source
# File lib/open_ehr/rm/data_types/text.rb, line 47 def narrower? match == '<' end
purpose=(purpose)
click to toggle source
# File lib/open_ehr/rm/data_types/text.rb, line 26 def purpose=(purpose) # if !purpose.nil? and !purpose.instance_of?(DvCodedText) # raise ArgumentError, "purpose is not valid" # end # should be settled after terminology service implemented @purpose = purpose end
target=(target)
click to toggle source
# File lib/open_ehr/rm/data_types/text.rb, line 34 def target=(target) raise ArgumentError, "target must not be nil" if target.nil? @target = target end
unknown?()
click to toggle source
# File lib/open_ehr/rm/data_types/text.rb, line 51 def unknown? match == '?' end