Enumerate the indications, describe the surgical principals and management of hepatic transplantation
| Etiology | Notes |
|---|---|
| Alcohol-related liver disease (ALD) | Most common; requires documented abstinence (generally 6 months) and psychosocial evaluation |
| Non-alcoholic fatty liver disease / NASH | Projected to become the leading indication as obesity rises and HCV therapy improves |
| Chronic HCV | Transformed by direct-acting antivirals; now declining as indication |
| Chronic HBV | Universal vaccination has reduced incidence |
| Primary biliary cholangitis (PBC) | Indicated for decompensation, intractable pruritus, disabling fatigue, rising bilirubin even without cirrhosis |
| Primary sclerosing cholangitis (PSC) | 4th most common indication in the US (5-10%); recurrent cholangitis and cholangiocarcinoma are specific concerns |
| Autoimmune hepatitis | When chronic liver failure develops despite therapy |
| Wilson's disease | Acute liver failure form may present as Status 1 emergency |
| Cryptogenic cirrhosis | Likely represents burned-out NASH in most cases |
| Absolute Contraindications | Relative Contraindications |
|---|---|
| Active extrahepatic malignancy (non-skin) | Age >65-70 years |
| Uncontrolled systemic infection / sepsis | Severe cardiopulmonary disease |
| Active alcohol or substance use (most programs) | Morbid obesity (BMI >40) |
| Irreversible neurological injury (e.g., raised ICP, brain death in ALF) | HIV (now considered relative at experienced centers) |
| Advanced cardiopulmonary disease not amenable to treatment | Thrombosis of portal, splenic, and superior mesenteric veins (technically challenging but not absolute) |
| AIDS | Prior TIPS, splenorenal shunt (increases technical difficulty but does not preclude transplantation) |
| — | Previous Eck fistula (portacaval end-to-side - makes transplantation significantly more difficult) |
MELD = 1.33(female sex) + 4.56 × ln(bilirubin) + 0.82 × (137 - Na) - 0.24 × (137 - Na) × ln(bilirubin) + 9.09 × ln(INR) + 11.14 × ln(creatinine) + 1.85 × (3.5 - albumin) - 1.83 × (3.5 - albumin) × ln(creatinine) + 6
| Agent | Class | Mechanism |
|---|---|---|
| Tacrolimus (FK506) | Calcineurin inhibitor | Inhibits IL-2 transcription; mainstay of maintenance therapy |
| Mycophenolate mofetil (MMF) | Antimetabolite | Inhibits purine synthesis; blocks lymphocyte proliferation |
| Corticosteroids | Steroid | Broad anti-inflammatory; tapered and often withdrawn by 3-12 months |
| Complication | Incidence | Management |
|---|---|---|
| Hepatic artery thrombosis (HAT) | 5-9% in adults (higher in children) | Early: urgent thrombectomy or re-transplantation; Biliary tree loses its entire arterial supply → bile duct necrosis, intrahepatic bilomas |
| Hepatic artery stenosis | 2-5% | Radiological angioplasty ± stenting |
| Portal vein thrombosis (PVT) | Up to 12% | Early: surgical thrombectomy; Late: TIPS or re-transplantation if severe portal hypertension |
| IVC/hepatic vein stenosis | Rare | Endovascular stenting |
| Complication | Notes |
|---|---|
| Anastomotic strictures | 80% of stricturing disease; present 2-6 months post-OLT; duct-to-duct anastomoses amenable to ERCP and stenting; choledochojejunostomies require percutaneous or surgical correction |
| Bile leak | Usually from anastomosis or cut surface (LDLT/split); managed by ERCP ± stent or surgery |
| Non-anastomotic strictures (ischemic cholangiopathy) | Suggests HAT or DCD-related ischemic injury; often requires retransplantation |
| Biliary casts | Up to 18% in first year; treated endoscopically (70% success); mortality 10-30% |
| Domain | Key Points |
|---|---|
| Most common indication | Decompensated cirrhosis (ALD, NAFLD/NASH, viral hepatitis) |
| Pediatric | Biliary atresia |
| Urgent (Status 1) | ALF (acetaminophen, viral, Wilson's, seronegative) |
| Allocation tool | MELD 3.0 score |
| Key contraindication | Active extrahepatic malignancy, uncontrolled sepsis, active substance use |
| HCC criterion | Milan Criteria (single ≤5 cm or 3 tumors ≤3 cm) |
| Preferred surgical technique | Piggyback (caval-sparing) hepatectomy |
| Biliary reconstruction | Duct-to-duct (preferred) or Roux-en-Y hepaticojejunostomy |
| Immunosuppression backbone | Tacrolimus + MMF ± steroids |
| Most common complication | Biliary (5-30%); infection (up to 75%) |
| Most feared vascular complication | Hepatic artery thrombosis (5-9%) |
| 1-year survival | >90% |
Make all of this into a power point presentation type
mkdir -p /tmp/workspace/hepatic-transplant-ppt && ls /tmp/workspace/hepatic-transplant-ppt/
~/hepatic-transplant-ppt/build_pptx.py
from pptx import Presentation
from pptx.util import Inches, Pt, Emu
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from pptx.util import Inches, Pt
from io import BytesIO
# ── Colour palette ───────────────────────────────────────────────────────────
NAVY = RGBColor(0x0A, 0x2A, 0x5E) # deep navy – header bars
TEAL = RGBColor(0x00, 0x7A, 0x87) # teal accent
LIGHT_BLUE = RGBColor(0xD6, 0xEA, 0xF8) # light-blue content bg
WHITE = RGBColor(0xFF, 0xFF, 0xFF)
DARK_GREY = RGBColor(0x2C, 0x2C, 0x2C)
MID_GREY = RGBColor(0x55, 0x55, 0x55)
ORANGE = RGBColor(0xE8, 0x6A, 0x10) # highlight/accent 2
LIGHT_TEAL = RGBColor(0xE0, 0xF4, 0xF6)
prs = Presentation()
prs.slide_width = Inches(13.333)
prs.slide_height = Inches(7.5)
blank = prs.slide_layouts[6] # fully blank layout
# ─────────────────────────────────────────────────────────────────────────────
# Helper utilities
# ─────────────────────────────────────────────────────────────────────────────
def add_rect(slide, x, y, w, h, fill_color, line_color=None, line_width=None):
from pptx.enum.shapes import MSO_SHAPE_TYPE
shp = slide.shapes.add_shape(1, Inches(x), Inches(y), Inches(w), Inches(h)) # 1 = rectangle
shp.fill.solid()
shp.fill.fore_color.rgb = fill_color
if line_color:
shp.line.color.rgb = line_color
if line_width:
shp.line.width = Pt(line_width)
else:
shp.line.fill.background()
shp.shadow.inherit = False
return shp
def add_text(slide, text, x, y, w, h,
font_size=18, bold=False, color=DARK_GREY, align=PP_ALIGN.LEFT,
italic=False, font_name="Calibri", v_anchor=MSO_ANCHOR.TOP,
word_wrap=True):
tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
tf = tb.text_frame
tf.word_wrap = word_wrap
tf.vertical_anchor = v_anchor
tf.margin_left = Pt(4)
tf.margin_right = Pt(4)
tf.margin_top = Pt(2)
tf.margin_bottom= Pt(2)
p = tf.paragraphs[0]
p.alignment = align
run = p.add_run()
run.text = text
run.font.name = font_name
run.font.size = Pt(font_size)
run.font.bold = bold
run.font.italic = italic
run.font.color.rgb = color
return tb
def add_textbox_multiline(slide, lines, x, y, w, h,
font_size=14, bold_first=False,
color=DARK_GREY, font_name="Calibri",
line_spacing=None, v_anchor=MSO_ANCHOR.TOP):
"""lines: list of (text, bold, indent_level, font_size_override)"""
tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
tf = tb.text_frame
tf.word_wrap = True
tf.vertical_anchor = v_anchor
tf.margin_left = Pt(6)
tf.margin_right = Pt(4)
tf.margin_top = Pt(4)
tf.margin_bottom = Pt(4)
for i, item in enumerate(lines):
if isinstance(item, str):
text, bold, level, fsize = item, False, 0, font_size
elif len(item) == 2:
text, bold = item; level = 0; fsize = font_size
elif len(item) == 3:
text, bold, level = item; fsize = font_size
else:
text, bold, level, fsize = item
if i == 0:
p = tf.paragraphs[0]
else:
p = tf.add_paragraph()
p.level = level
if line_spacing:
from pptx.oxml.ns import qn
from lxml import etree
pPr = p._pPr
if pPr is None:
pPr = p._p.get_or_add_pPr()
lnSpc = etree.SubElement(pPr, qn('a:lnSpc'))
spcPct = etree.SubElement(lnSpc, qn('a:spcPct'))
spcPct.set('val', str(int(line_spacing * 1000)))
run = p.add_run()
run.text = text
run.font.name = font_name
run.font.size = Pt(fsize)
run.font.bold = (bold_first and i == 0) or bold
run.font.color.rgb = color
return tb
def slide_header(slide, title, subtitle=None):
"""Draw the top navy bar with white title."""
add_rect(slide, 0, 0, 13.333, 1.1, NAVY)
add_rect(slide, 0, 1.1, 13.333, 0.06, TEAL) # thin accent line
add_text(slide, title, 0.3, 0.05, 12.5, 0.9,
font_size=28, bold=True, color=WHITE, align=PP_ALIGN.LEFT,
v_anchor=MSO_ANCHOR.MIDDLE)
if subtitle:
add_text(slide, subtitle, 0.3, 0.75, 12.5, 0.4,
font_size=14, bold=False, color=RGBColor(0xB0, 0xD4, 0xE8),
align=PP_ALIGN.LEFT)
def slide_footer(slide, text="Hepatic Transplantation | Surgical Principles & Management"):
add_rect(slide, 0, 7.25, 13.333, 0.25, NAVY)
add_text(slide, text, 0.3, 7.26, 12.0, 0.22,
font_size=9, color=RGBColor(0xB0, 0xD4, 0xE8),
align=PP_ALIGN.LEFT, v_anchor=MSO_ANCHOR.MIDDLE)
# ─────────────────────────────────────────────────────────────────────────────
# SLIDE 1 – Title Slide
# ─────────────────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank)
# Full background
add_rect(slide, 0, 0, 13.333, 7.5, NAVY)
# Teal accent band
add_rect(slide, 0, 3.9, 13.333, 0.08, TEAL)
# Left accent bar
add_rect(slide, 0, 0, 0.18, 7.5, TEAL)
# Title
add_text(slide, "HEPATIC TRANSPLANTATION", 0.5, 1.5, 12.5, 1.3,
font_size=44, bold=True, color=WHITE, align=PP_ALIGN.LEFT)
add_text(slide, "Indications · Surgical Principles · Management", 0.5, 2.9, 12.5, 0.7,
font_size=22, bold=False, color=TEAL, align=PP_ALIGN.LEFT)
add_text(slide, "A Comprehensive Surgical Review", 0.5, 4.2, 12.0, 0.6,
font_size=16, bold=False, italic=True,
color=RGBColor(0xB0, 0xD4, 0xE8), align=PP_ALIGN.LEFT)
add_text(slide, "Sources: Sabiston · Bailey & Love · Fischer's Mastery · Sleisenger & Fordtran · Schwartz's",
0.5, 6.7, 12.5, 0.5, font_size=10,
color=RGBColor(0x80, 0xA8, 0xC8), align=PP_ALIGN.LEFT)
# ─────────────────────────────────────────────────────────────────────────────
# SLIDE 2 – Table of Contents
# ─────────────────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, WHITE)
slide_header(slide, "Contents")
slide_footer(slide)
topics = [
("1", "History & Background"),
("2", "Indications"),
("3", "Contraindications"),
("4", "Organ Allocation – MELD Score"),
("5", "Donor Selection & Organ Preservation"),
("6", "Preoperative Evaluation"),
("7", "Surgical Principles & Technique"),
("8", "Postoperative Management & Immunosuppression"),
("9", "Complications & Their Management"),
("10", "Outcomes & Special Topics"),
]
col1 = topics[:5]
col2 = topics[5:]
for i, (num, topic) in enumerate(col1):
y = 1.4 + i * 0.95
add_rect(slide, 0.4, y, 0.55, 0.62, TEAL)
add_text(slide, num, 0.4, y, 0.55, 0.62, font_size=20, bold=True,
color=WHITE, align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
add_text(slide, topic, 1.05, y + 0.08, 5.3, 0.5, font_size=16,
color=DARK_GREY)
for i, (num, topic) in enumerate(col2):
y = 1.4 + i * 0.95
add_rect(slide, 7.0, y, 0.55, 0.62, NAVY)
add_text(slide, num, 7.0, y, 0.55, 0.62, font_size=20, bold=True,
color=WHITE, align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
add_text(slide, topic, 7.65, y + 0.08, 5.3, 0.5, font_size=16,
color=DARK_GREY)
# ─────────────────────────────────────────────────────────────────────────────
# SLIDE 3 – History & Background
# ─────────────────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, WHITE)
slide_header(slide, "History & Background")
slide_footer(slide)
timeline = [
("1963", "First attempted human liver transplant by Dr. Thomas Starzl – failed; subsequent attempts in Berlin, Boston, Paris also failed. 3-year moratorium imposed."),
("1970s", "Limited success achieved. 1-year survival ~30%. Cyclosporine discovered by Jean Borel (initially investigated as antifungal) – ushered in the modern era."),
("1989", "Living-donor liver transplantation (LDLT) first described in pediatric recipients."),
("1994", "First successful adult LDLT reported (Hashikura et al., Lancet)."),
("Today", ">90% 1-year survival; ~88% 3-year survival. Over 9,000 liver transplants/year in the US."),
]
for i, (year, desc) in enumerate(timeline):
y = 1.35 + i * 1.05
add_rect(slide, 0.35, y, 1.5, 0.7, NAVY)
add_text(slide, year, 0.35, y, 1.5, 0.7, font_size=18, bold=True,
color=WHITE, align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
# Connector line
add_rect(slide, 1.85, y + 0.3, 0.25, 0.08, TEAL)
add_textbox_multiline(slide, [(desc, False, 0, 13)],
2.15, y, 10.7, 0.75,
color=MID_GREY, v_anchor=MSO_ANCHOR.MIDDLE)
# ─────────────────────────────────────────────────────────────────────────────
# SLIDE 4 – Indications Overview
# ─────────────────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, WHITE)
slide_header(slide, "Indications for Liver Transplantation", "Four principal categories")
slide_footer(slide)
boxes = [
(NAVY, "1\nChronic Liver\nDisease", 0.35, 1.35, 2.8, 2.8,
"Most common indication\n- Alcoholic liver disease (ALD)\n- NAFLD / NASH\n- Chronic HCV / HBV\n- PBC, PSC, AIH\n- Wilson's disease, A1AT"),
(TEAL, "2\nAcute Liver\nFailure", 3.35, 1.35, 2.8, 2.8,
"~10% of LT activity\n- Acetaminophen overdose\n- Viral hepatitis A/B/E\n- Drug-induced (non-acetaminophen)\n- Seronegative / autoimmune\n- Wilson's (acute)"),
(ORANGE,"3\nMetabolic /\nInborn Errors", 6.35, 1.35, 2.8, 2.8,
"Curative even without cirrhosis\n- Primary hyperoxaluria\n- Urea cycle defects\n- Familial amyloid polyneuropathy\n- Familial hypercholesterolaemia\n- Crigler-Najjar type I"),
(RGBColor(0x14, 0x5A, 0x32), "4\nHepatic\nMalignancy", 9.35, 1.35, 3.6, 2.8,
"- HCC within Milan Criteria\n- Hilar cholangiocarcinoma\n (neoadjuvant protocol)\n- Hepatoblastoma (children)\n- Haemangioendothelioma"),
]
for (col, label, bx, by, bw, bh, desc) in boxes:
add_rect(slide, bx, by, bw, 1.1, col)
add_text(slide, label, bx + 0.1, by, bw - 0.2, 1.1,
font_size=15, bold=True, color=WHITE,
align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
add_rect(slide, bx, by + 1.1, bw, bh - 1.1, LIGHT_BLUE)
desc_lines = [(ln, False, 0, 12) for ln in desc.split("\n")]
add_textbox_multiline(slide, desc_lines,
bx + 0.1, by + 1.15, bw - 0.2, bh - 1.2,
color=DARK_GREY)
# Paediatric note
add_rect(slide, 0.35, 4.35, 12.6, 0.55, LIGHT_TEAL)
add_text(slide, "Paediatric: Biliary atresia is the single most common indication in children (10-15% of all LT). 5-year survival after LT: 75-94%.",
0.5, 4.38, 12.2, 0.48, font_size=12, color=NAVY)
# ─────────────────────────────────────────────────────────────────────────────
# SLIDE 5 – Chronic Liver Disease: Detailed Indications
# ─────────────────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, WHITE)
slide_header(slide, "Chronic Liver Disease – Indications in Detail")
slide_footer(slide)
add_text(slide, "Triggers for transplant listing (any complication of decompensation):",
0.35, 1.25, 12.5, 0.45, font_size=14, bold=True, color=NAVY)
triggers = [
("Variceal Haemorrhage", "Refractory to endoscopic + pharmacological therapy"),
("Refractory Ascites", "Unresponsive to diuretics; SBP episodes"),
("Hepatic Encephalopathy", "Grade ≥2, refractory or recurrent"),
("Hepatorenal Syndrome", "Type 1 (acute) or Type 2 (chronic)"),
("Progressive Jaundice", "Especially with cholestatic diseases (PBC/PSC)"),
("Hepatopulmonary Syndrome", "PaO₂ <60 mmHg on room air"),
("Portopulmonary HTN", "Mean PAP maintainable <35 mmHg with treatment"),
]
for i, (trig, detail) in enumerate(triggers):
row = i % 4
col = i // 4
x = 0.35 + col * 6.6
y = 1.8 + row * 1.25
add_rect(slide, x, y, 6.2, 1.1, LIGHT_BLUE)
add_rect(slide, x, y, 6.2, 0.36, TEAL)
add_text(slide, trig, x + 0.1, y, 6.0, 0.36,
font_size=13, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
add_text(slide, detail, x + 0.1, y + 0.38, 6.0, 0.68,
font_size=12, color=DARK_GREY)
# HCC Milan Criteria box
add_rect(slide, 0.35, 6.75, 12.6, 0.55, LIGHT_TEAL)
add_text(slide, "Milan Criteria for HCC: Single tumor ≤5 cm OR up to 3 tumors each ≤3 cm | No vascular invasion | No extrahepatic disease → 5-year recurrence-free survival ~70%",
0.5, 6.77, 12.2, 0.48, font_size=11, color=NAVY)
# ─────────────────────────────────────────────────────────────────────────────
# SLIDE 6 – Acute Liver Failure & King's College Criteria
# ─────────────────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, WHITE)
slide_header(slide, "Acute Liver Failure (ALF)", "Status 1A – Priority listing above all MELD scores")
slide_footer(slide)
# Left panel – causes
add_rect(slide, 0.3, 1.35, 4.0, 5.6, LIGHT_BLUE)
add_rect(slide, 0.3, 1.35, 4.0, 0.5, NAVY)
add_text(slide, "Common Causes of ALF", 0.35, 1.35, 3.9, 0.5,
font_size=14, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
causes = [
("Acetaminophen overdose", True, 0, 13),
("(leading cause in UK/US)", False, 0, 11),
("", False, 0, 6),
("Viral: Hep A, B, E", False, 0, 12),
("Herpes simplex, EBV, CMV", False, 0, 12),
("", False, 0, 6),
("Drug-induced (non-paracetamol)", False, 0, 12),
("Autoimmune hepatitis – acute", False, 0, 12),
("Wilson's disease – acute", False, 0, 12),
("Budd-Chiari syndrome – acute", False, 0, 12),
("Indeterminate / seronegative", False, 0, 12),
("", False, 0, 6),
("Transplant rate:", True, 0, 12),
("40% non-acetaminophen cases", False, 0, 12),
("8% acetaminophen cases", False, 0, 12),
]
add_textbox_multiline(slide, causes, 0.4, 1.9, 3.8, 4.9, color=DARK_GREY)
# Right panel – King's College Criteria
add_rect(slide, 4.6, 1.35, 8.4, 5.6, WHITE)
add_rect(slide, 4.6, 1.35, 8.4, 0.5, ORANGE)
add_text(slide, "King's College Criteria (Selection for LT in ALF)", 4.65, 1.35, 8.3, 0.5,
font_size=14, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
# Acetaminophen box
add_rect(slide, 4.6, 1.9, 4.0, 2.5, RGBColor(0xFD, 0xF2, 0xE8))
add_rect(slide, 4.6, 1.9, 4.0, 0.4, ORANGE)
add_text(slide, "Acetaminophen Aetiology", 4.65, 1.9, 3.9, 0.4,
font_size=13, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
add_textbox_multiline(slide, [
("Arterial pH <7.3 (after resuscitation)", False, 0, 12),
("– OR all three of –", True, 0, 11),
("INR >6.5", False, 0, 12),
("Creatinine >300 µmol/L", False, 0, 12),
("Grade III-IV encephalopathy", False, 0, 12),
], 4.7, 2.35, 3.8, 1.95, color=DARK_GREY)
# Non-acetaminophen box
add_rect(slide, 8.8, 1.9, 4.1, 2.5, RGBColor(0xE8, 0xF4, 0xFD))
add_rect(slide, 8.8, 1.9, 4.1, 0.4, TEAL)
add_text(slide, "Non-Acetaminophen Aetiology", 8.85, 1.9, 4.0, 0.4,
font_size=13, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
add_textbox_multiline(slide, [
("INR >6.5 alone", False, 0, 12),
("– OR any 3 of –", True, 0, 11),
("Age <10 or >40 years", False, 0, 12),
("Non-A non-B/drug/Wilson's aetiology", False, 0, 12),
("Jaundice→encephalopathy >7 days", False, 0, 12),
("Bilirubin >300 µmol/L", False, 0, 12),
("INR >3.5", False, 0, 12),
], 8.9, 2.35, 3.9, 1.95, color=DARK_GREY)
# Outcome note
add_rect(slide, 4.6, 4.6, 8.4, 2.2, LIGHT_TEAL)
add_textbox_multiline(slide, [
("Outcomes with LT for ALF:", True, 0, 13),
("1-year survival >70% (vs <20% without LT in the 1970s)", False, 0, 12),
("Wait-list mortality: 19-28%; highest in acetaminophen ALF", False, 0, 12),
("Donor organ allocation prioritises ALF – most receive organ within 48-72h", False, 0, 12),
("Auxiliary LT: bridge to transplant-free survival; ~70% native liver recovery", False, 0, 12),
], 4.75, 4.65, 8.1, 2.0, color=DARK_GREY)
# ─────────────────────────────────────────────────────────────────────────────
# SLIDE 7 – Contraindications
# ─────────────────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, WHITE)
slide_header(slide, "Contraindications to Liver Transplantation")
slide_footer(slide)
# Absolute
add_rect(slide, 0.35, 1.35, 5.9, 5.6, RGBColor(0xFF, 0xEB, 0xEB))
add_rect(slide, 0.35, 1.35, 5.9, 0.55, RGBColor(0xC0, 0x20, 0x20))
add_text(slide, "ABSOLUTE Contraindications", 0.45, 1.35, 5.7, 0.55,
font_size=16, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
abs_ci = [
("Active extrahepatic malignancy (non-skin)", False, 0, 13),
("Uncontrolled systemic infection / sepsis", False, 0, 13),
("Active alcohol or substance use (most centres)", False, 0, 13),
("Irreversible neurological injury / brain death (in ALF)", False, 0, 13),
("Advanced cardiopulmonary disease (non-correctable)", False, 0, 13),
("AIDS (not HIV-positive alone)", False, 0, 13),
("Persistent non-compliance with medical therapy", False, 0, 13),
]
add_textbox_multiline(slide, abs_ci, 0.5, 2.0, 5.6, 4.8, color=DARK_GREY)
# Relative
add_rect(slide, 6.6, 1.35, 6.4, 5.6, RGBColor(0xFF, 0xF5, 0xDB))
add_rect(slide, 6.6, 1.35, 6.4, 0.55, ORANGE)
add_text(slide, "RELATIVE Contraindications", 6.7, 1.35, 6.2, 0.55,
font_size=16, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
rel_ci = [
("Age >65-70 years (case-by-case)", False, 0, 13),
("Severe cardiopulmonary disease (assess correctable)", False, 0, 13),
("Morbid obesity (BMI >40)", False, 0, 13),
("HIV (now relative at experienced centres)", False, 0, 13),
("Extensive portal/splenic/SMV thrombosis", False, 0, 13),
("Prior TIPS or splenorenal shunt (↑ difficulty)", False, 0, 13),
("Previous Eck fistula (portacaval end-to-side) – makes transplant significantly harder", False, 0, 13),
("Psychosocial factors (alcohol – requires 6-month abstinence + psychiatric clearance)", False, 0, 13),
]
add_textbox_multiline(slide, rel_ci, 6.75, 2.0, 6.1, 4.8, color=DARK_GREY)
# ─────────────────────────────────────────────────────────────────────────────
# SLIDE 8 – MELD Score & Organ Allocation
# ─────────────────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, WHITE)
slide_header(slide, "Organ Allocation – MELD Score", "Model for End-Stage Liver Disease 3.0")
slide_footer(slide)
# MELD formula box
add_rect(slide, 0.35, 1.35, 12.6, 1.55, LIGHT_BLUE)
add_rect(slide, 0.35, 1.35, 12.6, 0.42, NAVY)
add_text(slide, "MELD 3.0 Formula", 0.5, 1.35, 12.3, 0.42,
font_size=14, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
add_text(slide,
"MELD = 1.33(female) + 4.56×ln(bilirubin) + 0.82×(137−Na) − 0.24×(137−Na)×ln(bilirubin) + 9.09×ln(INR) + 11.14×ln(creatinine) + 1.85×(3.5−albumin) − 1.83×(3.5−albumin)×ln(creatinine) + 6",
0.5, 1.83, 12.3, 0.9,
font_size=12, bold=False, color=DARK_GREY, font_name="Consolas")
# Key points left
add_rect(slide, 0.35, 3.1, 6.0, 3.8, LIGHT_TEAL)
add_rect(slide, 0.35, 3.1, 6.0, 0.4, TEAL)
add_text(slide, "Key MELD Principles", 0.45, 3.1, 5.8, 0.4,
font_size=13, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
add_textbox_multiline(slide, [
("Higher MELD = higher 3-month mortality = higher priority", False, 0, 12),
("Status 1A: fulminant failure, death expected <1 week → supersedes all MELD", True, 0, 12),
("Variables: bilirubin, creatinine, INR, sodium, albumin, female sex", False, 0, 12),
("Replaces Child-Turcotte-Pugh (objective lab values vs. subjective encephalopathy grading)", False, 0, 12),
("2020: Acuity circles (150–500 nautical miles) replaced donation service areas to reduce geographic disparity", False, 0, 12),
], 0.5, 3.6, 5.7, 3.2, color=DARK_GREY)
# Exception points
add_rect(slide, 6.65, 3.1, 6.3, 3.8, RGBColor(0xFD, 0xF2, 0xE8))
add_rect(slide, 6.65, 3.1, 6.3, 0.4, ORANGE)
add_text(slide, "Exception Points (MELD upgrade without lab-based score)", 6.75, 3.1, 6.1, 0.4,
font_size=12, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
exceptions = [
("HCC within Milan Criteria", False, 0, 12),
("Hepatopulmonary syndrome", False, 0, 12),
("Portopulmonary hypertension (PAP maintainable <35 mmHg)", False, 0, 12),
("Familial amyloid polyneuropathy", False, 0, 12),
("Primary hyperoxaluria type 1", False, 0, 12),
("Cystic fibrosis", False, 0, 12),
("Hilar cholangiocarcinoma (Mayo protocol)", False, 0, 12),
("Refractory ascites, refractory encephalopathy, refractory variceal haemorrhage", False, 0, 12),
]
add_textbox_multiline(slide, exceptions, 6.8, 3.6, 6.0, 3.2, color=DARK_GREY)
# ─────────────────────────────────────────────────────────────────────────────
# SLIDE 9 – Donor Selection & Organ Preservation
# ─────────────────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, WHITE)
slide_header(slide, "Donor Selection & Organ Preservation")
slide_footer(slide)
# Donor types
add_rect(slide, 0.35, 1.35, 12.6, 0.42, NAVY)
add_text(slide, "Deceased Donor Types", 0.5, 1.35, 12.3, 0.42,
font_size=14, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
types = [
(NAVY, "DBD\n(Donation after\nBrain Death)", "Standard source\n>90% of deceased-donor LT in West"),
(TEAL, "DCD\n(Donation after\nCirculatory Death)", "↑ risk of ischemic cholangiopathy\nAcceptable at experienced centres"),
(ORANGE,"Extended\nCriteria Donors", "Age >60, steatosis <30-40%,\nmoderate preservation injury\nCareful recipient matching"),
]
for i, (col, label, desc) in enumerate(types):
x = 0.35 + i * 4.25
add_rect(slide, x, 1.85, 4.0, 1.0, col)
add_text(slide, label, x + 0.1, 1.85, 3.8, 1.0,
font_size=14, bold=True, color=WHITE,
align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
add_rect(slide, x, 2.85, 4.0, 1.1, LIGHT_BLUE)
desc_lines = [(ln, False, 0, 12) for ln in desc.split("\n")]
add_textbox_multiline(slide, desc_lines, x + 0.1, 2.9, 3.8, 1.0, color=DARK_GREY)
# Requirements
add_rect(slide, 0.35, 4.1, 6.1, 3.1, LIGHT_TEAL)
add_rect(slide, 0.35, 4.1, 6.1, 0.42, TEAL)
add_text(slide, "Donor Requirements", 0.45, 4.1, 5.9, 0.42,
font_size=13, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
add_textbox_multiline(slide, [
("ABO-compatible (identical preferred; incompatible with desensitisation in emergency)", False, 0, 12),
("HLA matching NOT required (liver is immunologically privileged)", True, 0, 12),
("Macrovesicular steatosis <30% (>60% = substantially ↑ primary non-function risk)", False, 0, 12),
("Cold ischaemia time ideally <12h (max 24h)", False, 0, 12),
("UW (University of Wisconsin) solution – standard cold flush", False, 0, 12),
], 0.5, 4.6, 5.8, 2.5, color=DARK_GREY)
# Machine perfusion
add_rect(slide, 6.65, 4.1, 6.3, 3.1, RGBColor(0xFD, 0xF2, 0xE8))
add_rect(slide, 6.65, 4.1, 6.3, 0.42, ORANGE)
add_text(slide, "Machine Perfusion (Emerging Technology)", 6.75, 4.1, 6.1, 0.42,
font_size=13, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
add_textbox_multiline(slide, [
("HMP – Hypothermic Machine Perfusion: 0-10°C oxygenated solution", False, 0, 12),
("NMP – Normothermic Machine Perfusion: physiological temperature, oxygenated blood", False, 0, 12),
("Allows viability assessment of marginal (DCD, steatotic) grafts before commitment", True, 0, 12),
("NMP: test bile production, lactate clearance → graft reconditioning possible", False, 0, 12),
("Extends preservation time significantly beyond cold static storage", False, 0, 12),
], 6.8, 4.6, 6.0, 2.5, color=DARK_GREY)
# ─────────────────────────────────────────────────────────────────────────────
# SLIDE 10 – Living Donor LT
# ─────────────────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, WHITE)
slide_header(slide, "Living Donor Liver Transplantation (LDLT)")
slide_footer(slide)
add_textbox_multiline(slide, [
("Adult-to-Adult LDLT: Right lobe graft (segments V-VIII) = 60-70% of total liver volume", True, 0, 14),
("Paediatric LDLT: Left lateral segment (segments II-III) from adult donor", True, 0, 14),
], 0.35, 1.3, 12.6, 0.9, color=NAVY)
cards = [
(TEAL, "Graft-to-Recipient Weight Ratio",
"GRWR must be >0.8%\nAND/OR GV/SLV >35%\nPrevents 'small-for-size syndrome'\n(portal overflow + graft dysfunction)"),
(NAVY, "Donor Safety",
"Remnant liver must be >30%\nof whole liver volume\nAllows regeneration\nPrevents donor liver insufficiency"),
(ORANGE, "Assessment Tools",
"CT volumetry to measure graft\n3D software (e.g. MeVis HepaVision)\nDual-graft LDLT from 2 donors\n(practised in Korea for large recipients)"),
(RGBColor(0x14, 0x5A, 0x32), "Global Practice",
">90% of LT in East Asia = LDLT\n<10% in Western centres\nGraft/patient survival now\ncomparable to deceased-donor LT"),
]
for i, (col, title, desc) in enumerate(cards):
x = 0.35 + i * 3.22
y = 2.45
add_rect(slide, x, y, 3.0, 0.55, col)
add_text(slide, title, x + 0.1, y, 2.8, 0.55,
font_size=13, bold=True, color=WHITE,
align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
add_rect(slide, x, y + 0.55, 3.0, 2.0, LIGHT_BLUE)
desc_lines = [(ln, False, 0, 12) for ln in desc.split("\n")]
add_textbox_multiline(slide, desc_lines, x + 0.1, y + 0.6, 2.8, 1.9, color=DARK_GREY)
# Bottom note
add_rect(slide, 0.35, 5.7, 12.6, 1.45, LIGHT_TEAL)
add_textbox_multiline(slide, [
("Split-liver transplantation: One deceased-donor liver divided into right lobe + left lateral segment → two grafts for two recipients (typically one adult + one child).", False, 0, 12),
("Requires careful preoperative CT to assess vascular and biliary anatomy in both potential recipients.", False, 0, 12),
], 0.5, 5.75, 12.2, 1.35, color=DARK_GREY)
# ─────────────────────────────────────────────────────────────────────────────
# SLIDE 11 – Preoperative Evaluation
# ─────────────────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, WHITE)
slide_header(slide, "Preoperative Evaluation of the Recipient")
slide_footer(slide)
systems = [
(NAVY, "Cardiac",
"ECG + Echocardiography\nDobutamine stress echo / cardiac catheterisation if indicated\nScreen for cirrhotic cardiomyopathy\n(hyperdynamic state, diastolic dysfunction)"),
(TEAL, "Pulmonary",
"PFTs + ABG\nScreen for hepatopulmonary syndrome (PaO₂ <60 mmHg)\nScreen for portopulmonary HTN\n(mean PAP >25 mmHg at rest)"),
(ORANGE,"Renal",
"Creatinine, eGFR\neGFR <30 mL/min → assess for\nsimultaneous liver-kidney transplant\n(SLKT) eligibility"),
(RGBColor(0x14, 0x5A, 0x32), "Imaging",
"CT/MRI abdomen: vascular anatomy, portal vein patency, hepatic masses\nDoppler USS: vascular flow\nBone density (DEXA) – osteoporosis common"),
(RGBColor(0x7B, 0x10, 0x80), "GI / Biliary",
"Upper endoscopy: variceal status\nColonoscopy: PSC (IBD) + cancer screening\nERCP/MRCP if biliary disease"),
(RGBColor(0x8B, 0x45, 0x13), "Nutritional / Other",
"Nutritional assessment + rehabilitation\nSarcopenia = strong adverse prognostic factor\nDental evaluation\nInfection screen (CMV, EBV, HIV, Hep serologies)\nPsychosocial evaluation (mandatory in ALD)"),
]
for i, (col, sys, desc) in enumerate(systems):
row = i // 3
icol = i % 3
x = 0.35 + icol * 4.33
y = 1.35 + row * 2.7
add_rect(slide, x, y, 4.1, 0.5, col)
add_text(slide, sys, x + 0.1, y, 3.9, 0.5,
font_size=14, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
add_rect(slide, x, y + 0.5, 4.1, 2.05, LIGHT_BLUE)
desc_lines = [(ln, False, 0, 12) for ln in desc.split("\n")]
add_textbox_multiline(slide, desc_lines, x + 0.1, y + 0.55, 3.9, 1.95, color=DARK_GREY)
# ─────────────────────────────────────────────────────────────────────────────
# SLIDE 12 – Surgical Technique Overview
# ─────────────────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, WHITE)
slide_header(slide, "Surgical Principles – The Operation")
slide_footer(slide)
phases = [
(NAVY, "Phase 1\nHEPATECTOMY", "Most technically demanding phase\nHazards: portal hypertension, coagulopathy,\nprior surgery adhesions, hepatosplenomegaly"),
(TEAL, "Phase 2\nANHEPATIC", "Native liver removed\nVenovenous bypass (classic) or\npiggybacking IVC to maintain haemodynamics\nDuration minimised – target <60 min"),
(ORANGE,"Phase 3\nNEOHEPATIC", "Graft implanted + reperfused\nFive anastomoses reconstructed\nReperfusion syndrome managed\nHaemostasis achieved"),
]
for i, (col, phase, desc) in enumerate(phases):
x = 0.35 + i * 4.33
add_rect(slide, x, 1.35, 4.0, 0.8, col)
add_text(slide, phase, x + 0.1, 1.35, 3.8, 0.8,
font_size=15, bold=True, color=WHITE,
align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
add_rect(slide, x, 2.15, 4.0, 1.4, LIGHT_BLUE)
desc_lines = [(ln, False, 0, 12) for ln in desc.split("\n")]
add_textbox_multiline(slide, desc_lines, x + 0.1, 2.2, 3.8, 1.3, color=DARK_GREY)
# Two techniques
add_rect(slide, 0.35, 3.75, 5.9, 3.45, RGBColor(0xE8, 0xF4, 0xFD))
add_rect(slide, 0.35, 3.75, 5.9, 0.5, NAVY)
add_text(slide, "Classic Technique (Conventional)", 0.45, 3.75, 5.7, 0.5,
font_size=14, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
add_textbox_multiline(slide, [
("Recipient native IVC excised en bloc with liver", False, 0, 12),
("Venovenous bypass (VVB): femoral + portal → axillary vein", False, 0, 12),
("Decompresses splanchnic + systemic circulation during anhepatic phase", False, 0, 12),
("Disadvantage: VVB complications (thrombosis, air embolism, lymphocele)", False, 0, 12),
], 0.5, 4.35, 5.6, 2.75, color=DARK_GREY)
add_rect(slide, 6.65, 3.75, 6.3, 3.45, RGBColor(0xFD, 0xF2, 0xE8))
add_rect(slide, 6.65, 3.75, 6.3, 0.5, ORANGE)
add_text(slide, "Piggyback Technique (Caval Sparing) – NOW PREFERRED", 6.75, 3.75, 6.1, 0.5,
font_size=13, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
add_textbox_multiline(slide, [
("Native IVC preserved; liver mobilised off IVC by ligating small hepatic veins", False, 0, 12),
("Three major hepatic veins united into cuff → anastomosed end-to-side to donor IVC", False, 0, 12),
("Advantages: No VVB required, ↓ blood loss, maintains cardiac preload, shorter OR time", True, 0, 12),
("Disadvantage: More demanding hepatic dissection off IVC", False, 0, 12),
], 6.8, 4.35, 6.0, 2.75, color=DARK_GREY)
# ─────────────────────────────────────────────────────────────────────────────
# SLIDE 13 – The Five Anastomoses
# ─────────────────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, WHITE)
slide_header(slide, "Surgical Principles – The Five Anastomoses")
slide_footer(slide)
anastomoses = [
(NAVY, "1. Suprahepatic IVC",
"Hepatic vein cuff → donor IVC\n(Piggyback: end-to-side)\nOr donor-to-recipient suprahepatic IVC (classic)"),
(TEAL, "2. Infrahepatic IVC",
"Donor-to-recipient IVC\nEnd-to-end anastomosis\n(Classic technique only;\nomitted in piggyback)"),
(ORANGE,"3. Portal Vein",
"End-to-end anastomosis\nInterposition jump graft (donor iliac vein)\nif recipient PV thrombosed\nMust avoid kinking"),
(RGBColor(0xC0, 0x20, 0x20), "4. Hepatic Artery",
"Microsurgical precision required\nCommon hepatic to common hepatic (standard)\nAortic jump graft: variant anatomy,\nprior surgery, irradiated vessels (CCA)"),
(RGBColor(0x14, 0x5A, 0x32), "5. Biliary Reconstruction",
"Option A: Choledochocholedochostomy\n(duct-to-duct) – preferred if normal CBD\nOption B: Roux-en-Y hepaticojejunostomy\n– PSC, biliary atresia, re-transplant"),
]
for i, (col, title, desc) in enumerate(anastomoses):
x = 0.35 + (i % 3) * 4.33
y = 1.35 + (i // 3) * 2.7
add_rect(slide, x, y, 4.0, 0.5, col)
add_text(slide, title, x + 0.1, y, 3.8, 0.5,
font_size=14, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
add_rect(slide, x, y + 0.5, 4.0, 2.05, LIGHT_BLUE)
desc_lines = [(ln, False, 0, 12) for ln in desc.split("\n")]
add_textbox_multiline(slide, desc_lines, x + 0.1, y + 0.55, 3.8, 1.95, color=DARK_GREY)
# Reperfusion note
add_rect(slide, 0.35, 6.65, 12.6, 0.6, LIGHT_TEAL)
add_text(slide,
"Reperfusion syndrome: systemic hypotension, bradycardia, hyperkalaemia, acidosis on unclamping of portal vein. Managed with calcium gluconate, bicarbonate, vasopressors + surgical flushing of graft before unclamping.",
0.5, 6.67, 12.2, 0.52, font_size=11, color=NAVY)
# ─────────────────────────────────────────────────────────────────────────────
# SLIDE 14 – Immunosuppression
# ─────────────────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, WHITE)
slide_header(slide, "Postoperative Management – Immunosuppression")
slide_footer(slide)
add_text(slide, "Standard Triple Therapy Backbone", 0.35, 1.3, 12.6, 0.45,
font_size=16, bold=True, color=NAVY)
drugs = [
(NAVY, "TACROLIMUS\n(FK-506)",
"Calcineurin inhibitor (CNI)\nInhibits IL-2 transcription\nMainstay of maintenance therapy\nTarget trough:\n Month 1: 10-15 ng/mL\n Thereafter: 5-10 ng/mL\nKey toxicities:\n Nephrotoxicity, neurotoxicity,\n hypertension, hyperglycaemia"),
(TEAL, "MYCOPHENOLATE\nMOFETIL (MMF)",
"Antimetabolite\nInhibits purine synthesis (IMPDH)\nBlocks lymphocyte proliferation\nDose: 1-1.5g BD\nKey toxicities:\n GI upset, leucopenia,\n teratogenic (women of\n childbearing age: caution)"),
(ORANGE, "CORTICOSTEROIDS\n(Prednisolone)",
"Broad anti-inflammatory\nBridge immunosuppression\nHigh dose peri-operatively\nTapered and often withdrawn\nby 3-12 months post-transplant\nKey toxicities:\n Diabetes, osteoporosis,\n cushingoid features, infection"),
]
for i, (col, drug, info) in enumerate(drugs):
x = 0.35 + i * 4.33
add_rect(slide, x, 1.85, 4.0, 0.8, col)
add_text(slide, drug, x + 0.1, 1.85, 3.8, 0.8,
font_size=15, bold=True, color=WHITE,
align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
add_rect(slide, x, 2.65, 4.0, 3.2, LIGHT_BLUE)
info_lines = [(ln, False, 0, 12) for ln in info.split("\n")]
add_textbox_multiline(slide, info_lines, x + 0.1, 2.7, 3.8, 3.1, color=DARK_GREY)
# Additional agents
add_rect(slide, 0.35, 6.0, 12.6, 1.2, RGBColor(0xFD, 0xF2, 0xE8))
add_rect(slide, 0.35, 6.0, 12.6, 0.38, ORANGE)
add_text(slide, "Additional / Alternative Agents", 0.5, 6.0, 12.3, 0.38,
font_size=12, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
add_textbox_multiline(slide, [
("Cyclosporine: alternative CNI (less potent than tacrolimus; more cosmetic side effects)", False, 0, 12),
("mTOR inhibitors (Sirolimus / Everolimus): used in HCC recipients (↓ recurrence), renal-sparing regimens. Avoid in early post-transplant (impairs wound healing)", False, 0, 12),
("Basiliximab (IL-2R antagonist): induction agent to delay or reduce CNI use (renal protection)", False, 0, 12),
], 0.5, 6.43, 12.3, 0.73, color=DARK_GREY)
# ─────────────────────────────────────────────────────────────────────────────
# SLIDE 15 – Rejection
# ─────────────────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, WHITE)
slide_header(slide, "Rejection After Liver Transplantation")
slide_footer(slide)
for i, (col, rtype, timing, features, biopsy, tx) in enumerate([
(TEAL, "ACUTE CELLULAR REJECTION (ACR)",
"Most common; first 6 weeks",
"Rising AST/ALT/ALP, bilirubin, fever, malaise",
"Portal inflammation + bile duct damage + endotheliitis (Banff criteria)",
"IV methylprednisolone 500-1000mg/day × 3 days then taper\nSteroid-refractory: ATG or OKT3"),
(RGBColor(0xC0, 0x20, 0x20), "CHRONIC DUCTOPENIC REJECTION\n(Vanishing Bile Duct Syndrome)",
"Months to years post-transplant",
"Progressive jaundice, rising ALP\nInsidious onset",
"Progressive loss of interlobular bile ducts\n>50% ducts absent = ductopenic rejection",
"Often irreversible\nOptimise immunosuppression\nMay require re-transplantation"),
]):
x = 0.35 + i * 6.5
add_rect(slide, x, 1.35, 6.15, 0.55, col)
add_text(slide, rtype, x + 0.1, 1.35, 5.95, 0.55,
font_size=14, bold=True, color=WHITE,
align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
fields = [
("Timing:", timing),
("Clinical Features:", features),
("Biopsy Findings:", biopsy),
("Treatment:", tx),
]
y = 2.05
for label, content in fields:
add_rect(slide, x, y, 6.15, 0.32, LIGHT_BLUE)
add_text(slide, label, x + 0.1, y, 6.0, 0.32,
font_size=12, bold=True, color=NAVY, v_anchor=MSO_ANCHOR.MIDDLE)
y += 0.32
lines = [(ln, False, 0, 12) for ln in content.split("\n")]
height = 0.3 * len(content.split("\n")) + 0.1
add_textbox_multiline(slide, lines, x + 0.2, y, 5.8, height, color=DARK_GREY)
y += height + 0.08
# Risk factors note
add_rect(slide, 0.35, 6.7, 12.6, 0.55, LIGHT_TEAL)
add_text(slide,
"Risk factors for chronic rejection: multiple ACR episodes, inadequate immunosuppression, CMV infection, tacrolimus under-dosing. Key post-LT infection prophylaxis: TMP-SMX (PJP), valganciclovir (CMV), fluconazole (fungal).",
0.5, 6.73, 12.2, 0.48, font_size=11, color=NAVY)
# ─────────────────────────────────────────────────────────────────────────────
# SLIDE 16 – Complications
# ─────────────────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, WHITE)
slide_header(slide, "Complications After Liver Transplantation")
slide_footer(slide)
# Vascular
add_rect(slide, 0.35, 1.35, 6.15, 0.42, NAVY)
add_text(slide, "Vascular Complications", 0.45, 1.35, 5.95, 0.42,
font_size=13, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
vasc = [
("Hepatic Artery Thrombosis (HAT)", "5-9% adults; higher in children. Entire biliary tree depends on hepatic artery post-LT → bile duct necrosis, bilomas. Early: urgent thrombectomy or re-transplantation."),
("Hepatic Artery Stenosis", "2-5%. Managed with radiological angioplasty ± stenting."),
("Portal Vein Thrombosis", "Up to 12%. Early: surgical thrombectomy; Late: TIPS or re-transplant for portal HTN."),
("IVC / Hepatic Vein Stenosis", "Rare. Endovascular stenting."),
]
y = 1.85
for comp, detail in vasc:
add_rect(slide, 0.35, y, 6.15, 0.3, LIGHT_BLUE)
add_text(slide, comp, 0.45, y, 5.95, 0.3, font_size=12, bold=True,
color=NAVY, v_anchor=MSO_ANCHOR.MIDDLE)
y += 0.3
lines = [(ln, False, 0, 11) for ln in detail.split("\n")]
ht = 0.28 * len(detail.split("\n")) + 0.05
add_textbox_multiline(slide, lines, 0.5, y, 5.8, ht, color=MID_GREY)
y += ht + 0.08
# Biliary
add_rect(slide, 6.8, 1.35, 6.15, 0.42, TEAL)
add_text(slide, "Biliary Complications (5-30% – most common morbidity)", 6.9, 1.35, 5.95, 0.42,
font_size=13, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
bili = [
("Anastomotic Strictures", "80% of strictures. Present 2-6 months post-LT. Duct-to-duct: ERCP + stenting. Roux-en-Y: percutaneous or surgical correction."),
("Bile Leaks", "From anastomosis or cut surface. ERCP ± stent, or surgery."),
("Non-anastomotic Strictures\n(Ischemic Cholangiopathy)", "Suggests HAT or DCD injury. Often requires re-transplantation."),
("Biliary Casts", "Up to 18% in first year. Endoscopic/percutaneous therapy 70% success. Mortality 10-30%."),
]
y = 1.85
for comp, detail in bili:
add_rect(slide, 6.8, y, 6.15, 0.3, LIGHT_BLUE)
comp_lines = [(ln, False, 0, 12) for ln in comp.split("\n")]
add_textbox_multiline(slide, [(comp, True, 0, 12)], 6.9, y, 5.95, 0.3,
color=NAVY, v_anchor=MSO_ANCHOR.MIDDLE)
y += 0.3
lines = [(ln, False, 0, 11) for ln in detail.split("\n")]
ht = 0.28 * len(detail.split("\n")) + 0.05
add_textbox_multiline(slide, lines, 6.9, y, 5.95, ht, color=MID_GREY)
y += ht + 0.08
# Infection note
add_rect(slide, 0.35, 6.5, 12.6, 0.75, RGBColor(0xFF, 0xEB, 0xEB))
add_textbox_multiline(slide, [
("Infection: most common cause of morbidity AND mortality (up to 75% of recipients).", True, 0, 12),
("0-1 month: hospital-acquired bacterial + fungal. 1-6 months: CMV, PCP, aspergillosis, EBV/PTLD. >6 months: community-acquired + late opportunistic.", False, 0, 11),
], 0.5, 6.52, 12.2, 0.7, color=DARK_GREY)
# ─────────────────────────────────────────────────────────────────────────────
# SLIDE 17 – Outcomes & Disease Recurrence
# ─────────────────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, WHITE)
slide_header(slide, "Outcomes & Disease Recurrence")
slide_footer(slide)
# Survival bar chart-like display
add_rect(slide, 0.35, 1.35, 12.6, 0.42, NAVY)
add_text(slide, "Patient Survival by Indication", 0.5, 1.35, 12.3, 0.42,
font_size=14, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
survivals = [
("Overall (1 yr)", 92, TEAL),
("Overall (3 yr)", 88, TEAL),
("Overall (5 yr)", 78, TEAL),
("PBC (5 yr)", 90, NAVY),
("HCC within Milan (5 yr)", 70, ORANGE),
("ALF (1 yr)", 72, RGBColor(0xC0, 0x20, 0x20)),
("Cholangiocarcinoma Mayo (5 yr)", 65, RGBColor(0x14, 0x5A, 0x32)),
]
bar_x = 0.5
bar_y = 1.9
bar_h = 0.55
spacing = 0.65
max_w = 10.0
for i, (label, pct, col) in enumerate(survivals):
y = bar_y + i * spacing
bar_w = max_w * pct / 100
add_rect(slide, bar_x + 2.5, y, bar_w, bar_h, col)
add_text(slide, label, bar_x, y, 2.4, bar_h,
font_size=12, color=DARK_GREY, v_anchor=MSO_ANCHOR.MIDDLE)
add_text(slide, f"{pct}%", bar_x + 2.5 + bar_w + 0.1, y, 0.7, bar_h,
font_size=12, bold=True, color=col, v_anchor=MSO_ANCHOR.MIDDLE)
# Disease recurrence
add_rect(slide, 0.35, 6.4, 12.6, 0.85, LIGHT_TEAL)
add_text(slide, "Disease Recurrence after LT:", 0.5, 6.42, 2.5, 0.35,
font_size=12, bold=True, color=NAVY)
add_text(slide, "HCV: virtually all recur (DAAs now used pre/post-LT) | HBV: prevented by HBIg + antivirals | PBC: 0-35% recurrence (usually mild; UDCA protective) | PSC: can recur | AIH: ~20-30% | HCC: 10-15% within Milan | PTLD: EBV-driven; treat with immunosuppression reduction ± rituximab",
0.5, 6.78, 12.3, 0.42, font_size=10, color=MID_GREY)
# ─────────────────────────────────────────────────────────────────────────────
# SLIDE 18 – Summary Table
# ─────────────────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, WHITE)
slide_header(slide, "Summary")
slide_footer(slide)
rows = [
("Domain", "Key Points", True),
("Most common indication", "Decompensated cirrhosis (ALD, NAFLD/NASH, viral hepatitis)", False),
("Paediatric", "Biliary atresia (most common in children)", False),
("Urgent (Status 1A)", "ALF: acetaminophen, viral, Wilson's, seronegative", False),
("Allocation tool", "MELD 3.0 score (bilirubin, creatinine, INR, Na, albumin, sex)", False),
("Absolute contraindication", "Active extrahepatic malignancy, uncontrolled sepsis, active substance use", False),
("HCC criterion", "Milan Criteria: single ≤5 cm or 3 tumors ≤3 cm; no vascular invasion", False),
("Preferred surgical technique", "Piggyback (caval-sparing) hepatectomy – no VVB required", False),
("Biliary reconstruction", "Duct-to-duct (preferred) or Roux-en-Y hepaticojejunostomy", False),
("Immunosuppression", "Tacrolimus + MMF ± corticosteroids", False),
("Most common complication", "Biliary (5-30%); infection (up to 75%)", False),
("Feared vascular complication", "Hepatic artery thrombosis (5-9% adults)", False),
("1-year survival", ">90%", False),
]
header_printed = False
for i, (domain, key, is_header) in enumerate(rows):
y = 1.35 + i * 0.44
bg = NAVY if is_header else (LIGHT_BLUE if i % 2 == 0 else WHITE)
txt_col = WHITE if is_header else DARK_GREY
add_rect(slide, 0.35, y, 4.2, 0.42, bg)
add_rect(slide, 4.6, y, 8.35, 0.42, bg)
add_text(slide, domain, 0.45, y, 4.0, 0.42,
font_size=12, bold=is_header, color=txt_col,
v_anchor=MSO_ANCHOR.MIDDLE)
add_text(slide, key, 4.7, y, 8.15, 0.42,
font_size=12, bold=is_header, color=txt_col,
v_anchor=MSO_ANCHOR.MIDDLE)
# ─────────────────────────────────────────────────────────────────────────────
# Save
# ─────────────────────────────────────────────────────────────────────────────
out_path = "/tmp/workspace/hepatic-transplant-ppt/Hepatic_Transplantation.pptx"
prs.save(out_path)
print(f"Saved: {out_path}")
print(f"Slides: {len(prs.slides)}")
cd /tmp/workspace/hepatic-transplant-ppt && python build_pptx.py 2>&1
ls -lh /tmp/workspace/hepatic-transplant-ppt/Hepatic_Transplantation.pptx
Hepatic Transplantation
Presentation · PPTX
| # | Slide Title |
|---|---|
| 1 | Title Slide – Hepatic Transplantation |
| 2 | Table of Contents |
| 3 | History & Background (timeline format) |
| 4 | Indications Overview (4 category boxes) |
| 5 | Chronic Liver Disease – Detailed Indications |
| 6 | Acute Liver Failure & King's College Criteria |
| 7 | Contraindications (Absolute vs. Relative) |
| 8 | MELD Score & Organ Allocation |
| 9 | Donor Selection & Organ Preservation |
| 10 | Living Donor Liver Transplantation |
| 11 | Preoperative Evaluation of the Recipient |
| 12 | Surgical Principles – The Three Phases |
| 13 | The Five Anastomoses |
| 14 | Immunosuppression (Triple Therapy) |
| 15 | Rejection (Acute & Chronic) |
| 16 | Complications (Vascular, Biliary, Infectious) |
| 17 | Outcomes & Disease Recurrence (bar chart) |
| 18 | Summary Table |