# GWTG-HF In-Hospital Mortality Score (Peterson 2010)

> GWTG-HF In-Hospital Mortality Score (Peterson 2010) 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-14).

Calculates the Get With The Guidelines Heart Failure (GWTG-HF) integer point score for predicted in-hospital mortality in hospitalized heart failure patients, based on Peterson 2010 Figure 2.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/gwtg_hf
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/gwtg-hf-in-hospital-mortality-score-peterson-2010-0cecd942
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_rOP2RfkCWEvdQZrdRpDQ4

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 gwtg-hf-in-hospital-mortality-score-peterson-2010-0cecd942
```

Example prompt: Calculate the GWTG-HF in-hospital mortality score for a 72-year-old heart failure patient admitted with a systolic BP of 105 mmHg, BUN of 32 mg/dL, sodium of 136 mmol/L, heart rate of 88 bpm, no COPD history, and caller-assigned as nonblack.

## When to prefer this

Use this endpoint when you need the standardized Peterson 2010 GWTG-HF integer point score for an admitted heart failure patient, particularly when integrating a validated clinical risk tool into an automated clinical decision support workflow. Prefer this over ad-hoc risk estimates when you need a reproducible, published scoring system. Note that the caller must supply all clinical values (BUN, sodium, BP, etc.) — this endpoint does not retrieve lab values or diagnose conditions.

## Known failure modes

- Missing required query parameters (age, sbp_mm_hg, bun_mg_dl, sodium_mmol_l, heart_rate_bpm, copd, black) returns validation error
- Out-of-range integers (e.g. age <18 or >120, BUN >200) may return error or clamped result
- Non-integer values passed for integer fields cause schema validation failure
- Payment failure (x402) if USDC not provided or insufficient balance
- Network timeout if the service is temporarily unavailable

## How this service works

Peterson 2010 GWTG-HF Figure 2 integer points for in-hospital mortality in hospitalized heart failure: age 0-28, systolic BP 0-28, BUN 0-28, sodium 0-4, heart rate 0-8, COPD +2, caller-assigned nonblack (black=false) +3. Total 0-100. magent does not assign race. Not a diagnosis.

## Output

Returns the GWTG-HF integer point total (0–100) composed of age points (0–28), systolic BP points (0–28), BUN points (0–28), sodium points (0–4), heart rate points (0–8), COPD bonus (+2 if true), and nonblack race bonus (+3 if black=false). Higher scores indicate greater predicted in-hospital mortality risk. Not a diagnosis.

## 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": [
      "age",
      "sbp_mm_hg",
      "bun_mg_dl",
      "sodium_mmol_l",
      "heart_rate_bpm",
      "copd",
      "black"
     ],
     "properties": {
      "age": {
       "type": "integer",
       "description": "Age in years (integer 18-120). Peterson 2010 Figure 2: ≤19 scores 0; 20-29 scores 3; 30-39 scores 6; 40-49 scores 8; 50-59 scores 11; 60-69 scores 14; 70-79 scores 17; 80-89 scores 19; 90-99 scores 22; 100-109 scores 25; ≥110 scores 28."
      },
      "copd": {
       "type": "boolean",
       "description": "History of chronic obstructive pulmonary disease as assigned by the caller (Peterson 2010 Figure 2). true scores 2. magent does not diagnose COPD."
      },
      "black": {
       "type": "boolean",
       "description": "Caller-assigned black as used in Peterson 2010; magent does not assign race. Nonblack race (false) scores 3. true or false."
      },
      "bun_mg_dl": {
       "type": "integer",
       "description": "Admission blood urea nitrogen in mg/dL (integer 1-200). Peterson 2010 Figure 2: ≤9 scores 0; ≥150 scores 28. magent does not assay BUN."
      },
      "sbp_mm_hg": {
       "type": "integer",
       "description": "Admission systolic blood pressure in mm Hg (integer 50-250). Peterson 2010 Figure 2: 50-59 scores 28, then lower points as SBP rises, to ≥200 scores 0. magent does not measure blood pressure."
      },
      "sodium_mmol_l": {
       "type": "integer",
       "description": "Admission serum sodium in mmol/L (integer 110-160; numerically equal to mEq/L). Peterson 2010 Figure 2: ≤130 scores 4; 131-133 scores 3; 134-136 scores 2; 137-138 scores 1; ≥139 scores 0. magent does not assay sodium."
      },
      "heart_rate_bpm": {
       "type": "integer",
       "description": "Admission heart rate in beats per minute (integer 30-220). Peterson 2010 Figure 2: ≤79 scores 0; 80-84 scores 1; 85-89 scores 3; 90-94 scores 4; 95-99 scores 5; 100-104 scor
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gwtg-hf-in-hospital-mortality-score-peterson-2010-0cecd942/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)
