MIT-LCP / MIT-LCP/mimic-code

Implausible values in icu.chartevents and hosp.labevents, MIMIC-IV v3.1

Open Beginner friendly
#2,168 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
3.4k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

Hello,

While building a sepsis early-warning cohort on MIMIC-IV v3.1 I ran a range
audit on 'icu/chartevents.csv.gz' and 'hosp/labevents.csv.gz' and found a small
number of implausible 'valuenum' entries. Volumes are tiny and I assume this is
expected in a near-raw release, but I wanted to flag it in case it's useful —
particularly as it's invisible to anyone who doesn't range-filter before
aggregating.

Heart rate (itemid 220045), counted directly from the raw table — 8,752,069
non-null 'valuenum' rows:

Range Rows Share
≤ 0 3,611 0.0413%
0–20 328 0.0037%
20–250 (plausible) 8,748,069 99.9543%
250–1,000 39 0.0004%
> 1,000 22 0.0003%

Every extreme row carries valueuom = 'bpm', so this isn't a unit-coding issue.
The largest values, each appearing once: 10,000,000 · 5,113,280 · 457,890 ·
152,143 · 118,107 · 102,115 · 102,102 · 86,101 · 11,710 · 11,337 · 10,109 ·
9,086.

Several look consistent with keystroke slips or concatenated digits (102102,
86101). The ≤ 0 group is ambiguous: asystole is a genuine chartable state, and a
disconnected monitor recorded as zero is another possibility — I haven't
established which dominates.

Reproducing the heart-rate figures:

SELECT COUNT(*) FILTER (WHERE valuenum <= 0)  AS nonpositive,
       COUNT(*) FILTER (WHERE valuenum > 250) AS above_250,
       COUNT(*)                               AS total
FROM chartevents WHERE itemid = 220045 AND valuenum IS NOT NULL;

Other variables. These come from a derived hourly grid (adult ICU stays ≥ 6 h,
median-in-bin), so they are not raw row counts and understate full-table
totals. Sources differ: respiratory rate, SpO₂ and temperature are
'icu.chartevents'; WBC, platelets, bilirubin, creatinine and pH are
'hosp.labevents'.

Clearly non-physiological:

  • Respiratory rate (220210): up to 7,000,400 /min
  • SpO₂ (220277): up to 9,765,430%, and negative values (−21, −8)
  • Temperature (223761 °F and 223762 °C, merged and converted to °C): −73.3 °C
    and 130,050 °C
  • pH (50820): 4.6 — arterial pH below roughly 6.8 is not survivable, so unlike
    the extremes below this one cannot be a genuine value

Outside the plausibility bounds we adopted, but plausibly genuine extremes
rather than errors — flagged only for completeness: WBC 479 and 572 ×10³/µL;
platelets 2,360 ×10³/µL; bilirubin 75.6 mg/dL; creatinine 41.5 mg/dL.

Why it may be worth a note in the documentation: The affected fraction is
negligible (~0.001% for HR), but a single 10,000,000 bpm reading is enough to
make a standard deviation meaningless — in our case it inflated the heart-rate
SD to 141 bpm, against an interquartile-based spread estimate of ~18 bpm, which
silently distorted a downstream analysis until we audited the raw values.
Median-based aggregation is robust to this and the 'mimic-code' concepts apply
range filters, so most users are protected. Anyone querying 'chartevents'
directly and computing moments is not.

Would a short "apply plausibility ranges before computing summary statistics"
note in the documentation be welcome? I'm happy to open a PR adding the observed
ranges if that's useful.

Thanks for maintaining the dataset.

Leo Shen
PI/Advisor: Dr. Larry Cheng of Penn State University

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the MIMIC-IV documentation covering icu/chartevents.csv.gz and hosp/labevents.csv.gz, then review the supplied SQL query and range findings. Done means adding a concise note explaining that users should apply plausibility ranges before summary statistics, including the observed examples where appropriate.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
databases, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.