HL7 Vietnam VN Core FHIR Implementation Guide

Bộ Hướng dẫn Triển khai Core FHIR cho Việt Nam
0.8.0 - Draft for Community Review Viet Nam cờ

Bộ Hướng dẫn Triển khai Core FHIR cho Việt Nam - Draft for Community Review (v0.8.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

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

Draft tại thời điểm 2026-04-28

Bản thô xml | Tải xuống


<StructureMap xmlns="http://hl7.org/fhir">
  <id value="vn-sm-bhyt-xml2-medication"/>
  <language value="vi"/>
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: StructureMap vn-sm-bhyt-xml2-medication</b></p><a name="vn-sm-bhyt-xml2-medication"> </a><a name="hcvn-sm-bhyt-xml2-medication"> </a><pre class="fml">
<b>map</b><span style="color: navy"> &quot;</span>http://fhir.hl7.org.vn/core/StructureMap/vn-sm-bhyt-xml2-medication<span style="color: navy">&quot; = &quot;</span>BHYTXML2MedicationLMStructureMap<span style="color: navy">&quot;

</span><span style="color: navy">// </span><span style="color: green">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.</span>

<span style="color: navy">// </span><span style="color: green">FHIR-native source bundle profile used by the repository round-trip adapter.</span>
<b>uses</b><span style="color: navy"> &quot;</span><a href="StructureDefinition-vn-core-bhyt-submission-bundle.html" title="Bundle hồ sơ thanh toán BHYT — VN Core BHYT Submission Bundle">http://fhir.hl7.org.vn/core/StructureDefinition/vn-core-bhyt-submission-bundle</a><span style="color: navy">&quot; </span><b>alias </b>BHYTSubmissionBundle <b>as </b><b>source</b>
<span style="color: navy">// </span><span style="color: green">Bảng 2 thuốc BHYT — Logical Model</span>
<b>uses</b><span style="color: navy"> &quot;</span><a href="StructureDefinition-bhytXml2MedicationLm.html" title="Bảng 2 thuốc BHYT — Logical Model">http://fhir.hl7.org.vn/core/StructureDefinition/bhytXml2MedicationLm</a><span style="color: navy">&quot; </span><b>alias </b>BHYTXML2MedicationLM <b>as </b><b>target</b>

<span style="color: navy">// </span><span style="color: green">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`.</span>
<b>group </b>MapBHYTXML2MedicationLM<span style="color: navy">(</span><b>source</b> <span style="color: maroon">sourceBundle</span><span style="color: navy"> : </span>BHYTSubmissionBundle, <b>target</b> <span style="color: maroon">targetRow</span><span style="color: navy"> : </span>BHYTXML2MedicationLM<span style="color: navy">)</span><span style="color: navy"> {
</span>  <span style="color: navy">// </span><span style="color: green">Target field: MA_LK - Mã liên kết hồ sơ FHIR path: VNCoreClaim.identifier[MALK].value</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">maLkSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.maLk <i>&quot;maLk&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Target field: STT - Số thứ tự dòng FHIR path: VNCoreClaim.item[medicationLine].sequence</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">sttSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.stt <i>&quot;stt&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Target field: MA_THUOC - Mã thuốc FHIR path: VNCoreMedication.code.coding.code | VNCoreClaim.item[medicationLine].productOrService.coding.code</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">maThuocSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.maThuoc <i>&quot;maThuoc&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">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</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">maPpChebienSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.maPpChebien <i>&quot;maPpChebien&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">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</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">maCskcbThuocSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.maCskcbThuoc <i>&quot;maCskcbThuoc&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Target field: MA_NHOM - Mã nhóm chi phí theo QĐ 3176/QĐ-BYT FHIR path: ConceptMap/vn-cm-bhyt-claim-cost-group-to-cost-category -&gt; 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.</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">maNhomSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.maNhom <i>&quot;maNhom&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Target field: TEN_THUOC - Tên thuốc FHIR path: VNCoreMedication.code.text | VNCoreClaim.item[medicationLine].productOrService.text | display</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">tenThuocSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.tenThuoc <i>&quot;tenThuoc&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Target field: DON_VI_TINH - Đơn vị tính FHIR path: VNCoreClaim.item[medicationLine].quantity.unit</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">donViTinhSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.donViTinh <i>&quot;donViTinh&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Target field: HAM_LUONG - Hàm lượng FHIR path: VNCoreMedication.ingredient.strength | Medication.code.text</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">hamLuongSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.hamLuong <i>&quot;hamLuong&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Target field: DUONG_DUNG - Đường dùng FHIR path: VNCoreMedicationRequest.dosageInstruction.route</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">duongDungSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.duongDung <i>&quot;duongDung&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Target field: DANG_BAO_CHE - Dạng bào chế FHIR path: VNCoreMedication.form.coding.code | VNCoreMedication.form.text</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">dangBaoCheSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.dangBaoChe <i>&quot;dangBaoChe&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Target field: LIEU_DUNG - Liều dùng FHIR path: VNCoreMedicationRequest.dosageInstruction.doseAndRate</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">lieuDungSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.lieuDung <i>&quot;lieuDung&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Target field: CACH_DUNG - Cách dùng FHIR path: VNCoreMedicationRequest.dosageInstruction.text</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">cachDungSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.cachDung <i>&quot;cachDung&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Target field: SO_DANG_KY - Số đăng ký thuốc FHIR path: VNCoreMedication.extension[registrationNumber].valueString | VNCoreMedicationRequest.extension[registrationNumber].valueString | VNCoreMedicationDispense.extension[registrationNumber].valueString Mapping note: QĐ 1931/QĐ-BYT (29/06/2026) sửa đổi QĐ 3176/QĐ-BYT: thuốc hiếm được UBND cấp tỉnh cấp phép đơn hàng nhập khẩu mã hóa theo quy ước UBND.YYYY.X.S (YYYY = năm cấp giấy phép, X = số văn bản cấp phép nhập khẩu, S = số thứ tự thuốc trong văn bản cấp phép).</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">soDangKySource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.soDangKy <i>&quot;soDangKy&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">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</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">ttThauSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.ttThau <i>&quot;ttThau&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Target field: PHAM_VI - Phạm vi thanh toán FHIR path: VNCoreClaim.item[medicationLine].extension[insuranceCostInfo].extension[scope].valueCodeableConcept</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">phamViSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.phamVi <i>&quot;phamVi&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Target field: TYLE_TT_BH - Tỷ lệ thanh toán BHYT FHIR path: VNCoreClaim.item[medicationLine].extension[insuranceCostInfo].extension[paymentRatio].valueDecimal</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">tyleTtBhSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.tyleTtBh <i>&quot;tyleTtBh&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Target field: SO_LUONG - Số lượng FHIR path: VNCoreClaim.item[medicationLine].quantity.value | VNCoreMedicationDispense.quantity.value</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">soLuongSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.soLuong <i>&quot;soLuong&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Target field: DON_GIA - Đơn giá FHIR path: VNCoreClaim.item[medicationLine].unitPrice.value</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">donGiaSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.donGia <i>&quot;donGia&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">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</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">thanhTienBvSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.thanhTienBv <i>&quot;thanhTienBv&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Target field: THANH_TIEN_BH - Thành tiền BHYT FHIR path: VNCoreClaim.item[medicationLine].extension[insuranceCostInfo].extension[insuranceLineAmount].valueMoney.value</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">thanhTienBhSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.thanhTienBh <i>&quot;thanhTienBh&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Target field: T_NGUONKHAC_NSNN - Nguồn khác ngân sách nhà nước FHIR path: VNCoreClaim.item[medicationLine].extension[otherFundBreakdown].extension[stateBudget].valueMoney.value | VNCoreExplanationOfBenefit.item[medicationLine].extension[otherFundBreakdown].extension[stateBudget].valueMoney.value Mapping note: Số tiền được ngân sách nhà nước hỗ trợ, tách theo dòng qua sub-extension stateBudget của VNCoreExtOtherFundBreakdown trên Claim.item/EOB.item. Số tiền gộp toàn nguồn khác vẫn ánh xạ category 'other-fund' theo ConceptMap vn-cm-bhyt-financial-field-to-adjudication (VNBHYTFinancialFieldCS#T_NGUONKHAC_NSNN). Căn cứ QĐ 3176/QĐ-BYT.</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">tNguonkhacNsnnSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.tNguonkhacNsnn <i>&quot;tNguonkhacNsnn&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Target field: T_NGUONKHAC_VTNN - Nguồn khác viện trợ nước ngoài FHIR path: VNCoreClaim.item[medicationLine].extension[otherFundBreakdown].extension[foreignAid].valueMoney.value | VNCoreExplanationOfBenefit.item[medicationLine].extension[otherFundBreakdown].extension[foreignAid].valueMoney.value Mapping note: Số tiền viện trợ từ tổ chức/cá nhân ngoài lãnh thổ Việt Nam, tách theo dòng qua sub-extension foreignAid của VNCoreExtOtherFundBreakdown trên Claim.item/EOB.item. Số tiền gộp toàn nguồn khác vẫn ánh xạ category 'other-fund' theo ConceptMap vn-cm-bhyt-financial-field-to-adjudication (VNBHYTFinancialFieldCS#T_NGUONKHAC_VTNN). Căn cứ QĐ 3176/QĐ-BYT.</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">tNguonkhacVtnnSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.tNguonkhacVtnn <i>&quot;tNguonkhacVtnn&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Target field: T_NGUONKHAC_VTTN - Nguồn khác viện trợ trong nước FHIR path: VNCoreClaim.item[medicationLine].extension[otherFundBreakdown].extension[domesticAid].valueMoney.value | VNCoreExplanationOfBenefit.item[medicationLine].extension[otherFundBreakdown].extension[domesticAid].valueMoney.value Mapping note: Số tiền viện trợ từ tổ chức/cá nhân trong lãnh thổ Việt Nam, tách theo dòng qua sub-extension domesticAid của VNCoreExtOtherFundBreakdown trên Claim.item/EOB.item. Số tiền gộp toàn nguồn khác vẫn ánh xạ category 'other-fund' theo ConceptMap vn-cm-bhyt-financial-field-to-adjudication (VNBHYTFinancialFieldCS#T_NGUONKHAC_VTTN). Căn cứ QĐ 3176/QĐ-BYT.</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">tNguonkhacVttnSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.tNguonkhacVttn <i>&quot;tNguonkhacVttn&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Target field: T_NGUONKHAC_CL - Nguồn khác còn lại FHIR path: VNCoreClaim.item[medicationLine].extension[otherFundBreakdown].extension[otherRemaining].valueMoney.value | VNCoreExplanationOfBenefit.item[medicationLine].extension[otherFundBreakdown].extension[otherRemaining].valueMoney.value Mapping note: Số tiền từ các nguồn khác còn lại (ngoài NSNN/VTNN/VTTN), tách theo dòng qua sub-extension otherRemaining của VNCoreExtOtherFundBreakdown trên Claim.item/EOB.item. Số tiền gộp toàn nguồn khác vẫn ánh xạ category 'other-fund' theo ConceptMap vn-cm-bhyt-financial-field-to-adjudication (VNBHYTFinancialFieldCS#T_NGUONKHAC_CL). Căn cứ QĐ 3176/QĐ-BYT.</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">tNguonkhacClSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.tNguonkhacCl <i>&quot;tNguonkhacCl&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Target field: T_NGUONKHAC - Tổng nguồn khác FHIR path: VNCoreClaimResponse.item[medicationLine].adjudication.where(category='other-fund').amount.value | VNCoreExplanationOfBenefit.item[medicationLine].adjudication.where(category='other-fund').amount.value | VNCoreClaim.item[medicationLine].extension[otherFundBreakdown] (tổng = stateBudget + foreignAid + domesticAid + otherRemaining) Mapping note: T_NGUONKHAC = T_NGUONKHAC_NSNN + T_NGUONKHAC_VTNN + T_NGUONKHAC_VTTN + T_NGUONKHAC_CL; 4 thành phần được tách theo dòng qua VNCoreExtOtherFundBreakdown trên Claim.item. Tổng gộp toàn nguồn khác ở line-level ánh xạ category 'other-fund' theo ConceptMap vn-cm-bhyt-financial-field-to-adjudication (VNBHYTAdjudicationCategoryCS#other-fund); R4 không có Claim.item.adjudication nên đích tổng là (Claim)Response/EOB.item.adjudication. Công thức giảm trừ lần lượt T_BNTT → T_BNCCT → T_BHTT do StructureMap của exporter xử lý, không encode invariant ở profile. Căn cứ QĐ 3176/QĐ-BYT.</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">tNguonkhacSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.tNguonkhac <i>&quot;tNguonkhac&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Target field: MUC_HUONG - Mức hưởng FHIR path: VNCoreClaim.item[medicationLine].extension[insuranceCostInfo].extension[benefitLevel].valueDecimal Mapping note: QĐ 1931/QĐ-BYT (29/06/2026) sửa đổi QĐ 3176/QĐ-BYT: kích thước tối đa của MUC_HUONG tại Bảng 2 tăng lên 4 ký tự.</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">mucHuongSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.mucHuong <i>&quot;mucHuong&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">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</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">tBnttSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.tBntt <i>&quot;tBntt&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">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</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">tBncctSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.tBncct <i>&quot;tBncct&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">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</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">tBhttSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.tBhtt <i>&quot;tBhtt&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Target field: MA_KHOA - Mã khoa FHIR path: VNCoreClaim.item[medicationLine].extension[department].valueCodeableConcept.coding.code</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">maKhoaSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.maKhoa <i>&quot;maKhoa&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Target field: MA_BAC_SI - Mã bác sĩ FHIR path: VNCoreMedicationRequest.requester.resolve().identifier.value | VNCorePractitioner.identifier.value</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">maBacSiSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.maBacSi <i>&quot;maBacSi&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Target field: MA_DICH_VU - Mã dịch vụ liên quan FHIR path: VNCoreClaim.item[medicationLine].detail.productOrService.coding.code | VNCoreServiceRequest.code</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">maDichVuSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.maDichVu <i>&quot;maDichVu&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Target field: NGAY_YL - Ngày y lệnh FHIR path: VNCoreMedicationRequest.authoredOn</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">ngayYlSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.ngayYl <i>&quot;ngayYl&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">Target field: NGAY_TH_YL - Ngày thực hiện y lệnh FHIR path: VNCoreMedicationDispense.whenHandedOver | VNCoreMedicationDispense.whenPrepared</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">ngayThYlSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.ngayThYl <i>&quot;ngayThYl&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">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.</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">maPtttSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.maPttt <i>&quot;maPttt&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">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</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">nguonCtraSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.nguonCtra <i>&quot;nguonCtra&quot;</i><span style="color: navy">;</span>
  <span style="color: navy">// </span><span style="color: green">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.</span>
  sourceBundle.entry 0<span style="color: navy">..</span>*<b> as </b><span style="color: maroon">vetThuongTpSource</span><span style="color: navy"><b> -&gt; </b></span>targetRow.vetThuongTp <i>&quot;vetThuongTp&quot;</i><span style="color: navy">;</span>
<span style="color: navy">}

</span></pre></div>
  </text>
  <url
       value="http://fhir.hl7.org.vn/core/StructureMap/vn-sm-bhyt-xml2-medication"/>
  <identifier>
    <system value="urn:ietf:rfc:3986"/>
    <value value="urn:oid:2.25.161089673617632664299011809196868855799.43.5"/>
  </identifier>
  <version value="0.8.0"/>
  <name value="BHYTXML2MedicationLMStructureMap"/>
  <title value="Bảng 2 thuốc BHYT — Logical Model — StructureMap"/>
  <status value="draft"/>
  <experimental value="false"/>
  <date value="2026-04-28"/>
  <publisher value="Omi HealthTech / VN Core FHIR Community Initiative"/>
  <contact>
    <name value="Omi HealthTech / VN Core FHIR Community Initiative"/>
    <telecom>
      <system value="url"/>
      <value value="https://hl7.org.vn"/>
    </telecom>
    <telecom>
      <system value="email"/>
      <value value="info@hl7.org.vn"/>
    </telecom>
  </contact>
  <contact>
    <name value="Omi HealthTech (OmiGroup)"/>
    <telecom>
      <system value="url"/>
      <value value="https://omihealthtech.vn"/>
    </telecom>
    <telecom>
      <system value="url"/>
      <value value="https://omigroup.vn"/>
    </telecom>
    <telecom>
      <system value="email"/>
      <value value="info@hl7.org.vn"/>
    </telecom>
  </contact>
  <description
               value="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 value="urn:iso:std:iso:3166"/>
      <code value="VN"/>
      <display value="Viet Nam"/>
    </coding>
  </jurisdiction>
  <purpose
           value="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
         value="http://fhir.hl7.org.vn/core/StructureDefinition/vn-core-bhyt-submission-bundle"/>
    <mode value="source"/>
    <alias value="BHYTSubmissionBundle"/>
    <documentation
                   value="FHIR-native source bundle profile used by the repository round-trip adapter."/>
  </structure>
  <structure>
    <url
         value="http://fhir.hl7.org.vn/core/StructureDefinition/bhytXml2MedicationLm"/>
    <mode value="target"/>
    <alias value="BHYTXML2MedicationLM"/>
    <documentation value="Bảng 2 thuốc BHYT — Logical Model"/>
  </structure>
  <group>
    <name value="MapBHYTXML2MedicationLM"/>
    <typeMode value="none"/>
    <documentation
                   value="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 value="sourceBundle"/>
      <type value="BHYTSubmissionBundle"/>
      <mode value="source"/>
      <documentation value="VN Core BHYT submission bundle."/>
    </input>
    <input>
      <name value="targetRow"/>
      <type value="BHYTXML2MedicationLM"/>
      <mode value="target"/>
      <documentation value="Bảng 2 thuốc BHYT — Logical Model"/>
    </input>
    <rule>
      <name value="maLk"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="maLkSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="maLk"/>
      </target>
      <documentation
                     value="Target field: MA_LK - Mã liên kết hồ sơ FHIR path: VNCoreClaim.identifier[MALK].value"/>
    </rule>
    <rule>
      <name value="stt"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="sttSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="stt"/>
      </target>
      <documentation
                     value="Target field: STT - Số thứ tự dòng FHIR path: VNCoreClaim.item[medicationLine].sequence"/>
    </rule>
    <rule>
      <name value="maThuoc"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="maThuocSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="maThuoc"/>
      </target>
      <documentation
                     value="Target field: MA_THUOC - Mã thuốc FHIR path: VNCoreMedication.code.coding.code | VNCoreClaim.item[medicationLine].productOrService.coding.code"/>
    </rule>
    <rule>
      <name value="maPpChebien"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="maPpChebienSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="maPpChebien"/>
      </target>
      <documentation
                     value="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"/>
    </rule>
    <rule>
      <name value="maCskcbThuoc"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="maCskcbThuocSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="maCskcbThuoc"/>
      </target>
      <documentation
                     value="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"/>
    </rule>
    <rule>
      <name value="maNhom"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="maNhomSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="maNhom"/>
      </target>
      <documentation
                     value="Target field: MA_NHOM - Mã nhóm chi phí theo QĐ 3176/QĐ-BYT FHIR path: ConceptMap/vn-cm-bhyt-claim-cost-group-to-cost-category -&gt; 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."/>
    </rule>
    <rule>
      <name value="tenThuoc"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="tenThuocSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="tenThuoc"/>
      </target>
      <documentation
                     value="Target field: TEN_THUOC - Tên thuốc FHIR path: VNCoreMedication.code.text | VNCoreClaim.item[medicationLine].productOrService.text | display"/>
    </rule>
    <rule>
      <name value="donViTinh"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="donViTinhSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="donViTinh"/>
      </target>
      <documentation
                     value="Target field: DON_VI_TINH - Đơn vị tính FHIR path: VNCoreClaim.item[medicationLine].quantity.unit"/>
    </rule>
    <rule>
      <name value="hamLuong"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="hamLuongSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="hamLuong"/>
      </target>
      <documentation
                     value="Target field: HAM_LUONG - Hàm lượng FHIR path: VNCoreMedication.ingredient.strength | Medication.code.text"/>
    </rule>
    <rule>
      <name value="duongDung"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="duongDungSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="duongDung"/>
      </target>
      <documentation
                     value="Target field: DUONG_DUNG - Đường dùng FHIR path: VNCoreMedicationRequest.dosageInstruction.route"/>
    </rule>
    <rule>
      <name value="dangBaoChe"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="dangBaoCheSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="dangBaoChe"/>
      </target>
      <documentation
                     value="Target field: DANG_BAO_CHE - Dạng bào chế FHIR path: VNCoreMedication.form.coding.code | VNCoreMedication.form.text"/>
    </rule>
    <rule>
      <name value="lieuDung"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="lieuDungSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="lieuDung"/>
      </target>
      <documentation
                     value="Target field: LIEU_DUNG - Liều dùng FHIR path: VNCoreMedicationRequest.dosageInstruction.doseAndRate"/>
    </rule>
    <rule>
      <name value="cachDung"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="cachDungSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="cachDung"/>
      </target>
      <documentation
                     value="Target field: CACH_DUNG - Cách dùng FHIR path: VNCoreMedicationRequest.dosageInstruction.text"/>
    </rule>
    <rule>
      <name value="soDangKy"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="soDangKySource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="soDangKy"/>
      </target>
      <documentation
                     value="Target field: SO_DANG_KY - Số đăng ký thuốc FHIR path: VNCoreMedication.extension[registrationNumber].valueString | VNCoreMedicationRequest.extension[registrationNumber].valueString | VNCoreMedicationDispense.extension[registrationNumber].valueString Mapping note: QĐ 1931/QĐ-BYT (29/06/2026) sửa đổi QĐ 3176/QĐ-BYT: thuốc hiếm được UBND cấp tỉnh cấp phép đơn hàng nhập khẩu mã hóa theo quy ước UBND.YYYY.X.S (YYYY = năm cấp giấy phép, X = số văn bản cấp phép nhập khẩu, S = số thứ tự thuốc trong văn bản cấp phép)."/>
    </rule>
    <rule>
      <name value="ttThau"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="ttThauSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="ttThau"/>
      </target>
      <documentation
                     value="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"/>
    </rule>
    <rule>
      <name value="phamVi"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="phamViSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="phamVi"/>
      </target>
      <documentation
                     value="Target field: PHAM_VI - Phạm vi thanh toán FHIR path: VNCoreClaim.item[medicationLine].extension[insuranceCostInfo].extension[scope].valueCodeableConcept"/>
    </rule>
    <rule>
      <name value="tyleTtBh"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="tyleTtBhSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="tyleTtBh"/>
      </target>
      <documentation
                     value="Target field: TYLE_TT_BH - Tỷ lệ thanh toán BHYT FHIR path: VNCoreClaim.item[medicationLine].extension[insuranceCostInfo].extension[paymentRatio].valueDecimal"/>
    </rule>
    <rule>
      <name value="soLuong"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="soLuongSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="soLuong"/>
      </target>
      <documentation
                     value="Target field: SO_LUONG - Số lượng FHIR path: VNCoreClaim.item[medicationLine].quantity.value | VNCoreMedicationDispense.quantity.value"/>
    </rule>
    <rule>
      <name value="donGia"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="donGiaSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="donGia"/>
      </target>
      <documentation
                     value="Target field: DON_GIA - Đơn giá FHIR path: VNCoreClaim.item[medicationLine].unitPrice.value"/>
    </rule>
    <rule>
      <name value="thanhTienBv"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="thanhTienBvSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="thanhTienBv"/>
      </target>
      <documentation
                     value="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"/>
    </rule>
    <rule>
      <name value="thanhTienBh"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="thanhTienBhSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="thanhTienBh"/>
      </target>
      <documentation
                     value="Target field: THANH_TIEN_BH - Thành tiền BHYT FHIR path: VNCoreClaim.item[medicationLine].extension[insuranceCostInfo].extension[insuranceLineAmount].valueMoney.value"/>
    </rule>
    <rule>
      <name value="tNguonkhacNsnn"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="tNguonkhacNsnnSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="tNguonkhacNsnn"/>
      </target>
      <documentation
                     value="Target field: T_NGUONKHAC_NSNN - Nguồn khác ngân sách nhà nước FHIR path: VNCoreClaim.item[medicationLine].extension[otherFundBreakdown].extension[stateBudget].valueMoney.value | VNCoreExplanationOfBenefit.item[medicationLine].extension[otherFundBreakdown].extension[stateBudget].valueMoney.value Mapping note: Số tiền được ngân sách nhà nước hỗ trợ, tách theo dòng qua sub-extension stateBudget của VNCoreExtOtherFundBreakdown trên Claim.item/EOB.item. Số tiền gộp toàn nguồn khác vẫn ánh xạ category 'other-fund' theo ConceptMap vn-cm-bhyt-financial-field-to-adjudication (VNBHYTFinancialFieldCS#T_NGUONKHAC_NSNN). Căn cứ QĐ 3176/QĐ-BYT."/>
    </rule>
    <rule>
      <name value="tNguonkhacVtnn"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="tNguonkhacVtnnSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="tNguonkhacVtnn"/>
      </target>
      <documentation
                     value="Target field: T_NGUONKHAC_VTNN - Nguồn khác viện trợ nước ngoài FHIR path: VNCoreClaim.item[medicationLine].extension[otherFundBreakdown].extension[foreignAid].valueMoney.value | VNCoreExplanationOfBenefit.item[medicationLine].extension[otherFundBreakdown].extension[foreignAid].valueMoney.value Mapping note: Số tiền viện trợ từ tổ chức/cá nhân ngoài lãnh thổ Việt Nam, tách theo dòng qua sub-extension foreignAid của VNCoreExtOtherFundBreakdown trên Claim.item/EOB.item. Số tiền gộp toàn nguồn khác vẫn ánh xạ category 'other-fund' theo ConceptMap vn-cm-bhyt-financial-field-to-adjudication (VNBHYTFinancialFieldCS#T_NGUONKHAC_VTNN). Căn cứ QĐ 3176/QĐ-BYT."/>
    </rule>
    <rule>
      <name value="tNguonkhacVttn"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="tNguonkhacVttnSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="tNguonkhacVttn"/>
      </target>
      <documentation
                     value="Target field: T_NGUONKHAC_VTTN - Nguồn khác viện trợ trong nước FHIR path: VNCoreClaim.item[medicationLine].extension[otherFundBreakdown].extension[domesticAid].valueMoney.value | VNCoreExplanationOfBenefit.item[medicationLine].extension[otherFundBreakdown].extension[domesticAid].valueMoney.value Mapping note: Số tiền viện trợ từ tổ chức/cá nhân trong lãnh thổ Việt Nam, tách theo dòng qua sub-extension domesticAid của VNCoreExtOtherFundBreakdown trên Claim.item/EOB.item. Số tiền gộp toàn nguồn khác vẫn ánh xạ category 'other-fund' theo ConceptMap vn-cm-bhyt-financial-field-to-adjudication (VNBHYTFinancialFieldCS#T_NGUONKHAC_VTTN). Căn cứ QĐ 3176/QĐ-BYT."/>
    </rule>
    <rule>
      <name value="tNguonkhacCl"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="tNguonkhacClSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="tNguonkhacCl"/>
      </target>
      <documentation
                     value="Target field: T_NGUONKHAC_CL - Nguồn khác còn lại FHIR path: VNCoreClaim.item[medicationLine].extension[otherFundBreakdown].extension[otherRemaining].valueMoney.value | VNCoreExplanationOfBenefit.item[medicationLine].extension[otherFundBreakdown].extension[otherRemaining].valueMoney.value Mapping note: Số tiền từ các nguồn khác còn lại (ngoài NSNN/VTNN/VTTN), tách theo dòng qua sub-extension otherRemaining của VNCoreExtOtherFundBreakdown trên Claim.item/EOB.item. Số tiền gộp toàn nguồn khác vẫn ánh xạ category 'other-fund' theo ConceptMap vn-cm-bhyt-financial-field-to-adjudication (VNBHYTFinancialFieldCS#T_NGUONKHAC_CL). Căn cứ QĐ 3176/QĐ-BYT."/>
    </rule>
    <rule>
      <name value="tNguonkhac"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="tNguonkhacSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="tNguonkhac"/>
      </target>
      <documentation
                     value="Target field: T_NGUONKHAC - Tổng nguồn khác FHIR path: VNCoreClaimResponse.item[medicationLine].adjudication.where(category='other-fund').amount.value | VNCoreExplanationOfBenefit.item[medicationLine].adjudication.where(category='other-fund').amount.value | VNCoreClaim.item[medicationLine].extension[otherFundBreakdown] (tổng = stateBudget + foreignAid + domesticAid + otherRemaining) Mapping note: T_NGUONKHAC = T_NGUONKHAC_NSNN + T_NGUONKHAC_VTNN + T_NGUONKHAC_VTTN + T_NGUONKHAC_CL; 4 thành phần được tách theo dòng qua VNCoreExtOtherFundBreakdown trên Claim.item. Tổng gộp toàn nguồn khác ở line-level ánh xạ category 'other-fund' theo ConceptMap vn-cm-bhyt-financial-field-to-adjudication (VNBHYTAdjudicationCategoryCS#other-fund); R4 không có Claim.item.adjudication nên đích tổng là (Claim)Response/EOB.item.adjudication. Công thức giảm trừ lần lượt T_BNTT → T_BNCCT → T_BHTT do StructureMap của exporter xử lý, không encode invariant ở profile. Căn cứ QĐ 3176/QĐ-BYT."/>
    </rule>
    <rule>
      <name value="mucHuong"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="mucHuongSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="mucHuong"/>
      </target>
      <documentation
                     value="Target field: MUC_HUONG - Mức hưởng FHIR path: VNCoreClaim.item[medicationLine].extension[insuranceCostInfo].extension[benefitLevel].valueDecimal Mapping note: QĐ 1931/QĐ-BYT (29/06/2026) sửa đổi QĐ 3176/QĐ-BYT: kích thước tối đa của MUC_HUONG tại Bảng 2 tăng lên 4 ký tự."/>
    </rule>
    <rule>
      <name value="tBntt"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="tBnttSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="tBntt"/>
      </target>
      <documentation
                     value="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"/>
    </rule>
    <rule>
      <name value="tBncct"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="tBncctSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="tBncct"/>
      </target>
      <documentation
                     value="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"/>
    </rule>
    <rule>
      <name value="tBhtt"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="tBhttSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="tBhtt"/>
      </target>
      <documentation
                     value="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"/>
    </rule>
    <rule>
      <name value="maKhoa"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="maKhoaSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="maKhoa"/>
      </target>
      <documentation
                     value="Target field: MA_KHOA - Mã khoa FHIR path: VNCoreClaim.item[medicationLine].extension[department].valueCodeableConcept.coding.code"/>
    </rule>
    <rule>
      <name value="maBacSi"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="maBacSiSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="maBacSi"/>
      </target>
      <documentation
                     value="Target field: MA_BAC_SI - Mã bác sĩ FHIR path: VNCoreMedicationRequest.requester.resolve().identifier.value | VNCorePractitioner.identifier.value"/>
    </rule>
    <rule>
      <name value="maDichVu"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="maDichVuSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="maDichVu"/>
      </target>
      <documentation
                     value="Target field: MA_DICH_VU - Mã dịch vụ liên quan FHIR path: VNCoreClaim.item[medicationLine].detail.productOrService.coding.code | VNCoreServiceRequest.code"/>
    </rule>
    <rule>
      <name value="ngayYl"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="ngayYlSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="ngayYl"/>
      </target>
      <documentation
                     value="Target field: NGAY_YL - Ngày y lệnh FHIR path: VNCoreMedicationRequest.authoredOn"/>
    </rule>
    <rule>
      <name value="ngayThYl"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="ngayThYlSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="ngayThYl"/>
      </target>
      <documentation
                     value="Target field: NGAY_TH_YL - Ngày thực hiện y lệnh FHIR path: VNCoreMedicationDispense.whenHandedOver | VNCoreMedicationDispense.whenPrepared"/>
    </rule>
    <rule>
      <name value="maPttt"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="maPtttSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="maPttt"/>
      </target>
      <documentation
                     value="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."/>
    </rule>
    <rule>
      <name value="nguonCtra"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="nguonCtraSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="nguonCtra"/>
      </target>
      <documentation
                     value="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"/>
    </rule>
    <rule>
      <name value="vetThuongTp"/>
      <source>
        <context value="sourceBundle"/>
        <min value="0"/>
        <max value="*"/>
        <element value="entry"/>
        <variable value="vetThuongTpSource"/>
      </source>
      <target>
        <context value="targetRow"/>
        <contextType value="variable"/>
        <element value="vetThuongTp"/>
      </target>
      <documentation
                     value="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."/>
    </rule>
  </group>
</StructureMap>