description: Indicates that a medication is to be or has been dispensed for a named patient package_name: ca.on.ehr.r4 derivation: constraint name: MedicationDispenseEHR type: MedicationDispense elements: category: type: CodeableConcept binding: {strength: required, valueSet: 'http://ontariohealth.ca/fhir/ehr/ValueSet/dispense-category'} mustSupport: true index: 13 elements: coding: index: 14 elements: system: {mustSupport: true, index: 15} required: [system] required: [coding] whenHandedOver: {mustSupport: true, index: 39} whenPrepared: {mustSupport: true, index: 38} meta: mustSupport: true index: 0 elements: source: {mustSupport: true, index: 1} medicationCodeableConcept: type: CodeableConcept choiceOf: medication index: 23 slicing: slices: medicationCodeableConcept: match: {} schema: {type: CodeableConcept, choiceOf: medication, index: 23} min: 0 max: 1 extension: mustSupport: true index: 2 slicing: rules: open ordered: false discriminator: - {path: url, type: value} min: null slices: DispenseRemainingRefills: match: {url: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-refills-remaining'} schema: type: Extension isModifier: false url: http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-refills-remaining index: 3 elements: url: pattern: {type: Uri, value: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-refills-remaining'} index: 4 DispenseRemainingQuantity: match: {url: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-quantity-remaining'} schema: type: Extension isModifier: false url: http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-quantity-remaining index: 5 elements: url: pattern: {type: Uri, value: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-quantity-remaining'} index: 6 DrugServiceCoverage: match: {url: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-drug-service-coverage'} schema: type: Extension isModifier: false url: http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-drug-service-coverage index: 7 elements: url: pattern: {type: Uri, value: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-drug-service-coverage'} index: 8 status: {mustSupport: true, index: 12} dosageInstruction: mustSupport: true index: 40 elements: site: type: CodeableConcept mustSupport: true index: 72 elements: coding: index: 73 elements: system: {index: 74} required: [system] asNeeded: mustSupport: true choices: [asNeededBoolean] index: 70 method: type: CodeableConcept mustSupport: true index: 78 elements: coding: {index: 79} patientInstruction: {mustSupport: true, index: 46} maxDosePerLifetime: mustSupport: true index: 159 elements: value: {mustSupport: true, index: 160} unit: {mustSupport: true, index: 161} system: {mustSupport: true, index: 162} code: {mustSupport: true, index: 163} maxDosePerAdministration: mustSupport: true index: 154 elements: value: {mustSupport: true, index: 155} unit: {mustSupport: true, index: 156} system: {mustSupport: true, index: 157} code: {mustSupport: true, index: 158} route: type: CodeableConcept mustSupport: true index: 75 elements: coding: binding: {strength: extensible, valueSet: 'https://fhir.infoway-inforoute.ca/ValueSet/routeofadministration'} mustSupport: true index: 76 elements: system: {index: 77} required: [system] required: [coding] asNeededBoolean: {type: boolean, mustSupport: true, choiceOf: asNeeded, index: 71} timing: mustSupport: true index: 47 elements: event: {mustSupport: true, index: 48} repeat: mustSupport: true index: 49 elements: frequencyMax: {mustSupport: true, index: 58} when: {mustSupport: true, index: 64} offset: {mustSupport: true, index: 65} periodUnit: binding: {strength: required, valueSet: 'http://hl7.org/fhir/ValueSet/units-of-time|4.0.0'} mustSupport: true index: 61 frequency: {mustSupport: true, index: 57} durationMax: {mustSupport: true, index: 55} duration: {mustSupport: true, index: 54} bounds: mustSupport: true choices: [] index: 51 durationUnit: {mustSupport: true, index: 56} dayOfWeek: {mustSupport: true, index: 62} count: {mustSupport: true, index: 52} periodMax: {mustSupport: true, index: 60} period: {mustSupport: true, index: 59} countMax: {mustSupport: true, index: 53} timeOfDay: {mustSupport: true, index: 63} code: type: CodeableConcept binding: {strength: extensible, valueSet: 'http://ontariohealth.ca/fhir/ehr/ValueSet/medication-repeat-pattern'} mustSupport: true index: 66 elements: coding: index: 67 elements: system: {index: 68} required: [system] additionalInstruction: type: CodeableConcept mustSupport: true index: 43 elements: coding: index: 44 elements: system: {index: 45} required: [system] sequence: {mustSupport: true, index: 41} maxDosePerPeriod: mustSupport: true index: 141 elements: numerator: mustSupport: true index: 142 elements: value: {mustSupport: true, index: 143} comparator: {mustSupport: true, index: 144} unit: {mustSupport: true, index: 145} system: {mustSupport: true, index: 146} code: {mustSupport: true, index: 147} denominator: mustSupport: true index: 148 elements: value: {mustSupport: true, index: 149} comparator: {mustSupport: true, index: 150} unit: {mustSupport: true, index: 151} system: {mustSupport: true, index: 152} code: {mustSupport: true, index: 153} doseAndRate: mustSupport: true index: 80 elements: dose[x]: elements: value: {mustSupport: true, index: 102} unit: {mustSupport: true, index: 103} system: {mustSupport: true, index: 104} code: {mustSupport: true, index: 105} rate[x]: elements: value: {mustSupport: true, index: 137} unit: {mustSupport: true, index: 138} system: {mustSupport: true, index: 139} code: {mustSupport: true, index: 140} doseRange: type: Range mustSupport: true choiceOf: dose index: 88 slicing: slices: doseRange: match: {} schema: {type: Range, mustSupport: true, choiceOf: dose, index: 88} min: 0 max: 1 rateRange: type: Range mustSupport: true choiceOf: rate index: 123 slicing: slices: rateRange: match: {} schema: {type: Range, mustSupport: true, choiceOf: rate, index: 123} min: 0 max: 1 doseQuantity: type: Quantity mustSupport: true choiceOf: dose index: 101 slicing: slices: doseQuantity: match: {} schema: {type: Quantity, mustSupport: true, choiceOf: dose, index: 101} min: 0 max: 1 dose: mustSupport: true choices: [doseQuantity] index: 100 slicing: slices: doseQuantity: match: {} schema: mustSupport: true choices: [doseQuantity] index: 100 min: 0 max: 1 type: type: CodeableConcept mustSupport: true index: 81 elements: coding: index: 82 elements: system: {index: 83} required: [system] rate: mustSupport: true choices: [rateQuantity] index: 135 slicing: slices: rateQuantity: match: {} schema: mustSupport: true choices: [rateQuantity] index: 135 min: 0 max: 1 rateRatio: type: Ratio mustSupport: true choiceOf: rate index: 110 slicing: slices: rateRatio: match: {} schema: {type: Ratio, mustSupport: true, choiceOf: rate, index: 110} min: 0 max: 1 rateQuantity: type: Quantity mustSupport: true choiceOf: rate index: 136 slicing: slices: rateQuantity: match: {} schema: {type: Quantity, mustSupport: true, choiceOf: rate, index: 136} min: 0 max: 1 text: {mustSupport: true, index: 42} required: [text] daysSupply: mustSupport: true index: 36 elements: value: {mustSupport: true, index: 37} required: [value] identifier: mustSupport: true array: true min: 1 max: 2 index: 9 elements: system: constraint: RX-system-id: {human: 'Original Rx Number value should be original Rx Number assigned by the pharmacy system on the first fill and should be the following formats: [id-system-local-base]/ca-on-pharmacy-[Pharmacy ID]-original-rx-number or [id-system-local-base]/ca-on-pharmacy-[Pharmacy ID]-current-rx-number', source: 'http://ontariohealth.ca/fhir/ehr/StructureDefinition/profile-medicationDispense', severity: error, expression: '$this.matches(''http://ehealthontario.ca/fhir/NamingSystem/ca-on-pharmacy-[0-9]{1,9}(?:-original-rx-number|-current-rx-number)'')'} mustSupport: true index: 10 value: {mustSupport: true, index: 11} required: [value, system] medicationReference: refers: ['http://ontariohealth.ca/fhir/ehr/StructureDefinition/profile-medication'] type: Reference mustSupport: true choiceOf: medication index: 20 slicing: slices: medicationReference: match: {} schema: refers: ['http://ontariohealth.ca/fhir/ehr/StructureDefinition/profile-medication'] type: Reference mustSupport: true choiceOf: medication index: 20 min: 0 max: 1 quantity: binding: {strength: extensible, valueSet: 'https://fhir.infoway-inforoute.ca/ValueSet/prescribedquantityunit'} mustSupport: true index: 31 elements: value: {mustSupport: true, index: 32} unit: {mustSupport: true, index: 33} system: {mustSupport: true, index: 34} code: {mustSupport: true, index: 35} required: [value] authorizingPrescription: type: Reference mustSupport: true refers: ['http://ontariohealth.ca/fhir/ehr/StructureDefinition/profile-medicationRequest'] index: 29 elements: reference: {mustSupport: true, index: 30} required: [reference] subject: type: Reference mustSupport: true refers: ['http://ontariohealth.ca/fhir/ehr/StructureDefinition/profile-patient'] index: 24 elements: reference: {mustSupport: true, index: 25} required: [reference] performer: mustSupport: true index: 26 elements: actor: type: Reference mustSupport: true refers: ['http://ontariohealth.ca/fhir/ehr/StructureDefinition/profile-practitionerRole'] index: 27 elements: reference: {mustSupport: true, index: 28} required: [reference] medication: choices: [medicationCodeableConcept] index: 22 slicing: slices: medicationCodeableConcept: match: {} schema: choices: [medicationCodeableConcept] index: 22 min: 0 max: 1 package_version: 1.0.0-snapshot3 extensions: DispenseRemainingRefills: url: http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-refills-remaining type: Extension isModifier: false index: 3 elements: url: pattern: {type: Uri, value: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-refills-remaining'} index: 4 DispenseRemainingQuantity: url: http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-quantity-remaining type: Extension isModifier: false index: 5 elements: url: pattern: {type: Uri, value: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-quantity-remaining'} index: 6 DrugServiceCoverage: url: http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-drug-service-coverage type: Extension isModifier: false index: 7 elements: url: pattern: {type: Uri, value: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-drug-service-coverage'} index: 8 class: profile kind: resource url: http://ontariohealth.ca/fhir/ehr/StructureDefinition/profile-medicationDispense base: http://hl7.org/fhir/StructureDefinition/MedicationDispense version: 1.0.0 required: [whenPrepared, identifier, subject, meta]