PackagesCanonicalsLogsProblems
    Packages
    ca.on.oh-dhdr@4.0.2-alpha1.0.1
    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.on.oh-dhdr
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: 44}
  whenPrepared: {mustSupport: true, index: 43}
  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: 45
    elements:
      text: {mustSupport: true, index: 46}
      patientInstruction: {mustSupport: true, index: 47}
      timing:
        mustSupport: true
        index: 48
        elements:
          repeat:
            mustSupport: true
            index: 49
            elements:
              frequency: {mustSupport: true, index: 50}
              period: {mustSupport: true, index: 51}
              periodMax: {mustSupport: true, index: 52}
              periodUnit:
                binding: {strength: required, valueSet: 'http://hl7.org/fhir/ValueSet/units-of-time|4.0.0'}
                mustSupport: true
                index: 53
            required: [periodUnit, period, frequency]
        required: [repeat]
      asNeeded:
        mustSupport: true
        choices: [asNeededBoolean]
        index: 55
      asNeededBoolean: {type: boolean, mustSupport: true, choiceOf: asNeeded, index: 56}
      route:
        mustSupport: true
        index: 57
        elements:
          coding:
            binding: {strength: required, valueSet: 'https://terminology.hl7.org/CodeSystem/v3-RouteOfAdministration'}
            mustSupport: true
            index: 58
            elements:
              system: {mustSupport: true, index: 59}
              code: {mustSupport: true, index: 60}
            required: [system, code]
          text: {mustSupport: true, index: 61}
        required: [coding]
      doseAndRate:
        mustSupport: true
        index: 62
        elements:
          dose:
            mustSupport: true
            choices: [doseQuantity]
            index: 64
          doseQuantity: {type: Quantity, mustSupport: true, choiceOf: dose, index: 65}
          dose[x]:
            elements:
              value: {mustSupport: true, index: 66}
              unit: {mustSupport: true, index: 67}
              system: {mustSupport: true, index: 68}
              code:
                binding: {strength: required, valueSet: 'https://fhir.infoway-inforoute.ca/ValueSet/prescribedquantityunit'}
                mustSupport: true
                index: 69
            required: [value]
  daysSupply:
    mustSupport: true
    index: 41
    elements:
      value: {index: 42}
    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
    refers: ['http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-consumer-profile-Medication']
    index: 23
  quantity:
    mustSupport: true
    index: 36
    elements:
      value: {mustSupport: true, index: 37}
      unit: {mustSupport: true, index: 38}
      system: {mustSupport: true, index: 39}
      code:
        binding: {strength: required, valueSet: 'https://tgateway.infoway-inforoute.ca/vs/prescribedquantityunit'}
        mustSupport: true
        index: 40
    required: [value]
  authorizingPrescription:
    type: Reference
    mustSupport: true
    refers: ['http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-consumer-profile-MedicationRequest']
    index: 34
    elements:
      reference: {mustSupport: true, index: 35}
    required: [reference]
  subject:
    type: Reference
    mustSupport: true
    refers: ['http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-consumer-profile-Patient-dispense']
    index: 25
    elements:
      reference: {mustSupport: true, index: 26}
    required: [reference]
  performer:
    mustSupport: true
    array: true
    max: 2
    index: 27
    slicing:
      rules: open
      discriminator:
      - {path: actor.reference, type: value}
      min: null
      max: 2
      slices:
        performerOrganization:
          match:
            actor: {reference: null}
          schema:
            mustSupport: true
            index: 28
            elements:
              actor:
                type: Reference
                mustSupport: true
                refers: ['http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-consumer-profile-Organization-dispenser']
                index: 29
                elements:
                  reference: {mustSupport: true, index: 30}
                required: [reference]
        performerPractitioner:
          match:
            actor: {reference: null}
          schema:
            mustSupport: true
            index: 31
            elements:
              actor:
                type: Reference
                mustSupport: true
                refers: ['http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-consumer-profile-Practitioner-dispenser']
                index: 32
                elements:
                  reference: {mustSupport: true, index: 33}
                required: [reference]
  medication:
    mustSupport: true
    choices: [medicationReference]
    index: 22
package_version: 4.0.2-alpha1.0.1
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]