Calc Who Pv
by magent in Other
WHO 2016 polycythemia vera criteria (Arber 2016). Met when all three majors hold, or when major 1 and major 2 hold with subnormal EPO. Major 1 is male Hb >16.5 g/dL or Hct >49%, female Hb >16.0 or Hct >48%, or increased red-cell mass. Major 2 is caller-assigned marrow panmyelosis. Major 3 is JAK2 V617F or exon 12. Not a medical device, not a WHO diagnosis, and not WHO 2022. magent does not assay EPO or sequence JAK2.
https://api.magentlab.com/api/calc/who_pv- Price
- $0.005
- per call in USDC
- Uptime
- 100%
- last 30 days
- Response time
- 147 ms
- 419 ms slowest 5%
- Last check
- Passed
- 3 h ago, next in 3 h
Reliability
Status and outage history · Atom feed · Watch with other listings
How to call it
GET https://api.magentlab.com/api/calc/who_pv
Each call costs $0.005 in USDC on Base, paid with the request over x402.
Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.
Example request
From the listing.
GET https://api.magentlab.com/api/calc/who_pv?bone_marrow_panmyelosis=false&hematocrit_percent=45&hemoglobin_g_dl=15&increased_red_cell_mass=false&jak2_v617f_or_exon12=false&sex=male&subnormal_epo=falseParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
bone_marrow_panmyelosis | boolean | Yes | WHO 2016 marrow major as assigned by the caller (age-adjusted hypercellularity with panmyelosis, including pleomorphic mature megakaryocytes). true or false. magent does not read slides. |
hematocrit_percent | number | No | Hematocrit percent (10-70). Major 1 meets when male >49 or female >48. Optional when hemoglobin_g_dl is sent or increased_red_cell_mass is true. magent does not assay hematocrit. |
hemoglobin_g_dl | number | No | Hemoglobin in g/dL (3-22). Major 1 meets when male >16.5 or female >16.0. Optional when hematocrit_percent is sent or increased_red_cell_mass is true. At least one of hemoglobin_g_dl, hematocrit_percent, or increased_red_cell_mass true is required. magent does not assay hemoglobin. |
increased_red_cell_mass | boolean | Yes | Increased red-cell mass as assigned by the caller (Arber 2016 WHO 2016 major 1 alternative to Hb/Hct). true or false. true meets major 1 even when Hb/Hct are omitted or below threshold. magent does not measure red-cell mass. |
jak2_v617f_or_exon12 | boolean | Yes | JAK2 V617F or JAK2 exon 12 mutation as assigned by the caller (Arber 2016 WHO 2016 major 3). true or false. magent does not sequence JAK2. |
sex | string | Yes | female or male (Arber 2016 WHO 2016 PV hemoglobin/hematocrit thresholds). Required even when only increased_red_cell_mass is used. Assigned by the caller. One of: female, male. |
subnormal_epo | boolean | Yes | Subnormal serum erythropoietin as assigned by the caller (Arber 2016 WHO 2016 minor criterion). true or false. magent does not assay EPO. |
Example response
The provider's example. We can't check it without paying.
Example response, 43 lines
{
"bone_marrow_panmyelosis": false,
"citation": {
"authors": "Arber DA, Orazi A, Hasserjian R, Thiele J, Borowitz MJ, Le Beau MM, Bloomfield CD, Cazzola M, Vardiman JW",
"doi": "10.1182/blood-2016-03-643544",
"id": "arber-2016",
"pmid": "27069254",
"source": "Blood. 2016;127(20):2391-2405",
"title": "The 2016 revision to the World Health Organization classification of myeloid neoplasms and acute leukemia"
},
"criteria": [
{
"factor": "major_1",
"met": false
},
{
"factor": "major_2",
"met": false
},
{
"factor": "major_3",
"met": false
},
{
"factor": "minor",
"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": "who_pv",
"formula_expression": "pv_criteria_met iff (major_1 and major_2 and major_3) or (major_1 and major_2 and minor); major_1 iff increased_red_cell_mass or (male and (hemoglobin_g_dl > 16.5 or hematocrit_percent > 49)) or (female and (hemoglobin_g_dl > 16.0 or hematocrit_percent > 48)); major_2 bone_marrow_panmyelosis; major_3 jak2_v617f_or_exon12; minor subnormal_epo (Arber 2016 WHO 2016 PV). Not WHO 2022",
"hematocrit_percent": 45,
"hemoglobin_g_dl": 15,
"increased_red_cell_mass": false,
"jak2_v617f_or_exon12": false,
"major_1": false,
"major_2": false,
"major_3": false,
"minor": false,
"pv_criteria_met": false,
"sex": "male",
"subnormal_epo": false
}Call it from code
The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.005.
curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i 'https://api.magentlab.com/api/calc/who_pv?bone_marrow_panmyelosis=false&hematocrit_percent=45&hemoglobin_g_dl=15&increased_red_cell_mass=false&jak2_v617f_or_exon12=false&sex=male&subnormal_epo=false'
# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - 'https://api.magentlab.com/api/calc/who_pv?bone_marrow_panmyelosis=false&hematocrit_percent=45&hemoglobin_g_dl=15&increased_red_cell_mass=false&jak2_v617f_or_exon12=false&sex=male&subnormal_epo=false' \
| grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decodeJavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
// Pays at most $0.005 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.005" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.005 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.magentlab.com%2Fapi%2Fcalc%2Fwho_pv
const res = await pay("https://api.magentlab.com/api/calc/who_pv?bone_marrow_panmyelosis=false&hematocrit_percent=45&hemoglobin_g_dl=15&increased_red_cell_mass=false&jak2_v617f_or_exon12=false&sex=male&subnormal_epo=false");
console.log(res.status, await res.text());Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client
# Pays at most $0.005 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.005"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))
with x402_requests(client) as session:
res = session.get("https://api.magentlab.com/api/calc/who_pv?bone_marrow_panmyelosis=false&hematocrit_percent=45&hemoglobin_g_dl=15&increased_red_cell_mass=false&jak2_v617f_or_exon12=false&sex=male&subnormal_epo=false")
print(res.status_code, res.text)Security scan
No findings
We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 3 h ago | Passed | 402 | 147 ms | $0.005 |
| 13 h ago | Passed | 402 | 280 ms | $0.005 |
| 23 h ago | Passed | 402 | 280 ms | $0.005 |
| 33 h ago | Passed | 402 | 157 ms | $0.005 |
| 43 h ago | Passed | 402 | 287 ms | $0.005 |
Show 6 older checks
| 2 days ago | Passed | 402 | 144 ms | $0.005 |
| 3 days ago | Passed | 402 | 145 ms | $0.005 |
| 3 days ago | Passed | 402 | 137 ms | $0.005 |
| 3 days ago | Passed | 402 | 132 ms | $0.005 |
| 4 days ago | Passed | 402 | 419 ms | $0.005 |
| 4 days ago | Passed | 402 | 138 ms | $0.005 |