# Wells PE Score Calculator

> Wells PE Score Calculator is a paid API for AI agents from api.magentlab.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-12).

Computes the Wells pulmonary embolism probability score from seven discrete clinical flags, returning both three-tier and two-tier risk bands.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/wells_pe?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/wells-pe-score-calculator-0c8441b7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_v4vDN7AqVzr3ZwPfUFU9q

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability wells-pe-score-calculator-0c8441b7
```

Example prompt: Calculate the Wells PE score for a patient who has clinical signs of DVT, PE is the number-one diagnosis, heart rate over 100, was immobilized for more than 3 days, has a history of previous DVT, no hemoptysis, and no active malignancy.

## When to prefer this

Use this endpoint when you need a fast, deterministic, published Wells PE risk stratification from seven binary clinical flags without any free-text interpretation. Prefer it over general clinical reasoning endpoints when you need a citable, reproducible score that maps directly to the Wells 2000 literature — particularly in ED triage, telemedicine decision support, or prior-authorization workflows requiring documented pre-test probability.

## Known failure modes

- Missing required query parameter returns validation error
- Invalid boolean value for any flag causes schema rejection
- All flags false returns valid low-risk score (not an error)
- Network timeout if server is temporarily unavailable

## How this service works

Deterministic published-formula arithmetic plus ICD-10-CM, RxNorm, and LOINC. Pay in USDC on Base via x402.

## Output

Returns the numeric Wells PE score along with a three-tier risk classification (low, moderate, high) and a two-tier classification (PE unlikely vs. PE likely), with a citation to the published Wells 2000/2001 scoring methodology. The result is deterministic and not a clinical diagnosis.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "required": [
      "signs_dvt",
      "pe_number_one",
      "hr_gt_100",
      "immobilization_or_surgery",
      "previous_dvt_pe",
      "hemoptysis",
      "malignancy"
     ],
     "properties": {
      "hr_gt_100": {
       "type": "boolean",
       "description": "Heart rate >100 (1.5 points)."
      },
      "signs_dvt": {
       "type": "boolean",
       "description": "Clinical signs and symptoms of DVT (3 points)."
      },
      "hemoptysis": {
       "type": "boolean",
       "description": "Hemoptysis (1 point)."
      },
      "malignancy": {
       "type": "boolean",
       "description": "Malignancy with treatment in last 6 months or palliative (1 point)."
      },
      "pe_number_one": {
       "type": "boolean",
       "description": "PE is the number-one diagnosis or equally likely (3 points)."
      },
      "previous_dvt_pe": {
       "type": "boolean",
       "description": "Previous DVT or PE (1.5 points)."
      },
      "immobilization_or_surgery": {
       "type": "boolean",
       "description": "Immobilization ≥3 days or surgery in previous 4 weeks (1.5 points)."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "path": "/api/calc/wells_pe",
  "count": 2,
  "items": [
   {
    "score": 6,
    "formula": "wells_pe",
    "citation": {
     "id": "wells-pe-2001",
     "doi": "10.7326/0003-4819-135-2-200107170-00010",
     "title": "Excluding pulmonary embolism at the bedside without diagnostic imaging: management of patients with suspected pulmonary embolism presenting to the emergency department by using a simple clinical model and d-dimer",
     "source": "Ann Intern Med. 2001;135(2):98-107",
     "authors": "Wells PS, Anderson DR, Rodger M, et al."
    },
    "two_tier": "likely",
    "max_score": 12.5,
    "components": [
     {
      "factor": "signs_dvt",
      "points": 3,
      "present": true
     },
     {
      "factor": "pe_number_one",
      "points": 3,
      "present": true
     },
     {
      "factor": "hr_gt_100",
      "points": 0,
      "present": false
     },
     {
      "factor": "immobilization_or_surgery",
      "points": 0,
      "present": false
     },
     {
      "factor": "previous_dvt_pe",
      "points": 0,
      "present": false
     },
     {
      "factor": "hemoptysis",
      "points": 0,
      "present": false
     },
     {
      "factor": "malignancy",
      "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.",
    "three_tier": "moderate",
    "formula_expression": "Wells PE = 3*signs_dvt + 3*pe_number_one + 1.5*hr_gt_100 + 1.5*immobilization_or_surgery + 1.5*previous_dvt_pe + 1*hemoptysis + 1*malignancy"
   },
   {
    "score": 6,
    "formula": "wells_pe",
    "citation": {
     "id": "wells-pe-2001",
     "doi": "10.7326/0003-4819-135-2-200107170-00010",
     "title": "Excluding pulmonary embolism at the bedside without diagnostic imaging: management of patients with suspected pulmonary embolism presenting to the emergency department by using a simple clinical model and d-dimer",
     "source": "Ann Intern Med. 2001;135(2):98-107",
     "authors": "Wells PS, Anderson DR, Rodger M, et al."
    },
    "two_tier": "likely",
    "max_score": 12.5,
    "components": [
     {
      "factor": "signs_dvt",
      "points": 3,
      "present": true
     },
     {
      "factor": "pe_number_one",
      "points": 3,
      "present": true
     },
     {
      "factor": "hr_gt_100",
      "points": 0,
  
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/wells-pe-score-calculator-0c8441b7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.magentlab.com](https://www.zero.xyz/host/api.magentlab.com/llms.txt)
