Healthcare AI & EHR Integration Platform
Clinical AI platform integrating with Epic and Cerner via FHIR/HL7, automating medical coding with NLP models, and reducing physician administrative burden through intelligent chart summarization and workflow automation.
Overview
Ambience Health builds AI tools that reduce the administrative burden on physicians and care teams. I worked as a senior engineer across several core systems: the EHR integration layer (connecting to Epic and Cerner), an NLP-based medical coding service (ICD-10/CPT extraction), and clinical workflow automation (referrals, lab orders, discharge documentation).
The core challenge across all of these was operating reliably in a regulated healthcare environment — data had to be accurate, pipelines had to be auditable, and all systems had to remain HIPAA-compliant at every layer.
Problem
Physicians spend roughly two hours on administrative tasks for every hour of patient care. The specific problems I worked on: medical coders manually reviewing clinical notes to assign billing codes (slow, error-prone, expensive); physicians spending significant time reviewing charts before each visit with no structured summary; and care coordination tasks (referrals, lab orders, discharge paperwork) triggering chains of manual work across departments.
On the technical side: connecting to Epic and Cerner is notoriously complex — both EHRs use different FHIR profiles, have inconsistent HL7 message structures, and require custom handling for each deployment. Existing integrations were brittle point-to-point connections that broke when EHR configurations changed.
Solution
I built a layered architecture: a FHIR/HL7 abstraction layer that normalized data from different EHR systems into a canonical internal schema, NLP microservices that consumed this normalized data to perform coding and summarization tasks, and a Kafka-based event system that decoupled clinical workflow triggers from downstream automation.
For medical coding, I trained and deployed transformer-based models fine-tuned on clinical note corpora to extract ICD-10 and CPT codes, with a human-in-the-loop review step for low-confidence predictions. For chart intelligence, LLM-based summarization pipelines generated structured patient summaries from EHR record sets.
Architecture
EHR systems feed clinical events through a normalized integration gateway into a Kafka event bus, where downstream AI services (medical coding, chart summarization, workflow automation) consume and process them independently.
EHR systems push clinical data via HL7 v2 messages and FHIR R4 REST APIs into an integration gateway that normalizes, validates, and routes events onto Kafka topics. Downstream consumers include the medical coding service (NLP inference), the chart intelligence service (LLM summarization), and the clinical workflow service (task orchestration). All services write audit logs to a HIPAA-compliant audit store and return results to the EHR via the same integration gateway. OpenTelemetry distributed tracing spans the entire pipeline for observability.
Components
EHR Integration Gateway
TypeScript service handling FHIR R4 and HL7 v2 ingestion from Epic and Cerner; normalizes to canonical internal schema; validates against HIPAA data handling rules
Kafka Event Bus
Clinical events (admission, note completion, lab result) published as Kafka topics; decouples EHR data ingestion from downstream AI services
Medical Coding Service
Python FastAPI service with transformer NLP models; extracts ICD-10 and CPT codes from clinical notes; routes low-confidence predictions to human review queue
Chart Intelligence Service
LLM-based summarization pipeline that generates structured patient summaries from EHR record sets; optimized for pre-visit physician briefings
Clinical Workflow Service
Node.js service with distributed workers; orchestrates referrals, lab orders, discharge documentation via task state machines
Audit & Compliance Layer
Immutable audit log of all data access and AI inference events; supports HIPAA audit requirements and incident investigation
Execution Flow
Execution Flow
Key Technical Decisions
Epic and Cerner both implement FHIR but with different profiles, extensions, and quirks. Building services directly against each EHR's API would require every downstream service to handle both. The normalization layer translates both into a single internal schema — downstream services are EHR-agnostic and new EHR integrations only require updating the gateway.
Reliability & Scaling
Idempotent EHR event processing: duplicate HL7 messages (common in healthcare integrations) are deduplicated via message IDs before reaching downstream services
Kafka consumer groups with manual offset commits: consumers only advance their offset after successfully processing and persisting a message
Retry strategies with exponential backoff for NLP inference calls; failed inference tasks routed to DLQ for investigation
Circuit breaker pattern on EHR API calls: transient EHR unavailability doesn't cascade into system-wide failures
OpenTelemetry distributed tracing across all services — end-to-end visibility into pipeline latency and failure points
HIPAA-compliant audit logging: every data access and AI inference event is recorded with actor, timestamp, and data scope
Impact
Impact Metrics
Reduced physician chart review time before patient visits through automated structured summaries
Improved medical coding accuracy and reduced manual billing review effort by automating ICD-10/CPT code extraction
Significantly reduced administrative workload across clinical operations through workflow automation (referrals, lab orders, discharge docs)
Enabled real-time EHR synchronization with Epic and Cerner, replacing brittle batch-sync integrations
Improved incident resolution time across AI workflow services through distributed tracing and structured observability
Tech Stack
Backend
Infrastructure
Data
AI / ML