<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="MedicationRequest" />
  <meta>
    <lastUpdated value="2022-10-05T04:55:02.2778307+00:00" />
  </meta>
  <extension url="https://fhir.kemkes.go.id/r4/StructureDefinition/structuredefinition-category">
    <valueString value="Clinical.Medications" />
  </extension>
  <extension url="https://fhir.kemkes.go.id/r4/StructureDefinition/structuredefinition-standards-status">
    <valueCode value="trial-use" />
  </extension>
  <extension url="https://fhir.kemkes.go.id/r4/StructureDefinition/structuredefinition-fmm">
    <valueInteger value="3" />
  </extension>
  <extension url="https://fhir.kemkes.go.id/r4/StructureDefinition/structuredefinition-security-category">
    <valueCode value="patient" />
  </extension>
  <extension url="https://fhir.kemkes.go.id/r4/StructureDefinition/structuredefinition-wg">
    <valueCode value="phx" />
  </extension>
  <url value="https://fhir.kemkes.go.id/r4/StructureDefinition/MedicationRequest" />
  <version value="4.0.1" />
  <name value="MedicationRequest" />
  <status value="active" />
  <date value="2023-05-12T03:54:04.8907436+00:00" />
  <publisher value="Health Level Seven International (Pharmacy)" />
  <contact>
    <telecom>
      <system value="url" />
      <value value="http://hl7.org/fhir" />
    </telecom>
  </contact>
  <contact>
    <telecom>
      <system value="url" />
      <value value="http://www.hl7.org/Special/committees/medication/index.cfm" />
    </telecom>
  </contact>
  <description value="An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called &quot;MedicationRequest&quot; rather than &quot;MedicationPrescription&quot; or &quot;MedicationOrder&quot; to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns." />
  <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="https://fhir.kemkes.go.id/r4/StructureDefinition/DomainResource" />
  <derivation value="specialization" />
  <differential>
    <element id="MedicationRequest">
      <path value="MedicationRequest" />
      <short value="Ordering of medication for patient or group" />
      <definition value="An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called &quot;MedicationRequest&quot; rather than &quot;MedicationPrescription&quot; or &quot;MedicationOrder&quot; to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns." />
      <alias value="Prescription" />
      <alias value="Order" />
      <mapping>
        <identity value="workflow" />
        <map value="Request" />
      </mapping>
      <mapping>
        <identity value="script10.6" />
        <map value="Message/Body/NewRx" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="CombinedMedicationRequest" />
      </mapping>
    </element>
    <element id="MedicationRequest.identifier">
      <path value="MedicationRequest.identifier" />
      <short value="External ids for this request" />
      <definition value="Identifiers associated with this medication request that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server." />
      <comment value="This is a business identifier, not a resource identifier." />
      <type>
        <code value="Identifier" />
      </type>
      <mapping>
        <identity value="workflow" />
        <map value="Request.identifier" />
      </mapping>
      <mapping>
        <identity value="script10.6" />
        <map value="Message/Header/PrescriberOrderNumber" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.identifier" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="ORC-2-Placer Order Number / ORC-3-Filler Order Number" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".id" />
      </mapping>
    </element>
    <element id="MedicationRequest.status">
      <path value="MedicationRequest.status" />
      <short value="active | on-hold | cancelled | completed | entered-in-error | stopped | draft | unknown" />
      <definition value="A code specifying the current state of the order.  Generally, this will be active or completed state." />
      <comment value="This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="code" />
      </type>
      <isModifier value="true" />
      <isModifierReason value="This element is labeled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid" />
      <isSummary value="true" />
      <binding>
        <extension url="https://fhir.kemkes.go.id/r4/StructureDefinition/elementdefinition-bindingName">
          <valueString value="MedicationRequestStatus" />
        </extension>
        <strength value="required" />
        <description value="A coded concept specifying the state of the prescribing event. Describes the lifecycle of the prescription." />
        <valueSet value="http://hl7.org/fhir/ValueSet/medicationrequest-status|4.0.1" />
      </binding>
      <mapping>
        <identity value="workflow" />
        <map value="Request.status" />
      </mapping>
      <mapping>
        <identity value="script10.6" />
        <map value="no mapping" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.status" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".statusCode" />
      </mapping>
    </element>
    <element id="MedicationRequest.statusReason">
      <path value="MedicationRequest.statusReason" />
      <short value="Reason for current status" />
      <definition value="Captures the reason for the current state of the MedicationRequest." />
      <comment value="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." />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <binding>
        <extension url="https://fhir.kemkes.go.id/r4/StructureDefinition/elementdefinition-bindingName">
          <valueString value="MedicationRequestStatusReason" />
        </extension>
        <strength value="example" />
        <description value="Identifies the reasons for a given status." />
        <valueSet value="http://hl7.org/fhir/ValueSet/medicationrequest-status-reason" />
      </binding>
      <mapping>
        <identity value="workflow" />
        <map value="Request.statusReason" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".inboundRelationship[typeCode=SUBJ].source[classCode=CACT, moodCode=EVN].reasonCOde" />
      </mapping>
    </element>
    <element id="MedicationRequest.intent">
      <path value="MedicationRequest.intent" />
      <short value="proposal | plan | order | original-order | reflex-order | filler-order | instance-order | option" />
      <definition value="Whether the request is a proposal, plan, or an original order." />
      <comment value="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." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="code" />
      </type>
      <isModifier value="true" />
      <isModifierReason value="This element changes the interpretation of all descriptive attributes. For example &quot;the time the request is recommended to occur&quot; vs. &quot;the time the request is authorized to occur&quot; or &quot;who is recommended to perform the request&quot; vs. &quot;who is authorized to perform the request" />
      <isSummary value="true" />
      <binding>
        <extension url="https://fhir.kemkes.go.id/r4/StructureDefinition/elementdefinition-bindingName">
          <valueString value="MedicationRequestIntent" />
        </extension>
        <strength value="required" />
        <description value="The kind of medication order." />
        <valueSet value="http://hl7.org/fhir/ValueSet/medicationrequest-intent|4.0.1" />
      </binding>
      <mapping>
        <identity value="workflow" />
        <map value="Request.intent" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.class" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".moodCode (nuances beyond PRP/PLAN/RQO would need to be elsewhere)" />
      </mapping>
    </element>
    <element id="MedicationRequest.category">
      <path value="MedicationRequest.category" />
      <short value="Type of medication usage" />
      <definition value="Indicates the type of medication request (for example, where the medication is expected to be consumed or administered (i.e. inpatient or outpatient))." />
      <comment value="The category can be used to include where the medication is expected to be consumed or other types of requests." />
      <type>
        <code value="CodeableConcept" />
      </type>
      <binding>
        <extension url="https://fhir.kemkes.go.id/r4/StructureDefinition/elementdefinition-bindingName">
          <valueString value="MedicationRequestCategory" />
        </extension>
        <strength value="example" />
        <description value="A coded concept identifying the category of medication request.  For example, where the medication is to be consumed or administered, or the type of medication treatment." />
        <valueSet value="http://hl7.org/fhir/ValueSet/medicationrequest-category" />
      </binding>
      <mapping>
        <identity value="script10.6" />
        <map value="Message/Body/NewRx/MedicationPrescribed/Directions&#xD;&#xD;or &#xD;&#xD;Message/Body/NewRx/MedicationPrescribed/StructuredSIG" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.class" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".inboundRelationship[typeCode=COMP].source[classCode=OBS, moodCode=EVN, code=&quot;type of medication usage&quot;].value" />
      </mapping>
    </element>
    <element id="MedicationRequest.priority">
      <path value="MedicationRequest.priority" />
      <short value="routine | urgent | asap | stat" />
      <definition value="Indicates how quickly the Medication Request should be addressed with respect to other requests." />
      <max value="1" />
      <type>
        <code value="code" />
      </type>
      <isSummary value="true" />
      <binding>
        <extension url="https://fhir.kemkes.go.id/r4/StructureDefinition/elementdefinition-bindingName">
          <valueString value="MedicationRequestPriority" />
        </extension>
        <strength value="required" />
        <description value="Identifies the level of importance to be assigned to actioning the request." />
        <valueSet value="http://hl7.org/fhir/ValueSet/request-priority|4.0.1" />
      </binding>
      <mapping>
        <identity value="workflow" />
        <map value="Request.priority" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.grade" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".priorityCode" />
      </mapping>
    </element>
    <element id="MedicationRequest.doNotPerform">
      <path value="MedicationRequest.doNotPerform" />
      <short value="True if request is prohibiting action" />
      <definition value="If true indicates that the provider is asking for the medication request not to occur." />
      <comment value="If do not perform is not specified, the request is a positive request e.g. &quot;do perform&quot;." />
      <max value="1" />
      <type>
        <code value="boolean" />
      </type>
      <isModifier value="true" />
      <isModifierReason value="This element is labeled as a modifier because this element negates the request to occur (ie, this is a request for the medication not to be ordered or prescribed, etc)" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="SubstanceAdministration.actionNegationInd" />
      </mapping>
    </element>
    <element id="MedicationRequest.reported[x]">
      <path value="MedicationRequest.reported[x]" />
      <short value="Reported rather than primary record" />
      <definition value="Indicates if this record was captured as a secondary 'reported' record rather than as an original primary source-of-truth record.  It may also indicate the source of the report." />
      <max value="1" />
      <type>
        <code value="boolean" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/Patient" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/Practitioner" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/PractitionerRole" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/RelatedPerson" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/Organization" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value=".participation[typeCode=INF].role" />
      </mapping>
    </element>
    <element id="MedicationRequest.medication[x]">
      <path value="MedicationRequest.medication[x]" />
      <short value="Medication to be taken" />
      <definition value="Identifies the medication being requested. This is a link to a resource that represents the medication which may be the details of the medication or simply an attribute carrying a code that identifies the medication from a known list of medications." />
      <comment value="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." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/Medication" />
      </type>
      <isSummary value="true" />
      <binding>
        <extension url="https://fhir.kemkes.go.id/r4/StructureDefinition/elementdefinition-bindingName">
          <valueString value="MedicationCode" />
        </extension>
        <strength value="example" />
        <description value="A coded concept identifying substance or product that can be ordered." />
        <valueSet value="http://hl7.org/fhir/ValueSet/medication-codes" />
      </binding>
      <mapping>
        <identity value="workflow" />
        <map value="Request.code" />
      </mapping>
      <mapping>
        <identity value="script10.6" />
        <map value="Message/Body/NewRx/MedicationPrescribed&#xD;&#xD;Medication.code.coding.code = Message/Body/NewRx/MedicationPrescribed/DrugCoded/ProductCode&#xD;&#xD;Medication.code.coding.system = Message/Body/NewRx/MedicationPrescribed/DrugCoded/ProductCodeQualifier&#xD;&#xD;Medication.code.coding.display = Message/Body/NewRx/MedicationPrescribed/DrugDescription" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.what[x]" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="RXE-2-Give Code / RXO-1-Requested Give Code / RXC-2-Component Code" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="consumable.administrableMedication" />
      </mapping>
    </element>
    <element id="MedicationRequest.subject">
      <path value="MedicationRequest.subject" />
      <short value="Who or group medication request is for" />
      <definition value="A link to a resource representing the person or set of individuals to whom the medication will be given." />
      <comment value="The subject on a medication request is mandatory.  For the secondary use case where the actual subject is not provided, there still must be an anonymized subject specified." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/Patient" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/Group" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="workflow" />
        <map value="Request.subject" />
      </mapping>
      <mapping>
        <identity value="script10.6" />
        <map value="Message/Body/NewRx/Patient&#xD;&#xD;(need detail to link to specific patient … Patient.Identification in SCRIPT)" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.subject[x]" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="PID-3-Patient ID List" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".participation[typeCode=AUT].role" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.subject" />
      </mapping>
    </element>
    <element id="MedicationRequest.encounter">
      <path value="MedicationRequest.encounter" />
      <short value="Encounter created as part of encounter/admission/stay" />
      <definition value="The Encounter during which this [x] was created or to which the creation of this record is tightly associated." />
      <comment value="This will typically be the encounter the event occurred within, but some activities may be initiated prior to or after the official completion of an encounter but still be tied to the context of the encounter.&quot;    If there is a need to link to episodes of care they will be handled with an extension." />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/Encounter" />
      </type>
      <mapping>
        <identity value="workflow" />
        <map value="Request.context" />
      </mapping>
      <mapping>
        <identity value="script10.6" />
        <map value="no mapping" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.context" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="PV1-19-Visit Number" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".inboundRelationship[typeCode=COMP].source[classCode=ENC, moodCode=EVN, code=&quot;type of encounter or episode&quot;]" />
      </mapping>
    </element>
    <element id="MedicationRequest.supportingInformation">
      <path value="MedicationRequest.supportingInformation" />
      <short value="Information to support ordering of the medication" />
      <definition value="Include additional information (for example, patient height and weight) that supports the ordering of the medication." />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/Resource" />
      </type>
      <mapping>
        <identity value="workflow" />
        <map value="Request.supportingInfo" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.context" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".outboundRelationship[typeCode=PERT].target[A_SupportingClinicalStatement CMET minimal with many different choices of classCodes(ORG, ENC, PROC, SPLY, SBADM, OBS) and each of the act class codes draws from one or more of the following moodCodes (EVN, DEF, INT PRMS, RQO, PRP, APT, ARQ, GOL)]" />
      </mapping>
    </element>
    <element id="MedicationRequest.authoredOn">
      <path value="MedicationRequest.authoredOn" />
      <short value="When request was initially authored" />
      <definition value="The date (and perhaps time) when the prescription was initially written or authored on." />
      <max value="1" />
      <type>
        <code value="dateTime" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="workflow" />
        <map value="Request.authoredOn" />
      </mapping>
      <mapping>
        <identity value="script10.6" />
        <map value="Message/Body/NewRx/MedicationPrescribed/WrittenDate" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.recorded" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="RXE-32-Original Order Date/Time / ORC-9-Date/Time of Transaction" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="author.time" />
      </mapping>
    </element>
    <element id="MedicationRequest.requester">
      <path value="MedicationRequest.requester" />
      <short value="Who/What requested the Request" />
      <definition value="The individual, organization, or device that initiated the request and has responsibility for its activation." />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/Practitioner" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/PractitionerRole" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/Organization" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/Patient" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/RelatedPerson" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/Device" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="workflow" />
        <map value="Request.requester" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.author" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".participation[typeCode=AUT].role" />
      </mapping>
    </element>
    <element id="MedicationRequest.performer">
      <path value="MedicationRequest.performer" />
      <short value="Intended performer of administration" />
      <definition value="The specified desired performer of the medication treatment (e.g. the performer of the medication administration)." />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/Practitioner" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/PractitionerRole" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/Organization" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/Patient" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/Device" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/RelatedPerson" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/CareTeam" />
      </type>
      <mapping>
        <identity value="workflow" />
        <map value="Request.performer" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.actor" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".participation[typeCode=PRF].role[scoper.determinerCode=INSTANCE]" />
      </mapping>
    </element>
    <element id="MedicationRequest.performerType">
      <path value="MedicationRequest.performerType" />
      <short value="Desired kind of performer of the medication administration" />
      <definition value="Indicates the type of performer of the administration of the medication." />
      <comment value="If specified without indicating a performer, this indicates that the performer must be of the specified type. If specified with a performer then it indicates the requirements of the performer if the designated performer is not available." />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <isSummary value="true" />
      <binding>
        <extension url="https://fhir.kemkes.go.id/r4/StructureDefinition/elementdefinition-bindingName">
          <valueString value="MedicationRequestPerformerType" />
        </extension>
        <strength value="example" />
        <description value="Identifies the type of individual that is desired to administer the medication." />
        <valueSet value="http://hl7.org/fhir/ValueSet/performer-role" />
      </binding>
      <mapping>
        <identity value="workflow" />
        <map value="Request.performerType" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".participation[typeCode=PRF].role[scoper.determinerCode=KIND].code" />
      </mapping>
    </element>
    <element id="MedicationRequest.recorder">
      <path value="MedicationRequest.recorder" />
      <short value="Person who entered the request" />
      <definition value="The person who entered the order on behalf of another individual for example in the case of a verbal or a telephone order." />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/Practitioner" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/PractitionerRole" />
      </type>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.who" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".participation[typeCode=TRANS].role[classCode=ASSIGNED].code (HealthcareProviderType)" />
      </mapping>
    </element>
    <element id="MedicationRequest.reasonCode">
      <path value="MedicationRequest.reasonCode" />
      <short value="Reason or indication for ordering or not ordering the medication" />
      <definition value="The reason or the indication for ordering or not ordering the medication." />
      <comment value="This could be a diagnosis code. If a full condition record exists or additional detail is needed, use reasonReference." />
      <type>
        <code value="CodeableConcept" />
      </type>
      <binding>
        <extension url="https://fhir.kemkes.go.id/r4/StructureDefinition/elementdefinition-bindingName">
          <valueString value="MedicationRequestReason" />
        </extension>
        <strength value="example" />
        <description value="A coded concept indicating why the medication was ordered." />
        <valueSet value="http://hl7.org/fhir/ValueSet/condition-code" />
      </binding>
      <mapping>
        <identity value="workflow" />
        <map value="Request.reasonCode" />
      </mapping>
      <mapping>
        <identity value="script10.6" />
        <map value="Message/Body/NewRx/MedicationPrescribed/Diagnosis/Primary/Value" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.why[x]" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="ORC-16-Order Control Code Reason /RXE-27-Give Indication/RXO-20-Indication / RXD-21-Indication / RXG-22-Indication / RXA-19-Indication" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="reason.observation.reasonCode" />
      </mapping>
    </element>
    <element id="MedicationRequest.reasonReference">
      <path value="MedicationRequest.reasonReference" />
      <short value="Condition or observation that supports why the prescription is being written" />
      <definition value="Condition or observation that supports why the medication was ordered." />
      <comment value="This is a reference to a condition or observation that is the reason for the medication order.  If only a code exists, use reasonCode." />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/Condition" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/Observation" />
      </type>
      <mapping>
        <identity value="workflow" />
        <map value="Request.reasonReference" />
      </mapping>
      <mapping>
        <identity value="script10.6" />
        <map value="no mapping" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.why[x]" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="reason.observation[code=ASSERTION].value" />
      </mapping>
    </element>
    <element id="MedicationRequest.instantiatesCanonical">
      <path value="MedicationRequest.instantiatesCanonical" />
      <short value="Instantiates FHIR protocol or definition" />
      <definition value="The URL pointing to a protocol, guideline, orderset, or other definition that is adhered to in whole or in part by this MedicationRequest." />
      <type>
        <code value="canonical" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="workflow" />
        <map value="Request.instantiates" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".outboundRelationship[typeCode=DEFN].target" />
      </mapping>
    </element>
    <element id="MedicationRequest.instantiatesUri">
      <path value="MedicationRequest.instantiatesUri" />
      <short value="Instantiates external protocol or definition" />
      <definition value="The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this MedicationRequest." />
      <type>
        <code value="uri" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value=".outboundRelationship[typeCode=DEFN].target" />
      </mapping>
    </element>
    <element id="MedicationRequest.basedOn">
      <path value="MedicationRequest.basedOn" />
      <short value="What request fulfills" />
      <definition value="A plan or request that is fulfilled in whole or in part by this medication request." />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/CarePlan" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/MedicationRequest" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/ServiceRequest" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/ImmunizationRecommendation" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="workflow" />
        <map value="Request.basedOn" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".outboundRelationship[typeCode=FLFS].target[classCode=SBADM or PROC or PCPR or OBS, moodCode=RQO orPLAN or PRP]" />
      </mapping>
    </element>
    <element id="MedicationRequest.groupIdentifier">
      <path value="MedicationRequest.groupIdentifier" />
      <short value="Composite request this is part of" />
      <definition value="A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition or prescription." />
      <requirements value="Requests are linked either by a &quot;basedOn&quot; relationship (i.e. one request is fulfilling another) or by having a common requisition. Requests that are part of the same requisition are generally treated independently from the perspective of changing their state or maintaining them after initial creation." />
      <max value="1" />
      <type>
        <code value="Identifier" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="workflow" />
        <map value="Request.groupIdentifier" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".outboundRelationship(typeCode=COMP].target[classCode=SBADM, moodCode=INT].id" />
      </mapping>
    </element>
    <element id="MedicationRequest.courseOfTherapyType">
      <path value="MedicationRequest.courseOfTherapyType" />
      <short value="Overall pattern of medication administration" />
      <definition value="The description of the overall patte3rn of the administration of the medication to the patient." />
      <comment value="This attribute should not be confused with the protocol of the medication." />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <binding>
        <extension url="https://fhir.kemkes.go.id/r4/StructureDefinition/elementdefinition-bindingName">
          <valueString value="MedicationRequestCourseOfTherapy" />
        </extension>
        <strength value="example" />
        <description value="Identifies the overall pattern of medication administratio." />
        <valueSet value="http://hl7.org/fhir/ValueSet/medicationrequest-course-of-therapy" />
      </binding>
      <mapping>
        <identity value="rim" />
        <map value="Act.code where classCode = LIST and moodCode = EVN" />
      </mapping>
    </element>
    <element id="MedicationRequest.insurance">
      <path value="MedicationRequest.insurance" />
      <short value="Associated insurance coverage" />
      <definition value="Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be required for delivering the requested service." />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/Coverage" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/ClaimResponse" />
      </type>
      <mapping>
        <identity value="workflow" />
        <map value="Request.insurance" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".outboundRelationship[typeCode=COVBY].target" />
      </mapping>
    </element>
    <element id="MedicationRequest.note">
      <path value="MedicationRequest.note" />
      <short value="Information about the prescription" />
      <definition value="Extra information about the prescription that could not be conveyed by the other attributes." />
      <type>
        <code value="Annotation" />
      </type>
      <mapping>
        <identity value="workflow" />
        <map value="Request.note" />
      </mapping>
      <mapping>
        <identity value="script10.6" />
        <map value="Message/Body/NewRx/MedicationPrescribed/Note" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".inboundRelationship[typeCode=SUBJ]/source[classCode=OBS,moodCode=EVN,code=&quot;annotation&quot;].value" />
      </mapping>
    </element>
    <element id="MedicationRequest.dosageInstruction">
      <path value="MedicationRequest.dosageInstruction" />
      <short value="How the medication should be taken" />
      <definition value="Indicates how the medication is to be used by the patient." />
      <comment value="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." />
      <type>
        <code value="Dosage" />
      </type>
      <mapping>
        <identity value="workflow" />
        <map value="Request.occurrence[x]" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="see dosageInstruction mapping" />
      </mapping>
    </element>
    <element id="MedicationRequest.dispenseRequest">
      <path value="MedicationRequest.dispenseRequest" />
      <short value="Medication supply authorization" />
      <definition value="Indicates the specific details for the dispense or medication supply part of a medication request (also known as a Medication Prescription or Medication Order).  Note that this information is not always sent with the order.  There may be in some settings (e.g. hospitals) institutional or system support for completing the dispense details in the pharmacy department." />
      <max value="1" />
      <type>
        <code value="BackboneElement" />
      </type>
      <mapping>
        <identity value="script10.6" />
        <map value="Message/Body/NewRx/MedicationPrescribed/ExpirationDate" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="component.supplyEvent" />
      </mapping>
    </element>
    <element id="MedicationRequest.dispenseRequest.initialFill">
      <path value="MedicationRequest.dispenseRequest.initialFill" />
      <short value="First fill details" />
      <definition value="Indicates the quantity or duration for the first dispense of the medication." />
      <comment value="If populating this element, either the quantity or the duration must be included." />
      <max value="1" />
      <type>
        <code value="BackboneElement" />
      </type>
      <mapping>
        <identity value="rim" />
        <map value="SubstanceAdministration -&gt; ActRelationship[sequenceNumber = '1'] -&gt; Supply" />
      </mapping>
    </element>
    <element id="MedicationRequest.dispenseRequest.initialFill.quantity">
      <path value="MedicationRequest.dispenseRequest.initialFill.quantity" />
      <short value="First fill quantity" />
      <definition value="The amount or quantity to provide as part of the first dispense." />
      <max value="1" />
      <type>
        <code value="Quantity" />
        <profile value="https://fhir.kemkes.go.id/r4/StructureDefinition/SimpleQuantity" />
      </type>
      <mapping>
        <identity value="rim" />
        <map value="Supply.quantity[moodCode=RQO]" />
      </mapping>
    </element>
    <element id="MedicationRequest.dispenseRequest.initialFill.duration">
      <path value="MedicationRequest.dispenseRequest.initialFill.duration" />
      <short value="First fill duration" />
      <definition value="The length of time that the first dispense is expected to last." />
      <max value="1" />
      <type>
        <code value="Duration" />
      </type>
      <mapping>
        <identity value="rim" />
        <map value="Supply.effectivetime[moodCode=RQO]" />
      </mapping>
    </element>
    <element id="MedicationRequest.dispenseRequest.dispenseInterval">
      <path value="MedicationRequest.dispenseRequest.dispenseInterval" />
      <short value="Minimum period of time between dispenses" />
      <definition value="The minimum period of time that must occur between dispenses of the medication." />
      <max value="1" />
      <type>
        <code value="Duration" />
      </type>
      <mapping>
        <identity value="rim" />
        <map value="Supply.effectivetime[moodCode=RQO]" />
      </mapping>
    </element>
    <element id="MedicationRequest.dispenseRequest.validityPeriod">
      <path value="MedicationRequest.dispenseRequest.validityPeriod" />
      <short value="Time period supply is authorized for" />
      <definition value="This indicates the validity period of a prescription (stale dating the Prescription)." />
      <comment value="It reflects the prescribers' perspective for the validity of the prescription. Dispenses must not be made against the prescription outside of this period. The lower-bound of the Dispensing Window signifies the earliest date that the prescription can be filled for the first time. If an upper-bound is not specified then the Prescription is open-ended or will default to a stale-date based on regulations." />
      <requirements value="Indicates when the Prescription becomes valid, and when it ceases to be a dispensable Prescription." />
      <max value="1" />
      <type>
        <code value="Period" />
      </type>
      <mapping>
        <identity value="script10.6" />
        <map value="Message/Body/NewRx/MedicationPrescribed/Refills" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="effectiveTime" />
      </mapping>
    </element>
    <element id="MedicationRequest.dispenseRequest.numberOfRepeatsAllowed">
      <path value="MedicationRequest.dispenseRequest.numberOfRepeatsAllowed" />
      <short value="Number of refills authorized" />
      <definition value="An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus &quot;3 repeats&quot;, then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets.  A prescriber may explicitly say that zero refills are permitted after the initial dispense." />
      <comment value="If displaying &quot;number of authorized fills&quot;, add 1 to this number." />
      <max value="1" />
      <type>
        <code value="unsignedInt" />
      </type>
      <mapping>
        <identity value="script10.6" />
        <map value="Message/Body/NewRx/MedicationPrescribed/Quantity" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="RXE-12-Number of Refills" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="repeatNumber" />
      </mapping>
    </element>
    <element id="MedicationRequest.dispenseRequest.quantity">
      <path value="MedicationRequest.dispenseRequest.quantity" />
      <short value="Amount of medication to supply per dispense" />
      <definition value="The amount that is to be dispensed for one fill." />
      <max value="1" />
      <type>
        <code value="Quantity" />
        <profile value="https://fhir.kemkes.go.id/r4/StructureDefinition/SimpleQuantity" />
      </type>
      <mapping>
        <identity value="script10.6" />
        <map value="Message/Body/NewRx/MedicationPrescribed/DaysSupply" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="RXD-4-Actual Dispense Amount / RXD-5.1-Actual Dispense Units.code / RXD-5.3-Actual Dispense Units.name of coding system" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="quantity" />
      </mapping>
    </element>
    <element id="MedicationRequest.dispenseRequest.expectedSupplyDuration">
      <path value="MedicationRequest.dispenseRequest.expectedSupplyDuration" />
      <short value="Number of days supply per dispense" />
      <definition value="Identifies the period time over which the supplied product is expected to be used, or the length of time the dispense is expected to last." />
      <comment value="In some situations, this attribute may be used instead of quantity to identify the amount supplied by how long it is expected to last, rather than the physical quantity issued, e.g. 90 days supply of medication (based on an ordered dosage). When possible, it is always better to specify quantity, as this tends to be more precise. expectedSupplyDuration will always be an estimate that can be influenced by external factors." />
      <max value="1" />
      <type>
        <code value="Duration" />
      </type>
      <mapping>
        <identity value="script10.6" />
        <map value="Message/Body/NewRx/MedicationPrescribed/Substitutions" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="expectedUseTime" />
      </mapping>
    </element>
    <element id="MedicationRequest.dispenseRequest.performer">
      <path value="MedicationRequest.dispenseRequest.performer" />
      <short value="Intended dispenser" />
      <definition value="Indicates the intended dispensing Organization specified by the prescriber." />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/Organization" />
      </type>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.who" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".outboundRelationship[typeCode=COMP].target[classCode=SPLY, moodCode=RQO] .participation[typeCode=PRF].role[scoper.determinerCode=INSTANCE]" />
      </mapping>
    </element>
    <element id="MedicationRequest.substitution">
      <path value="MedicationRequest.substitution" />
      <short value="Any restrictions on medication substitution" />
      <definition value="Indicates whether or not substitution can or should be part of the dispense. In some cases, substitution must happen, in other cases substitution must not happen. This block explains the prescriber's intent. If nothing is specified substitution may be done." />
      <max value="1" />
      <type>
        <code value="BackboneElement" />
      </type>
      <mapping>
        <identity value="script10.6" />
        <map value="specific values within Message/Body/NewRx/MedicationPrescribed/Substitutions" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="subjectOf.substitutionPersmission" />
      </mapping>
    </element>
    <element id="MedicationRequest.substitution.allowed[x]">
      <path value="MedicationRequest.substitution.allowed[x]" />
      <short value="Whether substitution is allowed or not" />
      <definition value="True if the prescriber allows a different drug to be dispensed from what was prescribed." />
      <comment value="This element is labeled as a modifier because whether substitution is allow or not, it cannot be ignored." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="boolean" />
      </type>
      <type>
        <code value="CodeableConcept" />
      </type>
      <binding>
        <extension url="https://fhir.kemkes.go.id/r4/StructureDefinition/elementdefinition-bindingName">
          <valueString value="MedicationRequestSubstitution" />
        </extension>
        <strength value="example" />
        <description value="Identifies the type of substitution allowed." />
        <valueSet value="http://terminology.hl7.org/ValueSet/v3-ActSubstanceAdminSubstitutionCode" />
      </binding>
      <mapping>
        <identity value="script10.6" />
        <map value="specific values within Message/Body/NewRx/MedicationPrescribed/Substitutions" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="RXO-9-Allow Substitutions / RXE-9-Substitution Status" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="code" />
      </mapping>
    </element>
    <element id="MedicationRequest.substitution.reason">
      <path value="MedicationRequest.substitution.reason" />
      <short value="Why should (not) substitution be made" />
      <definition value="Indicates the reason for the substitution, or why substitution must or must not be performed." />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <binding>
        <extension url="https://fhir.kemkes.go.id/r4/StructureDefinition/elementdefinition-bindingName">
          <valueString value="MedicationIntendedSubstitutionReason" />
        </extension>
        <strength value="example" />
        <description value="A coded concept describing the reason that a different medication should (or should not) be substituted from what was prescribed." />
        <valueSet value="http://terminology.hl7.org/ValueSet/v3-SubstanceAdminSubstitutionReason" />
      </binding>
      <mapping>
        <identity value="script10.6" />
        <map value="not mapped" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="RXE-9 Substition status" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="reasonCode" />
      </mapping>
    </element>
    <element id="MedicationRequest.priorPrescription">
      <path value="MedicationRequest.priorPrescription" />
      <short value="An order/prescription that is being replaced" />
      <definition value="A link to a resource representing an earlier order related order or prescription." />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/MedicationRequest" />
      </type>
      <mapping>
        <identity value="workflow" />
        <map value="Request.replaces" />
      </mapping>
      <mapping>
        <identity value="script10.6" />
        <map value="not mapped" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".outboundRelationship[typeCode=?RPLC or ?SUCC]/target[classCode=SBADM,moodCode=RQO]" />
      </mapping>
    </element>
    <element id="MedicationRequest.detectedIssue">
      <path value="MedicationRequest.detectedIssue" />
      <short value="Clinical Issue with action" />
      <definition value="Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, duplicate therapy, dosage alert etc." />
      <comment value="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." />
      <alias value="Contraindication" />
      <alias value="Drug Utilization Review (DUR)" />
      <alias value="Alert" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/DetectedIssue" />
      </type>
      <mapping>
        <identity value="rim" />
        <map value=".inboundRelationship[typeCode=SUBJ]/source[classCode=ALRT,moodCode=EVN].value" />
      </mapping>
    </element>
    <element id="MedicationRequest.eventHistory">
      <path value="MedicationRequest.eventHistory" />
      <short value="A list of events of interest in the lifecycle" />
      <definition value="Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource." />
      <comment value="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.)." />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.kemkes.go.id/r4/StructureDefinition/Provenance" />
      </type>
      <mapping>
        <identity value="workflow" />
        <map value="Request.relevantHistory" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".inboundRelationship(typeCode=SUBJ].source[classCode=CACT, moodCode=EVN]" />
      </mapping>
    </element>
  </differential>
</StructureDefinition>