MAGENT

Emergency · LIVE

Ottawa COPD Risk Scale

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.

LIVE $0.005 USDC GET /api/calc/ottawa_copd

Markdown: /docs/ottawa-copd.md · Canonical: https://magentlab.com/docs/ottawa-copd

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

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

Worked example

All ten flags false

Given: cabg=falsehemoglobin_lt_100=falsehr_arrival_ge_110=falseintubation_respiratory=falseischemic_ecg=falsepulmonary_congestion=falsepvd_intervention=falseserum_co2_ge_35=falsetoo_ill_to_walk=falseurea_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=truehemoglobin_lt_100=truehr_arrival_ge_110=trueintubation_respiratory=trueischemic_ecg=truepulmonary_congestion=truepvd_intervention=trueserum_co2_ge_35=truetoo_ill_to_walk=trueurea_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

Try

Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.

/api/calc/ottawa_copd?cabg=false&pvd_intervention=false&intubation_respiratory=false&hr_arrival_ge_110=false&too_ill_to_walk=false&ischemic_ecg=false&pulmonary_congestion=false&hemoglobin_lt_100=false&urea_ge_12=false&serum_co2_ge_35=false

Full URL: https://api.magentlab.com/api/calc/ottawa_copd?cabg=false&pvd_intervention=false&intubation_respiratory=false&hr_arrival_ge_110=false&too_ill_to_walk=false&ischemic_ecg=false&pulmonary_congestion=false&hemoglobin_lt_100=false&urea_ge_12=false&serum_co2_ge_35=false

Call

Expect HTTP 402 until you retry with PAYMENT-SIGNATURE. Incomplete query params return HTTP 400 before any quote or charge.

curl -i -H "Accept: application/json" "https://api.magentlab.com/api/calc/ottawa_copd?cabg=false&pvd_intervention=false&intubation_respiratory=false&hr_arrival_ge_110=false&too_ill_to_walk=false&ischemic_ecg=false&pulmonary_congestion=false&hemoglobin_lt_100=false&urea_ge_12=false&serum_co2_ge_35=false"

Parameters

Name Type Required Description
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.

POST /api/calc/ottawa_copd Max 25 unit_amount + extra_item_amount * (n - 1) extra $0.002 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 (fixture)

{
  "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"
    }
  ]
}

Open bulk paywall →

Opens a two-item fixture on the API host. Unpaid browsers get the same MetaMask paywall as GET; Pay retries POST with those items.

Example 200 (fixture)

{
  "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

Field Type Description
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

Machine form of the same example. Frozen fixture. Not a live lookup.

{
  "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
}

Client errors (HTTP 400)

Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.

HTTP Code When
400 invalid_flag boolean clinical flags must be true or false Returned before settlement; you are not charged.
400 invalid_items POST body must be a JSON object with only an items array Returned before settlement; you are not charged.
400 invalid_item_count items must be an array of 1 to 25 objects Returned before settlement; you are not charged.
400 invalid_item each items entry must be a JSON object Returned before settlement; you are not charged.

Related tools

  • DECAF — Sum Steer 2012 DECAF points from extended MRC dyspnoea, eosinophils, chest radiograph consolidation, arterial pH, and atrial fibrillation.
  • 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 — 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. Unpaid valid requests return HTTP 402 with a base64 PAYMENT-REQUIRED header. HTTP 503 is not a new quote: retry the same PAYMENT-SIGNATURE. Full handshake and shared payment errors: Payments. Stdio MCP: /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.