# VURx (vesicoureteral reflux index)

VURx (vesicoureteral reflux index)

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

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

## What it computes

Sum the Kirsch 2014 VURx factors (VUR timing 1-3, female sex, grade IV-V, complete ureteral duplication or periureteral diverticulum) and return score 1-6 with that derivation paper's improvement or resolution percent.

## When to use

When an agent has caller-assigned VUR timing, sex, grade IV-V vs I-III, and ureteral anomaly for a child younger than 2 years with primary VUR and needs the Kirsch 2014 VURx total and that paper's improvement or resolution percent. magent does not read a VCUG.

## When not to use

- Not a medical device.
- Published for children younger than 2 years with primary vesicoureteral reflux (Kirsch 2014). Does not expand the age range.
- The caller assigns vur_timing, female, high_grade (IV-V vs I-III), and ureteral_anomaly. magent does not read a VCUG or assign grade from images.
- Improvement or resolution percents are Kirsch 2014 derivation rates only (1: 89%, 2: 69%, 3: 53%, 4: 16%, 5-6: 11%). Does not emit later validation percents.
- Not a surgery order, not a resolution diagnosis, and not a named risk class beyond those percents.

## Formula

```
VURx = vur_timing (voiding 1, late_filling 2, early_mid_filling 3) + female (1) + high_grade (grade IV-V 1) + ureteral_anomaly (complete ureteral duplication or periureteral diverticulum 1); min 1, max 6; Kirsch 2014 children <2 years; improvement or resolution: 1 → 89%, 2 → 69%, 3 → 53%, 4 → 16%, 5-6 → 11%
```

## Citation

[Vesicoureteral reflux index (VURx): a novel tool to predict primary reflux improvement and resolution in children less than 2 years of age](https://doi.org/10.1016/j.jpurol.2014.06.019)
Kirsch AJ, Arlen AM, Leong T, et al
J Pediatr Urol. 2014;10(6):1249-1254
DOI: [10.1016/j.jpurol.2014.06.019](https://doi.org/10.1016/j.jpurol.2014.06.019)

## Worked example

### Male, voiding only, not high grade, no anomaly

Given: `female=false, high_grade=false, ureteral_anomaly=false, vur_timing=voiding`

1. vur_timing voiding = 1
2. female false = 0
3. high_grade false = 0
4. ureteral_anomaly false = 0
5. score = 1 (published minimum); improvement or resolution 89%


### Early-mid filling, male, not high grade, no anomaly

Given: `female=false, high_grade=false, ureteral_anomaly=false, vur_timing=early_mid_filling`

1. vur_timing early_mid_filling = 3
2. female, high_grade, and ureteral_anomaly each 0
3. score = 3; improvement or resolution 53%


### Female, early-mid filling, high grade, ureteral anomaly

Given: `female=true, high_grade=true, ureteral_anomaly=true, vur_timing=early_mid_filling`

1. vur_timing early_mid_filling = 3
2. female true = 1
3. high_grade true = 1
4. ureteral_anomaly true = 1
5. score = 6 (published maximum); improvement or resolution 11%


## Also searched as

- vesicoureteral reflux index
- VURx
- Kirsch VURx
- VUR index
- reflux resolution score
- primary VUR improvement
- vesicoureteral reflux score
- VURx children under 2

## Parameters

- `female` (boolean, required): Female sex (Kirsch 2014: 1 point). false for male (0 points). true or false. magent does not assign sex from a chart.
- `vur_timing` (string, required): Caller-assigned VUR timing on VCUG (Kirsch 2014): voiding (1; voiding only), late_filling (2), or early_mid_filling (3; early- or mid-filling). magent does not read a VCUG.
- `high_grade` (boolean, required): Whether VUR grade is IV or V (Kirsch 2014: 1 point). false for grades I-III (0 points). true or false. magent does not assign grade from images.
- `ureteral_anomaly` (boolean, required): Complete ureteral duplication or periureteral diverticulum (Kirsch 2014: 1 point). true or false. magent does not read a VCUG.

## 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/vurx`
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": [
    {
      "female": "false",
      "high_grade": "false",
      "ureteral_anomaly": "false",
      "vur_timing": "voiding"
    },
    {
      "female": "false",
      "high_grade": "false",
      "ureteral_anomaly": "false",
      "vur_timing": "voiding"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/vurx",
  "items": [
    {
      "components": [
        {
          "value": "voiding",
          "factor": "vur_timing",
          "points": 1,
          "present": true
        },
        {
          "factor": "female",
          "points": 0,
          "present": false
        },
        {
          "factor": "high_grade",
          "points": 0,
          "present": false
        },
        {
          "factor": "ureteral_anomaly",
          "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": "Kirsch AJ, Arlen AM, Leong T, et al",
        "doi": "10.1016/j.jpurol.2014.06.019",
        "id": "kirsch-2014",
        "pmid": "25511573",
        "source": "J Pediatr Urol. 2014;10(6):1249-1254",
        "title": "Vesicoureteral reflux index (VURx): a novel tool to predict primary reflux improvement and resolution in children less than 2 years of age"
      },
      "formula": "vurx",
      "formula_expression": "VURx = vur_timing (voiding 1, late_filling 2, early_mid_filling 3) + female (1) + high_grade (grade IV-V 1) + ureteral_anomaly (complete ureteral duplication or periureteral diverticulum 1); min 1, max 6; Kirsch 2014 children <2 years; improvement or resolution: 1 → 89%, 2 → 69%, 3 → 53%, 4 → 16%, 5-6 → 11%",
      "max_score": 6,
      "score": 1,
      "female": false,
      "high_grade": false,
      "improvement_or_resolution_percent": 89,
      "ureteral_anomaly": false,
      "vur_timing": "voiding"
    },
    {
      "components": [
        {
          "value": "voiding",
          "factor": "vur_timing",
          "points": 1,
          "present": true
        },
        {
          "factor": "female",
          "points": 0,
          "present": false
        },
        {
          "factor": "high_grade",
          "points": 0,
          "present": false
        },
        {
          "factor": "ureteral_anomaly",
          "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": "Kirsch AJ, Arlen AM, Leong T, et al",
        "doi": "10.1016/j.jpurol.2014.06.019",
        "id": "kirsch-2014",
        "pmid": "25511573",
        "source": "J Pediatr Urol. 2014;10(6):1249-1254",
        "title": "Vesicoureteral reflux index (VURx): a novel tool to predict primary reflux improvement and resolution in children less than 2 years of age"
      },
      "formula": "vurx",
      "formula_expression": "VURx = vur_timing (voiding 1, late_filling 2, early_mid_filling 3) + female (1) + high_grade (grade IV-V 1) + ureteral_anomaly (complete ureteral duplication or periureteral diverticulum 1); min 1, max 6; Kirsch 2014 children <2 years; improvement or resolution: 1 → 89%, 2 → 69%, 3 → 53%, 4 → 16%, 5-6 → 11%",
      "max_score": 6,
      "score": 1,
      "female": false,
      "high_grade": false,
      "improvement_or_resolution_percent": 89,
      "ureteral_anomaly": false,
      "vur_timing": "voiding"
    }
  ]
}
```

## Response fields

- `formula` (string): vurx
- `formula_expression` (string): Exact expression used
- `score` (integer): Kirsch 2014 VURx points 1-6
- `max_score` (integer): Always 6
- `improvement_or_resolution_percent` (integer): Kirsch 2014 derivation improvement or resolution percent: 89 (score 1), 69 (2), 53 (3), 16 (4), or 11 (5-6). Not later validation percents.
- `female` (boolean): Echo of the caller-assigned female flag
- `vur_timing` (string): Echo of caller-assigned timing: voiding, late_filling, or early_mid_filling
- `high_grade` (boolean): Echo of the caller-assigned grade IV-V flag
- `ureteral_anomaly` (boolean): Echo of the caller-assigned complete ureteral duplication or periureteral diverticulum flag
- `components` (array): Per-factor points
- `citation` (object): Kirsch et al. J Pediatr Urol 2014 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": "voiding",
      "factor": "vur_timing",
      "points": 1,
      "present": true
    },
    {
      "factor": "female",
      "points": 0,
      "present": false
    },
    {
      "factor": "high_grade",
      "points": 0,
      "present": false
    },
    {
      "factor": "ureteral_anomaly",
      "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": "Kirsch AJ, Arlen AM, Leong T, et al",
    "doi": "10.1016/j.jpurol.2014.06.019",
    "id": "kirsch-2014",
    "pmid": "25511573",
    "source": "J Pediatr Urol. 2014;10(6):1249-1254",
    "title": "Vesicoureteral reflux index (VURx): a novel tool to predict primary reflux improvement and resolution in children less than 2 years of age"
  },
  "formula": "vurx",
  "formula_expression": "VURx = vur_timing (voiding 1, late_filling 2, early_mid_filling 3) + female (1) + high_grade (grade IV-V 1) + ureteral_anomaly (complete ureteral duplication or periureteral diverticulum 1); min 1, max 6; Kirsch 2014 children <2 years; improvement or resolution: 1 → 89%, 2 → 69%, 3 → 53%, 4 → 16%, 5-6 → 11%",
  "max_score": 6,
  "score": 1,
  "female": false,
  "high_grade": false,
  "improvement_or_resolution_percent": 89,
  "ureteral_anomaly": false,
  "vur_timing": "voiding"
}
```

## Errors

- HTTP 400 `invalid_vurx`: VURx inputs must match Kirsch 2014 gender, reflux timing, grade, and ureteral-anomaly factors 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

- [Urine PCR](https://magentlab.com/docs/urine-pcr) — Compute the Ginsberg 1983 urine protein/creatinine ratio (mg/mg) from a single-void urine protein and urine creatinine, and return that rounded ratio as estimated_g_day (numeric estimate of 24-h protein g/day).
- [Schwartz 2009 eGFR](https://magentlab.com/docs/schwartz-gfr) — Compute the 2009 Schwartz bedside CKiD eGFR in mL/min/1.73m2 from height and serum creatinine.

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