<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="profile-medicationrequest" />
  <url value="https://fhir.synapxe.sg/StructureDefinition/profile-medicationrequest" />
  <name value="MedicationRequest" />
  <title value="Medication Request Profile" />
  <status value="active" />
  <publisher value="Synapxe" />
  <description value="This profile represents an order for a medication to be dispensed and used by or for a patient." />
  <fhirVersion value="5.0.0" />
  <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" />
      <definition value="Information of each ordered medication item." />
    </element>
    <element id="MedicationRequest.contained">
      <path value="MedicationRequest.contained" />
      <slicing>
        <discriminator>
          <type value="profile" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="MedicationRequest.contained:medication">
      <path value="MedicationRequest.contained" />
      <sliceName value="medication" />
      <max value="1" />
      <type>
        <code value="Medication" />
        <profile value="https://fhir.synapxe.sg/StructureDefinition/profile-medication" />
      </type>
    </element>
    <element id="MedicationRequest.extension:orderingLocation">
      <path value="MedicationRequest.extension" />
      <sliceName value="orderingLocation" />
      <definition value="Location or unit within the ordering institution where this medication order is ordered." />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://fhir.synapxe.sg/StructureDefinition/ext-orderingLocation" />
      </type>
    </element>
    <element id="MedicationRequest.extension:orderSetConnectingTerm">
      <path value="MedicationRequest.extension" />
      <sliceName value="orderSetConnectingTerm" />
      <definition value="Term used to connect medication items within a variable-dose or step-dose order set." />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://fhir.synapxe.sg/StructureDefinition/ext-orderSetConnectingTerm" />
      </type>
    </element>
    <element id="MedicationRequest.extension:changesMade">
      <path value="MedicationRequest.extension" />
      <sliceName value="changesMade" />
      <type>
        <code value="Extension" />
        <profile value="https://fhir.synapxe.sg/StructureDefinition/ext-changesMade" />
      </type>
    </element>
    <element id="MedicationRequest.extension:changesMade.extension:code">
      <path value="MedicationRequest.extension.extension" />
      <sliceName value="code" />
      <definition value="Description of changes made to the medication item during the healthcare event." />
    </element>
    <element id="MedicationRequest.extension:changesMade.extension:reason">
      <path value="MedicationRequest.extension.extension" />
      <sliceName value="reason" />
      <definition value="Reason why the changes were made to the medication item." />
    </element>
    <element id="MedicationRequest.extension:authorizer">
      <path value="MedicationRequest.extension" />
      <sliceName value="authorizer" />
      <definition value="Carries these NEHR XML elements of putOrderedMedications:&#xA;&#xA;- `medicationOrder/authorizedBy/id`: Registration number of the healthcare professional.&#xA;- `medicationOrder/authorizedBy/name`: Name of the healthcare professional." />
      <type>
        <code value="Extension" />
        <profile value="https://fhir.synapxe.sg/StructureDefinition/ext-authorizer" />
      </type>
    </element>
    <element id="MedicationRequest.extension:orderingInstitution">
      <path value="MedicationRequest.extension" />
      <sliceName value="orderingInstitution" />
      <definition value="Healthcare institution where this medication order is ordered." />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://fhir.synapxe.sg/StructureDefinition/ext-orderingInstitution" />
      </type>
    </element>
    <element id="MedicationRequest.modifierExtension">
      <path value="MedicationRequest.modifierExtension" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.identifier">
      <path value="MedicationRequest.identifier" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="system" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="MedicationRequest.identifier.id">
      <path value="MedicationRequest.identifier.id" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.identifier.extension">
      <path value="MedicationRequest.identifier.extension" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.identifier.use">
      <path value="MedicationRequest.identifier.use" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.identifier.type">
      <path value="MedicationRequest.identifier.type" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.identifier.system">
      <path value="MedicationRequest.identifier.system" />
      <min value="1" />
    </element>
    <element id="MedicationRequest.identifier.value">
      <path value="MedicationRequest.identifier.value" />
      <min value="1" />
    </element>
    <element id="MedicationRequest.identifier.period">
      <path value="MedicationRequest.identifier.period" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.identifier.assigner">
      <path value="MedicationRequest.identifier.assigner" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.identifier:recordIdentifier">
      <path value="MedicationRequest.identifier" />
      <sliceName value="recordIdentifier" />
      <definition value="A unique identifier for this medication order within the source system." />
      <max value="1" />
      <type>
        <code value="Identifier" />
        <profile value="https://fhir.synapxe.sg/StructureDefinition/profile-identifier-record-id" />
      </type>
    </element>
    <element id="MedicationRequest.identifier:orderID">
      <path value="MedicationRequest.identifier" />
      <sliceName value="orderID" />
      <definition value="A number or text identifying this medication order within the ordering institution." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Identifier" />
        <profile value="https://fhir.synapxe.sg/StructureDefinition/profile-identifier-order-no" />
      </type>
    </element>
    <element id="MedicationRequest.identifier:sourceGroupingID">
      <path value="MedicationRequest.identifier" />
      <sliceName value="sourceGroupingID" />
      <definition value="Identifier of the prescription group that this medication order belongs to across the healthcare landscape." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Identifier" />
        <profile value="https://fhir.synapxe.sg/StructureDefinition/profile-identifier-source-grouping-id" />
      </type>
    </element>
    <element id="MedicationRequest.identifier:sequenceNo">
      <path value="MedicationRequest.identifier" />
      <sliceName value="sequenceNo" />
      <definition value="Sequence identifier of the medication item within the medication order." />
      <max value="1" />
      <type>
        <code value="Identifier" />
        <profile value="https://fhir.synapxe.sg/StructureDefinition/profile-identifier-sequence-no" />
      </type>
    </element>
    <element id="MedicationRequest.basedOn">
      <path value="MedicationRequest.basedOn" />
      <max value="0" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.synapxe.sg/StructureDefinition/profile-encounter" />
      </type>
    </element>
    <element id="MedicationRequest.basedOn.id">
      <path value="MedicationRequest.basedOn.id" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.basedOn.extension">
      <path value="MedicationRequest.basedOn.extension" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.basedOn.reference">
      <path value="MedicationRequest.basedOn.reference" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.basedOn.type">
      <path value="MedicationRequest.basedOn.type" />
      <min value="1" />
      <patternUri value="Encounter" />
    </element>
    <element id="MedicationRequest.basedOn.identifier">
      <path value="MedicationRequest.basedOn.identifier" />
      <min value="1" />
      <type>
        <code value="Identifier" />
        <profile value="https://fhir.synapxe.sg/StructureDefinition/profile-identifier-record-id" />
      </type>
    </element>
    <element id="MedicationRequest.basedOn.display">
      <path value="MedicationRequest.basedOn.display" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.priorPrescription">
      <path value="MedicationRequest.priorPrescription" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.groupIdentifier">
      <path value="MedicationRequest.groupIdentifier" />
      <definition value="Identifier of the group to which this medication item belongs." />
      <type>
        <code value="Identifier" />
        <profile value="https://fhir.synapxe.sg/StructureDefinition/profile-identifier" />
      </type>
    </element>
    <element id="MedicationRequest.groupIdentifier.system">
      <path value="MedicationRequest.groupIdentifier.system" />
      <patternUri value="https://fhir.synapxe.sg/NamingSystem/group-no" />
    </element>
    <element id="MedicationRequest.status">
      <path value="MedicationRequest.status" />
      <definition value="Overall status of the medication order." />
      <binding>
        <strength value="required" />
        <valueSet value="https://fhir.synapxe.sg/ValueSet/medicationrequest-status" />
      </binding>
    </element>
    <element id="MedicationRequest.statusReason">
      <path value="MedicationRequest.statusReason" />
      <short value="Reason for cancellation, if it is cancelled" />
      <definition value="Reason for cancelling this medication order." />
      <type>
        <code value="CodeableConcept" />
        <profile value="https://fhir.synapxe.sg/StructureDefinition/profile-codeableconcept" />
      </type>
      <binding>
        <strength value="required" />
        <valueSet value="https://fhir.synapxe.sg/ValueSet/status-reason" />
      </binding>
    </element>
    <element id="MedicationRequest.statusReason.extension">
      <path value="MedicationRequest.statusReason.extension" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.statusChanged">
      <path value="MedicationRequest.statusChanged" />
      <short value="if status is Discontinued, this is the discontinued date time" />
      <definition value="Date and time when the medication was discontinued before the planned end date." />
    </element>
    <element id="MedicationRequest.intent">
      <path value="MedicationRequest.intent" />
      <patternCode value="order" />
    </element>
    <element id="MedicationRequest.category">
      <path value="MedicationRequest.category" />
      <short value="The specific clinical setting when this medication is ordered" />
      <definition value="Specific clinical setting when this list of medication items is ordered." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
        <profile value="https://fhir.synapxe.sg/StructureDefinition/profile-codeableconcept" />
      </type>
      <binding>
        <strength value="required" />
        <valueSet value="https://fhir.synapxe.sg/ValueSet/order-type" />
      </binding>
    </element>
    <element id="MedicationRequest.category.extension">
      <path value="MedicationRequest.category.extension" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.priority">
      <path value="MedicationRequest.priority" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.doNotPerform">
      <path value="MedicationRequest.doNotPerform" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.medication">
      <path value="MedicationRequest.medication" />
      <type>
        <code value="CodeableReference" />
        <targetProfile value="https://fhir.synapxe.sg/StructureDefinition/profile-medication" />
        <aggregation value="contained" />
      </type>
    </element>
    <element id="MedicationRequest.medication.id">
      <path value="MedicationRequest.medication.id" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.medication.extension">
      <path value="MedicationRequest.medication.extension" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.medication.concept">
      <path value="MedicationRequest.medication.concept" />
      <max value="0" />
      <type>
        <code value="CodeableConcept" />
        <profile value="https://fhir.synapxe.sg/StructureDefinition/profile-codeableconcept" />
      </type>
    </element>
    <element id="MedicationRequest.medication.concept.extension">
      <path value="MedicationRequest.medication.concept.extension" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.medication.concept.coding.version">
      <path value="MedicationRequest.medication.concept.coding.version" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.medication.reference">
      <path value="MedicationRequest.medication.reference" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.synapxe.sg/StructureDefinition/profile-medication" />
        <aggregation value="contained" />
      </type>
    </element>
    <element id="MedicationRequest.medication.reference.id">
      <path value="MedicationRequest.medication.reference.id" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.medication.reference.extension">
      <path value="MedicationRequest.medication.reference.extension" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.medication.reference.reference">
      <path value="MedicationRequest.medication.reference.reference" />
      <definition value="Sequence identifier of the medication item within the medication order." />
    </element>
    <element id="MedicationRequest.medication.reference.type">
      <path value="MedicationRequest.medication.reference.type" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.medication.reference.identifier.id">
      <path value="MedicationRequest.medication.reference.identifier.id" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.medication.reference.identifier.extension">
      <path value="MedicationRequest.medication.reference.identifier.extension" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.medication.reference.identifier.use">
      <path value="MedicationRequest.medication.reference.identifier.use" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.medication.reference.identifier.type">
      <path value="MedicationRequest.medication.reference.identifier.type" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.medication.reference.identifier.system">
      <path value="MedicationRequest.medication.reference.identifier.system" />
      <min value="1" />
    </element>
    <element id="MedicationRequest.medication.reference.identifier.value">
      <path value="MedicationRequest.medication.reference.identifier.value" />
      <min value="1" />
    </element>
    <element id="MedicationRequest.medication.reference.identifier.period">
      <path value="MedicationRequest.medication.reference.identifier.period" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.medication.reference.identifier.assigner">
      <path value="MedicationRequest.medication.reference.identifier.assigner" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.subject">
      <path value="MedicationRequest.subject" />
      <type>
        <code value="Reference" />
        <profile value="https://fhir.synapxe.sg/StructureDefinition/profile-reference-patient" />
        <targetProfile value="https://fhir.synapxe.sg/StructureDefinition/profile-patient" />
      </type>
    </element>
    <element id="MedicationRequest.subject.display">
      <path value="MedicationRequest.subject.display" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.informationSource">
      <path value="MedicationRequest.informationSource" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.encounter">
      <path value="MedicationRequest.encounter" />
      <type>
        <code value="Reference" />
        <profile value="https://fhir.synapxe.sg/StructureDefinition/profile-reference-encounter" />
        <targetProfile value="https://fhir.synapxe.sg/StructureDefinition/profile-encounter" />
      </type>
    </element>
    <element id="MedicationRequest.encounter.identifier">
      <path value="MedicationRequest.encounter.identifier" />
      <definition value="The identifier populated in the putEvent message of the event that is linked to this medication order." />
    </element>
    <element id="MedicationRequest.supportingInformation">
      <path value="MedicationRequest.supportingInformation" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.authoredOn">
      <path value="MedicationRequest.authoredOn" />
      <short value="medication order date time" />
      <definition value="Carries these NEHR XML elements of putOrderedMedications:&#xA;&#xA;- `medicationOrder/medicationItem/medicationItemOrderedDate`: Date and time the medication item was ordered.&#xA;- `medicationOrder/orderDateTime`: Date and time when this list of medication items was ordered." />
      <min value="1" />
    </element>
    <element id="MedicationRequest.requester">
      <path value="MedicationRequest.requester" />
      <definition value="Healthcare professional responsible for prescribing the medication order." />
      <min value="1" />
      <type>
        <code value="Reference" />
        <profile value="https://fhir.synapxe.sg/StructureDefinition/profile-reference-practitioner" />
        <targetProfile value="https://fhir.synapxe.sg/StructureDefinition/profile-practitioner" />
      </type>
    </element>
    <element id="MedicationRequest.requester.identifier">
      <path value="MedicationRequest.requester.identifier" />
      <definition value="Registration number of the healthcare professional." />
    </element>
    <element id="MedicationRequest.requester.identifier.system">
      <path value="MedicationRequest.requester.identifier.system" />
      <definition value="Allowed requester identifier systems: https://fhir.synapxe.sg/NamingSystem/mcr, https://fhir.synapxe.sg/NamingSystem/dcr, https://fhir.synapxe.sg/NamingSystem/prn, or https://fhir.synapxe.sg/NamingSystem/snb." />
    </element>
    <element id="MedicationRequest.requester.display">
      <path value="MedicationRequest.requester.display" />
      <definition value="Name of the healthcare professional." />
    </element>
    <element id="MedicationRequest.reported">
      <path value="MedicationRequest.reported" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.performerType">
      <path value="MedicationRequest.performerType" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.performer">
      <path value="MedicationRequest.performer" />
      <max value="0" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.synapxe.sg/StructureDefinition/profile-practitioner" />
      </type>
    </element>
    <element id="MedicationRequest.performer.id">
      <path value="MedicationRequest.performer.id" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.performer.extension">
      <path value="MedicationRequest.performer.extension" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.performer.reference">
      <path value="MedicationRequest.performer.reference" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.performer.type">
      <path value="MedicationRequest.performer.type" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.performer.identifier">
      <path value="MedicationRequest.performer.identifier" />
      <min value="1" />
    </element>
    <element id="MedicationRequest.performer.identifier.id">
      <path value="MedicationRequest.performer.identifier.id" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.performer.identifier.extension">
      <path value="MedicationRequest.performer.identifier.extension" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.performer.identifier.use">
      <path value="MedicationRequest.performer.identifier.use" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.performer.identifier.type">
      <path value="MedicationRequest.performer.identifier.type" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.performer.identifier.system">
      <path value="MedicationRequest.performer.identifier.system" />
      <min value="1" />
      <example>
        <label value="Medical Council Registration" />
        <valueUri value="https://fhir.synapxe.sg/NamingSystem/mcr" />
      </example>
      <example>
        <label value="Dental Council Registration" />
        <valueUri value="https://fhir.synapxe.sg/NamingSystem/dcr" />
      </example>
    </element>
    <element id="MedicationRequest.performer.identifier.value">
      <path value="MedicationRequest.performer.identifier.value" />
      <min value="1" />
    </element>
    <element id="MedicationRequest.performer.identifier.period">
      <path value="MedicationRequest.performer.identifier.period" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.performer.identifier.assigner">
      <path value="MedicationRequest.performer.identifier.assigner" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.performer.display">
      <path value="MedicationRequest.performer.display" />
      <min value="1" />
    </element>
    <element id="MedicationRequest.device">
      <path value="MedicationRequest.device" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.recorder">
      <path value="MedicationRequest.recorder" />
      <short value="The healthcare professional responsible for prescribing this medication order" />
      <definition value="The healthcare professional responsible for prescribing this medication order" />
      <max value="0" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.synapxe.sg/StructureDefinition/profile-practitioner" />
      </type>
    </element>
    <element id="MedicationRequest.recorder.id">
      <path value="MedicationRequest.recorder.id" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.recorder.extension">
      <path value="MedicationRequest.recorder.extension" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.recorder.reference">
      <path value="MedicationRequest.recorder.reference" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.recorder.type">
      <path value="MedicationRequest.recorder.type" />
      <patternUri value="Practitioner" />
    </element>
    <element id="MedicationRequest.recorder.identifier">
      <path value="MedicationRequest.recorder.identifier" />
      <min value="1" />
    </element>
    <element id="MedicationRequest.recorder.identifier.id">
      <path value="MedicationRequest.recorder.identifier.id" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.recorder.identifier.extension">
      <path value="MedicationRequest.recorder.identifier.extension" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.recorder.identifier.use">
      <path value="MedicationRequest.recorder.identifier.use" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.recorder.identifier.type">
      <path value="MedicationRequest.recorder.identifier.type" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.recorder.identifier.system">
      <path value="MedicationRequest.recorder.identifier.system" />
      <min value="1" />
      <example>
        <label value="Medical Council Registration" />
        <valueUri value="https://fhir.synapxe.sg/NamingSystem/mcr" />
      </example>
      <example>
        <label value="Pharmacist Registration Number" />
        <valueUri value="https://fhir.synapxe.sg/NamingSystem/prn" />
      </example>
      <example>
        <label value="Dental Council Registration" />
        <valueUri value="https://fhir.synapxe.sg/NamingSystem/dcr" />
      </example>
      <example>
        <label value="Singapore Nursing Board" />
        <valueUri value="https://fhir.synapxe.sg/NamingSystem/snb" />
      </example>
    </element>
    <element id="MedicationRequest.recorder.identifier.value">
      <path value="MedicationRequest.recorder.identifier.value" />
      <min value="1" />
    </element>
    <element id="MedicationRequest.recorder.identifier.period">
      <path value="MedicationRequest.recorder.identifier.period" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.recorder.identifier.assigner">
      <path value="MedicationRequest.recorder.identifier.assigner" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.recorder.display">
      <path value="MedicationRequest.recorder.display" />
      <min value="1" />
    </element>
    <element id="MedicationRequest.reason">
      <path value="MedicationRequest.reason" />
      <max value="1" />
    </element>
    <element id="MedicationRequest.reason.id">
      <path value="MedicationRequest.reason.id" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.reason.extension">
      <path value="MedicationRequest.reason.extension" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.reason.concept">
      <path value="MedicationRequest.reason.concept" />
      <definition value="Reason or indication for ordering the medication item." />
      <min value="1" />
      <type>
        <code value="CodeableConcept" />
        <profile value="https://fhir.synapxe.sg/StructureDefinition/profile-codeableconcept" />
      </type>
      <binding>
        <strength value="required" />
        <valueSet value="https://fhir.synapxe.sg/ValueSet/reason-for-medication" />
      </binding>
    </element>
    <element id="MedicationRequest.reason.concept.extension">
      <path value="MedicationRequest.reason.concept.extension" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.reason.concept.coding.version">
      <path value="MedicationRequest.reason.concept.coding.version" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.courseOfTherapyType">
      <path value="MedicationRequest.courseOfTherapyType" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.insurance">
      <path value="MedicationRequest.insurance" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.note">
      <path value="MedicationRequest.note" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.renderedDosageInstruction">
      <path value="MedicationRequest.renderedDosageInstruction" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.effectiveDosePeriod.id">
      <path value="MedicationRequest.effectiveDosePeriod.id" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.effectiveDosePeriod.extension">
      <path value="MedicationRequest.effectiveDosePeriod.extension" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.effectiveDosePeriod.start">
      <path value="MedicationRequest.effectiveDosePeriod.start" />
      <definition value="Date and time when the patient should start administering the medication." />
      <min value="1" />
    </element>
    <element id="MedicationRequest.effectiveDosePeriod.end">
      <path value="MedicationRequest.effectiveDosePeriod.end" />
      <definition value="Carries these NEHR XML elements of putOrderedMedications:&#xA;&#xA;- `medicationOrder/medicationItem/medicationEndDateTime`: Date and time when the patient should stop administering the medication.&#xA;- `medicationOrder/medicationItem/medicationDiscontinuedDateTime`: Date and time when the medication was discontinued before the planned end date." />
    </element>
    <element id="MedicationRequest.dosageInstruction">
      <path value="MedicationRequest.dosageInstruction" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="MedicationRequest.dosageInstruction.id">
      <path value="MedicationRequest.dosageInstruction.id" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dosageInstruction.extension">
      <path value="MedicationRequest.dosageInstruction.extension" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dosageInstruction.modifierExtension">
      <path value="MedicationRequest.dosageInstruction.modifierExtension" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dosageInstruction.sequence">
      <path value="MedicationRequest.dosageInstruction.sequence" />
      <short value="The sequence number of the dosage instructions for step or variable dose" />
      <definition value="Sequence identifier within the medication item group." />
    </element>
    <element id="MedicationRequest.dosageInstruction.text">
      <path value="MedicationRequest.dosageInstruction.text" />
      <definition value="Information describing how this medication item is to be administered." />
    </element>
    <element id="MedicationRequest.dosageInstruction.additionalInstruction">
      <path value="MedicationRequest.dosageInstruction.additionalInstruction" />
      <max value="1" />
    </element>
    <element id="MedicationRequest.dosageInstruction.additionalInstruction.id">
      <path value="MedicationRequest.dosageInstruction.additionalInstruction.id" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dosageInstruction.additionalInstruction.extension">
      <path value="MedicationRequest.dosageInstruction.additionalInstruction.extension" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dosageInstruction.additionalInstruction.coding">
      <path value="MedicationRequest.dosageInstruction.additionalInstruction.coding" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dosageInstruction.additionalInstruction.text">
      <path value="MedicationRequest.dosageInstruction.additionalInstruction.text" />
      <definition value="Any additional information required to safely describe the administration or supply of this medication item." />
      <min value="1" />
    </element>
    <element id="MedicationRequest.dosageInstruction.patientInstruction">
      <path value="MedicationRequest.dosageInstruction.patientInstruction" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dosageInstruction.timing">
      <path value="MedicationRequest.dosageInstruction.timing" />
      <definition value="When medication should be administered. Frequency code, duration and durationUnits. Refer to https://hl7.org/fhir/datatypes.html#timing on how to populate timing. For example duration code &quot;1 week&quot; and frquency code &quot;every morning&quot; will map to period &quot;1&quot;, periodUnit &quot;week&quot; and when &quot;MORN&quot;" />
    </element>
    <element id="MedicationRequest.dosageInstruction.timing.id">
      <path value="MedicationRequest.dosageInstruction.timing.id" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dosageInstruction.timing.extension">
      <path value="MedicationRequest.dosageInstruction.timing.extension" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dosageInstruction.timing.modifierExtension">
      <path value="MedicationRequest.dosageInstruction.timing.modifierExtension" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dosageInstruction.timing.event">
      <path value="MedicationRequest.dosageInstruction.timing.event" />
      <max value="1" />
    </element>
    <element id="MedicationRequest.dosageInstruction.timing.repeat.id">
      <path value="MedicationRequest.dosageInstruction.timing.repeat.id" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dosageInstruction.timing.repeat.extension">
      <path value="MedicationRequest.dosageInstruction.timing.repeat.extension" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dosageInstruction.timing.repeat.bounds[x]">
      <path value="MedicationRequest.dosageInstruction.timing.repeat.bounds[x]" />
      <type>
        <code value="Period" />
      </type>
    </element>
    <element id="MedicationRequest.dosageInstruction.timing.repeat.periodUnit">
      <path value="MedicationRequest.dosageInstruction.timing.repeat.periodUnit" />
      <definition value="Unit of measure for duration." />
    </element>
    <element id="MedicationRequest.dosageInstruction.timing.repeat.dayOfWeek">
      <path value="MedicationRequest.dosageInstruction.timing.repeat.dayOfWeek" />
      <max value="1" />
    </element>
    <element id="MedicationRequest.dosageInstruction.timing.repeat.timeOfDay">
      <path value="MedicationRequest.dosageInstruction.timing.repeat.timeOfDay" />
      <max value="1" />
    </element>
    <element id="MedicationRequest.dosageInstruction.timing.repeat.when">
      <path value="MedicationRequest.dosageInstruction.timing.repeat.when" />
      <max value="1" />
    </element>
    <element id="MedicationRequest.dosageInstruction.timing.code">
      <path value="MedicationRequest.dosageInstruction.timing.code" />
      <definition value="Timing schedule for administering the medication." />
      <binding>
        <strength value="preferred" />
        <valueSet value="https://fhir.synapxe.sg/ValueSet/medication-frequency" />
      </binding>
    </element>
    <element id="MedicationRequest.dosageInstruction.timing.code.coding.userSelected">
      <path value="MedicationRequest.dosageInstruction.timing.code.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dosageInstruction.asNeeded">
      <path value="MedicationRequest.dosageInstruction.asNeeded" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dosageInstruction.asNeededFor">
      <path value="MedicationRequest.dosageInstruction.asNeededFor" />
      <short value="Frequency qualifier. Take &quot;as needed&quot; (for x)" />
      <definition value="A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text." />
      <comment value="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." />
      <max value="1" />
    </element>
    <element id="MedicationRequest.dosageInstruction.asNeededFor.extension">
      <path value="MedicationRequest.dosageInstruction.asNeededFor.extension" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dosageInstruction.asNeededFor.coding">
      <path value="MedicationRequest.dosageInstruction.asNeededFor.coding" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dosageInstruction.asNeededFor.text">
      <path value="MedicationRequest.dosageInstruction.asNeededFor.text" />
      <definition value="Prerequisite for the administration of the medication item." />
      <min value="1" />
    </element>
    <element id="MedicationRequest.dosageInstruction.site">
      <path value="MedicationRequest.dosageInstruction.site" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dosageInstruction.route">
      <path value="MedicationRequest.dosageInstruction.route" />
      <definition value="Route by which the medication item is administered." />
      <type>
        <code value="CodeableConcept" />
        <profile value="https://fhir.synapxe.sg/StructureDefinition/profile-codeableconcept" />
      </type>
      <binding>
        <strength value="required" />
        <description value="A coded concept describing the route or physiological path of administration of a therapeutic agent into or onto the body of a subject." />
        <valueSet value="https://fhir.synapxe.sg/ValueSet/medication-route" />
      </binding>
    </element>
    <element id="MedicationRequest.dosageInstruction.route.extension">
      <path value="MedicationRequest.dosageInstruction.route.extension" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dosageInstruction.method">
      <path value="MedicationRequest.dosageInstruction.method" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dosageInstruction.doseAndRate.id">
      <path value="MedicationRequest.dosageInstruction.doseAndRate.id" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dosageInstruction.doseAndRate.extension">
      <path value="MedicationRequest.dosageInstruction.doseAndRate.extension" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dosageInstruction.doseAndRate.type">
      <path value="MedicationRequest.dosageInstruction.doseAndRate.type" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dosageInstruction.doseAndRate.dose[x]">
      <path value="MedicationRequest.dosageInstruction.doseAndRate.dose[x]" />
      <definition value="Carries these NEHR XML elements of putOrderedMedications:&#xA;&#xA;- `medicationOrder/medicationItem/doseQuantity/lowValue`: Simple quantity or low value of a dose range.&#xA;- `medicationOrder/medicationItem/doseQuantity/lowUnit`: Unit of measure for lowValue.&#xA;- `medicationOrder/medicationItem/doseQuantity/highValue`: High value of the dose range.&#xA;- `medicationOrder/medicationItem/doseQuantity/highUnit`: Unit of measure for highValue." />
      <min value="1" />
      <type>
        <code value="Range" />
      </type>
    </element>
    <element id="MedicationRequest.dosageInstruction.maxDosePerPeriod">
      <path value="MedicationRequest.dosageInstruction.maxDosePerPeriod" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dosageInstruction.maxDosePerAdministration">
      <path value="MedicationRequest.dosageInstruction.maxDosePerAdministration" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dosageInstruction.maxDosePerLifetime">
      <path value="MedicationRequest.dosageInstruction.maxDosePerLifetime" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dispenseRequest.id">
      <path value="MedicationRequest.dispenseRequest.id" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dispenseRequest.extension">
      <path value="MedicationRequest.dispenseRequest.extension" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dispenseRequest.modifierExtension">
      <path value="MedicationRequest.dispenseRequest.modifierExtension" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dispenseRequest.initialFill">
      <path value="MedicationRequest.dispenseRequest.initialFill" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dispenseRequest.dispenseInterval">
      <path value="MedicationRequest.dispenseRequest.dispenseInterval" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dispenseRequest.validityPeriod">
      <path value="MedicationRequest.dispenseRequest.validityPeriod" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dispenseRequest.numberOfRepeatsAllowed">
      <path value="MedicationRequest.dispenseRequest.numberOfRepeatsAllowed" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dispenseRequest.quantity.id">
      <path value="MedicationRequest.dispenseRequest.quantity.id" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dispenseRequest.quantity.extension">
      <path value="MedicationRequest.dispenseRequest.quantity.extension" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dispenseRequest.quantity.value">
      <path value="MedicationRequest.dispenseRequest.quantity.value" />
      <definition value="Number of units, volume or package size ordered." />
      <min value="1" />
    </element>
    <element id="MedicationRequest.dispenseRequest.quantity.unit">
      <path value="MedicationRequest.dispenseRequest.quantity.unit" />
      <definition value="Unit of measure for quantityOrdered." />
      <min value="1" />
    </element>
    <element id="MedicationRequest.dispenseRequest.quantity.system">
      <path value="MedicationRequest.dispenseRequest.quantity.system" />
      <min value="0" />
    </element>
    <element id="MedicationRequest.dispenseRequest.quantity.code">
      <path value="MedicationRequest.dispenseRequest.quantity.code" />
      <min value="0" />
    </element>
    <element id="MedicationRequest.dispenseRequest.expectedSupplyDuration">
      <path value="MedicationRequest.dispenseRequest.expectedSupplyDuration" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dispenseRequest.expectedSupplyDuration.id">
      <path value="MedicationRequest.dispenseRequest.expectedSupplyDuration.id" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dispenseRequest.expectedSupplyDuration.extension">
      <path value="MedicationRequest.dispenseRequest.expectedSupplyDuration.extension" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dispenseRequest.expectedSupplyDuration.value">
      <path value="MedicationRequest.dispenseRequest.expectedSupplyDuration.value" />
      <min value="1" />
    </element>
    <element id="MedicationRequest.dispenseRequest.expectedSupplyDuration.comparator">
      <path value="MedicationRequest.dispenseRequest.expectedSupplyDuration.comparator" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dispenseRequest.expectedSupplyDuration.unit">
      <path value="MedicationRequest.dispenseRequest.expectedSupplyDuration.unit" />
      <min value="1" />
    </element>
    <element id="MedicationRequest.dispenseRequest.expectedSupplyDuration.system">
      <path value="MedicationRequest.dispenseRequest.expectedSupplyDuration.system" />
      <min value="1" />
    </element>
    <element id="MedicationRequest.dispenseRequest.expectedSupplyDuration.code">
      <path value="MedicationRequest.dispenseRequest.expectedSupplyDuration.code" />
      <min value="1" />
    </element>
    <element id="MedicationRequest.dispenseRequest.dispenser">
      <path value="MedicationRequest.dispenseRequest.dispenser" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.synapxe.sg/StructureDefinition/profile-location" />
      </type>
    </element>
    <element id="MedicationRequest.dispenseRequest.dispenser.id">
      <path value="MedicationRequest.dispenseRequest.dispenser.id" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dispenseRequest.dispenser.extension">
      <path value="MedicationRequest.dispenseRequest.dispenser.extension" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dispenseRequest.dispenser.reference">
      <path value="MedicationRequest.dispenseRequest.dispenser.reference" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dispenseRequest.dispenser.type">
      <path value="MedicationRequest.dispenseRequest.dispenser.type" />
      <min value="1" />
      <patternUri value="Location" />
    </element>
    <element id="MedicationRequest.dispenseRequest.dispenser.identifier">
      <path value="MedicationRequest.dispenseRequest.dispenser.identifier" />
      <min value="1" />
    </element>
    <element id="MedicationRequest.dispenseRequest.dispenser.identifier.id">
      <path value="MedicationRequest.dispenseRequest.dispenser.identifier.id" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dispenseRequest.dispenser.identifier.extension">
      <path value="MedicationRequest.dispenseRequest.dispenser.identifier.extension" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dispenseRequest.dispenser.identifier.use">
      <path value="MedicationRequest.dispenseRequest.dispenser.identifier.use" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dispenseRequest.dispenser.identifier.type">
      <path value="MedicationRequest.dispenseRequest.dispenser.identifier.type" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dispenseRequest.dispenser.identifier.system">
      <path value="MedicationRequest.dispenseRequest.dispenser.identifier.system" />
      <min value="1" />
    </element>
    <element id="MedicationRequest.dispenseRequest.dispenser.identifier.value">
      <path value="MedicationRequest.dispenseRequest.dispenser.identifier.value" />
      <min value="1" />
    </element>
    <element id="MedicationRequest.dispenseRequest.dispenser.identifier.period">
      <path value="MedicationRequest.dispenseRequest.dispenser.identifier.period" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dispenseRequest.dispenser.identifier.assigner">
      <path value="MedicationRequest.dispenseRequest.dispenser.identifier.assigner" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dispenseRequest.dispenser.display">
      <path value="MedicationRequest.dispenseRequest.dispenser.display" />
      <min value="1" />
    </element>
    <element id="MedicationRequest.dispenseRequest.dispenserInstruction">
      <path value="MedicationRequest.dispenseRequest.dispenserInstruction" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dispenseRequest.doseAdministrationAid">
      <path value="MedicationRequest.dispenseRequest.doseAdministrationAid" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.substitution">
      <path value="MedicationRequest.substitution" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.eventHistory">
      <path value="MedicationRequest.eventHistory" />
      <max value="0" />
    </element>
  </differential>
</StructureDefinition>