# 4Ts score

4Ts score

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

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

## What it computes

Compute the Lo 2006 4Ts score as the sum of four caller-assigned integers 0-2 (thrombocytopenia, timing, thrombosis, other causes).

## When to use

When an agent has already applied the Lo 2006 table and needs the published 4Ts total and pretest-probability band, not a HIT antibody result or HEP score.

## When not to use

- Not a diagnosis of HIT.
- This is the 4Ts score (Lo 2006), not the HEP score and not a HIT antibody result.
- thrombocytopenia, timing, thrombosis, and other_causes are caller-assigned integers 0-2 using the published Lo 2006 table. magent does not grade platelet counts or day of onset.
- Bands 0-3 / 4-5 / 6-8 are pretest probability groups (low / intermediate / high), not an antibody result.

## Formula

```
4Ts = thrombocytopenia + timing + thrombosis + other_causes; each 0-2 caller-assigned from Lo 2006 table; pretest probability low 0-3, intermediate 4-5, high 6-8; max 8
```

## Citation

[Evaluation of pretest clinical score (4 T's) for the diagnosis of heparin-induced thrombocytopenia in two clinical settings](https://doi.org/10.1111/j.1538-7836.2006.01787.x)
Lo GK, Juhl D, Warkentin TE, Sigouin CS, Eichler P, Greinacher A
J Thromb Haemost. 2006;4(4):759-765
DOI: [10.1111/j.1538-7836.2006.01787.x](https://doi.org/10.1111/j.1538-7836.2006.01787.x)

## Worked example

### All components 0

Given: `other_causes=0, thrombocytopenia=0, thrombosis=0, timing=0`

1. thrombocytopenia 0; timing 0; thrombosis 0; other_causes 0
2. Score = 0; band 0-3 (low pretest probability)


## Also searched as

- 4Ts score
- 4 T's HIT
- four Ts heparin
- HIT pretest 4Ts
- Lo 2006 4Ts
- heparin-induced thrombocytopenia 4Ts
- 4Ts thrombocytopenia score
- oTher causes HIT score

## Parameters

- `thrombocytopenia` (integer, required): Caller-assigned Lo 2006 thrombocytopenia points (0, 1, or 2). magent does not grade platelet counts. 2: platelet fall >50% AND nadir >=20. 1: fall 30-50% OR nadir 10-19. 0: fall <30% OR nadir <10.
- `timing` (integer, required): Caller-assigned Lo 2006 timing points (0, 1, or 2). magent does not infer day of onset. 2: clear onset days 5-10, or <=1 day with prior heparin within 30 days. 1: consistent with days 5-10 but not clear; onset after day 10; or <=1 day with heparin 30-100 days ago. 0: fall too early without recent heparin.
- `thrombosis` (integer, required): Caller-assigned Lo 2006 thrombosis points (0, 1, or 2). 2: new thrombosis, skin necrosis, or acute systemic reaction after heparin bolus. 1: progressive/recurrent thrombosis, silent thrombosis, or erythematous skin lesions. 0: none.
- `other_causes` (integer, required): Caller-assigned Lo 2006 other (oTher) causes of thrombocytopenia (0, 1, or 2). More points = more HIT-like. 2: no other apparent cause. 1: possible other cause. 0: definite other cause.

## 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/four_ts`
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": [
    {
      "other_causes": "0",
      "thrombocytopenia": "0",
      "thrombosis": "0",
      "timing": "0"
    },
    {
      "other_causes": "0",
      "thrombocytopenia": "0",
      "thrombosis": "0",
      "timing": "0"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/four_ts",
  "items": [
    {
      "components": [
        {
          "value": 0,
          "factor": "thrombocytopenia",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "timing",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "thrombosis",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "other_causes",
          "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": "Lo GK, Juhl D, Warkentin TE, Sigouin CS, Eichler P, Greinacher A",
        "doi": "10.1111/j.1538-7836.2006.01787.x",
        "id": "lo-2006",
        "source": "J Thromb Haemost. 2006;4(4):759-765",
        "title": "Evaluation of pretest clinical score (4 T's) for the diagnosis of heparin-induced thrombocytopenia in two clinical settings"
      },
      "formula": "four_ts",
      "formula_expression": "4Ts = thrombocytopenia + timing + thrombosis + other_causes; each 0-2 caller-assigned from Lo 2006 table; pretest probability low 0-3, intermediate 4-5, high 6-8; max 8",
      "max_score": 8,
      "score": 0,
      "four_ts_band": "0-3"
    },
    {
      "components": [
        {
          "value": 0,
          "factor": "thrombocytopenia",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "timing",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "thrombosis",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "other_causes",
          "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": "Lo GK, Juhl D, Warkentin TE, Sigouin CS, Eichler P, Greinacher A",
        "doi": "10.1111/j.1538-7836.2006.01787.x",
        "id": "lo-2006",
        "source": "J Thromb Haemost. 2006;4(4):759-765",
        "title": "Evaluation of pretest clinical score (4 T's) for the diagnosis of heparin-induced thrombocytopenia in two clinical settings"
      },
      "formula": "four_ts",
      "formula_expression": "4Ts = thrombocytopenia + timing + thrombosis + other_causes; each 0-2 caller-assigned from Lo 2006 table; pretest probability low 0-3, intermediate 4-5, high 6-8; max 8",
      "max_score": 8,
      "score": 0,
      "four_ts_band": "0-3"
    }
  ]
}
```

## Response fields

- `formula` (string): four_ts
- `formula_expression` (string): Exact expression used
- `score` (integer): Total points 0-8
- `max_score` (integer): Always 8
- `four_ts_band` (string): 0-3, 4-5, or 6-8 (Lo 2006 pretest probability groups)
- `components` (array): Per-factor 0-2 points
- `citation` (object): Lo 2006 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": 0,
      "factor": "thrombocytopenia",
      "points": 0,
      "present": false
    },
    {
      "value": 0,
      "factor": "timing",
      "points": 0,
      "present": false
    },
    {
      "value": 0,
      "factor": "thrombosis",
      "points": 0,
      "present": false
    },
    {
      "value": 0,
      "factor": "other_causes",
      "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": "Lo GK, Juhl D, Warkentin TE, Sigouin CS, Eichler P, Greinacher A",
    "doi": "10.1111/j.1538-7836.2006.01787.x",
    "id": "lo-2006",
    "source": "J Thromb Haemost. 2006;4(4):759-765",
    "title": "Evaluation of pretest clinical score (4 T's) for the diagnosis of heparin-induced thrombocytopenia in two clinical settings"
  },
  "formula": "four_ts",
  "formula_expression": "4Ts = thrombocytopenia + timing + thrombosis + other_causes; each 0-2 caller-assigned from Lo 2006 table; pretest probability low 0-3, intermediate 4-5, high 6-8; max 8",
  "max_score": 8,
  "score": 0,
  "four_ts_band": "0-3"
}
```

## Errors

- HTTP 400 `invalid_four_ts_component`: thrombocytopenia, timing, thrombosis, and other_causes must each be 0, 1, or 2. 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

- [ANC](https://magentlab.com/docs/anc) — Compute absolute neutrophil count from WBC and neutrophil plus band percents, plus a Bodey 1966 granulocyte band.

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