<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="profile-medication-request-plan-patient-chart" />
  <url value="http://telus.com/fhir/patientChart/StructureDefinition/profile-medication-plan" />
  <name value="MedicationPlan" />
  <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>
  <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="Usage Note:   EMRs may not be capable of importing plans as FHIR; instead they will import and store the key clinical data in a way that aligns with each EMR data structure.   &#xD;&#xA;&#xD;&#xA;Usage Note:  In general, each version of the EMR medicaiton record will align with a version of the medication plan.   The physician will determine if only the current version is shared, or if a historical view of the medication is to be included in the patient chart.&#xD;&#xA;&#xD;&#xA;Conformance Rule:   If an EMR imports a plan, the original identfiers must be retained and included when the plan is re-exposed.    The EMR must also assign its own identifier to the plan&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Review complete - June" />
    </element>
    <element id="MedicationRequest.id">
      <path value="MedicationRequest.id" />
      <comment value="Usage Notes:   This must be a stable id that must be identifcal with each export, so that importing systems will recognize that they already have a plan.    Systems can consider developing a hash formula that is based on the medication (CCDD) and the start date of the plan and an internal patient identifier&#xD;&#xA;&#xD;&#xA;The only time that a resource does not have an id is when it is being submitted to the server using a create operation." />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.meta">
      <path value="MedicationRequest.meta" />
      <min value="1" />
      <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" />
      <comment value="REVIEW:   DO WE WANT AN EXTENSION INSTEAD?&#xD;&#xA;Usage Note:   Timestamp reflecting the time the system stored the information that was used to derive this version of the record (non-FHIR).   Example:   If a record was imported it will be stored in a db within the EMR and though the plan was created at a later date, it is the db date that is used.&#xD;&#xA;&#xD;&#xA;Usage Note:   The plan could be derived from multiple records with different dates; the most appropriate date should be exposed, eg perhaps the earliest.RE&#xD;&#xA;&#xD;&#xA;This value is always populated except when the resource is first being created. The server / resource manager sets this value; what a client provides is irrelevant. This is equivalent to the HTTP Last-Modified and SHOULD have the same value on a [read](http.html#read) interaction." />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.meta.source">
      <path value="MedicationRequest.meta.source" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.meta.profile">
      <path value="MedicationRequest.meta.profile" />
      <comment value="Usage:   This fixed value is present in the message to allow the FHIR validator to distinguish between Medication Orders and Medication Plans, as they both use Medication Request resources.&#xD;&#xA;&#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." />
      <fixedCanonical value="http://telus.com/fhir/patientChart/StructureDefinition/medication-request-plan" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.meta.security">
      <path value="MedicationRequest.meta.security" />
      <comment value="Usage:   Tags for masked data must be supported.   The masked data can be shared with a masked flag.   The owner system must ensure that the receiving system adheres to policies.   &#xD;&#xA;&#xD;&#xA;The security labels can be updated without changing the stated version of the resource. The list of security labels is a set. Uniqueness is based the system/code, and version and display are ignored." />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.text">
      <path value="MedicationRequest.text" />
      <comment value="Usage Note:   Each implementation will deteremine whether this is mandatory.   Should be mandatory where possible as receiving systems may not be able to understand all of the discrete data.    &#xD;&#xA;&#xD;&#xA;Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a &quot;text blob&quot; or where text is additionally entered raw or narrated and encoded information is added later." />
      <mustSupport value="true" />
    </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="Conformance Rule:   This must be populated where applicable and when the dosageInstruction is present.   &#xD;&#xA;Alignment:   This is a pre-adoption of an R5 element; this is also prsent in PrescribeIT" />
      <requirements value="This is the human-readable dosage instruction and therefore must be present whenever possible." />
      <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:PlanEffectivePeriod">
      <path value="MedicationRequest.extension" />
      <sliceName value="PlanEffectivePeriod" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://telus.com/fhir/patientChart/StructureDefinition/ext-medication-request-effective-period" />
      </type>
      <isModifier value="false" />
    </element>
    <element id="MedicationRequest.extension:StatusChanged">
      <path value="MedicationRequest.extension" />
      <sliceName value="StatusChanged" />
      <definition value="The date when the status has changed" />
      <comment value="This is a pre-adoption of an R5 data element.&#xD;&#xA; https://build.fhir.org/medicationrequest-definitions.html#MedicationRequest.statusChanged" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://telus.com/fhir/patientChart/StructureDefinition/ext-status-changed" />
      </type>
      <isModifier value="false" />
    </element>
    <element id="MedicationRequest.identifier">
      <path value="MedicationRequest.identifier" />
      <comment value="Usage:  Use of this data element will be determined by each implementation.&#xD;&#xA;&#xD;&#xA;This is a business identifier, not a resource identifier." />
    </element>
    <element id="MedicationRequest.status">
      <path value="MedicationRequest.status" />
      <comment value="Conformance Rule:   In the context of a plan, this may be active, on-hold, stopped or completed.    Though a draft plan may exist in the EMR it will not be sent as there is no clinical value in doing so.   There is no known use case for &quot;unknown&quot; and &quot;entered in error&quot; at this time.&#xD;&#xA;&#xD;&#xA;Conformance Rule: If the physician has discontinued the medication, prior to the plan naturally completing, the status will be &quot;stopped&quot; ; this is an end-state and the status is never moved to &quot;completed&quot;&#xD;&#xA;&#xD;&#xA;Conformance Rule:  if the plan naturally completes (when the medication end date is reached) the status will be &quot;completed&quot; and this will have a provenance.activity of &quot;auto-complete&quot;.    If the status is scheduled in advance, (eg by assigning an end-date), the status of &quot;completed&quot; will only be exposed after the scheduled event occurs.   The end-date will trigger the status change and the provenance associated with this action will indicate an &quot;auto-complete&quot; has occurred.&#xD;&#xA;&#xD;&#xA;Conformance Rule:  If the patient is no longer taking the medication and the source system cannot determine concretely whether the drug was completed or stopped, set value = &quot;stopped&quot;.     If a medication that was not auto-completed/auto-discontinued/auto-ended is no longer being taken then the state = &quot;stopped&quot;.   If the patient is still taking the medicaiton, the state will be active.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;Conformance Rule:  .    A short term medication that automatically completed in the past will be sent with a &quot;completed&quot; status.   &#xD;&#xA;&#xD;&#xA;Usage Note:   In the context of sharing medication data, we would not send plans with a status of entered in error, draft or unknown&#xD;&#xA;  &#xD;&#xA;Usage Note:   If a prescription was given to the patient, but never filled, and this is relevant data to be sharing, this can be recorded as discontinued whereby the discontinue date matches the order date.  The accompanying text will provide context as to why the patient did not fill the order.&#xD;&#xA;&#xD;&#xA;Background Discussion:   This cannot be tied to the prescription order dates as the doctor may discontinue/stopped because the patient no longer needs the meds (eg headaches).   If &quot;completed&quot; this means that youve achieved what you intended, then this becomes fuzzy in cases where there are renewals on the RX that are not fulfilled&#xD;&#xA;&#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.status.extension">
      <path value="MedicationRequest.status.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="MedicationRequest.status.extension:StatusDate">
      <path value="MedicationRequest.status.extension" />
      <sliceName value="StatusDate" />
      <definition value="This is the date that the status changed.  By example, if the drug became active on Jan 1, and was on hold Jan 15th, this date reflects the date of the status change.      Rationale:  A plan may be updated for several reasons; this status date is important clinically and is therefore mandatory." />
      <comment value="Usage Note:  This will align with the Provenance Occurence date when the status change has occurred.&#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="1" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://telus.com/fhir/StructureDefinition/ext-status-effective-date" />
      </type>
    </element>
    <element id="MedicationRequest.status.extension:StatusDate.url">
      <path value="MedicationRequest.status.extension.url" />
      <fixedUri value="http://telus.com/fhir/StructureDefinition/ext-status-effective-date" />
    </element>
    <element id="MedicationRequest.status.extension:StatusDate.value[x]">
      <path value="MedicationRequest.status.extension.value[x]" />
      <min value="1" />
    </element>
    <element id="MedicationRequest.statusReason">
      <path value="MedicationRequest.statusReason" />
      <comment value="Usage Note:   Status reason may be present for exception status's such as medications that are stopped/discontinued.   It is not expected that this will be used for status's such as &quot;active&quot; or &quot;completed.    Note:   Provenance - extension for comments is also populated with this information&#xD;&#xA;&#xD;&#xA;Core-CA - not supported&#xD;&#xA;MA - capture as text and selection from dropdown with NO CONFIGURATION!!!   &#xD;&#xA;PSS - text only if available - discontinue reason, or allergy/intolereance reason&#xD;&#xA;MS - no reason captured :D   &#xD;&#xA;CHR - &#xD;&#xA;&#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.statusReason.coding">
      <path value="MedicationRequest.statusReason.coding" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.statusReason.coding.system">
      <path value="MedicationRequest.statusReason.coding.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.statusReason.coding.code">
      <path value="MedicationRequest.statusReason.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.statusReason.text">
      <path value="MedicationRequest.statusReason.text" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.intent">
      <path value="MedicationRequest.intent" />
      <comment value="CA-Core: supported&#xD;&#xA;Fixed value for this profile&#xD;&#xA;&#xD;&#xA;It is expected that the type of requester will be restricted for different stages of a MedicationRequest.  For example, Proposals can be created by a patient, relatedPerson, Practitioner or Device.  Plans can be created by Practitioners, Patients, RelatedPersons and Devices.  Original orders can be created by a Practitioner only.&#xD;&#xD;An instance-order is an instantiation of a request or order and may be used to populate Medication Administration Record.&#xD;&#xD;This element is labeled as a modifier because the intent alters when and how the resource is actually applicable." />
      <fixedCode value="plan" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.reported[x]">
      <path value="MedicationRequest.reported[x]" />
      <comment value="Conformance Rule:     The EMRs do not have a mechanism for capturing this data discretely.    If the plan has been triggered by a medication statement, then the first version of the plan will be reported, value = &quot;true&quot;.    At this point, the physician owns the plan so all subsequent versions of the plan will be set to &quot;false&quot;.    If the plan was triggered by a medication start in the EMR or by a prescription/medication order, this must always be set to &quot;false&quot;.    &#xD;&#xA;&#xD;&#xA;Mapping: supported in CA-Core" />
      <type>
        <code value="boolean" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.medication[x]">
      <path value="MedicationRequest.medication[x]" />
      <comment value="Usage Note:   Where possible, this should be a reference to the Medication resource, rather than just the code as pertinent details may be in the resource.&#xD;&#xA;&#xD;&#xA;If only a code is specified, then it needs to be a code for a specific product. If more information is required, then the use of the Medication resource is recommended.  For example, if you require form or lot number or if the medication is compounded or extemporaneously prepared, then you must reference the Medication resource." />
      <type>
        <code value="CodeableConcept" />
      </type>
      <type>
        <code value="Reference" />
        <aggregation value="bundled" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.subject">
      <path value="MedicationRequest.subject" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
        <aggregation value="bundled" />
      </type>
      <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 must be populated with the Patient Name.  &#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.supportingInformation.reference">
      <path value="MedicationRequest.supportingInformation.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.authoredOn">
      <path value="MedicationRequest.authoredOn" />
      <comment value="Conformance Rule:   In the context of &quot;plan&quot; this is often the date when the first prescription was written.  If there is no prescription and there is only a plan this will be the date of the original plan.   Often EMRs do not have plans so this will be based on the &quot;start date&quot; of the medication as recorded in the EMR.   &#xD;&#xA;&#xD;&#xA;Conformance Rule:   This date will NOT change when new versions of the plan are created.  &#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." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.requester">
      <path value="MedicationRequest.requester" />
      <comment value="Usage:   This is the originator of the plan and must be populated when known.   This is the prescriber (requestor) on the original medication order.  For a plan initiated by a medication statement, this may be left blank.&#xD;&#xA;&#xD;&#xA;CA-Core - suppported&#xD;&#xA;PrescribeIT; May2016 &quot;Prescriber&quot;&#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" />
    </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" />
      <comment value="Usage note:    This is the name of the requester.   &#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.reasonCode">
      <path value="MedicationRequest.reasonCode" />
      <comment value="Conformance Rule:     When creating the plan version, the reason code must be populated with the latest non-empty indication code from the medication orders.   Rationale:    This is replicated in the plan, as the export may not include the medication orders.     &#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;PrescribeIT:   supported, 0..5  with binding to PrescriptionIndicationForUse (20190430)&#xD;&#xA;CA-Core:   not supported&#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" />
    </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" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.reasonCode.coding.code">
      <path value="MedicationRequest.reasonCode.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.reasonCode.text">
      <path value="MedicationRequest.reasonCode.text" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.note">
      <path value="MedicationRequest.note" />
      <comment value="Usage Note:   This is used to capture information about the medication plan that is not a status reason (eg discontinue reason) or notes pertaining to the dosageInstruction.    Example:   Doctor's notes pertainining to a dosage change reason, eg blood pressure getting too low, general note such as &quot;medication working well&quot;     &#xD;&#xA;&#xD;&#xA;Usage Note:  This is not specifically related to the latest activity; it is a running list of notes/time.  &#xD;&#xA;Conformance Rule::   The addition of a note will generate a new version of the plan&#xD;&#xA;&#xD;&#xA;Conformance Rule:    Provenance is not always shared; if provenance.reason is populated it must be replicated here.&#xD;&#xA;&#xD;&#xA;Conformance Rule:   If notes are being populated from multiple entities in the EMR, multiple note instances will be populated.   They are exposed as a list of notes rather than concatenated.&#xD;&#xA;&#xD;&#xA;PSS:   comment field to capture notes such as where dosage change reason can be recorded&#xD;&#xA;&#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.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 Rule:   The dosage must be specified where known.     The dosage line is mandatory when the source system is the source.   The dosage may not be known if the plan was triggered by a medication statement.&#xD;&#xA;Usage:   If the sending applicaiton cannot produce the discrete dosage instruction, the RenderedDosageInstruction must be used.&#xD;&#xA;&#xD;&#xA;Alignment:: PrescribeIT has extensions for dosage sequence and instruction relationship; it is handled differently in Patient Chart, FHIR R4&#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:   The sequence number is used to convey the relationship between instructions.   In PrescribeIT, this maps to the concepts of &quot;and&quot; or &quot;then&quot; that is used to link instructions together properly.&#xD;&#xA;&#xD;&#xA;32 bit number; for values larger than this, use decimal" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.text">
      <path value="MedicationRequest.dosageInstruction.text" />
      <comment value="Usage Note:  &quot;As directed&quot; is a valid dosage&#xD;&#xA;Usage Note:  Where applicable, this follows the same conformance rules as PrescribeIT and represents a textual version of the discrete data.&#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&#xD;&#xA;&#xD;&#xA;Note that FHIR strings SHALL NOT exceed 1MB in size" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.additionalInstruction">
      <path value="MedicationRequest.dosageInstruction.additionalInstruction" />
      <comment value="Mapping:  CHR - OMD requires that additional instructions are captured separately in the EMR&#xD;&#xA;PSS - two text fields; pharmacy instrucitons and &quot;other&quot; &#xD;&#xA;&#xD;&#xA;Conformance Rule: When providing an additional instruction at the dosage line level (complex), this should be populated when appropriate.&#xD;&#xA;&#xD;&#xA;Usage Note:   This follows the same conformance rules as PrescribeIT as follows:-  Usage Note: It may be necessary for the EMR to parse instructions such as QHS (take at bedtime), into two data elements DOSAGE_TIMING_FREQUENCY = once a day and 'at bedtime' would be placed into this field.nformation 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.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.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="IThis 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;f 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" />
    </element>
    <element id="MedicationRequest.dosageInstruction.site.coding">
      <path value="MedicationRequest.dosageInstruction.site.coding" />
      <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" />
      <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" />
    </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.coding.display">
      <path value="MedicationRequest.dosageInstruction.route.coding.display" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.route.text">
      <path value="MedicationRequest.dosageInstruction.route.text" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.doseAndRate">
      <path value="MedicationRequest.dosageInstruction.doseAndRate" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.doseAndRate.type.coding">
      <path value="MedicationRequest.dosageInstruction.doseAndRate.type.coding" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.doseAndRate.type.coding.system">
      <path value="MedicationRequest.dosageInstruction.doseAndRate.type.coding.system" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.doseAndRate.type.coding.code">
      <path value="MedicationRequest.dosageInstruction.doseAndRate.type.coding.code" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.doseAndRate.type.coding.display">
      <path value="MedicationRequest.dosageInstruction.doseAndRate.type.coding.display" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.doseAndRate.type.text">
      <path value="MedicationRequest.dosageInstruction.doseAndRate.type.text" />
      <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.denominator">
      <path value="MedicationRequest.dosageInstruction.maxDosePerPeriod.denominator" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.substitution">
      <path value="MedicationRequest.substitution" />
      <comment value="Conformance Rule:   This must be populated when known&#xD;&#xA;&#xD;&#xA;PrescribeIT mapping:   Does not exist in PrescribeIT as a discrete data element" />
      <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" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.substitution.reason.coding">
      <path value="MedicationRequest.substitution.reason.coding" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.substitution.reason.coding.system">
      <path value="MedicationRequest.substitution.reason.coding.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.substitution.reason.coding.code">
      <path value="MedicationRequest.substitution.reason.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.substitution.reason.text">
      <path value="MedicationRequest.substitution.reason.text" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.detectedIssue">
      <path value="MedicationRequest.detectedIssue" />
      <comment value="Conformance Rule:    The source system must send all drug interaction alerts/DUR &quot;managements&quot; that are a component of the medication record; these were not added as part of the medication orders/prescription.   Most of the DUR managements will be associated with a prescription, as such this will be rarely used.   &#xD;&#xA;&#xD;&#xA;Conformance Rule:   The managed issue is only applicable to a single version of the plan; it is not carried forward to subsequent versions.&#xD;&#xA;&#xD;&#xA;Conformance Rule:   If there is a medication order with detected issues, the plan must reference the same detected issue  (for the plan version that was triggered by the medication order).    &#xD;&#xA;&#xD;&#xA;Usage Note:   This is used to convey the action the user took (eg override on a warning).    This could also be a drug/allergy alert.  &#xD;&#xA;Usage Note:   EMRs commonly do not capture detected issues unless there is a mitigation attached.    &#xD;&#xA;Usage Note:   Some exporting systems are not able to capture managed issue at the plan level; rather they will capture managed issues only at time of prescribing/renewals.&#xD;&#xA;&#xD;&#xA;Mapping;   PrescribeIT extension&#xD;&#xA;&#xD;&#xA;Conformance Rules:  &#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" />
    </element>
    <element id="MedicationRequest.detectedIssue.reference">
      <path value="MedicationRequest.detectedIssue.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.eventHistory">
      <path value="MedicationRequest.eventHistory" />
      <comment value="Usage Note:   This is not used as the provenance will reference the Medication Plan, instead of using this relationship&#xD;&#xA;&#xD;&#xA;This might not include provenances for all versions of the request – only those deemed “relevant” or important. This SHALL NOT include the provenance associated with this current version of the resource. (If that provenance is deemed to be a “relevant” change, it will need to be added as part of a later update. Until then, it can be queried directly as the provenance that points to this version using _revinclude All Provenances should have some historical version of this Request as their subject.)." />
    </element>
  </differential>
</StructureDefinition>