# STUMBL blunt chest wall trauma score

STUMBL

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

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

## What it computes

Sum Battle 2014 Table 4 STUMBL points from caller-assigned age, rib fracture count, chronic lung disease, preinjury anticoagulants, and SpO2, and return the Table 5 complication-probability band.

## When to use

When an agent has already assigned Battle 2014 Table 4 inputs after blunt chest wall trauma and needs the published integer STUMBL total and Table 5 band, not a chest exam, rib count, disposition, or ICU order.

## When not to use

- Not a medical device. magent does not examine the chest or count ribs. Rib count and SpO2 are caller-assigned.
- Not a disposition, discharge, ICU-admission, or anticoagulant order. Table 5 bands are published complication probabilities (13/29/52/70/80/88%), not later secondary-paper cutoffs.
- Age is an integer from 1 to 120 (1 point per decade starting at 10; not the adult 18–120 clamp). Rib count is an integer from 0 to 24. SpO2 is an integer from 50 to 100. No published point ceiling; Table 5 uses 31+ as the top band.

## Formula

```
STUMBL = div(age, 10) + 3*rib_count + chronic_lung_disease 5 + preinjury_anticoagulants 4 + spo2 (>=95 0 else 2*(1+div(94-spo2_percent, 5))); Battle 2014 Table 4; Table 5 0-10 13%, 11-15 29%, 16-20 52%, 21-25 70%, 26-30 80%, 31+ 88%
```

## Citation

[Predicting outcomes after blunt chest wall trauma: development and external validation of a new prognostic model](https://doi.org/10.1186/cc13873)
Battle CE, Hutchings H, Lovett S, Bouamra O, Jones S, Sen A, Gagg J, Robinson D, Hartford-Beynon J, Williams J, Evans A
Crit Care. 2014;18(3):R98
DOI: [10.1186/cc13873](https://doi.org/10.1186/cc13873)

## Worked example

### Paper 24-point example

Given: `age=67, chronic_lung_disease=true, preinjury_anticoagulants=false, rib_count=3, spo2_percent=87`

1. age 67 → 6; 3 ribs → 9; chronic lung true → 5; anticoagulants false → 0; SpO2 87 → 4
2. Score = 24; stumbl_band band_21_25; complication_probability_percent 70


### Zero-point child, no fractures

Given: `age=5, chronic_lung_disease=false, preinjury_anticoagulants=false, rib_count=0, spo2_percent=98`

1. age 5 → 0; 0 ribs → 0; flags false → 0; SpO2 98 → 0
2. Score = 0; stumbl_band band_0_10; complication_probability_percent 13


### Paper example plus anticoagulants

Given: `age=67, chronic_lung_disease=true, preinjury_anticoagulants=true, rib_count=3, spo2_percent=87`

1. paper 24 + anticoagulants 4
2. Score = 28; stumbl_band band_26_30; complication_probability_percent 80; icu_admission_cutoff true


## Also searched as

- STUMBL score
- Battle score
- blunt chest wall trauma score
- rib fracture complication score
- Battle 2014 prognostic model
- chest wall trauma risk score
- STUMBL Battle score

## Parameters

- `age` (integer, required): Age in years, integer 1–120. Battle 2014 Table 4: 1 point per additional 10-year increase starting at 10 (div(age, 10); age 10 scores 1, age 67 scores 6, age 1–9 scores 0). Not the adult 18–120 clamp.
- `rib_count` (integer, required): Caller-assigned number of rib fractures, integer 0–24. Battle 2014 Table 4: 3 points per additional rib fracture (3 ribs scores 9). magent does not examine the chest or count ribs.
- `chronic_lung_disease` (boolean, required): Pre-injury chronic lung disease as assigned by the caller (Battle 2014 Table 4). true or false. true scores 5.
- `preinjury_anticoagulants` (boolean, required): Pre-injury anticoagulant use as assigned by the caller (Battle 2014 Table 4). true or false. true scores 4.
- `spo2_percent` (integer, required): Oxygen saturation percent, integer 50–100. Battle 2014 Table 4 footnote c: 2 points per 5% decrease starting at 94% (≥95 scores 0; else 2*(1+div(94-spo2_percent, 5)); 87% scores 4). magent does not measure SpO2.

## 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/stumbl`
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": "67",
      "chronic_lung_disease": "true",
      "preinjury_anticoagulants": "false",
      "rib_count": "3",
      "spo2_percent": "87"
    },
    {
      "age": "67",
      "chronic_lung_disease": "true",
      "preinjury_anticoagulants": "false",
      "rib_count": "3",
      "spo2_percent": "87"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/stumbl",
  "items": [
    {
      "components": [
        {
          "value": 67,
          "factor": "age",
          "points": 6,
          "present": true
        },
        {
          "value": 3,
          "factor": "rib_count",
          "points": 9,
          "present": true
        },
        {
          "factor": "chronic_lung_disease",
          "points": 5,
          "present": true
        },
        {
          "factor": "preinjury_anticoagulants",
          "points": 0,
          "present": false
        },
        {
          "value": 87,
          "factor": "spo2_percent",
          "points": 4,
          "present": true
        }
      ],
      "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": "Battle CE, Hutchings H, Lovett S, Bouamra O, Jones S, Sen A, Gagg J, Robinson D, Hartford-Beynon J, Williams J, Evans A",
        "doi": "10.1186/cc13873",
        "id": "battle-2014",
        "pmid": "24887537",
        "source": "Crit Care. 2014;18(3):R98",
        "title": "Predicting outcomes after blunt chest wall trauma: development and external validation of a new prognostic model"
      },
      "formula": "stumbl",
      "formula_expression": "STUMBL = div(age, 10) + 3*rib_count + chronic_lung_disease 5 + preinjury_anticoagulants 4 + spo2 (>=95 0 else 2*(1+div(94-spo2_percent, 5))); Battle 2014 Table 4; Table 5 0-10 13%, 11-15 29%, 16-20 52%, 21-25 70%, 26-30 80%, 31+ 88%",
      "age_years": 67,
      "score": 24,
      "chronic_lung_disease": true,
      "spo2_percent": 87,
      "at_risk_for_complications": true,
      "complication_probability_percent": 70,
      "icu_admission_cutoff": false,
      "preinjury_anticoagulants": false,
      "rib_count": 3,
      "stumbl_band": "band_21_25"
    },
    {
      "components": [
        {
          "value": 67,
          "factor": "age",
          "points": 6,
          "present": true
        },
        {
          "value": 3,
          "factor": "rib_count",
          "points": 9,
          "present": true
        },
        {
          "factor": "chronic_lung_disease",
          "points": 5,
          "present": true
        },
        {
          "factor": "preinjury_anticoagulants",
          "points": 0,
          "present": false
        },
        {
          "value": 87,
          "factor": "spo2_percent",
          "points": 4,
          "present": true
        }
      ],
      "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": "Battle CE, Hutchings H, Lovett S, Bouamra O, Jones S, Sen A, Gagg J, Robinson D, Hartford-Beynon J, Williams J, Evans A",
        "doi": "10.1186/cc13873",
        "id": "battle-2014",
        "pmid": "24887537",
        "source": "Crit Care. 2014;18(3):R98",
        "title": "Predicting outcomes after blunt chest wall trauma: development and external validation of a new prognostic model"
      },
      "formula": "stumbl",
      "formula_expression": "STUMBL = div(age, 10) + 3*rib_count + chronic_lung_disease 5 + preinjury_anticoagulants 4 + spo2 (>=95 0 else 2*(1+div(94-spo2_percent, 5))); Battle 2014 Table 4; Table 5 0-10 13%, 11-15 29%, 16-20 52%, 21-25 70%, 26-30 80%, 31+ 88%",
      "age_years": 67,
      "score": 24,
      "chronic_lung_disease": true,
      "spo2_percent": 87,
      "at_risk_for_complications": true,
      "complication_probability_percent": 70,
      "icu_admission_cutoff": false,
      "preinjury_anticoagulants": false,
      "rib_count": 3,
      "stumbl_band": "band_21_25"
    }
  ]
}
```

## Response fields

- `formula` (string): stumbl
- `formula_expression` (string): Exact expression used
- `score` (integer): STUMBL / Battle integer points
- `stumbl_band` (string): Battle 2014 Table 5 band: band_0_10, band_11_15, band_16_20, band_21_25, band_26_30, or band_31_plus. A probability band, not a disposition or ICU order.
- `complication_probability_percent` (integer): Battle 2014 Table 5 predicted complication probability: 13, 29, 52, 70, 80, or 88
- `at_risk_for_complications` (boolean): true when score ≥11 (Battle 2014 at-risk-for-complications cutoff). Not a treatment order.
- `icu_admission_cutoff` (boolean): true when score ≥26 (Battle 2014 ICU-admission cutoff). Not an ICU admission order.
- `age_years` (integer): Age in years used for div(age, 10)
- `rib_count` (integer): Caller-assigned rib fracture count used
- `chronic_lung_disease` (boolean): Caller-assigned chronic lung disease flag used
- `preinjury_anticoagulants` (boolean): Caller-assigned pre-injury anticoagulant flag used
- `spo2_percent` (integer): Oxygen saturation percent used
- `components` (array): Per-factor points
- `citation` (object): Battle et al. Crit Care 2014 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": 67,
      "factor": "age",
      "points": 6,
      "present": true
    },
    {
      "value": 3,
      "factor": "rib_count",
      "points": 9,
      "present": true
    },
    {
      "factor": "chronic_lung_disease",
      "points": 5,
      "present": true
    },
    {
      "factor": "preinjury_anticoagulants",
      "points": 0,
      "present": false
    },
    {
      "value": 87,
      "factor": "spo2_percent",
      "points": 4,
      "present": true
    }
  ],
  "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": "Battle CE, Hutchings H, Lovett S, Bouamra O, Jones S, Sen A, Gagg J, Robinson D, Hartford-Beynon J, Williams J, Evans A",
    "doi": "10.1186/cc13873",
    "id": "battle-2014",
    "pmid": "24887537",
    "source": "Crit Care. 2014;18(3):R98",
    "title": "Predicting outcomes after blunt chest wall trauma: development and external validation of a new prognostic model"
  },
  "formula": "stumbl",
  "formula_expression": "STUMBL = div(age, 10) + 3*rib_count + chronic_lung_disease 5 + preinjury_anticoagulants 4 + spo2 (>=95 0 else 2*(1+div(94-spo2_percent, 5))); Battle 2014 Table 4; Table 5 0-10 13%, 11-15 29%, 16-20 52%, 21-25 70%, 26-30 80%, 31+ 88%",
  "age_years": 67,
  "score": 24,
  "chronic_lung_disease": true,
  "spo2_percent": 87,
  "at_risk_for_complications": true,
  "complication_probability_percent": 70,
  "icu_admission_cutoff": false,
  "preinjury_anticoagulants": false,
  "rib_count": 3,
  "stumbl_band": "band_21_25"
}
```

## Errors

- HTTP 400 `invalid_stumbl_age`: age must be an integer from 1 through 120 (Battle 2014 STUMBL; 1 point per decade starting at 10; not the adult 18-120 clamp). Returned before settlement; you are not charged.
- HTTP 400 `invalid_rib_count`: rib_count must be an integer from 0 through 24 (Battle 2014 STUMBL Table 4). Returned before settlement; you are not charged.
- HTTP 400 `invalid_spo2`: spo2_percent must be a number from 50 to 100. 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_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

- [ISS](https://magentlab.com/docs/iss) — Compute the Baker 1974 Injury Severity Score as the sum of squares of the three highest caller-assigned AIS body-region grades, or 75 if any region is AIS 6.
- [TASH score](https://magentlab.com/docs/tash) — Sum the seven Yücel 2006 TASH (Trauma Associated Severe Hemorrhage) nested less-than point bands and return the published 0–28 total as a surrogate for mass transfusion after multiple trauma.

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