Blog
Notes on EHR data infrastructure, patient world models, and reliable medical imaging AI.
-
OMOP or MEDS for Patient World Models? Time, Actions and Meaning in Three MIMIC-IV Conversions
· 10 min read
OMOP CDM tells you what an event is, in concepts that mean the same thing across hospitals; MEDS tells you in what order things happened, in the shape a sequence model reads. A patient world model needs both, plus availability times, actions separated from observations and a way back to the source row. This post compares how the OHDSI ETL, MIMIC_IV_MEDS and EHR2Trace timestamp diagnoses, labs and medications in MIMIC-IV, shows two ways to encode when a fact became available, and lists eight checks to run before training.
-
How to Convert MIMIC-IV to MEDS: Three Open-Source Routes and a Five-Minute Demo
· 7 min read
There are three maintained open-source ways to turn MIMIC-IV into MEDS: MIMIC_IV_MEDS on MEDS-Extract for MEDS alone, meds_etl for MIMIC-IV 2.2 or an existing OMOP database, and EHR2Trace when you need MEDS and OMOP together, row-level lineage or availability times. This post gives the commands for each, times a full EHR2Trace run on the open MIMIC-IV demo (about two minutes of conversion), and shows how to filter on availability time to avoid leakage.
-
Chest X-ray Triage Before the Report Exists: Distilling a Multimodal Teacher into an Edge Model
· 8 min read
In an emergency department, chest X-rays are triaged before anyone writes the report, so a model that needs image and text cannot run at the moment it is needed. In our Smart Health paper we train an image-only student from a multimodal teacher whose target is averaged over five reports that MedGemma-27B writes for the same image. The 14 ms student reaches AUC 0.842 on MIMIC-CXR, and sending the 20.3% of cases it is unsure about to the cloud teacher gives AUC 0.941 at 103 ms average latency. The code is in vrm-edge-triage.
-
Stress-Testing Chest X-ray Vision-Language Models Before Deployment
· 7 min read
Before a medical vision-language model (VLM) reads chest X-rays in a clinical workflow, test it the way it will be used: with more than one prompt, more than one workflow, and more than one metric. In our CHASE 2026 workshop paper we ran CheXagent, MedGemma-4B and MedGemma-27B through 36 configurations on two balanced 50-study cohorts. Exact-match accuracy made conservative models look good. A multi-agent pipeline lifted one model's macro F1 from 0.138 to 0.335 and dropped another's from 0.457 to 0.118. The practical answer is to decide per case whether the extra reasoning is worth it. The code, per-case MIMIC-CXR results and tables are in cxr-vlm-routing.
-
How to Keep Data Lineage When Building EHR Training Datasets
· 9 min read
An EHR training dataset is only as trustworthy as your ability to answer one question for any row in it: which source rows produced this, and what did the model know at that moment? In practice that means giving every raw row an ID at ingest, deriving every output format from a single canonical event layer, storing event time and information-availability time separately, refusing to guess, making builds reproducible by hash, and validating the artifacts you ship against something independent of them. This post walks through each practice, with examples from building EHR2Trace, an open-source converter from hospital EHR exports to OMOP CDM 5.4 and MEDS.