management of hepatorenal syndrome in short
management of hepatorenal syndrome in short
"hepatorenal syndrome" AND treatment
Create a clinical decision flowchart or summary document for HRS management
/tmp/workspace
mkdir -p /tmp/workspace/hrs-management/output && ls -la /tmp/workspace/hrs-management
~/hrs-management/build_flowchart.py
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
from matplotlib.patches import FancyBboxPatch, FancyArrowPatch
from matplotlib.lines import Line2D
fig, ax = plt.subplots(figsize=(11, 16))
ax.set_xlim(0, 10)
ax.set_ylim(0, 100)
ax.axis("off")
def box(x, y, w, h, text, fc="#eaf2fb", ec="#2c5f8a", fontsize=9.5, weight="normal"):
b = FancyBboxPatch((x, y), w, h, boxstyle="round,pad=0.15,rounding_size=0.3",
linewidth=1.4, edgecolor=ec, facecolor=fc)
ax.add_patch(b)
ax.text(x + w/2, y + h/2, text, ha="center", va="center", fontsize=fontsize,
weight=weight, wrap=True, linespacing=1.35)
return (x + w/2, y, x + w/2, y + h)
def arrow(x1, y1, x2, y2, text=None, color="#333333"):
a = FancyArrowPatch((x1, y1), (x2, y2), arrowstyle="-|>", mutation_scale=14,
linewidth=1.3, color=color)
ax.add_patch(a)
if text:
ax.text((x1 + x2)/2 + 0.15, (y1 + y2)/2, text, fontsize=8.5, color=color,
ha="left", va="center", style="italic")
# Title
ax.text(5, 98.5, "Hepatorenal Syndrome (HRS) - Management Algorithm", ha="center",
va="center", fontsize=15, weight="bold", color="#1a3a5c")
# Box 1: Trigger
cx, by, cx2, ty = box(1.3, 92, 7.4, 4.3,
"Cirrhosis / advanced liver disease with ascites\n+ Acute Kidney Injury\n(Cr rise \u22650.3 mg/dL in 48h OR \u226550% from baseline)",
fc="#fde9d9", ec="#b5651d", weight="bold")
# Box 2: Step 1
box2 = box(1.3, 85.5, 7.4, 4.8,
"STEP 1 - Immediate actions\n\u2022 Stop diuretics & nephrotoxic drugs (NSAIDs, aminoglycosides)\n\u2022 Stop any vasodilators\n\u2022 Send urinalysis, urine sediment, renal ultrasound")
arrow(5, 92, 5, 90.3)
# Box 3: Step 2 exclude other causes
box3 = box(1.3, 78.5, 7.4, 5.5,
"STEP 2 - Exclude other causes of AKI\n\u2022 Volume depletion (GI bleed, over-diuresis, lactulose-induced diarrhea) \u2192 correct with fluids\n\u2022 Sepsis / SBP \u2192 diagnostic paracentesis, treat infection\n\u2022 Obstruction, ATN, interstitial nephritis, glomerulonephritis \u2192 evaluate & exclude")
arrow(5, 85.5, 5, 84.0)
# Box 4: albumin challenge
box4 = box(1.3, 71.5, 7.4, 5.0,
"STEP 3 - Plasma volume expansion (albumin challenge)\nIV Albumin 1 g/kg/day (max ~100 g/day) x 48 hours",
fc="#eaf2fb", weight="bold")
arrow(5, 78.5, 5, 76.5)
# Branch point
ax.text(5, 69.8, "Reassess serum creatinine after albumin challenge", ha="center",
fontsize=9, style="italic", color="#444444")
# Left branch: improves
boxL = box(0.3, 61.5, 4.0, 5.5,
"Creatinine IMPROVES\n\u2192 NOT HRS\nTreat underlying cause\n(e.g. hypovolemia, ATN, sepsis)",
fc="#e3f2e1", ec="#3a7d34")
arrow(3.5, 71.5, 2.3, 67.0, text="Improves")
# Right branch: no improvement -> HRS diagnosis
boxR = box(5.7, 61.5, 4.0, 5.5,
"NO improvement\n\u2192 Diagnosis: HRS-AKI\n(rapid, Type 1) or\nHRS-CKD (stable, Type 2)",
fc="#fbe3e3", ec="#a33a3a", weight="bold")
arrow(6.5, 71.5, 7.7, 67.0, text="No response")
# Box 5: pharmacologic therapy
box5 = box(1.3, 53.0, 7.4, 6.5,
"STEP 4 - Pharmacologic therapy (ICU / monitored setting) + continue albumin\n\n1st line: Terlipressin + Albumin\n2nd line (if terlipressin unavailable): Norepinephrine + Albumin\n3rd line (US, limited access): Midodrine (oral \u03b1-agonist) + Octreotide + Albumin",
fc="#eaf2fb", ec="#2c5f8a", weight="bold")
arrow(7.7, 61.5, 6.7, 59.5)
# Box 6: reassess
box6 = box(1.3, 46.0, 7.4, 4.8,
"Reassess renal function at 48-72 hours\n(repeat serum creatinine, urine output)")
arrow(5, 53.0, 5, 50.8)
# Left branch: response
boxL2 = box(0.3, 37.5, 4.0, 5.5,
"RESPONSE\n(Cr trending down)\n\u2192 Continue vasoconstrictor\n+ albumin up to 14 days,\nthen taper",
fc="#e3f2e1", ec="#3a7d34")
arrow(3.5, 46.0, 2.3, 43.0, text="Responds")
boxR2 = box(5.7, 37.5, 4.0, 5.5,
"NO RESPONSE /\nREFRACTORY HRS\n\u2192 Proceed to Step 5",
fc="#fbe3e3", ec="#a33a3a", weight="bold")
arrow(6.5, 46.0, 7.7, 43.0, text="No response")
# Box 7: refractory options
box7 = box(1.3, 28.5, 7.4, 6.5,
"STEP 5 - Refractory HRS: options\n\u2022 Renal replacement therapy (dialysis/CRRT) - bridge therapy\n\u2022 TIPS - selected patients without contraindications (e.g. encephalopathy) - evidence limited\n\u2022 Urgent liver transplant evaluation",
fc="#fdf3d0", ec="#a5871a", weight="bold")
arrow(7.7, 37.5, 6.7, 35.0)
# Box 8: transplant - definitive
box8 = box(1.3, 20.5, 7.4, 5.5,
"DEFINITIVE TREATMENT: Liver Transplantation\nRenal function typically recovers post-transplant.\nConsider combined liver-kidney transplant if renal\nfailure prolonged (>4-6 weeks) or structural kidney damage.",
fc="#d9ecfb", ec="#1a5c8a", weight="bold")
arrow(5, 28.5, 5, 26.0)
# Prognosis note
box9 = box(1.3, 14.5, 7.4, 4.5,
"Prognosis: Poor without transplant.\nHRS-AKI (rapid) has worse short-term prognosis than\nHRS-CKD (stable, chronic).",
fc="#f2f2f2", ec="#666666", fontsize=9)
arrow(5, 20.5, 5, 19.0)
# Footer / sources
ax.text(5, 11.5, "Sources: Harrison's Principles of Internal Medicine, 22nd ed.; Goldman-Cecil Medicine, Intl. Ed.\n"
"Recent evidence: PMID 40207491 (2025 meta-analysis), PMID 39295934 (2024 systematic review),\n"
"PMID 38235907 (2024 Cochrane review on TIPS)",
ha="center", fontsize=7.5, color="#555555", style="italic")
plt.tight_layout()
plt.savefig("/tmp/workspace/hrs-management/output/hrs_flowchart.png", dpi=200, bbox_inches="tight")
print("Flowchart saved.")
cd /tmp/workspace/hrs-management && python3 build_flowchart.py
~/hrs-management/build_docx.py
from docx import Document
from docx.shared import Pt, Inches, RGBColor
from docx.enum.text import WD_ALIGN_PARAGRAPH
from docx.enum.table import WD_TABLE_ALIGNMENT
from docx.oxml.ns import qn
from docx.oxml import OxmlElement
doc = Document()
style = doc.styles["Normal"]
style.font.name = "Calibri"
style.font.size = Pt(11)
def set_cell_shading(cell, color_hex):
tcPr = cell._tc.get_or_add_tcPr()
shd = OxmlElement('w:shd')
shd.set(qn('w:val'), 'clear')
shd.set(qn('w:color'), 'auto')
shd.set(qn('w:fill'), color_hex)
tcPr.append(shd)
def add_table(headers, rows, col_widths=None):
table = doc.add_table(rows=1, cols=len(headers))
table.style = "Light Grid Accent 1"
table.alignment = WD_TABLE_ALIGNMENT.CENTER
hdr_cells = table.rows[0].cells
for i, h in enumerate(headers):
hdr_cells[i].text = h
for p in hdr_cells[i].paragraphs:
for r in p.runs:
r.font.bold = True
r.font.color.rgb = RGBColor(0xFF, 0xFF, 0xFF)
set_cell_shading(hdr_cells[i], "1F4E79")
for row in rows:
cells = table.add_row().cells
for i, val in enumerate(row):
cells[i].text = str(val)
return table
# Title
title = doc.add_heading("Hepatorenal Syndrome (HRS): Clinical Management Summary", level=0)
for r in title.runs:
r.font.color.rgb = RGBColor(0x1A, 0x3A, 0x5C)
sub = doc.add_paragraph()
sub_run = sub.add_run("Quick-reference decision summary for inpatient management of HRS in cirrhosis / advanced liver disease")
sub_run.italic = True
sub_run.font.size = Pt(11)
sub_run.font.color.rgb = RGBColor(0x55, 0x55, 0x55)
doc.add_paragraph()
# Overview
doc.add_heading("Overview", level=1)
doc.add_paragraph(
"Hepatorenal syndrome (HRS) is a form of functional renal failure without intrinsic renal "
"pathology, occurring in advanced cirrhosis or acute liver failure due to marked splanchnic "
"arterial vasodilation with compensatory renal vasoconstriction. It is a diagnosis of "
"exclusion made after other causes of acute kidney injury (AKI) have been ruled out and "
"renal function fails to improve with volume expansion (albumin)."
)
# Flowchart image
doc.add_heading("Decision Flowchart", level=1)
doc.add_picture("/tmp/workspace/hrs-management/output/hrs_flowchart.png", width=Inches(6.3))
last_par = doc.paragraphs[-1]
last_par.alignment = WD_ALIGN_PARAGRAPH.CENTER
doc.add_page_break()
# Diagnostic criteria
doc.add_heading("1. Diagnostic Criteria", level=1)
add_table(
["Type", "Definition", "Course"],
[
["HRS-AKI (formerly Type 1)", "Rise in serum Cr \u22650.3 mg/dL in 48h, or \u226550% from baseline", "Rapidly progressive; worse short-term prognosis"],
["HRS-CKD (formerly Type 2)", "Reduced GFR with stable elevated creatinine", "Slowly progressive; better outcome than HRS-AKI, but still poor without transplant"],
]
)
doc.add_paragraph()
doc.add_paragraph(
"Diagnosis requires: (1) cirrhosis with ascites, (2) exclusion of shock, (3) no recent "
"nephrotoxic drug exposure, (4) no macroscopic signs of structural kidney injury "
"(proteinuria <500 mg/day, no hematuria, normal renal ultrasound), and (5) failure of "
"renal function to improve after diuretic withdrawal and albumin volume expansion "
"(1 g/kg/day for 2 days)."
)
# Step-wise management
doc.add_heading("2. Step-Wise Management", level=1)
steps = [
("Step 1: Immediate actions", "Stop diuretics and nephrotoxic drugs (NSAIDs, aminoglycosides). Stop vasodilators. Obtain urinalysis, urine sediment, and renal ultrasound."),
("Step 2: Exclude other causes of AKI", "Correct volume depletion (GI bleed, over-diuresis, lactulose-induced diarrhea). Perform diagnostic paracentesis to exclude spontaneous bacterial peritonitis (SBP) and treat if present. Exclude obstruction, acute tubular necrosis, interstitial nephritis, glomerulonephritis."),
("Step 3: Albumin challenge", "IV albumin 1 g/kg/day (max ~100 g/day) for 48 hours. If creatinine improves, HRS is excluded - treat the identified cause. If no improvement, diagnose HRS-AKI or HRS-CKD."),
("Step 4: Pharmacologic therapy", "Initiate vasoconstrictor therapy with continued albumin, in an ICU or closely monitored setting (see drug table below)."),
("Step 5: Reassess at 48-72 hours", "Responders: continue therapy up to 14 days total, then taper. Non-responders: refractory HRS - proceed to Step 6."),
("Step 6: Refractory HRS", "Consider renal replacement therapy (dialysis/CRRT) as a bridge, TIPS in selected patients without contraindications (evidence limited), and expedite liver transplant evaluation."),
("Step 7: Definitive treatment", "Liver transplantation is the only curative therapy; renal function typically recovers. Consider combined liver-kidney transplant if renal failure has been prolonged (>4-6 weeks) or there is structural kidney damage."),
]
for i, (h, body) in enumerate(steps):
p = doc.add_paragraph()
run = p.add_run(h)
run.bold = True
run.font.color.rgb = RGBColor(0x1F, 0x4E, 0x79)
doc.add_paragraph(body)
# Drug therapy table
doc.add_heading("3. Pharmacologic Therapy (Vasoconstrictors)", level=1)
add_table(
["Line", "Agent", "Typical Regimen", "Notes"],
[
["1st line", "Terlipressin + Albumin", "0.5-1 mg IV bolus q4-6h or continuous infusion; titrate up to max ~12 mg/day", "Most effective agent; monitor for ischemia (cardiac, digital, mesenteric); requires close monitoring"],
["2nd line (if terlipressin unavailable)", "Norepinephrine + Albumin", "0.5-3 mg/hr continuous IV infusion, titrated to MAP", "Requires ICU/central line monitoring; similar efficacy to terlipressin in studies"],
["3rd line (used mainly in US)", "Midodrine + Octreotide + Albumin", "Midodrine 7.5-12.5 mg PO TID; Octreotide 100-200 mcg SC TID (or infusion)", "Less effective than terlipressin/norepinephrine; used when ICU-level vasoconstrictors unavailable"],
]
)
# Monitoring
doc.add_heading("4. Monitoring & Supportive Care", level=1)
for item in [
"Daily serum creatinine, electrolytes, and urine output.",
"Watch for vasoconstrictor complications: digital/mesenteric/cardiac ischemia, arrhythmias, fluid overload (pulmonary edema) from albumin.",
"Continue treatment of precipitating factors (infection, GI bleeding).",
"Early nephrology and hepatology/transplant consultation.",
"Reassess transplant candidacy continuously; do not delay listing while trialing medical therapy.",
]:
doc.add_paragraph(item, style="List Bullet")
# Prognosis
doc.add_heading("5. Prognosis", level=1)
doc.add_paragraph(
"Prognosis is poor without liver transplantation. HRS-AKI (rapidly progressive) carries a "
"worse short-term prognosis than HRS-CKD (stable, chronic course). Response to "
"vasoconstrictor therapy is associated with improved survival even in the absence of "
"immediate transplantation."
)
# References
doc.add_heading("References", level=1)
refs = [
"Harrison's Principles of Internal Medicine, 22nd Edition (2025) - Hepatorenal Syndrome.",
"Goldman-Cecil Medicine, International Edition, 2-Volume Set - Hepatorenal Syndrome.",
"Braga QM, Schacher FC, Mattos AA. Terlipressin for the treatment of hepatorenal syndrome: a meta-analysis of randomized controlled trials. Eur J Gastroenterol Hepatol. 2025. PMID: 40207491.",
"Wan YM, Huang SQ, Wu HM. Terlipressin versus placebo or noradrenalin in the treatment of hepatorenal syndrome: a systematic review and meta-analysis. Front Pharmacol. 2024. PMID: 39295934.",
"Gonzalez-Garay AG, Serralde-Zuniga AE, Velasco Hidalgo L, et al. Transjugular intrahepatic portosystemic shunts for adults with hepatorenal syndrome. Cochrane Database Syst Rev. 2024. PMID: 38235907.",
]
for r in refs:
doc.add_paragraph(r, style="List Bullet")
doc.add_paragraph()
note = doc.add_paragraph()
note_run = note.add_run("This document is a clinical quick-reference summary and does not replace institutional protocols or full clinical judgment.")
note_run.italic = True
note_run.font.size = Pt(9)
note_run.font.color.rgb = RGBColor(0x77, 0x77, 0x77)
doc.save("/tmp/workspace/hrs-management/output/HRS_Management_Summary.docx")
print("DOCX saved.")
cd /tmp/workspace/hrs-management && python3 build_docx.py && ls -la output
HRS Management Summary
Word Document · DOCX
non alcholic fatty liver disease investigation and management in short
"nonalcoholic fatty liver disease" AND management
resmetirom NAFLD MASH FDA approval treatment guideline 2024
give in flowchart in short to write in exams of above mash
Suspected NAFLD/MASH
(Obesity, T2DM, Metabolic syndrome, incidental steatosis/deranged LFT)
|
v
Exclude other causes
(Alcohol, Viral hepatitis, Autoimmune, Wilson's, Hemochromatosis, Drugs)
|
v
Confirm steatosis
(USG / CT / MRI + LFT, Lipid profile, HbA1c)
|
v
Risk-stratify fibrosis
(FIB-4 / NFS score)
|
-----------------
| |
Low risk High/Indeterminate risk
| |
v v
Routine Elastography (FibroScan/MRE)
follow-up |
v
Still high risk / uncertain
|
v
Liver biopsy (gold standard)
|
v
Confirms MASH +/- fibrosis stage (F0-F4)
|
-----------------------------
| |
F0-F1 (mild) F2-F3 (significant fibrosis) F4 (cirrhosis)
| | |
v v v
Lifestyle only: Lifestyle + Drug therapy: Manage as cirrhosis:
- Weight loss 7-10% - Resmetirom (FDA approved) - HCC surveillance (USG+AFP 6-monthly)
- Diet + exercise - Semaglutide (GLP-1 agonist) - Variceal screening
- Control DM/lipids - Pioglitazone (esp. if diabetic) - Transplant evaluation if decompensated
- Vitamin E (non-diabetic)
|
v
Address cardiovascular risk in ALL patients
(leading cause of death in NAFLD/MASH)