# Canadian C-spine rule

Canadian C-spine rule

Status: LIVE
Price: $0.005 USDC
`GET /api/calc/canadian_cspine`
HTML: https://magentlab.com/docs/canadian-c-spine
Markdown: https://magentlab.com/docs/canadian-c-spine.md

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

## What it computes

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.

## When to use

When an agent has caller-assigned findings after blunt neck trauma in an alert, stable adult and needs the published Canadian C-spine radiography rule, not NEXUS.

## When not to use

- Not a diagnosis of cervical spine injury. magent does not examine the neck.
- This tool is the Stiell 2001 Canadian C-spine rule only. It is not NEXUS and not a pediatric C-spine rule.
- Population is alert, stable blunt trauma in adults with GCS 15 as published. magent does not take GCS; the caller assigns the findings.
- Dangerous mechanism is caller-assigned. Published dangerous mechanisms: fall from elevation ≥3 feet/5 stairs; axial load to head; MVC high speed (>100 km/h), rollover, or ejection; motorized recreational vehicles; bicycle collision.
- Simple rear-end MVC is caller-assigned. Published exclusions from simple rear-end: pushed into oncoming traffic, hit by a bus or large truck, rollover, hit by a high-speed vehicle.

## Formula

```
xray indicated if any high-risk (age >= 65 or dangerous_mechanism or paresthesias_extremities); else if no low-risk allowing ROM (simple_rear_end_mvc or sitting_in_ed or ambulatory_since_injury or delayed_neck_pain or midline_cspine_tenderness false); else if not able_to_rotate_45
```

## Citation

[The Canadian C-spine rule for radiography in alert and stable trauma patients](https://doi.org/10.1001/jama.286.15.1841)
Stiell IG, Wells GA, Vandemheen KL, et al.
JAMA. 2001;286(15):1841-1848
DOI: [10.1001/jama.286.15.1841](https://doi.org/10.1001/jama.286.15.1841)

## Worked example

### Delayed neck pain and able to rotate

Given: `able_to_rotate_45=true, age=40, ambulatory_since_injury=false, dangerous_mechanism=false, delayed_neck_pain=true, midline_cspine_tenderness=true, paresthesias_extremities=false, simple_rear_end_mvc=false, sitting_in_ed=false`

1. Age 40 is not a high-risk factor; no dangerous mechanism or paresthesias
2. Delayed onset of neck pain is a low-risk factor that allows range-of-motion assessment
3. Able to rotate 45 degrees left and right; cervical x-ray is not indicated


### Age 65 mandates radiography

Given: `able_to_rotate_45=true, age=65, ambulatory_since_injury=false, dangerous_mechanism=false, delayed_neck_pain=true, midline_cspine_tenderness=true, paresthesias_extremities=false, simple_rear_end_mvc=false, sitting_in_ed=false`

1. Age ≥65 is a high-risk factor
2. Range of motion is not consulted
3. Cervical x-ray is indicated


### Low-risk present but cannot rotate

Given: `able_to_rotate_45=false, age=40, ambulatory_since_injury=false, dangerous_mechanism=false, delayed_neck_pain=true, midline_cspine_tenderness=true, paresthesias_extremities=false, simple_rear_end_mvc=false, sitting_in_ed=false`

1. No high-risk factor; delayed neck pain allows range-of-motion assessment
2. Unable to rotate 45 degrees left and right
3. Cervical x-ray is indicated


## Also searched as

- Canadian C-spine rule
- Canadian C-Spine Rule
- CCR C-spine
- Stiell C-spine rule
- cervical spine radiography rule
- Canadian cervical spine rule
- Stiell 2001 C-spine

## Parameters

- `age` (integer, required): Age in years (18-120). Age ≥65 is a high-risk factor that mandates radiography; 64 does not.
- `dangerous_mechanism` (boolean, required): Dangerous mechanism as assigned by the caller. true or false. High-risk; when true, radiography is indicated without range-of-motion assessment.
- `paresthesias_extremities` (boolean, required): Paresthesias in the extremities. true or false as assigned by the caller. High-risk; when true, radiography is indicated without range-of-motion assessment.
- `simple_rear_end_mvc` (boolean, required): Simple rear-end motor vehicle collision as assigned by the caller. true or false. A low-risk factor that can allow safe range-of-motion assessment.
- `sitting_in_ed` (boolean, required): Sitting position in the emergency department. true or false as assigned by the caller. A low-risk factor that can allow safe range-of-motion assessment.
- `ambulatory_since_injury` (boolean, required): Ambulatory at any time since injury. true or false as assigned by the caller. A low-risk factor that can allow safe range-of-motion assessment.
- `delayed_neck_pain` (boolean, required): Delayed onset of neck pain. true or false as assigned by the caller. A low-risk factor that can allow safe range-of-motion assessment.
- `midline_cspine_tenderness` (boolean, required): Midline cervical-spine tenderness. true or false as assigned by the caller. Absence of midline tenderness (false) is a low-risk factor that can allow safe range-of-motion assessment.
- `able_to_rotate_45` (boolean, required): Able to actively rotate the neck 45 degrees left and right. true or false as assigned by the caller. Consulted only when there is no high-risk factor and at least one low-risk factor.

## Bulk (POST)

POST the same path with a JSON items array. Price is n times the GET unit. Invalid items return HTTP 400 before settlement.

Method: `POST /api/calc/canadian_cspine`
Max items: 25
Price: unit_amount * n (unit 5000 atomic)
Status: PREVIEW

- 1 to 25 items. Each item uses the same keys as the GET query parameters.
- 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": [
    {
      "able_to_rotate_45": "true",
      "age": "40",
      "ambulatory_since_injury": "false",
      "dangerous_mechanism": "false",
      "delayed_neck_pain": "true",
      "midline_cspine_tenderness": "true",
      "paresthesias_extremities": "false",
      "simple_rear_end_mvc": "false",
      "sitting_in_ed": "false"
    },
    {
      "able_to_rotate_45": "true",
      "age": "40",
      "ambulatory_since_injury": "false",
      "dangerous_mechanism": "false",
      "delayed_neck_pain": "true",
      "midline_cspine_tenderness": "true",
      "paresthesias_extremities": "false",
      "simple_rear_end_mvc": "false",
      "sitting_in_ed": "false"
    }
  ]
}
```

Human paywall (two-item fixture): https://api.magentlab.com/paywall/bulk/canadian-c-spine

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/canadian_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": "Stiell IG, Wells GA, Vandemheen KL, et al.",
        "doi": "10.1001/jama.286.15.1841",
        "id": "stiell-2001",
        "source": "JAMA. 2001;286(15):1841-1848",
        "title": "The Canadian C-spine rule for radiography in alert and stable trauma patients"
      },
      "formula": "canadian_c_spine",
      "formula_expression": "xray indicated if any high-risk (age >= 65 or dangerous_mechanism or paresthesias_extremities); else if no low-risk allowing ROM (simple_rear_end_mvc or sitting_in_ed or ambulatory_since_injury or delayed_neck_pain or midline_cspine_tenderness false); else if not able_to_rotate_45",
      "age_years": 40,
      "able_to_rotate_45": true,
      "criteria": [
        {
          "value": 40,
          "factor": "high_risk",
          "age_ge_65": false,
          "dangerous_mechanism": false,
          "paresthesias_extremities": false,
          "met": false
        },
        {
          "factor": "low_risk_allows_rom",
          "ambulatory_since_injury": false,
          "delayed_neck_pain": true,
          "midline_cspine_tenderness": true,
          "simple_rear_end_mvc": false,
          "sitting_in_ed": false,
          "met": true
        },
        {
          "factor": "able_to_rotate_45",
          "met": true
        }
      ],
      "high_risk": false,
      "low_risk_allows_rom": true,
      "xray_indicated": 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": "Stiell IG, Wells GA, Vandemheen KL, et al.",
        "doi": "10.1001/jama.286.15.1841",
        "id": "stiell-2001",
        "source": "JAMA. 2001;286(15):1841-1848",
        "title": "The Canadian C-spine rule for radiography in alert and stable trauma patients"
      },
      "formula": "canadian_c_spine",
      "formula_expression": "xray indicated if any high-risk (age >= 65 or dangerous_mechanism or paresthesias_extremities); else if no low-risk allowing ROM (simple_rear_end_mvc or sitting_in_ed or ambulatory_since_injury or delayed_neck_pain or midline_cspine_tenderness false); else if not able_to_rotate_45",
      "age_years": 40,
      "able_to_rotate_45": true,
      "criteria": [
        {
          "value": 40,
          "factor": "high_risk",
          "age_ge_65": false,
          "dangerous_mechanism": false,
          "paresthesias_extremities": false,
          "met": false
        },
        {
          "factor": "low_risk_allows_rom",
          "ambulatory_since_injury": false,
          "delayed_neck_pain": true,
          "midline_cspine_tenderness": true,
          "simple_rear_end_mvc": false,
          "sitting_in_ed": false,
          "met": true
        },
        {
          "factor": "able_to_rotate_45",
          "met": true
        }
      ],
      "high_risk": false,
      "low_risk_allows_rom": true,
      "xray_indicated": false
    }
  ]
}
```

## Response fields

- `formula` (string): canadian_c_spine
- `formula_expression` (string): Stiell 2001 ordered high-risk, low-risk, then rotation rule
- `xray_indicated` (boolean): true when the ordered Canadian C-spine rule indicates cervical radiography. Not a diagnosis of injury.
- `high_risk` (boolean): true when age ≥65, dangerous_mechanism, or paresthesias_extremities. Mandates radiography.
- `low_risk_allows_rom` (boolean): true when at least one published low-risk factor allows safe range-of-motion assessment
- `able_to_rotate_45` (boolean): Caller-assigned ability to rotate the neck 45 degrees left and right
- `age_years` (integer): Age used for the ≥65 high-risk factor
- `criteria` (array): Ordered tree rows for high_risk, low_risk_allows_rom, and able_to_rotate_45 with factor and met
- `citation` (object): Stiell 2001 JAMA 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": "Stiell IG, Wells GA, Vandemheen KL, et al.",
    "doi": "10.1001/jama.286.15.1841",
    "id": "stiell-2001",
    "source": "JAMA. 2001;286(15):1841-1848",
    "title": "The Canadian C-spine rule for radiography in alert and stable trauma patients"
  },
  "formula": "canadian_c_spine",
  "formula_expression": "xray indicated if any high-risk (age >= 65 or dangerous_mechanism or paresthesias_extremities); else if no low-risk allowing ROM (simple_rear_end_mvc or sitting_in_ed or ambulatory_since_injury or delayed_neck_pain or midline_cspine_tenderness false); else if not able_to_rotate_45",
  "age_years": 40,
  "able_to_rotate_45": true,
  "criteria": [
    {
      "value": 40,
      "factor": "high_risk",
      "age_ge_65": false,
      "dangerous_mechanism": false,
      "paresthesias_extremities": false,
      "met": false
    },
    {
      "factor": "low_risk_allows_rom",
      "ambulatory_since_injury": false,
      "delayed_neck_pain": true,
      "midline_cspine_tenderness": true,
      "simple_rear_end_mvc": false,
      "sitting_in_ed": false,
      "met": true
    },
    {
      "factor": "able_to_rotate_45",
      "met": true
    }
  ],
  "high_risk": false,
  "low_risk_allows_rom": true,
  "xray_indicated": false
}
```

## Errors

- HTTP 400 `invalid_age`: age must be an integer from 18 to 120 Returned before settlement; you are not charged.
- 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

- [Ottawa ankle rule](https://magentlab.com/docs/ottawa-ankle) — Apply the Stiell 1992 Ottawa ankle rule and return whether an ankle x-ray series is indicated from caller-assigned malleolar pain, malleolar bone tenderness, and inability to bear weight.

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

- 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 EIP-3009 (scheme exact, assetTransferMethod eip3009) with validBefore = now + accepts[0].maxTimeoutSeconds (600 seconds). That window starts when you sign and must cover wallet confirmation plus CDP verify and settle. Magent retries transient facilitator 429/5xx before answering. Do not send upto or batch-settlement payloads; magent does not offer those schemes.
- Retry the same URL with PAYMENT-SIGNATURE (base64 JSON echoing accepted, payload, and extensions when present).
- Success is HTTP 200 JSON plus PAYMENT-RESPONSE. Settlement happens before the tool runs. HTTP 503 settlement_uncertain or settle_failed: retry the same PAYMENT-SIGNATURE. Mint a new 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.

- 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.
- not offered `batch-settlement`: Not offered. Payment-channel vouchers claimed later in batches. Not the same as POST {items} bulk (that is still exact).

Same-path POST {items} is still scheme exact: one EIP-3009 authorization for n times the GET unit. 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

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