# COPD Assessment Test

CAT

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

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

## What it computes

Sum eight caller-assigned Jones 2009 CAT items (each integer 0-5) and return the published 0-40 total. Does not apply later GOLD CAT impact bands.

## When to use

When an agent already has Jones 2009 integers 0-5 for the eight CAT items and needs the published total. magent does not interview the patient, diagnose COPD, score BODE, assign GOLD ABE groups, or apply later 0-10/11-20/21-30/31-40 GOLD impact bands.

## When not to use

- Not a medical device and not a COPD diagnosis or treatment order.
- Each of the eight items is a caller-assigned integer 0-5. magent does not interview the patient.
- This is Jones 2009 CAT only (eight items; max 40). magent does not score BODE and does not assign GOLD ABE groups.
- Jones 2009 published no GOLD 0-10 / 11-20 / 21-30 / 31-40 CAT impact bands. This tool returns score and max_score only. It does not apply later website or GOLD cutoffs.

## Formula

```
CAT = cough + phlegm + chest_tightness + breathlessness + activities + confidence + sleep + energy; each caller-assigned 0-5; Jones 2009 eight items; max 40; no GOLD 0-10 / 11-20 / 21-30 / 31-40 impact bands
```

## Citation

[Development and first validation of the COPD Assessment Test](https://doi.org/10.1183/09031936.00102509)
Jones PW, Harding G, Berry P, Wiklund I, Chen WH, Kline Leidy N
Eur Respir J. 2009;34(3):648-654
DOI: [10.1183/09031936.00102509](https://doi.org/10.1183/09031936.00102509)

## Worked example

### All items 0

Given: `activities=0, breathlessness=0, chest_tightness=0, confidence=0, cough=0, energy=0, phlegm=0, sleep=0`

1. cough, phlegm, chest_tightness, breathlessness, activities, confidence, sleep, and energy are 0 as assigned by the caller
2. Score = 0 (max 40). Jones 2009 published no GOLD CAT impact band.


### All items 5

Given: `activities=5, breathlessness=5, chest_tightness=5, confidence=5, cough=5, energy=5, phlegm=5, sleep=5`

1. each of the eight Jones 2009 CAT items is 5 as assigned by the caller
2. Score = 40 (max 40). No GOLD CAT impact band.


## Also searched as

- COPD Assessment Test
- CAT score
- Jones 2009 CAT
- COPD CAT questionnaire
- eight-item CAT
- COPD health status CAT

## Parameters

- `cough` (integer, required): Caller-assigned Jones 2009 CAT cough (integer 0-5): 0 I never cough to 5 I cough all the time. magent does not interview the patient.
- `phlegm` (integer, required): Caller-assigned Jones 2009 CAT phlegm (integer 0-5): 0 I have no phlegm (mucus) in my chest at all to 5 my chest is completely full of phlegm (mucus). magent does not interview the patient.
- `chest_tightness` (integer, required): Caller-assigned Jones 2009 CAT chest tightness (integer 0-5): 0 my chest does not feel tight at all to 5 my chest feels very tight. magent does not interview the patient.
- `breathlessness` (integer, required): Caller-assigned Jones 2009 CAT breathlessness (integer 0-5): 0 when I walk up a hill or one flight of stairs I am not breathless to 5 when I walk up a hill or one flight of stairs I am very breathless. magent does not interview the patient.
- `activities` (integer, required): Caller-assigned Jones 2009 CAT activities (integer 0-5): 0 I am not limited doing any activities at home to 5 I am very limited doing activities at home. magent does not interview the patient.
- `confidence` (integer, required): Caller-assigned Jones 2009 CAT confidence (integer 0-5): 0 I am confident leaving my home despite my lung condition to 5 I am not at all confident leaving my home because of my lung condition. magent does not interview the patient.
- `sleep` (integer, required): Caller-assigned Jones 2009 CAT sleep (integer 0-5): 0 I sleep soundly to 5 I don't sleep soundly because of my lung condition. magent does not interview the patient.
- `energy` (integer, required): Caller-assigned Jones 2009 CAT energy (integer 0-5): 0 I have lots of energy to 5 I have no energy at all. magent does not interview 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/cat`
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": [
    {
      "activities": "0",
      "breathlessness": "0",
      "chest_tightness": "0",
      "confidence": "0",
      "cough": "0",
      "energy": "0",
      "phlegm": "0",
      "sleep": "0"
    },
    {
      "activities": "0",
      "breathlessness": "0",
      "chest_tightness": "0",
      "confidence": "0",
      "cough": "0",
      "energy": "0",
      "phlegm": "0",
      "sleep": "0"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/cat",
  "items": [
    {
      "components": [
        {
          "value": 0,
          "factor": "cough",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "phlegm",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "chest_tightness",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "breathlessness",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "activities",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "confidence",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "sleep",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "energy",
          "points": 0,
          "present": 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": "Jones PW, Harding G, Berry P, Wiklund I, Chen WH, Kline Leidy N",
        "doi": "10.1183/09031936.00102509",
        "id": "jones-2009",
        "pmid": "19720809",
        "source": "Eur Respir J. 2009;34(3):648-654",
        "title": "Development and first validation of the COPD Assessment Test"
      },
      "formula": "cat",
      "formula_expression": "CAT = cough + phlegm + chest_tightness + breathlessness + activities + confidence + sleep + energy; each caller-assigned 0-5; Jones 2009 eight items; max 40; no GOLD 0-10 / 11-20 / 21-30 / 31-40 impact bands",
      "max_score": 40,
      "score": 0
    },
    {
      "components": [
        {
          "value": 0,
          "factor": "cough",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "phlegm",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "chest_tightness",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "breathlessness",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "activities",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "confidence",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "sleep",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "energy",
          "points": 0,
          "present": 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": "Jones PW, Harding G, Berry P, Wiklund I, Chen WH, Kline Leidy N",
        "doi": "10.1183/09031936.00102509",
        "id": "jones-2009",
        "pmid": "19720809",
        "source": "Eur Respir J. 2009;34(3):648-654",
        "title": "Development and first validation of the COPD Assessment Test"
      },
      "formula": "cat",
      "formula_expression": "CAT = cough + phlegm + chest_tightness + breathlessness + activities + confidence + sleep + energy; each caller-assigned 0-5; Jones 2009 eight items; max 40; no GOLD 0-10 / 11-20 / 21-30 / 31-40 impact bands",
      "max_score": 40,
      "score": 0
    }
  ]
}
```

## Response fields

- `formula` (string): cat
- `formula_expression` (string): Exact expression used
- `score` (integer): Jones 2009 sum of eight caller-assigned 0-5 items (total 0-40)
- `max_score` (integer): Always 40
- `components` (array): Per-item caller-assigned points
- `citation` (object): Jones Eur Respir J 2009 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": 0,
      "factor": "cough",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "phlegm",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "chest_tightness",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "breathlessness",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "activities",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "confidence",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "sleep",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "energy",
      "points": 0,
      "present": 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": "Jones PW, Harding G, Berry P, Wiklund I, Chen WH, Kline Leidy N",
    "doi": "10.1183/09031936.00102509",
    "id": "jones-2009",
    "pmid": "19720809",
    "source": "Eur Respir J. 2009;34(3):648-654",
    "title": "Development and first validation of the COPD Assessment Test"
  },
  "formula": "cat",
  "formula_expression": "CAT = cough + phlegm + chest_tightness + breathlessness + activities + confidence + sleep + energy; each caller-assigned 0-5; Jones 2009 eight items; max 40; no GOLD 0-10 / 11-20 / 21-30 / 31-40 impact bands",
  "max_score": 40,
  "score": 0
}
```

## Errors

- HTTP 400 `invalid_cat`: COPD Assessment Test needs the eight Jones 2009 items each as an integer 0-5. Returned before settlement; you are not charged.
- HTTP 400 `invalid_cat_item`: each CAT item must be an integer from 0 to 5 (Jones 2009). 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

- [BODE](https://magentlab.com/docs/bode) — Sum Celli 2004 BODE points from BMI, FEV1 percent predicted, MMRC dyspnea, and 6-minute walk distance.
- [GOLD spirometric grade](https://magentlab.com/docs/gold-copd) — Apply the 2017 GOLD executive summary spirometric classification: obstruction when post-bronchodilator FEV1/FVC is < 0.70, then GOLD grades 1-4 from FEV1 percent predicted.

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