fix(mimic-iv): do not treat CANCELLED cultures as positive - #2120
Conversation
suspicion_of_infection marked any non-empty org_name as positiveculture except NEGATIVE (90856). CANCELLED (90760) is not organism growth; exclude it (and the CANCELLED label) so positive_culture stays accurate. Fixes MIT-LCP#1677
Chessing234
left a comment
There was a problem hiding this comment.
yeah treating CANCELLED as growth was pretty misleading for soi. excluding 90760 and the org_name string both seems fine (belt and suspenders). only thing i'd double-check is whether any other org_itemids are similarly non-organism (contaminated/etc) — not blocking, just curious.
|
excluding cancelled cultures is overdue. worth noting in a comment next to the filter so future edits don't reintroduce them. |
Chessing234
left a comment
There was a problem hiding this comment.
good catch — cancelled cultures aren't growth. covering itemid 90760 and org_name 'CANCELLED' in all three dialects is the right shape. maybe add a one-line comment near the CASE that 90760 is the cancelled organism itemid so the next reader doesn't have to dig microbiologyevents for it.
Summary
org_itemid90760 (CANCELLED) frompositivecultureinsuspicion_of_infection.sqlorg_name = 'CANCELLED'Test plan
positive_culture = 0positive_culture = 1positiveculturetreated any non-NULL, non-emptyorg_nameas positive except NEGATIVE (90856). CANCELLED cultures (org_itemid90760) are not microbial growth, but were counted as positive and could inflatepositive_cultureon the suspicion-of-infection table. Exclude CANCELLED the same way NEGATIVE is excluded.Fixes #1677