Emergency · LIVE
Ottawa Heart Failure Risk Scale
OHFRS
Sum the ten Stiell 2013 Ottawa Heart Failure Risk Scale flags and return the integer point total (max 15).
Markdown: /docs/ohfrs.md · Canonical: https://magentlab.com/docs/ohfrs
Not a medical device. Not a diagnosis, dose, or listing recommendation.
What it computes
Sum the ten Stiell 2013 Ottawa Heart Failure Risk Scale flags and return the integer point total (max 15).
When to use
When an agent needs the published Stiell 2013 OHFRS point total from caller-assigned flags and must not invent ECG, walk-test, or laboratory findings or a discharge decision.
When not to use
- Not a medical device.
- Not a disposition or discharge order. Not EHMRG.
- Apply after ED intervention as in Stiell 2013. magent does not walk the patient or interpret the ECG.
- The caller assigns all ten flags after applying the published cutoffs. magent does not assay labs.
Formula
OHFRS = history_stroke_or_tia(1) + intubation_respiratory_distress(2) + hr_arrival_ge_110(2) + sao2_lt_90_arrival(1) + walk_test_hr_ge_110_or_unable(1) + new_ischemic_ecg(2) + urea_ge_12_mmol_l(1) + co2_ge_35_mmol_l(2) + troponin_mi_level(2) + ntprobnp_ge_5000(1); Stiell 2013 derivation; max 15; SAE risk varied from 2.8% to 89.0%; admission thresholds of total score 1, 2, or 3 had sensitivities 95.2 / 80.6 / 64.5%
Citation
- Authors
- Stiell IG, Clement CM, Brison RJ, et al.
- Source
- Acad Emerg Med. 2013;20(1):17-26
Worked example
All ten flags false
Given:
co2_ge_35_mmol_l=falsehistory_stroke_or_tia=falsehr_arrival_ge_110=falseintubation_respiratory_distress=falsenew_ischemic_ecg=falsentprobnp_ge_5000=falsesao2_lt_90_arrival=falsetroponin_mi_level=falseurea_ge_12_mmol_l=falsewalk_test_hr_ge_110_or_unable=false
- Ten findings absent → 0 each
- Score = 0 (max 15)
All ten flags true
Given:
co2_ge_35_mmol_l=truehistory_stroke_or_tia=truehr_arrival_ge_110=trueintubation_respiratory_distress=truenew_ischemic_ecg=truentprobnp_ge_5000=truesao2_lt_90_arrival=truetroponin_mi_level=trueurea_ge_12_mmol_l=truewalk_test_hr_ge_110_or_unable=true
- 1+2+2+1+1+2+1+2+2+1
- Score = 15 (max 15)
Also searched as
- Ottawa Heart Failure Risk Scale
- OHFRS
- Stiell heart failure risk
- Ottawa HF risk scale
- Stiell 2013 OHFRS
- emergency heart failure SAE
- Ottawa Heart Failure Risk Score
- NT-proBNP heart failure ED score
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/ohfrs?history_stroke_or_tia=false&intubation_respiratory_distress=false&hr_arrival_ge_110=false&sao2_lt_90_arrival=false&walk_test_hr_ge_110_or_unable=false&new_ischemic_ecg=false&urea_ge_12_mmol_l=false&co2_ge_35_mmol_l=false&troponin_mi_level=false&ntprobnp_ge_5000=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/ohfrs?history_stroke_or_tia=false&intubation_respiratory_distress=false&hr_arrival_ge_110=false&sao2_lt_90_arrival=false&walk_test_hr_ge_110_or_unable=false&new_ischemic_ecg=false&urea_ge_12_mmol_l=false&co2_ge_35_mmol_l=false&troponin_mi_level=false&ntprobnp_ge_5000=false"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
history_stroke_or_tia |
boolean | required | History of stroke or TIA as assigned by the caller (Stiell 2013; 1 point if true). true or false. magent does not take the history. |
intubation_respiratory_distress |
boolean | required | Intubation for respiratory distress as assigned by the caller (Stiell 2013; 2 points if true). true or false. |
hr_arrival_ge_110 |
boolean | required | Heart rate on ED arrival >=110 as assigned by the caller after applying the Stiell 2013 cutoff (2 points if true). true or false. magent does not measure heart rate. |
sao2_lt_90_arrival |
boolean | required | Oxygen saturation <90% on ED arrival as assigned by the caller after applying the Stiell 2013 cutoff (1 point if true). true or false. magent does not measure saturation. |
walk_test_hr_ge_110_or_unable |
boolean | required | Heart rate >=110 during the 3-minute walk test, or unable to perform the walk test, as assigned by the caller after ED intervention (Stiell 2013; 1 point if true). true or false. magent does not walk the patient. |
new_ischemic_ecg |
boolean | required | New ischemic ECG changes as assigned by the caller (Stiell 2013 derivation; 2 points if true). true or false. magent does not interpret the ECG. |
urea_ge_12_mmol_l |
boolean | required | Urea >=12 mmol/L as assigned by the caller after applying the Stiell 2013 cutoff (1 point if true). true or false. magent does not assay urea. |
co2_ge_35_mmol_l |
boolean | required | Serum CO2 >=35 mmol/L as assigned by the caller after applying the Stiell 2013 cutoff (2 points if true). true or false. magent does not assay CO2. |
troponin_mi_level |
boolean | required | Troponin I or T elevated to MI level as assigned by the caller (Stiell 2013; 2 points if true). true or false. magent does not assay troponin. |
ntprobnp_ge_5000 |
boolean | required | NT-proBNP >=5000 ng/L as assigned by the caller after applying the Stiell 2013 cutoff (1 point if true). true or false. magent does not assay NT-proBNP. |
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": [
{
"co2_ge_35_mmol_l": "false",
"history_stroke_or_tia": "false",
"hr_arrival_ge_110": "false",
"intubation_respiratory_distress": "false",
"new_ischemic_ecg": "false",
"ntprobnp_ge_5000": "false",
"sao2_lt_90_arrival": "false",
"troponin_mi_level": "false",
"urea_ge_12_mmol_l": "false",
"walk_test_hr_ge_110_or_unable": "false"
},
{
"co2_ge_35_mmol_l": "false",
"history_stroke_or_tia": "false",
"hr_arrival_ge_110": "false",
"intubation_respiratory_distress": "false",
"new_ischemic_ecg": "false",
"ntprobnp_ge_5000": "false",
"sao2_lt_90_arrival": "false",
"troponin_mi_level": "false",
"urea_ge_12_mmol_l": "false",
"walk_test_hr_ge_110_or_unable": "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/ohfrs",
"items": [
{
"components": [
{
"factor": "history_stroke_or_tia",
"points": 0,
"present": false
},
{
"factor": "intubation_respiratory_distress",
"points": 0,
"present": false
},
{
"factor": "hr_arrival_ge_110",
"points": 0,
"present": false
},
{
"factor": "sao2_lt_90_arrival",
"points": 0,
"present": false
},
{
"factor": "walk_test_hr_ge_110_or_unable",
"points": 0,
"present": false
},
{
"factor": "new_ischemic_ecg",
"points": 0,
"present": false
},
{
"factor": "urea_ge_12_mmol_l",
"points": 0,
"present": false
},
{
"factor": "co2_ge_35_mmol_l",
"points": 0,
"present": false
},
{
"factor": "troponin_mi_level",
"points": 0,
"present": false
},
{
"factor": "ntprobnp_ge_5000",
"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": "Stiell IG, Clement CM, Brison RJ, et al.",
"doi": "10.1111/acem.12056",
"id": "stiell-2013",
"pmid": "23570474",
"source": "Acad Emerg Med. 2013;20(1):17-26",
"title": "A risk scoring system to identify emergency department patients with heart failure at high risk for serious adverse events"
},
"formula": "ohfrs",
"formula_expression": "OHFRS = history_stroke_or_tia(1) + intubation_respiratory_distress(2) + hr_arrival_ge_110(2) + sao2_lt_90_arrival(1) + walk_test_hr_ge_110_or_unable(1) + new_ischemic_ecg(2) + urea_ge_12_mmol_l(1) + co2_ge_35_mmol_l(2) + troponin_mi_level(2) + ntprobnp_ge_5000(1); Stiell 2013 derivation; max 15; SAE risk varied from 2.8% to 89.0%; admission thresholds of total score 1, 2, or 3 had sensitivities 95.2 / 80.6 / 64.5%",
"max_score": 15,
"score": 0
},
{
"components": [
{
"factor": "history_stroke_or_tia",
"points": 0,
"present": false
},
{
"factor": "intubation_respiratory_distress",
"points": 0,
"present": false
},
{
"factor": "hr_arrival_ge_110",
"points": 0,
"present": false
},
{
"factor": "sao2_lt_90_arrival",
"points": 0,
"present": false
},
{
"factor": "walk_test_hr_ge_110_or_unable",
"points": 0,
"present": false
},
{
"factor": "new_ischemic_ecg",
"points": 0,
"present": false
},
{
"factor": "urea_ge_12_mmol_l",
"points": 0,
"present": false
},
{
"factor": "co2_ge_35_mmol_l",
"points": 0,
"present": false
},
{
"factor": "troponin_mi_level",
"points": 0,
"present": false
},
{
"factor": "ntprobnp_ge_5000",
"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": "Stiell IG, Clement CM, Brison RJ, et al.",
"doi": "10.1111/acem.12056",
"id": "stiell-2013",
"pmid": "23570474",
"source": "Acad Emerg Med. 2013;20(1):17-26",
"title": "A risk scoring system to identify emergency department patients with heart failure at high risk for serious adverse events"
},
"formula": "ohfrs",
"formula_expression": "OHFRS = history_stroke_or_tia(1) + intubation_respiratory_distress(2) + hr_arrival_ge_110(2) + sao2_lt_90_arrival(1) + walk_test_hr_ge_110_or_unable(1) + new_ischemic_ecg(2) + urea_ge_12_mmol_l(1) + co2_ge_35_mmol_l(2) + troponin_mi_level(2) + ntprobnp_ge_5000(1); Stiell 2013 derivation; max 15; SAE risk varied from 2.8% to 89.0%; admission thresholds of total score 1, 2, or 3 had sensitivities 95.2 / 80.6 / 64.5%",
"max_score": 15,
"score": 0
}
]
}
Response
| Field | Type | Description |
|---|---|---|
formula |
string | ohfrs |
formula_expression |
string | Exact expression used |
score |
integer | OHFRS points 0-15 (Stiell 2013) |
max_score |
integer | 15 |
components |
array | Per-flag points |
citation |
object | Stiell et al. Acad Emerg Med 2013 citation |
disclaimer |
string | Not-a-device notice |
Example JSON
Machine form of the same example. Frozen fixture. Not a live lookup.
{
"components": [
{
"factor": "history_stroke_or_tia",
"points": 0,
"present": false
},
{
"factor": "intubation_respiratory_distress",
"points": 0,
"present": false
},
{
"factor": "hr_arrival_ge_110",
"points": 0,
"present": false
},
{
"factor": "sao2_lt_90_arrival",
"points": 0,
"present": false
},
{
"factor": "walk_test_hr_ge_110_or_unable",
"points": 0,
"present": false
},
{
"factor": "new_ischemic_ecg",
"points": 0,
"present": false
},
{
"factor": "urea_ge_12_mmol_l",
"points": 0,
"present": false
},
{
"factor": "co2_ge_35_mmol_l",
"points": 0,
"present": false
},
{
"factor": "troponin_mi_level",
"points": 0,
"present": false
},
{
"factor": "ntprobnp_ge_5000",
"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": "Stiell IG, Clement CM, Brison RJ, et al.",
"doi": "10.1111/acem.12056",
"id": "stiell-2013",
"pmid": "23570474",
"source": "Acad Emerg Med. 2013;20(1):17-26",
"title": "A risk scoring system to identify emergency department patients with heart failure at high risk for serious adverse events"
},
"formula": "ohfrs",
"formula_expression": "OHFRS = history_stroke_or_tia(1) + intubation_respiratory_distress(2) + hr_arrival_ge_110(2) + sao2_lt_90_arrival(1) + walk_test_hr_ge_110_or_unable(1) + new_ischemic_ecg(2) + urea_ge_12_mmol_l(1) + co2_ge_35_mmol_l(2) + troponin_mi_level(2) + ntprobnp_ge_5000(1); Stiell 2013 derivation; max 15; SAE risk varied from 2.8% to 89.0%; admission thresholds of total score 1, 2, or 3 had sensitivities 95.2 / 80.6 / 64.5%",
"max_score": 15,
"score": 0
}
Client errors (HTTP 400)
Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_flag |
boolean clinical flags must be true or false 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
- NEWS — Compute the RCP 2012 National Early Warning Score from respiratory rate, SpO2, supplemental oxygen, temperature, systolic BP, heart rate, and caller-assigned AVPU.
- MEWS — Compute the Subbe 2001 modified Early Warning Score from systolic BP, heart rate, respiratory rate, temperature, and caller-assigned AVPU.
- Killip — Return the Killip and Kimball 1967 myocardial-infarction heart-failure class 1-4 from a caller-assigned integer, with the published class description and 1967 CCU hospital mortality.
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.
- 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.