# RACE scale (Pérez de la Ossa)

RACE scale

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

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

## What it computes

Sum Pérez de la Ossa 2014 Rapid Arterial oCclusion Evaluation (RACE) scale points from caller-assigned facial palsy, arm motor, leg motor, head and gaze deviation, and cortical signs (aphasia if right hemiparesis, agnosia if left) and return whether the total suggests large arterial occlusion (score ≥5).

## When to use

When an agent has caller-assigned Pérez de la Ossa 2014 RACE scale items and needs the published 0-9 total and score ≥5 LVO flag, not a stroke diagnosis, transfer order, or race-based equation.

## When not to use

- Not a medical device. magent does not examine the patient. Facial palsy, arm motor, leg motor, gaze deviation, hemiparesis side, and cortical points are caller-assigned Pérez de la Ossa 2014 integers.
- Not a stroke diagnosis and not a transfer or thrombolysis order.
- This is the Rapid Arterial oCclusion Evaluation (RACE) scale, not a race-based or ethnicity equation. Cortical points are aphasia when hemiparesis_side is right and agnosia when left (Table 1).
- lvo_suggested is true iff score ≥ 5 (this paper's cutoff). Sensitivity, PPV, and other operating-point statistics are not returned.

## Formula

```
RACE = facial_palsy (0 absent, 1 mild, 2 moderate to severe) + arm_motor (0 normal to mild, 1 moderate, 2 severe) + leg_motor (0 normal to mild, 1 moderate, 2 severe) + gaze_deviation (0 absent, 1 present) + cortical (0–2; aphasia if right hemiparesis, agnosia if left); Pérez de la Ossa 2014 Table 1; max 9; lvo_suggested if score ≥ 5
```

## Citation

[Design and validation of a prehospital stroke scale to predict large arterial occlusion: the Rapid Arterial oCclusion Evaluation scale](https://doi.org/10.1161/STROKEAHA.113.003071)
Pérez de la Ossa N, Carrera D, Gorchs M, Querol M, Millán M, Gomis M, Dorado L, López-Cancio E, Hernández-Pérez M, Chicharro V, Escalada X, Jiménez X, Dávalos A
Stroke. 2014;45(1):87-91
DOI: [10.1161/STROKEAHA.113.003071](https://doi.org/10.1161/STROKEAHA.113.003071)

## Worked example

### All motor items 0, gaze 0, right hemiparesis, cortical 0

Given: `arm_motor=0, cortical=0, facial_palsy=0, gaze_deviation=0, hemiparesis_side=right, leg_motor=0`

1. facial_palsy 0 + arm_motor 0 + leg_motor 0 + gaze_deviation 0 + cortical 0 (aphasia path, right)
2. Score = 0 (max 9); lvo_suggested false (cutoff is ≥5)


### All items at published maximum

Given: `arm_motor=2, cortical=2, facial_palsy=2, gaze_deviation=1, hemiparesis_side=right, leg_motor=2`

1. facial_palsy 2 + arm_motor 2 + leg_motor 2 + gaze_deviation 1 + cortical 2
2. Score = 9 (max 9); lvo_suggested true


## Also searched as

- RACE scale
- Rapid Arterial oCclusion Evaluation
- RACE score
- Pérez de la Ossa RACE
- prehospital LVO scale
- RACE stroke scale
- Rapid Arterial Occlusion Evaluation

## Parameters

- `facial_palsy` (integer, required): Caller-assigned Pérez de la Ossa 2014 RACE facial palsy (integer 0-2): 0 absent, 1 mild, 2 moderate to severe. magent does not examine the patient.
- `arm_motor` (integer, required): Caller-assigned Pérez de la Ossa 2014 RACE arm motor (integer 0-2): 0 normal to mild, 1 moderate, 2 severe. magent does not examine the patient.
- `leg_motor` (integer, required): Caller-assigned Pérez de la Ossa 2014 RACE leg motor (integer 0-2): 0 normal to mild, 1 moderate, 2 severe. magent does not examine the patient.
- `gaze_deviation` (integer, required): Caller-assigned Pérez de la Ossa 2014 RACE head and gaze deviation (integer 0-1): 0 absent, 1 present. magent does not examine the patient.
- `hemiparesis_side` (string, required): Caller-assigned hemiparesis side (right or left). Right scores cortical as aphasia (close eyes / make a fist). Left scores cortical as agnosia (recognizes arm and impairment). magent does not examine the patient.
- `cortical` (integer, required): Caller-assigned Pérez de la Ossa 2014 cortical points (integer 0-2). Right hemiparesis: aphasia, close eyes and make a fist (0 both, 1 one, 2 neither). Left hemiparesis: agnosia, recognizes arm and impairment (0 both, 1 one, 2 neither). magent does not 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/race`
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": [
    {
      "arm_motor": "0",
      "cortical": "0",
      "facial_palsy": "0",
      "gaze_deviation": "0",
      "hemiparesis_side": "right",
      "leg_motor": "0"
    },
    {
      "arm_motor": "0",
      "cortical": "0",
      "facial_palsy": "0",
      "gaze_deviation": "0",
      "hemiparesis_side": "right",
      "leg_motor": "0"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/race",
  "items": [
    {
      "components": [
        {
          "value": 0,
          "factor": "facial_palsy",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "arm_motor",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "leg_motor",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "gaze_deviation",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "cortical",
          "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": "Pérez de la Ossa N, Carrera D, Gorchs M, Querol M, Millán M, Gomis M, Dorado L, López-Cancio E, Hernández-Pérez M, Chicharro V, Escalada X, Jiménez X, Dávalos A",
        "doi": "10.1161/STROKEAHA.113.003071",
        "id": "perez-de-la-ossa-2014",
        "pmid": "24253548",
        "source": "Stroke. 2014;45(1):87-91",
        "title": "Design and validation of a prehospital stroke scale to predict large arterial occlusion: the Rapid Arterial oCclusion Evaluation scale"
      },
      "formula": "race",
      "formula_expression": "RACE = facial_palsy (0 absent, 1 mild, 2 moderate to severe) + arm_motor (0 normal to mild, 1 moderate, 2 severe) + leg_motor (0 normal to mild, 1 moderate, 2 severe) + gaze_deviation (0 absent, 1 present) + cortical (0–2; aphasia if right hemiparesis, agnosia if left); Pérez de la Ossa 2014 Table 1; max 9; lvo_suggested if score ≥ 5",
      "max_score": 9,
      "score": 0,
      "gaze_deviation": 0,
      "arm_motor": 0,
      "cortical": 0,
      "facial_palsy": 0,
      "hemiparesis_side": "right",
      "leg_motor": 0,
      "lvo_suggested": false
    },
    {
      "components": [
        {
          "value": 0,
          "factor": "facial_palsy",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "arm_motor",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "leg_motor",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "gaze_deviation",
          "points": 0,
          "present": false
        },
        {
          "value": 0,
          "factor": "cortical",
          "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": "Pérez de la Ossa N, Carrera D, Gorchs M, Querol M, Millán M, Gomis M, Dorado L, López-Cancio E, Hernández-Pérez M, Chicharro V, Escalada X, Jiménez X, Dávalos A",
        "doi": "10.1161/STROKEAHA.113.003071",
        "id": "perez-de-la-ossa-2014",
        "pmid": "24253548",
        "source": "Stroke. 2014;45(1):87-91",
        "title": "Design and validation of a prehospital stroke scale to predict large arterial occlusion: the Rapid Arterial oCclusion Evaluation scale"
      },
      "formula": "race",
      "formula_expression": "RACE = facial_palsy (0 absent, 1 mild, 2 moderate to severe) + arm_motor (0 normal to mild, 1 moderate, 2 severe) + leg_motor (0 normal to mild, 1 moderate, 2 severe) + gaze_deviation (0 absent, 1 present) + cortical (0–2; aphasia if right hemiparesis, agnosia if left); Pérez de la Ossa 2014 Table 1; max 9; lvo_suggested if score ≥ 5",
      "max_score": 9,
      "score": 0,
      "gaze_deviation": 0,
      "arm_motor": 0,
      "cortical": 0,
      "facial_palsy": 0,
      "hemiparesis_side": "right",
      "leg_motor": 0,
      "lvo_suggested": false
    }
  ]
}
```

## Response fields

- `formula` (string): race
- `formula_expression` (string): Exact expression used
- `score` (integer): RACE scale points 0-9
- `max_score` (integer): 9
- `lvo_suggested` (boolean): true iff score ≥ 5 (Pérez de la Ossa 2014 cutoff). Not a stroke diagnosis or transfer order. Sensitivity and PPV are not returned.
- `facial_palsy` (integer): Caller-assigned facial palsy 0, 1, or 2
- `arm_motor` (integer): Caller-assigned arm motor 0, 1, or 2
- `leg_motor` (integer): Caller-assigned leg motor 0, 1, or 2
- `gaze_deviation` (integer): Caller-assigned head and gaze deviation 0 or 1
- `hemiparesis_side` (string): Caller-assigned hemiparesis side, right or left
- `cortical` (integer): Caller-assigned cortical points 0, 1, or 2 (aphasia if right, agnosia if left)
- `components` (array): Per-item Pérez de la Ossa 2014 points
- `citation` (object): Pérez de la Ossa et al. Stroke 2014 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": 0,
      "factor": "facial_palsy",
      "points": 0,
      "present": false
    },
    {
      "value": 0,
      "factor": "arm_motor",
      "points": 0,
      "present": false
    },
    {
      "value": 0,
      "factor": "leg_motor",
      "points": 0,
      "present": false
    },
    {
      "value": 0,
      "factor": "gaze_deviation",
      "points": 0,
      "present": false
    },
    {
      "value": 0,
      "factor": "cortical",
      "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": "Pérez de la Ossa N, Carrera D, Gorchs M, Querol M, Millán M, Gomis M, Dorado L, López-Cancio E, Hernández-Pérez M, Chicharro V, Escalada X, Jiménez X, Dávalos A",
    "doi": "10.1161/STROKEAHA.113.003071",
    "id": "perez-de-la-ossa-2014",
    "pmid": "24253548",
    "source": "Stroke. 2014;45(1):87-91",
    "title": "Design and validation of a prehospital stroke scale to predict large arterial occlusion: the Rapid Arterial oCclusion Evaluation scale"
  },
  "formula": "race",
  "formula_expression": "RACE = facial_palsy (0 absent, 1 mild, 2 moderate to severe) + arm_motor (0 normal to mild, 1 moderate, 2 severe) + leg_motor (0 normal to mild, 1 moderate, 2 severe) + gaze_deviation (0 absent, 1 present) + cortical (0–2; aphasia if right hemiparesis, agnosia if left); Pérez de la Ossa 2014 Table 1; max 9; lvo_suggested if score ≥ 5",
  "max_score": 9,
  "score": 0,
  "gaze_deviation": 0,
  "arm_motor": 0,
  "cortical": 0,
  "facial_palsy": 0,
  "hemiparesis_side": "right",
  "leg_motor": 0,
  "lvo_suggested": false
}
```

## Errors

- HTTP 400 `invalid_race`: facial_palsy, arm_motor, and leg_motor 0-2; gaze_deviation 0-1; cortical 0-2 (Pérez de la Ossa 2014). Returned before settlement; you are not charged.
- HTTP 400 `invalid_hemiparesis_side`: hemiparesis_side must be right or left (Pérez de la Ossa 2014). 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

- [LAMS](https://magentlab.com/docs/lams) — Sum Llanes 2004 LAMS points from caller-assigned facial droop, arm drift, and grip (LAPSS motor 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.
