MAGENT

Hemodynamics · LIVE

Khan 2019 PCP-HF 10-year incident HF

PCP-HF 10-year incident HF

Compute the Khan 2019 PCP-HF 10-year incident heart-failure percent for adults aged 30-79 from Table 2 sex- and cohort-specific Cox coefficients.

LIVE $0.005 USDC GET /api/calc/pcp_hf

Markdown: /docs/pcp-hf.md · Canonical: https://magentlab.com/docs/pcp-hf

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

What it computes

Compute the Khan 2019 PCP-HF 10-year incident heart-failure percent for adults aged 30-79 from Table 2 sex- and cohort-specific Cox coefficients.

When to use

When an agent already has those Khan 2019 predictors for a person aged 30-79 without prior CVD and needs that paper's 10-year incident HF percent. Caller assigns cohort as white or black. Not a diagnosis, treatment order, AHA PREVENT 2024, or 2013 PCE.

When not to use

  • Not a medical device. Not a diagnosis of heart failure. Not a treatment order, medication recommendation, or reason to withhold therapy.
  • 10-year incident HF only. Age 30-79. Not AHA PREVENT 2024. Not the 2013 ACC/AHA pooled-cohort equations (2013 PCE).
  • cohort is caller-assigned as white or black using the paper's terms. magent does not assign race or ethnicity. Other cohort strings are rejected.
  • Treated versus untreated systolic BP and fasting glucose each use the matching Table 2 coefficient (not both). Caller assigns age, sex, cohort, blood pressure, antihypertensive, glucose, diabetes medication, lipids, BMI, smoking, and QRS duration. magent does not assay lipids, does not measure blood pressure, and does not interpret an ECG.

Formula

10-year incident HF % = 100*(1-S0**exp(IndX-MeanCV)); Khan 2019 Table 2; Ln=natural log; age 30-79; cohort white|black (caller-assigned paper terms; not param race); antihypertensive true uses treated SBP terms only; diabetes_medication true uses treated glucose terms only (not both); interactions only where Table 2 is not N/A; WHITE MALE: ln_age 41.94, ln_age^2 -0.88, ln_treated_sbp 1.03, ln_untreated_sbp 0.91, smoker 0.74, ln_treated_glucose 0.90, ln_untreated_glucose 0.78, ln_tc 0.49, ln_hdl -0.44, ln_bmi 37.2, ln_age*ln_bmi -8.83, ln_qrs 0.63, MeanCV 171.5, S0 0.98752; WHITE FEMALE: ln_age 20.55, ln_treated_sbp 12.95, ln_age*ln_treated_sbp -2.96, ln_untreated_sbp 11.86, ln_age*ln_untreated_sbp -2.73, smoker 11.02, ln_age*smoker -2.50, ln_treated_glucose 1.04, ln_untreated_glucose 0.91, ln_hdl -0.07, ln_bmi 1.33, ln_qrs 1.06, MeanCV 99.73, S0 0.99348; BLACK MALE: ln_age 2.88, ln_treated_sbp 2.31, ln_untreated_sbp 2.17, smoker 1.66, ln_age*smoker -0.25, ln_treated_glucose 0.64, ln_untreated_glucose 0.58, ln_hdl -0.81, ln_bmi 1.16, ln_qrs 0.73, MeanCV 28.73, S0 0.98295; BLACK FEMALE: ln_age 51.75, ln_treated_sbp 29.0, ln_age*ln_treated_sbp -6.59, ln_untreated_sbp 28.18, ln_age*ln_untreated_sbp -6.42, smoker 0.76, ln_treated_glucose 0.97, ln_untreated_glucose 0.80, ln_tc 0.32, ln_bmi 21.24, ln_age*ln_bmi -5.0, ln_qrs 1.27, MeanCV 233.9, S0 0.99260; round 1 decimal; not PREVENT 2024; not 2013 PCE; not a diagnosis

Citation

Title
10-Year Risk Equations for Incident Heart Failure in the General Population
Authors
Khan SS, Ning H, Shah SJ, Yancy CW, Carnethon M, Berry JD, et al.
Source
J Am Coll Cardiol. 2019;73(19):2388-2397
DOI
10.1016/j.jacc.2019.02.057

Worked example

Figure 3 optimal 50-year-old white woman, untreated SBP 120, untreated glucose 90, BMI 22, TC 180, HDL 55, nonsmoker, QRS 90

Given: age=50antihypertensive=falsebmi_kg_m2=22cohort=whitediabetes_medication=falseglucose_mg_dl=90hdl_mg_dl=55qrs_ms=90sbp_mm_hg=120sex=femalesmoker=falsetotal_cholesterol_mg_dl=180

  1. ln(age)=ln(50), ln(untreated SBP)=ln(120), ln(untreated glucose)=ln(90), ln(HDL)=ln(55), ln(BMI)=ln(22), ln(QRS)=ln(90); WHITE FEMALE Table 2 (ln_tc N/A)
  2. individual_sum 98.7374
  3. ten_year_hf_percent 0.2 (paper Figure 3 prints 0.3%; Table 2 arithmetic as written)

Same labs, white man

Given: age=50antihypertensive=falsebmi_kg_m2=22cohort=whitediabetes_medication=falseglucose_mg_dl=90hdl_mg_dl=55qrs_ms=90sbp_mm_hg=120sex=malesmoker=falsetotal_cholesterol_mg_dl=180

  1. WHITE MALE Table 2 (ln_age^2 and ln_age×ln_BMI; no age×SBP or age×smoker)
  2. individual_sum 170.2979; ten_year_hf_percent 0.4

Same labs, black man

Given: age=50antihypertensive=falsebmi_kg_m2=22cohort=blackdiabetes_medication=falseglucose_mg_dl=90hdl_mg_dl=55qrs_ms=90sbp_mm_hg=120sex=malesmoker=falsetotal_cholesterol_mg_dl=180

  1. BLACK MALE Table 2 (ln_age×smoker; ln_tc N/A)
  2. individual_sum 27.8899; ten_year_hf_percent 0.7 (paper Figure 3 prints 0.8%)

Same labs, black woman

Given: age=50antihypertensive=falsebmi_kg_m2=22cohort=blackdiabetes_medication=falseglucose_mg_dl=90hdl_mg_dl=55qrs_ms=90sbp_mm_hg=120sex=femalesmoker=falsetotal_cholesterol_mg_dl=180

  1. BLACK FEMALE Table 2 (ln_tc; ln_hdl N/A; ln_age×ln_BMI and age×SBP)
  2. individual_sum 233.2889; ten_year_hf_percent 0.4

Same white woman, treated SBP 120

Given: age=50antihypertensive=truebmi_kg_m2=22cohort=whitediabetes_medication=falseglucose_mg_dl=90hdl_mg_dl=55qrs_ms=90sbp_mm_hg=120sex=femalesmoker=falsetotal_cholesterol_mg_dl=180

  1. antihypertensive true uses WHITE FEMALE ln_treated_sbp 12.95 and ln_age×ln_treated_sbp -2.96 instead of untreated SBP terms
  2. individual_sum 99.6481; ten_year_hf_percent 0.6

Figure 3 high-risk 50-year-old white woman, treated SBP 150, treated glucose 126, BMI 35, TC 250, HDL 30, smoker, QRS 120

Given: age=50antihypertensive=truebmi_kg_m2=35cohort=whitediabetes_medication=trueglucose_mg_dl=126hdl_mg_dl=30qrs_ms=120sbp_mm_hg=150sex=femalesmoker=truetotal_cholesterol_mg_dl=250

  1. WHITE FEMALE Table 2 treated SBP, treated glucose, smoker, and ln_age×smoker; TC N/A
  2. individual_sum 103.0937; ten_year_hf_percent 17.2 (paper Figure 3 prints 14%; Table 2 arithmetic as written)

Also searched as

  • pooled cohort equations prevent HF
  • Khan 2019 JACC incident HF
  • 10-year incident heart failure
  • PCP-HF risk equations
  • treated SBP glucose QRS HF
  • white black cohort HF
  • QRS duration incident HF

Try

Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.

/api/calc/pcp_hf?age=50&sex=female&cohort=white&sbp_mm_hg=120&antihypertensive=false&glucose_mg_dl=90&diabetes_medication=false&bmi_kg_m2=22&total_cholesterol_mg_dl=180&hdl_mg_dl=55&smoker=false&qrs_ms=90

Full URL: https://api.magentlab.com/api/calc/pcp_hf?age=50&sex=female&cohort=white&sbp_mm_hg=120&antihypertensive=false&glucose_mg_dl=90&diabetes_medication=false&bmi_kg_m2=22&total_cholesterol_mg_dl=180&hdl_mg_dl=55&smoker=false&qrs_ms=90

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/pcp_hf?age=50&sex=female&cohort=white&sbp_mm_hg=120&antihypertensive=false&glucose_mg_dl=90&diabetes_medication=false&bmi_kg_m2=22&total_cholesterol_mg_dl=180&hdl_mg_dl=55&smoker=false&qrs_ms=90"

Parameters

Name Type Required Description
age integer required Age in years (integer 30-79). Khan 2019 Table 2 10-year incident HF is for ages 30-79. magent does not take a date of birth.
sex string required · female, male Sex used by the sex-specific Table 2 coefficients (female or male). Not cohort.
cohort string required · white, black Caller-assigned cohort as used in Khan 2019 Table 2: white or black (paper terms). Not param race. magent does not assign race or ethnicity. Other strings are rejected.
sbp_mm_hg number required Systolic blood pressure in mm Hg (50-250). Enters as ln(SBP) with the treated or untreated Table 2 coefficient according to antihypertensive. magent does not measure blood pressure.
antihypertensive boolean required Current antihypertensive treatment as assigned by the caller (true or false). true uses the Table 2 treated-SBP coefficient (and age × treated SBP when that cell is not N/A). false uses untreated SBP. Not both.
glucose_mg_dl number required Fasting glucose in mg/dL (40-600). Enters as ln(glucose) with the treated or untreated Table 2 coefficient according to diabetes_medication. magent does not assay glucose.
diabetes_medication boolean required Current diabetes medication as assigned by the caller (true or false). true uses the Table 2 treated-glucose coefficient. false uses untreated glucose. Not both.
bmi_kg_m2 number required Body-mass index in kg/m2 (10-80). Enters as ln(BMI) and ln(age)×ln(BMI) when that Table 2 cell is not N/A. magent does not measure height or weight.
total_cholesterol_mg_dl number required Total cholesterol in mg/dL (50-800). Enters as ln(total cholesterol) when that Table 2 cell is not N/A. magent does not assay lipids.
hdl_mg_dl number required HDL cholesterol in mg/dL (5-150). Enters as ln(HDL-C) when that Table 2 cell is not N/A. magent does not assay lipids.
smoker boolean required Current cigarette smoking as assigned by the caller (true or false). Adds the Table 2 smoker term and ln(age) × smoker when that cell is not N/A. magent does not take a smoking history.
qrs_ms number required QRS duration in ms (40-300). Enters as ln(QRS). magent does not interpret an ECG.

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.

POST /api/calc/pcp_hf Max 25 unit_amount + extra_item_amount * (n - 1) extra $0.002 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 (fixture)

{
  "items": [
    {
      "age": "50",
      "antihypertensive": "false",
      "bmi_kg_m2": "22",
      "cohort": "white",
      "diabetes_medication": "false",
      "glucose_mg_dl": "90",
      "hdl_mg_dl": "55",
      "qrs_ms": "90",
      "sbp_mm_hg": "120",
      "sex": "female",
      "smoker": "false",
      "total_cholesterol_mg_dl": "180"
    },
    {
      "age": "50",
      "antihypertensive": "false",
      "bmi_kg_m2": "22",
      "cohort": "white",
      "diabetes_medication": "false",
      "glucose_mg_dl": "90",
      "hdl_mg_dl": "55",
      "qrs_ms": "90",
      "sbp_mm_hg": "120",
      "sex": "female",
      "smoker": "false",
      "total_cholesterol_mg_dl": "180"
    }
  ]
}

Open bulk paywall →

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/pcp_hf",
  "items": [
    {
      "age": 50,
      "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": "Khan SS, Ning H, Shah SJ, Yancy CW, Carnethon M, Berry JD, et al.",
        "doi": "10.1016/j.jacc.2019.02.057",
        "id": "khan-2019-pcp-hf",
        "pmid": "31097157",
        "source": "J Am Coll Cardiol. 2019;73(19):2388-2397",
        "title": "10-Year Risk Equations for Incident Heart Failure in the General Population"
      },
      "formula": "pcp_hf",
      "formula_expression": "10-year incident HF % = 100*(1-S0**exp(IndX-MeanCV)); Khan 2019 Table 2; Ln=natural log; age 30-79; cohort white|black (caller-assigned paper terms; not param race); antihypertensive true uses treated SBP terms only; diabetes_medication true uses treated glucose terms only (not both); interactions only where Table 2 is not N/A; WHITE MALE: ln_age 41.94, ln_age^2 -0.88, ln_treated_sbp 1.03, ln_untreated_sbp 0.91, smoker 0.74, ln_treated_glucose 0.90, ln_untreated_glucose 0.78, ln_tc 0.49, ln_hdl -0.44, ln_bmi 37.2, ln_age*ln_bmi -8.83, ln_qrs 0.63, MeanCV 171.5, S0 0.98752; WHITE FEMALE: ln_age 20.55, ln_treated_sbp 12.95, ln_age*ln_treated_sbp -2.96, ln_untreated_sbp 11.86, ln_age*ln_untreated_sbp -2.73, smoker 11.02, ln_age*smoker -2.50, ln_treated_glucose 1.04, ln_untreated_glucose 0.91, ln_hdl -0.07, ln_bmi 1.33, ln_qrs 1.06, MeanCV 99.73, S0 0.99348; BLACK MALE: ln_age 2.88, ln_treated_sbp 2.31, ln_untreated_sbp 2.17, smoker 1.66, ln_age*smoker -0.25, ln_treated_glucose 0.64, ln_untreated_glucose 0.58, ln_hdl -0.81, ln_bmi 1.16, ln_qrs 0.73, MeanCV 28.73, S0 0.98295; BLACK FEMALE: ln_age 51.75, ln_treated_sbp 29.0, ln_age*ln_treated_sbp -6.59, ln_untreated_sbp 28.18, ln_age*ln_untreated_sbp -6.42, smoker 0.76, ln_treated_glucose 0.97, ln_untreated_glucose 0.80, ln_tc 0.32, ln_bmi 21.24, ln_age*ln_bmi -5.0, ln_qrs 1.27, MeanCV 233.9, S0 0.99260; round 1 decimal; not PREVENT 2024; not 2013 PCE; not a diagnosis",
      "sex": "female",
      "bmi_kg_m2": 22.0,
      "antihypertensive": false,
      "cohort": "white",
      "hdl_mg_dl": 55.0,
      "individual_sum": 98.7374,
      "sbp_mm_hg": 120.0,
      "smoker": false,
      "total_cholesterol_mg_dl": 180.0,
      "glucose_mg_dl": 90.0,
      "diabetes_medication": false,
      "qrs_ms": 90.0,
      "ten_year_hf_percent": 0.2
    },
    {
      "age": 50,
      "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": "Khan SS, Ning H, Shah SJ, Yancy CW, Carnethon M, Berry JD, et al.",
        "doi": "10.1016/j.jacc.2019.02.057",
        "id": "khan-2019-pcp-hf",
        "pmid": "31097157",
        "source": "J Am Coll Cardiol. 2019;73(19):2388-2397",
        "title": "10-Year Risk Equations for Incident Heart Failure in the General Population"
      },
      "formula": "pcp_hf",
      "formula_expression": "10-year incident HF % = 100*(1-S0**exp(IndX-MeanCV)); Khan 2019 Table 2; Ln=natural log; age 30-79; cohort white|black (caller-assigned paper terms; not param race); antihypertensive true uses treated SBP terms only; diabetes_medication true uses treated glucose terms only (not both); interactions only where Table 2 is not N/A; WHITE MALE: ln_age 41.94, ln_age^2 -0.88, ln_treated_sbp 1.03, ln_untreated_sbp 0.91, smoker 0.74, ln_treated_glucose 0.90, ln_untreated_glucose 0.78, ln_tc 0.49, ln_hdl -0.44, ln_bmi 37.2, ln_age*ln_bmi -8.83, ln_qrs 0.63, MeanCV 171.5, S0 0.98752; WHITE FEMALE: ln_age 20.55, ln_treated_sbp 12.95, ln_age*ln_treated_sbp -2.96, ln_untreated_sbp 11.86, ln_age*ln_untreated_sbp -2.73, smoker 11.02, ln_age*smoker -2.50, ln_treated_glucose 1.04, ln_untreated_glucose 0.91, ln_hdl -0.07, ln_bmi 1.33, ln_qrs 1.06, MeanCV 99.73, S0 0.99348; BLACK MALE: ln_age 2.88, ln_treated_sbp 2.31, ln_untreated_sbp 2.17, smoker 1.66, ln_age*smoker -0.25, ln_treated_glucose 0.64, ln_untreated_glucose 0.58, ln_hdl -0.81, ln_bmi 1.16, ln_qrs 0.73, MeanCV 28.73, S0 0.98295; BLACK FEMALE: ln_age 51.75, ln_treated_sbp 29.0, ln_age*ln_treated_sbp -6.59, ln_untreated_sbp 28.18, ln_age*ln_untreated_sbp -6.42, smoker 0.76, ln_treated_glucose 0.97, ln_untreated_glucose 0.80, ln_tc 0.32, ln_bmi 21.24, ln_age*ln_bmi -5.0, ln_qrs 1.27, MeanCV 233.9, S0 0.99260; round 1 decimal; not PREVENT 2024; not 2013 PCE; not a diagnosis",
      "sex": "female",
      "bmi_kg_m2": 22.0,
      "antihypertensive": false,
      "cohort": "white",
      "hdl_mg_dl": 55.0,
      "individual_sum": 98.7374,
      "sbp_mm_hg": 120.0,
      "smoker": false,
      "total_cholesterol_mg_dl": 180.0,
      "glucose_mg_dl": 90.0,
      "diabetes_medication": false,
      "qrs_ms": 90.0,
      "ten_year_hf_percent": 0.2
    }
  ]
}

Response

Field Type Description
formula string pcp_hf
formula_expression string Khan 2019 Table 2 sex- and cohort-specific 10-year incident HF
age integer Age in years used (30-79)
sex string female or male used
cohort string Caller-assigned white or black used
sbp_mm_hg number Systolic BP used, mm Hg
antihypertensive boolean Caller-assigned antihypertensive treatment used
glucose_mg_dl number Fasting glucose used, mg/dL
diabetes_medication boolean Caller-assigned diabetes medication used
bmi_kg_m2 number BMI used, kg/m2
total_cholesterol_mg_dl number Total cholesterol used, mg/dL
hdl_mg_dl number HDL-C used, mg/dL
smoker boolean Caller-assigned current smoking used
qrs_ms number QRS duration used, ms
individual_sum number Table 2 IndX (coefficient × value sum), 4 decimals
ten_year_hf_percent number 10-year incident HF percent, 1 decimal
citation object Khan et al. J Am Coll Cardiol 2019 citation
disclaimer string Not-a-device notice

Example JSON

Machine form of the same example. Frozen fixture. Not a live lookup.

{
  "age": 50,
  "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": "Khan SS, Ning H, Shah SJ, Yancy CW, Carnethon M, Berry JD, et al.",
    "doi": "10.1016/j.jacc.2019.02.057",
    "id": "khan-2019-pcp-hf",
    "pmid": "31097157",
    "source": "J Am Coll Cardiol. 2019;73(19):2388-2397",
    "title": "10-Year Risk Equations for Incident Heart Failure in the General Population"
  },
  "formula": "pcp_hf",
  "formula_expression": "10-year incident HF % = 100*(1-S0**exp(IndX-MeanCV)); Khan 2019 Table 2; Ln=natural log; age 30-79; cohort white|black (caller-assigned paper terms; not param race); antihypertensive true uses treated SBP terms only; diabetes_medication true uses treated glucose terms only (not both); interactions only where Table 2 is not N/A; WHITE MALE: ln_age 41.94, ln_age^2 -0.88, ln_treated_sbp 1.03, ln_untreated_sbp 0.91, smoker 0.74, ln_treated_glucose 0.90, ln_untreated_glucose 0.78, ln_tc 0.49, ln_hdl -0.44, ln_bmi 37.2, ln_age*ln_bmi -8.83, ln_qrs 0.63, MeanCV 171.5, S0 0.98752; WHITE FEMALE: ln_age 20.55, ln_treated_sbp 12.95, ln_age*ln_treated_sbp -2.96, ln_untreated_sbp 11.86, ln_age*ln_untreated_sbp -2.73, smoker 11.02, ln_age*smoker -2.50, ln_treated_glucose 1.04, ln_untreated_glucose 0.91, ln_hdl -0.07, ln_bmi 1.33, ln_qrs 1.06, MeanCV 99.73, S0 0.99348; BLACK MALE: ln_age 2.88, ln_treated_sbp 2.31, ln_untreated_sbp 2.17, smoker 1.66, ln_age*smoker -0.25, ln_treated_glucose 0.64, ln_untreated_glucose 0.58, ln_hdl -0.81, ln_bmi 1.16, ln_qrs 0.73, MeanCV 28.73, S0 0.98295; BLACK FEMALE: ln_age 51.75, ln_treated_sbp 29.0, ln_age*ln_treated_sbp -6.59, ln_untreated_sbp 28.18, ln_age*ln_untreated_sbp -6.42, smoker 0.76, ln_treated_glucose 0.97, ln_untreated_glucose 0.80, ln_tc 0.32, ln_bmi 21.24, ln_age*ln_bmi -5.0, ln_qrs 1.27, MeanCV 233.9, S0 0.99260; round 1 decimal; not PREVENT 2024; not 2013 PCE; not a diagnosis",
  "sex": "female",
  "bmi_kg_m2": 22.0,
  "antihypertensive": false,
  "cohort": "white",
  "hdl_mg_dl": 55.0,
  "individual_sum": 98.7374,
  "sbp_mm_hg": 120.0,
  "smoker": false,
  "total_cholesterol_mg_dl": 180.0,
  "glucose_mg_dl": 90.0,
  "diabetes_medication": false,
  "qrs_ms": 90.0,
  "ten_year_hf_percent": 0.2
}

Client errors (HTTP 400)

Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.

HTTP Code When
400 invalid_pcp_hf PCP-HF inputs must match Khan 2019 age 30-79, sex, caller-assigned white or black cohort, treated or untreated SBP and glucose, lipids, BMI, smoking, and QRS. 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

  • PREVENT 10-year total CVD — Compute the Khan 2024 PREVENT base 10-year total CVD percent (ASCVD plus heart failure) for adults aged 30-79 from sex-specific, race-free Table S12 coefficients.
  • 2013 PCE 10-year ASCVD — 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.
  • MAGGIC — Sum the Pocock 2013 MAGGIC integer chart from thirteen caller-supplied heart-failure predictors and return the published Table 4 1-year and 3-year death probabilities for scores 0-50.
  • GWTG-HF — Sum Peterson 2010 Figure 2 GWTG-HF integer points from seven admission predictors (age, systolic BP, BUN, sodium, heart rate, COPD, and caller-assigned nonblack race) for in-hospital mortality in hospitalized heart failure.

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.