# VACS-CCI (McGinnis 2024)

VACS-CCI (McGinnis 2024)

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

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

## What it computes

Compute the McGinnis 2024 Table 2 Model 7 VACS-CCI Cox linear predictor from caller-assigned sex, age, VACS Index 2.0 biomarkers (hemoglobin, FIB-4, eGFR, albumin, WBC, BMI), hepatitis C, and Charlson comorbidity groupings. CD4 and HIV-1 RNA are not inputs.

## When to use

When an agent already has those caller-assigned values and needs the published Table 2 linear predictor. magent does not code ICD comorbidities, compute FIB-4 or eGFR, or invent the unpublished 0-100 score transform.

## When not to use

- Not a medical device and not a diagnosis or prognosis for an individual patient. magent does not assign comorbidities or code the chart.
- Table 2 Model 7 is the linear predictor. The 0-100 VACS-CCI score divides Xbeta by the unpublished development min-max range. magent does not invent that scale. The paper prints 0-100 score 30 → 1%, 3%, 8%, 18% and score 45 → 6%, 14%, 35%, 61% at 1/2/5/10 years. No baseline survival S0.
- Extreme values were replaced with 1st or 99th percentiles in the paper; those percentiles are not published, so magent does not winsorize.
- FIB-4 and eGFR are caller-assigned. magent does not recompute FIB-4 and does not compute CKD-EPI.
- The 2025 corrigendum (PMID 39845833) corrects Figure 4 interpretation only. Table 2 coefficients are unchanged.

## Formula

```
lp = sex_female -0.513 + age_poly(X=age-50, 0.278/0.006/-0.001) + hb_poly(X=hemoglobin-14, -0.115/0.024/0.004) + fib4_poly(X, 0.205/-0.006) + egfr_poly(X=egfr-90, 0.071/0.036/0.002) + alb_poly(X=albumin-4, -0.405/0.326/0.156) + wbc_poly(X=WBC-4, -0.011/0.053/-0.008/0.000) + bmi_poly(X=BMI-25, -0.061/0.005/0.000) + hepatitis_c 0.273 + Table 2 Charlson condition coefficients + CCI-group x age-band interaction (CCI 0/1/2/3+ by <50, 50-64, 65-79, 80+; CCI 1 x 50-64 is reference 0); cci_group from caller-assigned condition weights (MI 1, CHF 1, PVD 1, CVD 1, dementia 1, pulmonary 1, rheumatic 1, PUD 1, DM without 1, DM with 2, hemiplegia 2, kidney mild-to-moderate 2, kidney severe 2, any malignancy 2, metastatic 6, liver mild 1, liver moderate-to-severe 3); McGinnis 2024 Table 2 Model 7; 1st/99th percentile winsorizing not published; 0-100 score uses unpublished development min/max Xbeta so magent does not scale; paper prints 0-100 score 30 → 1-year 1%, 2-year 3%, 5-year 8%, 10-year 18% and score 45 → 6%, 14%, 35%, 61%; no published S0; 2025 corrigendum PMID 39845833 does not change Table 2 coefficients; caller-assigned comorbidities, FIB-4, and eGFR
```

## Citation

[Combining Charlson comorbidity and VACS indices improves prognostic accuracy for all-cause mortality for patients with and without HIV in the Veterans Health Administration](https://doi.org/10.3389/fmed.2023.1342466)
McGinnis KA, Justice AC, Marconi VC, et al.
Front Med (Lausanne). 2024;10:1342466
DOI: [10.3389/fmed.2023.1342466](https://doi.org/10.3389/fmed.2023.1342466)

## Worked example

### Male age 55 with centered labs and no Charlson flags

Given: `age=55, albumin_g_dl=4, any_malignancy=false, bmi_kg_m2=25, cerebrovascular_disease=false, chronic_pulmonary_disease=false, congestive_heart_failure=false, dementia=false, diabetes_with_complications=false, diabetes_without_complications=false, egfr_ml_min_1_73m2=90, fib4=1.0, hemiplegia_or_paraplegia=false, hemoglobin_g_dl=14, hepatitis_c=false, kidney_mild_to_moderate=false, kidney_severe=false, liver_mild=false, liver_moderate_to_severe=false, metastatic_solid_tumor=false, myocardial_infarction=false, peptic_ulcer_disease=false, peripheral_vascular_disease=false, rheumatic_disease=false, sex=male, wbc_10e9_l=4`

1. Center Table 2: age 55 → X=5; hemoglobin 14 → 0; FIB-4 1.0; eGFR 90; albumin 4; WBC 4; BMI 25; male; hepatitis C false; no Charlson flags → CCI group 0, age band 50-64
2. age_poly = 0.278*5 + 0.006*25 + (-0.001)*125 = 1.415; fib4_poly = 0.205 - 0.006 = 0.199; CCI 0 × 50-64 interaction = -0.386
3. lp = 1.415 + 0.199 - 0.386 = 1.228. The paper's 0-100 score 30 → 1%, 3%, 8%, 18% and 45 → 6%, 14%, 35%, 61% are not this linear predictor (min/max Xbeta unpublished).


### Female age 55 with the same labs and flags

Given: `age=55, albumin_g_dl=4, any_malignancy=false, bmi_kg_m2=25, cerebrovascular_disease=false, chronic_pulmonary_disease=false, congestive_heart_failure=false, dementia=false, diabetes_with_complications=false, diabetes_without_complications=false, egfr_ml_min_1_73m2=90, fib4=1.0, hemiplegia_or_paraplegia=false, hemoglobin_g_dl=14, hepatitis_c=false, kidney_mild_to_moderate=false, kidney_severe=false, liver_mild=false, liver_moderate_to_severe=false, metastatic_solid_tumor=false, myocardial_infarction=false, peptic_ulcer_disease=false, peripheral_vascular_disease=false, rheumatic_disease=false, sex=female, wbc_10e9_l=4`

1. Same labs and flags as the male example; female vs male adds -0.513
2. lp = 1.228 - 0.513 = 0.715


## Also searched as

- VACS-CCI
- McGinnis 2024 VACS-CCI
- Veterans Aging Cohort Charlson
- VACS Index Charlson
- VACS-CCI Model 7
- Charlson VACS mortality index

## Parameters

- `sex` (string, required): Caller-assigned sex (female or male). Female vs male adds -0.513 to the Table 2 linear predictor. magent does not assign sex.
- `age` (integer, required): Age in years (integer 18-120). Table 2 uses the cubic polynomial of (age-50) and CCI x age-band interaction (<50, 50-64, 65-79, 80+). magent does not assign age.
- `hemoglobin_g_dl` (number, required): Hemoglobin in g/dL (3-22). Table 2 centers at (hemoglobin-14). magent does not assay hemoglobin.
- `fib4` (number, required): Caller-assigned FIB-4 (0.1-20). Table 2 uses X and X2 of FIB-4. magent does not recompute FIB-4.
- `egfr_ml_min_1_73m2` (number, required): Caller-assigned eGFR in mL/min/1.73m² (0-200). Table 2 centers at (egfr-90). magent does not compute CKD-EPI.
- `albumin_g_dl` (number, required): Serum albumin in g/dL (1-6.5). Table 2 centers at (albumin-4). magent does not assay albumin.
- `wbc_10e9_l` (number, required): White blood count in 10^9/L (0.5-50), equal to k/µL. Table 2 centers at (WBC-4). magent does not assay WBC.
- `bmi_kg_m2` (number, required): Body mass index in kg/m² (10-60). Table 2 centers at (BMI-25). magent does not compute BMI from height and weight.
- `hepatitis_c` (boolean, required): Caller-assigned hepatitis C (McGinnis 2024). true adds 0.273 to the linear predictor. magent does not diagnose hepatitis C.
- `myocardial_infarction` (boolean, required): Caller-assigned myocardial infarction (McGinnis 2024 Table 2). true adds 0.008 to lp and 1 to the CCI grouping. magent does not diagnose infarction.
- `congestive_heart_failure` (boolean, required): Caller-assigned congestive heart failure (McGinnis 2024 Table 2). true adds 0.420 to lp and 1 to the CCI grouping. magent does not diagnose heart failure.
- `peripheral_vascular_disease` (boolean, required): Caller-assigned peripheral vascular disease (McGinnis 2024 Table 2). true adds 0.141 to lp and 1 to the CCI grouping. magent does not diagnose vascular disease.
- `cerebrovascular_disease` (boolean, required): Caller-assigned cerebrovascular disease (McGinnis 2024 Table 2). true adds 0.114 to lp and 1 to the CCI grouping. magent does not diagnose stroke.
- `dementia` (boolean, required): Caller-assigned dementia (McGinnis 2024 Table 2). true adds 0.489 to lp and 1 to the CCI grouping. magent does not diagnose dementia.
- `chronic_pulmonary_disease` (boolean, required): Caller-assigned chronic pulmonary disease (McGinnis 2024 Table 2). true adds 0.279 to lp and 1 to the CCI grouping. magent does not diagnose lung disease.
- `rheumatic_disease` (boolean, required): Caller-assigned rheumatic disease (McGinnis 2024 Table 2). true adds -0.034 to lp and 1 to the CCI grouping. magent does not diagnose rheumatic disease.
- `peptic_ulcer_disease` (boolean, required): Caller-assigned peptic ulcer disease (McGinnis 2024 Table 2). true adds -0.074 to lp and 1 to the CCI grouping. magent does not diagnose ulcer disease.
- `diabetes_without_complications` (boolean, required): Caller-assigned diabetes without chronic complications (McGinnis 2024 Table 2). true adds 0.053 to lp and 1 to the CCI grouping. magent does not diagnose diabetes.
- `diabetes_with_complications` (boolean, required): Caller-assigned diabetes with chronic complications (McGinnis 2024 Table 2). true adds 0.075 to lp and 2 to the CCI grouping. magent does not diagnose diabetes.
- `hemiplegia_or_paraplegia` (boolean, required): Caller-assigned hemiplegia or paraplegia (McGinnis 2024 Table 2). true adds -0.049 to lp and 2 to the CCI grouping. magent does not diagnose paralysis.
- `kidney_mild_to_moderate` (boolean, required): Caller-assigned mild-to-moderate kidney disease (McGinnis 2024 Table 2). true adds -0.199 to lp and 2 to the CCI grouping. magent does not grade kidney disease.
- `kidney_severe` (boolean, required): Caller-assigned severe kidney disease (McGinnis 2024 Table 2). true adds -0.098 to lp and 2 to the CCI grouping. magent does not grade kidney disease.
- `any_malignancy` (boolean, required): Caller-assigned any malignancy (McGinnis 2024 Table 2). true adds 0.090 to lp and 2 to the CCI grouping. magent does not diagnose cancer.
- `metastatic_solid_tumor` (boolean, required): Caller-assigned metastatic solid tumor (McGinnis 2024 Table 2). true adds 1.184 to lp and 6 to the CCI grouping. magent does not diagnose cancer.
- `liver_mild` (boolean, required): Caller-assigned mild liver disease (McGinnis 2024 Table 2). true adds -0.045 to lp and 1 to the CCI grouping. magent does not grade liver disease.
- `liver_moderate_to_severe` (boolean, required): Caller-assigned moderate-to-severe liver disease (McGinnis 2024 Table 2). true adds 0.226 to lp and 3 to the CCI grouping. magent does not grade liver disease.

## 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_cci`
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": "55",
      "albumin_g_dl": "4",
      "any_malignancy": "false",
      "bmi_kg_m2": "25",
      "cerebrovascular_disease": "false",
      "chronic_pulmonary_disease": "false",
      "congestive_heart_failure": "false",
      "dementia": "false",
      "diabetes_with_complications": "false",
      "diabetes_without_complications": "false",
      "egfr_ml_min_1_73m2": "90",
      "fib4": "1.0",
      "hemiplegia_or_paraplegia": "false",
      "hemoglobin_g_dl": "14",
      "hepatitis_c": "false",
      "kidney_mild_to_moderate": "false",
      "kidney_severe": "false",
      "liver_mild": "false",
      "liver_moderate_to_severe": "false",
      "metastatic_solid_tumor": "false",
      "myocardial_infarction": "false",
      "peptic_ulcer_disease": "false",
      "peripheral_vascular_disease": "false",
      "rheumatic_disease": "false",
      "sex": "male",
      "wbc_10e9_l": "4"
    },
    {
      "age": "55",
      "albumin_g_dl": "4",
      "any_malignancy": "false",
      "bmi_kg_m2": "25",
      "cerebrovascular_disease": "false",
      "chronic_pulmonary_disease": "false",
      "congestive_heart_failure": "false",
      "dementia": "false",
      "diabetes_with_complications": "false",
      "diabetes_without_complications": "false",
      "egfr_ml_min_1_73m2": "90",
      "fib4": "1.0",
      "hemiplegia_or_paraplegia": "false",
      "hemoglobin_g_dl": "14",
      "hepatitis_c": "false",
      "kidney_mild_to_moderate": "false",
      "kidney_severe": "false",
      "liver_mild": "false",
      "liver_moderate_to_severe": "false",
      "metastatic_solid_tumor": "false",
      "myocardial_infarction": "false",
      "peptic_ulcer_disease": "false",
      "peripheral_vascular_disease": "false",
      "rheumatic_disease": "false",
      "sex": "male",
      "wbc_10e9_l": "4"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/vacs_cci",
  "items": [
    {
      "age_band": "50_64",
      "formula_expression": "lp = sex_female -0.513 + age_poly(X=age-50, 0.278/0.006/-0.001) + hb_poly(X=hemoglobin-14, -0.115/0.024/0.004) + fib4_poly(X, 0.205/-0.006) + egfr_poly(X=egfr-90, 0.071/0.036/0.002) + alb_poly(X=albumin-4, -0.405/0.326/0.156) + wbc_poly(X=WBC-4, -0.011/0.053/-0.008/0.000) + bmi_poly(X=BMI-25, -0.061/0.005/0.000) + hepatitis_c 0.273 + Table 2 Charlson condition coefficients + CCI-group x age-band interaction (CCI 0/1/2/3+ by <50, 50-64, 65-79, 80+; CCI 1 x 50-64 is reference 0); cci_group from caller-assigned condition weights (MI 1, CHF 1, PVD 1, CVD 1, dementia 1, pulmonary 1, rheumatic 1, PUD 1, DM without 1, DM with 2, hemiplegia 2, kidney mild-to-moderate 2, kidney severe 2, any malignancy 2, metastatic 6, liver mild 1, liver moderate-to-severe 3); McGinnis 2024 Table 2 Model 7; 1st/99th percentile winsorizing not published; 0-100 score uses unpublished development min/max Xbeta so magent does not scale; paper prints 0-100 score 30 → 1-year 1%, 2-year 3%, 5-year 8%, 10-year 18% and score 45 → 6%, 14%, 35%, 61%; no published S0; 2025 corrigendum PMID 39845833 does not change Table 2 coefficients; caller-assigned comorbidities, FIB-4, and eGFR",
      "linear_predictor": 1.228,
      "kidney_mild_to_moderate": false,
      "metastatic_solid_tumor": false,
      "any_malignancy": false,
      "egfr_ml_min_1_73m2": 90.0,
      "peptic_ulcer_disease": false,
      "fib4": 1.0,
      "age": 55,
      "myocardial_infarction": false,
      "chronic_pulmonary_disease": false,
      "hemiplegia_or_paraplegia": false,
      "sex": "male",
      "liver_mild": 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.",
      "liver_moderate_to_severe": false,
      "citation": {
        "authors": "McGinnis KA, Justice AC, Marconi VC, et al.",
        "doi": "10.3389/fmed.2023.1342466",
        "id": "mcginnis-2024-vacs-cci",
        "pmid": "38356736",
        "source": "Front Med (Lausanne). 2024;10:1342466",
        "title": "Combining Charlson comorbidity and VACS indices improves prognostic accuracy for all-cause mortality for patients with and without HIV in the Veterans Health Administration"
      },
      "cci_group": "0",
      "congestive_heart_failure": false,
      "albumin_g_dl": 4.0,
      "peripheral_vascular_disease": false,
      "cerebrovascular_disease": false,
      "bmi_kg_m2": 25.0,
      "diabetes_without_complications": false,
      "wbc_10e9_l": 4.0,
      "rheumatic_disease": false,
      "formula": "vacs_cci",
      "diabetes_with_complications": false,
      "hepatitis_c": false,
      "cci_score": 0,
      "dementia": false,
      "hemoglobin_g_dl": 14.0,
      "kidney_severe": false
    },
    {
      "age_band": "50_64",
      "formula_expression": "lp = sex_female -0.513 + age_poly(X=age-50, 0.278/0.006/-0.001) + hb_poly(X=hemoglobin-14, -0.115/0.024/0.004) + fib4_poly(X, 0.205/-0.006) + egfr_poly(X=egfr-90, 0.071/0.036/0.002) + alb_poly(X=albumin-4, -0.405/0.326/0.156) + wbc_poly(X=WBC-4, -0.011/0.053/-0.008/0.000) + bmi_poly(X=BMI-25, -0.061/0.005/0.000) + hepatitis_c 0.273 + Table 2 Charlson condition coefficients + CCI-group x age-band interaction (CCI 0/1/2/3+ by <50, 50-64, 65-79, 80+; CCI 1 x 50-64 is reference 0); cci_group from caller-assigned condition weights (MI 1, CHF 1, PVD 1, CVD 1, dementia 1, pulmonary 1, rheumatic 1, PUD 1, DM without 1, DM with 2, hemiplegia 2, kidney mild-to-moderate 2, kidney severe 2, any malignancy 2, metastatic 6, liver mild 1, liver moderate-to-severe 3); McGinnis 2024 Table 2 Model 7; 1st/99th percentile winsorizing not published; 0-100 score uses unpublished development min/max Xbeta so magent does not scale; paper prints 0-100 score 30 → 1-year 1%, 2-year 3%, 5-year 8%, 10-year 18% and score 45 → 6%, 14%, 35%, 61%; no published S0; 2025 corrigendum PMID 39845833 does not change Table 2 coefficients; caller-assigned comorbidities, FIB-4, and eGFR",
      "linear_predictor": 1.228,
      "kidney_mild_to_moderate": false,
      "metastatic_solid_tumor": false,
      "any_malignancy": false,
      "egfr_ml_min_1_73m2": 90.0,
      "peptic_ulcer_disease": false,
      "fib4": 1.0,
      "age": 55,
      "myocardial_infarction": false,
      "chronic_pulmonary_disease": false,
      "hemiplegia_or_paraplegia": false,
      "sex": "male",
      "liver_mild": 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.",
      "liver_moderate_to_severe": false,
      "citation": {
        "authors": "McGinnis KA, Justice AC, Marconi VC, et al.",
        "doi": "10.3389/fmed.2023.1342466",
        "id": "mcginnis-2024-vacs-cci",
        "pmid": "38356736",
        "source": "Front Med (Lausanne). 2024;10:1342466",
        "title": "Combining Charlson comorbidity and VACS indices improves prognostic accuracy for all-cause mortality for patients with and without HIV in the Veterans Health Administration"
      },
      "cci_group": "0",
      "congestive_heart_failure": false,
      "albumin_g_dl": 4.0,
      "peripheral_vascular_disease": false,
      "cerebrovascular_disease": false,
      "bmi_kg_m2": 25.0,
      "diabetes_without_complications": false,
      "wbc_10e9_l": 4.0,
      "rheumatic_disease": false,
      "formula": "vacs_cci",
      "diabetes_with_complications": false,
      "hepatitis_c": false,
      "cci_score": 0,
      "dementia": false,
      "hemoglobin_g_dl": 14.0,
      "kidney_severe": false
    }
  ]
}
```

## Response fields

- `formula` (string): vacs_cci
- `formula_expression` (string): McGinnis 2024 Table 2 Model 7 linear predictor
- `linear_predictor` (number): Unrounded Table 2 Model 7 Cox linear predictor, 6 decimals
- `sex` (string): female or male
- `age` (integer): Input age in years
- `age_band` (string): Table 2 CCI interaction band: lt_50, 50_64, 65_79, or 80_plus
- `hemoglobin_g_dl` (number): Input hemoglobin g/dL
- `fib4` (number): Caller-assigned FIB-4
- `egfr_ml_min_1_73m2` (number): Caller-assigned eGFR mL/min/1.73m²
- `albumin_g_dl` (number): Input albumin g/dL
- `wbc_10e9_l` (number): Input WBC 10^9/L
- `bmi_kg_m2` (number): Input BMI kg/m²
- `hepatitis_c` (boolean): Caller-assigned hepatitis C flag
- `cci_score` (integer): Sum of Table 2 Charlson condition weights from caller-assigned flags
- `cci_group` (string): CCI grouping used in the age interaction: 0, 1, 2, or 3plus
- `citation` (object): McGinnis et al. Front Med 2024 citation
- `disclaimer` (string): Not-a-device notice
- `myocardial_infarction` (boolean): Caller-assigned myocardial infarction (McGinnis 2024 Table 2). true adds 0.008 to lp and 1 to the CCI grouping. magent does not diagnose infarction.
- `congestive_heart_failure` (boolean): Caller-assigned congestive heart failure (McGinnis 2024 Table 2). true adds 0.420 to lp and 1 to the CCI grouping. magent does not diagnose heart failure.
- `peripheral_vascular_disease` (boolean): Caller-assigned peripheral vascular disease (McGinnis 2024 Table 2). true adds 0.141 to lp and 1 to the CCI grouping. magent does not diagnose vascular disease.
- `cerebrovascular_disease` (boolean): Caller-assigned cerebrovascular disease (McGinnis 2024 Table 2). true adds 0.114 to lp and 1 to the CCI grouping. magent does not diagnose stroke.
- `dementia` (boolean): Caller-assigned dementia (McGinnis 2024 Table 2). true adds 0.489 to lp and 1 to the CCI grouping. magent does not diagnose dementia.
- `chronic_pulmonary_disease` (boolean): Caller-assigned chronic pulmonary disease (McGinnis 2024 Table 2). true adds 0.279 to lp and 1 to the CCI grouping. magent does not diagnose lung disease.
- `rheumatic_disease` (boolean): Caller-assigned rheumatic disease (McGinnis 2024 Table 2). true adds -0.034 to lp and 1 to the CCI grouping. magent does not diagnose rheumatic disease.
- `peptic_ulcer_disease` (boolean): Caller-assigned peptic ulcer disease (McGinnis 2024 Table 2). true adds -0.074 to lp and 1 to the CCI grouping. magent does not diagnose ulcer disease.
- `diabetes_without_complications` (boolean): Caller-assigned diabetes without chronic complications (McGinnis 2024 Table 2). true adds 0.053 to lp and 1 to the CCI grouping. magent does not diagnose diabetes.
- `diabetes_with_complications` (boolean): Caller-assigned diabetes with chronic complications (McGinnis 2024 Table 2). true adds 0.075 to lp and 2 to the CCI grouping. magent does not diagnose diabetes.
- `hemiplegia_or_paraplegia` (boolean): Caller-assigned hemiplegia or paraplegia (McGinnis 2024 Table 2). true adds -0.049 to lp and 2 to the CCI grouping. magent does not diagnose paralysis.
- `kidney_mild_to_moderate` (boolean): Caller-assigned mild-to-moderate kidney disease (McGinnis 2024 Table 2). true adds -0.199 to lp and 2 to the CCI grouping. magent does not grade kidney disease.
- `kidney_severe` (boolean): Caller-assigned severe kidney disease (McGinnis 2024 Table 2). true adds -0.098 to lp and 2 to the CCI grouping. magent does not grade kidney disease.
- `any_malignancy` (boolean): Caller-assigned any malignancy (McGinnis 2024 Table 2). true adds 0.090 to lp and 2 to the CCI grouping. magent does not diagnose cancer.
- `metastatic_solid_tumor` (boolean): Caller-assigned metastatic solid tumor (McGinnis 2024 Table 2). true adds 1.184 to lp and 6 to the CCI grouping. magent does not diagnose cancer.
- `liver_mild` (boolean): Caller-assigned mild liver disease (McGinnis 2024 Table 2). true adds -0.045 to lp and 1 to the CCI grouping. magent does not grade liver disease.
- `liver_moderate_to_severe` (boolean): Caller-assigned moderate-to-severe liver disease (McGinnis 2024 Table 2). true adds 0.226 to lp and 3 to the CCI grouping. magent does not grade liver disease.

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "age_band": "50_64",
  "formula_expression": "lp = sex_female -0.513 + age_poly(X=age-50, 0.278/0.006/-0.001) + hb_poly(X=hemoglobin-14, -0.115/0.024/0.004) + fib4_poly(X, 0.205/-0.006) + egfr_poly(X=egfr-90, 0.071/0.036/0.002) + alb_poly(X=albumin-4, -0.405/0.326/0.156) + wbc_poly(X=WBC-4, -0.011/0.053/-0.008/0.000) + bmi_poly(X=BMI-25, -0.061/0.005/0.000) + hepatitis_c 0.273 + Table 2 Charlson condition coefficients + CCI-group x age-band interaction (CCI 0/1/2/3+ by <50, 50-64, 65-79, 80+; CCI 1 x 50-64 is reference 0); cci_group from caller-assigned condition weights (MI 1, CHF 1, PVD 1, CVD 1, dementia 1, pulmonary 1, rheumatic 1, PUD 1, DM without 1, DM with 2, hemiplegia 2, kidney mild-to-moderate 2, kidney severe 2, any malignancy 2, metastatic 6, liver mild 1, liver moderate-to-severe 3); McGinnis 2024 Table 2 Model 7; 1st/99th percentile winsorizing not published; 0-100 score uses unpublished development min/max Xbeta so magent does not scale; paper prints 0-100 score 30 → 1-year 1%, 2-year 3%, 5-year 8%, 10-year 18% and score 45 → 6%, 14%, 35%, 61%; no published S0; 2025 corrigendum PMID 39845833 does not change Table 2 coefficients; caller-assigned comorbidities, FIB-4, and eGFR",
  "linear_predictor": 1.228,
  "kidney_mild_to_moderate": false,
  "metastatic_solid_tumor": false,
  "any_malignancy": false,
  "egfr_ml_min_1_73m2": 90.0,
  "peptic_ulcer_disease": false,
  "fib4": 1.0,
  "age": 55,
  "myocardial_infarction": false,
  "chronic_pulmonary_disease": false,
  "hemiplegia_or_paraplegia": false,
  "sex": "male",
  "liver_mild": 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.",
  "liver_moderate_to_severe": false,
  "citation": {
    "authors": "McGinnis KA, Justice AC, Marconi VC, et al.",
    "doi": "10.3389/fmed.2023.1342466",
    "id": "mcginnis-2024-vacs-cci",
    "pmid": "38356736",
    "source": "Front Med (Lausanne). 2024;10:1342466",
    "title": "Combining Charlson comorbidity and VACS indices improves prognostic accuracy for all-cause mortality for patients with and without HIV in the Veterans Health Administration"
  },
  "cci_group": "0",
  "congestive_heart_failure": false,
  "albumin_g_dl": 4.0,
  "peripheral_vascular_disease": false,
  "cerebrovascular_disease": false,
  "bmi_kg_m2": 25.0,
  "diabetes_without_complications": false,
  "wbc_10e9_l": 4.0,
  "rheumatic_disease": false,
  "formula": "vacs_cci",
  "diabetes_with_complications": false,
  "hepatitis_c": false,
  "cci_score": 0,
  "dementia": false,
  "hemoglobin_g_dl": 14.0,
  "kidney_severe": false
}
```

## Errors

- HTTP 400 `invalid_vacs_cci`: VACS-CCI inputs must match McGinnis 2024 age, sex, VACS Index 2.0 biomarkers, hepatitis C, and Charlson comorbidity groupings. 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

- [VACS 2.0](https://magentlab.com/docs/vacs-2) — Compute the Tate 2019 VACS Index 2.0 score for 5-year all-cause mortality from age, CD4, HIV-1 RNA, hemoglobin, caller-assigned FIB-4 and eGFR, hepatitis C, albumin, WBC, and BMI using Appendix Table 1 coefficients.
- [Charlson CCI](https://magentlab.com/docs/charlson) — Sum the nineteen Charlson 1987 original comorbidity weights and return the published 1-year mortality group.

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