# Very high-risk ASCVD (AHA/ACC 2018)

Very high-risk ASCVD (AHA/ACC 2018)

Status: LIVE
Price: $0.005 USDC
`GET /api/calc/ascvd_vhr`
HTML: https://magentlab.com/docs/ascvd-vhr
Markdown: https://magentlab.com/docs/ascvd-vhr.md

Not a medical device. Not a diagnosis, dose, or listing recommendation.

## What it computes

Apply AHA/ACC 2018 Table 4 and return whether known clinical ASCVD is very high-risk from caller-assigned major events and high-risk conditions.

## When to use

When an agent already has known clinical ASCVD and needs the 2018 AHA/ACC Table 4 very-high-risk classifier, and must not use the 2013 PCE, SCORE2, or a statin, ezetimibe, or PCSK9 order.

## When not to use

- Not a medical device. Not a prescription. magent does not diagnose ASCVD or measure ABI or LDL-C.
- Not a statin, ezetimibe, or PCSK9 order. Does not apply Figure 1 LDL-C ≥70 mg/dL treatment thresholds. Does not compute PCE 10-year risk (that is ascvd-pce).
- Very high-risk iff ≥2 major ASCVD events or 1 major event and ≥2 high-risk conditions (Table 4 “multiple”). Zero major events is not very high-risk even with many conditions.
- CKD is the printed eGFR 15–59 mL/min/1.73 m² band as a caller-assigned flag. Flags are caller-supplied. magent does not compute eGFR, assay LDL-C, or measure ABI.

## Formula

```
very_high_risk iff major_event_count ≥ 2 or (major_event_count = 1 and high_risk_condition_count ≥ 2) (AHA/ACC 2018 Table 4 / Figure 1). Major events (caller-assigned): recent ACS within 12 months; history of MI other than that recent ACS; history of ischemic stroke; symptomatic PAD (claudication with ABI <0.85, or prior revascularization or amputation). High-risk conditions: age ≥65 years; heterozygous familial hypercholesterolemia; prior CABG or PCI outside the major ASCVD event(s); diabetes mellitus; hypertension; CKD (eGFR 15–59 mL/min/1.73 m²); current smoking; persistently elevated LDL-C ≥100 mg/dL (≥2.6 mmol/L) despite maximally tolerated statin and ezetimibe; history of congestive HF. Not PCE 10-year risk. Not a statin, ezetimibe, or PCSK9 order. magent does not diagnose ASCVD or measure ABI or LDL-C
```

## Citation

[2018 AHA/ACC/AACVPR/AAPA/ABC/ACPM/ADA/AGS/APhA/ASPC/NLA/PCNA Guideline on the Management of Blood Cholesterol](https://doi.org/10.1161/CIR.0000000000000625)
Grundy SM, Stone NJ, Bailey AL, et al.
Circulation. 2019;139(25):e1082-e1143
DOI: [10.1161/CIR.0000000000000625](https://doi.org/10.1161/CIR.0000000000000625)

## Worked example

### Prior MI, age ≥65, and diabetes

Given: `age=70, ckd_egfr_15_to_59=false, congestive_hf=false, current_smoking=false, diabetes=true, heterozygous_fh=false, history_mi=true, hypertension=false, ischemic_stroke=false, ldl_c_ge_100_on_max_statin_ezetimibe=false, prior_cabg_or_pci_outside_major=false, recent_acs=false, symptomatic_pad=false`

1. history_mi is one major event; recent ACS, ischemic stroke, and symptomatic PAD are false
2. age 70 ≥ 65 and diabetes are two high-risk conditions
3. 1 major event and ≥2 high-risk conditions is very high-risk


### Prior MI and only hypertension

Given: `age=50, ckd_egfr_15_to_59=false, congestive_hf=false, current_smoking=false, diabetes=false, heterozygous_fh=false, history_mi=true, hypertension=true, ischemic_stroke=false, ldl_c_ge_100_on_max_statin_ezetimibe=false, prior_cabg_or_pci_outside_major=false, recent_acs=false, symptomatic_pad=false`

1. history_mi is one major event
2. age 50 is not ≥65; hypertension is the only high-risk condition
3. 1 major event and 1 high-risk condition is not very high-risk


## Also searched as

- very high-risk ASCVD
- AHA ACC 2018 Table 4
- known ASCVD very high risk
- Grundy 2018 cholesterol
- clinical ASCVD very high-risk
- secondary prevention very high-risk
- AHA ACC cholesterol guideline

## Parameters

- `age` (integer, required): Age in years (18-120). ≥65 is an AHA/ACC 2018 Table 4 high-risk condition. magent does not assign age.
- `recent_acs` (boolean, required): Recent ACS within the past 12 months as assigned by the caller (AHA/ACC 2018 Table 4 major ASCVD event). true or false. magent does not date ACS.
- `history_mi` (boolean, required): History of MI other than a caller-assigned recent ACS as assigned by the caller (AHA/ACC 2018 Table 4 major ASCVD event). true or false. magent does not diagnose MI.
- `ischemic_stroke` (boolean, required): History of ischemic stroke as assigned by the caller (AHA/ACC 2018 Table 4 major ASCVD event). true or false. magent does not diagnose stroke.
- `symptomatic_pad` (boolean, required): Symptomatic PAD as assigned by the caller from the Table 4 row (claudication with ABI <0.85, or previous revascularization or amputation). true or false. magent does not measure ABI.
- `heterozygous_fh` (boolean, required): Heterozygous familial hypercholesterolemia as assigned by the caller (AHA/ACC 2018 Table 4 high-risk condition). true or false. magent does not diagnose FH.
- `prior_cabg_or_pci_outside_major` (boolean, required): Prior CABG or PCI outside the major ASCVD event(s) as assigned by the caller (AHA/ACC 2018 Table 4 high-risk condition). true or false. magent does not read an operative note.
- `diabetes` (boolean, required): Diabetes mellitus as assigned by the caller (AHA/ACC 2018 Table 4 high-risk condition). true or false. magent does not diagnose diabetes.
- `hypertension` (boolean, required): Hypertension as assigned by the caller (AHA/ACC 2018 Table 4 high-risk condition). true or false. magent does not measure blood pressure.
- `ckd_egfr_15_to_59` (boolean, required): CKD with eGFR 15–59 mL/min/1.73 m² as assigned by the caller (AHA/ACC 2018 Table 4 printed band). true or false. magent does not compute eGFR.
- `current_smoking` (boolean, required): Current smoking as assigned by the caller (AHA/ACC 2018 Table 4 high-risk condition). true or false. magent does not assign smoking status.
- `ldl_c_ge_100_on_max_statin_ezetimibe` (boolean, required): Persistently elevated LDL-C ≥100 mg/dL (≥2.6 mmol/L) despite maximally tolerated statin and ezetimibe as assigned by the caller (AHA/ACC 2018 Table 4 high-risk condition). true or false. magent does not assay LDL-C.
- `congestive_hf` (boolean, required): History of congestive HF as assigned by the caller (AHA/ACC 2018 Table 4 high-risk condition). true or false. magent does not diagnose HF.

## 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/ascvd_vhr`
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": "70",
      "ckd_egfr_15_to_59": "false",
      "congestive_hf": "false",
      "current_smoking": "false",
      "diabetes": "true",
      "heterozygous_fh": "false",
      "history_mi": "true",
      "hypertension": "false",
      "ischemic_stroke": "false",
      "ldl_c_ge_100_on_max_statin_ezetimibe": "false",
      "prior_cabg_or_pci_outside_major": "false",
      "recent_acs": "false",
      "symptomatic_pad": "false"
    },
    {
      "age": "70",
      "ckd_egfr_15_to_59": "false",
      "congestive_hf": "false",
      "current_smoking": "false",
      "diabetes": "true",
      "heterozygous_fh": "false",
      "history_mi": "true",
      "hypertension": "false",
      "ischemic_stroke": "false",
      "ldl_c_ge_100_on_max_statin_ezetimibe": "false",
      "prior_cabg_or_pci_outside_major": "false",
      "recent_acs": "false",
      "symptomatic_pad": "false"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/ascvd_vhr",
  "items": [
    {
      "age": 70,
      "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": "Grundy SM, Stone NJ, Bailey AL, et al.",
        "doi": "10.1161/CIR.0000000000000625",
        "id": "grundy-2018-aha-acc-cholesterol",
        "pmid": "30586774",
        "source": "Circulation. 2019;139(25):e1082-e1143",
        "title": "2018 AHA/ACC/AACVPR/AAPA/ABC/ACPM/ADA/AGS/APhA/ASPC/NLA/PCNA Guideline on the Management of Blood Cholesterol"
      },
      "formula": "ascvd_vhr",
      "formula_expression": "very_high_risk iff major_event_count ≥ 2 or (major_event_count = 1 and high_risk_condition_count ≥ 2) (AHA/ACC 2018 Table 4 / Figure 1). Major events (caller-assigned): recent ACS within 12 months; history of MI other than that recent ACS; history of ischemic stroke; symptomatic PAD (claudication with ABI <0.85, or prior revascularization or amputation). High-risk conditions: age ≥65 years; heterozygous familial hypercholesterolemia; prior CABG or PCI outside the major ASCVD event(s); diabetes mellitus; hypertension; CKD (eGFR 15–59 mL/min/1.73 m²); current smoking; persistently elevated LDL-C ≥100 mg/dL (≥2.6 mmol/L) despite maximally tolerated statin and ezetimibe; history of congestive HF. Not PCE 10-year risk. Not a statin, ezetimibe, or PCSK9 order. magent does not diagnose ASCVD or measure ABI or LDL-C",
      "criteria": [
        {
          "factor": "recent_acs",
          "met": false
        },
        {
          "factor": "history_mi",
          "met": true
        },
        {
          "factor": "ischemic_stroke",
          "met": false
        },
        {
          "factor": "symptomatic_pad",
          "met": false
        },
        {
          "value": 70,
          "factor": "age_ge_65",
          "met": true
        },
        {
          "factor": "heterozygous_fh",
          "met": false
        },
        {
          "factor": "prior_cabg_or_pci_outside_major",
          "met": false
        },
        {
          "factor": "diabetes",
          "met": true
        },
        {
          "factor": "hypertension",
          "met": false
        },
        {
          "factor": "ckd_egfr_15_to_59",
          "met": false
        },
        {
          "factor": "current_smoking",
          "met": false
        },
        {
          "factor": "ldl_c_ge_100_on_max_statin_ezetimibe",
          "met": false
        },
        {
          "factor": "congestive_hf",
          "met": false
        }
      ],
      "classifying_rule": "one_major_and_multiple_high_risk_conditions",
      "high_risk_condition_count": 2,
      "major_event_count": 1,
      "very_high_risk": true
    },
    {
      "age": 70,
      "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": "Grundy SM, Stone NJ, Bailey AL, et al.",
        "doi": "10.1161/CIR.0000000000000625",
        "id": "grundy-2018-aha-acc-cholesterol",
        "pmid": "30586774",
        "source": "Circulation. 2019;139(25):e1082-e1143",
        "title": "2018 AHA/ACC/AACVPR/AAPA/ABC/ACPM/ADA/AGS/APhA/ASPC/NLA/PCNA Guideline on the Management of Blood Cholesterol"
      },
      "formula": "ascvd_vhr",
      "formula_expression": "very_high_risk iff major_event_count ≥ 2 or (major_event_count = 1 and high_risk_condition_count ≥ 2) (AHA/ACC 2018 Table 4 / Figure 1). Major events (caller-assigned): recent ACS within 12 months; history of MI other than that recent ACS; history of ischemic stroke; symptomatic PAD (claudication with ABI <0.85, or prior revascularization or amputation). High-risk conditions: age ≥65 years; heterozygous familial hypercholesterolemia; prior CABG or PCI outside the major ASCVD event(s); diabetes mellitus; hypertension; CKD (eGFR 15–59 mL/min/1.73 m²); current smoking; persistently elevated LDL-C ≥100 mg/dL (≥2.6 mmol/L) despite maximally tolerated statin and ezetimibe; history of congestive HF. Not PCE 10-year risk. Not a statin, ezetimibe, or PCSK9 order. magent does not diagnose ASCVD or measure ABI or LDL-C",
      "criteria": [
        {
          "factor": "recent_acs",
          "met": false
        },
        {
          "factor": "history_mi",
          "met": true
        },
        {
          "factor": "ischemic_stroke",
          "met": false
        },
        {
          "factor": "symptomatic_pad",
          "met": false
        },
        {
          "value": 70,
          "factor": "age_ge_65",
          "met": true
        },
        {
          "factor": "heterozygous_fh",
          "met": false
        },
        {
          "factor": "prior_cabg_or_pci_outside_major",
          "met": false
        },
        {
          "factor": "diabetes",
          "met": true
        },
        {
          "factor": "hypertension",
          "met": false
        },
        {
          "factor": "ckd_egfr_15_to_59",
          "met": false
        },
        {
          "factor": "current_smoking",
          "met": false
        },
        {
          "factor": "ldl_c_ge_100_on_max_statin_ezetimibe",
          "met": false
        },
        {
          "factor": "congestive_hf",
          "met": false
        }
      ],
      "classifying_rule": "one_major_and_multiple_high_risk_conditions",
      "high_risk_condition_count": 2,
      "major_event_count": 1,
      "very_high_risk": true
    }
  ]
}
```

## Response fields

- `formula` (string): ascvd_vhr
- `formula_expression` (string): AHA/ACC 2018 Table 4 very high-risk classifier
- `age` (integer): Age in years used for the ≥65 condition
- `very_high_risk` (boolean): true iff ≥2 major events or exactly 1 major event and ≥2 high-risk conditions. Not a treatment order.
- `major_event_count` (integer): Count of the four Table 4 major ASCVD events that are true
- `high_risk_condition_count` (integer): Count of Table 4 high-risk conditions, including age ≥65 when met. Still reported when ≥2 majors already classify.
- `classifying_rule` (string): two_or_more_major_events, one_major_and_multiple_high_risk_conditions, or not_very_high_risk
- `criteria` (array): Per-factor rows for the four major events, age_ge_65 (with age value), and eight high-risk flags
- `citation` (object): Grundy 2018 Circulation citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "age": 70,
  "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": "Grundy SM, Stone NJ, Bailey AL, et al.",
    "doi": "10.1161/CIR.0000000000000625",
    "id": "grundy-2018-aha-acc-cholesterol",
    "pmid": "30586774",
    "source": "Circulation. 2019;139(25):e1082-e1143",
    "title": "2018 AHA/ACC/AACVPR/AAPA/ABC/ACPM/ADA/AGS/APhA/ASPC/NLA/PCNA Guideline on the Management of Blood Cholesterol"
  },
  "formula": "ascvd_vhr",
  "formula_expression": "very_high_risk iff major_event_count ≥ 2 or (major_event_count = 1 and high_risk_condition_count ≥ 2) (AHA/ACC 2018 Table 4 / Figure 1). Major events (caller-assigned): recent ACS within 12 months; history of MI other than that recent ACS; history of ischemic stroke; symptomatic PAD (claudication with ABI <0.85, or prior revascularization or amputation). High-risk conditions: age ≥65 years; heterozygous familial hypercholesterolemia; prior CABG or PCI outside the major ASCVD event(s); diabetes mellitus; hypertension; CKD (eGFR 15–59 mL/min/1.73 m²); current smoking; persistently elevated LDL-C ≥100 mg/dL (≥2.6 mmol/L) despite maximally tolerated statin and ezetimibe; history of congestive HF. Not PCE 10-year risk. Not a statin, ezetimibe, or PCSK9 order. magent does not diagnose ASCVD or measure ABI or LDL-C",
  "criteria": [
    {
      "factor": "recent_acs",
      "met": false
    },
    {
      "factor": "history_mi",
      "met": true
    },
    {
      "factor": "ischemic_stroke",
      "met": false
    },
    {
      "factor": "symptomatic_pad",
      "met": false
    },
    {
      "value": 70,
      "factor": "age_ge_65",
      "met": true
    },
    {
      "factor": "heterozygous_fh",
      "met": false
    },
    {
      "factor": "prior_cabg_or_pci_outside_major",
      "met": false
    },
    {
      "factor": "diabetes",
      "met": true
    },
    {
      "factor": "hypertension",
      "met": false
    },
    {
      "factor": "ckd_egfr_15_to_59",
      "met": false
    },
    {
      "factor": "current_smoking",
      "met": false
    },
    {
      "factor": "ldl_c_ge_100_on_max_statin_ezetimibe",
      "met": false
    },
    {
      "factor": "congestive_hf",
      "met": false
    }
  ],
  "classifying_rule": "one_major_and_multiple_high_risk_conditions",
  "high_risk_condition_count": 2,
  "major_event_count": 1,
  "very_high_risk": true
}
```

## Errors

- HTTP 400 `invalid_ascvd_vhr`: Very high-risk ASCVD inputs must match AHA/ACC 2018 major ASCVD events and high-risk conditions. 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

- [2013 PCE 10-year ASCVD](https://magentlab.com/docs/ascvd-pce) — Compute the Goff 2013 pooled-cohort 10-year hard ASCVD percent (first hard CHD or stroke) for adults aged 40-79 from Table A sex- and cohort-specific coefficients.
- [SCORE2 10-year CVD risk](https://magentlab.com/docs/score2) — Compute the ESC 2021 SCORE2 10-year fatal plus non-fatal CVD percent for adults aged 40-69 from sex, current smoking, systolic blood pressure, non-HDL cholesterol, and European geographic risk region.

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