# ALT-70 cellulitis score

ALT-70

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

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

## What it computes

Sum the Raff 2017 ALT-70 items (unilateral involvement, leukocytosis, tachycardia, age ≥70) and return the published 0-2 / 3-4 / >=5 band.

## When to use

When an agent needs the published Raff 2017 ALT-70 total and must not invent a cellulitis diagnosis or an antibiotic order.

## When not to use

- Not a medical device.
- Not a cellulitis diagnosis and not an antibiotic order.
- Raff 2017 lower-extremity emergency-department derivation. magent does not examine the limb; unilateral is assigned by the caller.
- Bands are Raff 2017 point regions 0-2, 3-4, and >=5. Percents are not returned.

## Formula

```
ALT-70 = (unilateral → 3) + (WBC >= 10000/µL → 1) + (heart_rate_bpm >= 90 → 1) + (age >= 70 → 2); max 7; bands 0-2 / 3-4 / >=5
```

## Citation

[A predictive model for diagnosis of lower extremity cellulitis: A cross-sectional study.](https://doi.org/10.1016/j.jaad.2016.12.044)
Raff AB, Weng QY, Cohen JM, et al.
J Am Acad Dermatol. 2017;76(4):618-625.e2
DOI: [10.1016/j.jaad.2016.12.044](https://doi.org/10.1016/j.jaad.2016.12.044)

## Worked example

### All items absent

Given: `age=40, heart_rate_bpm=80, unilateral=false, wbc_k_ul=8`

1. Unilateral false → 0; WBC 8 k/µL <10 → 0; HR 80 <90 → 0; age 40 <70 → 0
2. Score = 0 (max 7); band 0-2


### All four items present

Given: `age=70, heart_rate_bpm=90, unilateral=true, wbc_k_ul=10`

1. Unilateral true → 3; WBC ≥10,000/µL → 1; HR ≥90 → 1; age ≥70 → 2
2. Score = 7 (max 7); band >=5


## Also searched as

- ALT-70
- ALT 70 score
- Raff ALT-70
- cellulitis ALT-70
- pseudocellulitis score
- asymmetry leukocytosis tachycardia 70
- lower extremity cellulitis score

## Parameters

- `age` (integer, required): Age in years (18-120). Raff 2017: scores 2 when ≥70. Age 69 does not score.
- `unilateral` (boolean, required): Unilateral (asymmetric) lower-extremity involvement (Raff 2017). true or false as assigned by the caller. 3 points if true. magent does not examine the limb.
- `wbc_k_ul` (number, optional): WBC in 10^3/µL (same as k/µL or 10^9/L). Provide wbc_k_ul or wbc_ul. Range 0.01-500. ≥10 (10,000/µL) scores 1. 9.9 does not score.
- `wbc_ul` (number, optional): WBC in cells/µL (same as cells/mm^3). Provide wbc_k_ul or wbc_ul. Range 10-500000. ≥10,000/µL scores 1.
- `heart_rate_bpm` (integer, required): Heart rate in beats per minute (integer 30-220). Raff 2017: scores 1 when ≥90. Heart rate 89 does not score.

## 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/alt_70`
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": [
    {
      "age": "40",
      "heart_rate_bpm": "80",
      "unilateral": "false",
      "wbc_k_ul": "8"
    },
    {
      "age": "40",
      "heart_rate_bpm": "80",
      "unilateral": "false",
      "wbc_k_ul": "8"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/alt_70",
  "items": [
    {
      "band": "0-2",
      "components": [
        {
          "factor": "unilateral",
          "points": 0,
          "present": false
        },
        {
          "value": 8.0e3,
          "factor": "leukocytosis",
          "points": 0,
          "present": false
        },
        {
          "value": 80,
          "factor": "tachycardia",
          "points": 0,
          "present": false
        },
        {
          "value": 40,
          "factor": "age_ge_70",
          "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.",
      "age_years": 40,
      "citation": {
        "authors": "Raff AB, Weng QY, Cohen JM, et al.",
        "doi": "10.1016/j.jaad.2016.12.044",
        "id": "raff-2017",
        "pmid": "28215446",
        "source": "J Am Acad Dermatol. 2017;76(4):618-625.e2",
        "title": "A predictive model for diagnosis of lower extremity cellulitis: A cross-sectional study."
      },
      "formula": "alt_70",
      "formula_expression": "ALT-70 = (unilateral → 3) + (WBC >= 10000/µL → 1) + (heart_rate_bpm >= 90 → 1) + (age >= 70 → 2); max 7; bands 0-2 / 3-4 / >=5",
      "max_score": 7,
      "score": 0,
      "wbc_per_ul": 8.0e3,
      "heart_rate_bpm": 80,
      "unilateral": false
    },
    {
      "band": "0-2",
      "components": [
        {
          "factor": "unilateral",
          "points": 0,
          "present": false
        },
        {
          "value": 8.0e3,
          "factor": "leukocytosis",
          "points": 0,
          "present": false
        },
        {
          "value": 80,
          "factor": "tachycardia",
          "points": 0,
          "present": false
        },
        {
          "value": 40,
          "factor": "age_ge_70",
          "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.",
      "age_years": 40,
      "citation": {
        "authors": "Raff AB, Weng QY, Cohen JM, et al.",
        "doi": "10.1016/j.jaad.2016.12.044",
        "id": "raff-2017",
        "pmid": "28215446",
        "source": "J Am Acad Dermatol. 2017;76(4):618-625.e2",
        "title": "A predictive model for diagnosis of lower extremity cellulitis: A cross-sectional study."
      },
      "formula": "alt_70",
      "formula_expression": "ALT-70 = (unilateral → 3) + (WBC >= 10000/µL → 1) + (heart_rate_bpm >= 90 → 1) + (age >= 70 → 2); max 7; bands 0-2 / 3-4 / >=5",
      "max_score": 7,
      "score": 0,
      "wbc_per_ul": 8.0e3,
      "heart_rate_bpm": 80,
      "unilateral": false
    }
  ]
}
```

## Response fields

- `formula` (string): alt_70
- `formula_expression` (string): Exact expression used
- `score` (integer): ALT-70 points 0-7
- `max_score` (integer): 7
- `band` (string): Raff 2017 point region: 0-2 (pseudocellulitis-leaning), 3-4 (indeterminate), or >=5 (cellulitis-leaning). A band, not a diagnosis. Percents are not returned.
- `age_years` (integer): Age used for the ≥70 criterion
- `unilateral` (boolean): Unilateral-involvement flag used
- `wbc_per_ul` (number): WBC in cells/µL used
- `heart_rate_bpm` (integer): Heart rate used, bpm
- `components` (array): Per-item Raff 2017 points
- `citation` (object): Raff et al. J Am Acad Dermatol 2017 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "band": "0-2",
  "components": [
    {
      "factor": "unilateral",
      "points": 0,
      "present": false
    },
    {
      "value": 8.0e3,
      "factor": "leukocytosis",
      "points": 0,
      "present": false
    },
    {
      "value": 80,
      "factor": "tachycardia",
      "points": 0,
      "present": false
    },
    {
      "value": 40,
      "factor": "age_ge_70",
      "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.",
  "age_years": 40,
  "citation": {
    "authors": "Raff AB, Weng QY, Cohen JM, et al.",
    "doi": "10.1016/j.jaad.2016.12.044",
    "id": "raff-2017",
    "pmid": "28215446",
    "source": "J Am Acad Dermatol. 2017;76(4):618-625.e2",
    "title": "A predictive model for diagnosis of lower extremity cellulitis: A cross-sectional study."
  },
  "formula": "alt_70",
  "formula_expression": "ALT-70 = (unilateral → 3) + (WBC >= 10000/µL → 1) + (heart_rate_bpm >= 90 → 1) + (age >= 70 → 2); max 7; bands 0-2 / 3-4 / >=5",
  "max_score": 7,
  "score": 0,
  "wbc_per_ul": 8.0e3,
  "heart_rate_bpm": 80,
  "unilateral": false
}
```

## Errors

- 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_wbc`: wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required Returned before settlement; you are not charged.
- HTTP 400 `invalid_heart_rate`: heart_rate_bpm must be an integer from 30 to 220 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

- [LRINEC](https://magentlab.com/docs/lrinec) — Sum the Wong 2004 LRINEC laboratory table and return whether the total is at or above the published cutoff of 6.
- [SIRS](https://magentlab.com/docs/sirs) — Compute the Bone 1992 ACCP/SCCM SIRS criteria from temperature, heart rate, respiratory rate, and WBC, with optional PaCO2 and band percent.

## 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 echoing accepted, payload, and extensions when present).
- 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.
- 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.
