# Padua score

Padua score

Status: LIVE
Price: $0.005 USDC
`GET /api/calc/padua`
HTML: https://magentlab.com/docs/padua
Markdown: https://magentlab.com/docs/padua.md

Not a medical device. Not a diagnosis, dose, or listing recommendation.

## What it computes

Compute the Barbar 2010 Padua Prediction Score for VTE risk in hospitalized medical patients from age and ten caller-assigned findings.

## When to use

When an agent needs the published Padua Prediction Score (not Caprini, IMPROVE, or Khorana) for a hospitalized medical patient as in the paper.

## When not to use

- Not a diagnosis of VTE. magent does not diagnose venous thromboembolism.
- Not Caprini, IMPROVE, or Khorana. This tool is the Barbar 2010 Padua Prediction Score only.
- Only for hospitalized medical patients as published.
- Obesity is a caller-applied BMI ≥30 flag; magent does not take height or weight.
- Age 70 is included (scores 1). High risk is score ≥4; scores 0–3 are low risk.

## Formula

```
Padua = active_cancer (3) + previous_vte (3) + reduced_mobility (3) + thrombophilic_condition (3) + recent_trauma_or_surgery (2) + age>=70 (1) + heart_or_respiratory_failure (1) + acute_mi_or_ischemic_stroke (1) + acute_infection_or_rheumatologic_disorder (1) + obesity (1) + ongoing_hormonal_treatment (1); max 20; <4 low, >=4 high
```

## Citation

[A risk assessment model for the identification of hospitalized medical patients at risk for venous thromboembolism: the Padua Prediction Score](https://doi.org/10.1111/j.1538-7836.2010.04044.x)
Barbar S, Noventa F, Rossetto V, et al.
J Thromb Haemost. 2010;8(11):2450-2457
DOI: [10.1111/j.1538-7836.2010.04044.x](https://doi.org/10.1111/j.1538-7836.2010.04044.x)

## Worked example

### All items absent

Given: `active_cancer=false, acute_infection_or_rheumatologic_disorder=false, acute_mi_or_ischemic_stroke=false, age=50, heart_or_respiratory_failure=false, obesity=false, ongoing_hormonal_treatment=false, previous_vte=false, recent_trauma_or_surgery=false, reduced_mobility=false, thrombophilic_condition=false`

1. Age 50 is not ≥70 → 0; all ten flags false → 0
2. Score = 0 (max 20); padua_risk low


### Active cancer plus age 70 is high

Given: `active_cancer=true, acute_infection_or_rheumatologic_disorder=false, acute_mi_or_ischemic_stroke=false, age=70, heart_or_respiratory_failure=false, obesity=false, ongoing_hormonal_treatment=false, previous_vte=false, recent_trauma_or_surgery=false, reduced_mobility=false, thrombophilic_condition=false`

1. active_cancer → 3; age 70 ≥ 70 → 1
2. Score = 4 (max 20); padua_risk high


## Also searched as

- Padua Prediction Score
- Padua VTE score
- Barbar Padua score
- Padua risk assessment model
- hospital medical VTE score
- Padua thromboprophylaxis

## Parameters

- `age` (integer, required): Age in years (18-120). Scores 1 when age ≥70; 69 does not score.
- `active_cancer` (boolean, required): Active cancer as assigned by the caller (local or distant metastases and/or chemotherapy or radiotherapy in the previous 6 months). true or false. 3 points if true.
- `previous_vte` (boolean, required): Previous VTE as assigned by the caller (exclude superficial vein thrombosis). true or false. 3 points if true.
- `reduced_mobility` (boolean, required): Reduced mobility as assigned by the caller (bedrest with bathroom privileges ≥3 days). true or false. 3 points if true.
- `thrombophilic_condition` (boolean, required): Known thrombophilic condition as assigned by the caller. true or false. 3 points if true.
- `recent_trauma_or_surgery` (boolean, required): Recent trauma and/or surgery as assigned by the caller (≤1 month). true or false. 2 points if true.
- `heart_or_respiratory_failure` (boolean, required): Heart and/or respiratory failure. true or false. 1 point if true.
- `acute_mi_or_ischemic_stroke` (boolean, required): Acute myocardial infarction or ischemic stroke. true or false. 1 point if true.
- `acute_infection_or_rheumatologic_disorder` (boolean, required): Acute infection and/or rheumatologic disorder. true or false. 1 point if true.
- `obesity` (boolean, required): Obesity as assigned by the caller (BMI ≥30). true or false. magent does not take height or weight. 1 point if true.
- `ongoing_hormonal_treatment` (boolean, required): Ongoing hormonal treatment. true or false. 1 point if true.

## Bulk (POST)

POST the same path with a JSON items array. Price is n times the GET unit. Invalid items return HTTP 400 before settlement.

Method: `POST /api/calc/padua`
Max items: 25
Price: unit_amount * n (unit 5000 atomic)
Status: PREVIEW

- 1 to 25 items. Each item uses the same keys as the GET query parameters.
- The first invalid item fails the whole request (index in the 400 JSON). You are not charged.
- HTTP 200 is {count, path, items}. Each items[i] is the GET 200 body for that row.
- Catalog misses (empty matches, found=false) stay paid 200s inside that slot.
- x402 resource URL is this path plus n and body_sha256. Browsers that prefer text/html get the same paywall as GET; Pay retries POST with the same items.

Example request:

```json
{
  "items": [
    {
      "active_cancer": "false",
      "acute_infection_or_rheumatologic_disorder": "false",
      "acute_mi_or_ischemic_stroke": "false",
      "age": "50",
      "heart_or_respiratory_failure": "false",
      "obesity": "false",
      "ongoing_hormonal_treatment": "false",
      "previous_vte": "false",
      "recent_trauma_or_surgery": "false",
      "reduced_mobility": "false",
      "thrombophilic_condition": "false"
    },
    {
      "active_cancer": "false",
      "acute_infection_or_rheumatologic_disorder": "false",
      "acute_mi_or_ischemic_stroke": "false",
      "age": "50",
      "heart_or_respiratory_failure": "false",
      "obesity": "false",
      "ongoing_hormonal_treatment": "false",
      "previous_vte": "false",
      "recent_trauma_or_surgery": "false",
      "reduced_mobility": "false",
      "thrombophilic_condition": "false"
    }
  ]
}
```

Human paywall (two-item fixture): https://api.magentlab.com/paywall/bulk/padua

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/padua",
  "items": [
    {
      "components": [
        {
          "factor": "active_cancer",
          "points": 0,
          "present": false
        },
        {
          "factor": "previous_vte",
          "points": 0,
          "present": false
        },
        {
          "factor": "reduced_mobility",
          "points": 0,
          "present": false
        },
        {
          "factor": "thrombophilic_condition",
          "points": 0,
          "present": false
        },
        {
          "factor": "recent_trauma_or_surgery",
          "points": 0,
          "present": false
        },
        {
          "value": 50,
          "factor": "age_ge_70",
          "points": 0,
          "present": false
        },
        {
          "factor": "heart_or_respiratory_failure",
          "points": 0,
          "present": false
        },
        {
          "factor": "acute_mi_or_ischemic_stroke",
          "points": 0,
          "present": false
        },
        {
          "factor": "acute_infection_or_rheumatologic_disorder",
          "points": 0,
          "present": false
        },
        {
          "factor": "obesity",
          "points": 0,
          "present": false
        },
        {
          "factor": "ongoing_hormonal_treatment",
          "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.",
      "citation": {
        "authors": "Barbar S, Noventa F, Rossetto V, et al.",
        "doi": "10.1111/j.1538-7836.2010.04044.x",
        "id": "barbar-2010",
        "source": "J Thromb Haemost. 2010;8(11):2450-2457",
        "title": "A risk assessment model for the identification of hospitalized medical patients at risk for venous thromboembolism: the Padua Prediction Score"
      },
      "formula": "padua",
      "formula_expression": "Padua = active_cancer (3) + previous_vte (3) + reduced_mobility (3) + thrombophilic_condition (3) + recent_trauma_or_surgery (2) + age>=70 (1) + heart_or_respiratory_failure (1) + acute_mi_or_ischemic_stroke (1) + acute_infection_or_rheumatologic_disorder (1) + obesity (1) + ongoing_hormonal_treatment (1); max 20; <4 low, >=4 high",
      "max_score": 20,
      "score": 0,
      "age_years": 50,
      "padua_risk": "low"
    },
    {
      "components": [
        {
          "factor": "active_cancer",
          "points": 0,
          "present": false
        },
        {
          "factor": "previous_vte",
          "points": 0,
          "present": false
        },
        {
          "factor": "reduced_mobility",
          "points": 0,
          "present": false
        },
        {
          "factor": "thrombophilic_condition",
          "points": 0,
          "present": false
        },
        {
          "factor": "recent_trauma_or_surgery",
          "points": 0,
          "present": false
        },
        {
          "value": 50,
          "factor": "age_ge_70",
          "points": 0,
          "present": false
        },
        {
          "factor": "heart_or_respiratory_failure",
          "points": 0,
          "present": false
        },
        {
          "factor": "acute_mi_or_ischemic_stroke",
          "points": 0,
          "present": false
        },
        {
          "factor": "acute_infection_or_rheumatologic_disorder",
          "points": 0,
          "present": false
        },
        {
          "factor": "obesity",
          "points": 0,
          "present": false
        },
        {
          "factor": "ongoing_hormonal_treatment",
          "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.",
      "citation": {
        "authors": "Barbar S, Noventa F, Rossetto V, et al.",
        "doi": "10.1111/j.1538-7836.2010.04044.x",
        "id": "barbar-2010",
        "source": "J Thromb Haemost. 2010;8(11):2450-2457",
        "title": "A risk assessment model for the identification of hospitalized medical patients at risk for venous thromboembolism: the Padua Prediction Score"
      },
      "formula": "padua",
      "formula_expression": "Padua = active_cancer (3) + previous_vte (3) + reduced_mobility (3) + thrombophilic_condition (3) + recent_trauma_or_surgery (2) + age>=70 (1) + heart_or_respiratory_failure (1) + acute_mi_or_ischemic_stroke (1) + acute_infection_or_rheumatologic_disorder (1) + obesity (1) + ongoing_hormonal_treatment (1); max 20; <4 low, >=4 high",
      "max_score": 20,
      "score": 0,
      "age_years": 50,
      "padua_risk": "low"
    }
  ]
}
```

## Response fields

- `formula` (string): padua
- `formula_expression` (string): Exact expression used
- `score` (integer): Total points 0-20
- `max_score` (integer): Always 20
- `padua_risk` (string): low when score is <4; high when score is ≥4. Not a diagnosis.
- `age_years` (integer): Age used for the ≥70 criterion
- `components` (array): Per-item points
- `citation` (object): Barbar 2010 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "factor": "active_cancer",
      "points": 0,
      "present": false
    },
    {
      "factor": "previous_vte",
      "points": 0,
      "present": false
    },
    {
      "factor": "reduced_mobility",
      "points": 0,
      "present": false
    },
    {
      "factor": "thrombophilic_condition",
      "points": 0,
      "present": false
    },
    {
      "factor": "recent_trauma_or_surgery",
      "points": 0,
      "present": false
    },
    {
      "value": 50,
      "factor": "age_ge_70",
      "points": 0,
      "present": false
    },
    {
      "factor": "heart_or_respiratory_failure",
      "points": 0,
      "present": false
    },
    {
      "factor": "acute_mi_or_ischemic_stroke",
      "points": 0,
      "present": false
    },
    {
      "factor": "acute_infection_or_rheumatologic_disorder",
      "points": 0,
      "present": false
    },
    {
      "factor": "obesity",
      "points": 0,
      "present": false
    },
    {
      "factor": "ongoing_hormonal_treatment",
      "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.",
  "citation": {
    "authors": "Barbar S, Noventa F, Rossetto V, et al.",
    "doi": "10.1111/j.1538-7836.2010.04044.x",
    "id": "barbar-2010",
    "source": "J Thromb Haemost. 2010;8(11):2450-2457",
    "title": "A risk assessment model for the identification of hospitalized medical patients at risk for venous thromboembolism: the Padua Prediction Score"
  },
  "formula": "padua",
  "formula_expression": "Padua = active_cancer (3) + previous_vte (3) + reduced_mobility (3) + thrombophilic_condition (3) + recent_trauma_or_surgery (2) + age>=70 (1) + heart_or_respiratory_failure (1) + acute_mi_or_ischemic_stroke (1) + acute_infection_or_rheumatologic_disorder (1) + obesity (1) + ongoing_hormonal_treatment (1); max 20; <4 low, >=4 high",
  "max_score": 20,
  "score": 0,
  "age_years": 50,
  "padua_risk": "low"
}
```

## Errors

- HTTP 400 `invalid_age`: age must be an integer from 18 to 120 Returned before settlement; you are not charged.
- HTTP 400 `invalid_flag`: boolean clinical flags must be true or false Returned before settlement; you are not charged.
- HTTP 400 `invalid_items`: POST body must be a JSON object with only an items array Returned before settlement; you are not charged.
- HTTP 400 `invalid_item_count`: items must be an array of 1 to 25 objects Returned before settlement; you are not charged.
- HTTP 400 `invalid_item`: each items entry must be a JSON object Returned before settlement; you are not charged.

Shared HTTP 402 and 503: https://magentlab.com/docs/payments

## Related tools

- [Wells DVT](https://magentlab.com/docs/wells-dvt) — Compute the Wells deep-vein thrombosis probability score and return three-tier and two-tier bands.

## 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.

- GET the tool with Accept: application/json (do not send Accept: text/html unless you want the human paywall).
- HTTP 402 means you have not paid. Decode the base64 PAYMENT-REQUIRED header. HTTP 503 is not a new quote.
- Sign EIP-3009 (scheme exact, assetTransferMethod eip3009) with validBefore = now + accepts[0].maxTimeoutSeconds (600 seconds). That window starts when you sign and must cover wallet confirmation plus CDP verify and settle. Magent retries transient facilitator 429/5xx before answering. Do not send upto or batch-settlement payloads; magent does not offer those schemes.
- Retry the same URL with PAYMENT-SIGNATURE (base64 JSON echoing accepted, payload, and extensions when present).
- Success is HTTP 200 JSON plus PAYMENT-RESPONSE. Settlement happens before the tool runs. HTTP 503 settlement_uncertain or settle_failed: retry the same PAYMENT-SIGNATURE. Mint a new nonce only after a new HTTP 402.

- offered `exact` on eip155:8453: Fixed-price USDC on Base. The buyer authorizes the advertised amount (EIP-3009). magent settles before the tool runs (paymentFlow upfront). extra.assetTransferMethod=eip3009 extra.paymentFlow=upfront.

- not offered `upto`: Not offered. Usage-based: buyer authorizes a ceiling, seller settles the actual amount after work. Reserved for a future metered tool. Not for current calculators or code search.
- not offered `batch-settlement`: Not offered. Payment-channel vouchers claimed later in batches. Not the same as POST {items} bulk (that is still exact).

Same-path POST {items} is still scheme exact: one EIP-3009 authorization for n times the GET unit. That is not x402 batch-settlement (payment channels / vouchers).

Shared HTTP 402 and 503 table: https://magentlab.com/docs/payments

Stdio MCP (one process per host): https://magentlab.com/docs/mcp

## Guarantees

- Invalid query parameters return HTTP 400 before settlement. You are not charged.
- Settlement finishes before the tool executes (paymentFlow upfront). Uncertain or failed settlement fails closed (HTTP 503). Retry the same PAYMENT-SIGNATURE.
- HTTP 402 is unpaid only. Do not sign a second authorization because of a 503.
- Execution is timeout-bounded and concurrency-capped.
- Calculator inputs are stored encrypted for allowlisted operators (Magent Console). They are not in public logs, SSH lookups, catalog, or rollups. Request logs store path without query.
