Deathtime before admittime?
In 88 cases, a patient's deathtime in admissions is before their admittime. In general, its within a day, but there's one that's 29 days before.
mimic=# SELECT count(distinct subject_id) FROM admissions WHERE deathtime < admittime;
count 88
The raw data contains those death times. deathtime is directly from the hospital database (with date shifting applied). So any errors there are reflected here -maybe a typo on the month. Most of these differences are small and probably attributable to fuzziness in timing in the discharge/transfer data. Note that some hadm_id are created when a patient becomes an organ donor in order to represent the organ donor account, and so in that case death technically occurred before admission.
Overall, there's a trade-off between how much we pre-process the data versus how much we leave raw (so as to not mislead investigators with unknown preprocessing steps). If we decide there is absolutely no utility in keeping this bad data and we have a foolproof pre-processing method then we will fix it in a future release. For now I'll close this - but your comments are always welcome. Thanks!
some errors in data are expected.