# CP-AKI simple risk score (Gupta)

CP-AKI simple score

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

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

## What it computes

Sum the Gupta 2024 Figure 2 simple integer/half-integer points for severe CP-AKI after a first intravenous cisplatin dose and return low, moderate, high, or very_high.

## When to use

When an agent already has caller-assigned age, hypertension, diabetes, smoking, hemoglobin, WBC, albumin, magnesium, and first cisplatin dose in mg and needs the published Figure 2 point total. magent does not assay labs or dose cisplatin.

## When not to use

- Not a medical device and not a diagnosis of AKI, CKD, or cisplatin toxicity. Not a chemotherapy order, dose reduction, or hydration protocol.
- This is the Gupta 2024 Figure 2 simple integer/half-integer score only (range 0–22.5). It is not the restricted-cubic-spline logistic primary model.
- Serum creatinine is omitted from the simple score for parsimony (Gupta 2024). Platelets are in the primary model and are not Figure 2 points. Current or former smoking is a simple-score covariate (BMJ 2024;385:q1207).
- magent does not assay hemoglobin, WBC, albumin, or magnesium and does not dose cisplatin. Values are caller-assigned. Use paper units (hemoglobin g/L, albumin g/L, magnesium mmol/L) or the documented dual-unit aliases.
- Figure 3 groups are low 0–5.5, moderate 6–9.5, high 10–15.5, very_high ≥16. Published CP-AKI incidence was 1.3% (low) to 23.5% (very high) in derivation and 1.1% to 16.7% in validation. Those cohort rates are not a patient-specific probability.

## Formula

```
CP-AKI simple = age (≤45 0; 46-60 2.5; 61-70 3.5; >70 4.5) + hypertension 1 + diabetes 1 + current_or_former_smoker 1 + hemoglobin_g_l (≥120 0; 110-119 1; <110 1.5) + wbc_10e9_l (≤12.0 0; >12.0 1.5) + albumin_g_l (>38 0; 33-38 1; <33 1.5) + magnesium_mmol_l (≥0.82 0; <0.82 1) + cisplatin_dose_mg (≤50 0; 51-75 2; 76-100 2.5; 101-125 3; 126-150 5; 151-200 7.5; >200 9.5); Gupta 2024 Figure 2 odds-ratio points; max 22.5; no creatinine; no platelets; low 0-5.5 / moderate 6-9.5 / high 10-15.5 / very_high ≥16
```

## Citation

[Derivation and external validation of a simple risk score for predicting severe acute kidney injury after intravenous cisplatin: cohort study](https://doi.org/10.1136/bmj-2023-077169)
Gupta S, et al.
BMJ. 2024;384:e077169
DOI: [10.1136/bmj-2023-077169](https://doi.org/10.1136/bmj-2023-077169)

## Worked example

### Lowest Figure 2 combination

Given: `age=40, albumin_g_l=42, cisplatin_dose_mg=50, current_or_former_smoker=false, diabetes=false, hemoglobin_g_l=130, hypertension=false, magnesium_mmol_l=0.90, wbc_k_ul=8`

1. age 40 ≤45 → 0; no hypertension, diabetes, or smoking → 0; hemoglobin 130 ≥120 → 0; WBC 8.0 ≤12.0 → 0; albumin 42 >38 → 0; magnesium 0.90 ≥0.82 → 0; cisplatin 50 ≤50 → 0
2. Score = 0 (max 22.5); risk_group = low (0–5.5)


### Highest published Figure 2 combination

Given: `age=75, albumin_g_l=30, cisplatin_dose_mg=250, current_or_former_smoker=true, diabetes=true, hemoglobin_g_l=100, hypertension=true, magnesium_mmol_l=0.70, wbc_k_ul=15`

1. age >70 → 4.5; hypertension 1; diabetes 1; smoker 1; hemoglobin <110 → 1.5; WBC >12.0 → 1.5; albumin <33 → 1.5; magnesium <0.82 → 1; cisplatin >200 → 9.5
2. Score = 22.5 (max 22.5); risk_group = very_high (≥16)


## Also searched as

- CP-AKI
- cisplatin AKI score
- Gupta cisplatin kidney injury
- severe CP-AKI risk score
- cisplatin-associated acute kidney injury
- Figure 2 cisplatin AKI
- first-dose cisplatin AKI
- Gupta 2024 BMJ CP-AKI

## Parameters

- `age` (integer, required): Age in years (integer 18-120). Gupta 2024 Figure 2: ≤45 scores 0; 46-60 scores 2.5; 61-70 scores 3.5; >70 scores 4.5.
- `hypertension` (boolean, required): Caller-assigned hypertension (Gupta 2024 Figure 2). true scores 1. magent does not diagnose hypertension.
- `diabetes` (boolean, required): Caller-assigned diabetes mellitus (Gupta 2024 Figure 2). true scores 1. magent does not diagnose diabetes.
- `current_or_former_smoker` (boolean, required): Caller-assigned current or former smoker (Gupta 2024 Figure 2 simple score; BMJ 2024;385:q1207). true scores 1. magent does not take a smoking history.
- `hemoglobin_g_l` (number, optional): Hemoglobin in g/L (30-220), Gupta 2024 units. Provide this or hemoglobin_g_dl, not both. ≥120 scores 0; 110-119 scores 1; <110 scores 1.5. magent does not assay hemoglobin.
- `hemoglobin_g_dl` (number, optional): Hemoglobin in g/dL (3-22). Converted as hemoglobin_g_l = hemoglobin_g_dl × 10. Provide this or hemoglobin_g_l, not both.
- `wbc_k_ul` (number, optional): White blood cell count in 10^9/L (0.01-500), same as k/µL. Provide this or wbc_ul, not both. ≤12.0 scores 0; >12.0 scores 1.5 (Gupta 2024 Figure 2). magent does not assay WBC.
- `wbc_ul` (number, optional): White blood cell count per µL (10-500000). Converted as wbc_10e9_l = wbc_ul / 1000. Provide this or wbc_k_ul, not both.
- `albumin_g_l` (number, optional): Serum albumin in g/L (10-60), Gupta 2024 units. Provide this or albumin_g_dl, not both. >38 scores 0; 33-38 scores 1; <33 scores 1.5. magent does not assay albumin.
- `albumin_g_dl` (number, optional): Serum albumin in g/dL (1-6). Converted as albumin_g_l = albumin_g_dl × 10. Provide this or albumin_g_l, not both.
- `magnesium_mmol_l` (number, required): Serum magnesium in mmol/L (0.2-2.5), Gupta 2024 units. ≥0.82 scores 0; <0.82 scores 1. magent does not assay magnesium.
- `cisplatin_dose_mg` (number, required): First intravenous cisplatin dose in mg (1-500), Gupta 2024 Figure 2. ≤50 scores 0; 51-75 scores 2; 76-100 scores 2.5; 101-125 scores 3; 126-150 scores 5; 151-200 scores 7.5; >200 scores 9.5. magent does not dose cisplatin.

## 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/cp_aki`
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",
      "albumin_g_l": "42",
      "cisplatin_dose_mg": "50",
      "current_or_former_smoker": "false",
      "diabetes": "false",
      "hemoglobin_g_l": "130",
      "hypertension": "false",
      "magnesium_mmol_l": "0.90",
      "wbc_k_ul": "8"
    },
    {
      "age": "40",
      "albumin_g_l": "42",
      "cisplatin_dose_mg": "50",
      "current_or_former_smoker": "false",
      "diabetes": "false",
      "hemoglobin_g_l": "130",
      "hypertension": "false",
      "magnesium_mmol_l": "0.90",
      "wbc_k_ul": "8"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/cp_aki",
  "items": [
    {
      "components": [
        {
          "value": 40,
          "factor": "age",
          "points": 0,
          "present": false
        },
        {
          "factor": "hypertension",
          "points": 0,
          "present": false
        },
        {
          "factor": "diabetes",
          "points": 0,
          "present": false
        },
        {
          "factor": "current_or_former_smoker",
          "points": 0,
          "present": false
        },
        {
          "value": 130.0,
          "factor": "hemoglobin",
          "points": 0,
          "present": false
        },
        {
          "value": 8.0,
          "factor": "wbc",
          "points": 0,
          "present": false
        },
        {
          "value": 42.0,
          "factor": "albumin",
          "points": 0,
          "present": false
        },
        {
          "value": 0.9,
          "factor": "magnesium",
          "points": 0,
          "present": false
        },
        {
          "value": 50.0,
          "factor": "cisplatin_dose",
          "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": "Gupta S, et al.",
        "doi": "10.1136/bmj-2023-077169",
        "id": "gupta-2024",
        "pmid": "38538012",
        "source": "BMJ. 2024;384:e077169",
        "title": "Derivation and external validation of a simple risk score for predicting severe acute kidney injury after intravenous cisplatin: cohort study"
      },
      "formula": "cp_aki",
      "formula_expression": "CP-AKI simple = age (≤45 0; 46-60 2.5; 61-70 3.5; >70 4.5) + hypertension 1 + diabetes 1 + current_or_former_smoker 1 + hemoglobin_g_l (≥120 0; 110-119 1; <110 1.5) + wbc_10e9_l (≤12.0 0; >12.0 1.5) + albumin_g_l (>38 0; 33-38 1; <33 1.5) + magnesium_mmol_l (≥0.82 0; <0.82 1) + cisplatin_dose_mg (≤50 0; 51-75 2; 76-100 2.5; 101-125 3; 126-150 5; 151-200 7.5; >200 9.5); Gupta 2024 Figure 2 odds-ratio points; max 22.5; no creatinine; no platelets; low 0-5.5 / moderate 6-9.5 / high 10-15.5 / very_high ≥16",
      "max_score": 22.5,
      "score": 0,
      "wbc_10e9_l": 8.0,
      "albumin_g_l": 42.0,
      "risk_group": "low",
      "cisplatin_dose_mg": 50.0,
      "hemoglobin_g_l": 130.0,
      "magnesium_mmol_l": 0.9
    },
    {
      "components": [
        {
          "value": 40,
          "factor": "age",
          "points": 0,
          "present": false
        },
        {
          "factor": "hypertension",
          "points": 0,
          "present": false
        },
        {
          "factor": "diabetes",
          "points": 0,
          "present": false
        },
        {
          "factor": "current_or_former_smoker",
          "points": 0,
          "present": false
        },
        {
          "value": 130.0,
          "factor": "hemoglobin",
          "points": 0,
          "present": false
        },
        {
          "value": 8.0,
          "factor": "wbc",
          "points": 0,
          "present": false
        },
        {
          "value": 42.0,
          "factor": "albumin",
          "points": 0,
          "present": false
        },
        {
          "value": 0.9,
          "factor": "magnesium",
          "points": 0,
          "present": false
        },
        {
          "value": 50.0,
          "factor": "cisplatin_dose",
          "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": "Gupta S, et al.",
        "doi": "10.1136/bmj-2023-077169",
        "id": "gupta-2024",
        "pmid": "38538012",
        "source": "BMJ. 2024;384:e077169",
        "title": "Derivation and external validation of a simple risk score for predicting severe acute kidney injury after intravenous cisplatin: cohort study"
      },
      "formula": "cp_aki",
      "formula_expression": "CP-AKI simple = age (≤45 0; 46-60 2.5; 61-70 3.5; >70 4.5) + hypertension 1 + diabetes 1 + current_or_former_smoker 1 + hemoglobin_g_l (≥120 0; 110-119 1; <110 1.5) + wbc_10e9_l (≤12.0 0; >12.0 1.5) + albumin_g_l (>38 0; 33-38 1; <33 1.5) + magnesium_mmol_l (≥0.82 0; <0.82 1) + cisplatin_dose_mg (≤50 0; 51-75 2; 76-100 2.5; 101-125 3; 126-150 5; 151-200 7.5; >200 9.5); Gupta 2024 Figure 2 odds-ratio points; max 22.5; no creatinine; no platelets; low 0-5.5 / moderate 6-9.5 / high 10-15.5 / very_high ≥16",
      "max_score": 22.5,
      "score": 0,
      "wbc_10e9_l": 8.0,
      "albumin_g_l": 42.0,
      "risk_group": "low",
      "cisplatin_dose_mg": 50.0,
      "hemoglobin_g_l": 130.0,
      "magnesium_mmol_l": 0.9
    }
  ]
}
```

## Response fields

- `formula` (string): cp_aki
- `formula_expression` (string): Exact expression used
- `score` (number): Gupta 2024 Figure 2 points 0-22.5 (half-integers allowed)
- `max_score` (number): 22.5
- `risk_group` (string): Figure 3 groups: low (0-5.5), moderate (6-9.5), high (10-15.5), very_high (≥16). A group, not a diagnosis or chemo order.
- `age` (integer): Age in years used for Figure 2 age bands
- `hemoglobin_g_l` (number): Hemoglobin in g/L used for Figure 2 bands (g/dL inputs converted ×10)
- `wbc_10e9_l` (number): WBC in 10^9/L used for the ≤12.0 / >12.0 Figure 2 cut-off
- `albumin_g_l` (number): Albumin in g/L used for Figure 2 bands (g/dL inputs converted ×10)
- `magnesium_mmol_l` (number): Magnesium in mmol/L used for the ≥0.82 / <0.82 Figure 2 cut-off
- `cisplatin_dose_mg` (number): First intravenous cisplatin dose in mg used for Figure 2 dose bands
- `components` (array): Per-factor Figure 2 points
- `citation` (object): Gupta et al. BMJ 2024 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
    },
    {
      "factor": "hypertension",
      "points": 0,
      "present": false
    },
    {
      "factor": "diabetes",
      "points": 0,
      "present": false
    },
    {
      "factor": "current_or_former_smoker",
      "points": 0,
      "present": false
    },
    {
      "value": 130.0,
      "factor": "hemoglobin",
      "points": 0,
      "present": false
    },
    {
      "value": 8.0,
      "factor": "wbc",
      "points": 0,
      "present": false
    },
    {
      "value": 42.0,
      "factor": "albumin",
      "points": 0,
      "present": false
    },
    {
      "value": 0.9,
      "factor": "magnesium",
      "points": 0,
      "present": false
    },
    {
      "value": 50.0,
      "factor": "cisplatin_dose",
      "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": "Gupta S, et al.",
    "doi": "10.1136/bmj-2023-077169",
    "id": "gupta-2024",
    "pmid": "38538012",
    "source": "BMJ. 2024;384:e077169",
    "title": "Derivation and external validation of a simple risk score for predicting severe acute kidney injury after intravenous cisplatin: cohort study"
  },
  "formula": "cp_aki",
  "formula_expression": "CP-AKI simple = age (≤45 0; 46-60 2.5; 61-70 3.5; >70 4.5) + hypertension 1 + diabetes 1 + current_or_former_smoker 1 + hemoglobin_g_l (≥120 0; 110-119 1; <110 1.5) + wbc_10e9_l (≤12.0 0; >12.0 1.5) + albumin_g_l (>38 0; 33-38 1; <33 1.5) + magnesium_mmol_l (≥0.82 0; <0.82 1) + cisplatin_dose_mg (≤50 0; 51-75 2; 76-100 2.5; 101-125 3; 126-150 5; 151-200 7.5; >200 9.5); Gupta 2024 Figure 2 odds-ratio points; max 22.5; no creatinine; no platelets; low 0-5.5 / moderate 6-9.5 / high 10-15.5 / very_high ≥16",
  "max_score": 22.5,
  "score": 0,
  "wbc_10e9_l": 8.0,
  "albumin_g_l": 42.0,
  "risk_group": "low",
  "cisplatin_dose_mg": 50.0,
  "hemoglobin_g_l": 130.0,
  "magnesium_mmol_l": 0.9
}
```

## Errors

- HTTP 400 `invalid_age`: age must be an integer from 18 to 120 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_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_wbc`: wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.
- HTTP 400 `invalid_albumin`: albumin_g_dl (1-6) or albumin_g_l (10-60) is required Returned before settlement; you are not charged.
- HTTP 400 `invalid_magnesium_mmol`: magnesium_mmol_l must be a number from 0.2 to 2.5 (Gupta 2024 CP-AKI serum magnesium mmol/L). Returned before settlement; you are not charged.
- HTTP 400 `invalid_cisplatin_dose_mg`: cisplatin_dose_mg must be a number from 1 to 500 (Gupta 2024 CP-AKI first intravenous cisplatin dose mg). 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

- [AKIN](https://magentlab.com/docs/akin) — Apply Mehta 2007 Table 2 AKIN staging and return stage 0-3 as the worse of the creatinine and urine-output limbs, with initiated renal replacement therapy mapping to stage 3.
- [Mehran CIN risk score](https://magentlab.com/docs/mehran) — Sum the Mehran 2004 eGFR model B integer score for contrast-induced nephropathy after PCI and return low (≤5), moderate (6–10), high (11–15), or very_high (≥16) with the development-set CIN 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.

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