# Bảng 2 thuốc BHYT — Logical Model — StructureMap - Bộ Hướng dẫn Triển khai Core FHIR cho Việt Nam v0.5.0

## StructureMap: Bảng 2 thuốc BHYT — Logical Model — StructureMap 

 
Generated StructureMap scaffold for Bảng 2 thuốc BHYT — Logical Model. Source semantics come from the logical model mapping annotations in `BHYTXML2MedicationLM.fsh` and remain aligned with the Python BHYT round-trip export adapter. 



## Resource Content

```json
{
  "resourceType" : "StructureMap",
  "id" : "vn-sm-bhyt-xml2-medication",
  "url" : "http://fhir.hl7.org.vn/core/StructureMap/vn-sm-bhyt-xml2-medication",
  "version" : "0.5.0",
  "name" : "BHYTXML2MedicationLMStructureMap",
  "title" : "Bảng 2 thuốc BHYT — Logical Model — StructureMap",
  "status" : "draft",
  "experimental" : false,
  "date" : "2026-04-28",
  "publisher" : "Omi HealthTech / VN Core FHIR Community Initiative",
  "contact" : [{
    "name" : "Omi HealthTech / VN Core FHIR Community Initiative",
    "telecom" : [{
      "system" : "url",
      "value" : "https://hl7.org.vn"
    },
    {
      "system" : "email",
      "value" : "info@hl7.org.vn"
    }]
  },
  {
    "name" : "Omi HealthTech (OmiGroup)",
    "telecom" : [{
      "system" : "url",
      "value" : "https://omihealthtech.vn"
    },
    {
      "system" : "url",
      "value" : "https://omigroup.vn"
    },
    {
      "system" : "email",
      "value" : "healthtech@omigroup.vn"
    }]
  }],
  "description" : "Generated StructureMap scaffold for Bảng 2 thuốc BHYT — Logical Model. Source semantics come from the logical model mapping annotations in `BHYTXML2MedicationLM.fsh` and remain aligned with the Python BHYT round-trip export adapter.",
  "jurisdiction" : [{
    "coding" : [{
      "system" : "urn:iso:std:iso:3166",
      "code" : "VN",
      "display" : "Viet Nam"
    }]
  }],
  "purpose" : "Publish canonical, reviewable FHIR-to-BHYT XML mapping artifacts for XML1-XML12 without duplicating field-level mapping semantics across FSH, wiki, and export code.",
  "structure" : [{
    "url" : "http://fhir.hl7.org.vn/core/StructureDefinition/vn-core-bhyt-submission-bundle",
    "mode" : "source",
    "alias" : "BHYTSubmissionBundle",
    "documentation" : "FHIR-native source bundle profile used by the repository round-trip adapter."
  },
  {
    "url" : "http://fhir.hl7.org.vn/core/StructureDefinition/bhytXml2MedicationLm",
    "mode" : "target",
    "alias" : "BHYTXML2MedicationLM",
    "documentation" : "Bảng 2 thuốc BHYT — Logical Model"
  }],
  "group" : [{
    "name" : "MapBHYTXML2MedicationLM",
    "typeMode" : "none",
    "documentation" : "Full QD 3176 XML2 field catalog. MA_NHOM uses the QD 3176 source code system and must be mapped to QD 697/VNCostCategoryCS with a ConceptMap. Generated from logical-model `^mapping` annotations. Fields still missing a field-level `^mapping.map` entry remain outside this StructureMap and are tracked in `wiki/mappings/bhyt-output-data/machine/structuremap-coverage.json`.",
    "input" : [{
      "name" : "sourceBundle",
      "type" : "BHYTSubmissionBundle",
      "mode" : "source",
      "documentation" : "VN Core BHYT submission bundle."
    },
    {
      "name" : "targetRow",
      "type" : "BHYTXML2MedicationLM",
      "mode" : "target",
      "documentation" : "Bảng 2 thuốc BHYT — Logical Model"
    }],
    "rule" : [{
      "name" : "maLk",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "maLkSource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "maLk"
      }],
      "documentation" : "Target field: MA_LK - Mã liên kết hồ sơ FHIR path: VNCoreClaim.identifier[MALK].value"
    },
    {
      "name" : "stt",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "sttSource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "stt"
      }],
      "documentation" : "Target field: STT - Số thứ tự dòng FHIR path: VNCoreClaim.item[medicationLine].sequence"
    },
    {
      "name" : "maThuoc",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "maThuocSource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "maThuoc"
      }],
      "documentation" : "Target field: MA_THUOC - Mã thuốc FHIR path: VNCoreMedication.code.coding.code | VNCoreClaim.item[medicationLine].productOrService.coding.code"
    },
    {
      "name" : "maPpChebien",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "maPpChebienSource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "maPpChebien"
      }],
      "documentation" : "Target field: MA_PP_CHEBIEN - Mã phương pháp chế biến FHIR path: VNCoreClaim.item[medicationLine].extension[processingMethod].valueString | VNCoreExplanationOfBenefit.item[medicationLine].extension[processingMethod].valueString | VNCoreMedication.extension[processingMethod].valueString | VNCoreMedicationRequest.extension[processingMethod].valueString | VNCoreMedicationDispense.extension[processingMethod].valueString"
    },
    {
      "name" : "maCskcbThuoc",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "maCskcbThuocSource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "maCskcbThuoc"
      }],
      "documentation" : "Target field: MA_CSKCB_THUOC - Mã cơ sở KCB cấp thuốc FHIR path: VNCoreMedicationDispense.performer.actor.resolve().identifier[CSKCB].value | VNCoreMedicationDispense.location.resolve().identifier[CSKCB].value"
    },
    {
      "name" : "maNhom",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "maNhomSource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "maNhom"
      }],
      "documentation" : "Target field: MA_NHOM - Mã nhóm chi phí theo QĐ 3176 FHIR path: ConceptMap/vn-cm-qd3176-cost-group-to-q697-cost-category -> VNCoreClaim.item[medicationLine].category.coding.code Mapping note: QD 3176 uses MA_NHOM=4 for medication; StructureMap must first apply the ConceptMap, then populate VNCostCategoryCS#8. Do not assign the QD 3176 code directly to VNCostCategoryCS."
    },
    {
      "name" : "tenThuoc",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "tenThuocSource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "tenThuoc"
      }],
      "documentation" : "Target field: TEN_THUOC - Tên thuốc FHIR path: VNCoreMedication.code.text | VNCoreClaim.item[medicationLine].productOrService.text | display"
    },
    {
      "name" : "donViTinh",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "donViTinhSource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "donViTinh"
      }],
      "documentation" : "Target field: DON_VI_TINH - Đơn vị tính FHIR path: VNCoreClaim.item[medicationLine].quantity.unit"
    },
    {
      "name" : "hamLuong",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "hamLuongSource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "hamLuong"
      }],
      "documentation" : "Target field: HAM_LUONG - Hàm lượng FHIR path: VNCoreMedication.ingredient.strength | Medication.code.text"
    },
    {
      "name" : "duongDung",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "duongDungSource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "duongDung"
      }],
      "documentation" : "Target field: DUONG_DUNG - Đường dùng FHIR path: VNCoreMedicationRequest.dosageInstruction.route"
    },
    {
      "name" : "dangBaoChe",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "dangBaoCheSource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "dangBaoChe"
      }],
      "documentation" : "Target field: DANG_BAO_CHE - Dạng bào chế FHIR path: VNCoreMedication.form.coding.code | VNCoreMedication.form.text"
    },
    {
      "name" : "lieuDung",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "lieuDungSource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "lieuDung"
      }],
      "documentation" : "Target field: LIEU_DUNG - Liều dùng FHIR path: VNCoreMedicationRequest.dosageInstruction.doseAndRate"
    },
    {
      "name" : "cachDung",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "cachDungSource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "cachDung"
      }],
      "documentation" : "Target field: CACH_DUNG - Cách dùng FHIR path: VNCoreMedicationRequest.dosageInstruction.text"
    },
    {
      "name" : "soDangKy",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "soDangKySource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "soDangKy"
      }],
      "documentation" : "Target field: SO_DANG_KY - Số đăng ký thuốc FHIR path: VNCoreMedication.extension[registrationNumber].valueString | VNCoreMedicationRequest.extension[registrationNumber].valueString | VNCoreMedicationDispense.extension[registrationNumber].valueString"
    },
    {
      "name" : "ttThau",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "ttThauSource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "ttThau"
      }],
      "documentation" : "Target field: TT_THAU - Thông tin thầu FHIR path: VNCoreClaim.item[medicationLine].extension[tenderInfo].valueString | VNCoreExplanationOfBenefit.item[medicationLine].extension[tenderInfo].valueString | VNCoreMedication.extension[tenderInfo].valueString | VNCoreMedicationRequest.extension[tenderInfo].valueString | VNCoreMedicationDispense.extension[tenderInfo].valueString"
    },
    {
      "name" : "phamVi",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "phamViSource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "phamVi"
      }],
      "documentation" : "Target field: PHAM_VI - Phạm vi thanh toán FHIR path: VNCoreClaim.item[medicationLine].extension[insuranceCostInfo].extension[scope].valueCodeableConcept"
    },
    {
      "name" : "tyleTtBh",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "tyleTtBhSource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "tyleTtBh"
      }],
      "documentation" : "Target field: TYLE_TT_BH - Tỷ lệ thanh toán BHYT FHIR path: VNCoreClaim.item[medicationLine].extension[insuranceCostInfo].extension[paymentRatio].valueDecimal"
    },
    {
      "name" : "soLuong",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "soLuongSource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "soLuong"
      }],
      "documentation" : "Target field: SO_LUONG - Số lượng FHIR path: VNCoreClaim.item[medicationLine].quantity.value | VNCoreMedicationDispense.quantity.value"
    },
    {
      "name" : "donGia",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "donGiaSource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "donGia"
      }],
      "documentation" : "Target field: DON_GIA - Đơn giá FHIR path: VNCoreClaim.item[medicationLine].unitPrice.value"
    },
    {
      "name" : "thanhTienBv",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "thanhTienBvSource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "thanhTienBv"
      }],
      "documentation" : "Target field: THANH_TIEN_BV - Thành tiền bệnh viện FHIR path: VNCoreClaim.item[medicationLine].net.value | VNCoreClaim.item[medicationLine].extension[hospitalLineAmount].valueMoney.value"
    },
    {
      "name" : "thanhTienBh",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "thanhTienBhSource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "thanhTienBh"
      }],
      "documentation" : "Target field: THANH_TIEN_BH - Thành tiền BHYT FHIR path: VNCoreClaim.item[medicationLine].extension[insuranceCostInfo].extension[insuranceLineAmount].valueMoney.value"
    },
    {
      "name" : "mucHuong",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "mucHuongSource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "mucHuong"
      }],
      "documentation" : "Target field: MUC_HUONG - Mức hưởng FHIR path: VNCoreClaim.item[medicationLine].extension[insuranceCostInfo].extension[benefitLevel].valueDecimal"
    },
    {
      "name" : "tBntt",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "tBnttSource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "tBntt"
      }],
      "documentation" : "Target field: T_BNTT - Người bệnh tự trả FHIR path: Derived from VNCoreClaimResponse.item[medicationLine].adjudication.where(category='submitted').amount - .where(category='eligible').amount | Derived from VNCoreExplanationOfBenefit.item[medicationLine].adjudication.where(category='submitted').amount - .where(category='eligible').amount"
    },
    {
      "name" : "tBncct",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "tBncctSource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "tBncct"
      }],
      "documentation" : "Target field: T_BNCCT - Người bệnh cùng chi trả FHIR path: VNCoreClaimResponse.item[medicationLine].adjudication.where(category='copay').amount.value | VNCoreExplanationOfBenefit.item[medicationLine].adjudication.where(category='copay').amount.value"
    },
    {
      "name" : "tBhtt",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "tBhttSource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "tBhtt"
      }],
      "documentation" : "Target field: T_BHTT - Quỹ BHYT thanh toán FHIR path: VNCoreClaimResponse.item[medicationLine].adjudication.where(category='benefit').amount.value | VNCoreExplanationOfBenefit.item[medicationLine].adjudication.where(category='benefit').amount.value"
    },
    {
      "name" : "maKhoa",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "maKhoaSource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "maKhoa"
      }],
      "documentation" : "Target field: MA_KHOA - Mã khoa FHIR path: VNCoreClaim.item[medicationLine].extension[department].valueCodeableConcept.coding.code"
    },
    {
      "name" : "maBacSi",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "maBacSiSource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "maBacSi"
      }],
      "documentation" : "Target field: MA_BAC_SI - Mã bác sĩ FHIR path: VNCoreMedicationRequest.requester.resolve().identifier.value | VNCorePractitioner.identifier.value"
    },
    {
      "name" : "maDichVu",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "maDichVuSource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "maDichVu"
      }],
      "documentation" : "Target field: MA_DICH_VU - Mã dịch vụ liên quan FHIR path: VNCoreClaim.item[medicationLine].detail.productOrService.coding.code | VNCoreServiceRequest.code"
    },
    {
      "name" : "ngayYl",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "ngayYlSource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "ngayYl"
      }],
      "documentation" : "Target field: NGAY_YL - Ngày y lệnh FHIR path: VNCoreMedicationRequest.authoredOn"
    },
    {
      "name" : "ngayThYl",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "ngayThYlSource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "ngayThYl"
      }],
      "documentation" : "Target field: NGAY_TH_YL - Ngày thực hiện y lệnh FHIR path: VNCoreMedicationDispense.whenHandedOver | VNCoreMedicationDispense.whenPrepared"
    },
    {
      "name" : "maPttt",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "maPtttSource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "maPttt"
      }],
      "documentation" : "Target field: MA_PTTT - Mã phẫu thuật/thủ thuật liên quan FHIR path: VNCoreClaim.procedure.procedureCodeableConcept | VNCoreProcedure.code Mapping note: Procedure context for medication lines when QD 3176 requires linking the drug to a related surgery/procedure; do not infer this from MA_NHOM."
    },
    {
      "name" : "nguonCtra",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "nguonCtraSource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "nguonCtra"
      }],
      "documentation" : "Target field: NGUON_CTRA - Nguồn chi trả FHIR path: VNCoreClaim.item[medicationLine].extension[paymentSource].valueCodeableConcept.coding.code | VNCoreExplanationOfBenefit.item[medicationLine].extension[paymentSource].valueCodeableConcept.coding.code"
    },
    {
      "name" : "vetThuongTp",
      "source" : [{
        "context" : "sourceBundle",
        "min" : 0,
        "max" : "*",
        "element" : "entry",
        "variable" : "vetThuongTpSource"
      }],
      "target" : [{
        "context" : "targetRow",
        "contextType" : "variable",
        "element" : "vetThuongTp"
      }],
      "documentation" : "Target field: VET_THUONG_TP - Vết thương tái phát FHIR path: VNCoreClaim.item[medicationLine].extension[recurrentWoundBenefit].valueBoolean | VNCoreExplanationOfBenefit.item[medicationLine].extension[recurrentWoundBenefit].valueBoolean Mapping note: Exporter emits literal `1` only when the line-level recurrentWoundBenefit flag is true; this is not a diagnosis recurrence code."
    }]
  }]
}

```
