Calc Peld Cr
by magent in Other
OPTN Policy 9 Table 9-1 PELD-Cr from age, albumin, bilirubin, INR, creatinine or dialysis/CVVHD, and caller-assigned minimum CDC height or weight Z-score. PELD = (sum of Table 9-1 terms + 1.5287) × 10 + 2.82; nearest integer; minimum 6. Albumin, bilirubin, and INR floor at 1.0; creatinine 1.3 mg/dL if >1.3 or dialysis/CVVHD. Not a transplant listing order. magent does not compute CDC LMS Z from height or weight.
https://api.magentlab.com/api/calc/peld_cr- Price
- $0.005
- per call in USDC
- Uptime
- 96.5%
- last 30 days
- Response time
- 267 ms
- 423 ms slowest 5%
- Last check
- Passed
- 5 h ago, next any minute now
Reliability
Status and outage history · Atom feed · Watch with other listings
How to call it
POST https://api.magentlab.com/api/calc/peld_cr
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.
POST https://api.magentlab.com/api/calc/peld_cr
content-type: application/json
{
"items": [
{
"age_years": 2,
"albumin_g_dl": 2.5,
"albumin_g_l": 25,
"bilirubin_mg_dl": 4,
"bilirubin_umol_l": 68.4,
"creatinine_mg_dl": 0.4,
"creatinine_umol_l": 35.368,
"dialysis_or_cvvhd": false,
"inr": 1.5,
"min_cdc_z": 0
},
{
"age_years": 2,
"albumin_g_dl": 2.5,
"albumin_g_l": 25,
"bilirubin_mg_dl": 4,
"bilirubin_umol_l": 68.4,
"creatinine_mg_dl": 0.4,
"creatinine_umol_l": 35.368,
"dialysis_or_cvvhd": false,
"inr": 1.5,
"min_cdc_z": 0
}
]
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
items | array of object | Yes |
Example response
The provider's example. We can't check it without paying.
Example response, 56 lines
{
"count": 2,
"items": [
{
"age_used_years": 2,
"age_years": 2,
"albumin_g_dl": 2.5,
"albumin_used_g_dl": 1.9,
"bilirubin_mg_dl": 4,
"bilirubin_used_mg_dl": 4,
"citation": {
"authors": "Organ Procurement and Transplantation Network",
"id": "optn-2023-peld-cr",
"source": "OPTN Policy 9.1.E / Table 9-1 (policy notice June 2022; implementation 13 Jul 2023)",
"title": "Improving Liver Allocation: MELD, PELD, Status 1A and Status 1B"
},
"creatinine_mg_dl": 0.4,
"creatinine_used_mg_dl": 0.4,
"dialysis_or_cvvhd": 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": "optn_peld_cr_2023",
"formula_expression": "PELD = round((sum of OPTN Policy 9 Table 9-1 terms + 1.5287)*10 + 2.82); min 6. Age (fractional years, <12): <1 → -0.1967*1; 1-5.5 → -0.1967*age; >5.5 → -0.1967*5.5. Albumin g/dL (floor 1.0): 1-1.9 → -1.842*ln(albumin); >1.9 → -1.842*ln(1.9). Bilirubin mg/dL (floor 1.0): 1-4 → 0.7854*ln(bilirubin)+0.3434*ln(4); >4-40 → 0.7854*ln(4)+0.3434*ln(bilirubin); >40 → 0.7854*ln(4)+0.3434*ln(40). INR (floor 1.0): 1-2 → 1.981*ln(INR)+0.7298*ln(2); >2-10 → 1.981*ln(2)+0.7298*ln(INR); >10 → 1.981*ln(2)+0.7298*ln(10). Min CDC height/weight Z: <-5 → -0.1807*(-5); -5 to -2.1 → -0.1807*Z; >-2.1 → -0.1807*(-2.1). Creatinine mg/dL (1.3 if >1.3 or dialysis/CVVHD): <0.2 → 1.453*ln(0.2); 0.2-1.3 → 1.453*ln(creatinine); >1.3 → 1.453*ln(1.3)",
"inr": 1.5,
"inr_used": 1.5,
"min_cdc_z": 0,
"min_cdc_z_used": -2.1,
"peld_cr": 22
},
{
"age_used_years": 2,
"age_years": 2,
"albumin_g_dl": 2.5,
"albumin_used_g_dl": 1.9,
"bilirubin_mg_dl": 4,
"bilirubin_used_mg_dl": 4,
"citation": {
"authors": "Organ Procurement and Transplantation Network",
"id": "optn-2023-peld-cr",
"source": "OPTN Policy 9.1.E / Table 9-1 (policy notice June 2022; implementation 13 Jul 2023)",
"title": "Improving Liver Allocation: MELD, PELD, Status 1A and Status 1B"
},
"creatinine_mg_dl": 0.4,
"creatinine_used_mg_dl": 0.4,
"dialysis_or_cvvhd": 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": "optn_peld_cr_2023",
"formula_expression": "PELD = round((sum of OPTN Policy 9 Table 9-1 terms + 1.5287)*10 + 2.82); min 6. Age (fractional years, <12): <1 → -0.1967*1; 1-5.5 → -0.1967*age; >5.5 → -0.1967*5.5. Albumin g/dL (floor 1.0): 1-1.9 → -1.842*ln(albumin); >1.9 → -1.842*ln(1.9). Bilirubin mg/dL (floor 1.0): 1-4 → 0.7854*ln(bilirubin)+0.3434*ln(4); >4-40 → 0.7854*ln(4)+0.3434*ln(bilirubin); >40 → 0.7854*ln(4)+0.3434*ln(40). INR (floor 1.0): 1-2 → 1.981*ln(INR)+0.7298*ln(2); >2-10 → 1.981*ln(2)+0.7298*ln(INR); >10 → 1.981*ln(2)+0.7298*ln(10). Min CDC height/weight Z: <-5 → -0.1807*(-5); -5 to -2.1 → -0.1807*Z; >-2.1 → -0.1807*(-2.1). Creatinine mg/dL (1.3 if >1.3 or dialysis/CVVHD): <0.2 → 1.453*ln(0.2); 0.2-1.3 → 1.453*ln(creatinine); >1.3 → 1.453*ln(1.3)",
"inr": 1.5,
"inr_used": 1.5,
"min_cdc_z": 0,
"min_cdc_z_used": -2.1,
"peld_cr": 22
}
],
"path": "/api/calc/peld_cr"
}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 -X POST 'https://api.magentlab.com/api/calc/peld_cr' \
-H 'content-type: application/json' \
--data-raw '{"items":[{"age_years":2,"albumin_g_dl":2.5,"albumin_g_l":25,"bilirubin_mg_dl":4,"bilirubin_umol_l":68.4,"creatinine_mg_dl":0.4,"creatinine_umol_l":35.368,"dialysis_or_cvvhd":false,"inr":1.5,"min_cdc_z":0},{"age_years":2,"albumin_g_dl":2.5,"albumin_g_l":25,"bilirubin_mg_dl":4,"bilirubin_umol_l":68.4,"creatinine_mg_dl":0.4,"creatinine_umol_l":35.368,"dialysis_or_cvvhd":false,"inr":1.5,"min_cdc_z":0}]}'
# 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 - -X POST 'https://api.magentlab.com/api/calc/peld_cr' \
-H 'content-type: application/json' \
--data-raw '{"items":[{"age_years":2,"albumin_g_dl":2.5,"albumin_g_l":25,"bilirubin_mg_dl":4,"bilirubin_umol_l":68.4,"creatinine_mg_dl":0.4,"creatinine_umol_l":35.368,"dialysis_or_cvvhd":false,"inr":1.5,"min_cdc_z":0},{"age_years":2,"albumin_g_dl":2.5,"albumin_g_l":25,"bilirubin_mg_dl":4,"bilirubin_umol_l":68.4,"creatinine_mg_dl":0.4,"creatinine_umol_l":35.368,"dialysis_or_cvvhd":false,"inr":1.5,"min_cdc_z":0}]}' \
| 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%2Fpeld_cr&method=POST
const res = await pay("https://api.magentlab.com/api/calc/peld_cr", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"items": [
{
"age_years": 2,
"albumin_g_dl": 2.5,
"albumin_g_l": 25,
"bilirubin_mg_dl": 4,
"bilirubin_umol_l": 68.4,
"creatinine_mg_dl": 0.4,
"creatinine_umol_l": 35.368,
"dialysis_or_cvvhd": false,
"inr": 1.5,
"min_cdc_z": 0
},
{
"age_years": 2,
"albumin_g_dl": 2.5,
"albumin_g_l": 25,
"bilirubin_mg_dl": 4,
"bilirubin_umol_l": 68.4,
"creatinine_mg_dl": 0.4,
"creatinine_umol_l": 35.368,
"dialysis_or_cvvhd": false,
"inr": 1.5,
"min_cdc_z": 0
}
]
}),
});
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.post(
"https://api.magentlab.com/api/calc/peld_cr",
json={
"items": [
{
"age_years": 2,
"albumin_g_dl": 2.5,
"albumin_g_l": 25,
"bilirubin_mg_dl": 4,
"bilirubin_umol_l": 68.4,
"creatinine_mg_dl": 0.4,
"creatinine_umol_l": 35.368,
"dialysis_or_cvvhd": False,
"inr": 1.5,
"min_cdc_z": 0,
},
{
"age_years": 2,
"albumin_g_dl": 2.5,
"albumin_g_l": 25,
"bilirubin_mg_dl": 4,
"bilirubin_umol_l": 68.4,
"creatinine_mg_dl": 0.4,
"creatinine_umol_l": 35.368,
"dialysis_or_cvvhd": False,
"inr": 1.5,
"min_cdc_z": 0,
},
],
},
)
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 |
|---|---|---|---|---|
| 5 h ago | Passed | 402 | 147 ms | $0.005 |
| 9 h ago | Passed | 402 | 350 ms | $0.005 |
| 13 h ago | Passed | 402 | 148 ms | $0.005 |
| 18 h ago | Passed | 402 | 342 ms | $0.005 |
| 22 h ago | Passed | 402 | 423 ms | $0.005 |
Show 10 older checks
| 26 h ago | Timed out | - | - | - |
| 30 h ago | Passed | 402 | 366 ms | $0.005 |
| 34 h ago | Passed | 402 | 308 ms | $0.005 |
| 39 h ago | Passed | 402 | 267 ms | $0.005 |
| 43 h ago | Passed | 402 | 218 ms | $0.005 |
| 47 h ago | Passed | 402 | 234 ms | $0.005 |
| 2 days ago | Passed | 402 | 246 ms | $0.005 |
| 2 days ago | Passed | 402 | 330 ms | $0.005 |
| 2 days ago | Passed | 402 | 255 ms | $0.005 |
| 3 days ago | Passed | 402 | 306 ms | $0.005 |