Neurology · LIVE
ESUS
Apply the Hart 2014 ESUS construct (Panel 2 criteria plus Panel 3 minimum diagnostic assessment) and return whether caller-assigned flags meet embolic stroke of undetermined source.
Markdown: /docs/esus.md · Canonical: https://magentlab.com/docs/esus
Not a medical device. Not a diagnosis, dose, or listing recommendation.
What it computes
Apply the Hart 2014 ESUS construct (Panel 2 criteria plus Panel 3 minimum diagnostic assessment) and return whether caller-assigned flags meet embolic stroke of undetermined source.
When to use
When an agent has caller-assigned imaging and workup flags after ischaemic stroke and needs the Hart 2014 ESUS construct, not TOAST cryptogenic stroke and not an anticoagulation recommendation.
When not to use
- Not a medical device. Not a stroke diagnosis. magent does not read imaging or examine the patient.
- This tool is the Hart 2014 ESUS construct only (Panel 2 plus Panel 3 minimum diagnostic assessment). It is not TOAST cryptogenic stroke, which includes incomplete workup and multiple causes.
- Incomplete workup (minimum_workup false) means the construct is not met (esus false). It is not an HTTP 400.
- Not a recommendation for anticoagulation. Later NAVIGATE ESUS and RESPECT ESUS trials did not show a uniform DOAC benefit; those trials are not the formula.
- The caller assigns all five booleans. magent does not enumerate each major-risk cardioembolic source as a separate required param and does not classify infarct size from raw imaging.
Formula
esus iff non_lacunar_infarct and no_stenosis_ge_50 and no_major_risk_cardioembolic and no_other_specific_cause and minimum_workup (Hart 2014 Panel 2 + Panel 3)
Citation
- Authors
- Hart RG, Diener HC, Coutts SB, Easton JD, Granger CB, O'Donnell MJ, Sacco RL, Connolly SJ, Cryptogenic Stroke/ESUS International Working Group
- Source
- Lancet Neurol. 2014;13(4):429-438
Worked example
All five criteria met
Given:
minimum_workup=trueno_major_risk_cardioembolic=trueno_other_specific_cause=trueno_stenosis_ge_50=truenon_lacunar_infarct=true
- Non-lacunar infarct on CT or MRI
- No ≥50% stenosis in arteries supplying the ischaemia
- No major-risk cardioembolic source
- No other specific cause
- Panel 3 minimum workup done
- esus is true
Incomplete workup is not ESUS
Given:
minimum_workup=falseno_major_risk_cardioembolic=trueno_other_specific_cause=trueno_stenosis_ge_50=truenon_lacunar_infarct=true
- Panel 2 flags remain true
- minimum_workup is false (Panel 3 assessment incomplete)
- esus is false; incomplete workup is not a 400
Also searched as
- embolic stroke of undetermined source
- ESUS Hart 2014
- cryptogenic embolic stroke
- Hart ESUS construct
- non-lacunar cryptogenic stroke
- ESUS diagnostic criteria
- Panel 2 ESUS
Try
Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.
Full URL: https://api.magentlab.com/api/calc/esus?non_lacunar_infarct=true&no_stenosis_ge_50=true&no_major_risk_cardioembolic=true&no_other_specific_cause=true&minimum_workup=true
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/esus?non_lacunar_infarct=true&no_stenosis_ge_50=true&no_major_risk_cardioembolic=true&no_other_specific_cause=true&minimum_workup=true"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
non_lacunar_infarct |
boolean | required | Stroke detected by CT or MRI that is not lacunar, as assigned by the caller (Hart 2014 Panel 2). Lacunar = subcortical infarct ≤1.5 cm (≤2.0 cm on MRI diffusion images) in largest dimension, in the distribution of the small penetrating cerebral arteries. true or false. magent does not read imaging. |
no_stenosis_ge_50 |
boolean | required | Absence of extracranial or intracranial atherosclerosis causing ≥50% luminal stenosis in arteries supplying the area of ischaemia, as assigned by the caller (Hart 2014 Panel 2). true means no such stenosis. true or false. magent does not read vascular imaging. |
no_major_risk_cardioembolic |
boolean | required | No major-risk cardioembolic source, as assigned by the caller (Hart 2014 Panel 2). Major-risk sources (paper footnote): permanent or paroxysmal atrial fibrillation, sustained atrial flutter, intracardiac thrombus, prosthetic cardiac valve, atrial myxoma or other cardiac tumours, mitral stenosis, recent (<4 weeks) myocardial infarction, left ventricular ejection fraction less than 30%, valvular vegetations, or infective endocarditis. true or false. The caller assigns this boolean; magent does not enumerate each source as a separate required param. |
no_other_specific_cause |
boolean | required | No other specific cause identified, as assigned by the caller (Hart 2014 Panel 2). Paper examples: arteritis, dissection, migraine/vasospasm, drug misuse. true or false. magent does not diagnose an alternative aetiology. |
minimum_workup |
boolean | required | Hart 2014 Panel 3 minimum diagnostic assessment, as assigned by the caller. true only if brain CT or MRI, 12-lead ECG, precordial echocardiography, cardiac monitoring for ≥24 h with automated rhythm detection (telemetry is not sufficient), and imaging of both extracranial and intracranial arteries supplying the ischaemic territory have been done. Incomplete workup returns esus false (not HTTP 400). true or false. magent does not read imaging. |
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.
- 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 (fixture)
{
"items": [
{
"minimum_workup": "true",
"no_major_risk_cardioembolic": "true",
"no_other_specific_cause": "true",
"no_stenosis_ge_50": "true",
"non_lacunar_infarct": "true"
},
{
"minimum_workup": "true",
"no_major_risk_cardioembolic": "true",
"no_other_specific_cause": "true",
"no_stenosis_ge_50": "true",
"non_lacunar_infarct": "true"
}
]
}
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/esus",
"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": "Hart RG, Diener HC, Coutts SB, Easton JD, Granger CB, O'Donnell MJ, Sacco RL, Connolly SJ, Cryptogenic Stroke/ESUS International Working Group",
"doi": "10.1016/S1474-4422(13)70310-7",
"id": "hart-2014",
"pmid": "24646875",
"source": "Lancet Neurol. 2014;13(4):429-438",
"title": "Embolic strokes of undetermined source: the case for a new clinical construct"
},
"formula": "esus",
"formula_expression": "esus iff non_lacunar_infarct and no_stenosis_ge_50 and no_major_risk_cardioembolic and no_other_specific_cause and minimum_workup (Hart 2014 Panel 2 + Panel 3)",
"criteria": [
{
"factor": "non_lacunar_infarct",
"met": true
},
{
"factor": "no_stenosis_ge_50",
"met": true
},
{
"factor": "no_major_risk_cardioembolic",
"met": true
},
{
"factor": "no_other_specific_cause",
"met": true
},
{
"factor": "minimum_workup",
"met": true
}
],
"esus": true
},
{
"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": "Hart RG, Diener HC, Coutts SB, Easton JD, Granger CB, O'Donnell MJ, Sacco RL, Connolly SJ, Cryptogenic Stroke/ESUS International Working Group",
"doi": "10.1016/S1474-4422(13)70310-7",
"id": "hart-2014",
"pmid": "24646875",
"source": "Lancet Neurol. 2014;13(4):429-438",
"title": "Embolic strokes of undetermined source: the case for a new clinical construct"
},
"formula": "esus",
"formula_expression": "esus iff non_lacunar_infarct and no_stenosis_ge_50 and no_major_risk_cardioembolic and no_other_specific_cause and minimum_workup (Hart 2014 Panel 2 + Panel 3)",
"criteria": [
{
"factor": "non_lacunar_infarct",
"met": true
},
{
"factor": "no_stenosis_ge_50",
"met": true
},
{
"factor": "no_major_risk_cardioembolic",
"met": true
},
{
"factor": "no_other_specific_cause",
"met": true
},
{
"factor": "minimum_workup",
"met": true
}
],
"esus": true
}
]
}
Response
| Field | Type | Description |
|---|---|---|
formula |
string | esus |
formula_expression |
string | Hart 2014 Panel 2 plus Panel 3 ESUS construct (all five flags required) |
esus |
boolean | true only when all five caller-assigned flags hold. Classification, not a score. Incomplete workup is false, not a 400. Not a stroke diagnosis and not an anticoagulation recommendation. |
criteria |
array | Per-factor rows with factor and met for non_lacunar_infarct, no_stenosis_ge_50, no_major_risk_cardioembolic, no_other_specific_cause, and minimum_workup. esus iff all are met. |
citation |
object | Hart 2014 Lancet Neurol citation |
disclaimer |
string | Not-a-device notice |
Example JSON
Machine form of the same example. Frozen fixture. Not a live lookup.
{
"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": "Hart RG, Diener HC, Coutts SB, Easton JD, Granger CB, O'Donnell MJ, Sacco RL, Connolly SJ, Cryptogenic Stroke/ESUS International Working Group",
"doi": "10.1016/S1474-4422(13)70310-7",
"id": "hart-2014",
"pmid": "24646875",
"source": "Lancet Neurol. 2014;13(4):429-438",
"title": "Embolic strokes of undetermined source: the case for a new clinical construct"
},
"formula": "esus",
"formula_expression": "esus iff non_lacunar_infarct and no_stenosis_ge_50 and no_major_risk_cardioembolic and no_other_specific_cause and minimum_workup (Hart 2014 Panel 2 + Panel 3)",
"criteria": [
{
"factor": "non_lacunar_infarct",
"met": true
},
{
"factor": "no_stenosis_ge_50",
"met": true
},
{
"factor": "no_major_risk_cardioembolic",
"met": true
},
{
"factor": "no_other_specific_cause",
"met": true
},
{
"factor": "minimum_workup",
"met": true
}
],
"esus": true
}
Client errors (HTTP 400)
Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_flag |
boolean clinical flags must be true or false 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
- CHA2DS2-VASc — Compute the CHA2DS2-VASc stroke-risk score from discrete clinical flags.
- HAS-BLED — Compute the HAS-BLED bleeding-risk score from discrete clinical flags.
- Canadian TIA Score — Compute the Perry 2021 Canadian TIA Score from caller-assigned clinical findings and investigations for subsequent 7-day stroke or carotid revascularization risk after TIA.
- ABCD2 score — Compute the ABCD2 score as age, blood pressure, caller-assigned clinical features, symptom duration, and diabetes.
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. 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
- 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.