Fluids · LIVE
Adult Wallace rule of nines
Rule of nines
Sum Wallace 1951 adult region percents from caller-assigned none/half/full fractions to a percent TBSA.
Markdown: /docs/rule-of-nines.md · Canonical: https://magentlab.com/docs/rule-of-nines
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
- Authors
- Wallace AB
- Source
- Lancet. 1951;1(6653):501-504
Worked example
Anterior trunk only
Given:
anterior_trunk=1arm_left=0arm_right=0head=0leg_left=0leg_right=0perineum=0posterior_trunk=0
- anterior_trunk fraction 1 × 18% = 18
- all other regions 0
- tbsa_percent = 18
Full adult involvement
Given:
anterior_trunk=1arm_left=1arm_right=1head=1leg_left=1leg_right=1perineum=1posterior_trunk=1
- each region fraction 1
- 9 + 9 + 9 + 18 + 18 + 18 + 18 + 1 = 100
- tbsa_percent = 100
Half both legs
Given:
anterior_trunk=0arm_left=0arm_right=0head=0leg_left=0.5leg_right=0.5perineum=0posterior_trunk=0
- leg_left fraction 0.5 × 18% = 9
- leg_right fraction 0.5 × 18% = 9
- 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
Try
Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.
Full URL: https://api.magentlab.com/api/calc/rule_of_nines?head=0&arm_left=0&arm_right=0&anterior_trunk=1&posterior_trunk=0&leg_left=0&leg_right=0&perineum=0
Call
Expect HTTP 402 until you retry with PAYMENT-SIGNATURE. Incomplete query params
return HTTP 400 before any quote or charge.
curl -i -H "Accept: application/json" "https://api.magentlab.com/api/calc/rule_of_nines?head=0&arm_left=0&arm_right=0&anterior_trunk=1&posterior_trunk=0&leg_left=0&leg_right=0&perineum=0"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
head |
number | required · 0, 0.5, 1 | 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 · 0, 0.5, 1 | 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 · 0, 0.5, 1 | 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 · 0, 0.5, 1 | 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 · 0, 0.5, 1 | 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 · 0, 0.5, 1 | 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 · 0, 0.5, 1 | 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 · 0, 0.5, 1 | 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.
- 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 (fixture)
{
"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"
}
]
}
Opens a two-item fixture on the API host. Unpaid browsers get the same MetaMask paywall as GET; Pay retries POST with those items.
Example 200 (fixture)
{
"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
| Field | Type | Description |
|---|---|---|
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
Machine form of the same example. Frozen fixture. Not a live lookup.
{
"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
}
Client errors (HTTP 400)
Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.
| HTTP | Code | When |
|---|---|---|
| 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. |
| 400 | invalid_items |
POST body must be a JSON object with only an items array Returned before settlement; you are not charged. |
| 400 | invalid_item_count |
items must be an array of 1 to 25 objects Returned before settlement; you are not charged. |
| 400 | invalid_item |
each items entry must be a JSON object Returned before settlement; you are not charged. |
Related tools
- Parkland formula — 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. Unpaid valid requests return HTTP 402 with a base64
PAYMENT-REQUIRED
header. HTTP 503 is not a new quote: retry the same PAYMENT-SIGNATURE. Full handshake
and shared payment errors: Payments.
Stdio MCP: /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.