MAGENT

Hemodynamics · LIVE

Framingham heart-failure criteria

Framingham HF criteria

Apply the McKee 1971 Framingham concurrent major and minor criteria and return definite or not_definite from nine major flags, seven minor flags, and the dual weight-loss flag.

LIVE $0.005 USDC GET /api/calc/framingham_hf

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

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

What it computes

Apply the McKee 1971 Framingham concurrent major and minor criteria and return definite or not_definite from nine major flags, seven minor flags, and the dual weight-loss flag.

When to use

When an agent already has the published McKee 1971 Framingham congestive heart-failure findings assigned as flags and needs the concurrent two-major or one-major-plus-two-minor classification. magent does not examine the patient, measure venous pressure, circulation time, or vital capacity, or perform echocardiography.

When not to use

  • Not a medical device and not a diagnosis of heart failure.
  • Not an echocardiographic diagnosis. magent does not perform echocardiography or assign ejection fraction.
  • Not HFrEF or HFpEF staging. This tool is the McKee 1971 Framingham concurrent criteria only.
  • The caller assigns every flag. magent does not examine the patient or measure venous pressure, circulation time, vital capacity, or weight.
  • Concurrency of criteria is caller-applied; magent does not collect observation time.
  • Returned major_count and minor_count are the nine and seven fixed flags only. Weight loss ≥4.5 kg in 5 days in response to treatment is dual and is not added to those counts.

Formula

definite iff 2 major OR (1 major AND 2 minor) concurrent (McKee 1971). weight_loss_45kg_5d_treatment (≥4.5 kg in 5 days in response to treatment) counts as major if that assignment is definite, else as minor if that assignment is definite, else unused. major_count is the 9 fixed majors; minor_count is the 7 fixed minors

Citation

Title
The natural history of congestive heart failure: the Framingham study
Authors
McKee PA, Castelli WP, McNamara PM, Kannel WB
Source
N Engl J Med. 1971;285(26):1441-1446
DOI
10.1056/NEJM197112232852601

Worked example

All flags absent

Given: acute_pulmonary_edema=falseankle_edema=falsecardiomegaly=falsecirculation_time_ge_25=falsedyspnea_on_exertion=falsehepatojugular_reflux=falsehepatomegaly=falseneck_vein_distention=falsenight_cough=falsepleural_effusion=falsepnd_or_orthopnea=falserales=falses3_gallop=falsetachycardia_ge_120=falsevenous_pressure_gt_16=falsevital_capacity_decreased_third=falseweight_loss_45kg_5d_treatment=false

  1. All nine major flags and all seven minor flags are false
  2. weight_loss_45kg_5d_treatment is false, so the dual criterion is unused
  3. 0 major and 0 minor is not definite

Also searched as

  • Framingham heart failure criteria
  • Framingham CHF criteria
  • McKee 1971 CHF
  • Framingham congestive heart failure
  • McKee Framingham criteria
  • Framingham major minor CHF
  • Framingham study heart failure

Try

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

/api/calc/framingham_hf?pnd_or_orthopnea=false&neck_vein_distention=false&rales=false&cardiomegaly=false&acute_pulmonary_edema=false&s3_gallop=false&venous_pressure_gt_16=false&circulation_time_ge_25=false&hepatojugular_reflux=false&ankle_edema=false&night_cough=false&dyspnea_on_exertion=false&hepatomegaly=false&pleural_effusion=false&vital_capacity_decreased_third=false&tachycardia_ge_120=false&weight_loss_45kg_5d_treatment=false

Full URL: https://api.magentlab.com/api/calc/framingham_hf?pnd_or_orthopnea=false&neck_vein_distention=false&rales=false&cardiomegaly=false&acute_pulmonary_edema=false&s3_gallop=false&venous_pressure_gt_16=false&circulation_time_ge_25=false&hepatojugular_reflux=false&ankle_edema=false&night_cough=false&dyspnea_on_exertion=false&hepatomegaly=false&pleural_effusion=false&vital_capacity_decreased_third=false&tachycardia_ge_120=false&weight_loss_45kg_5d_treatment=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_hf?pnd_or_orthopnea=false&neck_vein_distention=false&rales=false&cardiomegaly=false&acute_pulmonary_edema=false&s3_gallop=false&venous_pressure_gt_16=false&circulation_time_ge_25=false&hepatojugular_reflux=false&ankle_edema=false&night_cough=false&dyspnea_on_exertion=false&hepatomegaly=false&pleural_effusion=false&vital_capacity_decreased_third=false&tachycardia_ge_120=false&weight_loss_45kg_5d_treatment=false"

Parameters

Name Type Required Description
pnd_or_orthopnea boolean required Paroxysmal nocturnal dyspnea or orthopnea (McKee 1971 major). true or false as assigned by the caller. magent does not take a history.
neck_vein_distention boolean required Neck-vein distention (McKee 1971 major). true or false as assigned by the caller. magent does not examine the neck veins.
rales boolean required Rales (McKee 1971 major). true or false as assigned by the caller. magent does not auscultate the lungs.
cardiomegaly boolean required Cardiomegaly (McKee 1971 major). true or false as assigned by the caller. magent does not interpret a chest radiograph.
acute_pulmonary_edema boolean required Acute pulmonary edema (McKee 1971 major). true or false as assigned by the caller. magent does not diagnose pulmonary edema.
s3_gallop boolean required S3 gallop (McKee 1971 major). true or false as assigned by the caller. magent does not auscultate the heart.
venous_pressure_gt_16 boolean required Increased venous pressure >16 cm of water (McKee 1971 major). true or false as assigned by the caller. magent does not measure venous pressure.
circulation_time_ge_25 boolean required Circulation time ≥25 seconds (McKee 1971 major). true or false as assigned by the caller. magent does not measure circulation time.
hepatojugular_reflux boolean required Hepatojugular reflux (McKee 1971 major). true or false as assigned by the caller. magent does not examine the patient.
ankle_edema boolean required Ankle edema (McKee 1971 minor). true or false as assigned by the caller. magent does not examine the ankles.
night_cough boolean required Night cough (McKee 1971 minor). true or false as assigned by the caller. magent does not take a history.
dyspnea_on_exertion boolean required Dyspnea on exertion (McKee 1971 minor). true or false as assigned by the caller. magent does not take a history.
hepatomegaly boolean required Hepatomegaly (McKee 1971 minor). true or false as assigned by the caller. magent does not examine the liver.
pleural_effusion boolean required Pleural effusion (McKee 1971 minor). true or false as assigned by the caller. magent does not interpret imaging.
vital_capacity_decreased_third boolean required Vital capacity decreased one third from maximum (McKee 1971 minor). true or false as assigned by the caller. magent does not measure vital capacity.
tachycardia_ge_120 boolean required Tachycardia ≥120 per minute (McKee 1971 minor). true or false as assigned by the caller. magent does not measure heart rate.
weight_loss_45kg_5d_treatment boolean required Weight loss ≥4.5 kg in 5 days in response to treatment (McKee 1971 dual major-or-minor). true or false as assigned by the caller. Counted as major if that assignment is definite, else as minor if that assignment is definite, else unused. magent does not weigh the patient.

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/framingham_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": [
    {
      "acute_pulmonary_edema": "false",
      "ankle_edema": "false",
      "cardiomegaly": "false",
      "circulation_time_ge_25": "false",
      "dyspnea_on_exertion": "false",
      "hepatojugular_reflux": "false",
      "hepatomegaly": "false",
      "neck_vein_distention": "false",
      "night_cough": "false",
      "pleural_effusion": "false",
      "pnd_or_orthopnea": "false",
      "rales": "false",
      "s3_gallop": "false",
      "tachycardia_ge_120": "false",
      "venous_pressure_gt_16": "false",
      "vital_capacity_decreased_third": "false",
      "weight_loss_45kg_5d_treatment": "false"
    },
    {
      "acute_pulmonary_edema": "false",
      "ankle_edema": "false",
      "cardiomegaly": "false",
      "circulation_time_ge_25": "false",
      "dyspnea_on_exertion": "false",
      "hepatojugular_reflux": "false",
      "hepatomegaly": "false",
      "neck_vein_distention": "false",
      "night_cough": "false",
      "pleural_effusion": "false",
      "pnd_or_orthopnea": "false",
      "rales": "false",
      "s3_gallop": "false",
      "tachycardia_ge_120": "false",
      "venous_pressure_gt_16": "false",
      "vital_capacity_decreased_third": "false",
      "weight_loss_45kg_5d_treatment": "false"
    }
  ]
}

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/framingham_hf",
  "items": [
    {
      "components": [
        {
          "factor": "pnd_or_orthopnea",
          "met": false
        },
        {
          "factor": "neck_vein_distention",
          "met": false
        },
        {
          "factor": "rales",
          "met": false
        },
        {
          "factor": "cardiomegaly",
          "met": false
        },
        {
          "factor": "acute_pulmonary_edema",
          "met": false
        },
        {
          "factor": "s3_gallop",
          "met": false
        },
        {
          "factor": "venous_pressure_gt_16",
          "met": false
        },
        {
          "factor": "circulation_time_ge_25",
          "met": false
        },
        {
          "factor": "hepatojugular_reflux",
          "met": false
        },
        {
          "factor": "ankle_edema",
          "met": false
        },
        {
          "factor": "night_cough",
          "met": false
        },
        {
          "factor": "dyspnea_on_exertion",
          "met": false
        },
        {
          "factor": "hepatomegaly",
          "met": false
        },
        {
          "factor": "pleural_effusion",
          "met": false
        },
        {
          "factor": "vital_capacity_decreased_third",
          "met": false
        },
        {
          "factor": "tachycardia_ge_120",
          "met": false
        },
        {
          "factor": "weight_loss_45kg_5d_treatment",
          "met": 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": "McKee PA, Castelli WP, McNamara PM, Kannel WB",
        "doi": "10.1056/NEJM197112232852601",
        "id": "mckee-1971",
        "pmid": "5122894",
        "source": "N Engl J Med. 1971;285(26):1441-1446",
        "title": "The natural history of congestive heart failure: the Framingham study"
      },
      "formula": "framingham_hf",
      "formula_expression": "definite iff 2 major OR (1 major AND 2 minor) concurrent (McKee 1971). weight_loss_45kg_5d_treatment (≥4.5 kg in 5 days in response to treatment) counts as major if that assignment is definite, else as minor if that assignment is definite, else unused. major_count is the 9 fixed majors; minor_count is the 7 fixed minors",
      "classification": "not_definite",
      "major_count": 0,
      "minor_count": 0,
      "weight_loss_45kg_5d_treatment": false
    },
    {
      "components": [
        {
          "factor": "pnd_or_orthopnea",
          "met": false
        },
        {
          "factor": "neck_vein_distention",
          "met": false
        },
        {
          "factor": "rales",
          "met": false
        },
        {
          "factor": "cardiomegaly",
          "met": false
        },
        {
          "factor": "acute_pulmonary_edema",
          "met": false
        },
        {
          "factor": "s3_gallop",
          "met": false
        },
        {
          "factor": "venous_pressure_gt_16",
          "met": false
        },
        {
          "factor": "circulation_time_ge_25",
          "met": false
        },
        {
          "factor": "hepatojugular_reflux",
          "met": false
        },
        {
          "factor": "ankle_edema",
          "met": false
        },
        {
          "factor": "night_cough",
          "met": false
        },
        {
          "factor": "dyspnea_on_exertion",
          "met": false
        },
        {
          "factor": "hepatomegaly",
          "met": false
        },
        {
          "factor": "pleural_effusion",
          "met": false
        },
        {
          "factor": "vital_capacity_decreased_third",
          "met": false
        },
        {
          "factor": "tachycardia_ge_120",
          "met": false
        },
        {
          "factor": "weight_loss_45kg_5d_treatment",
          "met": 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": "McKee PA, Castelli WP, McNamara PM, Kannel WB",
        "doi": "10.1056/NEJM197112232852601",
        "id": "mckee-1971",
        "pmid": "5122894",
        "source": "N Engl J Med. 1971;285(26):1441-1446",
        "title": "The natural history of congestive heart failure: the Framingham study"
      },
      "formula": "framingham_hf",
      "formula_expression": "definite iff 2 major OR (1 major AND 2 minor) concurrent (McKee 1971). weight_loss_45kg_5d_treatment (≥4.5 kg in 5 days in response to treatment) counts as major if that assignment is definite, else as minor if that assignment is definite, else unused. major_count is the 9 fixed majors; minor_count is the 7 fixed minors",
      "classification": "not_definite",
      "major_count": 0,
      "minor_count": 0,
      "weight_loss_45kg_5d_treatment": false
    }
  ]
}

Response

Field Type Description
formula string framingham_hf
formula_expression string Published McKee 1971 concurrent major/minor definite rule
major_count integer Count of the nine fixed McKee 1971 major flags that are true (0-9). Does not include weight_loss_45kg_5d_treatment.
minor_count integer Count of the seven fixed McKee 1971 minor flags that are true (0-7). Does not include weight_loss_45kg_5d_treatment.
weight_loss_45kg_5d_treatment boolean Echo of the dual major-or-minor weight-loss flag (≥4.5 kg in 5 days in response to treatment)
classification string definite if two major criteria, or one major plus two minor, are present concurrently after the dual weight-loss assignment; otherwise not_definite. Not a diagnosis.
components array Per-flag rows with factor and met for the nine majors, seven minors, and dual weight-loss flag
citation object McKee 1971 N Engl J Med citation
disclaimer string Not-a-device notice

Example JSON

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

{
  "components": [
    {
      "factor": "pnd_or_orthopnea",
      "met": false
    },
    {
      "factor": "neck_vein_distention",
      "met": false
    },
    {
      "factor": "rales",
      "met": false
    },
    {
      "factor": "cardiomegaly",
      "met": false
    },
    {
      "factor": "acute_pulmonary_edema",
      "met": false
    },
    {
      "factor": "s3_gallop",
      "met": false
    },
    {
      "factor": "venous_pressure_gt_16",
      "met": false
    },
    {
      "factor": "circulation_time_ge_25",
      "met": false
    },
    {
      "factor": "hepatojugular_reflux",
      "met": false
    },
    {
      "factor": "ankle_edema",
      "met": false
    },
    {
      "factor": "night_cough",
      "met": false
    },
    {
      "factor": "dyspnea_on_exertion",
      "met": false
    },
    {
      "factor": "hepatomegaly",
      "met": false
    },
    {
      "factor": "pleural_effusion",
      "met": false
    },
    {
      "factor": "vital_capacity_decreased_third",
      "met": false
    },
    {
      "factor": "tachycardia_ge_120",
      "met": false
    },
    {
      "factor": "weight_loss_45kg_5d_treatment",
      "met": 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": "McKee PA, Castelli WP, McNamara PM, Kannel WB",
    "doi": "10.1056/NEJM197112232852601",
    "id": "mckee-1971",
    "pmid": "5122894",
    "source": "N Engl J Med. 1971;285(26):1441-1446",
    "title": "The natural history of congestive heart failure: the Framingham study"
  },
  "formula": "framingham_hf",
  "formula_expression": "definite iff 2 major OR (1 major AND 2 minor) concurrent (McKee 1971). weight_loss_45kg_5d_treatment (≥4.5 kg in 5 days in response to treatment) counts as major if that assignment is definite, else as minor if that assignment is definite, else unused. major_count is the 9 fixed majors; minor_count is the 7 fixed minors",
  "classification": "not_definite",
  "major_count": 0,
  "minor_count": 0,
  "weight_loss_45kg_5d_treatment": false
}

Client errors (HTTP 400)

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

HTTP Code When
400 invalid_flag boolean clinical flags must be true or false 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

  • NYHA — Return the 1994 NYHA functional capacity class 1-4 from a caller-assigned integer, with the published class description.
  • H2FPEF — Sum the Reddy 2018 H2FPEF points score (six components, max 9) and return score and max_score only.

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.