# ACTION ICU score (Fanaroff)

ACTION ICU score

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

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

## What it computes

Compute the Fanaroff 2018 ACTION ICU integer score (Table 3, max 19) from age, serum creatinine, heart rate, systolic BP, initial troponin × ULN, and caller-assigned heart-failure signs, ST depression, prior revascularization, and chronic lung disease.

## When to use

When an agent needs the published Fanaroff 2018 Table 3 ACTION ICU integer total for initially hemodynamically stable NSTEMI and must not invent an ICU triage order or read an ECG.

## When not to use

- Not a medical device and not a triage order, ICU-admission decision, or diagnosis.
- magent does not read the ECG or assay labs. ST depression, troponin × ULN, heart-failure signs, prior revascularization, and chronic lung disease are caller-assigned.
- This is the Fanaroff 2018 Table 3 integer score (0–19) only. Lower systolic BP scores more. Absence of prior revascularization scores 1.
- Table 3 lists overlapping inclusive bounds at heart rate 100 (85–100 and ≥100) and systolic BP 145 (125–145 and ≥145). magent assigns each overlapping bound to the ≥ row (100 → 3; 145 → 0).
- Fanaroff 2018 describes score ≤2 as very low (<5% ICU-complication likelihood), ≤5 as <10%, and ≥12 as >30%. Those are published thresholds, not exclusive named bands. magent returns the integer score and does not invent a 4-band enum for the unnamed 6–11 remainder.
- Derivation was initially hemodynamically stable NSTEMI in the ACTION Registry. This is not a STEMI score and not HEART or TIMI.

## Formula

```
ACTION ICU = age(<70:0, >=70:1) + creatinine_mg_dl(<1.1:0, >=1.1:1) + heart_rate_bpm(<85:0, 85-<100:1, >=100:3) + systolic_mm_hg(<125:3, 125-<145:1, >=145:0) + troponin_x_uln(<12:0, >=12:2) + heart_failure(5) + st_depression(1) + no_prior_revascularization(1) + chronic_lung_disease(2); Fanaroff 2018 Table 3; max 19; overlapping Table 3 bounds at HR 100 and SBP 145 use the >= row; score <=2 very low (<5% ICU-complication likelihood); <=5 <10%; >=12 >30%
```

## Citation

[Risk Score to Predict Need for Intensive Care in Initially Hemodynamically Stable Adults With Non–ST-Segment–Elevation Myocardial Infarction](https://doi.org/10.1161/JAHA.118.008894)
Fanaroff AC, Chen AY, Thomas LE, et al
J Am Heart Assoc. 2018;7(11):e008894
DOI: [10.1161/JAHA.118.008894](https://doi.org/10.1161/JAHA.118.008894)

## Worked example

### Paper example age 66 with no Table 3 points (score 0)

Given: `age=66, chronic_lung_disease=false, creatinine_mg_dl=1.0, heart_failure=false, heart_rate_bpm=80, prior_revascularization=true, st_depression=false, systolic_mm_hg=150, troponin_x_uln=1`

1. Age 66 <70 → 0; creatinine 1.0 mg/dL <1.1 → 0; heart rate 80 <85 → 0; SBP 150 ≥145 → 0; troponin 1× ULN <12 → 0
2. No HF → 0; no ST depression → 0; prior revascularization present → 0; no chronic lung disease → 0
3. Score = 0 (max 19)


## Also searched as

- ACTION ICU score
- ACTION ICU risk score
- Fanaroff ICU score
- NSTEMI ICU score
- intensive care NSTEMI score
- ACTION Registry ICU score

## Parameters

- `age` (integer, required): Age in years (18-120). Fanaroff 2018 Table 3: younger than 70 scores 0; 70 or older scores 1.
- `creatinine_mg_dl` (number, required): Serum creatinine in mg/dL (0.1-20), or creatinine_umol_l (9-1768) converted as mg/dL = µmol/L / 88.42. Table 3: <1.1 → 0; ≥1.1 → 1. magent does not assay labs.
- `heart_rate_bpm` (integer, required): Heart rate in beats per minute (integer 30-220). Table 3 lists <85 → 0; 85–100 → 1; ≥100 → 3. The overlapping bound at 100 uses the ≥100 row (3 points).
- `systolic_mm_hg` (number, required): Systolic blood pressure in mm Hg (50-250). Table 3: <125 → 3; 125–145 → 1; ≥145 → 0. Lower SBP scores more. The overlapping bound at 145 uses the ≥145 row (0 points).
- `troponin_x_uln` (number, required): Initial troponin as a multiple of the local upper limit of normal (0-1000). Table 3: <12 → 0; ≥12 → 2. magent does not assay labs; the caller assigns the ratio.
- `heart_failure` (boolean, required): Signs or symptoms of heart failure on first medical contact as assigned by the caller (Fanaroff 2018 Table 3). true or false. 5 points if true. magent does not examine the patient.
- `st_depression` (boolean, required): ST-segment depression on the ECG as assigned by the caller (Fanaroff 2018 Table 3). true or false. 1 point if true. magent does not read an ECG.
- `prior_revascularization` (boolean, required): Prior coronary revascularization as assigned by the caller (Fanaroff 2018 Table 3). true or false. Absence of prior revascularization scores 1; presence scores 0.
- `chronic_lung_disease` (boolean, required): Chronic lung disease as assigned by the caller (Fanaroff 2018 Table 3). true or false. 2 points if true.

## 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/action_icu`
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": "66",
      "chronic_lung_disease": "false",
      "creatinine_mg_dl": "1.0",
      "heart_failure": "false",
      "heart_rate_bpm": "80",
      "prior_revascularization": "true",
      "st_depression": "false",
      "systolic_mm_hg": "150",
      "troponin_x_uln": "1"
    },
    {
      "age": "66",
      "chronic_lung_disease": "false",
      "creatinine_mg_dl": "1.0",
      "heart_failure": "false",
      "heart_rate_bpm": "80",
      "prior_revascularization": "true",
      "st_depression": "false",
      "systolic_mm_hg": "150",
      "troponin_x_uln": "1"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/action_icu",
  "items": [
    {
      "components": [
        {
          "value": 66,
          "factor": "age",
          "points": 0,
          "present": false
        },
        {
          "value": 1.0,
          "factor": "creatinine_mg_dl",
          "points": 0,
          "present": false
        },
        {
          "value": 80,
          "factor": "heart_rate_bpm",
          "points": 0,
          "present": false
        },
        {
          "value": 150.0,
          "factor": "systolic_mm_hg",
          "points": 0,
          "present": false
        },
        {
          "value": 1.0,
          "factor": "troponin_x_uln",
          "points": 0,
          "present": false
        },
        {
          "factor": "heart_failure",
          "points": 0,
          "present": false
        },
        {
          "factor": "st_depression",
          "points": 0,
          "present": false
        },
        {
          "value": true,
          "factor": "prior_revascularization",
          "points": 0,
          "present": false
        },
        {
          "factor": "chronic_lung_disease",
          "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": "Fanaroff AC, Chen AY, Thomas LE, et al",
        "doi": "10.1161/JAHA.118.008894",
        "id": "fanaroff-2018",
        "pmid": "29802146",
        "source": "J Am Heart Assoc. 2018;7(11):e008894",
        "title": "Risk Score to Predict Need for Intensive Care in Initially Hemodynamically Stable Adults With Non–ST-Segment–Elevation Myocardial Infarction"
      },
      "formula": "action_icu",
      "formula_expression": "ACTION ICU = age(<70:0, >=70:1) + creatinine_mg_dl(<1.1:0, >=1.1:1) + heart_rate_bpm(<85:0, 85-<100:1, >=100:3) + systolic_mm_hg(<125:3, 125-<145:1, >=145:0) + troponin_x_uln(<12:0, >=12:2) + heart_failure(5) + st_depression(1) + no_prior_revascularization(1) + chronic_lung_disease(2); Fanaroff 2018 Table 3; max 19; overlapping Table 3 bounds at HR 100 and SBP 145 use the >= row; score <=2 very low (<5% ICU-complication likelihood); <=5 <10%; >=12 >30%",
      "systolic_mm_hg": 150.0,
      "age_years": 66,
      "max_score": 19,
      "score": 0,
      "creatinine_mg_dl": 1.0,
      "chronic_lung_disease": false,
      "heart_failure": false,
      "heart_rate_bpm": 80,
      "prior_revascularization": true,
      "st_depression": false,
      "troponin_x_uln": 1.0
    },
    {
      "components": [
        {
          "value": 66,
          "factor": "age",
          "points": 0,
          "present": false
        },
        {
          "value": 1.0,
          "factor": "creatinine_mg_dl",
          "points": 0,
          "present": false
        },
        {
          "value": 80,
          "factor": "heart_rate_bpm",
          "points": 0,
          "present": false
        },
        {
          "value": 150.0,
          "factor": "systolic_mm_hg",
          "points": 0,
          "present": false
        },
        {
          "value": 1.0,
          "factor": "troponin_x_uln",
          "points": 0,
          "present": false
        },
        {
          "factor": "heart_failure",
          "points": 0,
          "present": false
        },
        {
          "factor": "st_depression",
          "points": 0,
          "present": false
        },
        {
          "value": true,
          "factor": "prior_revascularization",
          "points": 0,
          "present": false
        },
        {
          "factor": "chronic_lung_disease",
          "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": "Fanaroff AC, Chen AY, Thomas LE, et al",
        "doi": "10.1161/JAHA.118.008894",
        "id": "fanaroff-2018",
        "pmid": "29802146",
        "source": "J Am Heart Assoc. 2018;7(11):e008894",
        "title": "Risk Score to Predict Need for Intensive Care in Initially Hemodynamically Stable Adults With Non–ST-Segment–Elevation Myocardial Infarction"
      },
      "formula": "action_icu",
      "formula_expression": "ACTION ICU = age(<70:0, >=70:1) + creatinine_mg_dl(<1.1:0, >=1.1:1) + heart_rate_bpm(<85:0, 85-<100:1, >=100:3) + systolic_mm_hg(<125:3, 125-<145:1, >=145:0) + troponin_x_uln(<12:0, >=12:2) + heart_failure(5) + st_depression(1) + no_prior_revascularization(1) + chronic_lung_disease(2); Fanaroff 2018 Table 3; max 19; overlapping Table 3 bounds at HR 100 and SBP 145 use the >= row; score <=2 very low (<5% ICU-complication likelihood); <=5 <10%; >=12 >30%",
      "systolic_mm_hg": 150.0,
      "age_years": 66,
      "max_score": 19,
      "score": 0,
      "creatinine_mg_dl": 1.0,
      "chronic_lung_disease": false,
      "heart_failure": false,
      "heart_rate_bpm": 80,
      "prior_revascularization": true,
      "st_depression": false,
      "troponin_x_uln": 1.0
    }
  ]
}
```

## Response fields

- `formula` (string): action_icu
- `formula_expression` (string): Exact expression used
- `score` (integer): Fanaroff 2018 Table 3 point total (integer, max 19)
- `max_score` (integer): Always 19 (sum of Table 3 maxima)
- `age_years` (integer): Age used for the <70 / ≥70 bands
- `creatinine_mg_dl` (number): Serum creatinine used, mg/dL
- `heart_rate_bpm` (integer): Heart rate used, beats per minute
- `systolic_mm_hg` (number): Systolic BP used, mm Hg
- `troponin_x_uln` (number): Caller-assigned initial troponin as a multiple of local ULN
- `heart_failure` (boolean): Caller-assigned signs or symptoms of HF
- `st_depression` (boolean): Caller-assigned ST-segment depression
- `prior_revascularization` (boolean): Caller-assigned prior coronary revascularization (true scores 0; false scores 1)
- `chronic_lung_disease` (boolean): Caller-assigned chronic lung disease
- `components` (array): Per-factor Table 3 points
- `citation` (object): Fanaroff 2018 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": 66,
      "factor": "age",
      "points": 0,
      "present": false
    },
    {
      "value": 1.0,
      "factor": "creatinine_mg_dl",
      "points": 0,
      "present": false
    },
    {
      "value": 80,
      "factor": "heart_rate_bpm",
      "points": 0,
      "present": false
    },
    {
      "value": 150.0,
      "factor": "systolic_mm_hg",
      "points": 0,
      "present": false
    },
    {
      "value": 1.0,
      "factor": "troponin_x_uln",
      "points": 0,
      "present": false
    },
    {
      "factor": "heart_failure",
      "points": 0,
      "present": false
    },
    {
      "factor": "st_depression",
      "points": 0,
      "present": false
    },
    {
      "value": true,
      "factor": "prior_revascularization",
      "points": 0,
      "present": false
    },
    {
      "factor": "chronic_lung_disease",
      "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": "Fanaroff AC, Chen AY, Thomas LE, et al",
    "doi": "10.1161/JAHA.118.008894",
    "id": "fanaroff-2018",
    "pmid": "29802146",
    "source": "J Am Heart Assoc. 2018;7(11):e008894",
    "title": "Risk Score to Predict Need for Intensive Care in Initially Hemodynamically Stable Adults With Non–ST-Segment–Elevation Myocardial Infarction"
  },
  "formula": "action_icu",
  "formula_expression": "ACTION ICU = age(<70:0, >=70:1) + creatinine_mg_dl(<1.1:0, >=1.1:1) + heart_rate_bpm(<85:0, 85-<100:1, >=100:3) + systolic_mm_hg(<125:3, 125-<145:1, >=145:0) + troponin_x_uln(<12:0, >=12:2) + heart_failure(5) + st_depression(1) + no_prior_revascularization(1) + chronic_lung_disease(2); Fanaroff 2018 Table 3; max 19; overlapping Table 3 bounds at HR 100 and SBP 145 use the >= row; score <=2 very low (<5% ICU-complication likelihood); <=5 <10%; >=12 >30%",
  "systolic_mm_hg": 150.0,
  "age_years": 66,
  "max_score": 19,
  "score": 0,
  "creatinine_mg_dl": 1.0,
  "chronic_lung_disease": false,
  "heart_failure": false,
  "heart_rate_bpm": 80,
  "prior_revascularization": true,
  "st_depression": false,
  "troponin_x_uln": 1.0
}
```

## Errors

- HTTP 400 `invalid_age`: age must be an integer from 18 to 120 Returned before settlement; you are not charged.
- HTTP 400 `invalid_creatinine`: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.
- HTTP 400 `invalid_heart_rate`: heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.
- HTTP 400 `invalid_systolic_bp`: systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.
- HTTP 400 `invalid_troponin_uln`: troponin_x_uln must be a number from 0 to 1000 (ratio to the local ULN). Returned before settlement; you are not charged.
- HTTP 400 `invalid_flag`: boolean clinical flags must be true or false Returned before settlement; you are not charged.
- HTTP 400 `invalid_action_icu`: each ACTION ICU 2018 item must be a published value for that field. 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

- [HEART score](https://magentlab.com/docs/heart) — Compute the HEART score as age points plus caller-assigned history, ECG, risk factors, and troponin (each 0-2).

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