# Abbey Pain Scale

Abbey Pain Scale

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

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

## What it computes

Sum six caller-assigned Abbey 2004 observational integers (0-3) and return the published total (max 18) and that paper's none/mild/moderate/severe bands.

## When to use

When an agent has already assigned Abbey 2004 0-3 integers for vocalization, facial expression, change in body language, behavioural change, physiological change, and physical changes and needs the published total and bands, not a pain diagnosis, analgesic order, or a PAINAD score.

## When not to use

- Not a medical device and not a pain diagnosis or analgesic order.
- Each of the six items is a caller-assigned integer 0 (absent), 1 (mild), 2 (moderate), or 3 (severe) from Abbey 2004. magent does not observe the patient.
- Abbey 2004 published total bands 0-2 none, 3-7 mild, 8-13 moderate, and 14+ severe. magent does not add an acute versus chronic classification from those six integers; that tick is not a function of the score.
- Not PAINAD (Warden 2003 items are 0-2).

## Formula

```
Abbey = vocalization + facial_expression + change_in_body_language + behavioural_change + physiological_change + physical_changes; each caller-assigned 0-3 (absent/mild/moderate/severe); max 18; Abbey 2004 bands 0-2 none, 3-7 mild, 8-13 moderate, 14+ severe
```

## Citation

[The Abbey pain scale: a 1-minute numerical indicator for people with end-stage dementia](https://doi.org/10.12968/ijpn.2004.10.1.12013)
Abbey J, Piller N, De Bellis A, Esterman A, Parker D, Giles L, Lowcay B
Int J Palliat Nurs. 2004;10(1):6-13
DOI: [10.12968/ijpn.2004.10.1.12013](https://doi.org/10.12968/ijpn.2004.10.1.12013)

## Worked example

### All items 0

Given: `behavioural_change=0, change_in_body_language=0, facial_expression=0, physical_changes=0, physiological_change=0, vocalization=0`

1. vocalization 0 + facial_expression 0 + change_in_body_language 0 + behavioural_change 0 + physiological_change 0 + physical_changes 0
2. Score = 0 (max 18); severity none


### All items 3

Given: `behavioural_change=3, change_in_body_language=3, facial_expression=3, physical_changes=3, physiological_change=3, vocalization=3`

1. vocalization 3 + facial_expression 3 + change_in_body_language 3 + behavioural_change 3 + physiological_change 3 + physical_changes 3
2. Score = 18 (max 18); severity severe


## Also searched as

- Abbey Pain Scale
- Abbey scale
- APS dementia pain
- Abbey 2004
- observational pain dementia
- end-stage dementia pain
- Abbey pain assessment

## Parameters

- `vocalization` (integer, required): Caller-assigned Abbey 2004 vocalization (integer 0-3): 0 absent; 1 mild; 2 moderate; 3 severe. Paper examples: whimpering, groaning, crying. magent does not observe the patient.
- `facial_expression` (integer, required): Caller-assigned Abbey 2004 facial expression (integer 0-3): 0 absent; 1 mild; 2 moderate; 3 severe. Paper examples: looking tense, frowning, grimacing, looking frightened. magent does not observe the patient.
- `change_in_body_language` (integer, required): Caller-assigned Abbey 2004 change in body language (integer 0-3): 0 absent; 1 mild; 2 moderate; 3 severe. Paper examples: fidgeting, rocking, guarding part of body, withdrawn. magent does not observe the patient.
- `behavioural_change` (integer, required): Caller-assigned Abbey 2004 behavioural change (integer 0-3): 0 absent; 1 mild; 2 moderate; 3 severe. Paper examples: increased confusion, refusing to eat, alteration in usual patterns. magent does not observe the patient.
- `physiological_change` (integer, required): Caller-assigned Abbey 2004 physiological change (integer 0-3): 0 absent; 1 mild; 2 moderate; 3 severe. Paper examples: temperature, pulse or blood pressure outside normal limits, perspiring, flushing or pallor. magent does not observe the patient.
- `physical_changes` (integer, required): Caller-assigned Abbey 2004 physical changes (integer 0-3): 0 absent; 1 mild; 2 moderate; 3 severe. Paper examples: skin tears, pressure areas, arthritis, contractures, previous injuries. magent does not observe the patient.

## 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/abbey`
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": [
    {
      "behavioural_change": "0",
      "change_in_body_language": "0",
      "facial_expression": "0",
      "physical_changes": "0",
      "physiological_change": "0",
      "vocalization": "0"
    },
    {
      "behavioural_change": "0",
      "change_in_body_language": "0",
      "facial_expression": "0",
      "physical_changes": "0",
      "physiological_change": "0",
      "vocalization": "0"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/abbey",
  "items": [
    {
      "components": [
        {
          "value": 0,
          "factor": "vocalization",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "facial_expression",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "change_in_body_language",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "behavioural_change",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "physiological_change",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "physical_changes",
          "points": 0,
          "present": true
        }
      ],
      "severity": "none",
      "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": "Abbey J, Piller N, De Bellis A, Esterman A, Parker D, Giles L, Lowcay B",
        "doi": "10.12968/ijpn.2004.10.1.12013",
        "id": "abbey-2004",
        "pmid": "14966439",
        "source": "Int J Palliat Nurs. 2004;10(1):6-13",
        "title": "The Abbey pain scale: a 1-minute numerical indicator for people with end-stage dementia"
      },
      "formula": "abbey",
      "formula_expression": "Abbey = vocalization + facial_expression + change_in_body_language + behavioural_change + physiological_change + physical_changes; each caller-assigned 0-3 (absent/mild/moderate/severe); max 18; Abbey 2004 bands 0-2 none, 3-7 mild, 8-13 moderate, 14+ severe",
      "max_score": 18,
      "score": 0
    },
    {
      "components": [
        {
          "value": 0,
          "factor": "vocalization",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "facial_expression",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "change_in_body_language",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "behavioural_change",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "physiological_change",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "physical_changes",
          "points": 0,
          "present": true
        }
      ],
      "severity": "none",
      "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": "Abbey J, Piller N, De Bellis A, Esterman A, Parker D, Giles L, Lowcay B",
        "doi": "10.12968/ijpn.2004.10.1.12013",
        "id": "abbey-2004",
        "pmid": "14966439",
        "source": "Int J Palliat Nurs. 2004;10(1):6-13",
        "title": "The Abbey pain scale: a 1-minute numerical indicator for people with end-stage dementia"
      },
      "formula": "abbey",
      "formula_expression": "Abbey = vocalization + facial_expression + change_in_body_language + behavioural_change + physiological_change + physical_changes; each caller-assigned 0-3 (absent/mild/moderate/severe); max 18; Abbey 2004 bands 0-2 none, 3-7 mild, 8-13 moderate, 14+ severe",
      "max_score": 18,
      "score": 0
    }
  ]
}
```

## Response fields

- `formula` (string): abbey
- `formula_expression` (string): Exact expression used
- `score` (integer): Abbey points 0-18
- `max_score` (integer): Always 18
- `severity` (string): Abbey 2004 published bands: none (0-2), mild (3-7), moderate (8-13), severe (14+). Not a pain diagnosis.
- `components` (array): Per-item caller-assigned points
- `citation` (object): Abbey et al. Int J Palliat Nurs 2004 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": 0,
      "factor": "vocalization",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "facial_expression",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "change_in_body_language",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "behavioural_change",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "physiological_change",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "physical_changes",
      "points": 0,
      "present": true
    }
  ],
  "severity": "none",
  "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": "Abbey J, Piller N, De Bellis A, Esterman A, Parker D, Giles L, Lowcay B",
    "doi": "10.12968/ijpn.2004.10.1.12013",
    "id": "abbey-2004",
    "pmid": "14966439",
    "source": "Int J Palliat Nurs. 2004;10(1):6-13",
    "title": "The Abbey pain scale: a 1-minute numerical indicator for people with end-stage dementia"
  },
  "formula": "abbey",
  "formula_expression": "Abbey = vocalization + facial_expression + change_in_body_language + behavioural_change + physiological_change + physical_changes; each caller-assigned 0-3 (absent/mild/moderate/severe); max 18; Abbey 2004 bands 0-2 none, 3-7 mild, 8-13 moderate, 14+ severe",
  "max_score": 18,
  "score": 0
}
```

## Errors

- HTTP 400 `invalid_abbey`: Abbey pain-scale inputs must be the six caller-assigned 0-3 observational items from Abbey 2004. 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

- [PAINAD](https://magentlab.com/docs/painad) — Sum five caller-assigned Warden 2003 PAINAD integers (0-2) and return the published total (max 10).

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