# mSOAR score

mSOAR

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

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

## What it computes

Compute the Abdul-Rahim 2016 modified SOAR (mSOAR) integer score for early mortality after acute stroke from stroke subtype, OCSP, age, prestroke mRS, and caller-assigned NIHSS bands.

## When to use

When an agent has caller-assigned stroke subtype, OCSP class, age, prestroke mRS, and NIHSS total and needs the published mSOAR total and Table 2 derivation early-mortality percents, without inventing an NIHSS item exam or a care-withdrawal decision.

## When not to use

- Not a medical device and not a prognosis to withdraw care.
- This is mSOAR (SOAR plus NIHSS), not original SOAR without NIHSS.
- The caller assigns ischemic vs hemorrhagic subtype, OCSP (LACS/PACS/POCS/TACS), prestroke mRS 0-5, and NIHSS total 0-42. magent does not examine the patient or score NIHSS items (that is a separate tool).
- Derivation used in-hospital mortality in the Anglia Stroke and Heart Clinical Network; validation used 90-day mortality in Glasgow cohorts (Abdul-Rahim 2016). Table 2 derivation percents are reported for scores 0-1 through 7; scores 8-9 are possible arithmetically and have no tabulated percent.
- Even at the paper's preferred cut point, mSOAR is not suitable as the sole basis for therapeutic decisions (Abdul-Rahim 2016 Discussion).

## Formula

```
mSOAR = age (≤65 0, 66-85 1, >85 2) + subtype (infarct 0, hemorrhage 1) + OCSP (LACS/PACS 0, POCS 1, TACS 2) + prestroke mRS (0-2 0, 3-4 1, 5 2) + NIHSS (0-4 0, 5-10 1, ≥11 2; 11-20 and ≥21 both 2); Abdul-Rahim 2016 Table 1 bands and Suppl Table I NIHSS integers; max 9; Table 2 derivation early mortality 1.0/1.5/6.5/9.2/19.5/26.2/49.2% for scores 0-1/2/3/4/5/6/7
```

## Citation

[Derivation and Validation of a Novel Prognostic Scale (Modified–Stroke Subtype, Oxfordshire Community Stroke Project Classification, Age, and Prestroke Modified Rankin) to Predict Early Mortality in Acute Stroke](https://doi.org/10.1161/STROKEAHA.115.009898)
Abdul-Rahim AH, Quinn TJ, Alder S, Clark AB, Musgrave SD, Langhorne P, Potter JF, Myint PK
Stroke. 2016;47(1):74-79
DOI: [10.1161/STROKEAHA.115.009898](https://doi.org/10.1161/STROKEAHA.115.009898)

## Worked example

### Lowest published points in each component

Given: `age=18, nihss=0, ocsp=lacs, prestroke_mrs=0, stroke_subtype=infarct`

1. Age 18 is ≤65 → 0; infarct → 0; OCSP LACS → 0; prestroke mRS 0 is 0-2 → 0; NIHSS 0 is 0-4 → 0
2. Score = 0 (max 9); Table 2 derivation early mortality 1.0% (scores 0-1)


### Published Table 2 top row (score 7)

Given: `age=86, nihss=0, ocsp=tacs, prestroke_mrs=5, stroke_subtype=hemorrhage`

1. Age 86 is >85 → 2; hemorrhage → 1; TACS → 2; prestroke mRS 5 → 2; NIHSS 0 is 0-4 → 0
2. Score = 7 (max 9); Table 2 derivation early mortality 49.2%


## Also searched as

- modified SOAR
- mSOAR score
- modified-stroke subtype OCSP age Rankin
- Abdul-Rahim mSOAR
- NIHSS SOAR stroke mortality
- early mortality acute stroke mSOAR
- OCSP LACS PACS POCS TACS mSOAR

## Parameters

- `age` (integer, required): Age in years (18-120). Abdul-Rahim 2016 Table 1: ≤65 scores 0; 66-85 scores 1; >85 scores 2. Age 85 is the 66-85 band.
- `stroke_subtype` (string, required): Caller-assigned stroke subtype (Abdul-Rahim 2016 Methods / Table 1). infarct (ischemic infarction) scores 0; hemorrhage scores 1. Case-insensitive. magent does not read imaging.
- `ocsp` (string, required): Caller-assigned Oxfordshire Community Stroke Project class (Abdul-Rahim 2016 Table 1). lacs or pacs scores 0; pocs scores 1; tacs scores 2. Case-insensitive. magent does not examine the patient.
- `prestroke_mrs` (integer, required): Caller-assigned prestroke modified Rankin grade 0-5. SOAR weights used by mSOAR: 0-2 scores 0; 3-4 scores 1; 5 scores 2. Table 1 lists cohort counts as 0-1 / 2-3 / 4-5, not those integer weights. magent does not interview the patient.
- `nihss` (integer, required): Caller-assigned NIH Stroke Scale total (integer 0-42), not an item exam. Abdul-Rahim 2016 Suppl Table I / Table 1: 0-4 scores 0; 5-10 scores 1; 11-20 and ≥21 both score 2. magent does not compute NIHSS or examine the patient.

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

Method: `POST /api/calc/msoar`
Max items: 25
Price: unit_amount + extra_item_amount * (n - 1) (unit 5000 atomic, extra 2000 atomic)
Status: 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:

```json
{
  "items": [
    {
      "age": "18",
      "nihss": "0",
      "ocsp": "lacs",
      "prestroke_mrs": "0",
      "stroke_subtype": "infarct"
    },
    {
      "age": "18",
      "nihss": "0",
      "ocsp": "lacs",
      "prestroke_mrs": "0",
      "stroke_subtype": "infarct"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/msoar",
  "items": [
    {
      "components": [
        {
          "value": 18,
          "factor": "age",
          "points": 0,
          "present": false
        },
        {
          "value": "infarct",
          "factor": "stroke_subtype",
          "points": 0,
          "present": false
        },
        {
          "value": "lacs",
          "factor": "ocsp",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "prestroke_mrs",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "nihss",
          "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.",
      "age_years": 18,
      "citation": {
        "authors": "Abdul-Rahim AH, Quinn TJ, Alder S, Clark AB, Musgrave SD, Langhorne P, Potter JF, Myint PK",
        "doi": "10.1161/STROKEAHA.115.009898",
        "id": "abdul-rahim-2016",
        "pmid": "26578661",
        "source": "Stroke. 2016;47(1):74-79",
        "title": "Derivation and Validation of a Novel Prognostic Scale (Modified–Stroke Subtype, Oxfordshire Community Stroke Project Classification, Age, and Prestroke Modified Rankin) to Predict Early Mortality in Acute Stroke"
      },
      "formula": "msoar",
      "formula_expression": "mSOAR = age (≤65 0, 66-85 1, >85 2) + subtype (infarct 0, hemorrhage 1) + OCSP (LACS/PACS 0, POCS 1, TACS 2) + prestroke mRS (0-2 0, 3-4 1, 5 2) + NIHSS (0-4 0, 5-10 1, ≥11 2; 11-20 and ≥21 both 2); Abdul-Rahim 2016 Table 1 bands and Suppl Table I NIHSS integers; max 9; Table 2 derivation early mortality 1.0/1.5/6.5/9.2/19.5/26.2/49.2% for scores 0-1/2/3/4/5/6/7",
      "max_score": 9,
      "score": 0,
      "nihss": 0,
      "early_mortality_percent": 1.0,
      "ocsp": "lacs",
      "prestroke_mrs": 0,
      "stroke_subtype": "infarct"
    },
    {
      "components": [
        {
          "value": 18,
          "factor": "age",
          "points": 0,
          "present": false
        },
        {
          "value": "infarct",
          "factor": "stroke_subtype",
          "points": 0,
          "present": false
        },
        {
          "value": "lacs",
          "factor": "ocsp",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "prestroke_mrs",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "nihss",
          "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.",
      "age_years": 18,
      "citation": {
        "authors": "Abdul-Rahim AH, Quinn TJ, Alder S, Clark AB, Musgrave SD, Langhorne P, Potter JF, Myint PK",
        "doi": "10.1161/STROKEAHA.115.009898",
        "id": "abdul-rahim-2016",
        "pmid": "26578661",
        "source": "Stroke. 2016;47(1):74-79",
        "title": "Derivation and Validation of a Novel Prognostic Scale (Modified–Stroke Subtype, Oxfordshire Community Stroke Project Classification, Age, and Prestroke Modified Rankin) to Predict Early Mortality in Acute Stroke"
      },
      "formula": "msoar",
      "formula_expression": "mSOAR = age (≤65 0, 66-85 1, >85 2) + subtype (infarct 0, hemorrhage 1) + OCSP (LACS/PACS 0, POCS 1, TACS 2) + prestroke mRS (0-2 0, 3-4 1, 5 2) + NIHSS (0-4 0, 5-10 1, ≥11 2; 11-20 and ≥21 both 2); Abdul-Rahim 2016 Table 1 bands and Suppl Table I NIHSS integers; max 9; Table 2 derivation early mortality 1.0/1.5/6.5/9.2/19.5/26.2/49.2% for scores 0-1/2/3/4/5/6/7",
      "max_score": 9,
      "score": 0,
      "nihss": 0,
      "early_mortality_percent": 1.0,
      "ocsp": "lacs",
      "prestroke_mrs": 0,
      "stroke_subtype": "infarct"
    }
  ]
}
```

## Response fields

- `formula` (string): msoar
- `formula_expression` (string): Exact expression used
- `score` (integer): mSOAR points 0-9
- `max_score` (integer): Always 9
- `early_mortality_percent` (number): Abdul-Rahim 2016 Table 2 derivation observed early mortality percent for scores 0-1 through 7; null if not tabulated (8-9)
- `age_years` (integer): Age used for Table 1 age points
- `stroke_subtype` (string): infarct or hemorrhage used for subtype points
- `ocsp` (string): lacs, pacs, pocs, or tacs used for OCSP points
- `prestroke_mrs` (integer): Caller-assigned prestroke mRS used for SOAR mRS points
- `nihss` (integer): Caller-assigned NIHSS used for NIHSS points
- `components` (array): Per-factor points
- `citation` (object): Abdul-Rahim 2016 Stroke citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": 18,
      "factor": "age",
      "points": 0,
      "present": false
    },
    {
      "value": "infarct",
      "factor": "stroke_subtype",
      "points": 0,
      "present": false
    },
    {
      "value": "lacs",
      "factor": "ocsp",
      "points": 0,
      "present": false
    },
    {
      "value": 0,
      "factor": "prestroke_mrs",
      "points": 0,
      "present": false
    },
    {
      "value": 0,
      "factor": "nihss",
      "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.",
  "age_years": 18,
  "citation": {
    "authors": "Abdul-Rahim AH, Quinn TJ, Alder S, Clark AB, Musgrave SD, Langhorne P, Potter JF, Myint PK",
    "doi": "10.1161/STROKEAHA.115.009898",
    "id": "abdul-rahim-2016",
    "pmid": "26578661",
    "source": "Stroke. 2016;47(1):74-79",
    "title": "Derivation and Validation of a Novel Prognostic Scale (Modified–Stroke Subtype, Oxfordshire Community Stroke Project Classification, Age, and Prestroke Modified Rankin) to Predict Early Mortality in Acute Stroke"
  },
  "formula": "msoar",
  "formula_expression": "mSOAR = age (≤65 0, 66-85 1, >85 2) + subtype (infarct 0, hemorrhage 1) + OCSP (LACS/PACS 0, POCS 1, TACS 2) + prestroke mRS (0-2 0, 3-4 1, 5 2) + NIHSS (0-4 0, 5-10 1, ≥11 2; 11-20 and ≥21 both 2); Abdul-Rahim 2016 Table 1 bands and Suppl Table I NIHSS integers; max 9; Table 2 derivation early mortality 1.0/1.5/6.5/9.2/19.5/26.2/49.2% for scores 0-1/2/3/4/5/6/7",
  "max_score": 9,
  "score": 0,
  "nihss": 0,
  "early_mortality_percent": 1.0,
  "ocsp": "lacs",
  "prestroke_mrs": 0,
  "stroke_subtype": "infarct"
}
```

## Errors

- HTTP 400 `invalid_msoar`: mSOAR inputs must match Abdul-Rahim 2016 stroke subtype, OCSP, age, prestroke mRS, and NIHSS bands. 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

- [Modified Rankin](https://magentlab.com/docs/modified-rankin) — Return the van Swieten 1988 modified Rankin handicap grade 0-5 from a caller-assigned integer, with the published grade wording.
- [THRIVE](https://magentlab.com/docs/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](https://magentlab.com/docs/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.

- 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 accepts[0] (exact, EIP-3009) with validBefore = now + maxTimeoutSeconds (600 seconds), or accepts[1] (batch-settlement deposit/voucher) on product GET. Ping and POST {items} stay exact. Magent retries transient facilitator 429/5xx before answering.
- Retry the same URL with PAYMENT-SIGNATURE (base64 JSON of accepted and payload). Magent attaches canonical extensions.bazaar on CDP verify/settle; echoing 402 bazaar is optional.
- Success is HTTP 200 JSON plus PAYMENT-RESPONSE. exact settles before the tool. batch-settlement verifies (and deposit-settles) before the tool and commits the charge after HTTP 2xx. HTTP 503: retry the same PAYMENT-SIGNATURE. Mint a new exact 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.
- offered `batch-settlement` on eip155:8453: Payment-channel vouchers claimed later in batches. Exact stays accepts[0]. Same-path POST {items} is still exact. extra.assetTransferMethod=eip3009 extra.paymentFlow=authorization.

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

Same-path POST {items} is still scheme exact: one EIP-3009 authorization for GET unit plus $0.002 per extra item. 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

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