Closed shi-ang closed 1 year ago
This might be because you are comparing a date (dod
) with a timestamp (icu_intime
). If someone dies on the same day they are admitted, then it would appear as if they died before being admitted. You could try truncating icu_intime
to the day, and only calculating integer days of death.
I appreciate you reply very much.
However, it is not necessary the case. If you run the SQL code above, you will get the following query results:
For these three patients, the dod
is ahead of icu_intime
by a few years.
And there are more of them in the database...
How many more? We don't "fix" data as a policy, so if it's a few cases, then it's just bad data, but if it's many cases, then it may be a systematic error in a data source or our process.
In total there are 5 cases. So I just dropped them from the dataset.
Got it, yep, good to keep an eye out for these inconsistencies!
but I found 25 cases. The subject ids are [10554954, 11042406, 11660628, 12207593, 12376923, 12393516, 12921133, 13078944, 15018122, 15190414, 15246174, 15831207, 15834858, 16467939, 16533974, 17536748, 17631949, 17906419, 17955142, 18839671, 19107535, 19379644, 19547124, 19752788, 19914761].
The intime in their ICU records is later than their deathtime. I have checked several ICU stays, and there are several output or chart records for these ICU stays.
I also remove them for now.
Thanks.
Prerequisites
Description
Hi,
I found that there are very few patients associated with negative death time from ICU recruitment. This death time from ICU recruitment is calculated by using
icu_intime
minus thedod
from themimic_derived.icustay
file on BigQuerry. I'm wondering if it is the correct way to calculate such a value or if I've made a mistake by assuming theicu_intime
should always happen earlier than thedod
time.The SQL code (for MIMIC-IV v2.0) to reproduce some patients with negative death time on BigQuerry: