Bộ Hướng dẫn Triển khai Core FHIR cho Việt Nam
0.6.0 - Draft for Community Review
Bộ Hướng dẫn Triển khai Core FHIR cho Việt Nam - Draft for Community Review (v0.6.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions
Hợp đồng tích hợp đầu–cuối cho một đợt điều trị nội trú: từ nhập viện → điều trị/phẫu thuật → ra viện → thanh toán BHYT, đóng gói nộp lên FHIR server bằng một transaction Bundle atomic.
Trang này là integration spec cho vendor HIS/EMR. Để xem walkthrough lâm sàng kể chuyện, đọc Tình huống lâm sàng. Để hiểu bối cảnh thiết kế (đối sánh nền tảng SATUSEHAT Indonesia), xem tài liệu phân tích nội bộ của dự án.
Ca minh họa xuyên suốt: Nguyễn Văn An (nam, CCCD 001085012345, BHYT loại DN 80%) nhập viện BV Chợ Rẫy ngày 10/3/2026 vì viêm ruột thừa cấp (K35.8) có giấy chuyển tuyến hợp lệ (đúng tuyến), phẫu thuật cắt ruột thừa nội soi, nằm viện 7 ngày, ra viện ổn định ngày 17/3/2026. Mọi resource trong trang là Example Instance thật trong IG.
| Bao gồm | Không bao gồm |
|---|---|
| Nhập viện (tự đến / từ cấp cứu / chuyển tuyến), điều trị nội trú, chuyển khoa, phẫu thuật/thủ thuật, y lệnh & cấp phát thuốc nội trú, theo dõi, ra viện, thanh toán BHYT nội trú (12 nhóm chi phí + ngày giường) | KCB ngoại trú (→ Playbook Ngoại trú), tiếp nhận cấp cứu ban đầu (→ Playbook Cấp cứu), cấp phát thuốc nhà thuốc bán lẻ (→ Playbook Dược) |
Áp dụng cho mọi CSKCB có giường bệnh, hướng tới yêu cầu bệnh án điện tử theo TT 13/2025/TT-BYT (cơ sở KCB khác hoàn thành chậm nhất 31/12/2026).
| Actor / Hệ thống | Vai trò trong luồng |
|---|---|
| HIS/EMR nội trú | Chủ luồng — tạo và nộp transaction Bundle |
| Khoa lâm sàng | Ghi diễn biến, y lệnh, chuyển khoa |
| Khoa Dược (nội trú) | Cấp phát thuốc theo y lệnh |
| LIS / RIS-PACS | Trả kết quả XN / CĐHA |
| Cổng giám định BHXH | Nhận hồ sơ thanh toán BHYT (XML 4210 / FHIR) |
| FHIR server quốc gia/vùng | Tiếp nhận transaction Bundle, áp dụng $validate |
Trước khi nộp đợt nội trú, các resource sau PHẢI tồn tại/được nộp kèm:
| # | Resource | Profile | Ghi chú VN |
|---|---|---|---|
| P1 | Cơ sở + khoa/phòng | VNCoreOrganization + VNCoreOrganizationDepartment | mã cơ sở KCB; hạng/tuyến |
| P2 | Địa điểm/giường | VNCoreLocation | cây khoa→phòng→giường để ghi chuyển khoa |
| P3 | Bác sĩ điều trị | VNCorePractitioner + VNCorePractitionerRole | số CCHN |
| P4 | Bệnh nhân | VNCorePatient | CCCD/VNeID |
| P5 | Thẻ BHYT | VNCoreCoverage | số thẻ (CCCD 12 số, NĐ 188/2025); nơi ĐKKCB ban đầu; giấy chuyển tuyến (đúng tuyến) |
VN Core nộp một lượt khám/đợt điều trị = một transaction Bundle (Bundle.type = transaction). Toàn bộ resource trong đợt được áp dụng atomic: hoặc tất cả thành công, hoặc rollback toàn bộ. Đây là khác biệt có chủ ý so với nền tảng SATUSEHAT (Indonesia POST từng resource rời).
Ví dụ chuẩn: Bundle-ExampleBundleInpatientTransaction — nộp atomic toàn bộ đợt viêm ruột thừa.
| Pattern | request.method |
fullUrl |
Khi nào dùng |
|---|---|---|---|
| PUT update-as-create | PUT + request.url = "ResourceType/{id}" |
canonical URL theo id HIS gán | HIS giữ id ổn định; idempotent khi nộp lại (an toàn cho retry). Mặc định khuyến nghị. |
| POST + conditional create | POST + request.url = "ResourceType" + request.ifNoneExist = "identifier=..." |
urn:uuid:... |
Để server tự sinh id; chống trùng bằng business identifier (vd Patient theo CCCD) |
Trong ví dụ, dữ liệu chủ (Patient/Coverage/Practitioner/Organization) và resource lâm sàng đều dùng PUT update-as-create — đơn giản, idempotent, dễ đối soát BHXH. Tham chiếu nội bộ dùng dạng tương đối
ResourceType/{id}(hợp lệ trong transaction).
serviceProvider), toàn bộ Bundle bị từ chối → tránh dữ liệu nửa vời.Bundle.timestamp bắt buộc (audit trail, NĐ 137/2024).| Bundle.type | Mục đích | Ví dụ |
|---|---|---|
| transaction | Nộp/ghi đợt điều trị lên FHIR server (cơ chế chính) | ExampleBundleInpatientTransaction |
| document | Bệnh án điện tử/Tóm tắt xuất viện bất biến (ký số) — Composition là entry[0] | ExampleBundleInpatientDischarge |
| collection | Hồ sơ thanh toán BHYT gửi cổng giám định | ExampleBHYTSubmissionInpatient |
Patient ─▶ Coverage(BHYT đúng tuyến) ─▶ Encounter(IMP, in-progress)
│ hospitalization.admitSource = chuyển tuyến
┌────────────────────────────────────┼─────────────────────────────────┐
▼ ▼ ▼
Condition(vào viện: K35.8) location[period] (chuyển khoa) Observation(theo dõi)
▼
ServiceRequest ▶ Specimen ▶ DiagnosticReport (giải phẫu bệnh)
▼
Procedure(cắt ruột thừa nội soi) + MedicationRequest(y lệnh) ▶ MedicationDispense(cấp phát)
▼
Encounter(finished + treatmentOutcome=Khỏi + dischargeDisposition=Ra viện)
▼
Composition(tóm tắt xuất viện, LOINC 18842-5)
▼
Claim(12 nhóm + 7 ngày giường) ─▶ ClaimResponse ─▶ ExplanationOfBenefit
│
└────────────────── tất cả gói trong 1 transaction Bundle ──────────────────┘
| # | Bước | Profile | Element chính | Terminology / căn cứ | Example Instance |
|---|---|---|---|---|---|
| 1 | Nhập viện | VNCoreEncounter | class=IMP, status, period.start, hospitalization.admitSource, extension[insuranceVisitType]=Đúng tuyến (MALYDO=1), extension[referralMode], extension[encounterCode]=MA_LUOT_KCB |
QĐ 3176 | ExampleEncounterInpatient |
| 2 | Chẩn đoán vào viện | VNCoreConditionDiagnosis | code ICD-10 K35.8 (+ SNOMED 85189001), category=encounter-diagnosis, diagnosis.use=AD |
QĐ 4469 | ExampleConditionAppendicitis |
| 3 | Chuyển khoa (nếu có) | VNCoreEncounter.location[] |
location, period mỗi khoa, physicalType |
— | (trong Encounter) |
| 4 | Phẫu thuật/thủ thuật | VNCoreProcedure | code SNOMED 6025007 + ICD-9-CM 47.01, performedDateTime, bodySite, outcome |
TT 23/2024; QĐ 387 | ExampleProcedureAppendectomy |
| 5 | Bệnh phẩm | VNCoreSpecimen | type, collection, request |
SNOMED CT VN body structure (QĐ 2427) | ExampleSpecimenAppendixTissue |
| 6 | Kết quả GPB | VNCoreDiagnosticReportPathology | specimen (1..*), conclusion, conclusionCode |
QĐ 2493 (morphology) | ExampleDiagnosticReportPathology |
| 7 | Y lệnh thuốc | VNCoreMedicationRequest | intent=order, medicationCodeableConcept (ATC J01DD04), dosageInstruction, category=inpatient |
TT 26/2025; Dược thư QG | (trong document Bundle) |
| 8 | Cấp phát thuốc | VNCoreMedicationDispense | authorizingPrescription→MedicationRequest, whenHandedOver (NGAY_CAP), quantity, performer.actor |
QĐ 3176 | ExampleMedicationDispenseInpatientAntibiotic |
| 9 | Theo dõi/sinh hiệu | VNCoreObservationVitalSigns (+ HA/mạch/SpO2…) | chuỗi theo thời gian; sinh hiệu trước ra viện | LOINC | — |
| 10 | Sử dụng thuốc thực tế | VNCoreMedicationAdministration | effective[x] (NGAY_TH_YL), request→MedicationRequest (khép chuỗi) |
QĐ 3176; TT 13/2025 | ExampleMedicationAdministrationInpatient |
1 Condition = 1 chẩn đoán mỗi resource (chống gộp đa chẩn đoán). Mọi datetime có offset
+07:00.
VNCoreEncounter: status = finished + period.end + extension[treatmentOutcome] (KETQUA — ví dụ 1 = Khỏi) + hospitalization.dischargeDisposition (ví dụ 1 = Ra viện). Chẩn đoán ra viện (Condition category/diagnosis.use) phải có mặt khi đóng.
Cuối đợt, lập VNCoreComposition tóm tắt xuất viện (LOINC 18842-5 — Discharge summary) với các section chuẩn theo TT 13/2025: lý do nhập viện, chẩn đoán, thủ thuật, thuốc, khám trước ra viện, tóm tắt ra viện. Đóng gói thành document Bundle (Composition là entry[0]) để ký số và lưu trữ bất biến.
Ví dụ Composition: ExampleCompositionDischargeSummary. Ví dụ document Bundle hoàn chỉnh (Composition là entry[0]): ExampleBundleInpatientDischarge.
Có thể đồng thời cập nhật Sổ Sức khỏe điện tử (VNeID) dạng VNCoreCompositionHealthRecordSummary (IPS, LOINC 60591-5) — bản tóm tắt longitudinal.
| Bước | Profile | Nội dung |
|---|---|---|
| Yêu cầu thanh toán | VNCoreClaim | type=institutional, subType=1.1 (đúng tuyến), item.category từ 12 nhóm chi phí QĐ 697 gồm ngày giường (2.2: 7 ngày × 360.000), khám, phẫu thuật (ICD-9-CM 47.01), thuốc (Ceftriaxone), thiết bị y tế. Đúng 1 thẻ BHYT focal=true. Ví dụ: ExampleClaimBHYT (tổng ~14,37 triệu VND) |
| Phản hồi | VNCoreClaimResponse | adjudication theo từng item. ExampleClaimResponseBHYT |
| Giải trình quyền lợi | VNCoreExplanationOfBenefit | mức hưởng/đồng chi trả. ExampleExplanationOfBenefitBHYT |
| Quyết toán | VNCorePaymentReconciliation | đối soát kỳ thanh toán |
| Gói gửi BHXH | VNCoreBHYTSubmissionBundle | bridge XML 4210. ExampleBHYTSubmissionInpatient |
Kiểm tra ngày giường: số lượng item[category=2.2].quantity PHẢI khớp số ngày period.end − period.start (7 ngày: 10/3 → 17/3).
| FHIR path | ValueSet / CodeSystem | Căn cứ |
|---|---|---|
Condition.code |
ICD-10 VN | QĐ 4469; QĐ 98 |
Procedure.code |
DVKT / ICD-9-CM VN | TT 23/2024; QĐ 387 |
Encounter.extension[insuranceVisitType] |
MALYDO | QĐ 3176 |
Encounter.extension[treatmentOutcome] |
KETQUA | QĐ 3176 |
Claim.item.category |
Nhóm chi phí (12) | QĐ 697 |
Specimen body site |
SNOMED CT VN | QĐ 2427 |
Xem thêm Hướng dẫn terminology.
Checklist trước khi nộp transaction Bundle:
Bundle.type = transaction và mỗi entry có request.method + request.url (FHIR bdl-3).class=IMP, có subject + serviceProvider + period.start + hospitalization.admitSource.finished.authorizingPrescription (không cấp phát "mồ côi").focal=true.datetime có offset +07:00.ResourceType/{id} hoặc urn:uuid).Ví dụ OperationOutcome — Encounter thiếu serviceProvider (cả Bundle bị từ chối):
{"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"required",
"details":{"text":"Encounter.serviceProvider là bắt buộc (VN-RULE-ENC-001)"},
"expression":["Bundle.entry[4].resource.serviceProvider"]}]}
Ví dụ — số ngày giường không khớp:
{"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"business-rule",
"details":{"text":"Số ngày giường (item 2.2) phải khớp số ngày nằm viện (VN-RULE-CLM-014)"},
"expression":["Bundle.entry[11].resource.item.where(category.coding.code='2.2')"]}]}
Lỗi thường gặp:
| Lỗi | Nguyên nhân | Xử lý |
|—|—|—|
| Cả Bundle bị từ chối dù chỉ 1 resource sai | Bản chất atomic của transaction | Sửa resource lỗi, nộp lại toàn bộ |
| Tạo bản trùng khi retry | Dùng POST không có ifNoneExist | Chuyển sang PUT update-as-create hoặc thêm ifNoneExist |
| Tham chiếu không giải được | Trộn urn:uuid và id thật không nhất quán | Thống nhất 1 kiểu reference trong Bundle |
| GAP | Ảnh hưởng | Priority |
|---|---|---|
| ✅ Đã bổ sung VNCoreMedicationAdministration (khép chuỗi y lệnh → cấp phát → sử dụng) | resolved | |
| ✅ Đã bổ sung VNCoreEpisodeOfCare | resolved | |
✅ Chuyển khoa đã mô hình bằng Encounter.location[].period; diễn biến/biện luận dùng VNCoreClinicalImpression + Observation theo thời gian |
resolved (guidance) |
Use case nội trú thuộc phạm vi harden cho pilot — xem Pilot readiness.
| Nếu cần | Đọc tiếp |
|---|---|
| Walkthrough lâm sàng kể chuyện | Tình huống lâm sàng |
| Cơ chế nộp BHYT chi tiết | BHYT Submission |
| Kiểm tra hợp lệ | Hướng dẫn kiểm tra hợp lệ |
| Danh mục hồ sơ | Profiles |
This page is the inpatient integration playbook for VN Core. It specifies the end-to-end FHIR workflow for one inpatient stay (admission → treatment/surgery → discharge → BHYT claim), submitted to the FHIR server as a single atomic transaction Bundle — a deliberate VN Core architectural choice (unlike SATUSEHAT's resource-by-resource POST). A real, SUSHI-validated example (ExampleBundleInpatientTransaction) demonstrates the PUT update-as-create pattern over a complete acute appendicitis case, alongside the discharge-summary document Bundle and the BHYT submission collection Bundle. The page lists prerequisites, resource sequence (anchored on real Example Instances), terminology bindings with Vietnamese legal basis, a validation checklist with OperationOutcome samples; previously remaining profile gaps (MedicationAdministration, EpisodeOfCare) are now resolved.