MAGENT

Neurology · LIVE

ASTRAL score

ASTRAL

Compute the Ntaios 2012 ASTRAL integer score (Age, Severity NIHSS, Time delay, Range of visual fields, Acute glucose, Level of consciousness) for 3-month mRS >2 after acute ischemic stroke.

LIVE $0.005 USDC GET /api/calc/astral

Markdown: /docs/astral.md · Canonical: https://magentlab.com/docs/astral

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

What it computes

Compute the Ntaios 2012 ASTRAL integer score (Age, Severity NIHSS, Time delay, Range of visual fields, Acute glucose, Level of consciousness) for 3-month mRS >2 after acute ischemic stroke.

When to use

When an agent has caller-assigned NIHSS, onset-to-admission delay, visual fields, glucose, and consciousness and needs the published ASTRAL total and the score-31 50% unfavorable grouping, without inventing NIHSS or unofficial outcome percents.

When not to use

  • Not a medical device and not a tPA, thrombolysis, or endovascular treatment decision.
  • Derived in previously independent acute ischemic stroke (ASTRAL registry, Ntaios 2012). It is not a recommendation for or against reperfusion.
  • The caller assigns NIHSS (0-42), visual field defect, impaired consciousness (NIHSS item 1a >0), onset-to-admission >180 min, and glucose. magent does not examine the patient or compute NIHSS.
  • Age is 1 point per 5 years (integer division), not age in years. Delay scores 2 only if onset-to-admission is greater than 180 min (180 does not). Glucose scores 1 if <3.7 or >7.3 mmol/L (3.7 and 7.3 do not).
  • Score 31 indicates a 50% likelihood of 3-month mRS >2 in Ntaios 2012. magent does not return unofficial per-score percentages.
  • This is the stroke ASTRAL score, not an astronomical catalog.

Formula

ASTRAL = age (1 per 5 years) + NIHSS + 2 if onset-to-admission >180 min + 2 if visual field defect + 1 if glucose <3.7 or >7.3 mmol/L + 3 if impaired consciousness; Ntaios 2012; 3-month mRS >2 is 50% at score 31

Citation

Title
An integer-based score to predict functional outcome in acute ischemic stroke: the ASTRAL score
Authors
Ntaios G, Faouzi M, Ferrari J, Lang W, Vemmos K, Michel P
Source
Neurology. 2012;78(24):1916-1922
DOI
10.1212/WNL.0b013e318259e221

Worked example

Age 40, NIHSS 0, no extras (lowest for that age)

Given: age=40delay_gt_180=falseglucose_mmol_l=6.0loc_impaired=falsenihss=0visual_field_defect=false

  1. Age 40 → 8 (1 per 5 years); NIHSS 0; delay 180 min does not score; visual field, glucose 6.0 mmol/L, consciousness 0
  2. Score = 8 (practical max 74); unfavorable_ge_31 false

Age 120, NIHSS 42, all extras

Given: age=120delay_gt_180=trueglucose_mmol_l=20.0loc_impaired=truenihss=42visual_field_defect=true

  1. Age 120 → 24; NIHSS 42; delay +2; visual field +2; glucose 20.0 mmol/L +1; loc +3
  2. Score = 74; unfavorable_ge_31 true

Also searched as

  • ASTRAL score
  • Acute Stroke Registry and Analysis of Lausanne
  • Ntaios ASTRAL
  • ischemic stroke ASTRAL
  • ASTRAL NIHSS glucose
  • 3-month mRS ASTRAL
  • Ntaios 2012 ASTRAL

Try

Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.

/api/calc/astral?age=40&nihss=0&delay_gt_180=false&visual_field_defect=false&glucose_mmol_l=6.0&loc_impaired=false

Full URL: https://api.magentlab.com/api/calc/astral?age=40&nihss=0&delay_gt_180=false&visual_field_defect=false&glucose_mmol_l=6.0&loc_impaired=false

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/astral?age=40&nihss=0&delay_gt_180=false&visual_field_defect=false&glucose_mmol_l=6.0&loc_impaired=false"

Parameters

Name Type Required Description
age integer required Age in years (18-120). Ntaios 2012 integer weight is 1 point per 5 years (integer division). magent does not date the patient.
nihss integer required Caller-assigned NIH Stroke Scale total (integer 0-42). 1 point per NIHSS point. magent does not compute NIHSS or examine the patient.
delay_gt_180 boolean required Onset-to-admission delay >180 minutes (Ntaios 2012 time item). true scores 2; false (including 180 min) scores 0. magent does not clock the delay.
visual_field_defect boolean required Any stroke-related visual field defect as assigned by the caller (Ntaios 2012 range of visual fields). true scores 2; false scores 0. magent does not examine the patient.
glucose_mmol_l number optional Admission glucose in mmol/L (2.8-55.5). Provide this or glucose_mg_dl, not both. 1 point if <3.7 or >7.3; 3.7 and 7.3 do not score.
glucose_mg_dl number optional Admission glucose in mg/dL (50-1000). Converted as mmol/L = mg/dL / 18. Provide this or glucose_mmol_l, not both.
loc_impaired boolean required Impaired consciousness as assigned by the caller (Ntaios 2012; NIHSS item 1a >0). true scores 3; false scores 0. magent does not compute NIHSS.

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.

POST /api/calc/astral Max 25 unit_amount + extra_item_amount * (n - 1) extra $0.002 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 (fixture)

{
  "items": [
    {
      "age": "40",
      "delay_gt_180": "false",
      "glucose_mmol_l": "6.0",
      "loc_impaired": "false",
      "nihss": "0",
      "visual_field_defect": "false"
    },
    {
      "age": "40",
      "delay_gt_180": "false",
      "glucose_mmol_l": "6.0",
      "loc_impaired": "false",
      "nihss": "0",
      "visual_field_defect": "false"
    }
  ]
}

Open bulk paywall →

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/astral",
  "items": [
    {
      "components": [
        {
          "value": 40,
          "factor": "age",
          "points": 8,
          "present": true
        },
        {
          "value": 0,
          "factor": "nihss",
          "points": 0,
          "present": false
        },
        {
          "factor": "delay_gt_180",
          "points": 0,
          "present": false
        },
        {
          "factor": "visual_field_defect",
          "points": 0,
          "present": false
        },
        {
          "value": 6.0,
          "factor": "glucose",
          "points": 0,
          "present": false
        },
        {
          "factor": "loc_impaired",
          "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": "Ntaios G, Faouzi M, Ferrari J, Lang W, Vemmos K, Michel P",
        "doi": "10.1212/WNL.0b013e318259e221",
        "id": "ntaios-2012",
        "pmid": "22649218",
        "source": "Neurology. 2012;78(24):1916-1922",
        "title": "An integer-based score to predict functional outcome in acute ischemic stroke: the ASTRAL score"
      },
      "formula": "astral",
      "formula_expression": "ASTRAL = age (1 per 5 years) + NIHSS + 2 if onset-to-admission >180 min + 2 if visual field defect + 1 if glucose <3.7 or >7.3 mmol/L + 3 if impaired consciousness; Ntaios 2012; 3-month mRS >2 is 50% at score 31",
      "max_score": 74,
      "score": 8,
      "age_years": 40,
      "delay_gt_180": false,
      "glucose_abnormal": false,
      "glucose_mmol_l": 6.0,
      "loc_impaired": false,
      "nihss": 0,
      "unfavorable_ge_31": false,
      "visual_field_defect": false
    },
    {
      "components": [
        {
          "value": 40,
          "factor": "age",
          "points": 8,
          "present": true
        },
        {
          "value": 0,
          "factor": "nihss",
          "points": 0,
          "present": false
        },
        {
          "factor": "delay_gt_180",
          "points": 0,
          "present": false
        },
        {
          "factor": "visual_field_defect",
          "points": 0,
          "present": false
        },
        {
          "value": 6.0,
          "factor": "glucose",
          "points": 0,
          "present": false
        },
        {
          "factor": "loc_impaired",
          "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": "Ntaios G, Faouzi M, Ferrari J, Lang W, Vemmos K, Michel P",
        "doi": "10.1212/WNL.0b013e318259e221",
        "id": "ntaios-2012",
        "pmid": "22649218",
        "source": "Neurology. 2012;78(24):1916-1922",
        "title": "An integer-based score to predict functional outcome in acute ischemic stroke: the ASTRAL score"
      },
      "formula": "astral",
      "formula_expression": "ASTRAL = age (1 per 5 years) + NIHSS + 2 if onset-to-admission >180 min + 2 if visual field defect + 1 if glucose <3.7 or >7.3 mmol/L + 3 if impaired consciousness; Ntaios 2012; 3-month mRS >2 is 50% at score 31",
      "max_score": 74,
      "score": 8,
      "age_years": 40,
      "delay_gt_180": false,
      "glucose_abnormal": false,
      "glucose_mmol_l": 6.0,
      "loc_impaired": false,
      "nihss": 0,
      "unfavorable_ge_31": false,
      "visual_field_defect": false
    }
  ]
}

Response

Field Type Description
formula string astral
formula_expression string Exact expression used
score integer ASTRAL points (no published upper bound)
max_score integer 74 with age 18-120 and NIHSS 0-42
unfavorable_ge_31 boolean true iff score ≥ 31. Ntaios 2012: score 31 indicates 50% likelihood of 3-month mRS >2. No unofficial per-score percent is returned.
age_years integer Age used for 1-per-5-years points
nihss integer Caller-assigned NIHSS used for points
delay_gt_180 boolean Whether onset-to-admission was scored as >180 min
visual_field_defect boolean Whether visual field defect was scored
glucose_mmol_l number Admission glucose in mmol/L (mg/dL inputs converted /18)
glucose_abnormal boolean true iff glucose <3.7 or >7.3 mmol/L
loc_impaired boolean Whether impaired consciousness was scored
components array Per-item Ntaios 2012 points
citation object Ntaios 2012 Neurology citation
disclaimer string Not-a-device notice

Example JSON

Machine form of the same example. Frozen fixture. Not a live lookup.

{
  "components": [
    {
      "value": 40,
      "factor": "age",
      "points": 8,
      "present": true
    },
    {
      "value": 0,
      "factor": "nihss",
      "points": 0,
      "present": false
    },
    {
      "factor": "delay_gt_180",
      "points": 0,
      "present": false
    },
    {
      "factor": "visual_field_defect",
      "points": 0,
      "present": false
    },
    {
      "value": 6.0,
      "factor": "glucose",
      "points": 0,
      "present": false
    },
    {
      "factor": "loc_impaired",
      "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": "Ntaios G, Faouzi M, Ferrari J, Lang W, Vemmos K, Michel P",
    "doi": "10.1212/WNL.0b013e318259e221",
    "id": "ntaios-2012",
    "pmid": "22649218",
    "source": "Neurology. 2012;78(24):1916-1922",
    "title": "An integer-based score to predict functional outcome in acute ischemic stroke: the ASTRAL score"
  },
  "formula": "astral",
  "formula_expression": "ASTRAL = age (1 per 5 years) + NIHSS + 2 if onset-to-admission >180 min + 2 if visual field defect + 1 if glucose <3.7 or >7.3 mmol/L + 3 if impaired consciousness; Ntaios 2012; 3-month mRS >2 is 50% at score 31",
  "max_score": 74,
  "score": 8,
  "age_years": 40,
  "delay_gt_180": false,
  "glucose_abnormal": false,
  "glucose_mmol_l": 6.0,
  "loc_impaired": false,
  "nihss": 0,
  "unfavorable_ge_31": false,
  "visual_field_defect": false
}

Client errors (HTTP 400)

Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.

HTTP Code When
400 invalid_age age must be an integer from 18 to 120 Returned before settlement; you are not charged.
400 invalid_nihss nihss must be an integer from 0 to 42. Returned before settlement; you are not charged.
400 invalid_flag boolean clinical flags must be true or false Returned before settlement; you are not charged.
400 invalid_glucose glucose_mg_dl (50-1000) or glucose_mmol_l (2.8-55.5) is required Returned before settlement; you are not charged.
400 invalid_astral each ASTRAL 2012 item must be a published value for that field. 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

  • THRIVE — Compute the Flint 2010 THRIVE (Totaled Health Risks in Vascular Events) score from trichotomized age, trichotomized NIHSS, and the chronic disease scale (hypertension, diabetes mellitus, atrial fibrillation).
  • PLAN — Compute the O'Donnell 2012 PLAN score (preadmission comorbidities, level of consciousness, age, and neurologic deficit) for death and severe disability after acute ischemic stroke from the published Table 4 items.

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.