# PECARN pediatric C-spine

PECARN pediatric C-spine

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

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

## What it computes

Apply the Leonard 2024 PECARN cervical-spine imaging prediction rule and return high (consider CT), intermediate (consider x-rays), or low (consider clinical clearance) from eight caller-assigned findings after pediatric blunt trauma. No age split.

## When to use

When an agent has caller-assigned findings after blunt trauma in a child and needs the Leonard 2024 PECARN C-spine imaging rule, not NEXUS, not Canadian C-spine, not PECARN head (pecarn-head), and not PECARN IAI (pecarn-iai).

## When not to use

- Not a medical device. Not a diagnosis. magent does not examine the patient.
- This tool is the Leonard 2024 PECARN C-spine prediction rule only. It is not NEXUS, not the Canadian C-spine rule, not PECARN head CT (pecarn-head), and not PECARN IAI (pecarn-iai).
- One tree with no age split (unlike PECARN head). Age is not a parameter. The caller assigns all eight flags. magent does not take a GCS integer or AVPU letter.
- High-risk (any of GCS 3-8 or AVPU U; abnormal airway, breathing, or circulation; focal neurologic deficit) considers CT. Else any CART non-negligible factor considers x-rays. Else consider clinical clearance. High-risk beats intermediate.
- Substantial head or torso injury is caller-assigned (paper: injuries warranting inpatient observation or surgical intervention; examples skull fracture, pneumothorax, solid-organ injury, T/L/S spine fracture, pelvic fracture). magent does not interpret imaging.

## Formula

```
high if any high-risk factor (gcs_3_to_8_or_avpu_u, abnormal_airway_breathing_or_circulation, or focal_neurologic_deficit), else intermediate if any CART non-negligible factor (neck_pain, altered_mental_status_gcs_9_to_14, substantial_head_injury, substantial_torso_injury, or midline_neck_tenderness), else low; high-risk beats intermediate; no age split (Leonard 2024)
```

## Citation

[PECARN prediction rule for cervical spine imaging of children presenting to the emergency department with blunt trauma: a multicentre prospective observational study](https://doi.org/10.1016/S2352-4642(24)00104-4)
Leonard JC, Harding M, Cook LJ, et al.
Lancet Child Adolesc Health. 2024;8(7):482-490
DOI: [10.1016/S2352-4642(24)00104-4](https://doi.org/10.1016/S2352-4642(24)00104-4)

## Worked example

### All flags false

Given: `abnormal_airway_breathing_or_circulation=false, altered_mental_status_gcs_9_to_14=false, focal_neurologic_deficit=false, gcs_3_to_8_or_avpu_u=false, midline_neck_tenderness=false, neck_pain=false, substantial_head_injury=false, substantial_torso_injury=false`

1. No high-risk factor and no CART non-negligible factor
2. risk_tier is low; consider clinical clearance


### GCS 3-8 or AVPU U is high

Given: `abnormal_airway_breathing_or_circulation=false, altered_mental_status_gcs_9_to_14=false, focal_neurologic_deficit=false, gcs_3_to_8_or_avpu_u=true, midline_neck_tenderness=false, neck_pain=false, substantial_head_injury=false, substantial_torso_injury=false`

1. GCS 3-8 or AVPU U is a high-risk factor
2. risk_tier is high; consider CT


### Neck pain alone is intermediate

Given: `abnormal_airway_breathing_or_circulation=false, altered_mental_status_gcs_9_to_14=false, focal_neurologic_deficit=false, gcs_3_to_8_or_avpu_u=false, midline_neck_tenderness=false, neck_pain=true, substantial_head_injury=false, substantial_torso_injury=false`

1. No high-risk factor; self-reported neck pain is a CART non-negligible factor
2. risk_tier is intermediate; consider x-rays


## Also searched as

- PECARN C-spine
- PECARN cervical spine
- Leonard 2024 C-spine
- pediatric cervical spine imaging
- PECARN CSI prediction rule
- children blunt trauma C-spine
- PECARN pediatric C-spine CT
- cervical spine injury children

## Parameters

- `gcs_3_to_8_or_avpu_u` (boolean, required): GCS 3-8 or AVPU = U as assigned by the caller (Leonard 2024 high-risk; paper: factors associated with >10% CSI). true or false. High-risk; consider CT when any high-risk factor is true. This is not the intermediate GCS 9-14 / AVPU V or P / other AMS flag. magent does not take a GCS integer or AVPU letter.
- `abnormal_airway_breathing_or_circulation` (boolean, required): Abnormal airway, breathing, or circulation as assigned by the caller (Leonard 2024 high-risk). true or false. High-risk; consider CT when any high-risk factor is true. magent does not examine airway, breathing, or circulation.
- `focal_neurologic_deficit` (boolean, required): Focal neurologic deficit (paresthesia, numbness, or weakness) as assigned by the caller (Leonard 2024 high-risk). true or false. High-risk; consider CT when any high-risk factor is true. magent does not examine the patient.
- `neck_pain` (boolean, required): Self-reported neck pain as assigned by the caller (Leonard 2024 CART non-negligible / intermediate). true or false. Consider x-rays when any intermediate factor is true and no high-risk factor is true. magent does not take a pain score.
- `altered_mental_status_gcs_9_to_14` (boolean, required): Altered mental status as GCS 9-14, AVPU V or P, or other AMS (not the high-risk U / GCS 3-8 flag) as assigned by the caller (Leonard 2024 CART non-negligible / intermediate). true or false. magent does not take a GCS integer or AVPU letter.
- `substantial_head_injury` (boolean, required): Substantial head injury as assigned by the caller (Leonard 2024 CART non-negligible / intermediate). Paper: injuries warranting inpatient observation or surgical intervention (example: skull fracture). true or false. Caller assigns the boolean; magent does not interpret imaging.
- `substantial_torso_injury` (boolean, required): Substantial torso injury as assigned by the caller (Leonard 2024 CART non-negligible / intermediate). Paper: injuries warranting inpatient observation or surgical intervention (examples: pneumothorax; solid-organ injury; T/L/S spine fracture; pelvic fracture). true or false. Caller assigns the boolean; magent does not interpret imaging.
- `midline_neck_tenderness` (boolean, required): Midline neck tenderness as assigned by the caller (Leonard 2024 CART non-negligible / intermediate). true or false. magent does not palpate the neck.

## 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/pecarn_cspine`
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": [
    {
      "abnormal_airway_breathing_or_circulation": "false",
      "altered_mental_status_gcs_9_to_14": "false",
      "focal_neurologic_deficit": "false",
      "gcs_3_to_8_or_avpu_u": "false",
      "midline_neck_tenderness": "false",
      "neck_pain": "false",
      "substantial_head_injury": "false",
      "substantial_torso_injury": "false"
    },
    {
      "abnormal_airway_breathing_or_circulation": "false",
      "altered_mental_status_gcs_9_to_14": "false",
      "focal_neurologic_deficit": "false",
      "gcs_3_to_8_or_avpu_u": "false",
      "midline_neck_tenderness": "false",
      "neck_pain": "false",
      "substantial_head_injury": "false",
      "substantial_torso_injury": "false"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/pecarn_cspine",
  "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": "Leonard JC, Harding M, Cook LJ, et al.",
        "doi": "10.1016/S2352-4642(24)00104-4",
        "id": "leonard-2024",
        "pmid": "38843852",
        "source": "Lancet Child Adolesc Health. 2024;8(7):482-490",
        "title": "PECARN prediction rule for cervical spine imaging of children presenting to the emergency department with blunt trauma: a multicentre prospective observational study"
      },
      "formula": "pecarn_cspine",
      "formula_expression": "high if any high-risk factor (gcs_3_to_8_or_avpu_u, abnormal_airway_breathing_or_circulation, or focal_neurologic_deficit), else intermediate if any CART non-negligible factor (neck_pain, altered_mental_status_gcs_9_to_14, substantial_head_injury, substantial_torso_injury, or midline_neck_tenderness), else low; high-risk beats intermediate; no age split (Leonard 2024)",
      "criteria": [
        {
          "factor": "gcs_3_to_8_or_avpu_u",
          "met": false
        },
        {
          "factor": "abnormal_airway_breathing_or_circulation",
          "met": false
        },
        {
          "factor": "focal_neurologic_deficit",
          "met": false
        },
        {
          "factor": "neck_pain",
          "met": false
        },
        {
          "factor": "altered_mental_status_gcs_9_to_14",
          "met": false
        },
        {
          "factor": "substantial_head_injury",
          "met": false
        },
        {
          "factor": "substantial_torso_injury",
          "met": false
        },
        {
          "factor": "midline_neck_tenderness",
          "met": false
        }
      ],
      "consider_clinical_clearance": true,
      "consider_ct": false,
      "consider_xray": false,
      "risk_tier": "low"
    },
    {
      "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": "Leonard JC, Harding M, Cook LJ, et al.",
        "doi": "10.1016/S2352-4642(24)00104-4",
        "id": "leonard-2024",
        "pmid": "38843852",
        "source": "Lancet Child Adolesc Health. 2024;8(7):482-490",
        "title": "PECARN prediction rule for cervical spine imaging of children presenting to the emergency department with blunt trauma: a multicentre prospective observational study"
      },
      "formula": "pecarn_cspine",
      "formula_expression": "high if any high-risk factor (gcs_3_to_8_or_avpu_u, abnormal_airway_breathing_or_circulation, or focal_neurologic_deficit), else intermediate if any CART non-negligible factor (neck_pain, altered_mental_status_gcs_9_to_14, substantial_head_injury, substantial_torso_injury, or midline_neck_tenderness), else low; high-risk beats intermediate; no age split (Leonard 2024)",
      "criteria": [
        {
          "factor": "gcs_3_to_8_or_avpu_u",
          "met": false
        },
        {
          "factor": "abnormal_airway_breathing_or_circulation",
          "met": false
        },
        {
          "factor": "focal_neurologic_deficit",
          "met": false
        },
        {
          "factor": "neck_pain",
          "met": false
        },
        {
          "factor": "altered_mental_status_gcs_9_to_14",
          "met": false
        },
        {
          "factor": "substantial_head_injury",
          "met": false
        },
        {
          "factor": "substantial_torso_injury",
          "met": false
        },
        {
          "factor": "midline_neck_tenderness",
          "met": false
        }
      ],
      "consider_clinical_clearance": true,
      "consider_ct": false,
      "consider_xray": false,
      "risk_tier": "low"
    }
  ]
}
```

## Response fields

- `formula` (string): pecarn_cspine
- `formula_expression` (string): Leonard 2024 one-tree high then intermediate then low C-spine rule
- `risk_tier` (string): high, intermediate, or low. High-risk beats intermediate. No age split.
- `consider_ct` (boolean): true when risk_tier is high (consider CT)
- `consider_xray` (boolean): true when risk_tier is intermediate (consider x-rays)
- `consider_clinical_clearance` (boolean): true when risk_tier is low (consider clinical clearance)
- `criteria` (array): Eight caller-assigned flags, high-risk first then intermediate, each with factor and met
- `citation` (object): Leonard 2024 Lancet Child Adolesc Health citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "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": "Leonard JC, Harding M, Cook LJ, et al.",
    "doi": "10.1016/S2352-4642(24)00104-4",
    "id": "leonard-2024",
    "pmid": "38843852",
    "source": "Lancet Child Adolesc Health. 2024;8(7):482-490",
    "title": "PECARN prediction rule for cervical spine imaging of children presenting to the emergency department with blunt trauma: a multicentre prospective observational study"
  },
  "formula": "pecarn_cspine",
  "formula_expression": "high if any high-risk factor (gcs_3_to_8_or_avpu_u, abnormal_airway_breathing_or_circulation, or focal_neurologic_deficit), else intermediate if any CART non-negligible factor (neck_pain, altered_mental_status_gcs_9_to_14, substantial_head_injury, substantial_torso_injury, or midline_neck_tenderness), else low; high-risk beats intermediate; no age split (Leonard 2024)",
  "criteria": [
    {
      "factor": "gcs_3_to_8_or_avpu_u",
      "met": false
    },
    {
      "factor": "abnormal_airway_breathing_or_circulation",
      "met": false
    },
    {
      "factor": "focal_neurologic_deficit",
      "met": false
    },
    {
      "factor": "neck_pain",
      "met": false
    },
    {
      "factor": "altered_mental_status_gcs_9_to_14",
      "met": false
    },
    {
      "factor": "substantial_head_injury",
      "met": false
    },
    {
      "factor": "substantial_torso_injury",
      "met": false
    },
    {
      "factor": "midline_neck_tenderness",
      "met": false
    }
  ],
  "consider_clinical_clearance": true,
  "consider_ct": false,
  "consider_xray": false,
  "risk_tier": "low"
}
```

## Errors

- 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

- [NEXUS C-spine](https://magentlab.com/docs/nexus) — Apply the Hoffman 2000 NEXUS C-spine rule and return whether the five low-risk criteria all hold (imaging not indicated by this rule).
- [Canadian C-spine rule](https://magentlab.com/docs/canadian-c-spine) — Apply the Stiell 2001 Canadian C-spine rule and return whether cervical radiography is indicated from caller-assigned age, high-risk factors, low-risk factors, and neck rotation.
- [PECARN pediatric head CT](https://magentlab.com/docs/pecarn-head) — Apply the Kuppermann 2009 PECARN prediction trees and return high, intermediate, or low risk of clinically important brain injury from caller-assigned findings after pediatric head trauma.
- [PECARN pediatric IAI](https://magentlab.com/docs/pecarn-iai) — Apply the Holmes 2013 PECARN seven-variable prediction rule and return whether the child is at very low risk of intra-abdominal injury requiring acute intervention (all seven caller-assigned findings absent). Does not order a CT.

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