Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarification on units of measurement #1688

Open
1 task done
kzhangm02 opened this issue Jan 2, 2024 · 1 comment
Open
1 task done

Clarification on units of measurement #1688

kzhangm02 opened this issue Jan 2, 2024 · 1 comment

Comments

@kzhangm02
Copy link

Prerequisites

Description

I'm hoping to receive clarification regarding the units for some specific lab, chart, and input events in the hospital and ICU database. Specifically, for the lab event id 50915 and chart event ids 229360, 227441 there are no conversions between different (seemingly non-equivalent) units of measurements when building the database. How are these events treated? There are also several inputs events (e.g. 225158, 228315, 225975, etc.) with multiple units, such as mg or dose, which are not referenced in the medications folder. Is it fine to assume all inputs are treated as binary events as this seems to be the case for most of the inputs? Thanks!

@heisenbug-1
Copy link

Hi! which MIMIC version do you mean? I'm not an expert, but will try to help
Let's take MIMIC-IV as an example. I'm using a Postgres build.

The itemid 50915 in labevents has 2 unique measurements units:

SELECT valueuom, count(valueuom) AS "unique_measurements"
FROM mimiciv_hosp.labevents
WHERE itemid = 50915
GROUP BY valueuom

The search above outputs the following result:
"ng/mL": 17501
"ng/mL FEU": 4828

I also used itemid 225975 for my research, and I assume 1 dose usually equals to 5000 Units / mL- 1mL Vial. Found it out in the prescriptions table by checking what kind of heparin the hosp_id were prescribed in the prescriptions table.
Something like

FROM mimiciv_hosp.prescriptions
WHERE hadm_id = INSERT_HOSP_ID_HERE
AND lower(drug) LIKE '%heparin%' 

About the itemid 229360, there's no unit in d_items, but maybe you can extract data from lab events (superset of chartevents afaik)

so basically first identify the itemids that are linked to "Eos" and compute their frequency to see ow many patients have a measurement for each itemid

SELECT itemid, COUNT(DISTINCT subject_id) as counts
FROM mimiciv_hosp.labevents
WHERE itemid in (
SELECT DISTINCT  itemid
FROM mimiciv_hosp.d_labitems
WHERE lower(label) LIKE '%eos%')
GROUP BY itemid
ORDER BY counts DESC

then, for each relevant itemid count the frequency of valueuom values in labevents table. I've seen some in %(51200), K/uL(52073) etc.

For itemid 227441 just repeat the process.
There are 2 itemids that are linked to HDL in d_labitems: 50905 and 50906. Both are in mg/dL
You can rewrite the queries into pandas or whatever environment you are using to analyse the data :)
And I apologise in advance if I misunderstood your question.

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

No branches or pull requests

2 participants