Cirrhosis with management of complications powerpoint presentation for PG imed students
cirrhosis AND complications
AASLD cirrhosis ascites hepatic encephalopathy variceal bleeding guidance
cirrhosis portal hypertension pathophysiology diagram ascites varices collateral circulation
endoscopic esophageal varices band ligation photograph

This diagnostic image is an endoscopic view of a band ligation procedure for esophageal varices. The photograph shows a clear, cylindrical banding cap placed directly over a protruding varix in the lower third of the esophagus. The varix appears as a swollen, pinkish-red mass with visible 'red signs' (cherry red spots), indicating a high risk of hemorrhage. The banding cap's rim is visible as a white circular edge, used to provide suction and facilitate the mechanical ligation of the varix. Surrounding the cap, the esophageal mucosa is erythematous and slightly edematous with some blood-tinged fluid present, consistent with recent instrumentation or oozing. This clinical photograph demonstrates the 'band-on-band' technique in gastroenterology, used to secure a suboptimal initial ligation. The primary educational focus is the visual identification of large-caliber esophageal varices and the corrective positioning of endoscopic variceal ligation (EVL) equipment in the management of portal hypertension complications.

This endoscopic clinical photograph consists of two panels illustrating the management of esophageal varices. Panel A shows Grade 3 esophageal varices, characterized by large, tortuous, and distended submucosal veins protruding significantly into the esophageal lumen. The varices appear congested with an irregular surface and visible 'red wale' markings, indicating a high risk of imminent hemorrhage. Panel B demonstrates the status post-endoscopic variceal ligation (EVL). A rubber band is seen encircling and strangulating a varix, resulting in localized tissue congestion and a dark, thrombosed appearance within the band. This therapeutic intervention is performed to achieve hemostasis and induce subsequent fibrosis of the varix. The surrounding esophageal mucosa appears intact with no signs of active spurting hemorrhage. These images are essential for teaching endoscopic grading of portal hypertension manifestations and the technical execution of variceal banding.

This clinical photograph shows an endoscopic view of an upper gastrointestinal procedure focused on the management of esophageal varices. The image depicts the esophageal lumen through a transparent plastic banding cap attached to the end of the endoscope. Within the center of the field, a large, reddish-pink, distended varix is visible. A bright blue elastic ligation band is seen partially encircling the base of the variceal tissue, demonstrating a key step in Endoscopic Variceal Ligation (EVL). The tissue appears congested and irregular, characteristic of portal hypertension. The banding cap is positioned to provide suction and visualization, facilitating the mechanical ligation process. This procedural image illustrates the technique of band-on-band ligation, where a secondary band is applied to ensure hemostasis and secure tissue prolapse when initial placement is suboptimal. The medical domain is Gastroenterology, and the target audience is intermediate-to-advanced medical students and surgical residents specializing in endoscopic interventions for GI bleeding.
ultrasound ascites cirrhosis abdomen image

This composite diagnostic image showcases the liver's appearance in early cirrhosis using two imaging modalities: abdominal ultrasound (panels a and b) and axial CT (panel c). The grayscale abdominal ultrasounds demonstrate a liver with an unsmooth surface and irregular margins. The parenchyma exhibits increased echogenicity with thickened, dot-like echoes and a coarse, uneven texture. Small, slightly hyperechoic nodules are dispersed throughout the liver tissue, representing early regenerative changes. The axial CT scan of the upper abdomen (panel c) reveals a distinctive wavy or nodular hepatic capsule, further indicating structural remodeling. Notable clinical findings include the absence of ascites and the exclusion of fatty liver or venous thromboembolism. These visual features are characteristic findings of early-stage liver cirrhosis, likely related to metabolic etiologies such as Wilson's disease, as indicated by the patient's genetic and biochemical context. This educational content is suitable for radiology and gastroenterology residents learning the morphological signs of chronic liver disease.

This comparative medical visual consists of two axial cross-sectional diagnostic images illustrating a case of hepatocellular carcinoma (HCC) before and after High-Intensity Focused Ultrasound (HIFU) ablation. Image (a) is a Contrast-Enhanced Computed Tomography (CECT) scan of the abdomen. It reveals a nodular, cirrhotic liver with a hypervascular hepatocellular carcinoma located at the liver dome. Significant gross ascites is visible as hypodense fluid accumulation surrounding the liver, spleen, and stomach, consistent with advanced (Child-Pugh C) cirrhosis. Image (b) is a Magnetic Resonance Imaging (MRI) scan of the same patient taken one month following HIFU ablation. The comparison demonstrates successful treatment, where the previously visible tumor in the liver dome shows signs of complete ablation with no evidence of residual enhancing tumor. The presence of significant ascites remains visible. These images are used in hepatology and oncology to demonstrate the feasibility and efficacy of non-invasive ablation techniques in patients with compromised liver function and perihepatic fluid.
~/
mkdir -p "/tmp/workspace/cirrhosis_pg_ppt/src" "/tmp/workspace/cirrhosis_pg_ppt/output" "/tmp/workspace/cirrhosis_pg_ppt/assets" && python -c "import pptx; print('python-pptx ready')"
python "/tmp/skills/shared/scripts/fetch_images.py" "https://cdn.orris.care/cdss_images/GLGCA_3307204_1763332663406_4ab60e8b-d07e-4eb1-8228-64a45f006724.png" "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_0966ac620d18f6c570dfb3585d1075bc9ad786d1fe3d388fdf9e2923cc9c4314.jpg" "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_004b204a78e95a9ff2f8111705881b06ea47d6dcf74c33e9c7fe7a0bfb913800.jpg" > "/tmp/workspace/cirrhosis_pg_ppt/assets/images.json"
python - <<'PY' import json,base64,os p='/tmp/workspace/cirrhosis_pg_ppt/assets/images.json' data=json.load(open(p)) out='/tmp/workspace/cirrhosis_pg_ppt/assets' for i,d in enumerate(data): if d.get('base64'): header,b64=d['base64'].split(',',1) ext='png' if 'png' in header else 'jpg' open(f'{out}/image{i+1}.{ext}','wb').write(base64.b64decode(b64)) print(f'{out}/image{i+1}.{ext}') PY
~/cirrhosis_pg_ppt/src/create_deck.py
from pptx import Presentation
from pptx.util import Inches, Pt
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from pptx.enum.shapes import MSO_SHAPE
from pptx.dml.color import RGBColor
from pptx.enum.dml import MSO_THEME_COLOR
from pptx.enum.text import MSO_AUTO_SIZE
from PIL import Image
import os
OUT='/tmp/workspace/cirrhosis_pg_ppt/output/Cirrhosis_Management_of_Complications_PG_IMED.pptx'
AS='/tmp/workspace/cirrhosis_pg_ppt/assets'
prs=Presentation(); prs.slide_width=Inches(13.333); prs.slide_height=Inches(7.5)
blank=prs.slide_layouts[6]
NAVY=RGBColor(13,43,66); TEAL=RGBColor(0,123,139); SKY=RGBColor(225,244,247); PALE=RGBColor(244,248,250)
INK=RGBColor(31,43,51); MUTED=RGBColor(86,102,112); RED=RGBColor(178,55,57); AMBER=RGBColor(192,120,0); GREEN=RGBColor(32,122,85); WHITE=RGBColor(255,255,255); LINE=RGBColor(203,218,225)
# helpers
def rect(s,x,y,w,h,fill,line=None,r=False):
sh=s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE if r else MSO_SHAPE.RECTANGLE, Inches(x),Inches(y),Inches(w),Inches(h))
sh.fill.solid(); sh.fill.fore_color.rgb=fill
sh.line.color.rgb=line or fill
if r: sh.adjustments[0]=0.08
return sh
def text(s,x,y,w,h,txt,size=18,color=INK,bold=False,align=None,font='Aptos',val=None):
box=s.shapes.add_textbox(Inches(x),Inches(y),Inches(w),Inches(h)); tf=box.text_frame; tf.clear(); tf.word_wrap=True
tf.margin_left=tf.margin_right=Inches(.03); tf.margin_top=tf.margin_bottom=Inches(.02)
lines=txt.split('\n')
for i,line in enumerate(lines):
p=tf.paragraphs[0] if i==0 else tf.add_paragraph(); p.text=line; p.space_after=Pt(5)
if align: p.alignment=align
for r in p.runs:
r.font.name=font; r.font.size=Pt(size); r.font.bold=bold; r.font.color.rgb=color
if val: tf.vertical_anchor=val
return box
def bulletbox(s,x,y,w,h,items,size=17,color=INK,accent=TEAL):
box=s.shapes.add_textbox(Inches(x),Inches(y),Inches(w),Inches(h)); tf=box.text_frame; tf.clear(); tf.word_wrap=True
tf.margin_left=Inches(.06); tf.margin_right=Inches(.02); tf.margin_top=Inches(.02)
for i,item in enumerate(items):
p=tf.paragraphs[0] if i==0 else tf.add_paragraph(); p.text=item; p.level=0; p.font.size=Pt(size); p.font.name='Aptos'; p.font.color.rgb=color; p.space_after=Pt(8)
p._p.get_or_add_pPr().insert(0, p._p._new_buChar(char='•'))
return box
def title(s,t,sub=None,n=None):
rect(s,0,0,13.333,.55,NAVY); text(s,.55,.12,11.8,.32,t,27,WHITE,True)
if sub: text(s,.58,.65,12,.26,sub,11,MUTED)
if n is not None: text(s,12.35,7.1,.45,.22,str(n),10,MUTED,False,PP_ALIGN.RIGHT)
rect(s,.55,1.03,1.05,.055,TEAL)
def card(s,x,y,w,h,head,body,accent=TEAL,fs=16):
rect(s,x,y,w,h,WHITE,LINE,True); rect(s,x,y,.08,h,accent)
text(s,x+.22,y+.16,w-.35,.3,head,16,accent,True)
if isinstance(body,list): bulletbox(s,x+.22,y+.57,w-.38,h-.68,body,fs)
else: text(s,x+.22,y+.58,w-.4,h-.65,body,fs,INK)
def add_image(s,path,x,y,w,h):
# crop exactly to target aspect
im=Image.open(path); iw,ih=im.size; ar=w/h; iar=iw/ih
pic=s.shapes.add_picture(path, Inches(x),Inches(y),width=Inches(w),height=Inches(h))
return pic
def footer(s,label='PG Internal Medicine | Educational use - align local protocols'):
text(s,.55,7.1,10.8,.22,label,9,MUTED)
# 1
s=prs.slides.add_slide(blank); rect(s,0,0,13.333,7.5,NAVY); rect(s,0,0,13.333,.18,TEAL)
text(s,.72,1.05,7.5,.7,'Cirrhosis',42,WHITE,True); text(s,.72,1.85,8.3,.75,'Management of complications',34,RGBColor(132,219,223),True)
text(s,.76,2.85,6.6,.7,'A PG Internal Medicine teaching presentation',20,WHITE)
rect(s,.75,4.2,5.2,.78,TEAL,r=True); text(s,.98,4.42,4.75,.26,'Recognise • Stabilise • Prevent • Refer',17,WHITE,True,PP_ALIGN.CENTER)
add_image(s,AS+'/image1.jpg',8.45,.75,4.15,5.78); text(s,8.48,6.63,4.0,.36,'Portal hypertension drives most decompensation.',11,RGBColor(210,230,235),False,PP_ALIGN.CENTER)
text(s,.76,6.75,7.5,.28,'For academic discussion. Drug choice and dose must follow patient factors and local policy.',10,RGBColor(190,208,216))
# 2
s=prs.slides.add_slide(blank); title(s,'Learning objectives','After this session, the learner should be able to:',2)
for i,(h,b) in enumerate([('Stage disease','Define compensated and decompensated cirrhosis; use Child-Pugh and MELD-Na appropriately.'),('Act early','Apply first-hour actions for variceal hemorrhage, infection, AKI and encephalopathy.'),('Manage complications','Use practical pathways for ascites, SBP, HRS-AKI, HE, varices and hydrothorax.'),('Plan long-term care','Implement surveillance, nutrition, vaccination, transplant referral and palliative care.')]):
x=.7+(i%2)*6.15; y=1.45+(i//2)*2.35; card(s,x,y,5.65,1.8,h,b,TEAL if i<2 else GREEN,15)
footer(s)
# 3
s=prs.slides.add_slide(blank); title(s,'Cirrhosis: a clinical staging framework','Decompensation changes prognosis and mandates specialist evaluation.',3)
card(s,.7,1.4,3.9,4.7,'COMPENSATED','• Often asymptomatic\n• CSPH may be present\n• Screen for varices / HCC\n• Address aetiology and alcohol use\n• Prevent first decompensation',GREEN,18)
card(s,4.75,1.4,3.9,4.7,'DECOMPENSATED','• Ascites\n• Variceal bleeding\n• Overt hepatic encephalopathy\n• Jaundice / infection / AKI\n• Consider transplant referral',AMBER,18)
card(s,8.8,1.4,3.8,4.7,'ACUTE-ON-CHRONIC LIVER FAILURE','• Acute decompensation + organ failure(s)\n• Infection commonly precipitates\n• Rapidly assess organ support needs\n• Early ICU + hepatology input',RED,18)
footer(s,'Decompensation is defined by ascites, hepatic encephalopathy or portal hypertensive GI bleeding.')
# 4
s=prs.slides.add_slide(blank); title(s,'Initial assessment of the patient with decompensated cirrhosis','Treat deterioration as a time-sensitive syndrome, not as isolated symptoms.',4)
for x,h,items,c in [(.7,'1. Stabilise',['ABCDE, monitor, two IV lines','Capillary glucose; ECG if indicated','Avoid unnecessary sedatives / nephrotoxins','Early senior, GI/hepatology input'],RED),(4.55,'2. Find precipitants',['GI bleed, infection, alcohol relapse','Volume depletion / over-diuresis','Constipation, electrolyte disturbance','New drugs, portal vein thrombosis, HCC'],AMBER),(8.4,'3. Stage and investigate',['CBC, CMP, INR, creatinine, Na, bilirubin','Cultures when infection suspected','Diagnostic tap for any hospitalised ascites','US Doppler / cross-sectional imaging when indicated'],TEAL)]: card(s,x,1.4,3.55,4.85,h,items,c,15)
footer(s)
# 5
s=prs.slides.add_slide(blank); title(s,'Risk stratification and monitoring','Scores support decisions. They do not replace trajectory and bedside judgement.',5)
card(s,.7,1.45,3.85,4.75,'CHILD-PUGH','Bilirubin, albumin, INR, ascites, encephalopathy\n\nUseful for clinical severity and portal hypertension decisions.\n\nLimitations: subjective ascites / HE components.',TEAL,17)
card(s,4.75,1.45,3.85,4.75,'MELD-Na','Bilirubin, INR, creatinine, sodium\n\nPrimary liver-transplant allocation score in many systems.\n\nTrend with clinical events, renal function and Na.',GREEN,17)
card(s,8.8,1.45,3.85,4.75,'RED FLAGS','Rising creatinine, Na fall, hypotension, bleeding, sepsis, worsening jaundice, recurrent HE, refractory ascites, sarcopenia.\n\nEscalate care early.',RED,17)
footer(s)
# 6
s=prs.slides.add_slide(blank); title(s,'Ascites: evaluate before treating','New or worsening ascites needs diagnostic paracentesis.',6)
add_image(s,AS+'/image3.jpg',.72,1.42,3.55,3.95)
text(s,.75,5.5,3.5,.38,'Cirrhotic morphology on ultrasound',11,MUTED,False,PP_ALIGN.CENTER)
card(s,4.6,1.42,3.75,4.75,'DIAGNOSTIC TAP','• Cell count with differential\n• Culture: inoculate bedside into blood-culture bottles\n• Albumin + total protein\n• SAAG ≥1.1 g/dL supports portal hypertensive ascites\n• Consider cytology, amylase, AFB only when indicated',TEAL,15)
card(s,8.63,1.42,3.95,4.75,'LOOK FOR','• SBP: PMN ≥250 cells/mm³\n• Low ascitic protein: SBP risk\n• Hyponatraemia / AKI\n• Tense or refractory ascites\n• Hepatic hydrothorax\n• Malignancy / portal-vein thrombosis where appropriate',AMBER,15)
footer(s)
# 7
s=prs.slides.add_slide(blank); title(s,'Ascites: routine and refractory management','Aim for safe negative sodium balance while preserving effective arterial volume.',7)
card(s,.7,1.4,3.9,4.9,'UNCOMPLICATED ASCITES',['Moderate sodium restriction: roughly 2 g sodium/day','Spironolactone ± furosemide, commonly 100:40 mg ratio','Titrate cautiously; monitor weight, Na, K, creatinine and BP','Fluid restriction only for clinically significant hyponatraemia'],TEAL,15)
card(s,4.75,1.4,3.9,4.9,'TENSE / REFRACTORY ASCITES',['Large-volume paracentesis for symptom relief','Give albumin after removal of >5 L, typically 6-8 g per L removed','Review adherence and remove NSAIDs, ACEi/ARB where appropriate','Assess transplant candidacy and TIPS suitability'],AMBER,15)
card(s,8.8,1.4,3.8,4.9,'SAFETY CHECK',['Avoid overly rapid weight loss, especially without peripheral oedema','Hold/reduce diuretics with AKI, severe hyponatraemia, symptomatic hypotension or severe encephalopathy','TIPS can worsen HE and precipitate heart failure: multidisciplinary selection'],RED,15)
footer(s,'Typical doses shown are adult teaching examples, not prescriptions. Individualise to renal function, electrolytes and haemodynamics.')
# 8
s=prs.slides.add_slide(blank); title(s,'Spontaneous bacterial peritonitis (SBP)','A diagnostic paracentesis is an emergency test in hospitalised patients with ascites.',8)
card(s,.7,1.4,3.8,4.85,'SUSPECT WHEN',['Fever, abdominal pain, diarrhoea','New or worse HE, AKI, shock','GI bleed or clinical deterioration','May be asymptomatic: do not wait for symptoms'],RED,16)
card(s,4.75,1.4,3.8,4.85,'DIAGNOSIS',['Ascitic PMN ≥250 cells/mm³','Obtain cultures before antibiotics if this does not delay treatment','Blood cultures; assess for secondary peritonitis if atypical response or polymicrobial fluid'],TEAL,16)
card(s,8.8,1.4,3.8,4.85,'TREAT + PREVENT',['Start empiric antibiotics guided by community vs nosocomial setting and local resistance','Give albumin in patients at risk of renal dysfunction, per protocol','Repeat tap at ~48 h if inadequate response','Secondary prophylaxis after SBP; primary prophylaxis in selected high-risk patients'],GREEN,16)
footer(s,'Delay in antibiotic therapy increases mortality. Choice of antibiotic must follow local microbiology policy.')
# 9
s=prs.slides.add_slide(blank); title(s,'Acute kidney injury and HRS-AKI','Exclude reversible causes and structural kidney injury before labelling HRS-AKI.',9)
card(s,.7,1.4,3.8,4.9,'FIRST STEPS',['Confirm AKI trend; assess volume status','Stop diuretics, NSAIDs and nephrotoxins','Treat bleeding, sepsis and hypovolaemia','Urinalysis, microscopy; renal ultrasound when indicated','Volume expansion with albumin when clinically appropriate'],AMBER,15)
card(s,4.75,1.4,3.8,4.9,'HRS-AKI: THINK OF IT WHEN',['Cirrhosis with ascites + AKI','No shock and no current nephrotoxic exposure','No evidence of structural renal injury','No improvement after adequate volume assessment / albumin challenge'],TEAL,15)
card(s,8.8,1.4,3.8,4.9,'MANAGEMENT',['Vasoconstrictor plus albumin: terlipressin where appropriate; norepinephrine in ICU alternatives','Close monitoring for ischaemia and respiratory complications','RRT as bridge for selected patients','Urgent transplant evaluation: definitive therapy is liver transplantation'],RED,15)
footer(s)
# 10
s=prs.slides.add_slide(blank); title(s,'Hepatic encephalopathy (HE)','A clinical diagnosis. Treat precipitants and protect the airway when needed.',10)
card(s,.7,1.4,3.8,4.85,'RECOGNISE',['Covert: impaired attention, psychomotor slowing','Overt: disorientation, asterixis, somnolence, coma','Consider alternative diagnoses: stroke, intoxication, metabolic encephalopathy, subdural bleed'],AMBER,16)
card(s,4.75,1.4,3.8,4.85,'FIND PRECIPITANTS',['Constipation, infection, GI bleed','Hypokalaemia, hyponatraemia, alkalosis','Dehydration / over-diuresis','Sedatives, opioids, alcohol, renal failure','Non-adherence to therapy'],TEAL,16)
card(s,8.8,1.4,3.8,4.85,'TREAT',['Airway protection / ICU for grade III-IV or aspiration risk','Lactulose titrated to 2-3 soft stools daily','Add rifaximin for recurrent overt HE despite lactulose','Do not impose protein restriction; optimise nutrition'],GREEN,16)
footer(s,'Ammonia does not reliably grade HE or direct serial management.')
# 11
s=prs.slides.add_slide(blank); title(s,'Acute variceal haemorrhage: first-hour bundle','Resuscitate conservatively, treat portal pressure, control bleeding endoscopically, prevent infection.',11)
add_image(s,AS+'/image2.jpg',9.55,1.48,2.85,3.2)
text(s,9.55,4.75,2.85,.45,'Endoscopic variceal ligation',10,MUTED,False,PP_ALIGN.CENTER)
card(s,.7,1.4,4.1,4.95,'0-6 HOURS',['ABCDE; intubate before endoscopy if airway risk','Restrictive RBC transfusion strategy: target Hb ~7-9 g/dL in most','Start vasoactive drug immediately: octreotide / terlipressin per local protocol','Antibiotic prophylaxis: ceftriaxone commonly used','Urgent endoscopy, generally within 12 h, with EVL for oesophageal varices'],RED,15)
card(s,5.05,1.4,4.1,4.95,'IF UNCONTROLLED / HIGH RISK',['Temporary bridge: balloon tamponade or self-expanding oesophageal stent in expert hands','Early/pre-emptive TIPS in selected high-risk patients','Rescue TIPS for failure of standard therapy','Avoid routine correction of INR with FFP solely because INR is prolonged','After control: secondary prophylaxis with NSBB + serial EVL'],TEAL,15)
footer(s)
# 12
s=prs.slides.add_slide(blank); title(s,'Portal hypertension: preventing first and recurrent bleeding','Non-selective beta-blockade changes the natural history of clinically significant portal hypertension.',12)
card(s,.7,1.45,3.85,4.75,'PRIMARY PREVENTION',['Identify CSPH using clinical, imaging, elastography and endoscopic evidence','NSBB: carvedilol or propranolol/nadolol when appropriate','If NSBB contraindicated or intolerant: endoscopic surveillance and EVL for high-risk varices','Avoid NSBB in shock, severe hypotension or acute kidney injury'],TEAL,16)
card(s,4.75,1.45,3.85,4.75,'SECONDARY PREVENTION',['Combination of NSBB + serial EVL','Continue until eradication; surveillance thereafter','Assess adherence, BP, renal function and heart rate','Rebleeding despite optimal therapy: evaluate for TIPS'],GREEN,16)
card(s,8.8,1.45,3.85,4.75,'GASTRIC VARICES',['Management differs from oesophageal varices','Expert endoscopy / interventional radiology essential','Options include cyanoacrylate therapy, TIPS or BRTO-type procedures depending on anatomy and expertise'],AMBER,16)
footer(s)
# 13
s=prs.slides.add_slide(blank); title(s,'Hepatic hydrothorax and cardiopulmonary syndromes','Consider these in unexplained dyspnoea or hypoxaemia in cirrhosis.',13)
card(s,.7,1.4,3.8,4.9,'HEPATIC HYDROTHORAX',['Usually right-sided pleural effusion through diaphragmatic defects','Exclude cardiac, pulmonary and malignant causes','Sodium restriction + diuretics; therapeutic thoracentesis for symptoms','Avoid routine chest tubes: high risk of complications','Refractory: TIPS assessment, transplant evaluation'],TEAL,16)
card(s,4.75,1.4,3.8,4.9,'HEPATOPULMONARY SYNDROME',['Hypoxaemia + intrapulmonary vascular dilatation','Think of platypnoea / orthodeoxia','Screen with pulse oximetry; ABG and contrast echo for work-up','Supplemental oxygen; liver transplant is definitive therapy'],GREEN,16)
card(s,8.8,1.4,3.8,4.9,'PORTOPULMONARY HYPERTENSION',['Pulmonary arterial hypertension in portal hypertension','Screen symptoms / echo, confirm with right-heart catheterisation','Specialist pulmonary hypertension therapy','Transplant eligibility depends on haemodynamic response'],AMBER,16)
footer(s)
# 14
s=prs.slides.add_slide(blank); title(s,'HCC surveillance and vascular complications','Prevent missed opportunities for curative therapy.',14)
card(s,.7,1.4,3.8,4.9,'HCC SURVEILLANCE',['Ultrasound plus AFP every 6 months for eligible cirrhosis patients','New lesion or rising AFP: multiphasic CT or MRI using LI-RADS approach','Stage tumour, liver function and performance status together','Early multidisciplinary discussion: resection, ablation, transplant or locoregional therapy'],GREEN,15)
card(s,4.75,1.4,3.8,4.9,'PORTAL VEIN THROMBOSIS',['Confirm anatomy / chronicity and exclude tumour thrombus','Assess bleeding risk and transplant implications','Anticoagulation may be appropriate in selected patients and is not automatically contraindicated','Coordinate hepatology, haematology and interventional radiology'],TEAL,15)
card(s,8.8,1.4,3.8,4.9,'BONE + NUTRITION',['Screen frailty / sarcopenia and osteoporosis risk','Dietetics: 35 kcal/kg/day and protein 1.2-1.5 g/kg/day if feasible','Small frequent meals + late-evening snack','Vitamin and trace-element replacement based on deficiency'],AMBER,15)
footer(s)
# 15
s=prs.slides.add_slide(blank); title(s,'Disease-modifying care: manage the cause','Remove the driver of liver injury and reduce future decompensation.',15)
for i,(h,body,c) in enumerate([('Alcohol-associated liver disease','Brief intervention, addiction medicine, thiamine, relapse-prevention therapy where appropriate. Abstinence improves outcomes.',RED),('Viral hepatitis','Treat HBV / HCV with guideline-based antiviral therapy; continue HCC surveillance when cirrhosis persists.',TEAL),('MASLD / metabolic disease','Weight management, diabetes control, cardiovascular risk management; avoid hepatotoxic supplements.',GREEN),('Autoimmune / cholestatic / genetic','Aetiology-specific therapy and specialist follow-up: immunosuppression, UDCA, phlebotomy, chelation or enzyme-directed care as indicated.',AMBER)]):
x=.7+(i%2)*6.1; y=1.4+(i//2)*2.35; card(s,x,y,5.7,1.82,h,body,c,15)
footer(s)
# 16
s=prs.slides.add_slide(blank); title(s,'Transplant referral and goals of care','Refer early. Transplant assessment is a process, not a last-minute rescue.',16)
card(s,.7,1.42,3.85,4.88,'REFER FOR TRANSPLANT WHEN',['First clinically significant decompensation','MELD-Na rising or around 15 or higher','Refractory ascites, recurrent variceal bleeding, recurrent HE, HRS-AKI','HCC within transplant pathways','Significant frailty needs optimisation, not automatic exclusion'],GREEN,15)
card(s,4.75,1.42,3.85,4.88,'PALLIATIVE CARE IN PARALLEL',['Symptom control: pain, dyspnoea, pruritus, nausea, sleep','Advance care planning and realistic prognosis conversations','Caregiver support and psychosocial needs','Avoid framing palliative care as “no treatment”'],TEAL,15)
card(s,8.8,1.42,3.85,4.88,'WHEN TO ESCALATE',['Shock, active GI bleed, severe sepsis','Grade III-IV HE / airway compromise','Rapid AKI, severe hyponatraemia, respiratory failure','Suspected ACLF or multi-organ failure','ICU + hepatology + transplant-centre discussion'],RED,15)
footer(s)
# 17
s=prs.slides.add_slide(blank); title(s,'A practical complication checklist for rounds','Use a standardised review to avoid preventable harm.',17)
items=['Is there infection? Has a diagnostic tap been done if ascites is present?','Is there bleeding? Has vasoactive therapy, antibiotic prophylaxis and urgent endoscopy been arranged?','Is kidney function changing? Stop nephrotoxins and reassess haemodynamics.','Is mental state altered? Identify precipitants and ensure lactulose plan is clear.','Is ascites controlled safely? Check weight, Na, K, creatinine and diuretic tolerance.','Is HCC surveillance due? Is the patient eligible for transplant referral?','Are nutrition, alcohol treatment, vaccination and caregiver needs addressed?']
for i,it in enumerate(items):
y=1.25+i*.72; rect(s,.78,y,.45,.45,TEAL if i<4 else GREEN,r=True); text(s,.89,y+.1,.22,.2,str(i+1),12,WHITE,True,PP_ALIGN.CENTER); text(s,1.42,y+.05,10.9,.38,it,16,INK)
footer(s)
# 18
s=prs.slides.add_slide(blank); title(s,'Case discussion','A 54-year-old man with alcohol-associated cirrhosis presents with confusion, melena and tense ascites.',18)
card(s,.7,1.35,3.8,5.1,'DATA','BP 94/58 mmHg; HR 112/min\nHb 7.4 g/dL; creatinine 1.8 mg/dL (baseline 0.9); Na 128 mmol/L\n\nAsterixis; no focal deficit\n\nWhat must happen in the first hour?',RED,16)
card(s,4.75,1.35,3.8,5.1,'IMMEDIATE ACTIONS','1. ABCDE, monitoring, resuscitate; crossmatch\n2. Restrictive RBC strategy\n3. Start vasoactive drug + antibiotic prophylaxis\n4. Diagnostic paracentesis and cultures\n5. Lactulose after airway assessment; search for precipitants\n6. Stop diuretics / nephrotoxins; assess AKI\n7. Urgent endoscopy and hepatology / ICU input',TEAL,15)
card(s,8.8,1.35,3.8,5.1,'NEXT DECISIONS','• EVL if oesophageal variceal source\n• Albumin and antibiotics if SBP / high renal risk\n• Evaluate HRS-AKI after volume and infection management\n• Secondary prophylaxis after bleed\n• Transplant-centre referral after stabilisation',GREEN,15)
footer(s)
# 19
s=prs.slides.add_slide(blank); title(s,'Take-home messages','High-yield points for clinical practice.',19)
for i,t in enumerate(['Every hospitalised patient with cirrhosis and ascites needs early diagnostic paracentesis.','In suspected variceal bleeding, start vasoactive therapy and antibiotic prophylaxis before endoscopy.','HE is clinical: treat precipitants, give lactulose, and add rifaximin for recurrent overt episodes.','AKI in cirrhosis is a diagnostic emergency. Stop nephrotoxins, assess volume and treat infection/bleeding.','Refractory ascites, recurrent HE, variceal bleeding, HRS-AKI and HCC should trigger transplant evaluation.']):
y=1.18+i*1.02; rect(s,.8,y,.55,.55,TEAL if i<3 else GREEN,r=True); text(s,.95,y+.13,.25,.22,'✓',17,WHITE,True,PP_ALIGN.CENTER); text(s,1.6,y+.07,10.7,.55,t,19,INK,True if i==0 else False)
footer(s)
# 20
s=prs.slides.add_slide(blank); title(s,'Selected references and guidance','Use local policy and updated society guidance for final prescribing decisions.',20)
refs=['AASLD. Back to Basics: Outpatient Management of Cirrhosis. Accessed 2026.','AASLD. Diagnosis, Evaluation and Management of Ascites, Spontaneous Bacterial Peritonitis and Hepatorenal Syndrome. Practice Guidance, 2021.','AASLD. Practice Guidance on Risk Stratification and Management of Portal Hypertension and Varices in Cirrhosis.','Sleisenger and Fordtran’s Gastrointestinal and Liver Disease, 11th ed. Sections on cirrhosis, ascites, SBP and variceal bleeding.','EASL Clinical Practice Guidelines and Baveno VII consensus statements on portal hypertension and decompensated cirrhosis.','AlSowaiegh RM et al. Human albumin solution for complications of liver cirrhosis: systematic review and meta-analysis. Hepatol Commun. 2026; PMID 41543475.']
rect(s,.72,1.28,11.9,4.9,PALE,LINE,True); bulletbox(s,.98,1.58,11.35,4.35,refs,15,INK)
text(s,.78,6.42,11.7,.36,'Textbook content used for ascites, SBP and acute variceal bleeding: Sleisenger and Fordtran’s Gastrointestinal and Liver Disease, 11th ed., pp. 1477-1483 and associated variceal bleeding sections.',10,MUTED)
footer(s,'Image sources: medical-library educational images. For teaching use only.')
# add speaker notes with safety note not supported by python-pptx reliably, omit
prs.save(OUT)
print(OUT)
python "/tmp/workspace/cirrhosis_pg_ppt/src/create_deck.py" && ls -lh "/tmp/workspace/cirrhosis_pg_ppt/output/Cirrhosis_Management_of_Complications_PG_IMED.pptx"
~/cirrhosis_pg_ppt/src/create_deck.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/cirrhosis_pg_ppt/src/create_deck.py'
python "/tmp/workspace/cirrhosis_pg_ppt/src/create_deck.py" && ls -lh "/tmp/workspace/cirrhosis_pg_ppt/output/Cirrhosis_Management_of_Complications_PG_IMED.pptx"
python - <<'PY' from pptx import Presentation p='/tmp/workspace/cirrhosis_pg_ppt/output/Cirrhosis_Management_of_Complications_PG_IMED.pptx' prs=Presentation(p) print('slides',len(prs.slides)) for i,s in enumerate(prs.slides,1): txt=' '.join(sh.text.replace('\n',' | ') for sh in s.shapes if hasattr(sh,'text') and sh.text.strip()) print(i, len(txt), txt[:95]) PY
Cirrhosis Management of Complications PG IMED
Presentation · PPTX