Infection / VTE · LIVE
Appendicitis inflammatory response score
AIR score
Compute the Andersson 2008 appendicitis inflammatory response (AIR) score from caller-assigned findings, temperature, WBC, neutrophil percent, and CRP in mg/L.
Markdown: /docs/air.md · Canonical: https://magentlab.com/docs/air
Not a medical device. Not a diagnosis, dose, or listing recommendation.
What it computes
Compute the Andersson 2008 appendicitis inflammatory response (AIR) score from caller-assigned findings, temperature, WBC, neutrophil percent, and CRP in mg/L.
When to use
When an agent needs the published Andersson 2008 AIR total and must not invent abdominal findings or treat the total as an operating-room protocol.
When not to use
- Not a medical device. Not a diagnosis or operating-room protocol.
- Findings, rebound or guarding grade, and laboratory values are caller-assigned. magent does not examine the abdomen.
- CRP is scored in mg/L, not mg/dL (Andersson 2008 AIR table as restated in the 2021 same-group validation table).
- Bands 0-4, 5-8, and 9-12 are published AIR strata. magent does not return probability percents or operate-versus-observe orders.
Formula
AIR = vomiting + rif_pain + rebound_or_guarding (none 0, light 1, medium 2, strong 3) + (temperature_c >= 38.5) + WBC 10^9/L (<10 → 0; 10.0–14.9 → 1; ≥15.0 → 2) + neutrophil_percent (<70 → 0; 70–84 → 1; ≥85 → 2) + crp_mg_l (<10 → 0; 10–49 → 1; ≥50 → 2); max 12; bands 0-4 / 5-8 / 9-12
Citation
- Authors
- Andersson M, Andersson RE
- Source
- World J Surg. 2008;32(8):1843-1849
Worked example
All findings absent
Given:
crp_mg_l=5neutrophil_percent=60rebound_or_guarding=nonerif_pain=falsetemperature_c=37.0vomiting=falsewbc_ul=8000
- vomiting false; rif_pain false; rebound_or_guarding none; temperature 37.0 < 38.5; WBC 8000 → 8.0 ×10^9/L < 10; neutrophils 60 < 70; CRP 5 mg/L < 10
- Score = 0; band 0-4; max 12
Also searched as
- AIR score
- appendicitis inflammatory response
- Andersson AIR
- AIR appendicitis score
- inflammatory response score
- Andersson 2008 AIR
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/air?vomiting=false&rif_pain=false&rebound_or_guarding=none&temperature_c=37.0&wbc_ul=8000&neutrophil_percent=60&crp_mg_l=5
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/air?vomiting=false&rif_pain=false&rebound_or_guarding=none&temperature_c=37.0&wbc_ul=8000&neutrophil_percent=60&crp_mg_l=5"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
vomiting |
boolean | required | Vomiting (Andersson 2008). true scores 1; false scores 0. |
rif_pain |
boolean | required | Pain in the right iliac fossa / right lower quadrant (Andersson 2008). true scores 1; false scores 0. |
rebound_or_guarding |
string | required · none, light, medium, strong | Caller-assigned rebound tenderness or muscular guarding (Andersson 2008). none scores 0; light 1; medium 2; strong 3. magent does not examine the abdomen. |
temperature_c |
number | required | Temperature in °C (30.0-45.0). ≥38.5 scores 1 (38.5 scores; 38.49 does not). |
wbc_k_ul |
number | optional | WBC in 10^3/µL (same as 10^9/L). Provide wbc_k_ul or wbc_ul. Range 0.01-500. Converted to ×10^9/L: <10 scores 0; 10.0-14.9 scores 1; ≥15.0 scores 2. |
wbc_ul |
number | optional | WBC in cells/µL (same as cells/mm^3). Provide wbc_k_ul or wbc_ul. Range 10-500000. Converted to ×10^9/L (= wbc_ul/1000): <10 scores 0; 10.0-14.9 scores 1; ≥15.0 scores 2. |
neutrophil_percent |
number | required | Neutrophil percent (0-100). <70 scores 0; 70-84 scores 1; ≥85 scores 2 (69.9 does not; 70 and 84 score 1; 85 scores 2). |
crp_mg_l |
number | required | C-reactive protein in mg/L (0-500), not mg/dL. <10 scores 0; 10-49 scores 1; ≥50 scores 2 (9.9 does not; 10 and 49 score 1; 50 scores 2). |
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": [
{
"crp_mg_l": "5",
"neutrophil_percent": "60",
"rebound_or_guarding": "none",
"rif_pain": "false",
"temperature_c": "37.0",
"vomiting": "false",
"wbc_ul": "8000"
},
{
"crp_mg_l": "5",
"neutrophil_percent": "60",
"rebound_or_guarding": "none",
"rif_pain": "false",
"temperature_c": "37.0",
"vomiting": "false",
"wbc_ul": "8000"
}
]
}
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/air",
"items": [
{
"components": [
{
"factor": "vomiting",
"points": 0,
"present": false
},
{
"factor": "rif_pain",
"points": 0,
"present": false
},
{
"value": "none",
"factor": "rebound_or_guarding",
"points": 0,
"present": false
},
{
"value": 37.0,
"factor": "temperature_c",
"points": 0,
"present": false
},
{
"value": 8.0e3,
"factor": "wbc",
"points": 0,
"present": false
},
{
"value": 60.0,
"factor": "neutrophil_percent",
"points": 0,
"present": false
},
{
"value": 5.0,
"factor": "crp_mg_l",
"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": "Andersson M, Andersson RE",
"doi": "10.1007/s00268-008-9649-y",
"id": "andersson-2008",
"pmid": "18553045",
"source": "World J Surg. 2008;32(8):1843-1849",
"title": "The appendicitis inflammatory response score: a tool for the diagnosis of acute appendicitis that outperforms the Alvarado score"
},
"formula": "air",
"formula_expression": "AIR = vomiting + rif_pain + rebound_or_guarding (none 0, light 1, medium 2, strong 3) + (temperature_c >= 38.5) + WBC 10^9/L (<10 → 0; 10.0–14.9 → 1; ≥15.0 → 2) + neutrophil_percent (<70 → 0; 70–84 → 1; ≥85 → 2) + crp_mg_l (<10 → 0; 10–49 → 1; ≥50 → 2); max 12; bands 0-4 / 5-8 / 9-12",
"max_score": 12,
"score": 0,
"neutrophil_percent": 60.0,
"temperature_c": 37.0,
"wbc_ul": 8.0e3,
"air_band": "0-4",
"crp_mg_l": 5.0,
"rebound_or_guarding": "none",
"rif_pain": false,
"vomiting": false,
"wbc_10e9_l": 8.0
},
{
"components": [
{
"factor": "vomiting",
"points": 0,
"present": false
},
{
"factor": "rif_pain",
"points": 0,
"present": false
},
{
"value": "none",
"factor": "rebound_or_guarding",
"points": 0,
"present": false
},
{
"value": 37.0,
"factor": "temperature_c",
"points": 0,
"present": false
},
{
"value": 8.0e3,
"factor": "wbc",
"points": 0,
"present": false
},
{
"value": 60.0,
"factor": "neutrophil_percent",
"points": 0,
"present": false
},
{
"value": 5.0,
"factor": "crp_mg_l",
"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": "Andersson M, Andersson RE",
"doi": "10.1007/s00268-008-9649-y",
"id": "andersson-2008",
"pmid": "18553045",
"source": "World J Surg. 2008;32(8):1843-1849",
"title": "The appendicitis inflammatory response score: a tool for the diagnosis of acute appendicitis that outperforms the Alvarado score"
},
"formula": "air",
"formula_expression": "AIR = vomiting + rif_pain + rebound_or_guarding (none 0, light 1, medium 2, strong 3) + (temperature_c >= 38.5) + WBC 10^9/L (<10 → 0; 10.0–14.9 → 1; ≥15.0 → 2) + neutrophil_percent (<70 → 0; 70–84 → 1; ≥85 → 2) + crp_mg_l (<10 → 0; 10–49 → 1; ≥50 → 2); max 12; bands 0-4 / 5-8 / 9-12",
"max_score": 12,
"score": 0,
"neutrophil_percent": 60.0,
"temperature_c": 37.0,
"wbc_ul": 8.0e3,
"air_band": "0-4",
"crp_mg_l": 5.0,
"rebound_or_guarding": "none",
"rif_pain": false,
"vomiting": false,
"wbc_10e9_l": 8.0
}
]
}
Response
| Field | Type | Description |
|---|---|---|
formula |
string | air |
formula_expression |
string | Exact expression used |
score |
integer | Total points 0-12 |
max_score |
integer | Always 12 |
air_band |
string | 0-4 (low), 5-8 (indeterminate), or 9-12 (high) published Andersson 2008 strata. Not an operate-versus-observe order and not a percent. |
vomiting |
boolean | Parsed vomiting flag |
rif_pain |
boolean | Parsed right-iliac-fossa pain flag |
rebound_or_guarding |
string | Canonical none, light, medium, or strong |
temperature_c |
number | Temperature in °C used for scoring |
wbc_ul |
number | Normalized WBC in cells/µL used for scoring |
wbc_10e9_l |
number | WBC converted to ×10^9/L (wbc_ul / 1000) for Andersson 2008 bands |
neutrophil_percent |
number | Neutrophil percent used for scoring |
crp_mg_l |
number | CRP in mg/L used for scoring (not mg/dL) |
components |
array | Per-factor AIR points |
citation |
object | Andersson 2008 citation |
disclaimer |
string | Not-a-device notice |
Example JSON
Machine form of the same example. Frozen fixture. Not a live lookup.
{
"components": [
{
"factor": "vomiting",
"points": 0,
"present": false
},
{
"factor": "rif_pain",
"points": 0,
"present": false
},
{
"value": "none",
"factor": "rebound_or_guarding",
"points": 0,
"present": false
},
{
"value": 37.0,
"factor": "temperature_c",
"points": 0,
"present": false
},
{
"value": 8.0e3,
"factor": "wbc",
"points": 0,
"present": false
},
{
"value": 60.0,
"factor": "neutrophil_percent",
"points": 0,
"present": false
},
{
"value": 5.0,
"factor": "crp_mg_l",
"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": "Andersson M, Andersson RE",
"doi": "10.1007/s00268-008-9649-y",
"id": "andersson-2008",
"pmid": "18553045",
"source": "World J Surg. 2008;32(8):1843-1849",
"title": "The appendicitis inflammatory response score: a tool for the diagnosis of acute appendicitis that outperforms the Alvarado score"
},
"formula": "air",
"formula_expression": "AIR = vomiting + rif_pain + rebound_or_guarding (none 0, light 1, medium 2, strong 3) + (temperature_c >= 38.5) + WBC 10^9/L (<10 → 0; 10.0–14.9 → 1; ≥15.0 → 2) + neutrophil_percent (<70 → 0; 70–84 → 1; ≥85 → 2) + crp_mg_l (<10 → 0; 10–49 → 1; ≥50 → 2); max 12; bands 0-4 / 5-8 / 9-12",
"max_score": 12,
"score": 0,
"neutrophil_percent": 60.0,
"temperature_c": 37.0,
"wbc_ul": 8.0e3,
"air_band": "0-4",
"crp_mg_l": 5.0,
"rebound_or_guarding": "none",
"rif_pain": false,
"vomiting": false,
"wbc_10e9_l": 8.0
}
Client errors (HTTP 400)
Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_flag |
boolean clinical flags must be true or false Returned before settlement; you are not charged. |
| 400 | invalid_air_rebound |
rebound_or_guarding must be none, light, medium, or strong (Andersson 2008 AIR). Returned before settlement; you are not charged. |
| 400 | invalid_temperature |
temperature_c must be a number from 30.0 to 45.0. Returned before settlement; you are not charged. |
| 400 | invalid_wbc |
wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged. |
| 400 | invalid_neutrophil_percent |
neutrophil_percent must be a number from 0 to 100 Returned before settlement; you are not charged. |
| 400 | invalid_crp |
crp_mg_l must be a number from 0 to 500. 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
- Alvarado score — Compute the Alvarado 1986 MANTRELS score from caller-assigned findings, temperature, WBC, and neutrophil percent.
- Pediatric appendicitis score — Compute the Samuel 2002 pediatric appendicitis score from eight caller-assigned findings in children aged 4-15.
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.
- 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.