# MEWS Calculator (Modified Early Warning Score)

> MEWS Calculator (Modified Early Warning Score) 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 Modified Early Warning Score (MEWS) from Subbe 2001 using systolic BP, heart rate, respiratory rate, temperature, and AVPU, returning the total score and a flag for scores ≥5 indicating elevated risk.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/mews
- 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/mews-calculator-modified-early-warning-score-4fbd6007
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_s-Lvjp6W9TgHdTSn_JULm

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 mews-calculator-modified-early-warning-score-4fbd6007
```

Example prompt: Calculate the MEWS score for a patient with systolic BP 90 mmHg, heart rate 115 bpm, respiratory rate 22 breaths per minute, temperature 38.8°C, and AVPU of voice — and tell me if they hit the score-≥5 risk threshold.

## When to prefer this

Use this endpoint when you need a deterministic, citeable MEWS score per the original Subbe 2001 Table 1 methodology — not NEWS2 or other proprietary early-warning scoring systems. Ideal for clinical decision-support agents, automated triage pipelines, or any workflow needing a peer-reviewed arithmetic calculation with a defined high-risk cutoff (≥5) rather than an ML-based prediction.

## Known failure modes

- Missing required parameters (systolic_mm_hg, heart_rate_bpm, respiratory_rate, temperature_c, avpu) return a validation error
- Out-of-range values (e.g. heart rate outside 30–220, temperature outside 30–45°C) may return an error or boundary behavior
- Invalid AVPU enum values (anything other than alert/voice/pain/unresponsive) cause a schema validation error
- Temperature supplied in Fahrenheit instead of Celsius will produce incorrect scores without conversion
- Payment failure (insufficient USDC) returns HTTP 402

## How this service works

MEWS from Subbe 2001 Table 1: systolic BP, heart rate, respiratory rate, temperature (°C), and caller-assigned AVPU (alert/voice/pain/unresponsive) summed to a 0–14 total. Returns score_ge_5 because scores ≥5 were associated with increased risk of death or ICU/HDU. Deterministic published arithmetic with citation; not NEWS2; not an ICU-admission order.

## Output

Returns the computed MEWS total (integer 0–14), the individual component scores for each vital sign, and a boolean score_ge_5 indicating whether the total meets or exceeds the Subbe 2001 threshold associated with increased risk of death or ICU/HDU admission.

## 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": [
      "systolic_mm_hg",
      "heart_rate_bpm",
      "respiratory_rate",
      "temperature_c",
      "avpu"
     ],
     "properties": {
      "avpu": {
       "enum": [
        "alert",
        "voice",
        "pain",
        "unresponsive"
       ],
       "type": "string",
       "description": "Caller-assigned AVPU (alert, voice, pain, or unresponsive). Subbe 2001: alert → 0, voice → 1, pain → 2, unresponsive → 3. magent does not compute GCS here."
      },
      "temperature_c": {
       "type": "number",
       "description": "Temperature in °C (30.0-45.0). Subbe 2001: <35 → 2, 35-38.4 → 0, ≥38.5 → 2. magent does not convert Fahrenheit."
      },
      "heart_rate_bpm": {
       "type": "integer",
       "description": "Heart rate in beats/min (integer 30-220). Subbe 2001: ≤40 → 2, 41-50 → 1, 51-100 → 0, 101-110 → 1, 111-129 → 2, ≥130 → 3."
      },
      "systolic_mm_hg": {
       "type": "integer",
       "description": "Systolic blood pressure in mm Hg (integer 0-300). Subbe 2001: ≤70 → 3, 71-80 → 2, 81-100 → 1, 101-199 → 0, ≥200 → 2."
      },
      "respiratory_rate": {
       "type": "integer",
       "description": "Respiratory rate in breaths/min (integer 0-80). Subbe 2001: <9 → 2, 9-14 → 0, 15-20 → 1, 21-29 → 2, ≥30 → 3."
      }
     }
    }
   },
   "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/mews",
  "count": 2,
  "items": [
   {
    "avpu": "alert",
    "score": 0,
    "formula": "mews",
    "citation": {
     "id": "subbe-2001",
     "doi": "10.1093/qjmed/94.10.521",
     "pmid": "11588210",
     "title": "Validation of a modified Early Warning Score in medical admissions",
     "source": "QJM. 2001;94(10):521-526",
     "authors": "Subbe CP, Kruger M, Rutherford P, Gemmel L"
    },
    "max_score": 14,
    "components": [
     {
      "value": 120,
      "factor": "systolic_mm_hg",
      "points": 0,
      "present": false
     },
     {
      "value": 80,
      "factor": "heart_rate_bpm",
      "points": 0,
      "present": false
     },
     {
      "value": 12,
      "factor": "respiratory_rate",
      "points": 0,
      "present": false
     },
     {
      "value": 37,
      "factor": "temperature_c",
      "points": 0,
      "present": false
     },
     {
      "value": "alert",
      "factor": "avpu",
      "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.",
    "score_ge_5": false,
    "temperature_c": 37,
    "heart_rate_bpm": 80,
    "systolic_mm_hg": 120,
    "respiratory_rate": 12,
    "formula_expression": "MEWS = sbp_points + hr_points + rr_points + temp_points + avpu_points; Subbe 2001 Table 1; max 14"
   },
   {
    "avpu": "alert",
    "score": 0,
    "formula": "mews",
    "citation": {
     "id": "subbe-2001",
     "doi": "10.1093/qjmed/94.10.521",
     "pmid": "11588210",
     "title": "Validation of a modified Early Warning Score in medical admissions",
     "source": "QJM. 2001;94(10):521-526",
     "authors": "Subbe CP, Kruger M, Rutherford P, Gemmel L"
    },
    "max_score": 14,
    "components": [
     {
      "value": 120,
      "factor": "systolic_mm_hg",
      "points": 0,
      "present": false
     },
     {
      "value": 80,
      "factor": "heart_rate_bpm",
      "points": 0,
      "present": false
     },
     {
      "value": 12,
      "factor": "respiratory_rate",
      "points": 0,
      "present": false
     },
     {
      "value": 37,
      "factor": "temperature_c",
      "points": 0,
      "present": false
     },
     {
      "value": "alert",
      "factor": "avpu",
      "points": 0,
      "present": false
     }
    ],
    "disclaimer": "No
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/mews-calculator-modified-early-warning-score-4fbd6007/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)
