Repository navigation
Conversation
Pooled, regionally calibrated equations of Tangri 2016 (JAMA 315(2):164-174, eAppendix 2). The calibration is chosen with the new KfreRegion enum; there is no default region. Raises for eGFR >= 60 mL/min/1.73m2 and below 18 years. Sources are recorded as secondary in docs/references.md; the 8-variable equation is left out until its baseline survival is verified. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FRmBkrQr7JTBUtBsFF52Hs
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.
Summary
Adds the 4-variable Kidney Failure Risk Equation (Tangri 2016, JAMA 315(2):164-174, eAppendix 2).
renal.kfre_2_year/renal.kfre_5_year(egfr, acr, age, gender, region, *, rounded=False)— risk in percent, ACR in mg/gKfreRegion.NORTH_AMERICA/NON_NORTH_AMERICAinconstants.py(re-exported from the package root); no default regionFormulaInforecordsKFRE_2_YEAR/KFRE_5_YEARinformulas.FORMULAStests/test_kfre.py; README, CHANGELOG, CLAUDE.md,docs/references.mdupdatedDecisions to review
ValueErrorfor eGFR >= 60 mL/min/1.73m² and below 18 years.Noneif that is too loose.digits=2is an assumption; no published convention was found.Test plan
PYTHONPATH=src pyteston Python 3.13 (587 passed, doctests included)ruff check,ruff formaton the changed Python filestoxmatrix (py311/py312/pypy311,check) — not run locally, left to CIExpected test values were calculated independently of the library with
bc.Generated by Claude Code