78trust / 100
Calc Oakland
by magent in Security & trust
x402 APIPassing, checked 3 h ago
Oakland 2017 risk score for safe discharge after acute lower gastrointestinal bleeding. Points from age (0-2), sex (male 1), previous LGIB admission (1), caller-assigned blood on digital rectal examination (1), heart rate (0-3), systolic BP (0-5), and hemoglobin g/dL (0-22); max 35. safe_discharge when score ≤8 (derivation cutoff, not a later US validation). Not a discharge order or LGIB diagnosis. magent does not examine the rectum or assay hemoglobin. Hemoglobin g/dL or g/L.
POST https://api.magentlab.com/api/calc/oakland
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 164 ms typical, 335 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/oakland" \
-H "content-type: application/json" \
-d '{"items":[{"age":35,"dre_blood":false,"heart_rate_bpm":65,"hemoglobin_g_dl":16.5,"hemoglobin_g_l":165,"previous_lgib_admission":false,"sex":"female","systolic_mm_hg":165},{"age":35,"dre_blood":false,"heart_rate_bpm":65,"hemoglobin_g_dl":16.5,"hemoglobin_g_l":165,"previous_lgib_admission":false,"sex":"female","systolic_mm_hg":165}]}'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%2Foakland
const res = await pay("https://api.magentlab.com/api/calc/oakland", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"items":[{"age":35,"dre_blood":false,"heart_rate_bpm":65,"hemoglobin_g_dl":16.5,"hemoglobin_g_l":165,"previous_lgib_admission":false,"sex":"female","systolic_mm_hg":165},{"age":35,"dre_blood":false,"heart_rate_bpm":65,"hemoglobin_g_dl":16.5,"hemoglobin_g_l":165,"previous_lgib_admission":false,"sex":"female","systolic_mm_hg":165}]}),
});
console.log(await res.json());Example input
{
"items": [
{
"age": 35,
"dre_blood": false,
"heart_rate_bpm": 65,
"hemoglobin_g_dl": 16.5,
"hemoglobin_g_l": 165,
"previous_lgib_admission": false,
"sex": "female",
"systolic_mm_hg": 165
},
{
"age": 35,
"dre_blood": false,
"heart_rate_bpm": 65,
"hemoglobin_g_dl": 16.5,
"hemoglobin_g_l": 165,
"previous_lgib_admission": false,
"sex": "female",
"systolic_mm_hg": 165
}
]
}Example output
{
"count": 2,
"items": [
{
"age_years": 35,
"citation": {
"authors": "Oakland K, Jairath V, Uberoi R, Guy R, Ayaru L, Mortensen N, Murphy MF, Collins GS",
"doi": "10.1016/s2468-1253(17)30150-4",
"id": "oakland-2017",
"pmid": "28651935",
"source": "Lancet Gastroenterol Hepatol. 2017;2(9):635-643",
"title": "Derivation and validation of a novel risk score for safe discharge after acute lower gastrointestinal bleeding: a modelling study"
},
"components": [
{
"factor": "age",
"points": 0,
"present": false,
"value": 35
},
{
"factor": "sex",
"points": 0,
"present": false,
"value": "female"
},
{
"factor": "previous_lgib_admission",
"points": 0,
"present": false
},
{
"factor": "dre_blood",
"points": 0,
"present": false
},
{
"factor": "heart_rate",
"points": 0,
"present": false,
"value": 65
},
{
"factor": "systolic",
"points": 0,
"present": false,
"value": 165
},
{
"factor": "hemoglobin",
"points": 0,
"present": false,
"value": 16.5
}
],
"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.",
"dre_blood": false,
"formula": "oakland",
"formula_expression": "Oakland = age (≤39:0, 40-69:1, ≥70:2) + male 1 + previous_lgib_admission 1 + dre_blood 1 + HR (<70:0, 70-89:1, 90-109:2, ≥110:3) + SBP (50-89:5, 90-119:4, 120-129:3, 130-159:2, ≥160:0) + Hb g/dL (3.6-6.9:22, 7.0-8.9:17, 9.0-10.9:13, 11.0-12.9:8, 13.0-15.9:4, ≥16.0:0); Oakland 2017 derivation; max 35; safe_discharge ≤8",
"heart_rate_bpm": 65,
"hemoglobin_g_dl": 16.5,
"max_score": 35,
"oakland_band": "safe_discharge",
"previous_lgib_admission": false,
"score": 0,
"sex": "female",
"systolic_mm_hg": 165
},
{
"age_years": 35,
"citation": {
"authors": "Oakland K, Jairath V, Uberoi R, Guy R, Ayaru L, Mortensen N, Murphy MF, Collins GS",
"doi": "10.1016/s2468-1253(17)30150-4",
"id": "oakland-2017",
"pmid": "28651935",
"source": "Lancet Gastroenterol Hepatol. 2017;2(9):635-643",
"title": "Derivation and validation of a novel risk score for safe discharge after acute lower gastrointestinal bleeding: a modelling study"
},
"components": [
{
"factor": "age",
"points": 0,
"present": false,
"value": 35
},
{
"factor": "sex",
"points": 0,
"present": false,
"value": "female"
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 | 252 ms | $0.005 |
| 12 h ago | Passed | 402 | 335 ms | $0.005 |
| 16 h ago | Passed | 402 | 138 ms | $0.005 |
| 20 h ago | Passed | 402 | 163 ms | $0.005 |
| 23 h ago | Passed | 402 | 149 ms | $0.005 |
| 27 h ago | Passed | 402 | 164 ms | $0.005 |
| 31 h ago | Passed | 402 | 137 ms | $0.005 |
| 34 h ago | Passed | 402 | 210 ms | $0.005 |
| 39 h ago | Passed | 402 | 469 ms | $0.005 |