{
  "x402Version": 2,
  "id": 39356,
  "slug": "39356",
  "resource": "https://api.magentlab.com/api/calc/resect_90",
  "description": "Taylor 2021 RESECT-90 logistic 90-day mortality after lung resection from age, sex, ECOG, percent predicted DLCO, BMI, creatinine (umol/L), anaemia, arrhythmia, laterality, thoracotomy vs VATS, diagnosis, and resected segments. Returns logit and estimated_mortality_percent. Not a medical device, not an operative go/no-go, and not a published cutoff. magent does not assign ECOG or read spirometry.",
  "type": "http",
  "serviceName": "magent",
  "resourceType": "Agent Service",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x836Be278f1739fB4308091cD1852F7971Bc19Ee2",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "5000",
      "amountUsd": 0.005,
      "maxTimeoutSeconds": 600
    }
  ],
  "outputSchema": {
    "properties": {
      "example": {
        "type": "object"
      },
      "type": {
        "type": "string"
      }
    },
    "required": [
      "type"
    ],
    "type": "object"
  },
  "extensions": {
    "bazaar": {
      "info": {
        "iconUrl": "https://api.magentlab.com/favicon.ico",
        "input": {
          "body": {
            "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"
              }
            ]
          },
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "count": 2,
            "items": [
              {
                "age_years": 65,
                "anemia": false,
                "arrhythmia": false,
                "bmi": 27,
                "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"
                },
                "creatinine_umol_l": 74,
                "diagnosis": "benign",
                "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.",
                "dlco_percent": 73,
                "ecog": 0,
                "estimated_mortality_percent": 0.37,
                "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",
                "laterality": "left",
                "logit": -5.6,
                "resected_segments": 3,
                "sex": "male",
                "surgical_approach": "vats"
              },
              {
                "age_years": 65,
                "anemia": false,
                "arrhythmia": false,
                "bmi": 27,
                "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"
                },
                "creatinine_umol_l": 74,
                "diagnosis": "benign",
                "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.",
                "dlco_percent": 73,
                "ecog": 0,
                "estimated_mortality_percent": 0.37,
                "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",
                "laterality": "left",
                "logit": -5.6,
                "resected_segments": 3,
                "sex": "male",
                "surgical_approach": "vats"
              }
            ],
            "path": "/api/calc/resect_90"
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "additionalProperties": false,
                "properties": {
                  "items": {
                    "items": {
                      "properties": {
                        "age": {
                          "description": "Age in years (18-120). Taylor 2021 Table 3 coefficient 0.041 per year. magent does not read a chart.",
                          "type": "integer"
                        },
                        "anemia": {
                          "description": "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.",
                          "type": "boolean"
                        },
                        "arrhythmia": {
                          "description": "Preoperative arrhythmia as assigned by the caller (Taylor 2021 Table 3 +0.608). true or false. magent does not read an ECG.",
                          "type": "boolean"
                        },
                        "bmi": {
                          "description": "Body-mass index in kg/m2 (10-80). Taylor 2021 Table 3 subtracts 0.056 per kg/m2. magent does not weigh the patient.",
                          "type": "number"
                        },
                        "creatinine_umol_l": {
                          "description": "Serum creatinine in µmol/L as published (20-2000). Taylor 2021 Table 3 coefficient 0.005 per µmol/L. Not mg/dL.",
                          "type": "number"
                        },
                        "diagnosis": {
                          "description": "Diagnosis as assigned by the caller. benign is the reference (0). malignant (confirmed or suspected) adds 0.769 (Taylor 2021 Table 3).",
                          "enum": [
                            "benign",
                            "malignant"
                          ],
                          "type": "string"
                        },
                        "dlco_percent": {
                          "description": "Percent predicted DLCO (10-200). Taylor 2021 Table 3 subtracts 0.029 per percent. magent does not read spirometry or a gas-transfer tracing.",
                          "type": "number"
                        },
                        "ecog": {
                          "description": "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.",
                          "type": "integer"
                        },
                        "laterality": {
                          "description": "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.",
                          "enum": [
                            "left",
                            "right"
                          ],
                          "type": "string"
                        },
                        "resected_segments": {
                          "description": "Number of resected bronchopulmonary segments (0-19). Taylor 2021 Table 3 coefficient 0.179 per segment. magent does not map a procedure to segments.",
                          "type": "integer"
                        },
                        "sex": {
                          "description": "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.",
                          "enum": [
                            "male",
                            "female"
                          ],
                          "type": "string"
                        },
                        "surgical_approach": {
                          "description": "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.",
                          "enum": [
                            "vats",
                            "thoracotomy"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "age",
                        "sex",
                        "ecog",
                        "dlco_percent",
                        "bmi",
                        "creatinine_umol_l",
                        "anemia",
                        "arrhythmia",
                        "laterality",
                        "surgical_approach",
                        "diagnosis",
                        "resected_segments"
                      ],
                      "type": "object"
                    },
                    "maxItems": 25,
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "items"
                ],
                "type": "object"
              },
              "headers": {
                "additionalProperties": {
                  "type": "string"
                },
                "type": "object"
              },
              "method": {
                "const": "POST",
                "type": "string"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "resect-90",
    "lung-resection",
    "mortality",
    "thoracic",
    "emergency",
    "bazaar"
  ],
  "sourceHost": "api.magentlab.com",
  "lastUpdated": "2026-10-13T12:21:48.931Z",
  "quality": {
    "calls30d": 5,
    "uniquePayers30d": 2,
    "lastCalledAt": "2026-10-13T12:21:48.709Z"
  },
  "metadata": {
    "serviceName": "magent",
    "extensions": {
      "bazaar": {
        "info": {
          "iconUrl": "https://api.magentlab.com/favicon.ico",
          "input": {
            "body": {
              "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"
                }
              ]
            },
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "count": 2,
              "items": [
                {
                  "age_years": 65,
                  "anemia": false,
                  "arrhythmia": false,
                  "bmi": 27,
                  "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"
                  },
                  "creatinine_umol_l": 74,
                  "diagnosis": "benign",
                  "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.",
                  "dlco_percent": 73,
                  "ecog": 0,
                  "estimated_mortality_percent": 0.37,
                  "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",
                  "laterality": "left",
                  "logit": -5.6,
                  "resected_segments": 3,
                  "sex": "male",
                  "surgical_approach": "vats"
                },
                {
                  "age_years": 65,
                  "anemia": false,
                  "arrhythmia": false,
                  "bmi": 27,
                  "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"
                  },
                  "creatinine_umol_l": 74,
                  "diagnosis": "benign",
                  "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.",
                  "dlco_percent": 73,
                  "ecog": 0,
                  "estimated_mortality_percent": 0.37,
                  "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",
                  "laterality": "left",
                  "logit": -5.6,
                  "resected_segments": 3,
                  "sex": "male",
                  "surgical_approach": "vats"
                }
              ],
              "path": "/api/calc/resect_90"
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "additionalProperties": false,
                  "properties": {
                    "items": {
                      "items": {
                        "properties": {
                          "age": {
                            "description": "Age in years (18-120). Taylor 2021 Table 3 coefficient 0.041 per year. magent does not read a chart.",
                            "type": "integer"
                          },
                          "anemia": {
                            "description": "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.",
                            "type": "boolean"
                          },
                          "arrhythmia": {
                            "description": "Preoperative arrhythmia as assigned by the caller (Taylor 2021 Table 3 +0.608). true or false. magent does not read an ECG.",
                            "type": "boolean"
                          },
                          "bmi": {
                            "description": "Body-mass index in kg/m2 (10-80). Taylor 2021 Table 3 subtracts 0.056 per kg/m2. magent does not weigh the patient.",
                            "type": "number"
                          },
                          "creatinine_umol_l": {
                            "description": "Serum creatinine in µmol/L as published (20-2000). Taylor 2021 Table 3 coefficient 0.005 per µmol/L. Not mg/dL.",
                            "type": "number"
                          },
                          "diagnosis": {
                            "description": "Diagnosis as assigned by the caller. benign is the reference (0). malignant (confirmed or suspected) adds 0.769 (Taylor 2021 Table 3).",
                            "enum": [
                              "benign",
                              "malignant"
                            ],
                            "type": "string"
                          },
                          "dlco_percent": {
                            "description": "Percent predicted DLCO (10-200). Taylor 2021 Table 3 subtracts 0.029 per percent. magent does not read spirometry or a gas-transfer tracing.",
                            "type": "number"
                          },
                          "ecog": {
                            "description": "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.",
                            "type": "integer"
                          },
                          "laterality": {
                            "description": "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.",
                            "enum": [
                              "left",
                              "right"
                            ],
                            "type": "string"
                          },
                          "resected_segments": {
                            "description": "Number of resected bronchopulmonary segments (0-19). Taylor 2021 Table 3 coefficient 0.179 per segment. magent does not map a procedure to segments.",
                            "type": "integer"
                          },
                          "sex": {
                            "description": "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.",
                            "enum": [
                              "male",
                              "female"
                            ],
                            "type": "string"
                          },
                          "surgical_approach": {
                            "description": "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.",
                            "enum": [
                              "vats",
                              "thoracotomy"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "age",
                          "sex",
                          "ecog",
                          "dlco_percent",
                          "bmi",
                          "creatinine_umol_l",
                          "anemia",
                          "arrhythmia",
                          "laterality",
                          "surgical_approach",
                          "diagnosis",
                          "resected_segments"
                        ],
                        "type": "object"
                      },
                      "maxItems": 25,
                      "minItems": 1,
                      "type": "array"
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "type": "object"
                },
                "headers": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "method": {
                  "const": "POST",
                  "type": "string"
                },
                "type": {
                  "const": "http",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "method"
              ],
              "type": "object"
            },
            "output": {
              "properties": {
                "example": {
                  "type": "object"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          },
          "required": [
            "input"
          ],
          "type": "object"
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "api.magentlab.com",
    "manifest_name": "api.magentlab.com",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-14T01:15:01.050Z"
  },
  "exampleResponse": {
    "example": {},
    "type": "string"
  }
}