MAGENT

Infection / VTE · LIVE

TRiP(cast) VTE score

TRiP(cast)

Sum Nemeth 2020 Table 1 TRiP(cast) points from caller-assigned trauma and immobilization categories, age, sex, BMI, and nine clinical flags, and return high vs low risk at cutoff 7.

LIVE $0.005 USDC GET /api/calc/trip_cast

Markdown: /docs/trip-cast.md · Canonical: https://magentlab.com/docs/trip-cast

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

What it computes

Sum Nemeth 2020 Table 1 TRiP(cast) points from caller-assigned trauma and immobilization categories, age, sex, BMI, and nine clinical flags, and return high vs low risk at cutoff 7.

When to use

When an agent needs the published TRiP(cast) point total after lower-limb trauma immobilization (Nemeth 2020) and must not invent a thromboprophylaxis order or classify the trauma radiograph.

When not to use

  • Not a medical device and not a diagnosis of VTE.
  • Not a thromboprophylaxis order. This tool does not recommend a drug or start anticoagulation.
  • magent does not classify the trauma radiograph; the caller assigns Nemeth 2020 Table 1 trauma and immobilization categories.
  • High vs low uses cutoff 7 as in POT-CAST (Nemeth 2020). Not Caprini, Padua, or IMPROVE VTE.
  • BMI is caller-supplied kg/m^2; magent does not compute BMI from height and weight.

Formula

TRiP(cast) = trauma (high 3, intermediate 2, low 1) + immobilization (upper_leg 3, lower_leg 2, foot_cast 1, other_plantar 0) + age (<35: 0, 35-54: 1, 55-74: 2, >=75: 3) + male (1) + BMI (>=35: 2, >=25 and <35: 1, <25: 0) + family_history_vte (2) + personal_history_vte_or_major_thrombophilia (4) + hormonal_estrogenic_treatment (4) + cancer_within_5y (3) + pregnancy_or_puerperium (3) + other_immobilization_3mo (2) + surgery_within_3mo (2) + comorbidity (1) + chronic_venous_insufficiency (1); Nemeth 2020 Table 1; max 34; high_risk iff score >= 7

Citation

Title
Clinical risk assessment model to predict venous thromboembolism risk after immobilization for lower-limb trauma
Authors
Nemeth B, Douillet D, le Cessie S, Penaloza A, Moumneh T, Roy PM, Cannegieter S
Source
EClinicalMedicine. 2020;20:100270
DOI
10.1016/j.eclinm.2020.100270

Worked example

Paper example: age 50 male BMI 30, intermediate trauma, lower-leg cast

Given: age=50bmi_kg_m2=30cancer_within_5y=falsechronic_venous_insufficiency=falsecomorbidity=falsefamily_history_vte=falsehormonal_estrogenic_treatment=falseimmobilization=lower_legother_immobilization_3mo=falsepersonal_history_vte_or_major_thrombophilia=falsepregnancy_or_puerperium=falsesex=malesurgery_within_3mo=falsetrauma=intermediate

  1. Age 50 is ≥35 and <55 → 1; male → 1; BMI 30 is ≥25 and <35 → 1
  2. Intermediate trauma → 2; lower-leg cast → 2; all flags false → 0
  3. Score = 7 (max 34); high_risk true (cutoff 7)

Same inputs except female is score 6 low_risk

Given: age=50bmi_kg_m2=30cancer_within_5y=falsechronic_venous_insufficiency=falsecomorbidity=falsefamily_history_vte=falsehormonal_estrogenic_treatment=falseimmobilization=lower_legother_immobilization_3mo=falsepersonal_history_vte_or_major_thrombophilia=falsepregnancy_or_puerperium=falsesex=femalesurgery_within_3mo=falsetrauma=intermediate

  1. Age 50 → 1; female → 0; BMI 30 → 1; intermediate → 2; lower-leg → 2
  2. Score = 6 (max 34); high_risk false; risk_band low_risk

Also searched as

  • TRiP(cast)
  • TRiP cast score
  • Nemeth 2020 VTE
  • thrombosis risk prediction cast
  • lower-limb trauma VTE
  • cast immobilization VTE
  • TRiP(cast) score

Try

Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.

/api/calc/trip_cast?trauma=intermediate&immobilization=lower_leg&age=50&sex=male&bmi_kg_m2=30&family_history_vte=false&personal_history_vte_or_major_thrombophilia=false&hormonal_estrogenic_treatment=false&cancer_within_5y=false&pregnancy_or_puerperium=false&other_immobilization_3mo=false&surgery_within_3mo=false&comorbidity=false&chronic_venous_insufficiency=false

Full URL: https://api.magentlab.com/api/calc/trip_cast?trauma=intermediate&immobilization=lower_leg&age=50&sex=male&bmi_kg_m2=30&family_history_vte=false&personal_history_vte_or_major_thrombophilia=false&hormonal_estrogenic_treatment=false&cancer_within_5y=false&pregnancy_or_puerperium=false&other_immobilization_3mo=false&surgery_within_3mo=false&comorbidity=false&chronic_venous_insufficiency=false

Call

Expect HTTP 402 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/trip_cast?trauma=intermediate&immobilization=lower_leg&age=50&sex=male&bmi_kg_m2=30&family_history_vte=false&personal_history_vte_or_major_thrombophilia=false&hormonal_estrogenic_treatment=false&cancer_within_5y=false&pregnancy_or_puerperium=false&other_immobilization_3mo=false&surgery_within_3mo=false&comorbidity=false&chronic_venous_insufficiency=false"

Parameters

Name Type Required Description
trauma string required · high, intermediate, low Mutually exclusive Nemeth 2020 Table 1 trauma category as assigned by the caller (choose the most severe). high scores 3 (paper examples: fibula/tibia shaft, tibial plateau, Achilles rupture). intermediate scores 2 (bi/tri-malleolar ankle, patellar fracture, ankle dislocation/Lisfranc, severe knee sprain with edema/haemarthrosis, grade 3 ankle sprain). low scores 1 (single malleolar, patellar dislocation, (meta)tarsal/forefoot fracture, grade 1-2 sprain, significant muscle injury). magent does not classify the trauma radiograph.
immobilization string required · upper_leg, lower_leg, foot_cast, other_plantar Mutually exclusive Nemeth 2020 Table 1 immobilization category as assigned by the caller. upper_leg scores 3. lower_leg scores 2. foot_cast scores 1 (foot cast ankle-free or any semi-rigid without plantar support). other_plantar scores 0 (other cast or bracing with plantar support).
age integer required Age in years (integer 1-120). Nemeth 2020: <35 scores 0; ≥35 and <55 scores 1; ≥55 and <75 scores 2; ≥75 scores 3. Age 35 scores 1; 55 scores 2; 75 scores 3.
sex string required · female, male female or male. Male scores 1; female scores 0 (Nemeth 2020 Table 1).
bmi_kg_m2 number required Body-mass index in kg/m^2 (10-80). Caller-supplied; magent does not compute BMI from height and weight. Nemeth 2020: <25 scores 0; ≥25 and <35 scores 1; ≥35 scores 2. 25.0 scores 1; 35.0 scores 2.
family_history_vte boolean required First-degree family history of VTE as assigned by the caller (Nemeth 2020 Table 1). true scores 2. magent does not take a family history.
personal_history_vte_or_major_thrombophilia boolean required Personal history of VTE or major thrombophilia as assigned by the caller (Nemeth 2020 Table 1). true scores 4. magent does not diagnose VTE or interpret a thrombophilia panel.
hormonal_estrogenic_treatment boolean required Current oral contraceptives or estrogenic hormone therapy as assigned by the caller (Nemeth 2020 Table 1). true scores 4.
cancer_within_5y boolean required Cancer within 5 years as assigned by the caller (Nemeth 2020 Table 1). true scores 3. magent does not diagnose cancer.
pregnancy_or_puerperium boolean required Pregnancy or puerperium as assigned by the caller (Nemeth 2020 Table 1). true scores 3. magent does not confirm pregnancy.
other_immobilization_3mo boolean required Hospital admission, bedridden, flight >6 h, or lower-limb paralysis other than the cast, within 3 months, as assigned by the caller (Nemeth 2020 Table 1). true scores 2. Independent of the exclusive immobilization category.
surgery_within_3mo boolean required Surgery within 3 months as assigned by the caller (Nemeth 2020 Table 1). true scores 2. magent does not classify an operation.
comorbidity boolean required Heart failure, rheumatoid arthritis, CKD, COPD, or IBD as one caller-assigned flag (Nemeth 2020 Table 1). true scores 1. magent does not examine the patient.
chronic_venous_insufficiency boolean required Chronic venous insufficiency (varicose veins) as assigned by the caller (Nemeth 2020 Table 1). true scores 1. magent does not examine the patient.

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.

POST /api/calc/trip_cast Max 25 unit_amount + extra_item_amount * (n - 1) extra $0.002 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 (fixture)

{
  "items": [
    {
      "age": "50",
      "bmi_kg_m2": "30",
      "cancer_within_5y": "false",
      "chronic_venous_insufficiency": "false",
      "comorbidity": "false",
      "family_history_vte": "false",
      "hormonal_estrogenic_treatment": "false",
      "immobilization": "lower_leg",
      "other_immobilization_3mo": "false",
      "personal_history_vte_or_major_thrombophilia": "false",
      "pregnancy_or_puerperium": "false",
      "sex": "male",
      "surgery_within_3mo": "false",
      "trauma": "intermediate"
    },
    {
      "age": "50",
      "bmi_kg_m2": "30",
      "cancer_within_5y": "false",
      "chronic_venous_insufficiency": "false",
      "comorbidity": "false",
      "family_history_vte": "false",
      "hormonal_estrogenic_treatment": "false",
      "immobilization": "lower_leg",
      "other_immobilization_3mo": "false",
      "personal_history_vte_or_major_thrombophilia": "false",
      "pregnancy_or_puerperium": "false",
      "sex": "male",
      "surgery_within_3mo": "false",
      "trauma": "intermediate"
    }
  ]
}

Open bulk paywall →

Opens a two-item fixture on the API host. Unpaid browsers get the same MetaMask paywall as GET; Pay retries POST with those items.

Example 200 (fixture)

{
  "count": 2,
  "path": "/api/calc/trip_cast",
  "items": [
    {
      "components": [
        {
          "value": "intermediate",
          "factor": "trauma",
          "points": 2,
          "present": true
        },
        {
          "value": "lower_leg",
          "factor": "immobilization",
          "points": 2,
          "present": true
        },
        {
          "value": 50,
          "factor": "age",
          "points": 1,
          "present": true
        },
        {
          "value": "male",
          "factor": "male",
          "points": 1,
          "present": true
        },
        {
          "value": 30.0,
          "factor": "bmi",
          "points": 1,
          "present": true
        },
        {
          "factor": "family_history_vte",
          "points": 0,
          "present": false
        },
        {
          "factor": "personal_history_vte_or_major_thrombophilia",
          "points": 0,
          "present": false
        },
        {
          "factor": "hormonal_estrogenic_treatment",
          "points": 0,
          "present": false
        },
        {
          "factor": "cancer_within_5y",
          "points": 0,
          "present": false
        },
        {
          "factor": "pregnancy_or_puerperium",
          "points": 0,
          "present": false
        },
        {
          "factor": "other_immobilization_3mo",
          "points": 0,
          "present": false
        },
        {
          "factor": "surgery_within_3mo",
          "points": 0,
          "present": false
        },
        {
          "factor": "comorbidity",
          "points": 0,
          "present": false
        },
        {
          "factor": "chronic_venous_insufficiency",
          "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": "Nemeth B, Douillet D, le Cessie S, Penaloza A, Moumneh T, Roy PM, Cannegieter S",
        "doi": "10.1016/j.eclinm.2020.100270",
        "id": "nemeth-2020",
        "pmid": "32300734",
        "source": "EClinicalMedicine. 2020;20:100270",
        "title": "Clinical risk assessment model to predict venous thromboembolism risk after immobilization for lower-limb trauma"
      },
      "formula": "trip_cast",
      "formula_expression": "TRiP(cast) = trauma (high 3, intermediate 2, low 1) + immobilization (upper_leg 3, lower_leg 2, foot_cast 1, other_plantar 0) + age (<35: 0, 35-54: 1, 55-74: 2, >=75: 3) + male (1) + BMI (>=35: 2, >=25 and <35: 1, <25: 0) + family_history_vte (2) + personal_history_vte_or_major_thrombophilia (4) + hormonal_estrogenic_treatment (4) + cancer_within_5y (3) + pregnancy_or_puerperium (3) + other_immobilization_3mo (2) + surgery_within_3mo (2) + comorbidity (1) + chronic_venous_insufficiency (1); Nemeth 2020 Table 1; max 34; high_risk iff score >= 7",
      "max_score": 34,
      "score": 7,
      "age_years": 50,
      "risk_band": "high_risk",
      "sex": "male",
      "bmi_kg_m2": 30.0,
      "high_risk": true,
      "immobilization": "lower_leg",
      "trauma": "intermediate"
    },
    {
      "components": [
        {
          "value": "intermediate",
          "factor": "trauma",
          "points": 2,
          "present": true
        },
        {
          "value": "lower_leg",
          "factor": "immobilization",
          "points": 2,
          "present": true
        },
        {
          "value": 50,
          "factor": "age",
          "points": 1,
          "present": true
        },
        {
          "value": "male",
          "factor": "male",
          "points": 1,
          "present": true
        },
        {
          "value": 30.0,
          "factor": "bmi",
          "points": 1,
          "present": true
        },
        {
          "factor": "family_history_vte",
          "points": 0,
          "present": false
        },
        {
          "factor": "personal_history_vte_or_major_thrombophilia",
          "points": 0,
          "present": false
        },
        {
          "factor": "hormonal_estrogenic_treatment",
          "points": 0,
          "present": false
        },
        {
          "factor": "cancer_within_5y",
          "points": 0,
          "present": false
        },
        {
          "factor": "pregnancy_or_puerperium",
          "points": 0,
          "present": false
        },
        {
          "factor": "other_immobilization_3mo",
          "points": 0,
          "present": false
        },
        {
          "factor": "surgery_within_3mo",
          "points": 0,
          "present": false
        },
        {
          "factor": "comorbidity",
          "points": 0,
          "present": false
        },
        {
          "factor": "chronic_venous_insufficiency",
          "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": "Nemeth B, Douillet D, le Cessie S, Penaloza A, Moumneh T, Roy PM, Cannegieter S",
        "doi": "10.1016/j.eclinm.2020.100270",
        "id": "nemeth-2020",
        "pmid": "32300734",
        "source": "EClinicalMedicine. 2020;20:100270",
        "title": "Clinical risk assessment model to predict venous thromboembolism risk after immobilization for lower-limb trauma"
      },
      "formula": "trip_cast",
      "formula_expression": "TRiP(cast) = trauma (high 3, intermediate 2, low 1) + immobilization (upper_leg 3, lower_leg 2, foot_cast 1, other_plantar 0) + age (<35: 0, 35-54: 1, 55-74: 2, >=75: 3) + male (1) + BMI (>=35: 2, >=25 and <35: 1, <25: 0) + family_history_vte (2) + personal_history_vte_or_major_thrombophilia (4) + hormonal_estrogenic_treatment (4) + cancer_within_5y (3) + pregnancy_or_puerperium (3) + other_immobilization_3mo (2) + surgery_within_3mo (2) + comorbidity (1) + chronic_venous_insufficiency (1); Nemeth 2020 Table 1; max 34; high_risk iff score >= 7",
      "max_score": 34,
      "score": 7,
      "age_years": 50,
      "risk_band": "high_risk",
      "sex": "male",
      "bmi_kg_m2": 30.0,
      "high_risk": true,
      "immobilization": "lower_leg",
      "trauma": "intermediate"
    }
  ]
}

Response

Field Type Description
formula string trip_cast
formula_expression string Exact expression used
score integer TRiP(cast) points 0-34
max_score integer 34 (Nemeth 2020 Table 1 maximum)
high_risk boolean true iff score ≥7 (Nemeth 2020 / POT-CAST cutoff). Not a VTE diagnosis and not a thromboprophylaxis order.
risk_band string high_risk when score ≥7; low_risk when score <7 (Nemeth 2020 cutoff 7). A band, not a diagnosis or order.
age_years integer Age used for the exclusive age band
sex string female or male used for the sex points
bmi_kg_m2 number BMI in kg/m^2 used for the exclusive BMI band
trauma string Exclusive trauma category used (high, intermediate, or low)
immobilization string Exclusive immobilization category used (upper_leg, lower_leg, foot_cast, or other_plantar)
components array Per-factor points
citation object Nemeth 2020 eClinicalMedicine citation
disclaimer string Not-a-device notice

Example JSON

Machine form of the same example. Frozen fixture. Not a live lookup.

{
  "components": [
    {
      "value": "intermediate",
      "factor": "trauma",
      "points": 2,
      "present": true
    },
    {
      "value": "lower_leg",
      "factor": "immobilization",
      "points": 2,
      "present": true
    },
    {
      "value": 50,
      "factor": "age",
      "points": 1,
      "present": true
    },
    {
      "value": "male",
      "factor": "male",
      "points": 1,
      "present": true
    },
    {
      "value": 30.0,
      "factor": "bmi",
      "points": 1,
      "present": true
    },
    {
      "factor": "family_history_vte",
      "points": 0,
      "present": false
    },
    {
      "factor": "personal_history_vte_or_major_thrombophilia",
      "points": 0,
      "present": false
    },
    {
      "factor": "hormonal_estrogenic_treatment",
      "points": 0,
      "present": false
    },
    {
      "factor": "cancer_within_5y",
      "points": 0,
      "present": false
    },
    {
      "factor": "pregnancy_or_puerperium",
      "points": 0,
      "present": false
    },
    {
      "factor": "other_immobilization_3mo",
      "points": 0,
      "present": false
    },
    {
      "factor": "surgery_within_3mo",
      "points": 0,
      "present": false
    },
    {
      "factor": "comorbidity",
      "points": 0,
      "present": false
    },
    {
      "factor": "chronic_venous_insufficiency",
      "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": "Nemeth B, Douillet D, le Cessie S, Penaloza A, Moumneh T, Roy PM, Cannegieter S",
    "doi": "10.1016/j.eclinm.2020.100270",
    "id": "nemeth-2020",
    "pmid": "32300734",
    "source": "EClinicalMedicine. 2020;20:100270",
    "title": "Clinical risk assessment model to predict venous thromboembolism risk after immobilization for lower-limb trauma"
  },
  "formula": "trip_cast",
  "formula_expression": "TRiP(cast) = trauma (high 3, intermediate 2, low 1) + immobilization (upper_leg 3, lower_leg 2, foot_cast 1, other_plantar 0) + age (<35: 0, 35-54: 1, 55-74: 2, >=75: 3) + male (1) + BMI (>=35: 2, >=25 and <35: 1, <25: 0) + family_history_vte (2) + personal_history_vte_or_major_thrombophilia (4) + hormonal_estrogenic_treatment (4) + cancer_within_5y (3) + pregnancy_or_puerperium (3) + other_immobilization_3mo (2) + surgery_within_3mo (2) + comorbidity (1) + chronic_venous_insufficiency (1); Nemeth 2020 Table 1; max 34; high_risk iff score >= 7",
  "max_score": 34,
  "score": 7,
  "age_years": 50,
  "risk_band": "high_risk",
  "sex": "male",
  "bmi_kg_m2": 30.0,
  "high_risk": true,
  "immobilization": "lower_leg",
  "trauma": "intermediate"
}

Client errors (HTTP 400)

Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.

HTTP Code When
400 invalid_trip_trauma trauma must be high, intermediate, or low (Nemeth 2020 Table 1; caller assigns the highest trauma category). Returned before settlement; you are not charged.
400 invalid_trip_immobilization immobilization must be upper_leg, lower_leg, foot_cast, or other_plantar (Nemeth 2020 Table 1). Returned before settlement; you are not charged.
400 invalid_trip_age age must be an integer from 1 to 120 (Nemeth 2020 TRiP(cast); not the adult 18-120 clamp). Returned before settlement; you are not charged.
400 invalid_sex sex must be female or male Returned before settlement; you are not charged.
400 invalid_bmi_kg_m2 bmi_kg_m2 must be a number from 10 to 80. Returned before settlement; you are not charged.
400 invalid_flag boolean clinical flags must be true or false Returned before settlement; you are not charged.
400 invalid_items POST body must be a JSON object with only an items array Returned before settlement; you are not charged.
400 invalid_item_count items must be an array of 1 to 25 objects Returned before settlement; you are not charged.
400 invalid_item each items entry must be a JSON object Returned before settlement; you are not charged.

Related tools

  • Caprini score — Sum Caprini 2005 Table 3 thrombosis risk factors with exclusive age and surgery weights and return the Table 2 band (low / moderate / high / highest).
  • IMPROVE VTE — Compute the Spyropoulos 2011 7-factor associative IMPROVE VTE score during hospitalization from age and six caller-assigned flags.
  • Padua score — 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. Unpaid valid requests return HTTP 402 with a base64 PAYMENT-REQUIRED header. HTTP 503 is not a new quote: retry the same PAYMENT-SIGNATURE. Full handshake and shared payment errors: Payments. Stdio MCP: /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.