LIVE
4Ts score
Compute the Lo 2006 4Ts score as the sum of four caller-assigned integers 0-2 (thrombocytopenia, timing, thrombosis, other causes).
Markdown: /docs/four-ts.md · Canonical: https://magentlab.com/docs/four-ts
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
- Authors
- Lo GK, Juhl D, Warkentin TE, Sigouin CS, Eichler P, Greinacher A
- Source
- J Thromb Haemost. 2006;4(4):759-765
Worked example
All components 0
Given:
other_causes=0thrombocytopenia=0thrombosis=0timing=0
- thrombocytopenia 0; timing 0; thrombosis 0; other_causes 0
- 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
Try
Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.
/api/calc/four_ts?thrombocytopenia=0&timing=0&thrombosis=0&other_causes=0
Full URL: https://api.magentlab.com/api/calc/four_ts?thrombocytopenia=0&timing=0&thrombosis=0&other_causes=0
Call
Expect HTTP 402 until you retry with PAYMENT-SIGNATURE. Incomplete query params
return HTTP 400 before any quote or charge.
curl -i -H "Accept: application/json" "https://api.magentlab.com/api/calc/four_ts?thrombocytopenia=0&timing=0&thrombosis=0&other_causes=0"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
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.
- 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 (fixture)
{
"items": [
{
"other_causes": "0",
"thrombocytopenia": "0",
"thrombosis": "0",
"timing": "0"
},
{
"other_causes": "0",
"thrombocytopenia": "0",
"thrombosis": "0",
"timing": "0"
}
]
}
Opens a two-item fixture on the API host. Unpaid browsers get the same MetaMask paywall as GET; Pay retries POST with those items.
Example 200 (fixture)
{
"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
| Field | Type | Description |
|---|---|---|
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
Machine form of the same example. Frozen fixture. Not a live lookup.
{
"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"
}
Client errors (HTTP 400)
Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.
| HTTP | Code | When |
|---|---|---|
| 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. |
| 400 | invalid_items |
POST body must be a JSON object with only an items array Returned before settlement; you are not charged. |
| 400 | invalid_item_count |
items must be an array of 1 to 25 objects Returned before settlement; you are not charged. |
| 400 | invalid_item |
each items entry must be a JSON object Returned before settlement; you are not charged. |
Related tools
- 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. Unpaid valid requests return HTTP 402 with a base64
PAYMENT-REQUIRED
header. HTTP 503 is not a new quote: retry the same PAYMENT-SIGNATURE. Full handshake
and shared payment errors: Payments.
Stdio MCP: /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.