MIT-LCP/mimic-code

Discharge time before admit time?

Closed this issue · 1 comments

Prerequisites

Description

Description of the issue, including:

  • what you have tried
  • references to similar issues
  • queries demonstrating your question (if applicable)

I was comparing the length of stay in the hospital, and I found 142 cases where timing seems completely messed up for length of stay, as it is a negative value.
Here's a query to find all of the cases:

SELECT hadm_id, stay_length_hours FROM
    (SELECT
        hadm_id,
        EXTRACT(EPOCH FROM (dischtime - admittime)) / 3600 AS stay_length_hours
    FROM
        mimiciv_hosp.admissions) AS subquery
WHERE stay_length_hours <= 0;

One notably interesting case is that of hadm_id 20609236, who was apparently:

  • admitted to the ED at 10:51 AM on 1/31
  • discharged from the ED at 4:03 PM on 1/31
  • admitted to the hospital at 3:08 PM on 1/31
  • discharged (due to death) from the hospital at 3:11 AM on 1/31

I encountered this issue in several data points, example: (subject_id=10049642, hadm_id=26714941). Discharge time is 2177-02-20 02:30:00 while death time is 2177-02-20 20:30:00
I discovered 75 cases so far.