# HScore

HScore

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

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

## What it computes

Sum the nine Fardet 2014 Table 4 HScore items from caller-assigned bands and return whether the total is ≥169 (published best cutoff).

## When to use

When an agent has already assigned Fardet 2014 Table 4 bands (not raw labs) and needs the published HScore total and ≥169 cutoff, not an HLH-2004 diagnosis and not a Table 5 probability for every integer.

## When not to use

- Not a medical device. Not a diagnosis of reactive hemophagocytic syndrome, HLH, or macrophage activation syndrome.
- This is Fardet 2014 Table 4 HScore only. Not HLH-2004. magent does not interpolate Table 5 probabilities for every integer.
- All nine Table 4 items are required. magent does not take raw labs; the caller assigns published bands.
- Bone marrow hemophagocytosis is one scored item (35 points if present). It is not required for a diagnosis; this tool is not a diagnosis.

## Formula

```
HScore = immunosuppression (true 18) + temperature_band (lt_38_4 0, 38_4_to_39_4 33, gt_39_4 49) + organomegaly (none 0, hepato_or_spleno 23, hepato_and_spleno 38) + cytopenia_lineages (1 → 0, 2 → 24, 3 → 34) + ferritin_band (lt_2000 0, 2000_to_6000 35, gt_6000 50) + triglyceride_band (lt_1_5 0, 1_5_to_4 44, gt_4 64) + fibrinogen_band (gt_2_5 0, le_2_5 30) + sgot_band (lt_30 0, ge_30 19) + marrow_hemophagocytosis (true 35); Fardet 2014 Table 4; max 337; score_ge_169 iff total >= 169 (Table 5 best cutoff)
```

## Citation

[Development and validation of the HScore, a score for the diagnosis of reactive hemophagocytic syndrome](https://doi.org/10.1002/art.38690)
Fardet L, Galicier L, Lambotte O, Marzac C, Aumont C, Chahwan D, Coppo P, Hejblum G
Arthritis Rheumatol. 2014;66(9):2613-2620
DOI: [10.1002/art.38690](https://doi.org/10.1002/art.38690)

## Worked example

### All lowest bands and false flags

Given: `cytopenia_lineages=1, ferritin_band=lt_2000, fibrinogen_band=gt_2_5, immunosuppression=false, marrow_hemophagocytosis=false, organomegaly=none, sgot_band=lt_30, temperature_band=lt_38_4, triglyceride_band=lt_1_5`

1. Each Table 4 item at the 0-point band or false
2. Score = 0 (max 337); score_ge_169 false (below the ≥169 cutoff)


### Published best cutoff 169

Given: `cytopenia_lineages=1, ferritin_band=lt_2000, fibrinogen_band=gt_2_5, immunosuppression=true, marrow_hemophagocytosis=false, organomegaly=hepato_and_spleno, sgot_band=lt_30, temperature_band=gt_39_4, triglyceride_band=gt_4`

1. trig_high 64 + temp_high 49 + organo_and 38 + immunosuppression 18
2. Score = 169 (max 337); score_ge_169 true (Fardet 2014 Table 5 best cutoff)


## Also searched as

- HScore
- Fardet HScore
- reactive hemophagocytic syndrome score
- HScore Fardet 2014
- hemophagocytic syndrome HScore
- HScore 169 cutoff
- Fardet 2014 hemophagocytosis

## Parameters

- `immunosuppression` (boolean, required): Known underlying immunosuppression as assigned by the caller (Fardet 2014 Table 4 footnote: HIV positive or long-term glucocorticoids, cyclosporine, or azathioprine). true scores 18; false scores 0.
- `temperature_band` (string, required): Caller-assigned Fardet 2014 Table 4 temperature band (°C). lt_38_4 (<38.4) scores 0; 38_4_to_39_4 (38.4–39.4) scores 33; gt_39_4 (>39.4) scores 49. magent does not take a raw temperature.
- `organomegaly` (string, required): Caller-assigned Fardet 2014 Table 4 organomegaly. none scores 0; hepato_or_spleno (hepatomegaly or splenomegaly) scores 23; hepato_and_spleno (hepatomegaly and splenomegaly) scores 38. magent does not examine the patient.
- `cytopenia_lineages` (integer, required): Caller-assigned number of cytopenia lineages (integer 1, 2, or 3). 1 scores 0; 2 scores 24; 3 scores 34. Zero cytopenias were not assessed in Fardet 2014 and are rejected. Cytopenia definition (paper footnote, caller already applied): Hb ≤9.2 g/dL and/or WBC ≤5000/mm³ and/or platelets ≤110000/mm³. magent does not take those labs.
- `ferritin_band` (string, required): Caller-assigned Fardet 2014 Table 4 ferritin band (ng/ml). lt_2000 (<2000) scores 0; 2000_to_6000 (2000–6000) scores 35; gt_6000 (>6000) scores 50. magent does not take a raw ferritin.
- `triglyceride_band` (string, required): Caller-assigned Fardet 2014 Table 4 triglyceride band (mmol/L). lt_1_5 (<1.5) scores 0; 1_5_to_4 (1.5–4.0) scores 44; gt_4 (>4.0) scores 64. magent does not take a raw triglyceride.
- `fibrinogen_band` (string, required): Caller-assigned Fardet 2014 Table 4 fibrinogen band (g/L). gt_2_5 (>2.5) scores 0; le_2_5 (≤2.5) scores 30. magent does not take a raw fibrinogen.
- `sgot_band` (string, required): Caller-assigned Fardet 2014 Table 4 SGOT/AST band (IU/L). lt_30 (<30) scores 0; ge_30 (≥30) scores 19. magent does not take a raw SGOT.
- `marrow_hemophagocytosis` (boolean, required): Hemophagocytosis features on bone marrow aspirate as assigned by the caller (Fardet 2014 Table 4). true scores 35; false scores 0. Not required for a diagnosis; this tool is not a diagnosis.

## 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/hscore`
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": [
    {
      "cytopenia_lineages": "1",
      "ferritin_band": "lt_2000",
      "fibrinogen_band": "gt_2_5",
      "immunosuppression": "false",
      "marrow_hemophagocytosis": "false",
      "organomegaly": "none",
      "sgot_band": "lt_30",
      "temperature_band": "lt_38_4",
      "triglyceride_band": "lt_1_5"
    },
    {
      "cytopenia_lineages": "1",
      "ferritin_band": "lt_2000",
      "fibrinogen_band": "gt_2_5",
      "immunosuppression": "false",
      "marrow_hemophagocytosis": "false",
      "organomegaly": "none",
      "sgot_band": "lt_30",
      "temperature_band": "lt_38_4",
      "triglyceride_band": "lt_1_5"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/hscore",
  "items": [
    {
      "components": [
        {
          "factor": "immunosuppression",
          "points": 0,
          "present": false
        },
        {
          "value": "lt_38_4",
          "factor": "temperature_band",
          "points": 0,
          "present": false
        },
        {
          "value": "none",
          "factor": "organomegaly",
          "points": 0,
          "present": false
        },
        {
          "value": 1,
          "factor": "cytopenia_lineages",
          "points": 0,
          "present": false
        },
        {
          "value": "lt_2000",
          "factor": "ferritin_band",
          "points": 0,
          "present": false
        },
        {
          "value": "lt_1_5",
          "factor": "triglyceride_band",
          "points": 0,
          "present": false
        },
        {
          "value": "gt_2_5",
          "factor": "fibrinogen_band",
          "points": 0,
          "present": false
        },
        {
          "value": "lt_30",
          "factor": "sgot_band",
          "points": 0,
          "present": false
        },
        {
          "factor": "marrow_hemophagocytosis",
          "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": "Fardet L, Galicier L, Lambotte O, Marzac C, Aumont C, Chahwan D, Coppo P, Hejblum G",
        "doi": "10.1002/art.38690",
        "id": "fardet-2014",
        "pmid": "24782338",
        "source": "Arthritis Rheumatol. 2014;66(9):2613-2620",
        "title": "Development and validation of the HScore, a score for the diagnosis of reactive hemophagocytic syndrome"
      },
      "formula": "hscore",
      "formula_expression": "HScore = immunosuppression (true 18) + temperature_band (lt_38_4 0, 38_4_to_39_4 33, gt_39_4 49) + organomegaly (none 0, hepato_or_spleno 23, hepato_and_spleno 38) + cytopenia_lineages (1 → 0, 2 → 24, 3 → 34) + ferritin_band (lt_2000 0, 2000_to_6000 35, gt_6000 50) + triglyceride_band (lt_1_5 0, 1_5_to_4 44, gt_4 64) + fibrinogen_band (gt_2_5 0, le_2_5 30) + sgot_band (lt_30 0, ge_30 19) + marrow_hemophagocytosis (true 35); Fardet 2014 Table 4; max 337; score_ge_169 iff total >= 169 (Table 5 best cutoff)",
      "max_score": 337,
      "score": 0,
      "score_ge_169": false
    },
    {
      "components": [
        {
          "factor": "immunosuppression",
          "points": 0,
          "present": false
        },
        {
          "value": "lt_38_4",
          "factor": "temperature_band",
          "points": 0,
          "present": false
        },
        {
          "value": "none",
          "factor": "organomegaly",
          "points": 0,
          "present": false
        },
        {
          "value": 1,
          "factor": "cytopenia_lineages",
          "points": 0,
          "present": false
        },
        {
          "value": "lt_2000",
          "factor": "ferritin_band",
          "points": 0,
          "present": false
        },
        {
          "value": "lt_1_5",
          "factor": "triglyceride_band",
          "points": 0,
          "present": false
        },
        {
          "value": "gt_2_5",
          "factor": "fibrinogen_band",
          "points": 0,
          "present": false
        },
        {
          "value": "lt_30",
          "factor": "sgot_band",
          "points": 0,
          "present": false
        },
        {
          "factor": "marrow_hemophagocytosis",
          "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": "Fardet L, Galicier L, Lambotte O, Marzac C, Aumont C, Chahwan D, Coppo P, Hejblum G",
        "doi": "10.1002/art.38690",
        "id": "fardet-2014",
        "pmid": "24782338",
        "source": "Arthritis Rheumatol. 2014;66(9):2613-2620",
        "title": "Development and validation of the HScore, a score for the diagnosis of reactive hemophagocytic syndrome"
      },
      "formula": "hscore",
      "formula_expression": "HScore = immunosuppression (true 18) + temperature_band (lt_38_4 0, 38_4_to_39_4 33, gt_39_4 49) + organomegaly (none 0, hepato_or_spleno 23, hepato_and_spleno 38) + cytopenia_lineages (1 → 0, 2 → 24, 3 → 34) + ferritin_band (lt_2000 0, 2000_to_6000 35, gt_6000 50) + triglyceride_band (lt_1_5 0, 1_5_to_4 44, gt_4 64) + fibrinogen_band (gt_2_5 0, le_2_5 30) + sgot_band (lt_30 0, ge_30 19) + marrow_hemophagocytosis (true 35); Fardet 2014 Table 4; max 337; score_ge_169 iff total >= 169 (Table 5 best cutoff)",
      "max_score": 337,
      "score": 0,
      "score_ge_169": false
    }
  ]
}
```

## Response fields

- `formula` (string): hscore
- `formula_expression` (string): Exact expression used
- `score` (integer): HScore points 0-337
- `max_score` (integer): 337
- `score_ge_169` (boolean): true iff score ≥ 169 (Fardet 2014 Table 5 best cutoff; sensitivity 93%, specificity 86%, accurate classification 90%). Not a diagnosis.
- `components` (array): Per-item Table 4 points
- `citation` (object): Fardet et al. Arthritis Rheumatol 2014 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "factor": "immunosuppression",
      "points": 0,
      "present": false
    },
    {
      "value": "lt_38_4",
      "factor": "temperature_band",
      "points": 0,
      "present": false
    },
    {
      "value": "none",
      "factor": "organomegaly",
      "points": 0,
      "present": false
    },
    {
      "value": 1,
      "factor": "cytopenia_lineages",
      "points": 0,
      "present": false
    },
    {
      "value": "lt_2000",
      "factor": "ferritin_band",
      "points": 0,
      "present": false
    },
    {
      "value": "lt_1_5",
      "factor": "triglyceride_band",
      "points": 0,
      "present": false
    },
    {
      "value": "gt_2_5",
      "factor": "fibrinogen_band",
      "points": 0,
      "present": false
    },
    {
      "value": "lt_30",
      "factor": "sgot_band",
      "points": 0,
      "present": false
    },
    {
      "factor": "marrow_hemophagocytosis",
      "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": "Fardet L, Galicier L, Lambotte O, Marzac C, Aumont C, Chahwan D, Coppo P, Hejblum G",
    "doi": "10.1002/art.38690",
    "id": "fardet-2014",
    "pmid": "24782338",
    "source": "Arthritis Rheumatol. 2014;66(9):2613-2620",
    "title": "Development and validation of the HScore, a score for the diagnosis of reactive hemophagocytic syndrome"
  },
  "formula": "hscore",
  "formula_expression": "HScore = immunosuppression (true 18) + temperature_band (lt_38_4 0, 38_4_to_39_4 33, gt_39_4 49) + organomegaly (none 0, hepato_or_spleno 23, hepato_and_spleno 38) + cytopenia_lineages (1 → 0, 2 → 24, 3 → 34) + ferritin_band (lt_2000 0, 2000_to_6000 35, gt_6000 50) + triglyceride_band (lt_1_5 0, 1_5_to_4 44, gt_4 64) + fibrinogen_band (gt_2_5 0, le_2_5 30) + sgot_band (lt_30 0, ge_30 19) + marrow_hemophagocytosis (true 35); Fardet 2014 Table 4; max 337; score_ge_169 iff total >= 169 (Table 5 best cutoff)",
  "max_score": 337,
  "score": 0,
  "score_ge_169": false
}
```

## Errors

- HTTP 400 `invalid_hscore_band`: temperature_band, organomegaly, cytopenia_lineages, ferritin_band, triglyceride_band, fibrinogen_band, and sgot_band must be Fardet 2014 Table 4 values. 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

- [4Ts score](https://magentlab.com/docs/four-ts) — Compute the Lo 2006 4Ts score as the sum of four caller-assigned integers 0-2 (thrombocytopenia, timing, thrombosis, other causes).
- [SIC score](https://magentlab.com/docs/sic) — Sum Iba 2017 Table 3 SIC items (platelets, INR, and four-item SOFA capped at 2) and return the point total and whether published SIC criteria are met.
- [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 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.
