Skip to content

Commit b3da107

Browse files
committed
add itemid which indicates negative culture
1 parent 8fca62b commit b3da107

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

mimic-iv/concepts/sepsis/suspicion_of_infection.sql

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,13 @@ WITH ab_tbl AS
2727
, CAST(MAX(chartdate) AS DATE) AS chartdate
2828
, MAX(charttime) AS charttime
2929
, MAX(spec_type_desc) AS spec_type_desc
30-
, max(case when org_name is not null and org_name != '' then 1 else 0 end) as PositiveCulture
30+
-- identify negative cultures as NULL organism or a specific itemid saying "NEGATIVE"
31+
, MAX(
32+
CASE WHEN org_name IS NOT NULL
33+
AND org_itemid != 90856
34+
AND org_name != ''
35+
THEN 1 ELSE 0
36+
END) as PositiveCulture
3137
from `physionet-data.mimiciv_hosp.microbiologyevents`
3238
group by micro_specimen_id
3339
)

0 commit comments

Comments
 (0)