MAGENT

Electrolytes / glucose · LIVE

Adrogué–Madias ΔNa from infusate

Adrogué–Madias ΔNa

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

LIVE $0.005 USDC GET /api/calc/adrogue-madias

Markdown: /docs/adrogue-madias.md · Canonical: https://magentlab.com/docs/adrogue-madias

Not a medical device. Not a diagnosis or dosing 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

Returns the published ΔNa-per-liter infusate arithmetic.

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

Title
Hyponatremia
Authors
Adrogué HJ, Madias NE
Source
N Engl J Med. 2000;342(21):1581-1589
DOI
10.1056/NEJM200005253422107

Worked example

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

Given: age=40infusate_na_mmol_l=513pediatric=falsesex=femalesodium_mmol_l=110weight_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=40infusate_na_mmol_l=0pediatric=falsesex=malesodium_mmol_l=160weight_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

Try

Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.

/api/calc/adrogue-madias?sodium_mmol_l=110&infusate_na_mmol_l=513&sex=female&age=40&weight_kg=70&pediatric=false

Full URL: https://api.magentlab.com/api/calc/adrogue-madias?sodium_mmol_l=110&infusate_na_mmol_l=513&sex=female&age=40&weight_kg=70&pediatric=false

Call

Expect HTTP 402 until you retry with PAYMENT-SIGNATURE. Incomplete query params return HTTP 400 before any quote or charge.

curl -i -H "Accept: application/json" "https://api.magentlab.com/api/calc/adrogue-madias?sodium_mmol_l=110&infusate_na_mmol_l=513&sex=female&age=40&weight_kg=70&pediatric=false"

Parameters

Name Type Required Description
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 · female, male 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.

POST /api/calc/adrogue-madias Max 25 unit_amount + extra_item_amount * (n - 1) extra $0.002 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 (fixture)

{
  "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"
    }
  ]
}

Open bulk paywall →

Opens a two-item fixture on the API host. Unpaid browsers get the same MetaMask paywall as GET; Pay retries POST with those items.

Example 200 (fixture)

{
  "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,
      "sodium_mmol_l": 110.0,
      "weight_kg": 70.0,
      "sex": "female",
      "delta_na_mmol_l": 11.2,
      "infusate_k_mmol_l": 0.0,
      "infusate_na_mmol_l": 513.0,
      "pediatric": false,
      "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,
      "sodium_mmol_l": 110.0,
      "weight_kg": 70.0,
      "sex": "female",
      "delta_na_mmol_l": 11.2,
      "infusate_k_mmol_l": 0.0,
      "infusate_na_mmol_l": 513.0,
      "pediatric": false,
      "tbw_fraction": 0.5,
      "tbw_l": 35.0
    }
  ]
}

Response

Field Type Description
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

Machine form of the same example. Frozen fixture. Not a live lookup.

{
  "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,
  "sodium_mmol_l": 110.0,
  "weight_kg": 70.0,
  "sex": "female",
  "delta_na_mmol_l": 11.2,
  "infusate_k_mmol_l": 0.0,
  "infusate_na_mmol_l": 513.0,
  "pediatric": false,
  "tbw_fraction": 0.5,
  "tbw_l": 35.0
}

Client errors (HTTP 400)

Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.

HTTP Code When
400 invalid_adrogue_sodium sodium_mmol_l must be a number from 90 to 190. Returned before settlement; you are not charged.
400 invalid_infusate_sodium infusate_na_mmol_l must be a number from 0 to 1000. Returned before settlement; you are not charged.
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.
400 invalid_sex sex must be female or male Returned before settlement; you are not charged.
400 invalid_age age must be an integer from 18 to 120 Returned before settlement; you are not charged.
400 invalid_weight weight_kg (1-500) or weight_lb (2-1100) is required Returned before settlement; you are not charged.
400 invalid_flag boolean clinical flags must be true or false Returned before settlement; you are not charged.
400 invalid_items POST body must be a JSON object with only an items array Returned before settlement; you are not charged.
400 invalid_item_count items must be an array of 1 to 25 objects Returned before settlement; you are not charged.
400 invalid_item each items entry must be a JSON object Returned before settlement; you are not charged.

Related tools

  • Sodium deficit — Estimate sodium (cation) deficit from weight, sex-specific TBW, and measured serum Na versus a chosen target.
  • Free water deficit — Estimate free water deficit from weight, sex-specific TBW, and measured serum Na versus a chosen target.
  • Corrected sodium — Compute expected sodium in hyperglycemia using Katz 1.6 or Hillier 2.4. The formula argument is required. Hillier 2.4 is Hillier TA, Abbott RD, Barrett EJ. Hyponatremia: evaluating the correction factor for hyperglycemia. Am J Med. 1999;106(4):399-403. DOI 10.1016/S0002-9343(99)00055-8.

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. Unpaid valid requests return HTTP 402 with a base64 PAYMENT-REQUIRED header. HTTP 503 is not a new quote: retry the same PAYMENT-SIGNATURE. Full handshake and shared payment errors: Payments.

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.