# Khorana score

Khorana score

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

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

## What it computes

Compute the Khorana 2008 Blood predictive model for chemotherapy-associated thrombosis from caller-assigned cancer site, pre-chemotherapy labs, ESA use, and BMI ≥35.

## When to use

When an agent needs the published Khorana 2008 score (not Padua, Caprini, or a VTE diagnosis) for a patient starting chemotherapy as in the paper.

## When not to use

- Not a diagnosis of VTE. magent does not diagnose venous thromboembolism.
- Not Padua or Caprini. This tool is the Khorana 2008 Blood predictive model only.
- magent does not assign cancer site from histology text. Caller must send very_high, high, or other.
- BMI ≥35 is a caller-applied flag; magent does not take height or weight.
- Hemoglobin <10 g/dL or ESA scores 1 once, not twice. Platelets 350 ×10^9/L scores. WBC 11.0 ×10^9/L does not score; >11 does. Score 0 is low, 1–2 intermediate, ≥3 high.

## Formula

```
Khorana = cancer_site (very_high 2, high 1, other 0) + (platelets>=350) + (hemoglobin<10 g/dL or ESA) + (wbc>11 x10^9/L) + (BMI>=35); max 6; 0 low, 1-2 intermediate, >=3 high
```

## Citation

[Development and validation of a predictive model for chemotherapy-associated thrombosis](https://doi.org/10.1182/blood-2007-10-116327)
Khorana AA, Kuderer NM, Culakova E, Lyman GH, Francis CW
Blood. 2008;111(10):4902-4907
DOI: [10.1182/blood-2007-10-116327](https://doi.org/10.1182/blood-2007-10-116327)

## Worked example

### Other site, labs not scoring

Given: `bmi_ge_35=false, cancer_site=other, erythropoiesis_stimulating_agent=false, hemoglobin_g_dl=12, platelets_10e9_l=200, wbc_k_ul=8`

1. cancer_site other → 0; platelets 200 < 350 → 0; hemoglobin 12 g/dL without ESA → 0; WBC 8 k/µL → 0; BMI flag false → 0
2. Score = 0 (max 6); khorana_risk low


### Very high site plus platelets 350 is high

Given: `bmi_ge_35=false, cancer_site=very_high, erythropoiesis_stimulating_agent=false, hemoglobin_g_dl=12, platelets_10e9_l=350, wbc_k_ul=8`

1. cancer_site very_high → 2; platelets 350 ≥ 350 → 1
2. Score = 3 (max 6); khorana_risk high


## Also searched as

- Khorana score
- Khorana risk score
- chemotherapy-associated thrombosis
- Khorana VTE score
- cancer thrombosis score
- Khorana 2008

## Parameters

- `cancer_site` (string, required): Caller-assigned Khorana site class. very_high (stomach or pancreas) scores 2; high (lung, lymphoma, gynecologic, bladder, or testicular) scores 1; other scores 0. magent does not assign cancer site from histology text.
- `platelets_10e9_l` (number, required): Pre-chemotherapy platelet count ×10^9/L (1-2000). ≥350 scores 1 (350 scores; 349 does not).
- `hemoglobin_g_dl` (number, optional): Hemoglobin in g/dL (3-22). Provide this or hemoglobin_g_l, not both. <10 scores 1 with ESA (once, not twice). 10.0 does not score unless ESA is true.
- `hemoglobin_g_l` (number, optional): Hemoglobin in g/L (30-220). Converted as hemoglobin_g_dl = hemoglobin_g_l / 10. Provide this or hemoglobin_g_dl, not both.
- `erythropoiesis_stimulating_agent` (boolean, required): Use of an erythropoiesis-stimulating agent as assigned by the caller. true or false. Scores 1 with hemoglobin <10 g/dL (once, not twice).
- `wbc_k_ul` (number, optional): WBC in 10^3/µL (same as 10^9/L). Provide wbc_k_ul or wbc_ul. Range 0.01-500. >11 scores 1 (11.0 does not).
- `wbc_ul` (number, optional): WBC in cells/µL (same as cells/mm^3). Provide wbc_k_ul or wbc_ul. Range 10-500000. >11000 scores 1 (11000 does not).
- `bmi_ge_35` (boolean, required): BMI ≥35 as assigned by the caller. true or false. magent does not take height or weight. 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/khorana`
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": [
    {
      "bmi_ge_35": "false",
      "cancer_site": "other",
      "erythropoiesis_stimulating_agent": "false",
      "hemoglobin_g_dl": "12",
      "platelets_10e9_l": "200",
      "wbc_k_ul": "8"
    },
    {
      "bmi_ge_35": "false",
      "cancer_site": "other",
      "erythropoiesis_stimulating_agent": "false",
      "hemoglobin_g_dl": "12",
      "platelets_10e9_l": "200",
      "wbc_k_ul": "8"
    }
  ]
}
```

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

Example 200:

```json
{
  "count": 2,
  "path": "/api/calc/khorana",
  "items": [
    {
      "components": [
        {
          "value": "other",
          "factor": "cancer_site",
          "points": 0,
          "present": false
        },
        {
          "value": 200.0,
          "factor": "platelets",
          "points": 0,
          "present": false
        },
        {
          "value": {
            "erythropoiesis_stimulating_agent": false,
            "hemoglobin_g_dl": 12.0
          },
          "factor": "hemoglobin_or_esa",
          "points": 0,
          "present": false
        },
        {
          "value": 8.0e3,
          "factor": "wbc",
          "points": 0,
          "present": false
        },
        {
          "factor": "bmi_ge_35",
          "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": "Khorana AA, Kuderer NM, Culakova E, Lyman GH, Francis CW",
        "doi": "10.1182/blood-2007-10-116327",
        "id": "khorana-2008",
        "source": "Blood. 2008;111(10):4902-4907",
        "title": "Development and validation of a predictive model for chemotherapy-associated thrombosis"
      },
      "formula": "khorana",
      "formula_expression": "Khorana = cancer_site (very_high 2, high 1, other 0) + (platelets>=350) + (hemoglobin<10 g/dL or ESA) + (wbc>11 x10^9/L) + (BMI>=35); max 6; 0 low, 1-2 intermediate, >=3 high",
      "max_score": 6,
      "score": 0,
      "platelets_10e9_l": 200.0,
      "wbc_ul": 8.0e3,
      "erythropoiesis_stimulating_agent": false,
      "hemoglobin_g_dl": 12.0,
      "bmi_ge_35": false,
      "cancer_site": "other",
      "khorana_risk": "low"
    },
    {
      "components": [
        {
          "value": "other",
          "factor": "cancer_site",
          "points": 0,
          "present": false
        },
        {
          "value": 200.0,
          "factor": "platelets",
          "points": 0,
          "present": false
        },
        {
          "value": {
            "erythropoiesis_stimulating_agent": false,
            "hemoglobin_g_dl": 12.0
          },
          "factor": "hemoglobin_or_esa",
          "points": 0,
          "present": false
        },
        {
          "value": 8.0e3,
          "factor": "wbc",
          "points": 0,
          "present": false
        },
        {
          "factor": "bmi_ge_35",
          "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": "Khorana AA, Kuderer NM, Culakova E, Lyman GH, Francis CW",
        "doi": "10.1182/blood-2007-10-116327",
        "id": "khorana-2008",
        "source": "Blood. 2008;111(10):4902-4907",
        "title": "Development and validation of a predictive model for chemotherapy-associated thrombosis"
      },
      "formula": "khorana",
      "formula_expression": "Khorana = cancer_site (very_high 2, high 1, other 0) + (platelets>=350) + (hemoglobin<10 g/dL or ESA) + (wbc>11 x10^9/L) + (BMI>=35); max 6; 0 low, 1-2 intermediate, >=3 high",
      "max_score": 6,
      "score": 0,
      "platelets_10e9_l": 200.0,
      "wbc_ul": 8.0e3,
      "erythropoiesis_stimulating_agent": false,
      "hemoglobin_g_dl": 12.0,
      "bmi_ge_35": false,
      "cancer_site": "other",
      "khorana_risk": "low"
    }
  ]
}
```

## Response fields

- `formula` (string): khorana
- `formula_expression` (string): Exact expression used
- `score` (integer): Total points 0-6
- `max_score` (integer): Always 6
- `khorana_risk` (string): low when score is 0; intermediate when 1-2; high when ≥3. Not a diagnosis.
- `cancer_site` (string): Caller-assigned site class used: very_high, high, or other
- `platelets_10e9_l` (number): Platelet count used (×10^9/L)
- `hemoglobin_g_dl` (number): Hemoglobin used in g/dL (g/L inputs converted as g/dL = g/L / 10)
- `erythropoiesis_stimulating_agent` (boolean): ESA flag used
- `wbc_ul` (number): WBC used in cells/µL (wbc_k_ul converted as ×1000)
- `bmi_ge_35` (boolean): Caller-assigned BMI ≥35 flag used
- `components` (array): Per-item points
- `citation` (object): Khorana 2008 Blood citation
- `disclaimer` (string): Not-a-device notice

## Example JSON

Frozen fixture. Not a live lookup.

```json
{
  "components": [
    {
      "value": "other",
      "factor": "cancer_site",
      "points": 0,
      "present": false
    },
    {
      "value": 200.0,
      "factor": "platelets",
      "points": 0,
      "present": false
    },
    {
      "value": {
        "erythropoiesis_stimulating_agent": false,
        "hemoglobin_g_dl": 12.0
      },
      "factor": "hemoglobin_or_esa",
      "points": 0,
      "present": false
    },
    {
      "value": 8.0e3,
      "factor": "wbc",
      "points": 0,
      "present": false
    },
    {
      "factor": "bmi_ge_35",
      "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": "Khorana AA, Kuderer NM, Culakova E, Lyman GH, Francis CW",
    "doi": "10.1182/blood-2007-10-116327",
    "id": "khorana-2008",
    "source": "Blood. 2008;111(10):4902-4907",
    "title": "Development and validation of a predictive model for chemotherapy-associated thrombosis"
  },
  "formula": "khorana",
  "formula_expression": "Khorana = cancer_site (very_high 2, high 1, other 0) + (platelets>=350) + (hemoglobin<10 g/dL or ESA) + (wbc>11 x10^9/L) + (BMI>=35); max 6; 0 low, 1-2 intermediate, >=3 high",
  "max_score": 6,
  "score": 0,
  "platelets_10e9_l": 200.0,
  "wbc_ul": 8.0e3,
  "erythropoiesis_stimulating_agent": false,
  "hemoglobin_g_dl": 12.0,
  "bmi_ge_35": false,
  "cancer_site": "other",
  "khorana_risk": "low"
}
```

## Errors

- HTTP 400 `invalid_cancer_site`: cancer_site must be very_high, high, or other. Returned before settlement; you are not charged.
- HTTP 400 `invalid_platelets`: platelets_10e9_l must be a number from 1 to 2000 Returned before settlement; you are not charged.
- HTTP 400 `invalid_hemoglobin`: hemoglobin_g_l (30-220) or hemoglobin_g_dl (3-22) is required, not both. Returned before settlement; you are not charged.
- HTTP 400 `invalid_wbc`: wbc_k_ul (0.01-500) or wbc_ul (10-500000) is required 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

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