Skip to content

fix: include wbc_max in SIRS WBC missing-data guard - #2146

Open
Chessing234 wants to merge 1 commit into
MIT-LCP:mainfrom
Chessing234:fix/sirs-wbc-max-null-guard
Open

fix: include wbc_max in SIRS WBC missing-data guard#2146
Chessing234 wants to merge 1 commit into
MIT-LCP:mainfrom
Chessing234:fix/sirs-wbc-max-null-guard

Conversation

@Chessing234

Copy link
Copy Markdown
Contributor

Summary

  • SIRS WBC scoring uses wbc_min, wbc_max, and bands_max, but the missing-data arm only checked COALESCE(wbc_min, bands_max).
  • When only wbc_max is present (and normal), the CASE fell through to NULL instead of 0.
  • Update BigQuery, Postgres, and DuckDB copies for MIMIC-III and MIMIC-IV.

Test plan

  • Row with NULL wbc_min/bands_max and present normal wbc_maxwbc_score = 0
  • All three NULL → wbc_score remains NULL
  • Elevated wbc_max / low wbc_min / high bands_max still score 1

Made with Cursor

WBC scoring uses wbc_min, wbc_max, and bands_max, but the null arm only
checked coalesce(wbc_min, bands_max), so a present wbc_max alone yielded
NULL instead of 0. Align the guard across BigQuery, Postgres, and DuckDB.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant