Class: OpenEHR::RM::DataTypes::Quantity::DvQuantified
- Inherits:
-
DvOrdered
- Object
- Basic::DataValue
- DvOrdered
- OpenEHR::RM::DataTypes::Quantity::DvQuantified
- Defined in:
- lib/open_ehr/rm/data_types/quantity.rb
Direct Known Subclasses
Constant Summary
Constants included from Support::Definition::BasicDefinition
Support::Definition::BasicDefinition::CR, Support::Definition::BasicDefinition::LF
Instance Attribute Summary collapse
-
#magnitude ⇒ Object
Returns the value of attribute magnitude.
-
#magnitude_status ⇒ Object
Returns the value of attribute magnitude_status.
Attributes inherited from DvOrdered
#normal_range, #normal_status, #other_refference_ranges
Attributes inherited from Basic::DataValue
Class Method Summary collapse
Instance Method Summary collapse
- #<=>(others) ⇒ Object
- #accuracy_unknown? ⇒ Boolean
-
#initialize(args = {}) ⇒ DvQuantified
constructor
A new instance of DvQuantified.
Methods inherited from DvOrdered
#is_normal?, #is_simple?, #is_strictly_comparable_to?, #other_reference_ranges=
Methods inherited from Basic::DataValue
Constructor Details
#initialize(args = {}) ⇒ DvQuantified
Returns a new instance of DvQuantified.
66 67 68 69 70 |
# File 'lib/open_ehr/rm/data_types/quantity.rb', line 66 def initialize(args = {}) super(args) self.magnitude = args[:magnitude] self.magnitude_status = args[:magnitude_status] end |
Instance Attribute Details
#magnitude ⇒ Object
Returns the value of attribute magnitude.
64 65 66 |
# File 'lib/open_ehr/rm/data_types/quantity.rb', line 64 def magnitude @magnitude end |
#magnitude_status ⇒ Object
Returns the value of attribute magnitude_status.
64 65 66 |
# File 'lib/open_ehr/rm/data_types/quantity.rb', line 64 def magnitude_status @magnitude_status end |
Class Method Details
.valid_magnitude_status?(s) ⇒ Boolean
95 96 97 98 99 100 101 102 |
# File 'lib/open_ehr/rm/data_types/quantity.rb', line 95 def self.valid_magnitude_status?(s) if s == '=' || s == '>' || s == '<' || s == '<=' || s == '>=' || s == '~' return true else return false end end |
Instance Method Details
#<=>(others) ⇒ Object
72 73 74 |
# File 'lib/open_ehr/rm/data_types/quantity.rb', line 72 def <=>(others) self.magnitude <=> others.magnitude end |
#accuracy_unknown? ⇒ Boolean
91 92 93 |
# File 'lib/open_ehr/rm/data_types/quantity.rb', line 91 def accuracy_unknown? return @accuracy.nil? end |