# Ottawa Heart Failure Risk Scale (OHFRS) Calculator

> Ottawa Heart Failure Risk Scale (OHFRS) Calculator is a paid API for AI agents from api.magentlab.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Computes the Ottawa Heart Failure Risk Scale (OHFRS; Stiell 2013) integer score and associated serious adverse event risk from ten caller-assigned clinical flags for ED heart failure patients.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/ohfrs
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ottawa-heart-failure-risk-scale-ohfrs-calculator-67a4b186
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gq3T8vzEj2d6GBM_iXyzU

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability ottawa-heart-failure-risk-scale-ohfrs-calculator-67a4b186
```

Example prompt: Calculate the Ottawa Heart Failure Risk Scale score for a patient who has no prior stroke or TIA, no prior intubation, arrival heart rate not >=110, SaO2 not <90%, walk-test heart rate not >=110, no new ischemic ECG changes, urea not >=12, CO2 not >=35, troponin not at MI level, and NT-proBNP not >=5000 — what's their OHFRS score and SAE risk?

## When to prefer this

Use this endpoint when you need to compute the validated Stiell 2013 OHFRS integer score and SAE risk for an acute heart failure patient presenting to the emergency department. Prefer it over manual calculation to eliminate arithmetic errors. It is distinct from EHMRG and other heart failure tools. Requires that the calling system has already measured or interpreted each clinical parameter (vitals, labs, ECG, walk test) and can supply them as Boolean flags.

## Known failure modes

- Missing any of the ten required Boolean query parameters returns a 400 or validation error
- Non-boolean values for flag parameters cause schema validation failure
- Network or service unavailability returns a 5xx error
- Payment not included or insufficient USDC balance triggers x402 payment-required response

## How this service works

Ottawa Heart Failure Risk Scale (OHFRS; Stiell 2013 derivation). Ten caller-assigned flags (stroke/TIA 1, intubation 2, arrival HR >=110 2, arrival SaO2 <90% 1, walk-test HR >=110 or unable 1, new ischemic ECG 2, urea >=12 mmol/L 1, CO2 >=35 mmol/L 2, troponin at MI level 2, NT-proBNP >=5000 ng/L 1); integer points, max 15. Derivation SAE risk 2.8% to 89.0%. Not a medical device, not a disposition or discharge order, not EHMRG. magent does not walk the patient or read the ECG.

## Output

Returns an integer OHFRS total score (0–15) and the corresponding Stiell 2013 derivation serious adverse event (SAE) risk percentage (ranging from approximately 2.8% to 89.0%), based on the ten Boolean clinical flags provided by the caller.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "required": [
      "history_stroke_or_tia",
      "intubation_respiratory_distress",
      "hr_arrival_ge_110",
      "sao2_lt_90_arrival",
      "walk_test_hr_ge_110_or_unable",
      "new_ischemic_ecg",
      "urea_ge_12_mmol_l",
      "co2_ge_35_mmol_l",
      "troponin_mi_level",
      "ntprobnp_ge_5000"
     ],
     "properties": {
      "co2_ge_35_mmol_l": {
       "type": "boolean",
       "description": "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."
      },
      "new_ischemic_ecg": {
       "type": "boolean",
       "description": "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."
      },
      "ntprobnp_ge_5000": {
       "type": "boolean",
       "description": "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."
      },
      "hr_arrival_ge_110": {
       "type": "boolean",
       "description": "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."
      },
      "troponin_mi_level": {
       "type": "boolean",
       "description": "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."
      },
      "urea_ge_12_mmol_l": {
       "type": "boolean",
       "description": "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."
      },
      "sao2_lt_90_arrival": {
       "type": "boolean",
       "description": "Oxygen saturation <90% on ED arrival as assigned by the caller after applying the Stiell 2013 cuto
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "path": "/api/calc/ohfrs",
  "count": 2,
  "items": [
   {
    "score": 0,
    "formula": "ohfrs",
    "citation": {
     "id": "stiell-2013",
     "doi": "10.1111/acem.12056",
     "pmid": "23570474",
     "title": "A risk scoring system to identify emergency department patients with heart failure at high risk for serious adverse events",
     "source": "Acad Emerg Med. 2013;20(1):17-26",
     "authors": "Stiell IG, Clement CM, Brison RJ, et al."
    },
    "max_score": 15,
    "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.",
    "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%"
   },
   {
    "score": 0,
    "formula": "ohfrs",
    "citation": {
     "id": "stiell-2013",
     "doi": "10.1111/acem.12056",
     "pmid": "23570474",
     "title": "A risk scoring system to identify emergency department patients with heart failure at high risk for serious adverse events",
     "source": "Acad Emerg Med. 2013;20(1):17
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ottawa-heart-failure-risk-scale-ohfrs-calculator-67a4b186/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.magentlab.com](https://www.zero.xyz/host/api.magentlab.com/llms.txt)
