Problem statement

Early Risk Stratification for Chronic Disease

Develop a predictive model that stratifies patients by risk of developing a chronic condition using electronic health records.

Inspiration

Early kidney damage has no symptoms. In our data, the usual kidney blood test looked normal in about 7 of every 10 people with damage. A cheap urine test (ACR) finds it, but a large US study found that only 35% of people with diabetes and 4% with high blood pressure had one within two years, and testing was largely unrelated to risk.

Clinics rarely have the time or budget to reach everyone at once. We wanted to answer one practical question: who should be tested first?

What it does

SilentCKD helps clinics decide who to send for a urine kidney test first, for adults with diabetes or high blood pressure. It does not need a urine result.

  • Check a patient: one direct answer (Likely, Possible or Unlikely), the chance in 100, the reasons in plain language, and questions for the doctor. Change any detail and the answer updates.
  • Clinic list: ranks a whole clinic from a CSV or FHIR health-record file, highlights patients usual practice would skip, and shows how many cases to expect from the tests the clinic can afford.
  • Is it accurate and fair?: every result in plain language, including where it is weak.

If a clinic can test only 1 in 5 patients, SilentCKD's order finds 48 of every 100 cases, compared with 31 when testing people with diabetes first.

It is a prototype and not a medical device.

How we built it

  • Data: CDC NHANES public health survey, adults aged 20+ with diabetes or high blood pressure. The outcome was urine ACR of 30 mg/g or more, and no urine values were used as inputs.
  • Model: XGBoost with 25 routine inputs, plus an 11-input short model for records with many blanks.
  • Safeguards: monotone constraints stop the model learning backwards medicine, such as higher blood pressure lowering risk. Race is not an input, and kidney function uses the race-free 2021 equation.
  • Explanations: exact TreeSHAP runs in the browser and is grouped into plain-language reasons.
  • Testing: developed on 2011-2020 (n = 10,923), tested on 2021-23 (n = 2,583), then tested again on a locked 2007-10 group (n = 2,469).
  • Website: HTML and JavaScript hosted on Cloudflare. Patient files are read in the browser and are not sent to a server by the site's code.
  • Tools: Python, scikit-learn, XGBoost, lifelines and FHIR R4. Claude Code was used as a coding assistant.

Challenges we ran into

We changed the answer rules after seeing test results, which can flatter them. Solution: we disclosed it, froze the model and every rule, and tested people from an earlier survey who had never been used. Results held: 62% vs 65% of Likely answers were right, and 82% vs 81% of cases were caught.

The brief asks about developing disease, but public data has no follow-up urine tests. Solution: we say plainly that SilentCKD finds damage already present, and looked for the closest available long-term evidence. Using linked death records, 10-year deaths per 100 were 58 for Likely, 28 for Possible and 11 for Unlikely. Among people whose urine and blood tests were normal that day, flagged patients had 2.3 times the risk of heart, stroke, diabetes or kidney death after adjusting for age and sex. This is not proof that it predicts new kidney disease.

Real records are messy, and ours were clean survey data. Solution: we built a short model for incomplete records, added FHIR import, and deliberately damaged the data with gaps, rounded numbers and missing diagnoses. AUROC stayed between 0.742 and 0.752. This was a simulation, so testing on real hospital records is still needed.

One cut-off failed younger adults. Solution: a single bar caught only 69 of 100 cases aged 20-44. A lower bar for under-45s catches 95 of 100, from just 42 cases and at the cost of more false alarms. We publish results by age, sex, ethnicity, income and condition, including the weakest groups.

Early versions were full of scientific terms that non-specialists could not follow. Solution: we rebuilt the site around one direct answer and plain reasons, and removed features that did not help the decision.

A complex model has to earn its place. Solution: we compared it with simpler options. It beat logistic regression with the same inputs by 0.026 AUROC. Against our rebuild of the closest published design, the gain was only 0.015 to 0.019, so we report that it is small and focus on what it adds in practice.

Accomplishments that we're proud of

  • Held-out AUROC of 0.754 (0.730-0.778), and 0.749 (0.723-0.774) on the locked test, with calibration slopes of 0.97 and 0.95.
  • Finding 47-48 of every 100 cases by testing 1 in 5 patients, compared with 31 for diabetes first, on both test groups.
  • Catching 59 of 100 cases among people with no diabetes and a normal kidney blood test, the group least likely to be tested.
  • A public website and a project that rebuilds from a clean install with identical models.
  • Publishing where it is weak, not only where it is strong.

What we learned

  • A prediction is only useful if it changes a decision. Ordering who gets tested mattered more than a slightly higher score.
  • Honest testing takes planning. Looking at results once can quietly affect everything after it.
  • Accuracy overall can hide weak groups, so results need checking group by group.
  • A simple model can come close to a complex one, and it is better to measure that than assume otherwise.
  • Clear wording is part of the product. A correct answer that a clinic cannot understand does not help.

What's next for SilentCKD

  1. Clinical review of the answers and workflow by kidney and primary-care doctors.
  2. Validation on a real health system's records, where we expect some drop in accuracy.
  3. A silent run, then a small pilot, with pass marks at each stage.
  4. Following patients over time with repeat urine tests, to learn whether it can predict new kidney disease.
  5. A formal privacy and medical-device review before any clinical use.

Built With

Share this project:

Updates

Submission history