Class: HealthVault::WCData::Thing::Types::Labtestresultvaluetype
- Inherits:
-
ComplexType
- Object
- ComplexType
- HealthVault::WCData::Thing::Types::Labtestresultvaluetype
- Defined in:
- lib/wc_data/generated/thing/types/lab_test_result_value_type.rb
Instance Attribute Summary
Attributes inherited from ComplexType
Instance Method Summary collapse
-
#add_flag(value) ⇒ Object
value is a HealthVault::WCData::Thing::Types::Codablevalue.
-
#add_ranges(value) ⇒ Object
value is a HealthVault::WCData::Thing::Types::Testresultrange.
-
#flag ⇒ Object
remarks: Example values are normal, critical, high and low.
-
#initialize ⇒ Labtestresultvaluetype
constructor
A new instance of Labtestresultvaluetype.
-
#measurement ⇒ Object
returns: a HealthVault::WCData::Thing::Types::Generalmeasurement.
-
#measurement=(value) ⇒ Object
preferred-vocabulary: Contact the HealthVault team to help define this vocabulary.
-
#ranges ⇒ Object
remarks: Each test result can contain multiple ranges that are useful to interpret the result value.
-
#remove_flag(value) ⇒ Object
value is a #HealthVault::WCData::Thing::Types::Codablevalue.
-
#remove_ranges(value) ⇒ Object
value is a #HealthVault::WCData::Thing::Types::Testresultrange.
Methods inherited from ComplexType
#add_new_to_children, #element, #method_missing, #optional_elements, #parse_element, #query_elements, #required_elements, #to_s, #valid?
Constructor Details
#initialize ⇒ Labtestresultvaluetype
Returns a new instance of Labtestresultvaluetype.
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/wc_data/generated/thing/types/lab_test_result_value_type.rb', line 74 def initialize super self.tag_name = 'lab-test-result-value-type' @children['measurement'] = {:name => 'measurement', :class => HealthVault::WCData::Thing::Types::Generalmeasurement, :value => nil, :min => 1, :max => 1, :order => 1, :place => :element, :choice => 0 } @children['measurement'][:value] = HealthVault::WCData::Thing::Types::Generalmeasurement.new @children['ranges'] = {:name => 'ranges', :class => HealthVault::WCData::Thing::Types::Testresultrange, :value => Array.new, :min => 0, :max => 999999, :order => 2, :place => :element, :choice => 0 } @children['flag'] = {:name => 'flag', :class => HealthVault::WCData::Thing::Types::Codablevalue, :value => Array.new, :min => 0, :max => 999999, :order => 3, :place => :element, :choice => 0 } end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class HealthVault::WCData::ComplexType
Instance Method Details
#add_flag(value) ⇒ Object
value is a HealthVault::WCData::Thing::Types::Codablevalue
54 55 56 |
# File 'lib/wc_data/generated/thing/types/lab_test_result_value_type.rb', line 54 def add_flag(value) @children['flag'][:value] << value end |
#add_ranges(value) ⇒ Object
value is a HealthVault::WCData::Thing::Types::Testresultrange
34 35 36 |
# File 'lib/wc_data/generated/thing/types/lab_test_result_value_type.rb', line 34 def add_ranges(value) @children['ranges'][:value] << value end |
#flag ⇒ Object
remarks: Example values are normal, critical, high and low. preferred-vocabulary: lab-results-flag returns: a HealthVault::WCData::Thing::Types::Codablevalue Array
68 69 70 |
# File 'lib/wc_data/generated/thing/types/lab_test_result_value_type.rb', line 68 def flag return @children['flag'][:value] end |
#measurement ⇒ Object
returns: a HealthVault::WCData::Thing::Types::Generalmeasurement
27 28 29 |
# File 'lib/wc_data/generated/thing/types/lab_test_result_value_type.rb', line 27 def measurement return @children['measurement'][:value] end |
#measurement=(value) ⇒ Object
preferred-vocabulary: Contact the HealthVault team to help define this vocabulary. value is a HealthVault::WCData::Thing::Types::Generalmeasurement
22 23 24 |
# File 'lib/wc_data/generated/thing/types/lab_test_result_value_type.rb', line 22 def measurement=(value) @children['measurement'][:value] = value end |
#ranges ⇒ Object
remarks: Each test result can contain multiple ranges that are useful to interpret the result value. returns: a HealthVault::WCData::Thing::Types::Testresultrange Array
47 48 49 |
# File 'lib/wc_data/generated/thing/types/lab_test_result_value_type.rb', line 47 def ranges return @children['ranges'][:value] end |
#remove_flag(value) ⇒ Object
value is a #HealthVault::WCData::Thing::Types::Codablevalue
59 60 61 |
# File 'lib/wc_data/generated/thing/types/lab_test_result_value_type.rb', line 59 def remove_flag(value) @children['flag'][:value].delete(value) end |
#remove_ranges(value) ⇒ Object
value is a #HealthVault::WCData::Thing::Types::Testresultrange
39 40 41 |
# File 'lib/wc_data/generated/thing/types/lab_test_result_value_type.rb', line 39 def remove_ranges(value) @children['ranges'][:value].delete(value) end |