PackagesCanonicalsLogsProblems
    Packages
    telus.dw.emr.extract-1-1-26@1.1.26
    https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwMedicationRequest
description: null
package_name: telus.dw.emr.extract-1-1-26
derivation: constraint
name: DwMedicationRequest
type: MedicationRequest
elements:
  category:
    binding: {strength: preferred, valueSet: 'https://fhir.infoway-inforoute.ca/ValueSet/prescriptiontype'}
    mustSupport: true
    index: 19
    elements:
      coding:
        binding: {strength: required, valueSet: 'https://fhir.infoway-inforoute.ca/ValueSet/prescriptiontype'}
        mustSupport: true
        index: 20
        elements:
          system: {mustSupport: true, index: 21}
          code: {mustSupport: true, index: 22}
      text: {mustSupport: true, index: 23}
  meta:
    mustSupport: true
    index: 1
    elements:
      lastUpdated: {mustSupport: true, index: 2}
      source: {mustSupport: true, index: 3}
      profile: {index: 4}
      security: {mustSupport: true, index: 5}
    required: [lastUpdated, source]
  substitution:
    mustSupport: true
    index: 149
    elements:
      allowed:
        mustSupport: true
        choices: []
        index: 151
      reason:
        mustSupport: true
        index: 152
        elements:
          coding:
            mustSupport: true
            index: 153
            elements:
              system: {mustSupport: true, index: 154}
              code: {mustSupport: true, index: 155}
          text: {mustSupport: true, index: 156}
  detectedIssue:
    mustSupport: true
    index: 158
    elements:
      display: {mustSupport: true, index: 159}
  encounter:
    type: Reference
    mustSupport: true
    refers: ['https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwEncounter']
    index: 34
  dispenseRequest:
    mustSupport: true
    index: 114
    extensions:
      TotalQuantity: {url: 'https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/ext-TotalQuantity', min: 0, max: 1, type: Extension, index: 116}
      DispenseTrial: {url: 'https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/ext-DispenseTrial', min: 0, max: 1, type: Extension, index: 117}
    elements:
      extension:
        index: 115
        slicing:
          rules: open
          ordered: false
          discriminator:
          - {path: url, type: value}
          min: null
          slices:
            TotalQuantity:
              match: {url: null}
              schema: {type: Extension, url: 'https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/ext-TotalQuantity', index: 116}
              min: 0
              max: 1
            DispenseTrial:
              match: {url: null}
              schema: {type: Extension, url: 'https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/ext-DispenseTrial', index: 117}
              min: 0
              max: 1
      initialFill:
        mustSupport: true
        index: 118
        elements:
          quantity:
            binding: {strength: preferred, valueSet: 'https://fhir.infoway-inforoute.ca/ValueSet/prescribedquantityunit'}
            mustSupport: true
            index: 119
            elements:
              value: {mustSupport: true, index: 120}
              unit: {mustSupport: true, index: 121}
              system: {mustSupport: true, index: 122}
              code: {mustSupport: true, index: 123}
            required: [value]
          duration:
            mustSupport: true
            index: 124
            elements:
              value: {mustSupport: true, index: 125}
              unit: {mustSupport: true, index: 126}
              system:
                pattern: {type: Uri, value: 'http://unitsofmeasure.org'}
                mustSupport: true
                index: 127
              code: {mustSupport: true, index: 128}
            required: [value]
      dispenseInterval:
        mustSupport: true
        index: 129
        elements:
          value: {mustSupport: true, index: 130}
          system: {mustSupport: true, index: 131}
          code: {mustSupport: true, index: 132}
      validityPeriod:
        mustSupport: true
        index: 133
        elements:
          start: {mustSupport: true, index: 134}
          end: {mustSupport: true, index: 135}
      numberOfRepeatsAllowed: {mustSupport: true, index: 136}
      quantity:
        mustSupport: true
        index: 137
        elements:
          value: {mustSupport: true, index: 138}
          unit: {mustSupport: true, index: 139}
          system: {mustSupport: true, index: 140}
          code: {mustSupport: true, index: 141}
      expectedSupplyDuration:
        mustSupport: true
        index: 142
        elements:
          value: {mustSupport: true, index: 143}
          unit:
            pattern: {type: String, value: days}
            mustSupport: true
            index: 144
          system:
            pattern: {type: Uri, value: 'http://unitsofmeasure.org'}
            mustSupport: true
            index: 145
          code:
            pattern: {type: Code, value: d}
            mustSupport: true
            index: 146
        required: [system]
      performer:
        type: Reference
        mustSupport: true
        refers: ['https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwOrganization']
        index: 147
        elements:
          display: {mustSupport: true, index: 148}
  reported:
    mustSupport: true
    choices: [reportedBoolean]
    index: 25
  reasonCode:
    binding: {strength: preferred, valueSet: 'https://fhir.infoway-inforoute.ca/ValueSet/prescriptionindicationforuse'}
    mustSupport: true
    index: 42
    elements:
      coding:
        mustSupport: true
        index: 43
        elements:
          system: {mustSupport: true, index: 44}
          code: {mustSupport: true, index: 45}
      text: {mustSupport: true, index: 46}
    required: [text]
  statusReason: {mustSupport: true, index: 17}
  authoredOn: {mustSupport: true, index: 38}
  note:
    mustSupport: true
    index: 53
    elements:
      author:
        mustSupport: true
        choices: []
        index: 55
      time: {mustSupport: true, index: 56}
  extension:
    index: 8
    slicing:
      rules: open
      ordered: false
      discriminator:
      - {path: url, type: value}
      min: null
      slices:
        DispenserInstructions:
          match: {url: null}
          schema: {type: Extension, mustSupport: true, url: 'https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/ext-DispenserInstructions', index: 9}
          min: 0
          max: 1
        NoRenewalsFlag:
          match: {url: null}
          schema: {type: Extension, mustSupport: true, url: 'https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/ext-NoRenewalsFlag', index: 10}
          min: 0
          max: 1
        StatusChanged:
          match: {url: null}
          schema: {type: Extension, mustSupport: true, url: 'http://hl7.org/fhir/5.0/StructureDefinition/extension-MedicationRequest.statusChanged', index: 11}
          min: 0
          max: 1
        RenderedDosageInstruction:
          match: {url: null}
          schema: {type: Extension, mustSupport: true, url: 'http://prescribeit.ca/fhir/StructureDefinition/ext-rendered-dosage-instruction', index: 12}
          min: 0
          max: 1
  contained: {mustSupport: true, index: 7}
  requester:
    type: Reference
    mustSupport: true
    refers: ['https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwOrganization', 'https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwPractitioner', 'https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwPractitionerRole']
    index: 39
    elements:
      reference: {mustSupport: true, index: 40}
      display: {mustSupport: true, index: 41}
    required: [reference]
  supportingInformation:
    type: Reference
    mustSupport: true
    refers: ['https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwObservation', 'https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwObservationResults', 'https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwObservationVitals']
    index: 35
    elements:
      reference: {mustSupport: true, index: 36}
      display: {mustSupport: true, index: 37}
    required: [reference]
  status: {mustSupport: true, index: 16}
  id: {mustSupport: true, index: 0}
  dosageInstruction:
    mustSupport: true
    index: 57
    extensions:
      effectivePeriod: {url: 'https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/ext-EffectivePeriod', min: 0, max: 1, type: Extension, index: 58}
    elements:
      site:
        binding: {strength: preferred, valueSet: 'https://fhir.infoway-inforoute.ca/ValueSet/prescriptionadministrationsite'}
        mustSupport: true
        index: 82
        elements:
          coding:
            code:
            - {system: 'http://snomed.info/sct'}
            - {system: 'http://terminology.hl7.org/CodeSystem/v3-ActSite'}
            mustSupport: true
            index: 83
            elements:
              system: {mustSupport: true, index: 84}
              code: {mustSupport: true, index: 85}
            required: [system, code]
          text: {mustSupport: true, index: 86}
        required: [text]
      asNeeded:
        mustSupport: true
        choices: []
        index: 81
      route:
        binding: {strength: preferred, valueSet: 'https://fhir.infoway-inforoute.ca/ValueSet/routeofadministration'}
        mustSupport: true
        index: 87
        elements:
          coding:
            index: 88
            slicing:
              rules: open
              discriminator:
              - {path: system, type: value}
              min: null
              slices:
                routeSCTCA:
                  match: {system: 'http://snomed.info/sct'}
                  schema:
                    binding: {strength: required, valueSet: 'http://snomed.info/sct'}
                    mustSupport: true
                    index: 89
                    elements:
                      system:
                        pattern: {type: Uri, value: 'http://snomed.info/sct'}
                        mustSupport: true
                        index: 90
                      version: {mustSupport: true, index: 91}
                      code: {mustSupport: true, index: 92}
                      display: {mustSupport: true, index: 93}
                      userSelected: {mustSupport: true, index: 94}
                    required: [system]
                routeEMRCode:
                  match: {system: null}
                  schema:
                    mustSupport: true
                    array: true
                    index: 95
                    elements:
                      system:
                        constraint:
                          dw-medicationrequest-route-emrcode-system: {human: 'EMR route coding system must follow pattern urn:telus:emr:{emrType}:{instanceId}:medication-route or urn:telus:emr:{emrType}:{region}:{instanceId}:medication-route', source: 'https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwMedicationRequest', severity: warning, expression: 'matches(''urn:telus:emr:([^:]+:){2,3}medication-route'')'}
                        mustSupport: true
                        index: 96
                      code: {mustSupport: true, index: 97}
                      display: {mustSupport: true, index: 98}
                      userSelected: {mustSupport: true, index: 99}
                    required: [system]
          text: {mustSupport: true, index: 100}
        required: [text]
      extension:
        type: Extension
        url: https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/ext-EffectivePeriod
        index: 58
        slicing:
          slices:
            effectivePeriod:
              match: {}
              schema: {type: Extension, url: 'https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/ext-EffectivePeriod', index: 58}
              min: 0
              max: 1
      timing:
        mustSupport: true
        index: 66
        elements:
          repeat:
            mustSupport: true
            index: 67
            elements:
              frequencyMax: {mustSupport: true, index: 76}
              periodUnit: {mustSupport: true, index: 79}
              frequency: {mustSupport: true, index: 75}
              durationMax: {mustSupport: true, index: 73}
              duration: {mustSupport: true, index: 72}
              bounds:
                mustSupport: true
                choices: []
                index: 69
              durationUnit: {mustSupport: true, index: 74}
              count: {mustSupport: true, index: 70}
              periodMax: {mustSupport: true, index: 78}
              period: {mustSupport: true, index: 77}
              countMax: {mustSupport: true, index: 71}
      additionalInstruction:
        mustSupport: true
        index: 61
        elements:
          coding:
            mustSupport: true
            index: 62
            elements:
              system: {mustSupport: true, index: 63}
              code: {mustSupport: true, index: 64}
            required: [code]
          text: {mustSupport: true, index: 65}
        required: [text]
      sequence: {mustSupport: true, index: 59}
      maxDosePerPeriod:
        mustSupport: true
        index: 104
        elements:
          numerator:
            mustSupport: true
            index: 105
            elements:
              value: {mustSupport: true, index: 106}
              unit: {mustSupport: true, index: 107}
              system: {mustSupport: true, index: 108}
              code:
                binding: {strength: preferred, valueSet: 'https://fhir.infoway-inforoute.ca/ValueSet/prescriptiondosequantityunit'}
                mustSupport: true
                index: 109
          denominator:
            mustSupport: true
            index: 110
            elements:
              value: {mustSupport: true, index: 111}
              system:
                pattern: {type: Uri, value: 'http://unitsofmeasure.org'}
                mustSupport: true
                index: 112
              code: {mustSupport: true, index: 113}
      doseAndRate:
        mustSupport: true
        index: 101
        elements:
          dose:
            mustSupport: true
            choices: []
            index: 103
      text: {mustSupport: true, index: 60}
  reportedBoolean: {type: boolean, mustSupport: true, choiceOf: reported, index: 26}
  identifier:
    mustSupport: true
    index: 13
    elements:
      system: {mustSupport: true, index: 14}
      value: {mustSupport: true, index: 15}
    required: [value, system]
  intent:
    pattern: {type: Code, value: order}
    mustSupport: true
    index: 18
  basedOn:
    type: Reference
    mustSupport: true
    refers: ['https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwCarePlan', 'https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwMedicationRequest', 'https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwServiceRequest']
    index: 47
  priorPrescription:
    type: Reference
    mustSupport: true
    refers: ['https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwMedicationRequest']
    index: 157
  medicationReference:
    type: Reference
    choiceOf: medication
    refers: ['https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwMedication']
    index: 31
    slicing:
      slices:
        medicationReference:
          match: {}
          schema:
            type: Reference
            choiceOf: medication
            refers: ['https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwMedication']
            index: 31
          min: 0
          max: 1
  courseOfTherapyType:
    binding: {strength: preferred, valueSet: 'https://fhir.infoway-inforoute.ca/ValueSet/prescriptiontreatmentcategory'}
    index: 48
    elements:
      coding:
        mustSupport: true
        index: 49
        elements:
          system:
            pattern: {type: Uri, value: 'http://terminology.hl7.org/CodeSystem/v3-ActCode'}
            mustSupport: true
            index: 50
          code: {mustSupport: true, index: 51}
        required: [system, code]
      text: {mustSupport: true, index: 52}
    required: [coding]
  subject:
    type: Reference
    mustSupport: true
    refers: ['https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwPatient']
    index: 32
    elements:
      display: {mustSupport: true, index: 33}
  medication:
    mustSupport: true
    choices: []
    index: 28
    slicing:
      rules: open
      ordered: false
      discriminator:
      - {path: $this, type: type}
      min: null
      slices:
        medicationReference:
          match: {}
          schema:
            choices: [medicationReference]
            index: 30
          min: 0
          max: 1
  text: {mustSupport: true, index: 6}
package_version: 1.1.26
extensions:
  DispenserInstructions: {url: 'https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/ext-DispenserInstructions', min: 0, max: 1, type: Extension, mustSupport: true, index: 9}
  NoRenewalsFlag: {url: 'https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/ext-NoRenewalsFlag', min: 0, max: 1, type: Extension, mustSupport: true, index: 10}
  StatusChanged: {url: 'http://hl7.org/fhir/5.0/StructureDefinition/extension-MedicationRequest.statusChanged', min: 0, max: 1, type: Extension, mustSupport: true, index: 11}
  RenderedDosageInstruction: {url: 'http://prescribeit.ca/fhir/StructureDefinition/ext-rendered-dosage-instruction', min: 0, max: 1, type: Extension, mustSupport: true, index: 12}
class: profile
kind: resource
url: https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwMedicationRequest
base: http://hl7.org/fhir/StructureDefinition/MedicationRequest
version: 2.0.0
required: [id]