<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="8db0f969-2f09-4aa5-8003-f58fdd2a9148" />
  <meta>
    <lastUpdated value="2019-05-06T17:20:32.0759359+00:00" />
  </meta>
  <url value="https://ehealthontario.ca/API/FHIR/StructureDefinition/ca-on-medications-profile-MedicationRequest" />
  <name value="MedicationRequest-Prescription" />
  <status value="draft" />
  <date value="2019-05-06T17:20:31.1379911+00:00" />
  <fhirVersion value="3.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="MedicationRequest" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/MedicationRequest" />
  <derivation value="constraint" />
  <differential>
    <element id="MedicationRequest.identifier">
      <path value="MedicationRequest.identifier" />
      <definition value="Identifier assigned by the ordering facility - this is an identifier assigned outside FHIR." />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.identifier.system">
      <path value="MedicationRequest.identifier.system" />
      <comment value="Not populated in the current releases namespaces are unknown." />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.identifier.value">
      <path value="MedicationRequest.identifier.value" />
      <definition value="The portion of the identifier typically displayed to the user and which is unique within the context of the system. It should be unique by agency and date of service." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.intent">
      <path value="MedicationRequest.intent" />
      <fixedCode value="order" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.medication[x]:medicationReference">
      <path value="MedicationRequest.medicationReference" />
      <sliceName value="medicationReference" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://ehealthontario.ca/API/FHIR/StructureDefinition/ca-on-medications-profile-Medication" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.medication[x]:medicationReference.reference">
      <path value="MedicationRequest.medicationReference.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.subject">
      <path value="MedicationRequest.subject" />
      <short value="Who medication request is for" />
      <definition value="A link to a resource representing the person to whom the medication will be given." />
      <type>
        <code value="Reference" />
        <targetProfile value="https://ehealthontario.ca/API/FHIR/StructureDefinition/ca-on-medications-profile-Patient-dispense" />
      </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.requester">
      <path value="MedicationRequest.requester" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.requester.agent">
      <path value="MedicationRequest.requester.agent" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://ehealthontario.ca/API/FHIR/StructureDefinition/ca-on-medications-profile-Practitioner-prescriber" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.requester.agent.reference">
      <path value="MedicationRequest.requester.agent.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.reasonCode">
      <path value="MedicationRequest.reasonCode" />
      <definition value="The reason or the indication for ordering the medication. Medical condition: ICD-9-CM, ODB Reason for Use,ICD-10-CA, DND Eligible Medical Conditions." />
      <comment value="Medical condition: ICD-9-CM, ODB Reason for Use, ICD-10-CA, DND Eligible Medical Conditions" />
      <max value="1" />
      <mustSupport value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="MedicationRequestReason" />
        </extension>
        <strength value="extensible" />
        <valueSetReference>
          <reference value="https://ehealthontario.ca/fhir/ValueSet/dhdr-ca-on-drug-odb-prescription-reason" />
        </valueSetReference>
      </binding>
    </element>
    <element id="MedicationRequest.reasonCode.coding">
      <path value="MedicationRequest.reasonCode.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.reasonCode.coding.system">
      <path value="MedicationRequest.reasonCode.coding.system" />
      <definition value="Identity of the terminology system. One of  four systems allowed by CPhA standard: ICD-9, ODB reason for use, ICD-10 and DND Eligible Medical Conditions. Only “ODB reason for use” is in scope in the current release." />
      <min value="1" />
      <fixedUri value="https://ehealthontario.ca/API/FHIR/NamingSystem/ca-on-drug-odb-prescription-reason" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.reasonCode.coding.code">
      <path value="MedicationRequest.reasonCode.coding.code" />
      <comment value="See Terminology Worksheet for list of codes. Note that FHIR strings may not exceed 1MB in size" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.reasonCode.coding.display">
      <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable">
        <valueBoolean value="true" />
      </extension>
      <path value="MedicationRequest.reasonCode.coding.display" />
      <comment value="See Terminology Worksheet for list of display values. Note that FHIR strings may not exceed 1MB in size" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>