Inspiration

Most clinical monitoring today is reactive. Bedside monitors alarm when a number crosses a threshold, and by then the patient is often already deteriorating. EHRs sit in one system and wearable data in another, so a clinician rarely sees one picture that combines a patient's history, genetics, medications and live vitals. We wanted to know what it would look like if every patient had a living virtual replica. That replica would read their records and their vitals together, spot trouble early, and let doctors safely test treatments on it before trying them on the real person. The Happiest Health Digital Twin Challenge gave us the push to build that proof of concept.

What it does

BioTwin Omni is a dynamic patient digital twin. It combines static EHR data with 1 Hz wearable streams to forecast adverse events and personalize treatment.

  • Hybrid fusion twin: It merges a patient's baseline record with live vitals from wearables. The baseline covers demographics, chronic conditions, allergies, prescriptions and pharmacogenomics (CYP2C19/CYP2D6). The live stream covers heart rate, blood pressure, SpO2, core temperature, respiratory rate and glucose.
  • Physics-informed hemodynamics: Instead of treating vitals as isolated numbers, it continuously computes clinically meaningful markers:
    • Mean Arterial Pressure
    • Shock Index
    • Rate Pressure Product
    • Pulse pressure
    • Cardiac workload
  • Early warning engine: It flags four kinds of crisis with a countdown to the predicted event:
    • Impending cardiac arrest or acute coronary syndrome
    • Septic shock progression (SIRS criteria plus falling MAP)
    • Hypertensive emergency and stroke risk
    • Acute hypoxemic desaturation
  • Multi-agent clinical board: Cardiologist, Endocrinologist, Pharmacologist and Health Economist agents deliberate on treatment in real time.
    • They check their reasoning against PubMed, PharmGKB/CPIC and GoodRx pricing.
    • They automatically bring in a Critical Care Intensivist when the patient enters a crisis state.
  • Human-in-the-loop steering: A clinician can inject a bedside observation mid-deliberation, such as "severe renal impairment, avoid ACE inhibitors," and the agents re-deliberate around it.
  • What-if simulator: Clinicians can compare interventions, for example IV fluids plus norepinephrine versus beta-blockers. They see the patient's projected recovery curve at 1, 6 and 24 hours.
  • Clinician Command Center: A dark-mode dashboard with live waveforms, a 4-organ holographic twin and a deliberation theater.

How we built it

  • Core twin engine (core-digital-twin/): Holds the hemodynamic models, the adverse-event classifier and the state synchronizer that fuses EHR data with streaming vitals.
  • IoT telemetry streamer: A high-frequency biosensor generator with complex event processing (CEP) rules, an anomaly buffer, and four scripted clinical crisis tracks for demos:
    • Stable baseline
    • Coronary deterioration
    • Septic shock
    • Hypertensive crisis
  • Backend: A Node.js server that hosts the multi-agent consensus loop, pharmacology and drug-interaction services, and the connections to the frontend:
    • WebSocket telemetry on /ws/telemetry
    • REST endpoints under /api/telemetry
  • Frontend: A real-time clinician dashboard with live waveforms, organ-status visualization and the what-if simulator.
  • Research base: Physiological modeling choices grounded in peer-reviewed clinical literature and world-model benchmarks.
  • Legacy integration: Components merged from three earlier projects: MedStream Analytics, a VLSI Cardiac Twin and an IoT Virtual Patient.
  • Stack: Mostly JavaScript/Node, with Python and Jupyter for the modeling work, Docker Compose for orchestration, and a test_system.js suite that checks the formulas, predictions, state fusion and scenario streaming.

Challenges we ran into

  • Fusing slow and fast data: EHR records change over months while vitals change every second. Keeping one coherent twin state across both timescales without lag was hard.
  • Clinical credibility: Every warning had to trace back to a recognized marker, such as Shock Index ≥ 0.9 or MAP < 65 mmHg, rather than a black-box score. Clinicians need to trust the output.
  • Controlling the agents: Multi-agent deliberation tends to wander or contradict itself. Making the agents converge on a consensus, and re-deliberate cleanly after a human interrupts, took a lot of iteration.
  • Merging legacy codebases: Three existing projects came with different data schemas. We unified them into one data vault while keeping the originals intact.
  • Realistic synthetic data: Without real patient data, we had to build physiologically plausible crisis trajectories for testing and demos.

Accomplishments that we're proud of

  • A complete end-to-end pipeline: simulated wearable data flows through the twin, triggers predictions, drives agent deliberation, and appears on the clinician dashboard, all live.
  • Early warnings that fire with a countdown across four distinct simulated crisis scenarios.
  • Human-in-the-loop steering that actually changes what the agents recommend.
  • Grounding the twin in real hemodynamic physiology rather than only pattern-matching.
  • A what-if simulator that turns the twin from a monitor into a decision-support tool.

What we learned

  • In healthcare, explainability is a requirement, not a feature. Physics-informed markers earn more trust than opaque risk scores.
  • Human-in-the-loop design is essential. The clinician's bedside knowledge often changes the right answer.
  • Real-time systems need careful event processing. Sounding every alarm is as dangerous as missing one.
  • Pharmacogenomics can meaningfully change treatment choices, which makes it a natural fit for personalized digital twins.

What's next for BioTwin Omni

  • Validation on real data: Test and calibrate the predictors on de-identified ICU datasets such as MIMIC-IV and eICU, and measure lead time, sensitivity and false-alarm rates.
  • Real device integration: Connect to wearables and hospital systems through standard protocols such as FHIR and HL7, and to commercial biosensors.
  • Learned physiology: Pair the rule-based models with learned world models so the twin adapts to each patient over time.
  • Richer counterfactuals: Add uncertainty bands to what-if projections and support multi-drug regimens.
  • Clinical pilot: Run a supervised study with clinicians, alongside privacy, security and regulatory work toward safe deployment.

Built With

Share this project:

Updates

Submission history