ion_orders_engine_mockingjay 1.0.1.SNAPSHOT

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +0 -0
  3. data/Rakefile +4 -0
  4. data/app/assets/images/rails.png +0 -0
  5. data/app/assets/javascripts/application.js +16 -0
  6. data/app/assets/javascripts/bootstrap_additions.js.coffee +4 -0
  7. data/app/assets/javascripts/interchange/patients.js.coffee +3 -0
  8. data/app/assets/javascripts/interchange/physicians.js.coffee +3 -0
  9. data/app/assets/javascripts/mock/allergies.js.coffee +3 -0
  10. data/app/assets/javascripts/mock/appointments.js.coffee +3 -0
  11. data/app/assets/javascripts/mock/assignments.js.coffee +17 -0
  12. data/app/assets/javascripts/mock/chart_reviews.js.coffee +3 -0
  13. data/app/assets/javascripts/mock/comments.js.coffee +3 -0
  14. data/app/assets/javascripts/mock/conditions.js.coffee +3 -0
  15. data/app/assets/javascripts/mock/diagnoses.js.coffee +3 -0
  16. data/app/assets/javascripts/mock/documents.js.coffee +3 -0
  17. data/app/assets/javascripts/mock/employments.js.coffee +3 -0
  18. data/app/assets/javascripts/mock/encounters.js.coffee +3 -0
  19. data/app/assets/javascripts/mock/family_contacts.js.coffee +3 -0
  20. data/app/assets/javascripts/mock/family_histories.js.coffee +3 -0
  21. data/app/assets/javascripts/mock/guarantors.js.coffee +3 -0
  22. data/app/assets/javascripts/mock/insurance_plans.js.coffee +3 -0
  23. data/app/assets/javascripts/mock/lab_concepts.js.coffee +4 -0
  24. data/app/assets/javascripts/mock/lab_results.js.coffee +3 -0
  25. data/app/assets/javascripts/mock/locations.js.coffee +3 -0
  26. data/app/assets/javascripts/mock/medical_record_numbers.js.coffee +3 -0
  27. data/app/assets/javascripts/mock/metadata_keywords.js.coffee +3 -0
  28. data/app/assets/javascripts/mock/pharmacies.js.coffee +3 -0
  29. data/app/assets/javascripts/mock/phone_numbers.js.coffee +3 -0
  30. data/app/assets/javascripts/mock/physicians.js.coffee +3 -0
  31. data/app/assets/javascripts/mock/procedure_histories.js.coffee +3 -0
  32. data/app/assets/javascripts/mock/providers.js.coffee +14 -0
  33. data/app/assets/javascripts/mock/questions.js.coffee +3 -0
  34. data/app/assets/javascripts/mock/reference_range.js.coffee +3 -0
  35. data/app/assets/javascripts/mock/sections.js.coffee +3 -0
  36. data/app/assets/javascripts/mock/social_histories.js.coffee +3 -0
  37. data/app/assets/javascripts/mock/state_health_identifiers.js.coffee +3 -0
  38. data/app/assets/javascripts/mock/statistics.js.coffee +3 -0
  39. data/app/assets/javascripts/mock/test_assertions.js.coffee +3 -0
  40. data/app/assets/javascripts/mock/visit.js.coffee +3 -0
  41. data/app/assets/javascripts/mock/vitals_measurement.js.coffee +3 -0
  42. data/app/assets/javascripts/reference/data_elements.js.coffee +3 -0
  43. data/app/assets/javascripts/reference/data_lists.js.coffee +3 -0
  44. data/app/assets/javascripts/reference/data_sets.js.coffee +3 -0
  45. data/app/assets/stylesheets/application.css.scss +13 -0
  46. data/app/assets/stylesheets/bootstrap_and_overrides.css.scss +79 -0
  47. data/app/assets/stylesheets/forms.css.scss +67 -0
  48. data/app/assets/stylesheets/interchange/patients.css.scss +3 -0
  49. data/app/assets/stylesheets/interchange/physicians.css.scss +3 -0
  50. data/app/assets/stylesheets/mock/allergies.css.scss +3 -0
  51. data/app/assets/stylesheets/mock/appointments.css.scss +3 -0
  52. data/app/assets/stylesheets/mock/chart_reviews.css.scss +3 -0
  53. data/app/assets/stylesheets/mock/comments.css.scss +3 -0
  54. data/app/assets/stylesheets/mock/conditions.css.scss +3 -0
  55. data/app/assets/stylesheets/mock/diagnoses.css.scss +3 -0
  56. data/app/assets/stylesheets/mock/documents.css.scss +3 -0
  57. data/app/assets/stylesheets/mock/employments.css.scss +3 -0
  58. data/app/assets/stylesheets/mock/encounters.css.scss +3 -0
  59. data/app/assets/stylesheets/mock/family_contacts.css.scss +3 -0
  60. data/app/assets/stylesheets/mock/family_histories.css.scss +3 -0
  61. data/app/assets/stylesheets/mock/guarantors.css.scss +3 -0
  62. data/app/assets/stylesheets/mock/insurance_plans.css.scss +3 -0
  63. data/app/assets/stylesheets/mock/lab_concepts.css.scss +3 -0
  64. data/app/assets/stylesheets/mock/lab_results.css.scss +3 -0
  65. data/app/assets/stylesheets/mock/locations.css.scss +3 -0
  66. data/app/assets/stylesheets/mock/medical_record_numbers.css.scss +3 -0
  67. data/app/assets/stylesheets/mock/metadata_keywords.css.scss +3 -0
  68. data/app/assets/stylesheets/mock/pharmacies.css.scss +3 -0
  69. data/app/assets/stylesheets/mock/phone_numbers.css.scss +3 -0
  70. data/app/assets/stylesheets/mock/physicians.css.scss +3 -0
  71. data/app/assets/stylesheets/mock/procedure_histories.css.scss +3 -0
  72. data/app/assets/stylesheets/mock/providers.css.scss +3 -0
  73. data/app/assets/stylesheets/mock/questions.css.scss +3 -0
  74. data/app/assets/stylesheets/mock/reference_range.css.scss +3 -0
  75. data/app/assets/stylesheets/mock/sections.css.scss +3 -0
  76. data/app/assets/stylesheets/mock/social_histories.css.scss +3 -0
  77. data/app/assets/stylesheets/mock/state_health_identifiers.css.scss +3 -0
  78. data/app/assets/stylesheets/mock/statistics.css.scss +3 -0
  79. data/app/assets/stylesheets/mock/test_assertions.css.scss +3 -0
  80. data/app/assets/stylesheets/mock/visit.css.scss +3 -0
  81. data/app/assets/stylesheets/mock/vitals_measurement.css.scss +3 -0
  82. data/app/assets/stylesheets/reference/data_elements.css.scss +3 -0
  83. data/app/assets/stylesheets/reference/data_lists.css.scss +3 -0
  84. data/app/assets/stylesheets/reference/data_sets.css.scss +3 -0
  85. data/app/assets/stylesheets/scaffolds.css.scss +66 -0
  86. data/app/controllers/api/base_controller.rb +78 -0
  87. data/app/controllers/api/ion_orders_engine/order_by_id/order_by_id_controller.rb +3220 -0
  88. data/app/controllers/api/ion_orders_engine/order_profile/inpatient_order_profile_controller.rb +3156 -0
  89. data/app/controllers/application_controller.rb +25 -0
  90. data/app/controllers/crud/base_controller.rb +90 -0
  91. data/app/controllers/interchange/base_controller.rb +63 -0
  92. data/app/controllers/interchange/data_sets_controller.rb +40 -0
  93. data/app/controllers/interchange/exports_controller.rb +120 -0
  94. data/app/controllers/interchange/imports_controller.rb +141 -0
  95. data/app/controllers/reference/base_controller.rb +7 -0
  96. data/app/controllers/reference/data_lists_controller.rb +177 -0
  97. data/app/controllers/reference/data_options_controller.rb +147 -0
  98. data/app/controllers/reference/data_sets_controller.rb +160 -0
  99. data/app/helpers/application_helper.rb +389 -0
  100. data/app/helpers/error_messages_helper.rb +23 -0
  101. data/app/helpers/interchange/exports_helper.rb +9 -0
  102. data/app/helpers/interchange/imports_helper.rb +31 -0
  103. data/app/helpers/layout_helper.rb +40 -0
  104. data/app/helpers/reference/data_elements_helper.rb +2 -0
  105. data/app/helpers/reference/data_lists_helper.rb +2 -0
  106. data/app/helpers/reference/data_sets_helper.rb +2 -0
  107. data/app/views/interchange/common/_database_info.json.jbuilder +6 -0
  108. data/app/views/interchange/common/_metadata_keywords.json.jbuilder +13 -0
  109. data/app/views/interchange/common/_test_assertions.json.jbuilder +17 -0
  110. data/app/views/interchange/data_sets/_data_list.json.jbuilder +14 -0
  111. data/app/views/interchange/data_sets/_data_option.json.jbuilder +12 -0
  112. data/app/views/interchange/data_sets/_data_set.json.jbuilder +17 -0
  113. data/app/views/interchange/data_sets/_nested_data_list.json.jbuilder +12 -0
  114. data/app/views/interchange/data_sets/show.json.jbuilder +10 -0
  115. data/app/views/interchange/document_templates/_document_template.json.jbuilder +23 -0
  116. data/app/views/interchange/document_templates/_section.json.jbuilder +11 -0
  117. data/app/views/interchange/document_templates/show.json.jbuilder +10 -0
  118. data/app/views/interchange/exports/_export_summary.html.erb +49 -0
  119. data/app/views/interchange/exports/show.html.erb +35 -0
  120. data/app/views/interchange/imports/_import_summary.html.erb +72 -0
  121. data/app/views/interchange/imports/show.html.erb +37 -0
  122. data/app/views/layouts/_flashbar.html.erb +6 -0
  123. data/app/views/layouts/_navbar.html.erb +38 -0
  124. data/app/views/layouts/_protected_warning.html.erb +7 -0
  125. data/app/views/layouts/_root_model_layout.erb +33 -0
  126. data/app/views/layouts/application.html.erb +39 -0
  127. data/app/views/layouts/reference/data_sets.html.erb +5 -0
  128. data/app/views/reference/data_lists/_data_options.html.erb +31 -0
  129. data/app/views/reference/data_lists/_form.html.erb +23 -0
  130. data/app/views/reference/data_lists/edit.html.erb +6 -0
  131. data/app/views/reference/data_lists/index.html.erb +31 -0
  132. data/app/views/reference/data_lists/new.html.erb +6 -0
  133. data/app/views/reference/data_lists/show.html.erb +55 -0
  134. data/app/views/reference/data_options/_form.html.erb +23 -0
  135. data/app/views/reference/data_options/edit.html.erb +5 -0
  136. data/app/views/reference/data_options/index.html.erb +38 -0
  137. data/app/views/reference/data_options/new.html.erb +5 -0
  138. data/app/views/reference/data_options/show.html.erb +33 -0
  139. data/app/views/reference/data_sets/_form.html.erb +25 -0
  140. data/app/views/reference/data_sets/edit.html.erb +5 -0
  141. data/app/views/reference/data_sets/index.html.erb +40 -0
  142. data/app/views/reference/data_sets/new.html.erb +5 -0
  143. data/app/views/reference/data_sets/show.html.erb +38 -0
  144. data/config/application.rb +100 -0
  145. data/config/boot.rb +6 -0
  146. data/config/database.yml +25 -0
  147. data/config/environment.rb +5 -0
  148. data/config/environments/development.rb +42 -0
  149. data/config/environments/production.rb +64 -0
  150. data/config/environments/test.rb +35 -0
  151. data/config/initializers/backtrace_silencers.rb +7 -0
  152. data/config/initializers/extensions/active_record.rb +13 -0
  153. data/config/initializers/extensions/hash.rb +11 -0
  154. data/config/initializers/extensions/string.rb +15 -0
  155. data/config/initializers/inflections.rb +15 -0
  156. data/config/initializers/mime_types.rb +5 -0
  157. data/config/initializers/reference.rb +77 -0
  158. data/config/initializers/secret_token.rb +7 -0
  159. data/config/initializers/session_store.rb +8 -0
  160. data/config/initializers/simple_form.rb +142 -0
  161. data/config/initializers/simple_form_bootstrap.rb +45 -0
  162. data/config/initializers/wrap_parameters.rb +10 -0
  163. data/config/locales/en.yml +207 -0
  164. data/config/locales/simple_form.en.yml +26 -0
  165. data/config/mongo.yml +18 -0
  166. data/config/routes.rb +4 -0
  167. data/db/schema.rb +16 -0
  168. data/db/seeds.rb +66 -0
  169. data/lib/ion_orders_engine_mockingjay/engine.rb +13 -0
  170. data/lib/ion_orders_engine_mockingjay/version.rb +3 -0
  171. data/lib/ion_orders_engine_mockingjay.rb +4 -0
  172. data/lib/tasks/ion_orders_engine_mockingjay_tasks.rake +4 -0
  173. metadata +215 -0
@@ -0,0 +1,3220 @@
1
+ # coding: UTF-8
2
+
3
+ module Api
4
+ module IonOrdersEngine
5
+ class OrderById::OrderByIdController < Api::BaseController
6
+
7
+ # API URL: /patients/:patientId/orders/:orderId
8
+ def show
9
+
10
+ puts "params"
11
+ puts params.to_json
12
+
13
+ orderId = params[:orderId].to_i
14
+ order = find_order_by_id(orderId)
15
+
16
+ json_reply = nil
17
+
18
+ if (order)
19
+ json_reply = {:order => order}
20
+ else
21
+ json_reply = {}
22
+ end
23
+
24
+ puts "reply"
25
+ puts json_reply.to_json
26
+ render json: json_reply
27
+ end
28
+
29
+ def find_order_by_id(id)
30
+ order = find_scheduled_order_with_id(id)
31
+ if order.nil?
32
+ order = find_prn_order_with_id(id)
33
+ end
34
+ if order.nil?
35
+ order = find_continuous_order_with_id(id)
36
+ end
37
+ order
38
+ end
39
+
40
+ def find_scheduled_order_with_id(id)
41
+ foundOrder = nil
42
+ scheduledOrders = scheduled_orders
43
+ scheduledOrders.each do |order|
44
+ if order[:orderId] == id
45
+ foundOrder = order
46
+ end
47
+ end
48
+ foundOrder
49
+ end
50
+
51
+ def find_prn_order_with_id(id)
52
+ foundOrder = nil
53
+ prnOrders = prn_orders
54
+ prnOrders.each do |order|
55
+ if order[:orderId] == id
56
+ foundOrder = order
57
+ end
58
+ end
59
+ foundOrder
60
+ end
61
+
62
+ def find_continuous_order_with_id(id)
63
+ foundOrder = nil
64
+ continuousOrders = continuous_orders
65
+ continuousOrders.each do |order|
66
+ if order[:orderId] == id
67
+ foundOrder = order
68
+ end
69
+ end
70
+ foundOrder
71
+ end
72
+
73
+ def scheduled_orders
74
+ singleIngredientOrder1 = {:orderType => "SINGLEINGREDIENT",
75
+ :orderId => 10000001,
76
+ :mnemonic => "Albuterol",
77
+ :status => "Ordered",
78
+ :version => 0,
79
+ :orderingProvider => "Elec Man",
80
+ :synonymId => 20000001,
81
+ :dose => {
82
+ :preferredDoseType => "STRENGTH",
83
+ :strengthDose => {
84
+ :numericValue => {
85
+ :value => 25,
86
+ :precision => 2
87
+ },
88
+ :unitOfMeasure => {
89
+ :value => 30000011,
90
+ :meaning => "MG",
91
+ :display => "mg"
92
+ }
93
+ }
94
+ },
95
+ :details => [{
96
+ :sequence => 0,
97
+ :displayDescription => "Route of Administration",
98
+ :fieldMeaning => "RXROUTE",
99
+ :detailValues => [
100
+ {
101
+ :valueType => "CODE_VALUE",
102
+ :value => 30000013,
103
+ :meaning => "ORAL",
104
+ :display => "Oral"
105
+ }
106
+ ]
107
+ },
108
+ {
109
+ :sequence => 1,
110
+ :displayDescription => "Frequency",
111
+ :fieldMeaning => "FREQ",
112
+ :detailValues => [
113
+ {
114
+ :valueType => "CODE_VALUE",
115
+ :value => 30000014,
116
+ :meaning => "ONCE",
117
+ :display => "Once"
118
+ }
119
+ ]
120
+ },
121
+ {
122
+ :sequence => 3,
123
+ :displayDescription => "Duration",
124
+ :fieldMeaning => "DURATION",
125
+ :detailValues => [
126
+ {
127
+ :valueType => "MEASUREMENT",
128
+ :numericValue => {
129
+ :value => 2.5,
130
+ :precision => 2
131
+ },
132
+ :unitOfMeasure => {
133
+ :value => 30000015,
134
+ :meaning => "DAYS",
135
+ :display => "Day(s)"
136
+ }
137
+ }
138
+ ]
139
+ },
140
+ {
141
+ :sequence => 4,
142
+ :displayDescription => "Start date",
143
+ :fieldMeaning => "REQSTARTDTTM",
144
+ :detailValues => [
145
+ {
146
+ :valueType => "DATE_TIME",
147
+ :value => "2013-02-05T12:09:06-0500"
148
+ }
149
+ ]
150
+ },
151
+ {
152
+ :sequence => 5,
153
+ :displayDescription => "Stop date",
154
+ :fieldMeaning => "STOPDTTM",
155
+ :detailValues => [
156
+ {
157
+ :valueType => "DATE_TIME"
158
+ }
159
+ ]
160
+ },
161
+ {
162
+ :sequence => 10,
163
+ :displayDescription => "Scheduled / PRN",
164
+ :fieldMeaning => "SCH/PRN",
165
+ :detailValues => [
166
+ {
167
+ :valueType => "BOOLEAN",
168
+ :value => false
169
+ }
170
+ ]
171
+ },
172
+ {
173
+ :sequence => 13,
174
+ :displayDescription => "Number of Refills",
175
+ :fieldMeaning => "NBRREFILLS",
176
+ :detailValues => [
177
+ {
178
+ :valueType => "INTEGER",
179
+ :value => 5,
180
+ :precision => 0
181
+ }
182
+ ]
183
+ },
184
+ {
185
+ :sequence => 14,
186
+ :displayDescription => "Dispense as Written",
187
+ :fieldMeaning => "DAW",
188
+ :detailValues => [
189
+ {
190
+ :valueType => "BOOLEAN",
191
+ :value => true
192
+ }
193
+ ]
194
+ },
195
+ {
196
+ :sequence => 15,
197
+ :displayDescription => "Future Order",
198
+ :fieldMeaning => "FUTUREORDER",
199
+ :detailValues => [
200
+ {
201
+ :valueType => "BOOLEAN",
202
+ :value => false
203
+ }
204
+ ]
205
+ },
206
+ {
207
+ :sequence => 2147483646,
208
+ :displayDescription => "Treatment Period",
209
+ :fieldMeaning => "TREATMENTPERIOD",
210
+ :detailValues => [
211
+ :valueType => "TEXT",
212
+ :value => "Day 5"
213
+ ]
214
+ },
215
+ {
216
+ :sequence => 2147483647,
217
+ :displayDescription => "Order Comment",
218
+ :fieldMeaning => "ORDER_COMMENT",
219
+ :detailValues => [
220
+ :valueType => "TEXT",
221
+ :value => "this is a test comment that is really really really really really really really really super duper long to make the text wrap in the cell"
222
+ ]
223
+ }]}
224
+
225
+ singleIngredientOrder2 = {:orderType => "SINGLEINGREDIENT",
226
+ :orderId => 10000002,
227
+ :mnemonic => "Aspirin",
228
+ :status => "Ordered",
229
+ :version => 3,
230
+ :orderingProvider => "Ice Man",
231
+ :synonymId => 20000002,
232
+ :dose => {
233
+ :preferredDoseType => "VOLUME",
234
+ :volumeDose => {
235
+ :numericValue => {
236
+ :value => 50,
237
+ :precision => 2
238
+ },
239
+ :unitOfMeasure => {
240
+ :value => 30000012,
241
+ :meaning => "ML",
242
+ :display => "ml"
243
+ }
244
+ }
245
+ },
246
+ :details => [{
247
+ :sequence => 0,
248
+ :displayDescription => "Route of Administration",
249
+ :fieldMeaning => "RXROUTE",
250
+ :detailValues => [
251
+ {
252
+ :valueType => "CODE_VALUE",
253
+ :value => 30000014,
254
+ :meaning => "ONCE",
255
+ :display => "ONCE"
256
+ }
257
+ ]
258
+ },
259
+ {
260
+ :sequence => 1,
261
+ :displayDescription => "Frequency",
262
+ :fieldMeaning => "FREQ",
263
+ :detailValues => [
264
+ {
265
+ :valueType => "CODE_VALUE",
266
+ :value => 30000014,
267
+ :meaning => "BID",
268
+ :display => "BID"
269
+ }
270
+ ]
271
+ },
272
+ {
273
+ :sequence => 3,
274
+ :displayDescription => "Duration",
275
+ :fieldMeaning => "DURATION",
276
+ :detailValues => [
277
+ {
278
+ :valueType => "MEASUREMENT",
279
+ :numericValue => {
280
+ :value => 5,
281
+ :precision => 2
282
+ },
283
+ :unitOfMeasure => {
284
+ :value => 30000015,
285
+ :meaning => "WEEKS",
286
+ :display => "weeks"
287
+ }
288
+ }
289
+ ]
290
+ },
291
+ {
292
+ :sequence => 4,
293
+ :displayDescription => "Start date",
294
+ :fieldMeaning => "REQSTARTDTTM",
295
+ :detailValues => [
296
+ {
297
+ :valueType => "DATE_TIME",
298
+ :value => "2013-06-12T12:09:06-0500"
299
+ }
300
+ ]
301
+ },
302
+ {
303
+ :sequence => 5,
304
+ :displayDescription => "Stop date",
305
+ :fieldMeaning => "STOPDTTM",
306
+ :detailValues => [
307
+ {
308
+ :valueType => "DATE_TIME",
309
+ :value => "2013-07-12T12:09:06-0500"
310
+ }
311
+ ]
312
+ },
313
+ {
314
+ :sequence => 13,
315
+ :displayDescription => "Number of Refills",
316
+ :fieldMeaning => "NBRREFILLS",
317
+ :detailValues => [
318
+ {
319
+ :valueType => "INTEGER",
320
+ :value => 7,
321
+ :precision => 0
322
+ }
323
+ ]
324
+ },
325
+ {
326
+ :sequence => 14,
327
+ :displayDescription => "Dispense as Written",
328
+ :fieldMeaning => "DAW",
329
+ :detailValues => [
330
+ {
331
+ :valueType => "BOOLEAN",
332
+ :value => true
333
+ }
334
+ ]
335
+ },
336
+ {
337
+ :sequence => 15,
338
+ :displayDescription => "Future Order",
339
+ :fieldMeaning => "FUTUREORDER",
340
+ :detailValues => [
341
+ {
342
+ :valueType => "BOOLEAN",
343
+ :value => true
344
+ }
345
+ ]
346
+ },
347
+ {
348
+ :sequence => 2147483646,
349
+ :displayDescription => "Inspiratory Time",
350
+ :fieldMeaning => "INSPIRATORYTIME",
351
+ :detailValues => [
352
+ {
353
+ :valueType => "DECIMAL_WITH_PRECISION",
354
+ :value => 100.34,
355
+ :precision => 2
356
+ }
357
+ ]
358
+ },
359
+ {
360
+ :sequence => 2147483646,
361
+ :displayDescription => "Treatment Period",
362
+ :fieldMeaning => "TREATMENTPERIOD",
363
+ :detailValues => [
364
+ :valueType => "TEXT",
365
+ :value => "Day 1"
366
+ ]
367
+ }]}
368
+
369
+ intermittentOrder1 = {:orderType => "INTERMITTENT",
370
+ :orderId => 10000004,
371
+ :mnemonic => "Intermittent 1",
372
+ :status => "Ordered",
373
+ :version => 0,
374
+ :orderingProvider => "Guts Man",
375
+ :synonymId => 20000004,
376
+ :drivingAgent => {
377
+ :mnemonic => "mesna",
378
+ :dose => {
379
+ :preferredDoseType => "VOLUME",
380
+ :volumeDose => {
381
+ :numericValue => {
382
+ :value => 25,
383
+ :precision => 2
384
+ },
385
+ :unitOfMeasure => {
386
+ :value => 30000012,
387
+ :meaning => "ML",
388
+ :display => "ml"
389
+ }
390
+ }
391
+ },
392
+ :rate => {
393
+ :numericValue => {
394
+ :value => 100.00,
395
+ :precision => 2
396
+ },
397
+ :unitOfMeasure => {
398
+ :value => 30000000,
399
+ :meaning => "ML/HR",
400
+ :display => "ml/hr"
401
+ }
402
+ },
403
+ :infuseOver => {
404
+ :numericValue => {
405
+ :value => 5,
406
+ :precision => 0
407
+ },
408
+ :unitOfMeasure => {
409
+ :value => 30000001,
410
+ :meaning => "HRS",
411
+ :display => "hr(s)"
412
+ }
413
+ },
414
+ :frequency => {
415
+ :value => 30000002,
416
+ :meaning => "EOB",
417
+ :display => "EOB"
418
+ },
419
+ :duration => {
420
+ :numericValue => {
421
+ :value => 5,
422
+ :precision => 0
423
+ },
424
+ :unitOfMeasure => {
425
+ :value => 30000003,
426
+ :meaning => "DAYS",
427
+ :display => "Days(s)"
428
+ }
429
+ }
430
+ },
431
+ :additives => [{
432
+ :sequence => 0,
433
+ :mnemonic => "morphine",
434
+ :dose => {
435
+ :preferredDoseType => "VOLUME",
436
+ :volumeDose => {
437
+ :numericValue => {
438
+ :value => 50,
439
+ :precision => 2
440
+ },
441
+ :unitOfMeasure => {
442
+ :value => 30000012,
443
+ :meaning => "ML",
444
+ :display => "ml"
445
+ }
446
+ }
447
+ },
448
+ :normalizedRate => {
449
+ :numericValue => {
450
+ :value => 25.0,
451
+ :precision => 1
452
+ },
453
+ :unitOfMeasure => {
454
+ :value => 30000004,
455
+ :meaning => "ML/KG/HR",
456
+ :display => "ml/kg/hr"
457
+ }
458
+ },
459
+ :occurrence => {
460
+ :value => 30000005,
461
+ :meaning => "ONCE",
462
+ :display => "Once"
463
+ }
464
+ },{
465
+ :sequence => 0,
466
+ :mnemonic => "mesna",
467
+ :dose => {
468
+ :preferredDoseType => "VOLUME",
469
+ :volumeDose => {
470
+ :numericValue => {
471
+ :value => 12,
472
+ :precision => 2
473
+ },
474
+ :unitOfMeasure => {
475
+ :value => 30000012,
476
+ :meaning => "ML",
477
+ :display => "ml"
478
+ }
479
+ }
480
+ },
481
+ :normalizedRate => {
482
+ :numericValue => {
483
+ :value => 25.0,
484
+ :precision => 1
485
+ },
486
+ :unitOfMeasure => {
487
+ :value => 30000004,
488
+ :meaning => "ML/KG/HR",
489
+ :display => "ml/kg/hr"
490
+ }
491
+ },
492
+ :occurrence => {
493
+ :value => 30000005,
494
+ :meaning => "ONCE",
495
+ :display => "Once"
496
+ }
497
+ }],
498
+ :diluents => [{
499
+ :sequence => 0,
500
+ :mnemonic => "dextrose",
501
+ :bagVolume => {
502
+ :numericValue => {
503
+ :value => 1000,
504
+ :precision => 2
505
+ },
506
+ :unitOfMeasure => {
507
+ :value => 30000006,
508
+ :meaning => "ML",
509
+ :display => "ml"
510
+ }
511
+ },
512
+ :rate => {
513
+ :numericValue => {
514
+ :value => 25.0,
515
+ :precision => 2
516
+ },
517
+ :unitOfMeasure => {
518
+ :value => 30000007,
519
+ :meaning => "ML/HR",
520
+ :display => "ml/hr"
521
+ }
522
+ },
523
+ :infuseOver => {
524
+ :numericValue => {
525
+ :value => 5,
526
+ :precision => 0
527
+ },
528
+ :unitOfMeasure => {
529
+ :value => 30000008,
530
+ :meaning => "HRS",
531
+ :display => "hr(s)"
532
+ }
533
+ },
534
+ :bagFrequency => {
535
+ :value => 30000009,
536
+ :meaning => "EOB",
537
+ :display => "EOB"
538
+ }
539
+ }],
540
+ :details => [{
541
+ :sequence => 0,
542
+ :displayDescription => "Route of Administration",
543
+ :fieldMeaning => "RXROUTE",
544
+ :detailValues => [
545
+ {
546
+ :valueType => "CODE_VALUE",
547
+ :value => 30000015,
548
+ :meaning => "IVPB",
549
+ :display => "IVPB"
550
+ }
551
+ ]
552
+ },
553
+ {
554
+ :sequence => 1,
555
+ :displayDescription => "Frequency",
556
+ :fieldMeaning => "FREQ",
557
+ :detailValues => [
558
+ {
559
+ :valueType => "CODE_VALUE",
560
+ :value => 30000014,
561
+ :meaning => "EOB",
562
+ :display => "EOB"
563
+ }
564
+ ]
565
+ },
566
+ {
567
+ :sequence => 3,
568
+ :displayDescription => "Duration",
569
+ :fieldMeaning => "DURATION",
570
+ :detailValues => [
571
+ {
572
+ :valueType => "MEASUREMENT",
573
+ :numericValue => {
574
+ :value => 5,
575
+ :precision => 2
576
+ },
577
+ :unitOfMeasure => {
578
+ :value => 30000015,
579
+ :meaning => "DAYS",
580
+ :display => "Day(s)"
581
+ }
582
+ }
583
+ ]
584
+ },
585
+ {
586
+ :sequence => 4,
587
+ :displayDescription => "Start date",
588
+ :fieldMeaning => "REQSTARTDTTM",
589
+ :detailValues => [
590
+ {
591
+ :valueType => "DATE_TIME",
592
+ :value => "2013-05-11T12:09:06-0500"
593
+ }
594
+ ]
595
+ },
596
+ {
597
+ :sequence => 5,
598
+ :displayDescription => "Stop date",
599
+ :fieldMeaning => "STOPDTTM",
600
+ :detailValues => [
601
+ {
602
+ :valueType => "DATE_TIME"
603
+ }
604
+ ]
605
+ },
606
+ {
607
+ :sequence => 6,
608
+ :displayDescription => "Rate",
609
+ :fieldMeaning => "RATE",
610
+ :detailValues => [
611
+ {
612
+ :valueType => "MEASUREMENT",
613
+ :numericValue => {
614
+ :value => 2.5,
615
+ :precision => 2
616
+ },
617
+ :unitOfMeasure => {
618
+ :value => 30000016,
619
+ :meaning => "ML/HR",
620
+ :display => "ml/hr"
621
+ }
622
+ }
623
+ ]
624
+ },
625
+ {
626
+ :sequence => 7,
627
+ :displayDescription => "Normalized Rate",
628
+ :fieldMeaning => "NORMALIZEDRATE",
629
+ :detailValues => [
630
+ {
631
+ :valueType => "MEASUREMENT",
632
+ :numericValue => {
633
+ :value => 2.5,
634
+ :precision => 2
635
+ },
636
+ :unitOfMeasure => {
637
+ :value => 30000017,
638
+ :meaning => "ML/KG/HR",
639
+ :display => "ml/kg/hr"
640
+ }
641
+ }
642
+ ]
643
+ },
644
+ {
645
+ :sequence => 9,
646
+ :displayDescription => "Infuse Over",
647
+ :fieldMeaning => "INFUSEOVER",
648
+ :detailValues => [
649
+ {
650
+ :valueType => "MEASUREMENT",
651
+ :numericValue => {
652
+ :value => 2.5,
653
+ :precision => 2
654
+ },
655
+ :unitOfMeasure => {
656
+ :value => 30000018,
657
+ :meaning => "DAYS",
658
+ :display => "Day(s)"
659
+ }
660
+ }
661
+ ]
662
+ },
663
+ {
664
+ :sequence => 2147483646,
665
+ :displayDescription => "Inspiratory Time",
666
+ :fieldMeaning => "INSPIRATORYTIME",
667
+ :detailValues => [
668
+ {
669
+ :valueType => "DECIMAL_WITH_PRECISION",
670
+ :value => 10.22,
671
+ :precision => 2
672
+ }
673
+ ]
674
+ },
675
+ {
676
+ :sequence => 2147483646,
677
+ :displayDescription => "Treatment Period",
678
+ :fieldMeaning => "TREATMENTPERIOD",
679
+ :detailValues => [
680
+ :valueType => "TEXT",
681
+ :value => "Day 2"
682
+ ]
683
+ },
684
+ {
685
+ :sequence => 2147483647,
686
+ :displayDescription => "Order Comment",
687
+ :fieldMeaning => "ORDER_COMMENT",
688
+ :detailValues => [
689
+ :valueType => "TEXT",
690
+ :value => "test order comment text"
691
+ ]
692
+ }]}
693
+
694
+ intermittentOrder2 = {:orderType => "INTERMITTENT",
695
+ :orderId => 10000005,
696
+ :mnemonic => "Intermittent 2",
697
+ :status => "Ordered",
698
+ :version => 1,
699
+ :orderingProvider => "Cut Man",
700
+ :synonymId => 20000005,
701
+ :drivingAgent => {
702
+ :mnemonic => "morphene",
703
+ :dose => {
704
+ :preferredDoseType => "VOLUME",
705
+ :volumeDose => {
706
+ :numericValue => {
707
+ :value => 200.34,
708
+ :precision => 2
709
+ },
710
+ :unitOfMeasure => {
711
+ :value => 30000012,
712
+ :meaning => "ML",
713
+ :display => "ml"
714
+ }
715
+ }
716
+ },
717
+ :rate => {
718
+ :numericValue => {
719
+ :value => 50.55,
720
+ :precision => 2
721
+ },
722
+ :unitOfMeasure => {
723
+ :value => 30000002,
724
+ :meaning => "ML/HR",
725
+ :display => "ml/hr"
726
+ }
727
+ },
728
+ :infuseOver => {
729
+ :numericValue => {
730
+ :value => 25,
731
+ :precision => 0
732
+ },
733
+ :unitOfMeasure => {
734
+ :value => 30000001,
735
+ :meaning => "HRS",
736
+ :display => "hr(s)"
737
+ }
738
+ },
739
+ :frequency => {
740
+ :value => 30000001,
741
+ :meaning => "EOB",
742
+ :display => "EOB"
743
+ },
744
+ :duration => {
745
+ :numericValue => {
746
+ :value => 2,
747
+ :precision => 0
748
+ },
749
+ :unitOfMeasure => {
750
+ :value => 30000003,
751
+ :meaning => "DAYS",
752
+ :display => "Days(s)"
753
+ }
754
+ }
755
+ },
756
+ :additives => [{
757
+ :sequence => 0,
758
+ :mnemonic => "vicodone",
759
+ :dose => {
760
+ :preferredDoseType => "VOLUME",
761
+ :volumeDose => {
762
+ :numericValue => {
763
+ :value => 345.32456,
764
+ :precision => 2
765
+ },
766
+ :unitOfMeasure => {
767
+ :value => 30000012,
768
+ :meaning => "ML",
769
+ :display => "ml"
770
+ }
771
+ }
772
+ },
773
+ :normalizedRate => {
774
+ :numericValue => {
775
+ :value => 25.0,
776
+ :precision => 1
777
+ },
778
+ :unitOfMeasure => {
779
+ :value => 30000004,
780
+ :meaning => "ML/KG/HR",
781
+ :display => "ml/kg/hr"
782
+ }
783
+ },
784
+ :occurrence => {
785
+ :value => 30000005,
786
+ :meaning => "ONCE",
787
+ :display => "Once"
788
+ }
789
+ }],
790
+ :diluents => [{
791
+ :sequence => 0,
792
+ :mnemonic => "sterile water",
793
+ :bagVolume => {
794
+ :numericValue => {
795
+ :value => 1000,
796
+ :precision => 2
797
+ },
798
+ :unitOfMeasure => {
799
+ :value => 30000006,
800
+ :meaning => "ML",
801
+ :display => "ml"
802
+ }
803
+ },
804
+ :rate => {
805
+ :numericValue => {
806
+ :value => 25.0,
807
+ :precision => 2
808
+ },
809
+ :unitOfMeasure => {
810
+ :value => 30000007,
811
+ :meaning => "ML/HR",
812
+ :display => "ml/hr"
813
+ }
814
+ },
815
+ :infuseOver => {
816
+ :numericValue => {
817
+ :value => 5,
818
+ :precision => 0
819
+ },
820
+ :unitOfMeasure => {
821
+ :value => 30000008,
822
+ :meaning => "HRS",
823
+ :display => "hr(s)"
824
+ }
825
+ },
826
+ :bagFrequency => {
827
+ :value => 30000009,
828
+ :meaning => "EOB",
829
+ :display => "EOB"
830
+ }
831
+ }],
832
+ :details => [{
833
+ :sequence => 0,
834
+ :displayDescription => "Route of Administration",
835
+ :fieldMeaning => "RXROUTE",
836
+ :detailValues => [
837
+ {
838
+ :valueType => "CODE_VALUE",
839
+ :value => 30000016,
840
+ :meaning => "IV",
841
+ :display => "IV"
842
+ }
843
+ ]
844
+ },
845
+ {
846
+ :sequence => 2,
847
+ :displayDescription => "Frequency",
848
+ :fieldMeaning => "FREQ",
849
+ :detailValues => [
850
+ {
851
+ :valueType => "CODE_VALUE",
852
+ :value => 30000014,
853
+ :meaning => "EB",
854
+ :display => "EB"
855
+ }
856
+ ]
857
+ },
858
+ {
859
+ :sequence => 3,
860
+ :displayDescription => "Duration",
861
+ :fieldMeaning => "DURATION",
862
+ :detailValues => [
863
+ {
864
+ :valueType => "MEASUREMENT",
865
+ :numericValue => {
866
+ :value => 1,
867
+ :precision => 0
868
+ },
869
+ :unitOfMeasure => {
870
+ :value => 30000015,
871
+ :meaning => "DAYS",
872
+ :display => "days"
873
+ }
874
+ }
875
+ ]
876
+ },
877
+ {
878
+ :sequence => 4,
879
+ :displayDescription => "Start date",
880
+ :fieldMeaning => "REQSTARTDTTM",
881
+ :detailValues => [
882
+ {
883
+ :valueType => "DATE_TIME",
884
+ :value => "2013-01-10T12:09:06-0500"
885
+ }
886
+ ]
887
+ },
888
+ {
889
+ :sequence => 5,
890
+ :displayDescription => "Stop date",
891
+ :fieldMeaning => "STOPDTTM",
892
+ :detailValues => [
893
+ {
894
+ :valueType => "DATE_TIME"
895
+ }
896
+ ]
897
+ },
898
+ {
899
+ :sequence => 7,
900
+ :displayDescription => "Normalized Rate",
901
+ :fieldMeaning => "NORMALIZEDRATE",
902
+ :detailValues => [
903
+ {
904
+ :valueType => "MEASUREMENT",
905
+ :numericValue => {
906
+ :value => 100,
907
+ :precision => 2
908
+ },
909
+ :unitOfMeasure => {
910
+ :value => 30000017,
911
+ :meaning => "ML/KG/HR",
912
+ :display => "ml/kg/hr"
913
+ }
914
+ }
915
+ ]
916
+ },
917
+ {
918
+ :sequence => 8,
919
+ :displayDescription => "Freetext Rate",
920
+ :fieldMeaning => "FREETEXTRATE",
921
+ :detailValues => [
922
+ :valueType => "TEXT",
923
+ :value => "50 mg/hr with water"
924
+ ]
925
+ },
926
+ {
927
+ :sequence => 9,
928
+ :displayDescription => "Infuse Over",
929
+ :fieldMeaning => "INFUSEOVER",
930
+ :detailValues => [
931
+ {
932
+ :valueType => "MEASUREMENT",
933
+ :numericValue => {
934
+ :value => 5,
935
+ :precision => 2
936
+ },
937
+ :unitOfMeasure => {
938
+ :value => 30000018,
939
+ :meaning => "HRS",
940
+ :display => "Hr(s)"
941
+ }
942
+ }
943
+ ]
944
+ },
945
+ {
946
+ :sequence => 13,
947
+ :displayDescription => "Number of Refills",
948
+ :fieldMeaning => "NBRREFILLS",
949
+ :detailValues => [
950
+ {
951
+ :valueType => "INTEGER",
952
+ :value => 11,
953
+ :precision => 0
954
+ }
955
+ ]
956
+ },
957
+ {
958
+ :sequence => 14,
959
+ :displayDescription => "Dispense as Written",
960
+ :fieldMeaning => "DAW",
961
+ :detailValues => [
962
+ {
963
+ :valueType => "BOOLEAN",
964
+ :value => true
965
+ }
966
+ ]
967
+ },
968
+ {
969
+ :sequence => 15,
970
+ :displayDescription => "Future Order",
971
+ :fieldMeaning => "FUTUREORDER",
972
+ :detailValues => [
973
+ {
974
+ :valueType => "BOOLEAN",
975
+ :value => false
976
+ }
977
+ ]
978
+ },
979
+ {
980
+ :sequence => 2147483646,
981
+ :displayDescription => "Treatment Period",
982
+ :fieldMeaning => "TREATMENTPERIOD",
983
+ :detailValues => [
984
+ :valueType => "TEXT",
985
+ :value => "Day 3"
986
+ ]
987
+ }]}
988
+
989
+ [singleIngredientOrder1, singleIngredientOrder2, intermittentOrder1, intermittentOrder2]
990
+ end
991
+
992
+ def prn_orders
993
+ singleIngredientOrder3 = {:orderType => "SINGLEINGREDIENT",
994
+ :orderId => 10000003,
995
+ :mnemonic => "Benadryl",
996
+ :status => "Ordered",
997
+ :version => 0,
998
+ :orderingProvider => "Fire Man",
999
+ :synonymId => 20000003,
1000
+ :dose => {
1001
+ :preferredDoseType => "FREETEXT",
1002
+ :freetextDose => "100 mg/kg"
1003
+ },
1004
+ :details => [{
1005
+ :sequence => 0,
1006
+ :displayDescription => "Route of Administration",
1007
+ :fieldMeaning => "RXROUTE",
1008
+ :detailValues => [
1009
+ {
1010
+ :valueType => "CODE_VALUE",
1011
+ :value => 30000017,
1012
+ :meaning => "BYMOUTH",
1013
+ :display => "By Mouth"
1014
+ }
1015
+ ]
1016
+ },
1017
+ {
1018
+ :sequence => 2,
1019
+ :displayDescription => "Frequency",
1020
+ :fieldMeaning => "FREQ",
1021
+ :detailValues => [
1022
+ {
1023
+ :valueType => "CODE_VALUE",
1024
+ :value => 30000014,
1025
+ :meaning => "BID",
1026
+ :display => "BID"
1027
+ }
1028
+ ]
1029
+ },
1030
+ {
1031
+ :sequence => 3,
1032
+ :displayDescription => "Duration",
1033
+ :fieldMeaning => "DURATION",
1034
+ :detailValues => [
1035
+ {
1036
+ :valueType => "MEASUREMENT",
1037
+ :numericValue => {
1038
+ :value => 2.5,
1039
+ :precision => 2
1040
+ },
1041
+ :unitOfMeasure => {
1042
+ :value => 30000015,
1043
+ :meaning => "WEEKS",
1044
+ :display => "Week(s)"
1045
+ }
1046
+ }
1047
+ ]
1048
+ },
1049
+ {
1050
+ :sequence => 4,
1051
+ :displayDescription => "Start date",
1052
+ :fieldMeaning => "REQSTARTDTTM",
1053
+ :detailValues => [
1054
+ {
1055
+ :valueType => "DATE_TIME",
1056
+ :value => "2013-04-08T12:09:06-0500"
1057
+ }
1058
+ ]
1059
+ },
1060
+ {
1061
+ :sequence => 5,
1062
+ :displayDescription => "Stop date",
1063
+ :fieldMeaning => "STOPDTTM",
1064
+ :detailValues => [
1065
+ {
1066
+ :valueType => "DATE_TIME"
1067
+ }
1068
+ ]
1069
+ },
1070
+ {
1071
+ :sequence => 10,
1072
+ :displayDescription => "Scheduled / PRN",
1073
+ :fieldMeaning => "SCH/PRN",
1074
+ :detailValues => [
1075
+ {
1076
+ :valueType => "BOOLEAN",
1077
+ :value => true
1078
+ }
1079
+ ]
1080
+ },
1081
+ {
1082
+ :sequence => 13,
1083
+ :displayDescription => "Number of Refills",
1084
+ :fieldMeaning => "NBRREFILLS",
1085
+ :detailValues => [
1086
+ {
1087
+ :valueType => "INTEGER",
1088
+ :value => 0,
1089
+ :precision => 0
1090
+ }
1091
+ ]
1092
+ },
1093
+ {
1094
+ :sequence => 14,
1095
+ :displayDescription => "Dispense as Written",
1096
+ :fieldMeaning => "DAW",
1097
+ :detailValues => [
1098
+ {
1099
+ :valueType => "BOOLEAN",
1100
+ :value => false
1101
+ }
1102
+ ]
1103
+ },
1104
+ {
1105
+ :sequence => 15,
1106
+ :displayDescription => "Future Order",
1107
+ :fieldMeaning => "FUTUREORDER",
1108
+ :detailValues => [
1109
+ {
1110
+ :valueType => "BOOLEAN",
1111
+ :value => true
1112
+ }
1113
+ ]
1114
+ },
1115
+ {
1116
+ :sequence => 2147483646,
1117
+ :displayDescription => "Inspiratory Time",
1118
+ :fieldMeaning => "INSPIRATORYTIME",
1119
+ :detailValues => [
1120
+ {
1121
+ :valueType => "DECIMAL_WITH_PRECISION",
1122
+ :value => 6,
1123
+ :precision => 2
1124
+ }
1125
+ ]
1126
+ },
1127
+ {
1128
+ :sequence => 2147483646,
1129
+ :displayDescription => "Treatment Period",
1130
+ :fieldMeaning => "TREATMENTPERIOD",
1131
+ :detailValues => [
1132
+ :valueType => "TEXT",
1133
+ :value => "Day 4"
1134
+ ]
1135
+ },
1136
+ {
1137
+ :sequence => 2147483647,
1138
+ :displayDescription => "Order Comment",
1139
+ :fieldMeaning => "ORDER_COMMENT",
1140
+ :detailValues => [
1141
+ :valueType => "TEXT",
1142
+ :value => "fancy order comment text for testing"
1143
+ ]
1144
+ }]}
1145
+
1146
+ singleIngredientOrder4 = {:orderType => "SINGLEINGREDIENT",
1147
+ :orderId => 10000010,
1148
+ :mnemonic => "Dopamine",
1149
+ :status => "Ordered",
1150
+ :version => 1,
1151
+ :orderingProvider => "Air Man",
1152
+ :synonymId => 20000010,
1153
+ :dose => {
1154
+ :preferredDoseType => "STRENGTH",
1155
+ :strengthDose => {
1156
+ :numericValue => {
1157
+ :value => 100,
1158
+ :precision => 2
1159
+ },
1160
+ :unitOfMeasure => {
1161
+ :value => 30000011,
1162
+ :meaning => "MCG",
1163
+ :display => "mcg"
1164
+ }
1165
+ }
1166
+ },
1167
+ :details => [{
1168
+ :sequence => 0,
1169
+ :displayDescription => "Route of Administration",
1170
+ :fieldMeaning => "RXROUTE",
1171
+ :detailValues => [
1172
+ {
1173
+ :valueType => "CODE_VALUE",
1174
+ :value => 30000013,
1175
+ :meaning => "PO",
1176
+ :display => "PO"
1177
+ }
1178
+ ]
1179
+ },
1180
+ {
1181
+ :sequence => 2,
1182
+ :displayDescription => "Frequency",
1183
+ :fieldMeaning => "FREQ",
1184
+ :detailValues => [
1185
+ {
1186
+ :valueType => "CODE_VALUE",
1187
+ :value => 30000014,
1188
+ :meaning => "ONCE",
1189
+ :display => "ONCE"
1190
+ }
1191
+ ]
1192
+ },
1193
+ {
1194
+ :sequence => 3,
1195
+ :displayDescription => "Duration",
1196
+ :fieldMeaning => "DURATION",
1197
+ :detailValues => [
1198
+ {
1199
+ :valueType => "MEASUREMENT",
1200
+ :numericValue => {
1201
+ :value => 7,
1202
+ :precision => 2
1203
+ },
1204
+ :unitOfMeasure => {
1205
+ :value => 30000015,
1206
+ :meaning => "DAYS",
1207
+ :display => "day(s)"
1208
+ }
1209
+ }
1210
+ ]
1211
+ },
1212
+ {
1213
+ :sequence => 4,
1214
+ :displayDescription => "Start date",
1215
+ :fieldMeaning => "REQSTARTDTTM",
1216
+ :detailValues => [
1217
+ {
1218
+ :valueType => "DATE_TIME",
1219
+ :value => "2013-03-01T12:09:06-0500"
1220
+ }
1221
+ ]
1222
+ },
1223
+ {
1224
+ :sequence => 5,
1225
+ :displayDescription => "Stop date",
1226
+ :fieldMeaning => "STOPDTTM",
1227
+ :detailValues => [
1228
+ {
1229
+ :valueType => "DATE_TIME",
1230
+ :value => "2013-12-01T12:09:06-0500"
1231
+ }
1232
+ ]
1233
+ },
1234
+ {
1235
+ :sequence => 12,
1236
+ :displayDescription => "PRN Reasons",
1237
+ :fieldMeaning => "PRNREASON",
1238
+ :detailValues => [
1239
+ {
1240
+ :valueType => "CODE_VALUE",
1241
+ :value => 30000019,
1242
+ :meaning => "HEADACHE",
1243
+ :display => "Headache"
1244
+ },
1245
+ {
1246
+ :valueType => "CODE_VALUE",
1247
+ :value => 30000020,
1248
+ :meaning => "PAIN",
1249
+ :display => "Pain"
1250
+ }
1251
+ ]
1252
+ },
1253
+ {
1254
+ :sequence => 2147483646,
1255
+ :displayDescription => "Inspiratory Time",
1256
+ :fieldMeaning => "INSPIRATORYTIME",
1257
+ :detailValues => [
1258
+ {
1259
+ :valueType => "DECIMAL_WITH_PRECISION",
1260
+ :value => 10.99,
1261
+ :precision => 2
1262
+ }
1263
+ ]
1264
+ },
1265
+ {
1266
+ :sequence => 2147483646,
1267
+ :displayDescription => "Treatment Period",
1268
+ :fieldMeaning => "TREATMENTPERIOD",
1269
+ :detailValues => [
1270
+ :valueType => "TEXT",
1271
+ :value => "Day 6"
1272
+ ]
1273
+ },
1274
+ {
1275
+ :sequence => 2147483647,
1276
+ :displayDescription => "Order Comment",
1277
+ :fieldMeaning => "ORDER_COMMENT",
1278
+ :detailValues => [
1279
+ :valueType => "TEXT",
1280
+ :value => "updated order comment"
1281
+ ]
1282
+ }]}
1283
+
1284
+ intermittentOrder3 = {:orderType => "INTERMITTENT",
1285
+ :orderId => 10000006,
1286
+ :mnemonic => "Intermittent 3",
1287
+ :status => "Ordered",
1288
+ :version => 0,
1289
+ :orderingProvider => "Bomb Man",
1290
+ :synonymId => 20000006,
1291
+ :drivingAgent => {
1292
+ :mnemonic => "vicodin",
1293
+ :dose => {
1294
+ :preferredDoseType => "VOLUME",
1295
+ :volumeDose => {
1296
+ :numericValue => {
1297
+ :value => 324.3243534,
1298
+ :precision => 6
1299
+ },
1300
+ :unitOfMeasure => {
1301
+ :value => 30000012,
1302
+ :meaning => "ML",
1303
+ :display => "ml"
1304
+ }
1305
+ }
1306
+ },
1307
+ :rate => {
1308
+ :numericValue => {
1309
+ :value => 10.4,
1310
+ :precision => 1
1311
+ },
1312
+ :unitOfMeasure => {
1313
+ :value => 30000002,
1314
+ :meaning => "ML",
1315
+ :display => "ml"
1316
+ }
1317
+ },
1318
+ :infuseOver => {
1319
+ :numericValue => {
1320
+ :value => 120,
1321
+ :precision => 0
1322
+ },
1323
+ :unitOfMeasure => {
1324
+ :value => 30000003,
1325
+ :meaning => "MINS",
1326
+ :display => "min(s)"
1327
+ }
1328
+ },
1329
+ :frequency => {
1330
+ :value => 30000001,
1331
+ :meaning => "EB",
1332
+ :display => "EB"
1333
+ },
1334
+ :duration => {
1335
+ :numericValue => {
1336
+ :value => 1,
1337
+ :precision => 0
1338
+ },
1339
+ :unitOfMeasure => {
1340
+ :value => 30000003,
1341
+ :meaning => "DAYS",
1342
+ :display => "Days(s)"
1343
+ }
1344
+ }
1345
+ },
1346
+ :additives => [{
1347
+ :sequence => 0,
1348
+ :mnemonic => "morphine",
1349
+ :dose => {
1350
+ :preferredDoseType => "VOLUME",
1351
+ :volumeDose => {
1352
+ :numericValue => {
1353
+ :value => 345.31,
1354
+ :precision => 2
1355
+ },
1356
+ :unitOfMeasure => {
1357
+ :value => 30000012,
1358
+ :meaning => "ML",
1359
+ :display => "ml"
1360
+ }
1361
+ }
1362
+ },
1363
+ :normalizedRate => {
1364
+ :numericValue => {
1365
+ :value => 25.0,
1366
+ :precision => 1
1367
+ },
1368
+ :unitOfMeasure => {
1369
+ :value => 30000004,
1370
+ :meaning => "ML/KG/HR",
1371
+ :display => "ml/kg/hr"
1372
+ }
1373
+ },
1374
+ :occurrence => {
1375
+ :value => 30000005,
1376
+ :meaning => "ONCE",
1377
+ :display => "Once"
1378
+ }
1379
+ },{
1380
+ :sequence => 0,
1381
+ :mnemonic => "mesna",
1382
+ :dose => {
1383
+ :preferredDoseType => "VOLUME",
1384
+ :volumeDose => {
1385
+ :numericValue => {
1386
+ :value => 99,
1387
+ :precision => 2
1388
+ },
1389
+ :unitOfMeasure => {
1390
+ :value => 30000012,
1391
+ :meaning => "ML",
1392
+ :display => "ml"
1393
+ }
1394
+ }
1395
+ },
1396
+ :normalizedRate => {
1397
+ :numericValue => {
1398
+ :value => 25.0,
1399
+ :precision => 1
1400
+ },
1401
+ :unitOfMeasure => {
1402
+ :value => 30000004,
1403
+ :meaning => "ML/KG/HR",
1404
+ :display => "ml/kg/hr"
1405
+ }
1406
+ },
1407
+ :occurrence => {
1408
+ :value => 30000005,
1409
+ :meaning => "ONCE",
1410
+ :display => "Once"
1411
+ }
1412
+ }],
1413
+ :diluents => [{
1414
+ :sequence => 0,
1415
+ :mnemonic => "saline solution",
1416
+ :bagVolume => {
1417
+ :numericValue => {
1418
+ :value => 1000,
1419
+ :precision => 2
1420
+ },
1421
+ :unitOfMeasure => {
1422
+ :value => 30000006,
1423
+ :meaning => "ML",
1424
+ :display => "ml"
1425
+ }
1426
+ },
1427
+ :rate => {
1428
+ :numericValue => {
1429
+ :value => 25.0,
1430
+ :precision => 2
1431
+ },
1432
+ :unitOfMeasure => {
1433
+ :value => 30000007,
1434
+ :meaning => "ML/HR",
1435
+ :display => "ml/hr"
1436
+ }
1437
+ },
1438
+ :infuseOver => {
1439
+ :numericValue => {
1440
+ :value => 5,
1441
+ :precision => 0
1442
+ },
1443
+ :unitOfMeasure => {
1444
+ :value => 30000008,
1445
+ :meaning => "HRS",
1446
+ :display => "hr(s)"
1447
+ }
1448
+ },
1449
+ :bagFrequency => {
1450
+ :value => 30000009,
1451
+ :meaning => "EOB",
1452
+ :display => "EOB"
1453
+ }
1454
+ }],
1455
+ :details => [{
1456
+ :sequence => 0,
1457
+ :displayDescription => "Route of Administration",
1458
+ :fieldMeaning => "RXROUTE",
1459
+ :detailValues => [
1460
+ {
1461
+ :valueType => "CODE_VALUE",
1462
+ :value => 30000013,
1463
+ :meaning => "IVPB",
1464
+ :display => "IVPB"
1465
+ }
1466
+ ]
1467
+ },
1468
+ {
1469
+ :sequence => 2,
1470
+ :displayDescription => "Frequency",
1471
+ :fieldMeaning => "FREQ",
1472
+ :detailValues => [
1473
+ {
1474
+ :valueType => "CODE_VALUE",
1475
+ :value => 30000014,
1476
+ :meaning => "EB",
1477
+ :display => "EB"
1478
+ }
1479
+ ]
1480
+ },
1481
+ {
1482
+ :sequence => 3,
1483
+ :displayDescription => "Duration",
1484
+ :fieldMeaning => "DURATION",
1485
+ :detailValues => [
1486
+ {
1487
+ :valueType => "MEASUREMENT",
1488
+ :numericValue => {
1489
+ :value => 1,
1490
+ :precision => 2
1491
+ },
1492
+ :unitOfMeasure => {
1493
+ :value => 30000015,
1494
+ :meaning => "DAYS",
1495
+ :display => "day(s)"
1496
+ }
1497
+ }
1498
+ ]
1499
+ },
1500
+ {
1501
+ :sequence => 4,
1502
+ :displayDescription => "Start date",
1503
+ :fieldMeaning => "REQSTARTDTTM",
1504
+ :detailValues => [
1505
+ {
1506
+ :valueType => "DATE_TIME",
1507
+ :value => "2013-07-09T12:09:06-0500"
1508
+ }
1509
+ ]
1510
+ },
1511
+ {
1512
+ :sequence => 5,
1513
+ :displayDescription => "Stop date",
1514
+ :fieldMeaning => "STOPDTTM",
1515
+ :detailValues => [
1516
+ {
1517
+ :valueType => "DATE_TIME"
1518
+ }
1519
+ ]
1520
+ },
1521
+ {
1522
+ :sequence => 6,
1523
+ :displayDescription => "Rate",
1524
+ :fieldMeaning => "RATE",
1525
+ :detailValues => [
1526
+ {
1527
+ :valueType => "MEASUREMENT",
1528
+ :numericValue => {
1529
+ :value => 100,
1530
+ :precision => 2
1531
+ },
1532
+ :unitOfMeasure => {
1533
+ :value => 30000016,
1534
+ :meaning => "ML/HR",
1535
+ :display => "ml/hr"
1536
+ }
1537
+ }
1538
+ ]
1539
+ },
1540
+ {
1541
+ :sequence => 7,
1542
+ :displayDescription => "Normalized Rate",
1543
+ :fieldMeaning => "NORMALIZEDRATE",
1544
+ :detailValues => [
1545
+ {
1546
+ :valueType => "MEASUREMENT",
1547
+ :numericValue => {
1548
+ :value => 50,
1549
+ :precision => 2
1550
+ },
1551
+ :unitOfMeasure => {
1552
+ :value => 30000017,
1553
+ :meaning => "ML/KG/HR",
1554
+ :display => "ml/kg/hr"
1555
+ }
1556
+ }
1557
+ ]
1558
+ },
1559
+ {
1560
+ :sequence => 9,
1561
+ :displayDescription => "Infuse Over",
1562
+ :fieldMeaning => "INFUSEOVER",
1563
+ :detailValues => [
1564
+ {
1565
+ :valueType => "MEASUREMENT",
1566
+ :numericValue => {
1567
+ :value => 10,
1568
+ :precision => 2
1569
+ },
1570
+ :unitOfMeasure => {
1571
+ :value => 30000018,
1572
+ :meaning => "HRS",
1573
+ :display => "Hr(s)"
1574
+ }
1575
+ }
1576
+ ]
1577
+ },
1578
+ {
1579
+ :sequence => 11,
1580
+ :displayDescription => "PRN Instructions",
1581
+ :fieldMeaning => "PRNINSTRUCTIONS",
1582
+ :detailValues => [
1583
+ :valueType => "TEXT",
1584
+ :value => "very long prn instructions detail that should cause the text to wrap multiple lines"
1585
+ ]
1586
+ },
1587
+ {
1588
+ :sequence => 13,
1589
+ :displayDescription => "Number of Refills",
1590
+ :fieldMeaning => "NBRREFILLS",
1591
+ :detailValues => [
1592
+ {
1593
+ :valueType => "INTEGER",
1594
+ :value => 5,
1595
+ :precision => 0
1596
+ }
1597
+ ]
1598
+ },
1599
+ {
1600
+ :sequence => 14,
1601
+ :displayDescription => "Dispense as Written",
1602
+ :fieldMeaning => "DAW",
1603
+ :detailValues => [
1604
+ {
1605
+ :valueType => "BOOLEAN",
1606
+ :value => true
1607
+ }
1608
+ ]
1609
+ },
1610
+ {
1611
+ :sequence => 15,
1612
+ :displayDescription => "Future Order",
1613
+ :fieldMeaning => "FUTUREORDER",
1614
+ :detailValues => [
1615
+ {
1616
+ :valueType => "BOOLEAN",
1617
+ :value => false
1618
+ }
1619
+ ]
1620
+ },
1621
+ {
1622
+ :sequence => 2147483646,
1623
+ :displayDescription => "Inspiratory Time",
1624
+ :fieldMeaning => "INSPIRATORYTIME",
1625
+ :detailValues => [
1626
+ {
1627
+ :valueType => "DECIMAL_WITH_PRECISION",
1628
+ :value => 44.264,
1629
+ :precision => 2
1630
+ }
1631
+ ]
1632
+ },
1633
+ {
1634
+ :sequence => 2147483646,
1635
+ :displayDescription => "Treatment Period",
1636
+ :fieldMeaning => "TREATMENTPERIOD",
1637
+ :detailValues => [
1638
+ :valueType => "TEXT",
1639
+ :value => "Week 1"
1640
+ ]
1641
+ },
1642
+ {
1643
+ :sequence => 2147483647,
1644
+ :displayDescription => "Order Comment",
1645
+ :fieldMeaning => "ORDER_COMMENT",
1646
+ :detailValues => [
1647
+ :valueType => "TEXT",
1648
+ :value => "K! S! U! WILDCATS!!!"
1649
+ ]
1650
+ }]}
1651
+
1652
+ [singleIngredientOrder3, singleIngredientOrder4, intermittentOrder3]
1653
+ end
1654
+
1655
+ def continuous_orders
1656
+ continuousOrder1 = {:orderType => "CONTINUOUS",
1657
+ :orderId => 10000007,
1658
+ :mnemonic => "Continuous 1",
1659
+ :status => "Ordered",
1660
+ :version => 0,
1661
+ :orderingProvider => "Proto Man",
1662
+ :synonymId => 20000007,
1663
+ :tpn => false,
1664
+ :additives => [{
1665
+ :sequence => 0,
1666
+ :mnemonic => "mesna",
1667
+ :dose => {
1668
+ :preferredDoseType => "VOLUME",
1669
+ :volumeDose => {
1670
+ :numericValue => {
1671
+ :value => 99999999,
1672
+ :precision => 2
1673
+ },
1674
+ :unitOfMeasure => {
1675
+ :value => 30000012,
1676
+ :meaning => "ML",
1677
+ :display => "ml"
1678
+ }
1679
+ }
1680
+ },
1681
+ :normalizedRate => {
1682
+ :numericValue => {
1683
+ :value => 25.0,
1684
+ :precision => 1
1685
+ },
1686
+ :unitOfMeasure => {
1687
+ :value => 30000004,
1688
+ :meaning => "ML/KG/HR",
1689
+ :display => "ml/kg/hr"
1690
+ }
1691
+ },
1692
+ :occurrence => {
1693
+ :value => 30000005,
1694
+ :meaning => "ONCE",
1695
+ :display => "Once"
1696
+ }
1697
+ },{
1698
+ :sequence => 0,
1699
+ :mnemonic => "morphine",
1700
+ :dose => {
1701
+ :preferredDoseType => "VOLUME",
1702
+ :volumeDose => {
1703
+ :numericValue => {
1704
+ :value => 6623.34,
1705
+ :precision => 2
1706
+ },
1707
+ :unitOfMeasure => {
1708
+ :value => 30000012,
1709
+ :meaning => "ML",
1710
+ :display => "ml"
1711
+ }
1712
+ }
1713
+ },
1714
+ :normalizedRate => {
1715
+ :numericValue => {
1716
+ :value => 25.0,
1717
+ :precision => 1
1718
+ },
1719
+ :unitOfMeasure => {
1720
+ :value => 30000004,
1721
+ :meaning => "ML/KG/HR",
1722
+ :display => "ml/kg/hr"
1723
+ }
1724
+ },
1725
+ :occurrence => {
1726
+ :value => 30000005,
1727
+ :meaning => "ONCE",
1728
+ :display => "Once"
1729
+ }
1730
+ }],
1731
+ :diluents => [{
1732
+ :sequence => 0,
1733
+ :mnemonic => "dextrose 25%",
1734
+ :bagVolume => {
1735
+ :numericValue => {
1736
+ :value => 1000,
1737
+ :precision => 2
1738
+ },
1739
+ :unitOfMeasure => {
1740
+ :value => 30000006,
1741
+ :meaning => "ML",
1742
+ :display => "ml"
1743
+ }
1744
+ },
1745
+ :rate => {
1746
+ :numericValue => {
1747
+ :value => 25.0,
1748
+ :precision => 2
1749
+ },
1750
+ :unitOfMeasure => {
1751
+ :value => 30000007,
1752
+ :meaning => "ML/HR",
1753
+ :display => "ml/hr"
1754
+ }
1755
+ },
1756
+ :infuseOver => {
1757
+ :numericValue => {
1758
+ :value => 5,
1759
+ :precision => 0
1760
+ },
1761
+ :unitOfMeasure => {
1762
+ :value => 30000008,
1763
+ :meaning => "HRS",
1764
+ :display => "hr(s)"
1765
+ }
1766
+ },
1767
+ :bagFrequency => {
1768
+ :value => 30000009,
1769
+ :meaning => "EOB",
1770
+ :display => "EOB"
1771
+ }
1772
+ }],
1773
+ :details => [{
1774
+ :sequence => 0,
1775
+ :displayDescription => "Route of Administration",
1776
+ :fieldMeaning => "RXROUTE",
1777
+ :detailValues => [
1778
+ {
1779
+ :valueType => "CODE_VALUE",
1780
+ :value => 30000013,
1781
+ :meaning => "IV",
1782
+ :display => "IV"
1783
+ }
1784
+ ]
1785
+ },
1786
+ {
1787
+ :sequence => 2,
1788
+ :displayDescription => "Frequency",
1789
+ :fieldMeaning => "FREQ",
1790
+ :detailValues => [
1791
+ {
1792
+ :valueType => "CODE_VALUE",
1793
+ :value => 30000014,
1794
+ :meaning => "Q8H",
1795
+ :display => "Q8H"
1796
+ }
1797
+ ]
1798
+ },
1799
+ {
1800
+ :sequence => 3,
1801
+ :displayDescription => "Duration",
1802
+ :fieldMeaning => "DURATION",
1803
+ :detailValues => [
1804
+ {
1805
+ :valueType => "MEASUREMENT",
1806
+ :numericValue => {
1807
+ :value => 1,
1808
+ :precision => 2
1809
+ },
1810
+ :unitOfMeasure => {
1811
+ :value => 30000015,
1812
+ :meaning => "DAYS",
1813
+ :display => "day(s)"
1814
+ }
1815
+ }
1816
+ ]
1817
+ },
1818
+ {
1819
+ :sequence => 4,
1820
+ :displayDescription => "Start date",
1821
+ :fieldMeaning => "REQSTARTDTTM",
1822
+ :detailValues => [
1823
+ {
1824
+ :valueType => "DATE_TIME",
1825
+ :value => "2013-03-11T12:09:06-0500"
1826
+ }
1827
+ ]
1828
+ },
1829
+ {
1830
+ :sequence => 5,
1831
+ :displayDescription => "Stop date",
1832
+ :fieldMeaning => "STOPDTTM",
1833
+ :detailValues => [
1834
+ {
1835
+ :valueType => "DATE_TIME"
1836
+ }
1837
+ ]
1838
+ },
1839
+ {
1840
+ :sequence => 6,
1841
+ :displayDescription => "Rate",
1842
+ :fieldMeaning => "RATE",
1843
+ :detailValues => [
1844
+ {
1845
+ :valueType => "MEASUREMENT",
1846
+ :numericValue => {
1847
+ :value => 50,
1848
+ :precision => 2
1849
+ },
1850
+ :unitOfMeasure => {
1851
+ :value => 30000016,
1852
+ :meaning => "ML/HR",
1853
+ :display => "ml/hr"
1854
+ }
1855
+ }
1856
+ ]
1857
+ },
1858
+ {
1859
+ :sequence => 7,
1860
+ :displayDescription => "Normalized Rate",
1861
+ :fieldMeaning => "NORMALIZEDRATE",
1862
+ :detailValues => [
1863
+ {
1864
+ :valueType => "MEASUREMENT",
1865
+ :numericValue => {
1866
+ :value => 15,
1867
+ :precision => 2
1868
+ },
1869
+ :unitOfMeasure => {
1870
+ :value => 30000017,
1871
+ :meaning => "ML/KG/HR",
1872
+ :display => "ml/kg/hr"
1873
+ }
1874
+ }
1875
+ ]
1876
+ },
1877
+ {
1878
+ :sequence => 9,
1879
+ :displayDescription => "Infuse Over",
1880
+ :fieldMeaning => "INFUSEOVER",
1881
+ :detailValues => [
1882
+ {
1883
+ :valueType => "MEASUREMENT",
1884
+ :numericValue => {
1885
+ :value => 1,
1886
+ :precision => 2
1887
+ },
1888
+ :unitOfMeasure => {
1889
+ :value => 30000018,
1890
+ :meaning => "WEEKS",
1891
+ :display => "Week(s)"
1892
+ }
1893
+ }
1894
+ ]
1895
+ },
1896
+ {
1897
+ :sequence => 11,
1898
+ :displayDescription => "PRN Instructions",
1899
+ :fieldMeaning => "PRNINSTRUCTIONS",
1900
+ :detailValues => [
1901
+ :valueType => "TEXT",
1902
+ :value => "sample prn instructions value"
1903
+ ]
1904
+ },
1905
+ {
1906
+ :sequence => 12,
1907
+ :displayDescription => "PRN Reasons",
1908
+ :fieldMeaning => "PRNREASON",
1909
+ :detailValues => [
1910
+ {
1911
+ :valueType => "CODE_VALUE",
1912
+ :value => 30000019,
1913
+ :meaning => "COUGH",
1914
+ :display => "Cough"
1915
+ }
1916
+ ]
1917
+ },
1918
+ {
1919
+ :sequence => 13,
1920
+ :displayDescription => "Number of Refills",
1921
+ :fieldMeaning => "NBRREFILLS",
1922
+ :detailValues => [
1923
+ {
1924
+ :valueType => "INTEGER",
1925
+ :value => 1,
1926
+ :precision => 0
1927
+ }
1928
+ ]
1929
+ },
1930
+ {
1931
+ :sequence => 14,
1932
+ :displayDescription => "Dispense as Written",
1933
+ :fieldMeaning => "DAW",
1934
+ :detailValues => [
1935
+ {
1936
+ :valueType => "BOOLEAN",
1937
+ :value => false
1938
+ }
1939
+ ]
1940
+ },
1941
+ {
1942
+ :sequence => 15,
1943
+ :displayDescription => "Future Order",
1944
+ :fieldMeaning => "FUTUREORDER",
1945
+ :detailValues => [
1946
+ {
1947
+ :valueType => "BOOLEAN",
1948
+ :value => false
1949
+ }
1950
+ ]
1951
+ },
1952
+ {
1953
+ :sequence => 2147483646,
1954
+ :displayDescription => "Inspiratory Time",
1955
+ :fieldMeaning => "INSPIRATORYTIME",
1956
+ :detailValues => [
1957
+ {
1958
+ :valueType => "DECIMAL_WITH_PRECISION",
1959
+ :value => 52,
1960
+ :precision => 2
1961
+ }
1962
+ ]
1963
+ },
1964
+ {
1965
+ :sequence => 2147483646,
1966
+ :displayDescription => "Treatment Period",
1967
+ :fieldMeaning => "TREATMENTPERIOD",
1968
+ :detailValues => [
1969
+ :valueType => "TEXT",
1970
+ :value => "Week 2"
1971
+ ]
1972
+ }
1973
+ ]
1974
+ }
1975
+
1976
+ continuousOrder2 = {:orderType => "CONTINUOUS",
1977
+ :orderId => 10000008,
1978
+ :mnemonic => "Continuous 2",
1979
+ :status => "Ordered",
1980
+ :version => 1,
1981
+ :orderingProvider => "Mega Man",
1982
+ :synonymId => 20000008,
1983
+ :tpn => false,
1984
+ :additives => [{
1985
+ :sequence => 0,
1986
+ :mnemonic => "digoxin",
1987
+ :dose => {
1988
+ :preferredDoseType => "VOLUME",
1989
+ :volumeDose => {
1990
+ :numericValue => {
1991
+ :value => 34.324,
1992
+ :precision => 2
1993
+ },
1994
+ :unitOfMeasure => {
1995
+ :value => 30000012,
1996
+ :meaning => "KL",
1997
+ :display => "kl"
1998
+ }
1999
+ }
2000
+ },
2001
+ :normalizedRate => {
2002
+ :numericValue => {
2003
+ :value => 12.0,
2004
+ :precision => 1
2005
+ },
2006
+ :unitOfMeasure => {
2007
+ :value => 30000004,
2008
+ :meaning => "ML/KG/HR",
2009
+ :display => "ml/kg/hr"
2010
+ }
2011
+ },
2012
+ :occurrence => {
2013
+ :value => 30000005,
2014
+ :meaning => "ONCE",
2015
+ :display => "Once"
2016
+ }
2017
+ }],
2018
+ :diluents => [{
2019
+ :sequence => 0,
2020
+ :mnemonic => "tap water",
2021
+ :bagVolume => {
2022
+ :numericValue => {
2023
+ :value => 1000,
2024
+ :precision => 2
2025
+ },
2026
+ :unitOfMeasure => {
2027
+ :value => 30000006,
2028
+ :meaning => "ML",
2029
+ :display => "ml"
2030
+ }
2031
+ },
2032
+ :rate => {
2033
+ :numericValue => {
2034
+ :value => 25.0,
2035
+ :precision => 2
2036
+ },
2037
+ :unitOfMeasure => {
2038
+ :value => 30000007,
2039
+ :meaning => "ML/HR",
2040
+ :display => "ml/hr"
2041
+ }
2042
+ },
2043
+ :infuseOver => {
2044
+ :numericValue => {
2045
+ :value => 5,
2046
+ :precision => 0
2047
+ },
2048
+ :unitOfMeasure => {
2049
+ :value => 30000008,
2050
+ :meaning => "HRS",
2051
+ :display => "hr(s)"
2052
+ }
2053
+ },
2054
+ :bagFrequency => {
2055
+ :value => 30000009,
2056
+ :meaning => "EOB",
2057
+ :display => "EOB"
2058
+ }
2059
+ }],
2060
+ :details => [{
2061
+ :sequence => 2147483646,
2062
+ :displayDescription => "Inspiratory Time",
2063
+ :fieldMeaning => "INSPIRATORYTIME",
2064
+ :detailValues => [
2065
+ {
2066
+ :valueType => "DECIMAL_WITH_PRECISION",
2067
+ :value => 59.55,
2068
+ :precision => 0
2069
+ }
2070
+ ]
2071
+ },
2072
+ {
2073
+ :sequence => 3,
2074
+ :displayDescription => "Duration",
2075
+ :fieldMeaning => "DURATION",
2076
+ :detailValues => [
2077
+ {
2078
+ :valueType => "MEASUREMENT",
2079
+ :numericValue => {
2080
+ :value => 12,
2081
+ :precision => 2
2082
+ },
2083
+ :unitOfMeasure => {
2084
+ :value => 30000015,
2085
+ :meaning => "HRS",
2086
+ :display => "Hr(s)"
2087
+ }
2088
+ }
2089
+ ]
2090
+ },
2091
+ {
2092
+ :sequence => 7,
2093
+ :displayDescription => "Normalized Rate",
2094
+ :fieldMeaning => "NORMALIZEDRATE",
2095
+ :detailValues => [
2096
+ {
2097
+ :valueType => "MEASUREMENT",
2098
+ :numericValue => {
2099
+ :value => 88.43,
2100
+ :precision => 2
2101
+ },
2102
+ :unitOfMeasure => {
2103
+ :value => 30000017,
2104
+ :meaning => "ML/KG/HR",
2105
+ :display => "ml/kg/hr"
2106
+ }
2107
+ }
2108
+ ]
2109
+ },
2110
+ {
2111
+ :sequence => 13,
2112
+ :displayDescription => "Number of Refills",
2113
+ :fieldMeaning => "NBRREFILLS",
2114
+ :detailValues => [
2115
+ {
2116
+ :valueType => "INTEGER",
2117
+ :value => 12,
2118
+ :precision => 0
2119
+ }
2120
+ ]
2121
+ },
2122
+ {
2123
+ :sequence => 14,
2124
+ :displayDescription => "Dispense as Written",
2125
+ :fieldMeaning => "DAW",
2126
+ :detailValues => [
2127
+ {
2128
+ :valueType => "BOOLEAN",
2129
+ :value => true
2130
+ }
2131
+ ]
2132
+ },
2133
+ {
2134
+ :sequence => 15,
2135
+ :displayDescription => "Future Order",
2136
+ :fieldMeaning => "FUTUREORDER",
2137
+ :detailValues => [
2138
+ {
2139
+ :valueType => "BOOLEAN",
2140
+ :value => false
2141
+ }
2142
+ ]
2143
+ },
2144
+ {
2145
+ :sequence => 4,
2146
+ :displayDescription => "Start date",
2147
+ :fieldMeaning => "REQSTARTDTTM",
2148
+ :detailValues => [
2149
+ {
2150
+ :valueType => "DATE_TIME",
2151
+ :value => "2013-03-09T12:09:06-0500"
2152
+ }
2153
+ ]
2154
+ },
2155
+ {
2156
+ :sequence => 12,
2157
+ :displayDescription => "PRN Reasons",
2158
+ :fieldMeaning => "PRNREASON",
2159
+ :detailValues => [
2160
+ {
2161
+ :valueType => "CODE_VALUE",
2162
+ :value => 30000019,
2163
+ :meaning => "HEADACHE",
2164
+ :display => "Headache"
2165
+ },
2166
+ {
2167
+ :valueType => "CODE_VALUE",
2168
+ :value => 30000020,
2169
+ :meaning => "PAIN",
2170
+ :display => "Pain"
2171
+ },
2172
+ {
2173
+ :valueType => "CODE_VALUE",
2174
+ :value => 30000020,
2175
+ :meaning => "COUGH",
2176
+ :display => "Cough"
2177
+ }
2178
+ ]
2179
+ },
2180
+ {
2181
+ :sequence => 2,
2182
+ :displayDescription => "Frequency",
2183
+ :fieldMeaning => "FREQ",
2184
+ :detailValues => [
2185
+ {
2186
+ :valueType => "CODE_VALUE",
2187
+ :value => 30000014,
2188
+ :meaning => "Q12H",
2189
+ :display => "Q12H"
2190
+ }
2191
+ ]
2192
+ },
2193
+ {
2194
+ :sequence => 0,
2195
+ :displayDescription => "Route of Administration",
2196
+ :fieldMeaning => "RXROUTE",
2197
+ :detailValues => [
2198
+ {
2199
+ :valueType => "CODE_VALUE",
2200
+ :value => 30000013,
2201
+ :meaning => "INTRAVENEOUS",
2202
+ :display => "Intraveneous"
2203
+ }
2204
+ ]
2205
+ },
2206
+ {
2207
+ :sequence => 11,
2208
+ :displayDescription => "PRN Instructions",
2209
+ :fieldMeaning => "PRNINSTRUCTIONS",
2210
+ :detailValues => [
2211
+ :valueType => "TEXT",
2212
+ :value => "prn instructions detail value display"
2213
+ ]
2214
+ },
2215
+ {
2216
+ :sequence => 2147483646,
2217
+ :displayDescription => "Treatment Period",
2218
+ :fieldMeaning => "TREATMENTPERIOD",
2219
+ :detailValues => [
2220
+ :valueType => "TEXT",
2221
+ :value => "Month 1"
2222
+ ]
2223
+ },
2224
+ {
2225
+ :sequence => 8,
2226
+ :displayDescription => "Freetext Rate",
2227
+ :fieldMeaning => "FREETEXTRATE",
2228
+ :detailValues => [
2229
+ :valueType => "TEXT",
2230
+ :value => "100 ml/hr"
2231
+ ]
2232
+ },
2233
+ {
2234
+ :sequence => 9,
2235
+ :displayDescription => "Infuse Over",
2236
+ :fieldMeaning => "INFUSEOVER",
2237
+ :detailValues => [
2238
+ {
2239
+ :valueType => "MEASUREMENT",
2240
+ :numericValue => {
2241
+ :value => 8,
2242
+ :precision => 2
2243
+ },
2244
+ :unitOfMeasure => {
2245
+ :value => 30000018,
2246
+ :meaning => "HRS",
2247
+ :display => "Hr(s)"
2248
+ }
2249
+ }
2250
+ ]
2251
+ },
2252
+ {
2253
+ :sequence => 2147483647,
2254
+ :displayDescription => "Order Comment",
2255
+ :fieldMeaning => "ORDER_COMMENT",
2256
+ :detailValues => [
2257
+ :valueType => "TEXT",
2258
+ :value => "MONSTER OF THE MIDWAY!!!"
2259
+ ]
2260
+ }]}
2261
+
2262
+ continuousOrder3 = {:orderType => "CONTINUOUS",
2263
+ :orderId => 10000009,
2264
+ :mnemonic => "Continuous 3",
2265
+ :status => "Ordered",
2266
+ :version => 0,
2267
+ :orderingProvider => "Roll",
2268
+ :synonymId => 20000009,
2269
+ :tpn => true,
2270
+ :additives => [{
2271
+ :sequence => 0,
2272
+ :mnemonic => "mesna",
2273
+ :dose => {
2274
+ :preferredDoseType => "VOLUME",
2275
+ :volumeDose => {
2276
+ :numericValue => {
2277
+ :value => 29.35,
2278
+ :precision => 2
2279
+ },
2280
+ :unitOfMeasure => {
2281
+ :value => 30000012,
2282
+ :meaning => "ML",
2283
+ :display => "ml"
2284
+ }
2285
+ }
2286
+ },
2287
+ :normalizedRate => {
2288
+ :numericValue => {
2289
+ :value => 25.0,
2290
+ :precision => 1
2291
+ },
2292
+ :unitOfMeasure => {
2293
+ :value => 30000004,
2294
+ :meaning => "ML/KG/HR",
2295
+ :display => "ml/kg/hr"
2296
+ }
2297
+ },
2298
+ :occurrence => {
2299
+ :value => 30000005,
2300
+ :meaning => "ONCE",
2301
+ :display => "Once"
2302
+ }
2303
+ },{
2304
+ :sequence => 0,
2305
+ :mnemonic => "morphine",
2306
+ :dose => {
2307
+ :preferredDoseType => "VOLUME",
2308
+ :volumeDose => {
2309
+ :numericValue => {
2310
+ :value => 25,
2311
+ :precision => 2
2312
+ },
2313
+ :unitOfMeasure => {
2314
+ :value => 30000012,
2315
+ :meaning => "ML",
2316
+ :display => "ml"
2317
+ }
2318
+ }
2319
+ },
2320
+ :normalizedRate => {
2321
+ :numericValue => {
2322
+ :value => 25.0,
2323
+ :precision => 1
2324
+ },
2325
+ :unitOfMeasure => {
2326
+ :value => 30000004,
2327
+ :meaning => "ML/KG/HR",
2328
+ :display => "ml/kg/hr"
2329
+ }
2330
+ },
2331
+ :occurrence => {
2332
+ :value => 30000005,
2333
+ :meaning => "ONCE",
2334
+ :display => "Once"
2335
+ }
2336
+ },{
2337
+ :sequence => 0,
2338
+ :mnemonic => "digoxin",
2339
+ :dose => {
2340
+ :preferredDoseType => "VOLUME",
2341
+ :volumeDose => {
2342
+ :numericValue => {
2343
+ :value => 11,
2344
+ :precision => 2
2345
+ },
2346
+ :unitOfMeasure => {
2347
+ :value => 30000012,
2348
+ :meaning => "ML",
2349
+ :display => "ml"
2350
+ }
2351
+ }
2352
+ },
2353
+ :normalizedRate => {
2354
+ :numericValue => {
2355
+ :value => 25.0,
2356
+ :precision => 1
2357
+ },
2358
+ :unitOfMeasure => {
2359
+ :value => 30000004,
2360
+ :meaning => "ML/KG/HR",
2361
+ :display => "ml/kg/hr"
2362
+ }
2363
+ },
2364
+ :occurrence => {
2365
+ :value => 30000005,
2366
+ :meaning => "ONCE",
2367
+ :display => "Once"
2368
+ }
2369
+ },{
2370
+ :sequence => 0,
2371
+ :mnemonic => "vicodin",
2372
+ :dose => {
2373
+ :preferredDoseType => "VOLUME",
2374
+ :volumeDose => {
2375
+ :numericValue => {
2376
+ :value => 67456,
2377
+ :precision => 2
2378
+ },
2379
+ :unitOfMeasure => {
2380
+ :value => 30000012,
2381
+ :meaning => "ML",
2382
+ :display => "ml"
2383
+ }
2384
+ }
2385
+ },
2386
+ :normalizedRate => {
2387
+ :numericValue => {
2388
+ :value => 25.0,
2389
+ :precision => 1
2390
+ },
2391
+ :unitOfMeasure => {
2392
+ :value => 30000004,
2393
+ :meaning => "ML/KG/HR",
2394
+ :display => "ml/kg/hr"
2395
+ }
2396
+ },
2397
+ :occurrence => {
2398
+ :value => 30000005,
2399
+ :meaning => "ONCE",
2400
+ :display => "Once"
2401
+ }
2402
+ },{
2403
+ :sequence => 0,
2404
+ :mnemonic => "xanax",
2405
+ :dose => {
2406
+ :preferredDoseType => "VOLUME",
2407
+ :volumeDose => {
2408
+ :numericValue => {
2409
+ :value => 234,
2410
+ :precision => 2
2411
+ },
2412
+ :unitOfMeasure => {
2413
+ :value => 30000012,
2414
+ :meaning => "ML",
2415
+ :display => "ml"
2416
+ }
2417
+ }
2418
+ },
2419
+ :normalizedRate => {
2420
+ :numericValue => {
2421
+ :value => 25.0,
2422
+ :precision => 1
2423
+ },
2424
+ :unitOfMeasure => {
2425
+ :value => 30000004,
2426
+ :meaning => "ML/KG/HR",
2427
+ :display => "ml/kg/hr"
2428
+ }
2429
+ },
2430
+ :occurrence => {
2431
+ :value => 30000005,
2432
+ :meaning => "ONCE",
2433
+ :display => "Once"
2434
+ }
2435
+ },{
2436
+ :sequence => 0,
2437
+ :mnemonic => "codiene",
2438
+ :dose => {
2439
+ :preferredDoseType => "VOLUME",
2440
+ :volumeDose => {
2441
+ :numericValue => {
2442
+ :value => 654,
2443
+ :precision => 2
2444
+ },
2445
+ :unitOfMeasure => {
2446
+ :value => 30000012,
2447
+ :meaning => "ML",
2448
+ :display => "ml"
2449
+ }
2450
+ }
2451
+ },
2452
+ :normalizedRate => {
2453
+ :numericValue => {
2454
+ :value => 25.0,
2455
+ :precision => 1
2456
+ },
2457
+ :unitOfMeasure => {
2458
+ :value => 30000004,
2459
+ :meaning => "ML/KG/HR",
2460
+ :display => "ml/kg/hr"
2461
+ }
2462
+ },
2463
+ :occurrence => {
2464
+ :value => 30000005,
2465
+ :meaning => "ONCE",
2466
+ :display => "Once"
2467
+ }
2468
+ },{
2469
+ :sequence => 0,
2470
+ :mnemonic => "methadone",
2471
+ :dose => {
2472
+ :preferredDoseType => "VOLUME",
2473
+ :volumeDose => {
2474
+ :numericValue => {
2475
+ :value => 32456.234,
2476
+ :precision => 2
2477
+ },
2478
+ :unitOfMeasure => {
2479
+ :value => 30000012,
2480
+ :meaning => "ML",
2481
+ :display => "ml"
2482
+ }
2483
+ }
2484
+ },
2485
+ :normalizedRate => {
2486
+ :numericValue => {
2487
+ :value => 25.0,
2488
+ :precision => 1
2489
+ },
2490
+ :unitOfMeasure => {
2491
+ :value => 30000004,
2492
+ :meaning => "ML/KG/HR",
2493
+ :display => "ml/kg/hr"
2494
+ }
2495
+ },
2496
+ :occurrence => {
2497
+ :value => 30000005,
2498
+ :meaning => "ONCE",
2499
+ :display => "Once"
2500
+ }
2501
+ },{
2502
+ :sequence => 0,
2503
+ :mnemonic => "acetaminophen",
2504
+ :dose => {
2505
+ :preferredDoseType => "VOLUME",
2506
+ :volumeDose => {
2507
+ :numericValue => {
2508
+ :value => 324.54,
2509
+ :precision => 2
2510
+ },
2511
+ :unitOfMeasure => {
2512
+ :value => 30000012,
2513
+ :meaning => "ML",
2514
+ :display => "ml"
2515
+ }
2516
+ }
2517
+ },
2518
+ :normalizedRate => {
2519
+ :numericValue => {
2520
+ :value => 25.0,
2521
+ :precision => 1
2522
+ },
2523
+ :unitOfMeasure => {
2524
+ :value => 30000004,
2525
+ :meaning => "ML/KG/HR",
2526
+ :display => "ml/kg/hr"
2527
+ }
2528
+ },
2529
+ :occurrence => {
2530
+ :value => 30000005,
2531
+ :meaning => "ONCE",
2532
+ :display => "Once"
2533
+ }
2534
+ }],
2535
+ :diluents => [{
2536
+ :sequence => 0,
2537
+ :mnemonic => "sterile water",
2538
+ :bagVolume => {
2539
+ :numericValue => {
2540
+ :value => 1000,
2541
+ :precision => 2
2542
+ },
2543
+ :unitOfMeasure => {
2544
+ :value => 30000006,
2545
+ :meaning => "ML",
2546
+ :display => "ml"
2547
+ }
2548
+ },
2549
+ :rate => {
2550
+ :numericValue => {
2551
+ :value => 25.0,
2552
+ :precision => 2
2553
+ },
2554
+ :unitOfMeasure => {
2555
+ :value => 30000007,
2556
+ :meaning => "ML/HR",
2557
+ :display => "ml/hr"
2558
+ }
2559
+ },
2560
+ :infuseOver => {
2561
+ :numericValue => {
2562
+ :value => 5,
2563
+ :precision => 0
2564
+ },
2565
+ :unitOfMeasure => {
2566
+ :value => 30000008,
2567
+ :meaning => "HRS",
2568
+ :display => "hr(s)"
2569
+ }
2570
+ },
2571
+ :bagFrequency => {
2572
+ :value => 30000009,
2573
+ :meaning => "EOB",
2574
+ :display => "EOB"
2575
+ }
2576
+ }],
2577
+ :details => [{
2578
+ :sequence => 0,
2579
+ :displayDescription => "Route of Administration",
2580
+ :fieldMeaning => "RXROUTE",
2581
+ :detailValues => [
2582
+ {
2583
+ :valueType => "CODE_VALUE",
2584
+ :value => 30000013,
2585
+ :meaning => "INJECTION",
2586
+ :display => "Injection"
2587
+ }
2588
+ ]
2589
+ },
2590
+ {
2591
+ :sequence => 2,
2592
+ :displayDescription => "Frequency",
2593
+ :fieldMeaning => "FREQ",
2594
+ :detailValues => [
2595
+ {
2596
+ :valueType => "CODE_VALUE",
2597
+ :value => 30000014,
2598
+ :meaning => "Q4H",
2599
+ :display => "Q4H"
2600
+ }
2601
+ ]
2602
+ },
2603
+ {
2604
+ :sequence => 3,
2605
+ :displayDescription => "Duration",
2606
+ :fieldMeaning => "DURATION",
2607
+ :detailValues => [
2608
+ {
2609
+ :valueType => "MEASUREMENT",
2610
+ :numericValue => {
2611
+ :value => 1,
2612
+ :precision => 2
2613
+ },
2614
+ :unitOfMeasure => {
2615
+ :value => 30000015,
2616
+ :meaning => "WEEKS",
2617
+ :display => "Week(s)"
2618
+ }
2619
+ }
2620
+ ]
2621
+ },
2622
+ {
2623
+ :sequence => 4,
2624
+ :displayDescription => "Start date",
2625
+ :fieldMeaning => "REQSTARTDTTM",
2626
+ :detailValues => [
2627
+ {
2628
+ :valueType => "DATE_TIME",
2629
+ :value => "2013-05-10T12:09:06-0500"
2630
+ }
2631
+ ]
2632
+ },
2633
+ {
2634
+ :sequence => 5,
2635
+ :displayDescription => "Stop date",
2636
+ :fieldMeaning => "STOPDTTM",
2637
+ :detailValues => [
2638
+ {
2639
+ :valueType => "DATE_TIME"
2640
+ }
2641
+ ]
2642
+ },
2643
+ {
2644
+ :sequence => 6,
2645
+ :displayDescription => "Rate",
2646
+ :fieldMeaning => "RATE",
2647
+ :detailValues => [
2648
+ {
2649
+ :valueType => "MEASUREMENT",
2650
+ :numericValue => {
2651
+ :value => 33.33,
2652
+ :precision => 2
2653
+ },
2654
+ :unitOfMeasure => {
2655
+ :value => 30000016,
2656
+ :meaning => "ML/HR",
2657
+ :display => "ml/hr"
2658
+ }
2659
+ }
2660
+ ]
2661
+ },
2662
+ {
2663
+ :sequence => 7,
2664
+ :displayDescription => "Normalized Rate",
2665
+ :fieldMeaning => "NORMALIZEDRATE",
2666
+ :detailValues => [
2667
+ {
2668
+ :valueType => "MEASUREMENT",
2669
+ :numericValue => {
2670
+ :value => 22.93,
2671
+ :precision => 2
2672
+ },
2673
+ :unitOfMeasure => {
2674
+ :value => 30000017,
2675
+ :meaning => "ML/KG/HR",
2676
+ :display => "ml/kg/hr"
2677
+ }
2678
+ }
2679
+ ]
2680
+ },
2681
+ {
2682
+ :sequence => 9,
2683
+ :displayDescription => "Infuse Over",
2684
+ :fieldMeaning => "INFUSEOVER",
2685
+ :detailValues => [
2686
+ {
2687
+ :valueType => "MEASUREMENT",
2688
+ :numericValue => {
2689
+ :value => 6,
2690
+ :precision => 2
2691
+ },
2692
+ :unitOfMeasure => {
2693
+ :value => 30000018,
2694
+ :meaning => "HRS",
2695
+ :display => "Hr(s)"
2696
+ }
2697
+ }
2698
+ ]
2699
+ },
2700
+ {
2701
+ :sequence => 11,
2702
+ :displayDescription => "PRN Instructions",
2703
+ :fieldMeaning => "PRNINSTRUCTIONS",
2704
+ :detailValues => [
2705
+ :valueType => "TEXT"
2706
+ ]
2707
+ },
2708
+ {
2709
+ :sequence => 13,
2710
+ :displayDescription => "Number of Refills",
2711
+ :fieldMeaning => "NBRREFILLS",
2712
+ :detailValues => [
2713
+ {
2714
+ :valueType => "INTEGER",
2715
+ :value => 99,
2716
+ :precision => 0
2717
+ }
2718
+ ]
2719
+ },
2720
+ {
2721
+ :sequence => 14,
2722
+ :displayDescription => "Dispense as Written",
2723
+ :fieldMeaning => "DAW",
2724
+ :detailValues => [
2725
+ {
2726
+ :valueType => "BOOLEAN",
2727
+ :value => false
2728
+ }
2729
+ ]
2730
+ },
2731
+ {
2732
+ :sequence => 15,
2733
+ :displayDescription => "Future Order",
2734
+ :fieldMeaning => "FUTUREORDER",
2735
+ :detailValues => [
2736
+ {
2737
+ :valueType => "BOOLEAN",
2738
+ :value => false
2739
+ }
2740
+ ]
2741
+ },
2742
+ {
2743
+ :sequence => 2147483646,
2744
+ :displayDescription => "Treatment Period",
2745
+ :fieldMeaning => "TREATMENTPERIOD",
2746
+ :detailValues => [
2747
+ :valueType => "TEXT",
2748
+ :value => "Month 2"
2749
+ ]
2750
+ },
2751
+ {
2752
+ :sequence => 2147483647,
2753
+ :displayDescription => "Order Comment",
2754
+ :fieldMeaning => "ORDER_COMMENT",
2755
+ :detailValues => [
2756
+ :valueType => "TEXT",
2757
+ :value => ""
2758
+ ]
2759
+ }]}
2760
+
2761
+ [continuousOrder1, continuousOrder2, continuousOrder3]
2762
+ end
2763
+ =begin
2764
+ def driving_agent
2765
+ {
2766
+ :mnemonic =>"driving agent",
2767
+ :dose => volume_dose,
2768
+ :rate => {
2769
+ :numericValue => {
2770
+ :value => 25.00,
2771
+ :precision => 2
2772
+ },
2773
+ :unitOfMeasure => {
2774
+ :value => 30000000,
2775
+ :meaning => "ML/HR",
2776
+ :display => "ml/hr"
2777
+ }
2778
+ },
2779
+ :infuseOver => {
2780
+ :numericValue => {
2781
+ :value => 5,
2782
+ :precision => 0
2783
+ },
2784
+ :unitOfMeasure => {
2785
+ :value => 30000001,
2786
+ :meaning => "HRS",
2787
+ :display => "hr(s)"
2788
+ }
2789
+ },
2790
+ :frequency => {
2791
+ :value => 30000002,
2792
+ :meaning => "EOB",
2793
+ :display => "EOB"
2794
+ },
2795
+ :duration => {
2796
+ :numericValue => {
2797
+ :value => 5,
2798
+ :precision => 0
2799
+ },
2800
+ :unitOfMeasure => {
2801
+ :value => 30000003,
2802
+ :meaning => "DAYS",
2803
+ :display => "Days(s)"
2804
+ }
2805
+ }
2806
+ }
2807
+ end
2808
+
2809
+ def additives
2810
+ [additive]
2811
+ end
2812
+
2813
+ def additive
2814
+ {
2815
+ :sequence => 0,
2816
+ :mnemonic => "additive",
2817
+ :dose => volume_dose,
2818
+ :normalizedRate => {
2819
+ :numericValue => {
2820
+ :value => 25.0,
2821
+ :precision => 1
2822
+ },
2823
+ :unitOfMeasure => {
2824
+ :value => 30000004,
2825
+ :meaning => "ML/KG/HR",
2826
+ :display => "ml/kg/hr"
2827
+ }
2828
+ },
2829
+ :occurrence => {
2830
+ :value => 30000005,
2831
+ :meaning => "ONCE",
2832
+ :display => "Once"
2833
+ }
2834
+ }
2835
+ end
2836
+
2837
+ def diluents
2838
+ [diluent]
2839
+ end
2840
+
2841
+ def diluent
2842
+ {
2843
+ :sequence => 0,
2844
+ :mnemonic => "diluent",
2845
+ :bagVolume => {
2846
+ :numericValue => {
2847
+ :value => 1000,
2848
+ :precision => 2
2849
+ },
2850
+ :unitOfMeasure => {
2851
+ :value => 30000006,
2852
+ :meaning => "ML",
2853
+ :display => "ml"
2854
+ }
2855
+ },
2856
+ :rate => {
2857
+ :numericValue => {
2858
+ :value => 25.0,
2859
+ :precision => 2
2860
+ },
2861
+ :unitOfMeasure => {
2862
+ :value => 30000007,
2863
+ :meaning => "ML/HR",
2864
+ :display => "ml/hr"
2865
+ }
2866
+ },
2867
+ :infuseOver => {
2868
+ :numericValue => {
2869
+ :value => 5,
2870
+ :precision => 0
2871
+ },
2872
+ :unitOfMeasure => {
2873
+ :value => 30000008,
2874
+ :meaning => "HRS",
2875
+ :display => "hr(s)"
2876
+ }
2877
+ },
2878
+ :bagFrequency => {
2879
+ :value => 30000009,
2880
+ :meaning => "EOB",
2881
+ :display => "EOB"
2882
+ }
2883
+ }
2884
+ end
2885
+
2886
+ def strength_dose
2887
+ {
2888
+ :preferredDoseType => "STRENGTH",
2889
+ :strengthDose => {
2890
+ :numericValue => {
2891
+ :value => 25,
2892
+ :precision => 2
2893
+ },
2894
+ :unitOfMeasure => {
2895
+ :value => 30000011,
2896
+ :meaning => "MG",
2897
+ :display => "mg"
2898
+ }
2899
+ }
2900
+ }
2901
+ end
2902
+
2903
+ def volume_dose
2904
+ {
2905
+ :preferredDoseType => "VOLUME",
2906
+ :volumeDose => {
2907
+ :numericValue => {
2908
+ :value => 25,
2909
+ :precision => 2
2910
+ },
2911
+ :unitOfMeasure => {
2912
+ :value => 30000012,
2913
+ :meaning => "ML",
2914
+ :display => "ml"
2915
+ }
2916
+ }
2917
+ }
2918
+ end
2919
+
2920
+ def freetext_dose
2921
+ {
2922
+ :preferredDoseType => "FREETEXT",
2923
+ :freetextDose => "freetext dose value"
2924
+ }
2925
+ end
2926
+
2927
+
2928
+ def route_of_administration_detail
2929
+ {
2930
+ :sequence => 1,
2931
+ :displayDescription => "Route of Administration",
2932
+ :fieldMeaning => "RXROUTE",
2933
+ :detailValues => [
2934
+ {
2935
+ :valueType => "CODE_VALUE",
2936
+ :value => 30000013,
2937
+ :meaning => "ORAL",
2938
+ :display => "Oral"
2939
+ }
2940
+ ]
2941
+ }
2942
+ end
2943
+
2944
+ def frequency_detail
2945
+ {
2946
+ :sequence => 2,
2947
+ :displayDescription => "Frequency",
2948
+ :fieldMeaning => "FREQ",
2949
+ :detailValues => [
2950
+ {
2951
+ :valueType => "CODE_VALUE",
2952
+ :value => 30000014,
2953
+ :meaning => "ONCE",
2954
+ :display => "Once"
2955
+ }
2956
+ ]
2957
+ }
2958
+ end
2959
+
2960
+ def duration_detail
2961
+ {
2962
+ :sequence => 3,
2963
+ :displayDescription => "Duration",
2964
+ :fieldMeaning => "DURATION",
2965
+ :detailValues => [
2966
+ {
2967
+ :valueType => "MEASUREMENT",
2968
+ :numericValue => {
2969
+ :value => 2.5,
2970
+ :precision => 2
2971
+ },
2972
+ :unitOfMeasure => {
2973
+ :value => 30000015,
2974
+ :meaning => "DAYS",
2975
+ :display => "days"
2976
+ }
2977
+ }
2978
+ ]
2979
+ }
2980
+ end
2981
+
2982
+ def start_date_detail
2983
+ {
2984
+ :sequence => 4,
2985
+ :displayDescription => "Start date",
2986
+ :fieldMeaning => "REQSTARTDTTM",
2987
+ :detailValues => [
2988
+ {
2989
+ :valueType => "DATE_TIME",
2990
+ :value => "121212T12000000"
2991
+ }
2992
+ ]
2993
+ }
2994
+ end
2995
+
2996
+ def stop_date_detail
2997
+ {
2998
+ :sequence => 5,
2999
+ :displayDescription => "Stop date",
3000
+ :fieldMeaning => "STOPDTTM",
3001
+ :detailValues => [
3002
+ {
3003
+ :valueType => "DATE_TIME",
3004
+ :value => "122424T12000000"
3005
+ }
3006
+ ]
3007
+ }
3008
+ end
3009
+
3010
+ def rate_detail
3011
+ {
3012
+ :sequence => 6,
3013
+ :displayDescription => "Rate",
3014
+ :fieldMeaning => "RATE",
3015
+ :detailValues => [
3016
+ {
3017
+ :valueType => "MEASUREMENT",
3018
+ :numericValue => {
3019
+ :value => 2.5,
3020
+ :precision => 2
3021
+ },
3022
+ :unitOfMeasure => {
3023
+ :value => 30000016,
3024
+ :meaning => "ML/HR",
3025
+ :display => "ml/hr"
3026
+ }
3027
+ }
3028
+ ]
3029
+ }
3030
+ end
3031
+
3032
+ def normalized_rate_detail
3033
+ {
3034
+ :sequence => 7,
3035
+ :displayDescription => "Normalized Rate",
3036
+ :fieldMeaning => "NORMALIZEDRATE",
3037
+ :detailValues => [
3038
+ {
3039
+ :valueType => "MEASUREMENT",
3040
+ :numericValue => {
3041
+ :value => 2.5,
3042
+ :precision => 2
3043
+ },
3044
+ :unitOfMeasure => {
3045
+ :value => 30000017,
3046
+ :meaning => "DAYS",
3047
+ :display => "days"
3048
+ }
3049
+ }
3050
+ ]
3051
+ }
3052
+ end
3053
+
3054
+ def freetext_rate_detail
3055
+ {
3056
+ :sequence => 8,
3057
+ :displayDescription => "Freetext Rate",
3058
+ :fieldMeaning => "FREETEXTRATE",
3059
+ :detailValues => [
3060
+ :valueType => "TEXT",
3061
+ :value => "50 mg/hr with water"
3062
+ ]
3063
+ }
3064
+ end
3065
+
3066
+ def infuse_over_detail
3067
+ {
3068
+ :sequence => 9,
3069
+ :displayDescription => "Infuse Over",
3070
+ :fieldMeaning => "INFUSEOVER",
3071
+ :detailValues => [
3072
+ {
3073
+ :valueType => "MEASUREMENT",
3074
+ :numericValue => {
3075
+ :value => 2.5,
3076
+ :precision => 2
3077
+ },
3078
+ :unitOfMeasure => {
3079
+ :value => 30000018,
3080
+ :meaning => "DAYS",
3081
+ :display => "days"
3082
+ }
3083
+ }
3084
+ ]
3085
+ }
3086
+ end
3087
+
3088
+ def scheduled_prn_indicator_detail
3089
+ {
3090
+ :sequence => 10,
3091
+ :displayDescription => "Scheduled / PRN",
3092
+ :fieldMeaning => "SCH/PRN",
3093
+ :detailValues => [
3094
+ {
3095
+ :valueType => "BOOLEAN",
3096
+ :value => true
3097
+ }
3098
+ ]
3099
+ }
3100
+ end
3101
+
3102
+ def prn_instructions_detail
3103
+ {
3104
+ :sequence => 11,
3105
+ :displayDescription => "PRN Instructions",
3106
+ :fieldMeaning => "PRNINSTRUCTIONS",
3107
+ :detailValues => [
3108
+ :valueType => "TEXT",
3109
+ :value => "sample prn instructions value"
3110
+ ]
3111
+ }
3112
+ end
3113
+
3114
+ def prn_reasons_detail
3115
+ {
3116
+ :sequence => 12,
3117
+ :displayDescription => "PRN Reasons",
3118
+ :fieldMeaning => "PRNREASON",
3119
+ :detailValues => [
3120
+ {
3121
+ :valueType => "CODE_VALUE",
3122
+ :value => 30000019,
3123
+ :meaning => "HEADACHE",
3124
+ :display => "Headache"
3125
+ },
3126
+ {
3127
+ :valueType => "CODE_VALUE",
3128
+ :value => 30000020,
3129
+ :meaning => "PAIN",
3130
+ :display => "Pain"
3131
+ }
3132
+ ]
3133
+ }
3134
+ end
3135
+
3136
+ def number_of_refills_detail
3137
+ {
3138
+ :sequence => 13,
3139
+ :displayDescription => "Number of Refills",
3140
+ :fieldMeaning => "NBRREFILLS",
3141
+ :detailValues => [
3142
+ {
3143
+ :valueType => "INTEGER",
3144
+ :value => 5,
3145
+ :precision => 0
3146
+ }
3147
+ ]
3148
+ }
3149
+ end
3150
+
3151
+ def dispense_as_written_detail
3152
+ {
3153
+ :sequence => 14,
3154
+ :displayDescription => "Dispense as Written",
3155
+ :fieldMeaning => "DAW",
3156
+ :detailValues => [
3157
+ {
3158
+ :valueType => "BOOLEAN",
3159
+ :value => true
3160
+ }
3161
+ ]
3162
+ }
3163
+ end
3164
+
3165
+ def future_order_detail
3166
+ {
3167
+ :sequence => 15,
3168
+ :displayDescription => "Future Order",
3169
+ :fieldMeaning => "FUTUREORDER",
3170
+ :detailValues => [
3171
+ {
3172
+ :valueType => "BOOLEAN",
3173
+ :value => false
3174
+ }
3175
+ ]
3176
+ }
3177
+ end
3178
+
3179
+ def inspiratory_time_detail
3180
+ {
3181
+ :sequence => 2147483646,
3182
+ :displayDescription => "Inspiratory Time",
3183
+ :fieldMeaning => "INSPIRATORYTIME",
3184
+ :detailValues => [
3185
+ {
3186
+ :valueType => "DECIMAL_WITH_PRECISION",
3187
+ :value => 55.55,
3188
+ :precision => 2
3189
+ }
3190
+ ]
3191
+ }
3192
+ end
3193
+
3194
+ def treatment_period_detail
3195
+ {
3196
+ :sequence => 2147483646,
3197
+ :displayDescription => "Treatment Period",
3198
+ :fieldMeaning => "TREATMENTPERIOD",
3199
+ :detailValues => [
3200
+ :valueType => "TEXT",
3201
+ :value => "Day 5"
3202
+ ]
3203
+ }
3204
+ end
3205
+
3206
+ def order_comment_detail
3207
+ {
3208
+ :sequence => 2147483647,
3209
+ :displayDescription => "Order Comment",
3210
+ :fieldMeaning => "ORDER_COMMENT",
3211
+ :detailValues => [
3212
+ :valueType => "TEXT",
3213
+ :value => "order comment"
3214
+ ]
3215
+ }
3216
+ end
3217
+ =end
3218
+ end
3219
+ end
3220
+ end