Class: OpenEHR::RM::DataTypes::Quantity::DvOrdinal

Inherits:
DvOrdered show all
Defined in:
lib/openehr/rm/data_types/quantity.rb

Constant Summary

Constants included from Support::Definition::BasicDefinition

Support::Definition::BasicDefinition::CR, Support::Definition::BasicDefinition::LF

Instance Attribute Summary collapse

Attributes inherited from DvOrdered

#normal_range, #normal_status, #other_reference_ranges

Instance Method Summary collapse

Methods inherited from DvOrdered

#is_normal?, #is_simple?

Methods inherited from Basic::DataValue

#==

Constructor Details

#initialize(args = {}) ⇒ DvOrdinal

Returns a new instance of DvOrdinal.



106
107
108
109
110
# File 'lib/openehr/rm/data_types/quantity.rb', line 106

def initialize(args = {})
  super(args)
  self.symbol = args[:symbol]
  self.limits = args[:limits]
end

Instance Attribute Details

#limitsObject

Returns the value of attribute limits.



104
105
106
# File 'lib/openehr/rm/data_types/quantity.rb', line 104

def limits
  @limits
end

#symbolObject

Returns the value of attribute symbol.



104
105
106
# File 'lib/openehr/rm/data_types/quantity.rb', line 104

def symbol
  @symbol
end

#valueObject

Returns the value of attribute value.



104
105
106
# File 'lib/openehr/rm/data_types/quantity.rb', line 104

def value
  @value
end

Instance Method Details

#<=>(other) ⇒ Object



122
123
124
# File 'lib/openehr/rm/data_types/quantity.rb', line 122

def <=>(other)
  @value <=> other.value
end

#is_strictly_comparable_to?(others) ⇒ Boolean

Returns:

  • (Boolean)


133
134
135
136
137
138
139
140
141
142
143
# File 'lib/openehr/rm/data_types/quantity.rb', line 133

def is_strictly_comparable_to?(others)
  unless super(others)
    return false
  end
  unless others.symbol.defining_code.terminology_id.value ==
      @symbol.defining_code.terminology_id.value
    return false
  else
    return true
  end
end