Supporting project P5 · Health services research · Public demo data (MIMIC-IV-ED demo, ODbL)
What 222 emergency stays can teach — when the analysis refuses to pretend it's bigger
A stay-flow audit on the public MIMIC-IV-ED demo: first-vital timing as a *named proxy* (never "doctor wait"), IQR-tails by acuity and arrival mode, length of stay by disposition, and the missing-data texture charted as a first-class deliverable.
What is real and what isn't — on this page
Real
- All figures computed from the authentic PhysioNet demo files (pulled 2026-10-24): edstays, triage, vitalsign.
- Exclusion trail: 222 → 204 analysed (2 negative-proxy edge cases, 16 no-vital stays, 1 >24 h), counts published.
- Aggregates only — no patient-level rows are republished (ODbL-respectful).
- 5 real build mistakes logged, including a caption that contradicted its own data.
Not claimed here
- This is not arrival-to-doctor time — demo triage rows have no timestamps; the proxy is named everywhere.
- No significance tests: n=204 deserves medians and IQRs, not theatre.
- De-identified date shifts → no calendar-season claims; hour bands are relative texture.
- Demo ≠ full MIMIC-IV-ED; nothing here generalises to other hospitals, including Nigerian ones.
00 The two-minute version
Headline: first contact is fast for nearly everyone (median 2.0 min) — but the P75 tail splits cleanly by acuity (150.8 min for acuity-3) and arrival mode (116.5 min for walk-ins), and transfers sit 14.8 h median in the ED.
- Business question
- Where do ED waits actually live — centre or tails — and is the data even complete enough to say?
- Data
- MIMIC-IV-ED demo v2.2 (222 stays; ODbL; PhysioNet). REAL
- Method
- Audit → named proxy (first vital − intake) → documented exclusions → grouped medians/IQR → completeness texture. Descriptive only. REAL
- Result
- Median 2.0 min / P75 71.5; acuity-3 P75 150.8 vs acuity-1 31; walk-in P75 116.5 vs ambulance 64; transfer LOS 14.8 h. REAL (small n)
- Recommendation
- Method: make waits by pathway+tail the review object, not the mean; completeness grades preface any sizing of the problem.
- Limitations
- Demo subset; proxy ≠ clinical wait; no significance claims; de-identified dates.
- Next steps
- Full-database run under PhysioNet credentialing by an authorised collaborator; queue-abandonment module when bed-management fields exist.
01 The problem
Every ED says "patients wait too long"; few can say where the waiting lives — intake, triage, first assessment, treatment, exit — because most can only measure what they can timestamp. Public data has the same disease, so this project builds the honest version of the ED flow audit: a named proxy for first contact, grouped tails instead of meetings-pleasing means, and a completeness grade ahead of any claim.
The demo's 222 stays are a feature, not a bug: at this n, fake statistics die on sight. What survives is the discipline a real audit needs — which is exactly the deliverable.
02 The data
| Item | Detail | Verified | Status / limit |
|---|---|---|---|
| Dataset | MIMIC-IV-ED demo v2.2 — PhysioNet static files | 2026-10-24 | REAL — public demo subset |
| Licence | Open Data Commons Open Database License (ODbL) | project page | Aggregates published; no patient-level rows reused |
| Tables used | edstays (222), triage (222), vitalsign (1,038 readings) | audit prints | diagnosis.pyxis pulled for completeness, not analysed YTD |
| Grain | 1 row per ED stay after join to first-vital time | key-duplicate checks | join coverage 206/222 |
| Dates | de-identified (shifted into the 2120s) | range audit | relative time only; no seasons |
| The proxy | wait = first charted vital − intake (triage table has no timestamps in the demo) | schema inspection | named on every chart and caption |
03 The process
- Inspect what can honestly be measured before promising a metric: the demo triage table carries no timestamps → the proxy is constructed and named (ledger #1).
- Audit battery: key uniqueness, join coverage, negative deltas (genuine edge cases: n=2), range sanity, mix tables for disposition/arrival/acuity.
- Documented exclusions: 222 → 204; every drop is a published count, not a silent filter.
- Small-n etiquette: medians + IQR, n on every bar, floors on what is charted (acuity-4's n=2 stays off the bar chart), zero p-values.
- Completeness as deliverable: vitals/pain/temperature/acuity coverage graded before findings are sized.
- Licence respect: ODbL — only aggregates and chart geometry leave the workspace.
04 What the data showed
05 Data texture — the honesty chart
06 Limitations
- n=204, descriptive only — no significance claims, no transportable effect sizes.
- Proxy ≠ clinical wait: the demo's triage table lacks timestamps; page-wide disclosure holds.
- Demo ≠ MIMIC-IV-ED: nothing here estimates the full dataset.
- De-identified dates kill calendar claims; hour bands are texture only.
- Edge-case exclusions (n=18 total drops) are disclosed, not hidden — and they include genuine data oddities the demo happens to carry.
07 Impact & recommendation
- Review the tails, not the mean: pathway × P75 tables (not averages) are the fair review object.
- Completeness grade first: any ED adopting this audit starts by charting its own missing-data texture.
- Port the discipline: this exact audit runs on a Nigerian register-plus-tally ED within weeks, with local magnitudes replacing demo ones.
Next steps: full-database replication only via a PhysioNet-credentialed collaborator; queue-abandonment module when richer demo fields exist.
08 Tools used
base R (audit, joins, medians/IQR, exclusions trail) · Python/matplotlib (charts) · hand-coded HTML/CSS. AI-assisted with the published 5-entry bug ledger.