# Licurse AKI hydronephrosis risk

Licurse

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

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

## What it computes

Sum the Licurse 2010 seven-factor integer points used for that paper's low versus higher-risk hydronephrosis split in AKI (history of hydronephrosis 4; each of the other six factors 1).

## When to use

When an agent already has the seven Licurse 2010 flags, including caller-assigned Black, and needs the published 0–10 total and 2010 validation band (≤2 low, ≥3 higher), not an ultrasound order. magent does not assign race and does not perform ultrasound.

## When not to use

- Not a medical device.
- Not an imaging order and not a diagnosis of obstruction. magent does not perform ultrasonography.
- black is caller-assigned as used in Licurse 2010 (nonblack race scores 1); magent does not assign race.
- Two-level 2010 validation split only: score ≤2 low (validation HN 3.1%, HNRI 0.4%); score ≥3 higher (validation HN 15.7%, HNRI 4.7%). Not a three-level medium band.
- obstruction_diagnosis is one caller-assigned flag covering abdominal or pelvic mass, BPH, pelvic surgery, or neurogenic bladder.
- nephrotoxins, chf, and prerenal_aki (pressor use or sepsis) each score 1 when absent. magent does not identify medications or diagnose sepsis.

## Formula

```
Licurse = 4 if history_hydronephrosis + 1 if not black (nonblack race) + 1 if recurrent_uti + 1 if obstruction_diagnosis + 1 if not nephrotoxins + 1 if not chf + 1 if not prerenal_aki; integer points as used for the 2010 validation split; score 0-10; low iff score<=2 (validation HN 3.1%, HNRI 0.4%); higher iff score>=3 (validation HN 15.7%, HNRI 4.7%)
```

## Citation

[Renal Ultrasonography in the Evaluation of Acute Kidney Injury: Developing a Risk Stratification Framework](https://doi.org/10.1001/archinternmed.2010.419)
Licurse A, Kim MC, Dziura J, Forman HP, Formica RN, Makarov DV, Parikh CR, Gross CP
Arch Intern Med. 2010;170(21):1900-1907
DOI: [10.1001/archinternmed.2010.419](https://doi.org/10.1001/archinternmed.2010.419)

## Worked example

### All pluses absent (score 0, low)

Given: `black=true, chf=true, history_hydronephrosis=false, nephrotoxins=true, obstruction_diagnosis=false, prerenal_aki=true, recurrent_uti=false`

1. history_hydronephrosis false → 0
2. black true (not nonblack) → 0
3. recurrent_uti false → 0
4. obstruction_diagnosis false → 0
5. nephrotoxins true (exposure present) → 0
6. chf true → 0
7. prerenal_aki true → 0
8. Score = 0 (max 10); risk_band = low (validation HN 3.1%, HNRI 0.4%)


### History of hydronephrosis only (score 4, higher)

Given: `black=true, chf=true, history_hydronephrosis=true, nephrotoxins=true, obstruction_diagnosis=false, prerenal_aki=true, recurrent_uti=false`

1. history_hydronephrosis true → 4
2. The other six factors are at the zero-point polarity
3. Score = 4 (max 10); risk_band = higher


### Two 1-point factors (score 2, still low)

Given: `black=false, chf=true, history_hydronephrosis=false, nephrotoxins=true, obstruction_diagnosis=false, prerenal_aki=true, recurrent_uti=true`

1. black false (nonblack) → 1; recurrent_uti true → 1
2. Score = 2 (max 10); risk_band = low (2010 split is ≤2 low)


### All seven pluses (score 10, higher)

Given: `black=false, chf=false, history_hydronephrosis=true, nephrotoxins=false, obstruction_diagnosis=true, prerenal_aki=false, recurrent_uti=true`

1. history_hydronephrosis true → 4
2. black false → 1; recurrent_uti true → 1; obstruction_diagnosis true → 1
3. nephrotoxins false → 1; chf false → 1; prerenal_aki false → 1
4. Score = 10 (max 10); risk_band = higher


## Also searched as

- Licurse score
- Licurse hydronephrosis
- AKI ultrasound risk
- renal ultrasonography AKI
- Licurse 2010
- hydronephrosis risk AKI
- HNRI Licurse
- nonblack hydronephrosis score

## Parameters

- `history_hydronephrosis` (boolean, required): History of hydronephrosis as assigned by the caller (Licurse 2010). true scores 4. magent does not read imaging or perform ultrasound.
- `black` (boolean, required): Caller-assigned Black as used in Licurse 2010; magent does not assign race. Nonblack race (false) scores 1. true or false.
- `recurrent_uti` (boolean, required): Recurrent urinary tract infections as assigned by the caller (Licurse 2010). true scores 1. magent does not take a culture history.
- `obstruction_diagnosis` (boolean, required): Diagnosis consistent with possible obstruction (abdominal or pelvic mass, BPH, pelvic surgery, or neurogenic bladder) as one caller-assigned flag (Licurse 2010). true scores 1. magent does not examine the patient.
- `nephrotoxins` (boolean, required): Inpatient nephrotoxic exposure as assigned by the caller (Licurse 2010). Absence (false) scores 1. magent does not identify medications.
- `chf` (boolean, required): Congestive heart failure as assigned by the caller (Licurse 2010). Absence (false) scores 1. magent does not diagnose heart failure.
- `prerenal_aki` (boolean, required): Prerenal AKI (pressor use or sepsis) as assigned by the caller (Licurse 2010). Absence (false) scores 1. magent does not diagnose sepsis or read pressor use.

## 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/licurse`
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": [
    {
      "black": "true",
      "chf": "true",
      "history_hydronephrosis": "false",
      "nephrotoxins": "true",
      "obstruction_diagnosis": "false",
      "prerenal_aki": "true",
      "recurrent_uti": "false"
    },
    {
      "black": "true",
      "chf": "true",
      "history_hydronephrosis": "false",
      "nephrotoxins": "true",
      "obstruction_diagnosis": "false",
      "prerenal_aki": "true",
      "recurrent_uti": "false"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/licurse",
  "items": [
    {
      "black": true,
      "components": [
        {
          "factor": "history_hydronephrosis",
          "points": 0,
          "present": false
        },
        {
          "value": true,
          "factor": "nonblack",
          "points": 0,
          "present": false
        },
        {
          "factor": "recurrent_uti",
          "points": 0,
          "present": false
        },
        {
          "factor": "obstruction_diagnosis",
          "points": 0,
          "present": false
        },
        {
          "value": true,
          "factor": "no_nephrotoxins",
          "points": 0,
          "present": false
        },
        {
          "value": true,
          "factor": "no_chf",
          "points": 0,
          "present": false
        },
        {
          "value": true,
          "factor": "no_prerenal_aki",
          "points": 0,
          "present": false
        }
      ],
      "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": "Licurse A, Kim MC, Dziura J, Forman HP, Formica RN, Makarov DV, Parikh CR, Gross CP",
        "doi": "10.1001/archinternmed.2010.419",
        "id": "licurse-2010",
        "pmid": "21098343",
        "source": "Arch Intern Med. 2010;170(21):1900-1907",
        "title": "Renal Ultrasonography in the Evaluation of Acute Kidney Injury: Developing a Risk Stratification Framework"
      },
      "formula": "licurse",
      "formula_expression": "Licurse = 4 if history_hydronephrosis + 1 if not black (nonblack race) + 1 if recurrent_uti + 1 if obstruction_diagnosis + 1 if not nephrotoxins + 1 if not chf + 1 if not prerenal_aki; integer points as used for the 2010 validation split; score 0-10; low iff score<=2 (validation HN 3.1%, HNRI 0.4%); higher iff score>=3 (validation HN 15.7%, HNRI 4.7%)",
      "max_score": 10,
      "score": 0,
      "risk_band": "low",
      "chf": true,
      "history_hydronephrosis": false,
      "nephrotoxins": true,
      "obstruction_diagnosis": false,
      "prerenal_aki": true,
      "recurrent_uti": false,
      "validation_hn_percent": 3.1,
      "validation_hnri_percent": 0.4
    },
    {
      "black": true,
      "components": [
        {
          "factor": "history_hydronephrosis",
          "points": 0,
          "present": false
        },
        {
          "value": true,
          "factor": "nonblack",
          "points": 0,
          "present": false
        },
        {
          "factor": "recurrent_uti",
          "points": 0,
          "present": false
        },
        {
          "factor": "obstruction_diagnosis",
          "points": 0,
          "present": false
        },
        {
          "value": true,
          "factor": "no_nephrotoxins",
          "points": 0,
          "present": false
        },
        {
          "value": true,
          "factor": "no_chf",
          "points": 0,
          "present": false
        },
        {
          "value": true,
          "factor": "no_prerenal_aki",
          "points": 0,
          "present": false
        }
      ],
      "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": "Licurse A, Kim MC, Dziura J, Forman HP, Formica RN, Makarov DV, Parikh CR, Gross CP",
        "doi": "10.1001/archinternmed.2010.419",
        "id": "licurse-2010",
        "pmid": "21098343",
        "source": "Arch Intern Med. 2010;170(21):1900-1907",
        "title": "Renal Ultrasonography in the Evaluation of Acute Kidney Injury: Developing a Risk Stratification Framework"
      },
      "formula": "licurse",
      "formula_expression": "Licurse = 4 if history_hydronephrosis + 1 if not black (nonblack race) + 1 if recurrent_uti + 1 if obstruction_diagnosis + 1 if not nephrotoxins + 1 if not chf + 1 if not prerenal_aki; integer points as used for the 2010 validation split; score 0-10; low iff score<=2 (validation HN 3.1%, HNRI 0.4%); higher iff score>=3 (validation HN 15.7%, HNRI 4.7%)",
      "max_score": 10,
      "score": 0,
      "risk_band": "low",
      "chf": true,
      "history_hydronephrosis": false,
      "nephrotoxins": true,
      "obstruction_diagnosis": false,
      "prerenal_aki": true,
      "recurrent_uti": false,
      "validation_hn_percent": 3.1,
      "validation_hnri_percent": 0.4
    }
  ]
}
```

## Response fields

- `formula` (string): licurse
- `formula_expression` (string): Exact expression used
- `score` (integer): Total points 0-10
- `max_score` (integer): Always 10 (4+1+1+1+1+1+1)
- `risk_band` (string): Licurse 2010 validation split only: low when score is 0-2, higher when 3-10. Not a three-level medium band. Not an imaging order.
- `validation_hn_percent` (number): Licurse 2010 validation hydronephrosis rate for this band (low 3.1, higher 15.7). Cohort rate, not an individual probability.
- `validation_hnri_percent` (number): Licurse 2010 validation hydronephrosis-requiring-intervention rate for this band (low 0.4, higher 4.7). Cohort rate, not an individual probability.
- `history_hydronephrosis` (boolean): Caller-assigned history of hydronephrosis used
- `black` (boolean): Caller-assigned Black as used in Licurse 2010; magent does not assign race
- `recurrent_uti` (boolean): Caller-assigned recurrent UTI flag used
- `obstruction_diagnosis` (boolean): Caller-assigned obstruction-consistent diagnosis flag used
- `nephrotoxins` (boolean): Caller-assigned inpatient nephrotoxic exposure flag used
- `chf` (boolean): Caller-assigned congestive heart failure flag used
- `prerenal_aki` (boolean): Caller-assigned prerenal AKI (pressor use or sepsis) flag used
- `components` (array): Per-factor points
- `citation` (object): Licurse 2010 Arch Intern Med citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "black": true,
  "components": [
    {
      "factor": "history_hydronephrosis",
      "points": 0,
      "present": false
    },
    {
      "value": true,
      "factor": "nonblack",
      "points": 0,
      "present": false
    },
    {
      "factor": "recurrent_uti",
      "points": 0,
      "present": false
    },
    {
      "factor": "obstruction_diagnosis",
      "points": 0,
      "present": false
    },
    {
      "value": true,
      "factor": "no_nephrotoxins",
      "points": 0,
      "present": false
    },
    {
      "value": true,
      "factor": "no_chf",
      "points": 0,
      "present": false
    },
    {
      "value": true,
      "factor": "no_prerenal_aki",
      "points": 0,
      "present": false
    }
  ],
  "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": "Licurse A, Kim MC, Dziura J, Forman HP, Formica RN, Makarov DV, Parikh CR, Gross CP",
    "doi": "10.1001/archinternmed.2010.419",
    "id": "licurse-2010",
    "pmid": "21098343",
    "source": "Arch Intern Med. 2010;170(21):1900-1907",
    "title": "Renal Ultrasonography in the Evaluation of Acute Kidney Injury: Developing a Risk Stratification Framework"
  },
  "formula": "licurse",
  "formula_expression": "Licurse = 4 if history_hydronephrosis + 1 if not black (nonblack race) + 1 if recurrent_uti + 1 if obstruction_diagnosis + 1 if not nephrotoxins + 1 if not chf + 1 if not prerenal_aki; integer points as used for the 2010 validation split; score 0-10; low iff score<=2 (validation HN 3.1%, HNRI 0.4%); higher iff score>=3 (validation HN 15.7%, HNRI 4.7%)",
  "max_score": 10,
  "score": 0,
  "risk_band": "low",
  "chf": true,
  "history_hydronephrosis": false,
  "nephrotoxins": true,
  "obstruction_diagnosis": false,
  "prerenal_aki": true,
  "recurrent_uti": false,
  "validation_hn_percent": 3.1,
  "validation_hnri_percent": 0.4
}
```

## Errors

- HTTP 400 `invalid_licurse`: Licurse inputs must match the 2010 hydronephrosis flags including caller-assigned black and the six other Table factors. 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

- [KDIGO AKI](https://magentlab.com/docs/kdigo-aki) — Apply KDIGO 2012 Table 2 AKI staging and return stage 0-3 as the worse of the creatinine and urine-output limbs, with initiated renal replacement therapy or a caller pediatric eGFR <35 flag mapping to stage 3.
- [FENa](https://magentlab.com/docs/fena) — Compute fractional excretion of sodium from plasma and urine sodium and creatinine using Espinel 1976.
- [STONE score](https://magentlab.com/docs/stone-score) — Sum the Moore 2014 STONE score for uncomplicated ureteral stone from five caller-assigned Table 3 items and return the 0-13 total plus low (0-5), moderate (6-9), or high (10-13) probability.

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