{
  "resourceType": "StructureDefinition",
  "id": "vn-core-medication-dispense",
  "url": "http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-medication-dispense",
  "version": "1.0.0",
  "name": "VNCoreMedicationDispense",
  "title": "MedicationDispense Profile - VN R4 Core",
  "status": "draft",
  "description": "Thông tin liên quan đến việc cấp dược cho người bệnh. Tham khảo thêm: https://www.hl7.org/fhir/medications-module.html",
  "copyright": "Bộ Y tế",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "workflow",
      "uri": "http://hl7.org/fhir/workflow",
      "name": "Workflow Pattern"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    },
    {
      "identity": "rx-dispense-rmim",
      "uri": "http://www.hl7.org/v3/PORX_RM020070UV",
      "name": "V3 Pharmacy Dispense RMIM"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "MedicationDispense",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/MedicationDispense",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "MedicationDispense.identifier",
        "path": "MedicationDispense.identifier",
        "mustSupport": true
      },
      {
        "id": "MedicationDispense.partOf",
        "path": "MedicationDispense.partOf",
        "mustSupport": true
      },
      {
        "id": "MedicationDispense.category",
        "path": "MedicationDispense.category",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-codeableconcept"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationDispense.medication[x]",
        "path": "MedicationDispense.medication[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept",
        "path": "MedicationDispense.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": "MedicationDispense.medication[x]:medicationReference",
        "path": "MedicationDispense.medicationReference",
        "sliceName": "medicationReference",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Medication",
              "http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-medication"
            ]
          }
        ]
      },
      {
        "id": "MedicationDispense.subject",
        "path": "MedicationDispense.subject",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-patient"
            ]
          }
        ]
      },
      {
        "id": "MedicationDispense.context",
        "path": "MedicationDispense.context",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-encounter"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationDispense.performer",
        "path": "MedicationDispense.performer",
        "mustSupport": true
      },
      {
        "id": "MedicationDispense.performer.actor",
        "path": "MedicationDispense.performer.actor",
        "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://moh.gov.vn/fhir/core/StructureDefinition/vn-core-practitioner"
            ]
          }
        ]
      },
      {
        "id": "MedicationDispense.location",
        "path": "MedicationDispense.location",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Location",
              "http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-location"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationDispense.type",
        "path": "MedicationDispense.type",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-codeableconcept"
            ]
          }
        ]
      },
      {
        "id": "MedicationDispense.quantity",
        "path": "MedicationDispense.quantity",
        "type": [
          {
            "code": "Quantity",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/SimpleQuantity",
              "http://hl7.org/fhir/uv/ips/StructureDefinition/SimpleQuantity-uv-ips"
            ]
          }
        ]
      },
      {
        "id": "MedicationDispense.destination",
        "path": "MedicationDispense.destination",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Location",
              "http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-location"
            ]
          }
        ]
      },
      {
        "id": "MedicationDispense.receiver",
        "path": "MedicationDispense.receiver",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-patient",
              "http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-practitioner"
            ]
          }
        ]
      },
      {
        "id": "MedicationDispense.note",
        "path": "MedicationDispense.note",
        "mustSupport": true
      },
      {
        "id": "MedicationDispense.dosageInstruction",
        "path": "MedicationDispense.dosageInstruction",
        "type": [
          {
            "code": "Dosage",
            "profile": [
              "http://moh.gov.vn/fhir/core/StructureDefinition/vn-core-dosage"
            ]
          }
        ],
        "mustSupport": true
      }
    ]
  }
}