attachment
attachment
attachment
attachment

A female

Reading File
analyse_media
analyse_media
Here is a full clinical summary and interpretation of both reports for Menaka Manavalan, 53F, investigated on 25 June 2026 at Naruvi Hospitals, Vellore.

1. Upper GI Endoscopy

Impression: LA Grade B Esophagitis
AreaFinding
EsophagusLA Grade B esophagitis in the lower esophagus
GE junctionAt 39 cm; diaphragmatic pinch at 40 cm
Stomach (Fundus, Body, Antrum, Pylorus)Normal
Duodenum (D1, D2)Normal
BiopsyNot taken
What this means:
  • LA Grade B esophagitis is caused by gastroesophageal reflux disease (GERD). Grade B means there are mucosal breaks (erosions) longer than 5 mm in the lower esophagus, but they do not merge between folds (that would be Grade C/D).
  • The GE junction at 39 cm and diaphragmatic pinch at 40 cm suggests a very small sliding hiatus hernia (1 cm separation), which is a common contributor to GERD.
  • The stomach and duodenum are completely normal - no ulcers, gastritis, or polyps.

2. Ultrasound Abdomen & Pelvis

Impressions:
  1. Hepatomegaly with diffuse Grade II fatty changes (liver size ~16.4 cm, increased echogenicity)
  2. Cholelithiasis without features of cholecystitis (multiple gallstones, largest ~7 mm; no wall thickening, no pericholecystic fluid)
OrganFinding
LiverEnlarged (~16.4 cm); diffusely increased echogenicity (fatty liver, Grade II)
GallbladderMultiple stones, largest ~7 mm; no inflammation
Biliary tree / CBDNormal, not dilated
PancreasHead and proximal body normal; distal obscured by bowel gas
SpleenNormal
KidneysBoth normal in size and morphology
Uterus5.5 x 3.1 x 9.8 cm; endometrial stripe 5.5 mm - normal for age
OvariesRight: 3.8 x 1.4 cm; Left: 2.0 x 1.0 cm - normal
Free fluidNone
What this means:
  • Grade II Non-Alcoholic Fatty Liver Disease (NAFLD) - the liver is enlarged and echogenic (bright on ultrasound), suggesting moderate fat deposition. This is very common in metabolic syndrome and needs further workup (LFTs, lipid profile, blood sugar, BMI).
  • Cholelithiasis (gallstones) - incidentally found, asymptomatic (no cholecystitis). These may not need immediate surgical intervention if she has no biliary colic symptoms.
  • The uterus and ovaries are normal - no significant gynecological pathology.

Overall Clinical Picture

This 53-year-old woman has a triad of common metabolic/lifestyle-related conditions:
  1. GERD with LA Grade B esophagitis - treat with Proton Pump Inhibitors (e.g., Pantoprazole 40 mg OD before breakfast), dietary modifications (avoid late meals, fatty/spicy food, caffeine), elevate head of bed, weight management.
  2. NAFLD Grade II - lifestyle intervention is the cornerstone (weight loss, low-fat diet, exercise, control of diabetes/dyslipidemia if present). Consider hepatology follow-up.
  3. Cholelithiasis - monitor; if she develops biliary colic or complications, surgical referral (laparoscopic cholecystectomy) would be warranted.
Suggested next steps for her doctors:
  • Liver function tests, fasting blood sugar, HbA1c, lipid profile (to assess metabolic risk for NAFLD)
  • Consider H. pylori testing if not already done
  • Follow-up endoscopy in 8-12 weeks after PPI therapy to confirm healing
  • Surgical/GI review for gallstones if symptomatic

Patient has frequent right upper pain, and near umbilicus pain, right lower quadrant spasmodic pain . Overall pain relived on taking pain medications

Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Based on the clinical picture and textbook evidence, here is a thorough analysis of Menaka's pain symptoms in context of her investigations.

Clinical Analysis: Pain Pattern in Menaka Manavalan (53F)

Pain Distribution She's Describing

LocationLikely Source
Right upper quadrant (RUQ)Gallstones (biliary colic) / Fatty liver (hepatomegaly)
Periumbilical (near-umbilicus)Referred visceral pain from biliary/intestinal origin
Right lower quadrant (RLQ) - spasmodicPossible intestinal spasm / could be referred from above
Relieved by pain medicationsSuggests smooth muscle spasm, NOT acute surgical emergency

Most Likely Cause: Symptomatic Cholelithiasis (Biliary Colic)

Her gallstones - already found on ultrasound - have now clearly become symptomatic. This changes their management status entirely.
"Symptomatic cholelithiasis is characterized by biliary colic, a dull discomfort in the RUQ or epigastrium that occurs postprandially. Discomfort is typically associated with fatty foods due to gallbladder contraction against an obstructing gallstone... This pain is typically self-limited but may radiate to the back or right shoulder and may present with nausea, vomiting, and diaphoresis." - Fischer's Mastery of Surgery
Key features confirming biliary colic in this patient:
  • RUQ pain - the hallmark location
  • Spasmodic, intermittent nature (not constant)
  • Relief with analgesics/antispasmodics
  • Known gallstones on ultrasound (multiple, up to 7 mm)
  • No fever, no jaundice = not yet cholecystitis or cholangitis

Contributing Factor: Hepatomegaly / NAFLD

The enlarged liver (16.4 cm with Grade II fatty changes) sits in the RUQ and can itself cause dull aching RUQ discomfort due to capsular stretching (Glisson's capsule). This may be adding to her baseline pain on top of the biliary colic.

Why RLQ and Periumbilical Pain?

Visceral pain from the gallbladder and biliary system is poorly localized by the brain. Early or referred biliary pain often presents as periumbilical or diffuse abdominal pain before localizing to the RUQ. The spasmodic RLQ component likely represents:
  1. Referred visceral pain from gallbladder/biliary tree
  2. Intestinal spasm (secondary to the same irritation/inflammatory process)
  3. Possibly IBS-like component aggravated by GERD/fatty liver

Red Flag Check - Is This an Emergency?

FeatureThis PatientConcern Level
FeverNot mentionedLow
JaundiceNot reportedLow
Persistent pain >6 hoursRelieved by medsLow
VomitingNot reportedLow
Rebound tendernessNot examinedNeeds assessment
The fact that pain relieves with medications is reassuring - this rules out acute cholecystitis (which would be persistent, progressive, with fever and Murphy's sign).

Recommended Action Plan

Immediate Steps

  1. Surgical referral now warranted - The gallstones are no longer asymptomatic. As per standard guidelines: "Cholecystectomy is the therapy of choice for symptomatic gallstone disease." (Washington Manual) - Laparoscopic cholecystectomy should be planned.
  2. LFTs, CBC, serum amylase/lipase - To rule out early cholecystitis, choledocholithiasis, or gallstone pancreatitis.
  3. Fasting blood sugar, HbA1c, lipid profile - For the NAFLD workup, which is contributing to the liver pain.

For Pain Relief (Until Surgery)

  • NSAIDs (e.g., Diclofenac 75 mg or Ketorolac IM) - first-line for biliary colic; they also reduce short-term gallstone complications
  • Antispasmodics (e.g., Hyoscine butylbromide / Buscopan) - helpful for the spasmodic component
  • Avoid opioids if possible - they can cause sphincter of Oddi spasm

Dietary Advice

  • Avoid fatty, fried, spicy foods - these trigger gallbladder contraction
  • Small, frequent, low-fat meals
  • Avoid large meals that spike cholecystokinin release

For NAFLD/Hepatomegaly

  • Weight reduction (even 5-10% body weight loss reduces liver fat significantly)
  • Low-fat diet, regular aerobic exercise
  • Avoid alcohol completely
  • Treat any underlying diabetes/dyslipidemia aggressively

Summary

Menaka's pain pattern is classic symptomatic cholelithiasis (biliary colic). The gallstones found incidentally on ultrasound are now clearly causing her symptoms. Combined with hepatomegaly from Grade II NAFLD, she has two pain generators in the RUQ. The spasmodic RLQ and periumbilical pain are visceral referral patterns from the same source. Laparoscopic cholecystectomy is now indicated and should be scheduled electively after pre-operative workup.

Create a pre-operative checklist PDF for symptomatic cholelithiasis surgery

Reading File
Finding Sources
Finding Sources
Running Command

ls -la /home/daytona/workspace/ 2>/dev/null | head -20

Running Command

mkdir -p /home/daytona/workspace/cholecystectomy-preop

Writing File

~/cholecystectomy-preop/generate_checklist.py

from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import mm, cm
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.platypus import (
    SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
    HRFlowable, KeepTogether
)
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_RIGHT
from reportlab.pdfgen import canvas
from reportlab.platypus import BaseDocTemplate, Frame, PageTemplate
import datetime

OUTPUT = "/home/daytona/workspace/cholecystectomy-preop/PreOp_Checklist_Cholecystectomy.pdf"

# ── Colours ──────────────────────────────────────────────────────────────────
TEAL        = colors.HexColor("#1A6B6B")
TEAL_LIGHT  = colors.HexColor("#E6F4F4")
TEAL_MID    = colors.HexColor("#2E9E9E")
ORANGE      = colors.HexColor("#D6650A")
GREY_BG     = colors.HexColor("#F5F5F5")
GREY_LINE   = colors.HexColor("#CCCCCC")
WHITE       = colors.white
BLACK       = colors.black

W, H = A4

# ── Doc ───────────────────────────────────────────────────────────────────────
def header_footer(c, doc):
    c.saveState()
    # Top bar
    c.setFillColor(TEAL)
    c.rect(0, H - 22*mm, W, 22*mm, fill=1, stroke=0)
    c.setFillColor(WHITE)
    c.setFont("Helvetica-Bold", 13)
    c.drawString(15*mm, H - 13*mm, "PRE-OPERATIVE CHECKLIST")
    c.setFont("Helvetica", 10)
    c.drawRightString(W - 15*mm, H - 10*mm, "Laparoscopic Cholecystectomy")
    c.drawRightString(W - 15*mm, H - 16*mm, "Symptomatic Cholelithiasis")
    # Bottom bar
    c.setFillColor(TEAL)
    c.rect(0, 0, W, 10*mm, fill=1, stroke=0)
    c.setFillColor(WHITE)
    c.setFont("Helvetica", 7.5)
    c.drawString(15*mm, 3.5*mm, "Gastroenterology / General Surgery Department")
    c.drawRightString(W - 15*mm, 3.5*mm,
                      f"Generated: {datetime.date.today().strftime('%d %b %Y')}  |  Page {doc.page}")
    c.restoreState()

doc = SimpleDocTemplate(
    OUTPUT, pagesize=A4,
    topMargin=28*mm, bottomMargin=16*mm,
    leftMargin=14*mm, rightMargin=14*mm
)

styles = getSampleStyleSheet()

def S(name, **kw):
    return ParagraphStyle(name, **kw)

st_section = S("section",
    fontSize=10, fontName="Helvetica-Bold",
    textColor=WHITE, leading=14, spaceAfter=0, spaceBefore=0)

st_body = S("body",
    fontSize=8.5, fontName="Helvetica",
    textColor=BLACK, leading=12, spaceAfter=1)

st_bold = S("bold",
    fontSize=8.5, fontName="Helvetica-Bold",
    textColor=BLACK, leading=12)

st_note = S("note",
    fontSize=7.5, fontName="Helvetica-Oblique",
    textColor=colors.HexColor("#555555"), leading=11)

st_patient = S("patient",
    fontSize=8.5, fontName="Helvetica",
    textColor=BLACK, leading=13)

st_orange = S("orange",
    fontSize=8, fontName="Helvetica-Bold",
    textColor=ORANGE, leading=11)

# ── Helper: section header row ────────────────────────────────────────────────
def section_header(title, icon=""):
    cell = Paragraph(f"{icon}  {title}" if icon else title, st_section)
    t = Table([[cell]], colWidths=[W - 28*mm])
    t.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), TEAL),
        ("TOPPADDING",   (0,0), (-1,-1), 4),
        ("BOTTOMPADDING",(0,0), (-1,-1), 4),
        ("LEFTPADDING",  (0,0), (-1,-1), 8),
        ("RIGHTPADDING", (0,0), (-1,-1), 8),
        ("ROUNDEDCORNERS", [3]),
    ]))
    return t

# ── Helper: checkbox row ───────────────────────────────────────────────────────
BOX = "☐"   # unicode checkbox

def chk(label, note=None, indent=0):
    pad = "\u00a0" * (indent * 4)
    main = Paragraph(f"{pad}{BOX}  {label}", st_body)
    if note:
        n = Paragraph(f"{pad}\u00a0\u00a0\u00a0\u00a0\u00a0{note}", st_note)
        return [main, n]
    return [main]

def chk_rows(items):
    """items = list of (label, note_or_None, indent)"""
    rows = []
    for label, note, indent in items:
        for p in chk(label, note, indent):
            rows.append([p])
    return rows

def checktable(items, bg=WHITE):
    rows = chk_rows(items)
    t = Table(rows, colWidths=[W - 28*mm])
    style = [
        ("BACKGROUND", (0,0), (-1,-1), bg),
        ("TOPPADDING",   (0,0), (-1,-1), 2),
        ("BOTTOMPADDING",(0,0), (-1,-1), 2),
        ("LEFTPADDING",  (0,0), (-1,-1), 6),
        ("RIGHTPADDING", (0,0), (-1,-1), 6),
        ("LINEBELOW", (0,0), (-1,-2), 0.3, GREY_LINE),
    ]
    # Alternate zebra
    for i in range(0, len(rows), 2):
        style.append(("BACKGROUND", (0,i), (-1,i), GREY_BG))
    t.setStyle(TableStyle(style))
    return t

# ── Patient info box ──────────────────────────────────────────────────────────
def patient_box():
    fields = [
        ["Patient Name:", "_"*38, "MRD / UHID:", "_"*20],
        ["Age / Sex:", "_"*38, "Date of Surgery:", "_"*20],
        ["Surgeon:", "_"*38, "Anaesthetist:", "_"*20],
        ["Ward / Bed:", "_"*38, "Planned Procedure:", "Laparoscopic Cholecystectomy"],
    ]
    col_w = [(W-28*mm)*f for f in [0.18, 0.32, 0.18, 0.32]]
    rows = []
    for r in fields:
        rows.append([Paragraph(r[i], st_bold if i % 2 == 0 else st_patient)
                     for i in range(4)])
    t = Table(rows, colWidths=col_w)
    t.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), TEAL_LIGHT),
        ("TOPPADDING",   (0,0), (-1,-1), 4),
        ("BOTTOMPADDING",(0,0), (-1,-1), 4),
        ("LEFTPADDING",  (0,0), (-1,-1), 5),
        ("RIGHTPADDING", (0,0), (-1,-1), 5),
        ("BOX",  (0,0), (-1,-1), 0.8, TEAL),
        ("LINEAFTER", (1,0), (1,-1), 0.5, TEAL_MID),
        ("LINEAFTER", (3,0), (3,-1), 0.5, TEAL_MID),
        ("LINEBELOW", (0,0), (-1,-2), 0.4, TEAL_MID),
    ]))
    return t

# ── Two-column checktable ─────────────────────────────────────────────────────
def two_col_checks(left_items, right_items, title_l="", title_r=""):
    cw = (W - 28*mm) / 2 - 2*mm

    def make_col(items, title):
        elems = []
        if title:
            elems.append(Paragraph(title, S("ct", fontSize=8, fontName="Helvetica-Bold",
                                             textColor=TEAL, leading=11)))
        for label, note, indent in items:
            pad = "\u00a0" * (indent * 4)
            elems.append(Paragraph(f"{pad}{BOX}  {label}", st_body))
            if note:
                elems.append(Paragraph(f"   {note}", st_note))
        return elems

    left  = make_col(left_items,  title_l)
    right = make_col(right_items, title_r)
    max_rows = max(len(left), len(right))
    # pad shorter
    while len(left)  < max_rows: left.append(Paragraph("", st_body))
    while len(right) < max_rows: right.append(Paragraph("", st_body))

    rows = [[l, r] for l, r in zip(left, right)]
    t = Table(rows, colWidths=[cw, cw], hAlign="LEFT")
    t.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), GREY_BG),
        ("TOPPADDING",   (0,0), (-1,-1), 2),
        ("BOTTOMPADDING",(0,0), (-1,-1), 2),
        ("LEFTPADDING",  (0,0), (-1,-1), 6),
        ("RIGHTPADDING", (0,0), (-1,-1), 6),
        ("LINEAFTER",  (0,0), (0,-1), 0.5, GREY_LINE),
        ("LINEBELOW",  (0,0), (-1,-2), 0.3, GREY_LINE),
    ]))
    return t

# ── Build story ───────────────────────────────────────────────────────────────
story = []
sp = lambda n=4: Spacer(1, n*mm)

# Patient info
story.append(sp(1))
story.append(patient_box())
story.append(sp(3))

# ─── 1. CLINICAL HISTORY & INDICATIONS ───────────────────────────────────────
story.append(KeepTogether([
    section_header("1.  CLINICAL HISTORY & INDICATIONS"),
    sp(1),
    checktable([
        ("Confirmed symptomatic cholelithiasis (biliary colic, RUQ pain)", None, 0),
        ("Ultrasound abdomen documented gallstones", "Largest stone size noted: _______ mm", 0),
        ("Duration and frequency of symptoms recorded", None, 0),
        ("Exclude acute cholecystitis (no fever, no Murphy's sign, no leukocytosis)", None, 0),
        ("Exclude choledocholithiasis (normal CBD on USG / LFTs normal)", None, 0),
        ("Exclude gallstone pancreatitis (normal serum amylase / lipase)", None, 0),
        ("Co-morbidities documented (NAFLD, DM, HTN, CAD, respiratory disease)", None, 0),
        ("Current medications listed (anticoagulants, antiplatelets, antidiabetics)", None, 0),
        ("Allergies documented (latex, iodine, drugs)", None, 0),
        ("Previous abdominal surgeries noted (risk of adhesions)", None, 0),
    ]),
    sp(1),
]))

# ─── 2. LABORATORY INVESTIGATIONS ────────────────────────────────────────────
story.append(KeepTogether([
    section_header("2.  LABORATORY INVESTIGATIONS"),
    sp(1),
    two_col_checks(
        left_items=[
            ("Complete Blood Count (CBC)", None, 0),
            ("Serum Electrolytes (Na, K, Cl, HCO3)", None, 0),
            ("Blood Urea Nitrogen (BUN) / Creatinine", None, 0),
            ("Fasting Blood Sugar / HbA1c", "Relevant given NAFLD/metabolic risk", 0),
            ("Lipid Profile", None, 0),
            ("Liver Function Tests (AST, ALT, ALP, GGT, Bilirubin)", "Rule out choledocholithiasis", 0),
            ("Serum Amylase / Lipase", "Rule out concurrent pancreatitis", 0),
            ("Coagulation Profile (PT, APTT, INR)", None, 0),
        ],
        right_items=[
            ("Blood Group & Type-and-Screen / Cross-match", None, 0),
            ("HIV, HBsAg, HCV (serology)", None, 0),
            ("Urine Routine & Microscopy", None, 0),
            ("Urine Pregnancy Test (if pre-menopausal)", None, 0),
            ("Thyroid Function Tests (if clinically indicated)", None, 0),
            ("Serum Calcium (if hypercalcemia suspected)", None, 0),
            ("Tumour Marker CA 19-9 (if suspicious of GB malignancy)", None, 0),
            ("Sickle cell screen (if ethnically indicated)", None, 0),
        ],
        title_l="Biochemistry & Haematology",
        title_r="Additional Tests",
    ),
    sp(1),
]))

# ─── 3. IMAGING & SPECIAL INVESTIGATIONS ─────────────────────────────────────
story.append(KeepTogether([
    section_header("3.  IMAGING & SPECIAL INVESTIGATIONS"),
    sp(1),
    checktable([
        ("Ultrasound abdomen & pelvis reviewed (stones, GB wall, CBD, liver)", None, 0),
        ("Gallbladder wall thickness assessed (normal < 3 mm)", None, 0),
        ("Common bile duct diameter assessed (normal < 6 mm)", None, 0),
        ("Hepatomegaly / fatty liver changes noted for anaesthetic planning", "This patient: Grade II NAFLD confirmed", 0),
        ("Chest X-ray (PA view) - cardiac silhouette, lung fields, diaphragm", None, 0),
        ("ECG (12-lead) - baseline cardiac assessment", None, 0),
        ("MRCP if CBD stones suspected or LFTs abnormal", None, 0),
        ("CT abdomen (only if GB malignancy, porcelain GB, or complex anatomy suspected)", None, 0),
        ("HIDA scan if acalculous cholecystitis or biliary dyskinesia suspected", None, 0),
        ("Echocardiography if significant cardiac history / poor functional capacity", None, 0),
        ("Pulmonary function tests if significant respiratory disease", None, 0),
    ]),
    sp(1),
]))

# ─── 4. ANAESTHETIC ASSESSMENT ────────────────────────────────────────────────
story.append(KeepTogether([
    section_header("4.  ANAESTHETIC ASSESSMENT"),
    sp(1),
    two_col_checks(
        left_items=[
            ("ASA Physical Status Classification assigned", "ASA I-II: routine; ASA III+: senior anaesthetist", 0),
            ("Airway assessment (Mallampati score, neck mobility)", None, 0),
            ("Dentition checked (loose teeth, dental prosthetics)", None, 0),
            ("BMI recorded (obesity = higher pneumoperitoneum risk)", None, 0),
            ("NPO status confirmed: solids 6h, clear liquids 2h before surgery", None, 0),
            ("Antibiotic prophylaxis planned (Cefazolin 1-2 g IV at induction)", None, 0),
            ("DVT prophylaxis planned (LMWH, TED stockings)", None, 0),
        ],
        right_items=[
            ("Antidiabetic medications managed (hold metformin, adjust insulin)", None, 0),
            ("Anticoagulants bridged / held as per protocol", None, 0),
            ("Antiplatelets (aspirin / clopidogrel) held if indicated", None, 0),
            ("Antihypertensives continued (except ACE-I/ARB on day of surgery)", None, 0),
            ("GERD / esophagitis management reviewed (PPI continued)", "This patient: LA Grade B esophagitis - continue PPI", 0),
            ("Anaesthetic risk discussed with patient; consent obtained", None, 0),
            ("High-risk anaesthetic plan documented if applicable", None, 0),
        ],
        title_l="Assessment",
        title_r="Medication Management",
    ),
    sp(1),
]))

# ─── 5. SURGICAL CONSENT & COUNSELLING ────────────────────────────────────────
story.append(KeepTogether([
    section_header("5.  SURGICAL CONSENT & PATIENT COUNSELLING"),
    sp(1),
    checktable([
        ("Informed consent obtained for laparoscopic cholecystectomy", None, 0),
        ("Consent for conversion to open cholecystectomy if required", "Conversion rate ~3-5% in elective cases", 0),
        ("Risks explained: bleeding, infection, bile duct injury, bile leak, hernia, port-site complications", None, 0),
        ("Possibility of choledocholithiasis and need for ERCP / IOC explained", None, 0),
        ("Patient educated about NPO instructions, bowel prep (if applicable)", None, 0),
        ("Post-operative expectations explained (pain, diet, return to activity)", None, 0),
        ("Consent for intra-operative cholangiogram (IOC) if planned", None, 0),
        ("Next-of-kin / guardian informed (if patient requests)", None, 0),
    ]),
    sp(1),
]))

# ─── 6. DAY-OF-SURGERY CHECKLIST ──────────────────────────────────────────────
story.append(KeepTogether([
    section_header("6.  DAY OF SURGERY CHECKLIST"),
    sp(1),
    two_col_checks(
        left_items=[
            ("Patient identity confirmed (wristband, verbal check)", None, 0),
            ("Surgical site marked (if applicable)", None, 0),
            ("NPO compliance confirmed", None, 0),
            ("IV access established (at least 18G cannula)", None, 0),
            ("IV fluids commenced as per protocol", None, 0),
            ("Pre-operative antibiotic given within 60 min of incision", None, 0),
            ("DVT prophylaxis applied (stockings / LMWH given)", None, 0),
            ("Urinary catheter inserted (if procedure > 2 hrs or surgeon preference)", None, 0),
        ],
        right_items=[
            ("Consent form in notes, signed and witnessed", None, 0),
            ("Blood results reviewed and actioned", None, 0),
            ("Imaging reviewed by operating surgeon", None, 0),
            ("WHO Surgical Safety Checklist completed (Sign-In)", None, 0),
            ("Patient jewellery / nail polish / prosthetics removed", None, 0),
            ("Allergies re-confirmed and allergy band applied", None, 0),
            ("Patient weight documented (for drug dosing)", None, 0),
            ("Anaesthetic machine and equipment checked by anaesthetist", None, 0),
        ],
        title_l="Preparation",
        title_r="Documentation & Safety",
    ),
    sp(1),
]))

# ─── 7. SPECIAL CONSIDERATIONS FOR THIS PATIENT ───────────────────────────────
story.append(KeepTogether([
    section_header("7.  SPECIAL CONSIDERATIONS  —  MENAKA MANAVALAN (53F)"),
    sp(1),
    checktable([
        ("NAFLD Grade II / Hepatomegaly: anaesthetist aware; hepatotoxic agents avoided", "Enlarged liver may obstruct laparoscopic view - experienced surgeon preferred", 0),
        ("LA Grade B Esophagitis / GERD: rapid sequence induction considered; continue PPI perioperatively", None, 0),
        ("Metabolic workup complete: HbA1c, fasting glucose, lipid profile done", None, 0),
        ("Gallstones: multiple, largest 7 mm - low risk of CBD stone; LFTs normal confirmed", None, 0),
        ("Age 53, post-menopausal considerations: DVT risk higher - LMWH + TED stockings mandatory", None, 0),
        ("Cholelithiasis symptom burden documented (frequency of attacks, severity of pain, analgesic use)", None, 0),
        ("Surgeon briefed on concurrent endoscopy findings (no gastric/duodenal pathology)", None, 0),
    ]),
    sp(1),
]))

# ─── 8. POST-OPERATIVE PLAN ────────────────────────────────────────────────────
story.append(KeepTogether([
    section_header("8.  POST-OPERATIVE PLAN (Pre-document Before Surgery)"),
    sp(1),
    two_col_checks(
        left_items=[
            ("Analgesia plan: paracetamol + NSAIDs + PRN opioid", None, 0),
            ("Anti-emetics prescribed (ondansetron / metoclopramide)", None, 0),
            ("Resume PPI post-operatively (for esophagitis)", None, 0),
            ("Diet: clear fluids day 0, soft diet day 1, normal by discharge", None, 0),
            ("Mobilisation: encouraged within 4-6 hours post-op", None, 0),
            ("Wound care instructions documented", None, 0),
        ],
        right_items=[
            ("Discharge criteria defined (pain controlled, tolerating diet, afebrile)", None, 0),
            ("Follow-up appointment booked: 1-2 weeks post-op", None, 0),
            ("Histopathology of GB specimen: to be sent routinely", None, 0),
            ("NAFLD follow-up: hepatology referral organised", None, 0),
            ("GP / referring doctor discharge summary to be completed", None, 0),
            ("Patient education leaflet given (diet, activity, red flags)", None, 0),
        ],
        title_l="Immediate Post-Op",
        title_r="Discharge & Follow-Up",
    ),
    sp(1),
]))

# ─── Signatures ───────────────────────────────────────────────────────────────
story.append(KeepTogether([
    section_header("9.  SIGN-OFF"),
    sp(2),
]))

sig_data = [
    [Paragraph("Surgeon", st_bold),
     Paragraph("Anaesthetist", st_bold),
     Paragraph("Nursing / Coordinator", st_bold)],
    [Paragraph("Name: ___________________", st_patient),
     Paragraph("Name: ___________________", st_patient),
     Paragraph("Name: ___________________", st_patient)],
    [Paragraph("Signature: ______________", st_patient),
     Paragraph("Signature: ______________", st_patient),
     Paragraph("Signature: ______________", st_patient)],
    [Paragraph("Date/Time: ______________", st_patient),
     Paragraph("Date/Time: ______________", st_patient),
     Paragraph("Date/Time: ______________", st_patient)],
]
sig_t = Table(sig_data, colWidths=[(W-28*mm)/3]*3)
sig_t.setStyle(TableStyle([
    ("BACKGROUND", (0,0), (-1,0), TEAL_LIGHT),
    ("TOPPADDING",   (0,0), (-1,-1), 5),
    ("BOTTOMPADDING",(0,0), (-1,-1), 5),
    ("LEFTPADDING",  (0,0), (-1,-1), 8),
    ("BOX",   (0,0), (-1,-1), 0.8, TEAL),
    ("LINEBEFORE", (1,0), (2,-1), 0.5, TEAL_MID),
    ("LINEBELOW",  (0,0), (-1,-2), 0.4, GREY_LINE),
]))
story.append(sig_t)
story.append(sp(2))

# Disclaimer note
story.append(Paragraph(
    "Note: This checklist is a clinical aide-memoire and should be used alongside current institutional protocols, "
    "NICE/WHO surgical safety guidelines, and the clinical judgment of the responsible surgical team. "
    "It is not a substitute for full clinical assessment.",
    st_note
))

# ── Build ──────────────────────────────────────────────────────────────────────
doc.build(story, onFirstPage=header_footer, onLaterPages=header_footer)
print(f"PDF created: {OUTPUT}")
Running Command

cd /home/daytona/workspace/cholecystectomy-preop && python generate_checklist.py 2>&1

Running Command

ls -lh /home/daytona/workspace/cholecystectomy-preop/PreOp_Checklist_Cholecystectomy.pdf

Your pre-operative checklist PDF is ready:

PreOp Checklist Cholecystectomy

PDF Document · PDF


Here's what the checklist covers across 9 structured sections:
#SectionKey Contents
1Clinical History & IndicationsSymptom confirmation, excluding cholecystitis / choledocholithiasis / pancreatitis, co-morbidities, medications, allergies
2Laboratory InvestigationsCBC, LFTs, coagulation, BUG/creatinine, HbA1c, lipids, serology, pregnancy test, CA 19-9
3Imaging & Special InvestigationsUSG review (GB wall, CBD size), CXR, ECG, MRCP if CBD stones suspected, HIDA if dyskinesia
4Anaesthetic AssessmentASA status, airway, BMI, NPO status, antibiotic prophylaxis, DVT prophylaxis, medication management
5Surgical Consent & CounsellingInformed consent, conversion-to-open consent, risks, patient education
6Day-of-Surgery ChecklistPatient ID, IV access, antibiotics within 60 min, WHO Safety Checklist sign-in
7Special Considerations (Menaka)NAFLD-specific hepatic precautions, GERD/esophagitis RSI note, metabolic workup, post-menopausal DVT risk
8Post-Operative PlanAnalgesia, diet progression, mobilisation, NAFLD follow-up, histopathology of GB specimen
9Sign-OffSurgeon, anaesthetist, and nursing sign-off with date/time fields
The checklist includes checkboxes throughout and a patient details header at the top for completing at the bedside. Section 7 is specifically tailored to this patient's findings.
This is a shared conversation. Sign in to Orris to start your own chat.