# Vancouver Chest Pain Rule

Vancouver Chest Pain Rule

Status: LIVE
Price: $0.005 USDC
`GET /api/calc/vancouver_chest_pain`
HTML: https://magentlab.com/docs/vancouver-chest-pain
Markdown: https://magentlab.com/docs/vancouver-chest-pain.md

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

## What it computes

Apply the Christenson 2006 Vancouver Chest Pain Rule derivation tree and return whether caller-assigned ECG, 2-hour troponin, prior ACS or nitrate, palpation, age, and radiation nodes are early-discharge eligible.

## When to use

When an agent already has caller-assigned flags for an abnormal initial ECG, 2-hour troponin elevation, prior ACS or nitrate use, pain reproduced by palpation, and radiation to neck, arm, or jaw, plus age in years, and needs the published 2006 early-discharge-eligible result. magent does not interpret an ECG or assay troponin. Not the later age-50 variant.

## When not to use

- Not a medical device and not a diagnosis of ACS.
- Not a discharge, observation, or provocative-testing order.
- abnormal_initial_ecg, troponin_2h_elevated, prior_acs_or_nitrate, palpation_reproduces_pain, and pain_radiates_neck_jaw_arm are caller-assigned. magent does not interpret ECGs, palpate the chest, or assay troponin or CK-MB.
- This tool is the Christenson 2006 derivation tree with age under 40 on the age-history path. Age 40 is not that path. Not the Cullen 2014 or Scheuermeyer 2014 age-50 variant.
- The 2006 derivation used CK-MB on the age ≥40 branch; this tool takes a caller-assigned 2-hour troponin flag at that biomarker node.

## Formula

```
early_discharge_eligible iff not abnormal_initial_ecg and not troponin_2h_elevated and not prior_acs_or_nitrate and (palpation_reproduces_pain or (age < 40 and not pain_radiates_neck_jaw_arm)); age 40 is not the age-history path (Christenson 2006 derivation tree; not Cullen 2014 / Scheuermeyer 2014 age 50)
```

## Citation

[A clinical prediction rule for early discharge of patients with chest pain](https://doi.org/10.1016/j.annemergmed.2005.08.007)
Christenson J, Innes G, McKnight D, et al.
Ann Emerg Med. 2006;47(1):1-10
DOI: [10.1016/j.annemergmed.2005.08.007](https://doi.org/10.1016/j.annemergmed.2005.08.007)

## Worked example

### Age 35, clear ECG and 2-hour troponin, no prior ACS, no radiation

Given: `abnormal_initial_ecg=false, age=35, pain_radiates_neck_jaw_arm=false, palpation_reproduces_pain=false, prior_acs_or_nitrate=false, troponin_2h_elevated=false`

1. abnormal_initial_ecg is false, troponin_2h_elevated is false, and prior_acs_or_nitrate is false
2. palpation_reproduces_pain is false, so the age-history path applies
3. age 35 is under 40 and pain_radiates_neck_jaw_arm is false
4. early_discharge_eligible is true


## Also searched as

- Vancouver Chest Pain Rule
- Christenson 2006
- VCPR
- early discharge chest pain
- Vancouver chest pain
- Christenson Innes McKnight
- 2-hour chest pain rule

## Parameters

- `age` (integer, required): Age in years (integer 18-120). The 2006 age-history path requires age under 40 when palpation does not reproduce pain. Age 40 is not that path (Christenson 2006; not the later age-50 cutoff).
- `abnormal_initial_ecg` (boolean, required): Caller-assigned abnormal initial ECG as used in Christenson 2006 (true blocks early discharge). T-wave flattening was the only acceptable ST-T abnormality in that paper. true or false. magent does not interpret an ECG.
- `troponin_2h_elevated` (boolean, required): Caller-assigned 2-hour troponin at or above the institutional cutoff. true or false. true blocks early discharge. magent does not assay troponin or CK-MB.
- `prior_acs_or_nitrate` (boolean, required): Prior ACS (MI or angina) or nitrate use as assigned by the caller (Christenson 2006 prior ischemic chest pain / nitroglycerin node). true or false. true blocks early discharge.
- `palpation_reproduces_pain` (boolean, required): Chest pain reproduced by palpation as assigned by the caller. true or false. When ECG, 2-hour troponin, and prior ACS/nitrate are clear, true is early-discharge eligible regardless of age or radiation. magent does not palpate the chest.
- `pain_radiates_neck_jaw_arm` (boolean, required): Pain radiates to neck, arm, or jaw as assigned by the caller (Christenson 2006). true or false. On the age-history path (palpation false), true blocks early discharge. magent does not take a pain history.

## 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/vancouver_chest_pain`
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": [
    {
      "abnormal_initial_ecg": "false",
      "age": "35",
      "pain_radiates_neck_jaw_arm": "false",
      "palpation_reproduces_pain": "false",
      "prior_acs_or_nitrate": "false",
      "troponin_2h_elevated": "false"
    },
    {
      "abnormal_initial_ecg": "false",
      "age": "35",
      "pain_radiates_neck_jaw_arm": "false",
      "palpation_reproduces_pain": "false",
      "prior_acs_or_nitrate": "false",
      "troponin_2h_elevated": "false"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/vancouver_chest_pain",
  "items": [
    {
      "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": "Christenson J, Innes G, McKnight D, et al.",
        "doi": "10.1016/j.annemergmed.2005.08.007",
        "id": "christenson-2006",
        "pmid": "16387209",
        "source": "Ann Emerg Med. 2006;47(1):1-10",
        "title": "A clinical prediction rule for early discharge of patients with chest pain"
      },
      "formula": "vancouver_chest_pain",
      "formula_expression": "early_discharge_eligible iff not abnormal_initial_ecg and not troponin_2h_elevated and not prior_acs_or_nitrate and (palpation_reproduces_pain or (age < 40 and not pain_radiates_neck_jaw_arm)); age 40 is not the age-history path (Christenson 2006 derivation tree; not Cullen 2014 / Scheuermeyer 2014 age 50)",
      "age_years": 35,
      "troponin_2h_elevated": false,
      "criteria": [
        {
          "value": false,
          "factor": "normal_initial_ecg",
          "met": true
        },
        {
          "value": false,
          "factor": "troponin_2h_not_elevated",
          "met": true
        },
        {
          "value": false,
          "factor": "no_prior_acs_or_nitrate",
          "met": true
        },
        {
          "value": 35,
          "factor": "palpation_or_age_history",
          "met": true
        }
      ],
      "abnormal_initial_ecg": false,
      "early_discharge_eligible": true,
      "pain_radiates_neck_jaw_arm": false,
      "palpation_reproduces_pain": false,
      "prior_acs_or_nitrate": 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": "Christenson J, Innes G, McKnight D, et al.",
        "doi": "10.1016/j.annemergmed.2005.08.007",
        "id": "christenson-2006",
        "pmid": "16387209",
        "source": "Ann Emerg Med. 2006;47(1):1-10",
        "title": "A clinical prediction rule for early discharge of patients with chest pain"
      },
      "formula": "vancouver_chest_pain",
      "formula_expression": "early_discharge_eligible iff not abnormal_initial_ecg and not troponin_2h_elevated and not prior_acs_or_nitrate and (palpation_reproduces_pain or (age < 40 and not pain_radiates_neck_jaw_arm)); age 40 is not the age-history path (Christenson 2006 derivation tree; not Cullen 2014 / Scheuermeyer 2014 age 50)",
      "age_years": 35,
      "troponin_2h_elevated": false,
      "criteria": [
        {
          "value": false,
          "factor": "normal_initial_ecg",
          "met": true
        },
        {
          "value": false,
          "factor": "troponin_2h_not_elevated",
          "met": true
        },
        {
          "value": false,
          "factor": "no_prior_acs_or_nitrate",
          "met": true
        },
        {
          "value": 35,
          "factor": "palpation_or_age_history",
          "met": true
        }
      ],
      "abnormal_initial_ecg": false,
      "early_discharge_eligible": true,
      "pain_radiates_neck_jaw_arm": false,
      "palpation_reproduces_pain": false,
      "prior_acs_or_nitrate": false
    }
  ]
}
```

## Response fields

- `formula` (string): vancouver_chest_pain
- `formula_expression` (string): Christenson 2006 Vancouver Chest Pain Rule derivation tree
- `early_discharge_eligible` (boolean): true when the 2006 tree is early-discharge eligible. Not a discharge order or ACS diagnosis.
- `age_years` (integer): Age in years used for the age < 40 age-history path
- `abnormal_initial_ecg` (boolean): Echo of the caller-assigned abnormal initial ECG flag
- `troponin_2h_elevated` (boolean): Echo of the caller-assigned 2-hour troponin flag
- `prior_acs_or_nitrate` (boolean): Echo of the caller-assigned prior ACS or nitrate flag
- `palpation_reproduces_pain` (boolean): Echo of the caller-assigned palpation-reproduces-pain flag
- `pain_radiates_neck_jaw_arm` (boolean): Echo of the caller-assigned radiation-to-neck-arm-or-jaw flag
- `criteria` (array): Rows for normal_initial_ecg, troponin_2h_not_elevated, no_prior_acs_or_nitrate, and palpation_or_age_history with factor, met, and value. early_discharge_eligible iff all are met.
- `citation` (object): Christenson et al. Ann Emerg Med 2006 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "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": "Christenson J, Innes G, McKnight D, et al.",
    "doi": "10.1016/j.annemergmed.2005.08.007",
    "id": "christenson-2006",
    "pmid": "16387209",
    "source": "Ann Emerg Med. 2006;47(1):1-10",
    "title": "A clinical prediction rule for early discharge of patients with chest pain"
  },
  "formula": "vancouver_chest_pain",
  "formula_expression": "early_discharge_eligible iff not abnormal_initial_ecg and not troponin_2h_elevated and not prior_acs_or_nitrate and (palpation_reproduces_pain or (age < 40 and not pain_radiates_neck_jaw_arm)); age 40 is not the age-history path (Christenson 2006 derivation tree; not Cullen 2014 / Scheuermeyer 2014 age 50)",
  "age_years": 35,
  "troponin_2h_elevated": false,
  "criteria": [
    {
      "value": false,
      "factor": "normal_initial_ecg",
      "met": true
    },
    {
      "value": false,
      "factor": "troponin_2h_not_elevated",
      "met": true
    },
    {
      "value": false,
      "factor": "no_prior_acs_or_nitrate",
      "met": true
    },
    {
      "value": 35,
      "factor": "palpation_or_age_history",
      "met": true
    }
  ],
  "abnormal_initial_ecg": false,
  "early_discharge_eligible": true,
  "pain_radiates_neck_jaw_arm": false,
  "palpation_reproduces_pain": false,
  "prior_acs_or_nitrate": false
}
```

## Errors

- HTTP 400 `invalid_vancouver_chest_pain`: Vancouver Chest Pain Rule inputs must match Christenson 2006 early-discharge tree nodes from that paper only. 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

- [HEART score](https://magentlab.com/docs/heart) — Compute the HEART score as age points plus caller-assigned history, ECG, risk factors, and troponin (each 0-2).
- [ADAPT](https://magentlab.com/docs/adapt) — Apply the Than 2012 ADAPT 2-hour accelerated diagnostic protocol and return whether a caller-assigned TIMI UA/NSTEMI score plus initial ECG and 0-hour/2-hour troponin flags meet the published ADP-negative (low-risk) rule.
- [EDACS](https://magentlab.com/docs/edacs) — Compute the Than 2014 Emergency Department Assessment of Chest pain Score from age, sex, and caller-assigned flags.

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