MAGENT

Emergency · LIVE

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.

LIVE $0.005 USDC GET /api/calc/pecarn_head

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

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

What it computes

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.

When to use

When an agent has caller-assigned findings after blunt head trauma in a child 0-17 years and needs the Kuppermann 2009 PECARN head CT trees, not Canadian CT Head, CATCH, CHALICE, or NEXUS.

When not to use

  • Not a diagnosis of clinically important brain injury. magent does not examine the patient.
  • This tool is the Kuppermann 2009 PECARN head CT rule only. It is not Canadian CT Head, not CATCH, not CHALICE, not NEXUS, and not PECARN IAI, febrile infant, or c-spine rules.
  • Two mutually exclusive trees: age <2 (lt_2) and age 2-17 (ge_2). Flags that belong to the other age band are required on the API but do not score.
  • The caller assigns GCS <=14, altered mental status (agitation, somnolence, repetitive questioning, or slow response), and all other findings. magent does not take a GCS integer and does not classify mechanism or fall height.
  • Severe mechanism is caller-assigned. Published list: MVC ejection, rollover, or death of another passenger; unhelmeted pedestrian or bicyclist struck by a motorized vehicle; fall >3 ft if <2 years or >5 ft if >=2 years; head struck by a high-impact object.

Formula

high if any age-applicable high-risk factor, else intermediate if any age-applicable intermediate factor, else low; lt_2 tree if age < 2, ge_2 tree if age 2-17

Citation

Title
Identification of children at very low risk of clinically-important brain injuries after head trauma: a prospective cohort study
Authors
Kuppermann N, Holmes JF, Dayan PS, et al.
Source
Lancet. 2009;374(9696):1160-1170
DOI
10.1016/S0140-6736(09)61558-0

Worked example

Age 10, all findings absent

Given: age=10altered_mental_status=falsegcs_le_14=falsehistory_of_loc=falsehistory_of_vomiting=falseloc_ge_5_seconds=falsenonfrontal_scalp_hematoma=falsenot_acting_normally=falsepalpable_skull_fracture=falsesevere_headache=falsesevere_mechanism=falsesigns_basilar_skull_fracture=false

  1. Age 10 uses the ge_2 tree
  2. No age-applicable high-risk or intermediate factor
  3. risk_tier is low; CT is not recommended

Age 1 palpable skull fracture is high

Given: age=1altered_mental_status=falsegcs_le_14=falsehistory_of_loc=falsehistory_of_vomiting=falseloc_ge_5_seconds=falsenonfrontal_scalp_hematoma=falsenot_acting_normally=falsepalpable_skull_fracture=truesevere_headache=falsesevere_mechanism=falsesigns_basilar_skull_fracture=false

  1. Age 1 uses the lt_2 tree
  2. Palpable skull fracture is a high-risk factor on lt_2
  3. risk_tier is high; CT is recommended

Age 10 history of vomiting is intermediate

Given: age=10altered_mental_status=falsegcs_le_14=falsehistory_of_loc=falsehistory_of_vomiting=trueloc_ge_5_seconds=falsenonfrontal_scalp_hematoma=falsenot_acting_normally=falsepalpable_skull_fracture=falsesevere_headache=falsesevere_mechanism=falsesigns_basilar_skull_fracture=false

  1. Age 10 uses the ge_2 tree
  2. No high-risk factor; history of vomiting is intermediate on ge_2
  3. risk_tier is intermediate; observation versus CT

Also searched as

  • PECARN head CT
  • PECARN pediatric head injury
  • Kuppermann 2009
  • PECARN ciTBI
  • pediatric head trauma CT
  • PECARN head trauma algorithm
  • children very low risk brain injury
  • PECARN under 2 and 2 or older

Try

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

/api/calc/pecarn_head?age=10&gcs_le_14=false&altered_mental_status=false&palpable_skull_fracture=false&signs_basilar_skull_fracture=false&nonfrontal_scalp_hematoma=false&loc_ge_5_seconds=false&not_acting_normally=false&history_of_loc=false&history_of_vomiting=false&severe_headache=false&severe_mechanism=false

Full URL: https://api.magentlab.com/api/calc/pecarn_head?age=10&gcs_le_14=false&altered_mental_status=false&palpable_skull_fracture=false&signs_basilar_skull_fracture=false&nonfrontal_scalp_hematoma=false&loc_ge_5_seconds=false&not_acting_normally=false&history_of_loc=false&history_of_vomiting=false&severe_headache=false&severe_mechanism=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_head?age=10&gcs_le_14=false&altered_mental_status=false&palpable_skull_fracture=false&signs_basilar_skull_fracture=false&nonfrontal_scalp_hematoma=false&loc_ge_5_seconds=false&not_acting_normally=false&history_of_loc=false&history_of_vomiting=false&severe_headache=false&severe_mechanism=false"

Parameters

Name Type Required Description
age integer required Age in years (0-17). Age 0 and 1 use the lt_2 tree; age 2 through 17 use the ge_2 tree. Age 18 is rejected.
gcs_le_14 boolean required GCS <=14 as assigned by the caller. true or false. High-risk in both trees. GCS 15 is not <=14. magent does not take a GCS integer.
altered_mental_status boolean required Altered mental status as assigned by the caller (paper: agitation, somnolence, repetitive questioning, or slow response). true or false. High-risk in both trees.
palpable_skull_fracture boolean required Palpable skull fracture as assigned by the caller. true or false. High-risk only on the lt_2 tree; parsed but not scored when age >= 2.
signs_basilar_skull_fracture boolean required Signs of basilar skull fracture as assigned by the caller. true or false. High-risk only on the ge_2 tree; parsed but not scored when age < 2.
nonfrontal_scalp_hematoma boolean required Occipital, parietal, or temporal scalp hematoma (not frontal) as assigned by the caller. true or false. Intermediate only on the lt_2 tree; parsed but not scored when age >= 2.
loc_ge_5_seconds boolean required Loss of consciousness >=5 seconds as assigned by the caller. true or false. Intermediate only on the lt_2 tree; parsed but not scored when age >= 2.
not_acting_normally boolean required Not acting normally per parent report as assigned by the caller. true or false. Intermediate only on the lt_2 tree; parsed but not scored when age >= 2.
history_of_loc boolean required History of loss of consciousness as assigned by the caller. true or false. Intermediate only on the ge_2 tree; parsed but not scored when age < 2.
history_of_vomiting boolean required History of vomiting as assigned by the caller. true or false. Intermediate only on the ge_2 tree; parsed but not scored when age < 2.
severe_headache boolean required Severe headache as assigned by the caller. true or false. Intermediate only on the ge_2 tree; parsed but not scored when age < 2.
severe_mechanism boolean required Severe mechanism as assigned by the caller. true or false. Intermediate in both trees. Paper list: MVC ejection/rollover/death of another passenger; unhelmeted pedestrian or bicyclist struck by a motorized vehicle; fall >3 ft if <2 years or >5 ft if >=2 years; head struck by a high-impact object. magent does not classify mechanism or take fall height.

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_head 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": [
    {
      "age": "10",
      "altered_mental_status": "false",
      "gcs_le_14": "false",
      "history_of_loc": "false",
      "history_of_vomiting": "false",
      "loc_ge_5_seconds": "false",
      "nonfrontal_scalp_hematoma": "false",
      "not_acting_normally": "false",
      "palpable_skull_fracture": "false",
      "severe_headache": "false",
      "severe_mechanism": "false",
      "signs_basilar_skull_fracture": "false"
    },
    {
      "age": "10",
      "altered_mental_status": "false",
      "gcs_le_14": "false",
      "history_of_loc": "false",
      "history_of_vomiting": "false",
      "loc_ge_5_seconds": "false",
      "nonfrontal_scalp_hematoma": "false",
      "not_acting_normally": "false",
      "palpable_skull_fracture": "false",
      "severe_headache": "false",
      "severe_mechanism": "false",
      "signs_basilar_skull_fracture": "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_head",
  "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": "Kuppermann N, Holmes JF, Dayan PS, et al.",
        "doi": "10.1016/S0140-6736(09)61558-0",
        "id": "kuppermann-2009",
        "source": "Lancet. 2009;374(9696):1160-1170",
        "title": "Identification of children at very low risk of clinically-important brain injuries after head trauma: a prospective cohort study"
      },
      "formula": "pecarn_head",
      "formula_expression": "high if any age-applicable high-risk factor, else intermediate if any age-applicable intermediate factor, else low; lt_2 tree if age < 2, ge_2 tree if age 2-17",
      "age_years": 10,
      "criteria": [
        {
          "factor": "gcs_le_14",
          "met": false
        },
        {
          "factor": "altered_mental_status",
          "met": false
        },
        {
          "factor": "signs_basilar_skull_fracture",
          "met": false
        },
        {
          "factor": "history_of_loc",
          "met": false
        },
        {
          "factor": "history_of_vomiting",
          "met": false
        },
        {
          "factor": "severe_headache",
          "met": false
        },
        {
          "factor": "severe_mechanism",
          "met": false
        }
      ],
      "age_band": "ge_2",
      "ct_not_recommended": true,
      "ct_recommended": false,
      "observation_vs_ct": 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": "Kuppermann N, Holmes JF, Dayan PS, et al.",
        "doi": "10.1016/S0140-6736(09)61558-0",
        "id": "kuppermann-2009",
        "source": "Lancet. 2009;374(9696):1160-1170",
        "title": "Identification of children at very low risk of clinically-important brain injuries after head trauma: a prospective cohort study"
      },
      "formula": "pecarn_head",
      "formula_expression": "high if any age-applicable high-risk factor, else intermediate if any age-applicable intermediate factor, else low; lt_2 tree if age < 2, ge_2 tree if age 2-17",
      "age_years": 10,
      "criteria": [
        {
          "factor": "gcs_le_14",
          "met": false
        },
        {
          "factor": "altered_mental_status",
          "met": false
        },
        {
          "factor": "signs_basilar_skull_fracture",
          "met": false
        },
        {
          "factor": "history_of_loc",
          "met": false
        },
        {
          "factor": "history_of_vomiting",
          "met": false
        },
        {
          "factor": "severe_headache",
          "met": false
        },
        {
          "factor": "severe_mechanism",
          "met": false
        }
      ],
      "age_band": "ge_2",
      "ct_not_recommended": true,
      "ct_recommended": false,
      "observation_vs_ct": false,
      "risk_tier": "low"
    }
  ]
}

Response

Field Type Description
formula string pecarn_head
formula_expression string Kuppermann 2009 two-tree high then intermediate then low rule
age_years integer Age used to choose lt_2 vs ge_2
age_band string lt_2 when age < 2; ge_2 when age is 2 through 17
risk_tier string high, intermediate, or low from the age-applicable tree
ct_recommended boolean true when risk_tier is high
observation_vs_ct boolean true when risk_tier is intermediate
ct_not_recommended boolean true when risk_tier is low
criteria array Age-applicable factors only, high-risk first then intermediate, each with factor and met
citation object Kuppermann 2009 Lancet 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": "Kuppermann N, Holmes JF, Dayan PS, et al.",
    "doi": "10.1016/S0140-6736(09)61558-0",
    "id": "kuppermann-2009",
    "source": "Lancet. 2009;374(9696):1160-1170",
    "title": "Identification of children at very low risk of clinically-important brain injuries after head trauma: a prospective cohort study"
  },
  "formula": "pecarn_head",
  "formula_expression": "high if any age-applicable high-risk factor, else intermediate if any age-applicable intermediate factor, else low; lt_2 tree if age < 2, ge_2 tree if age 2-17",
  "age_years": 10,
  "criteria": [
    {
      "factor": "gcs_le_14",
      "met": false
    },
    {
      "factor": "altered_mental_status",
      "met": false
    },
    {
      "factor": "signs_basilar_skull_fracture",
      "met": false
    },
    {
      "factor": "history_of_loc",
      "met": false
    },
    {
      "factor": "history_of_vomiting",
      "met": false
    },
    {
      "factor": "severe_headache",
      "met": false
    },
    {
      "factor": "severe_mechanism",
      "met": false
    }
  ],
  "age_band": "ge_2",
  "ct_not_recommended": true,
  "ct_recommended": false,
  "observation_vs_ct": false,
  "risk_tier": "low"
}

Client errors (HTTP 400)

Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.

HTTP Code When
400 invalid_pecarn_age age must be an integer from 0 to 17. Returned before settlement; you are not charged.
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

  • Canadian CT Head Rule — Apply the Stiell 2001 Canadian CT Head Rule and return whether CT is indicated from caller-assigned high-risk and medium-risk findings after minor blunt head injury.
  • Glasgow Coma Scale — Compute the Glasgow Coma Scale as the sum of caller-assigned eye, verbal, and motor integers. The 1974 or 1976 edition is required.

Payment

Required query parameters must be present and valid. 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

  • Invalid query parameters return HTTP 400 before settlement. You are not charged.
  • Settlement finishes before the tool executes (paymentFlow upfront). 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.