# VACO Index 30-day mortality

VACO Index

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

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

## What it computes

Compute the King 2020 VACO Index 30-day all-cause mortality probability from age, sex, a caller-assigned unadjusted Charlson comorbidity index, and history of myocardial infarction or peripheral vascular disease using Supplement S3 coefficients.

## When to use

When an agent already has age, sex, a caller-assigned unadjusted Charlson score, and whether MI or PVD is present, and needs the published King 2020 S3 logistic 30-day probability, not VACS Index 1.0, VACS 2.0, 4C, or PRIEST.

## When not to use

- Not a medical device and not a diagnosis. Not a treatment, triage, isolation, or disposition order.
- magent does not assign Charlson diagnoses. CCI is caller-assigned from administrative codes as in King 2020; this tool does not run ICD-10 mapping.
- Age 85 years or older uses the published combined age–CCI term; the numeric CCI does not change the linear predictor.
- Not VACS Index 1.0 and not VACS 2.0. King 2020 did not retain race or ethnicity in the final index; magent does not add either.
- Derivation used early-pandemic VA testing. King 2020 publishes no later-wave recalibration in S3.

## Formula

```
lp = intercept + age_term + sex_term + cci_term + mi_pvd_term; probability = exp(lp)/(1+exp(lp)); King 2020 S1 File (PLOS S3); intercept -4.216058062; female 0; male 0.322291449; no MI/PVD 0; MI or PVD 0.267265312; age 20-50 (ages 20-49) -2.228678713, 50-54 0, 55-59 0.400599289, 60-64 0.941322019, 65-69 1.295007128, 70-74 1.629533438, 75-79 1.763345763, 80-89 1.927443543, ge90 2.018752269; age<85 CCI 0 0, 1-3 0.612122574, 4-5 0.825072847, 6-9 0.956099733, ge10 1.395164653; age>=85 any CCI 1.529325519; unadjusted Charlson; not VACS 1.0; not VACS 2.0
```

## Citation

[Development and validation of a 30-day mortality index based on pre-existing medical administrative data from 13,323 COVID-19 patients: The Veterans Health Administration COVID-19 (VACO) Index](https://doi.org/10.1371/journal.pone.0241825)
King JT Jr, Yoon JS, Rentsch CT, Tate JP, Park LS, Kidwai-Khan F, et al.
PLoS One. 2020;15(11):e0241825
DOI: [10.1371/journal.pone.0241825](https://doi.org/10.1371/journal.pone.0241825)

## Worked example

### Female, age 40, CCI 0, no MI or PVD

Given: `age=40, cci=0, mi_pvd=false, sex=female`

1. age 40 → 20-50 term -2.228678713; female 0; CCI 0 and age<85 → 0; mi_pvd false → 0
2. lp = -4.216058062 - 2.228678713 = -6.444736775
3. estimated_probability_percent = 100 × exp(lp)/(1+exp(lp))


### S3 example: 77-year-old male, CCI 5, no MI or PVD

Given: `age=77, cci=5, mi_pvd=false, sex=male`

1. age 77 → 75-79 term 1.763345763; male 0.322291449; CCI 5 and age<85 → 0.825072847; mi_pvd false → 0
2. lp = -4.216058062 + 1.763345763 + 0.322291449 + 0.825072847 = -1.305348003
3. S3 prints 21%; estimated_probability_percent from the unrounded logit is 21.33


## Also searched as

- VACO Index
- VA COVID-19 Index
- King 2020 30-day mortality
- Veterans Health Administration COVID-19
- Charlson COVID mortality
- VACO 30-day all-cause mortality
- King VACO logistic

## Parameters

- `age` (integer, required): Age in years (integer 20-120). King 2020 S3 bands: 20-50 (ages 20-49), 50-54, 55-59, 60-64, 65-69, 70-74, 75-79, 80-89, ge90. Age 50 uses 50-54. Age 85-89 keeps the 80-89 age term and the age>=85 CCI term.
- `sex` (string, required): Sex as assigned by the caller. female is the S3 reference (0). male adds 0.322291449. magent does not assign sex.
- `cci` (integer, required): Unadjusted Charlson comorbidity index as assigned by the caller (integer 0-37). King 2020 S3: 0 (reference), 1-3, 4-5, 6-9, ge10 when age<85. Age 85 or older uses the published combined CCI term regardless of this integer. magent does not assign Charlson diagnoses.
- `mi_pvd` (boolean, required): History of myocardial infarction or peripheral vascular disease as assigned by the caller (true or false). false is the S3 reference (0). true adds 0.267265312.

## 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/vaco`
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",
      "cci": "0",
      "mi_pvd": "false",
      "sex": "female"
    },
    {
      "age": "40",
      "cci": "0",
      "mi_pvd": "false",
      "sex": "female"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/vaco",
  "items": [
    {
      "age": 40,
      "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": "King JT Jr, Yoon JS, Rentsch CT, Tate JP, Park LS, Kidwai-Khan F, et al.",
        "doi": "10.1371/journal.pone.0241825",
        "id": "king-2020-vaco",
        "pmid": "33175863",
        "source": "PLoS One. 2020;15(11):e0241825",
        "title": "Development and validation of a 30-day mortality index based on pre-existing medical administrative data from 13,323 COVID-19 patients: The Veterans Health Administration COVID-19 (VACO) Index"
      },
      "formula": "vaco",
      "formula_expression": "lp = intercept + age_term + sex_term + cci_term + mi_pvd_term; probability = exp(lp)/(1+exp(lp)); King 2020 S1 File (PLOS S3); intercept -4.216058062; female 0; male 0.322291449; no MI/PVD 0; MI or PVD 0.267265312; age 20-50 (ages 20-49) -2.228678713, 50-54 0, 55-59 0.400599289, 60-64 0.941322019, 65-69 1.295007128, 70-74 1.629533438, 75-79 1.763345763, 80-89 1.927443543, ge90 2.018752269; age<85 CCI 0 0, 1-3 0.612122574, 4-5 0.825072847, 6-9 0.956099733, ge10 1.395164653; age>=85 any CCI 1.529325519; unadjusted Charlson; not VACS 1.0; not VACS 2.0",
      "sex": "female",
      "estimated_probability_percent": 0.16,
      "logit": -6.444737,
      "cci": 0,
      "age_band": "20-50",
      "cci_band": "0",
      "mi_pvd": false
    },
    {
      "age": 40,
      "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": "King JT Jr, Yoon JS, Rentsch CT, Tate JP, Park LS, Kidwai-Khan F, et al.",
        "doi": "10.1371/journal.pone.0241825",
        "id": "king-2020-vaco",
        "pmid": "33175863",
        "source": "PLoS One. 2020;15(11):e0241825",
        "title": "Development and validation of a 30-day mortality index based on pre-existing medical administrative data from 13,323 COVID-19 patients: The Veterans Health Administration COVID-19 (VACO) Index"
      },
      "formula": "vaco",
      "formula_expression": "lp = intercept + age_term + sex_term + cci_term + mi_pvd_term; probability = exp(lp)/(1+exp(lp)); King 2020 S1 File (PLOS S3); intercept -4.216058062; female 0; male 0.322291449; no MI/PVD 0; MI or PVD 0.267265312; age 20-50 (ages 20-49) -2.228678713, 50-54 0, 55-59 0.400599289, 60-64 0.941322019, 65-69 1.295007128, 70-74 1.629533438, 75-79 1.763345763, 80-89 1.927443543, ge90 2.018752269; age<85 CCI 0 0, 1-3 0.612122574, 4-5 0.825072847, 6-9 0.956099733, ge10 1.395164653; age>=85 any CCI 1.529325519; unadjusted Charlson; not VACS 1.0; not VACS 2.0",
      "sex": "female",
      "estimated_probability_percent": 0.16,
      "logit": -6.444737,
      "cci": 0,
      "age_band": "20-50",
      "cci_band": "0",
      "mi_pvd": false
    }
  ]
}
```

## Response fields

- `formula` (string): vaco
- `formula_expression` (string): King 2020 S3 logistic linear predictor and probability
- `age` (integer): Input age in years
- `sex` (string): female or male
- `cci` (integer): Caller-assigned unadjusted Charlson comorbidity index
- `mi_pvd` (boolean): Caller-assigned history of myocardial infarction or peripheral vascular disease
- `age_band` (string): S3 age band used for the age term (20-50, 50-54, …, ge90)
- `cci_band` (string): S3 CCI band, or age_ge85_any when age is 85 or older
- `logit` (number): Unrounded linear predictor, 6 decimals
- `estimated_probability_percent` (number): 30-day all-cause mortality percent from the unrounded logit, 2 decimals
- `citation` (object): King 2020 VACO Index citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "age": 40,
  "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": "King JT Jr, Yoon JS, Rentsch CT, Tate JP, Park LS, Kidwai-Khan F, et al.",
    "doi": "10.1371/journal.pone.0241825",
    "id": "king-2020-vaco",
    "pmid": "33175863",
    "source": "PLoS One. 2020;15(11):e0241825",
    "title": "Development and validation of a 30-day mortality index based on pre-existing medical administrative data from 13,323 COVID-19 patients: The Veterans Health Administration COVID-19 (VACO) Index"
  },
  "formula": "vaco",
  "formula_expression": "lp = intercept + age_term + sex_term + cci_term + mi_pvd_term; probability = exp(lp)/(1+exp(lp)); King 2020 S1 File (PLOS S3); intercept -4.216058062; female 0; male 0.322291449; no MI/PVD 0; MI or PVD 0.267265312; age 20-50 (ages 20-49) -2.228678713, 50-54 0, 55-59 0.400599289, 60-64 0.941322019, 65-69 1.295007128, 70-74 1.629533438, 75-79 1.763345763, 80-89 1.927443543, ge90 2.018752269; age<85 CCI 0 0, 1-3 0.612122574, 4-5 0.825072847, 6-9 0.956099733, ge10 1.395164653; age>=85 any CCI 1.529325519; unadjusted Charlson; not VACS 1.0; not VACS 2.0",
  "sex": "female",
  "estimated_probability_percent": 0.16,
  "logit": -6.444737,
  "cci": 0,
  "age_band": "20-50",
  "cci_band": "0",
  "mi_pvd": false
}
```

## Errors

- HTTP 400 `invalid_vaco`: VACO Index inputs must match King 2020 age, sex, Charlson comorbidity index, and myocardial infarction or peripheral vascular disease. 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

- [4C](https://magentlab.com/docs/4c) — Sum the Knight 2020 ISARIC 4C Mortality Score items and return the published Table 5 band (low, intermediate, high, or very high).
- [PRIEST](https://magentlab.com/docs/priest) — Sum the Goodacre 2021 PRIEST points from NEWS2 Chart 1 Scale 1 vitals, alertness, inspired oxygen, age, sex, and performance status, and return whether the total is ≤4.
- [CHOSEN](https://magentlab.com/docs/chosen) — Sum the Levine 2020 CHOSEN (COVID Home Safely Now) Figure 2 points from age, oxygen saturation, and serum albumin in g/dL, and return whether the total is at or above the printed cutpoint of 30.

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