# Duval 2010 AML score (Table 5)

Duval AML

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

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

## What it computes

Sum the Duval 2010 AML Table 5 points and return risk_group 0, 1, 2, or ge_3 (scores ≥3 share one group).

## When to use

When an agent needs the published Duval 2010 AML (not ALL) Table 5 point total from caller-assigned categories and must not invent a transplant listing, karyotype parse, or ALL score.

## When not to use

- Not a medical device and not a diagnosis. Not a transplant listing. magent does not examine the patient.
- This is Duval 2010 Table 5 for AML only. It does not implement the ALL table in the same paper.
- magent does not read a karyotype string or HLA type. The caller assigns disease_group, ECOG/SWOG cytogenetics (poor vs good/intermediate), and the Table 5 three-level hla_match.
- magent does not collect numeric Karnofsky or Lansky. kps_lt_90 is a caller-assigned flag.
- Table 5 groups scores ≥3 together. Published 3-year overall survival in the derivation cohort was 42% at score 0 and 6% at score ≥3. Those figures are not returned on the JSON 200.

## Formula

```
Duval AML Table 5 = disease_group (pif_or_cr1_gt_6mo 0, cr1_lt_6mo 1) + cytogenetics (good_or_intermediate 0, poor 1) + hla_match (sibling_or_matched_unrelated 0, mismatched_unrelated 1, related_other 2) + circulating_blasts 1 + kps_lt_90 1; Duval 2010 AML only (not ALL); max 6; risk_group 0 / 1 / 2 / ge_3
```

## Citation

[Hematopoietic Stem-Cell Transplantation for Acute Leukemia in Relapse or Primary Induction Failure](https://doi.org/10.1200/JCO.2010.28.8852)
Duval M, Klein JP, He W, et al
J Clin Oncol. 2010;28(23):3730-3738
DOI: [10.1200/JCO.2010.28.8852](https://doi.org/10.1200/JCO.2010.28.8852)

## Worked example

### All favorable AML Table 5 categories

Given: `circulating_blasts=false, cytogenetics=good_or_intermediate, disease_group=pif_or_cr1_gt_6mo, hla_match=sibling_or_matched_unrelated, kps_lt_90=false`

1. disease_group pif_or_cr1_gt_6mo → 0; cytogenetics good_or_intermediate → 0; hla_match sibling_or_matched_unrelated → 0; circulating_blasts false → 0; kps_lt_90 false → 0
2. Score = 0 (max 6); risk_group = 0


### Maximum published AML Table 5 score

Given: `circulating_blasts=true, cytogenetics=poor, disease_group=cr1_lt_6mo, hla_match=related_other, kps_lt_90=true`

1. cr1_lt_6mo → 1; poor cytogenetics → 1; related_other → 2; circulating_blasts → 1; kps_lt_90 → 1
2. Score = 6 (max 6); risk_group = ge_3


## Also searched as

- Duval AML score
- Duval 2010 AML
- CIBMTR AML score
- AML transplant score Duval
- Duval Table 5 AML
- AML PIF relapse HCT score
- Duval CIBMTR AML
- hematopoietic stem-cell AML score

## Parameters

- `disease_group` (string, required): Duval 2010 AML Table 5 disease status as assigned by the caller. pif_or_cr1_gt_6mo is primary induction failure or duration of first CR >6 months and scores 0. cr1_lt_6mo is duration of first CR <6 months and scores 1. magent does not date remissions.
- `cytogenetics` (string, required): ECOG/SWOG cytogenetic risk as assigned by the caller (Duval 2010). poor is −5/del(5q), −7/del(7q), inv(3q), abn11q, 20q or 21q, del(9q), t(6;9), t(9;22), abn17p, or complex (≥3 abnormalities) and scores 1. good_or_intermediate is everything else in that classification and scores 0. magent does not read a karyotype string.
- `hla_match` (string, required): Duval 2010 AML Table 5 donor HLA match as assigned by the caller (not a flattened 0/1 donor flag). sibling_or_matched_unrelated is HLA-identical sibling or well matched or partially matched unrelated and scores 0. mismatched_unrelated scores 1. related_other is related other than HLA-identical sibling and scores 2. magent does not HLA-type.
- `circulating_blasts` (boolean, required): Circulating blasts present as assigned by the caller (Duval 2010 AML Table 5). true scores 1. magent does not count blasts.
- `kps_lt_90` (boolean, required): Karnofsky or Lansky <90 as assigned by the caller (Duval 2010 AML Table 5). true scores 1. magent does not collect numeric KPS or Lansky.

## 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/duval_aml`
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": [
    {
      "circulating_blasts": "false",
      "cytogenetics": "good_or_intermediate",
      "disease_group": "pif_or_cr1_gt_6mo",
      "hla_match": "sibling_or_matched_unrelated",
      "kps_lt_90": "false"
    },
    {
      "circulating_blasts": "false",
      "cytogenetics": "good_or_intermediate",
      "disease_group": "pif_or_cr1_gt_6mo",
      "hla_match": "sibling_or_matched_unrelated",
      "kps_lt_90": "false"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/duval_aml",
  "items": [
    {
      "components": [
        {
          "value": "pif_or_cr1_gt_6mo",
          "factor": "disease_group",
          "points": 0,
          "present": false
        },
        {
          "value": "good_or_intermediate",
          "factor": "cytogenetics",
          "points": 0,
          "present": false
        },
        {
          "value": "sibling_or_matched_unrelated",
          "factor": "hla_match",
          "points": 0,
          "present": false
        },
        {
          "factor": "circulating_blasts",
          "points": 0,
          "present": false
        },
        {
          "factor": "kps_lt_90",
          "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": "Duval M, Klein JP, He W, et al",
        "doi": "10.1200/JCO.2010.28.8852",
        "id": "duval-2010",
        "pmid": "20625126",
        "source": "J Clin Oncol. 2010;28(23):3730-3738",
        "title": "Hematopoietic Stem-Cell Transplantation for Acute Leukemia in Relapse or Primary Induction Failure"
      },
      "formula": "duval_aml",
      "formula_expression": "Duval AML Table 5 = disease_group (pif_or_cr1_gt_6mo 0, cr1_lt_6mo 1) + cytogenetics (good_or_intermediate 0, poor 1) + hla_match (sibling_or_matched_unrelated 0, mismatched_unrelated 1, related_other 2) + circulating_blasts 1 + kps_lt_90 1; Duval 2010 AML only (not ALL); max 6; risk_group 0 / 1 / 2 / ge_3",
      "max_score": 6,
      "score": 0,
      "risk_group": "0",
      "circulating_blasts": false,
      "cytogenetics": "good_or_intermediate",
      "disease_group": "pif_or_cr1_gt_6mo",
      "hla_match": "sibling_or_matched_unrelated",
      "kps_lt_90": false
    },
    {
      "components": [
        {
          "value": "pif_or_cr1_gt_6mo",
          "factor": "disease_group",
          "points": 0,
          "present": false
        },
        {
          "value": "good_or_intermediate",
          "factor": "cytogenetics",
          "points": 0,
          "present": false
        },
        {
          "value": "sibling_or_matched_unrelated",
          "factor": "hla_match",
          "points": 0,
          "present": false
        },
        {
          "factor": "circulating_blasts",
          "points": 0,
          "present": false
        },
        {
          "factor": "kps_lt_90",
          "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": "Duval M, Klein JP, He W, et al",
        "doi": "10.1200/JCO.2010.28.8852",
        "id": "duval-2010",
        "pmid": "20625126",
        "source": "J Clin Oncol. 2010;28(23):3730-3738",
        "title": "Hematopoietic Stem-Cell Transplantation for Acute Leukemia in Relapse or Primary Induction Failure"
      },
      "formula": "duval_aml",
      "formula_expression": "Duval AML Table 5 = disease_group (pif_or_cr1_gt_6mo 0, cr1_lt_6mo 1) + cytogenetics (good_or_intermediate 0, poor 1) + hla_match (sibling_or_matched_unrelated 0, mismatched_unrelated 1, related_other 2) + circulating_blasts 1 + kps_lt_90 1; Duval 2010 AML only (not ALL); max 6; risk_group 0 / 1 / 2 / ge_3",
      "max_score": 6,
      "score": 0,
      "risk_group": "0",
      "circulating_blasts": false,
      "cytogenetics": "good_or_intermediate",
      "disease_group": "pif_or_cr1_gt_6mo",
      "hla_match": "sibling_or_matched_unrelated",
      "kps_lt_90": false
    }
  ]
}
```

## Response fields

- `formula` (string): duval_aml
- `formula_expression` (string): Exact expression used
- `score` (integer): Duval 2010 AML Table 5 points 0-6
- `max_score` (integer): 6 (1+1+2+1+1)
- `risk_group` (string): 0, 1, 2, or ge_3 when score is ≥3 (Duval 2010 Table 5 note). Not a transplant listing. Not a diagnosis. Not the ALL table.
- `disease_group` (string): Caller-assigned pif_or_cr1_gt_6mo or cr1_lt_6mo
- `cytogenetics` (string): Caller-assigned good_or_intermediate or poor
- `hla_match` (string): Caller-assigned sibling_or_matched_unrelated, mismatched_unrelated, or related_other
- `circulating_blasts` (boolean): Caller-assigned circulating-blasts flag used
- `kps_lt_90` (boolean): Caller-assigned Karnofsky or Lansky <90 flag used
- `components` (array): Per-factor points
- `citation` (object): Duval et al. J Clin Oncol 2010 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": "pif_or_cr1_gt_6mo",
      "factor": "disease_group",
      "points": 0,
      "present": false
    },
    {
      "value": "good_or_intermediate",
      "factor": "cytogenetics",
      "points": 0,
      "present": false
    },
    {
      "value": "sibling_or_matched_unrelated",
      "factor": "hla_match",
      "points": 0,
      "present": false
    },
    {
      "factor": "circulating_blasts",
      "points": 0,
      "present": false
    },
    {
      "factor": "kps_lt_90",
      "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": "Duval M, Klein JP, He W, et al",
    "doi": "10.1200/JCO.2010.28.8852",
    "id": "duval-2010",
    "pmid": "20625126",
    "source": "J Clin Oncol. 2010;28(23):3730-3738",
    "title": "Hematopoietic Stem-Cell Transplantation for Acute Leukemia in Relapse or Primary Induction Failure"
  },
  "formula": "duval_aml",
  "formula_expression": "Duval AML Table 5 = disease_group (pif_or_cr1_gt_6mo 0, cr1_lt_6mo 1) + cytogenetics (good_or_intermediate 0, poor 1) + hla_match (sibling_or_matched_unrelated 0, mismatched_unrelated 1, related_other 2) + circulating_blasts 1 + kps_lt_90 1; Duval 2010 AML only (not ALL); max 6; risk_group 0 / 1 / 2 / ge_3",
  "max_score": 6,
  "score": 0,
  "risk_group": "0",
  "circulating_blasts": false,
  "cytogenetics": "good_or_intermediate",
  "disease_group": "pif_or_cr1_gt_6mo",
  "hla_match": "sibling_or_matched_unrelated",
  "kps_lt_90": false
}
```

## Errors

- HTTP 400 `invalid_flag`: boolean clinical flags must be true or false Returned before settlement; you are not charged.
- HTTP 400 `invalid_duval`: each Duval 2010 AML item must be a published Table 5 category. Returned before settlement; you are not charged.
- HTTP 400 `invalid_hla_match`: hla_match must be sibling_or_matched_unrelated, mismatched_unrelated, or related_other (Duval 2010). 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

- [Karnofsky](https://magentlab.com/docs/karnofsky) — Return the Karnofsky 1949 Performance Status 10-100 from a caller-assigned integer, with a stable label.

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