A few months ago, our clinical data engineering team almost popped champagne over an apparent breakthrough. We were building an observational intensive care pipeline, evaluating whether a specialized inpatient consult ordered during an ICU stay improved 28-day survival.
We ran our initial cohort extraction query, joined the consult order tables against the patient stays, grouped the population into an "ever received" cohort versus an "unexposed" cohort, and computed a 2x2 contingency table. The numbers stopped everyone in their tracks: patients who received the consult showed an unadjusted relative risk of mortality around 0.60. A 40% reduction in mortality risk.
Before drafting a summary for clinical leadership, we did a sanity check on event timestamps. That was when the illusion collapsed.
To receive the consult, a patient had to survive long enough for a clinician to evaluate them, enter the order, and have the specialist arrive at the bedside.…