# Simplified MIPI (mantle cell lymphoma)

MIPI

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

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

## What it computes

Sum the Hoster 2008 simplified MIPI (mantle cell lymphoma international prognostic index) from age, ECOG, LDH/ULN, and WBC and return low (0–3), intermediate (4–5), or high (6–11).

## When to use

When an agent needs the published simplified MIPI point total and risk group and must not invent a lymphoma diagnosis, and must not substitute continuous MIPI or MIPI-c.

## When not to use

- Not a medical device and not a lymphoma diagnosis or treatment choice. magent does not examine the patient.
- This is the simplified MIPI (Hoster 2008), not the continuous MIPI (log10 WBC formula) and not MIPI-c (Ki-67).
- magent does not assign ECOG, assay LDH, or measure WBC. ldh_uln_ratio is the caller-assigned LDH/ULN ratio; WBC is caller-assigned.

## Formula

```
simplified MIPI = age (<50 0, 50–59 1, 60–69 2, ≥70 3) + ECOG (0–1 0, 2–4 2) + LDH/ULN (<0.67 0, 0.67–<1.0 1, 1.0–<1.5 2, ≥1.5 3) + WBC ×10^9/L (<6.7 0, 6.7–<10 1, 10–<15 2, ≥15 3); Hoster 2008; max 11; low 0-3, intermediate 4-5, high 6-11
```

## Citation

[A new prognostic index (MIPI) for patients with advanced-stage mantle cell lymphoma](https://doi.org/10.1182/blood-2007-06-095331)
Hoster E, Dreyling M, Klapper W, et al.
Blood. 2008;111(2):558-565
DOI: [10.1182/blood-2007-06-095331](https://doi.org/10.1182/blood-2007-06-095331)

## Worked example

### Age 40, ECOG 0, LDH/ULN 0.5, WBC 5 ×10^9/L

Given: `age=40, ecog=0, ldh_uln_ratio=0.5, wbc_k_ul=5`

1. Age 40 <50 → 0; ECOG 0 is 0–1 → 0; LDH/ULN 0.5 <0.67 → 0; WBC 5 <6.7 → 0
2. Score = 0 (max 11); risk_group = low


### Age 70, ECOG 4, LDH/ULN 1.5, WBC 15 ×10^9/L

Given: `age=70, ecog=4, ldh_uln_ratio=1.5, wbc_k_ul=15`

1. Age ≥70 → 3; ECOG 2–4 → 2; LDH/ULN ≥1.5 → 3; WBC ≥15 → 3
2. Score = 11 (max 11); risk_group = high (6–11)


## Also searched as

- MIPI
- simplified MIPI
- mantle cell lymphoma international prognostic index
- Hoster MIPI
- MCL MIPI
- MIPI score
- mantle cell prognostic index

## Parameters

- `age` (integer, required): Age in years (18-120). <50 scores 0; 50–59 scores 1; 60–69 scores 2; ≥70 scores 3 (Hoster 2008 simplified MIPI). 50 and 59 score 1; 60 and 69 score 2; 70 scores 3.
- `ecog` (integer, required): ECOG performance status 0-4 as assigned by the caller (Hoster 2008 simplified MIPI). 0–1 scores 0; 2–4 scores 2. magent does not assign ECOG.
- `ldh_uln_ratio` (number, required): Serum LDH divided by the laboratory ULN (0.1-20). <0.67 scores 0; 0.67–<1.0 scores 1; 1.0–<1.5 scores 2; ≥1.5 scores 3 (0.67 scores 1; 0.99 scores 1; 1.0 scores 2; 1.49 scores 2; 1.5 scores 3). magent does not assay LDH.
- `wbc_k_ul` (number, optional): WBC in 10^3/µL (same as 10^9/L). Provide wbc_k_ul or wbc_ul, not both. Range 0.01-500. Converted to ×10^9/L: <6.7 scores 0; 6.7–<10 scores 1; 10–<15 scores 2; ≥15 scores 3 (6.7 scores 1; 9.999 scores 1; 10 scores 2; 14.999 scores 2; 15 scores 3).
- `wbc_ul` (number, optional): WBC in cells/µL (same as cells/mm^3). Provide wbc_k_ul or wbc_ul, not both. Range 10-500000. Converted to ×10^9/L (= wbc_ul/1000): <6.7 scores 0; 6.7–<10 scores 1; 10–<15 scores 2; ≥15 scores 3 (6.7 scores 1; 9.999 scores 1; 10 scores 2; 14.999 scores 2; 15 scores 3).

## 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/mipi`
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",
      "ecog": "0",
      "ldh_uln_ratio": "0.5",
      "wbc_k_ul": "5"
    },
    {
      "age": "40",
      "ecog": "0",
      "ldh_uln_ratio": "0.5",
      "wbc_k_ul": "5"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/mipi",
  "items": [
    {
      "components": [
        {
          "value": 40,
          "factor": "age",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "ecog",
          "points": 0,
          "present": false
        },
        {
          "value": 0.5,
          "factor": "ldh_uln_ratio",
          "points": 0,
          "present": false
        },
        {
          "value": 5.0e3,
          "factor": "wbc",
          "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": "Hoster E, Dreyling M, Klapper W, et al.",
        "doi": "10.1182/blood-2007-06-095331",
        "id": "hoster-2008",
        "pmid": "17934064",
        "source": "Blood. 2008;111(2):558-565",
        "title": "A new prognostic index (MIPI) for patients with advanced-stage mantle cell lymphoma"
      },
      "formula": "mipi",
      "formula_expression": "simplified MIPI = age (<50 0, 50–59 1, 60–69 2, ≥70 3) + ECOG (0–1 0, 2–4 2) + LDH/ULN (<0.67 0, 0.67–<1.0 1, 1.0–<1.5 2, ≥1.5 3) + WBC ×10^9/L (<6.7 0, 6.7–<10 1, 10–<15 2, ≥15 3); Hoster 2008; max 11; low 0-3, intermediate 4-5, high 6-11",
      "age_years": 40,
      "max_score": 11,
      "score": 0,
      "wbc_10e9_l": 5.0,
      "wbc_ul": 5.0e3,
      "risk_group": "low",
      "ecog": 0,
      "ldh_uln_ratio": 0.5
    },
    {
      "components": [
        {
          "value": 40,
          "factor": "age",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "ecog",
          "points": 0,
          "present": false
        },
        {
          "value": 0.5,
          "factor": "ldh_uln_ratio",
          "points": 0,
          "present": false
        },
        {
          "value": 5.0e3,
          "factor": "wbc",
          "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": "Hoster E, Dreyling M, Klapper W, et al.",
        "doi": "10.1182/blood-2007-06-095331",
        "id": "hoster-2008",
        "pmid": "17934064",
        "source": "Blood. 2008;111(2):558-565",
        "title": "A new prognostic index (MIPI) for patients with advanced-stage mantle cell lymphoma"
      },
      "formula": "mipi",
      "formula_expression": "simplified MIPI = age (<50 0, 50–59 1, 60–69 2, ≥70 3) + ECOG (0–1 0, 2–4 2) + LDH/ULN (<0.67 0, 0.67–<1.0 1, 1.0–<1.5 2, ≥1.5 3) + WBC ×10^9/L (<6.7 0, 6.7–<10 1, 10–<15 2, ≥15 3); Hoster 2008; max 11; low 0-3, intermediate 4-5, high 6-11",
      "age_years": 40,
      "max_score": 11,
      "score": 0,
      "wbc_10e9_l": 5.0,
      "wbc_ul": 5.0e3,
      "risk_group": "low",
      "ecog": 0,
      "ldh_uln_ratio": 0.5
    }
  ]
}
```

## Response fields

- `formula` (string): mipi
- `formula_expression` (string): Exact expression used
- `score` (integer): Simplified MIPI points 0-11
- `max_score` (integer): Always 11
- `risk_group` (string): low when score is 0-3, intermediate when 4-5, high when 6-11 (Hoster 2008 simplified MIPI). Not a lymphoma diagnosis. Not continuous MIPI. Not MIPI-c.
- `age_years` (integer): Age used for the simplified MIPI age bands
- `ecog` (integer): Caller-assigned ECOG 0-4 used for 0–1 vs 2–4
- `ldh_uln_ratio` (number): Caller-assigned LDH/ULN ratio used for scoring
- `wbc_ul` (number): Normalized WBC in cells/µL used for scoring
- `wbc_10e9_l` (number): WBC converted to ×10^9/L (wbc_ul / 1000) for Hoster 2008 simplified MIPI bands
- `components` (array): Per-factor points
- `citation` (object): Hoster 2008 Blood 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": 0,
      "factor": "ecog",
      "points": 0,
      "present": false
    },
    {
      "value": 0.5,
      "factor": "ldh_uln_ratio",
      "points": 0,
      "present": false
    },
    {
      "value": 5.0e3,
      "factor": "wbc",
      "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": "Hoster E, Dreyling M, Klapper W, et al.",
    "doi": "10.1182/blood-2007-06-095331",
    "id": "hoster-2008",
    "pmid": "17934064",
    "source": "Blood. 2008;111(2):558-565",
    "title": "A new prognostic index (MIPI) for patients with advanced-stage mantle cell lymphoma"
  },
  "formula": "mipi",
  "formula_expression": "simplified MIPI = age (<50 0, 50–59 1, 60–69 2, ≥70 3) + ECOG (0–1 0, 2–4 2) + LDH/ULN (<0.67 0, 0.67–<1.0 1, 1.0–<1.5 2, ≥1.5 3) + WBC ×10^9/L (<6.7 0, 6.7–<10 1, 10–<15 2, ≥15 3); Hoster 2008; max 11; low 0-3, intermediate 4-5, high 6-11",
  "age_years": 40,
  "max_score": 11,
  "score": 0,
  "wbc_10e9_l": 5.0,
  "wbc_ul": 5.0e3,
  "risk_group": "low",
  "ecog": 0,
  "ldh_uln_ratio": 0.5
}
```

## Errors

- HTTP 400 `invalid_age`: age must be an integer from 18 to 120 Returned before settlement; you are not charged.
- HTTP 400 `invalid_ecog`: ecog must be an integer from 0 to 4 (Shipp 1993 IPI). Returned before settlement; you are not charged.
- HTTP 400 `invalid_ldh_ratio`: ldh_uln_ratio must be a number from 0.1 to 20 (Hoster 2008 simplified MIPI). 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_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

- [IPI](https://magentlab.com/docs/ipi) — Sum the Shipp 1993 five-factor International Prognostic Index (all ages) and return low (0–1), low_intermediate (2), high_intermediate (3), or high (4–5).
- [FLIPI](https://magentlab.com/docs/flipi) — Sum the Solal-Céligny 2004 FLIPI adverse factors for follicular lymphoma and return low (0–1), intermediate (2), or high (≥3).

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