MAGENT

Emergency · LIVE

Gupta MICA perioperative cardiac risk

Gupta MICA

Compute the Gupta 2011 Table 2 logistic probability of 30-day myocardial infarction or cardiac arrest after surgery from age, ASA class, functional status, creatinine category, and surgery type.

LIVE $0.005 USDC GET /api/calc/gupta_mica

Markdown: /docs/gupta-mica.md · Canonical: https://magentlab.com/docs/gupta-mica

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

What it computes

Compute the Gupta 2011 Table 2 logistic probability of 30-day myocardial infarction or cardiac arrest after surgery from age, ASA class, functional status, creatinine category, and surgery type.

When to use

When an agent needs the published Gupta 2011 MICA probability and must not invent an operative-clearance decision, a diagnosis, RCRI points, or a low/high cutoff.

When not to use

  • Not a medical device. Not a diagnosis and not a surgical clearance.
  • Gupta 2011 Table 2 MICA logistic model only. This is not the Revised Cardiac Risk Index (RCRI).
  • Gupta 2011 does not publish a low or high risk cutoff; magent does not invent one.
  • creatinine is the published category normal, abnormal (>1.5 mg/dL), or missing. magent does not parse a creatinine number.
  • functional_status and surgery are caller-assigned published categories. magent does not examine the patient or classify the procedure from a CPT code.

Formula

L = -5.25 + 0.02*age + functional_status + asa_class + creatinine + surgery (Gupta 2011 Table 2); independent 0, partially_dependent 0.65, totally_dependent 1.03; ASA1 -5.17, ASA2 -3.29, ASA3 -1.92, ASA4 -0.95, ASA5 0; creatinine normal 0, abnormal 0.61, missing -0.10; hernia 0, anorectal -0.16, aortic 1.60, bariatric -0.25, brain 1.40, breast -1.61, cardiac 1.01, ent 0.71, foregut_hpb 1.39, gbaas 0.59, intestinal 1.14, neck 0.18, obstetric_gynecologic 0.76, orthopedic 0.80, other_abdomen 1.13, peripheral_vascular 0.86, skin 0.54, spine 0.21, thoracic 0.40, vein -1.09, urology -0.26; estimated_probability_percent = 100 * exp(L) / (1 + exp(L))

Citation

Title
Development and validation of a risk calculator for prediction of cardiac risk after surgery
Authors
Gupta PK, Gupta H, Sundaram A, et al.
Source
Circulation. 2011;124(4):381-387
DOI
10.1161/CIRCULATIONAHA.110.015701

Worked example

Age 40, ASA 2, independent, normal creatinine, gbaas

Given: age=40asa_class=2creatinine=normalfunctional_status=independentsurgery=gbaas

  1. L = -5.25 + 0.02×40 + 0 (independent) + -3.29 (ASA 2) + 0 (normal) + 0.59 (gbaas) = -7.15
  2. estimated_probability_percent = 100 × e^(-7.15) / (1 + e^(-7.15)) = 0.08

Age 60, ASA 4, independent, normal creatinine, aortic

Given: age=60asa_class=4creatinine=normalfunctional_status=independentsurgery=aortic

  1. L = -5.25 + 0.02×60 + 0 + -0.95 (ASA 4) + 0 + 1.60 (aortic) = -3.40
  2. estimated_probability_percent from Table 2 two-decimal coefficients

Age 70, ASA 3, independent, normal creatinine, brain

Given: age=70asa_class=3creatinine=normalfunctional_status=independentsurgery=brain

  1. L = -5.25 + 0.02×70 + 0 + -1.92 (ASA 3) + 0 + 1.40 (brain) = -4.37
  2. estimated_probability_percent from Table 2 two-decimal coefficients

Age 70, ASA 5, totally dependent, abnormal creatinine, foregut_hpb

Given: age=70asa_class=5creatinine=abnormalfunctional_status=totally_dependentsurgery=foregut_hpb

  1. L = -5.25 + 0.02×70 + 1.03 (totally_dependent) + 0 (ASA 5) + 0.61 (abnormal) + 1.39 (foregut_hpb) = -0.82
  2. estimated_probability_percent from Table 2 two-decimal coefficients

Age 65, ASA 4, partially dependent, abnormal creatinine, peripheral_vascular

Given: age=65asa_class=4creatinine=abnormalfunctional_status=partially_dependentsurgery=peripheral_vascular

  1. L = -5.25 + 0.02×65 + 0.65 (partially_dependent) + -0.95 (ASA 4) + 0.61 (abnormal) + 0.86 (peripheral_vascular) = -2.78
  2. estimated_probability_percent from Table 2 two-decimal coefficients

Also searched as

  • Gupta MICA
  • perioperative myocardial infarction cardiac arrest
  • Gupta 2011 cardiac risk
  • NSQIP MICA
  • postoperative cardiac arrest probability
  • myocardial infarction after surgery
  • Gupta perioperative cardiac risk
  • MICA probability

Try

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

/api/calc/gupta_mica?age=40&functional_status=independent&asa_class=2&creatinine=normal&surgery=gbaas

Full URL: https://api.magentlab.com/api/calc/gupta_mica?age=40&functional_status=independent&asa_class=2&creatinine=normal&surgery=gbaas

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/gupta_mica?age=40&functional_status=independent&asa_class=2&creatinine=normal&surgery=gbaas"

Parameters

Name Type Required Description
age integer required Age in years (18-120). Gupta 2011 Table 2: +0.02 per year.
functional_status string required · independent, partially_dependent, totally_dependent Gupta 2011 functional status as assigned by the caller: independent (reference, 0), partially_dependent (+0.65), or totally_dependent (+1.03). magent does not examine the patient.
asa_class integer required ASA physical status 1-5 (Gupta 2011 Table 2; class 5 is the reference). class 1 -5.17, class 2 -3.29, class 3 -1.92, class 4 -0.95, class 5 adds 0. Caller-assigned integer.
creatinine string required · normal, abnormal, missing Gupta 2011 creatinine category as assigned by the caller: normal (reference, 0), abnormal (>1.5 mg/dL, +0.61), or missing (-0.10). Do not send a creatinine number.
surgery string required · hernia, anorectal, aortic, bariatric, brain, breast, cardiac, ent, foregut_hpb, gbaas, intestinal, neck, obstetric_gynecologic, orthopedic, other_abdomen, peripheral_vascular, skin, spine, thoracic, vein, urology Gupta 2011 Table 2 procedure category as assigned by the caller. hernia is the reference (0). gbaas is gallbladder, adrenal, appendix, or spleen (laparoscopic cholecystectomy in the paper example). magent does not classify a CPT code.

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/gupta_mica 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": "40",
      "asa_class": "2",
      "creatinine": "normal",
      "functional_status": "independent",
      "surgery": "gbaas"
    },
    {
      "age": "40",
      "asa_class": "2",
      "creatinine": "normal",
      "functional_status": "independent",
      "surgery": "gbaas"
    }
  ]
}

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/gupta_mica",
  "items": [
    {
      "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": "Gupta PK, Gupta H, Sundaram A, et al.",
        "doi": "10.1161/CIRCULATIONAHA.110.015701",
        "id": "gupta-2011",
        "pmid": "21730309",
        "source": "Circulation. 2011;124(4):381-387",
        "title": "Development and validation of a risk calculator for prediction of cardiac risk after surgery"
      },
      "formula": "gupta_mica",
      "formula_expression": "L = -5.25 + 0.02*age + functional_status + asa_class + creatinine + surgery (Gupta 2011 Table 2); independent 0, partially_dependent 0.65, totally_dependent 1.03; ASA1 -5.17, ASA2 -3.29, ASA3 -1.92, ASA4 -0.95, ASA5 0; creatinine normal 0, abnormal 0.61, missing -0.10; hernia 0, anorectal -0.16, aortic 1.60, bariatric -0.25, brain 1.40, breast -1.61, cardiac 1.01, ent 0.71, foregut_hpb 1.39, gbaas 0.59, intestinal 1.14, neck 0.18, obstetric_gynecologic 0.76, orthopedic 0.80, other_abdomen 1.13, peripheral_vascular 0.86, skin 0.54, spine 0.21, thoracic 0.40, vein -1.09, urology -0.26; estimated_probability_percent = 100 * exp(L) / (1 + exp(L))",
      "age_years": 40,
      "surgery": "gbaas",
      "asa_class": 2,
      "creatinine": "normal",
      "estimated_probability_percent": 0.08,
      "functional_status": "independent",
      "logit": -7.15
    },
    {
      "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": "Gupta PK, Gupta H, Sundaram A, et al.",
        "doi": "10.1161/CIRCULATIONAHA.110.015701",
        "id": "gupta-2011",
        "pmid": "21730309",
        "source": "Circulation. 2011;124(4):381-387",
        "title": "Development and validation of a risk calculator for prediction of cardiac risk after surgery"
      },
      "formula": "gupta_mica",
      "formula_expression": "L = -5.25 + 0.02*age + functional_status + asa_class + creatinine + surgery (Gupta 2011 Table 2); independent 0, partially_dependent 0.65, totally_dependent 1.03; ASA1 -5.17, ASA2 -3.29, ASA3 -1.92, ASA4 -0.95, ASA5 0; creatinine normal 0, abnormal 0.61, missing -0.10; hernia 0, anorectal -0.16, aortic 1.60, bariatric -0.25, brain 1.40, breast -1.61, cardiac 1.01, ent 0.71, foregut_hpb 1.39, gbaas 0.59, intestinal 1.14, neck 0.18, obstetric_gynecologic 0.76, orthopedic 0.80, other_abdomen 1.13, peripheral_vascular 0.86, skin 0.54, spine 0.21, thoracic 0.40, vein -1.09, urology -0.26; estimated_probability_percent = 100 * exp(L) / (1 + exp(L))",
      "age_years": 40,
      "surgery": "gbaas",
      "asa_class": 2,
      "creatinine": "normal",
      "estimated_probability_percent": 0.08,
      "functional_status": "independent",
      "logit": -7.15
    }
  ]
}

Response

Field Type Description
formula string gupta_mica
formula_expression string Gupta 2011 Table 2 logistic expression
age_years integer Input age in years
functional_status string independent, partially_dependent, or totally_dependent
asa_class integer ASA physical status 1-5
creatinine string normal, abnormal, or missing
surgery string Gupta 2011 Table 2 procedure category
logit number Gupta 2011 Table 2 linear predictor L, 4 decimal places
estimated_probability_percent number 100 * exp(L) / (1 + exp(L)) from the unrounded logit, 2 decimal places. A probability, not a clearance.
citation object Gupta et al. Circulation 2011 citation
disclaimer string Not-a-device notice

Example JSON

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

{
  "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": "Gupta PK, Gupta H, Sundaram A, et al.",
    "doi": "10.1161/CIRCULATIONAHA.110.015701",
    "id": "gupta-2011",
    "pmid": "21730309",
    "source": "Circulation. 2011;124(4):381-387",
    "title": "Development and validation of a risk calculator for prediction of cardiac risk after surgery"
  },
  "formula": "gupta_mica",
  "formula_expression": "L = -5.25 + 0.02*age + functional_status + asa_class + creatinine + surgery (Gupta 2011 Table 2); independent 0, partially_dependent 0.65, totally_dependent 1.03; ASA1 -5.17, ASA2 -3.29, ASA3 -1.92, ASA4 -0.95, ASA5 0; creatinine normal 0, abnormal 0.61, missing -0.10; hernia 0, anorectal -0.16, aortic 1.60, bariatric -0.25, brain 1.40, breast -1.61, cardiac 1.01, ent 0.71, foregut_hpb 1.39, gbaas 0.59, intestinal 1.14, neck 0.18, obstetric_gynecologic 0.76, orthopedic 0.80, other_abdomen 1.13, peripheral_vascular 0.86, skin 0.54, spine 0.21, thoracic 0.40, vein -1.09, urology -0.26; estimated_probability_percent = 100 * exp(L) / (1 + exp(L))",
  "age_years": 40,
  "surgery": "gbaas",
  "asa_class": 2,
  "creatinine": "normal",
  "estimated_probability_percent": 0.08,
  "functional_status": "independent",
  "logit": -7.15
}

Client errors (HTTP 400)

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

HTTP Code When
400 invalid_age age must be an integer from 18 to 120 Returned before settlement; you are not charged.
400 invalid_gupta_mica each Gupta 2011 MICA item must be a published category for that field. Returned before settlement; you are not charged.
400 invalid_gupta_surgery surgery must be a Gupta 2011 Table 2 procedure category (hernia is the reference). Returned before settlement; you are not charged.
400 invalid_asa_class asa_class must be an integer from 1 to 5 (Gupta 2011 ASA physical status). 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

  • RCRI — Sum the six Lee 1999 revised cardiac risk index factors and return class I–IV.

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.