You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am attempting to replicate the demographics table from the MIMIC-IV paper titled “MIMIC-IV, a freely accessible electronic health record dataset, 2023” (https://www.nature.com/articles/s41597-022-01899-x).
I have been successful in duplicating the results for the first two rows, “Number of stays” and “Unique patients”. However, I am encountering difficulties with the remaining rows. Below are the SQL queries I used and the corresponding results for the ICU case:
/* Age. avg: 63.45, std: 17.22 */
SELECT AVG(p.anchor_age) AS average_age, STDDEV(p.anchor_age) AS sd_age, count(*)
FROM mimiciv_hosp.patients p
WHERE p.subject_id IN (
SELECT i.subject_id
FROM mimiciv_icu.icustays i
);
/* LoS: avg: 4.96, std: 7.83 */
select count(*), avg(total_los), stddev(total_los)
from(
SELECT
subject_id,
SUM(los) AS total_los
FROM
mimiciv_icu.icustays
GROUP BY
subject_id
) as hey;
/* In-hospital mortality rate: 6,966 */
select count(*) from mimiciv_hosp.admissions a
where a.hospital_expire_flag =1
and a.hadm_id IN (
SELECT i.hadm_id
FROM mimiciv_icu.icustays i
);
/* One year mortality (this is for hospital admissions): 29,076 */
select count(*) from mimiciv_hosp.patients p
where p.dod is not null;
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am attempting to replicate the demographics table from the MIMIC-IV paper titled “MIMIC-IV, a freely accessible electronic health record dataset, 2023” (https://www.nature.com/articles/s41597-022-01899-x).
I have been successful in duplicating the results for the first two rows, “Number of stays” and “Unique patients”. However, I am encountering difficulties with the remaining rows. Below are the SQL queries I used and the corresponding results for the ICU case:
For the one-year mortality rate, there is a notebook available (https://github.com/MIT-LCP/mimic-code/blob/main/mimic-iv/notebooks/tableone.ipynb) that calculates it. However, when I adapt the datetime function to the SQL version, the count is 11,858, which differs from the figure presented in the paper.
Additionally, I would like to understand what “Female Administrative Gender” signifies in one of the table rows.
Beta Was this translation helpful? Give feedback.
All reactions