MAGENT

Neurology · LIVE

THRIVE score

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

LIVE $0.005 USDC GET /api/calc/thrive

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

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

What it computes

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

When to use

When an agent needs the published Flint 2010 THRIVE total and 90-day good-outcome and mortality strata after endovascular stroke treatment, and must not invent NIHSS or comorbidity points from a chart narrative.

When not to use

  • Not a medical device and not a treatment recommendation.
  • Derived in MERCI and Multi MERCI endovascular cohorts (Flint 2010). It is not a recommendation for or against endovascular therapy.
  • The caller assigns NIHSS and comorbidities (hypertension, diabetes mellitus, atrial fibrillation). magent does not examine the patient.

Formula

THRIVE = trichotomized_age + trichotomized_nihss + CDS; age <=59 0, 60-79 1, >=80 2; NIHSS <=10 0, 11-20 2, >=21 4; hypertension, diabetes, atrial fibrillation 1 each (CDS 0-3); bands 0-2 / 3-5 / 6-9; max 9

Citation

Title
Predicting long-term outcome after endovascular stroke treatment: the totaled health risks in vascular events score
Authors
Flint AC, Cullen SP, Faigeles BG, Rao VA
Source
AJNR Am J Neuroradiol. 2010;31(7):1192-1196
DOI
10.3174/ajnr.A2050

Worked example

Age 70, NIHSS 12, hypertension only

Given: age=70atrial_fibrillation=falsediabetes=falsehypertension=truenihss=12

  1. Age 70 is 60-79 → 1; NIHSS 12 is 11-20 → 2; CDS hypertension only → 1
  2. Score = 4 (max 9); thrive_band moderate; good outcome 43.5%; 90-day mortality 30.1%

Also searched as

  • THRIVE score
  • Totaled Health Risks in Vascular Events
  • Flint THRIVE
  • endovascular stroke THRIVE
  • THRIVE NIHSS age CDS
  • 90-day mRS THRIVE
  • chronic disease scale THRIVE
  • Flint 2010 THRIVE

Try

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

/api/calc/thrive?age=70&nihss=12&hypertension=true&diabetes=false&atrial_fibrillation=false

Full URL: https://api.magentlab.com/api/calc/thrive?age=70&nihss=12&hypertension=true&diabetes=false&atrial_fibrillation=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/thrive?age=70&nihss=12&hypertension=true&diabetes=false&atrial_fibrillation=false"

Parameters

Name Type Required Description
age integer required Age in years (18-120). Trichotomized: ≤59 scores 0; 60-79 scores 1; ≥80 scores 2 (1 point per age level).
nihss integer required Caller-assigned NIH Stroke Scale total (integer 0-42). Trichotomized: ≤10 scores 0; 11-20 scores 2; ≥21 scores 4 (2 points per NIHSS level). magent does not examine the patient.
hypertension boolean required Hypertension on the chronic disease scale (CDS). true scores 1; false scores 0.
diabetes boolean required Diabetes mellitus on the chronic disease scale (CDS). true scores 1; false scores 0.
atrial_fibrillation boolean required Atrial fibrillation on the chronic disease scale (CDS). true scores 1; false scores 0.

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/thrive 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": "70",
      "atrial_fibrillation": "false",
      "diabetes": "false",
      "hypertension": "true",
      "nihss": "12"
    },
    {
      "age": "70",
      "atrial_fibrillation": "false",
      "diabetes": "false",
      "hypertension": "true",
      "nihss": "12"
    }
  ]
}

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/thrive",
  "items": [
    {
      "components": [
        {
          "value": 70,
          "factor": "age",
          "points": 1,
          "present": true
        },
        {
          "value": 12,
          "factor": "nihss",
          "points": 2,
          "present": true
        },
        {
          "factor": "hypertension",
          "points": 1,
          "present": true
        },
        {
          "factor": "diabetes",
          "points": 0,
          "present": false
        },
        {
          "factor": "atrial_fibrillation",
          "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": "Flint AC, Cullen SP, Faigeles BG, Rao VA",
        "doi": "10.3174/ajnr.A2050",
        "id": "flint-2010",
        "pmid": "20223889",
        "source": "AJNR Am J Neuroradiol. 2010;31(7):1192-1196",
        "title": "Predicting long-term outcome after endovascular stroke treatment: the totaled health risks in vascular events score"
      },
      "formula": "thrive",
      "formula_expression": "THRIVE = trichotomized_age + trichotomized_nihss + CDS; age <=59 0, 60-79 1, >=80 2; NIHSS <=10 0, 11-20 2, >=21 4; hypertension, diabetes, atrial fibrillation 1 each (CDS 0-3); bands 0-2 / 3-5 / 6-9; max 9",
      "max_score": 9,
      "score": 4,
      "age_years": 70,
      "cds": 1,
      "good_outcome_percent": 43.5,
      "mortality_percent": 30.1,
      "nihss": 12,
      "thrive_band": "moderate"
    },
    {
      "components": [
        {
          "value": 70,
          "factor": "age",
          "points": 1,
          "present": true
        },
        {
          "value": 12,
          "factor": "nihss",
          "points": 2,
          "present": true
        },
        {
          "factor": "hypertension",
          "points": 1,
          "present": true
        },
        {
          "factor": "diabetes",
          "points": 0,
          "present": false
        },
        {
          "factor": "atrial_fibrillation",
          "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": "Flint AC, Cullen SP, Faigeles BG, Rao VA",
        "doi": "10.3174/ajnr.A2050",
        "id": "flint-2010",
        "pmid": "20223889",
        "source": "AJNR Am J Neuroradiol. 2010;31(7):1192-1196",
        "title": "Predicting long-term outcome after endovascular stroke treatment: the totaled health risks in vascular events score"
      },
      "formula": "thrive",
      "formula_expression": "THRIVE = trichotomized_age + trichotomized_nihss + CDS; age <=59 0, 60-79 1, >=80 2; NIHSS <=10 0, 11-20 2, >=21 4; hypertension, diabetes, atrial fibrillation 1 each (CDS 0-3); bands 0-2 / 3-5 / 6-9; max 9",
      "max_score": 9,
      "score": 4,
      "age_years": 70,
      "cds": 1,
      "good_outcome_percent": 43.5,
      "mortality_percent": 30.1,
      "nihss": 12,
      "thrive_band": "moderate"
    }
  ]
}

Response

Field Type Description
formula string thrive
formula_expression string Exact expression used
score integer Total points 0-9
max_score integer Always 9
thrive_band string low (0-2), moderate (3-5), or high (6-9) from Flint 2010
good_outcome_percent number Published 90-day mRS 0-2 percent for that band (Flint 2010)
mortality_percent number Published 90-day mortality percent for that band (Flint 2010)
cds integer Chronic disease scale 0-3
age_years integer Age used for trichotomized age points
nihss integer Caller-assigned NIHSS used for points
components array Per-factor points
citation object Flint 2010 AJNR citation
disclaimer string Not-a-device notice

Example JSON

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

{
  "components": [
    {
      "value": 70,
      "factor": "age",
      "points": 1,
      "present": true
    },
    {
      "value": 12,
      "factor": "nihss",
      "points": 2,
      "present": true
    },
    {
      "factor": "hypertension",
      "points": 1,
      "present": true
    },
    {
      "factor": "diabetes",
      "points": 0,
      "present": false
    },
    {
      "factor": "atrial_fibrillation",
      "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": "Flint AC, Cullen SP, Faigeles BG, Rao VA",
    "doi": "10.3174/ajnr.A2050",
    "id": "flint-2010",
    "pmid": "20223889",
    "source": "AJNR Am J Neuroradiol. 2010;31(7):1192-1196",
    "title": "Predicting long-term outcome after endovascular stroke treatment: the totaled health risks in vascular events score"
  },
  "formula": "thrive",
  "formula_expression": "THRIVE = trichotomized_age + trichotomized_nihss + CDS; age <=59 0, 60-79 1, >=80 2; NIHSS <=10 0, 11-20 2, >=21 4; hypertension, diabetes, atrial fibrillation 1 each (CDS 0-3); bands 0-2 / 3-5 / 6-9; max 9",
  "max_score": 9,
  "score": 4,
  "age_years": 70,
  "cds": 1,
  "good_outcome_percent": 43.5,
  "mortality_percent": 30.1,
  "nihss": 12,
  "thrive_band": "moderate"
}

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_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

  • Glasgow Coma Scale — Compute the Glasgow Coma Scale as the sum of caller-assigned eye, verbal, and motor integers. The 1974 or 1976 edition is required.
  • ABCD2 score — Compute the ABCD2 score as age, blood pressure, caller-assigned clinical features, symptom duration, and diabetes.
  • ICH Score — Compute the Hemphill 2001 ICH Score from caller-assigned GCS, age, infratentorial origin, ICH volume, and IVH.
  • Modified Rankin — Return the van Swieten 1988 modified Rankin handicap grade 0-5 from a caller-assigned integer, with the published grade wording.

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