PackagesCanonicalsLogsProblems
    Packages
    ca@on-dhdr-r4.v09-0.9.0
    http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-consumer-profile-MedicationDispense
description: Indicates that a medication is to be or has been dispensed for a named patient
package_name: ca
derivation: constraint
name: MedicationDispense
type: MedicationDispense
elements:
  category:
    binding: {strength: required, valueSet: 'https://fhir.infoway-inforoute.ca/ValueSet/medicationdispensecategory'}
    mustSupport: true
    index: 16
    elements:
      coding:
        mustSupport: true
        index: 17
        elements:
          system:
            pattern: {type: Uri, value: 'http://ehealthontario.ca/fhir/NamingSystem/ca-on-medication-dispense-category'}
            mustSupport: true
            index: 18
          code: {mustSupport: true, index: 19}
          display: {mustSupport: true, index: 20}
        required: [display, system, code]
    required: [coding]
  whenHandedOver: {mustSupport: true, index: 43}
  whenPrepared: {mustSupport: true, index: 42}
  meta:
    mustSupport: true
    index: 1
    elements:
      lastUpdated: {mustSupport: true, index: 2}
      source: {mustSupport: true, index: 3}
  medication[x]:
    elements:
      reference: {mustSupport: true, index: 24}
    required: [reference]
  extension:
    index: 9
    slicing:
      rules: open
      discriminator:
      - {path: url, type: value}
      min: 0
      slices:
        DispenseRemainingRefills:
          match: {url: null}
          schema: {type: Extension, url: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-refills-remaining', index: 10}
          min: 0
          max: 1
        DispenseRemainingQuantity:
          match: {url: null}
          schema: {type: Extension, url: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-quantity-remaining', index: 11}
          min: 0
          max: 1
  contained:
    type: Resource
    mustSupport: true
    index: 4
    elements:
      id: {mustSupport: true, index: 5}
      meta:
        mustSupport: true
        index: 6
        elements:
          lastUpdated: {mustSupport: true, index: 7}
          source: {mustSupport: true, index: 8}
  status: {mustSupport: true, index: 15}
  id: {mustSupport: true, index: 0}
  dosageInstruction:
    mustSupport: true
    index: 44
    elements:
      text: {mustSupport: true, index: 45}
      patientInstruction: {mustSupport: true, index: 46}
      timing:
        mustSupport: true
        index: 47
        elements:
          repeat:
            mustSupport: true
            index: 48
            elements:
              frequency: {mustSupport: true, index: 49}
              period: {mustSupport: true, index: 50}
              periodMax: {mustSupport: true, index: 51}
              periodUnit:
                binding: {strength: required, valueSet: 'http://hl7.org/fhir/ValueSet/units-of-time|4.0.0'}
                mustSupport: true
                index: 52
            required: [periodUnit, period, frequency]
        required: [repeat]
      asNeeded:
        mustSupport: true
        choices: [asNeededBoolean]
        index: 54
      asNeededBoolean: {type: boolean, mustSupport: true, choiceOf: asNeeded, index: 55}
      route:
        mustSupport: true
        index: 56
        elements:
          coding:
            binding: {strength: required, valueSet: 'https://terminology.hl7.org/CodeSystem/v3-RouteOfAdministration'}
            mustSupport: true
            index: 57
            elements:
              system: {mustSupport: true, index: 58}
              code: {mustSupport: true, index: 59}
            required: [system, code]
          text: {mustSupport: true, index: 60}
        required: [coding]
      doseAndRate:
        mustSupport: true
        index: 61
        elements:
          dose:
            mustSupport: true
            choices: [doseQuantity]
            index: 63
          doseQuantity: {type: Quantity, mustSupport: true, choiceOf: dose, index: 64}
          dose[x]:
            elements:
              value: {mustSupport: true, index: 65}
              unit: {mustSupport: true, index: 66}
              system: {mustSupport: true, index: 67}
              code:
                binding: {strength: required, valueSet: 'https://fhir.infoway-inforoute.ca/ValueSet/prescribedquantityunit'}
                mustSupport: true
                index: 68
            required: [value]
  daysSupply:
    mustSupport: true
    index: 40
    elements:
      value: {index: 41}
    required: [value]
  identifier:
    mustSupport: true
    index: 12
    elements:
      system: {mustSupport: true, index: 13}
      value: {mustSupport: true, index: 14}
    required: [value]
  medicationReference: {type: Reference, mustSupport: true, choiceOf: medication, index: 23}
  quantity:
    mustSupport: true
    index: 35
    elements:
      value: {mustSupport: true, index: 36}
      unit: {mustSupport: true, index: 37}
      system: {mustSupport: true, index: 38}
      code:
        binding: {strength: required, valueSet: 'https://tgateway.infoway-inforoute.ca/vs/prescribedquantityunit'}
        mustSupport: true
        index: 39
    required: [value]
  authorizingPrescription:
    type: Reference
    mustSupport: true
    refers: ['http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-profile-MedicationRequest']
    index: 33
    elements:
      reference: {mustSupport: true, index: 34}
    required: [reference]
  subject:
    type: Reference
    mustSupport: true
    refers: ['http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-profile-Patient-dispense']
    index: 25
    elements:
      reference: {mustSupport: true, index: 26}
    required: [reference]
  performer:
    mustSupport: true
    array: true
    max: 2
    index: 27
    elements:
      actor:
        mustSupport: true
        index: 28
        slicing:
          rules: open
          discriminator:
          - {path: reference, type: value}
          min: null
          slices:
            performerOrganization:
              match: {reference: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-profile-Organization-dispenser'}
              schema:
                type: Reference
                mustSupport: true
                refers: ['http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-profile-Organization-dispenser']
                index: 29
                elements:
                  reference:
                    pattern: {type: String, value: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-profile-Organization-dispenser'}
                    mustSupport: true
                    index: 30
                required: [reference]
            performerPractitioner:
              match: {reference: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-profile-Practitioner-dispenser'}
              schema:
                type: Reference
                mustSupport: true
                refers: ['http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-profile-Practitioner-dispenser']
                index: 31
                elements:
                  reference:
                    pattern: {type: String, value: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-profile-Practitioner-dispenser'}
                    index: 32
                required: [reference]
  medication:
    mustSupport: true
    choices: [medicationReference]
    index: 22
package_version: on-dhdr-r4.v09-0.9.0
extensions:
  DispenseRemainingRefills: {url: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-refills-remaining', min: 0, max: 1, type: Extension, index: 10}
  DispenseRemainingQuantity: {url: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-quantity-remaining', min: 0, max: 1, type: Extension, index: 11}
class: profile
kind: resource
url: http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-consumer-profile-MedicationDispense
base: http://hl7.org/fhir/StructureDefinition/MedicationDispense
version: 1.0.0
required: [whenPrepared, quantity, identifier, subject, contained]