PackagesCanonicalsLogsProblems
    Packages
    ca.on.dhdr.r4@4.0.3-snapshot3
    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.dhdr.r4
derivation: constraint
name: MedicationDispenseDHDRSubmission
type: MedicationDispense
elements:
  category:
    binding: {strength: required, valueSet: 'http://ontariohealth.ca/fhir/ehr/ValueSet/dispense-category'}
    mustSupport: true
    index: 13
    elements:
      coding:
        mustSupport: true
        index: 14
        elements:
          system:
            pattern: {type: uri, value: 'http://ehealthontario.ca/fhir/CodeSystem/dispense-category'}
            mustSupport: true
            type: uri
            index: 15
          code: {mustSupport: true, index: 16}
          display: {mustSupport: true, index: 17}
        required: [code, display, system]
    required: [coding]
  whenHandedOver: {mustSupport: true, index: 37}
  whenPrepared: {mustSupport: true, index: 36}
  meta:
    mustSupport: true
    index: 0
    elements:
      source: {mustSupport: true, index: 1}
    required: [source]
  medication[x]:
    elements:
      reference: {mustSupport: true, index: 21}
    required: [reference]
  note:
    mustSupport: true
    index: 38
    elements:
      text: {mustSupport: true, index: 39}
  extension:
    mustSupport: true
    index: 2
    slicing:
      slices:
        DispenseRemainingRefills:
          match: {}
          schema:
            type: Extension
            url: http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-refills-remaining
            index: 3
            elements:
              url:
                pattern: {type: uri, value: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-refills-remaining'}
                type: uri
                index: 4
        DispenseRemainingQuantity:
          match: {}
          schema:
            type: Extension
            url: http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-quantity-remaining
            index: 5
            elements:
              url:
                pattern: {type: uri, value: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-quantity-remaining'}
                type: uri
                index: 6
        DrugServiceCoverage:
          match: {}
          schema:
            type: Extension
            isModifier: false
            url: http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-drug-service-coverage
            index: 7
            elements:
              url:
                pattern: {type: uri, value: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-drug-service-coverage'}
                type: uri
                index: 8
  status: {mustSupport: true, index: 12}
  dosageInstruction:
    mustSupport: true
    index: 40
    elements:
      site:
        mustSupport: true
        index: 78
        elements:
          coding:
            mustSupport: true
            index: 79
            elements:
              system: {mustSupport: true, index: 80}
              code: {mustSupport: true, index: 81}
              display: {mustSupport: true, index: 82}
            required: [code, display, system]
          text: {mustSupport: true, index: 83}
      asNeeded:
        mustSupport: true
        choices: [asNeededBoolean]
        index: 76
      method:
        mustSupport: true
        index: 89
        elements:
          coding:
            mustSupport: true
            index: 90
            elements:
              system: {mustSupport: true, index: 91}
              code: {mustSupport: true, index: 92}
              display: {mustSupport: true, index: 93}
            required: [code, display, system]
          text: {mustSupport: true, index: 94}
      patientInstruction: {mustSupport: true, index: 49}
      maxDosePerLifetime:
        mustSupport: true
        index: 177
        elements:
          value: {mustSupport: true, index: 178}
          unit: {mustSupport: true, index: 179}
          system: {mustSupport: true, index: 180}
          code: {mustSupport: true, index: 181}
        required: [code, system, unit, value]
      maxDosePerAdministration:
        mustSupport: true
        index: 172
        elements:
          value: {mustSupport: true, index: 173}
          unit: {mustSupport: true, index: 174}
          system: {mustSupport: true, index: 175}
          code: {mustSupport: true, index: 176}
        required: [code, system, unit, value]
      route:
        mustSupport: true
        index: 84
        elements:
          coding:
            binding: {strength: required, valueSet: 'https://fhir.infoway-inforoute.ca/ValueSet/routeofadministration'}
            mustSupport: true
            index: 85
            elements:
              system:
                pattern: {type: uri, value: 'http://snomed.info/sct'}
                mustSupport: true
                type: uri
                index: 86
              code: {mustSupport: true, index: 87}
              display: {mustSupport: true, index: 88}
            required: [code, display, system]
        required: [coding]
      asNeededBoolean: {type: boolean, mustSupport: true, choiceOf: asNeeded, index: 77}
      timing:
        mustSupport: true
        index: 50
        elements:
          event: {mustSupport: true, index: 51}
          repeat:
            mustSupport: true
            index: 52
            elements:
              frequencyMax: {mustSupport: true, index: 61}
              when: {mustSupport: true, index: 67}
              offset: {mustSupport: true, index: 68}
              periodUnit:
                binding: {strength: required, valueSet: 'http://hl7.org/fhir/ValueSet/units-of-time|4.0.0'}
                mustSupport: true
                index: 64
              frequency: {mustSupport: true, index: 60}
              durationMax: {mustSupport: true, index: 58}
              duration: {mustSupport: true, index: 57}
              bounds:
                mustSupport: true
                choices: []
                index: 54
              durationUnit: {mustSupport: true, index: 59}
              dayOfWeek: {mustSupport: true, index: 65}
              count: {mustSupport: true, index: 55}
              periodMax: {mustSupport: true, index: 63}
              period: {mustSupport: true, index: 62}
              countMax: {mustSupport: true, index: 56}
              timeOfDay: {mustSupport: true, index: 66}
          code:
            binding: {strength: extensible, valueSet: 'http://ontariohealth.ca/fhir/ehr/ValueSet/medication-repeat-pattern'}
            mustSupport: true
            index: 69
            elements:
              coding:
                mustSupport: true
                index: 70
                elements:
                  system:
                    pattern: {type: uri, value: 'http://snomed.info/sct'}
                    mustSupport: true
                    type: uri
                    index: 71
                  code: {mustSupport: true, index: 72}
                  display: {mustSupport: true, index: 73}
                required: [code, display, system]
              text: {mustSupport: true, index: 74}
      additionalInstruction:
        mustSupport: true
        index: 43
        elements:
          coding:
            mustSupport: true
            index: 44
            elements:
              system: {mustSupport: true, index: 45}
              code: {mustSupport: true, index: 46}
              display: {mustSupport: true, index: 47}
            required: [code, display, system]
          text: {mustSupport: true, index: 48}
      sequence: {mustSupport: true, index: 41}
      maxDosePerPeriod:
        mustSupport: true
        index: 159
        elements:
          numerator:
            mustSupport: true
            index: 160
            elements:
              value: {mustSupport: true, index: 161}
              comparator: {mustSupport: true, index: 162}
              unit: {mustSupport: true, index: 163}
              system: {mustSupport: true, index: 164}
              code: {mustSupport: true, index: 165}
            required: [code, system, unit, value]
          denominator:
            mustSupport: true
            index: 166
            elements:
              value: {mustSupport: true, index: 167}
              comparator: {mustSupport: true, index: 168}
              unit: {mustSupport: true, index: 169}
              system: {mustSupport: true, index: 170}
              code: {mustSupport: true, index: 171}
            required: [code, system, unit, value]
      doseAndRate:
        mustSupport: true
        index: 95
        elements:
          dose[x]:
            elements:
              value: {mustSupport: true, index: 120}
              unit: {mustSupport: true, index: 121}
              system: {mustSupport: true, index: 122}
              code: {mustSupport: true, index: 123}
          rate[x]:
            elements:
              value: {mustSupport: true, index: 155}
              unit: {mustSupport: true, index: 156}
              system: {mustSupport: true, index: 157}
              code: {mustSupport: true, index: 158}
          doseRange:
            type: Range
            mustSupport: true
            choiceOf: dose
            index: 106
            slicing:
              slices:
                doseRange:
                  match: {}
                  schema: {type: Range, mustSupport: true, choiceOf: dose, index: 106}
                  min: 0
                  max: 1
          rateRange:
            type: Range
            mustSupport: true
            choiceOf: rate
            index: 141
            slicing:
              slices:
                rateRange:
                  match: {}
                  schema: {type: Range, mustSupport: true, choiceOf: rate, index: 141}
                  min: 0
                  max: 1
          doseQuantity:
            type: Quantity
            mustSupport: true
            choiceOf: dose
            index: 119
            slicing:
              slices:
                doseQuantity:
                  match: {}
                  schema: {type: Quantity, mustSupport: true, choiceOf: dose, index: 119}
                  min: 0
                  max: 1
          dose:
            mustSupport: true
            choices: [doseQuantity]
            index: 118
            slicing:
              slices:
                doseQuantity:
                  match: {}
                  schema:
                    mustSupport: true
                    choices: [doseQuantity]
                    index: 118
                  min: 0
                  max: 1
          type:
            mustSupport: true
            index: 96
            elements:
              coding:
                mustSupport: true
                index: 97
                elements:
                  system: {mustSupport: true, index: 98}
                  code: {mustSupport: true, index: 99}
                  display: {mustSupport: true, index: 100}
                required: [code, display, system]
              text: {mustSupport: true, index: 101}
          rate:
            mustSupport: true
            choices: [rateQuantity]
            index: 153
            slicing:
              slices:
                rateQuantity:
                  match: {}
                  schema:
                    mustSupport: true
                    choices: [rateQuantity]
                    index: 153
                  min: 0
                  max: 1
          rateRatio:
            type: Ratio
            mustSupport: true
            choiceOf: rate
            index: 128
            slicing:
              slices:
                rateRatio:
                  match: {}
                  schema: {type: Ratio, mustSupport: true, choiceOf: rate, index: 128}
                  min: 0
                  max: 1
          rateQuantity:
            type: Quantity
            mustSupport: true
            choiceOf: rate
            index: 154
            slicing:
              slices:
                rateQuantity:
                  match: {}
                  schema: {type: Quantity, mustSupport: true, choiceOf: rate, index: 154}
                  min: 0
                  max: 1
      text: {mustSupport: true, index: 42}
    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: 9
    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: 10
      value: {mustSupport: true, index: 11}
    required: [system, value]
  medicationReference:
    type: Reference
    mustSupport: true
    choiceOf: medication
    refers: ['http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-profile-Medication-submission']
    index: 20
  quantity:
    binding: {strength: extensible, valueSet: 'https://fhir.infoway-inforoute.ca/ValueSet/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://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-profile-MedicationRequest-submission']
    index: 27
    elements:
      reference: {mustSupport: true, index: 28}
    required: [reference]
  subject:
    type: Reference
    mustSupport: true
    refers: ['http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-profile-Patient-submission']
    index: 22
    elements:
      reference: {mustSupport: true, index: 23}
    required: [reference]
  performer:
    mustSupport: true
    index: 24
    elements:
      actor:
        type: Reference
        mustSupport: true
        refers: ['http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-profile-PractitionerRole-submission']
        index: 25
        elements:
          reference: {mustSupport: true, index: 26}
        required: [reference]
  medication:
    mustSupport: true
    choices: [medicationReference]
    index: 19
package_version: 4.0.3-snapshot3
extensions:
  DispenseRemainingRefills:
    url: http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-refills-remaining
    type: Extension
    index: 3
    elements:
      url:
        pattern: {type: uri, value: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-refills-remaining'}
        type: uri
        index: 4
  DispenseRemainingQuantity:
    url: http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-quantity-remaining
    type: Extension
    index: 5
    elements:
      url:
        pattern: {type: uri, value: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-quantity-remaining'}
        type: uri
        index: 6
  DrugServiceCoverage:
    url: http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-drug-service-coverage
    type: Extension
    isModifier: false
    index: 7
    elements:
      url:
        pattern: {type: uri, value: 'http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-drug-service-coverage'}
        type: uri
        index: 8
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.3
required: [category, dosageInstruction, extension, identifier, meta, performer, subject, whenPrepared]