description: Definition of the medication dispense for the medication dispense document package_name: ch.fhir.ig.ch derivation: constraint name: CHEMEDMedicationDispense type: MedicationDispense elements: whenHandedOver: {index: 21} substitution: constraint: ch-emed-dis-1: {human: 'If no substitution was performed, no type is expected.', source: 'http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-medicationdispense', severity: error, expression: wasSubstituted = true or (wasSubstituted = false and type.exists().not())} index: 25 elements: wasSubstituted: {short: Whether a substitution was (true) or was not (false) performed on the dispense, index: 26} type: short: If 'wasSubstituted = true', the type can be defined in addition (optional). If 'wasSubstituted = false', no type is expected. binding: {strength: required, valueSet: 'http://fhir.ch/ig/ch-emed/ValueSet/ActSubstanceAdminSubstitutionCode'} index: 27 extension: index: 1 slicing: rules: open discriminator: - {path: url, type: value} min: null slices: treatmentReason: match: {url: null} schema: {type: Extension, short: Treatment reason, url: 'http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-treatmentreason', index: 2} min: 0 max: 1 prescription: match: {url: null} schema: {type: Extension, short: Reference to the medication prescription, url: 'http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-prescription', index: 3} min: 0 max: 1 pharmaceuticalAdvice: match: {url: null} schema: {type: Extension, short: Reference to the pharmaceutical advice, url: 'http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-pharmaceuticaladvice', index: 4} min: 0 max: 1 treatmentPlan: match: {url: null} schema: {type: Extension, short: Reference to the medication treatment plan, url: 'http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-treatmentplan', index: 5} min: 0 max: 1 contained: {index: 0} status: pattern: {type: Code, value: completed} index: 9 dosageInstruction: short: How the medication should be taken index: 22 slicing: rules: closed discriminator: - {path: $this, type: profile} min: 1 slices: baseEntry: match: {} schema: {type: Dosage, short: Base entry of the dosage instruction, _required: true, index: 23} min: 1 max: 1 additionalEntry: match: {} schema: {type: Dosage, short: Additional entry of the dosage instruction, array: true, index: 24} min: 0 identifier: short: MedicationDispense Identifier index: 6 elements: system: pattern: {type: Uri, value: 'urn:ietf:rfc:3986'} index: 7 value: {short: Identifier value as UUID, index: 8} required: [value, system] medicationReference: short: Reference to the contained medication refers: ['http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-medication-medicationdispense'] type: Reference choiceOf: medication index: 14 slicing: slices: medicationReference: match: {} schema: short: Reference to the contained medication refers: ['http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-medication-medicationdispense'] type: Reference choiceOf: medication index: 14 min: 0 max: 1 quantity: {short: Number of packages, index: 20} subject: type: Reference short: Patient refers: ['http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-patient'] index: 15 elements: reference: {index: 16} required: [reference] performer: index: 17 elements: actor: type: Reference short: The author of the medical decision, see also 'Guidance - Authorship' refers: ['http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-practitionerrole'] index: 18 elements: reference: {index: 19} required: [reference] medication: choices: [] index: 11 slicing: rules: open ordered: false discriminator: - {path: $this, type: type} min: null slices: medicationReference: match: {} schema: short: Reference to the contained medication choices: [medicationReference] index: 13 min: 0 max: 1 package_version: emed-4.0.0 extensions: treatmentReason: {url: 'http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-treatmentreason', min: 0, max: 1, type: Extension, short: Treatment reason, index: 2} prescription: {url: 'http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-prescription', min: 0, max: 1, type: Extension, short: Reference to the medication prescription, index: 3} pharmaceuticalAdvice: {url: 'http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-pharmaceuticaladvice', min: 0, max: 1, type: Extension, short: Reference to the pharmaceutical advice, index: 4} treatmentPlan: {url: 'http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-ext-treatmentplan', min: 0, max: 1, type: Extension, short: Reference to the medication treatment plan, index: 5} class: profile kind: resource url: http://fhir.ch/ig/ch-emed/StructureDefinition/ch-emed-medicationdispense base: http://hl7.org/fhir/StructureDefinition/MedicationDispense version: 4.0.0 required: [dosageInstruction, quantity, whenHandedOver, identifier, contained, performer]