# Canadian TIA Score

Canadian TIA Score

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

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

## What it computes

Compute the Perry 2021 Canadian TIA Score from caller-assigned clinical findings and investigations for subsequent 7-day stroke or carotid revascularization risk after TIA.

## When to use

When an agent has caller-assigned ED TIA findings and needs the published Perry 2021 Table 1 total and Table 4 low/medium/high bands, without inventing ABCD2 or an admit order.

## When not to use

- Not a medical device. Not a stroke diagnosis, TIA diagnosis, or admit order.
- This is the Canadian TIA Score (Perry 2021 Table 1), not ABCD2 and not ABCD2i.
- Age is required for the adult ED cohort (18-120) and does not add points. magent does not examine the patient, read ECG or CT, or assay platelets or glucose.
- Vertigo scores -3 when present (false scores 0). Dysarthria or aphasia scores 1, not 3. Glucose ≥15 mmol/L scores 3 (mg/dL converts as mmol/L = mg/dL / 18).

## Formula

```
Canadian TIA Score = first_tia 2 + symptoms_ge_10_min 2 + carotid_stenosis 2 + on_antiplatelet 3 + gait_disturbance 1 + unilateral_weakness 1 + vertigo -3 + (diastolic_mm_hg >= 110) 3 + dysarthria_or_aphasia 1 + af_on_ecg 2 + infarct_on_ct 1 + (platelets_10e9_l >= 400) 2 + (glucose >= 15 mmol/L) 3; age 18-120 required, 0 points; total -3 to 23; tia_risk low <=3 (0.5%), medium 4-8 (2.3%), high >=9 (5.9%) 7-day stroke or carotid revascularization (Perry 2021 Table 1 / Table 4); max 23
```

## Citation

[Prospective validation of Canadian TIA Score and comparison with ABCD2 and ABCD2i for subsequent stroke risk after transient ischaemic attack: multicentre prospective cohort study](https://doi.org/10.1136/bmj.n49)
Perry JJ, Sivilotti MLA, Émond M, Stiell IG, Stotts G, Lee J, Worster A, Morris J, Cheung KW, Jin AY, Oczkowski WJ, Sahlas DJ, Murray HE, Mackey A, Verreault S, Camden MC, Yip S, Teal P, Gladstone DJ, Boulos MI, Chagnon N, Shouldice E, Atzema C, Slaoui T, Teitlebaum J, Abdulaziz K, Nemnom MJ, Wells GA, Sharma M
BMJ. 2021;372:n49
DOI: [10.1136/bmj.n49](https://doi.org/10.1136/bmj.n49)

## Worked example

### Age 70, all flags false, diastolic 80, platelets 200, glucose 5.0 mmol/L

Given: `af_on_ecg=false, age=70, carotid_stenosis=false, diastolic_mm_hg=80, dysarthria_or_aphasia=false, first_tia=false, gait_disturbance=false, glucose_mmol_l=5.0, infarct_on_ct=false, on_antiplatelet=false, platelets_10e9_l=200, symptoms_ge_10_min=false, unilateral_weakness=false, vertigo=false`

1. Age 70 is required and scores 0; all clinical and investigation flags false; diastolic 80 <110; platelets 200 <400; glucose 5.0 <15
2. Score = 0; tia_risk low (≤3; Table 4 0.5%)


### Vertigo only

Given: `af_on_ecg=false, age=70, carotid_stenosis=false, diastolic_mm_hg=80, dysarthria_or_aphasia=false, first_tia=false, gait_disturbance=false, glucose_mmol_l=5.0, infarct_on_ct=false, on_antiplatelet=false, platelets_10e9_l=200, symptoms_ge_10_min=false, unilateral_weakness=false, vertigo=true`

1. vertigo true → -3; remaining items 0
2. Score = -3; tia_risk low


### First TIA, symptoms ≥10 min, past carotid stenosis, on antiplatelet

Given: `af_on_ecg=false, age=70, carotid_stenosis=true, diastolic_mm_hg=80, dysarthria_or_aphasia=false, first_tia=true, gait_disturbance=false, glucose_mmol_l=5.0, infarct_on_ct=false, on_antiplatelet=true, platelets_10e9_l=200, symptoms_ge_10_min=true, unilateral_weakness=false, vertigo=false`

1. first_tia 2 + symptoms_ge_10_min 2 + carotid_stenosis 2 + on_antiplatelet 3
2. Score = 9; tia_risk high (≥9; Table 4 5.9%)


## Also searched as

- Canadian TIA Score
- Canadian TIA risk score
- Perry TIA score
- transient ischaemic attack Canadian score
- subsequent stroke risk after TIA
- Canadian TIA Score Perry 2021
- TIA 7-day stroke risk score

## Parameters

- `age` (integer, required): Age in years (18-120). Required for the adult ED cohort. Does not add points (Perry 2021 Table 1 has no age item).
- `first_tia` (boolean, required): Lifetime first TIA (Perry 2021 Table 1). true scores 2; false scores 0. Caller-assigned; magent does not take a history.
- `symptoms_ge_10_min` (boolean, required): Symptoms lasting 10 minutes or longer (Perry 2021 Table 1). true scores 2; false scores 0. magent does not time the episode.
- `carotid_stenosis` (boolean, required): Past history of carotid stenosis (Perry 2021 Table 1). true scores 2; false scores 0. magent does not read imaging.
- `on_antiplatelet` (boolean, required): Already on antiplatelet therapy (Perry 2021 Table 1). true scores 3; false scores 0.
- `gait_disturbance` (boolean, required): Gait disturbance (Perry 2021 Table 1). true scores 1; false scores 0. magent does not examine the patient.
- `unilateral_weakness` (boolean, required): Unilateral weakness (Perry 2021 Table 1). true scores 1; false scores 0. magent does not examine the patient.
- `vertigo` (boolean, required): Vertigo (Perry 2021 Table 1). true scores -3; false scores 0. magent does not examine the patient.
- `diastolic_mm_hg` (number, required): Initial triage diastolic blood pressure in mm Hg (20-160). ≥110 scores 3; 109 scores 0 (Perry 2021 Table 1).
- `dysarthria_or_aphasia` (boolean, required): Dysarthria or aphasia on history or examination (Perry 2021 Table 1). true scores 1; false scores 0. Not 3. magent does not examine the patient.
- `af_on_ecg` (boolean, required): Atrial fibrillation on ECG (Perry 2021 Table 1). true scores 2; false scores 0. magent does not read the ECG.
- `infarct_on_ct` (boolean, required): New or old infarction on CT (Perry 2021 Table 1). true scores 1; false scores 0. magent does not read the CT.
- `platelets_10e9_l` (number, required): Platelet count ×10^9/L (1-2000). ≥400 scores 2; 399 scores 0 (Perry 2021 Table 1).
- `glucose_mmol_l` (number, optional): Glucose in mmol/L (2.8-55.5). Provide this or glucose_mg_dl, not both. ≥15.0 scores 3; 14.9 scores 0 (Perry 2021 Table 1).
- `glucose_mg_dl` (number, optional): Glucose in mg/dL (50-1000). Converted as mmol/L = mg/dL / 18. Provide this or glucose_mmol_l, not both. ≥15 mmol/L after conversion scores 3.

## 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/canadian_tia`
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": [
    {
      "af_on_ecg": "false",
      "age": "70",
      "carotid_stenosis": "false",
      "diastolic_mm_hg": "80",
      "dysarthria_or_aphasia": "false",
      "first_tia": "false",
      "gait_disturbance": "false",
      "glucose_mmol_l": "5.0",
      "infarct_on_ct": "false",
      "on_antiplatelet": "false",
      "platelets_10e9_l": "200",
      "symptoms_ge_10_min": "false",
      "unilateral_weakness": "false",
      "vertigo": "false"
    },
    {
      "af_on_ecg": "false",
      "age": "70",
      "carotid_stenosis": "false",
      "diastolic_mm_hg": "80",
      "dysarthria_or_aphasia": "false",
      "first_tia": "false",
      "gait_disturbance": "false",
      "glucose_mmol_l": "5.0",
      "infarct_on_ct": "false",
      "on_antiplatelet": "false",
      "platelets_10e9_l": "200",
      "symptoms_ge_10_min": "false",
      "unilateral_weakness": "false",
      "vertigo": "false"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/canadian_tia",
  "items": [
    {
      "components": [
        {
          "factor": "first_tia",
          "points": 0,
          "present": false
        },
        {
          "factor": "symptoms_ge_10_min",
          "points": 0,
          "present": false
        },
        {
          "factor": "carotid_stenosis",
          "points": 0,
          "present": false
        },
        {
          "factor": "on_antiplatelet",
          "points": 0,
          "present": false
        },
        {
          "factor": "gait_disturbance",
          "points": 0,
          "present": false
        },
        {
          "factor": "unilateral_weakness",
          "points": 0,
          "present": false
        },
        {
          "factor": "vertigo",
          "points": 0,
          "present": false
        },
        {
          "value": 80.0,
          "factor": "diastolic_mm_hg",
          "points": 0,
          "present": false
        },
        {
          "factor": "dysarthria_or_aphasia",
          "points": 0,
          "present": false
        },
        {
          "factor": "af_on_ecg",
          "points": 0,
          "present": false
        },
        {
          "factor": "infarct_on_ct",
          "points": 0,
          "present": false
        },
        {
          "value": 200.0,
          "factor": "platelets_10e9_l",
          "points": 0,
          "present": false
        },
        {
          "value": 5.0,
          "factor": "glucose",
          "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": "Perry JJ, Sivilotti MLA, Émond M, Stiell IG, Stotts G, Lee J, Worster A, Morris J, Cheung KW, Jin AY, Oczkowski WJ, Sahlas DJ, Murray HE, Mackey A, Verreault S, Camden MC, Yip S, Teal P, Gladstone DJ, Boulos MI, Chagnon N, Shouldice E, Atzema C, Slaoui T, Teitlebaum J, Abdulaziz K, Nemnom MJ, Wells GA, Sharma M",
        "doi": "10.1136/bmj.n49",
        "id": "perry-2021",
        "pmid": "33541890",
        "source": "BMJ. 2021;372:n49",
        "title": "Prospective validation of Canadian TIA Score and comparison with ABCD2 and ABCD2i for subsequent stroke risk after transient ischaemic attack: multicentre prospective cohort study"
      },
      "formula": "canadian_tia",
      "formula_expression": "Canadian TIA Score = first_tia 2 + symptoms_ge_10_min 2 + carotid_stenosis 2 + on_antiplatelet 3 + gait_disturbance 1 + unilateral_weakness 1 + vertigo -3 + (diastolic_mm_hg >= 110) 3 + dysarthria_or_aphasia 1 + af_on_ecg 2 + infarct_on_ct 1 + (platelets_10e9_l >= 400) 2 + (glucose >= 15 mmol/L) 3; age 18-120 required, 0 points; total -3 to 23; tia_risk low <=3 (0.5%), medium 4-8 (2.3%), high >=9 (5.9%) 7-day stroke or carotid revascularization (Perry 2021 Table 1 / Table 4); max 23",
      "diastolic_mm_hg": 80.0,
      "age_years": 70,
      "max_score": 23,
      "score": 0,
      "platelets_10e9_l": 200.0,
      "glucose_mmol_l": 5.0,
      "tia_risk": "low"
    },
    {
      "components": [
        {
          "factor": "first_tia",
          "points": 0,
          "present": false
        },
        {
          "factor": "symptoms_ge_10_min",
          "points": 0,
          "present": false
        },
        {
          "factor": "carotid_stenosis",
          "points": 0,
          "present": false
        },
        {
          "factor": "on_antiplatelet",
          "points": 0,
          "present": false
        },
        {
          "factor": "gait_disturbance",
          "points": 0,
          "present": false
        },
        {
          "factor": "unilateral_weakness",
          "points": 0,
          "present": false
        },
        {
          "factor": "vertigo",
          "points": 0,
          "present": false
        },
        {
          "value": 80.0,
          "factor": "diastolic_mm_hg",
          "points": 0,
          "present": false
        },
        {
          "factor": "dysarthria_or_aphasia",
          "points": 0,
          "present": false
        },
        {
          "factor": "af_on_ecg",
          "points": 0,
          "present": false
        },
        {
          "factor": "infarct_on_ct",
          "points": 0,
          "present": false
        },
        {
          "value": 200.0,
          "factor": "platelets_10e9_l",
          "points": 0,
          "present": false
        },
        {
          "value": 5.0,
          "factor": "glucose",
          "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": "Perry JJ, Sivilotti MLA, Émond M, Stiell IG, Stotts G, Lee J, Worster A, Morris J, Cheung KW, Jin AY, Oczkowski WJ, Sahlas DJ, Murray HE, Mackey A, Verreault S, Camden MC, Yip S, Teal P, Gladstone DJ, Boulos MI, Chagnon N, Shouldice E, Atzema C, Slaoui T, Teitlebaum J, Abdulaziz K, Nemnom MJ, Wells GA, Sharma M",
        "doi": "10.1136/bmj.n49",
        "id": "perry-2021",
        "pmid": "33541890",
        "source": "BMJ. 2021;372:n49",
        "title": "Prospective validation of Canadian TIA Score and comparison with ABCD2 and ABCD2i for subsequent stroke risk after transient ischaemic attack: multicentre prospective cohort study"
      },
      "formula": "canadian_tia",
      "formula_expression": "Canadian TIA Score = first_tia 2 + symptoms_ge_10_min 2 + carotid_stenosis 2 + on_antiplatelet 3 + gait_disturbance 1 + unilateral_weakness 1 + vertigo -3 + (diastolic_mm_hg >= 110) 3 + dysarthria_or_aphasia 1 + af_on_ecg 2 + infarct_on_ct 1 + (platelets_10e9_l >= 400) 2 + (glucose >= 15 mmol/L) 3; age 18-120 required, 0 points; total -3 to 23; tia_risk low <=3 (0.5%), medium 4-8 (2.3%), high >=9 (5.9%) 7-day stroke or carotid revascularization (Perry 2021 Table 1 / Table 4); max 23",
      "diastolic_mm_hg": 80.0,
      "age_years": 70,
      "max_score": 23,
      "score": 0,
      "platelets_10e9_l": 200.0,
      "glucose_mmol_l": 5.0,
      "tia_risk": "low"
    }
  ]
}
```

## Response fields

- `formula` (string): canadian_tia
- `formula_expression` (string): Exact expression used
- `score` (integer): Canadian TIA Score total from -3 to 23
- `max_score` (integer): Always 23
- `tia_risk` (string): low (score ≤3, 0.5%), medium (4-8, 2.3%), or high (≥9, 5.9%) 7-day stroke or carotid revascularization observed risk (Perry 2021 Table 4)
- `age_years` (integer): Age used for the adult clamp; not a Table 1 point item
- `diastolic_mm_hg` (number): Initial triage diastolic blood pressure used for the ≥110 item
- `platelets_10e9_l` (number): Platelet count used for the ≥400 item (×10^9/L)
- `glucose_mmol_l` (number): Glucose in mmol/L (mg/dL inputs converted /18) used for the ≥15 item
- `components` (array): Per-factor points
- `citation` (object): Perry 2021 BMJ citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "factor": "first_tia",
      "points": 0,
      "present": false
    },
    {
      "factor": "symptoms_ge_10_min",
      "points": 0,
      "present": false
    },
    {
      "factor": "carotid_stenosis",
      "points": 0,
      "present": false
    },
    {
      "factor": "on_antiplatelet",
      "points": 0,
      "present": false
    },
    {
      "factor": "gait_disturbance",
      "points": 0,
      "present": false
    },
    {
      "factor": "unilateral_weakness",
      "points": 0,
      "present": false
    },
    {
      "factor": "vertigo",
      "points": 0,
      "present": false
    },
    {
      "value": 80.0,
      "factor": "diastolic_mm_hg",
      "points": 0,
      "present": false
    },
    {
      "factor": "dysarthria_or_aphasia",
      "points": 0,
      "present": false
    },
    {
      "factor": "af_on_ecg",
      "points": 0,
      "present": false
    },
    {
      "factor": "infarct_on_ct",
      "points": 0,
      "present": false
    },
    {
      "value": 200.0,
      "factor": "platelets_10e9_l",
      "points": 0,
      "present": false
    },
    {
      "value": 5.0,
      "factor": "glucose",
      "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": "Perry JJ, Sivilotti MLA, Émond M, Stiell IG, Stotts G, Lee J, Worster A, Morris J, Cheung KW, Jin AY, Oczkowski WJ, Sahlas DJ, Murray HE, Mackey A, Verreault S, Camden MC, Yip S, Teal P, Gladstone DJ, Boulos MI, Chagnon N, Shouldice E, Atzema C, Slaoui T, Teitlebaum J, Abdulaziz K, Nemnom MJ, Wells GA, Sharma M",
    "doi": "10.1136/bmj.n49",
    "id": "perry-2021",
    "pmid": "33541890",
    "source": "BMJ. 2021;372:n49",
    "title": "Prospective validation of Canadian TIA Score and comparison with ABCD2 and ABCD2i for subsequent stroke risk after transient ischaemic attack: multicentre prospective cohort study"
  },
  "formula": "canadian_tia",
  "formula_expression": "Canadian TIA Score = first_tia 2 + symptoms_ge_10_min 2 + carotid_stenosis 2 + on_antiplatelet 3 + gait_disturbance 1 + unilateral_weakness 1 + vertigo -3 + (diastolic_mm_hg >= 110) 3 + dysarthria_or_aphasia 1 + af_on_ecg 2 + infarct_on_ct 1 + (platelets_10e9_l >= 400) 2 + (glucose >= 15 mmol/L) 3; age 18-120 required, 0 points; total -3 to 23; tia_risk low <=3 (0.5%), medium 4-8 (2.3%), high >=9 (5.9%) 7-day stroke or carotid revascularization (Perry 2021 Table 1 / Table 4); max 23",
  "diastolic_mm_hg": 80.0,
  "age_years": 70,
  "max_score": 23,
  "score": 0,
  "platelets_10e9_l": 200.0,
  "glucose_mmol_l": 5.0,
  "tia_risk": "low"
}
```

## Errors

- HTTP 400 `invalid_age`: age must be an integer from 18 to 120 Returned before settlement; you are not charged.
- HTTP 400 `invalid_flag`: boolean clinical flags must be true or false Returned before settlement; you are not charged.
- HTTP 400 `invalid_diastolic_bp`: diastolic_mm_hg must be a number from 20 to 160. Returned before settlement; you are not charged.
- HTTP 400 `invalid_platelets`: platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.
- HTTP 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.
- 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

- [ABCD2 score](https://magentlab.com/docs/abcd2) — Compute the ABCD2 score as age, blood pressure, caller-assigned clinical features, symptom duration, and diabetes.

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