MAGENT

Infection / VTE · LIVE

SMART-COP pneumonia IRVS

SMART-COP

Compute the Charles 2008 SMART-COP point total and IRVS risk band for community-acquired pneumonia.

LIVE $0.005 USDC GET /api/calc/smart_cop

Markdown: /docs/smart-cop.md · Canonical: https://magentlab.com/docs/smart-cop

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

What it computes

Compute the Charles 2008 SMART-COP point total and IRVS risk band for community-acquired pneumonia.

When to use

When an agent needs the published Charles 2008 SMART-COP total and IRVS band and must not invent a site-of-care or ICU-admission decision.

When not to use

  • Not a medical device and not a site-of-care, admission, ICU, or treatment protocol.
  • Charles 2008 SMART-COP only. Not CURB-65, CRB-65, or PSI/PORT. Those are separate tools.
  • Respiratory rate and oxygenation cutoffs are age-adjusted at 50 years (≤50 vs >50) as published.
  • Provide exactly one of pao2_mm_hg, spo2_percent, or pf_ratio. magent does not combine them.
  • Albumin is g/dL or g/L, not mixed. arterial_ph is optional; omitted pH scores 0 (Charles 2008 missing-pH assumption).
  • magent does not interpret chest radiographs or assess confusion. multilobar_cxr and confusion are caller-assigned flags.

Formula

SMART-COP (Charles 2008) = SBP<90 (2) + multilobar_cxr (1) + albumin<3.5 g/dL (1) + age-adjusted RR (1; age<=50 RR>=25, age>50 RR>=30) + HR>=125 (1) + confusion (1) + age-adjusted low oxygen (2; age<=50 PaO2<70 or SpO2<=93 or P/F<333; age>50 PaO2<60 or SpO2<=90 or P/F<250) + arterial_pH<7.35 (2; omitted pH scores 0); max 11; IRVS 0-2 low, 3-4 moderate, 5-6 high, >=7 very high

Citation

Title
SMART-COP: a tool for predicting the need for intensive respiratory or vasopressor support in community-acquired pneumonia
Authors
Charles PGP, Wolfe R, Whitby M, et al.
Source
Clin Infect Dis. 2008;47(3):375-384
DOI
10.1086/589754

Worked example

Age 40, normal vitals and labs (low IRVS risk)

Given: age=40albumin_g_dl=4.0arterial_ph=7.40confusion=falseheart_rate_bpm=80multilobar_cxr=falserespiratory_rate=16spo2_percent=98systolic_mm_hg=120

  1. SBP 120 is not <90 → 0; multilobar false → 0; albumin 4.0 is not <3.5 → 0
  2. Age 40 ≤50: RR 16 is not ≥25 → 0; HR 80 is not ≥125 → 0; confusion false → 0
  3. SpO2 98 is not ≤93 → 0; pH 7.40 is not <7.35 → 0
  4. score = 0; irvs_risk = low (0–2)

SBP 89, confusion, SpO2 93, pH 7.30 (very high IRVS risk)

Given: age=40albumin_g_dl=4.0arterial_ph=7.30confusion=trueheart_rate_bpm=80multilobar_cxr=falserespiratory_rate=16spo2_percent=93systolic_mm_hg=89

  1. SBP 89 < 90 → 2; confusion true → 1; age ≤50 SpO2 93 ≤ 93 → 2; pH 7.30 < 7.35 → 2
  2. score = 7; irvs_risk = very_high (≥7)

Also searched as

  • SMART-COP
  • SMARTCOP
  • Charles SMART-COP
  • IRVS pneumonia
  • community-acquired pneumonia SMART-COP
  • SMART COP score

Try

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

/api/calc/smart_cop?age=40&systolic_mm_hg=120&multilobar_cxr=false&albumin_g_dl=4.0&respiratory_rate=16&heart_rate_bpm=80&confusion=false&spo2_percent=98&arterial_ph=7.40

Full URL: https://api.magentlab.com/api/calc/smart_cop?age=40&systolic_mm_hg=120&multilobar_cxr=false&albumin_g_dl=4.0&respiratory_rate=16&heart_rate_bpm=80&confusion=false&spo2_percent=98&arterial_ph=7.40

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/smart_cop?age=40&systolic_mm_hg=120&multilobar_cxr=false&albumin_g_dl=4.0&respiratory_rate=16&heart_rate_bpm=80&confusion=false&spo2_percent=98&arterial_ph=7.40"

Parameters

Name Type Required Description
age integer required Age in years (18-120). Age ≤50 uses RR ≥25, PaO2 <70, SpO2 ≤93%, P/F <333. Age >50 uses RR ≥30, PaO2 <60, SpO2 ≤90%, P/F <250.
systolic_mm_hg number required Systolic blood pressure in mm Hg (50-250). Scores 2 when <90; 90 does not score (Charles 2008 S).
multilobar_cxr boolean required Multilobar involvement on chest radiograph as assigned by the caller (Charles 2008 M). true or false. 1 point if true. magent does not interpret radiographs.
albumin_g_dl number optional Albumin in g/dL (1-6). Provide this or albumin_g_l, not both. Scores 1 when <3.5; 3.5 does not score (Charles 2008 A).
albumin_g_l number optional Albumin in g/L (10-60). Converted as g/dL = g/L / 10. Provide this or albumin_g_dl, not both. Scores 1 when <35 g/L.
respiratory_rate integer required Respiratory rate in breaths/min (integer 4-80). Age ≤50: ≥25 scores 1 (24 does not). Age >50: ≥30 scores 1 (29 does not). Charles 2008 R.
heart_rate_bpm integer required Heart rate in beats per minute (integer 30-220). Scores 1 when ≥125; 124 does not score (Charles 2008 T).
confusion boolean required New or acute confusion as assigned by the caller (Charles 2008 C). true or false. 1 point if true. magent does not assess mental status.
pao2_mm_hg number optional Arterial PaO2 in mm Hg (20-700). Provide exactly one of pao2_mm_hg, spo2_percent, or pf_ratio. Age ≤50: <70 scores 2. Age >50: <60 scores 2.
spo2_percent number optional Oxygen saturation percent (50-100). Provide exactly one of pao2_mm_hg, spo2_percent, or pf_ratio. Age ≤50: ≤93 scores 2. Age >50: ≤90 scores 2.
pf_ratio number optional PaO2/FiO2 ratio (20-800). Provide exactly one of pao2_mm_hg, spo2_percent, or pf_ratio. Age ≤50: <333 scores 2. Age >50: <250 scores 2.
arterial_ph number optional Arterial pH (6.80-7.80). Optional. Scores 2 when <7.35; 7.35 does not score. Omitted pH scores 0 (Charles 2008 missing-pH assumption).

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/smart_cop 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": [
    {
      "age": "40",
      "albumin_g_dl": "4.0",
      "arterial_ph": "7.40",
      "confusion": "false",
      "heart_rate_bpm": "80",
      "multilobar_cxr": "false",
      "respiratory_rate": "16",
      "spo2_percent": "98",
      "systolic_mm_hg": "120"
    },
    {
      "age": "40",
      "albumin_g_dl": "4.0",
      "arterial_ph": "7.40",
      "confusion": "false",
      "heart_rate_bpm": "80",
      "multilobar_cxr": "false",
      "respiratory_rate": "16",
      "spo2_percent": "98",
      "systolic_mm_hg": "120"
    }
  ]
}

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/smart_cop",
  "items": [
    {
      "components": [
        {
          "value": 120.0,
          "factor": "systolic_lt_90",
          "points": 0,
          "present": false
        },
        {
          "factor": "multilobar_cxr",
          "points": 0,
          "present": false
        },
        {
          "value": 4.0,
          "factor": "albumin_lt_3_5",
          "points": 0,
          "present": false
        },
        {
          "value": 16,
          "factor": "respiratory_rate",
          "points": 0,
          "present": false
        },
        {
          "value": 80,
          "factor": "heart_rate_ge_125",
          "points": 0,
          "present": false
        },
        {
          "factor": "confusion",
          "points": 0,
          "present": false
        },
        {
          "input": "spo2_percent",
          "value": 98.0,
          "factor": "oxygen_low",
          "points": 0,
          "present": false
        },
        {
          "value": 7.4,
          "factor": "arterial_ph_lt_7_35",
          "points": 0,
          "present": false
        }
      ],
      "albumin_g_dl": 4.0,
      "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.",
      "age_years": 40,
      "citation": {
        "authors": "Charles PGP, Wolfe R, Whitby M, et al.",
        "doi": "10.1086/589754",
        "id": "charles-2008",
        "pmid": "18558884",
        "source": "Clin Infect Dis. 2008;47(3):375-384",
        "title": "SMART-COP: a tool for predicting the need for intensive respiratory or vasopressor support in community-acquired pneumonia"
      },
      "formula": "smart_cop",
      "formula_expression": "SMART-COP (Charles 2008) = SBP<90 (2) + multilobar_cxr (1) + albumin<3.5 g/dL (1) + age-adjusted RR (1; age<=50 RR>=25, age>50 RR>=30) + HR>=125 (1) + confusion (1) + age-adjusted low oxygen (2; age<=50 PaO2<70 or SpO2<=93 or P/F<333; age>50 PaO2<60 or SpO2<=90 or P/F<250) + arterial_pH<7.35 (2; omitted pH scores 0); max 11; IRVS 0-2 low, 3-4 moderate, 5-6 high, >=7 very high",
      "max_score": 11,
      "score": 0,
      "systolic_mm_hg": 120.0,
      "heart_rate_bpm": 80,
      "arterial_ph": 7.4,
      "respiratory_rate": 16,
      "spo2_percent": 98.0,
      "irvs_risk": "low"
    },
    {
      "components": [
        {
          "value": 120.0,
          "factor": "systolic_lt_90",
          "points": 0,
          "present": false
        },
        {
          "factor": "multilobar_cxr",
          "points": 0,
          "present": false
        },
        {
          "value": 4.0,
          "factor": "albumin_lt_3_5",
          "points": 0,
          "present": false
        },
        {
          "value": 16,
          "factor": "respiratory_rate",
          "points": 0,
          "present": false
        },
        {
          "value": 80,
          "factor": "heart_rate_ge_125",
          "points": 0,
          "present": false
        },
        {
          "factor": "confusion",
          "points": 0,
          "present": false
        },
        {
          "input": "spo2_percent",
          "value": 98.0,
          "factor": "oxygen_low",
          "points": 0,
          "present": false
        },
        {
          "value": 7.4,
          "factor": "arterial_ph_lt_7_35",
          "points": 0,
          "present": false
        }
      ],
      "albumin_g_dl": 4.0,
      "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.",
      "age_years": 40,
      "citation": {
        "authors": "Charles PGP, Wolfe R, Whitby M, et al.",
        "doi": "10.1086/589754",
        "id": "charles-2008",
        "pmid": "18558884",
        "source": "Clin Infect Dis. 2008;47(3):375-384",
        "title": "SMART-COP: a tool for predicting the need for intensive respiratory or vasopressor support in community-acquired pneumonia"
      },
      "formula": "smart_cop",
      "formula_expression": "SMART-COP (Charles 2008) = SBP<90 (2) + multilobar_cxr (1) + albumin<3.5 g/dL (1) + age-adjusted RR (1; age<=50 RR>=25, age>50 RR>=30) + HR>=125 (1) + confusion (1) + age-adjusted low oxygen (2; age<=50 PaO2<70 or SpO2<=93 or P/F<333; age>50 PaO2<60 or SpO2<=90 or P/F<250) + arterial_pH<7.35 (2; omitted pH scores 0); max 11; IRVS 0-2 low, 3-4 moderate, 5-6 high, >=7 very high",
      "max_score": 11,
      "score": 0,
      "systolic_mm_hg": 120.0,
      "heart_rate_bpm": 80,
      "arterial_ph": 7.4,
      "respiratory_rate": 16,
      "spo2_percent": 98.0,
      "irvs_risk": "low"
    }
  ]
}

Response

Field Type Description
formula string smart_cop
formula_expression string Exact expression used
score integer SMART-COP points 0-11
max_score integer 11
irvs_risk string Charles 2008 IRVS band: low (0-2), moderate (3-4), high (5-6), or very_high (≥7). A band, not a site-of-care decision.
age_years integer Age used for RR and oxygen cutoffs
systolic_mm_hg number Systolic pressure used, mm Hg
albumin_g_dl number Albumin used in g/dL (after conversion)
respiratory_rate integer Respiratory rate used
heart_rate_bpm integer Heart rate used
pao2_mm_hg number PaO2 used when that oxygen input was given
spo2_percent number SpO2 used when that oxygen input was given
pf_ratio number P/F used when that oxygen input was given
arterial_ph number Arterial pH when supplied; omitted when the param is absent
components array Per-criterion SMART-COP points
citation object Charles 2008 citation
disclaimer string Not-a-device notice

Example JSON

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

{
  "components": [
    {
      "value": 120.0,
      "factor": "systolic_lt_90",
      "points": 0,
      "present": false
    },
    {
      "factor": "multilobar_cxr",
      "points": 0,
      "present": false
    },
    {
      "value": 4.0,
      "factor": "albumin_lt_3_5",
      "points": 0,
      "present": false
    },
    {
      "value": 16,
      "factor": "respiratory_rate",
      "points": 0,
      "present": false
    },
    {
      "value": 80,
      "factor": "heart_rate_ge_125",
      "points": 0,
      "present": false
    },
    {
      "factor": "confusion",
      "points": 0,
      "present": false
    },
    {
      "input": "spo2_percent",
      "value": 98.0,
      "factor": "oxygen_low",
      "points": 0,
      "present": false
    },
    {
      "value": 7.4,
      "factor": "arterial_ph_lt_7_35",
      "points": 0,
      "present": false
    }
  ],
  "albumin_g_dl": 4.0,
  "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.",
  "age_years": 40,
  "citation": {
    "authors": "Charles PGP, Wolfe R, Whitby M, et al.",
    "doi": "10.1086/589754",
    "id": "charles-2008",
    "pmid": "18558884",
    "source": "Clin Infect Dis. 2008;47(3):375-384",
    "title": "SMART-COP: a tool for predicting the need for intensive respiratory or vasopressor support in community-acquired pneumonia"
  },
  "formula": "smart_cop",
  "formula_expression": "SMART-COP (Charles 2008) = SBP<90 (2) + multilobar_cxr (1) + albumin<3.5 g/dL (1) + age-adjusted RR (1; age<=50 RR>=25, age>50 RR>=30) + HR>=125 (1) + confusion (1) + age-adjusted low oxygen (2; age<=50 PaO2<70 or SpO2<=93 or P/F<333; age>50 PaO2<60 or SpO2<=90 or P/F<250) + arterial_pH<7.35 (2; omitted pH scores 0); max 11; IRVS 0-2 low, 3-4 moderate, 5-6 high, >=7 very high",
  "max_score": 11,
  "score": 0,
  "systolic_mm_hg": 120.0,
  "heart_rate_bpm": 80,
  "arterial_ph": 7.4,
  "respiratory_rate": 16,
  "spo2_percent": 98.0,
  "irvs_risk": "low"
}

Client errors (HTTP 400)

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

HTTP Code When
400 invalid_age age must be an integer from 18 to 120 Returned before settlement; you are not charged.
400 invalid_systolic_bp systolic_mm_hg or systolic_bp_mm_hg must be a number from 50 to 250. Returned before settlement; you are not charged.
400 invalid_flag boolean clinical flags must be true or false Returned before settlement; you are not charged.
400 invalid_albumin albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.
400 invalid_respiratory_rate respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.
400 invalid_heart_rate heart_rate_bpm must be an integer from 30 to 220 Returned before settlement; you are not charged.
400 invalid_smart_cop_oxygen provide exactly one of pao2_mm_hg, spo2_percent, or pf_ratio (Charles 2008). Returned before settlement; you are not charged.
400 invalid_pao2 pao2_mm_hg must be a number from 20 to 700. Returned before settlement; you are not charged.
400 invalid_spo2 spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.
400 invalid_pf_ratio pf_ratio must be a number from 20 to 800. Returned before settlement; you are not charged.
400 invalid_arterial_ph arterial_ph must be a number from 6.80 to 7.80. 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

  • PSI / PORT — Compute the Fine 1997 Pneumonia Severity Index (PORT) two-step risk class and Table 2 point total for community-acquired pneumonia.
  • CURB-65 — Compute the CURB-65 community-acquired pneumonia severity score from age and discrete flags.
  • CRB-65 — Compute the Lim 2003 CRB-65 community-acquired pneumonia score from age and caller-assigned confusion, respiratory-rate, and blood-pressure flags. Urea is not an input.

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.