Class: HealthVault::WCData::Thing::Medication::DoseValue
- Inherits:
-
ComplexType
- Object
- ComplexType
- HealthVault::WCData::Thing::Medication::DoseValue
- Defined in:
- lib/wc_data/generated/thing/medication/dose_value.rb
Instance Attribute Summary
Attributes inherited from ComplexType
Instance Method Summary collapse
-
#description ⇒ Object
returns: a String.
-
#description=(value) ⇒ Object
value is a String.
-
#exact_dose ⇒ Object
returns: a HealthVault::WCData::Thing::Types::PositiveDouble.
-
#exact_dose=(value) ⇒ Object
remarks: The dosage to be taken is exactly specified.
-
#initialize ⇒ DoseValue
constructor
A new instance of DoseValue.
-
#max_dose ⇒ Object
returns: a HealthVault::WCData::Thing::Types::PositiveDouble.
-
#max_dose=(value) ⇒ Object
remarks: The dosage to be taken is specified as a range with this value indicating the maximum dosage that should be taken.
-
#min_dose ⇒ Object
returns: a HealthVault::WCData::Thing::Types::PositiveDouble.
-
#min_dose=(value) ⇒ Object
remarks: The dosage to be taken is specified as a range with this value indicating the minimum dosage that should be taken.
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 ⇒ DoseValue
Returns a new instance of DoseValue.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/wc_data/generated/thing/medication/dose_value.rb', line 77 def initialize super self.tag_name = 'dosevalue' @children['description'] = {:name => 'description', :class => String, :value => nil, :min => 0, :max => 1, :order => 1, :place => :element, :choice => 0 } @children['exact-dose'] = {:name => 'exact-dose', :class => HealthVault::WCData::Thing::Types::PositiveDouble, :value => nil, :min => 0, :max => 1, :order => 2, :place => :element, :choice => 0 } @children['min-dose'] = {:name => 'min-dose', :class => HealthVault::WCData::Thing::Types::PositiveDouble, :value => nil, :min => 0, :max => 1, :order => 3, :place => :element, :choice => 0 } @children['max-dose'] = {:name => 'max-dose', :class => HealthVault::WCData::Thing::Types::PositiveDouble, :value => nil, :min => 0, :max => 1, :order => 4, :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
#description ⇒ Object
returns: a String
26 27 28 |
# File 'lib/wc_data/generated/thing/medication/dose_value.rb', line 26 def description return @children['description'][:value] end |
#description=(value) ⇒ Object
value is a String
21 22 23 |
# File 'lib/wc_data/generated/thing/medication/dose_value.rb', line 21 def description=(value) @children['description'][:value] = value end |
#exact_dose ⇒ Object
returns: a HealthVault::WCData::Thing::Types::PositiveDouble
41 42 43 |
# File 'lib/wc_data/generated/thing/medication/dose_value.rb', line 41 def exact_dose return @children['exact-dose'][:value] end |
#exact_dose=(value) ⇒ Object
remarks: The dosage to be taken is exactly specified. value is a HealthVault::WCData::Thing::Types::PositiveDouble
36 37 38 |
# File 'lib/wc_data/generated/thing/medication/dose_value.rb', line 36 def exact_dose=(value) @children['exact-dose'][:value] = value end |
#max_dose ⇒ Object
returns: a HealthVault::WCData::Thing::Types::PositiveDouble
71 72 73 |
# File 'lib/wc_data/generated/thing/medication/dose_value.rb', line 71 def max_dose return @children['max-dose'][:value] end |
#max_dose=(value) ⇒ Object
remarks: The dosage to be taken is specified as a range with this value indicating the maximum dosage that should be taken. value is a HealthVault::WCData::Thing::Types::PositiveDouble
66 67 68 |
# File 'lib/wc_data/generated/thing/medication/dose_value.rb', line 66 def max_dose=(value) @children['max-dose'][:value] = value end |
#min_dose ⇒ Object
returns: a HealthVault::WCData::Thing::Types::PositiveDouble
56 57 58 |
# File 'lib/wc_data/generated/thing/medication/dose_value.rb', line 56 def min_dose return @children['min-dose'][:value] end |
#min_dose=(value) ⇒ Object
remarks: The dosage to be taken is specified as a range with this value indicating the minimum dosage that should be taken. value is a HealthVault::WCData::Thing::Types::PositiveDouble
51 52 53 |
# File 'lib/wc_data/generated/thing/medication/dose_value.rb', line 51 def min_dose=(value) @children['min-dose'][:value] = value end |