# Framingham 10-year CHD

Framingham CHD

Status: LIVE
Price: $0.005 USDC
`GET /api/calc/framingham_chd`
HTML: https://magentlab.com/docs/framingham-chd
Markdown: https://magentlab.com/docs/framingham-chd.md

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

[Prediction of coronary heart disease using risk factor categories](https://doi.org/10.1161/01.CIR.97.18.1837)
Wilson PW, D'Agostino RB, Levy D, Belanger AM, Silbershatz H, Kannel WB
Circulation. 1998;97(18):1837-1847
DOI: [10.1161/01.CIR.97.18.1837](https://doi.org/10.1161/01.CIR.97.18.1837)

## Worked example

### Lowest-risk 30-year-old man (Wilson 1998 low-risk profile)

Given: `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`

1. Male age 30-34 = -1; TC 160-199 = 0; HDL 45-49 = 0; optimal BP = 0; diabetes false = 0; smoker false = 0
2. score = -1
3. 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=55, dbp_mm_hg=88, diabetes=true, hdl_mg_dl=39, sbp_mm_hg=146, sex=male, smoker=false, total_cholesterol_mg_dl=250`

1. Age 55 = 4; TC 250 = 2; HDL 39 = 1; stage I BP = 2; diabetes = 2; nonsmoker = 0
2. score = 11
3. 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

## Parameters

- `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 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.

Method: `POST /api/calc/framingham_chd`
Max items: 25
Price: unit_amount + extra_item_amount * (n - 1) (unit 5000 atomic, extra 2000 atomic)
Status: PREVIEW

- 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:

```json
{
  "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"
    }
  ]
}
```

Human paywall (two-item fixture): https://api.magentlab.com/paywall/bulk/framingham-chd

Example 200:

```json
{
  "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.",
      "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,
      "age_years": 30,
      "sex": "male",
      "diabetes": false,
      "hdl_mg_dl": 45.0,
      "total_cholesterol_mg_dl": 180.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
    },
    {
      "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.",
      "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,
      "age_years": 30,
      "sex": "male",
      "diabetes": false,
      "hdl_mg_dl": 45.0,
      "total_cholesterol_mg_dl": 180.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
    }
  ]
}
```

## Response fields

- `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

Frozen fixture. Not a live lookup.

```json
{
  "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.",
  "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,
  "age_years": 30,
  "sex": "male",
  "diabetes": false,
  "hdl_mg_dl": 45.0,
  "total_cholesterol_mg_dl": 180.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
}
```

## Errors

- HTTP 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.
- HTTP 400 `invalid_items`: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.
- HTTP 400 `invalid_item_count`: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.
- HTTP 400 `invalid_item`: each items entry must be a JSON object Returned before settlement; you are not charged.

Shared HTTP 402 and 503: https://magentlab.com/docs/payments

## Related tools

- [Friedewald LDL-C](https://magentlab.com/docs/friedewald) — Estimate LDL-C from total cholesterol, HDL, and triglycerides using Friedewald 1972.
- [Sampson LDL-C](https://magentlab.com/docs/sampson) — Estimate LDL-C from total cholesterol, HDL, and triglycerides using Sampson 2020.
- [Dutch FH](https://magentlab.com/docs/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.

- GET the tool with Accept: application/json (do not send Accept: text/html unless you want the human paywall).
- HTTP 402 means you have not paid. Decode the base64 PAYMENT-REQUIRED header. HTTP 503 is not a new quote.
- Sign accepts[0] (exact, EIP-3009) with validBefore = now + maxTimeoutSeconds (600 seconds), or accepts[1] (batch-settlement deposit/voucher) on product GET. Ping and POST {items} stay exact. Magent retries transient facilitator 429/5xx before answering.
- Retry the same URL with PAYMENT-SIGNATURE (base64 JSON of accepted and payload). Magent attaches canonical extensions.bazaar on CDP verify/settle; echoing 402 bazaar is optional.
- Success is HTTP 200 JSON plus PAYMENT-RESPONSE. exact settles before the tool. batch-settlement verifies (and deposit-settles) before the tool and commits the charge after HTTP 2xx. HTTP 503: retry the same PAYMENT-SIGNATURE. Mint a new exact nonce only after a new HTTP 402.

- offered `exact` on eip155:8453: Fixed-price USDC on Base. The buyer authorizes the advertised amount (EIP-3009). magent settles before the tool runs (paymentFlow upfront). extra.assetTransferMethod=eip3009 extra.paymentFlow=upfront.
- offered `batch-settlement` on eip155:8453: Payment-channel vouchers claimed later in batches. Exact stays accepts[0]. Same-path POST {items} is still exact. extra.assetTransferMethod=eip3009 extra.paymentFlow=authorization.

- not offered `upto`: Not offered. Usage-based: buyer authorizes a ceiling, seller settles the actual amount after work. Reserved for a future metered tool. Not for current calculators or code search.

Same-path POST {items} is still scheme exact: one EIP-3009 authorization for GET unit plus $0.002 per extra item. That is not x402 batch-settlement (payment channels / vouchers).

Shared HTTP 402 and 503 table: https://magentlab.com/docs/payments

Stdio MCP (one process per host): https://magentlab.com/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.
