# ICH Score

ICH Score

## Also searched as

- ICH Score
- Hemphill ICH Score
- intracerebral hemorrhage score
- ICH grading scale
- Hemphill 2001 ICH
- ICH volume IVH score
- intraventricular hemorrhage ICH Score

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

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

## What it computes

Compute the Hemphill 2001 ICH Score from caller-assigned GCS, age, infratentorial origin, ICH volume, and IVH.

## When to use

When an agent needs the published five-item ICH Score total and must not invent GCS, volume, IVH, or origin from a CT scan.

## When not to use

- Not a diagnosis and not a withdrawal-of-care protocol.
- The caller assigns GCS, ICH volume, IVH, and infratentorial origin. magent does not read a CT scan.
- This is the Hemphill 2001 ICH Score, not the FUNC score and not ICH-GS.
- The response is a point total (max 6). It does not include a 30-day mortality percentage table.

## Formula

```
ICH Score = gcs + age_ge_80 + infratentorial_origin + ich_volume_ge_30_ml + ivh; GCS 3-4 → 2, 5-12 → 1, 13-15 → 0; age >=80 1; infratentorial origin 1; volume >=30 mL 1; IVH 1; max 6
```

## Citation

[The ICH Score: a simple, reliable grading scale for intracerebral hemorrhage](https://doi.org/10.1161/01.STR.32.4.891)
Hemphill JC 3rd, Bonovich DC, Besmertis L, Manley GT, Johnston SC
Stroke. 2001;32(4):891-897
DOI: [10.1161/01.STR.32.4.891](https://doi.org/10.1161/01.STR.32.4.891)

## Worked example

### All items absent

Given: `age=70, gcs=15, ich_volume_ml=10, infratentorial_origin=false, ivh=false`

1. GCS 15 → 0; age 70 is not ≥80 → 0; infratentorial origin false → 0
2. Volume 10 mL is not ≥30 → 0; IVH false → 0
3. Score = 0 (max 6)


### All five items at maximum

Given: `age=80, gcs=3, ich_volume_ml=30, infratentorial_origin=true, ivh=true`

1. GCS 3 → 2; age 80 ≥ 80 → 1; infratentorial origin true → 1
2. Volume 30 mL ≥ 30 → 1; IVH true → 1
3. Score = 6 (max 6)


## Parameters

- `gcs` (integer, required): Caller-assigned GCS total (integer 3-15). 3-4 scores 2; 5-12 scores 1; 13-15 scores 0. magent does not compute GCS from eye, verbal, and motor here.
- `age` (integer, required): Age in years (18-120). ≥80 scores 1; 79 does not.
- `infratentorial_origin` (boolean, required): Infratentorial origin of the hemorrhage as assigned by the caller. true or false. 1 point if true. magent does not read a CT scan.
- `ich_volume_ml` (number, required): ICH volume in mL (cm^3 in Hemphill 2001). Number from 0.1 to 300. ≥30 scores 1; 29.9 does not. magent does not measure volume from imaging.
- `ivh` (boolean, required): Intraventricular hemorrhage as assigned by the caller. true or false. 1 point if true. magent does not read a CT scan.

## Bulk (POST)

POST the same path with a JSON items array. Price is n times the GET unit. Invalid items return HTTP 400 before settlement.

Method: `POST /api/calc/ich_score`
Max items: 25
Price: unit_amount * n (unit 5000 atomic)
Status: PREVIEW

- 1 to 25 items. Each item uses the same keys as the GET query parameters.
- 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": [
    {
      "age": "70",
      "gcs": "15",
      "ich_volume_ml": "10",
      "infratentorial_origin": "false",
      "ivh": "false"
    },
    {
      "age": "70",
      "gcs": "15",
      "ich_volume_ml": "10",
      "infratentorial_origin": "false",
      "ivh": "false"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/ich_score",
  "items": [
    {
      "components": [
        {
          "value": 15,
          "factor": "gcs",
          "points": 0,
          "present": false
        },
        {
          "value": 70,
          "factor": "age",
          "points": 0,
          "present": false
        },
        {
          "factor": "infratentorial_origin",
          "points": 0,
          "present": false
        },
        {
          "value": 10.0,
          "factor": "ich_volume_ml",
          "points": 0,
          "present": false
        },
        {
          "factor": "ivh",
          "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": "Hemphill JC 3rd, Bonovich DC, Besmertis L, Manley GT, Johnston SC",
        "doi": "10.1161/01.STR.32.4.891",
        "id": "hemphill-2001",
        "source": "Stroke. 2001;32(4):891-897",
        "title": "The ICH Score: a simple, reliable grading scale for intracerebral hemorrhage"
      },
      "formula": "ich_score",
      "formula_expression": "ICH Score = gcs + age_ge_80 + infratentorial_origin + ich_volume_ge_30_ml + ivh; GCS 3-4 → 2, 5-12 → 1, 13-15 → 0; age >=80 1; infratentorial origin 1; volume >=30 mL 1; IVH 1; max 6",
      "max_score": 6,
      "score": 0,
      "age_years": 70,
      "gcs": 15,
      "ich_volume_ml": 10.0
    },
    {
      "components": [
        {
          "value": 15,
          "factor": "gcs",
          "points": 0,
          "present": false
        },
        {
          "value": 70,
          "factor": "age",
          "points": 0,
          "present": false
        },
        {
          "factor": "infratentorial_origin",
          "points": 0,
          "present": false
        },
        {
          "value": 10.0,
          "factor": "ich_volume_ml",
          "points": 0,
          "present": false
        },
        {
          "factor": "ivh",
          "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": "Hemphill JC 3rd, Bonovich DC, Besmertis L, Manley GT, Johnston SC",
        "doi": "10.1161/01.STR.32.4.891",
        "id": "hemphill-2001",
        "source": "Stroke. 2001;32(4):891-897",
        "title": "The ICH Score: a simple, reliable grading scale for intracerebral hemorrhage"
      },
      "formula": "ich_score",
      "formula_expression": "ICH Score = gcs + age_ge_80 + infratentorial_origin + ich_volume_ge_30_ml + ivh; GCS 3-4 → 2, 5-12 → 1, 13-15 → 0; age >=80 1; infratentorial origin 1; volume >=30 mL 1; IVH 1; max 6",
      "max_score": 6,
      "score": 0,
      "age_years": 70,
      "gcs": 15,
      "ich_volume_ml": 10.0
    }
  ]
}
```

## Response fields

- `formula` (string): ich_score
- `formula_expression` (string): Exact expression used
- `score` (integer): Total points 0-6
- `max_score` (integer): Always 6
- `gcs` (integer): Caller-assigned GCS total used for the 3-4 / 5-12 / 13-15 bands
- `age_years` (integer): Age used for the ≥80 criterion
- `ich_volume_ml` (number): ICH volume in mL used for the ≥30 criterion
- `components` (array): Per-item points
- `citation` (object): Hemphill 2001 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": 15,
      "factor": "gcs",
      "points": 0,
      "present": false
    },
    {
      "value": 70,
      "factor": "age",
      "points": 0,
      "present": false
    },
    {
      "factor": "infratentorial_origin",
      "points": 0,
      "present": false
    },
    {
      "value": 10.0,
      "factor": "ich_volume_ml",
      "points": 0,
      "present": false
    },
    {
      "factor": "ivh",
      "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": "Hemphill JC 3rd, Bonovich DC, Besmertis L, Manley GT, Johnston SC",
    "doi": "10.1161/01.STR.32.4.891",
    "id": "hemphill-2001",
    "source": "Stroke. 2001;32(4):891-897",
    "title": "The ICH Score: a simple, reliable grading scale for intracerebral hemorrhage"
  },
  "formula": "ich_score",
  "formula_expression": "ICH Score = gcs + age_ge_80 + infratentorial_origin + ich_volume_ge_30_ml + ivh; GCS 3-4 → 2, 5-12 → 1, 13-15 → 0; age >=80 1; infratentorial origin 1; volume >=30 mL 1; IVH 1; max 6",
  "max_score": 6,
  "score": 0,
  "age_years": 70,
  "gcs": 15,
  "ich_volume_ml": 10.0
}
```

## Errors

- HTTP 400 `invalid_gcs_total`: gcs must be an integer from 3 to 15. Returned before settlement; you are not charged.
- HTTP 400 `invalid_age`: age must be an integer from 18 to 120 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_ich_volume`: ich_volume_ml must be a number from 0.1 to 300. 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

- [Glasgow Coma Scale](https://magentlab.com/docs/gcs) — Compute the Glasgow Coma Scale as the sum of caller-assigned eye, verbal, and motor integers. The 1974 or 1976 edition is required.

## Payment

Required query parameters must be present and valid. 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 EIP-3009 (scheme exact, assetTransferMethod eip3009) with validBefore = now + accepts[0].maxTimeoutSeconds (600 seconds). That window starts when you sign and must cover wallet confirmation plus CDP verify and settle. Magent retries transient facilitator 429/5xx before answering. Do not send upto or batch-settlement payloads; magent does not offer those schemes.
- Retry the same URL with PAYMENT-SIGNATURE (base64 JSON echoing accepted, payload, and extensions when present).
- Success is HTTP 200 JSON plus PAYMENT-RESPONSE. Settlement happens before the tool runs. HTTP 503 settlement_uncertain or settle_failed: retry the same PAYMENT-SIGNATURE. Mint a new 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.

- 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.
- not offered `batch-settlement`: Not offered. Payment-channel vouchers claimed later in batches. Not the same as POST {items} bulk (that is still exact).

Same-path POST {items} is still scheme exact: one EIP-3009 authorization for n times the GET unit. 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

- Invalid query parameters return HTTP 400 before settlement. You are not charged.
- Settlement finishes before the tool executes (paymentFlow upfront). 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.
