# Adult Wallace rule of nines

Rule of nines

Status: LIVE
Price: $0.005 USDC
`GET /api/calc/rule_of_nines`
HTML: https://magentlab.com/docs/rule-of-nines
Markdown: https://magentlab.com/docs/rule-of-nines.md

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

## What it computes

Sum Wallace 1951 adult region percents from caller-assigned none/half/full fractions to a percent TBSA.

## When to use

When an agent needs adult Wallace rule-of-nines TBSA arithmetic and must not apply Lund-Browder pediatric percents or invent a Parkland fluid volume.

## When not to use

- Not a medical device. Deterministic Wallace 1951 adult percent arithmetic only.
- Adult chart only. Not Lund-Browder (pediatric) percentages.
- magent does not examine the burn. Region fractions are caller-assigned (0 none, 0.5 half, 1 full).
- Not a Parkland fluid order. Parkland takes tbsa_percent separately.

## Formula

```
tbsa_percent = head*9 + arm_left*9 + arm_right*9 + anterior_trunk*18 + posterior_trunk*18 + leg_left*18 + leg_right*18 + perineum*1 (Wallace 1951 adult percents; each factor is 0, 0.5, or 1)
```

## Citation

[The exposure treatment of burns](https://doi.org/10.1016/s0140-6736(51)91975-7)
Wallace AB
Lancet. 1951;1(6653):501-504
DOI: [10.1016/s0140-6736(51)91975-7](https://doi.org/10.1016/s0140-6736(51)91975-7)

## Worked example

### Anterior trunk only

Given: `anterior_trunk=1, arm_left=0, arm_right=0, head=0, leg_left=0, leg_right=0, perineum=0, posterior_trunk=0`

1. anterior_trunk fraction 1 × 18% = 18
2. all other regions 0
3. tbsa_percent = 18


### Full adult involvement

Given: `anterior_trunk=1, arm_left=1, arm_right=1, head=1, leg_left=1, leg_right=1, perineum=1, posterior_trunk=1`

1. each region fraction 1
2. 9 + 9 + 9 + 18 + 18 + 18 + 18 + 1 = 100
3. tbsa_percent = 100


### Half both legs

Given: `anterior_trunk=0, arm_left=0, arm_right=0, head=0, leg_left=0.5, leg_right=0.5, perineum=0, posterior_trunk=0`

1. leg_left fraction 0.5 × 18% = 9
2. leg_right fraction 0.5 × 18% = 9
3. tbsa_percent = 18


## Also searched as

- Wallace rule of nines
- adult TBSA
- burn surface area percent
- Wallace 1951 burns
- adult burn chart
- rule of 9s
- anterior trunk 18 percent
- TBSA from regions

## Parameters

- `head` (number, required): Caller-assigned Wallace 1951 adult head involvement (0 none, 0.5 half, 1 full). Full involvement is 9%. magent does not examine the burn.
- `arm_left` (number, required): Caller-assigned Wallace 1951 adult arm_left involvement (0 none, 0.5 half, 1 full). Full involvement is 9%. magent does not examine the burn.
- `arm_right` (number, required): Caller-assigned Wallace 1951 adult arm_right involvement (0 none, 0.5 half, 1 full). Full involvement is 9%. magent does not examine the burn.
- `anterior_trunk` (number, required): Caller-assigned Wallace 1951 adult anterior_trunk involvement (0 none, 0.5 half, 1 full). Full involvement is 18%. magent does not examine the burn.
- `posterior_trunk` (number, required): Caller-assigned Wallace 1951 adult posterior_trunk involvement (0 none, 0.5 half, 1 full). Full involvement is 18%. magent does not examine the burn.
- `leg_left` (number, required): Caller-assigned Wallace 1951 adult leg_left involvement (0 none, 0.5 half, 1 full). Full involvement is 18%. magent does not examine the burn.
- `leg_right` (number, required): Caller-assigned Wallace 1951 adult leg_right involvement (0 none, 0.5 half, 1 full). Full involvement is 18%. magent does not examine the burn.
- `perineum` (number, required): Caller-assigned Wallace 1951 adult perineum involvement (0 none, 0.5 half, 1 full). Full involvement is 1%. magent does not examine the burn.

## 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/rule_of_nines`
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": [
    {
      "anterior_trunk": "1",
      "arm_left": "0",
      "arm_right": "0",
      "head": "0",
      "leg_left": "0",
      "leg_right": "0",
      "perineum": "0",
      "posterior_trunk": "0"
    },
    {
      "anterior_trunk": "1",
      "arm_left": "0",
      "arm_right": "0",
      "head": "0",
      "leg_left": "0",
      "leg_right": "0",
      "perineum": "0",
      "posterior_trunk": "0"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/rule_of_nines",
  "items": [
    {
      "head": 0.0,
      "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": "Wallace AB",
        "doi": "10.1016/s0140-6736(51)91975-7",
        "id": "wallace-1951",
        "pmid": "14805109",
        "source": "Lancet. 1951;1(6653):501-504",
        "title": "The exposure treatment of burns"
      },
      "formula": "rule_of_nines",
      "formula_expression": "tbsa_percent = head*9 + arm_left*9 + arm_right*9 + anterior_trunk*18 + posterior_trunk*18 + leg_left*18 + leg_right*18 + perineum*1 (Wallace 1951 adult percents; each factor is 0, 0.5, or 1)",
      "tbsa_percent": 18.0,
      "anterior_trunk": 1.0,
      "arm_left": 0.0,
      "arm_right": 0.0,
      "leg_left": 0.0,
      "leg_right": 0.0,
      "perineum": 0.0,
      "posterior_trunk": 0.0
    },
    {
      "head": 0.0,
      "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": "Wallace AB",
        "doi": "10.1016/s0140-6736(51)91975-7",
        "id": "wallace-1951",
        "pmid": "14805109",
        "source": "Lancet. 1951;1(6653):501-504",
        "title": "The exposure treatment of burns"
      },
      "formula": "rule_of_nines",
      "formula_expression": "tbsa_percent = head*9 + arm_left*9 + arm_right*9 + anterior_trunk*18 + posterior_trunk*18 + leg_left*18 + leg_right*18 + perineum*1 (Wallace 1951 adult percents; each factor is 0, 0.5, or 1)",
      "tbsa_percent": 18.0,
      "anterior_trunk": 1.0,
      "arm_left": 0.0,
      "arm_right": 0.0,
      "leg_left": 0.0,
      "leg_right": 0.0,
      "perineum": 0.0,
      "posterior_trunk": 0.0
    }
  ]
}
```

## Response fields

- `formula` (string): rule_of_nines
- `formula_expression` (string): Exact Wallace 1951 adult expression used
- `head` (number): Parsed involvement fraction 0, 0.5, or 1 (Wallace adult 9% when full)
- `arm_left` (number): Parsed involvement fraction 0, 0.5, or 1 (Wallace adult 9% when full)
- `arm_right` (number): Parsed involvement fraction 0, 0.5, or 1 (Wallace adult 9% when full)
- `anterior_trunk` (number): Parsed involvement fraction 0, 0.5, or 1 (Wallace adult 18% when full)
- `posterior_trunk` (number): Parsed involvement fraction 0, 0.5, or 1 (Wallace adult 18% when full)
- `leg_left` (number): Parsed involvement fraction 0, 0.5, or 1 (Wallace adult 18% when full)
- `leg_right` (number): Parsed involvement fraction 0, 0.5, or 1 (Wallace adult 18% when full)
- `perineum` (number): Parsed involvement fraction 0, 0.5, or 1 (Wallace adult 1% when full)
- `tbsa_percent` (number): Sum of region fraction × Wallace adult percent (max 100)
- `citation` (object): Wallace Lancet 1951 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "head": 0.0,
  "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": "Wallace AB",
    "doi": "10.1016/s0140-6736(51)91975-7",
    "id": "wallace-1951",
    "pmid": "14805109",
    "source": "Lancet. 1951;1(6653):501-504",
    "title": "The exposure treatment of burns"
  },
  "formula": "rule_of_nines",
  "formula_expression": "tbsa_percent = head*9 + arm_left*9 + arm_right*9 + anterior_trunk*18 + posterior_trunk*18 + leg_left*18 + leg_right*18 + perineum*1 (Wallace 1951 adult percents; each factor is 0, 0.5, or 1)",
  "tbsa_percent": 18.0,
  "anterior_trunk": 1.0,
  "arm_left": 0.0,
  "arm_right": 0.0,
  "leg_left": 0.0,
  "leg_right": 0.0,
  "perineum": 0.0,
  "posterior_trunk": 0.0
}
```

## Errors

- HTTP 400 `invalid_region_fraction`: each burn region must be 0, 0.5, or 1 (Wallace 1951 adult rule of nines). 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

- [Parkland formula](https://magentlab.com/docs/parkland) — Compute adult Parkland 24-hour crystalloid volume from weight and percent TBSA, with half allotted to the first 8 hours from the time of burn.

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