MAGENT

Respiratory · LIVE

Clinical PROMISE score (malignant pleural effusion)

PROMISE

Sum the Psallidas 2018 Table 2A clinical PROMISE points (previous chemotherapy and radiotherapy, haemoglobin, WBC, CRP, ECOG, cancer type) and return group A-D 3-month mortality bands.

LIVE $0.005 USDC GET /api/calc/promise

Markdown: /docs/promise.md · Canonical: https://magentlab.com/docs/promise

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

What it computes

Sum the Psallidas 2018 Table 2A clinical PROMISE points (previous chemotherapy and radiotherapy, haemoglobin, WBC, CRP, ECOG, cancer type) and return group A-D 3-month mortality bands.

When to use

When an agent already has caller-assigned previous chemotherapy and radiotherapy flags, haemoglobin g/dL, serum WBC as 10^9/L, CRP mg/L, ECOG 0-4, and a cancer type token (mesothelioma, lung, or other), and must not invent a diagnosis, pleurodesis or chemotherapy order, or biological PROMISE/TIMP1 result. magent does not assay labs or assign ECOG.

When not to use

  • Not a medical device and not a diagnosis or treatment order. magent does not assay labs or assign ECOG.
  • Clinical PROMISE only (Psallidas 2018 Table 2A). Not biological PROMISE. No TIMP1 input.
  • Not a pleurodesis success score and not a chemotherapy or radiotherapy order.
  • CRP is mg/L (0-500), not IU/L. magent does not convert CRP units.
  • 3-month mortality percents are published Table 2A group bands, not a prognosis assignment.
  • The caller assigns chemotherapy, radiotherapy, ECOG 0-4, and cancer type (mesothelioma, lung, or other). magent does not convert Karnofsky or assign cancer type from histology text.

Formula

clinical PROMISE = previous_chemotherapy (no 0, yes 4) + previous_radiotherapy (no 0, yes 2) + haemoglobin_g_dl (≥16 → 0; 14 to <16 → 1; 12 to <14 → 2; 10 to <12 → 3; <10 → 4) + wbc_10e9_l (<4 → 0; 4 to <6.3 → 2; 6.3 to <10 → 4; 10 to <15.8 → 7; ≥15.8 → 10) + crp_mg_l (<3 → 0; 3 to <10 → 3; 10 to <32 → 5; 32 to <100 → 8; ≥100 → 11) + ECOG (0–1 → 0; 2–4 → 7) + cancer_type (mesothelioma → 0; other → 4; lung → 5); Psallidas 2018 Table 2A; groups A 0–20 <25% 3-month mortality, B 21–27 25% to <50%, C 28–35 50% to <75%, D >35 ≥75%

Citation

Title
Development and validation of response markers to predict survival and pleurodesis success in patients with malignant pleural effusion (PROMISE): a multicohort analysis
Authors
Psallidas I, Kanellakis NI, Gerry S, et al.
Source
Lancet Oncol. 2018;19(7):930-939
DOI
10.1016/S1470-2045(18)30294-8

Worked example

No chemo/RT, Hb 15, WBC 8, CRP 20, ECOG 0, other

Given: cancer_type=otherchemotherapy=falsecrp_mg_l=20ecog=0haemoglobin_g_dl=15.0radiotherapy=falsewbc=8.0

  1. chemotherapy false → 0; radiotherapy false → 0
  2. haemoglobin 15.0 (14 to <16) → 1
  3. WBC 8.0 (6.3 to <10) → 4
  4. CRP 20 mg/L (10 to <32) → 5
  5. ECOG 0 → 0; cancer_type other → 4
  6. score = 1+4+5+4 = 14 (max 43); group A (<25% 3-month mortality)

Chemo+RT, Hb 9, WBC 16, CRP 120, ECOG 3, lung

Given: cancer_type=lungchemotherapy=truecrp_mg_l=120ecog=3haemoglobin_g_dl=9.0radiotherapy=truewbc=16.0

  1. chemotherapy true → 4; radiotherapy true → 2
  2. haemoglobin 9.0 (<10) → 4; WBC 16.0 (≥15.8) → 10; CRP 120 (≥100) → 11
  3. ECOG 3 (2-4) → 7; cancer_type lung → 5
  4. score = 4+2+4+10+11+7+5 = 43 (max 43); group D (>=75% 3-month mortality)

Also searched as

  • PROMISE score
  • clinical PROMISE
  • malignant pleural effusion PROMISE
  • Psallidas PROMISE
  • MPE PROMISE score
  • PROMISE 3-month mortality
  • Table 2A PROMISE

Try

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

/api/calc/promise?chemotherapy=false&radiotherapy=false&haemoglobin_g_dl=15.0&wbc=8.0&crp_mg_l=20&ecog=0&cancer_type=other

Full URL: https://api.magentlab.com/api/calc/promise?chemotherapy=false&radiotherapy=false&haemoglobin_g_dl=15.0&wbc=8.0&crp_mg_l=20&ecog=0&cancer_type=other

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/promise?chemotherapy=false&radiotherapy=false&haemoglobin_g_dl=15.0&wbc=8.0&crp_mg_l=20&ecog=0&cancer_type=other"

Parameters

Name Type Required Description
chemotherapy boolean required Previous chemotherapy as assigned by the caller (Psallidas 2018 Table 2A). true or false. true scores 4; false scores 0. Not a chemotherapy order. magent does not read a treatment history.
radiotherapy boolean required Previous radiotherapy as assigned by the caller (Psallidas 2018 Table 2A). true or false. true scores 2; false scores 0. Not a radiotherapy order. magent does not read a treatment history.
haemoglobin_g_dl number required Haemoglobin in g/dL (3-25). Psallidas 2018 Table 2A: ≥16 scores 0; 14 to <16 scores 1; 12 to <14 scores 2; 10 to <12 scores 3; <10 scores 4. Caller-supplied; magent does not assay haemoglobin.
wbc number required Serum white cell count as 10^9/L (0.1-80). Psallidas 2018 Table 2A: <4 scores 0; 4 to <6.3 scores 2; 6.3 to <10 scores 4; 10 to <15.8 scores 7; ≥15.8 scores 10. Caller-supplied; magent does not assay WBC.
crp_mg_l number required Serum CRP in mg/L (0-500), not IU/L. Psallidas 2018 Table 2A: <3 scores 0; 3 to <10 scores 3; 10 to <32 scores 5; 32 to <100 scores 8; ≥100 scores 11. Caller-supplied; magent does not assay CRP or convert IU/L.
ecog integer required Oken 1982 ECOG performance status 0-4 as assigned by the caller. Psallidas 2018 Table 2A: 0-1 scores 0; 2-4 scores 7. Grade 5 (dead) is not scored. magent does not observe the patient or convert Karnofsky.
cancer_type string required · mesothelioma, lung, other Psallidas 2018 Table 2A cancer type as assigned by the caller. mesothelioma scores 0; other scores 4; lung scores 5. magent does not assign cancer type from histology text.

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/promise 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": [
    {
      "cancer_type": "other",
      "chemotherapy": "false",
      "crp_mg_l": "20",
      "ecog": "0",
      "haemoglobin_g_dl": "15.0",
      "radiotherapy": "false",
      "wbc": "8.0"
    },
    {
      "cancer_type": "other",
      "chemotherapy": "false",
      "crp_mg_l": "20",
      "ecog": "0",
      "haemoglobin_g_dl": "15.0",
      "radiotherapy": "false",
      "wbc": "8.0"
    }
  ]
}

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/promise",
  "items": [
    {
      "group": "A",
      "components": [
        {
          "value": false,
          "factor": "chemotherapy",
          "points": 0,
          "present": false
        },
        {
          "value": false,
          "factor": "radiotherapy",
          "points": 0,
          "present": false
        },
        {
          "value": 15.0,
          "factor": "haemoglobin",
          "points": 1,
          "present": true
        },
        {
          "value": 8.0,
          "factor": "wbc",
          "points": 4,
          "present": true
        },
        {
          "value": 20.0,
          "factor": "crp",
          "points": 5,
          "present": true
        },
        {
          "value": 0,
          "factor": "ecog",
          "points": 0,
          "present": false
        },
        {
          "value": "other",
          "factor": "cancer_type",
          "points": 4,
          "present": true
        }
      ],
      "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": "Psallidas I, Kanellakis NI, Gerry S, et al.",
        "doi": "10.1016/S1470-2045(18)30294-8",
        "id": "psallidas-2018",
        "pmid": "29908990",
        "source": "Lancet Oncol. 2018;19(7):930-939",
        "title": "Development and validation of response markers to predict survival and pleurodesis success in patients with malignant pleural effusion (PROMISE): a multicohort analysis"
      },
      "formula": "promise",
      "formula_expression": "clinical PROMISE = previous_chemotherapy (no 0, yes 4) + previous_radiotherapy (no 0, yes 2) + haemoglobin_g_dl (≥16 → 0; 14 to <16 → 1; 12 to <14 → 2; 10 to <12 → 3; <10 → 4) + wbc_10e9_l (<4 → 0; 4 to <6.3 → 2; 6.3 to <10 → 4; 10 to <15.8 → 7; ≥15.8 → 10) + crp_mg_l (<3 → 0; 3 to <10 → 3; 10 to <32 → 5; 32 to <100 → 8; ≥100 → 11) + ECOG (0–1 → 0; 2–4 → 7) + cancer_type (mesothelioma → 0; other → 4; lung → 5); Psallidas 2018 Table 2A; groups A 0–20 <25% 3-month mortality, B 21–27 25% to <50%, C 28–35 50% to <75%, D >35 ≥75%",
      "max_score": 43,
      "score": 14,
      "crp_mg_l": 20.0,
      "ecog": 0,
      "cancer_type": "other",
      "chemotherapy": false,
      "haemoglobin_g_dl": 15.0,
      "radiotherapy": false,
      "three_month_mortality": "<25%",
      "wbc": 8.0
    },
    {
      "group": "A",
      "components": [
        {
          "value": false,
          "factor": "chemotherapy",
          "points": 0,
          "present": false
        },
        {
          "value": false,
          "factor": "radiotherapy",
          "points": 0,
          "present": false
        },
        {
          "value": 15.0,
          "factor": "haemoglobin",
          "points": 1,
          "present": true
        },
        {
          "value": 8.0,
          "factor": "wbc",
          "points": 4,
          "present": true
        },
        {
          "value": 20.0,
          "factor": "crp",
          "points": 5,
          "present": true
        },
        {
          "value": 0,
          "factor": "ecog",
          "points": 0,
          "present": false
        },
        {
          "value": "other",
          "factor": "cancer_type",
          "points": 4,
          "present": true
        }
      ],
      "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": "Psallidas I, Kanellakis NI, Gerry S, et al.",
        "doi": "10.1016/S1470-2045(18)30294-8",
        "id": "psallidas-2018",
        "pmid": "29908990",
        "source": "Lancet Oncol. 2018;19(7):930-939",
        "title": "Development and validation of response markers to predict survival and pleurodesis success in patients with malignant pleural effusion (PROMISE): a multicohort analysis"
      },
      "formula": "promise",
      "formula_expression": "clinical PROMISE = previous_chemotherapy (no 0, yes 4) + previous_radiotherapy (no 0, yes 2) + haemoglobin_g_dl (≥16 → 0; 14 to <16 → 1; 12 to <14 → 2; 10 to <12 → 3; <10 → 4) + wbc_10e9_l (<4 → 0; 4 to <6.3 → 2; 6.3 to <10 → 4; 10 to <15.8 → 7; ≥15.8 → 10) + crp_mg_l (<3 → 0; 3 to <10 → 3; 10 to <32 → 5; 32 to <100 → 8; ≥100 → 11) + ECOG (0–1 → 0; 2–4 → 7) + cancer_type (mesothelioma → 0; other → 4; lung → 5); Psallidas 2018 Table 2A; groups A 0–20 <25% 3-month mortality, B 21–27 25% to <50%, C 28–35 50% to <75%, D >35 ≥75%",
      "max_score": 43,
      "score": 14,
      "crp_mg_l": 20.0,
      "ecog": 0,
      "cancer_type": "other",
      "chemotherapy": false,
      "haemoglobin_g_dl": 15.0,
      "radiotherapy": false,
      "three_month_mortality": "<25%",
      "wbc": 8.0
    }
  ]
}

Response

Field Type Description
formula string promise
formula_expression string Psallidas 2018 Table 2A clinical PROMISE rule
score integer Clinical PROMISE points 0-43
max_score integer 43
group string A when score is 0-20, B when 21-27, C when 28-35, D when score is >35 (Psallidas 2018 Table 2A). Not a diagnosis or treatment order.
three_month_mortality string Published Table 2A 3-month mortality band: <25% (A), 25% to <50% (B), 50% to <75% (C), >=75% (D). Paper group percents only, not a prognosis assignment.
chemotherapy boolean Caller-assigned previous chemotherapy flag used
radiotherapy boolean Caller-assigned previous radiotherapy flag used
haemoglobin_g_dl number Haemoglobin used, g/dL
wbc number Serum WBC used, 10^9/L
crp_mg_l number Serum CRP used, mg/L
ecog integer Caller-assigned Oken 1982 ECOG grade 0-4
cancer_type string Canonical Table 2A cancer token used (mesothelioma, lung, or other)
components array Per-factor Table 2A points
citation object Psallidas 2018 Lancet Oncology citation
disclaimer string Not a medical device

Example JSON

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

{
  "group": "A",
  "components": [
    {
      "value": false,
      "factor": "chemotherapy",
      "points": 0,
      "present": false
    },
    {
      "value": false,
      "factor": "radiotherapy",
      "points": 0,
      "present": false
    },
    {
      "value": 15.0,
      "factor": "haemoglobin",
      "points": 1,
      "present": true
    },
    {
      "value": 8.0,
      "factor": "wbc",
      "points": 4,
      "present": true
    },
    {
      "value": 20.0,
      "factor": "crp",
      "points": 5,
      "present": true
    },
    {
      "value": 0,
      "factor": "ecog",
      "points": 0,
      "present": false
    },
    {
      "value": "other",
      "factor": "cancer_type",
      "points": 4,
      "present": true
    }
  ],
  "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": "Psallidas I, Kanellakis NI, Gerry S, et al.",
    "doi": "10.1016/S1470-2045(18)30294-8",
    "id": "psallidas-2018",
    "pmid": "29908990",
    "source": "Lancet Oncol. 2018;19(7):930-939",
    "title": "Development and validation of response markers to predict survival and pleurodesis success in patients with malignant pleural effusion (PROMISE): a multicohort analysis"
  },
  "formula": "promise",
  "formula_expression": "clinical PROMISE = previous_chemotherapy (no 0, yes 4) + previous_radiotherapy (no 0, yes 2) + haemoglobin_g_dl (≥16 → 0; 14 to <16 → 1; 12 to <14 → 2; 10 to <12 → 3; <10 → 4) + wbc_10e9_l (<4 → 0; 4 to <6.3 → 2; 6.3 to <10 → 4; 10 to <15.8 → 7; ≥15.8 → 10) + crp_mg_l (<3 → 0; 3 to <10 → 3; 10 to <32 → 5; 32 to <100 → 8; ≥100 → 11) + ECOG (0–1 → 0; 2–4 → 7) + cancer_type (mesothelioma → 0; other → 4; lung → 5); Psallidas 2018 Table 2A; groups A 0–20 <25% 3-month mortality, B 21–27 25% to <50%, C 28–35 50% to <75%, D >35 ≥75%",
  "max_score": 43,
  "score": 14,
  "crp_mg_l": 20.0,
  "ecog": 0,
  "cancer_type": "other",
  "chemotherapy": false,
  "haemoglobin_g_dl": 15.0,
  "radiotherapy": false,
  "three_month_mortality": "<25%",
  "wbc": 8.0
}

Client errors (HTTP 400)

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

HTTP Code When
400 invalid_promise Clinical PROMISE needs Psallidas 2018 chemotherapy, radiotherapy, haemoglobin, WBC, CRP, ECOG, and cancer type in published ranges. 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

  • LENT — Sum the Clive 2014 Table 3 LENT score (pleural fluid LDH, ECOG, serum NLR, tumour type) and return low (0-1), moderate (2-4), or high (5-7).
  • Light's criteria — Apply Light 1972 pleural fluid criteria from protein ratio, LDH ratio, and pleural LDH versus two-thirds the laboratory LDH upper limit of normal.

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.