# ASPECTS (Barber)

ASPECTS (Barber)

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

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

## What it computes

Compute Barber 2000 ASPECTS as 10 minus the number of published MCA-territory regions with caller-assigned early ischemic change.

## When to use

When an agent already has caller-assigned early ischemic change flags for the ten published MCA-territory regions and needs the Barber 2000 ASPECTS total. magent does not read the CT, score posterior-circulation pc-ASPECTS, diagnose stroke, or issue a lytic order.

## When not to use

- Not a medical device. Not a diagnosis and not a lytic order. magent does not read the CT. Each of the ten published MCA-territory regions is a caller-assigned flag for early ischemic change.
- This is Barber 2000 MCA-territory ASPECTS (C, L, IC, I, M1–M6). It is not posterior-circulation pc-ASPECTS.
- Barber 2000 used ASPECTS of 7 or less versus greater than 7 to discriminate 3-month independence from dependence and death, and states that this analysis is not a reason to exclude patients from thrombolysis. This tool returns score and max_score only.

## Formula

```
ASPECTS = 10 - (C + L + IC + I + M1 + M2 + M3 + M4 + M5 + M6); 1 point subtracted for caller-assigned early ischemic change (focal swelling or parenchymal hypoattenuation) in each published MCA-territory region; C=caudate, L=lentiform, IC=internal capsule, I=insular ribbon, M1=anterior MCA cortex, M2=MCA cortex lateral to insular ribbon, M3=posterior MCA cortex, M4/M5/M6=anterior/lateral/posterior MCA territories immediately superior to M1/M2/M3, rostral to basal ganglia; Barber 2000; score 0-10; not posterior-circulation pc-ASPECTS
```

## Citation

[Validity and reliability of a quantitative computed tomography score in predicting outcome of hyperacute stroke before thrombolytic therapy](https://doi.org/10.1016/S0140-6736(00)02237-6)
Barber PA, Demchuk AM, Zhang J, Buchan AM
Lancet. 2000;355(9216):1670-1674
DOI: [10.1016/S0140-6736(00)02237-6](https://doi.org/10.1016/S0140-6736(00)02237-6)

## Worked example

### No regions involved

Given: `caudate=false, insular_ribbon=false, internal_capsule=false, lentiform=false, m1=false, m2=false, m3=false, m4=false, m5=false, m6=false`

1. C, L, IC, I, M1, M2, M3, M4, M5, and M6 are false as assigned by the caller (no early ischemic change)
2. ASPECTS = 10 - 0 = 10 (max 10)


### One region (insular ribbon) involved

Given: `caudate=false, insular_ribbon=true, internal_capsule=false, lentiform=false, m1=false, m2=false, m3=false, m4=false, m5=false, m6=false`

1. insular ribbon (I) is assigned true; C, L, IC, M1, M2, M3, M4, M5, and M6 are false
2. ASPECTS = 10 - 1 = 9 (max 10)


## Also searched as

- Alberta Stroke Programme Early CT Score
- ASPECTS
- Barber 2000 ASPECTS
- Alberta Stroke Program Early CT Score
- MCA territory early CT score
- ASPECTS C L IC I M1-M6
- hyperacute stroke CT score
- insular ribbon ASPECTS

## Parameters

- `caudate` (boolean, required): Caudate (C). Caller-assigned early ischemic change in the published caudate region (Barber 2000). magent does not read the CT. true or false.
- `lentiform` (boolean, required): Lentiform (L). Caller-assigned early ischemic change in the published lentiform region (Barber 2000). magent does not read the CT. true or false.
- `internal_capsule` (boolean, required): Internal capsule (IC). Caller-assigned early ischemic change in the published internal-capsule region (Barber 2000). magent does not read the CT. true or false.
- `insular_ribbon` (boolean, required): Insular ribbon (I). Caller-assigned early ischemic change in the published insular-ribbon region (Barber 2000). magent does not read the CT. true or false.
- `m1` (boolean, required): Anterior MCA cortex (M1). Caller-assigned early ischemic change in the published M1 region (Barber 2000). magent does not read the CT. true or false.
- `m2` (boolean, required): MCA cortex lateral to insular ribbon (M2). Caller-assigned early ischemic change in the published M2 region (Barber 2000). magent does not read the CT. true or false.
- `m3` (boolean, required): Posterior MCA cortex (M3). Caller-assigned early ischemic change in the published M3 region (Barber 2000). magent does not read the CT. true or false.
- `m4` (boolean, required): Anterior MCA territory immediately superior to M1, rostral to basal ganglia (M4). Caller-assigned early ischemic change in the published M4 region (Barber 2000). magent does not read the CT. true or false.
- `m5` (boolean, required): Lateral MCA territory immediately superior to M2, rostral to basal ganglia (M5). Caller-assigned early ischemic change in the published M5 region (Barber 2000). magent does not read the CT. true or false.
- `m6` (boolean, required): Posterior MCA territory immediately superior to M3, rostral to basal ganglia (M6). Caller-assigned early ischemic change in the published M6 region (Barber 2000). magent does not read the CT. true or false.

## 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/aspects`
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": [
    {
      "caudate": "false",
      "insular_ribbon": "false",
      "internal_capsule": "false",
      "lentiform": "false",
      "m1": "false",
      "m2": "false",
      "m3": "false",
      "m4": "false",
      "m5": "false",
      "m6": "false"
    },
    {
      "caudate": "false",
      "insular_ribbon": "false",
      "internal_capsule": "false",
      "lentiform": "false",
      "m1": "false",
      "m2": "false",
      "m3": "false",
      "m4": "false",
      "m5": "false",
      "m6": "false"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/aspects",
  "items": [
    {
      "components": [
        {
          "factor": "caudate",
          "points": 0,
          "present": false
        },
        {
          "factor": "lentiform",
          "points": 0,
          "present": false
        },
        {
          "factor": "internal_capsule",
          "points": 0,
          "present": false
        },
        {
          "factor": "insular_ribbon",
          "points": 0,
          "present": false
        },
        {
          "factor": "m1",
          "points": 0,
          "present": false
        },
        {
          "factor": "m2",
          "points": 0,
          "present": false
        },
        {
          "factor": "m3",
          "points": 0,
          "present": false
        },
        {
          "factor": "m4",
          "points": 0,
          "present": false
        },
        {
          "factor": "m5",
          "points": 0,
          "present": false
        },
        {
          "factor": "m6",
          "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": "Barber PA, Demchuk AM, Zhang J, Buchan AM",
        "doi": "10.1016/S0140-6736(00)02237-6",
        "id": "barber-2000-aspects",
        "pmid": "10905241",
        "source": "Lancet. 2000;355(9216):1670-1674",
        "title": "Validity and reliability of a quantitative computed tomography score in predicting outcome of hyperacute stroke before thrombolytic therapy"
      },
      "formula": "aspects",
      "formula_expression": "ASPECTS = 10 - (C + L + IC + I + M1 + M2 + M3 + M4 + M5 + M6); 1 point subtracted for caller-assigned early ischemic change (focal swelling or parenchymal hypoattenuation) in each published MCA-territory region; C=caudate, L=lentiform, IC=internal capsule, I=insular ribbon, M1=anterior MCA cortex, M2=MCA cortex lateral to insular ribbon, M3=posterior MCA cortex, M4/M5/M6=anterior/lateral/posterior MCA territories immediately superior to M1/M2/M3, rostral to basal ganglia; Barber 2000; score 0-10; not posterior-circulation pc-ASPECTS",
      "max_score": 10,
      "score": 10
    },
    {
      "components": [
        {
          "factor": "caudate",
          "points": 0,
          "present": false
        },
        {
          "factor": "lentiform",
          "points": 0,
          "present": false
        },
        {
          "factor": "internal_capsule",
          "points": 0,
          "present": false
        },
        {
          "factor": "insular_ribbon",
          "points": 0,
          "present": false
        },
        {
          "factor": "m1",
          "points": 0,
          "present": false
        },
        {
          "factor": "m2",
          "points": 0,
          "present": false
        },
        {
          "factor": "m3",
          "points": 0,
          "present": false
        },
        {
          "factor": "m4",
          "points": 0,
          "present": false
        },
        {
          "factor": "m5",
          "points": 0,
          "present": false
        },
        {
          "factor": "m6",
          "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": "Barber PA, Demchuk AM, Zhang J, Buchan AM",
        "doi": "10.1016/S0140-6736(00)02237-6",
        "id": "barber-2000-aspects",
        "pmid": "10905241",
        "source": "Lancet. 2000;355(9216):1670-1674",
        "title": "Validity and reliability of a quantitative computed tomography score in predicting outcome of hyperacute stroke before thrombolytic therapy"
      },
      "formula": "aspects",
      "formula_expression": "ASPECTS = 10 - (C + L + IC + I + M1 + M2 + M3 + M4 + M5 + M6); 1 point subtracted for caller-assigned early ischemic change (focal swelling or parenchymal hypoattenuation) in each published MCA-territory region; C=caudate, L=lentiform, IC=internal capsule, I=insular ribbon, M1=anterior MCA cortex, M2=MCA cortex lateral to insular ribbon, M3=posterior MCA cortex, M4/M5/M6=anterior/lateral/posterior MCA territories immediately superior to M1/M2/M3, rostral to basal ganglia; Barber 2000; score 0-10; not posterior-circulation pc-ASPECTS",
      "max_score": 10,
      "score": 10
    }
  ]
}
```

## Response fields

- `formula` (string): aspects
- `formula_expression` (string): Exact expression used
- `score` (integer): Barber 2000 ASPECTS: 10 minus caller-assigned involved MCA regions (0-10). Not pc-ASPECTS.
- `max_score` (integer): Always 10
- `components` (array): Per-region caller-assigned early ischemic change (1 if involved, else 0)
- `citation` (object): Barber Lancet 2000 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "factor": "caudate",
      "points": 0,
      "present": false
    },
    {
      "factor": "lentiform",
      "points": 0,
      "present": false
    },
    {
      "factor": "internal_capsule",
      "points": 0,
      "present": false
    },
    {
      "factor": "insular_ribbon",
      "points": 0,
      "present": false
    },
    {
      "factor": "m1",
      "points": 0,
      "present": false
    },
    {
      "factor": "m2",
      "points": 0,
      "present": false
    },
    {
      "factor": "m3",
      "points": 0,
      "present": false
    },
    {
      "factor": "m4",
      "points": 0,
      "present": false
    },
    {
      "factor": "m5",
      "points": 0,
      "present": false
    },
    {
      "factor": "m6",
      "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": "Barber PA, Demchuk AM, Zhang J, Buchan AM",
    "doi": "10.1016/S0140-6736(00)02237-6",
    "id": "barber-2000-aspects",
    "pmid": "10905241",
    "source": "Lancet. 2000;355(9216):1670-1674",
    "title": "Validity and reliability of a quantitative computed tomography score in predicting outcome of hyperacute stroke before thrombolytic therapy"
  },
  "formula": "aspects",
  "formula_expression": "ASPECTS = 10 - (C + L + IC + I + M1 + M2 + M3 + M4 + M5 + M6); 1 point subtracted for caller-assigned early ischemic change (focal swelling or parenchymal hypoattenuation) in each published MCA-territory region; C=caudate, L=lentiform, IC=internal capsule, I=insular ribbon, M1=anterior MCA cortex, M2=MCA cortex lateral to insular ribbon, M3=posterior MCA cortex, M4/M5/M6=anterior/lateral/posterior MCA territories immediately superior to M1/M2/M3, rostral to basal ganglia; Barber 2000; score 0-10; not posterior-circulation pc-ASPECTS",
  "max_score": 10,
  "score": 10
}
```

## Errors

- HTTP 400 `invalid_aspects_regions`: ASPECTS inputs must match caller-assigned involvement of the ten published MCA regions. 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

- [NIHSS](https://magentlab.com/docs/nihss) — Sum Brott 1989 NIH stroke scale points from 15 caller-assigned examination integers, including pupillary response and plantar reflex. Weaker-limb motor arm and leg. Does not apply later total-score severity bands.
- [Alteplase stroke dose](https://magentlab.com/docs/alteplase-stroke) — Compute NINDS 1995 intravenous alteplase milligrams from weight: 0.9 mg/kg capped at 90 mg, with 10% as a bolus and the remainder over 60 minutes.

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