70trust / 100

Calc Rems

by magent in News & content

x402 APIPassing, checked 3 h ago

REMS from Olsson 2004 Table 1: MAP, heart rate, respiratory rate, SpO2, GCS (RAPS 0–4, not 15−GCS), and age summed to a 0–26 total for nonsurgical adult ED in-hospital mortality. Deterministic published arithmetic with citation; not MEWS, NEWS, or APACHE II; not an ICU-admission order.

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

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
145 ms typical, 321 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/rems" \
  -H "content-type: application/json" \
  -d '{"items":[{"age":40,"gcs":15,"heart_rate_bpm":80,"map_mm_hg":90,"respiratory_rate":16,"spo2_percent":96},{"age":40,"gcs":15,"heart_rate_bpm":80,"map_mm_hg":90,"respiratory_rate":16,"spo2_percent":96}]}'
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%2Frems
const res = await pay("https://api.magentlab.com/api/calc/rems", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"items":[{"age":40,"gcs":15,"heart_rate_bpm":80,"map_mm_hg":90,"respiratory_rate":16,"spo2_percent":96},{"age":40,"gcs":15,"heart_rate_bpm":80,"map_mm_hg":90,"respiratory_rate":16,"spo2_percent":96}]}),
});
console.log(await res.json());

Example input

{
  "items": [
    {
      "age": 40,
      "gcs": 15,
      "heart_rate_bpm": 80,
      "map_mm_hg": 90,
      "respiratory_rate": 16,
      "spo2_percent": 96
    },
    {
      "age": 40,
      "gcs": 15,
      "heart_rate_bpm": 80,
      "map_mm_hg": 90,
      "respiratory_rate": 16,
      "spo2_percent": 96
    }
  ]
}

Example output

{
  "count": 2,
  "items": [
    {
      "age": 40,
      "citation": {
        "authors": "Olsson T, Terent A, Lind L",
        "doi": "10.1111/j.1365-2796.2004.01321.x",
        "id": "olsson-2004",
        "pmid": "15078500",
        "source": "J Intern Med. 2004;255(5):579-587",
        "title": "Rapid Emergency Medicine score: a new prognostic tool for in-hospital mortality in nonsurgical emergency department patients"
      },
      "components": [
        {
          "factor": "map_mm_hg",
          "points": 0,
          "present": false,
          "value": 90
        },
        {
          "factor": "heart_rate_bpm",
          "points": 0,
          "present": false,
          "value": 80
        },
        {
          "factor": "respiratory_rate",
          "points": 0,
          "present": false,
          "value": 16
        },
        {
          "factor": "spo2_percent",
          "points": 0,
          "present": false,
          "value": 96
        },
        {
          "factor": "gcs",
          "points": 0,
          "present": false,
          "value": 15
        },
        {
          "factor": "age",
          "points": 0,
          "present": false,
          "value": 40
        }
      ],
      "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": "rems",
      "formula_expression": "REMS = map_points + hr_points + rr_points + spo2_points + gcs_points + age_points; Olsson 2004 Table 1 (RAPS vitals + SpO2 + age); max 26",
      "gcs": 15,
      "heart_rate_bpm": 80,
      "map_mm_hg": 90,
      "max_score": 26,
      "respiratory_rate": 16,
      "score": 0,
      "spo2_percent": 96
    },
    {
      "age": 40,
      "citation": {
        "authors": "Olsson T, Terent A, Lind L",
        "doi": "10.1111/j.1365-2796.2004.01321.x",
        "id": "olsson-2004",
        "pmid": "15078500",
        "source": "J Intern Med. 2004;255(5):579-587",
        "title": "Rapid Emergency Medicine score: a new prognostic tool for in-hospital mortality in nonsurgical emergency department patients"
      },
      "components": [
        {
          "factor": "map_mm_hg",
          "points": 0,
          "present": false,
          "value": 90
        },
        {
          "factor": "heart_rate_bpm",
          "points": 0,
          "present": false,
          "value": 80
        },
        {
          "factor": "respiratory_rate",
          "points": 0,
          "present": false,
          "value": 16
        },
        {
          "factor": "spo2_percent",
          "points": 0,
          "present": false,
          "value": 96
        },
        {
          "factor": "gcs",
          "points": 0,
          "present": false,
          "value": 15
        },
        {
          "factor": "age",
          "points": 0,
          "present": false,
          "value": 40
        }
 

Security scan

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

Recent checks

WhenResultHTTPTimePrice
3 h agoPassed402344 ms$0.007
7 h agoPassed402135 ms$0.007
11 h agoPassed402311 ms$0.007
20 h agoPassed402155 ms$0.007
23 h agoPassed402219 ms$0.007
27 h agoPassed402321 ms$0.007
30 h agoPassed402135 ms$0.007
35 h agoPassed402145 ms$0.007
38 h agoPassed402144 ms$0.007
41 h agoPassed402142 ms$0.007
47 h agoPassed402133 ms$0.007

History

11 Oct 2026Price changed from $0.005 to $0.007