# Caprini VTE score

Caprini score

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

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

## What it computes

Sum Caprini 2005 Table 3 thrombosis risk factors with exclusive age and surgery weights and return the Table 2 band (low / moderate / high / highest).

## When to use

When an agent needs the Caprini 2005 point total (not Padua, not Caprini 2009/2013) from caller-assigned Table 3 flags and must not invent a diagnosis or prophylaxis order.

## When not to use

- Not a medical device and not a diagnosis of VTE. magent does not examine the patient; every flag is caller-assigned.
- Caprini 2005 Table 3 factors and Table 2 bands only. Not Caprini 2009 or 2013 revisions (those use different factors and cutoffs).
- Age bands are mutually exclusive (41-60 = 1, 61-74 = 2, >=75 = 3; age 40 or younger scores 0 for age). Surgery categories are mutually exclusive.
- Does not return DVT incidence percents or a prophylaxis regimen.
- Obesity is a caller-applied BMI >25 flag; magent does not take height or weight.

## Formula

```
Caprini 2005 = exclusive age (<=40: 0, 41-60: 1, 61-74: 2, >=75: 3) + exclusive surgery (none 0, minor 1, arthroscopic 2, major >45 min 2, laparoscopic >45 min 2, elective arthroplasty 5) + Table 3 flags (1, 2, 3, or 5); max 78; 0-1 low, 2 moderate, 3-4 high, >=5 highest
```

## Citation

[Thrombosis risk assessment as a guide to quality patient care](https://doi.org/10.1016/j.disamonth.2005.02.003)
Caprini JA
Dis Mon. 2005;51(2-3):70-78
DOI: [10.1016/j.disamonth.2005.02.003](https://doi.org/10.1016/j.disamonth.2005.02.003)

## Worked example

### Age 50, no other Table 3 factors

Given: `surgery=none, age=50, adverse_pregnancy_history=false, obesity=false, abnormal_pulmonary_function=false, elevated_homocysteine=false, heparin_induced_thrombocytopenia=false, swollen_legs=false, other_risk_factor=false, varicose_veins=false, inflammatory_bowel_disease=false, confined_to_bed_gt_72h=false, malignancy=false, spinal_cord_injury=false, serious_lung_disease=false, pregnancy_or_postpartum=false, congestive_heart_failure=false, oral_contraceptives_or_hrt=false, prior_major_surgery=false, anticardiolipin_antibodies=false, acute_myocardial_infarction=false, medical_bed_rest=false, hip_pelvis_leg_fracture=false, lupus_anticoagulant=false, immobilizing_plaster_cast=false, central_venous_access=false, factor_v_leiden=false, prothrombin_20210a=false, other_thrombophilia=false, sepsis=false, multiple_trauma=false, stroke=false, family_history_thrombosis=false, history_dvt_pe=false`

1. Age 50 is 41-60 → 1; surgery none → 0; all flags false → 0
2. Score = 1 (max 78); risk_band low


## Also searched as

- Caprini score
- Caprini RAM
- Caprini VTE risk
- thrombosis risk assessment
- Caprini 2005
- venous thromboembolism risk
- Caprini risk factor score

## Parameters

- `age` (integer, required): Age in years (18-120). Caprini 2005 exclusive bands: 41-60 scores 1; 61-74 scores 2; 75 or older scores 3. Age 40 or younger scores 0 for age.
- `surgery` (string, required): Mutually exclusive Caprini 2005 Table 3 surgery category as assigned by the caller. none scores 0. minor (minor surgery planned) scores 1. arthroscopic, major (major surgery >45 minutes), and laparoscopic (laparoscopic surgery >45 minutes) score 2. arthroplasty (elective major lower extremity arthroplasty) scores 5. One category only. History of prior major surgery is a separate 1-point flag.
- `prior_major_surgery` (boolean, required): History of prior major surgery (<1 month) as assigned by the caller (Caprini 2005 Table 3). Independent of the exclusive surgery category. true scores 1.
- `varicose_veins` (boolean, required): Varicose veins as assigned by the caller (Caprini 2005 Table 3). true scores 1. magent does not examine the patient.
- `inflammatory_bowel_disease` (boolean, required): History of inflammatory bowel disease as assigned by the caller (Caprini 2005 Table 3). true scores 1.
- `swollen_legs` (boolean, required): Swollen legs (current) as assigned by the caller (Caprini 2005 Table 3). true scores 1. magent does not examine the patient.
- `obesity` (boolean, required): Obesity as assigned by the caller (Caprini 2005 BMI >25). true scores 1. magent does not take height or weight.
- `acute_myocardial_infarction` (boolean, required): Acute myocardial infarction as assigned by the caller (Caprini 2005 Table 3). true scores 1.
- `congestive_heart_failure` (boolean, required): Congestive heart failure (<1 month) as assigned by the caller (Caprini 2005 Table 3). true scores 1.
- `sepsis` (boolean, required): Sepsis (<1 month) as assigned by the caller (Caprini 2005 Table 3). true scores 1.
- `serious_lung_disease` (boolean, required): Serious lung disease including pneumonia (<1 month) as assigned by the caller (Caprini 2005 Table 3). true scores 1.
- `abnormal_pulmonary_function` (boolean, required): Abnormal pulmonary function (COPD) as assigned by the caller (Caprini 2005 Table 3). true scores 1.
- `medical_bed_rest` (boolean, required): Medical patient currently at bed rest as assigned by the caller (Caprini 2005 Table 3). true scores 1. Independent of confined_to_bed_gt_72h.
- `other_risk_factor` (boolean, required): Other Caprini 2005 Table 3 1-point risk factor as assigned by the caller. true scores 1. magent does not invent a factor from prose.
- `oral_contraceptives_or_hrt` (boolean, required): Oral contraceptives or hormone replacement therapy as assigned by the caller (Caprini 2005 Table 3, listed for women). true scores 1.
- `pregnancy_or_postpartum` (boolean, required): Pregnancy or postpartum (<1 month) as assigned by the caller (Caprini 2005 Table 3, listed for women). true scores 1.
- `adverse_pregnancy_history` (boolean, required): History of unexplained stillborn infant, recurrent spontaneous abortion (>=3), premature birth with toxemia, or growth-restricted infant as assigned by the caller (Caprini 2005 Table 3, listed for women). true scores 1.
- `malignancy` (boolean, required): Malignancy (present or previous) as assigned by the caller (Caprini 2005 Table 3). true scores 2.
- `confined_to_bed_gt_72h` (boolean, required): Patient confined to bed (>72 hours) as assigned by the caller (Caprini 2005 Table 3). true scores 2. Independent of medical_bed_rest.
- `immobilizing_plaster_cast` (boolean, required): Immobilizing plaster cast (<1 month) as assigned by the caller (Caprini 2005 Table 3). true scores 2.
- `central_venous_access` (boolean, required): Central venous access as assigned by the caller (Caprini 2005 Table 3). true scores 2.
- `history_dvt_pe` (boolean, required): History of DVT or PE as assigned by the caller (Caprini 2005 Table 3). true scores 3. magent does not diagnose VTE.
- `family_history_thrombosis` (boolean, required): Family history of thrombosis as assigned by the caller (Caprini 2005 Table 3). true scores 3.
- `factor_v_leiden` (boolean, required): Positive Factor V Leiden as assigned by the caller (Caprini 2005 Table 3). true scores 3.
- `prothrombin_20210a` (boolean, required): Positive Prothrombin 20210A as assigned by the caller (Caprini 2005 Table 3). true scores 3.
- `elevated_homocysteine` (boolean, required): Elevated serum homocysteine as assigned by the caller (Caprini 2005 Table 3). true scores 3.
- `lupus_anticoagulant` (boolean, required): Positive lupus anticoagulant as assigned by the caller (Caprini 2005 Table 3). true scores 3.
- `anticardiolipin_antibodies` (boolean, required): Elevated anticardiolipin antibodies as assigned by the caller (Caprini 2005 Table 3). true scores 3.
- `heparin_induced_thrombocytopenia` (boolean, required): Heparin-induced thrombocytopenia (HIT) as assigned by the caller (Caprini 2005 Table 3). true scores 3. magent does not diagnose HIT.
- `other_thrombophilia` (boolean, required): Other congenital or acquired thrombophilia as assigned by the caller (Caprini 2005 Table 3). true scores 3.
- `hip_pelvis_leg_fracture` (boolean, required): Hip, pelvis, or leg fracture (<1 month) as assigned by the caller (Caprini 2005 Table 3). true scores 5. Independent of exclusive surgery.
- `stroke` (boolean, required): Stroke (<1 month) as assigned by the caller (Caprini 2005 Table 3). true scores 5.
- `multiple_trauma` (boolean, required): Multiple trauma (<1 month) as assigned by the caller (Caprini 2005 Table 3). true scores 5.
- `spinal_cord_injury` (boolean, required): Acute spinal cord injury (paralysis) (<1 month) as assigned by the caller (Caprini 2005 Table 3). true scores 5.

## Bulk (POST)

POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement.

Method: `POST /api/calc/caprini`
Max items: 25
Price: unit_amount + extra_item_amount * (n - 1) (unit 5000 atomic, extra 2000 atomic)
Status: PREVIEW

- 1 to 25 items. Each item uses the same keys as the GET query parameters.
- POST of 1 item costs the same as GET. Lists longer than 25: chunk into multiple POSTs. Extra items still execute; do not pad dummy rows.
- 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": [
    {
      "history_dvt_pe": "false",
      "family_history_thrombosis": "false",
      "stroke": "false",
      "multiple_trauma": "false",
      "sepsis": "false",
      "other_thrombophilia": "false",
      "prothrombin_20210a": "false",
      "factor_v_leiden": "false",
      "central_venous_access": "false",
      "immobilizing_plaster_cast": "false",
      "lupus_anticoagulant": "false",
      "hip_pelvis_leg_fracture": "false",
      "medical_bed_rest": "false",
      "acute_myocardial_infarction": "false",
      "anticardiolipin_antibodies": "false",
      "prior_major_surgery": "false",
      "oral_contraceptives_or_hrt": "false",
      "congestive_heart_failure": "false",
      "pregnancy_or_postpartum": "false",
      "serious_lung_disease": "false",
      "spinal_cord_injury": "false",
      "malignancy": "false",
      "confined_to_bed_gt_72h": "false",
      "inflammatory_bowel_disease": "false",
      "varicose_veins": "false",
      "other_risk_factor": "false",
      "swollen_legs": "false",
      "heparin_induced_thrombocytopenia": "false",
      "elevated_homocysteine": "false",
      "abnormal_pulmonary_function": "false",
      "obesity": "false",
      "adverse_pregnancy_history": "false",
      "age": "50",
      "surgery": "none"
    },
    {
      "history_dvt_pe": "false",
      "family_history_thrombosis": "false",
      "stroke": "false",
      "multiple_trauma": "false",
      "sepsis": "false",
      "other_thrombophilia": "false",
      "prothrombin_20210a": "false",
      "factor_v_leiden": "false",
      "central_venous_access": "false",
      "immobilizing_plaster_cast": "false",
      "lupus_anticoagulant": "false",
      "hip_pelvis_leg_fracture": "false",
      "medical_bed_rest": "false",
      "acute_myocardial_infarction": "false",
      "anticardiolipin_antibodies": "false",
      "prior_major_surgery": "false",
      "oral_contraceptives_or_hrt": "false",
      "congestive_heart_failure": "false",
      "pregnancy_or_postpartum": "false",
      "serious_lung_disease": "false",
      "spinal_cord_injury": "false",
      "malignancy": "false",
      "confined_to_bed_gt_72h": "false",
      "inflammatory_bowel_disease": "false",
      "varicose_veins": "false",
      "other_risk_factor": "false",
      "swollen_legs": "false",
      "heparin_induced_thrombocytopenia": "false",
      "elevated_homocysteine": "false",
      "abnormal_pulmonary_function": "false",
      "obesity": "false",
      "adverse_pregnancy_history": "false",
      "age": "50",
      "surgery": "none"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/caprini",
  "items": [
    {
      "components": [
        {
          "value": 50,
          "factor": "age",
          "points": 1,
          "present": true
        },
        {
          "value": "none",
          "factor": "surgery",
          "points": 0,
          "present": false
        },
        {
          "factor": "prior_major_surgery",
          "points": 0,
          "present": false
        },
        {
          "factor": "varicose_veins",
          "points": 0,
          "present": false
        },
        {
          "factor": "inflammatory_bowel_disease",
          "points": 0,
          "present": false
        },
        {
          "factor": "swollen_legs",
          "points": 0,
          "present": false
        },
        {
          "factor": "obesity",
          "points": 0,
          "present": false
        },
        {
          "factor": "acute_myocardial_infarction",
          "points": 0,
          "present": false
        },
        {
          "factor": "congestive_heart_failure",
          "points": 0,
          "present": false
        },
        {
          "factor": "sepsis",
          "points": 0,
          "present": false
        },
        {
          "factor": "serious_lung_disease",
          "points": 0,
          "present": false
        },
        {
          "factor": "abnormal_pulmonary_function",
          "points": 0,
          "present": false
        },
        {
          "factor": "medical_bed_rest",
          "points": 0,
          "present": false
        },
        {
          "factor": "other_risk_factor",
          "points": 0,
          "present": false
        },
        {
          "factor": "oral_contraceptives_or_hrt",
          "points": 0,
          "present": false
        },
        {
          "factor": "pregnancy_or_postpartum",
          "points": 0,
          "present": false
        },
        {
          "factor": "adverse_pregnancy_history",
          "points": 0,
          "present": false
        },
        {
          "factor": "malignancy",
          "points": 0,
          "present": false
        },
        {
          "factor": "confined_to_bed_gt_72h",
          "points": 0,
          "present": false
        },
        {
          "factor": "immobilizing_plaster_cast",
          "points": 0,
          "present": false
        },
        {
          "factor": "central_venous_access",
          "points": 0,
          "present": false
        },
        {
          "factor": "history_dvt_pe",
          "points": 0,
          "present": false
        },
        {
          "factor": "family_history_thrombosis",
          "points": 0,
          "present": false
        },
        {
          "factor": "factor_v_leiden",
          "points": 0,
          "present": false
        },
        {
          "factor": "prothrombin_20210a",
          "points": 0,
          "present": false
        },
        {
          "factor": "elevated_homocysteine",
          "points": 0,
          "present": false
        },
        {
          "factor": "lupus_anticoagulant",
          "points": 0,
          "present": false
        },
        {
          "factor": "anticardiolipin_antibodies",
          "points": 0,
          "present": false
        },
        {
          "factor": "heparin_induced_thrombocytopenia",
          "points": 0,
          "present": false
        },
        {
          "factor": "other_thrombophilia",
          "points": 0,
          "present": false
        },
        {
          "factor": "hip_pelvis_leg_fracture",
          "points": 0,
          "present": false
        },
        {
          "factor": "stroke",
          "points": 0,
          "present": false
        },
        {
          "factor": "multiple_trauma",
          "points": 0,
          "present": false
        },
        {
          "factor": "spinal_cord_injury",
          "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": "Caprini JA",
        "doi": "10.1016/j.disamonth.2005.02.003",
        "id": "caprini-2005",
        "pmid": "15900257",
        "source": "Dis Mon. 2005;51(2-3):70-78",
        "title": "Thrombosis risk assessment as a guide to quality patient care"
      },
      "formula": "caprini",
      "formula_expression": "Caprini 2005 = exclusive age (<=40: 0, 41-60: 1, 61-74: 2, >=75: 3) + exclusive surgery (none 0, minor 1, arthroscopic 2, major >45 min 2, laparoscopic >45 min 2, elective arthroplasty 5) + Table 3 flags (1, 2, 3, or 5); max 78; 0-1 low, 2 moderate, 3-4 high, >=5 highest",
      "age_years": 50,
      "max_score": 78,
      "score": 1,
      "risk_band": "low",
      "surgery": "none"
    },
    {
      "components": [
        {
          "value": 50,
          "factor": "age",
          "points": 1,
          "present": true
        },
        {
          "value": "none",
          "factor": "surgery",
          "points": 0,
          "present": false
        },
        {
          "factor": "prior_major_surgery",
          "points": 0,
          "present": false
        },
        {
          "factor": "varicose_veins",
          "points": 0,
          "present": false
        },
        {
          "factor": "inflammatory_bowel_disease",
          "points": 0,
          "present": false
        },
        {
          "factor": "swollen_legs",
          "points": 0,
          "present": false
        },
        {
          "factor": "obesity",
          "points": 0,
          "present": false
        },
        {
          "factor": "acute_myocardial_infarction",
          "points": 0,
          "present": false
        },
        {
          "factor": "congestive_heart_failure",
          "points": 0,
          "present": false
        },
        {
          "factor": "sepsis",
          "points": 0,
          "present": false
        },
        {
          "factor": "serious_lung_disease",
          "points": 0,
          "present": false
        },
        {
          "factor": "abnormal_pulmonary_function",
          "points": 0,
          "present": false
        },
        {
          "factor": "medical_bed_rest",
          "points": 0,
          "present": false
        },
        {
          "factor": "other_risk_factor",
          "points": 0,
          "present": false
        },
        {
          "factor": "oral_contraceptives_or_hrt",
          "points": 0,
          "present": false
        },
        {
          "factor": "pregnancy_or_postpartum",
          "points": 0,
          "present": false
        },
        {
          "factor": "adverse_pregnancy_history",
          "points": 0,
          "present": false
        },
        {
          "factor": "malignancy",
          "points": 0,
          "present": false
        },
        {
          "factor": "confined_to_bed_gt_72h",
          "points": 0,
          "present": false
        },
        {
          "factor": "immobilizing_plaster_cast",
          "points": 0,
          "present": false
        },
        {
          "factor": "central_venous_access",
          "points": 0,
          "present": false
        },
        {
          "factor": "history_dvt_pe",
          "points": 0,
          "present": false
        },
        {
          "factor": "family_history_thrombosis",
          "points": 0,
          "present": false
        },
        {
          "factor": "factor_v_leiden",
          "points": 0,
          "present": false
        },
        {
          "factor": "prothrombin_20210a",
          "points": 0,
          "present": false
        },
        {
          "factor": "elevated_homocysteine",
          "points": 0,
          "present": false
        },
        {
          "factor": "lupus_anticoagulant",
          "points": 0,
          "present": false
        },
        {
          "factor": "anticardiolipin_antibodies",
          "points": 0,
          "present": false
        },
        {
          "factor": "heparin_induced_thrombocytopenia",
          "points": 0,
          "present": false
        },
        {
          "factor": "other_thrombophilia",
          "points": 0,
          "present": false
        },
        {
          "factor": "hip_pelvis_leg_fracture",
          "points": 0,
          "present": false
        },
        {
          "factor": "stroke",
          "points": 0,
          "present": false
        },
        {
          "factor": "multiple_trauma",
          "points": 0,
          "present": false
        },
        {
          "factor": "spinal_cord_injury",
          "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": "Caprini JA",
        "doi": "10.1016/j.disamonth.2005.02.003",
        "id": "caprini-2005",
        "pmid": "15900257",
        "source": "Dis Mon. 2005;51(2-3):70-78",
        "title": "Thrombosis risk assessment as a guide to quality patient care"
      },
      "formula": "caprini",
      "formula_expression": "Caprini 2005 = exclusive age (<=40: 0, 41-60: 1, 61-74: 2, >=75: 3) + exclusive surgery (none 0, minor 1, arthroscopic 2, major >45 min 2, laparoscopic >45 min 2, elective arthroplasty 5) + Table 3 flags (1, 2, 3, or 5); max 78; 0-1 low, 2 moderate, 3-4 high, >=5 highest",
      "age_years": 50,
      "max_score": 78,
      "score": 1,
      "risk_band": "low",
      "surgery": "none"
    }
  ]
}
```

## Response fields

- `formula` (string): caprini
- `formula_expression` (string): Exact expression used
- `score` (integer): Caprini 2005 Table 3 points 0-78
- `max_score` (integer): 78 (exclusive age and surgery)
- `risk_band` (string): Caprini 2005 Table 2 band: low (0-1), moderate (2), high (3-4), or highest (>=5). A band, not a diagnosis or prophylaxis order.
- `age_years` (integer): Age used for the exclusive age band
- `surgery` (string): Exclusive surgery category used (none, minor, arthroscopic, major, laparoscopic, or arthroplasty)
- `components` (array): Per-factor points
- `citation` (object): Caprini Dis Mon 2005 citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": 50,
      "factor": "age",
      "points": 1,
      "present": true
    },
    {
      "value": "none",
      "factor": "surgery",
      "points": 0,
      "present": false
    },
    {
      "factor": "prior_major_surgery",
      "points": 0,
      "present": false
    },
    {
      "factor": "varicose_veins",
      "points": 0,
      "present": false
    },
    {
      "factor": "inflammatory_bowel_disease",
      "points": 0,
      "present": false
    },
    {
      "factor": "swollen_legs",
      "points": 0,
      "present": false
    },
    {
      "factor": "obesity",
      "points": 0,
      "present": false
    },
    {
      "factor": "acute_myocardial_infarction",
      "points": 0,
      "present": false
    },
    {
      "factor": "congestive_heart_failure",
      "points": 0,
      "present": false
    },
    {
      "factor": "sepsis",
      "points": 0,
      "present": false
    },
    {
      "factor": "serious_lung_disease",
      "points": 0,
      "present": false
    },
    {
      "factor": "abnormal_pulmonary_function",
      "points": 0,
      "present": false
    },
    {
      "factor": "medical_bed_rest",
      "points": 0,
      "present": false
    },
    {
      "factor": "other_risk_factor",
      "points": 0,
      "present": false
    },
    {
      "factor": "oral_contraceptives_or_hrt",
      "points": 0,
      "present": false
    },
    {
      "factor": "pregnancy_or_postpartum",
      "points": 0,
      "present": false
    },
    {
      "factor": "adverse_pregnancy_history",
      "points": 0,
      "present": false
    },
    {
      "factor": "malignancy",
      "points": 0,
      "present": false
    },
    {
      "factor": "confined_to_bed_gt_72h",
      "points": 0,
      "present": false
    },
    {
      "factor": "immobilizing_plaster_cast",
      "points": 0,
      "present": false
    },
    {
      "factor": "central_venous_access",
      "points": 0,
      "present": false
    },
    {
      "factor": "history_dvt_pe",
      "points": 0,
      "present": false
    },
    {
      "factor": "family_history_thrombosis",
      "points": 0,
      "present": false
    },
    {
      "factor": "factor_v_leiden",
      "points": 0,
      "present": false
    },
    {
      "factor": "prothrombin_20210a",
      "points": 0,
      "present": false
    },
    {
      "factor": "elevated_homocysteine",
      "points": 0,
      "present": false
    },
    {
      "factor": "lupus_anticoagulant",
      "points": 0,
      "present": false
    },
    {
      "factor": "anticardiolipin_antibodies",
      "points": 0,
      "present": false
    },
    {
      "factor": "heparin_induced_thrombocytopenia",
      "points": 0,
      "present": false
    },
    {
      "factor": "other_thrombophilia",
      "points": 0,
      "present": false
    },
    {
      "factor": "hip_pelvis_leg_fracture",
      "points": 0,
      "present": false
    },
    {
      "factor": "stroke",
      "points": 0,
      "present": false
    },
    {
      "factor": "multiple_trauma",
      "points": 0,
      "present": false
    },
    {
      "factor": "spinal_cord_injury",
      "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": "Caprini JA",
    "doi": "10.1016/j.disamonth.2005.02.003",
    "id": "caprini-2005",
    "pmid": "15900257",
    "source": "Dis Mon. 2005;51(2-3):70-78",
    "title": "Thrombosis risk assessment as a guide to quality patient care"
  },
  "formula": "caprini",
  "formula_expression": "Caprini 2005 = exclusive age (<=40: 0, 41-60: 1, 61-74: 2, >=75: 3) + exclusive surgery (none 0, minor 1, arthroscopic 2, major >45 min 2, laparoscopic >45 min 2, elective arthroplasty 5) + Table 3 flags (1, 2, 3, or 5); max 78; 0-1 low, 2 moderate, 3-4 high, >=5 highest",
  "age_years": 50,
  "max_score": 78,
  "score": 1,
  "risk_band": "low",
  "surgery": "none"
}
```

## 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_caprini`: each Caprini 2005 VTE item must be a published weight for that factor. 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

- [Padua score](https://magentlab.com/docs/padua) — Compute the Barbar 2010 Padua Prediction Score for VTE risk in hospitalized medical patients from age and ten caller-assigned findings.

## Payment

Unpaid requests return HTTP 402 even if query parameters or POST items are missing or invalid, so CDP and agents can index the path. After a PAYMENT-SIGNATURE, 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 accepts[0] (exact, EIP-3009) with validBefore = now + maxTimeoutSeconds (600 seconds), or accepts[1] (batch-settlement deposit/voucher) on product GET. Ping and POST {items} stay exact. Magent retries transient facilitator 429/5xx before answering.
- Retry the same URL with PAYMENT-SIGNATURE (base64 JSON of accepted and payload). Magent attaches canonical extensions.bazaar on CDP verify/settle; echoing 402 bazaar is optional.
- Success is HTTP 200 JSON plus PAYMENT-RESPONSE. exact settles before the tool. batch-settlement verifies (and deposit-settles) before the tool and commits the charge after HTTP 2xx. HTTP 503: retry the same PAYMENT-SIGNATURE. Mint a new exact 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.
- offered `batch-settlement` on eip155:8453: Payment-channel vouchers claimed later in batches. Exact stays accepts[0]. Same-path POST {items} is still exact. extra.assetTransferMethod=eip3009 extra.paymentFlow=authorization.

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

Same-path POST {items} is still scheme exact: one EIP-3009 authorization for GET unit plus $0.002 per extra item. 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

- HTTP 402 is unpaid, including a missing query. After PAYMENT-SIGNATURE, invalid parameters return HTTP 400 before settlement. You are not charged. HTTP 402 never includes the tool JSON.
- exact: settlement finishes before the tool (paymentFlow upfront). batch-settlement: verify/deposit before the tool; chargedCumulativeAmount commits after HTTP 2xx. 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.
