Fix KDIGO Stage 3 hardcoded 3.7 threshold in creatinine check#1987
Open
Chessing234 wants to merge 1 commit intoMIT-LCP:mainfrom
Open
Fix KDIGO Stage 3 hardcoded 3.7 threshold in creatinine check#1987Chessing234 wants to merge 1 commit intoMIT-LCP:mainfrom
Chessing234 wants to merge 1 commit intoMIT-LCP:mainfrom
Conversation
…heck The 48-hour acute rise criterion compared creat_low_past_48hr against the hardcoded value 3.7 (i.e. 4.0 - 0.3), which is only correct when creatinine equals exactly 4.0. Replace with the dynamic expression cr.creat >= (cr.creat_low_past_48hr + 0.3) to correctly evaluate the >=0.3 acute increase for any creatinine value >=4.0. Fixes MIT-LCP#1357
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
The KDIGO AKI Stage 3 criterion for sCr >= 4.0 mg/dL requires evidence of an acute rise: either >= 0.3 mg/dL increase within 48 hours, or >= 1.5x the 7-day baseline. The 48-hour check uses the hardcoded expression
creat_low_past_48hr <= 3.7(i.e.,4.0 - 0.3), which is only correct when the current creatinine equals exactly 4.0.For any creatinine above 4.0, this misclassifies patients. For example, a patient with creatinine = 5.0 and 48h-low = 3.9 has a 1.1 mg/dL acute rise but
3.9 <= 3.7evaluates to FALSE, potentially missing the Stage 3 classification.Root cause
The hardcoded
3.7in the Stage 3 branch ofkdigo_stages.sqlassumes creatinine is always exactly 4.0 at the threshold, rather than using the actual current creatinine value dynamically.Fix
Replace
cr.creat_low_past_48hr <= 3.7withcr.creat >= (cr.creat_low_past_48hr + 0.3), which correctly evaluates the >= 0.3 acute increase criterion for any creatinine value. This matches the pattern already used for Stage 1 (cr.creat >= (cr.creat_low_past_48hr + 0.3)).Fixed in both canonical source files (mimic-iii/concepts and mimic-iv/concepts). The auto-generated postgres/duckdb variants would need regeneration.
Closes #1357