# 4-variable anterior STE (Driver 2017)

4-variable anterior STE

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

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

## What it computes

Compute the Driver 2017 4-variable formula that differentiates normal-variant ST elevation in V2-V4 (early repolarization) from subtle left anterior descending coronary occlusion, using computerized Bazett QTc, total QRS amplitude in V2, R-wave amplitude in V4, and ST elevation at 60 ms after the J-point in V3.

## When to use

When an agent has caller-measured millimetre amplitudes and a computerized Bazett QTc, the tracing has ≥1 mm ST elevation in V2-V4, and the differential is subtle LAD occlusion versus early repolarization. Do not use when obvious occlusion features are present.

## When not to use

- Not a medical device. Not a STEMI diagnosis and not a catheterization-lab order.
- Intended only when there is ≥1 mm ST elevation in V2-V4 and the differential is subtle LAD occlusion versus early repolarization (normal-variant STE). Do not apply if obvious occlusion features are present: STE >5 mm, Q waves in V2-V4, terminal QRS distortion, anterior ST depression, inferior reciprocal change, or LVH.
- Inputs are caller-supplied millimetre amplitudes and a computerized Bazett QTc. magent does not read the ECG.
- Driver 2017 4-variable formula only (QTc, QRS V2, R V4, STE at 60 ms in V3). Not the 3-variable formula.
- lad_occlusion_suggested is true iff the rounded formula_value is ≥18.2, the derivation cutpoint with highest accuracy. magent does not assign other clinical bands.

## Formula

```
formula_value = 0.052 * qtc_ms - 0.151 * qrs_v2_mm - 0.268 * r_v4_mm + 1.062 * ste60_v3_mm
```

## Citation

[A new 4-variable formula to differentiate normal variant ST segment elevation in V2-V4 (early repolarization) from subtle left anterior descending coronary occlusion - Adding QRS amplitude of V2 improves the model](https://doi.org/10.1016/j.jelectrocard.2017.04.005)
Driver BE, Khalil A, Henry T, Kazmi F, Adil A, Smith SW
J Electrocardiol. 2017;50(5):561-569
DOI: [10.1016/j.jelectrocard.2017.04.005](https://doi.org/10.1016/j.jelectrocard.2017.04.005)

## Worked example

### QTc 400, QRS V2 20 mm, R V4 15 mm, STE60 V3 1 mm (below 18.2)

Given: `qrs_v2_mm=20, qtc_ms=400, r_v4_mm=15, ste60_v3_mm=1`

1. 0.052 * 400 = 20.8
2. 0.151 * 20 = 3.02
3. 0.268 * 15 = 4.02
4. 1.062 * 1 = 1.062
5. formula_value = 20.8 - 3.02 - 4.02 + 1.062 = 14.822
6. 14.822 is not ≥ 18.2 → lad_occlusion_suggested false


### QTc 420, QRS V2 8 mm, R V4 5 mm, STE60 V3 2 mm (at or above 18.2)

Given: `qrs_v2_mm=8, qtc_ms=420, r_v4_mm=5, ste60_v3_mm=2`

1. 0.052 * 420 = 21.84
2. 0.151 * 8 = 1.208
3. 0.268 * 5 = 1.34
4. 1.062 * 2 = 2.124
5. formula_value = 21.84 - 1.208 - 1.34 + 2.124 = 21.416
6. 21.416 ≥ 18.2 → lad_occlusion_suggested true


## Also searched as

- 4-variable anterior STE
- Driver 2017
- subtle LAD occlusion
- early repolarization vs LAD occlusion
- V2-V4 ST elevation
- normal variant STE vs occlusion
- 4-variable formula Driver

## Parameters

- `qtc_ms` (number, required): Computerized Bazett QTc in milliseconds (200-800). Driver 2017.
- `qrs_v2_mm` (number, required): Total QRS amplitude in V2 (R+S) in millimetres at standard calibration (0.1-50). Driver 2017.
- `r_v4_mm` (number, required): R-wave amplitude in V4 in millimetres at standard calibration (0.1-50). Driver 2017.
- `ste60_v3_mm` (number, required): ST elevation at 60 ms after the J-point in V3, in millimetres (0-10). Driver 2017.

## 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/subtle_stemi`
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": [
    {
      "qrs_v2_mm": "20",
      "qtc_ms": "400",
      "r_v4_mm": "15",
      "ste60_v3_mm": "1"
    },
    {
      "qrs_v2_mm": "20",
      "qtc_ms": "400",
      "r_v4_mm": "15",
      "ste60_v3_mm": "1"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/subtle_stemi",
  "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": "Driver BE, Khalil A, Henry T, Kazmi F, Adil A, Smith SW",
        "doi": "10.1016/j.jelectrocard.2017.04.005",
        "id": "driver-2017",
        "pmid": "28460689",
        "source": "J Electrocardiol. 2017;50(5):561-569",
        "title": "A new 4-variable formula to differentiate normal variant ST segment elevation in V2-V4 (early repolarization) from subtle left anterior descending coronary occlusion - Adding QRS amplitude of V2 improves the model"
      },
      "formula": "subtle_stemi",
      "formula_expression": "formula_value = 0.052 * qtc_ms - 0.151 * qrs_v2_mm - 0.268 * r_v4_mm + 1.062 * ste60_v3_mm",
      "qtc_ms": 400.0,
      "formula_value": 14.822,
      "lad_occlusion_suggested": false,
      "qrs_v2_mm": 20.0,
      "r_v4_mm": 15.0,
      "ste60_v3_mm": 1.0
    },
    {
      "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": "Driver BE, Khalil A, Henry T, Kazmi F, Adil A, Smith SW",
        "doi": "10.1016/j.jelectrocard.2017.04.005",
        "id": "driver-2017",
        "pmid": "28460689",
        "source": "J Electrocardiol. 2017;50(5):561-569",
        "title": "A new 4-variable formula to differentiate normal variant ST segment elevation in V2-V4 (early repolarization) from subtle left anterior descending coronary occlusion - Adding QRS amplitude of V2 improves the model"
      },
      "formula": "subtle_stemi",
      "formula_expression": "formula_value = 0.052 * qtc_ms - 0.151 * qrs_v2_mm - 0.268 * r_v4_mm + 1.062 * ste60_v3_mm",
      "qtc_ms": 400.0,
      "formula_value": 14.822,
      "lad_occlusion_suggested": false,
      "qrs_v2_mm": 20.0,
      "r_v4_mm": 15.0,
      "ste60_v3_mm": 1.0
    }
  ]
}
```

## Response fields

- `formula` (string): subtle_stemi
- `formula_expression` (string): Exact Driver 2017 4-variable expression
- `qtc_ms` (number): Computerized Bazett QTc used, milliseconds
- `qrs_v2_mm` (number): Total QRS amplitude in V2 used, millimetres
- `r_v4_mm` (number): R-wave amplitude in V4 used, millimetres
- `ste60_v3_mm` (number): ST elevation at 60 ms after the J-point in V3 used, millimetres
- `formula_value` (number): Driver 2017 4-variable value, 3 decimals
- `lad_occlusion_suggested` (boolean): True iff formula_value is ≥ 18.2 (Driver 2017 derivation cutpoint with highest accuracy). Not a STEMI diagnosis.
- `citation` (object): Driver J Electrocardiol 2017 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": "Driver BE, Khalil A, Henry T, Kazmi F, Adil A, Smith SW",
    "doi": "10.1016/j.jelectrocard.2017.04.005",
    "id": "driver-2017",
    "pmid": "28460689",
    "source": "J Electrocardiol. 2017;50(5):561-569",
    "title": "A new 4-variable formula to differentiate normal variant ST segment elevation in V2-V4 (early repolarization) from subtle left anterior descending coronary occlusion - Adding QRS amplitude of V2 improves the model"
  },
  "formula": "subtle_stemi",
  "formula_expression": "formula_value = 0.052 * qtc_ms - 0.151 * qrs_v2_mm - 0.268 * r_v4_mm + 1.062 * ste60_v3_mm",
  "qtc_ms": 400.0,
  "formula_value": 14.822,
  "lad_occlusion_suggested": false,
  "qrs_v2_mm": 20.0,
  "r_v4_mm": 15.0,
  "ste60_v3_mm": 1.0
}
```

## Errors

- 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_precordial_mm`: qrs_v2_mm and r_v4_mm must each be a number from 0.1 to 50 (Driver 2017 millimetres at standard calibration). Returned before settlement; you are not charged.
- HTTP 400 `invalid_st_deviation_mm`: st_deviation_mm must be a number from 0 to 10 (Mark 1991 maximal ST deviation in millimetres). 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

- [QTc](https://magentlab.com/docs/qtc) — Compute heart-rate-corrected QT using Bazett or Fridericia. The formula argument is required.

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