# Ottawa COPD Risk Scale

Ottawa COPD Risk Scale

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

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

## What it computes

Sum the ten Stiell 2014 Ottawa COPD Risk Scale flags and return the integer point total (max 16), Table 8 risk band, and tabulated SAE percent when published.

## When to use

When an agent needs the published Stiell 2014 Ottawa COPD Risk Scale point total from caller-assigned flags and must not invent ECG, walk-test, chest-radiograph, or laboratory findings or an admission decision.

## When not to use

- Not a medical device.
- Not an admission, discharge, or disposition order. Admission-threshold sensitivities of 91.2 / 80.9 / 60.3% at totals 1 / 2 / 3 are classification performance from the derivation cohort, not a recommendation to admit or discharge.
- This is the Stiell 2014 derivation (Tables 6-8). It is not the 2018 validation as the formula source. It is not BAP-65 and not DECAF.
- The caller assigns all ten flags after applying the published cutoffs. magent does not walk the patient, measure heart rate, interpret the ECG, read the chest radiograph, or assay hemoglobin, urea, or serum CO2.
- Table 8 SAE percents are returned only for tabulated scores (0-8 and 10). Score 9 and totals >10 had no published SAE percent; none is invented. The paper notes no patients had score >10.

## Formula

```
ottawa_copd = cabg(1) + pvd_intervention(1) + intubation_respiratory(2) + hr_arrival_ge_110(2) + too_ill_to_walk(2) + ischemic_ecg(2) + pulmonary_congestion(1) + hemoglobin_lt_100(3) + urea_ge_12(1) + serum_co2_ge_35(1); Stiell 2014 derivation Tables 6-8; max 16; SAE 2.2% (score 0) to 91.4% (score 10); score 9 and >10 SAE not published; admission thresholds of total score 1, 2, or 3 had sensitivities 91.2 / 80.9 / 60.3%
```

## Citation

[Clinical characteristics associated with adverse events in patients with exacerbation of chronic obstructive pulmonary disease: a prospective cohort study](https://doi.org/10.1503/cmaj.130968)
Stiell IG, Clement CM, Aaron SD, Rowe BH, Perry JJ, Brison RJ, Calder LA, Lang E, Borgundvaag B, Forster AJ, Wells GA
CMAJ. 2014;186(6):E193-E204
DOI: [10.1503/cmaj.130968](https://doi.org/10.1503/cmaj.130968)

## Worked example

### All ten flags false

Given: `cabg=false, hemoglobin_lt_100=false, hr_arrival_ge_110=false, intubation_respiratory=false, ischemic_ecg=false, pulmonary_congestion=false, pvd_intervention=false, serum_co2_ge_35=false, too_ill_to_walk=false, urea_ge_12=false`

1. Ten findings absent → 0 each
2. Score = 0 (max 16); ottawa_copd_band low; SAE 2.2%


### All ten flags true

Given: `cabg=true, hemoglobin_lt_100=true, hr_arrival_ge_110=true, intubation_respiratory=true, ischemic_ecg=true, pulmonary_congestion=true, pvd_intervention=true, serum_co2_ge_35=true, too_ill_to_walk=true, urea_ge_12=true`

1. 1+1+2+2+2+2+1+3+1+1
2. Score = 16 (max 16); ottawa_copd_band very_high; SAE not published for >10


## Also searched as

- Ottawa COPD Risk Scale
- Stiell COPD risk
- Ottawa COPD score
- COPD exacerbation risk scale
- Stiell 2014 COPD SAE
- Ottawa COPD Risk Score
- COPD ED adverse events score
- Stiell COPD exacerbation

## Parameters

- `cabg` (boolean, required): Prior coronary artery bypass graft as assigned by the caller (Stiell 2014; 1 point if true). true or false.
- `pvd_intervention` (boolean, required): Peripheral vascular disease intervention as assigned by the caller (Stiell 2014; 1 point if true). true or false.
- `intubation_respiratory` (boolean, required): Intubation for respiratory distress as assigned by the caller (Stiell 2014; 2 points if true). true or false.
- `hr_arrival_ge_110` (boolean, required): Heart rate on ED arrival >=110/min as assigned by the caller after applying the Stiell 2014 cutoff (2 points if true). true or false. magent does not measure heart rate.
- `too_ill_to_walk` (boolean, required): Too ill to do the walk test after ED treatment, or heart rate >=120/min with SaO2 <90%, as assigned by the caller (Stiell 2014; one 2-point item, not two). true or false. magent does not walk the patient.
- `ischemic_ecg` (boolean, required): Acute ischemic changes on ECG as assigned by the caller (Stiell 2014; 2 points if true). true or false. magent does not interpret the ECG.
- `pulmonary_congestion` (boolean, required): Pulmonary congestion on chest radiograph as assigned by the caller (Stiell 2014; 1 point if true). true or false. magent does not read the chest radiograph.
- `hemoglobin_lt_100` (boolean, required): Hemoglobin <100 g/L as assigned by the caller after applying the Stiell 2014 cutoff (3 points if true). true or false. magent does not assay hemoglobin.
- `urea_ge_12` (boolean, required): Urea >=12 mmol/L as assigned by the caller after applying the Stiell 2014 cutoff (1 point if true). true or false. magent does not assay urea.
- `serum_co2_ge_35` (boolean, required): Serum CO2 >=35 mmol/L as assigned by the caller after applying the Stiell 2014 cutoff (1 point if true). true or false. magent does not assay CO2.

## 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/ottawa_copd`
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": [
    {
      "cabg": "false",
      "hemoglobin_lt_100": "false",
      "hr_arrival_ge_110": "false",
      "intubation_respiratory": "false",
      "ischemic_ecg": "false",
      "pulmonary_congestion": "false",
      "pvd_intervention": "false",
      "serum_co2_ge_35": "false",
      "too_ill_to_walk": "false",
      "urea_ge_12": "false"
    },
    {
      "cabg": "false",
      "hemoglobin_lt_100": "false",
      "hr_arrival_ge_110": "false",
      "intubation_respiratory": "false",
      "ischemic_ecg": "false",
      "pulmonary_congestion": "false",
      "pvd_intervention": "false",
      "serum_co2_ge_35": "false",
      "too_ill_to_walk": "false",
      "urea_ge_12": "false"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/ottawa_copd",
  "items": [
    {
      "components": [
        {
          "factor": "cabg",
          "points": 0,
          "present": false
        },
        {
          "factor": "pvd_intervention",
          "points": 0,
          "present": false
        },
        {
          "factor": "intubation_respiratory",
          "points": 0,
          "present": false
        },
        {
          "factor": "hr_arrival_ge_110",
          "points": 0,
          "present": false
        },
        {
          "factor": "too_ill_to_walk",
          "points": 0,
          "present": false
        },
        {
          "factor": "ischemic_ecg",
          "points": 0,
          "present": false
        },
        {
          "factor": "pulmonary_congestion",
          "points": 0,
          "present": false
        },
        {
          "factor": "hemoglobin_lt_100",
          "points": 0,
          "present": false
        },
        {
          "factor": "urea_ge_12",
          "points": 0,
          "present": false
        },
        {
          "factor": "serum_co2_ge_35",
          "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": "Stiell IG, Clement CM, Aaron SD, Rowe BH, Perry JJ, Brison RJ, Calder LA, Lang E, Borgundvaag B, Forster AJ, Wells GA",
        "doi": "10.1503/cmaj.130968",
        "id": "stiell-2014",
        "pmid": "24549463",
        "source": "CMAJ. 2014;186(6):E193-E204",
        "title": "Clinical characteristics associated with adverse events in patients with exacerbation of chronic obstructive pulmonary disease: a prospective cohort study"
      },
      "formula": "ottawa_copd",
      "formula_expression": "ottawa_copd = cabg(1) + pvd_intervention(1) + intubation_respiratory(2) + hr_arrival_ge_110(2) + too_ill_to_walk(2) + ischemic_ecg(2) + pulmonary_congestion(1) + hemoglobin_lt_100(3) + urea_ge_12(1) + serum_co2_ge_35(1); Stiell 2014 derivation Tables 6-8; max 16; SAE 2.2% (score 0) to 91.4% (score 10); score 9 and >10 SAE not published; admission thresholds of total score 1, 2, or 3 had sensitivities 91.2 / 80.9 / 60.3%",
      "max_score": 16,
      "score": 0,
      "ottawa_copd_band": "low",
      "sae_percent": 2.2
    },
    {
      "components": [
        {
          "factor": "cabg",
          "points": 0,
          "present": false
        },
        {
          "factor": "pvd_intervention",
          "points": 0,
          "present": false
        },
        {
          "factor": "intubation_respiratory",
          "points": 0,
          "present": false
        },
        {
          "factor": "hr_arrival_ge_110",
          "points": 0,
          "present": false
        },
        {
          "factor": "too_ill_to_walk",
          "points": 0,
          "present": false
        },
        {
          "factor": "ischemic_ecg",
          "points": 0,
          "present": false
        },
        {
          "factor": "pulmonary_congestion",
          "points": 0,
          "present": false
        },
        {
          "factor": "hemoglobin_lt_100",
          "points": 0,
          "present": false
        },
        {
          "factor": "urea_ge_12",
          "points": 0,
          "present": false
        },
        {
          "factor": "serum_co2_ge_35",
          "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": "Stiell IG, Clement CM, Aaron SD, Rowe BH, Perry JJ, Brison RJ, Calder LA, Lang E, Borgundvaag B, Forster AJ, Wells GA",
        "doi": "10.1503/cmaj.130968",
        "id": "stiell-2014",
        "pmid": "24549463",
        "source": "CMAJ. 2014;186(6):E193-E204",
        "title": "Clinical characteristics associated with adverse events in patients with exacerbation of chronic obstructive pulmonary disease: a prospective cohort study"
      },
      "formula": "ottawa_copd",
      "formula_expression": "ottawa_copd = cabg(1) + pvd_intervention(1) + intubation_respiratory(2) + hr_arrival_ge_110(2) + too_ill_to_walk(2) + ischemic_ecg(2) + pulmonary_congestion(1) + hemoglobin_lt_100(3) + urea_ge_12(1) + serum_co2_ge_35(1); Stiell 2014 derivation Tables 6-8; max 16; SAE 2.2% (score 0) to 91.4% (score 10); score 9 and >10 SAE not published; admission thresholds of total score 1, 2, or 3 had sensitivities 91.2 / 80.9 / 60.3%",
      "max_score": 16,
      "score": 0,
      "ottawa_copd_band": "low",
      "sae_percent": 2.2
    }
  ]
}
```

## Response fields

- `formula` (string): ottawa_copd
- `formula_expression` (string): Exact expression used
- `score` (integer): Ottawa COPD Risk Scale points 0-16 (Stiell 2014)
- `max_score` (integer): 16
- `ottawa_copd_band` (string): low (0), medium (1-2), high (3-4), or very_high (>=5) from Stiell 2014 Table 8
- `sae_percent` (number): Table 8 serious-adverse-event percent when published (scores 0-8 and 10); null for score 9 and >10 (not tabulated; none invented)
- `components` (array): Per-flag points
- `citation` (object): Stiell et al. CMAJ 2014 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "factor": "cabg",
      "points": 0,
      "present": false
    },
    {
      "factor": "pvd_intervention",
      "points": 0,
      "present": false
    },
    {
      "factor": "intubation_respiratory",
      "points": 0,
      "present": false
    },
    {
      "factor": "hr_arrival_ge_110",
      "points": 0,
      "present": false
    },
    {
      "factor": "too_ill_to_walk",
      "points": 0,
      "present": false
    },
    {
      "factor": "ischemic_ecg",
      "points": 0,
      "present": false
    },
    {
      "factor": "pulmonary_congestion",
      "points": 0,
      "present": false
    },
    {
      "factor": "hemoglobin_lt_100",
      "points": 0,
      "present": false
    },
    {
      "factor": "urea_ge_12",
      "points": 0,
      "present": false
    },
    {
      "factor": "serum_co2_ge_35",
      "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": "Stiell IG, Clement CM, Aaron SD, Rowe BH, Perry JJ, Brison RJ, Calder LA, Lang E, Borgundvaag B, Forster AJ, Wells GA",
    "doi": "10.1503/cmaj.130968",
    "id": "stiell-2014",
    "pmid": "24549463",
    "source": "CMAJ. 2014;186(6):E193-E204",
    "title": "Clinical characteristics associated with adverse events in patients with exacerbation of chronic obstructive pulmonary disease: a prospective cohort study"
  },
  "formula": "ottawa_copd",
  "formula_expression": "ottawa_copd = cabg(1) + pvd_intervention(1) + intubation_respiratory(2) + hr_arrival_ge_110(2) + too_ill_to_walk(2) + ischemic_ecg(2) + pulmonary_congestion(1) + hemoglobin_lt_100(3) + urea_ge_12(1) + serum_co2_ge_35(1); Stiell 2014 derivation Tables 6-8; max 16; SAE 2.2% (score 0) to 91.4% (score 10); score 9 and >10 SAE not published; admission thresholds of total score 1, 2, or 3 had sensitivities 91.2 / 80.9 / 60.3%",
  "max_score": 16,
  "score": 0,
  "ottawa_copd_band": "low",
  "sae_percent": 2.2
}
```

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

- [DECAF](https://magentlab.com/docs/decaf) — Sum Steer 2012 DECAF points from extended MRC dyspnoea, eosinophils, chest radiograph consolidation, arterial pH, and atrial fibrillation.
- [NEWS](https://magentlab.com/docs/news) — Compute the RCP 2012 National Early Warning Score from respiratory rate, SpO2, supplemental oxygen, temperature, systolic BP, heart rate, and caller-assigned AVPU.
- [OHFRS](https://magentlab.com/docs/ohfrs) — Sum the ten Stiell 2013 Ottawa Heart Failure Risk Scale flags and return the integer point total (max 15).

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