70trust / 100

Calc News

by magent in News & content

x402 APIPassing, checked 3 h ago

NEWS from RCP 2012 Chart 1: respiratory rate, SpO2, supplemental oxygen, temperature (°C), systolic BP, heart rate, and caller-assigned AVPU (alert 0; voice, pain, or unresponsive 3 each) summed to a 0–20 total. Returns Chart 2 clinical_risk (low/medium/high) and red_score when any parameter scores 3. Deterministic published arithmetic with citation; not NEWS2; not an ICU-admission order.

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

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
150 ms typical, 232 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/news" \
  -H "content-type: application/json" \
  -d '{"items":[{"avpu":"alert","heart_rate_bpm":70,"respiratory_rate":16,"spo2_percent":98,"supplemental_oxygen":false,"systolic_mm_hg":120,"temperature_c":37},{"avpu":"alert","heart_rate_bpm":70,"respiratory_rate":16,"spo2_percent":98,"supplemental_oxygen":false,"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%2Fnews
const res = await pay("https://api.magentlab.com/api/calc/news", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"items":[{"avpu":"alert","heart_rate_bpm":70,"respiratory_rate":16,"spo2_percent":98,"supplemental_oxygen":false,"systolic_mm_hg":120,"temperature_c":37},{"avpu":"alert","heart_rate_bpm":70,"respiratory_rate":16,"spo2_percent":98,"supplemental_oxygen":false,"systolic_mm_hg":120,"temperature_c":37}]}),
});
console.log(await res.json());

Example input

{
  "items": [
    {
      "avpu": "alert",
      "heart_rate_bpm": 70,
      "respiratory_rate": 16,
      "spo2_percent": 98,
      "supplemental_oxygen": false,
      "systolic_mm_hg": 120,
      "temperature_c": 37
    },
    {
      "avpu": "alert",
      "heart_rate_bpm": 70,
      "respiratory_rate": 16,
      "spo2_percent": 98,
      "supplemental_oxygen": false,
      "systolic_mm_hg": 120,
      "temperature_c": 37
    }
  ]
}

Example output

{
  "count": 2,
  "items": [
    {
      "avpu": "alert",
      "citation": {
        "authors": "Royal College of Physicians",
        "id": "rcp-news-2012",
        "source": "London: RCP; 2012. ISBN 978-1-86016-471-2",
        "title": "National Early Warning Score (NEWS): Standardising the assessment of acute-illness severity in the NHS"
      },
      "clinical_risk": "low",
      "components": [
        {
          "factor": "respiratory_rate",
          "points": 0,
          "present": false,
          "value": 16
        },
        {
          "factor": "spo2_percent",
          "points": 0,
          "present": false,
          "value": 98
        },
        {
          "factor": "supplemental_oxygen",
          "points": 0,
          "present": false,
          "value": false
        },
        {
          "factor": "temperature_c",
          "points": 0,
          "present": false,
          "value": 37
        },
        {
          "factor": "systolic_mm_hg",
          "points": 0,
          "present": false,
          "value": 120
        },
        {
          "factor": "heart_rate_bpm",
          "points": 0,
          "present": false,
          "value": 70
        },
        {
          "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": "news",
      "formula_expression": "NEWS = rr_points + spo2_points + oxygen_points + temp_points + sbp_points + hr_points + avpu_points; RCP NEWS 2012 Chart 1; max 20",
      "heart_rate_bpm": 70,
      "max_score": 20,
      "red_score": false,
      "respiratory_rate": 16,
      "score": 0,
      "spo2_percent": 98,
      "supplemental_oxygen": false,
      "systolic_mm_hg": 120,
      "temperature_c": 37
    },
    {
      "avpu": "alert",
      "citation": {
        "authors": "Royal College of Physicians",
        "id": "rcp-news-2012",
        "source": "London: RCP; 2012. ISBN 978-1-86016-471-2",
        "title": "National Early Warning Score (NEWS): Standardising the assessment of acute-illness severity in the NHS"
      },
      "clinical_risk": "low",
      "components": [
        {
          "factor": "respiratory_rate",
          "points": 0,
          "present": false,
          "value": 16
        },
        {
          "factor": "spo2_percent",
          "points": 0,
          "present": false,
          "value": 98
        },
        {
          "factor": "supplemental_oxygen",
          "points": 0,
          "present": false,
          "value": false
        },
        {
          "factor": "temperature_c",
          "points": 0,
          "present": false,
          "value": 37
        },
        {
          "factor": "systolic_mm_hg",
          "points": 0,
          "present": false,
      

Security scan

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

Recent checks

WhenResultHTTPTimePrice
3 h agoPassed402163 ms$0.007
7 h agoPassed402254 ms$0.007
11 h agoPassed402156 ms$0.007
19 h agoPassed402138 ms$0.007
23 h agoPassed402141 ms$0.007
27 h agoPassed402150 ms$0.007
30 h agoPassed402141 ms$0.007
34 h agoPassed402144 ms$0.007
37 h agoPassed402175 ms$0.007
41 h agoPassed402149 ms$0.007
46 h agoPassed402232 ms$0.007

History

11 Oct 2026Price changed from $0.005 to $0.007