Skip to content

fix(mimic-iv): filter lab concepts by expected valueuom - #2141

Closed
chessing234 wants to merge 3 commits into
MIT-LCP:mainfrom
chessing234:fix/lab-valueuom-filtering
Closed

chessing234 wants to merge 3 commits into
MIT-LCP:mainfrom
chessing234:fix/lab-valueuom-filtering

Conversation

@chessing234

@chessing234 chessing234 commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

closing this: on the public MIMIC-IV 2.2 demo, main's actual CBC query returns 2,748 non-null MCHC measurements; this PR returns 1,543. the unit filter drops all 1,205 measurements labeled %, so the recorded unit alone is not a sufficient basis for this change.

the comparison used the actual main and PR DuckDB queries in an ai-assisted check. a replacement needs data-backed unit handling rather than discarding these rows.

refs #1922

@chessing234
chessing234 force-pushed the fix/lab-valueuom-filtering branch from 65d2451 to 00c5a77 Compare August 5, 2026 10:33
Itemid 51249 is sometimes recorded with valueuom '%' in labevents.
Keep only g/dL values when building the derived MCHC column.
Itemid 50889 rows with missing valueuom are excluded; mg/L is the
expected unit for C-reactive protein in hosp.labevents.

Fixes MIT-LCP#1922
@chessing234
chessing234 force-pushed the fix/lab-valueuom-filtering branch from 00c5a77 to 53303c7 Compare August 9, 2026 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant