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 note: mustSupport: true index: 40 elements: text: {mustSupport: true, index: 41} 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'} type: uri 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'} type: uri 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'} type: uri index: 8 status: {mustSupport: true, index: 12} dosageInstruction: mustSupport: true index: 42 elements: site: type: CodeableConcept mustSupport: true index: 74 elements: coding: index: 75 elements: system: {index: 76} required: [system] asNeeded: mustSupport: true choices: [asNeededBoolean] index: 72 method: type: CodeableConcept mustSupport: true index: 80 elements: coding: {index: 81} patientInstruction: {mustSupport: true, index: 48} maxDosePerLifetime: mustSupport: true index: 161 elements: value: {mustSupport: true, index: 162} unit: {mustSupport: true, index: 163} system: {mustSupport: true, index: 164} code: {mustSupport: true, index: 165} maxDosePerAdministration: mustSupport: true index: 156 elements: value: {mustSupport: true, index: 157} unit: {mustSupport: true, index: 158} system: {mustSupport: true, index: 159} code: {mustSupport: true, index: 160} route: type: CodeableConcept mustSupport: true index: 77 elements: coding: binding: {strength: extensible, valueSet: 'https://fhir.infoway-inforoute.ca/ValueSet/routeofadministration'} mustSupport: true index: 78 elements: system: {index: 79} required: [system] required: [coding] asNeededBoolean: {type: boolean, mustSupport: true, choiceOf: asNeeded, index: 73} timing: mustSupport: true index: 49 elements: event: {mustSupport: true, index: 50} repeat: mustSupport: true index: 51 elements: frequencyMax: {mustSupport: true, index: 60} when: {mustSupport: true, index: 66} offset: {mustSupport: true, index: 67} periodUnit: binding: {strength: required, valueSet: 'http://hl7.org/fhir/ValueSet/units-of-time|4.0.0'} mustSupport: true index: 63 frequency: {mustSupport: true, index: 59} durationMax: {mustSupport: true, index: 57} duration: {mustSupport: true, index: 56} bounds: mustSupport: true choices: [] index: 53 durationUnit: {mustSupport: true, index: 58} dayOfWeek: {mustSupport: true, index: 64} count: {mustSupport: true, index: 54} periodMax: {mustSupport: true, index: 62} period: {mustSupport: true, index: 61} countMax: {mustSupport: true, index: 55} timeOfDay: {mustSupport: true, index: 65} code: type: CodeableConcept binding: {strength: extensible, valueSet: 'http://ontariohealth.ca/fhir/ehr/ValueSet/medication-repeat-pattern'} mustSupport: true index: 68 elements: coding: index: 69 elements: system: {index: 70} required: [system] additionalInstruction: type: CodeableConcept mustSupport: true index: 45 elements: coding: index: 46 elements: system: {index: 47} required: [system] sequence: {mustSupport: true, index: 43} maxDosePerPeriod: mustSupport: true index: 143 elements: numerator: mustSupport: true index: 144 elements: value: {mustSupport: true, index: 145} comparator: {mustSupport: true, index: 146} unit: {mustSupport: true, index: 147} system: {mustSupport: true, index: 148} code: {mustSupport: true, index: 149} denominator: mustSupport: true index: 150 elements: value: {mustSupport: true, index: 151} comparator: {mustSupport: true, index: 152} unit: {mustSupport: true, index: 153} system: {mustSupport: true, index: 154} code: {mustSupport: true, index: 155} doseAndRate: mustSupport: true index: 82 elements: dose[x]: elements: value: {mustSupport: true, index: 104} unit: {mustSupport: true, index: 105} system: {mustSupport: true, index: 106} code: {mustSupport: true, index: 107} rate[x]: elements: value: {mustSupport: true, index: 139} unit: {mustSupport: true, index: 140} system: {mustSupport: true, index: 141} code: {mustSupport: true, index: 142} doseRange: type: Range mustSupport: true choiceOf: dose index: 90 slicing: slices: doseRange: match: {} schema: {type: Range, mustSupport: true, choiceOf: dose, index: 90} min: 0 max: 1 rateRange: type: Range mustSupport: true choiceOf: rate index: 125 slicing: slices: rateRange: match: {} schema: {type: Range, mustSupport: true, choiceOf: rate, index: 125} min: 0 max: 1 doseQuantity: type: Quantity mustSupport: true choiceOf: dose index: 103 slicing: slices: doseQuantity: match: {} schema: {type: Quantity, mustSupport: true, choiceOf: dose, index: 103} min: 0 max: 1 dose: mustSupport: true choices: [doseQuantity] index: 102 slicing: slices: doseQuantity: match: {} schema: mustSupport: true choices: [doseQuantity] index: 102 min: 0 max: 1 type: type: CodeableConcept mustSupport: true index: 83 elements: coding: index: 84 elements: system: {index: 85} required: [system] rate: mustSupport: true choices: [rateQuantity] index: 137 slicing: slices: rateQuantity: match: {} schema: mustSupport: true choices: [rateQuantity] index: 137 min: 0 max: 1 rateRatio: type: Ratio mustSupport: true choiceOf: rate index: 112 slicing: slices: rateRatio: match: {} schema: {type: Ratio, mustSupport: true, choiceOf: rate, index: 112} min: 0 max: 1 rateQuantity: type: Quantity mustSupport: true choiceOf: rate index: 138 slicing: slices: rateQuantity: match: {} schema: {type: Quantity, mustSupport: true, choiceOf: rate, index: 138} min: 0 max: 1 text: {mustSupport: true, index: 44} 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: [system, value] 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-snapshot6 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'} type: uri 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'} type: uri 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'} type: uri 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: [identifier, meta, subject, whenPrepared]