Kidney · LIVE
IgA nephropathy 5-year risk
IgAN predict
Compute 5-year risk of a 50% decline in eGFR or ESKD after kidney biopsy from the Barbour 2019 full International IgAN prediction model that does not use race or ethnicity.
Markdown: /docs/igan-predict.md · Canonical: https://magentlab.com/docs/igan-predict
Not a medical device. Not a diagnosis, dose, or listing recommendation.
What it computes
Compute 5-year risk of a 50% decline in eGFR or ESKD after kidney biopsy from the Barbour 2019 full International IgAN prediction model that does not use race or ethnicity.
When to use
When an agent already has age at biopsy, a caller-supplied eGFR, MAP, proteinuria in g/day, Oxford MEST scores, and whether RAS blockade and immunosuppression were in use at biopsy, and needs that paper's race-free 5-year risk. Not a biopsy diagnosis, not KFRE, and not the race/ethnicity model.
When not to use
- Not a medical device. Not a biopsy diagnosis, immunosuppression order, or RAS-blockade order. magent does not assay creatinine or urine protein and does not compute CKD-EPI eGFR.
- Barbour 2019 full model without race/ethnicity only (eTable 3). Does not ship the full model that includes Chinese, Japanese, White, or other race coefficients.
- Not KFRE and not a 50% eGFR-decline or ESKD diagnosis. Emits a 5-year percent, not a named risk class. Table 3 percentile bands are cohort-specific and are not returned.
- Derivation was adults 18 years or older with biopsy-proven idiopathic IgAN and without ESKD at biopsy. Age 18-120 is a magent adult clamp. Caller supplies eGFR.
- Predictors are at the time of biopsy, including RAS blockade and immunosuppression already in use. The model is not a treatment-response predictor for drugs started after biopsy.
Formula
LP = -0.320*(sqrt(egfr_ml_min_1_73m2) - 8.8) + 0.002*(map_mm_hg - 97) - 0.035*(ln(proteinuria_g_day) - 0.09) + 0.004*(map_mm_hg*ln(proteinuria_g_day) - 8.73) + 0.201*M1 - 0.035*E1 + 0.084*S1 + 0.700*T1 + 1.237*T2 + 0.101*T1*ln(proteinuria_g_day) - 0.321*T2*ln(proteinuria_g_day) - 0.017*(age_years - 38) + 0.118*RASB + 0.166*RASB*ln(proteinuria_g_day) - 0.266*immunosuppression; S0(t) = 1.0003754 - 0.1131641*u^2 + 0.0964763*u^2*ln(u), u = (t + 0.1)/100, t months; 5-year risk = 1 - S0(60)^exp(LP); Barbour 2019 eTable 3 full model without race/ethnicity only; M/E/S/T1/T2 RASB and immunosuppression are 0 or 1; natural log; caller supplies eGFR; not the race model; not KFRE
Citation
- Authors
- Barbour SJ, Coppo R, Zhang H, Liu ZH, Suzuki Y, Matsuzaki K, Katafuchi R, Er L, Espino-Hernandez G, Kim SJ, Reich HN, Cattran DC, Feehally J; International IgA Nephropathy Network
- Source
- JAMA Intern Med. 2019;179(7):942-952
Worked example
Age 38, eGFR 77, MAP 97, proteinuria 1.1 g/day, M1 E0 S1 T0, RASB, no immunosuppression
Given:
age_years=38egfr_ml_min_1_73m2=77immunosuppression_at_biopsy=falsemap_mm_hg=97mest_e=0mest_m=1mest_s=1mest_t=0proteinuria_g_day=1.1rasb_at_biopsy=true
- ln(1.1) = 0.0953101798
- eGFR term = -0.320 * (sqrt(77) - 8.8) = 0.0080113960
- MAP term = 0.002 * (97 - 97) = 0
- proteinuria term = -0.035 * (0.0953101798 - 0.09) = -0.0001858563
- MAP×proteinuria term = 0.004 * (97*0.0953101798 - 8.73) = 0.0020603498
- M1 = 0.201; E1 = 0; S1 = 0.084; T1 = T2 = 0
- age term = -0.017 * (38 - 38) = 0
- RASB = 0.118; RASB×proteinuria = 0.166 * 0.0953101798 = 0.0158214898; immunosuppression = 0
- LP = 0.42870738 → 0.4287
- S0(60) from eTable 3 S0(t) → 0.94176
- 5-year = 1 - S0(60)^exp(LP) → 8.8%
Also searched as
- IgA nephropathy risk
- IgAN prediction
- Barbour 2019 IgAN
- International IgAN prediction
- MEST IgAN risk
- IgA nephropathy ESKD risk
- 50 percent eGFR decline IgAN
Try
Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.
Full URL: https://api.magentlab.com/api/calc/igan_predict?age_years=38&egfr_ml_min_1_73m2=77&map_mm_hg=97&proteinuria_g_day=1.1&mest_m=1&mest_e=0&mest_s=1&mest_t=0&rasb_at_biopsy=true&immunosuppression_at_biopsy=false
Call
Expect HTTP 402 until you retry with PAYMENT-SIGNATURE. Incomplete query params
return HTTP 400 before any quote or charge.
curl -i -H "Accept: application/json" "https://api.magentlab.com/api/calc/igan_predict?age_years=38&egfr_ml_min_1_73m2=77&map_mm_hg=97&proteinuria_g_day=1.1&mest_m=1&mest_e=0&mest_s=1&mest_t=0&rasb_at_biopsy=true&immunosuppression_at_biopsy=false"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
age_years |
integer | required | Age at biopsy in years (integer 18-120). Barbour 2019 derivation was adults 18 years or older. Enters the linear predictor as age_years - 38. |
egfr_ml_min_1_73m2 |
number | required | Caller-supplied eGFR in mL/min/1.73 m2 (5-200). Enters as sqrt(eGFR) centered at 8.8. Derivation used CKD-EPI and excluded ESKD at biopsy. magent does not compute CKD-EPI and does not assay creatinine. |
map_mm_hg |
number | required | Mean arterial pressure at biopsy in mm Hg (30-180). Enters centered at 97 and in the proteinuria×MAP interaction. |
proteinuria_g_day |
number | required | Proteinuria at biopsy in g/day (0.01-20). Enters as natural log, centered at 0.09, plus interactions with MAP, T, and RASB. magent does not assay urine protein. |
mest_m |
integer | required · 0, 1 | Oxford MEST mesangial hypercellularity at biopsy. 0 = M0, 1 = M1. magent does not score the biopsy. |
mest_e |
integer | required · 0, 1 | Oxford MEST endocapillary hypercellularity at biopsy. 0 = E0, 1 = E1. magent does not score the biopsy. |
mest_s |
integer | required · 0, 1 | Oxford MEST segmental sclerosis at biopsy. 0 = S0, 1 = S1. magent does not score the biopsy. |
mest_t |
integer | required · 0, 1, 2 | Oxford MEST tubular atrophy/interstitial fibrosis at biopsy. 0 = T0, 1 = T1, 2 = T2. T1 and T2 have main-effect and proteinuria-interaction terms. magent does not score the biopsy. |
rasb_at_biopsy |
boolean | required | true if renin-angiotensin system blockade (ACE inhibitor or ARB) was in use at biopsy. Enters as 1 or 0 plus a RASB×proteinuria term. magent does not prescribe RAS blockade. |
immunosuppression_at_biopsy |
boolean | required | true if immunosuppression was in use at biopsy. Enters as 1 or 0. magent does not prescribe immunosuppression. |
Bulk (POST)
POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement.
- 1 to 25 items. Each item uses the same keys as the GET query parameters.
- POST of 1 item costs the same as GET. Lists longer than 25: chunk into multiple POSTs. Extra items still execute; do not pad dummy rows.
- The first invalid item fails the whole request (index in the 400 JSON). You are not charged.
- HTTP 200 is {count, path, items}. Each items[i] is the GET 200 body for that row.
- Catalog misses (empty matches, found=false) stay paid 200s inside that slot.
- x402 resource URL is this path plus n and body_sha256. Browsers that prefer text/html get the same paywall as GET; Pay retries POST with the same items.
Example request (fixture)
{
"items": [
{
"age_years": "38",
"egfr_ml_min_1_73m2": "77",
"immunosuppression_at_biopsy": "false",
"map_mm_hg": "97",
"mest_e": "0",
"mest_m": "1",
"mest_s": "1",
"mest_t": "0",
"proteinuria_g_day": "1.1",
"rasb_at_biopsy": "true"
},
{
"age_years": "38",
"egfr_ml_min_1_73m2": "77",
"immunosuppression_at_biopsy": "false",
"map_mm_hg": "97",
"mest_e": "0",
"mest_m": "1",
"mest_s": "1",
"mest_t": "0",
"proteinuria_g_day": "1.1",
"rasb_at_biopsy": "true"
}
]
}
Opens a two-item fixture on the API host. Unpaid browsers get the same MetaMask paywall as GET; Pay retries POST with those items.
Example 200 (fixture)
{
"count": 2,
"path": "/api/calc/igan_predict",
"items": [
{
"disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
"citation": {
"authors": "Barbour SJ, Coppo R, Zhang H, Liu ZH, Suzuki Y, Matsuzaki K, Katafuchi R, Er L, Espino-Hernandez G, Kim SJ, Reich HN, Cattran DC, Feehally J; International IgA Nephropathy Network",
"doi": "10.1001/jamainternmed.2019.0600",
"id": "barbour-2019-igan",
"pmid": "30980653",
"source": "JAMA Intern Med. 2019;179(7):942-952",
"title": "Evaluating a new international risk-prediction tool in IgA nephropathy"
},
"formula": "igan_predict",
"formula_expression": "LP = -0.320*(sqrt(egfr_ml_min_1_73m2) - 8.8) + 0.002*(map_mm_hg - 97) - 0.035*(ln(proteinuria_g_day) - 0.09) + 0.004*(map_mm_hg*ln(proteinuria_g_day) - 8.73) + 0.201*M1 - 0.035*E1 + 0.084*S1 + 0.700*T1 + 1.237*T2 + 0.101*T1*ln(proteinuria_g_day) - 0.321*T2*ln(proteinuria_g_day) - 0.017*(age_years - 38) + 0.118*RASB + 0.166*RASB*ln(proteinuria_g_day) - 0.266*immunosuppression; S0(t) = 1.0003754 - 0.1131641*u^2 + 0.0964763*u^2*ln(u), u = (t + 0.1)/100, t months; 5-year risk = 1 - S0(60)^exp(LP); Barbour 2019 eTable 3 full model without race/ethnicity only; M/E/S/T1/T2 RASB and immunosuppression are 0 or 1; natural log; caller supplies eGFR; not the race model; not KFRE",
"age_years": 38,
"linear_predictor": 0.4287,
"egfr_ml_min_1_73m2": 77.0,
"map_mm_hg": 97.0,
"five_year_risk_percent": 8.8,
"horizon_months": 60,
"immunosuppression_at_biopsy": false,
"mest_e": 0,
"mest_m": 1,
"mest_s": 1,
"mest_t": 0,
"proteinuria_g_day": 1.1,
"rasb_at_biopsy": true,
"s0_5_year": 0.94176
},
{
"disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
"citation": {
"authors": "Barbour SJ, Coppo R, Zhang H, Liu ZH, Suzuki Y, Matsuzaki K, Katafuchi R, Er L, Espino-Hernandez G, Kim SJ, Reich HN, Cattran DC, Feehally J; International IgA Nephropathy Network",
"doi": "10.1001/jamainternmed.2019.0600",
"id": "barbour-2019-igan",
"pmid": "30980653",
"source": "JAMA Intern Med. 2019;179(7):942-952",
"title": "Evaluating a new international risk-prediction tool in IgA nephropathy"
},
"formula": "igan_predict",
"formula_expression": "LP = -0.320*(sqrt(egfr_ml_min_1_73m2) - 8.8) + 0.002*(map_mm_hg - 97) - 0.035*(ln(proteinuria_g_day) - 0.09) + 0.004*(map_mm_hg*ln(proteinuria_g_day) - 8.73) + 0.201*M1 - 0.035*E1 + 0.084*S1 + 0.700*T1 + 1.237*T2 + 0.101*T1*ln(proteinuria_g_day) - 0.321*T2*ln(proteinuria_g_day) - 0.017*(age_years - 38) + 0.118*RASB + 0.166*RASB*ln(proteinuria_g_day) - 0.266*immunosuppression; S0(t) = 1.0003754 - 0.1131641*u^2 + 0.0964763*u^2*ln(u), u = (t + 0.1)/100, t months; 5-year risk = 1 - S0(60)^exp(LP); Barbour 2019 eTable 3 full model without race/ethnicity only; M/E/S/T1/T2 RASB and immunosuppression are 0 or 1; natural log; caller supplies eGFR; not the race model; not KFRE",
"age_years": 38,
"linear_predictor": 0.4287,
"egfr_ml_min_1_73m2": 77.0,
"map_mm_hg": 97.0,
"five_year_risk_percent": 8.8,
"horizon_months": 60,
"immunosuppression_at_biopsy": false,
"mest_e": 0,
"mest_m": 1,
"mest_s": 1,
"mest_t": 0,
"proteinuria_g_day": 1.1,
"rasb_at_biopsy": true,
"s0_5_year": 0.94176
}
]
}
Response
| Field | Type | Description |
|---|---|---|
formula |
string | igan_predict |
formula_expression |
string | Barbour 2019 eTable 3 race-free full-model LP and S0(t) |
age_years |
integer | Age at biopsy in years used (18-120) |
egfr_ml_min_1_73m2 |
number | Caller-supplied eGFR used, mL/min/1.73 m2 |
map_mm_hg |
number | MAP at biopsy used, mm Hg |
proteinuria_g_day |
number | Proteinuria at biopsy used, g/day |
mest_m |
integer | Oxford M 0 or 1 used |
mest_e |
integer | Oxford E 0 or 1 used |
mest_s |
integer | Oxford S 0 or 1 used |
mest_t |
integer | Oxford T 0, 1, or 2 used |
rasb_at_biopsy |
boolean | RAS blockade at biopsy flag used |
immunosuppression_at_biopsy |
boolean | Immunosuppression at biopsy flag used |
linear_predictor |
number | Barbour 2019 race-free full-model centered LP, 4 decimals |
five_year_risk_percent |
number | 5-year risk of 50% eGFR decline or ESKD, 1 decimal (1 - S0(60)^exp(LP)) |
s0_5_year |
number | Barbour 2019 race-free S0 at 60 months, 5 decimals |
horizon_months |
integer | Prediction horizon in months (60) |
citation |
object | Barbour et al. JAMA Intern Med 2019 citation |
disclaimer |
string | Not-a-device notice |
Example JSON
Machine form of the same example. Frozen fixture. Not a live lookup.
{
"disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
"citation": {
"authors": "Barbour SJ, Coppo R, Zhang H, Liu ZH, Suzuki Y, Matsuzaki K, Katafuchi R, Er L, Espino-Hernandez G, Kim SJ, Reich HN, Cattran DC, Feehally J; International IgA Nephropathy Network",
"doi": "10.1001/jamainternmed.2019.0600",
"id": "barbour-2019-igan",
"pmid": "30980653",
"source": "JAMA Intern Med. 2019;179(7):942-952",
"title": "Evaluating a new international risk-prediction tool in IgA nephropathy"
},
"formula": "igan_predict",
"formula_expression": "LP = -0.320*(sqrt(egfr_ml_min_1_73m2) - 8.8) + 0.002*(map_mm_hg - 97) - 0.035*(ln(proteinuria_g_day) - 0.09) + 0.004*(map_mm_hg*ln(proteinuria_g_day) - 8.73) + 0.201*M1 - 0.035*E1 + 0.084*S1 + 0.700*T1 + 1.237*T2 + 0.101*T1*ln(proteinuria_g_day) - 0.321*T2*ln(proteinuria_g_day) - 0.017*(age_years - 38) + 0.118*RASB + 0.166*RASB*ln(proteinuria_g_day) - 0.266*immunosuppression; S0(t) = 1.0003754 - 0.1131641*u^2 + 0.0964763*u^2*ln(u), u = (t + 0.1)/100, t months; 5-year risk = 1 - S0(60)^exp(LP); Barbour 2019 eTable 3 full model without race/ethnicity only; M/E/S/T1/T2 RASB and immunosuppression are 0 or 1; natural log; caller supplies eGFR; not the race model; not KFRE",
"age_years": 38,
"linear_predictor": 0.4287,
"egfr_ml_min_1_73m2": 77.0,
"map_mm_hg": 97.0,
"five_year_risk_percent": 8.8,
"horizon_months": 60,
"immunosuppression_at_biopsy": false,
"mest_e": 0,
"mest_m": 1,
"mest_s": 1,
"mest_t": 0,
"proteinuria_g_day": 1.1,
"rasb_at_biopsy": true,
"s0_5_year": 0.94176
}
Client errors (HTTP 400)
Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_igan |
IgAN prediction needs eGFR, MAP, proteinuria, age, MEST, RASB, and immunosuppression as in Barbour 2019 without race. Returned before settlement; you are not charged. |
| 400 | invalid_age |
age must be an integer from 18 to 120 Returned before settlement; you are not charged. |
| 400 | invalid_egfr |
egfr_ml_min_1_73m2 must be a number from 5 to 200 (caller-assigned eGFR; magent does not compute MDRD or CKD-EPI). Returned before settlement; you are not charged. |
| 400 | invalid_map_mm_hg |
map_mm_hg must be a number from 30 to 180. Returned before settlement; you are not charged. |
| 400 | invalid_proteinuria_g_day |
proteinuria_g_day must be a positive number in g/day. Returned before settlement; you are not charged. |
| 400 | invalid_mest |
Oxford MEST M/E/S must be 0 or 1 and T must be 0, 1, or 2. Returned before settlement; you are not charged. |
| 400 | invalid_flag |
boolean clinical flags must be true or false Returned before settlement; you are not charged. |
| 400 | invalid_items |
POST body must be a JSON object with only an items array Returned before settlement; you are not charged. |
| 400 | invalid_item_count |
items must be an array of 1 to 25 objects Returned before settlement; you are not charged. |
| 400 | invalid_item |
each items entry must be a JSON object Returned before settlement; you are not charged. |
Related tools
- KFRE — Compute 2-year and 5-year risk of kidney failure (dialysis or preemptive transplant) from the Tangri 2011 4-variable Kidney Failure Risk Equation (age, sex, eGFR, urine ACR).
- CKD-EPI 2021 eGFR — Compute race-free CKD-EPI 2021 creatinine eGFR in mL/min/1.73m2.
- KeGFR — Compute Chen 2013 kinetic eGFR (KeGFR) from two plasma creatinines, the hours between them, a caller-assigned steady-state creatinine and corresponding eGFR/CrCl, and MaxΔPCr/Day. magent does not compute MDRD or CKD-EPI.
Payment
Unpaid requests return HTTP 402 even if query parameters or POST items are missing or invalid, so CDP and agents can index the path. After a PAYMENT-SIGNATURE, invalid params return HTTP 400 JSON before settlement. magent does not charge. Fix the params, then request a new 402 quote for that complete URL. Catalog misses (empty matches, found=false) are valid paid 200s. Unpaid valid requests return HTTP 402 with a base64
PAYMENT-REQUIRED
header. HTTP 503 is not a new quote: retry the same PAYMENT-SIGNATURE. Full handshake
and shared payment errors: Payments.
Stdio MCP: /docs/mcp.
Guarantees
- HTTP 402 is unpaid, including a missing query. After PAYMENT-SIGNATURE, invalid parameters return HTTP 400 before settlement. You are not charged. HTTP 402 never includes the tool JSON.
- exact: settlement finishes before the tool (paymentFlow upfront). batch-settlement: verify/deposit before the tool; chargedCumulativeAmount commits after HTTP 2xx. Uncertain or failed settlement fails closed (HTTP 503). Retry the same PAYMENT-SIGNATURE.
- HTTP 402 is unpaid only. Do not sign a second authorization because of a 503.
- Execution is timeout-bounded and concurrency-capped.
- Calculator inputs are stored encrypted for allowlisted operators (Magent Console). They are not in public logs, SSH lookups, catalog, or rollups. Request logs store path without query.