refs/refs/mends-on-fhir/whistle-mappings/synthea/whistle-functions/Drug_Exposure.wstl

694 lines · wstl
1// 2021-03-22: Comment out MedicationStatement
2// 2022-07-01: added validityPeriod for MedicationRequest, Added meta.profile and corrected misspelled elements
4//-----------------------------------------------------------------------------
5// DRUG_EXPOSURE
6//-----------------------------------------------------------------------------
7def Drug_Exposure(Drug_Exposure, required context) {
9 // Define Medication ID to be used as medicationReference and as id for the Medication resource
10 var medicationID: Id_Spaces_To_Dash($StrCat("med-", Drug_Exposure.drug_concept_id, "-",Drug_Exposure.drug_source_concept_id, "-", $Hash(Drug_Exposure.lot_number)))
12 // 32818 = EHR administration record
13 if (Drug_Exposure.drug_type_concept_id = "32818") {
14 // CVX = Vaccine Administered
15 if (Drug_Exposure.drug_source_vocabulary_id = "CVX") {
16 var resources[]: Drug_Exposure_Immunization(Drug_Exposure, context)
17 var medicationID: ""
18 } else {
19 var resources[]: Drug_Exposure_MedicationAdministration(Drug_Exposure, context, medicationID)
20 }
21 }
23 // 32833 = EHR order
24 if Drug_Exposure.drug_type_concept_id = "32833" {
25 var resources[]: Drug_Exposure_MedicationRequest(Drug_Exposure, context, medicationID)
26 }
28 // 32865 = Patient self-report
29 //if (Drug_Exposure.drug_type_concept_id = "32865") {
30 // var resources[]: Drug_Exposure_MedicationStatement(Drug_Exposure, context, medicationID)
31 //}
33 // 32825 = EHR dispensing record
34 if (Drug_Exposure.drug_type_concept_id = "32825") {
35 var resources[]: Drug_Exposure_MedicationDispense(Drug_Exposure, context, medicationID)
36 }
38 // Always create a Medication Resource when drug_concept_id or drug_source_concept_id are ~= "0" and medicationID not empty
39 if (Drug_Exposure.drug_concept_id ~= "0" or (Drug_Exposure.drug_concept_id = "0" and Drug_Exposure.drug_source_concept_id ~= "0" and medicationID ~= "")) {
40 var resources[]: Drug_Exposure_Medication(Drug_Exposure, context, medicationID)
41 }
43 $this: resources
48//-----------------------------------------------------------------------------
49// Medication - FHIR US Core
50//-----------------------------------------------------------------------------
51def Drug_Exposure_Medication(Drug_Exposure, required context, required medicationID) {
53 // MedicationRequest Resource
54 resourceType: "Medication"
56 // id, 0..1, id
57 id: medicationID
59 // meta, 0..1, Meta
60 meta.profile[]: "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medication"
62 implicitRules: ""
63 language: "en-US"
64 text: ""
65 contained: ""
66 extension: ""
67 modifierExtension: ""
69 // identifier, 0..*, Identifier
70 identifier[0].use: "secondary";
71 identifier[0].system: Code_System("HDC")
72 identifier[0].value: medicationID
74 // code,1..1,CodeableConcept
75 if (Drug_Exposure.drug_concept_id ~= "0") {
76 code.coding[]: CodingSelected(Code_System(Drug_Exposure.drug_concept_vocabulary_id), "", Drug_Exposure.drug_concept_code, Drug_Exposure.drug_concept_name, true)
78 if (Drug_Exposure.drug_concept_code ~= Drug_Exposure.drug_source_concept_code) {
79 code.coding[]: CodingSelected(Code_System(Drug_Exposure.drug_source_vocabulary_id), "", Drug_Exposure.drug_source_concept_code, Drug_Exposure.drug_source_concept_name, true)
80 }
81 } else {
82 if(Drug_Exposure.drug_source_concept_id ~= "0") {
83 code.coding[]: CodingSelected(Code_System(Drug_Exposure.drug_source_vocabulary_id), "", Drug_Exposure.drug_source_concept_code, Drug_Exposure.drug_source_concept_name, true)
84 }
85 }
87 status: "active"
89 manufacturer: ""
90 form: ""
92 // batch,0..1,BackboneElement
93 // lotNumber, 0..1, string
94 batch.lotNumber: Drug_Exposure.lot_number
99//-----------------------------------------------------------------------------
100// MedicationRequest - FHIR US Core
101//-----------------------------------------------------------------------------
102def Drug_Exposure_MedicationRequest(Drug_Exposure, required context, required medicationID) {
104 // MedicationRequest Resource
105 resourceType: "MedicationRequest"
107 // id, 0..1, id
108 id: Drug_Exposure.drug_exposure_id
110 // meta, 0..1, Meta
111 meta.profile[]: "http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest"
113 implicitRules: ""
114 language: "en-US"
115 text: ""
116 contained: ""
117 extension: ""
118 modifierExtension: ""
120 // identifier, 0..*, Identifier
121 identifier[0].use: "secondary";
122 identifier[0].system: Code_System("HDC")
123 identifier[0].value: Drug_Exposure.drug_exposure_id
125 // status, 1..1, code
126 if (Drug_Exposure.stop_reason) {
127 status: "stopped"
128 statusReason.text: Drug_Exposure.stop_reason
129 } else {
130 status: "unknown"
131 }
133 // intent, 1..1, code
134 intent: "order"
135 category: ""
136 priority: ""
137 doNotPerform: ""
139 // reported[x], 0..1
140 reportedBoolean: false
142 // medication[x], 1..1
143 medicationReference: Reference("Medication", medicationID)
145 // subject, 1..1, Reference
146 if (Drug_Exposure.person_id) {
147 subject: Reference("Patient", Drug_Exposure.person_id)
148 }
150 // encounter, 0..1, Reference
151 if (Drug_Exposure.visit_occurrence_id) {
152 encounter: Reference("Encounter", Drug_Exposure.visit_occurrence_id)
153 }
155 supportingInformation: ""
157 // authoredOn, 0..1, dateTime
158 if context.config.output.phi = "yes" {
159 authoredOn: ReformatDatetimeDate(Drug_Exposure.drug_exposure_start_datetime, Drug_Exposure.drug_exposure_start_date)
160 } else {
161 authoredOn: ReformatDatetime("2030-01-01")
162 }
164 // requester, 0..1, Reference
165 //OPTION A
166 if(Drug_Exposure.provider_id) {
167 requester: Reference("Practitioner", Drug_Exposure.provider_id)
168 }
170 //OPTION B
171 //if($IsNotNil(Drug_Exposure.provider_id)) {
172 // requester: Reference("Practitioner", Drug_Exposure.provider_id)
173 //} else {
174 // requester: Reference("Practitioner", "NULL")
175 //}
177 performer: ""
178 performerType: ""
179 recorder: ""
180 reasonCode: ""
181 reasonReference: ""
182 instantiatesCanonical: ""
183 instantiatesUri: ""
184 basedOn: ""
185 groupIdentifier: ""
186 courseOfTherapyType: ""
187 insurance: ""
188 note: ""
190 // dosageInstruction, 0..*, Dosage
192 // text, 0..1, string
193 if Drug_Exposure.sig {
194 dosageInstruction[0].text: Drug_Exposure.sig
195 }
197 // route, 0..1, CodeableConcept
198 dosageInstruction[0].route.text: Drug_Exposure.route_source_value
199 if(Drug_Exposure.route_concept_id and Drug_Exposure.route_concept_id ~= "0") {
200 dosageInstruction[0].route.coding[0].system: Code_System(Drug_Exposure.route_vocabulary_id)
201 dosageInstruction[0].route.coding[0].code: Drug_Exposure.route_concept_code
202 dosageInstruction[0].route.coding[0].display: Drug_Exposure.route_concept_name
203 }
205 if(Drug_Exposure.dose_unit_source_value ~= "*Unspecified") {
206 dosageInstruction[0].doseAndRate[0].doseQuantity.unit: Drug_Exposure.dose_unit_source_value
207 }
209 // dispenseRequest, 0..1, BackboneElement
210 if (Drug_Exposure.drug_exposure_start_date) {
211 if context.config.output.phi = "yes" {
212 dispenseRequest.validityPeriod.start: ReformatDatetimeDate(Drug_Exposure.drug_exposure_start_datetime, Drug_Exposure.drug_exposure_start_date)
213 } else {
214 dispenseRequest.validityPeriod.start: ReformatDatetime("2030-01-01")
215 }
216 }
217 if (Drug_Exposure.drug_exposure_end_date) {
218 if context.config.output.phi = "yes" {
219 dispenseRequest.validityPeriod.end: ReformatDatetimeDate(Drug_Exposure.drug_exposure_end_datetime, Drug_Exposure.drug_exposure_end_date)
220 } else {
221 dispenseRequest.validityPeriod.end: ReformatDatetime("2030-01-01")
222 }
223 }
225 if(Drug_Exposure.refills) {
226 dispenseRequest.numberOfRepeatsAllowed: $ParseFloat(Drug_Exposure.refills)
227 }
229 if(Drug_Exposure.quantity) {
230 dispenseRequest.quantity.value: $ParseFloat(Drug_Exposure.quantity)
231 }
233 if(Drug_Exposure.days_supply) {
234 dispenseRequest.expectedSupplyDuration.value: $ParseFloat(Drug_Exposure.days_supply)
235 dispenseRequest.expectedSupplyDuration.code: "d"
236 dispenseRequest.expectedSupplyDuration.system: "http://unitsofmeasure.org"
237 }
239 substitution: ""
240 priorPrescription: ""
241 detectedIssue: ""
242 eventHistory: ""
247//-----------------------------------------------------------------------------
248// Immunization - FHIR US Core
249//-----------------------------------------------------------------------------
250def Drug_Exposure_Immunization(Drug_Exposure, required context) {
252 // Immunization Resource
253 resourceType: "Immunization"
255 // id, 0..1, id
256 id: Drug_Exposure.drug_exposure_id
258 // meta, 0..1, Meta
259 meta.profile[]: "http://hl7.org/fhir/us/core/StructureDefinition/us-core-immunization"
261 implicitRules: ""
262 language: "en-US"
263 text: ""
264 contained: ""
265 extension: ""
266 modifierExtension: ""
268 // identifier, 0..*, Identifier
269 identifier[0].use: "secondary";
270 identifier[0].system: Code_System("HDC")
271 identifier[0].value: Drug_Exposure.drug_exposure_id
273 // status, 1..1, code
274 if (Drug_Exposure.stop_reason) {
275 status: "not-done"
276 statusReason.text: Drug_Exposure.stop_reason
277 } else {
278 status: "completed"
279 }
281 // vaccineCode, 1..1, CodeableConcept
282 vaccineCode.text: Drug_Exposure.drug_concept_name
283 vaccineCode.coding[]: Coding(Code_System(Drug_Exposure.drug_concept_vocabulary_id), "", Drug_Exposure.drug_concept_code, Drug_Exposure.drug_concept_name)
285 if (Drug_Exposure.drug_concept_code ~= Drug_Exposure.drug_source_concept_code) {
286 vaccineCode.coding[]: Coding(Code_System(Drug_Exposure.drug_source_vocabulary_id), "", Drug_Exposure.drug_source_concept_code, Drug_Exposure.drug_source_concept_name)
287 }
289 // patient, 1..1, Reference
290 if (Drug_Exposure.person_id) {
291 patient: Reference("Patient", Drug_Exposure.person_id)
292 }
294 // encounter, 0..1, Reference
295 if (Drug_Exposure.visit_occurrence_id) {
296 encounter: Reference("Encounter", Drug_Exposure.visit_occurrence_id)
297 }
299 // occurrence[x], 1..1
301 if context.config.output.phi = "yes" {
302 occurrenceDateTime: ReformatDatetimeDate(Drug_Exposure.drug_exposure_start_datetime, Drug_Exposure.drug_exposure_start_date)
303 } else {
304 occurrenceDateTime: ReformatDatetime("2030-01-01")
305 }
307 recorded: ""
309 // primarySource, 1..1, boolean
310 primarySource: true
312 reportOrigin: ""
313 location: ""
314 manufacturer: ""
316 //lotNumber, 0..1, string
317 lotNumber: Drug_Exposure.lot_number
319 expirationDate: ""
320 site: ""
322 // route, 0..1, CodeableConcept
323 if Drug_Exposure.route_source_value {
324 route.text: Drug_Exposure.route_source_value
325 }
326 if(Drug_Exposure.route_concept_id and Drug_Exposure.route_concept_id ~= "0") {
327 route.coding[0].system: Code_System(Drug_Exposure.route_vocabulary_id)
328 route.coding[0].code: Drug_Exposure.route_concept_code
329 route.coding[0].display: Drug_Exposure.route_concept_name
330 }
332 // doseQuantity, 0..1, SimpleQuantity
333 if(Drug_Exposure.quantity) {
334 doseQuantity.value: $ParseFloat(Drug_Exposure.quantity)
335 }
336 doseQuantity.unit: Drug_Exposure.dose_unit_source_value
338 performer: ""
339 note: ""
340 reasonCode: ""
341 reasonReference: ""
342 isSubpotent: ""
343 subpotentReason: ""
344 education: ""
345 programEligibility: ""
346 fundingSource: ""
347 reaction: ""
352//-----------------------------------------------------------------------------
353// MedicationAdministration - FHIR Core
354//-----------------------------------------------------------------------------
355def Drug_Exposure_MedicationAdministration(Drug_Exposure, required context, required medicationID) {
357 // MedicationAdministration Resource
358 resourceType: "MedicationAdministration"
360 // id, 0..1, id
361 id: Drug_Exposure.drug_exposure_id
363 meta: ""
364 implicitRules: ""
365 language: "en-US"
366 text: ""
367 contained: ""
368 extension: ""
369 modifierExtension: ""
371 // identifier, 0..*, Identifier
372 identifier[0].use: "secondary";
373 identifier[0].system: Code_System("HDC")
374 identifier[0].value: Drug_Exposure.drug_exposure_id
376 instantiates: ""
377 partOf: ""
379 // status, 1..1, code
380 if (Drug_Exposure.stop_reason) {
381 status: "stopped"
382 statusReason.text: Drug_Exposure.stop_reason
383 } else {
384 if (Drug_Exposure.drug_exposure_end_date or Drug_Exposure.drug_exposure_end_datetime) {
385 status: "completed"
386 } else {
387 status: "in-progress"
388 }
389 }
391 category: ""
393 // medication[x], 1..1
394 medicationReference: Reference("Medication", medicationID)
396 // subject, 1..1, Reference
397 if (Drug_Exposure.person_id) {
398 subject: Reference("Patient", Drug_Exposure.person_id)
399 }
401 // context, 0..1, Reference
402 if (Drug_Exposure.visit_occurrence_id) {
403 context: Reference("Encounter", Drug_Exposure.visit_occurrence_id)
404 }
406 supportingInformation: ""
408 // effective[x], 1..1
409 if context.config.output.phi = "yes" {
410 if(Drug_Exposure.drug_exposure_start_date = Drug_Exposure.drug_exposure_end_date) {
411 effectiveDateTime: ReformatDatetimeDate(Drug_Exposure.drug_exposure_start_datetime, Drug_Exposure.drug_exposure_start_date)
412 } else {
413 effectivePeriod.start: ReformatDatetimeDate(Drug_Exposure.drug_exposure_start_datetime, Drug_Exposure.drug_exposure_start_date)
414 effectivePeriod.end: ReformatDatetimeDate(Drug_Exposure.drug_exposure_end_datetime, Drug_Exposure.drug_exposure_end_date)
415 }
416 } else {
417 if(Drug_Exposure.drug_exposure_start_date = Drug_Exposure.drug_exposure_end_date) {
418 effectiveDateTime: ReformatDatetime("2030-01-01")
419 } else {
420 effectivePeriod.start: ReformatDatetime("2030-01-01")
421 effectivePeriod.end: ReformatDatetime("2030-01-01")
422 }
423 }
425 // performer, 0..*, BackboneElement
426 // actor, 1..1, Reference(Practitioner)
427 performer[].actor: Reference("Practitioner", Drug_Exposure.provider_id)
429 reasonCode: ""
430 reasonReference: ""
431 request: ""
432 device: ""
433 note: ""
435 // dosage, 0..1, BackboneElement
436 // text, 0..1, string
437 if Drug_Exposure.sig {
438 dosage.text: Drug_Exposure.sig
439 }
442 // route, 0..1, CodeableConcept
443 if Drug_Exposure.route_source_value {
444 dosage.route.text: Drug_Exposure.route_source_value
445 }
446 if( Drug_Exposure.route_concept_id and Drug_Exposure.route_concept_id ~= "0") {
447 var coding.system: Code_System(Drug_Exposure.route_vocabulary_id)
448 var coding.code: Drug_Exposure.route_concept_code
449 var coding.display: Drug_Exposure.route_concept_name
450 dosage.route.coding[]: coding
451 }
453 // dose, 0..1, SimpleQuantity
454 if(Drug_Exposure.quantity) {
455 dosage.dose.value: $ParseFloat(Drug_Exposure.quantity)
456 }
458 if Drug_Exposure.dose_unit_source_value {
459 dosage.dose.unit: Drug_Exposure.dose_unit_source_value
460 }
463 rateRatio: ""
464 rateQuantity: ""
465 eventHistory: ""
470//-----------------------------------------------------------------------------
471// MedicationDispense - FHIR Core
472//-----------------------------------------------------------------------------
473def Drug_Exposure_MedicationDispense(Drug_Exposure, required context, required medicationID) {
475 // MedicationDispense Resource
476 resourceType: "MedicationDispense"
478 // id, 0..1, id
479 id: Drug_Exposure.drug_exposure_id
481 meta: ""
482 implicitRules: ""
483 language: "en-US"
484 text: ""
485 contained: ""
486 extension: ""
487 modifierExtension: ""
489 // identifier, 0..*, Identifier
490 identifier[0].use: "secondary";
491 identifier[0].system: Code_System("HDC")
492 identifier[0].value: Drug_Exposure.drug_exposure_id
494 partOf: ""
496 // status, 1..1, code
497 if (Drug_Exposure.stop_reason) {
498 status: "stopped"
499 statusReason.text: Drug_Exposure.stop_reason
500 } else {
501 if (Drug_Exposure.drug_exposure_end_date or Drug_Exposure.drug_exposure_end_datetime) {
502 status: "completed"
503 } else {
504 status: "in-progress"
505 }
506 }
508 category: ""
510 // medication[x], 1..1
511 medicationReference: Reference("Medication", medicationID)
513 // subject, 1..1, Reference
514 if (Drug_Exposure.person_id) {
515 subject: Reference("Patient", Drug_Exposure.person_id)
516 }
518 // context, 0..1, Reference
519 if (Drug_Exposure.visit_occurrence_id) {
520 context: Reference("Encounter", Drug_Exposure.visit_occurrence_id)
521 }
523 supportingInformation: ""
525 // performer, 0..*, BackboneElement
526 // actor, 1..1, Reference(Practitioner)
527 performer[].actor: Reference("Practitioner", Drug_Exposure.provider_id)
529 location: ""
530 authorizingPrescription: ""
531 type: ""
533 // quantity 0..1, SimpleQuantity
534 if(Drug_Exposure.quantity) {
535 quantity.value: $ParseFloat(Drug_Exposure.quantity)
536 }
538 // daysSupply, 0..1, SimpleQuantity
539 if(Drug_Exposure.days_supply) {
540 daysSupply.value: $ParseFloat(Drug_Exposure.days_supply)
541 daysSupply.code: "d"
542 daysSupply.system: "http://unitsofmeasure.org"
543 }
545 whenPrepared: ""
547 // whenHandedOver, 0..1, dateTime
548 if context.config.output.phi = "yes" {
549 whenHandedOver: ReformatDatetimeDate(Drug_Exposure.drug_exposure_start_datetime, Drug_Exposure.drug_exposure_start_date)
550 } else {
551 whenHandedOver: ReformatDatetime("2030-01-01")
552 }
554 destination: ""
555 receiver: ""
556 note: ""
558 // dosage, 0..1, BackboneElement
559 // text, 0..1, string
560 if Drug_Exposure.sig {
561 var dosage.text: Drug_Exposure.sig
562 }
565 // route, 0..1, CodeableConcept
566 if Drug_Exposure.route_source_value {
567 var dosage.route.text: Drug_Exposure.route_source_value
568 }
569 if(Drug_Exposure.route_concept_id and Drug_Exposure.route_concept_id ~= "0") {
571 var coding.system: Code_System(Drug_Exposure.route_vocabulary_id)
572 var coding.code: Drug_Exposure.route_concept_code
573 var coding.display: Drug_Exposure.route_concept_name
574 var dosage.route.coding[]: coding
575 }
577 if Drug_Exposure.dose_unit_source_value {
578 var dosage.doseAndRate[].doseQuantity.unit: Drug_Exposure.dose_unit_source_value
579 }
582 dosageInstruction[]: dosage
583 substitution: ""
584 detectedIssue: ""
585 eventHistory: ""
590//-----------------------------------------------------------------------------
591// MedicationStatement - FHIR Core
592// INCOMPLETE - Do Not Use
593//-----------------------------------------------------------------------------
594def DO_NOT_USE_Drug_Exposure_MedicationStatement(Drug_Exposure, required context, required medicationID) {
596 // MedicationStatement Resource
597 resourceType: "MedicationStatement"
599 // id, 0..1, id
600 id: Drug_Exposure.drug_exposure_id
602 // identifier, 0..*, Identifier
603 identifier[0].use: "secondary";
604 identifier[0].system: Code_System("HDC")
605 identifier[0].value: Drug_Exposure.drug_exposure_id
607 basedOn: ""
608 partOf: ""
610 // status, 1..1, code
611 if (Drug_Exposure.stop_reason) {
612 status: "stopped"
613 statusReason[0].text: Drug_Exposure.stop_reason
614 } else {
615 if (Drug_Exposure.drug_exposure_end_date or Drug_Exposure.drug_exposure_end_datetime) {
616 status: "completed"
617 } else {
618 status: "in-progress"
619 }
620 }
622 // category, 0..1, CodeableConcept
623 category.text: "patientspecified"
624 category.coding[0].system: "http://hl7.org/fhir/ValueSet/medication-statement-category"
625 category.coding[0].code: "patientspecified"
626 category.coding[0].display: "Patient Specified"
627 category.coding[0].userSelected: true
629 // medication[x], 1..1
630 if (Drug_Exposure.lot_number) {
631 medicationReference: Reference("Medication", Drug_Exposure.drug_concept_id)
632 } else {
633 medicationCodeableConcept.coding[]: CodingSelected(Code_System(Drug_Exposure.drug_concept_vocabulary_id), "", Drug_Exposure.drug_concept_code, Drug_Exposure.drug_concept_name, true)
635 if (Drug_Exposure.drug_concept_code ~= Drug_Exposure.drug_source_concept_code) {
636 medicationCodeableConcept.coding[]: CodingSelected(Code_System(Drug_Exposure.drug_source_vocabulary_id), "", Drug_Exposure.drug_source_concept_code, Drug_Exposure.drug_source_concept_name, true)
637 }
639 }
641 // subject, 1..1, Reference
642 if (Drug_Exposure.person_id) {
643 subject: Reference("Patient", Drug_Exposure.person_id)
644 }
646 // context, 0..1, Reference
647 if (Drug_Exposure.visit_occurrence_id) {
648 context: Reference("Encounter", Drug_Exposure.visit_occurrence_id)
649 }
651 // effective[x], 1..1
652 effectiveDateTime: ""
653 if context.config.output.phi = "yes" {
654 effectivePeriod.start: ReformatDatetimeDate(Drug_Exposure.drug_exposure_start_datetime, Drug_Exposure.drug_exposure_start_date)
655 effectivePeriod.end: ReformatDatetimeDate(Drug_Exposure.drug_exposure_end_datetime, Drug_Exposure.drug_exposure_end_date)
656 } else {
657 effectivePeriod.start: ReformatDatetime("2030-01-01")
658 effectivePeriod.end: ReformatDatetime("2030-01-01")
659 }
661 dateAsserted: ""
663 // informationSource, 0..1, Reference
664 informationSource: Reference("Patient", Drug_Exposure.person_id)
665 informationSource.display: Drug_Exposure.person_id
666 informationSource.identifier.use: "secondary"
668 derivedFrom: ""
669 reasonCode: ""
670 reasonReference: ""
671 note: ""
673 // dosage, 0..*, dosage
674 // text, 0..1, string
675 if Drug_Exposure.sig {
676 dosage[0].text: Drug_Exposure.sig
677 }
679 // route, 0..1, CodeableConcept
680 if Drug_Exposure.route_source_value {
681 dosage[0].route.text: Drug_Exposure.route_source_value
682 }
683 dosage[0].route.coding[0].system: Code_System(Drug_Exposure.route_vocabulary_id)
684 dosage[0].route.coding[0].code: Drug_Exposure.route_concept_code
685 dosage[0].route.coding[0].display: Drug_Exposure.route_concept_name
687 // dose[x], 0..1
688 if (Drug_Exposure.quantity and Drug_Exposure.dose_unit_source_value) {
689 dosage[0].doseAndRate[0].doseQuantity.value: Drug_Exposure.quantity
690 dosage[0].doseAndRate[0].doseQuantity.unit: Drug_Exposure.dose_unit_source_value
691 }