# Intrauterine RBC transfusion volume

Intrauterine RBC transfusion volume

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

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

## What it computes

Compute Mandelbrot 1988 intrauterine RBC transfusion volume from caller-assigned estimated fetal weight and initial, target, and donor hematocrits. Hematocrit arm only.

## When to use

When an agent already has estimated fetal weight and hematocrits and needs the published Mandelbrot 1988 hematocrit-arm volume, not a platelet intrauterine transfusion, a biometry-derived weight, or a transfusion order.

## When not to use

- Not a medical device. Not a transfusion order.
- Hematocrit arm only. Mandelbrot 1988 also allowed a platelet-count variant; magent does not implement platelets.
- magent does not estimate fetal weight from biometry. estimated_fetal_weight_g is caller-assigned.

## Formula

```
fetoplacental_volume_ml = 1.046 + estimated_fetal_weight_g * 0.14; volume_ml = fetoplacental_volume_ml * (hct_final_percent - hct_initial_percent) / hct_donor_percent
```

## Citation

[Assessment of fetal blood volume for computer-assisted management of in utero transfusion](https://doi.org/10.1159/000263335)
Mandelbrot L, Daffos F, Forestier F, MacAleese J, Descombey D
Fetal Ther. 1988;3(1-2):60-66
DOI: [10.1159/000263335](https://doi.org/10.1159/000263335)

## Worked example

### EFW 1000 g, hematocrit 20 to 40, donor 80

Given: `estimated_fetal_weight_g=1000, hct_donor_percent=80, hct_final_percent=40, hct_initial_percent=20`

1. fetoplacental_volume_ml = 1.046 + 1000 * 0.14 = 141.046 → 141.0
2. volume_ml = 141.046 * (40 - 20) / 80 = 35.2615 → 35.3


### EFW 2500 g, hematocrit 20 to 40, donor 80

Given: `estimated_fetal_weight_g=2500, hct_donor_percent=80, hct_final_percent=40, hct_initial_percent=20`

1. fetoplacental_volume_ml = 1.046 + 2500 * 0.14 = 351.046 → 351.0
2. volume_ml = 351.046 * (40 - 20) / 80 = 87.7615 → 87.8


## Also searched as

- intrauterine RBC transfusion
- intrauterine transfusion volume
- Mandelbrot fetal transfusion
- IUT hematocrit
- fetoplacental volume
- in utero transfusion volume
- fetal RBC transfusion volume

## Parameters

- `estimated_fetal_weight_g` (number, required): Caller-assigned estimated fetal weight in grams (200-4000). Required. magent does not estimate fetal weight from biometry.
- `hct_initial_percent` (number, required): Initial fetal hematocrit as a percent (5-50). Must be strictly less than hct_final_percent.
- `hct_final_percent` (number, required): Target fetal hematocrit as a percent (20-60). Must be strictly greater than hct_initial_percent and strictly less than hct_donor_percent.
- `hct_donor_percent` (number, required): Donor unit hematocrit as a percent (60-90). Must be strictly greater than hct_final_percent.

## 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/intrauterine_rbc`
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": [
    {
      "estimated_fetal_weight_g": "1000",
      "hct_donor_percent": "80",
      "hct_final_percent": "40",
      "hct_initial_percent": "20"
    },
    {
      "estimated_fetal_weight_g": "1000",
      "hct_donor_percent": "80",
      "hct_final_percent": "40",
      "hct_initial_percent": "20"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/intrauterine_rbc",
  "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": "Mandelbrot L, Daffos F, Forestier F, MacAleese J, Descombey D",
        "doi": "10.1159/000263335",
        "id": "mandelbrot-1988",
        "pmid": "3257068",
        "source": "Fetal Ther. 1988;3(1-2):60-66",
        "title": "Assessment of fetal blood volume for computer-assisted management of in utero transfusion"
      },
      "formula": "mandelbrot_hct",
      "formula_expression": "fetoplacental_volume_ml = 1.046 + estimated_fetal_weight_g * 0.14; volume_ml = fetoplacental_volume_ml * (hct_final_percent - hct_initial_percent) / hct_donor_percent",
      "volume_ml": 35.3,
      "hct_initial_percent": 20.0,
      "estimated_fetal_weight_g": 1.0e3,
      "fetoplacental_volume_ml": 141.0,
      "hct_donor_percent": 80.0,
      "hct_final_percent": 40.0
    },
    {
      "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": "Mandelbrot L, Daffos F, Forestier F, MacAleese J, Descombey D",
        "doi": "10.1159/000263335",
        "id": "mandelbrot-1988",
        "pmid": "3257068",
        "source": "Fetal Ther. 1988;3(1-2):60-66",
        "title": "Assessment of fetal blood volume for computer-assisted management of in utero transfusion"
      },
      "formula": "mandelbrot_hct",
      "formula_expression": "fetoplacental_volume_ml = 1.046 + estimated_fetal_weight_g * 0.14; volume_ml = fetoplacental_volume_ml * (hct_final_percent - hct_initial_percent) / hct_donor_percent",
      "volume_ml": 35.3,
      "hct_initial_percent": 20.0,
      "estimated_fetal_weight_g": 1.0e3,
      "fetoplacental_volume_ml": 141.0,
      "hct_donor_percent": 80.0,
      "hct_final_percent": 40.0
    }
  ]
}
```

## Response fields

- `formula` (string): mandelbrot_hct
- `formula_expression` (string): Exact expression used
- `estimated_fetal_weight_g` (number): Caller-assigned estimated fetal weight in grams
- `hct_initial_percent` (number): Initial fetal hematocrit percent used
- `hct_final_percent` (number): Target fetal hematocrit percent used
- `hct_donor_percent` (number): Donor unit hematocrit percent used
- `fetoplacental_volume_ml` (number): Mandelbrot 1988 fetoplacental volume in mL, 1 decimal
- `volume_ml` (number): Intrauterine RBC transfusion volume in mL, 1 decimal
- `citation` (object): Mandelbrot et al. Fetal Ther 1988 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": "Mandelbrot L, Daffos F, Forestier F, MacAleese J, Descombey D",
    "doi": "10.1159/000263335",
    "id": "mandelbrot-1988",
    "pmid": "3257068",
    "source": "Fetal Ther. 1988;3(1-2):60-66",
    "title": "Assessment of fetal blood volume for computer-assisted management of in utero transfusion"
  },
  "formula": "mandelbrot_hct",
  "formula_expression": "fetoplacental_volume_ml = 1.046 + estimated_fetal_weight_g * 0.14; volume_ml = fetoplacental_volume_ml * (hct_final_percent - hct_initial_percent) / hct_donor_percent",
  "volume_ml": 35.3,
  "hct_initial_percent": 20.0,
  "estimated_fetal_weight_g": 1.0e3,
  "fetoplacental_volume_ml": 141.0,
  "hct_donor_percent": 80.0,
  "hct_final_percent": 40.0
}
```

## Errors

- HTTP 400 `invalid_iut`: Intrauterine transfusion inputs must match Mandelbrot 1988 estimated fetal weight and hematocrit window from that paper. 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

- [RhIG vials](https://magentlab.com/docs/rhig) — Compute ACOG Practice Bulletin 181 RhD immune globulin vial count from caller-assigned fetal-cell percent and maternal blood volume using AABB Technical Manual rounding of FMH/30.
- [Plasma starting dose](https://magentlab.com/docs/plasma-dosage) — Compute the BSH Green 2018 starting plasma volume from body weight: 15 mL/kg in the absence of major bleeding. Adult starting dose only.
- [Neonatal partial-exchange volume](https://magentlab.com/docs/neonatal-partial-exchange) — Compute the Kumar 2004 partial-exchange transfusion volume from actual hematocrit and caller-assigned blood volume, using the trial's printed desired hematocrit of 55 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.
