{
  "resourceType": "StructureDefinition",
  "id": "vn-core-medication-request",
  "url": "http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-medication-request",
  "version": "1.0.0",
  "name": "VNCoreMedicationRequest",
  "title": "MedicationRequest Profile - VN Core R4",
  "status": "draft",
  "description": "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": "Bộ Y tế Việt Nam",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "workflow",
      "uri": "http://hl7.org/fhir/workflow",
      "name": "Workflow Pattern"
    },
    {
      "identity": "script10.6",
      "uri": "http://ncpdp.org/SCRIPT10_6",
      "name": "Mapping to NCPDP SCRIPT 10.6"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "MedicationRequest",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/MedicationRequest",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "MedicationRequest.identifier",
        "path": "MedicationRequest.identifier",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.statusReason",
        "path": "MedicationRequest.statusReason",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-codeableconcept"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.category",
        "path": "MedicationRequest.category",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-codeableconcept"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.medication[x]",
        "path": "MedicationRequest.medication[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "MedicationRequest.medication[x]:medicationCodeableConcept",
        "path": "MedicationRequest.medicationCodeableConcept",
        "sliceName": "medicationCodeableConcept",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-codeableconcept"
            ]
          }
        ],
        "binding": {
          "strength": "extensible",
          "valueSet": "http://moh.gov.vn/fhir/core/ValueSet/vn-medication-code"
        }
      },
      {
        "id": "MedicationRequest.medication[x]:medicationReference",
        "path": "MedicationRequest.medicationReference",
        "sliceName": "medicationReference",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Medication",
              "http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-medication"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.subject",
        "path": "MedicationRequest.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-patient"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.encounter",
        "path": "MedicationRequest.encounter",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-encounter"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.authoredOn",
        "path": "MedicationRequest.authoredOn",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.requester",
        "path": "MedicationRequest.requester",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-practitioner"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.performer",
        "path": "MedicationRequest.performer",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Practitioner",
              "http://hl7.org/fhir/StructureDefinition/PractitionerRole",
              "http://hl7.org/fhir/StructureDefinition/Organization",
              "http://hl7.org/fhir/StructureDefinition/Patient",
              "http://hl7.org/fhir/StructureDefinition/Device",
              "http://hl7.org/fhir/StructureDefinition/RelatedPerson",
              "http://hl7.org/fhir/StructureDefinition/CareTeam",
              "http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-practitioner",
              "http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-healthcare-department"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.performerType",
        "path": "MedicationRequest.performerType",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.recorder",
        "path": "MedicationRequest.recorder",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Practitioner",
              "http://hl7.org/fhir/StructureDefinition/PractitionerRole",
              "http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-practitioner"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.reasonCode",
        "path": "MedicationRequest.reasonCode",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-codeableconcept"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.basedOn",
        "path": "MedicationRequest.basedOn",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/CarePlan",
              "http://hl7.org/fhir/StructureDefinition/MedicationRequest",
              "http://hl7.org/fhir/StructureDefinition/ServiceRequest",
              "http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation",
              "http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-medication-request"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.groupIdentifier",
        "path": "MedicationRequest.groupIdentifier",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.note",
        "path": "MedicationRequest.note",
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dosageInstruction",
        "path": "MedicationRequest.dosageInstruction",
        "type": [
          {
            "code": "Dosage",
            "profile": [
              "http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-dosage"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationRequest.dispenseRequest",
        "path": "MedicationRequest.dispenseRequest",
        "mustSupport": true
      }
    ]
  }
}