<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="profile-medication-request-order-patient-chart" />
  <url value="http://telus.com/fhir/patientChart/StructureDefinition/profile-medication-order" />
  <name value="MedicationOrder" />
  <status value="draft" />
  <fhirVersion value="4.0.1" />
  <mapping>
    <identity value="workflow" />
    <uri value="http://hl7.org/fhir/workflow" />
    <name value="Workflow Pattern" />
  </mapping>
  <mapping>
    <identity value="script10.6" />
    <uri value="http://ncpdp.org/SCRIPT10_6" />
    <name value="Mapping to NCPDP SCRIPT 10.6" />
  </mapping>
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <mapping>
    <identity value="w5" />
    <uri value="http://hl7.org/fhir/fivews" />
    <name value="FiveWs Pattern Mapping" />
  </mapping>
  <mapping>
    <identity value="v2" />
    <uri value="http://hl7.org/v2" />
    <name value="HL7 v2 Mapping" />
  </mapping>
  <mapping>
    <identity value="PrescribeIT" />
    <name value="PrescribeIT" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="MedicationRequest" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/MedicationRequest" />
  <derivation value="constraint" />
  <differential>
    <element id="MedicationRequest">
      <path value="MedicationRequest" />
      <comment value="START REVIEW - ON INFORMATION SOURCE   Review Requestor,  Dose&amp;Rate - Datatype&#xD;&#xA;&#xD;&#xA;Review - MELVA - patient instructions&#xD;&#xA;**Add Dispenser Instructions as extension - see PrescribeIT&#xD;&#xA;Extensions - TreatmentType, Observations (height/weight/creatine), ManagedIssues (0..*) PharmacyInstructions, MonitoredDrug, NoRenewals, + dispense  Trial, MaxDispense, TotalPrescribedQuantity,&#xD;&#xA;&#xD;&#xA;*Add - rendered dosage instruction ext ... 0..1 Conformance Rule:  Must be present where dosage was specified.   This is not mandatory as there may be orders for tests or products where dosage does not apply such as lancets or pregnancy tests." />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.id">
      <path value="MedicationRequest.id" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.meta">
      <path value="MedicationRequest.meta" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.meta.versionId">
      <path value="MedicationRequest.meta.versionId" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.meta.lastUpdated">
      <path value="MedicationRequest.meta.lastUpdated" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.meta.source">
      <path value="MedicationRequest.meta.source" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.meta.profile">
      <path value="MedicationRequest.meta.profile" />
      <comment value="Usage:  Each implementation project will determine if this will be supported.   It may be useful for validating message instances against this specific profile.&#xD;&#xA;&#xD;&#xA;It 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." />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.text">
      <path value="MedicationRequest.text" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.contained">
      <path value="MedicationRequest.contained" />
      <comment value="Usage Rule:   The medication resource will be contained and present in most situations.&#xD;&#xA;&#xD;&#xA;This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags In their meta elements, but SHALL NOT have security labels." />
      <type>
        <code value="Resource" />
        <profile value="http://telus.com/fhir/patientChart/StructureDefinition/medication" />
      </type>
    </element>
    <element id="MedicationRequest.extension">
      <path value="MedicationRequest.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="0" />
    </element>
    <element id="MedicationRequest.extension:RenderedDosageInstruction">
      <path value="MedicationRequest.extension" />
      <sliceName value="RenderedDosageInstruction" />
      <comment value="Usage Note: This is intended to provide all dosage instructions in a clear human-readable format. This field may be presented to users when viewing the prescription.   This must be as clear as possible and must include all instructions.  &#xD;&#xA;Alignment:   This is a pre-adoption of an R5 element; this is also present in PrescribeIT&#xD;&#xA;&#xD;&#xA;It is recognized that very complex instructions may be conveyed as text only (not as structured data). Example: take 500 mg twice a day at breakfast and at lunch AND 250 mg once a day at bedtime - THEN (new dosage line)). If the EMR submits structured dosage instructions, this must be consistent with the textual instructions provided here.     Example: the EMR may enter frequency (multiplier of the dose) in their system like this (2 qam and 3 qhs ), in the structured frequency. The textual instructions could say Take 2 tablets in the morning and 3 at bedtime.&#xD;&#xA;&#xD;&#xA;Conformance Rule: The rendered dosage instruction MUST contain ALL dosage instructions. This includes ALL child elements of dosage instruction, such as dosage quantity, dosage unit, frequency, etc) in human readable form and must be able to stand on its own. This field will include all of the information contained in the structured dosage as well as patient instructions (eg take with food, starting one day before dental appointment), assembled into one field and formatted as human-readable. Coded values codes should not be used (e.g. 'days' should be used instead of 'd', the code of PO as 'oral' )&#xD;&#xA;&#xD;&#xA;Conformance Rule: MUST allow all printable characters and carriage return/line feeds.&#xD;&#xA;&#xD;&#xA;Alignment - PrescribeIT - Rendered Dosage Instruction" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://telus.com/fhir/patientChart/StructureDefinition/ext-rendered-dosage-instruction" />
      </type>
      <isModifier value="false" />
    </element>
    <element id="MedicationRequest.extension:DispenserInstructions">
      <path value="MedicationRequest.extension" />
      <sliceName value="DispenserInstructions" />
      <comment value="Alignment:  MedicationOrder.extension:pharmacyInstructions&#xD;&#xA;Usage Note:   If available, this should be included&#xD;&#xA;&#xD;&#xA;There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://telus.com/fhir/patientChart/StructureDefinition/ext-request-dispenser-instructions" />
      </type>
      <isModifier value="false" />
    </element>
    <element id="MedicationRequest.extension:MonitoredDrug">
      <path value="MedicationRequest.extension" />
      <sliceName value="MonitoredDrug" />
      <comment value="Allows prescribers to indicate that the compound contains a 'Monitored Drug in the prescription message to the pharmacies&#xD;&#xA;&#xD;&#xA;Conformance Rule: The prescriber should have the ability to set this flag (= true) when the medication is a compound and it contains a monitored medication.  The absence of this extension means (i.e. value=”false”) that this compound does not contain a monitored substance OR that the EMR does not have this field available in the province.&#xD;&#xA;&#xD;&#xA;Usage Note: Provinces may require prescribers to enter this value when a compound contains a monitored substance (e.g. narcotic) to support Prescription Drug Monitoring Programs (e.g. the Alberta Triplicate Prescription Program).&#xD;&#xA;&#xD;&#xA;Alignment:  PrescribeIT - MedicationOrder.extension:monitoredDrug&#xD;&#xA;&#xD;&#xA;there can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://telus.com/fhir/patientChart/StructureDefinition/ext-medicationorder-monitored-drug" />
      </type>
      <isModifier value="false" />
    </element>
    <element id="MedicationRequest.extension:NoRenewalsFlag">
      <path value="MedicationRequest.extension" />
      <sliceName value="NoRenewalsFlag" />
      <definition value="Indicates that the prescriber will not support renewals for this prescription" />
      <comment value="Alignment:  PrescribeIT:   MedicationOrder.extension:noRenewals&#xD;&#xA;&#xD;&#xA;PSS:   If the user has placed a value of &quot;0&quot; in the field, they have specified no renewals and this flag is set.   If the user has left this blank, PSS puts a value of &quot;-1&quot; in the DB and in this case the flag is not set.   &#xD;&#xA;&#xD;&#xA;Conformance Rule: The PMS should present a warning to the dispenser if they create a renewal request for a prescription that has this flag set to indicate 'no renewals'. The PMS should allow the renewal to be submitted along with an explanation as there may be exceptional circumstances.&#xD;&#xA;&#xD;&#xA;There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://telus.com/fhir/patientChart/StructureDefinition/ext-medicationorder-no-renewals" />
      </type>
      <isModifier value="false" />
    </element>
    <element id="MedicationRequest.extension:StatusChanged">
      <path value="MedicationRequest.extension" />
      <sliceName value="StatusChanged" />
      <definition value="The date that the status has changed" />
      <comment value="This is a pre-adoption of an R5 data element, statusChanged.   This may be different than lastUpdatedDate as it specifically calls out the date the status was changed." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/5.0/StructureDefinition/extension-MedicationRequest.statusChanged" />
      </type>
      <isModifier value="false" />
    </element>
    <element id="MedicationRequest.identifier">
      <path value="MedicationRequest.identifier" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="type.coding.code" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <comment value="Conformance Rule:   The Placer ID (identifier.type=PLAC) must be populated with the prescription identifier issued by the source system for each medication.  This aligns with PrescribeIT.    Note:   An EMR may view a &quot;prescription&quot; as having multiple medications whereas in FHIR, a medication request represents a single medication.   &#xD;&#xA;&#xD;&#xA;Conformance Rule:   If the provincial DIS ID is available, this should be included&#xD;&#xA;&#xD;&#xA;Mapping:  PrescribeIT MedicationOrder.identifier&#xD;&#xA;&#xD;&#xA;This is a business identifier, not a resource identifier." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.identifier.type">
      <path value="MedicationRequest.identifier.type" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.identifier.system">
      <path value="MedicationRequest.identifier.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.identifier.value">
      <path value="MedicationRequest.identifier.value" />
      <min value="1" />
      <mustSupport value="true" />
      <mapping>
        <identity value="PrescribeIT" />
        <map value="MedicationOrder.identifier:EMR-id.value" />
      </mapping>
    </element>
    <element id="MedicationRequest.identifier:Placer">
      <path value="MedicationRequest.identifier" />
      <sliceName value="Placer" />
      <max value="1" />
    </element>
    <element id="MedicationRequest.identifier:Placer.type">
      <path value="MedicationRequest.identifier.type" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.identifier:Placer.type.coding">
      <path value="MedicationRequest.identifier.type.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.identifier:Placer.type.coding.code">
      <path value="MedicationRequest.identifier.type.coding.code" />
      <min value="1" />
      <fixedCode value="PLAC" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.identifier:Placer.system">
      <path value="MedicationRequest.identifier.system" />
      <comment value="Conformance Rule:   Follow the same rule as PrescribeIT for consistency ********** more to come on this&#xD;&#xA;&#xD;&#xA;PrescribeIT Conformance Rule: This must be an OID of the URI form [Vendor root].[Application instance node].2 (e.g. urn:oid:1.2.3.4). The branch, “.2” is appended to create a unique namespace for the Prescription Identifer&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Identifier.system is always case sensitive." />
      <min value="1" />
      <fixedUri value="http://hl7.org/fhir/identifier-type" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.identifier:Placer.value">
      <path value="MedicationRequest.identifier.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.identifier:DISID">
      <path value="MedicationRequest.identifier" />
      <sliceName value="DISID" />
      <comment value="Conformance Rule:   If this is available to the sending system, this must be sent.    The second instance is to support the situation where an order is sent to two provincial systems, aka border town.&#xD;&#xA;&#xD;&#xA;This is a business identifier, not a resource identifier." />
      <max value="2" />
    </element>
    <element id="MedicationRequest.identifier:DISID.type">
      <path value="MedicationRequest.identifier.type" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.identifier:DISID.type.coding">
      <path value="MedicationRequest.identifier.type.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.identifier:DISID.type.coding.system">
      <path value="MedicationRequest.identifier.type.coding.system" />
      <min value="1" />
      <fixedUri value="http://hl7.org/fhir/v2/0203" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.identifier:DISID.type.coding.code">
      <path value="MedicationRequest.identifier.type.coding.code" />
      <min value="1" />
      <fixedCode value="RRI" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.identifier:DISID.system">
      <path value="MedicationRequest.identifier.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.identifier:DISID.value">
      <path value="MedicationRequest.identifier.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.status">
      <path value="MedicationRequest.status" />
      <comment value="Usage  Rule:  The prescription is &quot;active&quot; and will remain active as long as the patient is authorized to take the medication.   The prescription authorizes both the dispense period and the period of time that the patient is expected to be taking the medication.   The order will remain active until a) the prescription end date is reached, if it can be calculated based on dosage instructions  b) the prescription is discontinued/stopped  c) the prescription is on-hold and not resumed or discontinued d) the medication is renewed  or e) the prescription has completed based on rules in the EMR such as dosage instructions, auto-discontinue, etc.&#xD;&#xA;&#xD;&#xA;Note:  Some EMRs will not track the legal prescription end date/expiry date.  &#xD;&#xA;&#xD;&#xA;This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid." />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.statusReason">
      <path value="MedicationRequest.statusReason" />
      <comment value="Usage Note:   When radio buttons are used, the status reason is be captured discretely.&#xD;&#xA;&#xD;&#xA;This is generally only used for &quot;exception&quot; statuses such as &quot;suspended&quot; or &quot;cancelled&quot;. The reason why the MedicationRequest was created at all is captured in reasonCode, not here." />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.intent">
      <path value="MedicationRequest.intent" />
      <fixedCode value="order" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.category">
      <path value="MedicationRequest.category" />
      <comment value="Conformance Rule:   This should be populated if known&#xD;&#xA;PrescribeIT Mapping:   May2016 extension &#xD;&#xA;&#xD;&#xA;The category can be used to include where the medication is expected to be consumed or other types of requests." />
      <max value="1" />
      <mustSupport value="true" />
      <binding>
        <strength value="preferred" />
        <valueSet value="https://fhir.infoway-inforoute.ca/ValueSet/prescriptiontype" />
      </binding>
      <mapping>
        <identity value="PrescribeIT" />
        <map value="http://prescribeit.ca/fhir/StructureDefinition/ext-medicationorder-category" />
      </mapping>
    </element>
    <element id="MedicationRequest.category.coding">
      <path value="MedicationRequest.category.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.category.coding.system">
      <path value="MedicationRequest.category.coding.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.category.coding.code">
      <path value="MedicationRequest.category.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.reported[x]">
      <path value="MedicationRequest.reported[x]" />
      <comment value="Conformance Rule:  The boolean is mandatory where known, the source resource must be included in the extension:InformationSource.     &#xD;&#xA;Conformance Rule:    In EMR's this may be derived from the &quot;external&quot; prescription indicator consider it reported and set value = true.   &#xD;&#xA;&#xD;&#xA;Usage Note:    The presence of the boolean = true is set only when the exporting system can be set with certainty.   By example, the value would be set to &quot;true&quot; when a record was imported or when the physician has input the prescription data into the EMR from a bottle, prescription, discharge summary or consult report.   In these cases the EMR can detect that the prescription being exported was an external prescription.    It is recognized that there are other more complex scenarios where this flag cannot be set with certainty and should therefore not be populated.&#xD;&#xA;&#xD;&#xA;Usage Rule:   For migration from EMR-EMR, it is important to ensure that not all records are marked as reported; rather the rules in the source EMR should be respected.&#xD;&#xA;&#xD;&#xA;Core-CA - supported&#xD;&#xA; &#xD;&#xA;Note  R5 - does not support a reference in this field (in R5 it is an information source) and therefore it will not be supported by extension" />
      <type>
        <code value="boolean" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.medication[x]">
      <path value="MedicationRequest.medication[x]" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.subject">
      <path value="MedicationRequest.subject" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.subject.reference">
      <path value="MedicationRequest.subject.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.subject.display">
      <path value="MedicationRequest.subject.display" />
      <comment value="Usage Note:   This should contain the name of the Patient, which can then be used in narrative&#xD;&#xA;&#xD;&#xA;This is generally not the same as the Resource.text of the referenced resource.  The purpose is to identify what's being referenced, not to fully describe it." />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.encounter">
      <path value="MedicationRequest.encounter" />
      <comment value="Usage Note:   This should be included if there is a definitive link to an encounter in the EMR and when it is deemed to be important for the implmementation.&#xD;&#xA;&#xD;&#xA;This will typically be the encounter the event occurred within, but some activities may be initiated prior to or after the official completion of an encounter but still be tied to the context of the encounter.&quot;    If there is a need to link to episodes of care they will be handled with an extension." />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.supportingInformation">
      <path value="MedicationRequest.supportingInformation" />
      <comment value="Usage Rules:   This will be used to support the observations for weight, height, creatinine, eGFR.     &#xD;&#xA;Usage Rule:    Consider use of the vitals and lab profiles&#xD;&#xA;&#xD;&#xA;PrescribeIT mapping:  extension, supporting information&#xD;&#xA;&#xD;&#xA;** **For MedicationOrders, create a value set that is scoped to weight, height, creatinine, eGFR (extensible) -- LOINC&#xD;&#xA;&#xD;&#xA;References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository." />
      <type>
        <code value="Reference" />
        <aggregation value="bundled" />
      </type>
      <mustSupport value="true" />
      <mapping>
        <identity value="PrescribeIT" />
        <map value="http://prescribeit.ca/fhir/StructureDefinition/ext-medicationorder-supportinginfo" />
      </mapping>
    </element>
    <element id="MedicationRequest.supportingInformation.reference">
      <path value="MedicationRequest.supportingInformation.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.supportingInformation.display">
      <path value="MedicationRequest.supportingInformation.display" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.authoredOn">
      <path value="MedicationRequest.authoredOn" />
      <comment value="Alignment:  PrescribeIT Mapping:   DateWritten&#xD;&#xA;Conformance Rule:   In the context of &quot;order&quot; this is often the date when the prescription was originally written.  If this is an external prescription the date may not be known.   In some cases this date will be an estimate by the physician who entered the record.    &#xD;&#xA;&#xD;&#xA;Conformance Rule: Must be either a full date (i.e. yyyy-mm-dd) or a full date and time with timezone (i.e. yyyy-mm-dd-HH:mm:ss.SSS-ZZZZZ).   Prescriptions sent within Alberta will support the full date time.&#xD;&#xA;&#xD;&#xA;Alignment - PS-ON - TELUS asked:  Are there any rules around this? Is this always the &quot;initial&quot; prescription date or latest renewal? Eg 7 years ago, rather than the date of the latest renewal? Please update the specification with this level of detail.   Answer:  They will seek clinical guidance in the future and advise.&#xD;&#xD;&#xA;&#xD;&#xA;CA-Core: supported&#xD;&#xA;PrescribeIT:   Date written&#xD;&#xA;PrescribeIT Conformance Rule: Must be either equal to or earlier then the MedicationOrder.dispenseRequest.valididityPeriod.start element." />
      <mustSupport value="true" />
      <mapping>
        <identity value="PrescribeIT" />
        <map value="MedicationOrder.dateWritten" />
      </mapping>
    </element>
    <element id="MedicationRequest.requester">
      <path value="MedicationRequest.requester" />
      <comment value="Developer Guidance:   This is not mandatory as the EMR may not always know the prescriber when creating an external prescription.  If the role is known, the practitionerRole can be specified which has minimal information.&#xD;&#xA;&#xD;&#xA;CA - this element is supported&#xD;&#xA;&#xD;&#xA;References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
        <aggregation value="bundled" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.requester.reference">
      <path value="MedicationRequest.requester.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.requester.display">
      <path value="MedicationRequest.requester.display" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.reasonCode">
      <path value="MedicationRequest.reasonCode" />
      <comment value="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.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This could be a diagnosis code. If a full condition record exists or additional detail is needed, use reasonReference." />
      <mustSupport value="true" />
      <binding>
        <strength value="preferred" />
        <valueSet value="https://fhir.infoway-inforoute.ca/ValueSet/prescriptionindicationforuse" />
      </binding>
      <mapping>
        <identity value="PrescribeIT" />
        <map value="MedicationOrder.reasonCode" />
      </mapping>
    </element>
    <element id="MedicationRequest.reasonCode.coding">
      <path value="MedicationRequest.reasonCode.coding" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.reasonCode.coding.system">
      <path value="MedicationRequest.reasonCode.coding.system" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.reasonCode.coding.code">
      <path value="MedicationRequest.reasonCode.coding.code" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.reasonCode.text">
      <path value="MedicationRequest.reasonCode.text" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.basedOn">
      <path value="MedicationRequest.basedOn" />
      <comment value="Conformance Rule:   This must reference the MedicationRequest (Plan).   This is the only supported resource at this time and is expected to be mandatory.&#xD;&#xA;&#xD;&#xA;References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository." />
      <max value="1" />
      <type>
        <code value="Reference" />
        <aggregation value="bundled" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.basedOn.reference">
      <path value="MedicationRequest.basedOn.reference" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.courseOfTherapyType">
      <path value="MedicationRequest.courseOfTherapyType" />
      <comment value="Usage Note:   This should be included where known&#xD;&#xA;Alignment:  PrescribeIT Mapping - Extension - TreatmentType&#xD;&#xA;&#xD;&#xA;PSS:   Duration:  One time, short term maps to Acute, Long term PRN maps to Chronic.   If the medication is auto-discontinued, this can map to Acute.    If no discontinue, this is chronic as it is not removed from the medication list&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;This attribute should not be confused with the protocol of the medication." />
      <mustSupport value="true" />
      <binding>
        <strength value="preferred" />
        <valueSet value="https://fhir.infoway-inforoute.ca/ValueSet/prescriptiontreatmentcategory" />
      </binding>
      <mapping>
        <identity value="PrescribeIT" />
        <map value="http://prescribeit.ca/fhir/StructureDefinition/ext-medicationorder-treatment-type" />
      </mapping>
    </element>
    <element id="MedicationRequest.courseOfTherapyType.coding">
      <path value="MedicationRequest.courseOfTherapyType.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.courseOfTherapyType.coding.system">
      <path value="MedicationRequest.courseOfTherapyType.coding.system" />
      <min value="1" />
      <fixedUri value="http://hl7.org/fhir/v3/ActCode" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.courseOfTherapyType.coding.code">
      <path value="MedicationRequest.courseOfTherapyType.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.courseOfTherapyType.text">
      <path value="MedicationRequest.courseOfTherapyType.text" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.note">
      <path value="MedicationRequest.note" />
      <comment value="Usage Note:   This may record the reason for the record being updated, eg dosage change, author, etc.&#xD;&#xA;&#xD;&#xA;For systems that do not have structured annotations, they can simply communicate a single annotation with no author or time.  This element may need to be included in narrative because of the potential for modifying information.  *Annotations SHOULD NOT* be used to communicate &quot;modifying&quot; information that could be computable. (This is a SHOULD because enforcing user behavior is nearly impossible)." />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.note.author[x]">
      <path value="MedicationRequest.note.author[x]" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.note.time">
      <path value="MedicationRequest.note.time" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.note.text">
      <path value="MedicationRequest.note.text" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction">
      <path value="MedicationRequest.dosageInstruction" />
      <comment value="Conformance Rules -  if this is available in discrete form, this should be sent.     This represents a single dosage line/instruction.&#xD;&#xA;&#xD;&#xA;Alignment Note:   For sending systems, this will follow the same rules as PrescribeIT with one difference; the sequence data element is an extension in PrescribeIt.    &#xD;&#xA;Alignment Note:   Please refer to the SIG Table that is published in PrescribeIT for a full breakdown and guidance on populating these data elements.&#xD;&#xA;&#xD;&#xA;There are examples where a medication request may include the option of an oral dose or an Intravenous or Intramuscular dose.  For example, &quot;Ondansetron 8mg orally or IV twice a day as needed for nausea&quot; or &quot;Compazine® (prochlorperazine) 5-10mg PO or 25mg PR bid prn nausea or vomiting&quot;.  In these cases, two medication requests would be created that could be grouped together.  The decision on which dose and route of administration to use is based on the patient's condition at the time the dose is needed." />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.sequence">
      <path value="MedicationRequest.dosageInstruction.sequence" />
      <comment value="Usage Rule:   This indicates the relationship between instruction line.   If the sequence number of multiple Dosages is the same, then it is implied that the instructions are to be treated as concurrent.   This carries the meaning of AND.     If the sequence number is different, then the Dosages are intended to be sequential.  and carries a meaning of  &quot;THEN&quot;.    &#xD;&#xA;&#xD;&#xA;PrescribeIT Mapping:  MedicationOrder.dosageInstruction.extension:instructionRelationship" />
      <min value="1" />
      <mustSupport value="true" />
      <mapping>
        <identity value="PrescribeIT" />
        <map value="http://prescribeit.ca/fhir/StructureDefinition/ext-medication-dosageinstruction-sequence" />
      </mapping>
    </element>
    <element id="MedicationRequest.dosageInstruction.text">
      <path value="MedicationRequest.dosageInstruction.text" />
      <comment value="Alignment Note:  This follows the same conformance rules as PrescribeIT and represents a textual version of the discrete data.&#xD;&#xA;CA core - must support&#xD;&#xA;&#xD;&#xA;Conformance Rule: When providing multiple dosage lines this can be expressed individually. All dosage lines (full text content) must be concatenated into MedicationOrder.extension(renderedDosageInstruction).&#xD;&#xA;&#xD;&#xA;Usage Note: This is a string composed of any available discrete MedicationOrder.dosageInstruction child elements such as timing, asNeeded[x], siteCodeableConcept, route, dose[x], rate[x], and maxDosePerPeriod for each repetition sequence line.&#xD;&#xA;&#xD;&#xA;Example: Prednisone; variable dosage instruction, or concurrent instructions (1 pill morning and 1 pill before bed) or sequential dosages (1 pill for 2 days, then 2 pills).     Note that FHIR strings SHALL NOT exceed 1MB in size" />
      <mustSupport value="true" />
      <mapping>
        <identity value="PrescribeIT" />
        <map value="MedicationOrder.dosageInstruction.text" />
      </mapping>
    </element>
    <element id="MedicationRequest.dosageInstruction.additionalInstruction">
      <path value="MedicationRequest.dosageInstruction.additionalInstruction" />
      <comment value="Usage Notes:   It is strongly recommended to consult with the excel spreadsheet for the SIG table for real world examples.   This is published by PrescribeIT and will be available upon request.    &#xD;&#xA;Usage Note:   Some EMR fields may map better to patient instruction, rather than additional instructions.   &#xD;&#xA;&#xD;&#xA;Mapping:  &#xD;&#xA;OMD requires that additional instructions are captured separately in the EMR&#xD;&#xA;&#xD;&#xA;Information about administration or preparation of the medication (e.g. &quot;infuse as rapidly as possibly via intraperitoneal port&quot; or &quot;immediately following drug x&quot;) should be populated in dosage.text." />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.additionalInstruction.coding">
      <path value="MedicationRequest.dosageInstruction.additionalInstruction.coding" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.additionalInstruction.coding.system">
      <path value="MedicationRequest.dosageInstruction.additionalInstruction.coding.system" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.additionalInstruction.coding.code">
      <path value="MedicationRequest.dosageInstruction.additionalInstruction.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.additionalInstruction.text">
      <path value="MedicationRequest.dosageInstruction.additionalInstruction.text" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.patientInstruction">
      <path value="MedicationRequest.dosageInstruction.patientInstruction" />
      <comment value="Usage:  This will not be used by all EMRs as this is a representation of the entire dosage line in patient friendly terms and may not be mappable directly from the EMR.   This does not exist in some EMRs today explicity and this mapping may be appropriate.    &#xD;&#xA;&#xD;&#xA;PSS - conversion is happening on frequency, but not guaranteed for other shortforms; recipient is pharmacist.   LABEL&#xD;&#xA;MA - has patient instruction field - this may be appropriate mapping, TBD&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Note that FHIR strings SHALL NOT exceed 1MB in size" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.timing">
      <path value="MedicationRequest.dosageInstruction.timing" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.timing.repeat">
      <path value="MedicationRequest.dosageInstruction.timing.repeat" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.timing.repeat.bounds[x]">
      <path value="MedicationRequest.dosageInstruction.timing.repeat.bounds[x]" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.timing.repeat.count">
      <path value="MedicationRequest.dosageInstruction.timing.repeat.count" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.timing.repeat.countMax">
      <path value="MedicationRequest.dosageInstruction.timing.repeat.countMax" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.timing.repeat.duration">
      <path value="MedicationRequest.dosageInstruction.timing.repeat.duration" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.timing.repeat.durationMax">
      <path value="MedicationRequest.dosageInstruction.timing.repeat.durationMax" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.timing.repeat.durationUnit">
      <path value="MedicationRequest.dosageInstruction.timing.repeat.durationUnit" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.timing.repeat.frequency">
      <path value="MedicationRequest.dosageInstruction.timing.repeat.frequency" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.timing.repeat.frequencyMax">
      <path value="MedicationRequest.dosageInstruction.timing.repeat.frequencyMax" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.timing.repeat.period">
      <path value="MedicationRequest.dosageInstruction.timing.repeat.period" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.timing.repeat.periodMax">
      <path value="MedicationRequest.dosageInstruction.timing.repeat.periodMax" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.timing.repeat.periodUnit">
      <path value="MedicationRequest.dosageInstruction.timing.repeat.periodUnit" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.timing.code">
      <path value="MedicationRequest.dosageInstruction.timing.code" />
      <comment value="Usage Note:   EMRs who can send the frequency in a textual form may populate this.   The code is not provided as this is not standardized coding.&#xD;&#xA;&#xD;&#xA;PSS:   Frequency, eg QHS, is translated to &quot; every day at bedtime&quot;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;BID etc. are defined as 'at institutionally specified times'. For example, an institution may choose that BID is &quot;always at 7am and 6pm&quot;.  If it is inappropriate for this choice to be made, the code BID should not be used. Instead, a distinct organization-specific code should be used in place of the HL7-defined BID code and/or a structured representation should be used (in this case, specifying the two event times)." />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.timing.code.text">
      <path value="MedicationRequest.dosageInstruction.timing.code.text" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.asNeeded[x]">
      <path value="MedicationRequest.dosageInstruction.asNeeded[x]" />
      <comment value="Usage Note:   This will follow the same conformance rules as PrescribeIT:&#xD;&#xA;Conformance Rule: This is ONLY populated when the medication is prescribed on an as needed (i.e. PRN) basis.&#xD;&#xA;Conformance Rule: Set value = true&#xD;&#xA;Conformance Rule: When this is specified, it is not acceptable to express the quantity exclusively as a duration/DAYS_SUPPLY. The DOSAGE_QUANTITY must be provided.&#xD;&#xA;&#xD;&#xA;Conformance Rule:   The CodeableConcept should not be used at this time. If it is present, treat it as though the boolean value is set to true.&#xD;&#xA;&#xD;&#xA;Can express &quot;as needed&quot; without a reason by setting the Boolean = True.  In this case the CodeableConcept is not populated.  Or you can express &quot;as needed&quot; with a reason by including the CodeableConcept.  In this case the Boolean is assumed to be True.  If you set the Boolean to False, then the dose is given according to the schedule and is not &quot;prn&quot; or &quot;as needed&quot;." />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.site">
      <path value="MedicationRequest.dosageInstruction.site" />
      <comment value="This follows the same conformance rule as PrescribeIT:&#xD;&#xA;&#xD;&#xA;Conformance Rule: When providing a structured SIG, this should be populated when appropriate. If not structured, this should be part of the SIG (RENDERED_DOSAGE_INSTRUCTION)&#xD;&#xA;&#xD;&#xA;If the use case requires attributes from the BodySite resource (e.g. to identify and track separately) then use the standard extension [bodySite](extension-bodysite.html).  May be a summary code, or a reference to a very precise definition of the location, or both." />
      <mustSupport value="true" />
      <binding>
        <strength value="preferred" />
        <valueSet value="https://fhir.infoway-inforoute.ca/ValueSet/prescriptionadministrationsitees" />
      </binding>
    </element>
    <element id="MedicationRequest.dosageInstruction.site.coding">
      <path value="MedicationRequest.dosageInstruction.site.coding" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.site.coding.system">
      <path value="MedicationRequest.dosageInstruction.site.coding.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.site.coding.code">
      <path value="MedicationRequest.dosageInstruction.site.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.site.text">
      <path value="MedicationRequest.dosageInstruction.site.text" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.route">
      <path value="MedicationRequest.dosageInstruction.route" />
      <comment value="Conformance Rule: Coding should be populated if a code is available. However, text is always required.&#xD;&#xA;&#xD;&#xA;Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination." />
      <mustSupport value="true" />
      <binding>
        <strength value="preferred" />
        <valueSet value="https://fhir.infoway-inforoute.ca/ValueSet/prescriptionrouteofadministration" />
      </binding>
    </element>
    <element id="MedicationRequest.dosageInstruction.route.coding">
      <path value="MedicationRequest.dosageInstruction.route.coding" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.route.coding.system">
      <path value="MedicationRequest.dosageInstruction.route.coding.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.route.coding.code">
      <path value="MedicationRequest.dosageInstruction.route.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.route.text">
      <path value="MedicationRequest.dosageInstruction.route.text" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.doseAndRate">
      <path value="MedicationRequest.dosageInstruction.doseAndRate" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.doseAndRate.dose[x]">
      <path value="MedicationRequest.dosageInstruction.doseAndRate.dose[x]" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.doseAndRate.rate[x]">
      <path value="MedicationRequest.dosageInstruction.doseAndRate.rate[x]" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.maxDosePerPeriod">
      <path value="MedicationRequest.dosageInstruction.maxDosePerPeriod" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.maxDosePerPeriod.numerator">
      <path value="MedicationRequest.dosageInstruction.maxDosePerPeriod.numerator" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.maxDosePerPeriod.numerator.value">
      <path value="MedicationRequest.dosageInstruction.maxDosePerPeriod.numerator.value" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.maxDosePerPeriod.numerator.unit">
      <path value="MedicationRequest.dosageInstruction.maxDosePerPeriod.numerator.unit" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.maxDosePerPeriod.numerator.system">
      <path value="MedicationRequest.dosageInstruction.maxDosePerPeriod.numerator.system" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.maxDosePerPeriod.numerator.code">
      <path value="MedicationRequest.dosageInstruction.maxDosePerPeriod.numerator.code" />
      <mustSupport value="true" />
      <binding>
        <strength value="preferred" />
        <valueSet value="https://fhir.infoway-inforoute.ca/ValueSet/prescriptiondosequantityunit" />
      </binding>
    </element>
    <element id="MedicationRequest.dosageInstruction.maxDosePerPeriod.denominator">
      <path value="MedicationRequest.dosageInstruction.maxDosePerPeriod.denominator" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.maxDosePerPeriod.denominator.value">
      <path value="MedicationRequest.dosageInstruction.maxDosePerPeriod.denominator.value" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.maxDosePerPeriod.denominator.system">
      <path value="MedicationRequest.dosageInstruction.maxDosePerPeriod.denominator.system" />
      <fixedUri value="http://unitsofmeasure.org" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.maxDosePerPeriod.denominator.code">
      <path value="MedicationRequest.dosageInstruction.maxDosePerPeriod.denominator.code" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dispenseRequest">
      <path value="MedicationRequest.dispenseRequest" />
      <comment value="Usage Rule:   This will be mandatory for internally created prescriptions (source system is the reported source).   This is not expected for external prescriptions that have been manually entered into the EMR by the physician; by exmaple, from a prescription bottle or a discharge summary." />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dispenseRequest.extension">
      <path value="MedicationRequest.dispenseRequest.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="0" />
    </element>
    <element id="MedicationRequest.dispenseRequest.extension:MaxDispensed">
      <path value="MedicationRequest.dispenseRequest.extension" />
      <sliceName value="MaxDispensed" />
      <definition value="This field is used for patient safety reasons, to convey that the phyisician wants to restrict the quantity dispensed at a given time.   eg the Total Quantity might be 90 pills and the max to be dispensed at any given time might be 30.  &#xD;&#xA;&#xD;&#xA;Optional Extension Element - found in all resources." />
      <comment value="Alignment PrescribeIT: MedicationOrder.dispenseRequest.extension:maxDispense&#xD;&#xA;&#xD;&#xA;Conformance Rule: If this is supported within the EMR as a discrete data element, this must be populated.&#xD;&#xA;&#xD;&#xA;Example: A prescriber instructs a patient to take 3 Tylenol 3 tablets every day as needed for pain for 90 days. However, the prescriber does not wish the patient to have more than 30 days supply at any given time so the prescriber instructs the pharmacist that the maxDispense is 90 tablets. The pharmacist then does 3 partial fills of 90 tablets (or 30 days supply) over the 90 day period." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://telus.com/fhir/patientChart/StructureDefinition/ext-medicationorder-max-dispense" />
      </type>
      <isModifier value="false" />
    </element>
    <element id="MedicationRequest.dispenseRequest.extension:TotalQuantity">
      <path value="MedicationRequest.dispenseRequest.extension" />
      <sliceName value="TotalQuantity" />
      <comment value="Usage Rule:   This is used for narcotics when the total quantity for the prescription is different than the &quot;quantity&quot; for the dispense.   eg the quantity for the dispense might be one per day, but the pharmacist will not create a refill each day.   &#xD;&#xA;&#xD;&#xA;Alignment Note:   PrescribeIT - MedicationOrder.dispenseRequest.extension:totalPrescribedQuantity&#xD;&#xA;&#xD;&#xA;Conformance Rule: The Total Prescribed Quantity is not mandatory but must be supplied if the value is entered by the user or can be calculated by the system." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://telus.com/fhir/patientChart/StructureDefinition/ext-medicationorder-total-quantity" />
      </type>
      <isModifier value="false" />
    </element>
    <element id="MedicationRequest.dispenseRequest.extension:TotalDaysSupplyPrescription">
      <path value="MedicationRequest.dispenseRequest.extension" />
      <sliceName value="TotalDaysSupplyPrescription" />
      <definition value="Identifies the total period of time over which the prescription is expected to last" />
      <comment value="Usage Rule:    This will not be populated for all use cases; eg for DB extracts, this may not be relevant&#xD;&#xA;&#xD;&#xA;Alignment - PrescribeIT Mapping  - MedicationOrder.dispenseRequest.extension:totalDaysSupply&#xD;&#xA;&#xD;&#xA;Conformance Rule: Must be populated when the Total Days Supply is entered by the user or when the Total Days Supply can be calculated by the system.   Note:  In Quebec this cannot be calculated; it is only provided if entered by the prescriber.&#xD;&#xA;&#xD;&#xA;Conformance Rule: Code must be 'd' and system must be 'http://unitsofmeasure.org'." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://telus.com/fhir/patientChart/StructureDefinition/ext-medicationorder-total-days-supply" />
      </type>
      <isModifier value="false" />
    </element>
    <element id="MedicationRequest.dispenseRequest.extension:DispenseTrial">
      <path value="MedicationRequest.dispenseRequest.extension" />
      <sliceName value="DispenseTrial" />
      <comment value="Alignment:  PrescribeIT:   Maps to extension MedicationOrder.dispenseRequest.extension:trialEligibility&#xD;&#xA;Conformance Rule: If eligible for trial, this must be set to 'true' and presented to the Pharmacist.&#xD;&#xA;Conformance Rule: This is ONLY populated if it is for trial, else it is assumed not to be eligble.&#xD;&#xA;Note: Prescribers may include this information in notes." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://telus.com/fhir/patientChart/StructureDefinition/ext-medicationorder-dispense-trial" />
      </type>
      <isModifier value="false" />
    </element>
    <element id="MedicationRequest.dispenseRequest.extension:MedForLife">
      <path value="MedicationRequest.dispenseRequest.extension" />
      <sliceName value="MedForLife" />
      <definition value="Indicates that the medication dispense does not expire" />
      <comment value="Alignment - PrescribeIT - MedicationOrder.dispenseRequest.extension:forLifeFlag&#xD;&#xA;Conformance Rule:   This is only used in Quebec&#xD;&#xA;Conformance Rule:   This must be set to &quot;true&quot; when the prescriber has indicated that the medication is authorized for the patient's lifetime (eg ephipens)&#xD;&#xA;Conformance Rule:   When flag = &quot;true&quot;, there will be no end date on the validity period; there will be no total days supply or numberOfRepeats specified." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://telus.com/fhir/patientChart/StructureDefinition/ext-medication-for-life" />
      </type>
      <isModifier value="false" />
    </element>
    <element id="MedicationRequest.dispenseRequest.initialFill">
      <path value="MedicationRequest.dispenseRequest.initialFill" />
      <comment value="Mapping:  PrescribeIT first fill instructions - &#xD;&#xA;JN ******** need to add an extension for &quot;date&quot;, as per PrescribeIT&#xD;&#xA;Conformance Rule: If entry of the first fill information is supported within the EMR as discrete information, this must be populated. For the first fill instructions to be meaningful, the first fill quantity or the first fill expected supply duration must be provided. Both can be provided if available but at minimum one of these must be provided.&#xD;&#xA;&#xD;&#xA;If populating this element, either the quantity or the duration must be included." />
      <mustSupport value="true" />
      <mapping>
        <identity value="PrescribeIT" />
        <map value="http://prescribeit.ca/fhir/StructureDefinition/ext-medicationorder-dispense-first-fill" />
      </mapping>
    </element>
    <element id="MedicationRequest.dispenseRequest.initialFill.quantity">
      <path value="MedicationRequest.dispenseRequest.initialFill.quantity" />
      <comment value="PrescribeIT mapping:  &#xD;&#xA;&#xD;&#xA;The context of use may frequently define what kind of quantity this is and therefore what kind of units can be used. The context of use may also restrict the values for the comparator." />
      <mustSupport value="true" />
      <binding>
        <strength value="preferred" />
        <valueSet value="https://fhir.infoway-inforoute.ca/ValueSet/prescribedquantityunit" />
      </binding>
      <mapping>
        <identity value="PrescribeIT" />
        <map value="http://prescribeit.ca/fhir/StructureDefinition/dtprofile-quantity-drug" />
      </mapping>
    </element>
    <element id="MedicationRequest.dispenseRequest.initialFill.quantity.value">
      <path value="MedicationRequest.dispenseRequest.initialFill.quantity.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dispenseRequest.initialFill.quantity.unit">
      <path value="MedicationRequest.dispenseRequest.initialFill.quantity.unit" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dispenseRequest.initialFill.quantity.system">
      <path value="MedicationRequest.dispenseRequest.initialFill.quantity.system" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dispenseRequest.initialFill.quantity.code">
      <path value="MedicationRequest.dispenseRequest.initialFill.quantity.code" />
      <comment value="Conformance Rule: A Code must be supplied if one is available from the PrescribedQuantityUnit subset. If the user picks a prescribed quantity unit that does not have a code in the PrescribedQuantityUnit subset, only then can unit be supplied without a code. If a receiving system receives a code that it doesn't recognize, the system must just display the unit.&#xD;&#xA;&#xD;&#xA;The preferred system is UCUM, but SNOMED CT can also be used (for customary units) or ISO 4217 for currency.  The context of use may additionally require a code from a particular system." />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dispenseRequest.initialFill.duration">
      <path value="MedicationRequest.dispenseRequest.initialFill.duration" />
      <comment value="Conformance Rule: The duration must be expressed as a ‘day(s)’ value and must be coded in the following way; code must be 'd' and system must be 'http://unitsofmeasure.org'.&#xD;&#xA;&#xD;&#xA;The context of use may frequently define what kind of quantity this is and therefore what kind of units can be used. The context of use may also restrict the values for the comparator." />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dispenseRequest.initialFill.duration.value">
      <path value="MedicationRequest.dispenseRequest.initialFill.duration.value" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dispenseRequest.initialFill.duration.system">
      <path value="MedicationRequest.dispenseRequest.initialFill.duration.system" />
      <fixedUri value="http://unitsofmeasure.org" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dispenseRequest.initialFill.duration.code">
      <path value="MedicationRequest.dispenseRequest.initialFill.duration.code" />
      <fixedCode value="d" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dispenseRequest.dispenseInterval">
      <path value="MedicationRequest.dispenseRequest.dispenseInterval" />
      <comment value="Usage Rule:   EMRs may wish to align with PrescribeIT, if this makes sense for the use case.    For some uses cases, the raw data as stored will be used, eg if &quot;3 months&quot; is stored, then this may be sent.   &#xD;&#xA;&#xD;&#xA;Mapping:   PrescribeIT extension&#xD;&#xA;PrescribeIT Conformance Rule: Only days are currently support as a measurement of dispenseInterval.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;The context of use may frequently define what kind of quantity this is and therefore what kind of units can be used. The context of use may also restrict the values for the comparator." />
      <mustSupport value="true" />
      <mapping>
        <identity value="PrescribeIT" />
        <map value="http://prescribeit.ca/fhir/StructureDefinition/ext-medicationorder-dispense-interval" />
      </mapping>
    </element>
    <element id="MedicationRequest.dispenseRequest.dispenseInterval.value">
      <path value="MedicationRequest.dispenseRequest.dispenseInterval.value" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dispenseRequest.dispenseInterval.system">
      <path value="MedicationRequest.dispenseRequest.dispenseInterval.system" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dispenseRequest.dispenseInterval.code">
      <path value="MedicationRequest.dispenseRequest.dispenseInterval.code" />
      <comment value="Conformance Rule: Only days are currently support as a measurement of dispenseInterval.&#xD;&#xA;&#xD;&#xA;The preferred system is UCUM, but SNOMED CT can also be used (for customary units) or ISO 4217 for currency.  The context of use may additionally require a code from a particular system." />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dispenseRequest.validityPeriod">
      <path value="MedicationRequest.dispenseRequest.validityPeriod" />
      <comment value="Usage Rule: If status = on hold//stopped -  the date it was put on hold conveyed as the end date.   Start Date of Med + Hold/End Date&#xD;&#xA;If status = intended - convey future estimated start date&#xD;&#xA;If status = not taken - single date - ??? confirm this woudl be a date/time&#xD;&#xA;&#xD;&#xA;Example:   Patient on med from Jan 1-Jan31 - put on hold on Jan 31.    Patient never started the med but was formally discontinued on Feb 15th.     &#xD;&#xA;&#xD;&#xA;Option 1** On Hold status - effective Jan 1-Jan 31.    Second Med Statement - Feb 15th - Stopped. (single date conveys that the patient was NOT on the drug during the period statement- action by Prescriber)   &#xD;&#xA;&#xD;&#xA;Option 2 - 3 med statements?   First: Complete: Jan 1-Jan 31,   second:On Hold Jan 31, single date   Third: Stopped Feb 15, single date&#xD;&#xA;&#xD;&#xA;Conformance Rule:   Active, Intended, On-Hold will have an effective date that reflects a period of time. ??? Example:   For an active and intended med statement, this will be the same as the Prescription Period.    For On-Hold, this will reflect the start date of the Prescription and the Hold date will be the end date.&#xD;&#xA;&#xD;&#xA;***NOTE;   QUEBEC HAS A NOTION OF A QC VALIDITY PERIOD, EXPRESSED AS A PERIOD OF TIME (EG 30 DAYS), BUT THIS IS NOT THE TOTAL DAYS SUPPLY (MEETING 08/31)&#xD;&#xA;&#xD;&#xA;Mappings for Effective Date: &#xD;&#xA;Core-CA - supported&#xD;&#xA;EMRAPI:  effectiveDate&#xD;&#xA;PSS:  Available but not supported in the API.  Derived from dose, frequency and quantity.  End date Is calculated if discrete fields dose, frequency, duration OR dose, frequency and quantity if captured discretely.     CPP-&gt;Rx-&gt;More details-&gt;Start Date beside label instructions&#xD;&#xA;MA: Patient--&gt; Meds --&gt; new --&gt; start date, No API support&#xD;&#xA;MS:  start date&#xD;&#xA;&#xD;&#xA;It reflects the prescribers' perspective for the validity of the prescription. Dispenses must not be made against the prescription outside of this period. The lower-bound of the Dispensing Window signifies the earliest date that the prescription can be filled for the first time. If an upper-bound is not specified then the Prescription is open-ended or will default to a stale-date based on regulations." />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dispenseRequest.validityPeriod.start">
      <path value="MedicationRequest.dispenseRequest.validityPeriod.start" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dispenseRequest.validityPeriod.end">
      <path value="MedicationRequest.dispenseRequest.validityPeriod.end" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dispenseRequest.numberOfRepeatsAllowed">
      <path value="MedicationRequest.dispenseRequest.numberOfRepeatsAllowed" />
      <comment value="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.&#xD;&#xA;&#xD;&#xA;Guidance: For narcotics, if this is incorrectly populated, the PMS could choose not to reject the message; rather they can adjust for the dispense.If displaying &quot;number of authorized fills&quot;, add 1 to this number." />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dispenseRequest.quantity">
      <path value="MedicationRequest.dispenseRequest.quantity" />
      <comment value="Alignment Mapping:  PrescribeIT - total quantity&#xD;&#xA;&#xD;&#xA;The context of use may frequently define what kind of quantity this is and therefore what kind of units can be used. The context of use may also restrict the values for the comparator." />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dispenseRequest.quantity.value">
      <path value="MedicationRequest.dispenseRequest.quantity.value" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dispenseRequest.quantity.unit">
      <path value="MedicationRequest.dispenseRequest.quantity.unit" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dispenseRequest.quantity.system">
      <path value="MedicationRequest.dispenseRequest.quantity.system" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dispenseRequest.quantity.code">
      <path value="MedicationRequest.dispenseRequest.quantity.code" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dispenseRequest.expectedSupplyDuration">
      <path value="MedicationRequest.dispenseRequest.expectedSupplyDuration" />
      <comment value="Usage Note:   This is typically &quot;days&quot; (d), but could also be stored as weeks, months, years.   &#xD;&#xA;Alignment:  PrescribeIT has a fixed value of &quot;d&quot; (days).    Field= ExpectedSupplyDuration&#xD;&#xA;&#xD;&#xA;PrescribeIT Conformance Rule: This maps to 'duration' in some EMR's. Must be populated when this is a discrete data element in the EMR; else this is sent as part of the textual description.&#xD;&#xA;PrescribeIT Conformance Rule: If Fill Quantity is NOT populated, this must be present.&#xD;&#xA;&#xD;&#xA;In some situations, this attribute may be used instead of quantity to identify the amount supplied by how long it is expected to last, rather than the physical quantity issued, e.g. 90 days supply of medication (based on an ordered dosage). When possible, it is always better to specify quantity, as this tends to be more precise. expectedSupplyDuration will always be an estimate that can be influenced by external factors." />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dispenseRequest.expectedSupplyDuration.value">
      <path value="MedicationRequest.dispenseRequest.expectedSupplyDuration.value" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dispenseRequest.expectedSupplyDuration.unit">
      <path value="MedicationRequest.dispenseRequest.expectedSupplyDuration.unit" />
      <fixedString value="days" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dispenseRequest.expectedSupplyDuration.system">
      <path value="MedicationRequest.dispenseRequest.expectedSupplyDuration.system" />
      <min value="1" />
      <fixedUri value="http://unitsofmeasure.org" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dispenseRequest.expectedSupplyDuration.code">
      <path value="MedicationRequest.dispenseRequest.expectedSupplyDuration.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dispenseRequest.performer">
      <path value="MedicationRequest.dispenseRequest.performer" />
      <comment value="Usage Note:  The pharmacy should be included when known, as either display, when minimal data or a full resource.   &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository." />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dispenseRequest.performer.reference">
      <path value="MedicationRequest.dispenseRequest.performer.reference" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dispenseRequest.performer.display">
      <path value="MedicationRequest.dispenseRequest.performer.display" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.substitution">
      <path value="MedicationRequest.substitution" />
      <comment value="Conformance Rule:   This MUST be included when the prescriber specifies &quot;no substitution&quot; (boolean = false)&#xD;&#xA;Conformance Rule:   must be specified when available as a discrete data element in the EMR&#xD;&#xA;&#xD;&#xA;Alignment:  Not supported in PrescribeIT&#xD;&#xA;MS:   support&#xD;&#xA;PSS:   no sub flag is present; there is no reason&#xD;&#xA;MA:    supported&#xD;&#xA;CHR:   no sub flag is present&#xD;&#xA;&#xD;&#xA;Note:   This is not supported in PrescribeIT as a discrete data element; it is included in Pharmacist Instructions" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.substitution.allowed[x]">
      <path value="MedicationRequest.substitution.allowed[x]" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.substitution.reason">
      <path value="MedicationRequest.substitution.reason" />
      <comment value="Conformance Rule:   If available this must be sent.  A local code may be used or if no code is available then text may be sent&#xD;&#xA;&#xD;&#xA;* Create our own value set (CT exists)  &#xD;&#xA;&#xD;&#xA;MS:   Reasons supported are:  Allergy, Intolerence, ExactDosage, CT-ContininingTherapy, Brand Names not good enough, etc&#xD;&#xA;PSS:   no reason&#xD;&#xA;MA:   &#xD;&#xA;CHR:  no reason&#xD;&#xA;&#xD;&#xA;Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination." />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.substitution.reason.coding">
      <path value="MedicationRequest.substitution.reason.coding" />
      <comment value="Usage Rules:   Coding is not supported by all EMRs; this can be conveyed as text&#xD;&#xA;&#xD;&#xA;Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true." />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.substitution.reason.coding.system">
      <path value="MedicationRequest.substitution.reason.coding.system" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.substitution.reason.coding.code">
      <path value="MedicationRequest.substitution.reason.coding.code" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.substitution.reason.text">
      <path value="MedicationRequest.substitution.reason.text" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.priorPrescription">
      <path value="MedicationRequest.priorPrescription" />
      <comment value="Usage Rule:   If there is an electronic identifier of a prior prescription, this may be sent.   This is not necessary for all use cases.&#xD;&#xA;Alignment:   This is supported by OMD in the CDS specification&#xD;&#xA;&#xD;&#xA;References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc.). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository." />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.priorPrescription.identifier">
      <path value="MedicationRequest.priorPrescription.identifier" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.detectedIssue">
      <path value="MedicationRequest.detectedIssue" />
      <comment value="Conformance Rule:  Detected Issue will be used to convey managed drug interactions.   If available, this must be sent.&#xD;&#xA;&#xD;&#xA;PrescribeIT mapping - extension, detected issues&#xD;&#xA;&#xD;&#xA;This element can include a detected issue that has been identified either by a decision support system or by a clinician and may include information on the steps that were taken to address the issue." />
      <mustSupport value="true" />
      <mapping>
        <identity value="PrescribeIT" />
        <map value="http://prescribeit.ca/fhir/StructureDefinition/ext-request-detectedissue" />
      </mapping>
    </element>
    <element id="MedicationRequest.detectedIssue.reference">
      <path value="MedicationRequest.detectedIssue.reference" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.detectedIssue.display">
      <path value="MedicationRequest.detectedIssue.display" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>