Emergency · LIVE
Pediatric appendicitis risk calculator (pARC)
pARC
Compute the Kharbanda 2018 Table 3 logistic probability of appendicitis from sex, age (5-18 years), pain duration, pain with walking, migration of pain to the RLQ, maximal tenderness in the RLQ, abdominal guarding, and ANC.
Markdown: /docs/parc.md · Canonical: https://magentlab.com/docs/parc
Not a medical device. Not a diagnosis, dose, or listing recommendation.
What it computes
Compute the Kharbanda 2018 Table 3 logistic probability of appendicitis from sex, age (5-18 years), pain duration, pain with walking, migration of pain to the RLQ, maximal tenderness in the RLQ, abdominal guarding, and ANC.
When to use
When an agent already has Kharbanda 2018 Table 3 inputs and needs the published pARC probability and must not invent a PAS score, Alvarado points, an imaging order, or a nausea/vomiting term (dropped from the final model).
When not to use
- Not a medical device. Not a diagnosis and not an imaging or operating-room order. magent does not examine the child.
- Kharbanda 2018 Table 3 logistic model only. Nausea and vomiting were not significant in the final model and are not inputs.
- Age is 5-18 years (derivation). Sex-specific age terms follow Table 3: female 12-18 y and male 14-18 y are the reference; magent does not apply pARC under age 5.
- pain_duration, pain_with_walking, pain_migration_rlq, maximal_tenderness_rlq, and abdominal_guarding are caller-assigned published categories or flags. magent does not examine the abdomen.
- ANC is required in x10^3/uL. magent does not impute missing ANC from WBC. This is not the Pediatric Appendicitis Score (PAS) and not Alvarado. Kharbanda 2018 Table 4 risk strata are not returned.
Formula
L = -8.7 + 1.28*male + age_sex + pain_duration + 1.05*pain_with_walking + 0.46*pain_migration_rlq + 1.14*maximal_tenderness_rlq + 0.67*abdominal_guarding + anc (Kharbanda 2018 Table 3); age 5-7.9 y 0.38; male 5-7.9 y -1.05; age 8-13.9 y -0.72 (male 8-13.9 y and female 8-11.9 y); reference = male 14-18 y and female 12-18 y; duration lt_24 0, 24_lt_48 0.47, 48_96 0.10; ANC <14 x10^3/uL: 1.77*sqrt(ANC); ANC >=14: 6.62 instead of the sqrt term; estimated_probability = 1 / (1 + exp(-L)); estimated_probability_percent = 100 * estimated_probability
Citation
- Authors
- Kharbanda AB, Vazquez-Benitez G, Ballard DW, et al.
- Source
- Pediatrics. 2018;141(4):e20172699
Worked example
Female 15 y, duration <24 h, exam flags false, ANC 2.0
Given:
abdominal_guarding=falseage=15anc_10e3_ul=2.0maximal_tenderness_rlq=falsepain_duration=lt_24pain_migration_rlq=falsepain_with_walking=falsesex=female
- Female 15 y is the Table 3 age-and-sex reference (0). Duration lt_24, walking, migration, RLQ tenderness, and guarding add 0.
- ANC 2.0 < 14, so ANC term = 1.77 × √2. L = -8.7 + 1.77 × √2.
- estimated_probability = 1 / (1 + exp(-L)); estimated_probability_percent = 100 × that from the unrounded logit
Male 15 y, otherwise the reference teen example
Given:
abdominal_guarding=falseage=15anc_10e3_ul=2.0maximal_tenderness_rlq=falsepain_duration=lt_24pain_migration_rlq=falsepain_with_walking=falsesex=male
- Male sex +1.28. Age 15 y male is the Table 3 reference age band (0).
- L = -8.7 + 1.28 + 1.77 × √2
Male 6 y, duration <24 h, exam flags false, ANC 2.0
Given:
abdominal_guarding=falseage=6anc_10e3_ul=2.0maximal_tenderness_rlq=falsepain_duration=lt_24pain_migration_rlq=falsepain_with_walking=falsesex=male
- Male sex +1.28, age 5-7.9 y +0.38, male 5-7.9 y −1.05.
- L = -8.7 + 1.28 + 0.38 − 1.05 + 1.77 × √2
Female 15 y, duration 24-<48 h
Given:
abdominal_guarding=falseage=15anc_10e3_ul=2.0maximal_tenderness_rlq=falsepain_duration=24_lt_48pain_migration_rlq=falsepain_with_walking=falsesex=female
- Duration 24-<48 h +0.47. Other terms match the reference teen female example.
- L = -8.7 + 0.47 + 1.77 × √2
Female 15 y with walking, RLQ tenderness, and guarding
Given:
abdominal_guarding=trueage=15anc_10e3_ul=2.0maximal_tenderness_rlq=truepain_duration=lt_24pain_migration_rlq=falsepain_with_walking=truesex=female
- Pain with walking +1.05, maximal tenderness in RLQ +1.14, abdominal guarding +0.67.
- L = -8.7 + 1.05 + 1.14 + 0.67 + 1.77 × √2
Female 15 y, ANC 14 (constant instead of √ANC)
Given:
abdominal_guarding=falseage=15anc_10e3_ul=14maximal_tenderness_rlq=falsepain_duration=lt_24pain_migration_rlq=falsepain_with_walking=falsesex=female
- ANC ≥ 14 ×10³/µL uses constant 6.62 instead of 1.77 × √ANC.
- L = -8.7 + 6.62 = -2.08
Also searched as
- pARC
- pediatric appendicitis risk calculator
- Kharbanda pARC
- Kharbanda 2018 appendicitis
- pediatric appendicitis probability
- appendicitis risk calculator
- pARC logistic
- pediatric RLQ appendicitis risk
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/parc?age=15&sex=female&pain_duration=lt_24&pain_with_walking=false&pain_migration_rlq=false&maximal_tenderness_rlq=false&abdominal_guarding=false&anc_10e3_ul=2.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/parc?age=15&sex=female&pain_duration=lt_24&pain_with_walking=false&pain_migration_rlq=false&maximal_tenderness_rlq=false&abdominal_guarding=false&anc_10e3_ul=2.0"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
age |
integer | required | Age in whole years from 5 to 18 (Kharbanda 2018 derivation). Age 5-7 maps to 5-7.9 y; male 8-13 and female 8-11 use the age 8-13.9 y term; male 14-18 y and female 12-18 y are the Table 3 reference. |
sex |
string | required · female, male | Caller-assigned sex. Male adds 1.28. Combined with age for the Table 3 age-and-sex terms. magent does not examine the child. |
pain_duration |
string | required · lt_24, 24_lt_48, 48_96 | Kharbanda 2018 Table 3 duration of pain as assigned by the caller: lt_24 (reference, 0), 24_lt_48 (+0.47), or 48_96 (+0.10). Derivation excluded pain beyond 96 hours. Do not send a nausea or vomiting flag. |
pain_with_walking |
boolean | required | Caller-assigned presence of pain with walking (Kharbanda 2018 Table 3 +1.05). magent does not examine the child. |
pain_migration_rlq |
boolean | required | Caller-assigned history of migration of pain to the right-lower quadrant (Kharbanda 2018 Table 3 +0.46). magent does not examine the child. |
maximal_tenderness_rlq |
boolean | required | Caller-assigned maximal tenderness in the right-lower quadrant (Kharbanda 2018 Table 3 +1.14). magent does not examine the child. |
abdominal_guarding |
boolean | required | Caller-assigned abdominal guarding (Kharbanda 2018 Table 3 +0.67). magent does not examine the child. |
anc_10e3_ul |
number | required | Absolute neutrophil count in x10^3/uL (0-80). Kharbanda 2018 Table 3: if ANC < 14, add 1.77*sqrt(ANC); if ANC >= 14, add 6.62 instead of the sqrt term. Required; magent does not impute ANC from WBC. |
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": [
{
"abdominal_guarding": "false",
"age": "15",
"anc_10e3_ul": "2.0",
"maximal_tenderness_rlq": "false",
"pain_duration": "lt_24",
"pain_migration_rlq": "false",
"pain_with_walking": "false",
"sex": "female"
},
{
"abdominal_guarding": "false",
"age": "15",
"anc_10e3_ul": "2.0",
"maximal_tenderness_rlq": "false",
"pain_duration": "lt_24",
"pain_migration_rlq": "false",
"pain_with_walking": "false",
"sex": "female"
}
]
}
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/parc",
"items": [
{
"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": "Kharbanda AB, Vazquez-Benitez G, Ballard DW, et al.",
"doi": "10.1542/peds.2017-2699",
"id": "kharbanda-2018",
"pmid": "29535251",
"source": "Pediatrics. 2018;141(4):e20172699",
"title": "Development and Validation of a Novel Pediatric Appendicitis Risk Calculator (pARC)"
},
"formula": "parc",
"formula_expression": "L = -8.7 + 1.28*male + age_sex + pain_duration + 1.05*pain_with_walking + 0.46*pain_migration_rlq + 1.14*maximal_tenderness_rlq + 0.67*abdominal_guarding + anc (Kharbanda 2018 Table 3); age 5-7.9 y 0.38; male 5-7.9 y -1.05; age 8-13.9 y -0.72 (male 8-13.9 y and female 8-11.9 y); reference = male 14-18 y and female 12-18 y; duration lt_24 0, 24_lt_48 0.47, 48_96 0.10; ANC <14 x10^3/uL: 1.77*sqrt(ANC); ANC >=14: 6.62 instead of the sqrt term; estimated_probability = 1 / (1 + exp(-L)); estimated_probability_percent = 100 * estimated_probability",
"age_years": 15,
"sex": "female",
"estimated_probability_percent": 0.2,
"logit": -6.1968,
"abdominal_guarding": false,
"anc_10e3_ul": 2.0,
"estimated_probability": 0.002032,
"maximal_tenderness_rlq": false,
"pain_duration": "lt_24",
"pain_migration_rlq": false,
"pain_with_walking": 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": "Kharbanda AB, Vazquez-Benitez G, Ballard DW, et al.",
"doi": "10.1542/peds.2017-2699",
"id": "kharbanda-2018",
"pmid": "29535251",
"source": "Pediatrics. 2018;141(4):e20172699",
"title": "Development and Validation of a Novel Pediatric Appendicitis Risk Calculator (pARC)"
},
"formula": "parc",
"formula_expression": "L = -8.7 + 1.28*male + age_sex + pain_duration + 1.05*pain_with_walking + 0.46*pain_migration_rlq + 1.14*maximal_tenderness_rlq + 0.67*abdominal_guarding + anc (Kharbanda 2018 Table 3); age 5-7.9 y 0.38; male 5-7.9 y -1.05; age 8-13.9 y -0.72 (male 8-13.9 y and female 8-11.9 y); reference = male 14-18 y and female 12-18 y; duration lt_24 0, 24_lt_48 0.47, 48_96 0.10; ANC <14 x10^3/uL: 1.77*sqrt(ANC); ANC >=14: 6.62 instead of the sqrt term; estimated_probability = 1 / (1 + exp(-L)); estimated_probability_percent = 100 * estimated_probability",
"age_years": 15,
"sex": "female",
"estimated_probability_percent": 0.2,
"logit": -6.1968,
"abdominal_guarding": false,
"anc_10e3_ul": 2.0,
"estimated_probability": 0.002032,
"maximal_tenderness_rlq": false,
"pain_duration": "lt_24",
"pain_migration_rlq": false,
"pain_with_walking": false
}
]
}
Response
| Field | Type | Description |
|---|---|---|
formula |
string | parc |
formula_expression |
string | Kharbanda 2018 Table 3 logistic expression |
age_years |
integer | Input age in years (5-18) |
sex |
string | female or male |
pain_duration |
string | lt_24, 24_lt_48, or 48_96 |
pain_with_walking |
boolean | Caller-assigned pain with walking flag |
pain_migration_rlq |
boolean | Caller-assigned history of pain migration to the RLQ |
maximal_tenderness_rlq |
boolean | Caller-assigned maximal tenderness in the RLQ |
abdominal_guarding |
boolean | Caller-assigned abdominal guarding flag |
anc_10e3_ul |
number | Input ANC in x10^3/uL |
logit |
number | Kharbanda 2018 Table 3 linear predictor L, 4 decimal places |
estimated_probability |
number | 1 / (1 + exp(-L)) from the unrounded logit, 6 decimal places. A probability, not a diagnosis. |
estimated_probability_percent |
number | 100 * estimated_probability from the unrounded logit, 2 decimal places. A probability, not a diagnosis or imaging order. |
citation |
object | Kharbanda et al. Pediatrics 2018 citation |
disclaimer |
string | Not-a-device notice |
Example JSON
Machine form of the same example. Frozen fixture. Not a live lookup.
{
"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": "Kharbanda AB, Vazquez-Benitez G, Ballard DW, et al.",
"doi": "10.1542/peds.2017-2699",
"id": "kharbanda-2018",
"pmid": "29535251",
"source": "Pediatrics. 2018;141(4):e20172699",
"title": "Development and Validation of a Novel Pediatric Appendicitis Risk Calculator (pARC)"
},
"formula": "parc",
"formula_expression": "L = -8.7 + 1.28*male + age_sex + pain_duration + 1.05*pain_with_walking + 0.46*pain_migration_rlq + 1.14*maximal_tenderness_rlq + 0.67*abdominal_guarding + anc (Kharbanda 2018 Table 3); age 5-7.9 y 0.38; male 5-7.9 y -1.05; age 8-13.9 y -0.72 (male 8-13.9 y and female 8-11.9 y); reference = male 14-18 y and female 12-18 y; duration lt_24 0, 24_lt_48 0.47, 48_96 0.10; ANC <14 x10^3/uL: 1.77*sqrt(ANC); ANC >=14: 6.62 instead of the sqrt term; estimated_probability = 1 / (1 + exp(-L)); estimated_probability_percent = 100 * estimated_probability",
"age_years": 15,
"sex": "female",
"estimated_probability_percent": 0.2,
"logit": -6.1968,
"abdominal_guarding": false,
"anc_10e3_ul": 2.0,
"estimated_probability": 0.002032,
"maximal_tenderness_rlq": false,
"pain_duration": "lt_24",
"pain_migration_rlq": false,
"pain_with_walking": false
}
Client errors (HTTP 400)
Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_parc |
pARC needs Kharbanda pediatric appendicitis inputs in published ranges. 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
- Pediatric appendicitis score — Compute the Samuel 2002 pediatric appendicitis score from eight caller-assigned findings in children aged 4-15.
- Alvarado score — Compute the Alvarado 1986 MANTRELS score from caller-assigned findings, temperature, WBC, and neutrophil percent.
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.