# IPSS-R (myelodysplastic syndromes)

IPSS-R

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

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

## What it computes

Sum the Greenberg 2012 IPSS-R (revised international prognostic scoring system) for myelodysplastic syndromes and return very_low (≤1.5), low (>1.5–3), intermediate (>3–4.5), high (>4.5–6), or very_high (>6).

## When to use

When an agent needs the published IPSS-R point total and risk group and must not invent an MDS diagnosis, transplant listing, or survival estimate, and must not substitute IPSS 1997 or IPSS-M.

## When not to use

- Not a medical device and not an MDS diagnosis, treatment choice, or transplant listing. magent does not examine the patient.
- This is Greenberg 2012 IPSS-R only, not Greenberg 1997 IPSS and not the molecular IPSS-M.
- magent does not karyotype. cytogenetics is the caller-assigned Schanz/Greenberg 2012 subgroup (very_good, good, intermediate, poor, very_poor).
- Does not report median survival years or AML transformation times.

## Formula

```
IPSS-R = cytogenetics (very_good 0, good 1, intermediate 2, poor 3, very_poor 4) + BM blasts % (≤2 → 0; >2–<5 → 1; 5–10 → 2; >10 → 3) + hemoglobin g/dL (≥10 → 0; 8–<10 → 1; <8 → 1.5) + platelets 10^9/L (≥100 → 0; 50–<100 → 0.5; <50 → 1) + ANC 10^9/L (≥0.8 → 0; <0.8 → 0.5); Greenberg 2012; max 10; ≤1.5 very_low, >1.5–3 low, >3–4.5 intermediate, >4.5–6 high, >6 very_high
```

## Citation

[Revised international prognostic scoring system for myelodysplastic syndromes](https://doi.org/10.1182/blood-2012-03-420489)
Greenberg PL, Tuechler H, Schanz J, et al.
Blood. 2012;120(12):2454-2465
DOI: [10.1182/blood-2012-03-420489](https://doi.org/10.1182/blood-2012-03-420489)

## Worked example

### Good cytogenetics, favorable counts

Given: `anc_10e9_l=2.0, blasts_percent=1, cytogenetics=good, hemoglobin_g_dl=12, platelets_10e9_l=150`

1. cytogenetics good → 1; blasts 1% ≤2 → 0; hemoglobin 12 ≥10 → 0; platelets 150 ≥100 → 0; ANC 2.0 ≥0.8 → 0
2. Score = 1 (max 10); risk_group = very_low (≤1.5)


### Maximum published score

Given: `anc_10e9_l=0.5, blasts_percent=15, cytogenetics=very_poor, hemoglobin_g_dl=7, platelets_10e9_l=40`

1. cytogenetics very_poor → 4; blasts >10 → 3; hemoglobin <8 → 1.5; platelets <50 → 1; ANC <0.8 → 0.5
2. Score = 10 (max 10); risk_group = very_high (>6)


## Also searched as

- IPSS-R
- revised international prognostic scoring system
- IPSS-R MDS
- Greenberg IPSS-R
- myelodysplastic syndrome IPSS-R
- revised IPSS
- IPSSR
- Schanz cytogenetic IPSS-R

## Parameters

- `cytogenetics` (string, required): Schanz/Greenberg 2012 cytogenetic subgroup as assigned by the caller (very_good 0, good 1, intermediate 2, poor 3, very_poor 4). magent does not karyotype.
- `blasts_percent` (number, required): Bone-marrow blasts as a percent (0-30). Greenberg 2012: ≤2 → 0; >2 and <5 → 1; 5–10 → 2; >10 → 3. magent does not count blasts.
- `hemoglobin_g_dl` (number, required): Hemoglobin in g/dL (3-20). Greenberg 2012: ≥10 → 0; 8 to <10 → 1; <8 → 1.5. magent does not assay hemoglobin.
- `platelets_10e9_l` (number, required): Platelets in 10^9/L (0-2000). Greenberg 2012: ≥100 → 0; 50 to <100 → 0.5; <50 → 1. magent does not assay platelets.
- `anc_10e9_l` (number, required): Absolute neutrophil count in 10^9/L (0-50). Greenberg 2012: ≥0.8 → 0; <0.8 → 0.5. magent does not compute ANC.

## 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/ipss_r`
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": [
    {
      "anc_10e9_l": "2.0",
      "blasts_percent": "1",
      "cytogenetics": "good",
      "hemoglobin_g_dl": "12",
      "platelets_10e9_l": "150"
    },
    {
      "anc_10e9_l": "2.0",
      "blasts_percent": "1",
      "cytogenetics": "good",
      "hemoglobin_g_dl": "12",
      "platelets_10e9_l": "150"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/ipss_r",
  "items": [
    {
      "components": [
        {
          "value": "good",
          "factor": "cytogenetics",
          "points": 1,
          "present": true
        },
        {
          "value": 1.0,
          "factor": "blasts_percent",
          "points": 0,
          "present": false
        },
        {
          "value": 12.0,
          "factor": "hemoglobin_g_dl",
          "points": 0,
          "present": false
        },
        {
          "value": 150.0,
          "factor": "platelets_10e9_l",
          "points": 0,
          "present": false
        },
        {
          "value": 2.0,
          "factor": "anc_10e9_l",
          "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": "Greenberg PL, Tuechler H, Schanz J, et al.",
        "doi": "10.1182/blood-2012-03-420489",
        "id": "greenberg-2012",
        "pmid": "22740453",
        "source": "Blood. 2012;120(12):2454-2465",
        "title": "Revised international prognostic scoring system for myelodysplastic syndromes"
      },
      "formula": "ipss_r",
      "formula_expression": "IPSS-R = cytogenetics (very_good 0, good 1, intermediate 2, poor 3, very_poor 4) + BM blasts % (≤2 → 0; >2–<5 → 1; 5–10 → 2; >10 → 3) + hemoglobin g/dL (≥10 → 0; 8–<10 → 1; <8 → 1.5) + platelets 10^9/L (≥100 → 0; 50–<100 → 0.5; <50 → 1) + ANC 10^9/L (≥0.8 → 0; <0.8 → 0.5); Greenberg 2012; max 10; ≤1.5 very_low, >1.5–3 low, >3–4.5 intermediate, >4.5–6 high, >6 very_high",
      "max_score": 10,
      "score": 1,
      "platelets_10e9_l": 150.0,
      "risk_group": "very_low",
      "cytogenetics": "good",
      "hemoglobin_g_dl": 12.0,
      "anc_10e9_l": 2.0,
      "blasts_percent": 1.0
    },
    {
      "components": [
        {
          "value": "good",
          "factor": "cytogenetics",
          "points": 1,
          "present": true
        },
        {
          "value": 1.0,
          "factor": "blasts_percent",
          "points": 0,
          "present": false
        },
        {
          "value": 12.0,
          "factor": "hemoglobin_g_dl",
          "points": 0,
          "present": false
        },
        {
          "value": 150.0,
          "factor": "platelets_10e9_l",
          "points": 0,
          "present": false
        },
        {
          "value": 2.0,
          "factor": "anc_10e9_l",
          "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": "Greenberg PL, Tuechler H, Schanz J, et al.",
        "doi": "10.1182/blood-2012-03-420489",
        "id": "greenberg-2012",
        "pmid": "22740453",
        "source": "Blood. 2012;120(12):2454-2465",
        "title": "Revised international prognostic scoring system for myelodysplastic syndromes"
      },
      "formula": "ipss_r",
      "formula_expression": "IPSS-R = cytogenetics (very_good 0, good 1, intermediate 2, poor 3, very_poor 4) + BM blasts % (≤2 → 0; >2–<5 → 1; 5–10 → 2; >10 → 3) + hemoglobin g/dL (≥10 → 0; 8–<10 → 1; <8 → 1.5) + platelets 10^9/L (≥100 → 0; 50–<100 → 0.5; <50 → 1) + ANC 10^9/L (≥0.8 → 0; <0.8 → 0.5); Greenberg 2012; max 10; ≤1.5 very_low, >1.5–3 low, >3–4.5 intermediate, >4.5–6 high, >6 very_high",
      "max_score": 10,
      "score": 1,
      "platelets_10e9_l": 150.0,
      "risk_group": "very_low",
      "cytogenetics": "good",
      "hemoglobin_g_dl": 12.0,
      "anc_10e9_l": 2.0,
      "blasts_percent": 1.0
    }
  ]
}
```

## Response fields

- `formula` (string): ipss_r
- `formula_expression` (string): Exact expression used
- `score` (number): IPSS-R points 0-10 (half-points allowed)
- `max_score` (integer): Always 10 (4+3+1.5+1+0.5)
- `risk_group` (string): very_low when score is ≤1.5, low when >1.5–3, intermediate when >3–4.5, high when >4.5–6, very_high when >6 (Greenberg 2012). Not an MDS diagnosis. Not IPSS 1997. Not IPSS-M. Not a transplant listing.
- `cytogenetics` (string): Caller-assigned Schanz/Greenberg subgroup used
- `blasts_percent` (number): Bone-marrow blast percent used
- `hemoglobin_g_dl` (number): Hemoglobin in g/dL used
- `platelets_10e9_l` (number): Platelets in 10^9/L used
- `anc_10e9_l` (number): ANC in 10^9/L used
- `components` (array): Per-factor points
- `citation` (object): Greenberg et al. Blood 2012 IPSS-R citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": "good",
      "factor": "cytogenetics",
      "points": 1,
      "present": true
    },
    {
      "value": 1.0,
      "factor": "blasts_percent",
      "points": 0,
      "present": false
    },
    {
      "value": 12.0,
      "factor": "hemoglobin_g_dl",
      "points": 0,
      "present": false
    },
    {
      "value": 150.0,
      "factor": "platelets_10e9_l",
      "points": 0,
      "present": false
    },
    {
      "value": 2.0,
      "factor": "anc_10e9_l",
      "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": "Greenberg PL, Tuechler H, Schanz J, et al.",
    "doi": "10.1182/blood-2012-03-420489",
    "id": "greenberg-2012",
    "pmid": "22740453",
    "source": "Blood. 2012;120(12):2454-2465",
    "title": "Revised international prognostic scoring system for myelodysplastic syndromes"
  },
  "formula": "ipss_r",
  "formula_expression": "IPSS-R = cytogenetics (very_good 0, good 1, intermediate 2, poor 3, very_poor 4) + BM blasts % (≤2 → 0; >2–<5 → 1; 5–10 → 2; >10 → 3) + hemoglobin g/dL (≥10 → 0; 8–<10 → 1; <8 → 1.5) + platelets 10^9/L (≥100 → 0; 50–<100 → 0.5; <50 → 1) + ANC 10^9/L (≥0.8 → 0; <0.8 → 0.5); Greenberg 2012; max 10; ≤1.5 very_low, >1.5–3 low, >3–4.5 intermediate, >4.5–6 high, >6 very_high",
  "max_score": 10,
  "score": 1,
  "platelets_10e9_l": 150.0,
  "risk_group": "very_low",
  "cytogenetics": "good",
  "hemoglobin_g_dl": 12.0,
  "anc_10e9_l": 2.0,
  "blasts_percent": 1.0
}
```

## Errors

- HTTP 400 `invalid_ipss_cytogenetics`: cytogenetics must be very_good, good, intermediate, poor, or very_poor (Greenberg 2012). Returned before settlement; you are not charged.
- HTTP 400 `invalid_ipss_r`: blasts_percent 0-30, hemoglobin_g_dl 3-20, platelets_10e9_l 0-2000, and anc_10e9_l 0-50 (IPSS-R 2012 labs; magent clamps, not Greenberg cutoffs). 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).

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