class OpenEHR::RM::DataTypes::Quantity::DvOrdered
Attributes
normal_range[RW]
normal_status[RW]
other_reference_ranges[RW]
Public Class Methods
new(args = {})
click to toggle source
Calls superclass method
OpenEHR::RM::DataTypes::Basic::DataValue::new
# File lib/openehr/rm/data_types/quantity.rb, line 16 def initialize(args = {}) super(args) self.normal_range = args[:normal_range] self.normal_status = args[:normal_status] self.other_reference_ranges = args[:other_reference_ranges] end
Public Instance Methods
<=>(other)
click to toggle source
# File lib/openehr/rm/data_types/quantity.rb, line 37 def <=>(other) raise NotImplementedError, 'This method should be implemented' end
is_normal?()
click to toggle source
# File lib/openehr/rm/data_types/quantity.rb, line 23 def is_normal? if @normal_range.nil? and @normal_status.nil? return false elsif !@normal_range.nil? return @normal_range.has(@value) elsif !@normal_status.nil? return @normal_status.code_string == 'N' end end
is_simple?()
click to toggle source
# File lib/openehr/rm/data_types/quantity.rb, line 33 def is_simple? return @other_reference_ranges.nil? end
is_strictly_comparable_to?(others)
click to toggle source
# File lib/openehr/rm/data_types/quantity.rb, line 48 def is_strictly_comparable_to?(others) if others.instance_of? self.class return true else return false end end
other_reference_ranges=(other_reference_ranges)
click to toggle source
# File lib/openehr/rm/data_types/quantity.rb, line 41 def other_reference_ranges=(other_reference_ranges) if !other_reference_ranges.nil? && other_reference_ranges.empty? raise ArgumentError, "Other reference ranges validity error" end @other_reference_ranges = other_reference_ranges end