Inspiration

In the ICU, the data clinicians rely on is often late, missing or wrong: a value charted an hour after it was measured, a dropped sensor reading, a heart rate of 0 from a loose probe. Early-warning tools usually treat every number as true, so real concerns and measurement errors look the same. We wanted a tool that helps a clinician tell "this patient may need review" from "this data needs checking".

What it does

MedSignal is a clinical-intelligence prototype that keeps clinical signals and measurement uncertainty separate.

  • Two data sources, never mixed:
    • MIMIC-IV Demo replay: real, de-identified historical ICU data, replayed so that each value appears only once it was actually available.
    • Virtual Hospital: a simulated ward streaming synthetic FHIR R4 data, including a deteriorating patient and a faulty-sensor reading.
  • Data-quality engine: checks freshness, completeness, plausibility, consistency and provenance for every measurement.
  • Experimental alert rules: clinical-observation alerts and data-verification alerts are kept separate, each with its evidence, threshold source and review priority.
  • Grounded AI assistant: explains alerts using cited facts from MedSignal's own records. It is read-only, cannot diagnose or recommend treatment, and works without any AI provider. MIMIC data is never sent to an external model.
  • Analytics: describes data volume, data quality and alert burden for each source.

How we built it

  • Backend: FastAPI, SQLAlchemy and PostgreSQL, as a modular monolith.
  • Frontend: Next.js 16, React 19, Tailwind and Recharts.
  • Simulated hospital: a local HAPI FHIR R4 server, with an idempotent sync into MedSignal.
  • AI: a provider-neutral interface with a privacy gate and answer validation; a local Ollama model was used for testing.
  • Delivery: everything runs in Docker Compose, with over 320 automated tests and strict type checking.

Challenges we ran into

  • Time correctness: a replay must never show a value before it was recorded, even when it was charted earlier.
  • No usable outcome labels: the MIMIC-IV Demo has only 23 qualifying outcome events, far short of the 240 needed to train and validate even a minimal prediction model. Rather than ship a misleading risk score, we chose not to build one.
  • Alert burden: published thresholds applied to ICU data produced about 17 alerts per patient-day, so we had to show that honestly rather than hide it.
  • Grounding the AI: a small local model rarely cited its sources, so we made MedSignal's own verified facts the core of every answer and labelled any AI text separately.

Accomplishments that we're proud of

  • A working end-to-end pipeline, from FHIR feed to data quality, alerts, explanation and analytics.
  • Measurement problems are visibly separated from clinical alerts throughout the app.
  • The assistant explains with citations, declines unsafe requests and keeps patient data local.
  • We are honest about limits: the app reports which metrics it does not measure and why, never a fabricated one.
  • The demo is reproducible and repeats the same way every time.

What we learned

  • Data quality is a clinical-safety problem in its own right, not just a technical one.
  • Saying "we can't measure that" is more trustworthy than showing an unvalidated accuracy figure.
  • Language-model explanations need deterministic, cited facts underneath them.
  • Alert thresholds that work on general wards can be very noisy in the ICU without local review.

What's next for MedSignal

  • Clinical review of the alert rules and thresholds, together with ICU staff.
  • Access to larger, properly labelled datasets so we can try to build and validate a prediction model.
  • Handling of FHIR corrections, plus authentication and audit trails.
  • Usability testing with clinicians before any real-world pilot.

Built With

Share this project:

Updates

Submission history