Bộ Hướng dẫn Triển khai Core FHIR cho Việt Nam
0.8.0 - Draft for Community Review
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
| URL chính thức: http://fhir.hl7.org.vn/core/StructureMap/vn-sm-bhyt-xml2-medication | Phiên bản: 0.8.0 | ||||
| Computable Name: BHYTXML2MedicationLMStructureMap | |||||
| Định danh khác: OID:2.25.161089673617632664299011809196868855799.43.5 | |||||
Generated StructureMap scaffold for Bảng 2 thuốc BHYT — Logical Model. Source semantics come from the logical model mapping annotations in BHYTXML2MedicationLM.fsh and remain aligned with the Python BHYT round-trip export adapter.
Language: vi
map "http://fhir.hl7.org.vn/core/StructureMap/vn-sm-bhyt-xml2-medication" = "BHYTXML2MedicationLMStructureMap" // Generated StructureMap scaffold for Bảng 2 thuốc BHYT — Logical Model. Source semantics come from the logical model mapping annotations in `BHYTXML2MedicationLM.fsh` and remain aligned with the Python BHYT round-trip export adapter. // FHIR-native source bundle profile used by the repository round-trip adapter. uses "http://fhir.hl7.org.vn/core/StructureDefinition/vn-core-bhyt-submission-bundle" alias BHYTSubmissionBundle as source // Bảng 2 thuốc BHYT — Logical Model uses "http://fhir.hl7.org.vn/core/StructureDefinition/bhytXml2MedicationLm" alias BHYTXML2MedicationLM as target // Full QD 3176 XML2 field catalog. MA_NHOM uses the QD 3176 source code system and must be mapped to QD 697/VNCostCategoryCS with a ConceptMap. Generated from logical-model `^mapping` annotations. Fields still missing a field-level `^mapping.map` entry remain outside this StructureMap and are tracked in `wiki/mappings/bhyt-output-data/machine/structuremap-coverage.json`. group MapBHYTXML2MedicationLM(source sourceBundle : BHYTSubmissionBundle, target targetRow : BHYTXML2MedicationLM) { // Target field: MA_LK - Mã liên kết hồ sơ FHIR path: VNCoreClaim.identifier[MALK].value sourceBundle.entry 0..* as maLkSource -> targetRow.maLk "maLk"; // Target field: STT - Số thứ tự dòng FHIR path: VNCoreClaim.item[medicationLine].sequence sourceBundle.entry 0..* as sttSource -> targetRow.stt "stt"; // Target field: MA_THUOC - Mã thuốc FHIR path: VNCoreMedication.code.coding.code | VNCoreClaim.item[medicationLine].productOrService.coding.code sourceBundle.entry 0..* as maThuocSource -> targetRow.maThuoc "maThuoc"; // Target field: MA_PP_CHEBIEN - Mã phương pháp chế biến FHIR path: VNCoreClaim.item[medicationLine].extension[processingMethod].valueString | VNCoreExplanationOfBenefit.item[medicationLine].extension[processingMethod].valueString | VNCoreMedication.extension[processingMethod].valueString | VNCoreMedicationRequest.extension[processingMethod].valueString | VNCoreMedicationDispense.extension[processingMethod].valueString sourceBundle.entry 0..* as maPpChebienSource -> targetRow.maPpChebien "maPpChebien"; // Target field: MA_CSKCB_THUOC - Mã cơ sở KCB cấp thuốc FHIR path: VNCoreMedicationDispense.performer.actor.resolve().identifier[CSKCB].value | VNCoreMedicationDispense.location.resolve().identifier[CSKCB].value sourceBundle.entry 0..* as maCskcbThuocSource -> targetRow.maCskcbThuoc "maCskcbThuoc"; // 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[medicationLine].category.coding.code Mapping note: QD 3176 uses MA_NHOM=4 for medication; StructureMap must first apply the ConceptMap, then populate VNCostCategoryCS#8. Do not assign the QD 3176 code directly to VNCostCategoryCS. sourceBundle.entry 0..* as maNhomSource -> targetRow.maNhom "maNhom"; // Target field: TEN_THUOC - Tên thuốc FHIR path: VNCoreMedication.code.text | VNCoreClaim.item[medicationLine].productOrService.text | display sourceBundle.entry 0..* as tenThuocSource -> targetRow.tenThuoc "tenThuoc"; // Target field: DON_VI_TINH - Đơn vị tính FHIR path: VNCoreClaim.item[medicationLine].quantity.unit sourceBundle.entry 0..* as donViTinhSource -> targetRow.donViTinh "donViTinh"; // Target field: HAM_LUONG - Hàm lượng FHIR path: VNCoreMedication.ingredient.strength | Medication.code.text sourceBundle.entry 0..* as hamLuongSource -> targetRow.hamLuong "hamLuong"; // Target field: DUONG_DUNG - Đường dùng FHIR path: VNCoreMedicationRequest.dosageInstruction.route sourceBundle.entry 0..* as duongDungSource -> targetRow.duongDung "duongDung"; // Target field: DANG_BAO_CHE - Dạng bào chế FHIR path: VNCoreMedication.form.coding.code | VNCoreMedication.form.text sourceBundle.entry 0..* as dangBaoCheSource -> targetRow.dangBaoChe "dangBaoChe"; // Target field: LIEU_DUNG - Liều dùng FHIR path: VNCoreMedicationRequest.dosageInstruction.doseAndRate sourceBundle.entry 0..* as lieuDungSource -> targetRow.lieuDung "lieuDung"; // Target field: CACH_DUNG - Cách dùng FHIR path: VNCoreMedicationRequest.dosageInstruction.text sourceBundle.entry 0..* as cachDungSource -> targetRow.cachDung "cachDung"; // Target field: SO_DANG_KY - Số đăng ký thuốc FHIR path: VNCoreMedication.extension[registrationNumber].valueString | VNCoreMedicationRequest.extension[registrationNumber].valueString | VNCoreMedicationDispense.extension[registrationNumber].valueString Mapping note: QĐ 1931/QĐ-BYT (29/06/2026) sửa đổi QĐ 3176/QĐ-BYT: thuốc hiếm được UBND cấp tỉnh cấp phép đơn hàng nhập khẩu mã hóa theo quy ước UBND.YYYY.X.S (YYYY = năm cấp giấy phép, X = số văn bản cấp phép nhập khẩu, S = số thứ tự thuốc trong văn bản cấp phép). sourceBundle.entry 0..* as soDangKySource -> targetRow.soDangKy "soDangKy"; // Target field: TT_THAU - Thông tin thầu FHIR path: VNCoreClaim.item[medicationLine].extension[tenderInfo].valueString | VNCoreExplanationOfBenefit.item[medicationLine].extension[tenderInfo].valueString | VNCoreMedication.extension[tenderInfo].valueString | VNCoreMedicationRequest.extension[tenderInfo].valueString | VNCoreMedicationDispense.extension[tenderInfo].valueString sourceBundle.entry 0..* as ttThauSource -> targetRow.ttThau "ttThau"; // Target field: PHAM_VI - Phạm vi thanh toán FHIR path: VNCoreClaim.item[medicationLine].extension[insuranceCostInfo].extension[scope].valueCodeableConcept sourceBundle.entry 0..* as phamViSource -> targetRow.phamVi "phamVi"; // Target field: TYLE_TT_BH - Tỷ lệ thanh toán BHYT FHIR path: VNCoreClaim.item[medicationLine].extension[insuranceCostInfo].extension[paymentRatio].valueDecimal sourceBundle.entry 0..* as tyleTtBhSource -> targetRow.tyleTtBh "tyleTtBh"; // Target field: SO_LUONG - Số lượng FHIR path: VNCoreClaim.item[medicationLine].quantity.value | VNCoreMedicationDispense.quantity.value sourceBundle.entry 0..* as soLuongSource -> targetRow.soLuong "soLuong"; // Target field: DON_GIA - Đơn giá FHIR path: VNCoreClaim.item[medicationLine].unitPrice.value sourceBundle.entry 0..* as donGiaSource -> targetRow.donGia "donGia"; // Target field: THANH_TIEN_BV - Thành tiền bệnh viện FHIR path: VNCoreClaim.item[medicationLine].net.value | VNCoreClaim.item[medicationLine].extension[hospitalLineAmount].valueMoney.value sourceBundle.entry 0..* as thanhTienBvSource -> targetRow.thanhTienBv "thanhTienBv"; // Target field: THANH_TIEN_BH - Thành tiền BHYT FHIR path: VNCoreClaim.item[medicationLine].extension[insuranceCostInfo].extension[insuranceLineAmount].valueMoney.value sourceBundle.entry 0..* as thanhTienBhSource -> targetRow.thanhTienBh "thanhTienBh"; // Target field: T_NGUONKHAC_NSNN - Nguồn khác ngân sách nhà nước FHIR path: VNCoreClaim.item[medicationLine].extension[otherFundBreakdown].extension[stateBudget].valueMoney.value | VNCoreExplanationOfBenefit.item[medicationLine].extension[otherFundBreakdown].extension[stateBudget].valueMoney.value Mapping note: Số tiền được ngân sách nhà nước hỗ trợ, tách theo dòng qua sub-extension stateBudget của VNCoreExtOtherFundBreakdown trên Claim.item/EOB.item. Số tiền gộp toàn nguồn khác vẫn ánh xạ category 'other-fund' theo ConceptMap vn-cm-bhyt-financial-field-to-adjudication (VNBHYTFinancialFieldCS#T_NGUONKHAC_NSNN). Căn cứ QĐ 3176/QĐ-BYT. sourceBundle.entry 0..* as tNguonkhacNsnnSource -> targetRow.tNguonkhacNsnn "tNguonkhacNsnn"; // Target field: T_NGUONKHAC_VTNN - Nguồn khác viện trợ nước ngoài FHIR path: VNCoreClaim.item[medicationLine].extension[otherFundBreakdown].extension[foreignAid].valueMoney.value | VNCoreExplanationOfBenefit.item[medicationLine].extension[otherFundBreakdown].extension[foreignAid].valueMoney.value Mapping note: Số tiền viện trợ từ tổ chức/cá nhân ngoài lãnh thổ Việt Nam, tách theo dòng qua sub-extension foreignAid của VNCoreExtOtherFundBreakdown trên Claim.item/EOB.item. Số tiền gộp toàn nguồn khác vẫn ánh xạ category 'other-fund' theo ConceptMap vn-cm-bhyt-financial-field-to-adjudication (VNBHYTFinancialFieldCS#T_NGUONKHAC_VTNN). Căn cứ QĐ 3176/QĐ-BYT. sourceBundle.entry 0..* as tNguonkhacVtnnSource -> targetRow.tNguonkhacVtnn "tNguonkhacVtnn"; // Target field: T_NGUONKHAC_VTTN - Nguồn khác viện trợ trong nước FHIR path: VNCoreClaim.item[medicationLine].extension[otherFundBreakdown].extension[domesticAid].valueMoney.value | VNCoreExplanationOfBenefit.item[medicationLine].extension[otherFundBreakdown].extension[domesticAid].valueMoney.value Mapping note: Số tiền viện trợ từ tổ chức/cá nhân trong lãnh thổ Việt Nam, tách theo dòng qua sub-extension domesticAid của VNCoreExtOtherFundBreakdown trên Claim.item/EOB.item. Số tiền gộp toàn nguồn khác vẫn ánh xạ category 'other-fund' theo ConceptMap vn-cm-bhyt-financial-field-to-adjudication (VNBHYTFinancialFieldCS#T_NGUONKHAC_VTTN). Căn cứ QĐ 3176/QĐ-BYT. sourceBundle.entry 0..* as tNguonkhacVttnSource -> targetRow.tNguonkhacVttn "tNguonkhacVttn"; // Target field: T_NGUONKHAC_CL - Nguồn khác còn lại FHIR path: VNCoreClaim.item[medicationLine].extension[otherFundBreakdown].extension[otherRemaining].valueMoney.value | VNCoreExplanationOfBenefit.item[medicationLine].extension[otherFundBreakdown].extension[otherRemaining].valueMoney.value Mapping note: Số tiền từ các nguồn khác còn lại (ngoài NSNN/VTNN/VTTN), tách theo dòng qua sub-extension otherRemaining của VNCoreExtOtherFundBreakdown trên Claim.item/EOB.item. Số tiền gộp toàn nguồn khác vẫn ánh xạ category 'other-fund' theo ConceptMap vn-cm-bhyt-financial-field-to-adjudication (VNBHYTFinancialFieldCS#T_NGUONKHAC_CL). Căn cứ QĐ 3176/QĐ-BYT. sourceBundle.entry 0..* as tNguonkhacClSource -> targetRow.tNguonkhacCl "tNguonkhacCl"; // Target field: T_NGUONKHAC - Tổng nguồn khác FHIR path: VNCoreClaimResponse.item[medicationLine].adjudication.where(category='other-fund').amount.value | VNCoreExplanationOfBenefit.item[medicationLine].adjudication.where(category='other-fund').amount.value | VNCoreClaim.item[medicationLine].extension[otherFundBreakdown] (tổng = stateBudget + foreignAid + domesticAid + otherRemaining) Mapping note: T_NGUONKHAC = T_NGUONKHAC_NSNN + T_NGUONKHAC_VTNN + T_NGUONKHAC_VTTN + T_NGUONKHAC_CL; 4 thành phần được tách theo dòng qua VNCoreExtOtherFundBreakdown trên Claim.item. Tổng gộp toàn nguồn khác ở line-level ánh xạ category 'other-fund' theo ConceptMap vn-cm-bhyt-financial-field-to-adjudication (VNBHYTAdjudicationCategoryCS#other-fund); R4 không có Claim.item.adjudication nên đích tổng là (Claim)Response/EOB.item.adjudication. Công thức giảm trừ lần lượt T_BNTT → T_BNCCT → T_BHTT do StructureMap của exporter xử lý, không encode invariant ở profile. Căn cứ QĐ 3176/QĐ-BYT. sourceBundle.entry 0..* as tNguonkhacSource -> targetRow.tNguonkhac "tNguonkhac"; // Target field: MUC_HUONG - Mức hưởng FHIR path: VNCoreClaim.item[medicationLine].extension[insuranceCostInfo].extension[benefitLevel].valueDecimal Mapping note: QĐ 1931/QĐ-BYT (29/06/2026) sửa đổi QĐ 3176/QĐ-BYT: kích thước tối đa của MUC_HUONG tại Bảng 2 tăng lên 4 ký tự. sourceBundle.entry 0..* as mucHuongSource -> targetRow.mucHuong "mucHuong"; // Target field: T_BNTT - Người bệnh tự trả FHIR path: Derived from VNCoreClaimResponse.item[medicationLine].adjudication.where(category='submitted').amount - .where(category='eligible').amount | Derived from VNCoreExplanationOfBenefit.item[medicationLine].adjudication.where(category='submitted').amount - .where(category='eligible').amount sourceBundle.entry 0..* as tBnttSource -> targetRow.tBntt "tBntt"; // Target field: T_BNCCT - Người bệnh cùng chi trả FHIR path: VNCoreClaimResponse.item[medicationLine].adjudication.where(category='copay').amount.value | VNCoreExplanationOfBenefit.item[medicationLine].adjudication.where(category='copay').amount.value sourceBundle.entry 0..* as tBncctSource -> targetRow.tBncct "tBncct"; // Target field: T_BHTT - Quỹ BHYT thanh toán FHIR path: VNCoreClaimResponse.item[medicationLine].adjudication.where(category='benefit').amount.value | VNCoreExplanationOfBenefit.item[medicationLine].adjudication.where(category='benefit').amount.value sourceBundle.entry 0..* as tBhttSource -> targetRow.tBhtt "tBhtt"; // Target field: MA_KHOA - Mã khoa FHIR path: VNCoreClaim.item[medicationLine].extension[department].valueCodeableConcept.coding.code sourceBundle.entry 0..* as maKhoaSource -> targetRow.maKhoa "maKhoa"; // Target field: MA_BAC_SI - Mã bác sĩ FHIR path: VNCoreMedicationRequest.requester.resolve().identifier.value | VNCorePractitioner.identifier.value sourceBundle.entry 0..* as maBacSiSource -> targetRow.maBacSi "maBacSi"; // Target field: MA_DICH_VU - Mã dịch vụ liên quan FHIR path: VNCoreClaim.item[medicationLine].detail.productOrService.coding.code | VNCoreServiceRequest.code sourceBundle.entry 0..* as maDichVuSource -> targetRow.maDichVu "maDichVu"; // Target field: NGAY_YL - Ngày y lệnh FHIR path: VNCoreMedicationRequest.authoredOn sourceBundle.entry 0..* as ngayYlSource -> targetRow.ngayYl "ngayYl"; // Target field: NGAY_TH_YL - Ngày thực hiện y lệnh FHIR path: VNCoreMedicationDispense.whenHandedOver | VNCoreMedicationDispense.whenPrepared sourceBundle.entry 0..* as ngayThYlSource -> targetRow.ngayThYl "ngayThYl"; // Target field: MA_PTTT - Mã phẫu thuật/thủ thuật liên quan FHIR path: VNCoreClaim.procedure.procedureCodeableConcept | VNCoreProcedure.code Mapping note: Procedure context for medication lines when QD 3176 requires linking the drug to a related surgery/procedure; do not infer this from MA_NHOM. sourceBundle.entry 0..* as maPtttSource -> targetRow.maPttt "maPttt"; // Target field: NGUON_CTRA - Nguồn chi trả FHIR path: VNCoreClaim.item[medicationLine].extension[paymentSource].valueCodeableConcept.coding.code | VNCoreExplanationOfBenefit.item[medicationLine].extension[paymentSource].valueCodeableConcept.coding.code sourceBundle.entry 0..* as nguonCtraSource -> targetRow.nguonCtra "nguonCtra"; // Target field: VET_THUONG_TP - Vết thương tái phát FHIR path: VNCoreClaim.item[medicationLine].extension[recurrentWoundBenefit].valueBoolean | VNCoreExplanationOfBenefit.item[medicationLine].extension[recurrentWoundBenefit].valueBoolean Mapping note: Exporter emits literal `1` only when the line-level recurrentWoundBenefit flag is true; this is not a diagnosis recurrence code. sourceBundle.entry 0..* as vetThuongTpSource -> targetRow.vetThuongTp "vetThuongTp"; }