Liver · LIVE
VOCAL-Penn 30-day postoperative mortality
VOCAL-Penn
Compute the Mahmud 2021 VOCAL-Penn 30-day postoperative mortality percent for cirrhosis from caller-assigned ASA class, surgery category, emergency indication, NAFLD, obesity, albumin, bilirubin, and platelet count.
Markdown: /docs/vocal-penn.md · Canonical: https://magentlab.com/docs/vocal-penn
Not a medical device. Not a diagnosis, dose, or listing recommendation.
What it computes
Compute the Mahmud 2021 VOCAL-Penn 30-day postoperative mortality percent for cirrhosis from caller-assigned ASA class, surgery category, emergency indication, NAFLD, obesity, albumin, bilirubin, and platelet count.
When to use
When an agent needs the published Mahmud 2021 30-day VOCAL-Penn logistic probability and must not invent a surgical-candidacy order, assign ASA class, or substitute MELD or Child-Pugh.
When not to use
- Not a medical device.
- Not a surgical-candidacy order and not an operative go/no-go.
- magent does not assign ASA class and does not read laboratory values.
- Mahmud 2021 Supplement Appendix 30-day logistic only. This is not the 90-day or 180-day conditional model.
- Age is required because the published tool asks for it. The 30-day Appendix linear predictor does not retain age (age appears in the 90- and 180-day models).
- abdominal is the Appendix open-abdominal dummy. abdominal_laparoscopic is the surgery reference. chest and cardiac share the printed chest/cardiac coefficient (Supplemental Table 1 combined those CPT groups).
- ASA is caller-assigned 2, 3, or 4. The derivation cohort had no ASA 1 and excluded ASA 5.
- Obesity is caller-assigned BMI ≥30. Fatty liver disease is caller-assigned NAFLD etiology.
Formula
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
Citation
- Authors
- Mahmud N, Fricker Z, Hubbard RA, Ioannou GN, Lewis JD, Taddei TH, Rothstein KD, Serper M, Goldberg DS, Kaplan DE
- Source
- Hepatology. 2021;73(1):204-218
Worked example
Age 60, albumin 3.5 g/dL, bilirubin 1.2 mg/dL, platelets 150, ASA 3, elective abdominal wall
Given:
age=60albumin_g_dl=3.5asa_class=3bilirubin_mg_dl=1.2emergency=falsefatty_liver_disease=falseobesity=falseplatelets_10e9_l=150surgery_category=abdominal_wall
- Supplemental Table 2 three-knot RCS: albumin 2.7, 3.7, 4.4; platelets 75, 152, 271. albumin_sp1=3.5; albumin_sp2=0.1772; platelets_sp1=150; platelets_sp2=10.9818. abdominal_wall dummy=1; laparoscopic abdominal is the reference. ASA=3 ordinal. Emergency, obesity, and NAFLD are 0.
- log_odds = -5.472096 + 1.061725*3 + 0.7418021 - 0.0075185*150 + 0.0036657*10.9818 - 0.5181509*3.5 - 1.000672*0.1772 + 0.1448936*1.2
- mortality_30d_percent = 100*exp(log_odds)/(1+exp(log_odds)) → 1.2
Also searched as
- VOCAL-Penn score
- VOCAL Penn
- cirrhosis surgical risk
- postoperative mortality cirrhosis
- Mahmud 2021 surgical risk
- NAFLD cirrhosis surgery
- ASA cirrhosis surgery
Try
Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.
Full URL: https://api.magentlab.com/api/calc/vocal_penn?age=60&albumin_g_dl=3.5&bilirubin_mg_dl=1.2&platelets_10e9_l=150&obesity=false&fatty_liver_disease=false&asa_class=3&emergency=false&surgery_category=abdominal_wall
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/vocal_penn?age=60&albumin_g_dl=3.5&bilirubin_mg_dl=1.2&platelets_10e9_l=150&obesity=false&fatty_liver_disease=false&asa_class=3&emergency=false&surgery_category=abdominal_wall"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
age |
integer | required | 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. |
albumin_g_dl |
number | optional | 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. |
albumin_g_l |
number | optional | Preoperative albumin in g/L (10-60). Converted as g/dL = g/L / 10. |
bilirubin_mg_dl |
number | optional | 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. |
bilirubin_umol_l |
number | optional | Preoperative total bilirubin in µmol/L (2-684). Converted as mg/dL = µmol/L / 17.1. |
platelets_10e9_l |
number | required | 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. |
obesity |
boolean | required | Caller-assigned BMI ≥30 kg/m² (true/false). Protective in the 30-day model. magent does not compute BMI. |
fatty_liver_disease |
boolean | required | Caller-assigned NAFLD as the etiology of cirrhosis (true/false). magent does not assign etiology. |
asa_class |
integer | required · 2, 3, 4 | 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. |
emergency |
boolean | required | Caller-assigned emergency indication (true/false). magent does not classify urgency. |
surgery_category |
string | required · abdominal_laparoscopic, abdominal, abdominal_wall, vascular, orthopedic, chest, cardiac | 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. |
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.
- 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": "60",
"albumin_g_dl": "3.5",
"asa_class": "3",
"bilirubin_mg_dl": "1.2",
"emergency": "false",
"fatty_liver_disease": "false",
"obesity": "false",
"platelets_10e9_l": "150",
"surgery_category": "abdominal_wall"
},
{
"age": "60",
"albumin_g_dl": "3.5",
"asa_class": "3",
"bilirubin_mg_dl": "1.2",
"emergency": "false",
"fatty_liver_disease": "false",
"obesity": "false",
"platelets_10e9_l": "150",
"surgery_category": "abdominal_wall"
}
]
}
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/vocal_penn",
"items": [
{
"emergency": 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": "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"
},
"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",
"age_years": 60,
"albumin_g_dl": 3.5,
"bilirubin_mg_dl": 1.2,
"platelets_10e9_l": 150.0,
"logit": -4.4496,
"asa_class": 3,
"fatty_liver_disease": false,
"mortality_30d_percent": 1.2,
"obesity": false,
"surgery_category": "abdominal_wall"
},
{
"emergency": 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": "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"
},
"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",
"age_years": 60,
"albumin_g_dl": 3.5,
"bilirubin_mg_dl": 1.2,
"platelets_10e9_l": 150.0,
"logit": -4.4496,
"asa_class": 3,
"fatty_liver_disease": false,
"mortality_30d_percent": 1.2,
"obesity": false,
"surgery_category": "abdominal_wall"
}
]
}
Response
| Field | Type | Description |
|---|---|---|
formula |
string | mahmud_vocal_penn_30d_2021 |
formula_expression |
string | Mahmud 2021 Supplement Appendix 30-day log-odds expression |
age_years |
integer | Input age in years; not a term in the 30-day Appendix linear predictor |
albumin_g_dl |
number | Input albumin in g/dL |
bilirubin_mg_dl |
number | Input bilirubin in mg/dL |
platelets_10e9_l |
number | Input platelet count in 10^9/L |
obesity |
boolean | Caller-assigned BMI ≥30 |
fatty_liver_disease |
boolean | Caller-assigned NAFLD etiology |
asa_class |
integer | Caller-assigned ASA class 2, 3, or 4 |
emergency |
boolean | Caller-assigned emergency indication |
surgery_category |
string | Appendix surgery dummy used in the linear predictor |
logit |
number | Appendix 30-day log-odds, 4 decimal places |
mortality_30d_percent |
number | 100 * exp(log_odds) / (1 + exp(log_odds)) from the unrounded logit, 1 decimal. A probability, not a surgical order. |
citation |
object | Mahmud 2021 citation |
disclaimer |
string | Not-a-device notice |
Example JSON
Machine form of the same example. Frozen fixture. Not a live lookup.
{
"emergency": 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": "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"
},
"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",
"age_years": 60,
"albumin_g_dl": 3.5,
"bilirubin_mg_dl": 1.2,
"platelets_10e9_l": 150.0,
"logit": -4.4496,
"asa_class": 3,
"fatty_liver_disease": false,
"mortality_30d_percent": 1.2,
"obesity": false,
"surgery_category": "abdominal_wall"
}
Client errors (HTTP 400)
Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_vocal_penn |
VOCAL-Penn inputs must match Mahmud 2021 age, albumin, bilirubin, platelets, obesity, fatty liver disease, ASA class, emergency indication, and surgery category. 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
- MELD-Na — Compute OPTN/UNOS 2016 MELD and MELD-Na from creatinine, bilirubin, INR, sodium, and dialysis.
- Child–Pugh — Compute the Child–Turcotte–Pugh cirrhosis severity score from bilirubin, albumin, INR, encephalopathy, and ascites.
- MELD 3.0 — Compute the Kim 2021 MELD 3.0 integer from sex, bilirubin, INR, creatinine, sodium, albumin, and dialysis.
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.