<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="vn-core-medication-request" />
  <url value="http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-medication-request" />
  <version value="1.0.0" />
  <name value="VNCoreMedicationRequest" />
  <title value="MedicationRequest Profile - VN Core R4" />
  <status value="draft" />
  <description value="Thông tin về chỉ định/y lệnh Dược tại Cơ sở khám, chữa bệnh. Tham khảo thêm: https://www.hl7.org/fhir/medications-module.html" />
  <copyright value="Bộ Y tế Việt Nam" />
  <fhirVersion value="4.0.1" />
  <mapping>
    <identity value="workflow" />
    <uri value="http://hl7.org/fhir/workflow" />
    <name value="Workflow Pattern" />
  </mapping>
  <mapping>
    <identity value="script10.6" />
    <uri value="http://ncpdp.org/SCRIPT10_6" />
    <name value="Mapping to NCPDP SCRIPT 10.6" />
  </mapping>
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <mapping>
    <identity value="w5" />
    <uri value="http://hl7.org/fhir/fivews" />
    <name value="FiveWs Pattern Mapping" />
  </mapping>
  <mapping>
    <identity value="v2" />
    <uri value="http://hl7.org/v2" />
    <name value="HL7 v2 Mapping" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="MedicationRequest" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/MedicationRequest" />
  <derivation value="constraint" />
  <differential>
    <element id="MedicationRequest.identifier">
      <path value="MedicationRequest.identifier" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.statusReason">
      <path value="MedicationRequest.statusReason" />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-codeableconcept" />
      </type>
    </element>
    <element id="MedicationRequest.category">
      <path value="MedicationRequest.category" />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-codeableconcept" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.medication[x]">
      <path value="MedicationRequest.medication[x]" />
      <slicing>
        <discriminator>
          <type value="type" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="MedicationRequest.medication[x]:medicationCodeableConcept">
      <path value="MedicationRequest.medicationCodeableConcept" />
      <sliceName value="medicationCodeableConcept" />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-codeableconcept" />
      </type>
      <binding>
        <strength value="extensible" />
        <valueSet value="http://moh.gov.vn/fhir/core/ValueSet/vn-medication-code" />
      </binding>
    </element>
    <element id="MedicationRequest.medication[x]:medicationReference">
      <path value="MedicationRequest.medicationReference" />
      <sliceName value="medicationReference" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Medication" />
        <targetProfile value="http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-medication" />
      </type>
    </element>
    <element id="MedicationRequest.subject">
      <path value="MedicationRequest.subject" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-patient" />
      </type>
    </element>
    <element id="MedicationRequest.encounter">
      <path value="MedicationRequest.encounter" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-encounter" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.authoredOn">
      <path value="MedicationRequest.authoredOn" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.requester">
      <path value="MedicationRequest.requester" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-practitioner" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.performer">
      <path value="MedicationRequest.performer" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Device" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/CareTeam" />
        <targetProfile value="http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-practitioner" />
        <targetProfile value="http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-healthcare-department" />
      </type>
    </element>
    <element id="MedicationRequest.performerType">
      <path value="MedicationRequest.performerType" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.recorder">
      <path value="MedicationRequest.recorder" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" />
        <targetProfile value="http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-practitioner" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.reasonCode">
      <path value="MedicationRequest.reasonCode" />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-codeableconcept" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.basedOn">
      <path value="MedicationRequest.basedOn" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/CarePlan" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationRequest" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/ServiceRequest" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation" />
        <targetProfile value="http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-medication-request" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.groupIdentifier">
      <path value="MedicationRequest.groupIdentifier" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.note">
      <path value="MedicationRequest.note" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction">
      <path value="MedicationRequest.dosageInstruction" />
      <type>
        <code value="Dosage" />
        <profile value="http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-dosage" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dispenseRequest">
      <path value="MedicationRequest.dispenseRequest" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>