📊 FHIR R4 - Modern Healthcare APIs

With 15+ years of healthcare IT expertise, I've implemented FHIR R4 as the modern standard for healthcare data exchange using RESTful APIs and JSON/XML formats.

Patient Demographics in FHIR

{
  "resourceType": "Patient",
  "id": "patient-12345",
  "identifier": [
    {
      "system": "http://hospital.org/mrn",
      "value": "MRN-789456"
    }
  ],
  "name": [
    {
      "use": "official",
      "given": ["John"],
      "family": "Doe"
    }
  ],
  "birthDate": "1980-05-15",
  "gender": "male",
  "telecom": [
    {
      "system": "phone",
      "value": "555-1234"
    }
  ]
}
Core Resource

Patient Demographics

Identity, contact info, preferred language, and provider relationships

Standard Binding

Administrative Gender

Uses standardized value sets for consistent gender representation

Extensions Ready

Race & Ethnicity

Extensible profiles for capturing social determinants data

Clinical Observations (Vital Signs, Lab Results)

{
  "resourceType": "Observation",
  "id": "obs-bp-2024",
  "status": "final",
  "category": [{ "coding": [{ "code": "vital-signs" }] }],
  "code": {
    "coding": [{
      "system": "http://loinc.org",
      "code": "55284-4",
      "display": "Blood pressure systolic & diastolic"
    }]
  },
  "subject": { "reference": "Patient/patient-12345" },
  "effectiveDateTime": "2024-07-21T14:30:00Z",
  "component": [
    {
      "code": { "text": "Systolic" },
      "valueQuantity": { "value": 130, "unit": "mmHg" }
    },
    {
      "code": { "text": "Diastolic" },
      "valueQuantity": { "value": 80, "unit": "mmHg" }
    }
  ]
}
LOINC Codes

Lab Terminology

Standard universal codes for lab tests and vital signs

Components

Grouped Data

Multiple measurements in single observation (BP systolic/diastolic)

SNOMED CT

Clinical Concepts

Normalized clinical terminology for conditions and procedures

Bundle - Batch Healthcare Data Transactions

{
  "resourceType": "Bundle",
  "type": "transaction",
  "entry": [
    {
      "resource": { "resourceType": "Patient", ... },
      "request": { "method": "POST", "url": "Patient" }
    },
    {
      "resource": { "resourceType": "Observation", ... },
      "request": { "method": "POST", "url": "Observation" }
    },
    {
      "resource": { "resourceType": "Condition", ... },
      "request": { "method": "POST", "url": "Condition" }
    }
  ]
}
Transaction Support

Atomic Bundles

All-or-nothing semantics for multi-resource updates

Batch Type

Bulk Data Exchange

Efficient transmission of multiple related resources

Composition

Document-Based

CCD/C-CDA equivalent with full clinical narrative

📧 HL7 v2 - Enterprise Message Exchange

HL7 Version 2 is the industry standard for clinical message transport. Still widely used for ADT (Admit/Discharge/Transfer) notifications and real-time data exchange.

Admit Notification (A01) - Patient Admission to Hospital

MSH|^~\\&|HOSPITAL^HMS|HOSPITAL FAC|LAB|REGIONAL HIS|20240721143000||ADT^A01^ADT_A01|MSG00001|P|2.5.1| EVN|A01|20240721143000|20240721140000| PID|1||789456^^^HOSPITAL MRN||DOE^JOHN^A||19800515|M|||123 MAIN ST^APT 4B^BOSTON^MA^02101||6171234567| PV1|1|I|ICU-4B^B42^1|H|||||DR. SMITH^JOHN||C||||||||||||A||||||20240721140000| OBX|1|NM|8480-6^VENOUS O2|1|95|%|80-100|N|||F| AL1|1||00000127^PENICILLIN|Moderate|RASH|
HL7 v2 Message Structure Breakdown
MSH - Message Header
Message control info, sending/receiving systems, message type, version
EVN - Event Type
Event code (A01=Admit), event timestamp, facility location
PID - Patient Identification
MRN, name, DOB, gender, address, phone, insurance IDs
PV1 - Patient Visit
Bed assignment, visit type, attending physician, admission type, timestamp
OBX - Observation/Result
Clinical measurements, vital signs, lab results
AL1 - Allergy Information
Documented allergies, severity, reaction type

Order Message (ORM) - Lab Order Placement

MSH|^~\\&|EMR^EPIC|HOSPITAL FAC|LAB|REGIONAL HIS|20240721143000||ORM^O01^ORM_O01|MSG00002|P|2.5.1| PID|1||789456^^^HOSPITAL MRN||DOE^JOHN^A||19800515|M|||123 MAIN ST||6171234567| ORC|NW|ORD-20240721-001|LAB-001234|IP|CM||||20240721140000|TECH123|DR. SMITH| OBR|1|ORD-20240721-001|LAB-001234|85025^CBC WITH DIFF|||20240721140000|||||DR. SMITH||||20240721160000| OBX|1|NM|85007^WBC|1|7.2|K/uL|4.5-11.0|N|||F| OBX|2|NM|85014^RBC|1|4.8|M/uL|4.5-5.5|N|||F|
ORC Segment

Order Control

NW (New), Cancel, Modify, Complete order status management

OBR Segment

Lab Request Details

Test code, specimen requirements, collection datetime

OBX Results

Result Reporting

Multiple component results with value, unit, reference range

HL7 v2 to FHIR Transformation

📧 HL7 v2 ADT Message

Enterprise system generates admission notification

🔄 Transformation Engine

Rules-based mapping (Rhapsody, HL7 v2 to FHIR)

📊 FHIR Resources Created

Patient, Encounter, Observation resources

☁️ FHIR API / REST Endpoint

Cloud-native interoperability platform receives data

✅ Modern Interoperability Stack

Legacy HL7 v2 systems coexist with modern FHIR APIs through intelligent transformation layers. This hybrid approach enables healthcare organizations to modernize without replacing working systems.

🏥 End-to-End Healthcare Data Flow

🏥 Hospital EHR

Epic, Cerner, Allscripts

HL7 v2 ADT/ORM

🔗 Integration Engine

Rhapsody, Mirth, Talend

Transformation & Routing

☁️ FHIR API Gateway

Cloud Platform

REST/HTTPS

📊 Data Lake / Analytics

BigQuery, Snowflake

Analytics & Reporting

🔍 Patient App

FHIR-enabled Consumer App

Read Patient Data

🤝 Care Coordination

Provider Network

Secure Data Sharing

🔐 Key Interoperability Standards & Protocols

Transport Protocol

MLLP (Minimal Lower Layer Protocol)

Legacy standard for HL7 v2 message transmission over TCP/IP. Still widely used in healthcare networks for reliable message delivery.

Security Standard

SFTP & TLS Encryption

Secure File Transfer Protocol and Transport Layer Security for HIPAA-compliant data exchange. End-to-end encryption of healthcare data in transit.

API Standard

OAuth 2.0 & SMART on FHIR

Authorization framework for secure FHIR API access. SMART enables single sign-on and delegated access for healthcare applications.

Data Format

DICOM (Medical Imaging)

Standard for medical image storage and transmission. Critical for radiology, cardiology, and enterprise imaging workflows.

Semantic Interop

SNOMED CT & LOINC Codes

Standardized clinical terminology for conditions, procedures, lab tests. Ensures semantic meaning across different systems.

Gateway Standard

TEFCA (Trusted Exchange)

21st Century Cures Act standard for secure healthcare data exchange across provider networks nationwide.