# Revised Intensity Battle Score (RIBS)

RIBS

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

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

## What it computes

Sum Buchholz 2023 RIBS regression points from caller-assigned rib-level fracture count, chest tube, pulmonary contusions, COPD, and GCS <15, and return the integer score and the published score-12 ICU triage band.

## When to use

When an agent already has caller-assigned Buchholz 2023 inputs after rib fractures and needs the published RIBS total and score-12 band, not a CT rib count, GCS exam, Chapman 2016 RibScore, Battle 2014 STUMBL, diagnosis, or surgical plan.

## When not to use

- Not a medical device. Not a diagnosis, disposition, ICU-admission, or surgical plan.
- Not Chapman 2016 RibScore (six radiographic flags, integer 0–6 at /api/calc/ribscore). RIBS is the Buchholz 2023 Revised Intensity Battle Score.
- Not Battle 2014 STUMBL. Age is not a component; the paper found age was not predictive.
- magent does not read a CT, count ribs, or compute GCS. Rib count is rib level, not individual fracture count. Chest tube, pulmonary contusions, and COPD are caller-assigned flags.

## Formula

```
RIBS = round(2.275*rib_count + 1.525*pulmonary_contusions + 2.83*copd + 4.08*chest_tube + 8.137*(gcs<15)); Buchholz 2023; rib level not fracture count; age is not a component; ICU triage cutoff 12; not Chapman 2016 RibScore; not Battle 2014 STUMBL
```

## Citation

[Revised Intensity Battle Score (RIBS): Development of a Clinical Score for Predicting Poor Outcomes After Rib Fractures](https://doi.org/10.1177/00031348221123087)
Buchholz CJ, Jia L, Manea C, Petersen T, Wang H, Stright A, Young JS, Calland JF
Am Surg. 2023;89(10):4668-4674
DOI: [10.1177/00031348221123087](https://doi.org/10.1177/00031348221123087)

## Worked example

### One rib, GCS 15, no flags

Given: `chest_tube=false, copd=false, gcs=15, pulmonary_contusions=false, rib_count=1`

1. rib_count 1 × 2.275 = 2.275; chest_tube, pulmonary_contusions, and copd false → 0; GCS 15 → GCS <15 false → 0
2. score = round(2.275) = 2; ribs_band below_12 (published ICU triage cutoff is 12)


### Four ribs and COPD at the score-12 cutoff

Given: `chest_tube=false, copd=true, gcs=15, pulmonary_contusions=false, rib_count=4`

1. rib_count 4 × 2.275 = 9.1; copd true → 2.83; other flags false; GCS 15 → 0
2. score = round(11.93) = 12; ribs_band at_or_above_12


## Also searched as

- Revised Intensity Battle Score
- RIBS
- Buchholz RIBS
- revised Battle score
- rib fracture triage score
- intensity Battle score
- Buchholz 2023 rib score

## Parameters

- `rib_count` (integer, required): Caller-assigned number of fractured rib levels, integer 0–24. Buchholz 2023: 2.275 points per rib level, not per individual fracture (six fractures on three ribs is 3). magent does not read a CT or count ribs.
- `chest_tube` (boolean, required): Chest tube placed, present, or anticipated as assigned by the caller (Buchholz 2023). true or false. true scores 4.08 before rounding.
- `pulmonary_contusions` (boolean, required): Pulmonary contusions as assigned by the caller (Buchholz 2023). true or false. true scores 1.525 before rounding. magent does not read a CT.
- `copd` (boolean, required): History of COPD as assigned by the caller (Buchholz 2023). true or false. true scores 2.83 before rounding. Age is not a component.
- `gcs` (integer, required): Caller-assigned Glasgow Coma Scale total, integer 3–15. Buchholz 2023 scores 8.137 when GCS <15 and 0 when GCS is 15. magent does not compute eye, verbal, or motor.

## 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/ribs`
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": [
    {
      "chest_tube": "false",
      "copd": "false",
      "gcs": "15",
      "pulmonary_contusions": "false",
      "rib_count": "1"
    },
    {
      "chest_tube": "false",
      "copd": "false",
      "gcs": "15",
      "pulmonary_contusions": "false",
      "rib_count": "1"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/ribs",
  "items": [
    {
      "components": [
        {
          "value": 1,
          "factor": "rib_count",
          "points": 2.275,
          "present": true
        },
        {
          "factor": "chest_tube",
          "points": 0.0,
          "present": false
        },
        {
          "factor": "pulmonary_contusions",
          "points": 0.0,
          "present": false
        },
        {
          "factor": "copd",
          "points": 0.0,
          "present": false
        },
        {
          "value": 15,
          "factor": "gcs",
          "points": 0.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": "Buchholz CJ, Jia L, Manea C, Petersen T, Wang H, Stright A, Young JS, Calland JF",
        "doi": "10.1177/00031348221123087",
        "id": "buchholz-2022",
        "pmid": "36120831",
        "source": "Am Surg. 2023;89(10):4668-4674",
        "title": "Revised Intensity Battle Score (RIBS): Development of a Clinical Score for Predicting Poor Outcomes After Rib Fractures"
      },
      "formula": "ribs",
      "formula_expression": "RIBS = round(2.275*rib_count + 1.525*pulmonary_contusions + 2.83*copd + 4.08*chest_tube + 8.137*(gcs<15)); Buchholz 2023; rib level not fracture count; age is not a component; ICU triage cutoff 12; not Chapman 2016 RibScore; not Battle 2014 STUMBL",
      "score": 2,
      "mortality_percent": 2.8,
      "gcs": 15,
      "copd": false,
      "any_complication_percent": 7.5,
      "chest_tube": false,
      "gcs_lt_15": false,
      "icu_triage_cutoff": false,
      "pneumonia_or_vap_percent": 3.0,
      "pulmonary_contusions": false,
      "rib_count": 1,
      "ribs_band": "below_12",
      "unplanned_icu_or_intubation_percent": 4.7,
      "vent_or_tracheostomy_percent": 1.9
    },
    {
      "components": [
        {
          "value": 1,
          "factor": "rib_count",
          "points": 2.275,
          "present": true
        },
        {
          "factor": "chest_tube",
          "points": 0.0,
          "present": false
        },
        {
          "factor": "pulmonary_contusions",
          "points": 0.0,
          "present": false
        },
        {
          "factor": "copd",
          "points": 0.0,
          "present": false
        },
        {
          "value": 15,
          "factor": "gcs",
          "points": 0.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": "Buchholz CJ, Jia L, Manea C, Petersen T, Wang H, Stright A, Young JS, Calland JF",
        "doi": "10.1177/00031348221123087",
        "id": "buchholz-2022",
        "pmid": "36120831",
        "source": "Am Surg. 2023;89(10):4668-4674",
        "title": "Revised Intensity Battle Score (RIBS): Development of a Clinical Score for Predicting Poor Outcomes After Rib Fractures"
      },
      "formula": "ribs",
      "formula_expression": "RIBS = round(2.275*rib_count + 1.525*pulmonary_contusions + 2.83*copd + 4.08*chest_tube + 8.137*(gcs<15)); Buchholz 2023; rib level not fracture count; age is not a component; ICU triage cutoff 12; not Chapman 2016 RibScore; not Battle 2014 STUMBL",
      "score": 2,
      "mortality_percent": 2.8,
      "gcs": 15,
      "copd": false,
      "any_complication_percent": 7.5,
      "chest_tube": false,
      "gcs_lt_15": false,
      "icu_triage_cutoff": false,
      "pneumonia_or_vap_percent": 3.0,
      "pulmonary_contusions": false,
      "rib_count": 1,
      "ribs_band": "below_12",
      "unplanned_icu_or_intubation_percent": 4.7,
      "vent_or_tracheostomy_percent": 1.9
    }
  ]
}
```

## Response fields

- `formula` (string): ribs
- `formula_expression` (string): Exact expression used
- `score` (integer): Buchholz 2023 RIBS, rounded nearest integer
- `ribs_band` (string): below_12 or at_or_above_12. Published ICU triage cutoff is 12. A band, not an ICU order.
- `icu_triage_cutoff` (boolean): true when score ≥12 (Buchholz 2023 recommended ICU triage cutoff)
- `any_complication_percent` (number): Published any-complication percent from logit 0.1879*score − 2.8823
- `unplanned_icu_or_intubation_percent` (number): Published unplanned ICU-upgrade or intubation percent
- `vent_or_tracheostomy_percent` (number): Published >7 ventilator-days or tracheostomy percent
- `pneumonia_or_vap_percent` (number): Published pneumonia or VAP percent
- `mortality_percent` (number): Published mortality percent
- `rib_count` (integer): Caller rib-level count used
- `chest_tube` (boolean): Caller chest-tube flag used
- `pulmonary_contusions` (boolean): Caller pulmonary-contusion flag used
- `copd` (boolean): Caller COPD flag used
- `gcs` (integer): Caller GCS total used
- `gcs_lt_15` (boolean): true when caller GCS is 3–14
- `components` (array): Per-predictor Buchholz 2023 points
- `citation` (object): Buchholz 2023 Am Surg citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": 1,
      "factor": "rib_count",
      "points": 2.275,
      "present": true
    },
    {
      "factor": "chest_tube",
      "points": 0.0,
      "present": false
    },
    {
      "factor": "pulmonary_contusions",
      "points": 0.0,
      "present": false
    },
    {
      "factor": "copd",
      "points": 0.0,
      "present": false
    },
    {
      "value": 15,
      "factor": "gcs",
      "points": 0.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": "Buchholz CJ, Jia L, Manea C, Petersen T, Wang H, Stright A, Young JS, Calland JF",
    "doi": "10.1177/00031348221123087",
    "id": "buchholz-2022",
    "pmid": "36120831",
    "source": "Am Surg. 2023;89(10):4668-4674",
    "title": "Revised Intensity Battle Score (RIBS): Development of a Clinical Score for Predicting Poor Outcomes After Rib Fractures"
  },
  "formula": "ribs",
  "formula_expression": "RIBS = round(2.275*rib_count + 1.525*pulmonary_contusions + 2.83*copd + 4.08*chest_tube + 8.137*(gcs<15)); Buchholz 2023; rib level not fracture count; age is not a component; ICU triage cutoff 12; not Chapman 2016 RibScore; not Battle 2014 STUMBL",
  "score": 2,
  "mortality_percent": 2.8,
  "gcs": 15,
  "copd": false,
  "any_complication_percent": 7.5,
  "chest_tube": false,
  "gcs_lt_15": false,
  "icu_triage_cutoff": false,
  "pneumonia_or_vap_percent": 3.0,
  "pulmonary_contusions": false,
  "rib_count": 1,
  "ribs_band": "below_12",
  "unplanned_icu_or_intubation_percent": 4.7,
  "vent_or_tracheostomy_percent": 1.9
}
```

## Errors

- 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_gcs_total`: gcs must be an integer from 3 to 15. 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

- [RibScore](https://magentlab.com/docs/ribscore) — Sum the six Chapman 2016 RibScore radiographic flags and return the integer total 0-6. That paper associated the score linearly with pneumonia, respiratory failure, and tracheostomy.
- [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.

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