# RUIS (Sansoni)

RUIS (Sansoni)

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

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

## What it computes

Sum five caller-assigned Sansoni 2008 RUIS items (urgency, activity, and drops leakage 0-3; leakage frequency 0-4; leakage amount 0-3) and return the published 0-16 total. Does not apply later total-score severity bands and does not score ISI frequency×amount.

## When to use

When an agent already has Sansoni 2008 item integers and needs the published RUIS total. magent does not interview the patient, diagnose incontinence, order continence procedures, or apply later mild/moderate/severe cuts.

## When not to use

- Not a medical device and not a diagnosis. Not a continence-procedure order.
- Each item is a caller-assigned integer. magent does not interview the patient.
- This is Sansoni 2008 RUIS only (five items; max 16). magent does not score ICIQ-UI SF or multiply leakage_frequency by leakage_amount as ISI.
- Sansoni 2008 published no RUIS total-score severity bands. This tool returns score and max_score only. It does not apply later slight/moderate/severe cuts.

## Formula

```
RUIS = urgency_leakage (0-3) + activity_leakage (0-3) + drops_leakage (0-3) + leakage_frequency (0-4) + leakage_amount (0-3); each caller-assigned; max 16; Sansoni 2008; no RUIS total-score severity bands; not ISI frequency×amount
```

## Citation

[The development of the Revised Urinary Incontinence Scale (RUIS)](https://ro.uow.edu.au/gsbpapers/64)
Sansoni J, Marosszeky N, Sansoni E, Hawthorne G
Centre for Health Service Development, University of Wollongong. 2008
DOI: none

## Worked example

### All items 0

Given: `activity_leakage=0, drops_leakage=0, leakage_amount=0, leakage_frequency=0, urgency_leakage=0`

1. urgency_leakage, activity_leakage, drops_leakage, leakage_frequency, and leakage_amount are 0 as assigned by the caller
2. Score = 0 (max 16). Sansoni 2008 published no RUIS total-score severity band.


### Five items at 2

Given: `activity_leakage=2, drops_leakage=2, leakage_amount=2, leakage_frequency=2, urgency_leakage=2`

1. each of the five Sansoni 2008 RUIS items is 2 as assigned by the caller
2. Score = 10 (max 16). No RUIS total-score severity band.


## Also searched as

- RUIS
- Revised Urinary Incontinence Scale
- Sansoni RUIS
- Sansoni 2008 RUIS
- urinary leakage scale
- revised incontinence scale
- UDI-6 ISI RUIS

## Parameters

- `urgency_leakage` (integer, required): Caller-assigned Sansoni 2008 RUIS item 1 (integer 0-3: 0 not at all, 1 slightly, 2 moderately, 3 greatly): urine leakage related to the feeling of urgency. magent does not interview the patient.
- `activity_leakage` (integer, required): Caller-assigned Sansoni 2008 RUIS item 2 (integer 0-3: 0 not at all, 1 slightly, 2 moderately, 3 greatly): urine leakage related to physical activity, coughing or sneezing. magent does not interview the patient.
- `drops_leakage` (integer, required): Caller-assigned Sansoni 2008 RUIS item 3 (integer 0-3: 0 not at all, 1 slightly, 2 moderately, 3 greatly): small amounts of urine leakage (drops). magent does not interview the patient.
- `leakage_frequency` (integer, required): Caller-assigned Sansoni 2008 RUIS item 4 (integer 0-4: 0 never, 1 less than once a month, 2 a few times a month, 3 a few times a week, 4 every day and/or night): how often urine leakage is experienced. magent does not interview the patient.
- `leakage_amount` (integer, required): Caller-assigned Sansoni 2008 RUIS item 5 (integer 0-3: 0 none, 1 drops, 2 small splashes, 3 more): how much urine is lost each time. magent does not interview the patient.

## 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/ruis`
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": [
    {
      "activity_leakage": "0",
      "drops_leakage": "0",
      "leakage_amount": "0",
      "leakage_frequency": "0",
      "urgency_leakage": "0"
    },
    {
      "activity_leakage": "0",
      "drops_leakage": "0",
      "leakage_amount": "0",
      "leakage_frequency": "0",
      "urgency_leakage": "0"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/ruis",
  "items": [
    {
      "components": [
        {
          "value": 0,
          "factor": "urgency_leakage",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "activity_leakage",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "drops_leakage",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "leakage_frequency",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "leakage_amount",
          "points": 0,
          "present": true
        }
      ],
      "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": "Sansoni J, Marosszeky N, Sansoni E, Hawthorne G",
        "id": "sansoni-ruis",
        "source": "Centre for Health Service Development, University of Wollongong. 2008",
        "title": "The development of the Revised Urinary Incontinence Scale (RUIS)"
      },
      "formula": "ruis",
      "formula_expression": "RUIS = urgency_leakage (0-3) + activity_leakage (0-3) + drops_leakage (0-3) + leakage_frequency (0-4) + leakage_amount (0-3); each caller-assigned; max 16; Sansoni 2008; no RUIS total-score severity bands; not ISI frequency×amount",
      "max_score": 16,
      "score": 0
    },
    {
      "components": [
        {
          "value": 0,
          "factor": "urgency_leakage",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "activity_leakage",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "drops_leakage",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "leakage_frequency",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "leakage_amount",
          "points": 0,
          "present": true
        }
      ],
      "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": "Sansoni J, Marosszeky N, Sansoni E, Hawthorne G",
        "id": "sansoni-ruis",
        "source": "Centre for Health Service Development, University of Wollongong. 2008",
        "title": "The development of the Revised Urinary Incontinence Scale (RUIS)"
      },
      "formula": "ruis",
      "formula_expression": "RUIS = urgency_leakage (0-3) + activity_leakage (0-3) + drops_leakage (0-3) + leakage_frequency (0-4) + leakage_amount (0-3); each caller-assigned; max 16; Sansoni 2008; no RUIS total-score severity bands; not ISI frequency×amount",
      "max_score": 16,
      "score": 0
    }
  ]
}
```

## Response fields

- `formula` (string): ruis
- `formula_expression` (string): Exact expression used
- `score` (integer): Sansoni 2008 RUIS sum of five caller-assigned items (urgency/activity/drops 0-3, frequency 0-4, amount 0-3; 0-16)
- `max_score` (integer): Always 16
- `components` (array): Per-item caller-assigned points
- `citation` (object): Sansoni et al. 2008 RUIS citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": 0,
      "factor": "urgency_leakage",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "activity_leakage",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "drops_leakage",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "leakage_frequency",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "leakage_amount",
      "points": 0,
      "present": true
    }
  ],
  "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": "Sansoni J, Marosszeky N, Sansoni E, Hawthorne G",
    "id": "sansoni-ruis",
    "source": "Centre for Health Service Development, University of Wollongong. 2008",
    "title": "The development of the Revised Urinary Incontinence Scale (RUIS)"
  },
  "formula": "ruis",
  "formula_expression": "RUIS = urgency_leakage (0-3) + activity_leakage (0-3) + drops_leakage (0-3) + leakage_frequency (0-4) + leakage_amount (0-3); each caller-assigned; max 16; Sansoni 2008; no RUIS total-score severity bands; not ISI frequency×amount",
  "max_score": 16,
  "score": 0
}
```

## Errors

- HTTP 400 `invalid_ruis`: RUIS inputs must match the published urinary-incontinence item scores. 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

- [AUA-SI](https://magentlab.com/docs/aua-si) — Sum seven caller-assigned Barry 1992 AUA-SI items (each integer 0-5) and return the published 0-35 total. Does not apply later total-score severity bands and does not score the IPSS quality-of-life item.

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