80trust / 100
Calc Prevent
by magent in Security & trust
x402 APIPassing, checked 3 h ago
Khan 2024 AHA PREVENT base 10-year total CVD percent (ASCVD plus heart failure) for age 30-79 from sex, lipids, treated systolic BP, diabetes, smoking, eGFR, BMI, antihypertensive, and statin. Sex-specific, race-free Table S12 coefficients. Not 30-year, not ASCVD-only, not HF-only, not 2013 PCE, not SCORE2, not a diagnosis or statin order. magent does not assay lipids.
GET https://api.magentlab.com/api/calc/prevent
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 162 ms typical, 241 ms slowest 5%
- Last check
- 3 h ago
- Next check
- any minute now
How to call it
# See the payment challenge (nothing is charged)
curl -i -X GET "https://api.magentlab.com/api/calc/prevent?age=50&antihypertensive=true&bmi_kg_m2=35&diabetes=false&egfr_ml_min_1_73m2=90&hdl_mg_dl=55&sbp_mm_hg=160&sex=female&smoker=false&statin=false&total_cholesterol_mg_dl=240"import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client().register(
"eip155:8453",
new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.magentlab.com%2Fapi%2Fcalc%2Fprevent
const res = await pay("https://api.magentlab.com/api/calc/prevent?age=50&antihypertensive=true&bmi_kg_m2=35&diabetes=false&egfr_ml_min_1_73m2=90&hdl_mg_dl=55&sbp_mm_hg=160&sex=female&smoker=false&statin=false&total_cholesterol_mg_dl=240");
console.log(await res.json());Example input
{
"age": 50,
"antihypertensive": true,
"bmi_kg_m2": 35,
"diabetes": false,
"egfr_ml_min_1_73m2": 90,
"hdl_mg_dl": 55,
"sbp_mm_hg": 160,
"sex": "female",
"smoker": false,
"statin": false,
"total_cholesterol_mg_dl": 240
}Example output
{
"age": 50,
"antihypertensive": true,
"bmi_kg_m2": 35,
"citation": {
"authors": "Khan SS, Matsushita K, Sang Y, Ballew SH, Grams ME, Surapaneni A, et al.; Chronic Kidney Disease Prognosis Consortium and the AHA Cardiovascular-Kidney-Metabolic Science Advisory Group",
"doi": "10.1161/CIRCULATIONAHA.123.067626",
"id": "khan-2024-prevent",
"pmid": "37947085",
"source": "Circulation. 2024;149(6):430-449",
"title": "Development and Validation of the American Heart Association’s PREVENT Equations"
},
"diabetes": false,
"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.",
"egfr_ml_min_1_73m2": 90,
"formula": "prevent",
"formula_expression": "10-year total CVD % = 100*exp(lp)/(1+exp(lp)); Khan 2024 Supplement Table S12 base 10-year total CVD (ASCVD+HF) only; sex-specific race-free; age 30-79; cage=(age-55)/10; mg/dL*0.02586 to mmol/L; cnhdl=(TC-HDL)*0.02586-3.5; chdl=(HDL*0.02586-1.3)/0.3; sbp_lt110=(min(SBP,110)-110)/20; sbp_ge110=(max(SBP,110)-130)/20; egfr_lt60=(min(eGFR,60)-60)/-15; egfr_ge60=(max(eGFR,60)-90)/-15; BMI spline printed at 30 with S12 total-CVD betas 0; women lp=-3.307728+0.7939329*cage+0.0305239*cnhdl-0.1606857*chdl-0.2394003*sbp_lt110+0.3600781*sbp_ge110+0.8667604*dm+0.5360739*smoke+0.6045917*egfr_lt60+0.0433769*egfr_ge60+0.3151672*antihtn-0.1477655*statin-0.0663612*sbp_ge110*antihtn+0.1197879*cnhdl*statin-0.0819715*cage*cnhdl+0.0306769*cage*chdl-0.0946348*cage*sbp_ge110-0.27057*cage*dm-0.078715*cage*smoke-0.1637806*cage*egfr_lt60; men lp=-3.031168+0.7688528*cage+0.0736174*cnhdl-0.0954431*chdl-0.4347345*sbp_lt110+0.3362658*sbp_ge110+0.7692857*dm+0.4386871*smoke+0.5378979*egfr_lt60+0.0164827*egfr_ge60+0.288879*antihtn-0.1337349*statin-0.0475924*sbp_ge110*antihtn+0.150273*cnhdl*statin-0.0517874*cage*cnhdl+0.0191169*cage*chdl-0.1049477*cage*sbp_ge110-0.2251948*cage*dm-0.0895067*cage*smoke-0.1543702*cage*egfr_lt60; not 30-year; not ASCVD-only; not HF-only; not HbA1c/UACR/SDI add-ons; not 2013 PCE; not SCORE2",
"hdl_mg_dl": 55,
"linear_predictor": -2.8579,
"sbp_mm_hg": 160,
"sex": "female",
"smoker": false,
"statin": false,
"ten_year_cvd_percent": 5.4,
"total_cholesterol_mg_dl": 240
}Security scan
- No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 3 h ago | Passed | 402 | 162 ms | $0.005 |
| 8 h ago | Passed | 402 | 139 ms | $0.005 |
| 11 h ago | Passed | 402 | 152 ms | $0.005 |
| 15 h ago | Passed | 402 | 139 ms | $0.005 |
| 18 h ago | Passed | 402 | 241 ms | $0.005 |
| 21 h ago | Passed | 402 | 177 ms | $0.005 |
| 27 h ago | Passed | 402 | 456 ms | $0.005 |