# Adrogué–Madias ΔNa from infusate

Adrogué–Madias ΔNa

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

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

## What it computes

Estimate the change in serum sodium after 1 L of a given infusate from Adrogué–Madias TBW fractions and infusate sodium plus potassium.

## When to use

When an agent needs the published ΔNa-per-liter infusate arithmetic and must not invent a correction rate, infusion protocol, or TBW fraction.

## When not to use

- Not a treatment order, infusion protocol, or correction-rate target. The result is the estimated change in serum Na after 1 L of the given infusate.
- Does not model ongoing urinary losses, SIADH, or the safe rate of correction.
- TBW fractions follow Adrogué and Madias 2000: children 0.6; adult male 0.6; adult female 0.5; elderly male 0.5; elderly female 0.45. The papers say elderly without an age cutoff; magent treats age ≥65 as elderly (implementation clamp). pediatric=true/false is required and is not inferred from age.

## Formula

```
delta_na_mmol_l = (infusate_na_mmol_l + infusate_k_mmol_l - sodium_mmol_l) / (tbw_l + 1); tbw_l = tbw_fraction * weight_kg
```

## Citation

[Hyponatremia](https://doi.org/10.1056/NEJM200005253422107)
Adrogué HJ, Madias NE
N Engl J Med. 2000;342(21):1581-1589
DOI: [10.1056/NEJM200005253422107](https://doi.org/10.1056/NEJM200005253422107)

## Worked example

### 70 kg adult woman, Na 110, 1 L 3% saline (513 mmol/L)

Given: `age=40, infusate_na_mmol_l=513, pediatric=false, sex=female, sodium_mmol_l=110, weight_kg=70`

1. TBW = 0.5 × 70 = 35 L (adult female fraction)
2. ΔNa = (513 + 0 − 110) / (35 + 1) = 403 / 36 = 11.2 mmol/L


### 70 kg adult man, Na 160, 1 L 5% dextrose (0 mmol/L)

Given: `age=40, infusate_na_mmol_l=0, pediatric=false, sex=male, sodium_mmol_l=160, weight_kg=70`

1. TBW = 0.6 × 70 = 42 L (adult male fraction)
2. ΔNa = (0 + 0 − 160) / (42 + 1) = −160 / 43 = −3.7 mmol/L


## Also searched as

- Adrogue Madias
- delta Na infusate
- change in serum sodium
- hyponatremia infusate formula
- hypernatremia infusate formula
- sodium correction per liter

## Parameters

- `sodium_mmol_l` (number, required): Measured serum sodium in mmol/L. Range 90-190.
- `infusate_na_mmol_l` (number, required): Sodium concentration of 1 L of infusate in mmol/L (0-1000). Adrogué–Madias table examples: 5% dextrose 0; 0.9% NaCl 154; 3% NaCl 513.
- `infusate_k_mmol_l` (number, optional): Potassium concentration of the same 1 L infusate in mmol/L (0-200). Omitted uses 0. Added to infusate sodium in the numerator.
- `sex` (string, required): Sex used for adult and elderly TBW fractions. Ignored for the TBW fraction when pediatric=true (child fraction 0.6).
- `age` (integer, required): Age in years. pediatric=false: integer 18-120; age ≥65 uses the elderly TBW fraction. pediatric=true: integer 0-17; TBW uses the child fraction 0.6.
- `weight_kg` (number, optional): Weight in kilograms. Provide weight_kg or weight_lb.
- `weight_lb` (number, optional): Weight in pounds. Converted as kg = lb * 0.45359237.
- `pediatric` (boolean, required): true uses the child TBW fraction 0.6. false uses adult or elderly fractions from sex and age. Required; magent does not infer child vs adult from age.

## 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/adrogue_madias`
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",
      "infusate_na_mmol_l": "513",
      "pediatric": "false",
      "sex": "female",
      "sodium_mmol_l": "110",
      "weight_kg": "70"
    },
    {
      "age": "40",
      "infusate_na_mmol_l": "513",
      "pediatric": "false",
      "sex": "female",
      "sodium_mmol_l": "110",
      "weight_kg": "70"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/adrogue_madias",
  "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": "Adrogué HJ, Madias NE",
        "doi": "10.1056/NEJM200005253422107",
        "id": "adrogue-madias-2000",
        "source": "N Engl J Med. 2000;342(21):1581-1589",
        "title": "Hyponatremia"
      },
      "formula": "adrogue_madias",
      "formula_expression": "delta_na_mmol_l = (infusate_na_mmol_l + infusate_k_mmol_l - sodium_mmol_l) / (tbw_l + 1); tbw_l = tbw_fraction * weight_kg",
      "age_years": 40,
      "sex": "female",
      "weight_kg": 70.0,
      "delta_na_mmol_l": 11.2,
      "infusate_k_mmol_l": 0.0,
      "infusate_na_mmol_l": 513.0,
      "pediatric": false,
      "sodium_mmol_l": 110.0,
      "tbw_fraction": 0.5,
      "tbw_l": 35.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": "Adrogué HJ, Madias NE",
        "doi": "10.1056/NEJM200005253422107",
        "id": "adrogue-madias-2000",
        "source": "N Engl J Med. 2000;342(21):1581-1589",
        "title": "Hyponatremia"
      },
      "formula": "adrogue_madias",
      "formula_expression": "delta_na_mmol_l = (infusate_na_mmol_l + infusate_k_mmol_l - sodium_mmol_l) / (tbw_l + 1); tbw_l = tbw_fraction * weight_kg",
      "age_years": 40,
      "sex": "female",
      "weight_kg": 70.0,
      "delta_na_mmol_l": 11.2,
      "infusate_k_mmol_l": 0.0,
      "infusate_na_mmol_l": 513.0,
      "pediatric": false,
      "sodium_mmol_l": 110.0,
      "tbw_fraction": 0.5,
      "tbw_l": 35.0
    }
  ]
}
```

## Response fields

- `formula` (string): adrogue_madias
- `formula_expression` (string): Exact expression used
- `sodium_mmol_l` (number): Measured serum sodium used
- `infusate_na_mmol_l` (number): Infusate sodium used, mmol/L
- `infusate_k_mmol_l` (number): Infusate potassium used (0 when omitted)
- `weight_kg` (number): Normalized weight in kg
- `sex` (string): male or female
- `age_years` (integer): Age in years used
- `pediatric` (boolean): true when the child TBW fraction 0.6 was used
- `tbw_fraction` (number): TBW coefficient: children 0.6; adult male 0.6; adult female 0.5; elderly male 0.5; elderly female 0.45
- `tbw_l` (number): Total body water in L (fraction × weight_kg), 1 decimal
- `delta_na_mmol_l` (number): Estimated change in serum Na after 1 L of infusate, 1 decimal
- `citation` (object): Adrogué and Madias NEJM 2000 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": "Adrogué HJ, Madias NE",
    "doi": "10.1056/NEJM200005253422107",
    "id": "adrogue-madias-2000",
    "source": "N Engl J Med. 2000;342(21):1581-1589",
    "title": "Hyponatremia"
  },
  "formula": "adrogue_madias",
  "formula_expression": "delta_na_mmol_l = (infusate_na_mmol_l + infusate_k_mmol_l - sodium_mmol_l) / (tbw_l + 1); tbw_l = tbw_fraction * weight_kg",
  "age_years": 40,
  "sex": "female",
  "weight_kg": 70.0,
  "delta_na_mmol_l": 11.2,
  "infusate_k_mmol_l": 0.0,
  "infusate_na_mmol_l": 513.0,
  "pediatric": false,
  "sodium_mmol_l": 110.0,
  "tbw_fraction": 0.5,
  "tbw_l": 35.0
}
```

## Errors

- HTTP 400 `invalid_adrogue_sodium`: sodium_mmol_l must be a number from 90 to 190. Returned before settlement; you are not charged.
- HTTP 400 `invalid_infusate_sodium`: infusate_na_mmol_l must be a number from 0 to 1000. Returned before settlement; you are not charged.
- HTTP 400 `invalid_infusate_potassium`: infusate_k_mmol_l must be a number from 0 to 200 when provided. Returned before settlement; you are not charged.
- HTTP 400 `invalid_sex`: sex must be female or male Returned before settlement; you are not charged.
- HTTP 400 `invalid_age`: age must be an integer from 18 to 120 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_flag`: boolean clinical flags must be true or false 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

- [Sodium deficit](https://magentlab.com/docs/sodium-deficit) — Estimate sodium (cation) deficit from weight, sex-specific TBW, and measured serum Na versus a chosen target.
- [Free water deficit](https://magentlab.com/docs/free-water-deficit) — Estimate free water deficit from weight, sex-specific TBW, and measured serum Na versus a chosen target.
- [Corrected sodium](https://magentlab.com/docs/corrected-sodium) — Compute expected sodium in hyperglycemia using Katz 1.6 or Hillier 2.4. The formula argument is required.

## 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 echoing accepted, payload, and extensions when present).
- 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.
- 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.
