78trust / 100

Calc Aub Has2

by magent in Security & trust

x402 APIPassing, checked 3 h ago

Dakik 2019 AUB-HAS2 for 30-day death/MI/stroke after noncardiac surgery: six 1-point elements (history of heart disease, angina or dyspnea, age ≥75, hemoglobin <12 g/dL, vascular surgery, emergency surgery). Low 0-1, intermediate 2-3, high >3 (max 6). Derivation rates 0%, 0.5%, 2.0%, 5.6%, 15.7% by score 0/1/2/3/>3. Not a medical device, not RCRI, not ACS treatment, and not operative clearance.

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

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
159 ms typical, 339 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/aub_has2" \
  -H "content-type: application/json" \
  -d '{"items":[{"age":50,"angina_or_dyspnea":false,"emergency_surgery":false,"hemoglobin_g_dl":13,"hemoglobin_g_l":130,"history_of_heart_disease":false,"vascular_surgery":false},{"age":50,"angina_or_dyspnea":false,"emergency_surgery":false,"hemoglobin_g_dl":13,"hemoglobin_g_l":130,"history_of_heart_disease":false,"vascular_surgery":false}]}'
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%2Faub_has2
const res = await pay("https://api.magentlab.com/api/calc/aub_has2", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"items":[{"age":50,"angina_or_dyspnea":false,"emergency_surgery":false,"hemoglobin_g_dl":13,"hemoglobin_g_l":130,"history_of_heart_disease":false,"vascular_surgery":false},{"age":50,"angina_or_dyspnea":false,"emergency_surgery":false,"hemoglobin_g_dl":13,"hemoglobin_g_l":130,"history_of_heart_disease":false,"vascular_surgery":false}]}),
});
console.log(await res.json());

Example input

{
  "items": [
    {
      "age": 50,
      "angina_or_dyspnea": false,
      "emergency_surgery": false,
      "hemoglobin_g_dl": 13,
      "hemoglobin_g_l": 130,
      "history_of_heart_disease": false,
      "vascular_surgery": false
    },
    {
      "age": 50,
      "angina_or_dyspnea": false,
      "emergency_surgery": false,
      "hemoglobin_g_dl": 13,
      "hemoglobin_g_l": 130,
      "history_of_heart_disease": false,
      "vascular_surgery": false
    }
  ]
}

Example output

{
  "count": 2,
  "items": [
    {
      "age_years": 50,
      "angina_or_dyspnea": false,
      "citation": {
        "authors": "Dakik HA, Chehab O, Eldirani M, Sbeity E, Karam C, Abou Hassan O, Msheik A, Kaspar C, Makki M, Tamim H",
        "doi": "10.1016/j.jacc.2019.04.023",
        "id": "dakik-2019",
        "pmid": "31221255",
        "source": "J Am Coll Cardiol. 2019;73(24):3067-3078",
        "title": "A New Index for Pre-Operative Cardiovascular Evaluation"
      },
      "components": [
        {
          "factor": "history_of_heart_disease",
          "points": 0,
          "present": false
        },
        {
          "factor": "angina_or_dyspnea",
          "points": 0,
          "present": false
        },
        {
          "factor": "age_ge_75",
          "points": 0,
          "present": false,
          "value": 50
        },
        {
          "factor": "hemoglobin_lt_12",
          "points": 0,
          "present": false,
          "value": 13
        },
        {
          "factor": "vascular_surgery",
          "points": 0,
          "present": false
        },
        {
          "factor": "emergency_surgery",
          "points": 0,
          "present": false
        }
      ],
      "derivation_event_rate_percent": 0,
      "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.",
      "emergency_surgery": false,
      "formula": "aub_has2",
      "formula_expression": "AUB-HAS2 = history_of_heart_disease + angina_or_dyspnea + (age ≥75) + (hemoglobin <12 g/dL) + vascular_surgery + emergency_surgery; each 1; max 6; low 0-1, intermediate 2-3, high >3",
      "hemoglobin_g_dl": 13,
      "history_of_heart_disease": false,
      "max_score": 6,
      "risk_band": "low",
      "score": 0,
      "vascular_surgery": false
    },
    {
      "age_years": 50,
      "angina_or_dyspnea": false,
      "citation": {
        "authors": "Dakik HA, Chehab O, Eldirani M, Sbeity E, Karam C, Abou Hassan O, Msheik A, Kaspar C, Makki M, Tamim H",
        "doi": "10.1016/j.jacc.2019.04.023",
        "id": "dakik-2019",
        "pmid": "31221255",
        "source": "J Am Coll Cardiol. 2019;73(24):3067-3078",
        "title": "A New Index for Pre-Operative Cardiovascular Evaluation"
      },
      "components": [
        {
          "factor": "history_of_heart_disease",
          "points": 0,
          "present": false
        },
        {
          "factor": "angina_or_dyspnea",
          "points": 0,
          "present": false
        },
        {
          "factor": "age_ge_75",
          "points": 0,
          "present": false,
          "value": 50
        },
        {
          "factor": "hemoglobin_lt_12",
          "points": 0,
          "present": false,
          "value": 13
        },
        {
          "factor": "vascular_surgery",
          "points": 0,
          "present": false
 

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
3 h agoPassed402339 ms$0.005
12 h agoPassed402155 ms$0.005
16 h agoPassed402246 ms$0.005
20 h agoPassed402159 ms$0.005
23 h agoPassed402140 ms$0.005
27 h agoPassed402234 ms$0.005
31 h agoPassed402144 ms$0.005
34 h agoPassed402148 ms$0.005
39 h agoPassed402513 ms$0.005