MAGENT

Emergency · LIVE

PECARN pediatric C-spine

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.

LIVE $0.005 USDC GET /api/calc/pecarn_cspine

Markdown: /docs/pecarn-cspine.md · Canonical: https://magentlab.com/docs/pecarn-cspine

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

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

Worked example

All flags false

Given: abnormal_airway_breathing_or_circulation=falsealtered_mental_status_gcs_9_to_14=falsefocal_neurologic_deficit=falsegcs_3_to_8_or_avpu_u=falsemidline_neck_tenderness=falseneck_pain=falsesubstantial_head_injury=falsesubstantial_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=falsealtered_mental_status_gcs_9_to_14=falsefocal_neurologic_deficit=falsegcs_3_to_8_or_avpu_u=truemidline_neck_tenderness=falseneck_pain=falsesubstantial_head_injury=falsesubstantial_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=falsealtered_mental_status_gcs_9_to_14=falsefocal_neurologic_deficit=falsegcs_3_to_8_or_avpu_u=falsemidline_neck_tenderness=falseneck_pain=truesubstantial_head_injury=falsesubstantial_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

Try

Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.

/api/calc/pecarn_cspine?gcs_3_to_8_or_avpu_u=false&abnormal_airway_breathing_or_circulation=false&focal_neurologic_deficit=false&neck_pain=false&altered_mental_status_gcs_9_to_14=false&substantial_head_injury=false&substantial_torso_injury=false&midline_neck_tenderness=false

Full URL: https://api.magentlab.com/api/calc/pecarn_cspine?gcs_3_to_8_or_avpu_u=false&abnormal_airway_breathing_or_circulation=false&focal_neurologic_deficit=false&neck_pain=false&altered_mental_status_gcs_9_to_14=false&substantial_head_injury=false&substantial_torso_injury=false&midline_neck_tenderness=false

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/pecarn_cspine?gcs_3_to_8_or_avpu_u=false&abnormal_airway_breathing_or_circulation=false&focal_neurologic_deficit=false&neck_pain=false&altered_mental_status_gcs_9_to_14=false&substantial_head_injury=false&substantial_torso_injury=false&midline_neck_tenderness=false"

Parameters

Name Type Required Description
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.

POST /api/calc/pecarn_cspine Max 25 unit_amount + extra_item_amount * (n - 1) extra $0.002 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 (fixture)

{
  "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"
    }
  ]
}

Open bulk paywall →

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/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
        }
      ],
      "risk_tier": "low",
      "consider_clinical_clearance": true,
      "consider_ct": false,
      "consider_xray": 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": "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
        }
      ],
      "risk_tier": "low",
      "consider_clinical_clearance": true,
      "consider_ct": false,
      "consider_xray": false
    }
  ]
}

Response

Field Type Description
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

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": "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
    }
  ],
  "risk_tier": "low",
  "consider_clinical_clearance": true,
  "consider_ct": false,
  "consider_xray": false
}

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_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

  • NEXUS C-spine — 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 — 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 — 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 — 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. 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.