# Ho index for severe ulcerative colitis

Ho index

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

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

## What it computes

Sum the Ho 2004 day-3 IV-steroid score for severe ulcerative colitis from mean stool frequency, colonic dilatation, and hypoalbuminaemia, and return the published medical-therapy failure bands.

## When to use

When an agent already has the first-three-day mean stool frequency, a caller-assigned colonic-dilatation flag, and albumin during intravenous steroid treatment for severe ulcerative colitis and needs the published Ho 2004 point total and medical-therapy failure bands. magent does not count stools, read films, or measure albumin.

## When not to use

- Not a medical device.
- Not a colectomy order, second-line medical-therapy order, or surgery assignment. magent does not assign treatment.
- This is Ho 2004 day-3 of intravenous steroids for severe ulcerative colitis only. Not Travis (day-3 stool count + CRP). Not Truelove and Witts.
- The caller assigns mean_stool_frequency, colonic_dilatation, and albumin. magent does not count stools, read an abdominal film, or measure albumin. colonic_dilatation has no centimetre cutoff in this tool.
- Equality at 30 g/L is not hypoalbuminaemia.

## Formula

```
Ho 2004 day-3 IV-steroid severe UC: stool_points(<4 → 0; 4 ≤ mean_stool_frequency < 6 → 1; 6 ≤ x ≤ 9 → 2; x > 9 → 4) + colonic_dilatation (true → 4) + hypoalbuminaemia (albumin_g_l < 30 → 1); max 9; medical-therapy failure 0–1 → 11%, 2–3 → 43%, ≥4 → 85% (ROC operating point ≥4)
```

## Citation

[Predicting the outcome of severe ulcerative colitis: development of a novel risk score to aid early selection of patients for second-line medical therapy or surgery](https://doi.org/10.1111/j.1365-2036.2004.01945.x)
Ho GT, Mowat C, Goddard CJ, Fennell JM, Shah NB, Prescott RJ, Satsangi J
Aliment Pharmacol Ther. 2004;19(10):1079-1087
DOI: [10.1111/j.1365-2036.2004.01945.x](https://doi.org/10.1111/j.1365-2036.2004.01945.x)

## Worked example

### Mean stools 3, no dilatation, albumin 35 g/L

Given: `albumin_g_l=35, colonic_dilatation=false, mean_stool_frequency=3`

1. mean_stool_frequency 3 is < 4 → 0 points
2. colonic_dilatation is false → 0 points
3. albumin 35 g/L is not < 30 → 0 points
4. score = 0 (low; medical-therapy failure 11%)


### Mean stools 3 with colonic dilatation

Given: `albumin_g_l=35, colonic_dilatation=true, mean_stool_frequency=3`

1. mean_stool_frequency 3 is < 4 → 0 points
2. colonic_dilatation is true → 4 points
3. albumin 35 g/L is not < 30 → 0 points
4. score = 4 (high; medical-therapy failure 85%; ROC operating point)


## Also searched as

- Ho index
- Ho score
- Ho 2004 UC
- day-3 severe UC score
- Ho ulcerative colitis
- Ho IV steroid UC
- Ho risk score UC
- severe UC Ho index

## Parameters

- `mean_stool_frequency` (number, required): Mean stool frequency over the first 3 days of IV steroids, as assigned by the caller (number 0-40). Ho 2004: <4 scores 0; 4 ≤ x < 6 scores 1; 6 ≤ x ≤ 9 scores 2; x > 9 scores 4. Exactly 6 and exactly 9 score 2. magent does not count stools.
- `colonic_dilatation` (boolean, required): Caller-assigned colonic dilatation (Ho 2004). true scores 4; false scores 0. magent does not read an abdominal film and does not invent a centimetre cutoff.
- `albumin_g_l` (number, optional): Serum albumin in g/L (10-60). Provide this or albumin_g_dl, not both. Ho 2004 hypoalbuminaemia is <30 g/L (30 is not low). magent does not assay albumin.
- `albumin_g_dl` (number, optional): Serum albumin in g/dL (1-6). Converted as g/L = g/dL × 10. Provide this or albumin_g_l, not both.

## 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/ho_index`
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": [
    {
      "albumin_g_l": "35",
      "colonic_dilatation": "false",
      "mean_stool_frequency": "3"
    },
    {
      "albumin_g_l": "35",
      "colonic_dilatation": "false",
      "mean_stool_frequency": "3"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/ho_index",
  "items": [
    {
      "components": [
        {
          "value": 3.0,
          "factor": "mean_stool_frequency",
          "points": 0,
          "present": false
        },
        {
          "factor": "colonic_dilatation",
          "points": 0,
          "present": false
        },
        {
          "value": 35.0,
          "factor": "hypoalbuminaemia",
          "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": "Ho GT, Mowat C, Goddard CJ, Fennell JM, Shah NB, Prescott RJ, Satsangi J",
        "doi": "10.1111/j.1365-2036.2004.01945.x",
        "id": "ho-2004",
        "pmid": "15142197",
        "source": "Aliment Pharmacol Ther. 2004;19(10):1079-1087",
        "title": "Predicting the outcome of severe ulcerative colitis: development of a novel risk score to aid early selection of patients for second-line medical therapy or surgery"
      },
      "formula": "ho_index",
      "formula_expression": "Ho 2004 day-3 IV-steroid severe UC: stool_points(<4 → 0; 4 ≤ mean_stool_frequency < 6 → 1; 6 ≤ x ≤ 9 → 2; x > 9 → 4) + colonic_dilatation (true → 4) + hypoalbuminaemia (albumin_g_l < 30 → 1); max 9; medical-therapy failure 0–1 → 11%, 2–3 → 43%, ≥4 → 85% (ROC operating point ≥4)",
      "max_score": 9,
      "score": 0,
      "albumin_g_l": 35.0,
      "risk": "low",
      "colonic_dilatation": false,
      "hypoalbuminaemia": false,
      "mean_stool_frequency": 3.0,
      "medical_failure_percent": 11,
      "score_ge_4": false
    },
    {
      "components": [
        {
          "value": 3.0,
          "factor": "mean_stool_frequency",
          "points": 0,
          "present": false
        },
        {
          "factor": "colonic_dilatation",
          "points": 0,
          "present": false
        },
        {
          "value": 35.0,
          "factor": "hypoalbuminaemia",
          "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": "Ho GT, Mowat C, Goddard CJ, Fennell JM, Shah NB, Prescott RJ, Satsangi J",
        "doi": "10.1111/j.1365-2036.2004.01945.x",
        "id": "ho-2004",
        "pmid": "15142197",
        "source": "Aliment Pharmacol Ther. 2004;19(10):1079-1087",
        "title": "Predicting the outcome of severe ulcerative colitis: development of a novel risk score to aid early selection of patients for second-line medical therapy or surgery"
      },
      "formula": "ho_index",
      "formula_expression": "Ho 2004 day-3 IV-steroid severe UC: stool_points(<4 → 0; 4 ≤ mean_stool_frequency < 6 → 1; 6 ≤ x ≤ 9 → 2; x > 9 → 4) + colonic_dilatation (true → 4) + hypoalbuminaemia (albumin_g_l < 30 → 1); max 9; medical-therapy failure 0–1 → 11%, 2–3 → 43%, ≥4 → 85% (ROC operating point ≥4)",
      "max_score": 9,
      "score": 0,
      "albumin_g_l": 35.0,
      "risk": "low",
      "colonic_dilatation": false,
      "hypoalbuminaemia": false,
      "mean_stool_frequency": 3.0,
      "medical_failure_percent": 11,
      "score_ge_4": false
    }
  ]
}
```

## Response fields

- `formula` (string): ho_index
- `formula_expression` (string): Ho 2004 day-3 IV-steroid severe UC point score
- `score` (integer): Ho points 0-9
- `max_score` (integer): 9
- `risk` (string): low (score 0-1), intermediate (2-3), or high (≥4). High is the Ho 2004 ROC operating point.
- `medical_failure_percent` (integer): Printed Ho 2004 medical-therapy failure: 11 if score 0-1, 43 if 2-3, 85 if ≥4. Not a colectomy probability.
- `score_ge_4` (boolean): true when score ≥ 4 (Ho 2004 ROC operating point). Not a treatment order.
- `mean_stool_frequency` (number): Echo of the caller-assigned three-day mean stool frequency (0-40)
- `colonic_dilatation` (boolean): Echo of the caller-assigned colonic-dilatation flag
- `albumin_g_l` (number): Albumin used in g/L
- `hypoalbuminaemia` (boolean): true when albumin_g_l < 30. 30 g/L is not hypoalbuminaemia.
- `components` (array): Per-factor points
- `citation` (object): Ho 2004 APT citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": 3.0,
      "factor": "mean_stool_frequency",
      "points": 0,
      "present": false
    },
    {
      "factor": "colonic_dilatation",
      "points": 0,
      "present": false
    },
    {
      "value": 35.0,
      "factor": "hypoalbuminaemia",
      "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": "Ho GT, Mowat C, Goddard CJ, Fennell JM, Shah NB, Prescott RJ, Satsangi J",
    "doi": "10.1111/j.1365-2036.2004.01945.x",
    "id": "ho-2004",
    "pmid": "15142197",
    "source": "Aliment Pharmacol Ther. 2004;19(10):1079-1087",
    "title": "Predicting the outcome of severe ulcerative colitis: development of a novel risk score to aid early selection of patients for second-line medical therapy or surgery"
  },
  "formula": "ho_index",
  "formula_expression": "Ho 2004 day-3 IV-steroid severe UC: stool_points(<4 → 0; 4 ≤ mean_stool_frequency < 6 → 1; 6 ≤ x ≤ 9 → 2; x > 9 → 4) + colonic_dilatation (true → 4) + hypoalbuminaemia (albumin_g_l < 30 → 1); max 9; medical-therapy failure 0–1 → 11%, 2–3 → 43%, ≥4 → 85% (ROC operating point ≥4)",
  "max_score": 9,
  "score": 0,
  "albumin_g_l": 35.0,
  "risk": "low",
  "colonic_dilatation": false,
  "hypoalbuminaemia": false,
  "mean_stool_frequency": 3.0,
  "medical_failure_percent": 11,
  "score_ge_4": false
}
```

## Errors

- HTTP 400 `invalid_ho_stools`: mean_stool_frequency must be a number from 0 to 40 (Ho 2004 three-day mean). Returned before settlement; you are not charged.
- HTTP 400 `invalid_albumin`: albumin_g_dl (1-6) or albumin_g_l (10-60) is required 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

- [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.
- [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.
- [PUCAI](https://magentlab.com/docs/pucai) — Sum six caller-assigned Turner 2007 PUCAI item points and return the published total (max 85) with activity band.

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