MAGENT

Neurology · LIVE

DELTA-P LEMS tumor association

DELTA-P

Sum the six Titulaer 2011 DELTA-P items (bulbar weakness, erectile dysfunction in males, weight loss ≥5%, smoking at onset, age ≥50, Karnofsky <70) and return the score, SCLC band, and published SCLC percents for scores 0, 1, and 3-6.

LIVE $0.005 USDC GET /api/calc/delta_p

Markdown: /docs/delta-p.md · Canonical: https://magentlab.com/docs/delta-p

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

What it computes

Sum the six Titulaer 2011 DELTA-P items (bulbar weakness, erectile dysfunction in males, weight loss ≥5%, smoking at onset, age ≥50, Karnofsky <70) and return the score, SCLC band, and published SCLC percents for scores 0, 1, and 3-6.

When to use

When an agent has caller-assigned DELTA-P items at or within 3 months of LEMS onset and needs the published Titulaer 2011 total and SCLC band, without inventing a LEMS diagnosis, SOX1 result, or SCLC screen.

When not to use

  • Not a medical device. magent does not diagnose LEMS or small-cell lung cancer.
  • Not a LEMS diagnosis and not SOX1 antibody testing.
  • magent does not screen for SCLC and does not order CT, PET, or bronchoscopy.
  • Items are scored at or within 3 months of LEMS onset as assigned by the caller.
  • Female erectile_dysfunction is always 0 (Titulaer 2011 Female | 0), including if omitted or true. The flag is required only when sex is male.
  • Age 50 scores 1; 49 does not. kps_lt_70 is a caller flag for Karnofsky 0-60; magent does not compute Karnofsky.
  • Published SCLC percents are returned for scores 0, 1, 3, 4, 5, and 6 (0%, 2.6%, 83.9%, 93.5%, 96.6%, 100%). Score 2 (intermediate) has no published percent in the Titulaer 2011 main text; magent does not invent one.

Formula

DELTA-P = bulbar_weakness 1 + (male and erectile_dysfunction) 1 + weight_loss_ge_5pct 1 + smoking_at_onset 1 + (age>=50) 1 + kps_lt_70 1; each at or within 3 months of LEMS onset; female erectile always 0; max 6; bands 0-1 low / 2 intermediate / 3-6 high (Titulaer 2011); SCLC percents 0/2.6/omit/83.9/93.5/96.6/100 for scores 0-6

Citation

Title
Clinical Dutch-English Lambert-Eaton Myasthenic Syndrome (LEMS) Tumor Association Prediction Score Accurately Predicts Small-Cell Lung Cancer in the LEMS
Authors
Titulaer MJ, Maddison P, Sont JK, Wirtz PW, Hilton-Jones D, Klooster R, Willcox N, Potman M, Sillevis Smitt PAE, Kuks JBM, Roep BO, Vincent A, van der Maarel SM, van Dijk JG, Lang B, Verschuuren JJGM
Source
J Clin Oncol. 2011;29(7):902-908
DOI
10.1200/JCO.2010.32.0440

Worked example

Female, age 40, no DELTA-P items

Given: age=40bulbar_weakness=falsekps_lt_70=falsesex=femalesmoking_at_onset=falseweight_loss_ge_5pct=false

  1. Female erectile 0; bulbar 0; weight loss 0; smoking 0; age 40 is not ≥50 → 0; kps_lt_70 0
  2. Score = 0 (max 6); sclc_band low; sclc_percent 0

Female age 50, bulbar weakness, and smoking (score 3)

Given: age=50bulbar_weakness=truekps_lt_70=falsesex=femalesmoking_at_onset=trueweight_loss_ge_5pct=false

  1. Bulbar → 1; female erectile 0; weight loss 0; smoking → 1; age 50 ≥50 → 1; kps_lt_70 0
  2. Score = 3 (max 6); sclc_band high; sclc_percent 83.9

Also searched as

  • DELTA-P
  • DELTA-P score
  • LEMS tumor association
  • Titulaer DELTA-P
  • Dutch-English LEMS
  • Lambert-Eaton SCLC
  • DELTA-P LEMS

Try

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

/api/calc/delta_p?sex=female&age=40&bulbar_weakness=false&weight_loss_ge_5pct=false&smoking_at_onset=false&kps_lt_70=false

Full URL: https://api.magentlab.com/api/calc/delta_p?sex=female&age=40&bulbar_weakness=false&weight_loss_ge_5pct=false&smoking_at_onset=false&kps_lt_70=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/delta_p?sex=female&age=40&bulbar_weakness=false&weight_loss_ge_5pct=false&smoking_at_onset=false&kps_lt_70=false"

Parameters

Name Type Required Description
sex string required · female, male female or male. Erectile dysfunction scores only when male. Female erectile is always 0 (Titulaer 2011: Female | 0).
age integer required Age at LEMS onset in years (18-120). ≥50 scores 1; 49 does not (Titulaer 2011).
bulbar_weakness boolean required Dysarthria, dysphagia, chewing difficulty, or neck weakness at or within 3 months of LEMS onset (Titulaer 2011 D). true or false. Caller-assigned. 1 point if true.
erectile_dysfunction boolean optional Erectile dysfunction at or within 3 months of LEMS onset (Titulaer 2011 E). Required when sex is male (true scores 1). When female, this item is always 0, including if omitted, false, or true. true or false.
weight_loss_ge_5pct boolean required Weight loss ≥5% at or within 3 months of LEMS onset (Titulaer 2011 L). true or false. Caller-assigned. 1 point if true.
smoking_at_onset boolean required Smoking at LEMS onset (Titulaer 2011 T). true or false. Caller-assigned. 1 point if true.
kps_lt_70 boolean required Karnofsky Performance Status 0-60 (KPS <70) at or within 3 months of LEMS onset (Titulaer 2011 P). Caller-assigned flag; magent does not compute Karnofsky. true or false. 1 point if true.

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/delta_p 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": "40",
      "bulbar_weakness": "false",
      "kps_lt_70": "false",
      "sex": "female",
      "smoking_at_onset": "false",
      "weight_loss_ge_5pct": "false"
    },
    {
      "age": "40",
      "bulbar_weakness": "false",
      "kps_lt_70": "false",
      "sex": "female",
      "smoking_at_onset": "false",
      "weight_loss_ge_5pct": "false"
    }
  ]
}

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/delta_p",
  "items": [
    {
      "components": [
        {
          "factor": "bulbar_weakness",
          "points": 0,
          "present": false
        },
        {
          "factor": "erectile_dysfunction",
          "points": 0,
          "present": false
        },
        {
          "factor": "weight_loss_ge_5pct",
          "points": 0,
          "present": false
        },
        {
          "factor": "smoking_at_onset",
          "points": 0,
          "present": false
        },
        {
          "value": 40,
          "factor": "age_ge_50",
          "points": 0,
          "present": false
        },
        {
          "factor": "kps_lt_70",
          "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": "Titulaer MJ, Maddison P, Sont JK, Wirtz PW, Hilton-Jones D, Klooster R, Willcox N, Potman M, Sillevis Smitt PAE, Kuks JBM, Roep BO, Vincent A, van der Maarel SM, van Dijk JG, Lang B, Verschuuren JJGM",
        "doi": "10.1200/JCO.2010.32.0440",
        "id": "titulaer-2011",
        "pmid": "21245427",
        "source": "J Clin Oncol. 2011;29(7):902-908",
        "title": "Clinical Dutch-English Lambert-Eaton Myasthenic Syndrome (LEMS) Tumor Association Prediction Score Accurately Predicts Small-Cell Lung Cancer in the LEMS"
      },
      "formula": "delta_p",
      "formula_expression": "DELTA-P = bulbar_weakness 1 + (male and erectile_dysfunction) 1 + weight_loss_ge_5pct 1 + smoking_at_onset 1 + (age>=50) 1 + kps_lt_70 1; each at or within 3 months of LEMS onset; female erectile always 0; max 6; bands 0-1 low / 2 intermediate / 3-6 high (Titulaer 2011); SCLC percents 0/2.6/omit/83.9/93.5/96.6/100 for scores 0-6",
      "max_score": 6,
      "score": 0,
      "age_years": 40,
      "sex": "female",
      "sclc_band": "low",
      "sclc_percent": 0.0
    },
    {
      "components": [
        {
          "factor": "bulbar_weakness",
          "points": 0,
          "present": false
        },
        {
          "factor": "erectile_dysfunction",
          "points": 0,
          "present": false
        },
        {
          "factor": "weight_loss_ge_5pct",
          "points": 0,
          "present": false
        },
        {
          "factor": "smoking_at_onset",
          "points": 0,
          "present": false
        },
        {
          "value": 40,
          "factor": "age_ge_50",
          "points": 0,
          "present": false
        },
        {
          "factor": "kps_lt_70",
          "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": "Titulaer MJ, Maddison P, Sont JK, Wirtz PW, Hilton-Jones D, Klooster R, Willcox N, Potman M, Sillevis Smitt PAE, Kuks JBM, Roep BO, Vincent A, van der Maarel SM, van Dijk JG, Lang B, Verschuuren JJGM",
        "doi": "10.1200/JCO.2010.32.0440",
        "id": "titulaer-2011",
        "pmid": "21245427",
        "source": "J Clin Oncol. 2011;29(7):902-908",
        "title": "Clinical Dutch-English Lambert-Eaton Myasthenic Syndrome (LEMS) Tumor Association Prediction Score Accurately Predicts Small-Cell Lung Cancer in the LEMS"
      },
      "formula": "delta_p",
      "formula_expression": "DELTA-P = bulbar_weakness 1 + (male and erectile_dysfunction) 1 + weight_loss_ge_5pct 1 + smoking_at_onset 1 + (age>=50) 1 + kps_lt_70 1; each at or within 3 months of LEMS onset; female erectile always 0; max 6; bands 0-1 low / 2 intermediate / 3-6 high (Titulaer 2011); SCLC percents 0/2.6/omit/83.9/93.5/96.6/100 for scores 0-6",
      "max_score": 6,
      "score": 0,
      "age_years": 40,
      "sex": "female",
      "sclc_band": "low",
      "sclc_percent": 0.0
    }
  ]
}

Response

Field Type Description
formula string delta_p
formula_expression string Exact expression used
score integer DELTA-P points 0-6
max_score integer 6
sclc_band string Titulaer 2011 SCLC-association band: low (0-1), intermediate (2), or high (3-6). Not an SCLC screen.
sclc_percent number Titulaer 2011 published SCLC percent for scores 0, 1, 3, 4, 5, and 6 (0, 2.6, 83.9, 93.5, 96.6, 100). Omitted for score 2; no published percent in the main text.
sex string female or male
age_years integer Age used for the ≥50 criterion
components array Per-item Titulaer 2011 points
citation object Titulaer 2011 J Clin Oncol citation
disclaimer string Not-a-device notice

Example JSON

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

{
  "components": [
    {
      "factor": "bulbar_weakness",
      "points": 0,
      "present": false
    },
    {
      "factor": "erectile_dysfunction",
      "points": 0,
      "present": false
    },
    {
      "factor": "weight_loss_ge_5pct",
      "points": 0,
      "present": false
    },
    {
      "factor": "smoking_at_onset",
      "points": 0,
      "present": false
    },
    {
      "value": 40,
      "factor": "age_ge_50",
      "points": 0,
      "present": false
    },
    {
      "factor": "kps_lt_70",
      "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": "Titulaer MJ, Maddison P, Sont JK, Wirtz PW, Hilton-Jones D, Klooster R, Willcox N, Potman M, Sillevis Smitt PAE, Kuks JBM, Roep BO, Vincent A, van der Maarel SM, van Dijk JG, Lang B, Verschuuren JJGM",
    "doi": "10.1200/JCO.2010.32.0440",
    "id": "titulaer-2011",
    "pmid": "21245427",
    "source": "J Clin Oncol. 2011;29(7):902-908",
    "title": "Clinical Dutch-English Lambert-Eaton Myasthenic Syndrome (LEMS) Tumor Association Prediction Score Accurately Predicts Small-Cell Lung Cancer in the LEMS"
  },
  "formula": "delta_p",
  "formula_expression": "DELTA-P = bulbar_weakness 1 + (male and erectile_dysfunction) 1 + weight_loss_ge_5pct 1 + smoking_at_onset 1 + (age>=50) 1 + kps_lt_70 1; each at or within 3 months of LEMS onset; female erectile always 0; max 6; bands 0-1 low / 2 intermediate / 3-6 high (Titulaer 2011); SCLC percents 0/2.6/omit/83.9/93.5/96.6/100 for scores 0-6",
  "max_score": 6,
  "score": 0,
  "age_years": 40,
  "sex": "female",
  "sclc_band": "low",
  "sclc_percent": 0.0
}

Client errors (HTTP 400)

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

HTTP Code When
400 invalid_age age must be an integer from 18 to 120 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_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

  • Karnofsky — Return the Karnofsky 1949 Performance Status 10-100 from a caller-assigned integer, with a stable label.

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.