70trust / 100

Calc Hestia

by magent in News & content

x402 APIPassing, checked 3 h ago

Hestia criteria (Zondag 2011). Outpatient PE is eligible only when none of 11 caller-assigned exclusions hold: hemodynamic instability, thrombolysis or embolectomy, high bleeding risk, oxygen >24 h, PE on anticoagulation, IV pain medication >24 h, medical or social admission, CrCl <30, severe liver impairment, pregnancy, or documented HIT. Any yes excludes home treatment. Not a diagnosis, not PESI, not sPESI.

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

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
178 ms typical, 502 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/hestia" \
  -H "content-type: application/json" \
  -d '{"items":[{"creatinine_clearance_lt_30":false,"hemodynamically_unstable":false,"high_bleeding_risk":false,"history_of_hit":false,"iv_pain_meds_gt_24h":false,"medical_or_social_admission":false,"oxygen_gt_24h":false,"pe_on_anticoagulation":false,"pregnant":false,"severe_liver_impairment":false,"thrombolysis_or_embolectomy":false},{"creatinine_clearance_lt_30":false,"hemodynamically_unstable":false,"high_bleeding_risk":false,"history_of_hit":false,"iv_pain_meds_gt_24h":false,"medical_or_social_admission":false,"oxygen_gt_24h":false,"pe_on_anticoagulation":false,"pregnant":false,"severe_liver_impairment":false,"thrombolysis_or_embolectomy":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%2Fhestia
const res = await pay("https://api.magentlab.com/api/calc/hestia", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"items":[{"creatinine_clearance_lt_30":false,"hemodynamically_unstable":false,"high_bleeding_risk":false,"history_of_hit":false,"iv_pain_meds_gt_24h":false,"medical_or_social_admission":false,"oxygen_gt_24h":false,"pe_on_anticoagulation":false,"pregnant":false,"severe_liver_impairment":false,"thrombolysis_or_embolectomy":false},{"creatinine_clearance_lt_30":false,"hemodynamically_unstable":false,"high_bleeding_risk":false,"history_of_hit":false,"iv_pain_meds_gt_24h":false,"medical_or_social_admission":false,"oxygen_gt_24h":false,"pe_on_anticoagulation":false,"pregnant":false,"severe_liver_impairment":false,"thrombolysis_or_embolectomy":false}]}),
});
console.log(await res.json());

Example input

{
  "items": [
    {
      "creatinine_clearance_lt_30": false,
      "hemodynamically_unstable": false,
      "high_bleeding_risk": false,
      "history_of_hit": false,
      "iv_pain_meds_gt_24h": false,
      "medical_or_social_admission": false,
      "oxygen_gt_24h": false,
      "pe_on_anticoagulation": false,
      "pregnant": false,
      "severe_liver_impairment": false,
      "thrombolysis_or_embolectomy": false
    },
    {
      "creatinine_clearance_lt_30": false,
      "hemodynamically_unstable": false,
      "high_bleeding_risk": false,
      "history_of_hit": false,
      "iv_pain_meds_gt_24h": false,
      "medical_or_social_admission": false,
      "oxygen_gt_24h": false,
      "pe_on_anticoagulation": false,
      "pregnant": false,
      "severe_liver_impairment": false,
      "thrombolysis_or_embolectomy": false
    }
  ]
}

Example output

{
  "count": 2,
  "items": [
    {
      "citation": {
        "authors": "Zondag W, Mos ICM, Creemers-Schild D, et al.",
        "doi": "10.1111/j.1538-7836.2011.04388.x",
        "id": "zondag-2011",
        "source": "J Thromb Haemost. 2011;9(8):1500-1507",
        "title": "Outpatient treatment in patients with acute pulmonary embolism: the Hestia Study"
      },
      "criteria": [
        {
          "factor": "hemodynamically_unstable",
          "met": false
        },
        {
          "factor": "thrombolysis_or_embolectomy",
          "met": false
        },
        {
          "factor": "high_bleeding_risk",
          "met": false
        },
        {
          "factor": "oxygen_gt_24h",
          "met": false
        },
        {
          "factor": "pe_on_anticoagulation",
          "met": false
        },
        {
          "factor": "iv_pain_meds_gt_24h",
          "met": false
        },
        {
          "factor": "medical_or_social_admission",
          "met": false
        },
        {
          "factor": "creatinine_clearance_lt_30",
          "met": false
        },
        {
          "factor": "severe_liver_impairment",
          "met": false
        },
        {
          "factor": "pregnant",
          "met": false
        },
        {
          "factor": "history_of_hit",
          "met": false
        }
      ],
      "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": "hestia",
      "formula_expression": "outpatient eligible iff none of the 11 exclusion criteria",
      "outpatient_eligible": true
    },
    {
      "citation": {
        "authors": "Zondag W, Mos ICM, Creemers-Schild D, et al.",
        "doi": "10.1111/j.1538-7836.2011.04388.x",
        "id": "zondag-2011",
        "source": "J Thromb Haemost. 2011;9(8):1500-1507",
        "title": "Outpatient treatment in patients with acute pulmonary embolism: the Hestia Study"
      },
      "criteria": [
        {
          "factor": "hemodynamically_unstable",
          "met": false
        },
        {
          "factor": "thrombolysis_or_embolectomy",
          "met": false
        },
        {
          "factor": "high_bleeding_risk",
          "met": false
        },
        {
          "factor": "oxygen_gt_24h",
          "met": false
        },
        {
          "factor": "pe_on_anticoagulation",
          "met": false
        },
        {
          "factor": "iv_pain_meds_gt_24h",
          "met": false
        },
        {
          "factor": "medical_or_social_admission",
          "met": false
        },
        {
          "factor": "creatinine_clearance_lt_30",
          "met": false
        },
        {
          "factor": "severe_liver_impairment",
          "met": false
        },
        {
          "factor": "pregnant",
          "met": false
        },
        {
          "f

Security scan

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

Recent checks

WhenResultHTTPTimePrice
3 h agoPassed402161 ms$0.007
7 h agoPassed402544 ms$0.007
11 h agoPassed402178 ms$0.007
19 h agoPassed402153 ms$0.007
23 h agoPassed402308 ms$0.007
27 h agoPassed402297 ms$0.007
30 h agoPassed402166 ms$0.007
34 h agoPassed402142 ms$0.007
37 h agoPassed402200 ms$0.007
41 h agoPassed402502 ms$0.007
46 h agoPassed402155 ms$0.007

History

11 Oct 2026Price changed from $0.005 to $0.007