This chapter covers comprehensive details on CDSS topics including architecture, integration, guidelines, drug safety, diagnostics, data standards, alert optimization, and implementation best practices following WIA-MED-015 standards.
Implementation requires careful attention to evidence-based medicine, interoperability standards (HL7 FHIR, SNOMED CT, LOINC), and user-centered design principles. Systems must balance safety alerts with usability to prevent alert fatigue while maintaining clinical effectiveness.
弘益人間 · Benefit All Humanity
© 2025 WIA
# Chapter 3: Clinical Decision Support Data Formats
## Healthcare Data Models and Interoperability Standards
### 3.1 Healthcare Data Standards Overview
Clinical decision support systems require seamless integration with healthcare data from multiple sources. This chapter defines the data formats, standards, and models that enable interoperability and effective clinical decision support.
```typescript
// Healthcare Data Standards Framework
interface HealthcareDataStandards {
version: '1.0.0';
interoperabilityStandards: {
hl7Fhir: {
version: 'R4 (4.0.1)';
scope: 'Primary data exchange standard';
resources: FHIRResource[];
adoption: 'Mandated by US regulations (21st Century Cures)';
};
hl7V2: {
version: '2.5.1+';
scope: 'Legacy message exchange';
usage: 'Lab results, ADT, orders';
status: 'Still widely used, gradually migrating to FHIR';
};
cda: {
version: 'R2';
scope: 'Clinical document exchange';
usage: 'CCDs, discharge summaries';
status: 'Being superseded by FHIR documents';
};
dicom: {
version: '2024a';
scope: 'Medical imaging';
usage: 'All imaging modalities, SR for reports';
};
};
terminologyStandards: {
snomedCt: {
scope: 'Clinical terminology';
coverage: 'Diagnoses, procedures, findings, organisms';
concepts: '350,000+ concepts';
};
icd: {
versions: ['ICD-10-CM', 'ICD-11'];
scope: 'Diagnosis coding';
usage: 'Billing, epidemiology';
};
loinc: {
scope: 'Laboratory and clinical observations';
codes: '90,000+ codes';
usage: 'Lab tests, vital signs, documents';
};
rxnorm: {
scope: 'Medications';
coverage: 'Drug names, ingredients, forms, strengths';
usage: 'Prescription data, drug databases';
};
cpt: {
scope: 'Procedure coding';
usage: 'Billing, service documentation';
};
};
}
// FHIR Resources for CDSS
const fhirResourcesForCDSS: FHIRResourceCoverage = {
patientData: {
Patient: {
usage: 'Demographics, identifiers',
cdssRelevance: 'Patient identification, age-based rules',
keyElements: ['identifier', 'name', 'birthDate', 'gender', 'address']
},
Condition: {
usage: 'Problems, diagnoses',
cdssRelevance: 'Rule triggers, risk factors, contraindications',
keyElements: ['code', 'clinicalStatus', 'verificationStatus', 'onset', 'severity']
},
MedicationRequest: {
usage: 'Prescription orders',
cdssRelevance: 'Drug interaction checking, dosing recommendations',
keyElements: ['medication', 'dosageInstruction', 'status', 'intent']
},
MedicationStatement: {
usage: 'Medication usage records',
cdssRelevance: 'Active medication list for interaction checking',
keyElements: ['medication', 'status', 'effectivePeriod', 'dosage']
},
AllergyIntolerance: {
usage: 'Allergies and adverse reactions',
cdssRelevance: 'Allergy alerts, contraindication checking',
keyElements: ['code', 'clinicalStatus', 'type', 'category', 'criticality', 'reaction']
},
Observation: {
usage: 'Lab results, vital signs, assessments',
cdssRelevance: 'Rule triggers, trend analysis, risk scores',
keyElements: ['code', 'value', 'effectiveDateTime', 'status', 'interpretation']
},
Procedure: {
usage: 'Procedures performed',
cdssRelevance: 'Care history, follow-up recommendations',
keyElements: ['code', 'status', 'performedDateTime', 'outcome']
},
Immunization: {
usage: 'Vaccination records',
cdssRelevance: 'Immunization recommendations, due dates',
keyElements: ['vaccineCode', 'occurrenceDateTime', 'status', 'doseQuantity']
}
},
clinicalResources: {
Encounter: {
usage: 'Healthcare visits',
cdssRelevance: 'Context for recommendations, visit type-specific rules',
keyElements: ['status', 'class', 'type', 'period', 'reasonCode']
},
DiagnosticReport: {
usage: 'Lab reports, imaging reports',
cdssRelevance: 'Test interpretation support, abnormal flagging',
keyElements: ['code', 'status', 'effectiveDateTime', 'conclusion', 'result']
},
CarePlan: {
usage: 'Treatment plans',
cdssRelevance: 'Care pathway adherence, intervention scheduling',
keyElements: ['status', 'intent', 'category', 'activity', 'goal']
},
Goal: {
usage: 'Clinical goals',
cdssRelevance: 'Outcome tracking, goal-directed recommendations',
keyElements: ['lifecycleStatus', 'description', 'target', 'achievementStatus']
},
RiskAssessment: {
usage: 'Risk evaluations',
cdssRelevance: 'Risk scores, predictive model outputs',
keyElements: ['code', 'prediction', 'mitigation', 'note']
}
},
cdssSpecificResources: {
Library: {
usage: 'Knowledge artifacts (CQL libraries)',
cdssRelevance: 'Clinical logic definitions',
keyElements: ['content', 'type', 'dataRequirement', 'parameter']
},
PlanDefinition: {
usage: 'Protocols, order sets, guidelines',
cdssRelevance: 'Computable clinical guidelines',
keyElements: ['action', 'goal', 'trigger', 'condition', 'dynamicValue']
},
ActivityDefinition: {
usage: 'Order templates',
cdssRelevance: 'Recommended orders, activities',
keyElements: ['code', 'timing', 'dosage', 'productReference']
},
RequestGroup: {
usage: 'Grouped recommendations',
cdssRelevance: 'CDSS output - bundled recommendations',
keyElements: ['status', 'intent', 'action', 'priority']
},
GuidanceResponse: {
usage: 'CDS response',
cdssRelevance: 'Standard CDSS response format',
keyElements: ['status', 'outputParameters', 'result', 'dataRequirement']
}
}
};
```
### 3.2 CDSS Data Models
```typescript
// Core CDSS Data Models
interface CDSSPatientData {
demographics: PatientDemographics;
problems: ProblemList;
medications: MedicationList;
allergies: AllergyList;
vitals: VitalSignHistory;
labs: LaboratoryResults;
procedures: ProcedureHistory;
immunizations: ImmunizationRecord;
familyHistory: FamilyHistoryRecord;
socialHistory: SocialHistoryRecord;
}
// Patient Demographics
interface PatientDemographics {
patientId: string;
mrn: string;
name: HumanName;
birthDate: Date;
age: AgeValue;
gender: 'male' | 'female' | 'other' | 'unknown';
administrativeGender: string;
race: CodeableConcept[];
ethnicity: CodeableConcept[];
addresses: Address[];
telecom: ContactPoint[];
maritalStatus: CodeableConcept;
communication: Communication[];
contacts: PatientContact[];
}
interface AgeValue {
years: number;
months?: number;
days?: number;
ageGroup: 'NEONATE' | 'INFANT' | 'CHILD' | 'ADOLESCENT' | 'ADULT' | 'ELDERLY';
}
// Problem List for Clinical Context
interface ProblemList {
active: ClinicalProblem[];
inactive: ClinicalProblem[];
resolved: ClinicalProblem[];
}
interface ClinicalProblem {
id: string;
code: {
system: 'http://snomed.info/sct' | 'http://hl7.org/fhir/sid/icd-10-cm';
code: string;
display: string;
};
clinicalStatus: 'active' | 'recurrence' | 'relapse' | 'inactive' | 'remission' | 'resolved';
verificationStatus: 'unconfirmed' | 'provisional' | 'differential' | 'confirmed';
severity: 'mild' | 'moderate' | 'severe';
category: 'problem-list-item' | 'encounter-diagnosis';
onset: {
dateTime?: Date;
age?: AgeValue;
period?: Period;
string?: string;
};
recordedDate: Date;
note: string[];
}
// Medication Data Model
interface MedicationList {
active: MedicationRecord[];
completed: MedicationRecord[];
discontinued: MedicationRecord[];
}
interface MedicationRecord {
id: string;
medication: {
rxnormCode: string;
display: string;
ingredients: Ingredient[];
drugClass: DrugClass[];
};
status: 'active' | 'completed' | 'entered-in-error' | 'intended' | 'stopped' | 'on-hold';
intent: 'proposal' | 'plan' | 'order' | 'instance-order' | 'option';
dosage: Dosage[];
route: CodeableConcept;
frequency: Frequency;
duration: Duration;
prescribedDate: Date;
prescriber: Reference;
indication: CodeableConcept[];
substitution: SubstitutionInfo;
}
interface Dosage {
sequence: number;
text: string;
timing: Timing;
route: CodeableConcept;
method: CodeableConcept;
doseQuantity: Quantity;
maxDosePerPeriod: Ratio;
maxDosePerAdministration: Quantity;
maxDosePerLifetime: Quantity;
}
// Allergy and Intolerance Data
interface AllergyList {
allergies: AllergyRecord[];
}
interface AllergyRecord {
id: string;
clinicalStatus: 'active' | 'inactive' | 'resolved';
verificationStatus: 'unconfirmed' | 'confirmed' | 'refuted';
type: 'allergy' | 'intolerance';
category: ('food' | 'medication' | 'environment' | 'biologic')[];
criticality: 'low' | 'high' | 'unable-to-assess';
code: {
system: string;
code: string;
display: string;
};
reactions: AllergyReaction[];
onsetDateTime: Date;
recordedDate: Date;
recorder: Reference;
note: string[];
}
interface AllergyReaction {
substance: CodeableConcept;
manifestation: CodeableConcept[];
severity: 'mild' | 'moderate' | 'severe';
exposureRoute: CodeableConcept;
note: string[];
}
// Laboratory Results Model
interface LaboratoryResults {
recent: LabResult[];
historical: LabResult[];
panels: LabPanel[];
}
interface LabResult {
id: string;
code: {
loinc: string;
display: string;
loincPartNumber?: string;
};
status: 'registered' | 'preliminary' | 'final' | 'amended' | 'corrected' | 'cancelled';
category: string;
effectiveDateTime: Date;
issued: Date;
value: LabValue;
interpretation: {
code: 'H' | 'L' | 'A' | 'AA' | 'HH' | 'LL' | 'N' | 'U' | 'D' | 'B' | 'W';
display: string;
};
referenceRange: ReferenceRange[];
specimen: SpecimenInfo;
performer: Reference;
note: string[];
}
type LabValue =
| { type: 'quantity'; value: number; unit: string; system: string; code: string }
| { type: 'string'; value: string }
| { type: 'codeableConcept'; coding: Coding[] }
| { type: 'ratio'; numerator: Quantity; denominator: Quantity }
| { type: 'range'; low: Quantity; high: Quantity };
interface ReferenceRange {
low?: Quantity;
high?: Quantity;
type?: CodeableConcept;
appliesTo?: CodeableConcept[];
age?: Range;
text?: string;
}
// Vital Signs Model
interface VitalSignHistory {
current: VitalSigns;
history: VitalSignReading[];
trends: VitalTrend[];
}
interface VitalSigns {
timestamp: Date;
bloodPressure?: {
systolic: number;
diastolic: number;
position: 'sitting' | 'standing' | 'supine';
cuffSize: string;
};
heartRate?: {
value: number;
rhythm: 'regular' | 'irregular';
method: 'palpation' | 'auscultation' | 'device';
};
respiratoryRate?: {
value: number;
};
temperature?: {
value: number;
unit: 'Cel' | '[degF]';
site: 'oral' | 'tympanic' | 'axillary' | 'rectal' | 'temporal';
};
oxygenSaturation?: {
value: number;
supplementalOxygen: boolean;
oxygenFlowRate?: number;
};
weight?: {
value: number;
unit: 'kg' | '[lb_av]';
};
height?: {
value: number;
unit: 'cm' | '[in_i]';
};
bmi?: number;
painScore?: {
value: number;
scale: '0-10' | 'FACES' | 'FLACC';
};
}
```
### 3.3 Clinical Knowledge Representation
```typescript
// Clinical Knowledge Formats
interface ClinicalKnowledgeFormats {
guidelines: GuidelineFormat;
alerts: AlertRuleFormat;
orderSets: OrderSetFormat;
calculators: ClinicalCalculatorFormat;
evidenceSynthesis: EvidenceFormat;
}
// Guideline Representation (PlanDefinition)
interface GuidelineFormat {
id: string;
url: string;
version: string;
name: string;
title: string;
status: 'draft' | 'active' | 'retired' | 'unknown';
experimental: boolean;
date: Date;
publisher: string;
description: string;
purpose: string;
// Applicability
useContext: UseContext[];
jurisdiction: CodeableConcept[];
// Timing
effectivePeriod: Period;
// Topics
topic: CodeableConcept[];
// Contributors
author: ContactDetail[];
editor: ContactDetail[];
reviewer: ContactDetail[];
endorser: ContactDetail[];
// Related artifacts
relatedArtifact: RelatedArtifact[];
// Library references (CQL logic)
library: string[];
// Goals
goal: GoalDefinition[];
// Actions (the guideline steps)
action: GuidelineAction[];
}
interface GuidelineAction {
id: string;
prefix: string;
title: string;
description: string;
textEquivalent: string;
priority: 'routine' | 'urgent' | 'asap' | 'stat';
code: CodeableConcept[];
reason: CodeableConcept[];
documentation: RelatedArtifact[];
// Applicability conditions
condition: {
kind: 'applicability' | 'start' | 'stop';
expression: Expression;
}[];
// Triggers
trigger: TriggerDefinition[];
// Inputs/Outputs
input: DataRequirement[];
output: DataRequirement[];
// Timing
timing: Timing;
// Participants
participant: ActionParticipant[];
// Related actions
relatedAction: RelatedAction[];
// Dynamic values (calculated)
dynamicValue: DynamicValue[];
// Nested actions
action?: GuidelineAction[];
// What to do
definitionCanonical?: string; // ActivityDefinition reference
definitionUri?: string;
// Selection behavior
selectionBehavior: 'any' | 'all' | 'all-or-none' | 'exactly-one' | 'at-most-one' | 'one-or-more';
requiredBehavior: 'must' | 'could' | 'must-unless-documented';
precheckBehavior: 'yes' | 'no';
cardinalityBehavior: 'single' | 'multiple';
}
// Alert Rule Format
interface AlertRuleFormat {
ruleId: string;
ruleName: string;
version: string;
category: AlertCategory;
severity: AlertSeverity;
status: 'active' | 'draft' | 'retired';
// When the rule applies
applicability: {
patientCriteria: Expression;
encounterCriteria?: Expression;
settingCriteria?: string[];
};
// Trigger conditions
triggers: AlertTrigger[];
// Alert content
alert: {
titleTemplate: string;
messageTemplate: string;
detailTemplate?: string;
recommendedAction: string;
references: Reference[];
};
// Override options
overrideOptions: {
allowOverride: boolean;
requireReason: boolean;
acceptedReasons: OverrideReason[];
requireDocumentation: boolean;
};
// Suppression rules
suppression: {
cooldownPeriod?: Duration;
maxPerEncounter?: number;
maxPerDay?: number;
suppressIfAcknowledged?: boolean;
};
// Evidence and references
evidence: {
level: EvidenceLevel;
sources: Citation[];
lastReviewed: Date;
nextReviewDue: Date;
};
}
type AlertCategory =
| 'DRUG_DRUG_INTERACTION'
| 'DRUG_ALLERGY'
| 'DRUG_DISEASE'
| 'DRUG_AGE'
| 'DRUG_PREGNANCY'
| 'DRUG_RENAL'
| 'DRUG_HEPATIC'
| 'DRUG_DUPLICATE'
| 'DOSE_ALERT'
| 'LAB_CRITICAL'
| 'LAB_ABNORMAL'
| 'VITAL_SIGN_ALERT'
| 'SCREENING_DUE'
| 'IMMUNIZATION_DUE'
| 'GUIDELINE_RECOMMENDATION'
| 'RISK_ALERT'
| 'DOCUMENTATION_REMINDER';
type AlertSeverity = 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL';
// Order Set Format
interface OrderSetFormat {
id: string;
name: string;
version: string;
status: 'active' | 'draft' | 'retired';
category: string[];
indication: CodeableConcept[];
description: string;
// Order items
orders: OrderItem[];
// Selection behavior
defaultSelections: string[]; // IDs of pre-selected items
requiredItems: string[]; // IDs of required items
mutuallyExclusive: string[][]; // Groups of mutually exclusive items
// Evidence
evidence: {
guidelines: Reference[];
lastReviewed: Date;
institution: string;
};
}
interface OrderItem {
id: string;
sequence: number;
category: 'MEDICATION' | 'LAB' | 'IMAGING' | 'PROCEDURE' | 'CONSULT' | 'NURSING' | 'DIET' | 'ACTIVITY';
selected: boolean;
required: boolean;
// Order details (varies by category)
medication?: MedicationOrderTemplate;
labOrder?: LabOrderTemplate;
imagingOrder?: ImagingOrderTemplate;
procedure?: ProcedureOrderTemplate;
consult?: ConsultOrderTemplate;
nursingOrder?: NursingOrderTemplate;
// Conditions for inclusion
condition?: Expression;
// Notes
comment?: string;
}
interface MedicationOrderTemplate {
medication: {
rxnormCode: string;
display: string;
generic: boolean;
};
dose: {
value: number | string; // Can be calculated
unit: string;
};
route: CodeableConcept;
frequency: CodeableConcept;
duration?: Duration;
prn: boolean;
prnReason?: CodeableConcept[];
instructions?: string;
substitutionAllowed: boolean;
maxDailyDose?: Quantity;
monitoringRequired?: MonitoringRequirement[];
}
// Clinical Calculator Format
interface ClinicalCalculatorFormat {
id: string;
name: string;
version: string;
description: string;
category: string[];
indication: string;
// Inputs
inputs: CalculatorInput[];
// Calculation logic
formula: CalculatorFormula;
// Output interpretation
interpretation: ScoreInterpretation[];
// Evidence
validation: {
originalStudy: Citation;
validationStudies: Citation[];
populations: string[];
limitations: string[];
};
// Display
displayOptions: {
showFormula: boolean;
showInterpretation: boolean;
showReferences: boolean;
};
}
interface CalculatorInput {
id: string;
name: string;
description: string;
type: 'numeric' | 'categorical' | 'boolean' | 'date';
required: boolean;
// For numeric
numericConfig?: {
unit: string;
min: number;
max: number;
precision: number;
};
// For categorical
categoricalConfig?: {
options: { value: string | number; label: string; points?: number }[];
};
// Source (auto-populate from EHR)
autoPopulate?: {
fhirPath: string;
loincCode?: string;
defaultValue?: any;
};
}
interface CalculatorFormula {
type: 'expression' | 'lookup' | 'algorithm';
// For expression (e.g., GFR calculation)
expression?: string;
// For lookup (e.g., body surface area charts)
lookupTable?: LookupTable;
// For algorithm (e.g., cardiovascular risk)
algorithm?: string; // CQL or JavaScript
}
// Example: CKD-EPI eGFR Calculator
const ckdEpiCalculator: ClinicalCalculatorFormat = {
id: 'ckd-epi-egfr-2021',
name: 'CKD-EPI eGFR (2021)',
version: '2021',
description: 'Estimates glomerular filtration rate using CKD-EPI 2021 equation (race-free)',
category: ['Nephrology', 'Laboratory'],
indication: 'Assessment of kidney function',
inputs: [
{
id: 'serum_creatinine',
name: 'Serum Creatinine',
description: 'Serum creatinine level',
type: 'numeric',
required: true,
numericConfig: {
unit: 'mg/dL',
min: 0.1,
max: 20,
precision: 2
},
autoPopulate: {
fhirPath: "Observation.where(code.coding.where(system='http://loinc.org' and code='2160-0')).value.value",
loincCode: '2160-0'
}
},
{
id: 'age',
name: 'Age',
description: 'Patient age in years',
type: 'numeric',
required: true,
numericConfig: {
unit: 'years',
min: 18,
max: 120,
precision: 0
},
autoPopulate: {
fhirPath: "Patient.birthDate.toAge()"
}
},
{
id: 'sex',
name: 'Sex',
description: 'Biological sex',
type: 'categorical',
required: true,
categoricalConfig: {
options: [
{ value: 'female', label: 'Female' },
{ value: 'male', label: 'Male' }
]
},
autoPopulate: {
fhirPath: "Patient.gender"
}
}
],
formula: {
type: 'expression',
expression: `
// CKD-EPI 2021 equation (race-free)
let kappa = sex == 'female' ? 0.7 : 0.9;
let alpha = sex == 'female' ? -0.241 : -0.302;
let sexCoef = sex == 'female' ? 1.012 : 1.0;
let scrKappa = serum_creatinine / kappa;
let term1 = Math.min(scrKappa, 1) ** alpha;
let term2 = Math.max(scrKappa, 1) ** -1.200;
return 142 * term1 * term2 * (0.9938 ** age) * sexCoef;
`
},
interpretation: [
{
range: { min: 90, max: Infinity },
stage: 'G1',
description: 'Normal or high',
recommendation: 'If no other evidence of kidney disease, may not indicate CKD'
},
{
range: { min: 60, max: 89 },
stage: 'G2',
description: 'Mildly decreased',
recommendation: 'May indicate early CKD if other markers present'
},
{
range: { min: 45, max: 59 },
stage: 'G3a',
description: 'Mildly to moderately decreased',
recommendation: 'CKD stage 3a - monitor and manage risk factors'
},
{
range: { min: 30, max: 44 },
stage: 'G3b',
description: 'Moderately to severely decreased',
recommendation: 'CKD stage 3b - nephrology referral recommended'
},
{
range: { min: 15, max: 29 },
stage: 'G4',
description: 'Severely decreased',
recommendation: 'CKD stage 4 - prepare for renal replacement therapy'
},
{
range: { min: 0, max: 14 },
stage: 'G5',
description: 'Kidney failure',
recommendation: 'CKD stage 5 - dialysis or transplant may be needed'
}
],
validation: {
originalStudy: {
authors: 'Inker LA, et al.',
title: 'New Creatinine- and Cystatin C-Based Equations to Estimate GFR without Race',
journal: 'N Engl J Med',
year: 2021,
doi: '10.1056/NEJMoa2102953'
},
validationStudies: [],
populations: ['Adults ≥18 years'],
limitations: [
'Less accurate in acute kidney injury',
'May be inaccurate with extremes of muscle mass',
'Not validated in children or pregnant women'
]
},
displayOptions: {
showFormula: true,
showInterpretation: true,
showReferences: true
}
};
```
### 3.4 CDS Hooks Specification
```typescript
// CDS Hooks Standard Implementation
interface CDSHooksSpecification {
version: '2.0';
description: 'HL7 CDS Hooks for EHR integration';
hooks: {
patientView: PatientViewHook;
orderSelect: OrderSelectHook;
orderSign: OrderSignHook;
appointmentBook: AppointmentBookHook;
encounterStart: EncounterStartHook;
encounterDischarge: EncounterDischargeHook;
};
}
// CDS Hooks Request/Response
interface CDSHookRequest {
hook: string;
hookInstance: string; // UUID
fhirServer: string;
fhirAuthorization?: FHIRAuthorization;
context: HookContext;
prefetch?: PrefetchData;
}
interface HookContext {
userId: string; // Practitioner/[id]
patientId: string;
encounterId?: string;
// Hook-specific context
selections?: string[]; // For order-select
draftOrders?: Bundle; // For order-sign
}
interface CDSHookResponse {
cards: Card[];
systemActions?: SystemAction[];
}
interface Card {
uuid: string;
summary: string; // Max 140 chars
detail?: string; // Markdown
indicator: 'info' | 'warning' | 'critical';
source: CardSource;
suggestions?: Suggestion[];
selectionBehavior?: 'at-most-one';
overrideReasons?: OverrideReason[];
links?: Link[];
}
interface CardSource {
label: string; // Organization name
url?: string;
icon?: string; // PNG 100x100
topic?: Coding;
}
interface Suggestion {
label: string;
uuid?: string;
isRecommended?: boolean;
actions: SuggestionAction[];
}
interface SuggestionAction {
type: 'create' | 'update' | 'delete';
description: string;
resource?: Resource; // FHIR resource
resourceId?: string; // For update/delete
}
// CDS Hooks Service Implementation
class CDSHooksService {
private ruleEngine: RuleEngine;
private mlService: MLInferenceService;
private knowledgeBase: ClinicalKnowledgeBase;
async handleHook(request: CDSHookRequest): Promise<CDSHookResponse> {
const startTime = Date.now();
try {
// Get patient data (from prefetch or fetch)
const patientData = await this.resolvePatientData(request);
// Determine applicable rules and services
const applicableServices = await this.findApplicableServices(
request.hook,
patientData
);
// Execute services in parallel
const results = await Promise.all(
applicableServices.map(service =>
this.executeService(service, patientData, request)
)
);
// Aggregate and prioritize cards
const cards = this.aggregateAndPrioritize(results);
// Log for audit
await this.auditLog(request, cards, Date.now() - startTime);
return { cards };
} catch (error) {
console.error('CDS Hooks error:', error);
return { cards: [] }; // Fail silently to not block clinician
}
}
private async resolvePatientData(
request: CDSHookRequest
): Promise<PatientData> {
// Use prefetch if available
if (request.prefetch) {
return this.extractFromPrefetch(request.prefetch);
}
// Otherwise fetch from FHIR server
return this.fetchPatientData(
request.fhirServer,
request.context.patientId,
request.fhirAuthorization
);
}
private aggregateAndPrioritize(
results: ServiceResult[]
): Card[] {
// Flatten all cards
let allCards = results.flatMap(r => r.cards);
// Remove duplicates (by knowledge source)
allCards = this.deduplicateCards(allCards);
// Sort by priority
allCards.sort((a, b) => {
const priority = { 'critical': 0, 'warning': 1, 'info': 2 };
return priority[a.indicator] - priority[b.indicator];
});
// Apply maximum card limit
const MAX_CARDS = 5;
return allCards.slice(0, MAX_CARDS);
}
}
// Example: Drug Interaction CDS Service
class DrugInteractionCDSService implements CDSService {
serviceName = 'Drug-Drug Interaction Check';
supportedHooks = ['order-select', 'order-sign'];
async execute(
patientData: PatientData,
request: CDSHookRequest
): Promise<ServiceResult> {
const cards: Card[] = [];
// Get current medications
const currentMeds = patientData.medications.active;
// Get draft orders (medications only)
const draftMeds = this.extractDraftMedications(request.context.draftOrders);
// Check for interactions
for (const draftMed of draftMeds) {
for (const currentMed of currentMeds) {
const interaction = await this.checkInteraction(draftMed, currentMed);
if (interaction && interaction.severity !== 'NONE') {
cards.push(this.createInteractionCard(draftMed, currentMed, interaction));
}
}
// Also check draft-to-draft interactions
for (const otherDraft of draftMeds) {
if (otherDraft.id === draftMed.id) continue;
const interaction = await this.checkInteraction(draftMed, otherDraft);
if (interaction && interaction.severity !== 'NONE') {
cards.push(this.createInteractionCard(draftMed, otherDraft, interaction));
}
}
}
return { cards };
}
private createInteractionCard(
drug1: MedicationOrder,
drug2: MedicationRecord,
interaction: DrugInteraction
): Card {
return {
uuid: generateUUID(),
summary: `${interaction.severity} interaction: ${drug1.display} + ${drug2.medication.display}`,
detail: `**Effect:** ${interaction.effect}\n\n**Mechanism:** ${interaction.mechanism}\n\n**Management:** ${interaction.management}`,
indicator: this.mapSeverityToIndicator(interaction.severity),
source: {
label: 'Drug Interaction Database',
url: 'https://www.drugs.com/interactions.html'
},
suggestions: interaction.alternatives?.map(alt => ({
label: `Consider ${alt.name} instead`,
isRecommended: alt.recommended,
actions: [{
type: 'update',
description: `Replace ${drug1.display} with ${alt.name}`,
resource: this.createAlternativeMedication(drug1, alt)
}]
})),
overrideReasons: [
{ code: 'patient-tolerated', display: 'Patient has tolerated this combination' },
{ code: 'benefit-outweighs-risk', display: 'Clinical benefit outweighs risk' },
{ code: 'monitoring-in-place', display: 'Appropriate monitoring in place' }
]
};
}
}
```
---
**WIA-CLINICAL-DECISION-SUPPORT Data Formats**
**Version**: 1.0.0
**Last Updated**: 2025
**License**: MIT
© 2025 World Interoperability Alliance (WIA)
弘益人間 (홍익인간) - Benefit All Humanity
Korea operates a comprehensive industrial cluster system. Korea Top 12 National Strategic Technologies (5th Science and Technology Master Plan 2023-2027): (1) Semiconductors and Displays (2) Secondary Batteries (3) Advanced Mobility (autonomous driving, UAM) (4) Next-Generation Nuclear (SMR) (5) Advanced Bio (6) Aerospace and Marine (7) Hydrogen (8) Cybersecurity (9) Artificial Intelligence (10) Next-Generation Communications (11) Advanced Robotics and Manufacturing (12) Quantum. 12 fields receive direct investment of 5 trillion KRW annually, cumulative 30 trillion KRW by 2030. Korea Major Industrial Clusters: Pangyo IT Cluster (1,300+ companies, 100 trillion KRW revenue), Gangnam Fintech (200+ companies), Songdo BT Bio Cluster, Daegu Medical Cluster, Ulsan Industry (shipbuilding, petrochemicals, automotive), Changwon Machinery, Changwon National Industrial Complex, Siheung and Banwol (SME manufacturing), Yeosu Petrochemicals, Pyeongtaek Semiconductor (Samsung Electronics Pyeongtaek Campus), Icheon and Cheongju Semiconductor (SK hynix Icheon and Cheongju Campuses), Asan Display (Samsung Display Asan Campus), Gumi Mobile (Samsung Gumi Campus), Pohang Steel (POSCO Pohang Steel Mill), Gwangyang Steel (POSCO Gwangyang Steel Mill), Dangjin Steel (Hyundai Steel Dangjin), Ulsan Automotive (Hyundai Motor Ulsan Plant), Asan Automotive (Hyundai Asan Plant), Kia Gwangju and Sohari, POSCO Gwangyang and Pohang Steel Mills, SK hynix Icheon and Cheongju, Samsung Electronics Hwaseong, Giheung, Pyeongtaek, Onyang, Cheonan, Asan Semiconductor Facilities. Major Industrial Complexes and Techno Valleys: Pangyo Techno Valley (1st 800 companies, 2nd 600 companies, 3rd 1,200 companies), Dongtan Techno Valley, Gwanggyo Techno Valley, Songdo IBD, Yeouido Financial District, Gangnam Teheran-ro Valley, Sihwa, Banwol, Gumi, Ulsan, Changwon, Geoje, Yeosu, Ulsan Mipo, Onsan, Cheongju, Iksan, Gwangyang, Yeosu, POSCO Gwangyang Steel Mill, Asan Bay, Seosan, Songdo, Incheon Airport, Sejong, Cheongna, Geomdan, Pyeongtaek Automotive Industrial Complex, Giheung Semiconductor Complex, Icheon Semiconductor Complex, Asan Display Complex, Gumi Mobile Complex, Changwon National Industrial Complex, Ulsan Mipo National Industrial Complex, Yeosu National Industrial Complex, Onsan National Industrial Complex. Korea Workforce Statistics: STEM undergraduate students 700,000 (26% of all university students), STEM graduate students 170,000, PhD researchers 140,000, STEM doctorates conferred 8,000 annually (Seoul National University 1,200, KAIST 800, POSTECH 400, Yonsei University 700, Korea University 600, UNIST 250, DGIST 100, GIST 200, KISTI 50, KIST and ETRI postdoctoral programs 1,000), information security experts 300,000 (KISA-trained and private), AI experts 50,000 (NIA, IITP, NIPA, Samsung, LG, SK, NAVER, Kakao trained), semiconductor experts 260,000 (Samsung Electronics 60,000, SK hynix 30,000, DB HiTek, SK siltron). National R&D Project Operation: National R&D projects 100,000+ annually (MSIT 35,000, MOTIE 25,000, MSS 20,000, MOE 15,000, others 5,000), R&D participating institutions 25,000+, R&D participating researchers 530,000, National R&D output (papers, patents) 540,000 annually. Korea Corporate R&D Investment Top 10 (2024): Samsung Electronics 28 trillion KRW, LG Electronics 9 trillion KRW, SK hynix 8 trillion KRW, Hyundai Motor 6 trillion KRW, Kia 4 trillion KRW, LG Chem 3.5 trillion KRW, LG Display 3.2 trillion KRW, POSCO 3 trillion KRW, Samsung SDI 2.7 trillion KRW, SK Innovation 2.5 trillion KRW.
Korea leads global standardization cooperation in 4th industrial revolution technologies. Korea Quantum Technology Standards: "Quantum Science and Technology Comprehensive Development Plan 2024-2030" (8 trillion KRW R&D), National Quantum Science and Technology Committee, MSIT Quantum Technology Bureau, KIST Quantum Information Research Division, KAIST Quantum Graduate School, POSTECH Quantum Science and Technology Division, KAIST IQC, Seoul National University Quantum Information Center, Korea Institute for Advanced Study Quantum Computing Division, KRISS Quantum Measurement Standards Center, SK Telecom QKD, KT QKD, LG U+ QKD, Samsung SDS PQC, Easy Security, CryptoLab Quantum-Resistant Cryptography, KS X ISO/IEC 18033-3, NIST PQC ML-KEM/ML-DSA/SLH-DSA Korean adoption, QKD ETSI GS QKD series Korean Profile. Korea Next-Generation Communications (5G/6G) Standards: 5G subscribers 35 million, 5G base stations 350,000, 5G dedicated networks 16 operators, 6G Acceleration Council (MSIT 2024), 6G commercialization target 2028, 3GPP Release 18/19/20 Korean participation, KS X 3GPP, Samsung Research 6G, LG Electronics 6G, KT 6G, SK Telecom 6G, LG U+ 6G, NIA, ETRI, KAIST, POSTECH, Seoul National University 6G Research Division, O-RAN ALLIANCE Korean Chair Company, M-CORD, OpenRAN Korean Cooperation. Korea AI Standards: KS X ISO/IEC 22989 (AI Concepts and Terminology), KS X ISO/IEC 23053 (AI System Framework), KS X ISO/IEC 5338 (AI System Lifecycle), KS X ISO/IEC 24029 (AI Trustworthiness and Robustness), KS X ISO/IEC 24028 (AI Trustworthiness), KS X ISO/IEC 23894 (AI Risk Management), KS X ISO/IEC 38507 (AI Governance), KS X ISO/IEC 42001 (AIMS Operations System), KS X ISO/IEC 42005 (AI Impact Assessment), AI Framework Act (effective July 2026) Enforcement Decree, Mandatory ex-ante impact assessment for high-impact AI, Samsung Research HyperCLOVA X, LG AI Research EXAONE, SK Telecom A., KT Media AI, NAVER Clova, Kakao i Korean foundation models. Korea Bio Standards: KS X ISO 20387 (Biobanking), KS X ISO 21709, KS X HL7 FHIR R5, SNOMED CT, LOINC, KCD-8, ICD-11, OMOP CDM v5.4, CDISC SDTM, DICOM, HL7 V2, HL7 CDA, MFDS GMP, MFDS Good Tissue Practice, MFDS AI Medical Device Guidelines (50+ approvals), KRIBB, KRICT, KFRI, KIST, KAIST, POSTECH Bio R&D Centers, Samsung Biologics, Celltrion, SK Bioscience, GC Biopharma, LG Chem, Chong Kun Dang, Yuhan Korean Bio Pharmaceuticals, 6 Major Hospitals (Seoul National University, Samsung, Asan, Severance, Bundang Seoul National University, Korea University) Clinical Trial Infrastructure. Korea Aerospace Standards: Korea AeroSpace Administration (KASA, established May 27 2024), MSIT, Ministry of National Defense, KARI, KASI, KIGAM, ETRI, KAI, Hanwha Aerospace, Hanwha Systems, LIG Nex1, CCSDS, ITU, NORAD, IADC, NASA, ESA, JAXA, CNSA, ISRO Korean Cooperation, KS W ISO 14620, KS W ISO 11227, KS W ISO 27026, Nuri Rocket KSLV-II, KSLV-III, Danuri KPLO, Next-Generation Reconnaissance Satellite 425 Project, Arirang, Cheollian, KOMPSAT, CAS500 series. Korea Secondary Battery Standards: "3rd Secondary Battery Industry Development Strategy 2024-2030", MOTIE Secondary Battery Bureau, LG Energy Solution, Samsung SDI, SK On, POSCO Future M, EcoPro BM, L&F, DI Dongil, Samsung SDI Korean Secondary Battery 6 Companies, KS C IEC 62660, KS C IEC 62619, KS C IEC 62133, UN ECE R100, UN/ECE R136 Korean Adoption. Korea Semiconductor Standards: Samsung Electronics (HBM3E, HBM4, DDR5, LPDDR5X), SK hynix (HBM3E 12-Hi, HBM4), DB HiTek, SK siltron, SK Enpulse, Dongjin Semichem, Seoul Semiconductor, Simmtech, Samsung Display, LG Display, JEDEC, SEMI, IEEE, KS C IEC 60068, UCIe 1.1/2.0, CXL 3.0/3.1, HBM4 Standardization, DDR6 Standardization, LPDDR6 Standardization, MRAM, ReRAM, PCRAM Korean Standards Adoption.
Korea operates city, regional, education, and cultural infrastructure with the following statistics. Korea 17 Metropolitan Governments: Seoul Metropolitan City (population 9.45 million), Busan Metropolitan City (3.27 million), Daegu Metropolitan City (2.36 million), Incheon Metropolitan City (3.00 million), Gwangju Metropolitan City (1.43 million), Daejeon Metropolitan City (1.43 million), Ulsan Metropolitan City (1.09 million), Sejong Special Self-Governing City (0.39 million), Gyeonggi Province (13.94 million), Gangwon Special Self-Governing Province (1.52 million), Chungcheongbuk Province (1.59 million), Chungcheongnam Province (2.12 million), Jeollabuk Special Self-Governing Province (1.75 million), Jeollanam Province (1.81 million), Gyeongsangbuk Province (2.56 million), Gyeongsangnam Province (3.27 million), Jeju Special Self-Governing Province (0.67 million). 17 metropolitan governments and 226 city/county/district administrations. Korea Digital Education Infrastructure: Elementary, middle, high school students 5.4 million, universities 187 (4-year 192, 2-year colleges 134, graduate schools 1,200), university enrollment 2.8 million, doctoral students 170,000, lifelong learners 22 million, digital textbook coverage 78% (2024), EBS, KOOC (Korea Massive Open Online Course), KOCW (Korea OpenCourseWare), K-MOOC operation. K-Content Industry Statistics (2024): K-Content total revenue 158 trillion KRW, K-Content exports 14 trillion KRW (BTS, BLACKPINK, NewJeans K-POP), K-Drama (Squid Game, Crash Landing on You), K-Game (PUBG, Lineage W, MapleStory), K-Webtoon (NAVER Webtoon, Kakao Webtoon), K-Publishing, K-Broadcasting. Korea Creative Content Agency (KOCCA), Ministry of Culture Sports and Tourism (MCST), Korea Communications Agency (KCA), Korea Culture Information Service Agency, Korean Film Archive, Korea Publishing Industry Promotion Agency, National Gugak Center, National Institute of Korean Language, National Museum of Korea, National Library of Korea operations. Korea Medical Cost Statistics: National Health Insurance total expenditure 110 trillion KRW (2024), medical institution treatment costs 95 trillion KRW, pharmaceutical costs 24 trillion KRW, per capita medical expense 2.2 million KRW per year, elderly (65+) medical expense ratio 45%, Long-term Care Insurance subscribers 52 million, medical institutions 96,000+, general hospitals 350, dental/oriental medicine/pharmacy/health centers 80,000+, NHIS coverage 99.7%, MyData medical data integration 4 designated combination specialists. Korea Social Welfare Statistics (2024): Social welfare total budget 244 trillion KRW, National Pension subscribers 22 million, National Pension recipients 7 million, Basic Pension recipients 7 million, Long-term Care recipients 1.1 million, Child Allowance recipients 2.8 million, Basic Livelihood Security recipients 2.3 million, Earned Income Tax Credit recipient households 4.8 million, Education Benefit recipients 4.7 million. Korea Environment Statistics (2024): 22 national parks, 15 provincial parks, 45 Ramsar wetlands, 12,587 species registered Korean Peninsula wildlife, Korean Peninsula forest area 6.33 million ha (63% of land), CO2 emissions 650 million tons (2030 reduction target 440 million tons, -32.5%), renewable energy share 9% (2024, 2030 target 21.6%), accumulated EVs 600,000, accumulated hydrogen vehicles 35,000. Korea Safety / Security Statistics: Police officers 127,000, firefighters 65,000, 119 calls 6.7 million per year, 112 calls 18 million per year, Coast Guard 10,000, National Cyber Security Center (NCSC) operation, KISA cyber incident reports 280,000 per year, FSEC financial cyber incident reports 40,000 per year, National Disaster Management System (CDSS), National Crisis Management Center operation.
Korea operates international standardization activities and multilateral cooperation. ISO TC/SC Korean Secretariat Activities: ISO/TC 22 (Road vehicles) Korean Secretariat, ISO/TC 184 (Automation systems) Korean Secretariat, ISO/TC 215 (Health informatics) Korean Secretariat, ISO/TC 229 (Nanotechnologies) Korean Secretariat, ISO/TC 268 (Sustainable cities) Korean Secretariat, ISO/TC 307 (Blockchain) Korean Secretariat, ISO/IEC JTC 1 (Information technology) Korean Secretariat 50+ fields, ISO/IEC JTC 1/SC 27 (Information security) Korean Chair, ISO/IEC JTC 1/SC 38 (Cloud computing) Korean Chair, ISO/IEC JTC 1/SC 42 (AI) Korean Vice-Chair. IEC TC Korean Secretariat: IEC TC 9 (Electric railway) Korean Secretariat, IEC TC 14 (Power transformers) Korean Secretariat, IEC TC 22 (Power electronics) Korean Secretariat, IEC TC 47 (Semiconductors) Korean Secretariat, IEC TC 86 (Fibre optics) Korean Secretariat, IEC TC 100 (Audio-video) Korean Secretariat, IEC TC 110 (Electronic display) Korean Secretariat, IEC TC 119 (Printed electronics) Korean Secretariat, IEC SC 65A/B/C/D (Industrial-process measurement) Korean Chair. ITU-T Study Group Korean Chair Activities: SG 9 (Cable networks), SG 13 (Future networks), SG 15 (Networks technologies), SG 16 (Multimedia), SG 17 (Security), SG 20 (IoT and smart city), SG 21 (Multimedia and metaverse) Korean Chair or Vice-Chair activities. 3GPP RAN/SA Korean Chairs: 3GPP RAN1 (Radio Layer 1), RAN2 (Radio Layer 2 and 3 RR), RAN3 (Iub, Iuc, Iur interfaces), RAN4 (Radio performance and protocol aspects), SA1 (Services), SA2 (Architecture), SA3 (Security), SA4 (Codec), SA5 (Telecom management), SA6 (Mission-critical applications) Korean Chair or Vice-Chair. Korea contributed 7,800+ 5G standard proposals (through 3GPP Release 18), 1,200+ 6G standard proposals. IEEE 802 Korean Chairs: 802.3 (Ethernet) Working Group, 802.11 (WiFi) Working Group, 802.15 (WPAN) Working Group, 802.1 (Bridging) Working Group, 802.16 (WiMAX) Working Group, 802.18 (Radio Regulatory) Korean Chair or Vice-Chair. OECD CSTP, UN ESCAP, APEC SCSC Korean Cooperation: OECD Committee for Scientific and Technological Policy Korean member, UN Economic and Social Commission for Asia and the Pacific Korean member, APEC Sub-Committee on Standards and Conformance Korean member, APEC Engineers Coordinating Committee Korean member, ANSI (American National Standards Institute) Korean cooperation, BSI (British Standards Institution) Korean cooperation, DIN (Deutsches Institut fur Normung) Korean cooperation, AFNOR (Association Francaise de Normalisation) Korean cooperation, JISC (Japanese Industrial Standards Committee) Korean cooperation, SAC (Standardization Administration of China) Korean cooperation. W3C, OASIS, IETF Korean Cooperation: W3C Korea Office operation (10+ working groups), OASIS Korea Office operation (LegalDocML, LegalRuleML, SAML, UBL, BPM working groups), IETF Korea Cooperation (KS X IETF series Korean adoption), ICANN Korean cooperation, KRNIC (Korea Network Information Center) operation, KISA Korea Internet Center, BGP Korea, NCSC (National Cyber Security Center). WIPO, UNCTAD, WTO, G20 Korean Cooperation: WIPO (World Intellectual Property Organization) Korean member, UNCTAD (UN Conference on Trade and Development) Korean member, WTO (World Trade Organization) Korean member, G20 Korean member (joined 1999), G7 cooperation, OECD member (1996), UN member (1991), KEDO (Korean Peninsula Energy Development Organization), Six-Party Talks (South/North Korea, US, China, Russia, Japan), Korea-US, Korea-Japan, Korea-China bilateral standards cooperation agreements.