# DLI process volume

DLI process volume

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

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

## What it computes

Compute Shi 2020 predicted donor whole-blood volume (L) to process to reach a recipient CD3+ DLI target from recipient weight, CD3 cells/kg, donor collection-day ALC, and caller-assigned collection efficiency, using that paper's conservative 60% CD3 fraction of ALC.

## When to use

When an agent needs the published Shi 2020 DLI process-volume algorithm and must not invent a CD3 fraction, hardcode collection efficiency, write an apheresis order, or run the CD34 HPC algorithm from the same paper.

## When not to use

- Not a medical device. magent does not run leukapheresis, write an apheresis order, choose a machine protocol, or set a collection goal.
- Uses only Shi 2020's conservative 60% CD3+ fraction of ALC. Does not accept a measured CD3 count. Not the paper's CD34 HPC or postselection algorithm.
- collection_efficiency is caller-assigned facility CE2 in (0, 1]. Shi 2020 used a conservative first-quartile 0.57; magent does not default to 0.57.
- Weight, CD3-dose, ALC, and CE clamps are fail-closed magent ranges (positive, clinically plausible). Shi 2020 does not print those input bands.
- num_infusions multiplies the per-kg target when the planned dose is the total across infusions. The paper's protocol collected one 2×10^8/kg DLI product.
- Not Rosenbaum CD34 yield, Kaplan plasma volume, or Nadler blood volume.

## Formula

```
process_volume_l = (recipient_weight_kg * cd3_target_per_kg * num_infusions) / (0.6 * donor_alc_per_ul * collection_efficiency * 1e6)
```

## Citation

[Validation of simple prediction algorithms to consistently achieve CD3+ and postselection CD34+ targets with leukapheresis](https://doi.org/10.1111/trf.15576)
Shi PA, Sachais BS, Nandi V, Brochstein JA, Weinberg RS, Zhang J, Yoon EJ
Transfusion. 2020;60(1):133-143
DOI: [10.1111/trf.15576](https://doi.org/10.1111/trf.15576)

## Worked example

### 70 kg, 1e7 CD3/kg, ALC 1800/µL, CE 0.50 (clamp illustration, not a paper patient)

Given: `cd3_target_per_kg=10000000, collection_efficiency=0.5, donor_alc_per_ul=1800, recipient_weight_kg=70`

1. Shi 2020 prints the algorithm and a 2e8/kg haploidentical cohort, not a numeric worked patient row. These inputs are clamps, not a paper patient.
2. total_cd3_required = 70 * 1e7 * 1 = 700000000
3. estimated_cd3_per_ul = 0.6 * 1800 = 1080 (Shi 2020 conservative CD3 fraction of ALC)
4. process_volume_l = 700000000 / (1080 * 0.50 * 1e6) = 700000000 / 540000000 = 1.296... → 1.3


### Same inputs with Shi 2020 first-quartile CE 0.57

Given: `cd3_target_per_kg=10000000, collection_efficiency=0.57, donor_alc_per_ul=1800, recipient_weight_kg=70`

1. Shi 2020 used a conservative first-quartile lymphocyte CE2 of 0.57. Caller still sends collection_efficiency; magent does not default it.
2. process_volume_l = 700000000 / (1080 * 0.57 * 1e6) = 700000000 / 615600000 = 1.136... → 1.14


## Also searched as

- DLI process volume
- donor lymphocyte infusion volume
- CD3 leukapheresis volume
- Shi DLI algorithm
- DLI blood volume to process
- tandem DLI collection volume
- CD3 target leukapheresis
- donor ALC DLI

## Parameters

- `recipient_weight_kg` (number, required): Recipient weight in kilograms (1-500, magent clamp). Shi 2020 doses CD3 per recipient kg. magent does not weigh the recipient.
- `cd3_target_per_kg` (number, required): Planned CD3+ cells per recipient kilogram (1e6-1e9, magent clamp). Shi 2020's haploidentical protocol used 2e8/kg; a first DLI is often 1e7/kg. Not a CD34 HPC dose.
- `donor_alc_per_ul` (number, required): Donor absolute lymphocyte count on the collection day, cells/µL (100-20000, magent clamp). Shi 2020 estimates CD3+ as 60% of this ALC rather than a measured CD3 count. magent does not assay ALC.
- `collection_efficiency` (number, required): Caller-assigned facility lymphocyte CE2 as a proportion in (0, 1]. Shi 2020 used a conservative first-quartile 0.57; magent does not default to 0.57 or invent a CE.
- `num_infusions` (integer, optional): Optional integer infusions (1-12, default 1) multiplying the per-kg CD3 target when the planned dose is the total across infusions. Shi 2020 collected one 2e8/kg DLI product.

## 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/dli_volume`
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": [
    {
      "cd3_target_per_kg": "10000000",
      "collection_efficiency": "0.5",
      "donor_alc_per_ul": "1800",
      "recipient_weight_kg": "70"
    },
    {
      "cd3_target_per_kg": "10000000",
      "collection_efficiency": "0.5",
      "donor_alc_per_ul": "1800",
      "recipient_weight_kg": "70"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/dli_volume",
  "items": [
    {
      "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": "Shi PA, Sachais BS, Nandi V, Brochstein JA, Weinberg RS, Zhang J, Yoon EJ",
        "doi": "10.1111/trf.15576",
        "id": "shi-2020-dli",
        "pmid": "31756000",
        "source": "Transfusion. 2020;60(1):133-143",
        "title": "Validation of simple prediction algorithms to consistently achieve CD3+ and postselection CD34+ targets with leukapheresis"
      },
      "formula": "shi_2020",
      "formula_expression": "process_volume_l = (recipient_weight_kg * cd3_target_per_kg * num_infusions) / (0.6 * donor_alc_per_ul * collection_efficiency * 1e6)",
      "cd3_fraction": 0.6,
      "cd3_target_per_kg": 1.0e7,
      "collection_efficiency": 0.5,
      "donor_alc_per_ul": 1.8e3,
      "estimated_cd3_per_ul": 1080.0,
      "num_infusions": 1,
      "process_volume_l": 1.3,
      "recipient_weight_kg": 70.0,
      "total_cd3_required": 7.0e8
    },
    {
      "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": "Shi PA, Sachais BS, Nandi V, Brochstein JA, Weinberg RS, Zhang J, Yoon EJ",
        "doi": "10.1111/trf.15576",
        "id": "shi-2020-dli",
        "pmid": "31756000",
        "source": "Transfusion. 2020;60(1):133-143",
        "title": "Validation of simple prediction algorithms to consistently achieve CD3+ and postselection CD34+ targets with leukapheresis"
      },
      "formula": "shi_2020",
      "formula_expression": "process_volume_l = (recipient_weight_kg * cd3_target_per_kg * num_infusions) / (0.6 * donor_alc_per_ul * collection_efficiency * 1e6)",
      "cd3_fraction": 0.6,
      "cd3_target_per_kg": 1.0e7,
      "collection_efficiency": 0.5,
      "donor_alc_per_ul": 1.8e3,
      "estimated_cd3_per_ul": 1080.0,
      "num_infusions": 1,
      "process_volume_l": 1.3,
      "recipient_weight_kg": 70.0,
      "total_cd3_required": 7.0e8
    }
  ]
}
```

## Response fields

- `formula` (string): shi_2020
- `formula_expression` (string): Exact Shi 2020 DLI process-volume expression with the µL-to-L conversion
- `recipient_weight_kg` (number): Recipient weight in kg used
- `cd3_target_per_kg` (number): CD3+ cells per recipient kg used
- `donor_alc_per_ul` (number): Donor collection-day ALC in cells/µL used
- `collection_efficiency` (number): Caller-assigned collection efficiency used
- `num_infusions` (integer): Infusions multiplying the per-kg target (default 1)
- `cd3_fraction` (number): Shi 2020 conservative CD3+ fraction of ALC (0.6)
- `estimated_cd3_per_ul` (number): Intermediate estimated CD3+ concentration, 0.6 × ALC, cells/µL
- `total_cd3_required` (number): Total CD3+ cells required (weight × dose/kg × infusions)
- `process_volume_l` (number): Donor whole-blood volume to process in litres, 2 decimals
- `citation` (object): Shi Transfusion 2020 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "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": "Shi PA, Sachais BS, Nandi V, Brochstein JA, Weinberg RS, Zhang J, Yoon EJ",
    "doi": "10.1111/trf.15576",
    "id": "shi-2020-dli",
    "pmid": "31756000",
    "source": "Transfusion. 2020;60(1):133-143",
    "title": "Validation of simple prediction algorithms to consistently achieve CD3+ and postselection CD34+ targets with leukapheresis"
  },
  "formula": "shi_2020",
  "formula_expression": "process_volume_l = (recipient_weight_kg * cd3_target_per_kg * num_infusions) / (0.6 * donor_alc_per_ul * collection_efficiency * 1e6)",
  "cd3_fraction": 0.6,
  "cd3_target_per_kg": 1.0e7,
  "collection_efficiency": 0.5,
  "donor_alc_per_ul": 1.8e3,
  "estimated_cd3_per_ul": 1080.0,
  "num_infusions": 1,
  "process_volume_l": 1.3,
  "recipient_weight_kg": 70.0,
  "total_cd3_required": 7.0e8
}
```

## Errors

- HTTP 400 `invalid_dli`: DLI volume needs recipient weight, CD3 target per kg, donor ALC, and caller collection efficiency as in Shi 2020. Returned before settlement; you are not charged.
- HTTP 400 `invalid_weight`: weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.
- HTTP 400 `invalid_cd3_dose`: cd3_target_per_kg must be a positive CD3+ cell dose per kilogram. Returned before settlement; you are not charged.
- HTTP 400 `invalid_donor_alc`: donor_alc_per_ul must be a positive absolute lymphocyte count. Returned before settlement; you are not charged.
- HTTP 400 `invalid_collection_efficiency`: collection_efficiency must be a proportion in (0, 1] as assigned by the caller (Shi 2020). 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

- [predicted CD34+ leukapheresis yield](https://magentlab.com/docs/pbsc-collection) — Compute Rosenbaum 2012 predicted daily CD34+ yield (×10^6 per kg) from pre-apheresis peripheral blood CD34+ cells/µL, processed blood volume, and recipient or patient weight, using that paper's adjusted collection efficiency of 30%.
- [Kaplan plasma volume](https://magentlab.com/docs/tpe) — Compute Kaplan 1990 estimated plasma volume for therapeutic plasma exchange from weight and hematocrit as a percent, returning one plasma volume in liters and milliliters.
- [Nadler blood volume](https://magentlab.com/docs/nadler) — Compute Nadler 1962 predicted blood volume in liters and milliliters from height, weight, and sex.

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