HealthFlow
A multi-agent AI pipeline that takes a paramedic's voice in the field to physician-approved EHR orders in 60 seconds, with a safety layer that blocks dangerous prescriptions.
Overview
HealthFlow attacks the deadliest gap in emergency medicine: the minutes between a paramedic seeing a patient and a hospital acting on it, where information gets lost, retyped, and delayed. A paramedic dictates what they see, and a pipeline of nine specialized AI agents structures the transcript into FHIR R4 clinical records, pulls the patient's history and medications, runs a differential diagnosis with confidence scoring, and drafts treatment orders. The critical piece is the safety layer: every draft order is screened against the patient's existing medications and allergies, and dangerous orders are blocked with safe alternatives before a physician ever reviews them. The demo case says it best: the diagnosis agent identifies a stroke and drafts tPA, the standard protocol, and the safety controller catches that the patient is on Warfarin, where tPA risks a fatal hemorrhage, blocks it, and recommends mechanical thrombectomy instead. That's the catch a tired clinician might miss at 3 a.m.
What I built
- Nine-agent clinical pipeline: voice capture, FHIR structuring, patient context pull, diagnosis, action planning, drug and allergy screening, safety control, case supervision, and audit — chained with LangChain and Claude so each agent has one job and a checkable output.
- Drug safety and blocking logic: a contraindication check that screens draft orders against patient medications and allergies, and a safety controller that blocks flagged orders and attaches safe alternatives rather than silently failing.
- Five-app hospital simulation: a Turborepo monorepo with separate apps for 911 dispatch, the paramedic in the field, the nurse triage queue, the physician review CRM, and the API, streaming live encounters between them.
- Identity and audit trail: physician-gated order commits through Scalekit auth, with every pipeline step recorded in a SHA-256 checksummed immutable audit chain for accountability.
- Eval harness: labeled clinical test cases with a deterministic rule-based fallback, hitting 94% vital-sign extraction accuracy and a 24-test suite including the Warfarin/tPA block.
Tech
TypeScript · Next.js 15 · LangChain · Claude · FHIR R4 · Scalekit · Apify · Supabase · Turborepo · Vercel
Outcome
1st place at the Scalekit × Apify hackathon. The judges' demo ran the full path live: dictation to structured diagnosis to a blocked contraindication to physician approval to an audited EHR commit, in under a minute. Built with a team of four; the repo, agent guide, and eval suite are public.