# NEXUS C-spine

NEXUS C-spine

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

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

## What it computes

Apply the Hoffman 2000 NEXUS C-spine rule and return whether the five low-risk criteria all hold (imaging not indicated by this rule).

## When to use

When an agent has caller-assigned findings after blunt trauma and needs the published NEXUS C-spine imaging rule, not the Canadian C-spine rule.

## When not to use

- Not a diagnosis. magent does not examine the cervical spine.
- This tool is the Hoffman 2000 NEXUS C-spine rule only. It is not the Canadian C-spine rule and not NEXUS chest or NEXUS head CT.
- Blunt-trauma adults as published. magent does not take age; the caller assigns the five findings.
- Does not replace imaging when any criterion fails.

## Formula

```
NEXUS low-risk iff no posterior midline cervical-spine tenderness and no focal neurologic deficit and normal alertness and no intoxication and no painful distracting injury
```

## Citation

[Validity of a set of clinical criteria to rule out injury to the cervical spine in patients with blunt trauma](https://doi.org/10.1056/NEJM200007133430203)
Hoffman JR, Mower WR, Wolfson AB, Todd KH, Zucker MI; National Emergency X-Radiography Utilization Study Group
N Engl J Med. 2000;343(2):94-99
DOI: [10.1056/NEJM200007133430203](https://doi.org/10.1056/NEJM200007133430203)

## Worked example

### All five low-risk criteria hold

Given: `distracting_injury=false, focal_neuro_deficit=false, intoxication=false, midline_cervical_tenderness=false, normal_alertness=true`

1. No midline tenderness, no focal deficit, normal alertness, no intoxication, no distracting injury
2. NEXUS low-risk; imaging is not indicated by this rule


### Midline tenderness alone fails the rule

Given: `distracting_injury=false, focal_neuro_deficit=false, intoxication=false, midline_cervical_tenderness=true, normal_alertness=true`

1. Posterior midline cervical-spine tenderness is present
2. The low-risk criterion fails; imaging is indicated by this rule


## Also searched as

- NEXUS C-spine
- NEXUS criteria
- Hoffman NEXUS
- cervical spine imaging rule
- NEXUS low-risk criteria
- National Emergency X-Radiography Utilization Study
- C-spine clearance rule
- NEXUS five criteria

## Parameters

- `midline_cervical_tenderness` (boolean, required): Posterior midline cervical-spine tenderness. true means tenderness is present and the low-risk criterion fails. true or false as assigned by the caller.
- `focal_neuro_deficit` (boolean, required): Focal neurologic deficit. true means a deficit is present and the low-risk criterion fails. true or false as assigned by the caller.
- `normal_alertness` (boolean, required): Normal alertness. true means alertness is normal and the low-risk criterion holds; false is altered alertness and the criterion fails.
- `intoxication` (boolean, required): Intoxication. true means intoxicated and the low-risk criterion fails. true or false as assigned by the caller.
- `distracting_injury` (boolean, required): Painful, distracting injury. true means a distracting injury is present and the low-risk criterion fails. true or false as assigned by the caller.

## 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/nexus`
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": [
    {
      "distracting_injury": "false",
      "focal_neuro_deficit": "false",
      "intoxication": "false",
      "midline_cervical_tenderness": "false",
      "normal_alertness": "true"
    },
    {
      "distracting_injury": "false",
      "focal_neuro_deficit": "false",
      "intoxication": "false",
      "midline_cervical_tenderness": "false",
      "normal_alertness": "true"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/nexus",
  "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": "Hoffman JR, Mower WR, Wolfson AB, Todd KH, Zucker MI; National Emergency X-Radiography Utilization Study Group",
        "doi": "10.1056/NEJM200007133430203",
        "id": "hoffman-2000",
        "source": "N Engl J Med. 2000;343(2):94-99",
        "title": "Validity of a set of clinical criteria to rule out injury to the cervical spine in patients with blunt trauma"
      },
      "formula": "nexus",
      "formula_expression": "NEXUS low-risk iff no posterior midline cervical-spine tenderness and no focal neurologic deficit and normal alertness and no intoxication and no painful distracting injury",
      "criteria": [
        {
          "factor": "no_midline_cervical_tenderness",
          "met": true
        },
        {
          "factor": "no_focal_neuro_deficit",
          "met": true
        },
        {
          "factor": "normal_alertness",
          "met": true
        },
        {
          "factor": "no_intoxication",
          "met": true
        },
        {
          "factor": "no_distracting_injury",
          "met": true
        }
      ],
      "xray_indicated": false,
      "nexus_low_risk": true
    },
    {
      "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": "Hoffman JR, Mower WR, Wolfson AB, Todd KH, Zucker MI; National Emergency X-Radiography Utilization Study Group",
        "doi": "10.1056/NEJM200007133430203",
        "id": "hoffman-2000",
        "source": "N Engl J Med. 2000;343(2):94-99",
        "title": "Validity of a set of clinical criteria to rule out injury to the cervical spine in patients with blunt trauma"
      },
      "formula": "nexus",
      "formula_expression": "NEXUS low-risk iff no posterior midline cervical-spine tenderness and no focal neurologic deficit and normal alertness and no intoxication and no painful distracting injury",
      "criteria": [
        {
          "factor": "no_midline_cervical_tenderness",
          "met": true
        },
        {
          "factor": "no_focal_neuro_deficit",
          "met": true
        },
        {
          "factor": "normal_alertness",
          "met": true
        },
        {
          "factor": "no_intoxication",
          "met": true
        },
        {
          "factor": "no_distracting_injury",
          "met": true
        }
      ],
      "xray_indicated": false,
      "nexus_low_risk": true
    }
  ]
}
```

## Response fields

- `formula` (string): nexus
- `formula_expression` (string): Hoffman 2000 five low-risk criteria
- `nexus_low_risk` (boolean): true only when all five low-risk criteria hold. Imaging is not indicated by this rule when true. Not a diagnosis.
- `xray_indicated` (boolean): true when nexus_low_risk is false. Not a diagnosis of cervical-spine injury.
- `criteria` (array): Per-factor rows with factor and met; met is true when that NEXUS low-risk item holds
- `citation` (object): Hoffman 2000 N Engl J Med 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": "Hoffman JR, Mower WR, Wolfson AB, Todd KH, Zucker MI; National Emergency X-Radiography Utilization Study Group",
    "doi": "10.1056/NEJM200007133430203",
    "id": "hoffman-2000",
    "source": "N Engl J Med. 2000;343(2):94-99",
    "title": "Validity of a set of clinical criteria to rule out injury to the cervical spine in patients with blunt trauma"
  },
  "formula": "nexus",
  "formula_expression": "NEXUS low-risk iff no posterior midline cervical-spine tenderness and no focal neurologic deficit and normal alertness and no intoxication and no painful distracting injury",
  "criteria": [
    {
      "factor": "no_midline_cervical_tenderness",
      "met": true
    },
    {
      "factor": "no_focal_neuro_deficit",
      "met": true
    },
    {
      "factor": "normal_alertness",
      "met": true
    },
    {
      "factor": "no_intoxication",
      "met": true
    },
    {
      "factor": "no_distracting_injury",
      "met": true
    }
  ],
  "xray_indicated": false,
  "nexus_low_risk": true
}
```

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

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