Class: HealthVault::WCData::Thing::Inhaler::Asthmainhaler
- Inherits:
-
ComplexType
- Object
- ComplexType
- HealthVault::WCData::Thing::Inhaler::Asthmainhaler
- Defined in:
- lib/wc_data/generated/thing/inhaler/asthma_inhaler.rb
Instance Attribute Summary
Attributes inherited from ComplexType
Instance Method Summary collapse
-
#add_alert(value) ⇒ Object
value is a HealthVault::WCData::Thing::Inhaler::Alert.
-
#alert ⇒ Object
remarks: Note that his information can change without requiring a new thing to be created.
-
#can_alert ⇒ Object
returns: a String.
-
#can_alert=(value) ⇒ Object
value is a String.
-
#device_id ⇒ Object
returns: a String.
-
#device_id=(value) ⇒ Object
remarks: If available, this value can be used to correlate uses.
-
#drug ⇒ Object
returns: a HealthVault::WCData::Thing::Types::Codablevalue.
-
#drug=(value) ⇒ Object
remarks: For example, ‘ventolin’ or ‘albuterol’.
-
#expiration_date ⇒ Object
returns: a HealthVault::WCData::Dates::Approxdatetime.
-
#expiration_date=(value) ⇒ Object
value is a HealthVault::WCData::Dates::Approxdatetime.
-
#initial_doses ⇒ Object
returns: a String.
-
#initial_doses=(value) ⇒ Object
remarks: This may not be the number the canister started with since the expectation is that a change in regimen will cause a new thing to be created as well.
-
#initialize ⇒ Asthmainhaler
constructor
A new instance of Asthmainhaler.
-
#max_daily_doses ⇒ Object
returns: a String.
-
#max_daily_doses=(value) ⇒ Object
remarks: A dose is one puff.
-
#min_daily_doses ⇒ Object
returns: a String.
-
#min_daily_doses=(value) ⇒ Object
remarks: A dose is one puff.
-
#purpose ⇒ Object
returns: a HealthVault::WCData::Thing::Inhaler::Purpose.
-
#purpose=(value) ⇒ Object
value is a HealthVault::WCData::Thing::Inhaler::Purpose.
-
#remove_alert(value) ⇒ Object
value is a #HealthVault::WCData::Thing::Inhaler::Alert.
-
#start_date ⇒ Object
returns: a HealthVault::WCData::Dates::Approxdatetime.
-
#start_date=(value) ⇒ Object
value is a HealthVault::WCData::Dates::Approxdatetime.
-
#stop_date ⇒ Object
returns: a HealthVault::WCData::Dates::Approxdatetime.
-
#stop_date=(value) ⇒ Object
remarks: Absence of this element implied that as far as we know the canister is still in use.
-
#strength ⇒ Object
returns: a HealthVault::WCData::Thing::Types::Codablevalue.
-
#strength=(value) ⇒ Object
remarks: For example, ‘44 mcg / puff’.
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 ⇒ Asthmainhaler
Returns a new instance of Asthmainhaler.
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 |
# File 'lib/wc_data/generated/thing/inhaler/asthma_inhaler.rb', line 199 def initialize super self.tag_name = 'asthma-inhaler' @children['drug'] = {:name => 'drug', :class => HealthVault::WCData::Thing::Types::Codablevalue, :value => nil, :min => 1, :max => 1, :order => 1, :place => :element, :choice => 0 } @children['drug'][:value] = HealthVault::WCData::Thing::Types::Codablevalue.new @children['strength'] = {:name => 'strength', :class => HealthVault::WCData::Thing::Types::Codablevalue, :value => nil, :min => 0, :max => 1, :order => 2, :place => :element, :choice => 0 } @children['purpose'] = {:name => 'purpose', :class => HealthVault::WCData::Thing::Inhaler::Purpose, :value => nil, :min => 0, :max => 1, :order => 3, :place => :element, :choice => 0 } @children['start-date'] = {:name => 'start-date', :class => HealthVault::WCData::Dates::Approxdatetime, :value => nil, :min => 1, :max => 1, :order => 4, :place => :element, :choice => 0 } @children['start-date'][:value] = HealthVault::WCData::Dates::Approxdatetime.new @children['stop-date'] = {:name => 'stop-date', :class => HealthVault::WCData::Dates::Approxdatetime, :value => nil, :min => 0, :max => 1, :order => 5, :place => :element, :choice => 0 } @children['expiration-date'] = {:name => 'expiration-date', :class => HealthVault::WCData::Dates::Approxdatetime, :value => nil, :min => 0, :max => 1, :order => 6, :place => :element, :choice => 0 } @children['device-id'] = {:name => 'device-id', :class => String, :value => nil, :min => 0, :max => 1, :order => 7, :place => :element, :choice => 0 } @children['initial-doses'] = {:name => 'initial-doses', :class => String, :value => nil, :min => 0, :max => 1, :order => 8, :place => :element, :choice => 0 } @children['min-daily-doses'] = {:name => 'min-daily-doses', :class => String, :value => nil, :min => 0, :max => 1, :order => 9, :place => :element, :choice => 0 } @children['max-daily-doses'] = {:name => 'max-daily-doses', :class => String, :value => nil, :min => 0, :max => 1, :order => 10, :place => :element, :choice => 0 } @children['can-alert'] = {:name => 'can-alert', :class => String, :value => nil, :min => 0, :max => 1, :order => 11, :place => :element, :choice => 0 } @children['alert'] = {:name => 'alert', :class => HealthVault::WCData::Thing::Inhaler::Alert, :value => Array.new, :min => 0, :max => 999999, :order => 12, :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_alert(value) ⇒ Object
value is a HealthVault::WCData::Thing::Inhaler::Alert
180 181 182 |
# File 'lib/wc_data/generated/thing/inhaler/asthma_inhaler.rb', line 180 def add_alert(value) @children['alert'][:value] << value end |
#alert ⇒ Object
remarks: Note that his information can change without requiring a new thing to be created. The device data is the key for alerts, we just keep it here for display purposes. returns: a HealthVault::WCData::Thing::Inhaler::Alert Array
193 194 195 |
# File 'lib/wc_data/generated/thing/inhaler/asthma_inhaler.rb', line 193 def alert return @children['alert'][:value] end |
#can_alert ⇒ Object
returns: a String
173 174 175 |
# File 'lib/wc_data/generated/thing/inhaler/asthma_inhaler.rb', line 173 def can_alert return @children['can-alert'][:value] end |
#can_alert=(value) ⇒ Object
value is a String
168 169 170 |
# File 'lib/wc_data/generated/thing/inhaler/asthma_inhaler.rb', line 168 def can_alert=(value) @children['can-alert'][:value] = value end |
#device_id ⇒ Object
returns: a String
114 115 116 |
# File 'lib/wc_data/generated/thing/inhaler/asthma_inhaler.rb', line 114 def device_id return @children['device-id'][:value] end |
#device_id=(value) ⇒ Object
remarks: If available, this value can be used to correlate uses. value is a String
109 110 111 |
# File 'lib/wc_data/generated/thing/inhaler/asthma_inhaler.rb', line 109 def device_id=(value) @children['device-id'][:value] = value end |
#drug ⇒ Object
returns: a HealthVault::WCData::Thing::Types::Codablevalue
27 28 29 |
# File 'lib/wc_data/generated/thing/inhaler/asthma_inhaler.rb', line 27 def drug return @children['drug'][:value] end |
#drug=(value) ⇒ Object
remarks: For example, ‘ventolin’ or ‘albuterol’. value is a HealthVault::WCData::Thing::Types::Codablevalue
22 23 24 |
# File 'lib/wc_data/generated/thing/inhaler/asthma_inhaler.rb', line 22 def drug=(value) @children['drug'][:value] = value end |
#expiration_date ⇒ Object
returns: a HealthVault::WCData::Dates::Approxdatetime
99 100 101 |
# File 'lib/wc_data/generated/thing/inhaler/asthma_inhaler.rb', line 99 def expiration_date return @children['expiration-date'][:value] end |
#expiration_date=(value) ⇒ Object
value is a HealthVault::WCData::Dates::Approxdatetime
94 95 96 |
# File 'lib/wc_data/generated/thing/inhaler/asthma_inhaler.rb', line 94 def expiration_date=(value) @children['expiration-date'][:value] = value end |
#initial_doses ⇒ Object
returns: a String
129 130 131 |
# File 'lib/wc_data/generated/thing/inhaler/asthma_inhaler.rb', line 129 def initial_doses return @children['initial-doses'][:value] end |
#initial_doses=(value) ⇒ Object
remarks: This may not be the number the canister started with since the expectation is that a change in regimen will cause a new thing to be created as well. value is a String
124 125 126 |
# File 'lib/wc_data/generated/thing/inhaler/asthma_inhaler.rb', line 124 def initial_doses=(value) @children['initial-doses'][:value] = value end |
#max_daily_doses ⇒ Object
returns: a String
159 160 161 |
# File 'lib/wc_data/generated/thing/inhaler/asthma_inhaler.rb', line 159 def max_daily_doses return @children['max-daily-doses'][:value] end |
#max_daily_doses=(value) ⇒ Object
remarks: A dose is one puff. value is a String
154 155 156 |
# File 'lib/wc_data/generated/thing/inhaler/asthma_inhaler.rb', line 154 def max_daily_doses=(value) @children['max-daily-doses'][:value] = value end |
#min_daily_doses ⇒ Object
returns: a String
144 145 146 |
# File 'lib/wc_data/generated/thing/inhaler/asthma_inhaler.rb', line 144 def min_daily_doses return @children['min-daily-doses'][:value] end |
#min_daily_doses=(value) ⇒ Object
remarks: A dose is one puff. value is a String
139 140 141 |
# File 'lib/wc_data/generated/thing/inhaler/asthma_inhaler.rb', line 139 def min_daily_doses=(value) @children['min-daily-doses'][:value] = value end |
#purpose ⇒ Object
returns: a HealthVault::WCData::Thing::Inhaler::Purpose
56 57 58 |
# File 'lib/wc_data/generated/thing/inhaler/asthma_inhaler.rb', line 56 def purpose return @children['purpose'][:value] end |
#purpose=(value) ⇒ Object
value is a HealthVault::WCData::Thing::Inhaler::Purpose
51 52 53 |
# File 'lib/wc_data/generated/thing/inhaler/asthma_inhaler.rb', line 51 def purpose=(value) @children['purpose'][:value] = value end |
#remove_alert(value) ⇒ Object
value is a #HealthVault::WCData::Thing::Inhaler::Alert
185 186 187 |
# File 'lib/wc_data/generated/thing/inhaler/asthma_inhaler.rb', line 185 def remove_alert(value) @children['alert'][:value].delete(value) end |
#start_date ⇒ Object
returns: a HealthVault::WCData::Dates::Approxdatetime
70 71 72 |
# File 'lib/wc_data/generated/thing/inhaler/asthma_inhaler.rb', line 70 def start_date return @children['start-date'][:value] end |
#start_date=(value) ⇒ Object
value is a HealthVault::WCData::Dates::Approxdatetime
65 66 67 |
# File 'lib/wc_data/generated/thing/inhaler/asthma_inhaler.rb', line 65 def start_date=(value) @children['start-date'][:value] = value end |
#stop_date ⇒ Object
returns: a HealthVault::WCData::Dates::Approxdatetime
85 86 87 |
# File 'lib/wc_data/generated/thing/inhaler/asthma_inhaler.rb', line 85 def stop_date return @children['stop-date'][:value] end |
#stop_date=(value) ⇒ Object
remarks: Absence of this element implied that as far as we know the canister is still in use. value is a HealthVault::WCData::Dates::Approxdatetime
80 81 82 |
# File 'lib/wc_data/generated/thing/inhaler/asthma_inhaler.rb', line 80 def stop_date=(value) @children['stop-date'][:value] = value end |
#strength ⇒ Object
returns: a HealthVault::WCData::Thing::Types::Codablevalue
42 43 44 |
# File 'lib/wc_data/generated/thing/inhaler/asthma_inhaler.rb', line 42 def strength return @children['strength'][:value] end |
#strength=(value) ⇒ Object
remarks: For example, ‘44 mcg / puff’. value is a HealthVault::WCData::Thing::Types::Codablevalue
37 38 39 |
# File 'lib/wc_data/generated/thing/inhaler/asthma_inhaler.rb', line 37 def strength=(value) @children['strength'][:value] = value end |