# VACS Index 1.0 (Tate 2013)

VACS 1.0

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

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

## What it computes

Sum the Tate 2013 VACS Index 1.0 points after one year of antiretroviral therapy from age, CD4, HIV-1 RNA, hemoglobin, caller-assigned FIB-4 and eGFR, and hepatitis C.

## When to use

When an agent already has those seven caller-assigned values and needs the published VACS 1.0 point total. magent does not assay labs, compute FIB-4 or eGFR, or order ART.

## When not to use

- Not a medical device and not a diagnosis of HIV, liver disease, kidney disease, or anemia. Not an antiretroviral, hepatitis C, or transfusion order.
- This is Tate 2013 VACS Index 1.0 only. It is not VACS 2.0 and does not use albumin, WBC, or BMI.
- FIB-4 and eGFR are caller-assigned. magent does not recompute FIB-4 and does not compute MDRD or CKD-EPI. Race is not an input.
- Tate 2013 does not name low, intermediate, or high mortality bands. The response is a point total (0–164), not a risk stratum or a patient-specific probability.

## Formula

```
VACS 1.0 = age (<50 0; 50-64 12; ≥65 27) + cd4_cells_mm3 (≥500 0; 350-499 6; 200-349 6; 100-199 10; 50-99 28; <50 29) + hiv_rna_copies_ml (<500 0; 500-99999 7; ≥100000 14) + hemoglobin_g_dl (≥14 0; 12-13.9 10; 10-11.9 22; <10 38) + fib4 (<1.45 0; 1.45-3.25 6; >3.25 25) + egfr_ml_min_1_73m2 (≥60 0; 45-59.9 6; 30-44.9 8; <30 26) + hepatitis_c 5; Tate 2013 VACS Index column (Brown 2014 Table 1 reprint); max 164; caller-assigned FIB-4 and eGFR; not VACS 2.0
```

## Citation

[The VACS Index: An internationally generalizable risk index for mortality after one year of antiretroviral therapy](https://doi.org/10.1097/QAD.0b013e32835b8c7f)
Tate JP, Justice AC, Hughes MD, Bonnet F, Reiss P, Mocroft A, et al.
AIDS. 2013;27(4):563-572
DOI: [10.1097/QAD.0b013e32835b8c7f](https://doi.org/10.1097/QAD.0b013e32835b8c7f)

## Worked example

### Lowest published combination

Given: `age=40, cd4_cells_mm3=600, egfr_ml_min_1_73m2=90, fib4=1.0, hemoglobin_g_dl=15, hepatitis_c=false, hiv_rna_copies_ml=200`

1. age 40 <50 → 0; CD4 600 ≥500 → 0; HIV-1 RNA 200 <500 → 0; hemoglobin 15 ≥14 → 0; FIB-4 1.0 <1.45 → 0; eGFR 90 ≥60 → 0; hepatitis C false → 0
2. Score = 0 (max 164)


### Age 55 with otherwise lowest-risk labs

Given: `age=55, cd4_cells_mm3=600, egfr_ml_min_1_73m2=90, fib4=1.0, hemoglobin_g_dl=15, hepatitis_c=false, hiv_rna_copies_ml=200`

1. age 55 is 50-64 → 12; remaining factors lowest-risk → 0
2. Score = 12 (max 164)


## Also searched as

- VACS Index
- VACS 1.0
- Veterans Aging Cohort Study Index
- Tate 2013 VACS
- HIV mortality index after ART
- VACS Index 1.0

## Parameters

- `age` (integer, required): Age in years (integer 18-120). Tate 2013 VACS Index: <50 scores 0; 50-64 scores 12; ≥65 scores 27.
- `cd4_cells_mm3` (integer, required): CD4 count in cells/mm³ (integer 1-2000). Tate 2013: ≥500 scores 0; 350-499 scores 6; 200-349 scores 6; 100-199 scores 10; 50-99 scores 28; <50 scores 29. magent does not assay CD4.
- `hiv_rna_copies_ml` (number, required): HIV-1 RNA in copies/mL (0-10000000). Tate 2013: <500 scores 0; 500-99999 scores 7; ≥100000 scores 14. magent does not assay viral load.
- `hemoglobin_g_dl` (number, required): Hemoglobin in g/dL (3-22). Tate 2013: ≥14 scores 0; 12-13.9 scores 10; 10-11.9 scores 22; <10 scores 38. magent does not assay hemoglobin.
- `fib4` (number, required): Caller-assigned FIB-4 (0.1-20). Tate 2013: <1.45 scores 0; 1.45-3.25 scores 6; >3.25 scores 25. magent does not recompute FIB-4.
- `egfr_ml_min_1_73m2` (number, required): Caller-assigned eGFR in mL/min/1.73m² (5-200). Tate 2013: ≥60 scores 0; 45-59.9 scores 6; 30-44.9 scores 8; <30 scores 26. magent does not compute MDRD or CKD-EPI.
- `hepatitis_c` (boolean, required): Caller-assigned hepatitis C co-infection (Tate 2013). true scores 5. magent does not diagnose hepatitis C.

## 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/vacs_1`
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",
      "cd4_cells_mm3": "600",
      "egfr_ml_min_1_73m2": "90",
      "fib4": "1.0",
      "hemoglobin_g_dl": "15",
      "hepatitis_c": "false",
      "hiv_rna_copies_ml": "200"
    },
    {
      "age": "40",
      "cd4_cells_mm3": "600",
      "egfr_ml_min_1_73m2": "90",
      "fib4": "1.0",
      "hemoglobin_g_dl": "15",
      "hepatitis_c": "false",
      "hiv_rna_copies_ml": "200"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/vacs_1",
  "items": [
    {
      "components": [
        {
          "value": 40,
          "factor": "age",
          "points": 0,
          "present": false
        },
        {
          "value": 600,
          "factor": "cd4_cells_mm3",
          "points": 0,
          "present": false
        },
        {
          "value": 200.0,
          "factor": "hiv_rna_copies_ml",
          "points": 0,
          "present": false
        },
        {
          "value": 15.0,
          "factor": "hemoglobin_g_dl",
          "points": 0,
          "present": false
        },
        {
          "value": 1.0,
          "factor": "fib4",
          "points": 0,
          "present": false
        },
        {
          "value": 90.0,
          "factor": "egfr_ml_min_1_73m2",
          "points": 0,
          "present": false
        },
        {
          "factor": "hepatitis_c",
          "points": 0,
          "present": 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": "Tate JP, Justice AC, Hughes MD, Bonnet F, Reiss P, Mocroft A, et al.",
        "doi": "10.1097/QAD.0b013e32835b8c7f",
        "id": "tate-2013",
        "pmid": "23242319",
        "source": "AIDS. 2013;27(4):563-572",
        "title": "The VACS Index: An internationally generalizable risk index for mortality after one year of antiretroviral therapy"
      },
      "formula": "vacs_1",
      "formula_expression": "VACS 1.0 = age (<50 0; 50-64 12; ≥65 27) + cd4_cells_mm3 (≥500 0; 350-499 6; 200-349 6; 100-199 10; 50-99 28; <50 29) + hiv_rna_copies_ml (<500 0; 500-99999 7; ≥100000 14) + hemoglobin_g_dl (≥14 0; 12-13.9 10; 10-11.9 22; <10 38) + fib4 (<1.45 0; 1.45-3.25 6; >3.25 25) + egfr_ml_min_1_73m2 (≥60 0; 45-59.9 6; 30-44.9 8; <30 26) + hepatitis_c 5; Tate 2013 VACS Index column (Brown 2014 Table 1 reprint); max 164; caller-assigned FIB-4 and eGFR; not VACS 2.0",
      "max_score": 164,
      "score": 0,
      "hemoglobin_g_dl": 15.0,
      "egfr_ml_min_1_73m2": 90.0,
      "fib4": 1.0,
      "cd4_cells_mm3": 600,
      "hepatitis_c": false,
      "hiv_rna_copies_ml": 200.0
    },
    {
      "components": [
        {
          "value": 40,
          "factor": "age",
          "points": 0,
          "present": false
        },
        {
          "value": 600,
          "factor": "cd4_cells_mm3",
          "points": 0,
          "present": false
        },
        {
          "value": 200.0,
          "factor": "hiv_rna_copies_ml",
          "points": 0,
          "present": false
        },
        {
          "value": 15.0,
          "factor": "hemoglobin_g_dl",
          "points": 0,
          "present": false
        },
        {
          "value": 1.0,
          "factor": "fib4",
          "points": 0,
          "present": false
        },
        {
          "value": 90.0,
          "factor": "egfr_ml_min_1_73m2",
          "points": 0,
          "present": false
        },
        {
          "factor": "hepatitis_c",
          "points": 0,
          "present": 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": "Tate JP, Justice AC, Hughes MD, Bonnet F, Reiss P, Mocroft A, et al.",
        "doi": "10.1097/QAD.0b013e32835b8c7f",
        "id": "tate-2013",
        "pmid": "23242319",
        "source": "AIDS. 2013;27(4):563-572",
        "title": "The VACS Index: An internationally generalizable risk index for mortality after one year of antiretroviral therapy"
      },
      "formula": "vacs_1",
      "formula_expression": "VACS 1.0 = age (<50 0; 50-64 12; ≥65 27) + cd4_cells_mm3 (≥500 0; 350-499 6; 200-349 6; 100-199 10; 50-99 28; <50 29) + hiv_rna_copies_ml (<500 0; 500-99999 7; ≥100000 14) + hemoglobin_g_dl (≥14 0; 12-13.9 10; 10-11.9 22; <10 38) + fib4 (<1.45 0; 1.45-3.25 6; >3.25 25) + egfr_ml_min_1_73m2 (≥60 0; 45-59.9 6; 30-44.9 8; <30 26) + hepatitis_c 5; Tate 2013 VACS Index column (Brown 2014 Table 1 reprint); max 164; caller-assigned FIB-4 and eGFR; not VACS 2.0",
      "max_score": 164,
      "score": 0,
      "hemoglobin_g_dl": 15.0,
      "egfr_ml_min_1_73m2": 90.0,
      "fib4": 1.0,
      "cd4_cells_mm3": 600,
      "hepatitis_c": false,
      "hiv_rna_copies_ml": 200.0
    }
  ]
}
```

## Response fields

- `formula` (string): vacs_1
- `formula_expression` (string): Exact expression used
- `score` (integer): Tate 2013 VACS Index 1.0 points 0-164
- `max_score` (integer): 164
- `age` (integer): Age in years used for Tate 2013 age bands
- `cd4_cells_mm3` (integer): CD4 cells/mm³ used for Tate 2013 CD4 bands
- `hiv_rna_copies_ml` (number): HIV-1 RNA copies/mL used for Tate 2013 viral-load bands
- `hemoglobin_g_dl` (number): Hemoglobin g/dL used for Tate 2013 hemoglobin bands
- `fib4` (number): Caller-assigned FIB-4 used for Tate 2013 FIB-4 bands
- `egfr_ml_min_1_73m2` (number): Caller-assigned eGFR used for Tate 2013 eGFR bands
- `hepatitis_c` (boolean): Caller-assigned hepatitis C co-infection flag
- `components` (array): Per-factor Tate 2013 points
- `citation` (object): Tate et al. AIDS 2013 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": 600,
      "factor": "cd4_cells_mm3",
      "points": 0,
      "present": false
    },
    {
      "value": 200.0,
      "factor": "hiv_rna_copies_ml",
      "points": 0,
      "present": false
    },
    {
      "value": 15.0,
      "factor": "hemoglobin_g_dl",
      "points": 0,
      "present": false
    },
    {
      "value": 1.0,
      "factor": "fib4",
      "points": 0,
      "present": false
    },
    {
      "value": 90.0,
      "factor": "egfr_ml_min_1_73m2",
      "points": 0,
      "present": false
    },
    {
      "factor": "hepatitis_c",
      "points": 0,
      "present": 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": "Tate JP, Justice AC, Hughes MD, Bonnet F, Reiss P, Mocroft A, et al.",
    "doi": "10.1097/QAD.0b013e32835b8c7f",
    "id": "tate-2013",
    "pmid": "23242319",
    "source": "AIDS. 2013;27(4):563-572",
    "title": "The VACS Index: An internationally generalizable risk index for mortality after one year of antiretroviral therapy"
  },
  "formula": "vacs_1",
  "formula_expression": "VACS 1.0 = age (<50 0; 50-64 12; ≥65 27) + cd4_cells_mm3 (≥500 0; 350-499 6; 200-349 6; 100-199 10; 50-99 28; <50 29) + hiv_rna_copies_ml (<500 0; 500-99999 7; ≥100000 14) + hemoglobin_g_dl (≥14 0; 12-13.9 10; 10-11.9 22; <10 38) + fib4 (<1.45 0; 1.45-3.25 6; >3.25 25) + egfr_ml_min_1_73m2 (≥60 0; 45-59.9 6; 30-44.9 8; <30 26) + hepatitis_c 5; Tate 2013 VACS Index column (Brown 2014 Table 1 reprint); max 164; caller-assigned FIB-4 and eGFR; not VACS 2.0",
  "max_score": 164,
  "score": 0,
  "hemoglobin_g_dl": 15.0,
  "egfr_ml_min_1_73m2": 90.0,
  "fib4": 1.0,
  "cd4_cells_mm3": 600,
  "hepatitis_c": false,
  "hiv_rna_copies_ml": 200.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_cd4`: cd4_cells_mm3 must be an integer from 1 to 2000 (Tate 2013 VACS 1.0 CD4 count). Returned before settlement; you are not charged.
- HTTP 400 `invalid_hiv_rna`: hiv_rna_copies_ml must be a number from 0 to 10000000 (Tate 2013 VACS 1.0 HIV-1 RNA copies/mL). Returned before settlement; you are not charged.
- HTTP 400 `invalid_hemoglobin`: hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.
- HTTP 400 `invalid_fib4`: fib4 must be a number from 0.1 to 20 (Tate 2013 VACS 1.0 caller-assigned FIB-4; magent does not recompute FIB-4). Returned before settlement; you are not charged.
- HTTP 400 `invalid_egfr`: egfr_ml_min_1_73m2 must be a number from 5 to 200 (caller-assigned eGFR; magent does not compute MDRD or CKD-EPI). Returned before settlement; you are not charged.
- HTTP 400 `invalid_flag`: boolean clinical flags must be true or false 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

- [FIB-4](https://magentlab.com/docs/fib4) — Compute the FIB-4 fibrosis index from age, AST, ALT, and platelets.
- [MELD](https://magentlab.com/docs/meld) — Compute the Kamath 2001 model for end-stage liver disease (MELD) integer from creatinine, bilirubin, INR, and cholestatic or alcoholic etiology.

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