MAGENT

Emergency · LIVE

RESECT-90 lung-resection mortality

RESECT-90

Compute the Taylor 2021 RESECT-90 logistic estimated 90-day mortality after lung resection from the twelve published preoperative variables in Table 3.

LIVE $0.005 USDC GET /api/calc/resect_90

Markdown: /docs/resect-90.md · Canonical: https://magentlab.com/docs/resect-90

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

What it computes

Compute the Taylor 2021 RESECT-90 logistic estimated 90-day mortality after lung resection from the twelve published preoperative variables in Table 3.

When to use

When an agent needs the published RESECT-90 90-day mortality percent and must not invent a mortality band, assign ECOG, read spirometry, substitute race for sex, or issue an operative go/no-go.

When not to use

  • Not a medical device. Not a diagnosis and not an operative go/no-go.
  • Taylor 2021 Table 3 multivariable logistic RESECT-90 only. This is not EuroSCORE II and not Gupta PRF.
  • Taylor 2021 does not publish a low or high mortality cutoff; magent does not invent one.
  • Sex is a published coefficient. This model does not use race.
  • ecog, anemia, arrhythmia, laterality, surgical_approach, diagnosis, and resected_segments are caller-assigned. magent does not assign ECOG, read spirometry or DLCO, assay creatinine, or classify an incision.
  • Creatinine is umol/L as published. magent does not convert from mg/dL.

Formula

L = -6.036 + 0.041*age + 0.493*male + 0.183*ecog - 0.029*dlco_percent - 0.056*bmi + 0.005*creatinine_umol_l + 0.242*anemia + 0.608*arrhythmia + 0.379*right + 0.179*resected_segments + 0.634*thoracotomy + 0.769*malignant (Taylor 2021 Table 3 / PMC8632783); estimated_mortality_percent = 100 / (1 + exp(-L)) from the unrounded logit, 2 decimals

Citation

Title
Development and internal validation of a clinical prediction model for 90-day mortality after lung resection: the RESECT-90 score
Authors
Taylor M, Martin GP, Abah U, Sperrin M, Smith MO, Bhullar D, Shackcloth M, Woolley S, West D, Shah R, Grant SW; North West Thoracic Surgery Collaborative (NWTSC)
Source
Interact Cardiovasc Thorac Surg. 2021;33(6):921-927
DOI
10.1093/icvts/ivab200

Worked example

Age 65 male ECOG 0, Table 1-typical continuous values, binary references

Given: age=65anemia=falsearrhythmia=falsebmi=27creatinine_umol_l=74diagnosis=benigndlco_percent=73ecog=0laterality=leftresected_segments=3sex=malesurgical_approach=vats

  1. L = -6.036 + 65×0.041 + 0.493 (male) + 0×0.183 − 73×0.029 − 27×0.056 + 74×0.005 + 0 + 0 + 0 + 3×0.179 + 0 + 0
  2. L = -6.036 + 2.665 + 0.493 − 2.117 − 1.512 + 0.370 + 0.537 = -5.600
  3. estimated_mortality_percent = 100 / (1 + exp(5.600)) from the unrounded logit

Same row, female (sex path; female is the Table 3 reference)

Given: age=65anemia=falsearrhythmia=falsebmi=27creatinine_umol_l=74diagnosis=benigndlco_percent=73ecog=0laterality=leftresected_segments=3sex=femalesurgical_approach=vats

  1. male term 0 instead of +0.493
  2. estimated_mortality_percent from the unrounded logit

Same row, ECOG 2 (performance-status path)

Given: age=65anemia=falsearrhythmia=falsebmi=27creatinine_umol_l=74diagnosis=benigndlco_percent=73ecog=2laterality=leftresected_segments=3sex=malesurgical_approach=vats

  1. ECOG 2 adds 2×0.183 = 0.366
  2. estimated_mortality_percent from the unrounded logit

Same row, thoracotomy (surgical-approach path)

Given: age=65anemia=falsearrhythmia=falsebmi=27creatinine_umol_l=74diagnosis=benigndlco_percent=73ecog=0laterality=leftresected_segments=3sex=malesurgical_approach=thoracotomy

  1. thoracotomy adds 0.634 (vats is the Table 3 reference)
  2. estimated_mortality_percent from the unrounded logit

Same row, age 80 (age path; no published cutoff)

Given: age=80anemia=falsearrhythmia=falsebmi=27creatinine_umol_l=74diagnosis=benigndlco_percent=73ecog=0laterality=leftresected_segments=3sex=malesurgical_approach=vats

  1. age 80 vs 65 adds 15×0.041 = 0.615
  2. estimated_mortality_percent from the unrounded logit

Also searched as

  • RESECT-90
  • 90-day mortality after lung resection
  • Taylor 2021 lung resection
  • lung resection mortality score
  • DLCO lung resection mortality
  • ECOG lung resection
  • thoracotomy 90-day mortality
  • resected bronchopulmonary segments

Try

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

/api/calc/resect_90?age=65&sex=male&ecog=0&dlco_percent=73&bmi=27&creatinine_umol_l=74&anemia=false&arrhythmia=false&laterality=left&surgical_approach=vats&diagnosis=benign&resected_segments=3

Full URL: https://api.magentlab.com/api/calc/resect_90?age=65&sex=male&ecog=0&dlco_percent=73&bmi=27&creatinine_umol_l=74&anemia=false&arrhythmia=false&laterality=left&surgical_approach=vats&diagnosis=benign&resected_segments=3

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/resect_90?age=65&sex=male&ecog=0&dlco_percent=73&bmi=27&creatinine_umol_l=74&anemia=false&arrhythmia=false&laterality=left&surgical_approach=vats&diagnosis=benign&resected_segments=3"

Parameters

Name Type Required Description
age integer required Age in years (18-120). Taylor 2021 Table 3 coefficient 0.041 per year. magent does not read a chart.
sex string required · male, female Sex as assigned by the caller. female is the reference (0). male adds 0.493 (Taylor 2021 Table 3). This is a published sex coefficient, not race.
ecog integer required ECOG / WHO performance status 0-4 as assigned by the caller (Taylor 2021 Table 3 coefficient 0.183 per point). magent does not assign ECOG.
dlco_percent number required Percent predicted DLCO (10-200). Taylor 2021 Table 3 subtracts 0.029 per percent. magent does not read spirometry or a gas-transfer tracing.
bmi number required Body-mass index in kg/m2 (10-80). Taylor 2021 Table 3 subtracts 0.056 per kg/m2. magent does not weigh the patient.
creatinine_umol_l number required Serum creatinine in µmol/L as published (20-2000). Taylor 2021 Table 3 coefficient 0.005 per µmol/L. Not mg/dL.
anemia boolean required Taylor 2021 WHO anaemia as assigned by the caller: haemoglobin <120 g/L for women or <130 g/L for men (+0.242). true or false. magent does not read a haemoglobin.
arrhythmia boolean required Preoperative arrhythmia as assigned by the caller (Taylor 2021 Table 3 +0.608). true or false. magent does not read an ECG.
laterality string required · left, right Resection laterality as assigned by the caller. left is the reference (0). right adds 0.379 (Taylor 2021 Table 3). magent does not read an operative note.
surgical_approach string required · vats, thoracotomy Approach as assigned by the caller. vats is the non-thoracotomy reference (0). thoracotomy adds 0.634 (Taylor 2021 Table 3). magent does not classify the incision.
diagnosis string required · benign, malignant Diagnosis as assigned by the caller. benign is the reference (0). malignant (confirmed or suspected) adds 0.769 (Taylor 2021 Table 3).
resected_segments integer required Number of resected bronchopulmonary segments (0-19). Taylor 2021 Table 3 coefficient 0.179 per segment. magent does not map a procedure to segments.

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/resect_90 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": "65",
      "anemia": "false",
      "arrhythmia": "false",
      "bmi": "27",
      "creatinine_umol_l": "74",
      "diagnosis": "benign",
      "dlco_percent": "73",
      "ecog": "0",
      "laterality": "left",
      "resected_segments": "3",
      "sex": "male",
      "surgical_approach": "vats"
    },
    {
      "age": "65",
      "anemia": "false",
      "arrhythmia": "false",
      "bmi": "27",
      "creatinine_umol_l": "74",
      "diagnosis": "benign",
      "dlco_percent": "73",
      "ecog": "0",
      "laterality": "left",
      "resected_segments": "3",
      "sex": "male",
      "surgical_approach": "vats"
    }
  ]
}

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/resect_90",
  "items": [
    {
      "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": "Taylor M, Martin GP, Abah U, Sperrin M, Smith MO, Bhullar D, Shackcloth M, Woolley S, West D, Shah R, Grant SW; North West Thoracic Surgery Collaborative (NWTSC)",
        "doi": "10.1093/icvts/ivab200",
        "id": "taylor-2021",
        "pmid": "34293121",
        "source": "Interact Cardiovasc Thorac Surg. 2021;33(6):921-927",
        "title": "Development and internal validation of a clinical prediction model for 90-day mortality after lung resection: the RESECT-90 score"
      },
      "formula": "resect_90",
      "formula_expression": "L = -6.036 + 0.041*age + 0.493*male + 0.183*ecog - 0.029*dlco_percent - 0.056*bmi + 0.005*creatinine_umol_l + 0.242*anemia + 0.608*arrhythmia + 0.379*right + 0.179*resected_segments + 0.634*thoracotomy + 0.769*malignant (Taylor 2021 Table 3 / PMC8632783); estimated_mortality_percent = 100 / (1 + exp(-L)) from the unrounded logit, 2 decimals",
      "age_years": 65,
      "sex": "male",
      "logit": -5.6,
      "anemia": false,
      "creatinine_umol_l": 74.0,
      "bmi": 27.0,
      "diagnosis": "benign",
      "ecog": 0,
      "estimated_mortality_percent": 0.37,
      "arrhythmia": false,
      "dlco_percent": 73.0,
      "laterality": "left",
      "resected_segments": 3,
      "surgical_approach": "vats"
    },
    {
      "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": "Taylor M, Martin GP, Abah U, Sperrin M, Smith MO, Bhullar D, Shackcloth M, Woolley S, West D, Shah R, Grant SW; North West Thoracic Surgery Collaborative (NWTSC)",
        "doi": "10.1093/icvts/ivab200",
        "id": "taylor-2021",
        "pmid": "34293121",
        "source": "Interact Cardiovasc Thorac Surg. 2021;33(6):921-927",
        "title": "Development and internal validation of a clinical prediction model for 90-day mortality after lung resection: the RESECT-90 score"
      },
      "formula": "resect_90",
      "formula_expression": "L = -6.036 + 0.041*age + 0.493*male + 0.183*ecog - 0.029*dlco_percent - 0.056*bmi + 0.005*creatinine_umol_l + 0.242*anemia + 0.608*arrhythmia + 0.379*right + 0.179*resected_segments + 0.634*thoracotomy + 0.769*malignant (Taylor 2021 Table 3 / PMC8632783); estimated_mortality_percent = 100 / (1 + exp(-L)) from the unrounded logit, 2 decimals",
      "age_years": 65,
      "sex": "male",
      "logit": -5.6,
      "anemia": false,
      "creatinine_umol_l": 74.0,
      "bmi": 27.0,
      "diagnosis": "benign",
      "ecog": 0,
      "estimated_mortality_percent": 0.37,
      "arrhythmia": false,
      "dlco_percent": 73.0,
      "laterality": "left",
      "resected_segments": 3,
      "surgical_approach": "vats"
    }
  ]
}

Response

Field Type Description
formula string resect_90
formula_expression string Taylor 2021 Table 3 logistic expression
age_years integer Age in years
sex string male or female
ecog integer Caller-assigned ECOG 0-4
dlco_percent number Percent predicted DLCO
bmi number BMI in kg/m2
creatinine_umol_l number Creatinine in µmol/L as published
anemia boolean true if WHO anaemia is present
arrhythmia boolean true if preoperative arrhythmia
laterality string left or right
surgical_approach string vats or thoracotomy
diagnosis string benign or malignant
resected_segments integer Number of resected bronchopulmonary segments
logit number Taylor 2021 Table 3 linear predictor L, 4 decimal places
estimated_mortality_percent number 100 / (1 + exp(-L)) from the unrounded logit, 2 decimal places. Estimated 90-day mortality percent, not an operative go/no-go.
citation object Taylor et al. ICVTS 2021 citation
disclaimer string Not-a-device notice

Example JSON

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

{
  "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": "Taylor M, Martin GP, Abah U, Sperrin M, Smith MO, Bhullar D, Shackcloth M, Woolley S, West D, Shah R, Grant SW; North West Thoracic Surgery Collaborative (NWTSC)",
    "doi": "10.1093/icvts/ivab200",
    "id": "taylor-2021",
    "pmid": "34293121",
    "source": "Interact Cardiovasc Thorac Surg. 2021;33(6):921-927",
    "title": "Development and internal validation of a clinical prediction model for 90-day mortality after lung resection: the RESECT-90 score"
  },
  "formula": "resect_90",
  "formula_expression": "L = -6.036 + 0.041*age + 0.493*male + 0.183*ecog - 0.029*dlco_percent - 0.056*bmi + 0.005*creatinine_umol_l + 0.242*anemia + 0.608*arrhythmia + 0.379*right + 0.179*resected_segments + 0.634*thoracotomy + 0.769*malignant (Taylor 2021 Table 3 / PMC8632783); estimated_mortality_percent = 100 / (1 + exp(-L)) from the unrounded logit, 2 decimals",
  "age_years": 65,
  "sex": "male",
  "logit": -5.6,
  "anemia": false,
  "creatinine_umol_l": 74.0,
  "bmi": 27.0,
  "diagnosis": "benign",
  "ecog": 0,
  "estimated_mortality_percent": 0.37,
  "arrhythmia": false,
  "dlco_percent": 73.0,
  "laterality": "left",
  "resected_segments": 3,
  "surgical_approach": "vats"
}

Client errors (HTTP 400)

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

HTTP Code When
400 invalid_resect_90 RESECT-90 needs Taylor 2021 lung-resection predictors 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

  • Gupta PRF — Compute the Gupta 2011 Chest logistic probability of postoperative respiratory failure (mechanical ventilation >48 h after surgery or unplanned intubation within 30 days) from ASA class, functional status, preoperative sepsis, emergency case, and surgery type.
  • EuroSCORE II — Compute the Nashef 2012 Table 6 logistic estimated in-hospital mortality after adult cardiac surgery from the published multivariable coefficients.

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.