{
  "resourceType": "StructureDefinition",
  "id": "profile-DwMedicationRequest",
  "url": "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwMedicationRequest",
  "version": "2.0.0",
  "name": "DwMedicationRequest",
  "status": "draft",
  "date": "2026-05-29",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "MedicationRequest",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/MedicationRequest",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "MedicationRequest.id",
        "path": "MedicationRequest.id",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.meta",
        "path": "MedicationRequest.meta",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.meta.lastUpdated",
        "path": "MedicationRequest.meta.lastUpdated",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.meta.source",
        "path": "MedicationRequest.meta.source",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.meta.profile",
        "path": "MedicationRequest.meta.profile",
        "comment": "Usage:  Each implementation project will determine if this will be supported.   It may be useful for validating message instances against this specific profile.\r\n\r\nIt is up to the server and/or other infrastructure of policy to determine whether/how these claims are verified and/or updated over time.  The list of profile URLs is a set."
      },
      {
        "id": "MedicationRequest.meta.security",
        "path": "MedicationRequest.meta.security",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.text",
        "path": "MedicationRequest.text",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.contained",
        "path": "MedicationRequest.contained",
        "max": "0",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.extension",
        "path": "MedicationRequest.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "MedicationRequest.extension:DispenserInstructions",
        "path": "MedicationRequest.extension",
        "sliceName": "DispenserInstructions",
        "comment": "Alignment:  MedicationOrder.extension:pharmacyInstructions\r\nUsage Note:   If available, this should be included",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/ext-DispenserInstructions"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.extension:NoRenewalsFlag",
        "path": "MedicationRequest.extension",
        "sliceName": "NoRenewalsFlag",
        "comment": "Alignment:  PrescribeIT:   MedicationOrder.extension:noRenewals",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/ext-NoRenewalsFlag"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.extension:StatusChanged",
        "path": "MedicationRequest.extension",
        "sliceName": "StatusChanged",
        "definition": "The date (and perhaps time) when the status was changed.",
        "comment": "Usage Note:   This is a pre-adoption of an R5 data element,  and reflects the dateTime that the status was changed\r\nhttps://build.fhir.org/medicationrequest-definitions.html#MedicationRequest.statusChanged",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/5.0/StructureDefinition/extension-MedicationRequest.statusChanged"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.extension:RenderedDosageInstruction",
        "path": "MedicationRequest.extension",
        "sliceName": "RenderedDosageInstruction",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://prescribeit.ca/fhir/StructureDefinition/ext-rendered-dosage-instruction"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.identifier",
        "path": "MedicationRequest.identifier",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.identifier.system",
        "path": "MedicationRequest.identifier.system",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.identifier.value",
        "path": "MedicationRequest.identifier.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.status",
        "path": "MedicationRequest.status",
        "comment": "Conformance Rule:   Sending systems should set all orders should be set to completed.  Rationale:   The status of an order should not change and therefore all internal prescriptions may be set to completed.\n\nThis element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.statusReason",
        "path": "MedicationRequest.statusReason",
        "comment": "Usage Note:   When radio buttons are used, the status reason is be captured discretely.",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.intent",
        "path": "MedicationRequest.intent",
        "fixedCode": "order",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.category",
        "path": "MedicationRequest.category",
        "comment": "Conformance Rule:   This should be populated if known",
        "max": "1",
        "mustSupport": true,
        "binding": {
          "strength": "preferred",
          "valueSet": "https://fhir.infoway-inforoute.ca/ValueSet/prescriptiontype"
        }
      },
      {
        "id": "MedicationRequest.category.coding",
        "path": "MedicationRequest.category.coding",
        "mustSupport": true,
        "binding": {
          "strength": "required",
          "valueSet": "https://fhir.infoway-inforoute.ca/ValueSet/prescriptiontype"
        }
      },
      {
        "id": "MedicationRequest.category.coding.system",
        "path": "MedicationRequest.category.coding.system",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.category.coding.code",
        "path": "MedicationRequest.category.coding.code",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.category.text",
        "path": "MedicationRequest.category.text",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.reported[x]",
        "path": "MedicationRequest.reported[x]",
        "comment": "Conformance Rule:  The boolean is mandatory where known, the source resource must be included in the extension:InformationSource. In EMR's this may be derived from the \"external\" prescription indicator — consider it reported and set value = true.",
        "type": [
          {
            "code": "boolean"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.medication[x]",
        "path": "MedicationRequest.medication[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "ordered": false,
          "rules": "open"
        },
        "comment": "Usage Note:  In cases where the medication Resource is not available, medication will be provided as a codeableConcept.",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.medication[x]:medicationReference",
        "path": "MedicationRequest.medication[x]",
        "sliceName": "medicationReference",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwMedication"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.subject",
        "path": "MedicationRequest.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwPatient"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.subject.display",
        "path": "MedicationRequest.subject.display",
        "comment": "Usage Note:   This should contain the name of the Patient, which can then be used in narrative",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.encounter",
        "path": "MedicationRequest.encounter",
        "comment": "Usage Note:   This should be included if there is a definitive link to an encounter in the EMR.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwEncounter"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.supportingInformation",
        "path": "MedicationRequest.supportingInformation",
        "comment": "Usage Rules:   This will be used to support the observations for weight, height, creatinine, eGFR.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwObservationVitals",
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwObservation",
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwObservationResults"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.supportingInformation.reference",
        "path": "MedicationRequest.supportingInformation.reference",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.supportingInformation.display",
        "path": "MedicationRequest.supportingInformation.display",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.authoredOn",
        "path": "MedicationRequest.authoredOn",
        "comment": "Conformance Rule:   In the context of \"order\" this is often the date when the prescription was originally written.  If this is an external prescription the date may not be known.",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.requester",
        "path": "MedicationRequest.requester",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwPractitioner",
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwPractitionerRole",
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwOrganization"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.requester.reference",
        "path": "MedicationRequest.requester.reference",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.requester.display",
        "path": "MedicationRequest.requester.display",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.reasonCode",
        "path": "MedicationRequest.reasonCode",
        "comment": "Conformance Rule: In the case where the prescriber wants to send an Indication for Use that is not included in the value set the prescriber must be able to send a text value without a code.",
        "mustSupport": true,
        "binding": {
          "strength": "preferred",
          "valueSet": "https://fhir.infoway-inforoute.ca/ValueSet/prescriptionindicationforuse"
        }
      },
      {
        "id": "MedicationRequest.reasonCode.coding",
        "path": "MedicationRequest.reasonCode.coding",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.reasonCode.coding.system",
        "path": "MedicationRequest.reasonCode.coding.system",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.reasonCode.coding.code",
        "path": "MedicationRequest.reasonCode.coding.code",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.reasonCode.text",
        "path": "MedicationRequest.reasonCode.text",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.basedOn",
        "path": "MedicationRequest.basedOn",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "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"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.courseOfTherapyType",
        "path": "MedicationRequest.courseOfTherapyType",
        "definition": "The description of the overall pattern of the administration of the medication to the patient.",
        "comment": "Usage Note:   This should be included where known\r\nAlignment:  PrescribeIT Mapping - Extension - TreatmentType",
        "binding": {
          "strength": "preferred",
          "valueSet": "https://fhir.infoway-inforoute.ca/ValueSet/prescriptiontreatmentcategory",
          "description": "Identifies the overall pattern of medication administration."
        }
      },
      {
        "id": "MedicationRequest.courseOfTherapyType.coding",
        "path": "MedicationRequest.courseOfTherapyType.coding",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.courseOfTherapyType.coding.system",
        "path": "MedicationRequest.courseOfTherapyType.coding.system",
        "min": 1,
        "fixedUri": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.courseOfTherapyType.coding.code",
        "path": "MedicationRequest.courseOfTherapyType.coding.code",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.courseOfTherapyType.text",
        "path": "MedicationRequest.courseOfTherapyType.text",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.note",
        "path": "MedicationRequest.note",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.note.author[x]",
        "path": "MedicationRequest.note.author[x]",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.note.time",
        "path": "MedicationRequest.note.time",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction",
        "path": "MedicationRequest.dosageInstruction",
        "comment": "Conformance Rules: if this is available in discrete form, this should be sent. This represents a single dosage line/instruction.",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.extension:effectivePeriod",
        "path": "MedicationRequest.dosageInstruction.extension",
        "sliceName": "effectivePeriod",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/ext-EffectivePeriod"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.dosageInstruction.sequence",
        "path": "MedicationRequest.dosageInstruction.sequence",
        "comment": "Usage Rule:   This indicates the relationship between instruction lines.",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.text",
        "path": "MedicationRequest.dosageInstruction.text",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.additionalInstruction",
        "path": "MedicationRequest.dosageInstruction.additionalInstruction",
        "comment": "Usage Note: To convey explicit instructions to the Pharmacist/dispenser related to this medication order.",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.additionalInstruction.coding",
        "path": "MedicationRequest.dosageInstruction.additionalInstruction.coding",
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.additionalInstruction.coding.system",
        "path": "MedicationRequest.dosageInstruction.additionalInstruction.coding.system",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.additionalInstruction.coding.code",
        "path": "MedicationRequest.dosageInstruction.additionalInstruction.coding.code",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.additionalInstruction.text",
        "path": "MedicationRequest.dosageInstruction.additionalInstruction.text",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.timing",
        "path": "MedicationRequest.dosageInstruction.timing",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.timing.repeat",
        "path": "MedicationRequest.dosageInstruction.timing.repeat",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.timing.repeat.bounds[x]",
        "path": "MedicationRequest.dosageInstruction.timing.repeat.bounds[x]",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.timing.repeat.count",
        "path": "MedicationRequest.dosageInstruction.timing.repeat.count",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.timing.repeat.countMax",
        "path": "MedicationRequest.dosageInstruction.timing.repeat.countMax",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.timing.repeat.duration",
        "path": "MedicationRequest.dosageInstruction.timing.repeat.duration",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.timing.repeat.durationMax",
        "path": "MedicationRequest.dosageInstruction.timing.repeat.durationMax",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.timing.repeat.durationUnit",
        "path": "MedicationRequest.dosageInstruction.timing.repeat.durationUnit",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.timing.repeat.frequency",
        "path": "MedicationRequest.dosageInstruction.timing.repeat.frequency",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.timing.repeat.frequencyMax",
        "path": "MedicationRequest.dosageInstruction.timing.repeat.frequencyMax",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.timing.repeat.period",
        "path": "MedicationRequest.dosageInstruction.timing.repeat.period",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.timing.repeat.periodMax",
        "path": "MedicationRequest.dosageInstruction.timing.repeat.periodMax",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.timing.repeat.periodUnit",
        "path": "MedicationRequest.dosageInstruction.timing.repeat.periodUnit",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.asNeeded[x]",
        "path": "MedicationRequest.dosageInstruction.asNeeded[x]",
        "comment": "Conformance Rule: This is ONLY populated when the medication is prescribed on an as needed (i.e. PRN) basis.",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.site",
        "path": "MedicationRequest.dosageInstruction.site",
        "mustSupport": true,
        "binding": {
          "strength": "preferred",
          "valueSet": "https://fhir.infoway-inforoute.ca/ValueSet/prescriptionadministrationsite"
        }
      },
      {
        "id": "MedicationRequest.dosageInstruction.site.coding",
        "path": "MedicationRequest.dosageInstruction.site.coding",
        "code": [
          {
            "system": "http://snomed.info/sct"
          },
          {
            "system": "http://terminology.hl7.org/CodeSystem/v3-ActSite"
          }
        ],
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.site.coding.system",
        "path": "MedicationRequest.dosageInstruction.site.coding.system",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.site.coding.code",
        "path": "MedicationRequest.dosageInstruction.site.coding.code",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.site.text",
        "path": "MedicationRequest.dosageInstruction.site.text",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.route",
        "path": "MedicationRequest.dosageInstruction.route",
        "comment": "Conformance Rule: Coding should be populated if a code is available. However, text is always required.",
        "mustSupport": true,
        "binding": {
          "strength": "preferred",
          "valueSet": "https://fhir.infoway-inforoute.ca/ValueSet/routeofadministration"
        }
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.coding",
        "path": "MedicationRequest.dosageInstruction.route.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.coding:routeSCTCA",
        "path": "MedicationRequest.dosageInstruction.route.coding",
        "sliceName": "routeSCTCA",
        "min": 0,
        "max": "1",
        "mustSupport": true,
        "binding": {
          "strength": "required",
          "valueSet": "http://snomed.info/sct"
        }
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.coding:routeSCTCA.system",
        "path": "MedicationRequest.dosageInstruction.route.coding.system",
        "min": 1,
        "fixedUri": "http://snomed.info/sct",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.coding:routeSCTCA.version",
        "path": "MedicationRequest.dosageInstruction.route.coding.version",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.coding:routeSCTCA.code",
        "path": "MedicationRequest.dosageInstruction.route.coding.code",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.coding:routeSCTCA.display",
        "path": "MedicationRequest.dosageInstruction.route.coding.display",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.coding:routeSCTCA.userSelected",
        "path": "MedicationRequest.dosageInstruction.route.coding.userSelected",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.coding:routeEMRCode",
        "path": "MedicationRequest.dosageInstruction.route.coding",
        "sliceName": "routeEMRCode",
        "min": 0,
        "max": "*",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.coding:routeEMRCode.system",
        "path": "MedicationRequest.dosageInstruction.route.coding.system",
        "min": 1,
        "constraint": [
          {
            "key": "dw-medicationrequest-route-emrcode-system",
            "severity": "warning",
            "human": "EMR route coding system must follow pattern urn:telus:emr:{emrType}:{instanceId}:medication-route or urn:telus:emr:{emrType}:{region}:{instanceId}:medication-route",
            "expression": "matches('urn:telus:emr:([^:]+:){2,3}medication-route')",
            "source": "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwMedicationRequest"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.coding:routeEMRCode.code",
        "path": "MedicationRequest.dosageInstruction.route.coding.code",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.coding:routeEMRCode.display",
        "path": "MedicationRequest.dosageInstruction.route.coding.display",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.coding:routeEMRCode.userSelected",
        "path": "MedicationRequest.dosageInstruction.route.coding.userSelected",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.text",
        "path": "MedicationRequest.dosageInstruction.route.text",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.doseAndRate",
        "path": "MedicationRequest.dosageInstruction.doseAndRate",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.doseAndRate.dose[x]",
        "path": "MedicationRequest.dosageInstruction.doseAndRate.dose[x]",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.maxDosePerPeriod",
        "path": "MedicationRequest.dosageInstruction.maxDosePerPeriod",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.maxDosePerPeriod.numerator",
        "path": "MedicationRequest.dosageInstruction.maxDosePerPeriod.numerator",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.maxDosePerPeriod.numerator.value",
        "path": "MedicationRequest.dosageInstruction.maxDosePerPeriod.numerator.value",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.maxDosePerPeriod.numerator.unit",
        "path": "MedicationRequest.dosageInstruction.maxDosePerPeriod.numerator.unit",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.maxDosePerPeriod.numerator.system",
        "path": "MedicationRequest.dosageInstruction.maxDosePerPeriod.numerator.system",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.maxDosePerPeriod.numerator.code",
        "path": "MedicationRequest.dosageInstruction.maxDosePerPeriod.numerator.code",
        "mustSupport": true,
        "binding": {
          "strength": "preferred",
          "valueSet": "https://fhir.infoway-inforoute.ca/ValueSet/prescriptiondosequantityunit"
        }
      },
      {
        "id": "MedicationRequest.dosageInstruction.maxDosePerPeriod.denominator",
        "path": "MedicationRequest.dosageInstruction.maxDosePerPeriod.denominator",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.maxDosePerPeriod.denominator.value",
        "path": "MedicationRequest.dosageInstruction.maxDosePerPeriod.denominator.value",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.maxDosePerPeriod.denominator.system",
        "path": "MedicationRequest.dosageInstruction.maxDosePerPeriod.denominator.system",
        "fixedUri": "http://unitsofmeasure.org",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction.maxDosePerPeriod.denominator.code",
        "path": "MedicationRequest.dosageInstruction.maxDosePerPeriod.denominator.code",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest",
        "path": "MedicationRequest.dispenseRequest",
        "comment": "Usage Rule:   This will be mandatory for internally created prescriptions (source system is the reported source).",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.extension",
        "path": "MedicationRequest.dispenseRequest.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "MedicationRequest.dispenseRequest.extension:TotalQuantity",
        "path": "MedicationRequest.dispenseRequest.extension",
        "sliceName": "TotalQuantity",
        "comment": "Alignment Note:   PrescribeIT - MedicationOrder.dispenseRequest.extension:totalPrescribedQuantity",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/ext-TotalQuantity"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.dispenseRequest.extension:DispenseTrial",
        "path": "MedicationRequest.dispenseRequest.extension",
        "sliceName": "DispenseTrial",
        "comment": "Alignment:  PrescribeIT:   Maps to extension MedicationOrder.dispenseRequest.extension:trialEligibility",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/ext-DispenseTrial"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.dispenseRequest.initialFill",
        "path": "MedicationRequest.dispenseRequest.initialFill",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.initialFill.quantity",
        "path": "MedicationRequest.dispenseRequest.initialFill.quantity",
        "mustSupport": true,
        "binding": {
          "strength": "preferred",
          "valueSet": "https://fhir.infoway-inforoute.ca/ValueSet/prescribedquantityunit"
        }
      },
      {
        "id": "MedicationRequest.dispenseRequest.initialFill.quantity.value",
        "path": "MedicationRequest.dispenseRequest.initialFill.quantity.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.initialFill.quantity.unit",
        "path": "MedicationRequest.dispenseRequest.initialFill.quantity.unit",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.initialFill.quantity.system",
        "path": "MedicationRequest.dispenseRequest.initialFill.quantity.system",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.initialFill.quantity.code",
        "path": "MedicationRequest.dispenseRequest.initialFill.quantity.code",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.initialFill.duration",
        "path": "MedicationRequest.dispenseRequest.initialFill.duration",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.initialFill.duration.value",
        "path": "MedicationRequest.dispenseRequest.initialFill.duration.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.initialFill.duration.unit",
        "path": "MedicationRequest.dispenseRequest.initialFill.duration.unit",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.initialFill.duration.system",
        "path": "MedicationRequest.dispenseRequest.initialFill.duration.system",
        "fixedUri": "http://unitsofmeasure.org",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.initialFill.duration.code",
        "path": "MedicationRequest.dispenseRequest.initialFill.duration.code",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.dispenseInterval",
        "path": "MedicationRequest.dispenseRequest.dispenseInterval",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.dispenseInterval.value",
        "path": "MedicationRequest.dispenseRequest.dispenseInterval.value",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.dispenseInterval.system",
        "path": "MedicationRequest.dispenseRequest.dispenseInterval.system",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.dispenseInterval.code",
        "path": "MedicationRequest.dispenseRequest.dispenseInterval.code",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.validityPeriod",
        "path": "MedicationRequest.dispenseRequest.validityPeriod",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.validityPeriod.start",
        "path": "MedicationRequest.dispenseRequest.validityPeriod.start",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.validityPeriod.end",
        "path": "MedicationRequest.dispenseRequest.validityPeriod.end",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.numberOfRepeatsAllowed",
        "path": "MedicationRequest.dispenseRequest.numberOfRepeatsAllowed",
        "comment": "Conformance Rule: This must be populated when the number of repeats is 1 or more. As this field only allows a positive integer, this is not populated if there are no refills allowed.",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.quantity",
        "path": "MedicationRequest.dispenseRequest.quantity",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.quantity.value",
        "path": "MedicationRequest.dispenseRequest.quantity.value",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.quantity.unit",
        "path": "MedicationRequest.dispenseRequest.quantity.unit",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.quantity.system",
        "path": "MedicationRequest.dispenseRequest.quantity.system",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.quantity.code",
        "path": "MedicationRequest.dispenseRequest.quantity.code",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.expectedSupplyDuration",
        "path": "MedicationRequest.dispenseRequest.expectedSupplyDuration",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.expectedSupplyDuration.value",
        "path": "MedicationRequest.dispenseRequest.expectedSupplyDuration.value",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.expectedSupplyDuration.unit",
        "path": "MedicationRequest.dispenseRequest.expectedSupplyDuration.unit",
        "fixedString": "days",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.expectedSupplyDuration.system",
        "path": "MedicationRequest.dispenseRequest.expectedSupplyDuration.system",
        "min": 1,
        "fixedUri": "http://unitsofmeasure.org",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.expectedSupplyDuration.code",
        "path": "MedicationRequest.dispenseRequest.expectedSupplyDuration.code",
        "fixedCode": "d",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.performer",
        "path": "MedicationRequest.dispenseRequest.performer",
        "comment": "Usage Note:  The pharmacy should be included when known.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwOrganization"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest.performer.display",
        "path": "MedicationRequest.dispenseRequest.performer.display",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.substitution",
        "path": "MedicationRequest.substitution",
        "comment": "Conformance Rule:   This MUST be included when the prescriber specifies \"no substitution\" (boolean = false)",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.substitution.allowed[x]",
        "path": "MedicationRequest.substitution.allowed[x]",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.substitution.reason",
        "path": "MedicationRequest.substitution.reason",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.substitution.reason.coding",
        "path": "MedicationRequest.substitution.reason.coding",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.substitution.reason.coding.system",
        "path": "MedicationRequest.substitution.reason.coding.system",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.substitution.reason.coding.code",
        "path": "MedicationRequest.substitution.reason.coding.code",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.substitution.reason.text",
        "path": "MedicationRequest.substitution.reason.text",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.priorPrescription",
        "path": "MedicationRequest.priorPrescription",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://www.telus.com/health/fhir/dwemrextract/StructureDefinition/DwMedicationRequest"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.detectedIssue",
        "path": "MedicationRequest.detectedIssue",
        "comment": "Conformance Rule:  Detected Issue will be used to convey managed drug interactions.   If available, this must be sent.",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.detectedIssue.display",
        "path": "MedicationRequest.detectedIssue.display",
        "mustSupport": true
      }
    ]
  }
}