Class: OpenEHR::RM::DataTypes::Quantity::DvScale
- Inherits:
-
DvOrdered
- Object
- Basic::DataValue
- DvOrdered
- OpenEHR::RM::DataTypes::Quantity::DvScale
- Defined in:
- lib/openehr/rm/data_types/quantity.rb
Overview
RM 1.1.0 (SPECRM-19): like DV_ORDINAL, but for scales/scores whose points are Real-valued rather than Integer-valued (e.g. the Borg CR10 breathlessness scale, which includes 0.5).
Constant Summary
Constants included from Support::Definition::BasicDefinition
Support::Definition::BasicDefinition::CR, Support::Definition::BasicDefinition::LF
Instance Attribute Summary collapse
-
#symbol ⇒ Object
Returns the value of attribute symbol.
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from DvOrdered
#normal_range, #normal_status, #other_reference_ranges
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(args = {}) ⇒ DvScale
constructor
A new instance of DvScale.
- #is_strictly_comparable_to?(others) ⇒ Boolean
Methods inherited from DvOrdered
Methods inherited from Basic::DataValue
Constructor Details
#initialize(args = {}) ⇒ DvScale
Returns a new instance of DvScale.
153 154 155 156 |
# File 'lib/openehr/rm/data_types/quantity.rb', line 153 def initialize(args = {}) super(args) self.symbol = args[:symbol] end |
Instance Attribute Details
#symbol ⇒ Object
Returns the value of attribute symbol.
151 152 153 |
# File 'lib/openehr/rm/data_types/quantity.rb', line 151 def symbol @symbol end |
#value ⇒ Object
Returns the value of attribute value.
151 152 153 |
# File 'lib/openehr/rm/data_types/quantity.rb', line 151 def value @value end |
Instance Method Details
#<=>(other) ⇒ Object
169 170 171 |
# File 'lib/openehr/rm/data_types/quantity.rb', line 169 def <=>(other) @value <=> other.value end |
#is_strictly_comparable_to?(others) ⇒ Boolean
173 174 175 176 177 178 |
# File 'lib/openehr/rm/data_types/quantity.rb', line 173 def is_strictly_comparable_to?(others) return false unless super(others) others.symbol.defining_code.terminology_id.value == @symbol.defining_code.terminology_id.value end |