Skip to content

Commit 5bc0dc4

Browse files
docs(mimic-iv): sample query for ICU outtime after deathtime
Complement the transfers audit for mortality-window sensitivity (#1945). Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent db23715 commit 5bc0dc4

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
-- ICU stays whose outtime is after the admission deathtime.
2+
3+
SELECT
4+
COUNT(*) AS icustays_out_after_death,
5+
COUNT(*) FILTER (
6+
WHERE ie.outtime > a.deathtime
7+
AND ie.outtime <= a.deathtime + INTERVAL '48 hours'
8+
) AS within_48h
9+
FROM icu.icustays AS ie
10+
INNER JOIN hosp.admissions AS a
11+
ON ie.hadm_id = a.hadm_id
12+
WHERE a.deathtime IS NOT NULL
13+
AND ie.outtime > a.deathtime;

0 commit comments

Comments
 (0)