Lipids · LIVE
Framingham 10-year CHD
Framingham CHD
Sum Wilson 1998 sex-specific total-cholesterol point sheets (age, TC, HDL, JNC-V blood pressure, diabetes, smoking) and return the published 10-year CHD percent.
Markdown: /docs/framingham-chd.md · Canonical: https://magentlab.com/docs/framingham-chd
Not a medical device. Not a diagnosis, dose, or listing recommendation.
What it computes
Sum Wilson 1998 sex-specific total-cholesterol point sheets (age, TC, HDL, JNC-V blood pressure, diabetes, smoking) and return the published 10-year CHD percent.
When to use
When an agent has those Wilson 1998 predictors as assigned by the caller and needs the published Figs 3-4 10-year CHD lookup. Not ATP-III 2001 treated-SBP sheets, not pooled-cohort ASCVD, and not a statin order.
When not to use
- Not a medical device. Not a statin order, intensity, or LDL target. magent does not measure lipids or blood pressure and does not diagnose coronary disease.
- Wilson 1998 Figs 3-4 individual point-total lookup is 10-year CHD from that paper (derivation included angina, coronary insufficiency, MI, and coronary death). Hard CHD (MI or coronary death, excluding angina) is printed on the same sheet only as an age-band Framingham average, not a second individual lookup. This tool returns the published point-total 10-year CHD percent.
- Age 30-74 as published. No race coefficient. No ATP-III 2001 / NHLBI treated-versus-untreated SBP sheets. No age×cholesterol interaction points. No later pooled-cohort ASCVD cutoffs.
- Uses the total-cholesterol sheet, not the LDL-C sheet. diabetes and smoker are caller-assigned dichotomous flags; former smoking is smoker=false. Blood pressure uses JNC-V categories; when SBP and DBP stages differ, the higher point value is used.
- Men point totals >=14 map to the published >=53% bound (returned as 53 with ten_year_chd_risk_at_or_above true). Women >=17 map to >=27% (returned as 27).
Formula
Wilson 1998 TC point sheets (Figs 3-4): sex-specific age + total cholesterol + HDL + JNC-V BP (higher of SBP/DBP stage) + diabetes + smoker; men age 30-34 -1, 35-39 0, 40-44 1, 45-49 2, 50-54 3, 55-59 4, 60-64 5, 65-69 6, 70-74 7; men TC <160 -3, 160-199 0, 200-239 1, 240-279 2, >=280 3; men HDL <35 2, 35-44 1, 45-59 0, >=60 -2; men BP optimal/normal 0, high-normal 1, stage I 2, stage II-IV 3; men diabetes 2, smoker 2; women age 30-34 -9, 35-39 -4, 40-44 0, 45-49 3, 50-54 6, 55-59 7, 60-74 8; women TC <160 -2, 160-199 0, 200-239 1, 240-279 1, >=280 3; women HDL <35 5, 35-44 2, 45-49 1, 50-59 0, >=60 -3; women BP optimal -3, normal/high-normal 0, stage I 2, stage II-IV 3; women diabetes 4, smoker 2; 10-year CHD % from the published point-total lookup; age 30-74; no race; not ATP-III
Citation
- Authors
- Wilson PW, D'Agostino RB, Levy D, Belanger AM, Silbershatz H, Kannel WB
- Source
- Circulation. 1998;97(18):1837-1847
Worked example
Lowest-risk 30-year-old man (Wilson 1998 low-risk profile)
Given:
age=30dbp_mm_hg=70diabetes=falsehdl_mg_dl=45sbp_mm_hg=110sex=malesmoker=falsetotal_cholesterol_mg_dl=180
- Male age 30-34 = -1; TC 160-199 = 0; HDL 45-49 = 0; optimal BP = 0; diabetes false = 0; smoker false = 0
- score = -1
- Fig 3 chol-pts <-1 or -1 -> 2% 10-year CHD
Paper Fig 3 example: 55-year-old man, TC 250, HDL 39, 146/88, diabetes
Given:
age=55dbp_mm_hg=88diabetes=truehdl_mg_dl=39sbp_mm_hg=146sex=malesmoker=falsetotal_cholesterol_mg_dl=250
- Age 55 = 4; TC 250 = 2; HDL 39 = 1; stage I BP = 2; diabetes = 2; nonsmoker = 0
- score = 11
- Fig 3 11 points -> 31% 10-year CHD
Also searched as
- Framingham CHD
- Wilson 1998 CHD
- Framingham 10-year CHD
- Framingham coronary risk
- Wilson Framingham score
- 10-year CHD risk
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/framingham_chd?age=30&sex=male&total_cholesterol_mg_dl=180&hdl_mg_dl=45&sbp_mm_hg=110&dbp_mm_hg=70&diabetes=false&smoker=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/framingham_chd?age=30&sex=male&total_cholesterol_mg_dl=180&hdl_mg_dl=45&sbp_mm_hg=110&dbp_mm_hg=70&diabetes=false&smoker=false"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
age |
integer | required | Age in years. Wilson 1998 derivation was ages 30-74; magent accepts that published range only. Sex-specific 5-year point bands from Figs 3-4. |
sex |
string | required · female, male | female or male. Wilson 1998 published separate point sheets. No race coefficient. |
total_cholesterol_mg_dl |
number | required | Total cholesterol in mg/dL (50-500, magent clamp). Wilson 1998 TC bands: <160, 160-199, 200-239, 240-279, >=280. Not the LDL-C sheet. magent does not assay lipids. |
hdl_mg_dl |
number | required | HDL cholesterol in mg/dL (5-150, magent clamp). Wilson 1998 HDL bands: <35, 35-44, 45-49, 50-59, >=60. magent does not assay lipids. |
sbp_mm_hg |
number | required | Systolic blood pressure in mm Hg (70-260, magent clamp). JNC-V categories with diastolic: when SBP and DBP stages differ, use the higher point value (Wilson 1998 Fig 3-4). magent does not measure blood pressure. Not ATP-III treated vs untreated SBP. |
dbp_mm_hg |
number | required | Diastolic blood pressure in mm Hg (40-150, magent clamp). JNC-V: <80 optimal, 80-84 normal, 85-89 high-normal, 90-99 stage I, >=100 stage II-IV. magent does not measure blood pressure. |
diabetes |
boolean | required | Diabetes as assigned by the caller (Wilson 1998 dichotomous). true is 2 points in men and 4 points in women. magent does not assay glucose. |
smoker |
boolean | required | Current cigarette smoking as assigned by the caller (Wilson 1998 dichotomous). true is 2 points in both sexes. Former smoking is false. magent does not take a smoking history. |
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": "30",
"dbp_mm_hg": "70",
"diabetes": "false",
"hdl_mg_dl": "45",
"sbp_mm_hg": "110",
"sex": "male",
"smoker": "false",
"total_cholesterol_mg_dl": "180"
},
{
"age": "30",
"dbp_mm_hg": "70",
"diabetes": "false",
"hdl_mg_dl": "45",
"sbp_mm_hg": "110",
"sex": "male",
"smoker": "false",
"total_cholesterol_mg_dl": "180"
}
]
}
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/framingham_chd",
"items": [
{
"components": [
{
"band": "30-34",
"value": 30,
"factor": "age",
"points": -1,
"present": true
},
{
"band": "160-199",
"value": 180.0,
"factor": "total_cholesterol",
"points": 0,
"present": true
},
{
"band": "45-59",
"value": 45.0,
"factor": "hdl",
"points": 0,
"present": true
},
{
"value": "optimal",
"factor": "blood_pressure",
"points": 0,
"present": true
},
{
"factor": "diabetes",
"points": 0,
"present": false
},
{
"factor": "smoker",
"points": 0,
"present": 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.",
"age_years": 30,
"citation": {
"authors": "Wilson PW, D'Agostino RB, Levy D, Belanger AM, Silbershatz H, Kannel WB",
"doi": "10.1161/01.CIR.97.18.1837",
"id": "wilson-1998",
"pmid": "9603539",
"source": "Circulation. 1998;97(18):1837-1847",
"title": "Prediction of coronary heart disease using risk factor categories"
},
"formula": "framingham_chd",
"formula_expression": "Wilson 1998 TC point sheets (Figs 3-4): sex-specific age + total cholesterol + HDL + JNC-V BP (higher of SBP/DBP stage) + diabetes + smoker; men age 30-34 -1, 35-39 0, 40-44 1, 45-49 2, 50-54 3, 55-59 4, 60-64 5, 65-69 6, 70-74 7; men TC <160 -3, 160-199 0, 200-239 1, 240-279 2, >=280 3; men HDL <35 2, 35-44 1, 45-59 0, >=60 -2; men BP optimal/normal 0, high-normal 1, stage I 2, stage II-IV 3; men diabetes 2, smoker 2; women age 30-34 -9, 35-39 -4, 40-44 0, 45-49 3, 50-54 6, 55-59 7, 60-74 8; women TC <160 -2, 160-199 0, 200-239 1, 240-279 1, >=280 3; women HDL <35 5, 35-44 2, 45-49 1, 50-59 0, >=60 -3; women BP optimal -3, normal/high-normal 0, stage I 2, stage II-IV 3; women diabetes 4, smoker 2; 10-year CHD % from the published point-total lookup; age 30-74; no race; not ATP-III",
"max_score": 19,
"score": -1,
"sex": "male",
"diabetes": false,
"hdl_mg_dl": 45.0,
"age_band": "30-34",
"blood_pressure_category": "optimal",
"cholesterol_band": "160-199",
"dbp_mm_hg": 70.0,
"hdl_band": "45-59",
"sbp_mm_hg": 110.0,
"smoker": false,
"ten_year_chd_risk_at_or_above": false,
"ten_year_chd_risk_percent": 2,
"total_cholesterol_mg_dl": 180.0
},
{
"components": [
{
"band": "30-34",
"value": 30,
"factor": "age",
"points": -1,
"present": true
},
{
"band": "160-199",
"value": 180.0,
"factor": "total_cholesterol",
"points": 0,
"present": true
},
{
"band": "45-59",
"value": 45.0,
"factor": "hdl",
"points": 0,
"present": true
},
{
"value": "optimal",
"factor": "blood_pressure",
"points": 0,
"present": true
},
{
"factor": "diabetes",
"points": 0,
"present": false
},
{
"factor": "smoker",
"points": 0,
"present": 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.",
"age_years": 30,
"citation": {
"authors": "Wilson PW, D'Agostino RB, Levy D, Belanger AM, Silbershatz H, Kannel WB",
"doi": "10.1161/01.CIR.97.18.1837",
"id": "wilson-1998",
"pmid": "9603539",
"source": "Circulation. 1998;97(18):1837-1847",
"title": "Prediction of coronary heart disease using risk factor categories"
},
"formula": "framingham_chd",
"formula_expression": "Wilson 1998 TC point sheets (Figs 3-4): sex-specific age + total cholesterol + HDL + JNC-V BP (higher of SBP/DBP stage) + diabetes + smoker; men age 30-34 -1, 35-39 0, 40-44 1, 45-49 2, 50-54 3, 55-59 4, 60-64 5, 65-69 6, 70-74 7; men TC <160 -3, 160-199 0, 200-239 1, 240-279 2, >=280 3; men HDL <35 2, 35-44 1, 45-59 0, >=60 -2; men BP optimal/normal 0, high-normal 1, stage I 2, stage II-IV 3; men diabetes 2, smoker 2; women age 30-34 -9, 35-39 -4, 40-44 0, 45-49 3, 50-54 6, 55-59 7, 60-74 8; women TC <160 -2, 160-199 0, 200-239 1, 240-279 1, >=280 3; women HDL <35 5, 35-44 2, 45-49 1, 50-59 0, >=60 -3; women BP optimal -3, normal/high-normal 0, stage I 2, stage II-IV 3; women diabetes 4, smoker 2; 10-year CHD % from the published point-total lookup; age 30-74; no race; not ATP-III",
"max_score": 19,
"score": -1,
"sex": "male",
"diabetes": false,
"hdl_mg_dl": 45.0,
"age_band": "30-34",
"blood_pressure_category": "optimal",
"cholesterol_band": "160-199",
"dbp_mm_hg": 70.0,
"hdl_band": "45-59",
"sbp_mm_hg": 110.0,
"smoker": false,
"ten_year_chd_risk_at_or_above": false,
"ten_year_chd_risk_percent": 2,
"total_cholesterol_mg_dl": 180.0
}
]
}
Response
| Field | Type | Description |
|---|---|---|
formula |
string | framingham_chd |
formula_expression |
string | Wilson 1998 Figs 3-4 TC point sheets |
sex |
string | female or male used |
age_years |
integer | Age in years used (30-74) |
age_band |
string | Wilson 1998 5-year age band |
total_cholesterol_mg_dl |
number | Input total cholesterol in mg/dL |
cholesterol_band |
string | Wilson 1998 TC band used for points |
hdl_mg_dl |
number | Input HDL cholesterol in mg/dL |
hdl_band |
string | Wilson 1998 HDL band used for points |
sbp_mm_hg |
number | Input systolic BP in mm Hg |
dbp_mm_hg |
number | Input diastolic BP in mm Hg |
blood_pressure_category |
string | JNC-V category after taking the higher of SBP and DBP stages |
diabetes |
boolean | Caller-assigned diabetes flag used |
smoker |
boolean | Caller-assigned current-smoker flag used |
score |
integer | Wilson 1998 TC-sheet point total |
max_score |
integer | 19 in men, 25 in women (sum of each sheet's highest cell) |
ten_year_chd_risk_percent |
integer | Published 10-year CHD percent from the point-total lookup (Figs 3-4 Step 8). Men >=14 maps to 53; women >=17 maps to 27. |
ten_year_chd_risk_at_or_above |
boolean | true when the sheet prints a >= bound (men >=14 or women >=17) |
components |
array | Per-factor Wilson 1998 points |
citation |
object | Wilson et al. Circulation 1998 citation |
disclaimer |
string | Not-a-device notice |
Example JSON
Machine form of the same example. Frozen fixture. Not a live lookup.
{
"components": [
{
"band": "30-34",
"value": 30,
"factor": "age",
"points": -1,
"present": true
},
{
"band": "160-199",
"value": 180.0,
"factor": "total_cholesterol",
"points": 0,
"present": true
},
{
"band": "45-59",
"value": 45.0,
"factor": "hdl",
"points": 0,
"present": true
},
{
"value": "optimal",
"factor": "blood_pressure",
"points": 0,
"present": true
},
{
"factor": "diabetes",
"points": 0,
"present": false
},
{
"factor": "smoker",
"points": 0,
"present": 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.",
"age_years": 30,
"citation": {
"authors": "Wilson PW, D'Agostino RB, Levy D, Belanger AM, Silbershatz H, Kannel WB",
"doi": "10.1161/01.CIR.97.18.1837",
"id": "wilson-1998",
"pmid": "9603539",
"source": "Circulation. 1998;97(18):1837-1847",
"title": "Prediction of coronary heart disease using risk factor categories"
},
"formula": "framingham_chd",
"formula_expression": "Wilson 1998 TC point sheets (Figs 3-4): sex-specific age + total cholesterol + HDL + JNC-V BP (higher of SBP/DBP stage) + diabetes + smoker; men age 30-34 -1, 35-39 0, 40-44 1, 45-49 2, 50-54 3, 55-59 4, 60-64 5, 65-69 6, 70-74 7; men TC <160 -3, 160-199 0, 200-239 1, 240-279 2, >=280 3; men HDL <35 2, 35-44 1, 45-59 0, >=60 -2; men BP optimal/normal 0, high-normal 1, stage I 2, stage II-IV 3; men diabetes 2, smoker 2; women age 30-34 -9, 35-39 -4, 40-44 0, 45-49 3, 50-54 6, 55-59 7, 60-74 8; women TC <160 -2, 160-199 0, 200-239 1, 240-279 1, >=280 3; women HDL <35 5, 35-44 2, 45-49 1, 50-59 0, >=60 -3; women BP optimal -3, normal/high-normal 0, stage I 2, stage II-IV 3; women diabetes 4, smoker 2; 10-year CHD % from the published point-total lookup; age 30-74; no race; not ATP-III",
"max_score": 19,
"score": -1,
"sex": "male",
"diabetes": false,
"hdl_mg_dl": 45.0,
"age_band": "30-34",
"blood_pressure_category": "optimal",
"cholesterol_band": "160-199",
"dbp_mm_hg": 70.0,
"hdl_band": "45-59",
"sbp_mm_hg": 110.0,
"smoker": false,
"ten_year_chd_risk_at_or_above": false,
"ten_year_chd_risk_percent": 2,
"total_cholesterol_mg_dl": 180.0
}
Client errors (HTTP 400)
Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_framingham_chd |
Framingham CHD inputs must match Wilson 1998 sex-specific age, lipids, blood pressure, diabetes, and smoking categories from that paper. 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
- Friedewald LDL-C — Estimate LDL-C from total cholesterol, HDL, and triglycerides using Friedewald 1972.
- Sampson LDL-C — Estimate LDL-C from total cholesterol, HDL, and triglycerides using Sampson 2020.
- Dutch FH — Apply the Nordestgaard 2013 Table 1 Dutch Lipid Clinic Network score from caller-supplied LDL cholesterol plus family, clinical, physical, and DNA flags, and return the 0–26 score and definite, probable, possible, or unlikely classification. Not a diagnosis.
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.