# FENa

Status: WEDGE
Price: $0.005 USDC
`GET /api/calc/fena`
HTML: https://magentlab.com/docs/fena
Markdown: https://magentlab.com/docs/fena.md

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

## What it computes

Compute fractional excretion of sodium from plasma and urine sodium and creatinine using Espinel 1976.

## When to use

When an agent needs Espinel FENa arithmetic and must not invent a prerenal versus ATN cutoff.

## When not to use

- Not a diagnosis and not a treatment order. Espinel 1976 strata were described in oliguric acute renal failure; FENa <1 prerenal and FENa >3 ATN are paper cutoffs, not an AKI taxonomy.
- Diuretics, CKD, and non-oliguric injury confound FENa. This tool does not adjust for those states.

## Formula

```
FENa_percent = 100 * (urine_sodium_mmol_l * plasma_creatinine_mg_dl) / (plasma_sodium_mmol_l * urine_creatinine_mg_dl)
```

## Citation

The FENa test. Use in the differential diagnosis of acute renal failure
Espinel CH
JAMA. 1976;236(6):579-581
DOI: [10.1001/jama.1976.03270060029022](https://doi.org/10.1001/jama.1976.03270060029022)

## Worked example

### UNa 20, PNa 140, UCr 100, PCr 2.0

Given: `creatinine_mg_dl=2.0, sodium_mmol_l=140, urine_creatinine_mg_dl=100, urine_sodium_mmol_l=20`

1. FENa = 100 * (20 * 2.0) / (140 * 100) = 0.2857…
2. Round to 2 decimals → 0.29
3. Espinel 1976 stratum <1 → prerenal


## Parameters

- `sodium_mmol_l` (number, required): Plasma or serum sodium in mmol/L (110-160).
- `creatinine_mg_dl` (number, optional): Plasma creatinine in mg/dL (0.1-20). Provide this or creatinine_umol_l.
- `creatinine_umol_l` (number, optional): Plasma creatinine in µmol/L (9-1768). Converted as mg/dL = µmol/L / 88.42.
- `urine_sodium_mmol_l` (number, required): Urine sodium in mmol/L (1-300).
- `urine_creatinine_mg_dl` (number, optional): Urine creatinine in mg/dL (1-500). Provide this or urine_creatinine_umol_l.
- `urine_creatinine_umol_l` (number, optional): Urine creatinine in µmol/L (88-44210). Converted as mg/dL = µmol/L / 88.42.

## Bulk (POST)

POST the same path with a JSON items array. Price is n times the GET unit. Invalid items return HTTP 400 before settlement.

Method: `POST /api/calc/fena`
Max items: 25
Price: unit_amount * n (unit 5000 atomic)
Status: PREVIEW

- 1 to 25 items. Each item uses the same keys as the GET query parameters.
- 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": [
    {
      "creatinine_mg_dl": "2.0",
      "sodium_mmol_l": "140",
      "urine_creatinine_mg_dl": "100",
      "urine_sodium_mmol_l": "20"
    },
    {
      "creatinine_mg_dl": "2.0",
      "sodium_mmol_l": "140",
      "urine_creatinine_mg_dl": "100",
      "urine_sodium_mmol_l": "20"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/fena",
  "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": "Espinel CH",
        "doi": "10.1001/jama.1976.03270060029022",
        "id": "espinel-1976",
        "source": "JAMA. 1976;236(6):579-581",
        "title": "The FENa test. Use in the differential diagnosis of acute renal failure"
      },
      "formula": "fena",
      "formula_expression": "FENa_percent = 100 * (urine_sodium_mmol_l * plasma_creatinine_mg_dl) / (plasma_sodium_mmol_l * urine_creatinine_mg_dl)",
      "sodium_mmol_l": 140.0,
      "creatinine_mg_dl": 2.0,
      "urine_creatinine_mg_dl": 100.0,
      "espinel_stratum": "prerenal",
      "fena_percent": 0.29,
      "urine_sodium_mmol_l": 20.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": "Espinel CH",
        "doi": "10.1001/jama.1976.03270060029022",
        "id": "espinel-1976",
        "source": "JAMA. 1976;236(6):579-581",
        "title": "The FENa test. Use in the differential diagnosis of acute renal failure"
      },
      "formula": "fena",
      "formula_expression": "FENa_percent = 100 * (urine_sodium_mmol_l * plasma_creatinine_mg_dl) / (plasma_sodium_mmol_l * urine_creatinine_mg_dl)",
      "sodium_mmol_l": 140.0,
      "creatinine_mg_dl": 2.0,
      "urine_creatinine_mg_dl": 100.0,
      "espinel_stratum": "prerenal",
      "fena_percent": 0.29,
      "urine_sodium_mmol_l": 20.0
    }
  ]
}
```

## Response fields

- `formula` (string): fena
- `formula_expression` (string): Exact expression used
- `sodium_mmol_l` (number): Plasma sodium in mmol/L
- `creatinine_mg_dl` (number): Normalized plasma creatinine
- `urine_sodium_mmol_l` (number): Urine sodium in mmol/L
- `urine_creatinine_mg_dl` (number): Normalized urine creatinine in mg/dL
- `fena_percent` (number): FENa in percent, 2 decimal places
- `espinel_stratum` (string): Espinel 1976 oliguric ARF strata: prerenal (FENa <1), indeterminate (1-3), atn (FENa >3). Not a diagnosis.
- `citation` (object): JAMA 1976 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": "Espinel CH",
    "doi": "10.1001/jama.1976.03270060029022",
    "id": "espinel-1976",
    "source": "JAMA. 1976;236(6):579-581",
    "title": "The FENa test. Use in the differential diagnosis of acute renal failure"
  },
  "formula": "fena",
  "formula_expression": "FENa_percent = 100 * (urine_sodium_mmol_l * plasma_creatinine_mg_dl) / (plasma_sodium_mmol_l * urine_creatinine_mg_dl)",
  "sodium_mmol_l": 140.0,
  "creatinine_mg_dl": 2.0,
  "urine_creatinine_mg_dl": 100.0,
  "espinel_stratum": "prerenal",
  "fena_percent": 0.29,
  "urine_sodium_mmol_l": 20.0
}
```

## Errors

- HTTP 400 `invalid_sodium`: sodium_mmol_l must be a number from 110 to 160 Returned before settlement; you are not charged.
- HTTP 400 `invalid_creatinine`: creatinine_mg_dl (0.1-20) or creatinine_umol_l (9-1768) is required Returned before settlement; you are not charged.
- HTTP 400 `invalid_urine_sodium`: urine_sodium_mmol_l must be a number from 1 to 300. Returned before settlement; you are not charged.
- HTTP 400 `invalid_urine_creatinine`: urine_creatinine_mg_dl (1-500) or urine_creatinine_umol_l (88-44210) is required. 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.
- HTTP 402 `payment_required`: Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header
- HTTP 409 `payment_in_progress`: The same authorization nonce is already being settled; retry shortly
- HTTP 429 `rate_limited`: Too many requests from this client
- HTTP 503 `settlement_uncertain`: Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE
- HTTP 503 `settle_failed`: Settlement failed; retry with the same PAYMENT-SIGNATURE shortly
- HTTP 503 `facilitator_unavailable`: Payment facilitator unavailable
- HTTP 503 `facilitator_misconfigured`: Payment facilitator is not configured
- HTTP 503 `facilitator_unauthorized`: Payment facilitator rejected credentials
- HTTP 503 `ledger_unavailable`: Payment ledger unavailable
- HTTP 503 `payment_unavailable`: Payment processing unavailable

## Related tools

- [Cockcroft–Gault CrCl](https://magentlab.com/docs/crcl) — Compute Cockcroft–Gault creatinine clearance in mL/min using total body weight.
- [CKD-EPI 2021 eGFR](https://magentlab.com/docs/egfr) — Compute race-free CKD-EPI 2021 creatinine eGFR in mL/min/1.73m2.
- [FEUrea](https://magentlab.com/docs/feurea) — Compute fractional excretion of urea (FEUN) from BUN, urine urea nitrogen, plasma creatinine, and urine creatinine.

## Also searched as

- fractional excretion of sodium
- FENa
- Espinel FENa test
- urine sodium fraction
- prerenal versus ATN

## Payment

Required query parameters must be present and valid. 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 EIP-3009 with validBefore = now + accepts[0].maxTimeoutSeconds (600 seconds). That window starts when you sign and must cover wallet confirmation plus CDP verify and settle. 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. Settlement happens before the tool runs. HTTP 503 settlement_uncertain or settle_failed: retry the same PAYMENT-SIGNATURE. Mint a new nonce only after a new HTTP 402.

## Guarantees

- Invalid query parameters return HTTP 400 before settlement. You are not charged.
- Settlement finishes before the tool executes. 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 not persisted. Request logs store path without query.
