# Ulcerative Colitis Endoscopic Index of Severity

UCEIS

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

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

## What it computes

Sum three caller-assigned Travis 2013 UCEIS descriptors (vascular_pattern 0-2, bleeding 0-3, erosions_ulcers 0-3) scored at the most severely affected flexible-sigmoidoscopy segment and return the total (max 8). Uses the 2013 0-8 recode (normal 0). Does not return activity bands.

## When to use

When an agent has already assigned Travis 2013 vascular pattern, bleeding, and erosions/ulcers at the worst-affected flexible-sigmoidoscopy segment and needs the three-item 0-8 total, not a diagnosis, Mayo DAI, Mayo endoscopic subscore, or the Travis 1996 day-3 steroid rule.

## When not to use

- Not a medical device and not a diagnosis of ulcerative colitis or a treatment order.
- Each descriptor is a caller-assigned Travis 2013 token. magent does not perform endoscopy. Score the most severely affected segment at flexible sigmoidoscopy as assigned by the caller.
- Travis 2013 recoded normality to 0 (range 0-8). This is not the Travis 2012 3-11 numbering (normal scored 1) and not the Travis 1996 day-3 intravenous-steroid rule.
- Travis 2013 did not publish mild, moderate, or severe cutoffs for the total score. magent returns score and max_score only and does not apply later UCEIS activity bands.
- Not the Mayo DAI, not the Mayo endoscopic subscore (MES), and not Truelove and Witts.

## Formula

```
UCEIS = vascular_pattern (normal 0, patchy 1, obliterated 2) + bleeding (none 0, mucosal 1, luminal_mild 2, luminal_moderate_or_severe 3) + erosions_ulcers (none 0, erosions 1, superficial_ulcer 2, deep_ulcer 3); Travis 2013 0-8 recode (normal 0, not Travis 2012 3-11); most severely affected segment at flexible sigmoidoscopy; no published total-score activity bands
```

## Citation

[Reliability and Initial Validation of the Ulcerative Colitis Endoscopic Index of Severity.](https://doi.org/10.1053/j.gastro.2013.07.024)
Travis SPL, Schnell D, Krzeski P, et al.
Gastroenterology. 2013;145(5):987-995
DOI: [10.1053/j.gastro.2013.07.024](https://doi.org/10.1053/j.gastro.2013.07.024)

## Worked example

### All descriptors normal or none

Given: `bleeding=none, erosions_ulcers=none, vascular_pattern=normal`

1. vascular_pattern normal 0 + bleeding none 0 + erosions_ulcers none 0
2. Score = 0 (max 8). No activity band.


### All descriptors maximum

Given: `bleeding=luminal_moderate_or_severe, erosions_ulcers=deep_ulcer, vascular_pattern=obliterated`

1. vascular_pattern obliterated 2 + bleeding luminal_moderate_or_severe 3 + erosions_ulcers deep_ulcer 3
2. Score = 8 (max 8). No activity band.


## Also searched as

- UCEIS
- ulcerative colitis endoscopic index
- UCEIS score
- Travis UCEIS
- UC endoscopic index of severity
- Travis 2013 UCEIS
- ulcerative colitis endoscopy score
- UCEIS 0-8

## Parameters

- `vascular_pattern` (string, required): Caller-assigned Travis 2013 UCEIS vascular pattern at the most severely affected flexible-sigmoidoscopy segment: normal (0; arborization of capillaries clearly defined, or blurring or patchy loss of capillary margins), patchy (1; patchy obliteration of vascular pattern), or obliterated (2; complete obliteration). Travis 2013 0-8 recode (normal 0, not Travis 2012 score 1). magent does not perform endoscopy.
- `bleeding` (string, required): Caller-assigned Travis 2013 UCEIS bleeding at the most severely affected segment, scored during insertion: none (0; no visible blood), mucosal (1; spots or streaks of coagulated blood on the mucosa ahead of the scope that can be washed away), luminal_mild (2; some free liquid blood in the lumen), or luminal_moderate_or_severe (3; frank blood in the lumen ahead of the endoscope, or visible oozing after washing, or oozing from hemorrhagic mucosa). magent does not perform endoscopy.
- `erosions_ulcers` (string, required): Caller-assigned Travis 2013 UCEIS erosions and ulcers at the most severely affected segment: none (0; normal mucosa, no visible erosions or ulcers), erosions (1; tiny ≤5 mm white or yellow mucosal defects with a flat edge), superficial_ulcer (2; larger >5 mm discrete fibrin-covered superficial ulcers), or deep_ulcer (3; deeper excavated defects with a slightly raised edge). magent does not perform endoscopy.

## 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/uceis`
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": [
    {
      "bleeding": "none",
      "erosions_ulcers": "none",
      "vascular_pattern": "normal"
    },
    {
      "bleeding": "none",
      "erosions_ulcers": "none",
      "vascular_pattern": "normal"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/uceis",
  "items": [
    {
      "components": [
        {
          "value": "normal",
          "factor": "vascular_pattern",
          "points": 0,
          "present": true
        },
        {
          "value": "none",
          "factor": "bleeding",
          "points": 0,
          "present": true
        },
        {
          "value": "none",
          "factor": "erosions_ulcers",
          "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": "Travis SPL, Schnell D, Krzeski P, et al.",
        "doi": "10.1053/j.gastro.2013.07.024",
        "id": "travis-2013",
        "pmid": "23891974",
        "source": "Gastroenterology. 2013;145(5):987-995",
        "title": "Reliability and Initial Validation of the Ulcerative Colitis Endoscopic Index of Severity."
      },
      "formula": "uceis",
      "formula_expression": "UCEIS = vascular_pattern (normal 0, patchy 1, obliterated 2) + bleeding (none 0, mucosal 1, luminal_mild 2, luminal_moderate_or_severe 3) + erosions_ulcers (none 0, erosions 1, superficial_ulcer 2, deep_ulcer 3); Travis 2013 0-8 recode (normal 0, not Travis 2012 3-11); most severely affected segment at flexible sigmoidoscopy; no published total-score activity bands",
      "max_score": 8,
      "score": 0,
      "bleeding": "none",
      "erosions_ulcers": "none",
      "vascular_pattern": "normal"
    },
    {
      "components": [
        {
          "value": "normal",
          "factor": "vascular_pattern",
          "points": 0,
          "present": true
        },
        {
          "value": "none",
          "factor": "bleeding",
          "points": 0,
          "present": true
        },
        {
          "value": "none",
          "factor": "erosions_ulcers",
          "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": "Travis SPL, Schnell D, Krzeski P, et al.",
        "doi": "10.1053/j.gastro.2013.07.024",
        "id": "travis-2013",
        "pmid": "23891974",
        "source": "Gastroenterology. 2013;145(5):987-995",
        "title": "Reliability and Initial Validation of the Ulcerative Colitis Endoscopic Index of Severity."
      },
      "formula": "uceis",
      "formula_expression": "UCEIS = vascular_pattern (normal 0, patchy 1, obliterated 2) + bleeding (none 0, mucosal 1, luminal_mild 2, luminal_moderate_or_severe 3) + erosions_ulcers (none 0, erosions 1, superficial_ulcer 2, deep_ulcer 3); Travis 2013 0-8 recode (normal 0, not Travis 2012 3-11); most severely affected segment at flexible sigmoidoscopy; no published total-score activity bands",
      "max_score": 8,
      "score": 0,
      "bleeding": "none",
      "erosions_ulcers": "none",
      "vascular_pattern": "normal"
    }
  ]
}
```

## Response fields

- `formula` (string): uceis
- `formula_expression` (string): Exact expression used
- `score` (integer): Travis 2013 UCEIS points 0-8 (2013 recode; not Travis 2012 3-11)
- `max_score` (integer): Always 8
- `vascular_pattern` (string): Caller-assigned token: normal, patchy, or obliterated
- `bleeding` (string): Caller-assigned token: none, mucosal, luminal_mild, or luminal_moderate_or_severe
- `erosions_ulcers` (string): Caller-assigned token: none, erosions, superficial_ulcer, or deep_ulcer
- `components` (array): Per-descriptor caller-assigned points
- `citation` (object): Travis et al. Gastroenterology 2013 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": "normal",
      "factor": "vascular_pattern",
      "points": 0,
      "present": true
    },
    {
      "value": "none",
      "factor": "bleeding",
      "points": 0,
      "present": true
    },
    {
      "value": "none",
      "factor": "erosions_ulcers",
      "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": "Travis SPL, Schnell D, Krzeski P, et al.",
    "doi": "10.1053/j.gastro.2013.07.024",
    "id": "travis-2013",
    "pmid": "23891974",
    "source": "Gastroenterology. 2013;145(5):987-995",
    "title": "Reliability and Initial Validation of the Ulcerative Colitis Endoscopic Index of Severity."
  },
  "formula": "uceis",
  "formula_expression": "UCEIS = vascular_pattern (normal 0, patchy 1, obliterated 2) + bleeding (none 0, mucosal 1, luminal_mild 2, luminal_moderate_or_severe 3) + erosions_ulcers (none 0, erosions 1, superficial_ulcer 2, deep_ulcer 3); Travis 2013 0-8 recode (normal 0, not Travis 2012 3-11); most severely affected segment at flexible sigmoidoscopy; no published total-score activity bands",
  "max_score": 8,
  "score": 0,
  "bleeding": "none",
  "erosions_ulcers": "none",
  "vascular_pattern": "normal"
}
```

## Errors

- HTTP 400 `invalid_uceis`: vascular_pattern must be normal, patchy, or obliterated; bleeding must be none, mucosal, luminal_mild, or luminal_moderate_or_severe; erosions_ulcers must be none, erosions, superficial_ulcer, or deep_ulcer (Travis 2013 UCEIS 0-8). 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

- [Mayo DAI](https://magentlab.com/docs/mayo-uc) — Sum four caller-assigned Schroeder 1987 ulcerative colitis disease-activity index items (each integer 0-3) and return the total (max 12). Does not return later remission or activity bands.
- [Truelove and Witts](https://magentlab.com/docs/truelove-witts) — Apply the Truelove and Witts 1955 ulcerative colitis severity table and return mild, moderately_severe, or severe from stools_per_day and five caller-assigned flags.
- [Travis criteria](https://magentlab.com/docs/travis) — Apply the Travis 1996 day-3 of intravenous corticosteroids rule for severe ulcerative colitis and return travis_high from stools_per_day and crp_mg_l.

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