LIVE
Wells DVT
Compute the Wells deep-vein thrombosis probability score and return three-tier and two-tier bands.
Markdown: /docs/wells-dvt.md · Canonical: https://magentlab.com/docs/wells-dvt
Not a medical device. Not a diagnosis, dose, or listing recommendation.
What it computes
Compute the Wells deep-vein thrombosis probability score and return three-tier and two-tier bands.
When to use
When an agent needs the published Wells DVT arithmetic and must not invent a probability from prose.
When not to use
- Not a diagnosis. Bands are published cut-points, not a DVT rule-out.
- alternative_diagnosis_as_likely subtracts 2. Flags are caller-supplied booleans.
Formula
Wells DVT = +1 each of 9 findings; −2 if alternative_diagnosis_as_likely
Citation
- Title
- Evaluation of D-dimer in the diagnosis of suspected deep-vein thrombosis
- Authors
- Wells PS, Anderson DR, Rodger M, et al.
- Source
- N Engl J Med. 2003;349(13):1227-1235
Worked example
Active cancer + calf swelling
Given:
active_cancer=truealternative_diagnosis_as_likely=falsebedridden_or_surgery=falsecalf_swelling_gt_3cm=truecollateral_veins=falseentire_leg_swollen=falseparalysis_or_cast=falsepitting_edema=falseprevious_dvt=falsetenderness=false
- active_cancer → +1; calf_swelling_gt_3cm → +1
- Score = 2 → three-tier moderate, two-tier likely (≥2)
Try
Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.
Full URL: https://api.magentlab.com/api/calc/wells_dvt?active_cancer=true¶lysis_or_cast=false&bedridden_or_surgery=false&tenderness=false&entire_leg_swollen=false&calf_swelling_gt_3cm=true&pitting_edema=false&collateral_veins=false&previous_dvt=false&alternative_diagnosis_as_likely=false
x402 V2 curl
Expect HTTP 402 and a PAYMENT-REQUIRED
header until you retry with PAYMENT-SIGNATURE. Incomplete query params return HTTP
400 before any quote or charge.
curl -i -H "Accept: application/json" "https://api.magentlab.com/api/calc/wells_dvt?active_cancer=true¶lysis_or_cast=false&bedridden_or_surgery=false&tenderness=false&entire_leg_swollen=false&calf_swelling_gt_3cm=true&pitting_edema=false&collateral_veins=false&previous_dvt=false&alternative_diagnosis_as_likely=false"
Cursor mcp.json
Intended config for @magent/mcp. This is not npm @x402/fetch
(a payment fetch wrapper).
{
"mcpServers": {
"magent": {
"args": [
"-y",
"@magent/mcp"
],
"command": "npx",
"env": {
"X402_PRIVATE_KEY": "0xYOUR_SPENDING_KEY"
}
}
}
}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
active_cancer |
boolean | required | Active cancer (treatment ongoing, within 6 months, or palliative). +1. |
paralysis_or_cast |
boolean | required | Paralysis, paresis, or recent plaster immobilization of the legs. +1. |
bedridden_or_surgery |
boolean | required | Recently bedridden ≥3 days or major surgery within 12 weeks. +1. |
tenderness |
boolean | required | Localized tenderness along the deep venous system. +1. |
entire_leg_swollen |
boolean | required | Entire leg swollen. +1. |
calf_swelling_gt_3cm |
boolean | required | Calf swelling >3 cm compared with the asymptomatic side. +1. |
pitting_edema |
boolean | required | Pitting edema confined to the symptomatic leg. +1. |
collateral_veins |
boolean | required | Collateral superficial veins (nonvaricose). +1. |
previous_dvt |
boolean | required | Previously documented DVT. +1. |
alternative_diagnosis_as_likely |
boolean | required | Alternative diagnosis at least as likely as DVT. −2. |
Response
| Field | Type | Description |
|---|---|---|
formula |
string | wells_dvt |
formula_expression |
string | Exact expression used |
score |
integer | Total points (−2 to 9) |
max_score |
integer | Always 9 |
three_tier |
string | low (≤0), moderate (1-2), high (≥3). Not a diagnosis. |
two_tier |
string | likely (≥2) or unlikely (<2). Not a diagnosis. |
components |
array | Per-factor points |
citation |
object | NEJM 2003 citation |
disclaimer |
string | Not-a-device notice |
Example JSON
Machine form of the same example. Frozen fixture. Not a live lookup.
{
"components": [
{
"factor": "active_cancer",
"points": 1,
"present": true
},
{
"factor": "paralysis_or_cast",
"points": 0,
"present": false
},
{
"factor": "bedridden_or_surgery",
"points": 0,
"present": false
},
{
"factor": "tenderness",
"points": 0,
"present": false
},
{
"factor": "entire_leg_swollen",
"points": 0,
"present": false
},
{
"factor": "calf_swelling_gt_3cm",
"points": 1,
"present": true
},
{
"factor": "pitting_edema",
"points": 0,
"present": false
},
{
"factor": "collateral_veins",
"points": 0,
"present": false
},
{
"factor": "previous_dvt",
"points": 0,
"present": false
},
{
"factor": "alternative_diagnosis_as_likely",
"points": 0,
"present": false
}
],
"disclaimer": "Not a medical device. Deterministic published-formula or coded-ontology output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
"citation": {
"authors": "Wells PS, Anderson DR, Rodger M, et al.",
"doi": "10.1056/NEJMoa023153",
"id": "wells-dvt-2003",
"source": "N Engl J Med. 2003;349(13):1227-1235",
"title": "Evaluation of D-dimer in the diagnosis of suspected deep-vein thrombosis"
},
"formula": "wells_dvt",
"formula_expression": "Wells DVT = +1 each of 9 findings; −2 if alternative_diagnosis_as_likely",
"max_score": 9,
"score": 2,
"three_tier": "moderate",
"two_tier": "likely"
}
Errors
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_flag |
boolean clinical flags must be true or false Returned before settlement; you are not charged. |
| 402 | payment_required |
Missing or invalid PAYMENT-SIGNATURE; decode the PAYMENT-REQUIRED header |
| 409 | payment_in_progress |
The same authorization nonce is already being settled; retry shortly |
| 429 | rate_limited |
Too many requests from this client |
| 503 | settlement_uncertain |
Settlement is unconfirmed; retry with the same PAYMENT-SIGNATURE |
| 503 | facilitator_unavailable |
Payment facilitator unavailable |
| 503 | facilitator_misconfigured |
Payment facilitator is not configured |
| 503 | facilitator_unauthorized |
Payment facilitator rejected credentials |
| 503 | ledger_unavailable |
Payment ledger unavailable |
| 503 | payment_unavailable |
Payment processing unavailable |
Related tools
- Wells PE — Compute the Wells pulmonary-embolism probability score and return three-tier and two-tier bands.
- CURB-65 — Compute the CURB-65 community-acquired pneumonia severity score from age and discrete flags.
Also searched as
- Wells DVT score
- Wells deep vein thrombosis
- DVT likely unlikely
- Wells DVT two-tier
Payment
Required query parameters must be present and valid. Invalid params return HTTP 400 JSON before settlement. magent does not charge. Fix the params, then request a new 402 quote for that complete URL. Catalog misses (empty matches, found=false) are valid paid 200s. Unpaid valid requests return HTTP 402 with a base64
PAYMENT-REQUIRED
header. Retry the same URL with PAYMENT-SIGNATURE. Settlement completes before the
tool runs. Full handshake and shared payment errors: Payments.
Guarantees
- Invalid query parameters return HTTP 400 before settlement. You are not charged.
- Settlement finishes before the tool executes. Uncertain settlement fails closed (HTTP 503).
- Execution is timeout-bounded and concurrency-capped.
- Calculator inputs are not persisted. Request logs store path without query.