MAGENT

Infection / VTE · LIVE

Composite PE shock score (Bangalore)

CPES

Sum the six Bangalore 2023 composite PE shock flags from caller-assigned booleans and return the 0–6 integer total. No named risk bands.

LIVE $0.005 USDC GET /api/calc/cpes

Markdown: /docs/cpes.md · Canonical: https://magentlab.com/docs/cpes

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

What it computes

Sum the six Bangalore 2023 composite PE shock flags from caller-assigned booleans and return the 0–6 integer total. No named risk bands.

When to use

When an agent already has intermediate-risk (normotensive) PE findings assigned as six yes/no flags and needs the published 0–6 total, not a shock diagnosis, not sPESI, not Bova, and not PESI.

When not to use

  • Not a medical device and not a shock diagnosis. Not a reperfusion or thrombolysis order.
  • For intermediate-risk (normotensive) PE as in Bangalore 2023. Not high-risk hypotensive PE. Not sPESI, not Bova, and not PESI.
  • Six equally weighted caller-assigned flags. magent does not read echo or assays and does not take raw heart rate. Site troponin and BNP cutoffs were not standardized; this tool does not invent numeric biomarker thresholds.
  • Returns the 0–6 integer score and max_score only. Bangalore 2023 reported prevalence of normotensive shock by integer score 0–6 and that a score of 6 predicted shock versus <6. This tool does not invent named risk bands.

Formula

CPES = elevated_troponin + elevated_bnp + moderate_or_severe_rv_dysfunction + saddle_pe + concomitant_dvt + tachycardia; each 1 if true; max 6 (Bangalore 2023)

Citation

Title
Prevalence and Predictors of Cardiogenic Shock in Intermediate-Risk Pulmonary Embolism: Insights From the FLASH Registry
Authors
Bangalore S, Horowitz JM, Beam D, Jaber WA, Khandhar S, Toma C, Weinberg MD, Mina B
Source
JACC Cardiovasc Interv. 2023;16(8):958-972
DOI
10.1016/j.jcin.2023.02.004

Worked example

All six flags false

Given: concomitant_dvt=falseelevated_bnp=falseelevated_troponin=falsemoderate_or_severe_rv_dysfunction=falsesaddle_pe=falsetachycardia=false

  1. All six caller-assigned flags are false
  2. Score = 0 (max 6); integer score only, no named band

All six flags true

Given: concomitant_dvt=trueelevated_bnp=trueelevated_troponin=truemoderate_or_severe_rv_dysfunction=truesaddle_pe=truetachycardia=true

  1. All six caller-assigned flags are true (1 point each)
  2. Score = 6 (max 6); integer score only, no named band

Also searched as

  • composite PE shock score
  • Bangalore PE shock score
  • intermediate-risk PE shock score
  • CPES
  • composite pulmonary embolism shock
  • Bangalore 2023 PE score
  • normotensive PE shock score
  • intermediate-risk PE composite score

Try

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

/api/calc/cpes?elevated_troponin=false&elevated_bnp=false&moderate_or_severe_rv_dysfunction=false&saddle_pe=false&concomitant_dvt=false&tachycardia=false

Full URL: https://api.magentlab.com/api/calc/cpes?elevated_troponin=false&elevated_bnp=false&moderate_or_severe_rv_dysfunction=false&saddle_pe=false&concomitant_dvt=false&tachycardia=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/cpes?elevated_troponin=false&elevated_bnp=false&moderate_or_severe_rv_dysfunction=false&saddle_pe=false&concomitant_dvt=false&tachycardia=false"

Parameters

Name Type Required Description
elevated_troponin boolean required Elevated troponin per local assay, as assigned by the caller (Bangalore 2023). true scores 1; false scores 0. Site cutoffs were not standardized; magent does not invent a numeric threshold or read the assay.
elevated_bnp boolean required Elevated BNP, as assigned by the caller (Bangalore 2023). true scores 1; false scores 0. Site cutoffs were not standardized; magent does not invent a numeric threshold or read the assay.
moderate_or_severe_rv_dysfunction boolean required Moderately or severely reduced RV function, as assigned by the caller (Bangalore 2023). Normal or mild reduction is false. true scores 1; false scores 0. magent does not read echo.
saddle_pe boolean required Saddle PE or central thrombus burden, as assigned by the caller (Bangalore 2023). true scores 1; false scores 0. magent does not read imaging.
concomitant_dvt boolean required Concomitant DVT, as assigned by the caller (Bangalore 2023). true scores 1; false scores 0. magent does not diagnose DVT.
tachycardia boolean required Tachycardia ≥100 beats/min as assigned by the caller (Bangalore 2023). true scores 1; false scores 0. magent does not take raw heart rate.

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/cpes 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": [
    {
      "concomitant_dvt": "false",
      "elevated_bnp": "false",
      "elevated_troponin": "false",
      "moderate_or_severe_rv_dysfunction": "false",
      "saddle_pe": "false",
      "tachycardia": "false"
    },
    {
      "concomitant_dvt": "false",
      "elevated_bnp": "false",
      "elevated_troponin": "false",
      "moderate_or_severe_rv_dysfunction": "false",
      "saddle_pe": "false",
      "tachycardia": "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/cpes",
  "items": [
    {
      "components": [
        {
          "factor": "elevated_troponin",
          "points": 0,
          "present": false
        },
        {
          "factor": "elevated_bnp",
          "points": 0,
          "present": false
        },
        {
          "factor": "moderate_or_severe_rv_dysfunction",
          "points": 0,
          "present": false
        },
        {
          "factor": "saddle_pe",
          "points": 0,
          "present": false
        },
        {
          "factor": "concomitant_dvt",
          "points": 0,
          "present": false
        },
        {
          "factor": "tachycardia",
          "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": "Bangalore S, Horowitz JM, Beam D, Jaber WA, Khandhar S, Toma C, Weinberg MD, Mina B",
        "doi": "10.1016/j.jcin.2023.02.004",
        "id": "bangalore-2023",
        "pmid": "37100559",
        "source": "JACC Cardiovasc Interv. 2023;16(8):958-972",
        "title": "Prevalence and Predictors of Cardiogenic Shock in Intermediate-Risk Pulmonary Embolism: Insights From the FLASH Registry"
      },
      "formula": "cpes",
      "formula_expression": "CPES = elevated_troponin + elevated_bnp + moderate_or_severe_rv_dysfunction + saddle_pe + concomitant_dvt + tachycardia; each 1 if true; max 6 (Bangalore 2023)",
      "max_score": 6,
      "score": 0
    },
    {
      "components": [
        {
          "factor": "elevated_troponin",
          "points": 0,
          "present": false
        },
        {
          "factor": "elevated_bnp",
          "points": 0,
          "present": false
        },
        {
          "factor": "moderate_or_severe_rv_dysfunction",
          "points": 0,
          "present": false
        },
        {
          "factor": "saddle_pe",
          "points": 0,
          "present": false
        },
        {
          "factor": "concomitant_dvt",
          "points": 0,
          "present": false
        },
        {
          "factor": "tachycardia",
          "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": "Bangalore S, Horowitz JM, Beam D, Jaber WA, Khandhar S, Toma C, Weinberg MD, Mina B",
        "doi": "10.1016/j.jcin.2023.02.004",
        "id": "bangalore-2023",
        "pmid": "37100559",
        "source": "JACC Cardiovasc Interv. 2023;16(8):958-972",
        "title": "Prevalence and Predictors of Cardiogenic Shock in Intermediate-Risk Pulmonary Embolism: Insights From the FLASH Registry"
      },
      "formula": "cpes",
      "formula_expression": "CPES = elevated_troponin + elevated_bnp + moderate_or_severe_rv_dysfunction + saddle_pe + concomitant_dvt + tachycardia; each 1 if true; max 6 (Bangalore 2023)",
      "max_score": 6,
      "score": 0
    }
  ]
}

Response

Field Type Description
formula string cpes
formula_expression string Exact expression used
score integer Bangalore 2023 composite PE shock points 0-6
max_score integer Always 6
components array Per-factor points
citation object Bangalore 2023 JACC Cardiovasc Interv citation
disclaimer string Not-a-device notice

Example JSON

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

{
  "components": [
    {
      "factor": "elevated_troponin",
      "points": 0,
      "present": false
    },
    {
      "factor": "elevated_bnp",
      "points": 0,
      "present": false
    },
    {
      "factor": "moderate_or_severe_rv_dysfunction",
      "points": 0,
      "present": false
    },
    {
      "factor": "saddle_pe",
      "points": 0,
      "present": false
    },
    {
      "factor": "concomitant_dvt",
      "points": 0,
      "present": false
    },
    {
      "factor": "tachycardia",
      "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": "Bangalore S, Horowitz JM, Beam D, Jaber WA, Khandhar S, Toma C, Weinberg MD, Mina B",
    "doi": "10.1016/j.jcin.2023.02.004",
    "id": "bangalore-2023",
    "pmid": "37100559",
    "source": "JACC Cardiovasc Interv. 2023;16(8):958-972",
    "title": "Prevalence and Predictors of Cardiogenic Shock in Intermediate-Risk Pulmonary Embolism: Insights From the FLASH Registry"
  },
  "formula": "cpes",
  "formula_expression": "CPES = elevated_troponin + elevated_bnp + moderate_or_severe_rv_dysfunction + saddle_pe + concomitant_dvt + tachycardia; each 1 if true; max 6 (Bangalore 2023)",
  "max_score": 6,
  "score": 0
}

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

  • Bova — Compute the Bova 2014 seven-point index (SBP 90-100 mm Hg, elevated troponin, RV dysfunction, heart rate ≥110) for confirmed acute PE that is not hypotensive, and return the published Table 6 stage band.
  • PESI — Compute the Aujesky 2005 Pulmonary Embolism Severity Index (PESI) from age, sex, comorbidities, vital signs, and altered mental status.
  • Hestia criteria — Apply the Zondag 2011 Hestia exclusion checklist and return whether outpatient treatment of acute PE is eligible from 11 caller-assigned items.
  • sPESI — Compute the Jiménez 2010 simplified Pulmonary Embolism Severity Index (sPESI) from age and five caller-assigned findings.

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.