feat(modules): add CKD-staging module (eGFR-driven, KDIGO G1-G5) - #46
Merged
Merged
Conversation
Adds a Synthea-style chronic kidney disease module that fires on the Kronik_Bobrek source flag and stages the patient G1-G5 from egfr_latest per KDIGO 2024. Emits a nephrology follow-up Encounter, an eGFR Procedure (always), an ACR reflex Procedure (G3a+, eGFR < 60), a nephrology-referral Procedure (G3b+, eGFR < 45), and a stage-appropriate CarePlan including a nephrotoxic-drug-avoidance activity. Adds CKD_STAGES + ckd_stage_for_egfr() to fhir/codes.py with stage-specific SNOMED CT and ICD-10 N18.1-N18.5 codes, registers CKDModule in the module REGISTRY, and adds 6 tests in test_modules.py. Clinical thresholds (referral stage, ACR trigger, KDIGO cut-points for TR primary care) are flagged for clinician confirmation in the PR. Closes ArioMoniri#17
|
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #46 +/- ##
=======================================
- Coverage 91.1% 91.0% -0.1%
=======================================
Files 38 39 +1
Lines 1551 1602 +51
=======================================
+ Hits 1413 1459 +46
- Misses 138 143 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This was referenced Jun 8, 2026
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.
What
Adds a Synthea-style CKD-staging module (
src/syntha/modules/ckd.py) that fires on theKronik_Bobreksource flag and stages the patient G1–G5 fromegfr_latestper KDIGO 2024.For each CKD-flagged episode it emits:
709044004if eGFR missing)80274001271000000103696004413332001)Also adds
CKD_STAGES+ckd_stage_for_egfr()tofhir/codes.pywith stage-specific SNOMED CT and ICD-10N18.1–N18.5(replacing the genericN18.9when eGFR is present), registersCKDModule()in the moduleREGISTRY, and adds 6 tests intests/test_modules.py.Why
Per COLLABORATE.md / ROADMAP.md v0.6, CKD is a high-prevalence condition with
egfr_latest+creatinine_latestavailable on every source patient but no module yet. Closes #17.Verification
pytest -q→ 108 passed (was 102; +6 new CKD tests)ruff checkclean on all changed filessyntha fhironexamples/sample_output/sample_episodes.csv) passes; CKD eGFR Procedure + CarePlan confirmed present in generated bundlesKronik_Bobrek), so no regressionI implemented the international KDIGO standard; the following are clinical-judgment calls that need a Turkish primary-care clinician's confirmation before merge:
N18.3for both G3a and G3b is acceptable (ICD-10 has no a/b split; SNOMED does, and is used).Happy to adjust any thresholds per your guidance.
Submitted as an invited contributor (@aerenkaradag). The Turkish source cohort behind syntha originates from the Check-Up dataset work.