1. FHIR R6 Roadmap
FHIR R5 (2023) is the current standard version. R6 is being developed with many improvements.
| Version | Year | Status |
|---|---|---|
| DSTU 1 | 2014 | Legacy |
| DSTU 2 | 2015 | Legacy |
| STU 3 | 2017 | Legacy |
| R4 | 2019 | Normative (most widely used) |
| R4B | 2022 | Normative |
| R5 | 2023 | Normative (current) |
| R6 | ~2026 | Developing |
It is expected that R6 will be available
- Improved Subscriptions — Topic-based subscriptions are more complete
- Enhanced search — Composite search parameters, GraphQL improvements
- AI/ML integration — Standardized resources for model inference
- Device/IoT — Improve resources for medical devices and wearables
- Cross-version compatibility — Tooling is better for version migration
- Performance — Binary resource streaming, pagination improvements
2. FHIR and 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 supports genomics data through specialized resources:
| Resource | Purpose |
|---|---|
| MolecularSequence | DNA/RNA/Protein Sequence |
| Observation (Genetics) | Genetic test results |
| DiagnosticReport (Genetics) | Genetic test report |
| RiskAssessment | Assess genetic risk |
{
"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 for IoT and 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 for healthcare (vaccines, tests).
- Using FHIR Bundle inside JWT (JWS compact)
- QR code contains tag — offline verifiable
- Widely used for 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 allows patients self-management health records. FHIR Patient Access API is the foundation.
| PHR feature | FHIR API |
|---|---|
| View medical records | Patient/$everything |
| Test results | Observation?patient=X |
| Prescription | MedicationRequest?patient=X |
| Appointment schedule | Appointment?patient=X |
| Share with new BS | IPS Document |
| From wearable | POST Observation (vital signs) |
7. New trend
| Trend | Description | FHIR support |
|---|---|---|
| AI Clinical Copilot | The LLM supports physician decision making | CDS Hooks + SMART App |
| Precision Medicine | Personalized treatment based on genetics | Genomics resources |
| Telemedicine | Remote medical examination | Encounter (virtual), Communication |
| Federated Learning | Train AI on local, non-centralized data | 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 replace REST | $graphql operation |
8. End of Series
Through 25 lessons, we have gone through the entire FHIR journey:
- Part 1 — Platform: HL7 history, FHIR R5 overview, development environment
- Part 2 — Core resources: Patient, Encounter, Condition, Observation, Medication...
- Part 3 — RESTful API: CRUD, Search, Bundle, Transaction
- Part 4 — Data Types, Terminologies, Profiles, Extensions, IGs
- Part 5 — Documents, Messaging, Subscriptions, SMART on FHIR, Security
- Part 6 — Hands-on: HAPI FHIR Server, Client, VN Core IG, EMR/HIS integration
- Part 7 — Production: Performance, VN context, Case Studies, Future
FHIR is changing the way the world exchanges medical data. With this knowledge base, you are ready to build an interoperable system for Vietnamese healthcare.
9. Summary
FHIR R6 — Improved Subscriptions, AI integration, IoT resources
AI/ML + FHIR — CDS Hooks for clinical decision support, ML pipeline from FHIR data
Genomics — MolecularSequence, genetic observations for precision medicine
IoT/Wearables — Apple Watch, Mi Band → Observations → FHIR Server
SMART Health Cards — Verifiable health credentials (vaccines, tests)
PHR — Patient Access API for self-management of health records