Xem bản video
1. FHIR R6 Roadmap
FHIR R5 (2023) là phiên bản normative hiện tại. R6 đang được phát triển với nhiều cải tiến.
| Phiên bản | Năm | Trạng thái |
|---|---|---|
| DSTU 1 | 2014 | Legacy |
| DSTU 2 | 2015 | Legacy |
| STU 3 | 2017 | Legacy |
| R4 | 2019 | Normative (được dùng rộng rãi nhất) |
| R4B | 2022 | Normative |
| R5 | 2023 | Normative (hiện tại) |
| R6 | ~2026 | Đang phát triển |
Dự kiến R6 sẽ có
- Improved Subscriptions — Topic-based subscriptions hoàn thiện hơn
- Enhanced search — Composite search parameters, GraphQL improvements
- AI/ML integration — Standardized resources cho model inference
- Device/IoT — Cải thiện resource cho medical devices, wearables
- Cross-version compatibility — Tooling tốt hơn cho version migration
- Performance — Binary resource streaming, pagination improvements
2. FHIR và AI/ML
CDS Hooks + AI — Clinical Decision Support
┌──────────┐ CDS Hook ┌──────────────┐ ┌──────────┐
│ EHR │───────────────▶│ CDS Server │────▶│ AI/ML │
│ (trigger │ prefetch │ (mediator) │ │ Model │
│ event) │◀───────────────│ │◀────│(TF/PyTorch)│
└──────────┘ CDS Card └──────────────┘ └──────────┘
// CDS Hook request: patient-view → AI risk prediction
{
"hook": "patient-view",
"hookInstance": "abc-123",
"context": {
"userId": "Practitioner/practitioner-001",
"patientId": "patient-001"
},
"prefetch": {
"patient": {
"resourceType": "Patient",
"id": "patient-001",
"gender": "male",
"birthDate": "1960-05-15"
},
"conditions": {
"resourceType": "Bundle",
"entry": [
{
"resource": {
"resourceType": "Condition",
"code": {"coding": [{"system": "http://snomed.info/sct", "code": "44054006", "display": "Diabetes mellitus type 2"}]}
}
}
]
},
"observations": {
"resourceType": "Bundle",
"entry": [
{
"resource": {
"resourceType": "Observation",
"code": {"coding": [{"system": "http://loinc.org", "code": "4548-4", "display": "HbA1c"}]},
"valueQuantity": {"value": 8.5, "unit": "%"}
}
}
]
}
}
}
// CDS Response: AI prediction card
{
"cards": [
{
"summary": "Nguy cơ biến chứng tim mạch cao",
"detail": "AI model dự đoán nguy cơ biến chứng tim mạch trong 5 năm: **42%** (dựa trên HbA1c 8.5%, ĐTĐ type 2, nam, 64 tuổi). Khuyến nghị tăng cường kiểm soát HbA1c < 7%.",
"indicator": "warning",
"source": {
"label": "Cardiovascular Risk AI Model v2.1",
"url": "https://ai.hospital.vn/models/cv-risk"
},
"suggestions": [
{
"label": "Tạo y lệnh xét nghiệm Lipid Panel",
"actions": [
{
"type": "create",
"resource": {
"resourceType": "ServiceRequest",
"status": "draft",
"intent": "proposal",
"code": {"coding": [{"system": "http://loinc.org", "code": "24331-1", "display": "Lipid Panel"}]},
"subject": {"reference": "Patient/patient-001"}
}
}
]
}
]
}
]
}
FHIR → ML Pipeline
# Extract FHIR data → Train ML model
import requests
import pandas as pd
from sklearn.ensemble import GradientBoostingClassifier
FHIR_BASE = "http://localhost:8080/fhir"
def extract_training_data():
"""Trích xuất dữ liệu từ FHIR Server cho ML training"""
# Bulk export
patients_bundle = requests.get(
f"{FHIR_BASE}/Patient?_count=1000"
).json()
records = []
for entry in patients_bundle.get("entry", []):
patient = entry["resource"]
pid = patient["id"]
# Lấy Observations
obs_bundle = requests.get(
f"{FHIR_BASE}/Observation?subject=Patient/{pid}&code=4548-4"
).json()
# Lấy Conditions
cond_bundle = requests.get(
f"{FHIR_BASE}/Condition?subject=Patient/{pid}"
).json()
record = {
"patient_id": pid,
"age": calculate_age(patient.get("birthDate")),
"gender": 1 if patient.get("gender") == "male" else 0,
"hba1c": extract_latest_value(obs_bundle),
"diabetes": has_condition(cond_bundle, "44054006"),
"hypertension": has_condition(cond_bundle, "38341003"),
}
records.append(record)
return pd.DataFrame(records)
# Train model
df = extract_training_data()
X = df[["age", "gender", "hba1c", "diabetes", "hypertension"]]
y = df["cv_event_5yr"] # label từ follow-up data
model = GradientBoostingClassifier()
model.fit(X, y)
3. FHIR Genomics
FHIR hỗ trợ dữ liệu genomics qua các resources chuyên biệt:
| Resource | Mục đích |
|---|---|
| MolecularSequence | Trình tự DNA/RNA/Protein |
| Observation (Genetics) | Kết quả xét nghiệm di truyền |
| DiagnosticReport (Genetics) | Báo cáo xét nghiệm gen |
| RiskAssessment | Đánh giá nguy cơ di truyền |
{
"resourceType": "Observation",
"meta": {
"profile": ["http://hl7.org/fhir/StructureDefinition/observation-genetics"]
},
"status": "final",
"category": [
{
"coding": [
{"system": "http://terminology.hl7.org/CodeSystem/observation-category", "code": "laboratory"}
]
}
],
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "69548-6",
"display": "Genetic variant assessment"
}
]
},
"subject": {"reference": "Patient/patient-001"},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6703-8",
"display": "Heterozygous"
}
]
},
"component": [
{
"code": {
"coding": [{"system": "http://loinc.org", "code": "48018-6", "display": "Gene studied"}]
},
"valueCodeableConcept": {
"coding": [
{"system": "http://www.genenames.org", "code": "HGNC:1100", "display": "BRCA1"}
]
}
},
{
"code": {
"coding": [{"system": "http://loinc.org", "code": "81252-9", "display": "Discrete genetic variant"}]
},
"valueCodeableConcept": {
"coding": [
{"system": "http://www.ncbi.nlm.nih.gov/clinvar", "code": "37153", "display": "NM_007294.4(BRCA1):c.5266dupC"}
]
}
}
]
}
4. FHIR cho IoT và Wearables
┌──────────────┐ BLE/WiFi ┌──────────────┐ FHIR API ┌──────────────┐
│ Wearable │──────────────▶│ Mobile App │──────────────▶│ FHIR Server │
│ (Apple Watch│ │ (HealthKit) │ │ │
│ Mi Band) │ │ │ │ │
└──────────────┘ └──────────────┘ └──────────────┘
{
"resourceType": "Observation",
"status": "final",
"category": [
{
"coding": [
{"system": "http://terminology.hl7.org/CodeSystem/observation-category", "code": "vital-signs"}
]
}
],
"code": {
"coding": [
{"system": "http://loinc.org", "code": "8867-4", "display": "Heart rate"}
]
},
"subject": {"reference": "Patient/patient-001"},
"effectiveDateTime": "2025-01-15T10:30:00+07:00",
"valueQuantity": {
"value": 72,
"unit": "beats/minute",
"system": "http://unitsofmeasure.org",
"code": "/min"
},
"device": {
"reference": "Device/apple-watch-001",
"display": "Apple Watch Series 9"
},
"method": {
"coding": [
{"system": "http://snomed.info/sct", "code": "258104002", "display": "Measured"}
]
}
}
5. SMART Health Cards
SMART Health Cards (SHC) — Verifiable credentials cho y tế (vaccine, xét nghiệm).
- Sử dụng FHIR Bundle bên trong JWT (JWS compact)
- QR code chứa thẻ — offline verifiable
- Được dùng rộng rãi cho COVID-19 vaccine records (SMART Health Cards Framework)
SHC QR Code → JWT → FHIR Bundle:
{
"resourceType": "Bundle",
"type": "collection",
"entry": [
{
"resource": {
"resourceType": "Patient",
"name": [{"family": "Nguyen", "given": ["Van A"]}],
"birthDate": "1990-05-15"
}
},
{
"resource": {
"resourceType": "Immunization",
"status": "completed",
"vaccineCode": {
"coding": [{"system": "http://hl7.org/fhir/sid/cvx", "code": "208", "display": "COVID-19 mRNA"}]
},
"occurrenceDateTime": "2024-03-15",
"lotNumber": "EN6207",
"performer": [{"actor": {"display": "TTYT Quận 1"}}]
}
}
]
}
6. Personal Health Record (PHR)
PHR cho phép bệnh nhân tự quản lý hồ sơ sức khỏe. FHIR Patient Access API là nền tảng.
| Tính năng PHR | FHIR API |
|---|---|
| Xem hồ sơ y tế | Patient/$everything |
| Kết quả xét nghiệm | Observation?patient=X |
| Đơn thuốc | MedicationRequest?patient=X |
| Lịch hẹn | Appointment?patient=X |
| Chia sẻ với BS mới | IPS Document |
| Từ wearable | POST Observation (vital signs) |
7. Xu hướng mới
| Xu hướng | Mô tả | FHIR support |
|---|---|---|
| AI Clinical Copilot | LLM hỗ trợ bác sĩ ra quyết định | CDS Hooks + SMART App |
| Precision Medicine | Điều trị cá nhân hóa dựa trên genetics | Genomics resources |
| Telemedicine | Khám bệnh từ xa | Encounter (virtual), Communication |
| Federated Learning | Train AI trên data tại chỗ, không tập trung | Bulk Data + local inference |
| Blockchain + FHIR | Immutable audit trail | AuditEvent + on-chain hash |
| FHIR Shorthand (FSH) | Democratize IG creation | SUSHI, GoFSH tools |
| GraphQL for FHIR | Flexible queries thay thế REST | $graphql operation |
8. Kết thúc Series
Qua 25 bài học, chúng ta đã đi qua toàn bộ hành trình FHIR:
- Phần 1 — Nền tảng: HL7 history, FHIR R5 overview, development environment
- Phần 2 — Resources cốt lõi: Patient, Encounter, Condition, Observation, Medication...
- Phần 3 — RESTful API: CRUD, Search, Bundle, Transaction
- Phần 4 — Data Types, Terminologies, Profiles, Extensions, IGs
- Phần 5 — Documents, Messaging, Subscriptions, SMART on FHIR, Security
- Phần 6 — Hands-on: HAPI FHIR Server, Client, VN Core IG, EMR/HIS integration
- Phần 7 — Production: Performance, VN context, Case Studies, Future
FHIR đang thay đổi cách thế giới trao đổi dữ liệu y tế. Với nền tảng kiến thức này, bạn đã sẵn sàng xây dựng hệ thống interoperable cho y tế Việt Nam.
9. Tổng kết
FHIR R6 — Cải tiến Subscriptions, AI integration, IoT resources
AI/ML + FHIR — CDS Hooks cho clinical decision support, ML pipeline từ FHIR data
Genomics — MolecularSequence, genetic observations cho precision medicine
IoT/Wearables — Apple Watch, Mi Band → Observations → FHIR Server
SMART Health Cards — Verifiable health credentials (vaccine, xét nghiệm)
PHR — Patient Access API cho tự quản lý hồ sơ sức khỏe