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 3 DVKT và vật tư BHYT — Logical Model — StructureMap

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

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

@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

<http://hl7.org/fhir/StructureMap/vn-sm-bhyt-xml3-service> a fhir:StructureMap ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:Resource.id [ fhir:value "vn-sm-bhyt-xml3-service"] ;
  fhir:Resource.language [ fhir:value "vi"] ;
  fhir:DomainResource.text [
     fhir:Narrative.status [ fhir:value "generated" ] ;
     fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: StructureMap vn-sm-bhyt-xml3-service</b></p><a name=\"vn-sm-bhyt-xml3-service\"> </a><a name=\"hcvn-sm-bhyt-xml3-service\"> </a><pre class=\"fml\">#xD;\n<b>map</b><span style=\"color: navy\"> \"</span>http://fhir.hl7.org.vn/core/StructureMap/vn-sm-bhyt-xml3-service<span style=\"color: navy\">\" = \"</span>BHYTXML3ServiceLMStructureMap<span style=\"color: navy\">\"#xD;\n#xD;\n</span><span style=\"color: navy\">// </span><span style=\"color: green\">Generated StructureMap scaffold for Bảng 3 DVKT và vật tư BHYT — Logical Model. Source semantics come from the logical model mapping annotations in `BHYTXML3ServiceLM.fsh` and remain aligned with the Python BHYT round-trip export adapter.</span>#xD;\n#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">FHIR-native source bundle profile used by the repository round-trip adapter.</span>#xD;\n<b>uses</b><span style=\"color: navy\"> \"</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\">\" </span><b>alias </b>BHYTSubmissionBundle <b>as </b><b>source</b>#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">Bảng 3 DVKT và vật tư BHYT — Logical Model</span>#xD;\n<b>uses</b><span style=\"color: navy\"> \"</span><a href=\"StructureDefinition-bhytXml3ServiceLm.html\" title=\"Bảng 3 DVKT và vật tư BHYT — Logical Model\">http://fhir.hl7.org.vn/core/StructureDefinition/bhytXml3ServiceLm</a><span style=\"color: navy\">\" </span><b>alias </b>BHYTXML3ServiceLM <b>as </b><b>target</b>#xD;\n#xD;\n<span style=\"color: navy\">// </span><span style=\"color: green\">Full QD 3176 XML3 field catalog. Rows are derived from non-medication service, supply, device, procedure, and bed-day claim items. 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>#xD;\n<b>group </b>MapBHYTXML3ServiceLM<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>BHYTXML3ServiceLM<span style=\"color: navy\">)</span><span style=\"color: navy\"> {#xD;\n</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>#xD;\n  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>\"maLk\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: STT - Số thứ tự dòng FHIR path: VNCoreClaim.item.where(category!='8').sequence</span>#xD;\n  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>\"stt\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: MA_DICH_VU - Mã dịch vụ kỹ thuật FHIR path: VNCoreClaim.item.where(category!='8').productOrService.coding.code | VNCoreServiceRequest.code.coding.code Mapping note: Conditionally required when MA_VAT_TU is absent or MA_NHOM is not 10.</span>#xD;\n  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>\"maDichVu\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: MA_PTTT_QT - Mã phương thức thanh toán FHIR path: VNCoreClaim.extension[paymentMethod].valueCodeableConcept.coding.code | VNCoreClaim.item.extension[paymentMethod].valueCodeableConcept.coding.code</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">maPtttQtSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.maPtttQt <i>\"maPtttQt\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: MA_VAT_TU - Mã vật tư y tế FHIR path: VNCoreDevice.identifier[medicalDeviceItemCode].value | VNCoreClaim.item.where(category!='8').productOrService.coding.code Mapping note: Conditionally required when MA_DICH_VU is absent or MA_NHOM=10; do not collapse medical supplies into service codes when Device is available.</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">maVatTuSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.maVatTu <i>\"maVatTu\"</i><span style=\"color: navy\">;</span>#xD;\n  <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.where(category!='8').category.coding.code Mapping note: Source code system is QD 3176 MA_NHOM. Export/import must bridge through the ConceptMap instead of assigning the QD 697 target code directly.</span>#xD;\n  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>\"maNhom\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: GOI_VTYT - Gói vật tư y tế FHIR path: VNCoreClaim.item.where(category!='8') | future supply-package (GOI_VTYT) extension Mapping note: Mã gói VTYT trong một lần dùng DVKT (G1, G2,...) theo QĐ 3176/QĐ-BYT; ghi tại dòng DVKT phát sinh gói VTYT đi kèm → điều kiện, 0..1. Chưa có element đích — dùng future extension nhóm gói VTYT trên Claim.item (tiền lệ taiSuDung).</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">goiVtytSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.goiVtyt <i>\"goiVtyt\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: TEN_VAT_TU - Tên vật tư y tế FHIR path: VNCoreDevice.deviceName.name | VNCoreClaim.item.where(category!='8').productOrService.text | display</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">tenVatTuSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.tenVatTu <i>\"tenVatTu\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: TEN_DICH_VU - Tên dịch vụ kỹ thuật FHIR path: VNCoreClaim.item.where(category!='8').productOrService.text | VNCoreServiceRequest.code.text | display</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">tenDichVuSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.tenDichVu <i>\"tenDichVu\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: MA_XANG_DAU - Mã xăng dầu FHIR path: VNCoreClaim.item.where(category!='8') | future fuel-type-code (MA_XANG_DAU) extension Mapping note: Mã loại xăng, dầu để tính chi phí vận chuyển người bệnh theo Bộ mã DMDC do Bộ Y tế ban hành (QĐ 3176/QĐ-BYT); chỉ áp cho dòng vận chuyển (MA_DICH_VU=VC.XXXXX) → điều kiện, 0..1. Chưa có element đích — dùng future extension mã nhiên liệu trên Claim.item.</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">maXangDauSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.maXangDau <i>\"maXangDau\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: DON_VI_TINH - Đơn vị tính FHIR path: VNCoreClaim.item.where(category!='8').quantity.unit</span>#xD;\n  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>\"donViTinh\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: PHAM_VI - Phạm vi thanh toán FHIR path: VNCoreClaim.item.where(category!='8').extension[insuranceCostInfo].extension[scope].valueCodeableConcept</span>#xD;\n  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>\"phamVi\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: SO_LUONG - Số lượng FHIR path: VNCoreClaim.item.where(category!='8').quantity.value</span>#xD;\n  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>\"soLuong\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: DON_GIA_BV - Đơn giá bệnh viện FHIR path: VNCoreClaim.item.where(category!='8').unitPrice.value | VNCoreClaim.item.extension[hospitalUnitPrice].valueMoney.value Mapping note: Hospital charge price; keep separate from the BHYT price to avoid financial round-trip loss.</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">donGiaBvSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.donGiaBv <i>\"donGiaBv\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: DON_GIA_BH - Đơn giá BHYT FHIR path: VNCoreClaim.item.where(category!='8').extension[insuranceCostInfo].extension[insuranceUnitPrice].valueMoney.value Mapping note: BHYT-covered unit price; do not collapse into Claim.item.unitPrice when hospital and insurance prices differ.</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">donGiaBhSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.donGiaBh <i>\"donGiaBh\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: TT_THAU - Thông tin thầu FHIR path: VNCoreClaim.item.where(category!='8').extension[tenderInfo].valueString Mapping note: Chuỗi thông tin thầu VTYT: số QĐ trúng thầu; số gói thầu; mã nhóm thầu (Phụ lục 7 QĐ 5937/QĐ-BYT); năm ban hành, cách nhau bằng ';' (QĐ 3176/QĐ-BYT). Đính chính: tăng kích thước tối đa lên 50 ký tự; VTYT đấu thầu/duyệt kế hoạch từ 14/4/2023 tạm dùng mã nhóm thầu 'N0'. Đích: extension VNCoreExtTenderInfo (value string) đã tồn tại trên Claim.item. Ghi chú scope: TT_THAU chỉ áp cho dòng VTYT (điều kiện) nhưng cardinality hiện giữ 1..1 theo bản gốc — không sửa trong lượt bổ sung mapping này.</span>#xD;\n  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>\"ttThau\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: TYLE_TT_DV - Tỷ lệ thanh toán dịch vụ FHIR path: VNCoreClaim.item.where(category!='8').extension[insuranceCostInfo].extension[servicePaymentRatio].valueDecimal</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">tyleTtDvSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.tyleTtDv <i>\"tyleTtDv\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: TYLE_TT_BH - Tỷ lệ thanh toán BHYT FHIR path: VNCoreClaim.item.where(category!='8').extension[insuranceCostInfo].extension[paymentRatio].valueDecimal</span>#xD;\n  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>\"tyleTtBh\"</i><span style=\"color: navy\">;</span>#xD;\n  <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.where(category!='8').net.value | VNCoreClaim.item.extension[hospitalLineAmount].valueMoney.value Mapping note: Hospital line amount; keep separate from BHYT line amount.</span>#xD;\n  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>\"thanhTienBv\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: THANH_TIEN_BH - Thành tiền BHYT FHIR path: VNCoreClaim.item.where(category!='8').extension[insuranceCostInfo].extension[insuranceLineAmount].valueMoney.value</span>#xD;\n  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>\"thanhTienBh\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: T_TRANTT - Mức trần thanh toán BHYT của gói VTYT FHIR path: VNCoreClaim.item.where(category!='8').extension[insuranceCostInfo].extension[paymentCeiling].valueMoney.value Mapping note: Mức thanh toán tối đa BHYT (45 tháng lương cơ sở) của gói VTYT trong một lần thực hiện DVKT theo Thông tư 04/2017/TT-BYT (diễn giải sửa đổi toàn bộ theo QĐ 3176/QĐ-BYT; kế thừa QĐ 4750/QĐ-BYT); trần 45 tháng lương cơ sở theo NĐ 188/2025/NĐ-CP. Chỉ ghi khi VTYT có quy định mức thanh toán BHYT, để trống khi không có trần → điều kiện, 0..1. Quan hệ tính toán: khi DON_GIA_BV vượt trần thì DON_GIA_BH = T_TRANTT. Đích là sub-extension paymentCeiling (valueMoney) của VNCoreExtInsuranceCostInfo trên Claim.item, tránh gộp mất dữ liệu vào insuranceUnitPrice.</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">tTranttSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.tTrantt <i>\"tTrantt\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: MUC_HUONG - Mức hưởng FHIR path: VNCoreClaim.item.where(category!='8').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 3 tăng lên 4 ký tự.</span>#xD;\n  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>\"mucHuong\"</i><span style=\"color: navy\">;</span>#xD;\n  <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.where(category!='8').extension[otherFundBreakdown].extension[stateBudget].valueMoney.value Mapping note: Số tiền DVKT/VTYT được ngân sách nhà nước (Trung ương và/hoặc địa phương) hỗ trợ theo QĐ 3176/QĐ-BYT, làm tròn 2 chữ số thập phân. Đích line-level là sub-extension stateBudget của VNCoreExtOtherFundBreakdown trên Claim.item; tổng hợp toàn hồ sơ tại Claim.extension[costSummary].extension[totalOtherFund].</span>#xD;\n  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>\"tNguonkhacNsnn\"</i><span style=\"color: navy\">;</span>#xD;\n  <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.where(category!='8').extension[otherFundBreakdown].extension[foreignAid].valueMoney.value Mapping note: Số tiền DVKT/VTYT được tổ chức/cá nhân có trụ sở hoặc đang sinh sống, học tập, lao động ngoài lãnh thổ Việt Nam hỗ trợ (QĐ 3176/QĐ-BYT). Đích line-level là sub-extension foreignAid của VNCoreExtOtherFundBreakdown trên Claim.item.</span>#xD;\n  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>\"tNguonkhacVtnn\"</i><span style=\"color: navy\">;</span>#xD;\n  <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.where(category!='8').extension[otherFundBreakdown].extension[domesticAid].valueMoney.value Mapping note: Số tiền DVKT/VTYT được tổ chức/cá nhân có trụ sở hoặc đang sinh sống, học tập, lao động trong lãnh thổ Việt Nam hỗ trợ (QĐ 3176/QĐ-BYT). Đích line-level là sub-extension domesticAid của VNCoreExtOtherFundBreakdown trên Claim.item.</span>#xD;\n  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>\"tNguonkhacVttn\"</i><span style=\"color: navy\">;</span>#xD;\n  <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.where(category!='8').extension[otherFundBreakdown].extension[otherRemaining].valueMoney.value Mapping note: Số tiền DVKT/VTYT từ các nguồn khác còn lại, không thuộc ba nguồn NSNN/VTNN/VTTN (QĐ 3176/QĐ-BYT). Đích line-level là sub-extension otherRemaining của VNCoreExtOtherFundBreakdown trên Claim.item.</span>#xD;\n  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>\"tNguonkhacCl\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: T_NGUONKHAC - Tổng nguồn khác FHIR path: VNCoreClaim.item.where(category!='8').extension[otherFundBreakdown] (tổng = stateBudget + foreignAid + domesticAid + otherRemaining) Mapping note: Tổng nguồn khác line-level = T_NGUONKHAC_NSNN + T_NGUONKHAC_VTNN + T_NGUONKHAC_VTTN + T_NGUONKHAC_CL (sửa đổi toàn bộ theo QĐ 3176/QĐ-BYT); khi &gt;0 giảm trừ lần lượt vào T_BNTT, T_BNCCT, T_BHTT đến khi hết. 4 thành phần tách theo dòng qua VNCoreExtOtherFundBreakdown trên Claim.item; tổng toàn hồ sơ ánh xạ VNCoreClaim.extension[costSummary].extension[totalOtherFund].valueMoney.value (xem BHYTXML1SummaryLM).</span>#xD;\n  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>\"tNguonkhac\"</i><span style=\"color: navy\">;</span>#xD;\n  <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[serviceLine].adjudication.where(category='submitted').amount - .where(category='eligible').amount | Derived from VNCoreExplanationOfBenefit.item[serviceLine].adjudication.where(category='submitted').amount - .where(category='eligible').amount</span>#xD;\n  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>\"tBntt\"</i><span style=\"color: navy\">;</span>#xD;\n  <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[serviceLine].adjudication.where(category='copay').amount.value | VNCoreExplanationOfBenefit.item[serviceLine].adjudication.where(category='copay').amount.value</span>#xD;\n  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>\"tBncct\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: T_BHTT - Quỹ BHYT thanh toán FHIR path: VNCoreClaimResponse.item[serviceLine].adjudication.where(category='benefit').amount.value | VNCoreExplanationOfBenefit.item[serviceLine].adjudication.where(category='benefit').amount.value</span>#xD;\n  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>\"tBhtt\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: MA_KHOA - Mã khoa FHIR path: VNCoreClaim.item.where(category!='8').extension[department].valueCodeableConcept.coding.code</span>#xD;\n  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>\"maKhoa\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: MA_GIUONG - Mã giường FHIR path: VNCoreEncounter.location.location.resolve().identifier.value Mapping note: Conditionally required for bed-day MA_NHOM values 14, 15, 16.</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">maGiuongSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.maGiuong <i>\"maGiuong\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: MA_BAC_SI - Mã bác sĩ FHIR path: VNCoreServiceRequest.requester.resolve().identifier.value | VNCoreProcedure.performer.actor.resolve().identifier.value | VNCorePractitioner.identifier.value</span>#xD;\n  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>\"maBacSi\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: NGUOI_THUC_HIEN - Người thực hiện FHIR path: VNCoreProcedure.performer.actor.resolve().identifier.value | VNCorePractitioner.identifier.value</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">nguoiThucHienSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.nguoiThucHien <i>\"nguoiThucHien\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: MA_BENH - Mã bệnh liên quan FHIR path: VNCoreCondition.code | VNCoreClaim.diagnosis.diagnosisCodeableConcept</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">maBenhSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.maBenh <i>\"maBenh\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: MA_BENH_YHCT - Mã bệnh y học cổ truyền FHIR path: VNCoreClaim.diagnosis.diagnosisCodeableConcept.coding[yhct].code | VNCoreCondition.code.coding[yhct].code</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">maBenhYhctSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.maBenhYhct <i>\"maBenhYhct\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: NGAY_YL - Ngày y lệnh FHIR path: VNCoreServiceRequest.authoredOn | VNCoreProcedure.basedOn.resolve().authoredOn</span>#xD;\n  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>\"ngayYl\"</i><span style=\"color: navy\">;</span>#xD;\n  <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: VNCoreProcedure.performedDateTime | VNCoreServiceRequest.occurrenceDateTime</span>#xD;\n  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>\"ngayThYl\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: NGAY_KQ - Ngày kết quả FHIR path: VNCoreDiagnosticReport.issued | VNCoreObservationLab.effectiveDateTime Mapping note: Conditionally required except for bed-day MA_NHOM values 14, 15, 16.</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">ngayKqSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.ngayKq <i>\"ngayKq\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: MA_PTTT - Mã phẫu thuật/thủ thuật FHIR path: VNCoreClaim.procedure.procedureCodeableConcept | VNCoreProcedure.code</span>#xD;\n  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>\"maPttt\"</i><span style=\"color: navy\">;</span>#xD;\n  <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[serviceLine].extension[recurrentWoundBenefit].valueBoolean | VNCoreExplanationOfBenefit.item[serviceLine].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>#xD;\n  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>\"vetThuongTp\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: PP_VO_CAM - Phương pháp vô cảm FHIR path: VNCoreProcedure.extension[anesthesiaMethod] | VNCoreClaim.item.where(category!='8').extension[anesthesiaMethod] | binding vn-anesthesia-method-vs (VNAnesthesiaMethodCS) Mapping note: Mã phương pháp vô cảm trong PT-TT: 1=gây mê, 2=gây tê, 3=châm tê, 4=vô cảm khác (QĐ 3176/QĐ-BYT); chỉ bắt buộc khi PT-TT có dùng phương pháp vô cảm → 0..1. CodeSystem đích VNAnesthesiaMethodCS (vn-anesthesia-method-cs) đã được tạo — binding tới ValueSet vn-anesthesia-method-vs trên future extension anesthesiaMethod của Procedure; bổ sung host Claim.item.extension khi ràng buộc max-cardinality (MR) !=1 của extension được sửa.</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">ppVoCamSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.ppVoCam <i>\"ppVoCam\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: VI_TRI_TH_DVKT - Vị trí thực hiện DVKT FHIR path: VNCoreProcedure.bodySite | VNCoreServiceRequest.bodySite</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">viTriThDvktSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.viTriThDvkt <i>\"viTriThDvkt\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: MA_MAY - Mã máy FHIR path: VNCoreDevice.identifier.value</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">maMaySource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.maMay <i>\"maMay\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: MA_HIEU_SP - Mã hiệu sản phẩm FHIR path: VNCoreDevice.deviceName.name | VNCoreDevice.modelNumber</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">maHieuSpSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.maHieuSp <i>\"maHieuSp\"</i><span style=\"color: navy\">;</span>#xD;\n  <span style=\"color: navy\">// </span><span style=\"color: green\">Target field: TAI_SU_DUNG - Tái sử dụng FHIR path: VNCoreDeviceUseStatement.note | future reusable-device extension</span>#xD;\n  sourceBundle.entry 0<span style=\"color: navy\">..</span>*<b> as </b><span style=\"color: maroon\">taiSuDungSource</span><span style=\"color: navy\"><b> -&gt; </b></span>targetRow.taiSuDung <i>\"taiSuDung\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span></pre></div>"
  ] ;
  fhir:StructureMap.url [ fhir:value "http://fhir.hl7.org.vn/core/StructureMap/vn-sm-bhyt-xml3-service"] ;
  fhir:StructureMap.identifier [
     fhir:index -1 ;
     fhir:Identifier.system [ fhir:value "urn:ietf:rfc:3986" ] ;
     fhir:Identifier.value [ fhir:value "urn:oid:2.25.161089673617632664299011809196868855799.43.6" ]
  ] ;
  fhir:StructureMap.version [ fhir:value "0.8.0"] ;
  fhir:StructureMap.name [ fhir:value "BHYTXML3ServiceLMStructureMap"] ;
  fhir:StructureMap.title [ fhir:value "Bảng 3 DVKT và vật tư BHYT — Logical Model — StructureMap"] ;
  fhir:StructureMap.status [ fhir:value "draft"] ;
  fhir:StructureMap.experimental [ fhir:value "false"^^xsd:boolean] ;
  fhir:StructureMap.date [ fhir:value "2026-04-28"^^xsd:date] ;
  fhir:StructureMap.publisher [ fhir:value "Omi HealthTech / VN Core FHIR Community Initiative"] ;
  fhir:StructureMap.contact [
     fhir:index -1 ;
     fhir:ContactDetail.name [ fhir:value "Omi HealthTech / VN Core FHIR Community Initiative" ] ;
     fhir:ContactDetail.telecom [
       fhir:index -1 ;
       fhir:ContactPoint.system [ fhir:value "url" ] ;
       fhir:ContactPoint.value [ fhir:value "https://hl7.org.vn" ]
     ], [
       fhir:index -1 ;
       fhir:ContactPoint.system [ fhir:value "email" ] ;
       fhir:ContactPoint.value [ fhir:value "info@hl7.org.vn" ]
     ]
  ], [
     fhir:index -1 ;
     fhir:ContactDetail.name [ fhir:value "Omi HealthTech (OmiGroup)" ] ;
     fhir:ContactDetail.telecom [
       fhir:index -1 ;
       fhir:ContactPoint.system [ fhir:value "url" ] ;
       fhir:ContactPoint.value [ fhir:value "https://omihealthtech.vn" ]
     ], [
       fhir:index -1 ;
       fhir:ContactPoint.system [ fhir:value "url" ] ;
       fhir:ContactPoint.value [ fhir:value "https://omigroup.vn" ]
     ], [
       fhir:index -1 ;
       fhir:ContactPoint.system [ fhir:value "email" ] ;
       fhir:ContactPoint.value [ fhir:value "info@hl7.org.vn" ]
     ]
  ] ;
  fhir:StructureMap.description [ fhir:value "Generated StructureMap scaffold for Bảng 3 DVKT và vật tư BHYT — Logical Model. Source semantics come from the logical model mapping annotations in `BHYTXML3ServiceLM.fsh` and remain aligned with the Python BHYT round-trip export adapter."] ;
  fhir:StructureMap.jurisdiction [
     fhir:index -1 ;
     fhir:CodeableConcept.coding [
       fhir:index -1 ;
       fhir:Coding.system [ fhir:value "urn:iso:std:iso:3166" ] ;
       fhir:Coding.code [ fhir:value "VN" ] ;
       fhir:Coding.display [ fhir:value "Viet Nam" ]
     ]
  ] ;
  fhir:StructureMap.purpose [ fhir: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."] ;
  fhir:StructureMap.structure [
     fhir:index -1 ;
     fhir:StructureMap.structure.url [
       fhir:value "http://fhir.hl7.org.vn/core/StructureDefinition/vn-core-bhyt-submission-bundle" ;
       fhir:link <http://fhir.hl7.org.vn/core/StructureDefinition/vn-core-bhyt-submission-bundle>
     ] ;
     fhir:StructureMap.structure.mode [ fhir:value "source" ] ;
     fhir:StructureMap.structure.alias [ fhir:value "BHYTSubmissionBundle" ] ;
     fhir:StructureMap.structure.documentation [ fhir:value "FHIR-native source bundle profile used by the repository round-trip adapter." ]
  ], [
     fhir:index -1 ;
     fhir:StructureMap.structure.url [
       fhir:value "http://fhir.hl7.org.vn/core/StructureDefinition/bhytXml3ServiceLm" ;
       fhir:link <http://fhir.hl7.org.vn/core/StructureDefinition/bhytXml3ServiceLm>
     ] ;
     fhir:StructureMap.structure.mode [ fhir:value "target" ] ;
     fhir:StructureMap.structure.alias [ fhir:value "BHYTXML3ServiceLM" ] ;
     fhir:StructureMap.structure.documentation [ fhir:value "Bảng 3 DVKT và vật tư BHYT — Logical Model" ]
  ] ;
  fhir:StructureMap.group [
     fhir:index -1 ;
     fhir:StructureMap.group.name [ fhir:value "MapBHYTXML3ServiceLM" ] ;
     fhir:StructureMap.group.typeMode [ fhir:value "none" ] ;
     fhir:StructureMap.group.documentation [ fhir:value "Full QD 3176 XML3 field catalog. Rows are derived from non-medication service, supply, device, procedure, and bed-day claim items. 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`." ] ;
     fhir:StructureMap.group.input [
       fhir:index -1 ;
       fhir:StructureMap.group.input.name [ fhir:value "sourceBundle" ] ;
       fhir:StructureMap.group.input.type [ fhir:value "BHYTSubmissionBundle" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "source" ] ;
       fhir:StructureMap.group.input.documentation [ fhir:value "VN Core BHYT submission bundle." ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.input.name [ fhir:value "targetRow" ] ;
       fhir:StructureMap.group.input.type [ fhir:value "BHYTXML3ServiceLM" ] ;
       fhir:StructureMap.group.input.mode [ fhir:value "target" ] ;
       fhir:StructureMap.group.input.documentation [ fhir:value "Bảng 3 DVKT và vật tư BHYT — Logical Model" ]
     ] ;
     fhir:StructureMap.group.rule [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "maLk" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "maLkSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "maLk" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: MA_LK - Mã liên kết hồ sơ FHIR path: VNCoreClaim.identifier[MALK].value" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "stt" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "sttSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "stt" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: STT - Số thứ tự dòng FHIR path: VNCoreClaim.item.where(category!='8').sequence" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "maDichVu" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "maDichVuSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "maDichVu" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: MA_DICH_VU - Mã dịch vụ kỹ thuật FHIR path: VNCoreClaim.item.where(category!='8').productOrService.coding.code | VNCoreServiceRequest.code.coding.code Mapping note: Conditionally required when MA_VAT_TU is absent or MA_NHOM is not 10." ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "maPtttQt" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "maPtttQtSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "maPtttQt" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: MA_PTTT_QT - Mã phương thức thanh toán FHIR path: VNCoreClaim.extension[paymentMethod].valueCodeableConcept.coding.code | VNCoreClaim.item.extension[paymentMethod].valueCodeableConcept.coding.code" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "maVatTu" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "maVatTuSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "maVatTu" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: MA_VAT_TU - Mã vật tư y tế FHIR path: VNCoreDevice.identifier[medicalDeviceItemCode].value | VNCoreClaim.item.where(category!='8').productOrService.coding.code Mapping note: Conditionally required when MA_DICH_VU is absent or MA_NHOM=10; do not collapse medical supplies into service codes when Device is available." ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "maNhom" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "maNhomSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "maNhom" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir: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 -> VNCoreClaim.item.where(category!='8').category.coding.code Mapping note: Source code system is QD 3176 MA_NHOM. Export/import must bridge through the ConceptMap instead of assigning the QD 697 target code directly." ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "goiVtyt" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "goiVtytSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "goiVtyt" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: GOI_VTYT - Gói vật tư y tế FHIR path: VNCoreClaim.item.where(category!='8') | future supply-package (GOI_VTYT) extension Mapping note: Mã gói VTYT trong một lần dùng DVKT (G1, G2,...) theo QĐ 3176/QĐ-BYT; ghi tại dòng DVKT phát sinh gói VTYT đi kèm → điều kiện, 0..1. Chưa có element đích — dùng future extension nhóm gói VTYT trên Claim.item (tiền lệ taiSuDung)." ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "tenVatTu" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "tenVatTuSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "tenVatTu" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: TEN_VAT_TU - Tên vật tư y tế FHIR path: VNCoreDevice.deviceName.name | VNCoreClaim.item.where(category!='8').productOrService.text | display" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "tenDichVu" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "tenDichVuSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "tenDichVu" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: TEN_DICH_VU - Tên dịch vụ kỹ thuật FHIR path: VNCoreClaim.item.where(category!='8').productOrService.text | VNCoreServiceRequest.code.text | display" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "maXangDau" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "maXangDauSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "maXangDau" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: MA_XANG_DAU - Mã xăng dầu FHIR path: VNCoreClaim.item.where(category!='8') | future fuel-type-code (MA_XANG_DAU) extension Mapping note: Mã loại xăng, dầu để tính chi phí vận chuyển người bệnh theo Bộ mã DMDC do Bộ Y tế ban hành (QĐ 3176/QĐ-BYT); chỉ áp cho dòng vận chuyển (MA_DICH_VU=VC.XXXXX) → điều kiện, 0..1. Chưa có element đích — dùng future extension mã nhiên liệu trên Claim.item." ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "donViTinh" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "donViTinhSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "donViTinh" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: DON_VI_TINH - Đơn vị tính FHIR path: VNCoreClaim.item.where(category!='8').quantity.unit" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "phamVi" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "phamViSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "phamVi" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: PHAM_VI - Phạm vi thanh toán FHIR path: VNCoreClaim.item.where(category!='8').extension[insuranceCostInfo].extension[scope].valueCodeableConcept" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "soLuong" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "soLuongSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "soLuong" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: SO_LUONG - Số lượng FHIR path: VNCoreClaim.item.where(category!='8').quantity.value" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "donGiaBv" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "donGiaBvSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "donGiaBv" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: DON_GIA_BV - Đơn giá bệnh viện FHIR path: VNCoreClaim.item.where(category!='8').unitPrice.value | VNCoreClaim.item.extension[hospitalUnitPrice].valueMoney.value Mapping note: Hospital charge price; keep separate from the BHYT price to avoid financial round-trip loss." ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "donGiaBh" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "donGiaBhSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "donGiaBh" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: DON_GIA_BH - Đơn giá BHYT FHIR path: VNCoreClaim.item.where(category!='8').extension[insuranceCostInfo].extension[insuranceUnitPrice].valueMoney.value Mapping note: BHYT-covered unit price; do not collapse into Claim.item.unitPrice when hospital and insurance prices differ." ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "ttThau" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "ttThauSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "ttThau" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: TT_THAU - Thông tin thầu FHIR path: VNCoreClaim.item.where(category!='8').extension[tenderInfo].valueString Mapping note: Chuỗi thông tin thầu VTYT: số QĐ trúng thầu; số gói thầu; mã nhóm thầu (Phụ lục 7 QĐ 5937/QĐ-BYT); năm ban hành, cách nhau bằng ';' (QĐ 3176/QĐ-BYT). Đính chính: tăng kích thước tối đa lên 50 ký tự; VTYT đấu thầu/duyệt kế hoạch từ 14/4/2023 tạm dùng mã nhóm thầu 'N0'. Đích: extension VNCoreExtTenderInfo (value string) đã tồn tại trên Claim.item. Ghi chú scope: TT_THAU chỉ áp cho dòng VTYT (điều kiện) nhưng cardinality hiện giữ 1..1 theo bản gốc — không sửa trong lượt bổ sung mapping này." ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "tyleTtDv" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "tyleTtDvSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "tyleTtDv" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: TYLE_TT_DV - Tỷ lệ thanh toán dịch vụ FHIR path: VNCoreClaim.item.where(category!='8').extension[insuranceCostInfo].extension[servicePaymentRatio].valueDecimal" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "tyleTtBh" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "tyleTtBhSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "tyleTtBh" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: TYLE_TT_BH - Tỷ lệ thanh toán BHYT FHIR path: VNCoreClaim.item.where(category!='8').extension[insuranceCostInfo].extension[paymentRatio].valueDecimal" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "thanhTienBv" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "thanhTienBvSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "thanhTienBv" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: THANH_TIEN_BV - Thành tiền bệnh viện FHIR path: VNCoreClaim.item.where(category!='8').net.value | VNCoreClaim.item.extension[hospitalLineAmount].valueMoney.value Mapping note: Hospital line amount; keep separate from BHYT line amount." ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "thanhTienBh" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "thanhTienBhSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "thanhTienBh" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: THANH_TIEN_BH - Thành tiền BHYT FHIR path: VNCoreClaim.item.where(category!='8').extension[insuranceCostInfo].extension[insuranceLineAmount].valueMoney.value" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "tTrantt" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "tTranttSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "tTrantt" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: T_TRANTT - Mức trần thanh toán BHYT của gói VTYT FHIR path: VNCoreClaim.item.where(category!='8').extension[insuranceCostInfo].extension[paymentCeiling].valueMoney.value Mapping note: Mức thanh toán tối đa BHYT (45 tháng lương cơ sở) của gói VTYT trong một lần thực hiện DVKT theo Thông tư 04/2017/TT-BYT (diễn giải sửa đổi toàn bộ theo QĐ 3176/QĐ-BYT; kế thừa QĐ 4750/QĐ-BYT); trần 45 tháng lương cơ sở theo NĐ 188/2025/NĐ-CP. Chỉ ghi khi VTYT có quy định mức thanh toán BHYT, để trống khi không có trần → điều kiện, 0..1. Quan hệ tính toán: khi DON_GIA_BV vượt trần thì DON_GIA_BH = T_TRANTT. Đích là sub-extension paymentCeiling (valueMoney) của VNCoreExtInsuranceCostInfo trên Claim.item, tránh gộp mất dữ liệu vào insuranceUnitPrice." ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "mucHuong" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "mucHuongSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "mucHuong" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: MUC_HUONG - Mức hưởng FHIR path: VNCoreClaim.item.where(category!='8').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 3 tăng lên 4 ký tự." ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "tNguonkhacNsnn" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "tNguonkhacNsnnSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "tNguonkhacNsnn" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: T_NGUONKHAC_NSNN - Nguồn khác ngân sách nhà nước FHIR path: VNCoreClaim.item.where(category!='8').extension[otherFundBreakdown].extension[stateBudget].valueMoney.value Mapping note: Số tiền DVKT/VTYT được ngân sách nhà nước (Trung ương và/hoặc địa phương) hỗ trợ theo QĐ 3176/QĐ-BYT, làm tròn 2 chữ số thập phân. Đích line-level là sub-extension stateBudget của VNCoreExtOtherFundBreakdown trên Claim.item; tổng hợp toàn hồ sơ tại Claim.extension[costSummary].extension[totalOtherFund]." ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "tNguonkhacVtnn" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "tNguonkhacVtnnSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "tNguonkhacVtnn" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: T_NGUONKHAC_VTNN - Nguồn khác viện trợ nước ngoài FHIR path: VNCoreClaim.item.where(category!='8').extension[otherFundBreakdown].extension[foreignAid].valueMoney.value Mapping note: Số tiền DVKT/VTYT được tổ chức/cá nhân có trụ sở hoặc đang sinh sống, học tập, lao động ngoài lãnh thổ Việt Nam hỗ trợ (QĐ 3176/QĐ-BYT). Đích line-level là sub-extension foreignAid của VNCoreExtOtherFundBreakdown trên Claim.item." ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "tNguonkhacVttn" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "tNguonkhacVttnSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "tNguonkhacVttn" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: T_NGUONKHAC_VTTN - Nguồn khác viện trợ trong nước FHIR path: VNCoreClaim.item.where(category!='8').extension[otherFundBreakdown].extension[domesticAid].valueMoney.value Mapping note: Số tiền DVKT/VTYT được tổ chức/cá nhân có trụ sở hoặc đang sinh sống, học tập, lao động trong lãnh thổ Việt Nam hỗ trợ (QĐ 3176/QĐ-BYT). Đích line-level là sub-extension domesticAid của VNCoreExtOtherFundBreakdown trên Claim.item." ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "tNguonkhacCl" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "tNguonkhacClSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "tNguonkhacCl" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: T_NGUONKHAC_CL - Nguồn khác còn lại FHIR path: VNCoreClaim.item.where(category!='8').extension[otherFundBreakdown].extension[otherRemaining].valueMoney.value Mapping note: Số tiền DVKT/VTYT từ các nguồn khác còn lại, không thuộc ba nguồn NSNN/VTNN/VTTN (QĐ 3176/QĐ-BYT). Đích line-level là sub-extension otherRemaining của VNCoreExtOtherFundBreakdown trên Claim.item." ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "tNguonkhac" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "tNguonkhacSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "tNguonkhac" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: T_NGUONKHAC - Tổng nguồn khác FHIR path: VNCoreClaim.item.where(category!='8').extension[otherFundBreakdown] (tổng = stateBudget + foreignAid + domesticAid + otherRemaining) Mapping note: Tổng nguồn khác line-level = T_NGUONKHAC_NSNN + T_NGUONKHAC_VTNN + T_NGUONKHAC_VTTN + T_NGUONKHAC_CL (sửa đổi toàn bộ theo QĐ 3176/QĐ-BYT); khi >0 giảm trừ lần lượt vào T_BNTT, T_BNCCT, T_BHTT đến khi hết. 4 thành phần tách theo dòng qua VNCoreExtOtherFundBreakdown trên Claim.item; tổng toàn hồ sơ ánh xạ VNCoreClaim.extension[costSummary].extension[totalOtherFund].valueMoney.value (xem BHYTXML1SummaryLM)." ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "tBntt" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "tBnttSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "tBntt" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: T_BNTT - Người bệnh tự trả FHIR path: Derived from VNCoreClaimResponse.item[serviceLine].adjudication.where(category='submitted').amount - .where(category='eligible').amount | Derived from VNCoreExplanationOfBenefit.item[serviceLine].adjudication.where(category='submitted').amount - .where(category='eligible').amount" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "tBncct" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "tBncctSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "tBncct" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: T_BNCCT - Người bệnh cùng chi trả FHIR path: VNCoreClaimResponse.item[serviceLine].adjudication.where(category='copay').amount.value | VNCoreExplanationOfBenefit.item[serviceLine].adjudication.where(category='copay').amount.value" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "tBhtt" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "tBhttSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "tBhtt" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: T_BHTT - Quỹ BHYT thanh toán FHIR path: VNCoreClaimResponse.item[serviceLine].adjudication.where(category='benefit').amount.value | VNCoreExplanationOfBenefit.item[serviceLine].adjudication.where(category='benefit').amount.value" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "maKhoa" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "maKhoaSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "maKhoa" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: MA_KHOA - Mã khoa FHIR path: VNCoreClaim.item.where(category!='8').extension[department].valueCodeableConcept.coding.code" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "maGiuong" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "maGiuongSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "maGiuong" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: MA_GIUONG - Mã giường FHIR path: VNCoreEncounter.location.location.resolve().identifier.value Mapping note: Conditionally required for bed-day MA_NHOM values 14, 15, 16." ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "maBacSi" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "maBacSiSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "maBacSi" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: MA_BAC_SI - Mã bác sĩ FHIR path: VNCoreServiceRequest.requester.resolve().identifier.value | VNCoreProcedure.performer.actor.resolve().identifier.value | VNCorePractitioner.identifier.value" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "nguoiThucHien" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "nguoiThucHienSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "nguoiThucHien" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: NGUOI_THUC_HIEN - Người thực hiện FHIR path: VNCoreProcedure.performer.actor.resolve().identifier.value | VNCorePractitioner.identifier.value" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "maBenh" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "maBenhSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "maBenh" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: MA_BENH - Mã bệnh liên quan FHIR path: VNCoreCondition.code | VNCoreClaim.diagnosis.diagnosisCodeableConcept" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "maBenhYhct" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "maBenhYhctSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "maBenhYhct" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: MA_BENH_YHCT - Mã bệnh y học cổ truyền FHIR path: VNCoreClaim.diagnosis.diagnosisCodeableConcept.coding[yhct].code | VNCoreCondition.code.coding[yhct].code" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "ngayYl" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "ngayYlSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "ngayYl" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: NGAY_YL - Ngày y lệnh FHIR path: VNCoreServiceRequest.authoredOn | VNCoreProcedure.basedOn.resolve().authoredOn" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "ngayThYl" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "ngayThYlSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "ngayThYl" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: NGAY_TH_YL - Ngày thực hiện y lệnh FHIR path: VNCoreProcedure.performedDateTime | VNCoreServiceRequest.occurrenceDateTime" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "ngayKq" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "ngayKqSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "ngayKq" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: NGAY_KQ - Ngày kết quả FHIR path: VNCoreDiagnosticReport.issued | VNCoreObservationLab.effectiveDateTime Mapping note: Conditionally required except for bed-day MA_NHOM values 14, 15, 16." ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "maPttt" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "maPtttSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "maPttt" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: MA_PTTT - Mã phẫu thuật/thủ thuật FHIR path: VNCoreClaim.procedure.procedureCodeableConcept | VNCoreProcedure.code" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "vetThuongTp" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "vetThuongTpSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "vetThuongTp" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: VET_THUONG_TP - Vết thương tái phát FHIR path: VNCoreClaim.item[serviceLine].extension[recurrentWoundBenefit].valueBoolean | VNCoreExplanationOfBenefit.item[serviceLine].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." ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "ppVoCam" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "ppVoCamSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "ppVoCam" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: PP_VO_CAM - Phương pháp vô cảm FHIR path: VNCoreProcedure.extension[anesthesiaMethod] | VNCoreClaim.item.where(category!='8').extension[anesthesiaMethod] | binding vn-anesthesia-method-vs (VNAnesthesiaMethodCS) Mapping note: Mã phương pháp vô cảm trong PT-TT: 1=gây mê, 2=gây tê, 3=châm tê, 4=vô cảm khác (QĐ 3176/QĐ-BYT); chỉ bắt buộc khi PT-TT có dùng phương pháp vô cảm → 0..1. CodeSystem đích VNAnesthesiaMethodCS (vn-anesthesia-method-cs) đã được tạo — binding tới ValueSet vn-anesthesia-method-vs trên future extension anesthesiaMethod của Procedure; bổ sung host Claim.item.extension khi ràng buộc max-cardinality (MR) !=1 của extension được sửa." ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "viTriThDvkt" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "viTriThDvktSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "viTriThDvkt" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: VI_TRI_TH_DVKT - Vị trí thực hiện DVKT FHIR path: VNCoreProcedure.bodySite | VNCoreServiceRequest.bodySite" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "maMay" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "maMaySource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "maMay" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: MA_MAY - Mã máy FHIR path: VNCoreDevice.identifier.value" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "maHieuSp" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "maHieuSpSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "maHieuSp" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: MA_HIEU_SP - Mã hiệu sản phẩm FHIR path: VNCoreDevice.deviceName.name | VNCoreDevice.modelNumber" ]
     ], [
       fhir:index -1 ;
       fhir:StructureMap.group.rule.name [ fhir:value "taiSuDung" ] ;
       fhir:StructureMap.group.rule.source [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.source.context [ fhir:value "sourceBundle" ] ;
         fhir:StructureMap.group.rule.source.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:StructureMap.group.rule.source.max [ fhir:value "*" ] ;
         fhir:StructureMap.group.rule.source.element [ fhir:value "entry" ] ;
         fhir:StructureMap.group.rule.source.variable [ fhir:value "taiSuDungSource" ]
       ] ;
       fhir:StructureMap.group.rule.target [
         fhir:index -1 ;
         fhir:StructureMap.group.rule.target.context [ fhir:value "targetRow" ] ;
         fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
         fhir:StructureMap.group.rule.target.element [ fhir:value "taiSuDung" ]
       ] ;
       fhir:StructureMap.group.rule.documentation [ fhir:value "Target field: TAI_SU_DUNG - Tái sử dụng FHIR path: VNCoreDeviceUseStatement.note | future reusable-device extension" ]
     ]
  ] .

# - ontology header ------------------------------------------------------------

<http://hl7.org/fhir/StructureMap/vn-sm-bhyt-xml3-service.ttl> a owl:Ontology ;
  owl:imports fhir:fhir.ttl ;
  owl:versionIRI <http://build.fhir.org/StructureMap/vn-sm-bhyt-xml3-service.ttl> .