Give information about all the topics in short releted to surgery subject
| Topic | Key Points |
|---|---|
| Hepatomegaly | Enlargement of liver; causes: infection, malignancy, heart failure, fatty liver |
| Amoebic Liver Abscess | Due to Entamoeba histolytica; "anchovy sauce" pus; Rx: metronidazole ± aspiration |
| Hydatid Cyst | Due to Echinococcus granulosus; "daughter cysts"; Rx: PAIR or surgery |
| Actinomycosis | Rare fungal-like infection; sulfur granules; Rx: long-course penicillin |
| Pyogenic Liver Abscess | Bacterial (E. coli, Klebsiella); treated with drainage + antibiotics |
| Gallstones | Cholesterol or pigment stones; risk factors: fat, fertile, forty, female |
| Cholecystitis | Acute: RUQ pain + Murphy's sign; Rx: laparoscopic cholecystectomy |
| Ca. Gallbladder | Associated with gallstones; poor prognosis; Courvoisier's law |
| Jaundice (Surgical) | Obstructive jaundice: pale stools, dark urine; causes: stones, Ca. head of pancreas |
| Splenomegaly | Causes: malaria, portal hypertension, hematological diseases |
| Splenic Artery Aneurysm | Can cause infarct or rupture; emergency if ruptured |
| Cyst of Spleen | Primary (true cyst) or secondary (post-traumatic/hydatid) |
| TB / Abscess / Neoplasm (Spleen) | Splenic TB, splenic abscess, lymphoma are the main neoplastic causes |
| Topic | Key Points |
|---|---|
| Pancreatitis | Acute: epigastric pain radiating to back; Ranson's criteria for severity; Rx: conservative |
| Ca. Pancreas | Head: obstructive jaundice + Courvoisier's; Whipple's procedure |
| Pancreatic Abscess / Fistula / Cyst / Trauma / Anomalies | Pseudocyst commonest complication of pancreatitis; fistula can cause pleural effusion |
| Topic | Key Points |
|---|---|
| Pneumothorax | Air in pleural space; spontaneous (tall young males) or traumatic; Rx: ICD |
| Pleural Effusion + Tapping | Fluid in pleura; diagnosed by CXR/USG; drained by thoracocentesis |
| Hemothorax | Blood in pleural cavity; post-trauma; Rx: ICD, surgery if massive |
| Bronchoscopy | Diagnostic and therapeutic; for foreign bodies, endobronchial lesions |
| Emphysema | Destruction of alveolar walls; barrel chest; obstructive pattern on PFT |
| Flail Chest / Stove-in Chest | Multiple rib fractures; paradoxical movement; Rx: IPPV |
| Lung Abscess | Cavity with fluid level on CXR; due to aspiration; Rx: antibiotics ± drainage |
| ARDS | Acute Respiratory Distress Syndrome; diffuse alveolar damage; Rx: protective ventilation |
| Intercostal Tube Drainage (ICD) | Inserted in 5th ICS, midaxillary line for pneumo/hemothorax |
| Stiff Lung | Reduced compliance; seen in ARDS, pulmonary fibrosis |
| Pulmonary Embolism | DVT clot to lungs; sudden dyspnea, hypoxia; Rx: anticoagulation, thrombolysis |
| Lung Cyst | Congenital or acquired; can become infected or rupture |
| Tumors (Mediastinal, Chest Wall, Pancoast) | Pancoast tumor: apex lung cancer causing Horner's syndrome + brachial plexopathy |
| Diaphragmatic Hernia | Bochdalek (posterior, congenital) or Morgagni (anterior); Rx: surgical repair |
| Valvular Heart Disease (related) | Rheumatic fever origin; mitral > aortic; managed medically or by valve repair/replacement |
| Pericarditis | Inflammation of pericardium; friction rub; Rx: NSAIDs; if tamponade - pericardiocentesis |
| Cardiac Tamponade | Beck's triad: hypotension + raised JVP + muffled heart sounds; Rx: emergency pericardiocentesis |
| Topic | Key Points |
|---|---|
| Haematuria | Blood in urine; causes: stone, tumor, infection, TB; investigate with cystoscopy + CT |
| Horseshoe Kidney | Fusion of lower poles; associated with PUJ obstruction and Wilms tumor |
| PCKD | Autosomal dominant; bilateral large kidneys; renal failure in adulthood |
| Renal Carbuncle | Intrarenal abscess; Staphylococcal; Rx: antibiotics ± drainage |
| Renal TB | "Putty kidney" on X-ray; sterile pyuria; Rx: anti-TB drugs |
| Wilms Tumor (Nephroblastoma) | Most common renal tumor in children; Rx: nephrectomy + chemo + radiotherapy |
| Hydronephrosis | Dilatation of renal pelvis due to obstruction; causes: PUJ obstruction, stone, stricture |
| Grawitz's Tumor (RCC) | Renal Cell Carcinoma; classic triad: hematuria + flank pain + mass; Rx: radical nephrectomy |
| Pyonephrosis | Pus in obstructed kidney; Rx: emergency nephrostomy + antibiotics |
| Renal Cell Carcinoma | Most common renal malignancy in adults; paraneoplastic features; Rx: surgery ± immunotherapy |
| Perinephric Abscess | Pus outside renal capsule; Rx: percutaneous drainage + antibiotics |
| Renal Calculus | Calcium oxalate commonest; presents with ureteric colic; Rx: ESWL, URS, PCNL |
Create a study guide PDF covering all these surgery topics
ls /home/daytona/workspace/ 2>/dev/null || echo "workspace empty or not found"
~/surgery-guide/create_pdf.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
HRFlowable, PageBreak, KeepTogether
)
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus import BaseDocTemplate, Frame, PageTemplate
# āā Color palette āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
DARK_BLUE = colors.HexColor("#1a3c5e")
MID_BLUE = colors.HexColor("#2166ac")
LIGHT_BLUE = colors.HexColor("#d6e4f0")
ACCENT_TEAL = colors.HexColor("#1abc9c")
ACCENT_RED = colors.HexColor("#c0392b")
ACCENT_GOLD = colors.HexColor("#f39c12")
LIGHT_GREY = colors.HexColor("#f4f6f9")
MID_GREY = colors.HexColor("#7f8c8d")
WHITE = colors.white
BLACK = colors.black
# āā Document āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
OUTPUT = "/home/daytona/workspace/surgery-guide/Surgery_Study_Guide.pdf"
doc = SimpleDocTemplate(
OUTPUT,
pagesize=A4,
leftMargin=2*cm, rightMargin=2*cm,
topMargin=2.5*cm, bottomMargin=2.5*cm,
title="Surgery Study Guide",
author="Orris Medical"
)
W, H = A4
styles = getSampleStyleSheet()
# āā Custom styles āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
def S(name, **kw):
return ParagraphStyle(name, **kw)
cover_title = S("CoverTitle",
fontName="Helvetica-Bold", fontSize=32, textColor=WHITE,
alignment=TA_CENTER, leading=40, spaceAfter=10)
cover_sub = S("CoverSub",
fontName="Helvetica", fontSize=16, textColor=LIGHT_BLUE,
alignment=TA_CENTER, leading=22)
cover_note = S("CoverNote",
fontName="Helvetica-Oblique", fontSize=11, textColor=WHITE,
alignment=TA_CENTER, leading=16)
section_header = S("SectionHeader",
fontName="Helvetica-Bold", fontSize=17, textColor=WHITE,
alignment=TA_LEFT, leading=22, leftIndent=8, rightIndent=8,
spaceBefore=14, spaceAfter=6)
topic_title = S("TopicTitle",
fontName="Helvetica-Bold", fontSize=13, textColor=DARK_BLUE,
spaceBefore=10, spaceAfter=4, leading=17)
body = S("Body",
fontName="Helvetica", fontSize=10, textColor=BLACK,
leading=15, spaceAfter=3, alignment=TA_JUSTIFY)
bullet_style = S("Bullet",
fontName="Helvetica", fontSize=10, textColor=BLACK,
leading=14, leftIndent=14, spaceAfter=2,
bulletIndent=6, bulletFontName="Helvetica", bulletFontSize=10)
key_box_style = S("KeyBox",
fontName="Helvetica-Bold", fontSize=9.5, textColor=DARK_BLUE,
leading=14, leftIndent=6, spaceAfter=2)
toc_style = S("TOC",
fontName="Helvetica", fontSize=11, textColor=DARK_BLUE,
leading=18, leftIndent=20)
toc_cat = S("TOCCat",
fontName="Helvetica-Bold", fontSize=12, textColor=MID_BLUE,
leading=20, spaceBefore=6)
page_num_style = S("PageNum",
fontName="Helvetica", fontSize=9, textColor=MID_GREY,
alignment=TA_CENTER)
# āā Helpers āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
def section_banner(text, color=MID_BLUE):
"""Full-width colored banner for section headers."""
data = [[Paragraph(text, section_header)]]
t = Table(data, colWidths=[W - 4*cm])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), color),
("ROWBACKGROUNDS", (0,0), (-1,-1), [color]),
("TOPPADDING", (0,0), (-1,-1), 8),
("BOTTOMPADDING", (0,0), (-1,-1), 8),
("LEFTPADDING", (0,0), (-1,-1), 12),
("RIGHTPADDING", (0,0), (-1,-1), 12),
("ROUNDEDCORNERS", [5, 5, 5, 5]),
]))
return t
def key_points_table(items, title="Key Points"):
"""Two-column key-value table."""
rows = []
for k, v in items:
rows.append([
Paragraph(f"<b>{k}</b>", key_box_style),
Paragraph(v, body)
])
t = Table(rows, colWidths=[4.5*cm, W - 4*cm - 4.5*cm])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (0,-1), LIGHT_BLUE),
("BACKGROUND", (1,0), (1,-1), LIGHT_GREY),
("ROWBACKGROUNDS",(0,0), (-1,-1), [LIGHT_BLUE, WHITE, LIGHT_BLUE, WHITE,
LIGHT_BLUE, WHITE, LIGHT_BLUE, WHITE]),
("GRID", (0,0), (-1,-1), 0.3, colors.HexColor("#b0c4d8")),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 7),
("RIGHTPADDING", (0,0), (-1,-1), 7),
("VALIGN", (0,0), (-1,-1), "TOP"),
]))
return t
def topic_block(title, content_rows, extra_note=None, banner_color=MID_BLUE):
"""A complete topic block: title + key table + optional note."""
elems = []
elems.append(Paragraph(f"āø {title}", topic_title))
elems.append(key_points_table(content_rows))
if extra_note:
note_p = Paragraph(f"<i>ā” {extra_note}</i>", S("Note",
fontName="Helvetica-Oblique", fontSize=9.5,
textColor=colors.HexColor("#555555"), leading=13,
leftIndent=10, spaceBefore=3, spaceAfter=6))
elems.append(note_p)
else:
elems.append(Spacer(1, 6))
return KeepTogether(elems)
def divider(color=ACCENT_TEAL):
return HRFlowable(width="100%", thickness=1.2, color=color, spaceAfter=4, spaceBefore=4)
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
# CONTENT
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
story = []
# āā COVER PAGE āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
cover_bg = Table(
[[Paragraph("SURGERY", cover_title),
Paragraph("STUDY GUIDE", cover_title)]],
colWidths=[W - 4*cm]
)
# Use a plain colored rectangle via Table trick
cover_data = [
[Paragraph("", body)],
[Paragraph("SURGERY", cover_title)],
[Paragraph("STUDY GUIDE", cover_title)],
[Spacer(1, 0.3*cm)],
[Paragraph("Complete Notes for All Systems", cover_sub)],
[Spacer(1, 0.5*cm)],
[Paragraph("Hepatobiliary ⢠Pancreas ⢠Thoracic ⢠Urology", cover_sub)],
[Spacer(1, 1.5*cm)],
[Paragraph("Covers 35+ high-yield surgical topics", cover_note)],
[Paragraph("MBBS / MS Surgery Exam Ready", cover_note)],
[Spacer(1, 3*cm)],
[Paragraph("Prepared by Orris Medical AI | July 2026", S("CoverFooter",
fontName="Helvetica", fontSize=10, textColor=LIGHT_BLUE,
alignment=TA_CENTER))],
]
cover_table = Table(cover_data, colWidths=[W - 4*cm])
cover_table.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), DARK_BLUE),
("TOPPADDING", (0,0), (-1,-1), 10),
("BOTTOMPADDING", (0,0), (-1,-1), 10),
("LEFTPADDING", (0,0), (-1,-1), 20),
("RIGHTPADDING", (0,0), (-1,-1), 20),
("ALIGN", (0,0), (-1,-1), "CENTER"),
]))
story.append(cover_table)
story.append(PageBreak())
# āā TABLE OF CONTENTS āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
story.append(Paragraph("TABLE OF CONTENTS", S("TOCH",
fontName="Helvetica-Bold", fontSize=20, textColor=DARK_BLUE,
alignment=TA_CENTER, spaceAfter=6)))
story.append(divider(DARK_BLUE))
story.append(Spacer(1, 0.3*cm))
toc_data = [
("SECTION 1", "HEPATOBILIARY SYSTEM",
["Hepatomegaly", "Amoebic Liver Abscess", "Hydatid Cyst",
"Actinomycosis", "Pyogenic Liver Abscess", "Gallstones",
"Cholecystitis", "Ca. Gallbladder", "Obstructive Jaundice",
"Splenomegaly", "Splenic Artery Aneurysm", "Cyst of Spleen",
"Splenic TB / Abscess / Neoplasm"]),
("SECTION 2", "PANCREAS",
["Acute Pancreatitis", "Ca. Pancreas",
"Pancreatic Abscess / Fistula / Cyst / Trauma"]),
("SECTION 3", "THORACIC & RESPIRATORY",
["Pneumothorax", "Pleural Effusion", "Hemothorax",
"Emphysema", "Flail Chest / Stove-in Chest",
"Lung Abscess", "ARDS", "ICD", "Stiff Lung",
"Pulmonary Embolism", "Lung Cyst", "Chest Tumors",
"Diaphragmatic Hernia", "Valvular Heart Disease",
"Pericarditis", "Cardiac Tamponade"]),
("SECTION 4", "UROLOGY & KIDNEY",
["Haematuria", "Horseshoe Kidney", "PCKD",
"Renal Carbuncle", "Renal TB", "Wilms Tumor",
"Hydronephrosis", "Grawitz's Tumor (RCC)",
"Pyonephrosis", "Perinephric Abscess", "Renal Calculus"]),
]
colors_toc = [MID_BLUE, ACCENT_TEAL, ACCENT_RED, ACCENT_GOLD]
for i, (sec, title, topics) in enumerate(toc_data):
c = colors_toc[i]
story.append(Paragraph(f'<font color="#{c.hexval()[2:]}"><b>{sec}:</b></font> {title}', toc_cat))
for t in topics:
story.append(Paragraph(f" ⢠{t}", toc_style))
story.append(Spacer(1, 0.2*cm))
story.append(PageBreak())
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
# SECTION 1: HEPATOBILIARY
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
story.append(section_banner("SECTION 1 ā HEPATOBILIARY SYSTEM", DARK_BLUE))
story.append(Spacer(1, 0.3*cm))
story.append(topic_block("Hepatomegaly", [
("Definition", "Liver enlargement below the right costal margin; >12 cm span on percussion"),
("Causes", "Infections (amoeba, viral hepatitis), malignancy (hepatoma, mets), CCF, fatty liver, haematological (CML, lymphoma)"),
("Features", "Dull ache in RUQ; firm/hard/tender depending on cause; loss of dullness suggests gas over liver"),
("Investigations", "LFTs, USG abdomen, CT, liver biopsy, AFP (hepatoma)"),
("Treatment", "Treat underlying cause; surgical resection for isolated hepatic tumors"),
], "A hard, irregular liver = malignancy until proven otherwise."))
story.append(topic_block("Amoebic Liver Abscess", [
("Organism", "Entamoeba histolytica (protozoan)"),
("Path", "Portal spread from colonic ulcers ā right lobe (90%) > left lobe"),
("Features", "RUQ pain, swinging fever, tender hepatomegaly; 'anchovy sauce' pus (chocolate brown, odourless)"),
("Diagnosis", "USG (hypoechoic cavity), serology (ELISA ā high sensitivity), stool examination"),
("Treatment", "Metronidazole 800 mg TDS Ć 10 days; needle aspiration if large/no response; surgery rarely needed"),
], "Serology distinguishes from pyogenic abscess. Aspirate only if >10 cm or left lobe (risk of rupture)."))
story.append(topic_block("Hydatid Cyst", [
("Organism", "Echinococcus granulosus (tapeworm larva); cattle/sheep endemic areas"),
("Features", "Slow-growing cyst, usually right lobe; hydatid thrill; daughter cysts on USG"),
("Complications","Rupture (anaphylaxis), secondary infection, biliary communication (jaundice)"),
("Diagnosis", "USG (Gharbi classification), Casoni test (historical), CT, Echinococcal serology"),
("Treatment", "PAIR (Puncture-Aspiration-Injection-Reaspiration) with hypertonic saline; mebendazole/albendazole; surgery for complicated cysts"),
], "Never biopsy without protection ā anaphylaxis risk!"))
story.append(topic_block("Actinomycosis (Liver)", [
("Organism", "Actinomyces israelii (gram-positive, anaerobic, filamentous bacterium)"),
("Features", "Chronic suppurative granulomatous disease; sulfur granules in pus; sinus tracts"),
("Diagnosis", "Sulfur granules (yellow granules in pus), culture (difficult), histology"),
("Treatment", "Long-course IV penicillin G Ć 4ā6 weeks then oral amoxicillin Ć 6ā12 months"),
], "Sulfur granules = pathognomonic. Can mimic malignancy."))
story.append(topic_block("Pyogenic Liver Abscess", [
("Organisms", "E. coli, Klebsiella, Bacteroides, Streptococci"),
("Routes", "Portal (appendicitis, diverticulitis), biliary (cholangitis), haematogenous, direct trauma, cryptogenic"),
("Features", "Hectic fever + chills, RUQ pain, tender hepatomegaly; raised WBC + ALP"),
("Diagnosis", "USG / CT (hypodense lesion with rim enhancement), blood cultures"),
("Treatment", "IV antibiotics (cephalosporin + metronidazole) + percutaneous drainage; surgery if failed"),
], "Multiple small abscesses ā biliary source. Single large ā portal/cryptogenic."))
story.append(topic_block("Gallstones (Cholelithiasis)", [
("Types", "Cholesterol (80%, yellow-green), Pigment (black - haemolysis; brown - infection)"),
("Risk Factors","5 F's: Fat, Female, Fertile, Forty, Fair; also ileal disease, haemolysis, TPN"),
("Presentation","Biliary colic (RUQ pain 30ā60 min, radiates to right shoulder), nausea, fat intolerance"),
("Complications","Acute cholecystitis, empyema, Mirizzi syndrome, choledocholithiasis, cholangitis, pancreatitis, Ca. GB"),
("Diagnosis", "USG (gold standard): acoustic shadowing; plain X-ray only shows 10-15%"),
("Treatment", "Laparoscopic cholecystectomy (standard); ERCP + sphincterotomy for CBD stones"),
], "Charcot's triad = cholangitis: RUQ pain + fever/rigors + jaundice."))
story.append(topic_block("Cholecystitis", [
("Acute", "Cystic duct obstruction by stone ā bacterial superinfection; Murphy's sign positive (pain on inspiration during RUQ palpation)"),
("Chronic", "Repeated attacks; shrunken fibrotic GB; Rokitansky-Aschoff sinuses on histology"),
("Acalculous", "10% cases; ICU patients, burns, post-op; high mortality"),
("Diagnosis", "USG: thickened GB wall (>4mm), pericholecystic fluid, positive sonographic Murphy's"),
("Treatment", "NBM + IV fluids + antibiotics; laparoscopic cholecystectomy within 72 hrs or elective at 6 weeks"),
]))
story.append(topic_block("Carcinoma Gallbladder (Ca. GB)", [
("Epidemiology","Most common biliary malignancy; F:M = 4:1; strong association with gallstones"),
("Features", "RUQ pain, weight loss, jaundice (late), palpable GB mass"),
("Courvoisier's Law", "Palpable GB + jaundice = NOT due to stones ā likely Ca. head of pancreas or periampullary tumor"),
("Staging", "T1: mucosa; T2: perimuscular; T3: hepatic/adjacent; T4: portal vein/hepatic artery"),
("Treatment", "T1: simple cholecystectomy; T2+: extended cholecystectomy (liver segment 4b+5 + lymphadenectomy); poor prognosis overall"),
], "Often diagnosed incidentally post-cholecystectomy."))
story.append(topic_block("Obstructive (Surgical) Jaundice", [
("Features", "Yellow skin + sclera, pale stools, dark urine (bilirubin), pruritus, bradycardia"),
("Causes", "Intraluminal: stone; Mural: stricture, cholangiocarcinoma; Extramural: Ca. head pancreas, lymph nodes"),
("Investigations","LFTs (raised conjugated bilirubin, ALP, GGT), USG, MRCP, CT, ERCP"),
("Treatment", "Relieve obstruction: ERCP stenting for palliation; Whipple's for periampullary tumors; Bismuth hepaticojejunostomy for strictures"),
], "Pre-op biliary drainage: controversial; only if cholangitis or delayed surgery."))
story.append(topic_block("Splenomegaly", [
("Grading", "Mild (<5 cm below costal margin), Moderate (5-10 cm), Massive (>10 cm / crosses midline)"),
("Causes", "Infections: malaria, EBV, typhoid, kala-azar; Portal HTN; Haematological: lymphoma, CML, thalassaemia; Storage diseases"),
("Features", "Notch on medial border, moves with respiration, can't get above it, dull to percussion"),
("Hypersplenism","Splenomegaly + cytopenias (anaemia, thrombocytopenia, leukopenia)"),
("Treatment", "Treat underlying cause; splenectomy for hypersplenism, trauma, haematological indications"),
]))
story.append(topic_block("Splenic Artery Aneurysm", [
("Incidence", "Most common visceral artery aneurysm; women > men; often calcified on X-ray"),
("Risk Factors","Portal HTN, multiparity, atherosclerosis, medial fibrodysplasia"),
("Complications","Rupture (emergency), infarct, thrombosis"),
("Presentation","Often incidental; ruptured = sudden left-sided abdominal pain, haemodynamic instability"),
("Treatment", "Elective embolization or surgery if >2 cm, symptomatic, pregnant; emergency surgery if ruptured"),
]))
story.append(topic_block("Cyst of Spleen", [
("Types", "True (primary): epidermoid, dermoid, parasitic (hydatid); False (secondary): post-traumatic, inflammatory"),
("Features", "Left hypochondrial mass, usually asymptomatic unless large/infected"),
("Diagnosis", "USG/CT"),
("Treatment", "Observation if small; cyst excision / partial splenectomy if large; total splenectomy if complicated"),
]))
story.append(topic_block("Splenic TB / Abscess / Neoplasm", [
("Splenic TB", "Part of miliary TB; splenomegaly, fever, night sweats; Rx: anti-TB drugs"),
("Splenic Abscess","Rare; haematogenous seeding, sickle cell, trauma; fever + left-sided pain; Rx: percutaneous drainage or splenectomy"),
("Lymphoma", "Most common splenic neoplasm; Hodgkin's (Reed-Sternberg cells) and Non-Hodgkin's; staging splenectomy is historical"),
("Hamartoma", "Benign vascular lesion; incidental finding"),
]))
story.append(PageBreak())
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
# SECTION 2: PANCREAS
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
story.append(section_banner("SECTION 2 ā PANCREAS", colors.HexColor("#1a5276")))
story.append(Spacer(1, 0.3*cm))
story.append(topic_block("Acute Pancreatitis", [
("Causes", "Gallstones (40%), Alcohol (40%), ERCP, hyperlipidaemia, drugs, trauma, idiopathic"),
("Features", "Epigastric pain radiating to back, relieved by leaning forward; vomiting; tender epigastrium"),
("Signs", "Cullen's sign (periumbilical bruising), Grey-Turner's sign (flank bruising) = haemorrhagic pancreatitis"),
("Diagnosis", "Serum amylase/lipase (>3Ć normal); CT (Balthazar grading); USG (gallstones)"),
("Severity", "Ranson's criteria (>3 = severe); APACHE II; CRP >150 mg/L at 48 hrs"),
("Treatment", "Conservative: NBM, IV fluids, analgesia (pethidine); ERCP if gallstone pancreatitis + cholangitis; surgery for complications"),
("Complications","Pseudocyst (most common), abscess, necrosis, ARDS, renal failure, DIC"),
], "Serum lipase more specific than amylase. Both can be normal in chronic pancreatitis."))
story.append(topic_block("Carcinoma Pancreas", [
("Site", "Head (70%) > body > tail; adenocarcinoma (90%)"),
("Features", "Head: progressive painless obstructive jaundice + weight loss + Courvoisier's sign; Body/tail: pain (retroperitoneal invasion), late presentation"),
("Investigations","CT (double duct sign), MRCP, EUS, CA19-9 (marker, not diagnostic)"),
("Resectability","Only 15-20% resectable at presentation"),
("Treatment", "Resectable: Whipple's (pancreaticoduodenectomy); Palliative: biliary stenting, coeliac plexus block, gemcitabine"),
], "Double duct sign = dilated CBD + PD on MRCP/CT = periampullary/pancreatic head mass."))
story.append(topic_block("Pancreatic Abscess / Fistula / Cyst / Trauma / Anomalies", [
("Pseudocyst", "Fluid collection without epithelial lining; most common complication of pancreatitis; >6 weeks + >6 cm ā drain (endoscopic cystogastrostomy preferred)"),
("Abscess", "Pus in peripancreatic tissue; fever, sepsis; Rx: drainage + antibiotics"),
("Fistula", "Internal (pleural effusion, ascites) or external (post-op); Rx: octreotide, TPN, surgery"),
("Pancreatic Trauma","AAST grading; duct injury = key determinant; CT + MRCP; distal pancreatectomy for distal duct injury"),
("Pancreas Divisum","Most common congenital anomaly; failure of fusion of dorsal/ventral pancreatic ducts; can cause recurrent pancreatitis"),
("Annular Pancreas","Ring of pancreatic tissue surrounds duodenum; presents with duodenal obstruction; Rx: duodenojejunostomy"),
]))
story.append(PageBreak())
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
# SECTION 3: THORACIC & RESPIRATORY
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
story.append(section_banner("SECTION 3 ā THORACIC & RESPIRATORY", ACCENT_RED))
story.append(Spacer(1, 0.3*cm))
story.append(topic_block("Pneumothorax", [
("Types", "Spontaneous (primary: tall thin young male, secondary: COPD/asthma); Traumatic; Tension (emergency)"),
("Features", "Sudden dyspnea + pleuritic chest pain; reduced breath sounds; hyper-resonant percussion on affected side"),
("Tension PTX","Tracheal deviation AWAY from affected side; haemodynamic compromise; surgical emergency"),
("Diagnosis", "CXR (absent lung markings, white visceral pleural line); Do NOT wait for CXR in tension PTX"),
("Treatment", "Small (<15%): observation; Large: aspiration; ICD (2nd ICS MCL or 5th ICS MAL); Tension: immediate needle decompression (2nd ICS MCL) then ICD"),
], "Tension pneumothorax: needle first, CXR later. It's a clinical diagnosis."))
story.append(topic_block("Pleural Effusion + Tapping (Thoracocentesis)", [
("Types", "Transudate (Light's criteria: protein <3g/dL; LDH ratio <0.6): CCF, cirrhosis, nephrotic; Exudate: infection, malignancy, TB, PE"),
("Features", "Dull to percussion, reduced breath sounds, reduced VR/VF; trachea shifts away (large effusion)"),
("Diagnosis", "CXR (blunting of costophrenic angle >300 mL), USG, CT; pleural fluid analysis"),
("Treatment", "Treat cause; thoracocentesis for diagnosis/relief; ICD + pleurodesis for recurrent malignant effusion"),
], "Light's criteria: any ONE of three positive = exudate."))
story.append(topic_block("Hemothorax", [
("Definition", "Blood in pleural cavity (haematocrit of fluid >50% of blood haematocrit)"),
("Causes", "Trauma (most common), aortic aneurysm rupture, pulmonary AVM, tumors"),
("Features", "Dull to percussion, reduced breath sounds; hypotension if massive"),
("Treatment", "ICD (large-bore, 5th ICS MAL); massive hemothorax (>1500 mL): immediate surgery (VATS or open); blood for autotransfusion"),
]))
story.append(topic_block("Bronchoscopy", [
("Types", "Rigid (surgical, for massive haemoptysis, foreign body) vs Flexible (fiberoptic, diagnostic)"),
("Indications","Haemoptysis, suspected lung cancer, foreign body, atelectasis, BAL, endobronchial biopsy"),
("Procedure", "Topical anaesthesia (flexible) or GA (rigid); visualise tracheobronchial tree to subsegmental bronchi"),
("Findings", "Endobronchial tumor, compression, mucosal abnormality, foreign body"),
]))
story.append(topic_block("Emphysema (Surgical Relevance)", [
("Definition", "Permanent enlargement of airspaces distal to terminal bronchiole with wall destruction"),
("Types", "Centriacinar (smoking), Panacinar (α1-antitrypsin deficiency), Subcutaneous emphysema (surgical emergency)"),
("Features", "Barrel chest, hyperresonance, reduced breath sounds, prolonged expiration; pink puffer"),
("Subcutaneous","Air in soft tissues: palpable crepitus; causes: trauma, oesophageal rupture, bowel perforation, post-surgical"),
("Treatment", "COPD management; bullectomy for large bullae; LVRS (lung volume reduction surgery)"),
]))
story.append(topic_block("Flail Chest / Stove-in Chest", [
("Definition", "ā„3 consecutive ribs fractured in ā„2 places ā free-floating segment; stove-in = multiple rib fractures without paradoxical movement"),
("Mechanism", "Paradoxical movement: segment moves IN on inspiration, OUT on expiration (opposite to normal)"),
("Pathophysiology","Underlying pulmonary contusion is the main cause of hypoxia, not the flail itself"),
("Features", "Paradoxical chest wall movement, severe pain, hypoxia, tachycardia"),
("Treatment", "Analgesia (epidural ideal), IPPV (internal pneumatic stabilisation), physiotherapy; surgical fixation for severe cases"),
], "Pulmonary contusion is the main driver of morbidity, not the rib fractures alone."))
story.append(topic_block("Lung Abscess", [
("Definition", "Localised suppurative process with central necrosis and cavitation in lung parenchyma"),
("Causes", "Aspiration (commonest; anaerobes: Bacteroides, Fusobacterium), secondary to pneumonia, haematogenous"),
("Features", "Swinging fever, putrid sputum (foul-smelling), clubbing (if chronic), CXR: cavity with air-fluid level"),
("Diagnosis", "CXR/CT: thick-walled cavity with air-fluid level; sputum culture; bronchoscopy to exclude foreign body/tumor"),
("Treatment", "IV antibiotics (metronidazole + penicillin/amoxicillin-clavulanate) Ć 4ā6 weeks; postural drainage; surgery if failed (lobectomy)"),
], "Air-fluid level on CXR = lung abscess until proven otherwise. Distinguish from empyema (lenticular shape vs round)."))
story.append(topic_block("ARDS (Acute Respiratory Distress Syndrome)", [
("Definition", "Berlin criteria: acute onset <7 days; bilateral infiltrates; PaO2/FiO2 <300 mmHg; not fully explained by cardiac failure/fluid overload"),
("Causes", "Direct: pneumonia, aspiration, contusion; Indirect: sepsis, pancreatitis, massive transfusion, burns"),
("Pathophysiology","Diffuse alveolar damage ā exudative phase (72 hrs) ā proliferative ā fibrotic"),
("Features", "Progressive dyspnea, hypoxia, bilateral 'white-out' on CXR, decreased compliance"),
("Treatment", "Lung-protective ventilation: TV 6 mL/kg IBW, plateau pressure <30 cmH2O; prone positioning; PEEP optimisation; treat underlying cause"),
], "P:F ratio <100 = severe ARDS. Prone positioning reduces mortality in severe ARDS."))
story.append(topic_block("Intercostal Tube Drainage (ICD)", [
("Indications","Pneumothorax (tension/large), haemothorax, pleural effusion (large/exudate), empyema, chylothorax, post-thoracic surgery"),
("Site", "Safe triangle: lateral border of pectoralis major, anterior border of latissimus dorsi, above line of 5th ICS (midaxillary line). Emergency pneumothorax: 2nd ICS MCL"),
("Technique", "Blunt dissection over upper border of rib (avoid neurovascular bundle); use 28ā32 Fr tube for fluid, 20ā28 Fr for air"),
("Underwater Seal","Water seal bottle; bubbling = air leak; swinging = patent tube; lack of swing = kinked/blocked/lung fully expanded"),
("Removal", "No bubbling + lung expanded on CXR + output <100 mL/day; remove at end-expiration or Valsalva"),
]))
story.append(topic_block("Stiff Lung / Reduced Compliance", [
("Definition", "Reduced lung compliance (volume change per unit pressure change); normal = 200 mL/cmH2O"),
("Causes", "ARDS, pulmonary fibrosis, pulmonary oedema, atelectasis, pneumonia, pleural effusion"),
("Features", "High airway pressures needed on ventilator, hypoxia, restrictive pattern on PFT"),
("Treatment", "Treat underlying cause; PEEP on ventilator; prone positioning; diuretics for pulmonary oedema"),
]))
story.append(topic_block("Pulmonary Embolism (PE)", [
("Source", "DVT (deep vein thrombosis): 90%; usually iliac/femoral veins"),
("Risk Factors","Virchow's triad: Stasis + Hypercoagulability + Endothelial damage; post-op, immobility, malignancy, OCP"),
("Features", "Sudden dyspnea, pleuritic chest pain, haemoptysis, hypoxia, tachycardia, hypotension (massive PE)"),
("Diagnosis", "CTPA (gold standard); D-dimer (high sensitivity, low specificity); Wells score; V/Q scan if contrast contraindicated"),
("ECG", "Sinus tachycardia (most common); S1Q3T3 pattern (classic but rare)"),
("Treatment", "LMWH ā switch to warfarin/DOAC Ć 3-6 months; massive PE: systemic thrombolysis; surgical embolectomy as last resort"),
], "CTPA is the investigation of choice. Massive PE = haemodynamically unstable ā thrombolyse."))
story.append(topic_block("Lung Cyst", [
("Types", "Congenital: bronchogenic cyst, CCAM (congenital cystic adenomatoid malformation); Acquired: post-infective, hydatid, emphysematous bulla"),
("Features", "Often asymptomatic; can cause compression, infection, pneumothorax if ruptured"),
("Diagnosis", "CXR/CT; cyst characteristics help differentiate type"),
("Treatment", "Resection if symptomatic, infected, or enlarging; VATS preferred"),
]))
story.append(topic_block("Chest Tumors (Mediastinal / Chest Wall / Pancoast)", [
("Anterior Mediastinum","4T's: Thymoma, Teratoma, Thyroid (retrosternal), Terrible lymphoma"),
("Middle Mediastinum","Lymph nodes, pericardial cyst, bronchogenic cyst, great vessel aneurysm"),
("Posterior Mediastinum","Neurogenic tumors (most common): schwannoma, neurofibroma, ganglioneuroma"),
("Chest Wall", "Ribs: osteosarcoma, chondrosarcoma, Ewing's; soft tissue sarcoma"),
("Pancoast Tumor","Superior sulcus tumor (apex of lung); invades T1 nerve root, stellate ganglion; causes Horner's syndrome + arm pain; also subclavian vessel involvement"),
("Pancoast Syndrome","Horner's (ptosis + miosis + anhidrosis) + C8/T1 pain/weakness + wasting of intrinsic hand muscles"),
], "Pancoast = Homer + hand wasting + arm pain. Usually squamous cell carcinoma."))
story.append(topic_block("Diaphragmatic Hernia", [
("Bochdalek", "Posterolateral; most common congenital (1 in 2500 births); left > right; contents: bowel, stomach, spleen; presents at birth with respiratory distress"),
("Morgagni", "Anterior (retrosternal); less common; usually right side; often contains omentum/colon; presents later in life"),
("Traumatic", "Blunt/penetrating trauma; left more common; delayed diagnosis; bowel sounds in chest"),
("Hiatus Hernia","Type I (sliding, 95%): GE junction hernia; GORD; Rx: fundoplication; Type II/III (rolling/paraesophageal): surgical repair due to strangulation risk"),
("Treatment", "Surgical repair; neonatal Bochdalek: delayed repair after stabilisation; ECMO if required"),
]))
story.append(topic_block("Valvular Heart Disease (Surgical Overview)", [
("Causes", "Rheumatic fever (most common worldwide), degenerative, congenital, infective endocarditis"),
("Mitral Stenosis","MS: rheumatic; opening snap + mid-diastolic murmur; complications: AF, pulmonary HTN, systemic emboli"),
("Mitral Regurgitation","MR: rheumatic, MVP, papillary muscle rupture (post-MI); pansystolic murmur at apex"),
("Aortic Stenosis","AS: degenerative/bicuspid; ejection systolic murmur; triad: angina, syncope, CCF = poor prognosis"),
("Aortic Regurgitation","AR: rheumatic, Marfan's, aortic dissection; early diastolic murmur; wide pulse pressure"),
("Treatment", "Medical: diuretics, ACE inhibitors; Surgical: valve repair or replacement (mechanical vs bioprosthetic); TAVI for high-risk AS"),
]))
story.append(topic_block("Pericarditis", [
("Causes", "Viral (coxsackievirus B, most common), bacterial, TB, uraemia, malignancy, post-MI (Dressler's), autoimmune (SLE, RA)"),
("Features", "Sharp retrosternal chest pain, worse on lying flat, relieved by leaning forward; pericardial friction rub; low-grade fever"),
("ECG", "Widespread saddle-shaped ST elevation; PR depression; later T-wave inversion"),
("Treatment", "Viral/idiopathic: NSAIDs + colchicine; Bacterial: IV antibiotics + drainage; TB: anti-TB drugs; Constrictive: pericardiectomy"),
]))
story.append(topic_block("Cardiac Tamponade", [
("Definition", "Compression of heart due to pericardial fluid accumulation ā reduced cardiac output"),
("Causes", "Trauma (haemopericardium), malignancy, pericarditis, post-cardiac surgery, aortic dissection"),
("Beck's Triad","1. Hypotension 2. Raised JVP 3. Muffled heart sounds"),
("Diagnosis", "ECHO (gold standard): pericardial effusion + RA/RV collapse; CXR: globular heart ('flask-shaped'); ECG: electrical alternans"),
("Treatment", "Emergency pericardiocentesis (subxiphoid route); surgical drainage (pericardial window) if recurrent"),
], "Pulsus paradoxus (>10 mmHg drop in systolic BP on inspiration) is a key clinical sign."))
story.append(PageBreak())
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
# SECTION 4: UROLOGY & KIDNEY
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
story.append(section_banner("SECTION 4 ā UROLOGY & KIDNEY", ACCENT_GOLD))
story.append(Spacer(1, 0.3*cm))
story.append(topic_block("Haematuria", [
("Types", "Macroscopic (visible) vs Microscopic (>3 RBCs/HPF on urinalysis)"),
("Causes", "Glomerular: IgA nephropathy, GN; Non-glomerular: stones, UTI, TB, tumor (bladder, kidney, prostate)"),
("Initial", "Urinalysis + urine cytology, MSU C&S, renal function, USG KUB"),
("Definitive", "CT urogram (gold standard for upper tract); cystoscopy (for bladder evaluation); TURBT if bladder tumor"),
("Painless macroscopic haematuria", "= bladder/renal carcinoma until proven otherwise; urgent referral"),
], "Painless haematuria in an adult = malignancy until excluded by CT + cystoscopy."))
story.append(topic_block("Horseshoe Kidney", [
("Definition", "Fusion of lower poles of both kidneys across midline, anterior to aorta (90% at lower pole)"),
("Incidence", "1 in 400; M > F; associated with Turner's syndrome, trisomy 18"),
("Complications","PUJ obstruction (most common), recurrent UTI, calculi, Wilms tumor (higher risk), renal carcinoma"),
("Diagnosis", "IVU (medially rotated lower poles, malrotation), CT (diagnostic)"),
("Treatment", "Treat complications; division (isthmus division) rarely needed"),
]))
story.append(topic_block("PCKD (Polycystic Kidney Disease)", [
("ADPKD", "Autosomal Dominant; PKD1 (chr 16) + PKD2 (chr 4); most common inherited renal disease; presents 4th-5th decade"),
("Features", "Bilateral large kidneys, hypertension, haematuria, flank pain, UTI, progressive CKD; extrarenal: liver cysts, intracranial aneurysms, MVP"),
("ARPKD", "Autosomal Recessive; presents in infancy/childhood; associated with congenital hepatic fibrosis; poor prognosis"),
("Diagnosis", "USG (multiple bilateral cysts, enlarged kidneys); genetic testing"),
("Treatment", "BP control (RAAS blockade), tolvaptan (ADPKD progression), RRT/transplant for ESRD"),
], "Screen family members. Screen for intracranial aneurysms if family history of subarachnoid haemorrhage."))
story.append(topic_block("Renal Carbuncle", [
("Definition", "Intrarenal abscess (cortical abscess); distinct from perinephric abscess which is outside the capsule"),
("Organism", "Staphylococcus aureus (haematogenous spread from skin/bone infection); also gram-negative from UTI"),
("Features", "Fever, rigors, loin pain, tender renal angle; may not have urinary symptoms"),
("Diagnosis", "USG/CT (hypoechoic/heterogeneous intrarenal mass); urine culture may be sterile"),
("Treatment", "IV antibiotics (anti-staphylococcal); percutaneous/surgical drainage if >3 cm or no response"),
]))
story.append(topic_block("Renal TB", [
("Path", "Haematogenous spread from primary pulmonary TB ā cortex (well-vascularised) ā medulla ā papillae ā bladder"),
("Features", "Sterile pyuria (WBCs in urine, culture negative on routine media), microscopic haematuria, frequency, loin pain, constitutional symptoms"),
("X-ray", "Putty kidney (dystrophic calcification), amputated calyx, pelvi-infundibular stricture; IVU: classic findings"),
("Diagnosis", "EMU (early morning urine) Ć 3 for AFB culture (Lowenstein-Jensen media); PCR; CT KUB"),
("Treatment", "2HRZE + 4HR (standard 6-month anti-TB regimen); surgery for strictures (ureteric reimplantation), pyonephrosis, non-functioning kidney"),
], "Key: sterile pyuria on standard culture = renal TB until proved otherwise. Send 3 EMUs."))
story.append(topic_block("Wilms Tumor (Nephroblastoma)", [
("Epidemiology","Most common primary renal tumor in children; peak age 3-4 years; 5-10% bilateral"),
("Features", "Painless abdominal mass (most common presentation), haematuria, hypertension, fever; does NOT cross midline (unlike neuroblastoma)"),
("Associations","WAGR syndrome (Wilms + Aniridia + Genitourinary anomalies + Retardation); Beckwith-Wiedemann syndrome"),
("Staging", "Stage I-V (V = bilateral); CT chest + abdomen for staging"),
("Treatment", "Nephrectomy + chemotherapy (vincristine + actinomycin D ± doxorubicin) ± radiotherapy; 90% cure rate for early stages"),
], "Does NOT cross midline ā Wilms. Crosses midline + calcification + catecholamines ā Neuroblastoma."))
story.append(topic_block("Hydronephrosis", [
("Definition", "Dilation of the renal pelvis and calyces due to obstruction of urinary outflow"),
("Causes", "PUJ (pelvi-ureteric junction) obstruction, ureteric stone, stricture, vesicoureteric junction obstruction, prostatic enlargement, pelvic tumors, retroperitoneal fibrosis"),
("Features", "Loin pain (intermittent or continuous), palpable loin mass, UTI, haematuria; chronic may be silent"),
("Diagnosis", "USG (hydronephrosis grading 1-4), CT urogram, MAG3 renogram (split renal function + drainage)"),
("Treatment", "Relieve obstruction: pyeloplasty (Anderson-Hynes for PUJ), ureteric stent, nephrostomy; nephrectomy if non-functioning"),
]))
story.append(topic_block("Grawitz's Tumor / Renal Cell Carcinoma (RCC)", [
("Origin", "Proximal convoluted tubule; clear cell (75%, VHL gene) most common subtype; also papillary, chromophobe"),
("Classic Triad","Haematuria + Loin pain + Flank mass (only 10% present with all three ā late presentation)"),
("Paraneoplastic","Polycythaemia (EPO), hypercalcaemia (PTHrP), hypertension, Stauffer syndrome (hepatic dysfunction without mets), pyrexia"),
("Spread", "Tumour thrombus into renal vein ā IVC ā right atrium; early haematogenous spread: lung ('cannonball' mets), bone, brain"),
("Treatment", "Radical nephrectomy (gold standard); nephron-sparing for T1a <4 cm or single kidney; metastatic: sunitinib, pazopanib, nivolumab, ipilimumab"),
], "Left-sided varicocele + haematuria = suspect left RCC (left gonadal vein drains into left renal vein)."))
story.append(topic_block("Pyonephrosis", [
("Definition", "Pus in an obstructed, dilated collecting system ā infected hydronephrosis"),
("Causes", "Obstruction (stone, stricture, tumor) + superimposed bacterial infection"),
("Features", "High fever + rigors + loin pain + tender renal angle; septicaemia; renography: non-functioning kidney"),
("Diagnosis", "USG: echogenic fluid in pelvicalyceal system; CT: heterogeneous fluid, gas within collecting system"),
("Treatment", "EMERGENCY nephrostomy (decompression) + IV broad-spectrum antibiotics; definitive: treat obstruction; nephrectomy if non-functioning"),
], "Pyonephrosis = urological emergency. Decompress first, treat infection, definitive surgery later."))
story.append(topic_block("Perinephric Abscess", [
("Definition", "Pus in the perinephric space (between renal capsule and Gerota's fascia)"),
("Causes", "Extension from intrarenal abscess (carbuncle), haematogenous spread; Gram-negative (E. coli) > Staph"),
("Features", "High fever, loin pain, tender renal angle, scoliosis away from side of abscess, psoas spasm ā flexion of hip"),
("Diagnosis", "USG/CT (perinephric collection); distinguishing from renal abscess: location relative to capsule"),
("Treatment", "IV antibiotics + percutaneous drainage (CT/USG guided); surgical drainage if failed"),
]))
story.append(topic_block("Renal Calculus (Nephrolithiasis)", [
("Types", "Calcium oxalate (80%, radio-opaque, commonest); Uric acid (radiolucent, gout); Staghorn: struvite (infection/Proteus); Cystine (autosomal recessive)"),
("Features", "Ureteric colic: severe colicky loin-to-groin pain ± radiation to scrotum/labia; haematuria, nausea, vomiting"),
("Diagnosis", "Non-contrast CT KUB (gold standard, most sensitive); KUB X-ray (misses small/uric acid stones); USG (hydronephrosis, lower ureteric stones)"),
("Spontaneous Passage","<5 mm: 90% pass; 5-10 mm: 50%; >10 mm: unlikely to pass spontaneously"),
("Treatment", "Conservative: analgesia (NSAID), fluids, alpha-blockers (tamsulosin for ureteric stones); ESWL (<2 cm, renal/upper ureteric); URS + laser (ureteric); PCNL (>2 cm, lower pole, ESWL failed)"),
], "Staghorn calculus = struvite (magnesium ammonium phosphate) = Proteus mirabilis infection."))
story.append(PageBreak())
# āā QUICK REVISION TABLE āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
story.append(section_banner("QUICK REVISION ā HIGH-YIELD MNEMONICS & EXAM TIPS", MID_GREY))
story.append(Spacer(1, 0.3*cm))
quick_data = [
["Topic", "High-Yield Point"],
["Amoebic abscess", "Anchovy sauce pus; single right lobe; treat with metronidazole"],
["Hydatid cyst", "Never biopsy; PAIR procedure; albendazole cover"],
["Gallstones", "5 F's: Fat, Female, Fertile, Forty, Fair"],
["Courvoisier's Law","Palpable GB + jaundice = NOT gallstones = periampullary malignancy"],
["Whipple's procedure", "Pancreaticoduodenectomy for Ca. head of pancreas"],
["Pancreatitis signs", "Cullen's (periumbilical) + Grey-Turner's (flank) = haemorrhagic"],
["Tension PTX", "Trachea AWAY, needle 2nd ICS MCL; do NOT wait for CXR"],
["Beck's triad", "Tamponade: Hypotension + āJVP + Muffled heart sounds"],
["ARDS", "P:F <300; lung-protective ventilation; TV 6 mL/kg; prone if severe"],
["Pancoast tumor", "Apex lung Ca. + Horner's + C8/T1 hand wasting"],
["Haematuria", "Painless macroscopic = malignancy until proved otherwise"],
["Wilms vs Neuroblastoma", "Wilms: does NOT cross midline; Neuro: crosses midline + calcification"],
["Renal TB", "Sterile pyuria + EMU Ć 3 AFB; putty kidney on X-ray"],
["Left RCC clue", "Left-sided varicocele + haematuria"],
["Renal stones", "Calcium oxalate commonest; staghorn = struvite = Proteus"],
["ICD site", "Safe triangle, 5th ICS MAL, over upper border of rib (avoid NVB)"],
["Pseudocyst", "Most common complication of pancreatitis; >6 wk + >6 cm ā drain"],
["Horseshoe kidney","Fuses at lower poles; associated with PUJ obstruction + Wilms"],
["PCKD", "ADPKD: PKD1 (chr16); intracranial aneurysm risk; tolvaptan slows progression"],
]
qt = Table(quick_data, colWidths=[5.5*cm, W - 4*cm - 5.5*cm])
qt.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), DARK_BLUE),
("TEXTCOLOR", (0,0), (-1,0), WHITE),
("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
("FONTSIZE", (0,0), (-1,0), 11),
("ROWBACKGROUNDS",(0,1), (-1,-1), [LIGHT_GREY, WHITE]),
("FONTNAME", (0,1), (0,-1), "Helvetica-Bold"),
("FONTSIZE", (0,1), (-1,-1), 9.5),
("GRID", (0,0), (-1,-1), 0.5, colors.HexColor("#b0b0b0")),
("TOPPADDING", (0,0), (-1,-1), 6),
("BOTTOMPADDING", (0,0), (-1,-1), 6),
("LEFTPADDING", (0,0), (-1,-1), 8),
("RIGHTPADDING", (0,0), (-1,-1), 8),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("ALIGN", (0,0), (-1,0), "CENTER"),
]))
story.append(qt)
story.append(Spacer(1, 1*cm))
# āā FOOTER NOTE āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
story.append(divider(MID_GREY))
story.append(Paragraph(
"This study guide is compiled for educational purposes (MBBS / MS Surgery preparation). "
"Clinical decisions should always be based on current guidelines and clinical judgment.",
S("Disclaimer", fontName="Helvetica-Oblique", fontSize=8.5,
textColor=MID_GREY, alignment=TA_CENTER, leading=13)
))
# āā BUILD āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
doc.build(story)
print(f"PDF created: {OUTPUT}")
cd /home/daytona/workspace/surgery-guide && python create_pdf.py 2>&1
ls -lh /home/daytona/workspace/surgery-guide/Surgery_Study_Guide.pdf
Surgery Study Guide
PDF Document Ā· PDF