# 4AT (Bellelli)

4AT

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

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

## What it computes

Sum the Bellelli 2014 4AT items and return unlikely (0), possible cognitive impairment (1–3), or possible delirium (≥4).

## When to use

When an agent already has 4AT items assigned as in Bellelli 2014 and needs the published total and band, not a delirium or dementia diagnosis.

## When not to use

- Not a medical device and not a delirium or dementia diagnosis. magent does not examine the patient.
- AMT4 is a caller-assigned mistake count (0, 1, or 2). The paper’s AMT4 asks age, date of birth, place, and year at the bedside; this API does not collect those.
- Alertness, attention, and acute change or fluctuation are caller-assigned. magent does not observe consciousness, run months backwards, or take a history.
- Score 0 is unlikely, 1–3 is possible cognitive impairment, and ≥4 is possible delirium. This is a screening total, not a diagnosis.

## Formula

```
4AT = alertness (normal 0, abnormal 4) + amt4 (0/1/2) + attention (0/1/2) + acute_change (false 0, true 4); Bellelli 2014; max 12; 0 unlikely, 1-3 possible_cognitive_impairment, ≥4 possible_delirium
```

## Citation

[Validation of the 4AT, a new instrument for rapid delirium screening: a study in 234 hospitalised older people](https://doi.org/10.1093/ageing/afu021)
Bellelli G, Morandi A, Davis DH, Mazzola P, Turco R, Gentile S, Ryan T, Cash H, Guerini F, Torpilliesi T, Del Santo F, Trabucchi M, Annoni G, MacLullich AM
Age Ageing. 2014;43(4):496-502
DOI: [10.1093/ageing/afu021](https://doi.org/10.1093/ageing/afu021)

## Worked example

### All items zero

Given: `acute_change=false, alertness=normal, amt4=0, attention=0`

1. alertness normal → 0; amt4 0; attention 0; acute_change false → 0
2. Score = 0 (max 12); at_band = unlikely


### All items maximum

Given: `acute_change=true, alertness=abnormal, amt4=2, attention=2`

1. alertness abnormal → 4; amt4 2; attention 2; acute_change true → 4
2. Score = 12 (max 12); at_band = possible_delirium


## Also searched as

- 4AT
- 4 A's Test
- 4AT delirium
- Bellelli 4AT
- AMT4 delirium screen
- four AT
- rapid delirium screening
- 4AT cognitive test

## Parameters

- `alertness` (string, required): Bellelli 2014 4AT item 1 as assigned by the caller. normal scores 0; abnormal scores 4. magent does not observe consciousness.
- `amt4` (integer, required): Caller-assigned AMT4 mistake count only (Bellelli 2014): 0 mistakes → 0; 1 mistake → 1; ≥2 mistakes or untestable → 2. Integer 0, 1, or 2. This API does not collect age, date of birth, place, or year.
- `attention` (integer, required): Bellelli 2014 months-backwards item as assigned by the caller. 0: achieves ≥7 months. 1: starts but <7 months or refuses. 2: untestable. Integer 0, 1, or 2. magent does not run months backwards.
- `acute_change` (boolean, required): Bellelli 2014 acute change or fluctuating course as assigned by the caller. true scores 4. magent does not take a collateral history.

## 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/4at`
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": [
    {
      "acute_change": "false",
      "alertness": "normal",
      "amt4": "0",
      "attention": "0"
    },
    {
      "acute_change": "false",
      "alertness": "normal",
      "amt4": "0",
      "attention": "0"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/4at",
  "items": [
    {
      "components": [
        {
          "factor": "alertness",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "amt4",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "attention",
          "points": 0,
          "present": false
        },
        {
          "factor": "acute_change",
          "points": 0,
          "present": 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": "Bellelli G, Morandi A, Davis DH, Mazzola P, Turco R, Gentile S, Ryan T, Cash H, Guerini F, Torpilliesi T, Del Santo F, Trabucchi M, Annoni G, MacLullich AM",
        "doi": "10.1093/ageing/afu021",
        "id": "bellelli-2014",
        "pmid": "24590568",
        "source": "Age Ageing. 2014;43(4):496-502",
        "title": "Validation of the 4AT, a new instrument for rapid delirium screening: a study in 234 hospitalised older people"
      },
      "formula": "4at",
      "formula_expression": "4AT = alertness (normal 0, abnormal 4) + amt4 (0/1/2) + attention (0/1/2) + acute_change (false 0, true 4); Bellelli 2014; max 12; 0 unlikely, 1-3 possible_cognitive_impairment, ≥4 possible_delirium",
      "max_score": 12,
      "score": 0,
      "at_band": "unlikely"
    },
    {
      "components": [
        {
          "factor": "alertness",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "amt4",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "attention",
          "points": 0,
          "present": false
        },
        {
          "factor": "acute_change",
          "points": 0,
          "present": 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": "Bellelli G, Morandi A, Davis DH, Mazzola P, Turco R, Gentile S, Ryan T, Cash H, Guerini F, Torpilliesi T, Del Santo F, Trabucchi M, Annoni G, MacLullich AM",
        "doi": "10.1093/ageing/afu021",
        "id": "bellelli-2014",
        "pmid": "24590568",
        "source": "Age Ageing. 2014;43(4):496-502",
        "title": "Validation of the 4AT, a new instrument for rapid delirium screening: a study in 234 hospitalised older people"
      },
      "formula": "4at",
      "formula_expression": "4AT = alertness (normal 0, abnormal 4) + amt4 (0/1/2) + attention (0/1/2) + acute_change (false 0, true 4); Bellelli 2014; max 12; 0 unlikely, 1-3 possible_cognitive_impairment, ≥4 possible_delirium",
      "max_score": 12,
      "score": 0,
      "at_band": "unlikely"
    }
  ]
}
```

## Response fields

- `formula` (string): 4at
- `formula_expression` (string): Exact expression used
- `score` (integer): 4AT points 0-12
- `max_score` (integer): Always 12
- `at_band` (string): unlikely when score is 0, possible_cognitive_impairment when 1-3, possible_delirium when ≥4 (Bellelli 2014). Not a delirium diagnosis.
- `components` (array): Per-item points
- `citation` (object): Bellelli 2014 Age Ageing citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "factor": "alertness",
      "points": 0,
      "present": false
    },
    {
      "value": 0,
      "factor": "amt4",
      "points": 0,
      "present": false
    },
    {
      "value": 0,
      "factor": "attention",
      "points": 0,
      "present": false
    },
    {
      "factor": "acute_change",
      "points": 0,
      "present": 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": "Bellelli G, Morandi A, Davis DH, Mazzola P, Turco R, Gentile S, Ryan T, Cash H, Guerini F, Torpilliesi T, Del Santo F, Trabucchi M, Annoni G, MacLullich AM",
    "doi": "10.1093/ageing/afu021",
    "id": "bellelli-2014",
    "pmid": "24590568",
    "source": "Age Ageing. 2014;43(4):496-502",
    "title": "Validation of the 4AT, a new instrument for rapid delirium screening: a study in 234 hospitalised older people"
  },
  "formula": "4at",
  "formula_expression": "4AT = alertness (normal 0, abnormal 4) + amt4 (0/1/2) + attention (0/1/2) + acute_change (false 0, true 4); Bellelli 2014; max 12; 0 unlikely, 1-3 possible_cognitive_impairment, ≥4 possible_delirium",
  "max_score": 12,
  "score": 0,
  "at_band": "unlikely"
}
```

## Errors

- HTTP 400 `invalid_alertness`: alertness must be normal or abnormal (Bellelli 2014 4AT item 1). Returned before settlement; you are not charged.
- HTTP 400 `invalid_amt4`: amt4 must be 0, 1, or 2 (Bellelli 2014 4AT; 2 is ≥2 mistakes or untestable). Returned before settlement; you are not charged.
- HTTP 400 `invalid_attention`: attention must be 0, 1, or 2 (Bellelli 2014 4AT months backwards; 2 is untestable). 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

- [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.
- [RASS](https://magentlab.com/docs/rass) — Return the Sessler 2002 Richmond Agitation-Sedation Scale term and description from a caller-assigned integer -5 to +4.
- [Glasgow Coma Scale](https://magentlab.com/docs/gcs) — Compute the Glasgow Coma Scale as the sum of caller-assigned eye, verbal, and motor integers. The 1974 or 1976 edition is required.

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