# SCORMA (Scoring Mastocytosis Index)

SCORMA

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

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

## What it computes

Compute Heide 2001 SCORMA from caller-assigned body-surface extent (0-100), four intensity signs (each 0-3), and five subjective symptoms (each 0-10) using scorma = extent_percent/5 + 5*intensity_sum + 2*symptom_sum/5. Theoretical max 100. All-zero is 0.

## When to use

When an agent already has caller-assigned Heide 2001 SCORMA extent, intensity signs, and subjective symptom values and needs the published 0-100 index. magent does not examine the skin, assign Darier's sign, diagnose mastocytosis, apply WHO/ICC criteria, compute REMA, or assay tryptase.

## When not to use

- Not a medical device and not a diagnosis of mastocytosis or a treatment order. magent does not examine the skin or assign Darier's sign. Extent, intensity signs, and subjective symptoms are caller-assigned.
- Not WHO or ICC mastocytosis diagnostic criteria. Not REMA. magent does not assay tryptase.
- Heide 2001 equalized parts A, B, and C toward a 0-100 index (A/5 + 5B + 2C/5). All-zero is 0. magent does not apply a 5.2 floor or mild/moderate/severe bands that paper did not publish.
- Diffuse cutaneous mastocytosis is scored as extent_percent 100 as published. magent does not map body regions to that percent.

## Formula

```
scorma = extent_percent/5 + 5*intensity_sum + 2*symptom_sum/5; intensity_sum = pigmentation + vesiculation + elevation_induration + darier_sign (each integer 0-3); symptom_sum = flushing + provocation_factors + diarrhoea + bone_pain + pruritus (each integer 0-10); extent_percent 0-100 (diffuse cutaneous mastocytosis is 100); theoretical max 100; Heide 2001; magent does not examine the skin or assign Darier's sign; not a diagnosis; not WHO/ICC mastocytosis criteria; not REMA; not tryptase
```

## Citation

[Clinical scoring of cutaneous mastocytosis](https://doi.org/10.1080/00015550152572912)
Heide R, Middelkamp Hup MA, Mulder PG, Oranje AP
Acta Derm Venereol. 2001;81(4):273-276
DOI: [10.1080/00015550152572912](https://doi.org/10.1080/00015550152572912)

## Worked example

### All zeros

Given: `bone_pain=0, darier_sign=0, diarrhoea=0, elevation_induration=0, extent_percent=0, flushing=0, pigmentation=0, provocation_factors=0, pruritus=0, vesiculation=0`

1. extent_percent 0; every intensity sign 0; every subjective symptom 0 as assigned by the caller
2. scorma = 0/5 + 5*0 + 2*0/5 = 0.0 (max 100). All-zero is 0. This paper published no mild/moderate/severe SCORMA cutoff.


### Diffuse cutaneous mastocytosis extent only

Given: `bone_pain=0, darier_sign=0, diarrhoea=0, elevation_induration=0, extent_percent=100, flushing=0, pigmentation=0, provocation_factors=0, pruritus=0, vesiculation=0`

1. extent_percent 100 (diffuse cutaneous mastocytosis); intensity_sum 0; symptom_sum 0
2. scorma = 100/5 + 5*0 + 2*0/5 = 20.0 (max 100). No severity band.


### Published theoretical maximum

Given: `bone_pain=10, darier_sign=3, diarrhoea=10, elevation_induration=3, extent_percent=100, flushing=10, pigmentation=3, provocation_factors=10, pruritus=10, vesiculation=3`

1. extent_percent 100; each intensity sign 3 (sum 12); each symptom 10 (sum 50)
2. scorma = 100/5 + 5*12 + 2*50/5 = 20 + 60 + 20 = 100.0 (max 100). No severity band.


## Also searched as

- SCORMA
- SCORMA Index
- Scoring Mastocytosis Index
- Heide SCORMA
- Heide 2001 SCORMA
- cutaneous mastocytosis score
- mastocytosis SCORMA
- clinical scoring of cutaneous mastocytosis

## Parameters

- `extent_percent` (number, required): Caller-assigned Heide 2001 SCORMA part A body-surface extent (number 0-100). Diffuse cutaneous mastocytosis is 100. magent does not examine the skin.
- `pigmentation` (integer, required): Caller-assigned Heide 2001 SCORMA part B pigmentation (integer 0-3). magent does not examine the skin.
- `vesiculation` (integer, required): Caller-assigned Heide 2001 SCORMA part B vesiculation (integer 0-3). magent does not examine the skin.
- `elevation_induration` (integer, required): Caller-assigned Heide 2001 SCORMA part B elevation/induration (integer 0-3). magent does not examine the skin.
- `darier_sign` (integer, required): Caller-assigned Heide 2001 SCORMA part B Darier's sign (integer 0-3). magent does not examine the skin or assign Darier's sign.
- `flushing` (integer, required): Caller-assigned Heide 2001 SCORMA part C flushing (integer 0-10). magent does not take a history.
- `provocation_factors` (integer, required): Caller-assigned Heide 2001 SCORMA part C provocation factors (integer 0-10). magent does not take a history.
- `diarrhoea` (integer, required): Caller-assigned Heide 2001 SCORMA part C diarrhoea (integer 0-10). magent does not take a history.
- `bone_pain` (integer, required): Caller-assigned Heide 2001 SCORMA part C bone pain (integer 0-10). magent does not take a history.
- `pruritus` (integer, required): Caller-assigned Heide 2001 SCORMA part C pruritus (integer 0-10). magent does not take a history.

## 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/scorma`
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": [
    {
      "bone_pain": "0",
      "darier_sign": "0",
      "diarrhoea": "0",
      "elevation_induration": "0",
      "extent_percent": "0",
      "flushing": "0",
      "pigmentation": "0",
      "provocation_factors": "0",
      "pruritus": "0",
      "vesiculation": "0"
    },
    {
      "bone_pain": "0",
      "darier_sign": "0",
      "diarrhoea": "0",
      "elevation_induration": "0",
      "extent_percent": "0",
      "flushing": "0",
      "pigmentation": "0",
      "provocation_factors": "0",
      "pruritus": "0",
      "vesiculation": "0"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/scorma",
  "items": [
    {
      "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": "Heide R, Middelkamp Hup MA, Mulder PG, Oranje AP",
        "doi": "10.1080/00015550152572912",
        "id": "heide-2001",
        "pmid": "11720175",
        "source": "Acta Derm Venereol. 2001;81(4):273-276",
        "title": "Clinical scoring of cutaneous mastocytosis"
      },
      "formula": "scorma",
      "formula_expression": "scorma = extent_percent/5 + 5*intensity_sum + 2*symptom_sum/5; intensity_sum = pigmentation + vesiculation + elevation_induration + darier_sign (each integer 0-3); symptom_sum = flushing + provocation_factors + diarrhoea + bone_pain + pruritus (each integer 0-10); extent_percent 0-100 (diffuse cutaneous mastocytosis is 100); theoretical max 100; Heide 2001; magent does not examine the skin or assign Darier's sign; not a diagnosis; not WHO/ICC mastocytosis criteria; not REMA; not tryptase",
      "max_score": 100,
      "bone_pain": 0,
      "darier_sign": 0,
      "diarrhoea": 0,
      "elevation_induration": 0,
      "extent_percent": 0.0,
      "flushing": 0,
      "intensity_sum": 0,
      "pigmentation": 0,
      "provocation_factors": 0,
      "pruritus": 0,
      "scorma": 0.0,
      "symptom_sum": 0,
      "vesiculation": 0
    },
    {
      "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": "Heide R, Middelkamp Hup MA, Mulder PG, Oranje AP",
        "doi": "10.1080/00015550152572912",
        "id": "heide-2001",
        "pmid": "11720175",
        "source": "Acta Derm Venereol. 2001;81(4):273-276",
        "title": "Clinical scoring of cutaneous mastocytosis"
      },
      "formula": "scorma",
      "formula_expression": "scorma = extent_percent/5 + 5*intensity_sum + 2*symptom_sum/5; intensity_sum = pigmentation + vesiculation + elevation_induration + darier_sign (each integer 0-3); symptom_sum = flushing + provocation_factors + diarrhoea + bone_pain + pruritus (each integer 0-10); extent_percent 0-100 (diffuse cutaneous mastocytosis is 100); theoretical max 100; Heide 2001; magent does not examine the skin or assign Darier's sign; not a diagnosis; not WHO/ICC mastocytosis criteria; not REMA; not tryptase",
      "max_score": 100,
      "bone_pain": 0,
      "darier_sign": 0,
      "diarrhoea": 0,
      "elevation_induration": 0,
      "extent_percent": 0.0,
      "flushing": 0,
      "intensity_sum": 0,
      "pigmentation": 0,
      "provocation_factors": 0,
      "pruritus": 0,
      "scorma": 0.0,
      "symptom_sum": 0,
      "vesiculation": 0
    }
  ]
}
```

## Response fields

- `formula` (string): scorma
- `formula_expression` (string): Exact expression used
- `extent_percent` (number): Caller-assigned Heide 2001 part A extent 0-100 used
- `pigmentation` (integer): Caller-assigned pigmentation intensity 0-3 used
- `vesiculation` (integer): Caller-assigned vesiculation intensity 0-3 used
- `elevation_induration` (integer): Caller-assigned elevation/induration intensity 0-3 used
- `darier_sign` (integer): Caller-assigned Darier's sign intensity 0-3 used
- `intensity_sum` (integer): Sum of the four part B intensity signs (0-12)
- `flushing` (integer): Caller-assigned flushing symptom 0-10 used
- `provocation_factors` (integer): Caller-assigned provocation-factor symptom 0-10 used
- `diarrhoea` (integer): Caller-assigned diarrhoea symptom 0-10 used
- `bone_pain` (integer): Caller-assigned bone-pain symptom 0-10 used
- `pruritus` (integer): Caller-assigned pruritus symptom 0-10 used
- `symptom_sum` (integer): Sum of the five part C subjective symptoms (0-50)
- `scorma` (number): Heide 2001 SCORMA index, 1 decimal: extent_percent/5 + 5*intensity_sum + 2*symptom_sum/5 (0-100)
- `max_score` (integer): Always 100 (20 + 60 + 20)
- `citation` (object): Heide et al. Acta Derm Venereol 2001 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "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": "Heide R, Middelkamp Hup MA, Mulder PG, Oranje AP",
    "doi": "10.1080/00015550152572912",
    "id": "heide-2001",
    "pmid": "11720175",
    "source": "Acta Derm Venereol. 2001;81(4):273-276",
    "title": "Clinical scoring of cutaneous mastocytosis"
  },
  "formula": "scorma",
  "formula_expression": "scorma = extent_percent/5 + 5*intensity_sum + 2*symptom_sum/5; intensity_sum = pigmentation + vesiculation + elevation_induration + darier_sign (each integer 0-3); symptom_sum = flushing + provocation_factors + diarrhoea + bone_pain + pruritus (each integer 0-10); extent_percent 0-100 (diffuse cutaneous mastocytosis is 100); theoretical max 100; Heide 2001; magent does not examine the skin or assign Darier's sign; not a diagnosis; not WHO/ICC mastocytosis criteria; not REMA; not tryptase",
  "max_score": 100,
  "bone_pain": 0,
  "darier_sign": 0,
  "diarrhoea": 0,
  "elevation_induration": 0,
  "extent_percent": 0.0,
  "flushing": 0,
  "intensity_sum": 0,
  "pigmentation": 0,
  "provocation_factors": 0,
  "pruritus": 0,
  "scorma": 0.0,
  "symptom_sum": 0,
  "vesiculation": 0
}
```

## Errors

- HTTP 400 `invalid_scorma_extent`: extent_percent must be a number from 0 to 100 (Heide 2001 SCORMA part A). Returned before settlement; you are not charged.
- HTTP 400 `invalid_scorma_intensity`: each SCORMA intensity sign must be an integer from 0 to 3 (Heide 2001 part B). Returned before settlement; you are not charged.
- HTTP 400 `invalid_scorma_symptom`: each SCORMA subjective symptom must be an integer from 0 to 10 (Heide 2001 part C). 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

- [REMA](https://magentlab.com/docs/rema) — Sum the Álvarez-Twose 2012 REMA points (sex, serum baseline tryptase, pruritus/hives/angioedema, syncope or presyncope) and return whether the total is ≥2 (published clonality and systemic-mastocytosis triage threshold).
- [WHO 2016 SM criteria](https://magentlab.com/docs/who-sm) — Apply the Valent 2016 / WHO 2016 systemic mastocytosis diagnostic criteria (Table 1) and return whether the published combination of the major criterion plus at least one minor, or at least three minors, is met. Tryptase >20 ng/mL does not count when an unrelated myeloid neoplasm is present.
- [MAPS](https://magentlab.com/docs/maps) — Sum the Pardanani 2018 MAPS hybrid clinical-molecular (Figure 3) points for systemic mastocytosis and return low (≤2), intermediate_1 (3), intermediate_2 (4), or high (≥5).

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