# Canadian Syncope Risk Score

CSRS

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

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

## What it computes

Compute the Thiruganasambandamoorthy 2016 Canadian Syncope Risk Score from caller-assigned ED clinical flags and ECG numbers.

## When to use

When an agent needs the published CSRS arithmetic after ED syncope assessment and must not invent a disposition or 30-day percent from a narrative.

## When not to use

- Not a medical device. Not a disposition protocol and not a syncope diagnosis.
- Derivation enrolled adults ≥16 years presenting within 24 hours of syncope. Age is not a CSRS component.
- Abstract and Figure 2 score QRS axis < −30° or >100°. Some reprints of Table 3 list >110°. magent uses the Figure 2 / abstract cutoff (>100°). Axis −30° and 100° do not score; −31° and 101° do.
- Caller assigns clinical flags and supplies ECG numbers. magent does not read an ECG tracing.
- QRS duration 130 ms does not score; 131 ms does. QTc 480 ms does not score; 481 ms does. SBP 90 and 180 mm Hg are not out of range (the paper is <90 or >180); that criterion is a caller-assigned boolean.
- This tool does not return 30-day percents or later five-tier labels.

## Formula

```
CSRS = predisposition_vasovagal(-1) + heart_disease(1) + sbp_lt_90_or_gt_180(2) + elevated_troponin(2) + (qrs_axis < -30 or > 100)(1) + (qrs_duration > 130)(1) + (qtc > 480)(2) + ed_vasovagal_syncope(-2) + ed_cardiac_syncope(2); range -3 to 11; max 11; Figure 2 / abstract (axis >100, not table 110)
```

## Citation

[Development of the Canadian Syncope Risk Score to predict serious adverse events after emergency department assessment of syncope.](https://doi.org/10.1503/cmaj.151469)
Thiruganasambandamoorthy V, Kwong K, Wells GA, et al.
CMAJ. 2016;188(12):E289-E298
DOI: [10.1503/cmaj.151469](https://doi.org/10.1503/cmaj.151469)

## Worked example

### All flags false, non-scoring ECG

Given: `ed_cardiac_syncope=false, ed_vasovagal_syncope=false, elevated_troponin=false, heart_disease=false, predisposition_vasovagal=false, qrs_axis_deg=0, qrs_duration_ms=80, qtc_ms=400, sbp_lt_90_or_gt_180=false`

1. All clinical flags false; QRS axis 0° (not < −30 or >100); QRS duration 80 ms (not >130); QTc 400 ms (not >480)
2. Score = 0 (max 11)


### Vasovagal predisposition and ED vasovagal diagnosis

Given: `ed_cardiac_syncope=false, ed_vasovagal_syncope=true, elevated_troponin=false, heart_disease=false, predisposition_vasovagal=true, qrs_axis_deg=0, qrs_duration_ms=80, qtc_ms=400, sbp_lt_90_or_gt_180=false`

1. predisposition_vasovagal → -1; ed_vasovagal_syncope → -2; remaining flags and ECG cutoffs false
2. Score = -3 (max 11)


## Also searched as

- Canadian Syncope Risk Score
- CSRS syncope
- Thiruganasambandamoorthy syncope
- ED syncope risk score
- Canadian syncope score
- CSRS ECG syncope

## Parameters

- `predisposition_vasovagal` (boolean, required): Predisposition to vasovagal syncope (Thiruganasambandamoorthy 2016). true or false. Scores -1 if true.
- `heart_disease` (boolean, required): History of heart disease (Thiruganasambandamoorthy 2016). true or false. Scores 1 if true.
- `sbp_lt_90_or_gt_180` (boolean, required): Any ED systolic BP <90 or >180 mm Hg (caller-assigned; SBP 90 and 180 are not out of range). true or false. Scores 2 if true. magent does not take a numeric SBP.
- `elevated_troponin` (boolean, required): Troponin above the 99th percentile (Thiruganasambandamoorthy 2016). true or false. Scores 2 if true.
- `qrs_axis_deg` (number, required): QRS axis in degrees (-180 to 180). Scores 1 when < -30 or > 100 (Figure 2 / abstract; not table 110). -30 and 100 do not score; -31 and 101 do.
- `qrs_duration_ms` (number, required): QRS duration in milliseconds (40-300). Scores 1 when >130. 130 does not score; 131 does.
- `qtc_ms` (number, required): QTc in milliseconds (200-800). Scores 2 when >480. 480 does not score; 481 does.
- `ed_vasovagal_syncope` (boolean, required): ED diagnosis of vasovagal syncope (Thiruganasambandamoorthy 2016). true or false. Scores -2 if true. Cannot be true together with ed_cardiac_syncope.
- `ed_cardiac_syncope` (boolean, required): ED diagnosis of cardiac syncope (Thiruganasambandamoorthy 2016). true or false. Scores 2 if true. Cannot be true together with ed_vasovagal_syncope.

## 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/csrs`
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": [
    {
      "ed_cardiac_syncope": "false",
      "ed_vasovagal_syncope": "false",
      "elevated_troponin": "false",
      "heart_disease": "false",
      "predisposition_vasovagal": "false",
      "qrs_axis_deg": "0",
      "qrs_duration_ms": "80",
      "qtc_ms": "400",
      "sbp_lt_90_or_gt_180": "false"
    },
    {
      "ed_cardiac_syncope": "false",
      "ed_vasovagal_syncope": "false",
      "elevated_troponin": "false",
      "heart_disease": "false",
      "predisposition_vasovagal": "false",
      "qrs_axis_deg": "0",
      "qrs_duration_ms": "80",
      "qtc_ms": "400",
      "sbp_lt_90_or_gt_180": "false"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/csrs",
  "items": [
    {
      "components": [
        {
          "factor": "predisposition_vasovagal",
          "points": 0,
          "present": false
        },
        {
          "factor": "heart_disease",
          "points": 0,
          "present": false
        },
        {
          "factor": "sbp_lt_90_or_gt_180",
          "points": 0,
          "present": false
        },
        {
          "factor": "elevated_troponin",
          "points": 0,
          "present": false
        },
        {
          "value": 0.0,
          "factor": "qrs_axis",
          "points": 0,
          "present": false
        },
        {
          "value": 80.0,
          "factor": "qrs_duration",
          "points": 0,
          "present": false
        },
        {
          "value": 400.0,
          "factor": "qtc",
          "points": 0,
          "present": false
        },
        {
          "factor": "ed_vasovagal_syncope",
          "points": 0,
          "present": false
        },
        {
          "factor": "ed_cardiac_syncope",
          "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": "Thiruganasambandamoorthy V, Kwong K, Wells GA, et al.",
        "doi": "10.1503/cmaj.151469",
        "id": "thiruganasambandamoorthy-2016",
        "pmid": "27378464",
        "source": "CMAJ. 2016;188(12):E289-E298",
        "title": "Development of the Canadian Syncope Risk Score to predict serious adverse events after emergency department assessment of syncope."
      },
      "formula": "csrs",
      "formula_expression": "CSRS = predisposition_vasovagal(-1) + heart_disease(1) + sbp_lt_90_or_gt_180(2) + elevated_troponin(2) + (qrs_axis < -30 or > 100)(1) + (qrs_duration > 130)(1) + (qtc > 480)(2) + ed_vasovagal_syncope(-2) + ed_cardiac_syncope(2); range -3 to 11; max 11; Figure 2 / abstract (axis >100, not table 110)",
      "max_score": 11,
      "score": 0,
      "qrs_axis_deg": 0.0,
      "qrs_duration_ms": 80.0,
      "qtc_ms": 400.0
    },
    {
      "components": [
        {
          "factor": "predisposition_vasovagal",
          "points": 0,
          "present": false
        },
        {
          "factor": "heart_disease",
          "points": 0,
          "present": false
        },
        {
          "factor": "sbp_lt_90_or_gt_180",
          "points": 0,
          "present": false
        },
        {
          "factor": "elevated_troponin",
          "points": 0,
          "present": false
        },
        {
          "value": 0.0,
          "factor": "qrs_axis",
          "points": 0,
          "present": false
        },
        {
          "value": 80.0,
          "factor": "qrs_duration",
          "points": 0,
          "present": false
        },
        {
          "value": 400.0,
          "factor": "qtc",
          "points": 0,
          "present": false
        },
        {
          "factor": "ed_vasovagal_syncope",
          "points": 0,
          "present": false
        },
        {
          "factor": "ed_cardiac_syncope",
          "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": "Thiruganasambandamoorthy V, Kwong K, Wells GA, et al.",
        "doi": "10.1503/cmaj.151469",
        "id": "thiruganasambandamoorthy-2016",
        "pmid": "27378464",
        "source": "CMAJ. 2016;188(12):E289-E298",
        "title": "Development of the Canadian Syncope Risk Score to predict serious adverse events after emergency department assessment of syncope."
      },
      "formula": "csrs",
      "formula_expression": "CSRS = predisposition_vasovagal(-1) + heart_disease(1) + sbp_lt_90_or_gt_180(2) + elevated_troponin(2) + (qrs_axis < -30 or > 100)(1) + (qrs_duration > 130)(1) + (qtc > 480)(2) + ed_vasovagal_syncope(-2) + ed_cardiac_syncope(2); range -3 to 11; max 11; Figure 2 / abstract (axis >100, not table 110)",
      "max_score": 11,
      "score": 0,
      "qrs_axis_deg": 0.0,
      "qrs_duration_ms": 80.0,
      "qtc_ms": 400.0
    }
  ]
}
```

## Response fields

- `formula` (string): csrs
- `formula_expression` (string): Exact expression used
- `score` (integer): CSRS points from -3 to 11
- `max_score` (integer): 11
- `qrs_axis_deg` (number): QRS axis in degrees used for the < -30 or > 100 cutoff
- `qrs_duration_ms` (number): QRS duration in ms used for the >130 cutoff
- `qtc_ms` (number): QTc in ms used for the >480 cutoff
- `components` (array): Per-factor points
- `citation` (object): Thiruganasambandamoorthy 2016 CMAJ citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "factor": "predisposition_vasovagal",
      "points": 0,
      "present": false
    },
    {
      "factor": "heart_disease",
      "points": 0,
      "present": false
    },
    {
      "factor": "sbp_lt_90_or_gt_180",
      "points": 0,
      "present": false
    },
    {
      "factor": "elevated_troponin",
      "points": 0,
      "present": false
    },
    {
      "value": 0.0,
      "factor": "qrs_axis",
      "points": 0,
      "present": false
    },
    {
      "value": 80.0,
      "factor": "qrs_duration",
      "points": 0,
      "present": false
    },
    {
      "value": 400.0,
      "factor": "qtc",
      "points": 0,
      "present": false
    },
    {
      "factor": "ed_vasovagal_syncope",
      "points": 0,
      "present": false
    },
    {
      "factor": "ed_cardiac_syncope",
      "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": "Thiruganasambandamoorthy V, Kwong K, Wells GA, et al.",
    "doi": "10.1503/cmaj.151469",
    "id": "thiruganasambandamoorthy-2016",
    "pmid": "27378464",
    "source": "CMAJ. 2016;188(12):E289-E298",
    "title": "Development of the Canadian Syncope Risk Score to predict serious adverse events after emergency department assessment of syncope."
  },
  "formula": "csrs",
  "formula_expression": "CSRS = predisposition_vasovagal(-1) + heart_disease(1) + sbp_lt_90_or_gt_180(2) + elevated_troponin(2) + (qrs_axis < -30 or > 100)(1) + (qrs_duration > 130)(1) + (qtc > 480)(2) + ed_vasovagal_syncope(-2) + ed_cardiac_syncope(2); range -3 to 11; max 11; Figure 2 / abstract (axis >100, not table 110)",
  "max_score": 11,
  "score": 0,
  "qrs_axis_deg": 0.0,
  "qrs_duration_ms": 80.0,
  "qtc_ms": 400.0
}
```

## Errors

- HTTP 400 `invalid_flag`: boolean clinical flags must be true or false Returned before settlement; you are not charged.
- HTTP 400 `invalid_qrs_axis`: qrs_axis_deg must be a number from -180 to 180 (Thiruganasambandamoorthy 2016 CSRS). Returned before settlement; you are not charged.
- HTTP 400 `invalid_qrs_duration`: qrs_duration_ms must be a number from 40 to 300 (Thiruganasambandamoorthy 2016 CSRS). Returned before settlement; you are not charged.
- HTTP 400 `invalid_qtc_ms`: qtc_ms must be a number from 200 to 800 (Thiruganasambandamoorthy 2016 CSRS). Returned before settlement; you are not charged.
- HTTP 400 `invalid_csrs_ed_diagnosis`: ed_vasovagal_syncope and ed_cardiac_syncope cannot both be true (Thiruganasambandamoorthy 2016 CSRS). 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

- [San Francisco Syncope Rule](https://magentlab.com/docs/sf-syncope) — Compute the San Francisco Syncope Rule (CHESS) criterion count and rule-positive flag from published cutoffs.

## 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 echoing accepted, payload, and extensions when present).
- 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.
- 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.
