MAGENT

ACS · LIVE

MACS ACS probability

MACS

Compute the Body 2014 Manchester Acute Coronary Syndromes (MACS) logistic probability of ACS from caller-assigned ECG ischaemia, worsening angina, right-arm or shoulder radiation, vomiting, observed sweating, hypotension, Roche Elecsys hs-cTnT in ng/L, and ELISA heart-type fatty acid-binding protein in ng/mL.

LIVE $0.005 USDC GET /api/calc/macs

Markdown: /docs/macs.md · Canonical: https://magentlab.com/docs/macs

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

What it computes

Compute the Body 2014 Manchester Acute Coronary Syndromes (MACS) logistic probability of ACS from caller-assigned ECG ischaemia, worsening angina, right-arm or shoulder radiation, vomiting, observed sweating, hypotension, Roche Elecsys hs-cTnT in ng/L, and ELISA heart-type fatty acid-binding protein in ng/mL.

When to use

When an agent already has those Body 2014 predictors as assigned by the caller and needs the published MACS probability and risk band. magent does not interpret an ECG or assay biomarkers. Not a diagnosis, discharge protocol, or T-MACS (troponin-only).

When not to use

  • Not a medical device. Not a diagnosis of ACS.
  • ecg_ischaemia, worsening_angina, pain_radiation_right_arm_or_shoulder, vomiting, sweating_observed, and hypotension are caller-assigned. magent does not interpret ECG ischaemia or assay biomarkers.
  • hs-cTnT is Roche Diagnostics Elecsys in ng/L as entered. 0–100000 ng/L is an implementation clamp. magent does not convert units.
  • H-FABP is the ELISA value in ng/mL as in Body 2014. 0–200 ng/mL is an implementation clamp. magent does not apply the later immunoturbidimetric h-FABP transform (b-0.2844)/1.3520 from Body 2015 EMJ.
  • Body 2014 Table 2 rounded MACS coefficients only. Not T-MACS (Body 2016 troponin-only). Not HEART. Not EDACS.
  • Figure 2 writes very low <2%, low 2–5%, moderate 5–95%, and high ≥95%. magent uses a complete partition: p<0.02 very_low, 0.02≤p<0.05 low, 0.05≤p<0.95 moderate, p≥0.95 high. Bands use unrounded p.
  • This tool returns the logistic probability and band. It is not a discharge, observation, or rule-out protocol.

Formula

p = 1/(1+e^(-λ)); λ = 0.068*a + 0.17*b + 1.75*c + 1.85*d + 1.72*e + 1.46*f + 0.92*g + 0.87*h - 4.83; a Roche Elecsys hs-cTnT ng/L; b ELISA H-FABP ng/mL; c ECG ischaemia 0/1; d sweating observed 0/1; e vomiting 0/1; f hypotension SBP<100 0/1; g worsening angina 0/1; h right-arm/shoulder radiation 0/1; very_low p<0.02, low 0.02<=p<0.05, moderate 0.05<=p<0.95, high p>=0.95 (Body 2014 Table 2 rounded values)

Citation

Title
The Manchester Acute Coronary Syndromes (MACS) decision rule for suspected cardiac chest pain: derivation and external validation
Authors
Body R, Carley S, McDowell G, et al.
Source
Heart. 2014;100(18):1462-1468
DOI
10.1136/heartjnl-2014-305564

Worked example

All dichotomous false, hs-cTnT 3 ng/L, H-FABP 1 ng/mL

Given: ecg_ischaemia=falseh_fabp_ng_ml=1hs_ctnt_ng_l=3hypotension=falsepain_radiation_right_arm_or_shoulder=falsesweating_observed=falsevomiting=falseworsening_angina=false

  1. c=d=e=f=g=h=0; a=3; b=1
  2. λ = 0.068×3 + 0.17×1 - 4.83 = -4.456
  3. p = 1/(1+e^4.456) = 0.0115
  4. p<0.02 → very_low

Also searched as

  • MACS
  • Manchester Acute Coronary Syndromes
  • original MACS
  • Body MACS
  • MACS H-FABP
  • Manchester ACS decision rule
  • MACS chest pain
  • hs-cTnT H-FABP MACS

Try

Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.

/api/calc/macs?ecg_ischaemia=false&worsening_angina=false&pain_radiation_right_arm_or_shoulder=false&vomiting=false&sweating_observed=false&hypotension=false&hs_ctnt_ng_l=3&h_fabp_ng_ml=1

Full URL: https://api.magentlab.com/api/calc/macs?ecg_ischaemia=false&worsening_angina=false&pain_radiation_right_arm_or_shoulder=false&vomiting=false&sweating_observed=false&hypotension=false&hs_ctnt_ng_l=3&h_fabp_ng_ml=1

Call

Expect HTTP 402 until you retry with PAYMENT-SIGNATURE. Incomplete query params return HTTP 400 before any quote or charge.

curl -i -H "Accept: application/json" "https://api.magentlab.com/api/calc/macs?ecg_ischaemia=false&worsening_angina=false&pain_radiation_right_arm_or_shoulder=false&vomiting=false&sweating_observed=false&hypotension=false&hs_ctnt_ng_l=3&h_fabp_ng_ml=1"

Parameters

Name Type Required Description
ecg_ischaemia boolean required Caller-assigned ECG ischaemia as used in Body 2014 (c; 1 if true, 0 if false). magent does not interpret an ECG.
worsening_angina boolean required Worsening or crescendo angina as assigned by the caller (g): anginal pain with increasing frequency, occurring with less exertion, or becoming more prolonged (Body 2014). true or false.
pain_radiation_right_arm_or_shoulder boolean required Pain radiating to the right arm or shoulder as assigned by the caller (h; Body 2014). true or false. magent does not take a pain history.
vomiting boolean required Vomiting in association with the presenting symptoms as assigned by the caller (e; Body 2014). true or false.
sweating_observed boolean required Sweating observed by the treating clinician as assigned by the caller (d; Body 2014). true or false. magent does not examine the patient.
hypotension boolean required Hypotension as assigned by the caller (f): systolic BP <100 mm Hg on arrival (Body 2014, dichotomised as in that paper). true or false.
hs_ctnt_ng_l number required Roche Diagnostics Elecsys high-sensitivity cardiac troponin T on arrival in ng/L (a; 0-100000, implementation clamp). Continuous linear predictor in Body 2014 Table 2. magent does not convert units or assay troponin.
h_fabp_ng_ml number required Heart-type fatty acid-binding protein by ELISA in ng/mL as in Body 2014 (b; 0-200, implementation clamp). Continuous linear predictor. magent does not convert units, assay H-FABP, or apply the later immunoturbidimetric transform.

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.

POST /api/calc/macs Max 25 unit_amount + extra_item_amount * (n - 1) extra $0.002 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 (fixture)

{
  "items": [
    {
      "ecg_ischaemia": "false",
      "h_fabp_ng_ml": "1",
      "hs_ctnt_ng_l": "3",
      "hypotension": "false",
      "pain_radiation_right_arm_or_shoulder": "false",
      "sweating_observed": "false",
      "vomiting": "false",
      "worsening_angina": "false"
    },
    {
      "ecg_ischaemia": "false",
      "h_fabp_ng_ml": "1",
      "hs_ctnt_ng_l": "3",
      "hypotension": "false",
      "pain_radiation_right_arm_or_shoulder": "false",
      "sweating_observed": "false",
      "vomiting": "false",
      "worsening_angina": "false"
    }
  ]
}

Open bulk paywall →

Opens a two-item fixture on the API host. Unpaid browsers get the same MetaMask paywall as GET; Pay retries POST with those items.

Example 200 (fixture)

{
  "count": 2,
  "path": "/api/calc/macs",
  "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": "Body R, Carley S, McDowell G, et al.",
        "doi": "10.1136/heartjnl-2014-305564",
        "id": "body-2014",
        "pmid": "24780911",
        "source": "Heart. 2014;100(18):1462-1468",
        "title": "The Manchester Acute Coronary Syndromes (MACS) decision rule for suspected cardiac chest pain: derivation and external validation"
      },
      "formula": "macs",
      "formula_expression": "p = 1/(1+e^(-λ)); λ = 0.068*a + 0.17*b + 1.75*c + 1.85*d + 1.72*e + 1.46*f + 0.92*g + 0.87*h - 4.83; a Roche Elecsys hs-cTnT ng/L; b ELISA H-FABP ng/mL; c ECG ischaemia 0/1; d sweating observed 0/1; e vomiting 0/1; f hypotension SBP<100 0/1; g worsening angina 0/1; h right-arm/shoulder radiation 0/1; very_low p<0.02, low 0.02<=p<0.05, moderate 0.05<=p<0.95, high p>=0.95 (Body 2014 Table 2 rounded values)",
      "vomiting": false,
      "hypotension": false,
      "linear_predictor": -4.456,
      "probability": 0.0115,
      "ecg_ischaemia": false,
      "h_fabp_ng_ml": 1.0,
      "hs_ctnt_ng_l": 3.0,
      "macs_band": "very_low",
      "pain_radiation_right_arm_or_shoulder": false,
      "sweating_observed": false,
      "worsening_angina": 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": "Body R, Carley S, McDowell G, et al.",
        "doi": "10.1136/heartjnl-2014-305564",
        "id": "body-2014",
        "pmid": "24780911",
        "source": "Heart. 2014;100(18):1462-1468",
        "title": "The Manchester Acute Coronary Syndromes (MACS) decision rule for suspected cardiac chest pain: derivation and external validation"
      },
      "formula": "macs",
      "formula_expression": "p = 1/(1+e^(-λ)); λ = 0.068*a + 0.17*b + 1.75*c + 1.85*d + 1.72*e + 1.46*f + 0.92*g + 0.87*h - 4.83; a Roche Elecsys hs-cTnT ng/L; b ELISA H-FABP ng/mL; c ECG ischaemia 0/1; d sweating observed 0/1; e vomiting 0/1; f hypotension SBP<100 0/1; g worsening angina 0/1; h right-arm/shoulder radiation 0/1; very_low p<0.02, low 0.02<=p<0.05, moderate 0.05<=p<0.95, high p>=0.95 (Body 2014 Table 2 rounded values)",
      "vomiting": false,
      "hypotension": false,
      "linear_predictor": -4.456,
      "probability": 0.0115,
      "ecg_ischaemia": false,
      "h_fabp_ng_ml": 1.0,
      "hs_ctnt_ng_l": 3.0,
      "macs_band": "very_low",
      "pain_radiation_right_arm_or_shoulder": false,
      "sweating_observed": false,
      "worsening_angina": false
    }
  ]
}

Response

Field Type Description
formula string macs
formula_expression string Body 2014 Table 2 rounded MACS logistic expression
ecg_ischaemia boolean Caller-assigned ECG ischaemia used as c
worsening_angina boolean Caller-assigned worsening/crescendo angina used as g
pain_radiation_right_arm_or_shoulder boolean Caller-assigned right-arm or shoulder radiation used as h
vomiting boolean Caller-assigned vomiting used as e
sweating_observed boolean Caller-assigned observed sweating used as d
hypotension boolean Caller-assigned hypotension (SBP <100 mm Hg) used as f
hs_ctnt_ng_l number Roche Elecsys hs-cTnT used as a, in ng/L
h_fabp_ng_ml number ELISA H-FABP used as b, in ng/mL as in Body 2014
linear_predictor number Body 2014 Table 2 λ from the rounded coefficients, 4 decimals
probability number p = 1/(1+e^(-λ)) on 0-1, 4 decimals. Banded on unrounded p.
macs_band string very_low (p<0.02), low (0.02≤p<0.05), moderate (0.05≤p<0.95), or high (p≥0.95). Figure 2 bands. Not a diagnosis.
citation object Body 2014 Heart citation
disclaimer string Not-a-device notice

Example JSON

Machine form of the same example. Frozen fixture. Not a live lookup.

{
  "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": "Body R, Carley S, McDowell G, et al.",
    "doi": "10.1136/heartjnl-2014-305564",
    "id": "body-2014",
    "pmid": "24780911",
    "source": "Heart. 2014;100(18):1462-1468",
    "title": "The Manchester Acute Coronary Syndromes (MACS) decision rule for suspected cardiac chest pain: derivation and external validation"
  },
  "formula": "macs",
  "formula_expression": "p = 1/(1+e^(-λ)); λ = 0.068*a + 0.17*b + 1.75*c + 1.85*d + 1.72*e + 1.46*f + 0.92*g + 0.87*h - 4.83; a Roche Elecsys hs-cTnT ng/L; b ELISA H-FABP ng/mL; c ECG ischaemia 0/1; d sweating observed 0/1; e vomiting 0/1; f hypotension SBP<100 0/1; g worsening angina 0/1; h right-arm/shoulder radiation 0/1; very_low p<0.02, low 0.02<=p<0.05, moderate 0.05<=p<0.95, high p>=0.95 (Body 2014 Table 2 rounded values)",
  "vomiting": false,
  "hypotension": false,
  "linear_predictor": -4.456,
  "probability": 0.0115,
  "ecg_ischaemia": false,
  "h_fabp_ng_ml": 1.0,
  "hs_ctnt_ng_l": 3.0,
  "macs_band": "very_low",
  "pain_radiation_right_arm_or_shoulder": false,
  "sweating_observed": false,
  "worsening_angina": false
}

Client errors (HTTP 400)

Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.

HTTP Code When
400 invalid_macs MACS inputs must match Body 2014 dichotomous predictors, Roche hs-cTnT ng/L, and H-FABP ng/mL from that paper. Returned before settlement; you are not charged.
400 invalid_hfabp h_fabp_ng_ml must be a number from 0 to 200 (Body 2014 MACS heart-type fatty acid binding protein ng/mL). Returned before settlement; you are not charged.
400 invalid_items POST body must be a JSON object with only an items array Returned before settlement; you are not charged.
400 invalid_item_count items must be an array of 1 to 25 objects Returned before settlement; you are not charged.
400 invalid_item each items entry must be a JSON object Returned before settlement; you are not charged.

Related tools

  • T-MACS — Compute the Body 2016 Troponin-only Manchester Acute Coronary Syndromes (T-MACS) logistic probability of ACS from caller-assigned ECG ischaemia, worsening angina, right-arm or shoulder radiation, vomiting, observed sweating, hypotension, and Roche Elecsys hs-cTnT in ng/L.
  • HEART score — Compute the HEART score as age points plus caller-assigned history, ECG, risk factors, and troponin (each 0-2).

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. Unpaid valid requests return HTTP 402 with a base64 PAYMENT-REQUIRED header. HTTP 503 is not a new quote: retry the same PAYMENT-SIGNATURE. Full handshake and shared payment errors: Payments. Stdio MCP: /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.