{
  "x402Version": 2,
  "id": 38915,
  "slug": "38915",
  "resource": "https://api.magentlab.com/api/calc/vocal_penn",
  "description": "Mahmud 2021 VOCAL-Penn 30-day postoperative mortality logistic for cirrhosis. log_odds = -5.472096 + 1.061725*ASA + 0.927904*emergency + surgery dummies (laparoscopic abdominal reference) + Stata 3-knot RCS albumin (2.7, 3.7, 4.4) and platelets (75, 152, 271) + 0.1448936*bilirubin - 0.7541669*obesity + 0.8268748*NAFLD. Percent to 1 decimal. Not a surgical order. magent does not assign ASA or read labs.",
  "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": 60,
                "albumin_g_dl": 3.5,
                "albumin_g_l": 35,
                "asa_class": 3,
                "bilirubin_mg_dl": 1.2,
                "bilirubin_umol_l": 20.52,
                "emergency": false,
                "fatty_liver_disease": false,
                "obesity": false,
                "platelets_10e9_l": 150,
                "surgery_category": "abdominal_wall"
              },
              {
                "age": 60,
                "albumin_g_dl": 3.5,
                "albumin_g_l": 35,
                "asa_class": 3,
                "bilirubin_mg_dl": 1.2,
                "bilirubin_umol_l": 20.52,
                "emergency": false,
                "fatty_liver_disease": false,
                "obesity": false,
                "platelets_10e9_l": 150,
                "surgery_category": "abdominal_wall"
              }
            ]
          },
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "count": 2,
            "items": [
              {
                "age_years": 60,
                "albumin_g_dl": 3.5,
                "asa_class": 3,
                "bilirubin_mg_dl": 1.2,
                "citation": {
                  "authors": "Mahmud N, Fricker Z, Hubbard RA, Ioannou GN, Lewis JD, Taddei TH, Rothstein KD, Serper M, Goldberg DS, Kaplan DE",
                  "doi": "10.1002/hep.31558",
                  "id": "mahmud-2021-vocal-penn",
                  "pmid": "32939786",
                  "source": "Hepatology. 2021;73(1):204-218",
                  "title": "Risk Prediction Models for Post-Operative Mortality in Patients With Cirrhosis"
                },
                "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.",
                "emergency": false,
                "fatty_liver_disease": false,
                "formula": "mahmud_vocal_penn_30d_2021",
                "formula_expression": "log_odds = -5.472096 + 1.061725*ASA + 0.927904*emergency + 1.56071*abdominal_open + 0.7418021*abdominal_wall + 0.9165415*vascular + 1.464183*orthopedic + 1.893621*chest_cardiac - 0.0075185*platelets_sp1 + 0.0036657*platelets_sp2 - 0.5181509*albumin_sp1 - 1.000672*albumin_sp2 + 0.1448936*bilirubin_mg_dl - 0.7541669*obesity + 0.8268748*NAFLD; laparoscopic abdominal is the surgery reference; sp1 = x; sp2 = Stata mkspline 3-knot restricted cubic spline / (k3-k1)^2; albumin knots 2.7, 3.7, 4.4 g/dL; platelets knots 75, 152, 271 x10^9/L; mortality_30d_percent = 100*exp(log_odds)/(1+exp(log_odds)), 1 decimal",
                "logit": -4.4496,
                "mortality_30d_percent": 1.2,
                "obesity": false,
                "platelets_10e9_l": 150,
                "surgery_category": "abdominal_wall"
              },
              {
                "age_years": 60,
                "albumin_g_dl": 3.5,
                "asa_class": 3,
                "bilirubin_mg_dl": 1.2,
                "citation": {
                  "authors": "Mahmud N, Fricker Z, Hubbard RA, Ioannou GN, Lewis JD, Taddei TH, Rothstein KD, Serper M, Goldberg DS, Kaplan DE",
                  "doi": "10.1002/hep.31558",
                  "id": "mahmud-2021-vocal-penn",
                  "pmid": "32939786",
                  "source": "Hepatology. 2021;73(1):204-218",
                  "title": "Risk Prediction Models for Post-Operative Mortality in Patients With Cirrhosis"
                },
                "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.",
                "emergency": false,
                "fatty_liver_disease": false,
                "formula": "mahmud_vocal_penn_30d_2021",
                "formula_expression": "log_odds = -5.472096 + 1.061725*ASA + 0.927904*emergency + 1.56071*abdominal_open + 0.7418021*abdominal_wall + 0.9165415*vascular + 1.464183*orthopedic + 1.893621*chest_cardiac - 0.0075185*platelets_sp1 + 0.0036657*platelets_sp2 - 0.5181509*albumin_sp1 - 1.000672*albumin_sp2 + 0.1448936*bilirubin_mg_dl - 0.7541669*obesity + 0.8268748*NAFLD; laparoscopic abdominal is the surgery reference; sp1 = x; sp2 = Stata mkspline 3-knot restricted cubic spline / (k3-k1)^2; albumin knots 2.7, 3.7, 4.4 g/dL; platelets knots 75, 152, 271 x10^9/L; mortality_30d_percent = 100*exp(log_odds)/(1+exp(log_odds)), 1 decimal",
                "logit": -4.4496,
                "mortality_30d_percent": 1.2,
                "obesity": false,
                "platelets_10e9_l": 150,
                "surgery_category": "abdominal_wall"
              }
            ],
            "path": "/api/calc/vocal_penn"
          },
          "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). The Mahmud 2021 Supplement Appendix 30-day linear predictor does not retain age (age is in the 90- and 180-day models). Required because the published tool asks for it.",
                          "type": "integer"
                        },
                        "albumin_g_dl": {
                          "description": "Preoperative albumin in g/dL (1.0-6.0). Provide this or albumin_g_l. Restricted cubic spline knots 2.7, 3.7, 4.4 (Supplemental Table 2). magent does not read the laboratory.",
                          "type": "number"
                        },
                        "albumin_g_l": {
                          "description": "Preoperative albumin in g/L (10-60). Converted as g/dL = g/L / 10.",
                          "type": "number"
                        },
                        "asa_class": {
                          "description": "Caller-assigned ASA physical status 2, 3, or 4 (ordinal in the Appendix). The derivation cohort had no ASA 1 and excluded ASA 5. magent does not assign ASA class.",
                          "enum": [
                            2,
                            3,
                            4
                          ],
                          "type": "integer"
                        },
                        "bilirubin_mg_dl": {
                          "description": "Preoperative total bilirubin in mg/dL (0.1-40). Provide this or bilirubin_umol_l. Linear in the 30-day Appendix model. magent does not read the laboratory.",
                          "type": "number"
                        },
                        "bilirubin_umol_l": {
                          "description": "Preoperative total bilirubin in µmol/L (2-684). Converted as mg/dL = µmol/L / 17.1.",
                          "type": "number"
                        },
                        "emergency": {
                          "description": "Caller-assigned emergency indication (true/false). magent does not classify urgency.",
                          "type": "boolean"
                        },
                        "fatty_liver_disease": {
                          "description": "Caller-assigned NAFLD as the etiology of cirrhosis (true/false). magent does not assign etiology.",
                          "type": "boolean"
                        },
                        "obesity": {
                          "description": "Caller-assigned BMI ≥30 kg/m² (true/false). Protective in the 30-day model. magent does not compute BMI.",
                          "type": "boolean"
                        },
                        "platelets_10e9_l": {
                          "description": "Preoperative platelet count in 10^9/L (10-800), equal to 1,000/µL. Spline knots 75, 152, 271 (Supplemental Table 2). magent does not read the laboratory.",
                          "type": "number"
                        },
                        "surgery_category": {
                          "description": "Mahmud 2021 Appendix surgery dummy as assigned by the caller. abdominal_laparoscopic is the reference (0). abdominal is open abdominal. chest and cardiac share the printed chest/cardiac coefficient. magent does not classify a CPT code.",
                          "enum": [
                            "abdominal_laparoscopic",
                            "abdominal",
                            "abdominal_wall",
                            "vascular",
                            "orthopedic",
                            "chest",
                            "cardiac"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "age",
                        "platelets_10e9_l",
                        "obesity",
                        "fatty_liver_disease",
                        "asa_class",
                        "emergency",
                        "surgery_category"
                      ],
                      "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": [
    "vocal-penn",
    "cirrhosis",
    "liver",
    "surgery",
    "calculator",
    "bazaar"
  ],
  "sourceHost": "api.magentlab.com",
  "lastUpdated": "2026-10-13T16:17:20.485Z",
  "quality": {
    "calls30d": 6,
    "uniquePayers30d": 3,
    "lastCalledAt": "2026-10-13T16:17:20.339Z"
  },
  "metadata": {
    "serviceName": "magent",
    "extensions": {
      "bazaar": {
        "info": {
          "iconUrl": "https://api.magentlab.com/favicon.ico",
          "input": {
            "body": {
              "items": [
                {
                  "age": 60,
                  "albumin_g_dl": 3.5,
                  "albumin_g_l": 35,
                  "asa_class": 3,
                  "bilirubin_mg_dl": 1.2,
                  "bilirubin_umol_l": 20.52,
                  "emergency": false,
                  "fatty_liver_disease": false,
                  "obesity": false,
                  "platelets_10e9_l": 150,
                  "surgery_category": "abdominal_wall"
                },
                {
                  "age": 60,
                  "albumin_g_dl": 3.5,
                  "albumin_g_l": 35,
                  "asa_class": 3,
                  "bilirubin_mg_dl": 1.2,
                  "bilirubin_umol_l": 20.52,
                  "emergency": false,
                  "fatty_liver_disease": false,
                  "obesity": false,
                  "platelets_10e9_l": 150,
                  "surgery_category": "abdominal_wall"
                }
              ]
            },
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "count": 2,
              "items": [
                {
                  "age_years": 60,
                  "albumin_g_dl": 3.5,
                  "asa_class": 3,
                  "bilirubin_mg_dl": 1.2,
                  "citation": {
                    "authors": "Mahmud N, Fricker Z, Hubbard RA, Ioannou GN, Lewis JD, Taddei TH, Rothstein KD, Serper M, Goldberg DS, Kaplan DE",
                    "doi": "10.1002/hep.31558",
                    "id": "mahmud-2021-vocal-penn",
                    "pmid": "32939786",
                    "source": "Hepatology. 2021;73(1):204-218",
                    "title": "Risk Prediction Models for Post-Operative Mortality in Patients With Cirrhosis"
                  },
                  "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.",
                  "emergency": false,
                  "fatty_liver_disease": false,
                  "formula": "mahmud_vocal_penn_30d_2021",
                  "formula_expression": "log_odds = -5.472096 + 1.061725*ASA + 0.927904*emergency + 1.56071*abdominal_open + 0.7418021*abdominal_wall + 0.9165415*vascular + 1.464183*orthopedic + 1.893621*chest_cardiac - 0.0075185*platelets_sp1 + 0.0036657*platelets_sp2 - 0.5181509*albumin_sp1 - 1.000672*albumin_sp2 + 0.1448936*bilirubin_mg_dl - 0.7541669*obesity + 0.8268748*NAFLD; laparoscopic abdominal is the surgery reference; sp1 = x; sp2 = Stata mkspline 3-knot restricted cubic spline / (k3-k1)^2; albumin knots 2.7, 3.7, 4.4 g/dL; platelets knots 75, 152, 271 x10^9/L; mortality_30d_percent = 100*exp(log_odds)/(1+exp(log_odds)), 1 decimal",
                  "logit": -4.4496,
                  "mortality_30d_percent": 1.2,
                  "obesity": false,
                  "platelets_10e9_l": 150,
                  "surgery_category": "abdominal_wall"
                },
                {
                  "age_years": 60,
                  "albumin_g_dl": 3.5,
                  "asa_class": 3,
                  "bilirubin_mg_dl": 1.2,
                  "citation": {
                    "authors": "Mahmud N, Fricker Z, Hubbard RA, Ioannou GN, Lewis JD, Taddei TH, Rothstein KD, Serper M, Goldberg DS, Kaplan DE",
                    "doi": "10.1002/hep.31558",
                    "id": "mahmud-2021-vocal-penn",
                    "pmid": "32939786",
                    "source": "Hepatology. 2021;73(1):204-218",
                    "title": "Risk Prediction Models for Post-Operative Mortality in Patients With Cirrhosis"
                  },
                  "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.",
                  "emergency": false,
                  "fatty_liver_disease": false,
                  "formula": "mahmud_vocal_penn_30d_2021",
                  "formula_expression": "log_odds = -5.472096 + 1.061725*ASA + 0.927904*emergency + 1.56071*abdominal_open + 0.7418021*abdominal_wall + 0.9165415*vascular + 1.464183*orthopedic + 1.893621*chest_cardiac - 0.0075185*platelets_sp1 + 0.0036657*platelets_sp2 - 0.5181509*albumin_sp1 - 1.000672*albumin_sp2 + 0.1448936*bilirubin_mg_dl - 0.7541669*obesity + 0.8268748*NAFLD; laparoscopic abdominal is the surgery reference; sp1 = x; sp2 = Stata mkspline 3-knot restricted cubic spline / (k3-k1)^2; albumin knots 2.7, 3.7, 4.4 g/dL; platelets knots 75, 152, 271 x10^9/L; mortality_30d_percent = 100*exp(log_odds)/(1+exp(log_odds)), 1 decimal",
                  "logit": -4.4496,
                  "mortality_30d_percent": 1.2,
                  "obesity": false,
                  "platelets_10e9_l": 150,
                  "surgery_category": "abdominal_wall"
                }
              ],
              "path": "/api/calc/vocal_penn"
            },
            "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). The Mahmud 2021 Supplement Appendix 30-day linear predictor does not retain age (age is in the 90- and 180-day models). Required because the published tool asks for it.",
                            "type": "integer"
                          },
                          "albumin_g_dl": {
                            "description": "Preoperative albumin in g/dL (1.0-6.0). Provide this or albumin_g_l. Restricted cubic spline knots 2.7, 3.7, 4.4 (Supplemental Table 2). magent does not read the laboratory.",
                            "type": "number"
                          },
                          "albumin_g_l": {
                            "description": "Preoperative albumin in g/L (10-60). Converted as g/dL = g/L / 10.",
                            "type": "number"
                          },
                          "asa_class": {
                            "description": "Caller-assigned ASA physical status 2, 3, or 4 (ordinal in the Appendix). The derivation cohort had no ASA 1 and excluded ASA 5. magent does not assign ASA class.",
                            "enum": [
                              2,
                              3,
                              4
                            ],
                            "type": "integer"
                          },
                          "bilirubin_mg_dl": {
                            "description": "Preoperative total bilirubin in mg/dL (0.1-40). Provide this or bilirubin_umol_l. Linear in the 30-day Appendix model. magent does not read the laboratory.",
                            "type": "number"
                          },
                          "bilirubin_umol_l": {
                            "description": "Preoperative total bilirubin in µmol/L (2-684). Converted as mg/dL = µmol/L / 17.1.",
                            "type": "number"
                          },
                          "emergency": {
                            "description": "Caller-assigned emergency indication (true/false). magent does not classify urgency.",
                            "type": "boolean"
                          },
                          "fatty_liver_disease": {
                            "description": "Caller-assigned NAFLD as the etiology of cirrhosis (true/false). magent does not assign etiology.",
                            "type": "boolean"
                          },
                          "obesity": {
                            "description": "Caller-assigned BMI ≥30 kg/m² (true/false). Protective in the 30-day model. magent does not compute BMI.",
                            "type": "boolean"
                          },
                          "platelets_10e9_l": {
                            "description": "Preoperative platelet count in 10^9/L (10-800), equal to 1,000/µL. Spline knots 75, 152, 271 (Supplemental Table 2). magent does not read the laboratory.",
                            "type": "number"
                          },
                          "surgery_category": {
                            "description": "Mahmud 2021 Appendix surgery dummy as assigned by the caller. abdominal_laparoscopic is the reference (0). abdominal is open abdominal. chest and cardiac share the printed chest/cardiac coefficient. magent does not classify a CPT code.",
                            "enum": [
                              "abdominal_laparoscopic",
                              "abdominal",
                              "abdominal_wall",
                              "vascular",
                              "orthopedic",
                              "chest",
                              "cardiac"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "age",
                          "platelets_10e9_l",
                          "obesity",
                          "fatty_liver_disease",
                          "asa_class",
                          "emergency",
                          "surgery_category"
                        ],
                        "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"
  }
}