Calc Edacs
by magent in Security & trust
Than 2014 EDACS from age bands, male sex, known CAD or three risk factors (age 18-50 only), diaphoresis, radiation, inspiration (−4), and palpation (−6). Returns the point total (may be negative) and whether the score is <16. The paper ADP also requires ECG and 0/2h troponin, which magent does not take. Not a diagnosis or discharge order. Deterministic published arithmetic with citation.
https://api.magentlab.com/api/calc/edacs- Price
- $0.007
- per call in USDC
- Uptime
- 91.4%
- last 30 days
- Response time
- 230 ms
- 395 ms slowest 5%
- Last check
- Failed
- 3 h ago, next any minute now
Reliability
Latest check failed 3 h ago: Timed out
Status and outage history · Atom feed · Watch with other listings
How to call it
POST https://api.magentlab.com/api/calc/edacs
Each call costs $0.007 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/edacs
content-type: application/json
{
"items": [
{
"age": 40,
"diaphoresis": false,
"known_cad_or_three_risk_factors": false,
"pain_radiates_arm_shoulder_neck_jaw": false,
"pain_reproduced_by_palpation": false,
"pain_with_inspiration": false,
"sex": "female"
},
{
"age": 40,
"diaphoresis": false,
"known_cad_or_three_risk_factors": false,
"pain_radiates_arm_shoulder_neck_jaw": false,
"pain_reproduced_by_palpation": false,
"pain_with_inspiration": false,
"sex": "female"
}
]
}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, 118 lines
{
"count": 2,
"items": [
{
"age_years": 40,
"citation": {
"authors": "Than M, Flaws D, Sanders S, et al.",
"doi": "10.1111/1742-6723.12164",
"id": "than-2014",
"pmid": "24428678",
"source": "Emerg Med Australas. 2014;26(1):34-44",
"title": "Development and validation of the Emergency Department Assessment of Chest pain Score and 2 h accelerated diagnostic protocol"
},
"components": [
{
"factor": "age",
"points": 2,
"present": true,
"value": 40
},
{
"factor": "sex_male",
"points": 0,
"present": false,
"value": "female"
},
{
"factor": "known_cad_or_three_risk_factors",
"points": 0,
"present": false
},
{
"factor": "diaphoresis",
"points": 0,
"present": false
},
{
"factor": "pain_radiates_arm_shoulder_neck_jaw",
"points": 0,
"present": false
},
{
"factor": "pain_with_inspiration",
"points": 0,
"present": false
},
{
"factor": "pain_reproduced_by_palpation",
"points": 0,
"present": 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": "edacs",
"formula_expression": "EDACS = age (18-45:2, 46-50:4, 51-55:6, 56-60:8, 61-65:10, 66-70:12, 71-75:14, 76-80:16, 81-85:18, >=86:20) + male 6 + known_cad_or_three_risk_factors 4 if age 18-50 else 0 + diaphoresis 3 + pain_radiates_arm_shoulder_neck_jaw 5 + pain_with_inspiration -4 + pain_reproduced_by_palpation -6; score may be negative; paper ADP uses EDACS < 16 plus ECG and 0/2h troponin",
"score": 2,
"score_lt_16": true,
"sex": "female"
},
{
"age_years": 40,
"citation": {
"authors": "Than M, Flaws D, Sanders S, et al.",
"doi": "10.1111/1742-6723.12164",
"id": "than-2014",
"pmid": "24428678",
"source": "Emerg Med Australas. 2014;26(1):34-44",
"title": "Development and validation of the Emergency Department Assessment of Chest pain Score and 2 h accelerated diagnostic protocol"
},
"components": [
{
"factor": "age",
"points": 2,
"present": true,
"value": 40
},
{
"factor": "sex_male",
"points": 0,
"present": false,
"value": "female"
},
{
"factor": "known_cad_or_three_risk_factors",
"points": 0,
"present": false
},
{
"factor": "diaphoresis",
"points": 0,
"present": false
},
{
"factor": "pain_radiates_arm_shoulder_neck_jaw",
"points": 0,
"present": false
},
{
"factor": "pain_with_inspiration",
"points": 0,
"present": false
},
{
"factor": "pain_reproduced_by_palpation",
"points": 0,
"present": 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": "edacs",
"formula_expression": "EDACS = age (18-45:2, 46-50:4, 51-55:6, 56-60:8, 61-65:10, 66-70:12, 71-75:14, 76-80:16, 81-85:18, >=86:20) + male 6 + known_cad_or_three_risk_factors 4 if age 18-50 else 0 + diaphoresis 3 + pain_radiates_arm_shoulder_neck_jaw 5 + pain_with_inspiration -4 + pain_reproduced_by_palpation -6; score may be negative; paper ADP uses EDACS < 16 plus ECG and 0/2h troponin",
"score": 2,
"score_lt_16": true,
"sex": "female"
}
],
"path": "/api/calc/edacs"
}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.007.
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/edacs' \
-H 'content-type: application/json' \
--data-raw '{"items":[{"age":40,"diaphoresis":false,"known_cad_or_three_risk_factors":false,"pain_radiates_arm_shoulder_neck_jaw":false,"pain_reproduced_by_palpation":false,"pain_with_inspiration":false,"sex":"female"},{"age":40,"diaphoresis":false,"known_cad_or_three_risk_factors":false,"pain_radiates_arm_shoulder_neck_jaw":false,"pain_reproduced_by_palpation":false,"pain_with_inspiration":false,"sex":"female"}]}'
# 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/edacs' \
-H 'content-type: application/json' \
--data-raw '{"items":[{"age":40,"diaphoresis":false,"known_cad_or_three_risk_factors":false,"pain_radiates_arm_shoulder_neck_jaw":false,"pain_reproduced_by_palpation":false,"pain_with_inspiration":false,"sex":"female"},{"age":40,"diaphoresis":false,"known_cad_or_three_risk_factors":false,"pain_radiates_arm_shoulder_neck_jaw":false,"pain_reproduced_by_palpation":false,"pain_with_inspiration":false,"sex":"female"}]}' \
| 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.007 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.007" });
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.007 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.magentlab.com%2Fapi%2Fcalc%2Fedacs&method=POST
const res = await pay("https://api.magentlab.com/api/calc/edacs", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"items": [
{
"age": 40,
"diaphoresis": false,
"known_cad_or_three_risk_factors": false,
"pain_radiates_arm_shoulder_neck_jaw": false,
"pain_reproduced_by_palpation": false,
"pain_with_inspiration": false,
"sex": "female"
},
{
"age": 40,
"diaphoresis": false,
"known_cad_or_three_risk_factors": false,
"pain_radiates_arm_shoulder_neck_jaw": false,
"pain_reproduced_by_palpation": false,
"pain_with_inspiration": false,
"sex": "female"
}
]
}),
});
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.007 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.007"})
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/edacs",
json={
"items": [
{
"age": 40,
"diaphoresis": False,
"known_cad_or_three_risk_factors": False,
"pain_radiates_arm_shoulder_neck_jaw": False,
"pain_reproduced_by_palpation": False,
"pain_with_inspiration": False,
"sex": "female",
},
{
"age": 40,
"diaphoresis": False,
"known_cad_or_three_risk_factors": False,
"pain_radiates_arm_shoulder_neck_jaw": False,
"pain_reproduced_by_palpation": False,
"pain_with_inspiration": False,
"sex": "female",
},
],
},
)
print(res.status_code, res.text)Security scan
1 finding
- Charges more than its listed price in payment
Listed at $0.005, charges $0.007
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 3 h ago | Timed out | - | - | - |
| 7 h ago | Timed out | - | - | - |
| 12 h ago | Timed out | - | - | - |
| 17 h ago | Passed | 402 | 270 ms | $0.007 |
| 22 h ago | Passed | 402 | 1.4 s | $0.007 |
Show 10 older checks
| 26 h ago | Passed | 402 | 235 ms | $0.007 |
| 31 h ago | Passed | 402 | 395 ms | $0.007 |
| 36 h ago | Passed | 402 | 226 ms | $0.007 |
| 40 h ago | Passed | 402 | 136 ms | $0.007 |
| 45 h ago | Passed | 402 | 309 ms | $0.007 |
| 2 days ago | Passed | 402 | 233 ms | $0.007 |
| 2 days ago | Passed | 402 | 318 ms | $0.007 |
| 2 days ago | Passed | 402 | 239 ms | $0.007 |
| 3 days ago | Passed | 402 | 288 ms | $0.007 |
| 3 days ago | Passed | 402 | 269 ms | $0.007 |
History
| 11 Oct 2026 | Price changed from $0.005 to $0.007 |