Skip to content

Commit db23715

Browse files
docs(mimic-iv): add transfers-after-deathtime audit query
Give researchers a concrete count for the #1945 pattern. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent c58897a commit db23715

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
-- Count hospital transfers whose intime falls after admissions.deathtime.
2+
-- Illustrates the #1945 ADT-lag pattern (not a stay_id join failure).
3+
4+
SELECT
5+
COUNT(*) AS transfer_rows_after_deathtime,
6+
COUNT(DISTINCT t.hadm_id) AS admissions_affected
7+
FROM hosp.transfers AS t
8+
INNER JOIN hosp.admissions AS a
9+
ON t.hadm_id = a.hadm_id
10+
WHERE a.deathtime IS NOT NULL
11+
AND t.intime > a.deathtime;

0 commit comments

Comments
 (0)