PackagesCanonicalsLogsProblems
    Packages
    ca.on.oh-dhdr@4.0.2-alpha1.0.1
    http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-profile-MedicationDispense-submission
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: 'http://ehealthontario.ca/fhir/ValueSet/dhdr-dispense-category'}
    mustSupport: true
    index: 14
    elements:
      coding:
        mustSupport: true
        index: 15
        elements:
          system:
            pattern: {type: Uri, value: 'http://ehealthontario.ca/fhir/CodeSystem/dispense-category'}
            mustSupport: true
            index: 16
          code: {mustSupport: true, index: 17}
          display: {mustSupport: true, index: 18}
        required: [display, system, code]
    required: [coding]
  whenHandedOver: {mustSupport: true, index: 38}
  whenPrepared: {mustSupport: true, index: 37}
  meta:
    mustSupport: true
    index: 0
    elements:
      source: {mustSupport: true, index: 1}
      profile: {mustSupport: true, index: 2}
    required: [profile, source]
  medication[x]:
    elements:
      reference: {mustSupport: true, index: 22}
    required: [reference]
  extension:
    mustSupport: true
    index: 3
    slicing:
      slices:
        DispenseRemainingRefills:
          match: {}
          schema:
            type: Extension
            url: http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-refills-remaining
            index: 4
            elements:
              url:
                pattern: {type: Uri, value: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-refills-remaining'}
                index: 5
        DispenseRemainingQuantity:
          match: {}
          schema:
            type: Extension
            url: http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-quantity-remaining
            index: 6
            elements:
              url:
                pattern: {type: Uri, value: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-quantity-remaining'}
                index: 7
        DrugServiceCoverage:
          match: {}
          schema:
            type: Extension
            isModifier: false
            url: http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-drug-service-coverage
            index: 8
            elements:
              url:
                pattern: {type: Uri, value: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-drug-service-coverage'}
                index: 9
  status: {mustSupport: true, index: 13}
  dosageInstruction:
    mustSupport: true
    index: 39
    elements:
      site:
        mustSupport: true
        index: 77
        elements:
          coding:
            mustSupport: true
            index: 78
            elements:
              system: {mustSupport: true, index: 79}
              code: {mustSupport: true, index: 80}
              display: {mustSupport: true, index: 81}
            required: [display, system, code]
          text: {mustSupport: true, index: 82}
      asNeeded:
        mustSupport: true
        choices: [asNeededBoolean]
        index: 75
      method:
        mustSupport: true
        index: 88
        elements:
          coding:
            mustSupport: true
            index: 89
            elements:
              system: {mustSupport: true, index: 90}
              code: {mustSupport: true, index: 91}
              display: {mustSupport: true, index: 92}
            required: [display, system, code]
          text: {mustSupport: true, index: 93}
      patientInstruction: {mustSupport: true, index: 48}
      maxDosePerLifetime:
        mustSupport: true
        index: 127
        elements:
          value: {mustSupport: true, index: 128}
          unit: {mustSupport: true, index: 129}
          system: {mustSupport: true, index: 130}
          code: {mustSupport: true, index: 131}
        required: [value, unit, system, code]
      maxDosePerAdministration:
        mustSupport: true
        index: 122
        elements:
          value: {mustSupport: true, index: 123}
          unit: {mustSupport: true, index: 124}
          system: {mustSupport: true, index: 125}
          code: {mustSupport: true, index: 126}
        required: [value, unit, system, code]
      route:
        mustSupport: true
        index: 83
        elements:
          coding:
            binding: {strength: required, valueSet: 'https://fhir.infoway-inforoute.ca/ValueSet/routeofadministration'}
            mustSupport: true
            index: 84
            elements:
              system:
                pattern: {type: Uri, value: 'http://snomed.info/sct'}
                mustSupport: true
                index: 85
              code: {mustSupport: true, index: 86}
              display: {mustSupport: true, index: 87}
            required: [display, system, code]
        required: [coding]
      asNeededBoolean: {type: boolean, mustSupport: true, choiceOf: asNeeded, index: 76}
      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:
            binding: {strength: extensible, valueSet: 'http://ehealthontario.ca/fhir/ValueSet/dhdr-medication-repeat-pattern'}
            mustSupport: true
            index: 68
            elements:
              coding:
                mustSupport: true
                index: 69
                elements:
                  system:
                    pattern: {type: Uri, value: 'http://snomed.info/sct'}
                    mustSupport: true
                    index: 70
                  code: {mustSupport: true, index: 71}
                  display: {mustSupport: true, index: 72}
                required: [display, system, code]
              text: {mustSupport: true, index: 73}
      additionalInstruction:
        mustSupport: true
        index: 42
        elements:
          coding:
            mustSupport: true
            index: 43
            elements:
              system: {mustSupport: true, index: 44}
              code: {mustSupport: true, index: 45}
              display: {mustSupport: true, index: 46}
            required: [display, system, code]
          text: {mustSupport: true, index: 47}
      sequence: {mustSupport: true, index: 40}
      maxDosePerPeriod:
        mustSupport: true
        index: 109
        elements:
          numerator:
            mustSupport: true
            index: 110
            elements:
              value: {mustSupport: true, index: 111}
              comparator: {mustSupport: true, index: 112}
              unit: {mustSupport: true, index: 113}
              system: {mustSupport: true, index: 114}
              code: {mustSupport: true, index: 115}
            required: [value, unit, system, code]
          denominator:
            mustSupport: true
            index: 116
            elements:
              value: {mustSupport: true, index: 117}
              comparator: {mustSupport: true, index: 118}
              unit: {mustSupport: true, index: 119}
              system: {mustSupport: true, index: 120}
              code: {mustSupport: true, index: 121}
            required: [value, unit, system, code]
      doseAndRate:
        mustSupport: true
        index: 94
        elements:
          type:
            elements:
              coding:
                mustSupport: true
                index: 95
                elements:
                  system: {mustSupport: true, index: 96}
                  code: {mustSupport: true, index: 97}
                  display: {mustSupport: true, index: 98}
                required: [display, system, code]
              text: {mustSupport: true, index: 99}
          dose:
            mustSupport: true
            choices: [doseRange, doseQuantity]
            index: 101
          doseRange: {type: Range, mustSupport: true, choiceOf: dose, index: 102}
          doseQuantity: {type: Quantity, mustSupport: true, choiceOf: dose, index: 103}
          rate:
            mustSupport: true
            choices: [rateRatio, rateRange, rateQuantity]
            index: 105
          rateRatio: {type: Ratio, mustSupport: true, choiceOf: rate, index: 106}
          rateRange: {type: Range, mustSupport: true, choiceOf: rate, index: 107}
          rateQuantity: {type: Quantity, mustSupport: true, choiceOf: rate, index: 108}
      text: {mustSupport: true, index: 41}
    required: [text]
  daysSupply:
    mustSupport: true
    index: 35
    elements:
      value: {mustSupport: true, index: 36}
    required: [value]
  identifier:
    mustSupport: true
    array: true
    min: 1
    max: 2
    index: 10
    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', 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: 11
      value: {mustSupport: true, index: 12}
    required: [value, system]
  medicationReference:
    type: Reference
    mustSupport: true
    choiceOf: medication
    refers: ['http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-profile-Medication-submission']
    index: 21
  quantity:
    binding: {strength: extensible, valueSet: 'https://fhir.infoway-inforoute.ca/ValueSet/prescribedquantityunit'}
    mustSupport: true
    index: 30
    elements:
      value: {mustSupport: true, index: 31}
      unit: {mustSupport: true, index: 32}
      system: {mustSupport: true, index: 33}
      code: {mustSupport: true, index: 34}
    required: [value]
  authorizingPrescription:
    type: Reference
    mustSupport: true
    refers: ['http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-profile-MedicationRequest-submission']
    index: 28
    elements:
      reference: {mustSupport: true, index: 29}
    required: [reference]
  subject:
    type: Reference
    mustSupport: true
    refers: ['http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-profile-Patient-submission']
    index: 23
    elements:
      reference: {mustSupport: true, index: 24}
    required: [reference]
  performer:
    mustSupport: true
    index: 25
    elements:
      actor:
        type: Reference
        mustSupport: true
        refers: ['http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-profile-PractitionerRole-submission']
        index: 26
        elements:
          reference: {mustSupport: true, index: 27}
        required: [reference]
  medication:
    mustSupport: true
    choices: [medicationReference]
    index: 20
package_version: 4.0.2-alpha1.0.1
extensions:
  DispenseRemainingRefills:
    url: http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-refills-remaining
    type: Extension
    index: 4
    elements:
      url:
        pattern: {type: Uri, value: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-refills-remaining'}
        index: 5
  DispenseRemainingQuantity:
    url: http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-quantity-remaining
    type: Extension
    index: 6
    elements:
      url:
        pattern: {type: Uri, value: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-quantity-remaining'}
        index: 7
  DrugServiceCoverage:
    url: http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-drug-service-coverage
    type: Extension
    isModifier: false
    index: 8
    elements:
      url:
        pattern: {type: Uri, value: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-drug-service-coverage'}
        index: 9
class: profile
kind: resource
url: http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-profile-MedicationDispense-submission
base: http://hl7.org/fhir/StructureDefinition/MedicationDispense
version: 4.0.1
required: [dosageInstruction, extension, whenPrepared, identifier, subject, meta, category, performer]