Infection / VTE · LIVE
Clinical pulmonary infection score (Pugin)
CPIS
Sum the six Pugin 1991 CPIS domains (temperature, leukocytes, tracheal secretions, oxygenation, chest radiograph, tracheal-aspirate culture) and return le_6 or gt_6.
Markdown: /docs/cpis.md · Canonical: https://magentlab.com/docs/cpis
Not a medical device. Not a diagnosis, dose, or listing recommendation.
What it computes
Sum the six Pugin 1991 CPIS domains (temperature, leukocytes, tracheal secretions, oxygenation, chest radiograph, tracheal-aspirate culture) and return le_6 or gt_6.
When to use
When an agent needs the published Pugin 1991 CPIS total and >6 band and must not invent a VAP diagnosis, an antibiotic order, or Singh 2000 modified CPIS radiographic progression.
When not to use
- Not a medical device and not a VAP diagnosis or antibiotic order. CPIS >6 suggested pulmonary infection in the Pugin 1991 derivation; it is not a diagnosis.
- This is original Pugin 1991 CPIS (max 12). It is not Singh 2000 modified CPIS and does not score day-3 radiographic progression.
- Chest radiograph (none, diffuse, or localized) and culture (none, pathogen, or pathogen_and_gram) are caller-assigned. magent does not read radiographs or Gram stains.
- Leukocyte band forms are the caller-assigned bands_ge_50 flag (≥50% bands). magent does not compute a differential.
- Pugin 1991 temperature bins are one-decimal. 36.1–36.4 and 38.91–38.99 are unpublished and score 0 (not ≤36.0, not 38.5–38.9, not ≥39.0). Do not invent a <39 one-point band.
Formula
CPIS = temperature(36.5-38.4→0, 38.5-38.9→1, ≥39 or ≤36→2) + leukocytes(4.0-11.0→0, <4.0 or >11.0→1, +1 if abnormal and bands_ge_50) + tracheal_secretions(none→0, nonpurulent→1, purulent→2) + oxygenation(pf_ratio>240 or ards→0, pf_ratio≤240 and not ards→2) + chest_radiograph(none→0, diffuse→1, localized→2) + culture(none→0, pathogen→1, pathogen_and_gram→2); Pugin 1991; max 12; CPIS>6 suggests pulmonary infection in that derivation
Citation
- Authors
- Pugin J, Auckenthaler R, Mili N, Janssens JP, Lew PD, Suter PM
- Source
- Am Rev Respir Dis. 1991;143(5 Pt 1):1121-1129
Worked example
All zero-point domains
Given:
ards=falsebands_ge_50=falsechest_radiograph=noneculture=nonepf_ratio=300temperature_c=37.0tracheal_secretions=nonewbc_k_ul=8.0
- Temperature 37.0 → 0; WBC 8.0, bands_ge_50 false → 0; secretions none → 0; P/F 300, ARDS false → 0; radiograph none → 0; culture none → 0
- Score = 0 (max 12); cpis_band = le_6
Temperature 39, purulent secretions, localized infiltrate, pathogen
Given:
ards=falsebands_ge_50=falsechest_radiograph=localizedculture=pathogenpf_ratio=300temperature_c=39.0tracheal_secretions=purulentwbc_k_ul=8.0
- Temperature 39.0 → 2; purulent → 2; localized → 2; pathogen → 1; remaining domains 0
- Score = 7 (max 12); cpis_band = gt_6. Not a VAP diagnosis.
Also searched as
- clinical pulmonary infection score
- CPIS
- Pugin CPIS
- ventilator associated pneumonia score
- pulmonary infection score
- CPIS 1991
Try
Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.
Full URL: https://api.magentlab.com/api/calc/cpis?temperature_c=37.0&wbc_k_ul=8.0&bands_ge_50=false&tracheal_secretions=none&pf_ratio=300&ards=false&chest_radiograph=none&culture=none
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/cpis?temperature_c=37.0&wbc_k_ul=8.0&bands_ge_50=false&tracheal_secretions=none&pf_ratio=300&ards=false&chest_radiograph=none&culture=none"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
temperature_c |
number | required | Temperature in °C (30.0-45.0). 36.5-38.4 scores 0; 38.5-38.9 scores 1; ≥39.0 or ≤36.0 scores 2 (Pugin 1991). |
wbc_k_ul |
number | required | WBC in 10^3/mm^3 (same as 10^3/µL or 10^9/L). Range 0.01-500. 4.0-11.0 scores 0; <4.0 or >11.0 scores 1. Abnormal WBC plus bands_ge_50 scores 2 for this domain. |
bands_ge_50 |
boolean | required | Caller-assigned ≥50% band forms (Pugin 1991). true adds 1 only when WBC is already <4.0 or >11.0. true or false. |
tracheal_secretions |
string | required · none, nonpurulent, purulent | Caller-assigned tracheal secretions. none scores 0; nonpurulent scores 1; purulent scores 2 (Pugin 1991). |
pf_ratio |
number | required | PaO2/FiO2 in mm Hg (20-800). >240 or ards=true scores 0; ≤240 and ards=false scores 2 (Pugin 1991). |
ards |
boolean | required | Caller-assigned ARDS. true scores 0 for oxygenation even when pf_ratio ≤240. true or false. |
chest_radiograph |
string | required · none, diffuse, localized | Caller-assigned chest radiograph. none scores 0; diffuse scores 1; localized scores 2. magent does not read the radiograph. |
culture |
string | required · none, pathogen, pathogen_and_gram | Caller-assigned tracheal-aspirate culture. none scores 0; pathogen (moderate/heavy pathogenic growth) scores 1; pathogen_and_gram (same pathogen on Gram stain) scores 2. magent does not read Gram stains. |
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.
- 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": [
{
"ards": "false",
"bands_ge_50": "false",
"chest_radiograph": "none",
"culture": "none",
"pf_ratio": "300",
"temperature_c": "37.0",
"tracheal_secretions": "none",
"wbc_k_ul": "8.0"
},
{
"ards": "false",
"bands_ge_50": "false",
"chest_radiograph": "none",
"culture": "none",
"pf_ratio": "300",
"temperature_c": "37.0",
"tracheal_secretions": "none",
"wbc_k_ul": "8.0"
}
]
}
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/cpis",
"items": [
{
"components": [
{
"value": 37.0,
"factor": "temperature_c",
"points": 0,
"present": false
},
{
"value": {
"bands_ge_50": false,
"wbc_k_ul": 8.0
},
"factor": "leukocytes",
"points": 0,
"present": false
},
{
"value": "none",
"factor": "tracheal_secretions",
"points": 0,
"present": false
},
{
"value": {
"ards": false,
"pf_ratio": 300.0
},
"factor": "oxygenation",
"points": 0,
"present": false
},
{
"value": "none",
"factor": "chest_radiograph",
"points": 0,
"present": false
},
{
"value": "none",
"factor": "culture",
"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": "Pugin J, Auckenthaler R, Mili N, Janssens JP, Lew PD, Suter PM",
"doi": "10.1164/ajrccm/143.5_Pt_1.1121",
"id": "pugin-1991",
"pmid": "2024824",
"source": "Am Rev Respir Dis. 1991;143(5 Pt 1):1121-1129",
"title": "Diagnosis of ventilator-associated pneumonia by bacteriologic analysis of bronchoscopic and nonbronchoscopic \"blind\" bronchoalveolar lavage fluid"
},
"formula": "cpis",
"formula_expression": "CPIS = temperature(36.5-38.4→0, 38.5-38.9→1, ≥39 or ≤36→2) + leukocytes(4.0-11.0→0, <4.0 or >11.0→1, +1 if abnormal and bands_ge_50) + tracheal_secretions(none→0, nonpurulent→1, purulent→2) + oxygenation(pf_ratio>240 or ards→0, pf_ratio≤240 and not ards→2) + chest_radiograph(none→0, diffuse→1, localized→2) + culture(none→0, pathogen→1, pathogen_and_gram→2); Pugin 1991; max 12; CPIS>6 suggests pulmonary infection in that derivation",
"max_score": 12,
"score": 0,
"temperature_c": 37.0,
"bands_ge_50": false,
"wbc_k_ul": 8.0,
"ards": false,
"pf_ratio": 300.0,
"chest_radiograph": "none",
"cpis_band": "le_6",
"culture": "none",
"tracheal_secretions": "none"
},
{
"components": [
{
"value": 37.0,
"factor": "temperature_c",
"points": 0,
"present": false
},
{
"value": {
"bands_ge_50": false,
"wbc_k_ul": 8.0
},
"factor": "leukocytes",
"points": 0,
"present": false
},
{
"value": "none",
"factor": "tracheal_secretions",
"points": 0,
"present": false
},
{
"value": {
"ards": false,
"pf_ratio": 300.0
},
"factor": "oxygenation",
"points": 0,
"present": false
},
{
"value": "none",
"factor": "chest_radiograph",
"points": 0,
"present": false
},
{
"value": "none",
"factor": "culture",
"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": "Pugin J, Auckenthaler R, Mili N, Janssens JP, Lew PD, Suter PM",
"doi": "10.1164/ajrccm/143.5_Pt_1.1121",
"id": "pugin-1991",
"pmid": "2024824",
"source": "Am Rev Respir Dis. 1991;143(5 Pt 1):1121-1129",
"title": "Diagnosis of ventilator-associated pneumonia by bacteriologic analysis of bronchoscopic and nonbronchoscopic \"blind\" bronchoalveolar lavage fluid"
},
"formula": "cpis",
"formula_expression": "CPIS = temperature(36.5-38.4→0, 38.5-38.9→1, ≥39 or ≤36→2) + leukocytes(4.0-11.0→0, <4.0 or >11.0→1, +1 if abnormal and bands_ge_50) + tracheal_secretions(none→0, nonpurulent→1, purulent→2) + oxygenation(pf_ratio>240 or ards→0, pf_ratio≤240 and not ards→2) + chest_radiograph(none→0, diffuse→1, localized→2) + culture(none→0, pathogen→1, pathogen_and_gram→2); Pugin 1991; max 12; CPIS>6 suggests pulmonary infection in that derivation",
"max_score": 12,
"score": 0,
"temperature_c": 37.0,
"bands_ge_50": false,
"wbc_k_ul": 8.0,
"ards": false,
"pf_ratio": 300.0,
"chest_radiograph": "none",
"cpis_band": "le_6",
"culture": "none",
"tracheal_secretions": "none"
}
]
}
Response
| Field | Type | Description |
|---|---|---|
formula |
string | cpis |
formula_expression |
string | Exact expression used |
score |
integer | CPIS points 0-12 |
max_score |
integer | 12 |
cpis_band |
string | le_6 when score ≤6, gt_6 when score ≥7. Pugin 1991 CPIS>6 suggested pulmonary infection in that derivation. Not a VAP diagnosis. |
temperature_c |
number | Temperature in °C used for scoring |
wbc_k_ul |
number | WBC in 10^3/mm^3 used for scoring |
bands_ge_50 |
boolean | Caller-assigned ≥50% band forms used for the leukocyte domain |
tracheal_secretions |
string | none, nonpurulent, or purulent |
pf_ratio |
number | PaO2/FiO2 in mm Hg used for scoring |
ards |
boolean | Caller-assigned ARDS used for oxygenation |
chest_radiograph |
string | none, diffuse, or localized |
culture |
string | none, pathogen, or pathogen_and_gram |
components |
array | Per-domain Pugin 1991 points |
citation |
object | Pugin et al. Am Rev Respir Dis 1991 citation |
disclaimer |
string | Not-a-device notice |
Example JSON
Machine form of the same example. Frozen fixture. Not a live lookup.
{
"components": [
{
"value": 37.0,
"factor": "temperature_c",
"points": 0,
"present": false
},
{
"value": {
"bands_ge_50": false,
"wbc_k_ul": 8.0
},
"factor": "leukocytes",
"points": 0,
"present": false
},
{
"value": "none",
"factor": "tracheal_secretions",
"points": 0,
"present": false
},
{
"value": {
"ards": false,
"pf_ratio": 300.0
},
"factor": "oxygenation",
"points": 0,
"present": false
},
{
"value": "none",
"factor": "chest_radiograph",
"points": 0,
"present": false
},
{
"value": "none",
"factor": "culture",
"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": "Pugin J, Auckenthaler R, Mili N, Janssens JP, Lew PD, Suter PM",
"doi": "10.1164/ajrccm/143.5_Pt_1.1121",
"id": "pugin-1991",
"pmid": "2024824",
"source": "Am Rev Respir Dis. 1991;143(5 Pt 1):1121-1129",
"title": "Diagnosis of ventilator-associated pneumonia by bacteriologic analysis of bronchoscopic and nonbronchoscopic \"blind\" bronchoalveolar lavage fluid"
},
"formula": "cpis",
"formula_expression": "CPIS = temperature(36.5-38.4→0, 38.5-38.9→1, ≥39 or ≤36→2) + leukocytes(4.0-11.0→0, <4.0 or >11.0→1, +1 if abnormal and bands_ge_50) + tracheal_secretions(none→0, nonpurulent→1, purulent→2) + oxygenation(pf_ratio>240 or ards→0, pf_ratio≤240 and not ards→2) + chest_radiograph(none→0, diffuse→1, localized→2) + culture(none→0, pathogen→1, pathogen_and_gram→2); Pugin 1991; max 12; CPIS>6 suggests pulmonary infection in that derivation",
"max_score": 12,
"score": 0,
"temperature_c": 37.0,
"bands_ge_50": false,
"wbc_k_ul": 8.0,
"ards": false,
"pf_ratio": 300.0,
"chest_radiograph": "none",
"cpis_band": "le_6",
"culture": "none",
"tracheal_secretions": "none"
}
Client errors (HTTP 400)
Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_temperature |
temperature_c must be a number from 30.0 to 45.0. Returned before settlement; you are not charged. |
| 400 | invalid_wbc |
wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required 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_pf_ratio |
pf_ratio must be a number from 20 to 800. Returned before settlement; you are not charged. |
| 400 | invalid_tracheal_secretions |
tracheal_secretions must be none, nonpurulent, or purulent (Pugin 1991 CPIS). Returned before settlement; you are not charged. |
| 400 | invalid_chest_radiograph |
chest_radiograph must be none, diffuse, or localized (Pugin 1991 CPIS). Returned before settlement; you are not charged. |
| 400 | invalid_cpis_culture |
culture must be none, pathogen, or pathogen_and_gram (Pugin 1991 CPIS). 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
- SOFA — Compute the Vincent 1996 SOFA score from PaO2/FiO2, platelets, bilirubin, MAP and adrenergic agents, GCS, and creatinine or urine output.
- SIRS — Compute the Bone 1992 ACCP/SCCM SIRS criteria from temperature, heart rate, respiratory rate, and WBC, with optional PaCO2 and band percent.
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.