# ORBI STEMI cardiogenic shock score

ORBI

Status: LIVE
Price: $0.005 USDC
`GET /api/calc/orbi`
HTML: https://magentlab.com/docs/orbi
Markdown: https://magentlab.com/docs/orbi.md

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

## What it computes

Sum the Auffret 2018 ORBI predictors after STEMI primary PCI and return the integer score (0-36), class I-IV, and derivation-cohort in-hospital cardiogenic-shock percent.

## When to use

When an agent needs the published ORBI point total after STEMI treated by primary PCI and must not invent a shock-treatment order, a cath-lab protocol, or the ORBIT bleeding score.

## When not to use

- Not a medical device and not a cath-lab, reperfusion, or shock-treatment order. magent does not examine the patient, read the ECG, or assign TIMI flow.
- Killip class is i, ii, or iii as assigned by the caller. Killip IV (cardiogenic shock on admission) is rejected because the derivation excluded those patients.
- SBP <125 mm Hg and pulse pressure <45 mm Hg is a single caller-assigned boolean (sbp_lt_125_and_pp_lt_45). magent does not take separate SBP or pulse-pressure numbers.
- Class percents are the Auffret 2018 derivation-cohort observed in-hospital cardiogenic-shock rates (I 1.3%, II 6.6%, III 11.7%, IV 31.8%). Validation-cohort rates differ and are not returned.
- Not the O'Brien 2015 ORBIT bleeding score. Integer weights round the multivariable adjusted odds ratios; theoretical maximum 36.

## Formula

```
ORBI = age_years>70 (2) + prior_stroke_tia (2) + cardiac_arrest_on_admission (3) + anterior_stemi (1) + fmc_to_ppci_gt_90_min (2) + killip_class (i:0, ii:2, iii:6; iv rejected) + heart_rate>90 (3) + sbp_lt_125_and_pp_lt_45 (4) + glucose_gt_10_mmol_l (3) + left_main_culprit (5) + post_ppci_timi_lt_3 (5); Auffret 2018 rounded adjusted ORs; max 36; derivation in-hospital CS class I 0-7 1.3%, II 8-10 6.6%, III 11-12 11.7%, IV >=13 31.8%
```

## Citation

[Predicting the development of in-hospital cardiogenic shock in patients with ST-segment elevation myocardial infarction treated by primary percutaneous coronary intervention: the ORBI risk score](https://doi.org/10.1093/eurheartj/ehy127)
Auffret V, Cottin Y, Leurent G, et al.
Eur Heart J. 2018;39(22):2090-2102
DOI: [10.1093/eurheartj/ehy127](https://doi.org/10.1093/eurheartj/ehy127)

## Worked example

### No risk flags, age 60, Killip I, heart rate 70

Given: `age_years=60, anterior_stemi=false, cardiac_arrest_on_admission=false, fmc_to_ppci_gt_90_min=false, glucose_gt_10_mmol_l=false, heart_rate=70, killip_class=i, left_main_culprit=false, post_ppci_timi_lt_3=false, prior_stroke_tia=false, sbp_lt_125_and_pp_lt_45=false`

1. age_years 60 is not >70 → 0; all boolean flags false → 0; killip i → 0; heart_rate 70 is not >90 → 0
2. score = 0 (max 36); class I; derivation in-hospital CS 1.3%


### All predictors present (theoretical max 36)

Given: `age_years=71, anterior_stemi=true, cardiac_arrest_on_admission=true, fmc_to_ppci_gt_90_min=true, glucose_gt_10_mmol_l=true, heart_rate=91, killip_class=iii, left_main_culprit=true, post_ppci_timi_lt_3=true, prior_stroke_tia=true, sbp_lt_125_and_pp_lt_45=true`

1. age_years 71 → 2; stroke/TIA 2; arrest 3; anterior 1; FMC>90 2; killip iii 6; HR>90 3; SBP/PP 4; glucose 3; left main 5; TIMI<3 5
2. score = 36 (max 36); class IV; derivation in-hospital CS 31.8%


## Also searched as

- ORBI risk score
- Auffret STEMI shock score
- STEMI in-hospital cardiogenic shock
- ORBI class
- primary PCI shock score
- FMC to PPCI ORBI
- ORBI STEMI PPCI
- Auffret 2018 ORBI

## Parameters

- `age_years` (integer, required): Age in years (18-120). Auffret 2018: older than 70 scores 2; 70 or younger scores 0.
- `prior_stroke_tia` (boolean, required): Prior stroke or TIA (Auffret 2018: 2 points). true or false.
- `cardiac_arrest_on_admission` (boolean, required): Cardiac arrest on admission (Auffret 2018: 3 points). true or false.
- `anterior_stemi` (boolean, required): Anterior ST-elevation myocardial infarction (Auffret 2018: 1 point). Caller-assigned. magent does not read the ECG.
- `fmc_to_ppci_gt_90_min` (boolean, required): First medical contact to primary PCI greater than 90 minutes (Auffret 2018: 2 points). true or false. magent does not compute timestamps.
- `killip_class` (string, required): Caller-assigned Killip class after STEMI (Auffret 2018): i (0), ii (2), or iii (6). Killip IV is rejected because the derivation excluded cardiogenic shock on admission. magent does not examine the patient.
- `heart_rate` (integer, required): Heart rate in beats per minute (integer 30-220). Auffret 2018: greater than 90 scores 3.
- `sbp_lt_125_and_pp_lt_45` (boolean, required): Whether systolic BP is <125 mm Hg and pulse pressure is <45 mm Hg together (Auffret 2018: 4 points). Single caller-assigned boolean; magent does not take separate SBP or pulse-pressure numbers.
- `glucose_gt_10_mmol_l` (boolean, required): Admission glucose >10 mmol/L (Auffret 2018: 3 points). true or false. magent does not convert units.
- `left_main_culprit` (boolean, required): Whether the culprit lesion is the left main coronary artery (Auffret 2018: 5 points). Caller-assigned. magent does not read the angiogram.
- `post_ppci_timi_lt_3` (boolean, required): Whether post-primary-PCI TIMI flow is <3 (Auffret 2018: 5 points). Caller-assigned. magent does not assign TIMI flow.

## 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.

Method: `POST /api/calc/orbi`
Max items: 25
Price: unit_amount + extra_item_amount * (n - 1) (unit 5000 atomic, extra 2000 atomic)
Status: 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:

```json
{
  "items": [
    {
      "age_years": "60",
      "anterior_stemi": "false",
      "cardiac_arrest_on_admission": "false",
      "fmc_to_ppci_gt_90_min": "false",
      "glucose_gt_10_mmol_l": "false",
      "heart_rate": "70",
      "killip_class": "i",
      "left_main_culprit": "false",
      "post_ppci_timi_lt_3": "false",
      "prior_stroke_tia": "false",
      "sbp_lt_125_and_pp_lt_45": "false"
    },
    {
      "age_years": "60",
      "anterior_stemi": "false",
      "cardiac_arrest_on_admission": "false",
      "fmc_to_ppci_gt_90_min": "false",
      "glucose_gt_10_mmol_l": "false",
      "heart_rate": "70",
      "killip_class": "i",
      "left_main_culprit": "false",
      "post_ppci_timi_lt_3": "false",
      "prior_stroke_tia": "false",
      "sbp_lt_125_and_pp_lt_45": "false"
    }
  ]
}
```

Human paywall (two-item fixture): https://api.magentlab.com/paywall/bulk/orbi

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/orbi",
  "items": [
    {
      "components": [
        {
          "value": 60,
          "factor": "age_years",
          "points": 0,
          "present": false
        },
        {
          "value": "i",
          "factor": "killip_class",
          "points": 0,
          "present": false
        },
        {
          "value": 70,
          "factor": "heart_rate",
          "points": 0,
          "present": false
        },
        {
          "factor": "prior_stroke_tia",
          "points": 0,
          "present": false
        },
        {
          "factor": "cardiac_arrest_on_admission",
          "points": 0,
          "present": false
        },
        {
          "factor": "anterior_stemi",
          "points": 0,
          "present": false
        },
        {
          "factor": "fmc_to_ppci_gt_90_min",
          "points": 0,
          "present": false
        },
        {
          "factor": "sbp_lt_125_and_pp_lt_45",
          "points": 0,
          "present": false
        },
        {
          "factor": "glucose_gt_10_mmol_l",
          "points": 0,
          "present": false
        },
        {
          "factor": "left_main_culprit",
          "points": 0,
          "present": false
        },
        {
          "factor": "post_ppci_timi_lt_3",
          "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": "Auffret V, Cottin Y, Leurent G, et al.",
        "doi": "10.1093/eurheartj/ehy127",
        "id": "auffret-2018",
        "pmid": "29554243",
        "source": "Eur Heart J. 2018;39(22):2090-2102",
        "title": "Predicting the development of in-hospital cardiogenic shock in patients with ST-segment elevation myocardial infarction treated by primary percutaneous coronary intervention: the ORBI risk score"
      },
      "formula": "orbi",
      "formula_expression": "ORBI = age_years>70 (2) + prior_stroke_tia (2) + cardiac_arrest_on_admission (3) + anterior_stemi (1) + fmc_to_ppci_gt_90_min (2) + killip_class (i:0, ii:2, iii:6; iv rejected) + heart_rate>90 (3) + sbp_lt_125_and_pp_lt_45 (4) + glucose_gt_10_mmol_l (3) + left_main_culprit (5) + post_ppci_timi_lt_3 (5); Auffret 2018 rounded adjusted ORs; max 36; derivation in-hospital CS class I 0-7 1.3%, II 8-10 6.6%, III 11-12 11.7%, IV >=13 31.8%",
      "max_score": 36,
      "score": 0,
      "age_years": 60,
      "killip_class": "i",
      "heart_rate": 70,
      "in_hospital_cs_percent": 1.3,
      "orbi_class": "I"
    },
    {
      "components": [
        {
          "value": 60,
          "factor": "age_years",
          "points": 0,
          "present": false
        },
        {
          "value": "i",
          "factor": "killip_class",
          "points": 0,
          "present": false
        },
        {
          "value": 70,
          "factor": "heart_rate",
          "points": 0,
          "present": false
        },
        {
          "factor": "prior_stroke_tia",
          "points": 0,
          "present": false
        },
        {
          "factor": "cardiac_arrest_on_admission",
          "points": 0,
          "present": false
        },
        {
          "factor": "anterior_stemi",
          "points": 0,
          "present": false
        },
        {
          "factor": "fmc_to_ppci_gt_90_min",
          "points": 0,
          "present": false
        },
        {
          "factor": "sbp_lt_125_and_pp_lt_45",
          "points": 0,
          "present": false
        },
        {
          "factor": "glucose_gt_10_mmol_l",
          "points": 0,
          "present": false
        },
        {
          "factor": "left_main_culprit",
          "points": 0,
          "present": false
        },
        {
          "factor": "post_ppci_timi_lt_3",
          "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": "Auffret V, Cottin Y, Leurent G, et al.",
        "doi": "10.1093/eurheartj/ehy127",
        "id": "auffret-2018",
        "pmid": "29554243",
        "source": "Eur Heart J. 2018;39(22):2090-2102",
        "title": "Predicting the development of in-hospital cardiogenic shock in patients with ST-segment elevation myocardial infarction treated by primary percutaneous coronary intervention: the ORBI risk score"
      },
      "formula": "orbi",
      "formula_expression": "ORBI = age_years>70 (2) + prior_stroke_tia (2) + cardiac_arrest_on_admission (3) + anterior_stemi (1) + fmc_to_ppci_gt_90_min (2) + killip_class (i:0, ii:2, iii:6; iv rejected) + heart_rate>90 (3) + sbp_lt_125_and_pp_lt_45 (4) + glucose_gt_10_mmol_l (3) + left_main_culprit (5) + post_ppci_timi_lt_3 (5); Auffret 2018 rounded adjusted ORs; max 36; derivation in-hospital CS class I 0-7 1.3%, II 8-10 6.6%, III 11-12 11.7%, IV >=13 31.8%",
      "max_score": 36,
      "score": 0,
      "age_years": 60,
      "killip_class": "i",
      "heart_rate": 70,
      "in_hospital_cs_percent": 1.3,
      "orbi_class": "I"
    }
  ]
}
```

## Response fields

- `formula` (string): orbi
- `formula_expression` (string): Exact expression used
- `score` (integer): ORBI points 0-36
- `max_score` (integer): 36
- `orbi_class` (string): Auffret 2018 class I (0-7), II (8-10), III (11-12), or IV (>=13)
- `in_hospital_cs_percent` (number): Derivation-cohort observed in-hospital cardiogenic-shock percent: 1.3, 6.6, 11.7, or 31.8
- `age_years` (integer): Age in years used
- `killip_class` (string): Caller-assigned Killip i, ii, or iii
- `heart_rate` (integer): Heart rate used, beats per minute
- `components` (array): Per-factor points
- `citation` (object): Auffret et al. Eur Heart J 2018 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": 60,
      "factor": "age_years",
      "points": 0,
      "present": false
    },
    {
      "value": "i",
      "factor": "killip_class",
      "points": 0,
      "present": false
    },
    {
      "value": 70,
      "factor": "heart_rate",
      "points": 0,
      "present": false
    },
    {
      "factor": "prior_stroke_tia",
      "points": 0,
      "present": false
    },
    {
      "factor": "cardiac_arrest_on_admission",
      "points": 0,
      "present": false
    },
    {
      "factor": "anterior_stemi",
      "points": 0,
      "present": false
    },
    {
      "factor": "fmc_to_ppci_gt_90_min",
      "points": 0,
      "present": false
    },
    {
      "factor": "sbp_lt_125_and_pp_lt_45",
      "points": 0,
      "present": false
    },
    {
      "factor": "glucose_gt_10_mmol_l",
      "points": 0,
      "present": false
    },
    {
      "factor": "left_main_culprit",
      "points": 0,
      "present": false
    },
    {
      "factor": "post_ppci_timi_lt_3",
      "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": "Auffret V, Cottin Y, Leurent G, et al.",
    "doi": "10.1093/eurheartj/ehy127",
    "id": "auffret-2018",
    "pmid": "29554243",
    "source": "Eur Heart J. 2018;39(22):2090-2102",
    "title": "Predicting the development of in-hospital cardiogenic shock in patients with ST-segment elevation myocardial infarction treated by primary percutaneous coronary intervention: the ORBI risk score"
  },
  "formula": "orbi",
  "formula_expression": "ORBI = age_years>70 (2) + prior_stroke_tia (2) + cardiac_arrest_on_admission (3) + anterior_stemi (1) + fmc_to_ppci_gt_90_min (2) + killip_class (i:0, ii:2, iii:6; iv rejected) + heart_rate>90 (3) + sbp_lt_125_and_pp_lt_45 (4) + glucose_gt_10_mmol_l (3) + left_main_culprit (5) + post_ppci_timi_lt_3 (5); Auffret 2018 rounded adjusted ORs; max 36; derivation in-hospital CS class I 0-7 1.3%, II 8-10 6.6%, III 11-12 11.7%, IV >=13 31.8%",
  "max_score": 36,
  "score": 0,
  "age_years": 60,
  "killip_class": "i",
  "heart_rate": 70,
  "in_hospital_cs_percent": 1.3,
  "orbi_class": "I"
}
```

## Errors

- HTTP 400 `invalid_orbi`: ORBI needs Auffret 2018 STEMI shock predictors (Killip I–III, hemodynamics, lesion, TIMI) in published ranges. Returned before settlement; you are not charged.
- HTTP 400 `invalid_items`: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.
- HTTP 400 `invalid_item_count`: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.
- HTTP 400 `invalid_item`: each items entry must be a JSON object Returned before settlement; you are not charged.

Shared HTTP 402 and 503: https://magentlab.com/docs/payments

## Related tools

- [Killip](https://magentlab.com/docs/killip) — Return the Killip and Kimball 1967 myocardial-infarction heart-failure class 1-4 from a caller-assigned integer, with the published class description and 1967 CCU hospital mortality.
- [Shock index](https://magentlab.com/docs/shock-index) — Compute the Allgöwer–Burri shock index as heart rate in bpm divided by cuff systolic pressure in mm Hg.

## 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.

- GET the tool with Accept: application/json (do not send Accept: text/html unless you want the human paywall).
- HTTP 402 means you have not paid. Decode the base64 PAYMENT-REQUIRED header. HTTP 503 is not a new quote.
- Sign accepts[0] (exact, EIP-3009) with validBefore = now + maxTimeoutSeconds (600 seconds), or accepts[1] (batch-settlement deposit/voucher) on product GET. Ping and POST {items} stay exact. Magent retries transient facilitator 429/5xx before answering.
- Retry the same URL with PAYMENT-SIGNATURE (base64 JSON of accepted and payload). Magent attaches canonical extensions.bazaar on CDP verify/settle; echoing 402 bazaar is optional.
- Success is HTTP 200 JSON plus PAYMENT-RESPONSE. exact settles before the tool. batch-settlement verifies (and deposit-settles) before the tool and commits the charge after HTTP 2xx. HTTP 503: retry the same PAYMENT-SIGNATURE. Mint a new exact nonce only after a new HTTP 402.

- offered `exact` on eip155:8453: Fixed-price USDC on Base. The buyer authorizes the advertised amount (EIP-3009). magent settles before the tool runs (paymentFlow upfront). extra.assetTransferMethod=eip3009 extra.paymentFlow=upfront.
- offered `batch-settlement` on eip155:8453: Payment-channel vouchers claimed later in batches. Exact stays accepts[0]. Same-path POST {items} is still exact. extra.assetTransferMethod=eip3009 extra.paymentFlow=authorization.

- not offered `upto`: Not offered. Usage-based: buyer authorizes a ceiling, seller settles the actual amount after work. Reserved for a future metered tool. Not for current calculators or code search.

Same-path POST {items} is still scheme exact: one EIP-3009 authorization for GET unit plus $0.002 per extra item. That is not x402 batch-settlement (payment channels / vouchers).

Shared HTTP 402 and 503 table: https://magentlab.com/docs/payments

Stdio MCP (one process per host): https://magentlab.com/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.
