70trust / 100

Calc Mews

by magent in News & content

x402 APIPassing, checked 3 h ago

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.

POST https://api.magentlab.com/api/calc/mews

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
148 ms typical, 333 ms slowest 5%
Last check
3 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://api.magentlab.com/api/calc/mews" \
  -H "content-type: application/json" \
  -d '{"items":[{"avpu":"alert","heart_rate_bpm":80,"respiratory_rate":12,"systolic_mm_hg":120,"temperature_c":37},{"avpu":"alert","heart_rate_bpm":80,"respiratory_rate":12,"systolic_mm_hg":120,"temperature_c":37}]}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.magentlab.com%2Fapi%2Fcalc%2Fmews
const res = await pay("https://api.magentlab.com/api/calc/mews", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"items":[{"avpu":"alert","heart_rate_bpm":80,"respiratory_rate":12,"systolic_mm_hg":120,"temperature_c":37},{"avpu":"alert","heart_rate_bpm":80,"respiratory_rate":12,"systolic_mm_hg":120,"temperature_c":37}]}),
});
console.log(await res.json());

Example input

{
  "items": [
    {
      "avpu": "alert",
      "heart_rate_bpm": 80,
      "respiratory_rate": 12,
      "systolic_mm_hg": 120,
      "temperature_c": 37
    },
    {
      "avpu": "alert",
      "heart_rate_bpm": 80,
      "respiratory_rate": 12,
      "systolic_mm_hg": 120,
      "temperature_c": 37
    }
  ]
}

Example output

{
  "count": 2,
  "items": [
    {
      "avpu": "alert",
      "citation": {
        "authors": "Subbe CP, Kruger M, Rutherford P, Gemmel L",
        "doi": "10.1093/qjmed/94.10.521",
        "id": "subbe-2001",
        "pmid": "11588210",
        "source": "QJM. 2001;94(10):521-526",
        "title": "Validation of a modified Early Warning Score in medical admissions"
      },
      "components": [
        {
          "factor": "systolic_mm_hg",
          "points": 0,
          "present": false,
          "value": 120
        },
        {
          "factor": "heart_rate_bpm",
          "points": 0,
          "present": false,
          "value": 80
        },
        {
          "factor": "respiratory_rate",
          "points": 0,
          "present": false,
          "value": 12
        },
        {
          "factor": "temperature_c",
          "points": 0,
          "present": false,
          "value": 37
        },
        {
          "factor": "avpu",
          "points": 0,
          "present": false,
          "value": "alert"
        }
      ],
      "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": "mews",
      "formula_expression": "MEWS = sbp_points + hr_points + rr_points + temp_points + avpu_points; Subbe 2001 Table 1; max 14",
      "heart_rate_bpm": 80,
      "max_score": 14,
      "respiratory_rate": 12,
      "score": 0,
      "score_ge_5": false,
      "systolic_mm_hg": 120,
      "temperature_c": 37
    },
    {
      "avpu": "alert",
      "citation": {
        "authors": "Subbe CP, Kruger M, Rutherford P, Gemmel L",
        "doi": "10.1093/qjmed/94.10.521",
        "id": "subbe-2001",
        "pmid": "11588210",
        "source": "QJM. 2001;94(10):521-526",
        "title": "Validation of a modified Early Warning Score in medical admissions"
      },
      "components": [
        {
          "factor": "systolic_mm_hg",
          "points": 0,
          "present": false,
          "value": 120
        },
        {
          "factor": "heart_rate_bpm",
          "points": 0,
          "present": false,
          "value": 80
        },
        {
          "factor": "respiratory_rate",
          "points": 0,
          "present": false,
          "value": 12
        },
        {
          "factor": "temperature_c",
          "points": 0,
          "present": false,
          "value": 37
        },
        {
          "factor": "avpu",
          "points": 0,
          "present": false,
          "value": "alert"
        }
      ],
      "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": "mews",
      "formula_expression": "MEWS = sbp_points + hr_points + rr_points + temp_points + avpu_points; Subbe 20

Security scan

  • Charges more than its listed price in payment
    Listed at $0.005, charges $0.007

Recent checks

WhenResultHTTPTimePrice
3 h agoPassed402154 ms$0.007
7 h agoPassed402298 ms$0.007
10 h agoPassed402297 ms$0.007
19 h agoPassed402133 ms$0.007
23 h agoPassed402148 ms$0.007
27 h agoPassed402147 ms$0.007
30 h agoPassed402143 ms$0.007
34 h agoPassed402134 ms$0.007
37 h agoPassed402333 ms$0.007
40 h agoPassed402143 ms$0.007
46 h agoPassed402873 ms$0.007

History

11 Oct 2026Price changed from $0.005 to $0.007