# 4C Mortality Score (Knight)

4C

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

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

## What it computes

Sum the Knight 2020 ISARIC 4C Mortality Score items and return the published Table 5 band (low, intermediate, high, or very high).

## When to use

When an agent already has the Knight 2020 Table 2 inputs (age, sex, comorbidity count, respiratory rate, room-air SpO2, total GCS, urea, CRP) and needs the published total and band, not a COVID-19 diagnosis or treatment order.

## When not to use

- Not a medical device. Not a COVID-19 diagnosis, treatment order, or ICU-admission protocol.
- comorbidity_count is a caller-assigned count of Charlson-plus-obesity comorbidities from Knight 2020. magent does not compute Charlson.
- GCS is a caller-assigned integer 3–15. This API does not collect eye, verbal, or motor components. magent does not examine the patient.
- SpO2 is room-air saturation as assigned by the caller. Urea may be supplied as mmol/L or converted from BUN mg/dL (÷ 2.8); not both.
- Bands are Knight 2020 Table 5 validation mortality strata (low 0–3, intermediate 4–8, high 9–14, very high ≥15). They are not treatment cutoffs.

## Formula

```
4C = age (<50 0, 50–59 2, 60–69 4, 70–79 6, ≥80 7) + sex (female 0, male 1) + comorbidity_count (0→0, 1→1, ≥2→2) + respiratory_rate (<20 0, 20–29 1, ≥30 2) + spo2_percent (≥92 0, <92 2) + gcs (15 0, <15 2) + urea_mmol_l (<7 0, 7–14 1, >14 3) + crp_mg_l (<50 0, 50–99 1, ≥100 2); Knight 2020 Table 2; max 21; Table 5 bands low 0–3, intermediate 4–8, high 9–14, very_high ≥15
```

## Citation

[Risk stratification of patients admitted to hospital with covid-19 using the ISARIC WHO Clinical Characterisation Protocol: development and validation of the 4C Mortality Score](https://doi.org/10.1136/bmj.m3339)
Knight SR, Ho A, Pius R, Buchan I, Carson G, Drake TM, Dunning J, Fairfield CJ, Gamble C, Green CA, Gupta R, Halpin S, Hardwick HE, Holden KA, Horby PW, Jackson C, Mclean KA, Merson L, Nguyen-Van-Tam JS, Norman L, Noursadeghi M, Olliaro PL, Pritchard MG, Russell CD, Shaw CA, Sheikh A, Solomon T, Sudlow C, Swann OV, Turtle LCW, Openshaw PJM, Baillie JK, Semple MG, Docherty AB, Harrison EM; ISARIC4C investigators
BMJ. 2020;370:m3339
DOI: [10.1136/bmj.m3339](https://doi.org/10.1136/bmj.m3339)

## Worked example

### All items zero

Given: `age=40, comorbidity_count=0, crp_mg_l=10, gcs=15, respiratory_rate=16, sex=female, spo2_percent=98, urea_mmol_l=5`

1. age 40 → 0; female → 0; comorbidity_count 0 → 0; RR 16 → 0; SpO2 98 → 0; GCS 15 → 0; urea 5 → 0; CRP 10 → 0
2. Score = 0 (max 21); four_c_band = low


### All items maximum

Given: `age=80, comorbidity_count=2, crp_mg_l=100, gcs=14, respiratory_rate=30, sex=male, spo2_percent=91, urea_mmol_l=15`

1. age ≥80 → 7; male → 1; comorbidity_count ≥2 → 2; RR ≥30 → 2; SpO2 <92 → 2; GCS <15 → 2; urea >14 → 3; CRP ≥100 → 2
2. Score = 21 (max 21); four_c_band = very_high


## Also searched as

- 4C Mortality Score
- 4c mortality
- isaric 4c
- covid mortality score
- ISARIC WHO 4C
- Knight 4C
- ISARIC4C mortality
- COVID-19 4C score

## Parameters

- `age` (integer, required): Age in years (18-120). Knight 2020 Table 2: <50 scores 0; 50–59 scores 2; 60–69 scores 4; 70–79 scores 6; ≥80 scores 7.
- `sex` (string, required): Sex at birth (Knight 2020). female scores 0; male scores 1.
- `comorbidity_count` (integer, required): Caller-assigned count of Charlson-plus-obesity comorbidities from Knight 2020 (integer 0–20). 0 scores 0; 1 scores 1; ≥2 scores 2. magent does not compute Charlson.
- `respiratory_rate` (integer, required): Respiratory rate in breaths/min (integer 4–80). Knight 2020: <20 scores 0; 20–29 scores 1; ≥30 scores 2. magent does not measure vitals.
- `spo2_percent` (number, required): Room-air SpO2 percent (50–100). Knight 2020: ≥92 scores 0; <92 scores 2. magent does not measure saturation.
- `gcs` (integer, required): Caller-assigned total GCS as an integer 3–15. 15 scores 0; <15 scores 2 (Knight 2020). This API does not collect eye, verbal, or motor components.
- `urea_mmol_l` (number, optional): Serum urea in mmol/L (1–50). Provide this or bun_mg_dl, not both. Knight 2020: <7 scores 0; 7–14 inclusive scores 1; >14 scores 3.
- `bun_mg_dl` (number, optional): BUN in mg/dL (3–140). Converted as urea_mmol_l = bun_mg_dl / 2.8.
- `crp_mg_l` (number, required): C-reactive protein in mg/L (0–500). Knight 2020: <50 scores 0; 50–99 scores 1; ≥100 scores 2.

## 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/4c`
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": [
    {
      "age": "40",
      "comorbidity_count": "0",
      "crp_mg_l": "10",
      "gcs": "15",
      "respiratory_rate": "16",
      "sex": "female",
      "spo2_percent": "98",
      "urea_mmol_l": "5"
    },
    {
      "age": "40",
      "comorbidity_count": "0",
      "crp_mg_l": "10",
      "gcs": "15",
      "respiratory_rate": "16",
      "sex": "female",
      "spo2_percent": "98",
      "urea_mmol_l": "5"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/4c",
  "items": [
    {
      "components": [
        {
          "value": 40,
          "factor": "age",
          "points": 0,
          "present": false
        },
        {
          "value": "female",
          "factor": "sex",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "comorbidity_count",
          "points": 0,
          "present": false
        },
        {
          "value": 16,
          "factor": "respiratory_rate",
          "points": 0,
          "present": false
        },
        {
          "value": 98.0,
          "factor": "spo2_percent",
          "points": 0,
          "present": false
        },
        {
          "value": 15,
          "factor": "gcs",
          "points": 0,
          "present": false
        },
        {
          "value": 5.0,
          "factor": "urea",
          "points": 0,
          "present": false
        },
        {
          "value": 10.0,
          "factor": "crp_mg_l",
          "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": "Knight SR, Ho A, Pius R, Buchan I, Carson G, Drake TM, Dunning J, Fairfield CJ, Gamble C, Green CA, Gupta R, Halpin S, Hardwick HE, Holden KA, Horby PW, Jackson C, Mclean KA, Merson L, Nguyen-Van-Tam JS, Norman L, Noursadeghi M, Olliaro PL, Pritchard MG, Russell CD, Shaw CA, Sheikh A, Solomon T, Sudlow C, Swann OV, Turtle LCW, Openshaw PJM, Baillie JK, Semple MG, Docherty AB, Harrison EM; ISARIC4C investigators",
        "doi": "10.1136/bmj.m3339",
        "id": "knight-2020",
        "pmid": "32907855",
        "source": "BMJ. 2020;370:m3339",
        "title": "Risk stratification of patients admitted to hospital with covid-19 using the ISARIC WHO Clinical Characterisation Protocol: development and validation of the 4C Mortality Score"
      },
      "formula": "4c",
      "formula_expression": "4C = age (<50 0, 50–59 2, 60–69 4, 70–79 6, ≥80 7) + sex (female 0, male 1) + comorbidity_count (0→0, 1→1, ≥2→2) + respiratory_rate (<20 0, 20–29 1, ≥30 2) + spo2_percent (≥92 0, <92 2) + gcs (15 0, <15 2) + urea_mmol_l (<7 0, 7–14 1, >14 3) + crp_mg_l (<50 0, 50–99 1, ≥100 2); Knight 2020 Table 2; max 21; Table 5 bands low 0–3, intermediate 4–8, high 9–14, very_high ≥15",
      "max_score": 21,
      "score": 0,
      "age_years": 40,
      "sex": "female",
      "crp_mg_l": 10.0,
      "spo2_percent": 98.0,
      "gcs": 15,
      "respiratory_rate": 16,
      "comorbidity_count": 0,
      "four_c_band": "low",
      "urea_mmol_l": 5.0
    },
    {
      "components": [
        {
          "value": 40,
          "factor": "age",
          "points": 0,
          "present": false
        },
        {
          "value": "female",
          "factor": "sex",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "comorbidity_count",
          "points": 0,
          "present": false
        },
        {
          "value": 16,
          "factor": "respiratory_rate",
          "points": 0,
          "present": false
        },
        {
          "value": 98.0,
          "factor": "spo2_percent",
          "points": 0,
          "present": false
        },
        {
          "value": 15,
          "factor": "gcs",
          "points": 0,
          "present": false
        },
        {
          "value": 5.0,
          "factor": "urea",
          "points": 0,
          "present": false
        },
        {
          "value": 10.0,
          "factor": "crp_mg_l",
          "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": "Knight SR, Ho A, Pius R, Buchan I, Carson G, Drake TM, Dunning J, Fairfield CJ, Gamble C, Green CA, Gupta R, Halpin S, Hardwick HE, Holden KA, Horby PW, Jackson C, Mclean KA, Merson L, Nguyen-Van-Tam JS, Norman L, Noursadeghi M, Olliaro PL, Pritchard MG, Russell CD, Shaw CA, Sheikh A, Solomon T, Sudlow C, Swann OV, Turtle LCW, Openshaw PJM, Baillie JK, Semple MG, Docherty AB, Harrison EM; ISARIC4C investigators",
        "doi": "10.1136/bmj.m3339",
        "id": "knight-2020",
        "pmid": "32907855",
        "source": "BMJ. 2020;370:m3339",
        "title": "Risk stratification of patients admitted to hospital with covid-19 using the ISARIC WHO Clinical Characterisation Protocol: development and validation of the 4C Mortality Score"
      },
      "formula": "4c",
      "formula_expression": "4C = age (<50 0, 50–59 2, 60–69 4, 70–79 6, ≥80 7) + sex (female 0, male 1) + comorbidity_count (0→0, 1→1, ≥2→2) + respiratory_rate (<20 0, 20–29 1, ≥30 2) + spo2_percent (≥92 0, <92 2) + gcs (15 0, <15 2) + urea_mmol_l (<7 0, 7–14 1, >14 3) + crp_mg_l (<50 0, 50–99 1, ≥100 2); Knight 2020 Table 2; max 21; Table 5 bands low 0–3, intermediate 4–8, high 9–14, very_high ≥15",
      "max_score": 21,
      "score": 0,
      "age_years": 40,
      "sex": "female",
      "crp_mg_l": 10.0,
      "spo2_percent": 98.0,
      "gcs": 15,
      "respiratory_rate": 16,
      "comorbidity_count": 0,
      "four_c_band": "low",
      "urea_mmol_l": 5.0
    }
  ]
}
```

## Response fields

- `formula` (string): 4c
- `formula_expression` (string): Exact expression used
- `score` (integer): 4C points 0-21
- `max_score` (integer): Always 21
- `four_c_band` (string): Knight 2020 Table 5 validation mortality band: low (0-3), intermediate (4-8), high (9-14), or very_high (≥15). Not a COVID-19 diagnosis or treatment order.
- `age_years` (integer): Age used
- `sex` (string): Sex at birth used (female or male)
- `comorbidity_count` (integer): Caller-assigned Charlson-plus-obesity count used
- `respiratory_rate` (integer): Respiratory rate used
- `spo2_percent` (number): Room-air SpO2 percent used
- `gcs` (integer): Caller-assigned total GCS used
- `urea_mmol_l` (number): Urea in mmol/L used
- `crp_mg_l` (number): CRP in mg/L used
- `components` (array): Per-item points
- `citation` (object): Knight 2020 BMJ citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": 40,
      "factor": "age",
      "points": 0,
      "present": false
    },
    {
      "value": "female",
      "factor": "sex",
      "points": 0,
      "present": false
    },
    {
      "value": 0,
      "factor": "comorbidity_count",
      "points": 0,
      "present": false
    },
    {
      "value": 16,
      "factor": "respiratory_rate",
      "points": 0,
      "present": false
    },
    {
      "value": 98.0,
      "factor": "spo2_percent",
      "points": 0,
      "present": false
    },
    {
      "value": 15,
      "factor": "gcs",
      "points": 0,
      "present": false
    },
    {
      "value": 5.0,
      "factor": "urea",
      "points": 0,
      "present": false
    },
    {
      "value": 10.0,
      "factor": "crp_mg_l",
      "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": "Knight SR, Ho A, Pius R, Buchan I, Carson G, Drake TM, Dunning J, Fairfield CJ, Gamble C, Green CA, Gupta R, Halpin S, Hardwick HE, Holden KA, Horby PW, Jackson C, Mclean KA, Merson L, Nguyen-Van-Tam JS, Norman L, Noursadeghi M, Olliaro PL, Pritchard MG, Russell CD, Shaw CA, Sheikh A, Solomon T, Sudlow C, Swann OV, Turtle LCW, Openshaw PJM, Baillie JK, Semple MG, Docherty AB, Harrison EM; ISARIC4C investigators",
    "doi": "10.1136/bmj.m3339",
    "id": "knight-2020",
    "pmid": "32907855",
    "source": "BMJ. 2020;370:m3339",
    "title": "Risk stratification of patients admitted to hospital with covid-19 using the ISARIC WHO Clinical Characterisation Protocol: development and validation of the 4C Mortality Score"
  },
  "formula": "4c",
  "formula_expression": "4C = age (<50 0, 50–59 2, 60–69 4, 70–79 6, ≥80 7) + sex (female 0, male 1) + comorbidity_count (0→0, 1→1, ≥2→2) + respiratory_rate (<20 0, 20–29 1, ≥30 2) + spo2_percent (≥92 0, <92 2) + gcs (15 0, <15 2) + urea_mmol_l (<7 0, 7–14 1, >14 3) + crp_mg_l (<50 0, 50–99 1, ≥100 2); Knight 2020 Table 2; max 21; Table 5 bands low 0–3, intermediate 4–8, high 9–14, very_high ≥15",
  "max_score": 21,
  "score": 0,
  "age_years": 40,
  "sex": "female",
  "crp_mg_l": 10.0,
  "spo2_percent": 98.0,
  "gcs": 15,
  "respiratory_rate": 16,
  "comorbidity_count": 0,
  "four_c_band": "low",
  "urea_mmol_l": 5.0
}
```

## Errors

- HTTP 400 `invalid_age`: age must be an integer from 18 to 120 Returned before settlement; you are not charged.
- HTTP 400 `invalid_sex`: sex must be female or male Returned before settlement; you are not charged.
- HTTP 400 `invalid_comorbidity_count`: comorbidities or comorbidity_count must be an integer from 0 to 20 (Heyland 2011 NUTRIC comorbidities; Knight 2020 4C comorbidity_count, caller-assigned Charlson-plus-obesity, not computed). Returned before settlement; you are not charged.
- HTTP 400 `invalid_respiratory_rate`: respiratory_rate must be an integer from 4 to 80. Returned before settlement; you are not charged.
- HTTP 400 `invalid_spo2`: spo2_percent must be a number from 50 to 100. Returned before settlement; you are not charged.
- HTTP 400 `invalid_gcs_total`: gcs must be an integer from 3 to 15. Returned before settlement; you are not charged.
- HTTP 400 `invalid_urea`: urea_mmol_l (1-50) or bun_mg_dl (3-140) is required, not both. Returned before settlement; you are not charged.
- HTTP 400 `invalid_crp`: crp_mg_l must be a number from 0 to 500. 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

- [qCSI](https://magentlab.com/docs/qcsi) — Sum Haimovich 2020 qCSI bedside points (Table 2) from respiratory rate, lowest SpO2, and nasal-cannula oxygen flow and return the integer total (max 12).
- [SOFA](https://magentlab.com/docs/sofa) — Compute the Vincent 1996 SOFA score from PaO2/FiO2, platelets, bilirubin, MAP and adrenergic agents, GCS, and creatinine or urine output.
- [NEWS2](https://magentlab.com/docs/news2) — Compute the RCP 2017 National Early Warning Score 2 from respiratory rate, SpO2 (Scale 1 or Scale 2), supplemental oxygen, temperature, systolic BP, heart rate, and caller-assigned ACVPU.

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