Liver · LIVE
Liver decompensation after HCC resection
HCC-LD
Apply the Citterio 2016 JAMA Surgery hierarchic three-class rule to caller-assigned portal hypertension, planned major hepatectomy, and MELD, and return risk low, intermediate, or high with the published liver-decompensation and liver-related mortality percents.
Markdown: /docs/hcc-ld.md · Canonical: https://magentlab.com/docs/hcc-ld
Not a medical device. Not a diagnosis, dose, or listing recommendation.
What it computes
Apply the Citterio 2016 JAMA Surgery hierarchic three-class rule to caller-assigned portal hypertension, planned major hepatectomy, and MELD, and return risk low, intermediate, or high with the published liver-decompensation and liver-related mortality percents.
When to use
When an agent already has caller-assigned portal hypertension, planned resection extent, and a MELD score, and needs the published Citterio 2016 HCC-resection decompensation class. magent does not compute MELD or HVPG.
When not to use
- Not a medical device and not a diagnosis of hepatocellular carcinoma or liver decompensation.
- Not a surgical indication and not a transplant listing protocol.
- Citterio 2016 JAMA Surgery published classes only. High is portal hypertension plus major hepatectomy. Low is no portal hypertension, minor resection, and MELD ≤ 9. All other combinations are intermediate.
- portal_hypertension, major_hepatectomy, and meld are caller-assigned. magent does not measure HVPG, choose extent of resection, or compute MELD.
- Not ALBI. This tool does not implement Johnson 2015 albumin-bilirubin grade.
Formula
Citterio 2016 JAMA Surgery: high if portal_hypertension and major_hepatectomy; low if not portal_hypertension and not major_hepatectomy and meld ≤ 9; else intermediate. Published LD 4.9 / 28.6 / 60.0 and liver-related mortality 4.4 / 9.0 / 25.0. Caller-assigned PHT, planned extent, and MELD. magent does not compute MELD or HVPG.
Citation
- Authors
- Citterio D, Facciorusso A, Sposito C, Rota R, Bhoori S, Mazzaferro V
- Source
- JAMA Surg. 2016;151(9):846-853
Worked example
No PHT, minor resection, MELD 8 is low
Given:
major_hepatectomy=falsemeld=8portal_hypertension=false
- portal_hypertension false, major_hepatectomy false, meld 8
- Not portal hypertension plus major hepatectomy
- No PHT, minor resection, and MELD ≤ 9 → risk low (LD 4.9%, liver-related mortality 4.4%)
PHT plus major hepatectomy is high
Given:
major_hepatectomy=truemeld=8portal_hypertension=true
- portal_hypertension true, major_hepatectomy true, meld 8
- Portal hypertension and major hepatectomy is high regardless of MELD (LD 60.0%, liver-related mortality 25.0%)
No PHT plus major hepatectomy is intermediate
Given:
major_hepatectomy=truemeld=8portal_hypertension=false
- portal_hypertension false, major_hepatectomy true, meld 8
- Not the high node and not the low node → risk intermediate (LD 28.6%, liver-related mortality 9.0%)
Also searched as
- Citterio HCC-LD
- liver decompensation after HCC resection
- HCC resection decompensation
- Citterio 2016
- post-hepatectomy liver decompensation
- hepatocellular carcinoma resection risk
- Citterio JAMA Surgery
Try
Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.
/api/calc/hcc_ld?portal_hypertension=false&major_hepatectomy=false&meld=8
Full URL: https://api.magentlab.com/api/calc/hcc_ld?portal_hypertension=false&major_hepatectomy=false&meld=8
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/hcc_ld?portal_hypertension=false&major_hepatectomy=false&meld=8"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
portal_hypertension |
boolean | required | Clinically significant portal hypertension as assigned by the caller (Citterio 2016). true or false. magent does not measure HVPG or assign portal hypertension. |
major_hepatectomy |
boolean | required | Planned major hepatectomy as assigned by the caller (Citterio 2016). true or false. magent does not choose extent of resection. |
meld |
integer | required | Caller-assigned MELD integer 6-40 (Citterio 2016). Low requires meld ≤ 9 when portal hypertension and major hepatectomy are both false. magent does not compute MELD. |
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": [
{
"major_hepatectomy": "false",
"meld": "8",
"portal_hypertension": "false"
},
{
"major_hepatectomy": "false",
"meld": "8",
"portal_hypertension": "false"
}
]
}
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/hcc_ld",
"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": "Citterio D, Facciorusso A, Sposito C, Rota R, Bhoori S, Mazzaferro V",
"doi": "10.1001/jamasurg.2016.1121",
"id": "citterio-2016",
"pmid": "27248425",
"source": "JAMA Surg. 2016;151(9):846-853",
"title": "Hierarchic Interaction of Factors Associated With Liver Decompensation After Resection for Hepatocellular Carcinoma"
},
"formula": "hcc_ld",
"formula_expression": "Citterio 2016 JAMA Surgery: high if portal_hypertension and major_hepatectomy; low if not portal_hypertension and not major_hepatectomy and meld ≤ 9; else intermediate. Published LD 4.9 / 28.6 / 60.0 and liver-related mortality 4.4 / 9.0 / 25.0. Caller-assigned PHT, planned extent, and MELD. magent does not compute MELD or HVPG.",
"criteria": [
{
"factor": "portal_hypertension",
"met": false
},
{
"factor": "major_hepatectomy",
"met": false
},
{
"value": 8,
"factor": "meld_le_9",
"met": true
},
{
"factor": "low",
"met": true
},
{
"factor": "intermediate",
"met": false
},
{
"factor": "high",
"met": false
}
],
"risk": "low",
"ld_rate_percent": 4.9,
"liver_related_mortality_percent": 4.4,
"major_hepatectomy": false,
"meld": 8,
"portal_hypertension": 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": "Citterio D, Facciorusso A, Sposito C, Rota R, Bhoori S, Mazzaferro V",
"doi": "10.1001/jamasurg.2016.1121",
"id": "citterio-2016",
"pmid": "27248425",
"source": "JAMA Surg. 2016;151(9):846-853",
"title": "Hierarchic Interaction of Factors Associated With Liver Decompensation After Resection for Hepatocellular Carcinoma"
},
"formula": "hcc_ld",
"formula_expression": "Citterio 2016 JAMA Surgery: high if portal_hypertension and major_hepatectomy; low if not portal_hypertension and not major_hepatectomy and meld ≤ 9; else intermediate. Published LD 4.9 / 28.6 / 60.0 and liver-related mortality 4.4 / 9.0 / 25.0. Caller-assigned PHT, planned extent, and MELD. magent does not compute MELD or HVPG.",
"criteria": [
{
"factor": "portal_hypertension",
"met": false
},
{
"factor": "major_hepatectomy",
"met": false
},
{
"value": 8,
"factor": "meld_le_9",
"met": true
},
{
"factor": "low",
"met": true
},
{
"factor": "intermediate",
"met": false
},
{
"factor": "high",
"met": false
}
],
"risk": "low",
"ld_rate_percent": 4.9,
"liver_related_mortality_percent": 4.4,
"major_hepatectomy": false,
"meld": 8,
"portal_hypertension": false
}
]
}
Response
| Field | Type | Description |
|---|---|---|
formula |
string | hcc_ld |
formula_expression |
string | Published Citterio 2016 JAMA Surgery three-class hierarchic rule |
portal_hypertension |
boolean | Caller-assigned clinically significant portal hypertension used |
major_hepatectomy |
boolean | Caller-assigned planned major hepatectomy used |
meld |
integer | Caller-assigned MELD integer 6-40 echoed. magent does not recompute MELD. |
risk |
string | low, intermediate, or high (Citterio 2016). High if portal hypertension and major hepatectomy. Low if neither and meld ≤ 9. Else intermediate. Not a surgical indication or transplant listing. |
ld_rate_percent |
number | Published liver-decompensation percent: 4.9 low, 28.6 intermediate, 60.0 high |
liver_related_mortality_percent |
number | Published liver-related mortality percent: 4.4 low, 9.0 intermediate, 25.0 high |
criteria |
array | Tree rows for portal_hypertension, major_hepatectomy, meld_le_9, and exclusive low, intermediate, high with factor and met |
citation |
object | Citterio 2016 JAMA Surgery 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": "Citterio D, Facciorusso A, Sposito C, Rota R, Bhoori S, Mazzaferro V",
"doi": "10.1001/jamasurg.2016.1121",
"id": "citterio-2016",
"pmid": "27248425",
"source": "JAMA Surg. 2016;151(9):846-853",
"title": "Hierarchic Interaction of Factors Associated With Liver Decompensation After Resection for Hepatocellular Carcinoma"
},
"formula": "hcc_ld",
"formula_expression": "Citterio 2016 JAMA Surgery: high if portal_hypertension and major_hepatectomy; low if not portal_hypertension and not major_hepatectomy and meld ≤ 9; else intermediate. Published LD 4.9 / 28.6 / 60.0 and liver-related mortality 4.4 / 9.0 / 25.0. Caller-assigned PHT, planned extent, and MELD. magent does not compute MELD or HVPG.",
"criteria": [
{
"factor": "portal_hypertension",
"met": false
},
{
"factor": "major_hepatectomy",
"met": false
},
{
"value": 8,
"factor": "meld_le_9",
"met": true
},
{
"factor": "low",
"met": true
},
{
"factor": "intermediate",
"met": false
},
{
"factor": "high",
"met": false
}
],
"risk": "low",
"ld_rate_percent": 4.9,
"liver_related_mortality_percent": 4.4,
"major_hepatectomy": false,
"meld": 8,
"portal_hypertension": false
}
Client errors (HTTP 400)
Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_meld_score |
meld must be an integer from 6 to 40 (Citterio 2016 caller-assigned MELD; magent does not recompute MELD). Returned before settlement; you are not charged. |
| 400 | invalid_flag |
boolean clinical flags must be true or false 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 — Compute the Kamath 2001 model for end-stage liver disease (MELD) integer from creatinine, bilirubin, INR, and cholestatic or alcoholic etiology.
- Child–Pugh — Compute the Child–Turcotte–Pugh cirrhosis severity score from bilirubin, albumin, INR, encephalopathy, and ascites.
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.