MAGENT

Emergency · LIVE

EuroSCORE II in-hospital mortality

EuroSCORE II

Compute the Nashef 2012 Table 6 logistic estimated in-hospital mortality after adult cardiac surgery from the published multivariable coefficients.

LIVE $0.005 USDC GET /api/calc/euroscore_ii

Markdown: /docs/euroscore-ii.md · Canonical: https://magentlab.com/docs/euroscore-ii

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

What it computes

Compute the Nashef 2012 Table 6 logistic estimated in-hospital mortality after adult cardiac surgery from the published multivariable coefficients.

When to use

When an agent needs the published EuroSCORE II probability and must not substitute additive EuroSCORE I, invent low/intermediate/high percent bands, or issue an operative clearance.

When not to use

  • Not a medical device. Not a diagnosis and not an operative clearance.
  • Nashef 2012 Table 6 multivariable logistic EuroSCORE II only. This is not additive EuroSCORE I and not Table 5 univariable coefficients.
  • Nashef 2012 does not publish low, intermediate, or high percent cuts; magent does not invent them.
  • renal is a caller-assigned creatinine-clearance band or dialysis. magent does not run Cockcroft-Gault and does not parse a creatinine number.
  • NYHA, LV function, urgency, procedure weight, and flags are caller-assigned published categories. magent does not examine the patient or classify an operative note.
  • The paper's developmental cohort oldest patient was 95; predicted percent is for a population, not an individual outcome.

Formula

y = -5.324537 + 0.0285181*age_step + female + renal + extracardiac_arteriopathy + poor_mobility + previous_cardiac_surgery + chronic_lung_disease + active_endocarditis + critical_preoperative_state + insulin_dependent_diabetes + nyha + ccs_class_4 + lv_function + recent_mi + pulmonary_hypertension + urgency + weight_of_procedure + thoracic_aorta (Nashef 2012 Table 6 multivariable); age_step = 1 if age <= 60 else (age - 59); female 0.2196434; renal cc_gt_85 0, cc_51_85 0.303553, cc_le_50 0.8592256, dialysis 0.6421508; extracardiac_arteriopathy 0.5360268; poor_mobility 0.2407181; previous_cardiac_surgery 1.118599; chronic_lung_disease 0.1886564; active_endocarditis 0.6194522; critical_preoperative_state 1.086517; insulin_dependent_diabetes 0.3542749; nyha 1 0, 2 0.1070545, 3 0.2958358, 4 0.5597929; ccs_class_4 0.2226147; lv_function good 0, moderate 0.3150652, poor 0.8084096, very_poor 0.9346919; recent_mi 0.1528943; pulmonary_hypertension none 0, moderate 0.1788899, severe 0.3491475; urgency elective 0, urgent 0.3174673, emergency 0.7039121, salvage 1.362947; weight_of_procedure isolated_cabg 0, single_non_cabg 0.0062118, two 0.5521478, three_plus 0.9724533; thoracic_aorta 0.6527205; estimated_probability_percent = 100 * exp(y) / (1 + exp(y))

Citation

Title
EuroSCORE II
Authors
Nashef SAM, Roques F, Sharples LD, Nilsson J, Smith C, Goldstone AR, Lockowandt U
Source
Eur J Cardiothorac Surg. 2012;41(4):734-745
DOI
10.1093/ejcts/ezs043

Worked example

Age 60, male, cc >85, NYHA I, good LV, elective isolated CABG

Given: active_endocarditis=falseage=60ccs_class_4=falsechronic_lung_disease=falsecritical_preoperative_state=falseextracardiac_arteriopathy=falseinsulin_dependent_diabetes=falselv_function=goodnyha=1poor_mobility=falseprevious_cardiac_surgery=falsepulmonary_hypertension=nonerecent_mi=falserenal=cc_gt_85sex=malethoracic_aorta=falseurgency=electiveweight_of_procedure=isolated_cabg

  1. age 60 → age_step Xi = 1 (age <= 60)
  2. all other Table 6 factors are reference (0)
  3. y = -5.324537 + 0.0285181×1 = -5.2960189
  4. estimated_probability_percent = 100 × e^y / (1 + e^y) = 0.50

Age 70, female, otherwise baseline CABG

Given: active_endocarditis=falseage=70ccs_class_4=falsechronic_lung_disease=falsecritical_preoperative_state=falseextracardiac_arteriopathy=falseinsulin_dependent_diabetes=falselv_function=goodnyha=1poor_mobility=falseprevious_cardiac_surgery=falsepulmonary_hypertension=nonerecent_mi=falserenal=cc_gt_85sex=femalethoracic_aorta=falseurgency=electiveweight_of_procedure=isolated_cabg

  1. age 70 → age_step Xi = 11
  2. female +0.2196434
  3. y = -5.324537 + 0.0285181×11 + 0.2196434
  4. estimated_probability_percent from the unrounded logit

Baseline with renal cc_le_50

Given: active_endocarditis=falseage=60ccs_class_4=falsechronic_lung_disease=falsecritical_preoperative_state=falseextracardiac_arteriopathy=falseinsulin_dependent_diabetes=falselv_function=goodnyha=1poor_mobility=falseprevious_cardiac_surgery=falsepulmonary_hypertension=nonerecent_mi=falserenal=cc_le_50sex=malethoracic_aorta=falseurgency=electiveweight_of_procedure=isolated_cabg

  1. age_step 1 plus renal cc_le_50 +0.8592256
  2. estimated_probability_percent from the unrounded logit

Baseline with salvage urgency

Given: active_endocarditis=falseage=60ccs_class_4=falsechronic_lung_disease=falsecritical_preoperative_state=falseextracardiac_arteriopathy=falseinsulin_dependent_diabetes=falselv_function=goodnyha=1poor_mobility=falseprevious_cardiac_surgery=falsepulmonary_hypertension=nonerecent_mi=falserenal=cc_gt_85sex=malethoracic_aorta=falseurgency=salvageweight_of_procedure=isolated_cabg

  1. age_step 1 plus salvage +1.362947
  2. estimated_probability_percent from the unrounded logit

Baseline with thoracic aorta

Given: active_endocarditis=falseage=60ccs_class_4=falsechronic_lung_disease=falsecritical_preoperative_state=falseextracardiac_arteriopathy=falseinsulin_dependent_diabetes=falselv_function=goodnyha=1poor_mobility=falseprevious_cardiac_surgery=falsepulmonary_hypertension=nonerecent_mi=falserenal=cc_gt_85sex=malethoracic_aorta=trueurgency=electiveweight_of_procedure=isolated_cabg

  1. age_step 1 plus thoracic aorta +0.6527205
  2. estimated_probability_percent from the unrounded logit

Baseline with poor LV function

Given: active_endocarditis=falseage=60ccs_class_4=falsechronic_lung_disease=falsecritical_preoperative_state=falseextracardiac_arteriopathy=falseinsulin_dependent_diabetes=falselv_function=poornyha=1poor_mobility=falseprevious_cardiac_surgery=falsepulmonary_hypertension=nonerecent_mi=falserenal=cc_gt_85sex=malethoracic_aorta=falseurgency=electiveweight_of_procedure=isolated_cabg

  1. age_step 1 plus poor LV +0.8084096
  2. estimated_probability_percent from the unrounded logit

Also searched as

  • EuroSCORE II
  • EuroSCORE 2
  • Nashef 2012 cardiac surgery mortality
  • in-hospital mortality after cardiac surgery
  • logistic EuroSCORE II
  • cardiac operative risk evaluation II
  • EuroSCORE II Table 6
  • predicted hospital death after heart surgery

Try

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

/api/calc/euroscore_ii?age=60&sex=male&renal=cc_gt_85&nyha=1&lv_function=good&urgency=elective&weight_of_procedure=isolated_cabg&pulmonary_hypertension=none&extracardiac_arteriopathy=false&poor_mobility=false&previous_cardiac_surgery=false&chronic_lung_disease=false&active_endocarditis=false&critical_preoperative_state=false&insulin_dependent_diabetes=false&ccs_class_4=false&recent_mi=false&thoracic_aorta=false

Full URL: https://api.magentlab.com/api/calc/euroscore_ii?age=60&sex=male&renal=cc_gt_85&nyha=1&lv_function=good&urgency=elective&weight_of_procedure=isolated_cabg&pulmonary_hypertension=none&extracardiac_arteriopathy=false&poor_mobility=false&previous_cardiac_surgery=false&chronic_lung_disease=false&active_endocarditis=false&critical_preoperative_state=false&insulin_dependent_diabetes=false&ccs_class_4=false&recent_mi=false&thoracic_aorta=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/euroscore_ii?age=60&sex=male&renal=cc_gt_85&nyha=1&lv_function=good&urgency=elective&weight_of_procedure=isolated_cabg&pulmonary_hypertension=none&extracardiac_arteriopathy=false&poor_mobility=false&previous_cardiac_surgery=false&chronic_lung_disease=false&active_endocarditis=false&critical_preoperative_state=false&insulin_dependent_diabetes=false&ccs_class_4=false&recent_mi=false&thoracic_aorta=false"

Parameters

Name Type Required Description
age integer required Age in years (18-120). Nashef 2012 Table 6: Xi = 1 if age <= 60; Xi = age - 59 if older (age 61 → 2). Coefficient 0.0285181 on the encoded step, not on raw years.
sex string required · male, female Sex as assigned by the caller. male is the reference (0). female adds 0.2196434 (Nashef 2012 Table 6).
renal string required · cc_gt_85, cc_51_85, cc_le_50, dialysis Nashef 2012 renal-function band as assigned by the caller: cc_gt_85 (reference, 0), cc_51_85 (+0.303553), cc_le_50 (+0.8592256), or dialysis (+0.6421508). magent does not run Cockcroft-Gault and does not parse a creatinine number.
nyha integer required NYHA class 1-4 as assigned by the caller (Nashef 2012 Table 6). class 1 is the reference (0); class 2 +0.1070545; class 3 +0.2958358; class 4 +0.5597929.
lv_function string required · good, moderate, poor, very_poor Left-ventricular function band as assigned by the caller: good (LVEF 51% or more, reference 0), moderate (31-50%, +0.3150652), poor (21-30%, +0.8084096), or very_poor (20% or less, +0.9346919). magent does not parse an ejection-fraction number.
urgency string required · elective, urgent, emergency, salvage Nashef 2012 urgency as assigned by the caller: elective (reference, 0), urgent (+0.3174673), emergency (+0.7039121), or salvage (+1.362947).
weight_of_procedure string required · isolated_cabg, single_non_cabg, two, three_plus Nashef 2012 weight of the intervention as assigned by the caller: isolated_cabg (reference, 0), single_non_cabg (+0.0062118), two (+0.5521478), or three_plus (+0.9724533). magent does not classify an operative note.
pulmonary_hypertension string required · none, moderate, severe Nashef 2012 Table 6 PA systolic-pressure band as assigned by the caller: none (reference, 0), moderate (31-55 mmHg, +0.1788899), or severe (>=55 mmHg, +0.3491475). magent does not parse a PA pressure number.
extracardiac_arteriopathy boolean required true if extracardiac arteriopathy is present (Nashef 2012 Table 6 ECA +0.5360268). true or false.
poor_mobility boolean required true if severe impairment of mobility secondary to musculoskeletal or neurological dysfunction (Nashef 2012 Table 6 N/M mob +0.2407181). true or false.
previous_cardiac_surgery boolean required true if one or more previous major cardiac operations involving opening the pericardium (Nashef 2012 Table 6 redo +1.118599). true or false.
chronic_lung_disease boolean required true if chronic pulmonary dysfunction is present (Nashef 2012 Table 6 CPD +0.1886564). true or false.
active_endocarditis boolean required true if still on antibiotic treatment for endocarditis at the time of surgery (Nashef 2012 Table 6 AE +0.6194522). true or false.
critical_preoperative_state boolean required true if a Nashef 2012 critical preoperative state is present (Table 6 +1.086517). true or false. magent does not assign this from a chart.
insulin_dependent_diabetes boolean required true if insulin-dependent diabetes mellitus (Nashef 2012 Table 6 IDDM +0.3542749). true or false.
ccs_class_4 boolean required true if CCS class 4 angina (Nashef 2012 Table 6 CCS4 +0.2226147). true or false.
recent_mi boolean required true if myocardial infarction within 90 days before operation (Nashef 2012 Table 6 +0.1528943). true or false.
thoracic_aorta boolean required true if surgery on the thoracic aorta (Nashef 2012 Table 6 +0.6527205). true or false.

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/euroscore_ii 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": [
    {
      "active_endocarditis": "false",
      "age": "60",
      "ccs_class_4": "false",
      "chronic_lung_disease": "false",
      "critical_preoperative_state": "false",
      "extracardiac_arteriopathy": "false",
      "insulin_dependent_diabetes": "false",
      "lv_function": "good",
      "nyha": "1",
      "poor_mobility": "false",
      "previous_cardiac_surgery": "false",
      "pulmonary_hypertension": "none",
      "recent_mi": "false",
      "renal": "cc_gt_85",
      "sex": "male",
      "thoracic_aorta": "false",
      "urgency": "elective",
      "weight_of_procedure": "isolated_cabg"
    },
    {
      "active_endocarditis": "false",
      "age": "60",
      "ccs_class_4": "false",
      "chronic_lung_disease": "false",
      "critical_preoperative_state": "false",
      "extracardiac_arteriopathy": "false",
      "insulin_dependent_diabetes": "false",
      "lv_function": "good",
      "nyha": "1",
      "poor_mobility": "false",
      "previous_cardiac_surgery": "false",
      "pulmonary_hypertension": "none",
      "recent_mi": "false",
      "renal": "cc_gt_85",
      "sex": "male",
      "thoracic_aorta": "false",
      "urgency": "elective",
      "weight_of_procedure": "isolated_cabg"
    }
  ]
}

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/euroscore_ii",
  "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.",
      "age_years": 60,
      "citation": {
        "authors": "Nashef SAM, Roques F, Sharples LD, Nilsson J, Smith C, Goldstone AR, Lockowandt U",
        "doi": "10.1093/ejcts/ezs043",
        "id": "nashef-2012",
        "pmid": "22378855",
        "source": "Eur J Cardiothorac Surg. 2012;41(4):734-745",
        "title": "EuroSCORE II"
      },
      "formula": "euroscore_ii",
      "formula_expression": "y = -5.324537 + 0.0285181*age_step + female + renal + extracardiac_arteriopathy + poor_mobility + previous_cardiac_surgery + chronic_lung_disease + active_endocarditis + critical_preoperative_state + insulin_dependent_diabetes + nyha + ccs_class_4 + lv_function + recent_mi + pulmonary_hypertension + urgency + weight_of_procedure + thoracic_aorta (Nashef 2012 Table 6 multivariable); age_step = 1 if age <= 60 else (age - 59); female 0.2196434; renal cc_gt_85 0, cc_51_85 0.303553, cc_le_50 0.8592256, dialysis 0.6421508; extracardiac_arteriopathy 0.5360268; poor_mobility 0.2407181; previous_cardiac_surgery 1.118599; chronic_lung_disease 0.1886564; active_endocarditis 0.6194522; critical_preoperative_state 1.086517; insulin_dependent_diabetes 0.3542749; nyha 1 0, 2 0.1070545, 3 0.2958358, 4 0.5597929; ccs_class_4 0.2226147; lv_function good 0, moderate 0.3150652, poor 0.8084096, very_poor 0.9346919; recent_mi 0.1528943; pulmonary_hypertension none 0, moderate 0.1788899, severe 0.3491475; urgency elective 0, urgent 0.3174673, emergency 0.7039121, salvage 1.362947; weight_of_procedure isolated_cabg 0, single_non_cabg 0.0062118, two 0.5521478, three_plus 0.9724533; thoracic_aorta 0.6527205; estimated_probability_percent = 100 * exp(y) / (1 + exp(y))",
      "sex": "male",
      "chronic_lung_disease": false,
      "estimated_probability_percent": 0.5,
      "logit": -5.296,
      "age_step": 1,
      "active_endocarditis": false,
      "ccs_class_4": false,
      "critical_preoperative_state": false,
      "extracardiac_arteriopathy": false,
      "insulin_dependent_diabetes": false,
      "lv_function": "good",
      "nyha": 1,
      "poor_mobility": false,
      "previous_cardiac_surgery": false,
      "pulmonary_hypertension": "none",
      "recent_mi": false,
      "renal": "cc_gt_85",
      "thoracic_aorta": false,
      "urgency": "elective",
      "weight_of_procedure": "isolated_cabg"
    },
    {
      "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.",
      "age_years": 60,
      "citation": {
        "authors": "Nashef SAM, Roques F, Sharples LD, Nilsson J, Smith C, Goldstone AR, Lockowandt U",
        "doi": "10.1093/ejcts/ezs043",
        "id": "nashef-2012",
        "pmid": "22378855",
        "source": "Eur J Cardiothorac Surg. 2012;41(4):734-745",
        "title": "EuroSCORE II"
      },
      "formula": "euroscore_ii",
      "formula_expression": "y = -5.324537 + 0.0285181*age_step + female + renal + extracardiac_arteriopathy + poor_mobility + previous_cardiac_surgery + chronic_lung_disease + active_endocarditis + critical_preoperative_state + insulin_dependent_diabetes + nyha + ccs_class_4 + lv_function + recent_mi + pulmonary_hypertension + urgency + weight_of_procedure + thoracic_aorta (Nashef 2012 Table 6 multivariable); age_step = 1 if age <= 60 else (age - 59); female 0.2196434; renal cc_gt_85 0, cc_51_85 0.303553, cc_le_50 0.8592256, dialysis 0.6421508; extracardiac_arteriopathy 0.5360268; poor_mobility 0.2407181; previous_cardiac_surgery 1.118599; chronic_lung_disease 0.1886564; active_endocarditis 0.6194522; critical_preoperative_state 1.086517; insulin_dependent_diabetes 0.3542749; nyha 1 0, 2 0.1070545, 3 0.2958358, 4 0.5597929; ccs_class_4 0.2226147; lv_function good 0, moderate 0.3150652, poor 0.8084096, very_poor 0.9346919; recent_mi 0.1528943; pulmonary_hypertension none 0, moderate 0.1788899, severe 0.3491475; urgency elective 0, urgent 0.3174673, emergency 0.7039121, salvage 1.362947; weight_of_procedure isolated_cabg 0, single_non_cabg 0.0062118, two 0.5521478, three_plus 0.9724533; thoracic_aorta 0.6527205; estimated_probability_percent = 100 * exp(y) / (1 + exp(y))",
      "sex": "male",
      "chronic_lung_disease": false,
      "estimated_probability_percent": 0.5,
      "logit": -5.296,
      "age_step": 1,
      "active_endocarditis": false,
      "ccs_class_4": false,
      "critical_preoperative_state": false,
      "extracardiac_arteriopathy": false,
      "insulin_dependent_diabetes": false,
      "lv_function": "good",
      "nyha": 1,
      "poor_mobility": false,
      "previous_cardiac_surgery": false,
      "pulmonary_hypertension": "none",
      "recent_mi": false,
      "renal": "cc_gt_85",
      "thoracic_aorta": false,
      "urgency": "elective",
      "weight_of_procedure": "isolated_cabg"
    }
  ]
}

Response

Field Type Description
formula string euroscore_ii
formula_expression string Nashef 2012 Table 6 logistic expression
age_years integer Input age in years
age_step integer Nashef 2012 age encoding: 1 if age <= 60, else age - 59
sex string male or female
renal string cc_gt_85, cc_51_85, cc_le_50, or dialysis
nyha integer NYHA class 1-4
lv_function string good, moderate, poor, or very_poor
urgency string elective, urgent, emergency, or salvage
weight_of_procedure string isolated_cabg, single_non_cabg, two, or three_plus
pulmonary_hypertension string none, moderate, or severe
extracardiac_arteriopathy boolean true if extracardiac arteriopathy
poor_mobility boolean true if poor mobility
previous_cardiac_surgery boolean true if previous cardiac surgery
chronic_lung_disease boolean true if chronic pulmonary dysfunction
active_endocarditis boolean true if active endocarditis
critical_preoperative_state boolean true if critical preoperative state
insulin_dependent_diabetes boolean true if insulin-dependent diabetes
ccs_class_4 boolean true if CCS class 4 angina
recent_mi boolean true if MI within 90 days
thoracic_aorta boolean true if surgery on the thoracic aorta
logit number Nashef 2012 Table 6 linear predictor y, 4 decimal places
estimated_probability_percent number 100 * exp(y) / (1 + exp(y)) from the unrounded logit, 2 decimal places. Estimated in-hospital mortality percent, not a clearance.
citation object Nashef et al. EuroSCORE II 2012 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.",
  "age_years": 60,
  "citation": {
    "authors": "Nashef SAM, Roques F, Sharples LD, Nilsson J, Smith C, Goldstone AR, Lockowandt U",
    "doi": "10.1093/ejcts/ezs043",
    "id": "nashef-2012",
    "pmid": "22378855",
    "source": "Eur J Cardiothorac Surg. 2012;41(4):734-745",
    "title": "EuroSCORE II"
  },
  "formula": "euroscore_ii",
  "formula_expression": "y = -5.324537 + 0.0285181*age_step + female + renal + extracardiac_arteriopathy + poor_mobility + previous_cardiac_surgery + chronic_lung_disease + active_endocarditis + critical_preoperative_state + insulin_dependent_diabetes + nyha + ccs_class_4 + lv_function + recent_mi + pulmonary_hypertension + urgency + weight_of_procedure + thoracic_aorta (Nashef 2012 Table 6 multivariable); age_step = 1 if age <= 60 else (age - 59); female 0.2196434; renal cc_gt_85 0, cc_51_85 0.303553, cc_le_50 0.8592256, dialysis 0.6421508; extracardiac_arteriopathy 0.5360268; poor_mobility 0.2407181; previous_cardiac_surgery 1.118599; chronic_lung_disease 0.1886564; active_endocarditis 0.6194522; critical_preoperative_state 1.086517; insulin_dependent_diabetes 0.3542749; nyha 1 0, 2 0.1070545, 3 0.2958358, 4 0.5597929; ccs_class_4 0.2226147; lv_function good 0, moderate 0.3150652, poor 0.8084096, very_poor 0.9346919; recent_mi 0.1528943; pulmonary_hypertension none 0, moderate 0.1788899, severe 0.3491475; urgency elective 0, urgent 0.3174673, emergency 0.7039121, salvage 1.362947; weight_of_procedure isolated_cabg 0, single_non_cabg 0.0062118, two 0.5521478, three_plus 0.9724533; thoracic_aorta 0.6527205; estimated_probability_percent = 100 * exp(y) / (1 + exp(y))",
  "sex": "male",
  "chronic_lung_disease": false,
  "estimated_probability_percent": 0.5,
  "logit": -5.296,
  "age_step": 1,
  "active_endocarditis": false,
  "ccs_class_4": false,
  "critical_preoperative_state": false,
  "extracardiac_arteriopathy": false,
  "insulin_dependent_diabetes": false,
  "lv_function": "good",
  "nyha": 1,
  "poor_mobility": false,
  "previous_cardiac_surgery": false,
  "pulmonary_hypertension": "none",
  "recent_mi": false,
  "renal": "cc_gt_85",
  "thoracic_aorta": false,
  "urgency": "elective",
  "weight_of_procedure": "isolated_cabg"
}

Client errors (HTTP 400)

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

HTTP Code When
400 invalid_euroscore_ii EuroSCORE II needs Nashef 2012 cardiac-surgery predictors in published ranges. 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

  • ACEF II — Compute the Ranucci 2018 ACEF II score from age, left-ventricular ejection fraction, serum creatinine, emergency surgery, and hematocrit.

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.