# DECAF Score Calculator (Steer 2012)

> DECAF Score Calculator (Steer 2012) 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).

Computes the DECAF (AECOPD) score from five caller-assigned clinical variables and returns a 0–6 total with severity band.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/decaf
- 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/decaf-score-calculator-steer-2012-d61468a4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_KAogSM1fSm2QuVbbPujdY

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 decaf-score-calculator-steer-2012-d61468a4
```

Example prompt: Calculate the DECAF score for a COPD patient with eMRCD grade 5a, eosinophil count of 0.03 ×10^9/L, no chest X-ray consolidation, arterial pH of 7.25, and no atrial fibrillation.

## When to prefer this

Use this endpoint when you need a deterministic, citable DECAF score per Steer 2012 for an AECOPD patient, especially in automated workflows requiring audit-grade arithmetic without manual lookup. Prefer it over general-purpose LLM computation when reproducibility and a published citation are required.

## Known failure modes

- Missing required query parameter (emrcd, eosinophils_10e9_l, consolidation, arterial_ph, or atrial_fibrillation) — returns 4xx validation error
- arterial_ph outside physiological range 6.80–7.80 — rejected with validation error
- eosinophils_10e9_l outside 0–5 range — rejected with validation error
- Invalid emrcd enum value (must be '1-4', '5a', or '5b') — returns 4xx
- Payment not provided or insufficient USDC — returns 402 Payment Required

## How this service works

Steer 2012 DECAF: eMRCD 1-4 → 0, 5a → 1, 5b → 2; eosinophils <0.05 ×10^9/L → 1 (0.05 does not score); caller-assigned consolidation → 1; arterial pH <7.30 → 1 (7.30 does not score); atrial fibrillation → 1. Returns a 0–6 total and band 0-1 / 2 / 3-6. Deterministic published points with citation. Not an early-discharge or escalation protocol and not a medical device.

## Output

Returns the total DECAF score (integer 0–6) and the corresponding severity band (0–1 = low, 2 = intermediate, 3–6 = high), computed deterministically per Steer 2012 published criteria with a citation.

## 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": [
      "emrcd",
      "eosinophils_10e9_l",
      "consolidation",
      "arterial_ph",
      "atrial_fibrillation"
     ],
     "properties": {
      "emrcd": {
       "enum": [
        "1-4",
        "5a",
        "5b"
       ],
       "type": "string",
       "description": "Steer 2012 extended MRC dyspnoea as assigned by the caller. 1-4 scores 0; 5a scores 1; 5b scores 2. magent does not interview the patient."
      },
      "arterial_ph": {
       "type": "number",
       "description": "Arterial pH (6.80-7.80). Steer 2012: <7.30 scores 1; 7.30 does not score."
      },
      "consolidation": {
       "type": "boolean",
       "description": "Chest radiograph consolidation as assigned by the caller (Steer 2012 C). true or false. 1 point if true. magent does not interpret radiographs."
      },
      "eosinophils_10e9_l": {
       "type": "number",
       "description": "Blood eosinophil count ×10^9/L (0-5). Steer 2012: <0.05 scores 1; 0.05 does not score."
      },
      "atrial_fibrillation": {
       "type": "boolean",
       "description": "Atrial fibrillation as assigned by the caller (Steer 2012 F). true or false. 1 point if true. magent does not interpret the ECG."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "path": "/api/calc/decaf",
  "count": 2,
  "items": [
   {
    "emrcd": "1-4",
    "score": 0,
    "formula": "decaf",
    "citation": {
     "id": "steer-2012",
     "doi": "10.1136/thoraxjnl-2012-202103",
     "pmid": "22895999",
     "title": "The DECAF Score: predicting hospital mortality in exacerbations of chronic obstructive pulmonary disease",
     "source": "Thorax. 2012;67(11):970-976",
     "authors": "Steer J, Gibson J, Bourke SC"
    },
    "max_score": 6,
    "components": [
     {
      "value": "1-4",
      "factor": "emrcd",
      "points": 0,
      "present": false
     },
     {
      "value": 0.1,
      "factor": "eosinopenia",
      "points": 0,
      "present": false
     },
     {
      "factor": "consolidation",
      "points": 0,
      "present": false
     },
     {
      "value": 7.4,
      "factor": "acidemia",
      "points": 0,
      "present": false
     },
     {
      "factor": "atrial_fibrillation",
      "points": 0,
      "present": false
     }
    ],
    "decaf_band": "0-1",
    "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.",
    "arterial_ph": 7.4,
    "consolidation": false,
    "eosinophils_10e9_l": 0.1,
    "formula_expression": "DECAF = emrcd_points + eosinopenia + consolidation + acidemia + atrial_fibrillation; eMRCD 1-4 -> 0, 5a -> 1, 5b -> 2; eosinophils_10e9_l < 0.05 -> 1 (0.05 does not score); consolidation true -> 1; arterial_ph < 7.30 -> 1 (7.30 does not score); atrial_fibrillation true -> 1; bands 0-1 / 2 / 3-6; max 6",
    "atrial_fibrillation": false
   },
   {
    "emrcd": "1-4",
    "score": 0,
    "formula": "decaf",
    "citation": {
     "id": "steer-2012",
     "doi": "10.1136/thoraxjnl-2012-202103",
     "pmid": "22895999",
     "title": "The DECAF Score: predicting hospital mortality in exacerbations of chronic obstructive pulmonary disease",
     "source": "Thorax. 2012;67(11):970-976",
     "authors": "Steer J, Gibson J, Bourke SC"
    },
    "max_score": 6,
    "components": [
     {
      "value": "1-4",
      "factor": "emrcd",
      "points": 0,
      "present": false
     },
     {
      "value": 0.1,
      "factor": "eosinopenia",
      "points": 0,
      "present": false
     },
     {
      "factor": "consolidation",
      "points": 0,
      "present": false
     },
     {
      "value": 7.4,
      "f
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/decaf-score-calculator-steer-2012-d61468a4/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)
