description: Indicates that a medication is to be or has been dispensed for a named patient package_name: rs/ca.on.ehr.r4 derivation: constraint name: MedicationDispenseEHR type: MedicationDispense elements: category: type: CodeableConcept binding: {strength: required, valueSet: 'http://ehealthontario.ca/fhir/ValueSet/dhdr-dispense-category'} mustSupport: true index: 11 elements: coding: index: 12 elements: system: {mustSupport: true, index: 13} required: [system] required: [coding] whenHandedOver: {mustSupport: true, index: 37} whenPrepared: {mustSupport: true, index: 36} medicationCodeableConcept: type: CodeableConcept choiceOf: medication index: 21 slicing: slices: medicationCodeableConcept: match: {} schema: {type: CodeableConcept, choiceOf: medication, index: 21} min: 0 max: 1 extension: mustSupport: true index: 0 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: 1 elements: url: pattern: {type: uri, value: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-refills-remaining'} type: uri index: 2 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: 3 elements: url: pattern: {type: uri, value: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-quantity-remaining'} type: uri index: 4 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: 5 elements: url: pattern: {type: uri, value: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-drug-service-coverage'} type: uri index: 6 status: {mustSupport: true, index: 10} dosageInstruction: mustSupport: true index: 38 elements: site: type: CodeableConcept mustSupport: true index: 70 elements: coding: index: 71 elements: system: {index: 72} required: [system] asNeeded: mustSupport: true choices: [asNeededBoolean] index: 68 method: type: CodeableConcept mustSupport: true index: 76 elements: coding: {index: 77} patientInstruction: {mustSupport: true, index: 44} maxDosePerLifetime: mustSupport: true index: 157 elements: value: {mustSupport: true, index: 158} unit: {mustSupport: true, index: 159} system: {mustSupport: true, index: 160} code: {mustSupport: true, index: 161} maxDosePerAdministration: mustSupport: true index: 152 elements: value: {mustSupport: true, index: 153} unit: {mustSupport: true, index: 154} system: {mustSupport: true, index: 155} code: {mustSupport: true, index: 156} route: type: CodeableConcept mustSupport: true index: 73 elements: coding: binding: {strength: extensible, valueSet: 'https://fhir.infoway-inforoute.ca/ValueSet/routeofadministration'} mustSupport: true index: 74 elements: system: {index: 75} required: [system] required: [coding] asNeededBoolean: {type: boolean, mustSupport: true, choiceOf: asNeeded, index: 69} timing: mustSupport: true index: 45 elements: event: {mustSupport: true, index: 46} repeat: mustSupport: true index: 47 elements: frequencyMax: {mustSupport: true, index: 56} when: {mustSupport: true, index: 62} offset: {mustSupport: true, index: 63} periodUnit: binding: {strength: required, valueSet: 'http://hl7.org/fhir/ValueSet/units-of-time|4.0.0'} mustSupport: true index: 59 frequency: {mustSupport: true, index: 55} durationMax: {mustSupport: true, index: 53} duration: {mustSupport: true, index: 52} bounds: mustSupport: true choices: [] index: 49 durationUnit: {mustSupport: true, index: 54} dayOfWeek: {mustSupport: true, index: 60} count: {mustSupport: true, index: 50} periodMax: {mustSupport: true, index: 58} period: {mustSupport: true, index: 57} countMax: {mustSupport: true, index: 51} timeOfDay: {mustSupport: true, index: 61} code: type: CodeableConcept binding: {strength: extensible, valueSet: 'http://ehealthontario.ca/fhir/ValueSet/dhdr-medication-repeat-pattern'} mustSupport: true index: 64 elements: coding: index: 65 elements: system: {index: 66} required: [system] additionalInstruction: type: CodeableConcept mustSupport: true index: 41 elements: coding: index: 42 elements: system: {index: 43} required: [system] sequence: {mustSupport: true, index: 39} maxDosePerPeriod: mustSupport: true index: 139 elements: numerator: mustSupport: true index: 140 elements: value: {mustSupport: true, index: 141} comparator: {mustSupport: true, index: 142} unit: {mustSupport: true, index: 143} system: {mustSupport: true, index: 144} code: {mustSupport: true, index: 145} denominator: mustSupport: true index: 146 elements: value: {mustSupport: true, index: 147} comparator: {mustSupport: true, index: 148} unit: {mustSupport: true, index: 149} system: {mustSupport: true, index: 150} code: {mustSupport: true, index: 151} doseAndRate: mustSupport: true index: 78 elements: dose[x]: elements: value: {mustSupport: true, index: 100} unit: {mustSupport: true, index: 101} system: {mustSupport: true, index: 102} code: {mustSupport: true, index: 103} rate[x]: elements: value: {mustSupport: true, index: 135} unit: {mustSupport: true, index: 136} system: {mustSupport: true, index: 137} code: {mustSupport: true, index: 138} doseRange: type: Range mustSupport: true choiceOf: dose index: 86 slicing: slices: doseRange: match: {} schema: {type: Range, mustSupport: true, choiceOf: dose, index: 86} min: 0 max: 1 rateRange: type: Range mustSupport: true choiceOf: rate index: 121 slicing: slices: rateRange: match: {} schema: {type: Range, mustSupport: true, choiceOf: rate, index: 121} min: 0 max: 1 doseQuantity: type: Quantity mustSupport: true choiceOf: dose index: 99 slicing: slices: doseQuantity: match: {} schema: {type: Quantity, mustSupport: true, choiceOf: dose, index: 99} min: 0 max: 1 dose: mustSupport: true choices: [doseQuantity] index: 98 slicing: slices: doseQuantity: match: {} schema: mustSupport: true choices: [doseQuantity] index: 98 min: 0 max: 1 type: type: CodeableConcept mustSupport: true index: 79 elements: coding: index: 80 elements: system: {index: 81} required: [system] rate: mustSupport: true choices: [rateQuantity] index: 133 slicing: slices: rateQuantity: match: {} schema: mustSupport: true choices: [rateQuantity] index: 133 min: 0 max: 1 rateRatio: type: Ratio mustSupport: true choiceOf: rate index: 108 slicing: slices: rateRatio: match: {} schema: {type: Ratio, mustSupport: true, choiceOf: rate, index: 108} min: 0 max: 1 rateQuantity: type: Quantity mustSupport: true choiceOf: rate index: 134 slicing: slices: rateQuantity: match: {} schema: {type: Quantity, mustSupport: true, choiceOf: rate, index: 134} min: 0 max: 1 text: {mustSupport: true, index: 40} required: [text] daysSupply: mustSupport: true index: 34 elements: value: {mustSupport: true, index: 35} required: [value] identifier: mustSupport: true array: true min: 1 max: 2 index: 7 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: 8 value: {mustSupport: true, index: 9} required: [system, value] medicationReference: refers: ['http://ontariohealth.ca/fhir/ehr/StructureDefinition/profile-medication'] type: Reference mustSupport: true choiceOf: medication index: 18 slicing: slices: medicationReference: match: {} schema: refers: ['http://ontariohealth.ca/fhir/ehr/StructureDefinition/profile-medication'] type: Reference mustSupport: true choiceOf: medication index: 18 min: 0 max: 1 quantity: binding: {strength: extensible, valueSet: 'https://tgateway.infoway-inforoute.ca/vs/prescribedquantityunit'} mustSupport: true index: 29 elements: value: {mustSupport: true, index: 30} unit: {mustSupport: true, index: 31} system: {mustSupport: true, index: 32} code: {mustSupport: true, index: 33} required: [value] authorizingPrescription: type: Reference mustSupport: true refers: ['http://ontariohealth.ca/fhir/ehr/StructureDefinition/profile-medicationRequest'] index: 27 elements: reference: {mustSupport: true, index: 28} required: [reference] subject: type: Reference mustSupport: true refers: ['http://ontariohealth.ca/fhir/ehr/StructureDefinition/profile-patient'] index: 22 elements: reference: {mustSupport: true, index: 23} required: [reference] performer: mustSupport: true index: 24 elements: actor: type: Reference mustSupport: true refers: ['http://ontariohealth.ca/fhir/ehr/StructureDefinition/profile-practitionerRole'] index: 25 elements: reference: {mustSupport: true, index: 26} required: [reference] medication: choices: [medicationCodeableConcept] index: 20 slicing: slices: medicationCodeableConcept: match: {} schema: choices: [medicationCodeableConcept] index: 20 min: 0 max: 1 package_version: 1.0.0 extensions: DispenseRemainingRefills: url: http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-refills-remaining type: Extension isModifier: false index: 1 elements: url: pattern: {type: uri, value: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-refills-remaining'} type: uri index: 2 DispenseRemainingQuantity: url: http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-quantity-remaining type: Extension isModifier: false index: 3 elements: url: pattern: {type: uri, value: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-quantity-remaining'} type: uri index: 4 DrugServiceCoverage: url: http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-drug-service-coverage type: Extension isModifier: false index: 5 elements: url: pattern: {type: uri, value: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-drug-service-coverage'} type: uri index: 6 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, subject, whenPrepared]