Primary care · kidney damage · family doctors
1 in 7 people with diabetes or high blood pressure have signs of kidney damage hiding behind a normal blood test. 19 in 20 of them have never been told.
Every morning, this tool reads a family doctor's list, finds those people, and prepares the next test, ready to sign. The computer does the checking. The doctor decides.
The problem, from one patient's side
Meet Amparo. Nothing hurts. Nothing looks wrong.
Amparo is 69, with type 2 diabetes and high blood pressure. Her blood test says her kidneys filter well, so her results are called "acceptable".
But a urine test found albumin, a protein that should not be there. That is often the first sign that diabetes and high blood pressure are damaging the kidneys. A second high result came in a letter from her private insurer and was typed into a note, where no filter looks.
Her record has no kidney diagnosis. She is not on the blood-pressure medicine that also protects the kidneys. The warning sign is hiding behind a normal blood test.
Amparo is made up: she is patient 251 in our synthetic demo. The numbers below are real.
Amparo's record
- Type 2 diabetes, then high blood pressure
- Urine albumin 85 mg/g normal is under 30
- Blood test eGFR 68 "acceptable"
- Note: insurer's report, urine albumin 110 mg/g only in free text
- No kidney diagnosis · metformin only · appointment at 10:20
How many people are like Amparo
Measured on the US national health survey (NHANES, CDC)
That is about 10.6 million US adults, an undercount, since a third of people had no lab result. The same gap exists in Spain: 54 % of kidney disease in 5,009 adults with type 2 diabetes in Spanish primary care was undiagnosed, "mainly in patients with isolated eGFR or uACR abnormalities" (DIAMOND2, 2026).
Why it matters
There is a clear next step. It just doesn't happen.
- Albumin in the urine predicts a higher risk of death, independently of the kidney blood test (105,872 people, 14 population studies; Matsushita et al., Lancet 2010).
- The international kidney guideline: "We recommend that treatment with an ACEi or an ARB be initiated in patients with diabetes, hypertension, and albuminuria" (KDIGO 2022, Rec. 1.2.1).
- But one urine test is not a diagnosis: about half of high results are high again on a second sample 10 days later. So the right first step is simple: repeat the urine test.
Why it gets missed
Attention, not knowledge
The blood test is the number most people read as "the kidney result", and it looks fine. The urine result sits elsewhere in the record, sometimes only in a note or a letter, and goes out of date quietly.
No one has time to check every chart, every morning.
What we built
Three steps. The doctor makes every decision.
It reads the list
Every morning, it checks everyone with diabetes or high blood pressure with rules from kidney guidelines (KDIGO, Valencian primary-care protocol), signed by the project's physician. A small open AI model also reads the notes for results typed there; the code checks every sentence it points to.
It prepares the next step
For each person it finds: the test order, one line for the notes and a date to review the result, with the reason, the number and the date.
The doctor signs
One click to sign, or "no" with a reason. If a test is already ordered or was repeated recently, the person is not listed again.
docs/diagram/build.mjs; the numbers are read from the committed results.Evidence · pre-registered protocol, reproducible
What we measured, and how
The kidney rules were signed before we touched any real data. We wrote the evaluation plan down first, then ran the unchanged rules on public CDC survey data.
| Question | Result | How |
|---|---|---|
| How many kidney warning signs does a blood-test-only filter find? | 48 % | Filter "eGFR under 60" on NHANES 2021–2023 adults with diabetes or high blood pressure (481 per 1,000; 445–517). The other 52 % are the people like Amparo; the tool prepares a repeat urine test for each of them. |
| When the tool asks for a repeat urine test, how often is it confirmed? | 52 % | NHANES 2009–2010, the only cycle with a second urine sample (524 per 1,000; 441–606; n = 360). Not flagged but high on the second sample: 13.5 per 1,000. |
| Do we read the CDC files the way the CDC does? | 7 of 8 | Figures in the CDC's own analytic note reproduced exactly. The eighth is explained in the results file. |
Limits: single visits (a kidney diagnosis needs 3 months); self-reported diagnoses; a third of people had no lab result; US data, while the tool is designed for Spanish primary care. The note reader, tested on real published case reports, found an ACR result in 5 of 21 real case reports that state one, and read none of their values; Amparo's note is synthetic. Full protocol, results and code: docs/EVAL_PROTOCOL.md, eval/results/.
pip install -r requirements-eval.txt
python3 eval/nhanes/fetch.py # public CDC files, pinned by SHA-256
python3 eval/nhanes/run.py # engine on NHANES → eval/results/nhanes.md
python3 eval/nhanes/people.py # awareness, treatment → eval/results/nhanes_people.md
Who benefits, and who could be harmed
Honest about what it can and can't do
Who benefits
- People like Amparo: a kidney problem found while it can still be slowed.
- Family doctors: the checking is done before the clinic opens.
Who could be harmed
- Extra tests: about half of repeat orders come back normal.
- False reassurance: not on the list is not "cleared"; it only sees the record.
- Wrong setting: the numbers are from the US.