Chapter 6: EHR Integration & Data Standards

"Without interoperability there can be no real CDSS. Standards-based data exchange makes seamless information flow between healthcare systems possible."


6.1 The HL7 FHIR Standard

FHIR (Fast Healthcare Interoperability Resources) is the HL7 standard for modern healthcare data exchange. WIA-MED-015 requires HL7 FHIR R4 or later.

🎯 Core FHIR Concepts

ConceptDescription
ResourcesUnits of data such as Patient, Observation and Medication
RESTful APIStandard HTTP-based API (GET, POST, PUT, DELETE)
JSON/XMLWeb-friendly data formats
ExtensionsStandard extension mechanism

πŸ“‹ Key FHIR Resources

// Patient resource example (JSON)
{
  "resourceType": "Patient",
  "id": "example",
  "name": [{
    "family": "Kim",
    "given": ["Min-su"]
  }],
  "gender": "male",
  "birthDate": "1985-03-15",
  "address": [{
    "city": "Seoul",
    "postalCode": "06234"
  }]
}

// Observation resource (blood pressure)
{
  "resourceType": "Observation",
  "status": "final",
  "category": [{
    "coding": [{
      "system": "http://terminology.hl7.org/CodeSystem/observation-category",
      "code": "vital-signs"
    }]
  }],
  "code": {
    "coding": [{
      "system": "http://loinc.org",
      "code": "85354-9",
      "display": "Blood pressure panel"
    }]
  },
  "subject": {"reference": "Patient/example"},
  "effectiveDateTime": "2025-01-15T09:30:00Z",
  "component": [
    {
      "code": {"coding": [{"system": "http://loinc.org", "code": "8480-6", "display": "Systolic blood pressure"}]},
      "valueQuantity": {"value": 140, "unit": "mmHg", "system": "http://unitsofmeasure.org", "code": "mm[Hg]"}
    },
    {
      "code": {"coding": [{"system": "http://loinc.org", "code": "8462-4", "display": "Diastolic blood pressure"}]},
      "valueQuantity": {"value": 90, "unit": "mmHg", "system": "http://unitsofmeasure.org", "code": "mm[Hg]"}
    }
  ]
}

πŸ”— FHIR API Operations

# Read a patient
GET /Patient/12345

# The patient's most recent blood-pressure observations
GET /Observation?patient=12345&code=85354-9&_sort=-date&_count=10

# The patient's active medications
GET /MedicationStatement?patient=12345&status=active

# Create a new prescription
POST /MedicationRequest
{
  "resourceType": "MedicationRequest",
  "status": "active",
  "intent": "order",
  "subject": {"reference": "Patient/12345"},
  "medicationCodeableConcept": {
    "coding": [{
      "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
      "code": "314076",
      "display": "lisinopril 10 MG Oral Tablet"
    }]
  },
  "dosageInstruction": [{
    "text": "Take 10 mg once daily"
  }]
}

6.2 Medical Terminology Standards

Standardized terminologies are essential for consistent exchange of medical data.

πŸ“š Major Terminologies

StandardUseExample
SNOMED CTDiagnoses, findings, procedures44054006 = Type 2 diabetes mellitus
LOINCLaboratory tests and observations2345-7 = Glucose [Mass/volume] in Serum or Plasma
RxNormMedications314076 = lisinopril 10 MG Oral Tablet
ICD-10Diagnosis codes (billing)E11.9 = Type 2 diabetes mellitus without complications
CPTProcedure codes (billing, US)99213 = established-patient office visit
UCUMUnits of measuremg/dL, mm[Hg]

🌐 Korean Standards


6.3 The CDS Hooks Standard

CDS Hooks is the HL7 standard for integrating a CDSS into the EHR workflow. WIA-MED-015 requires CDS Hooks 2.0 or later.

⚑ CDS Hooks Flow

1. An event occurs in the EHR
   ↓
2. A hook fires (e.g., "order-sign")
   ↓
3. EHR β†’ CDS service request
   {
     "hook": "order-sign",
     "hookInstance": "d1577c69-dfbe-44ad-ba6d-3e05e953b2ea",
     "context": {
       "userId": "Practitioner/example",
       "patientId": "12345",
       "draftOrders": { ... }
     }
   }
   ↓
4. The CDS service performs its analysis
   - DDI check
   - Allergy check
   - Dose verification
   ↓
5. CDS service β†’ EHR response (Cards)
   {
     "cards": [
       {
         "summary": "⚠️ Warfarin-Aspirin interaction",
         "indicator": "warning",
         "detail": "Increased bleeding risk...",
         "source": {"label": "WIA-MED-015 DDI service"},
         "suggestions": [
           {"label": "Review antiplatelet choice"}
         ]
       }
     ]
   }
   ↓
6. The EHR displays the cards in the UI
   ↓
7. The physician decides (accept / choose alternative / override)

πŸ”§ Main Hook Types

HookWhen it fires
patient-viewWhen a patient's chart is opened
medication-prescribeWhen a medication is prescribed (earlier hook, superseded by order-select / order-sign; still used in the WIA-MED-015 spec examples)
order-selectWhen a test, procedure or medication order is selected
order-signWhen orders are signed (finalized)
encounter-dischargeWhen a patient is being discharged (medication reconciliation)
encounter-startWhen an encounter begins (relevant alerts, history reminders)

6.4 Data Quality Management

βœ… Dimensions of Data Quality

DimensionDescriptionValidation method
CompletenessNo required data missingRequired-field checks
AccuracyData reflects realityRange checks, logic checks
ConsistencyNo contradictionsCross-validation
TimelinessData is currentTimestamp checks
ValidityConforms to formats/standardsSchema validation

πŸ” Data Validation Example

// Blood-pressure data validation
{
  "systolic": 140,
  "diastolic": 90
}

Validation rules:
βœ… Completeness: systolic AND diastolic present
βœ… Range: 50 < systolic < 300
βœ… Range: 30 < diastolic < 200
βœ… Logic: systolic > diastolic
⚠️ Warning: systolic >= 130 (above the < 130/80 target)

// Medication data validation
{
  "medication": "Lisinopril",
  "dose": "10",
  "unit": "mg",
  "route": "PO"
}

Validation:
βœ… RxNorm code matched
βœ… Dose range (2.5-80 mg/day)
βœ… Valid route of administration
βœ… Frequency format

6.5 Privacy and Security

πŸ”’ Regulatory Compliance

RegulationRegionCore requirements
HIPAAUnited StatesPHI protection, safeguards, audit controls
GDPREULawful basis/consent, right of access, right to erasure
PIPLChinaPersonal-information protection, data localization
Personal Information Protection Act (PIPA)KoreaConsent to collection, safeguards, breach notification

πŸ›‘οΈ Security Technologies


Chapter Summary

Key pointSummary
HL7 FHIRRESTful API, JSON/XML, resources
Terminology standardsSNOMED CT, LOINC, RxNorm, ICD-10
CDS HooksWorkflow-integration standard
Data qualityCompleteness, accuracy, consistency, timeliness, validity
SecurityHIPAA and GDPR compliance, encryption, access control

εΌ˜η›ŠδΊΊι–“ Β· Benefit All Humanity

Β© 2025 WIA - World Certification Industry Association