70trust / 100

Calc Pedocs

by magent in Productivity & SaaS

x402 APIPassing, checked 1 h ago

Weiss 2007 Pediatric Emergency Department Overcrowding Scale (PEDOCS) two-variable model: waiting-room patients and total registered patients. Returns the 1-decimal score on the paper's 0-200 scale without clamping or 20/60/100 named class bands. Caller supplies counts; magent does not count patients. Not a medical device and not a diversion or ambulance-bypass order.

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

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
140 ms typical, 147 ms slowest 5%
Last check
1 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/pedocs" \
  -H "content-type: application/json" \
  -d '{"items":[{"total_registered_patients":0,"waiting_room_patients":0},{"total_registered_patients":0,"waiting_room_patients":0}]}'
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%2Fpedocs
const res = await pay("https://api.magentlab.com/api/calc/pedocs", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"items":[{"total_registered_patients":0,"waiting_room_patients":0},{"total_registered_patients":0,"waiting_room_patients":0}]}),
});
console.log(await res.json());

Example input

{
  "items": [
    {
      "total_registered_patients": 0,
      "waiting_room_patients": 0
    },
    {
      "total_registered_patients": 0,
      "waiting_room_patients": 0
    }
  ]
}

Example output

{
  "count": 2,
  "items": [
    {
      "citation": {
        "authors": "Weiss SJ, Ernst AA, Sills MR, Quinn BJ, Johnson A, Nick TG",
        "doi": "10.1097/PEC.0b013e31814a69e2",
        "id": "weiss-2007",
        "pmid": "17876254",
        "source": "Pediatr Emerg Care. 2007;23(9):641-645",
        "title": "Development of a novel measure of overcrowding in a pediatric emergency department"
      },
      "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": "pedocs",
      "formula_expression": "pedocs_score = 33.3 * (0.11 + 0.07 * waiting_room_patients + 0.04 * total_registered_patients)",
      "pedocs_score": 3.7,
      "total_registered_patients": 0,
      "waiting_room_patients": 0
    },
    {
      "citation": {
        "authors": "Weiss SJ, Ernst AA, Sills MR, Quinn BJ, Johnson A, Nick TG",
        "doi": "10.1097/PEC.0b013e31814a69e2",
        "id": "weiss-2007",
        "pmid": "17876254",
        "source": "Pediatr Emerg Care. 2007;23(9):641-645",
        "title": "Development of a novel measure of overcrowding in a pediatric emergency department"
      },
      "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": "pedocs",
      "formula_expression": "pedocs_score = 33.3 * (0.11 + 0.07 * waiting_room_patients + 0.04 * total_registered_patients)",
      "pedocs_score": 3.7,
      "total_registered_patients": 0,
      "waiting_room_patients": 0
    }
  ],
  "path": "/api/calc/pedocs"
}

Security scan

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

Recent checks

WhenResultHTTPTimePrice
1 h agoPassed402139 ms$0.007
11 h agoPassed402136 ms$0.007
14 h agoPassed402147 ms$0.007
18 h agoPassed402140 ms$0.007
21 h agoPassed402142 ms$0.007
26 h agoPassed402139 ms$0.007
29 h agoPassed402144 ms$0.007
32 h agoPassed402147 ms$0.007
37 h agoPassed402137 ms$0.007

History

11 Oct 2026Price changed from $0.005 to $0.007