← Back to selected work

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.

Completed v1.0 · descriptive only, small n Data: PhysioNet demo subset, ODbL — aggregates published only Proxy disclosed: first charted vital − intake
222 → 204stays → analysed (every drop disclosed)
2.0 minmedian first-vital proxy
71.5 minP75 of the proxy — the tail is the story
150.8 minacuity-3 P75 vs 31 min for acuity-1
14.8 hmedian LOS, transfers (n=5, labelled tiny)
92.8%stays with any charted vitals

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

ItemDetailVerifiedStatus / limit
DatasetMIMIC-IV-ED demo v2.2 — PhysioNet static files2026-10-24REAL — public demo subset
LicenceOpen Data Commons Open Database License (ODbL)project pageAggregates published; no patient-level rows reused
Tables usededstays (222), triage (222), vitalsign (1,038 readings)audit printsdiagnosis.pyxis pulled for completeness, not analysed YTD
Grain1 row per ED stay after join to first-vital timekey-duplicate checksjoin coverage 206/222
Datesde-identified (shifted into the 2120s)range auditrelative time only; no seasons
The proxywait = first charted vital − intake (triage table has no timestamps in the demo)schema inspectionnamed on every chart and caption

03 The process

  1. 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).
  2. Audit battery: key uniqueness, join coverage, negative deltas (genuine edge cases: n=2), range sanity, mix tables for disposition/arrival/acuity.
  3. Documented exclusions: 222 → 204; every drop is a published count, not a silent filter.
  4. 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.
  5. Completeness as deliverable: vitals/pain/temperature/acuity coverage graded before findings are sized.
  6. Licence respect: ODbL — only aggregates and chart geometry leave the workspace.

04 What the data showed

Proxy distribution: median 2 minutes, tailed past 71.5 at P75
So what: the centre is healthy; the tail is the workload problem. Any review built on means alone would call this ED "fast" and miss the hour-plus cohort entirely.
First-vital proxy by triage acuity with IQR whiskers and n labels
So what: touch-time is equitable (~2 min medians), follow-through isn't: acuity-3's P75 (150.8 min) is nearly 5× acuity-1's (31 min). The waiting lives in the mid-acuity queue, not the doors.
Proxy by arrival mode: ambulance P75 64 min, walk-in P75 116.5 min
So what: same median, different worlds: walk-ins' tail is ~2× ambulance's. Arrival mode predicts the tail, not the centre.
Proxy by intake hour band; evening slightly slowest
So what: hour-of-day texture is mild here (evening median 2.5 min) — with de-identified dates, hour bands are reported as relative indices and nothing more.
Length of stay by disposition: transfers 14.8 hours median
So what: transfers (14.8 h median) vs admitted (5.7 h) vs home (7.0 h): the exit pathway, not clinical acuity, dominates stay length at demo scale — the n=5 label stays printed.

05 Data texture — the honesty chart

Completeness: pain 100 percent, acuity 93 percent, temperature 88 percent, any vitals 93 percent
So what: 7.2% of stays carry no charted vitals at all; temperature is missing in 11.7% of triage rows. These gaps bound what any model may claim — so they are charted here, before anything else is believed.

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.