# Cornell Assessment of Pediatric Delirium

CAPD

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

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

## What it computes

Sum eight caller-assigned Traube 2014 CAPD integers (0-4; eye_contact, purposeful_actions, awareness, and communication reverse-scored in that paper so never contributes 4) and return the 0-32 total and whether it meets this paper's screen-positive cut point (score ≥9).

## When to use

When an agent has already assigned Traube 2014 CAPD 0-4 integers for all eight items (after that paper's reverse key for eye contact, purposeful actions, awareness, and communication) and needs the published total and ≥9 screen, not a psychiatric diagnosis or CAM-ICU.

## When not to use

- Not a medical device and not a psychiatric diagnosis.
- magent does not examine the child. Each of the eight items is a caller-assigned integer 0-4 from Traube 2014 (never/rarely/sometimes/often/always after that paper's reverse key). magent does not interpret the items.
- This is Traube 2014 CAPD only. Items eye_contact, purposeful_actions, awareness, and communication (items 1-4) are reverse-scored in that paper so never contributes 4 and always contributes 0; the caller assigns the published 0-4 after that reverse key. Total 0-32.
- Traube 2014 published a screen-positive cut point of ≥9 (screen_positive is true iff score ≥9). magent does not invent additional developmental-delay cutoffs and does not treat a score as a psychiatric diagnosis.

## Formula

```
CAPD = eye_contact + purposeful_actions + awareness + communication + restless + inconsolable + underactive + delayed_response; each caller-assigned 0-4 as in Traube 2014 (eye_contact, purposeful_actions, awareness, and communication reverse-scored in that paper so never contributes 4 and always contributes 0; 0 is the never-delirium published pole); max 32; Traube 2014 screen-positive iff score ≥ 9
```

## Citation

[Cornell Assessment of Pediatric Delirium: a valid, rapid, observational tool for screening delirium in the PICU](https://doi.org/10.1097/CCM.0b013e3182a66b76)
Traube C, Silver G, Kearney J, Patel A, Atkinson TM, Yoon MJ, et al.
Crit Care Med. 2014;42(3):656-663
DOI: [10.1097/CCM.0b013e3182a66b76](https://doi.org/10.1097/CCM.0b013e3182a66b76)

## Worked example

### All items at the never-delirium pole

Given: `awareness=0, communication=0, delayed_response=0, eye_contact=0, inconsolable=0, purposeful_actions=0, restless=0, underactive=0`

1. Each item is 0 (never-delirium published pole, including reverse-scored eye_contact, purposeful_actions, awareness, and communication)
2. Score = 0 (max 32); screen_positive false (Traube 2014 cut point is ≥9)


### Reverse-scored item at never (4)

Given: `awareness=0, communication=0, delayed_response=0, eye_contact=4, inconsolable=0, purposeful_actions=0, restless=0, underactive=0`

1. eye_contact is reverse-scored in Traube 2014; never contributes 4
2. Remaining items 0; score = 4; screen_positive false


### Score 8, just below the ≥9 cut

Given: `awareness=1, communication=1, delayed_response=1, eye_contact=1, inconsolable=1, purposeful_actions=1, restless=1, underactive=1`

1. 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 = 8
2. Score = 8 (max 32); screen_positive false. No developmental-delay cutoff.


### Traube 2014 cut point ≥9

Given: `awareness=1, communication=1, delayed_response=1, eye_contact=1, inconsolable=1, purposeful_actions=1, restless=2, underactive=1`

1. 1 + 1 + 1 + 1 + 2 + 1 + 1 + 1 = 9
2. Score = 9 (max 32); screen_positive true (8 is below; ≥9 is screen-positive). No developmental-delay cutoff.


### All items 4

Given: `awareness=4, communication=4, delayed_response=4, eye_contact=4, inconsolable=4, purposeful_actions=4, restless=4, underactive=4`

1. Each item is 4 (maximum published pole)
2. Score = 32 (max 32); screen_positive true


## Also searched as

- CAPD
- Cornell Assessment of Pediatric Delirium
- Traube CAPD
- pediatric delirium screen
- PICU delirium CAPD
- Traube 2014 CAPD
- Cornell pediatric delirium

## Parameters

- `eye_contact` (integer, required): Caller-assigned Traube 2014 CAPD item 1 (integer 0-4). Reverse-scored in that paper: does the child make eye contact with the caregiver. 0 is always (never-delirium pole after reverse scoring); 4 is never (never contributes 4). magent does not examine the child.
- `purposeful_actions` (integer, required): Caller-assigned Traube 2014 CAPD item 2 (integer 0-4). Reverse-scored in that paper: are the child's actions purposeful. 0 is always (never-delirium pole after reverse scoring); 4 is never (never contributes 4). magent does not examine the child.
- `awareness` (integer, required): Caller-assigned Traube 2014 CAPD item 3 (integer 0-4). Reverse-scored in that paper: is the child aware of his/her surroundings. 0 is always (never-delirium pole after reverse scoring); 4 is never (never contributes 4). magent does not examine the child.
- `communication` (integer, required): Caller-assigned Traube 2014 CAPD item 4 (integer 0-4). Reverse-scored in that paper: does the child communicate needs and wants. 0 is always (never-delirium pole after reverse scoring); 4 is never (never contributes 4). magent does not examine the child.
- `restless` (integer, required): Caller-assigned Traube 2014 CAPD item 5 (integer 0-4): is the child restless. Adds as published (0 never, never-delirium pole, through 4 always). magent does not examine the child.
- `inconsolable` (integer, required): Caller-assigned Traube 2014 CAPD item 6 (integer 0-4): is the child inconsolable. Adds as published (0 never, never-delirium pole, through 4 always). magent does not examine the child.
- `underactive` (integer, required): Caller-assigned Traube 2014 CAPD item 7 (integer 0-4): is the child underactive — very little movement while awake. Adds as published (0 never, never-delirium pole, through 4 always). magent does not examine the child.
- `delayed_response` (integer, required): Caller-assigned Traube 2014 CAPD item 8 (integer 0-4): does it take the child a long time to respond to interactions. Adds as published (0 never, never-delirium pole, through 4 always). magent does not examine the child.

## 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/capd`
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": [
    {
      "awareness": "0",
      "communication": "0",
      "delayed_response": "0",
      "eye_contact": "0",
      "inconsolable": "0",
      "purposeful_actions": "0",
      "restless": "0",
      "underactive": "0"
    },
    {
      "awareness": "0",
      "communication": "0",
      "delayed_response": "0",
      "eye_contact": "0",
      "inconsolable": "0",
      "purposeful_actions": "0",
      "restless": "0",
      "underactive": "0"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/capd",
  "items": [
    {
      "components": [
        {
          "value": 0,
          "factor": "eye_contact",
          "points": 0,
          "present": true,
          "reverse_scored": true
        },
        {
          "value": 0,
          "factor": "purposeful_actions",
          "points": 0,
          "present": true,
          "reverse_scored": true
        },
        {
          "value": 0,
          "factor": "awareness",
          "points": 0,
          "present": true,
          "reverse_scored": true
        },
        {
          "value": 0,
          "factor": "communication",
          "points": 0,
          "present": true,
          "reverse_scored": true
        },
        {
          "value": 0,
          "factor": "restless",
          "points": 0,
          "present": true,
          "reverse_scored": false
        },
        {
          "value": 0,
          "factor": "inconsolable",
          "points": 0,
          "present": true,
          "reverse_scored": false
        },
        {
          "value": 0,
          "factor": "underactive",
          "points": 0,
          "present": true,
          "reverse_scored": false
        },
        {
          "value": 0,
          "factor": "delayed_response",
          "points": 0,
          "present": true,
          "reverse_scored": 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": "Traube C, Silver G, Kearney J, Patel A, Atkinson TM, Yoon MJ, et al.",
        "doi": "10.1097/CCM.0b013e3182a66b76",
        "id": "traube-2014",
        "pmid": "24145848",
        "source": "Crit Care Med. 2014;42(3):656-663",
        "title": "Cornell Assessment of Pediatric Delirium: a valid, rapid, observational tool for screening delirium in the PICU"
      },
      "formula": "capd",
      "formula_expression": "CAPD = eye_contact + purposeful_actions + awareness + communication + restless + inconsolable + underactive + delayed_response; each caller-assigned 0-4 as in Traube 2014 (eye_contact, purposeful_actions, awareness, and communication reverse-scored in that paper so never contributes 4 and always contributes 0; 0 is the never-delirium published pole); max 32; Traube 2014 screen-positive iff score ≥ 9",
      "max_score": 32,
      "score": 0,
      "screen_positive": false
    },
    {
      "components": [
        {
          "value": 0,
          "factor": "eye_contact",
          "points": 0,
          "present": true,
          "reverse_scored": true
        },
        {
          "value": 0,
          "factor": "purposeful_actions",
          "points": 0,
          "present": true,
          "reverse_scored": true
        },
        {
          "value": 0,
          "factor": "awareness",
          "points": 0,
          "present": true,
          "reverse_scored": true
        },
        {
          "value": 0,
          "factor": "communication",
          "points": 0,
          "present": true,
          "reverse_scored": true
        },
        {
          "value": 0,
          "factor": "restless",
          "points": 0,
          "present": true,
          "reverse_scored": false
        },
        {
          "value": 0,
          "factor": "inconsolable",
          "points": 0,
          "present": true,
          "reverse_scored": false
        },
        {
          "value": 0,
          "factor": "underactive",
          "points": 0,
          "present": true,
          "reverse_scored": false
        },
        {
          "value": 0,
          "factor": "delayed_response",
          "points": 0,
          "present": true,
          "reverse_scored": 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": "Traube C, Silver G, Kearney J, Patel A, Atkinson TM, Yoon MJ, et al.",
        "doi": "10.1097/CCM.0b013e3182a66b76",
        "id": "traube-2014",
        "pmid": "24145848",
        "source": "Crit Care Med. 2014;42(3):656-663",
        "title": "Cornell Assessment of Pediatric Delirium: a valid, rapid, observational tool for screening delirium in the PICU"
      },
      "formula": "capd",
      "formula_expression": "CAPD = eye_contact + purposeful_actions + awareness + communication + restless + inconsolable + underactive + delayed_response; each caller-assigned 0-4 as in Traube 2014 (eye_contact, purposeful_actions, awareness, and communication reverse-scored in that paper so never contributes 4 and always contributes 0; 0 is the never-delirium published pole); max 32; Traube 2014 screen-positive iff score ≥ 9",
      "max_score": 32,
      "score": 0,
      "screen_positive": false
    }
  ]
}
```

## Response fields

- `formula` (string): capd
- `formula_expression` (string): Exact expression used
- `score` (integer): CAPD points 0-32
- `max_score` (integer): 32
- `screen_positive` (boolean): true iff score ≥ 9 (Traube 2014 cut point). Not a psychiatric diagnosis. Not a developmental-delay cutoff.
- `components` (array): Per-item caller-assigned points (reverse-scored items flagged)
- `citation` (object): Traube et al. Crit Care Med 2014 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": 0,
      "factor": "eye_contact",
      "points": 0,
      "present": true,
      "reverse_scored": true
    },
    {
      "value": 0,
      "factor": "purposeful_actions",
      "points": 0,
      "present": true,
      "reverse_scored": true
    },
    {
      "value": 0,
      "factor": "awareness",
      "points": 0,
      "present": true,
      "reverse_scored": true
    },
    {
      "value": 0,
      "factor": "communication",
      "points": 0,
      "present": true,
      "reverse_scored": true
    },
    {
      "value": 0,
      "factor": "restless",
      "points": 0,
      "present": true,
      "reverse_scored": false
    },
    {
      "value": 0,
      "factor": "inconsolable",
      "points": 0,
      "present": true,
      "reverse_scored": false
    },
    {
      "value": 0,
      "factor": "underactive",
      "points": 0,
      "present": true,
      "reverse_scored": false
    },
    {
      "value": 0,
      "factor": "delayed_response",
      "points": 0,
      "present": true,
      "reverse_scored": 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": "Traube C, Silver G, Kearney J, Patel A, Atkinson TM, Yoon MJ, et al.",
    "doi": "10.1097/CCM.0b013e3182a66b76",
    "id": "traube-2014",
    "pmid": "24145848",
    "source": "Crit Care Med. 2014;42(3):656-663",
    "title": "Cornell Assessment of Pediatric Delirium: a valid, rapid, observational tool for screening delirium in the PICU"
  },
  "formula": "capd",
  "formula_expression": "CAPD = eye_contact + purposeful_actions + awareness + communication + restless + inconsolable + underactive + delayed_response; each caller-assigned 0-4 as in Traube 2014 (eye_contact, purposeful_actions, awareness, and communication reverse-scored in that paper so never contributes 4 and always contributes 0; 0 is the never-delirium published pole); max 32; Traube 2014 screen-positive iff score ≥ 9",
  "max_score": 32,
  "score": 0,
  "screen_positive": false
}
```

## Errors

- HTTP 400 `invalid_capd`: CAPD inputs must be the eight caller-assigned 0-4 Cornell items from Traube 2014. 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

- [CAM-ICU](https://magentlab.com/docs/cam-icu) — Apply the Ely 2001 CAM-ICU algorithm and return whether delirium is present from four caller-assigned features.

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