ACS · LIVE
HE-MACS ACS probability
HE-MACS
Compute the Alghamdi 2019 History and Electrocardiogram-only Manchester Acute Coronary Syndromes (HE-MACS) logistic probability of ACS from age, sex, and caller-assigned observed sweating, acute ECG ischaemia, right-arm or shoulder radiation, vomiting, hypotension (SBP <100 mm Hg), and current tobacco smoking.
Markdown: /docs/he-macs.md · Canonical: https://magentlab.com/docs/he-macs
Not a medical device. Not a diagnosis, dose, or listing recommendation.
What it computes
Compute the Alghamdi 2019 History and Electrocardiogram-only Manchester Acute Coronary Syndromes (HE-MACS) logistic probability of ACS from age, sex, and caller-assigned observed sweating, acute ECG ischaemia, right-arm or shoulder radiation, vomiting, hypotension (SBP <100 mm Hg), and current tobacco smoking.
When to use
When an agent already has those Alghamdi 2019 predictors as assigned by the caller and needs the published HE-MACS probability. magent does not interpret an ECG or take a history. Not a diagnosis, discharge protocol, MACS (Body 2014 biomarkers), or T-MACS.
When not to use
- Not a medical device. Not a diagnosis of ACS.
- sweating_observed, acute_ecg_ischaemia, pain_radiation_right_arm_or_shoulder, vomiting, hypotension, and current_smoker are caller-assigned. magent does not interpret ECG or take a history.
- Age 18–100 years is an implementation clamp. Age enters as a continuous linear predictor (g).
- Alghamdi 2019 Table 2 printed HE-MACS coefficients only. Not MACS (Body 2014 biomarkers). Not T-MACS.
- Four-group ROC thresholds are in that paper's supplement and are not restated here.
- This tool returns the logistic probability only. It is not a discharge, observation, or rule-out protocol.
Formula
p = 1/(1+e^(-λ)); λ = 1.426*a + 1.838*b + 0.734*c + 0.996*d + 1.353*e + 0.675*f + 0.024*g + 0.462*h - 4.416; a sweating observed 0/1; b acute ECG ischaemia 0/1; c pain radiating to right arm or shoulder 0/1; d vomiting associated with pain 0/1; e systolic BP <100 mmHg 0/1; f current tobacco smoker 0/1; g age in years (continuous); h male sex 1, female 0 (Alghamdi 2019 Table 2 printed values)
Citation
- Authors
- Alghamdi A, Howard L, Reynard C, et al.
- Source
- Eur J Emerg Med. 2019;26(5):356-361
Worked example
Age 40, female, all six flags false
Given:
acute_ecg_ischaemia=falseage=40current_smoker=falsehypotension=falsepain_radiation_right_arm_or_shoulder=falsesex=femalesweating_observed=falsevomiting=false
- a=b=c=d=e=f=0; g=40; h=0
- λ = 0.024×40 - 4.416 = -3.456
- p = 1/(1+e^3.456) = 0.0306
Also searched as
- HE-MACS
- History and Electrocardiogram-only MACS
- Alghamdi HE-MACS
- HE MACS decision aid
- ECG-only Manchester ACS
- HE-MACS chest pain
- History ECG MACS
Try
Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.
Full URL: https://api.magentlab.com/api/calc/he_macs?age=40&sex=female&sweating_observed=false´_ecg_ischaemia=false&pain_radiation_right_arm_or_shoulder=false&vomiting=false&hypotension=false¤t_smoker=false
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/he_macs?age=40&sex=female&sweating_observed=false´_ecg_ischaemia=false&pain_radiation_right_arm_or_shoulder=false&vomiting=false&hypotension=false¤t_smoker=false"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
age |
number | required | Age in years as a continuous linear predictor (g; 18-100, implementation clamp). Alghamdi 2019 Table 2. magent does not read an identity document. |
sex |
string | required · female, male | Sex used as h in Alghamdi 2019 Table 2 (male = 1, female = 0). male or female, case-insensitive. magent does not examine the patient. |
sweating_observed |
boolean | required | Sweating observed by the treating clinician as assigned by the caller (a; 1 if true, 0 if false). true or false. magent does not examine the patient. |
acute_ecg_ischaemia |
boolean | required | Caller-assigned acute ECG ischaemia as used in Alghamdi 2019 (b): ST-deviation or abnormal T inversion (1 if true, 0 if false). magent does not interpret an ECG. |
pain_radiation_right_arm_or_shoulder |
boolean | required | Pain radiating to the right arm or shoulder as assigned by the caller (c; Alghamdi 2019). true or false. magent does not take a pain history. |
vomiting |
boolean | required | Vomiting associated with the pain as assigned by the caller (d; Alghamdi 2019). true or false. |
hypotension |
boolean | required | Hypotension as assigned by the caller (e): systolic BP <100 mm Hg (Alghamdi 2019, dichotomised as in that paper). true or false. |
current_smoker |
boolean | required | Current tobacco smoker as assigned by the caller (f; Alghamdi 2019). true or false. magent does not take a smoking 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.
- 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": [
{
"acute_ecg_ischaemia": "false",
"age": "40",
"current_smoker": "false",
"hypotension": "false",
"pain_radiation_right_arm_or_shoulder": "false",
"sex": "female",
"sweating_observed": "false",
"vomiting": "false"
},
{
"acute_ecg_ischaemia": "false",
"age": "40",
"current_smoker": "false",
"hypotension": "false",
"pain_radiation_right_arm_or_shoulder": "false",
"sex": "female",
"sweating_observed": "false",
"vomiting": "false"
}
]
}
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/he_macs",
"items": [
{
"age": 40.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": "Alghamdi A, Howard L, Reynard C, et al.",
"doi": "10.1097/MEJ.0000000000000575",
"id": "alghamdi-2019",
"pmid": "30289775",
"source": "Eur J Emerg Med. 2019;26(5):356-361",
"title": "Enhanced triage for patients with suspected cardiac chest pain: the History and Electrocardiogram-only Manchester Acute Coronary Syndromes decision aid"
},
"formula": "he_macs",
"formula_expression": "p = 1/(1+e^(-λ)); λ = 1.426*a + 1.838*b + 0.734*c + 0.996*d + 1.353*e + 0.675*f + 0.024*g + 0.462*h - 4.416; a sweating observed 0/1; b acute ECG ischaemia 0/1; c pain radiating to right arm or shoulder 0/1; d vomiting associated with pain 0/1; e systolic BP <100 mmHg 0/1; f current tobacco smoker 0/1; g age in years (continuous); h male sex 1, female 0 (Alghamdi 2019 Table 2 printed values)",
"sex": "female",
"vomiting": false,
"hypotension": false,
"linear_predictor": -3.456,
"probability": 0.0306,
"current_smoker": false,
"acute_ecg_ischaemia": false,
"pain_radiation_right_arm_or_shoulder": false,
"sweating_observed": false
},
{
"age": 40.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": "Alghamdi A, Howard L, Reynard C, et al.",
"doi": "10.1097/MEJ.0000000000000575",
"id": "alghamdi-2019",
"pmid": "30289775",
"source": "Eur J Emerg Med. 2019;26(5):356-361",
"title": "Enhanced triage for patients with suspected cardiac chest pain: the History and Electrocardiogram-only Manchester Acute Coronary Syndromes decision aid"
},
"formula": "he_macs",
"formula_expression": "p = 1/(1+e^(-λ)); λ = 1.426*a + 1.838*b + 0.734*c + 0.996*d + 1.353*e + 0.675*f + 0.024*g + 0.462*h - 4.416; a sweating observed 0/1; b acute ECG ischaemia 0/1; c pain radiating to right arm or shoulder 0/1; d vomiting associated with pain 0/1; e systolic BP <100 mmHg 0/1; f current tobacco smoker 0/1; g age in years (continuous); h male sex 1, female 0 (Alghamdi 2019 Table 2 printed values)",
"sex": "female",
"vomiting": false,
"hypotension": false,
"linear_predictor": -3.456,
"probability": 0.0306,
"current_smoker": false,
"acute_ecg_ischaemia": false,
"pain_radiation_right_arm_or_shoulder": false,
"sweating_observed": false
}
]
}
Response
| Field | Type | Description |
|---|---|---|
formula |
string | he_macs |
formula_expression |
string | Alghamdi 2019 Table 2 printed HE-MACS logistic expression |
age |
number | Age in years used as g |
sex |
string | female or male used as h |
sweating_observed |
boolean | Caller-assigned observed sweating used as a |
acute_ecg_ischaemia |
boolean | Caller-assigned acute ECG ischaemia used as b |
pain_radiation_right_arm_or_shoulder |
boolean | Caller-assigned right-arm or shoulder radiation used as c |
vomiting |
boolean | Caller-assigned vomiting used as d |
hypotension |
boolean | Caller-assigned hypotension (SBP <100 mm Hg) used as e |
current_smoker |
boolean | Caller-assigned current tobacco smoking used as f |
linear_predictor |
number | Alghamdi 2019 Table 2 λ from the printed coefficients, 4 decimals |
probability |
number | p = 1/(1+e^(-λ)) on 0-1, 4 decimals. Probability only; no risk band. |
citation |
object | Alghamdi 2019 Eur J Emerg Med citation |
disclaimer |
string | Not-a-device notice |
Example JSON
Machine form of the same example. Frozen fixture. Not a live lookup.
{
"age": 40.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": "Alghamdi A, Howard L, Reynard C, et al.",
"doi": "10.1097/MEJ.0000000000000575",
"id": "alghamdi-2019",
"pmid": "30289775",
"source": "Eur J Emerg Med. 2019;26(5):356-361",
"title": "Enhanced triage for patients with suspected cardiac chest pain: the History and Electrocardiogram-only Manchester Acute Coronary Syndromes decision aid"
},
"formula": "he_macs",
"formula_expression": "p = 1/(1+e^(-λ)); λ = 1.426*a + 1.838*b + 0.734*c + 0.996*d + 1.353*e + 0.675*f + 0.024*g + 0.462*h - 4.416; a sweating observed 0/1; b acute ECG ischaemia 0/1; c pain radiating to right arm or shoulder 0/1; d vomiting associated with pain 0/1; e systolic BP <100 mmHg 0/1; f current tobacco smoker 0/1; g age in years (continuous); h male sex 1, female 0 (Alghamdi 2019 Table 2 printed values)",
"sex": "female",
"vomiting": false,
"hypotension": false,
"linear_predictor": -3.456,
"probability": 0.0306,
"current_smoker": false,
"acute_ecg_ischaemia": false,
"pain_radiation_right_arm_or_shoulder": false,
"sweating_observed": false
}
Client errors (HTTP 400)
Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_he_macs |
HE-MACS inputs must match Alghamdi 2019 age, sex, and the six dichotomous history/ECG predictors from that paper. 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
- 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.
- 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.