Skip to content

Commit

Permalink
use specimen data to filter to art samples
Browse files Browse the repository at this point in the history
  • Loading branch information
alistairewj committed Dec 15, 2021
1 parent e5a607d commit bb81017
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mimic-iv/concepts/postgres/firstday/first_day_bg_art.sql
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ select
FROM mimic_icu.icustays ie
LEFT JOIN mimic_derived.bg bg
ON ie.subject_id = bg.subject_id
AND bg.specimen_pred = 'ART.'
AND bg.specimen = 'ART.'
AND bg.charttime >= DATETIME_SUB(ie.intime, INTERVAL '6' HOUR)
AND bg.charttime <= DATETIME_ADD(ie.intime, INTERVAL '1' DAY)
GROUP BY ie.subject_id, ie.stay_id
Expand Down

0 comments on commit bb81017

Please sign in to comment.