Give in detail about 9 quadrat ana patho pom surgery medicine
nine abdominal regions quadrants diagram anatomy


| Region | Key Organs | Key Pathology | Key Surgery | Key Drugs |
|---|---|---|---|---|
| R. Hypochondrium | Liver, Gallbladder | Cholecystitis, Hepatitis | Laparoscopic cholecystectomy | Ursodeoxycholic acid, PPIs, antivirals |
| Epigastric | Stomach, Duodenum, Pancreas | PUD, Pancreatitis, AAA | Whipple's, gastrectomy, EVAR | PPIs, H. pylori triple therapy, octreotide |
| L. Hypochondrium | Spleen, Stomach fundus | Splenomegaly, Splenic rupture | Splenectomy | Penicillin V (post-splenectomy), hydroxyurea |
| R. Flank | R. Kidney, Ascending colon | Renal colic, Pyelonephritis, RCC | Nephrectomy, ureteroscopy, PCNL | NSAIDs, tamsulosin, ciprofloxacin |
| Umbilical | Small bowel, Aorta | SBO, AAA, Mesenteric ischemia | Laparotomy, EVAR, adhesiolysis | IV fluids, heparin, statins |
| L. Flank | L. Kidney, Descending colon | Renal colic, Colon cancer, PKD | Hemicolectomy, nephrectomy | FOLFOX, tolvaptan, NSAIDs |
| R. Iliac Fossa | Appendix, Caecum, R. Ovary | Appendicitis, Ectopic pregnancy, Crohn's | Appendicectomy, hernia repair | Cefuroxime + metronidazole, methotrexate |
| Pubic/Hypogastric | Bladder, Uterus, Rectum | PID, Cystitis, BPH, Bladder Ca | Cystectomy, TURP, hysterectomy | Doxycycline + metronidazole, tamsulosin |
| L. Iliac Fossa | Sigmoid colon, L. Ovary | Diverticulitis, Sigmoid Ca, Ectopic | Hartmann's, anterior resection | Metronidazole + ciprofloxacin, FOLFOX |
Give pdf
ls -la /home/daytona/workspace/ 2>/dev/null || mkdir -p /home/daytona/workspace
mkdir -p /home/daytona/workspace/9-abdominal-regions && python3 -c " from reportlab.lib.pagesizes import A4 from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.units import cm from reportlab.lib import colors from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, HRFlowable, PageBreak from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY import urllib.request import os # Download images img_gray = '/home/daytona/workspace/9-abdominal-regions/gray_regions.png' img_bailey = '/home/daytona/workspace/9-abdominal-regions/bailey_pain.png' urllib.request.urlretrieve( 'https://cdn.orris.care/cdss_images/e74140efb1a0c95902c5bf7b8e6d28e12f99a04f7ddff75973b9edfeff4c6464.png', img_gray ) urllib.request.urlretrieve( 'https://cdn.orris.care/cdss_images/BAILY_1760530893882_a5e3a51d-802c-46b5-94c3-b2d3b0f8c01f.png', img_bailey ) print('Images downloaded:', os.path.exists(img_gray), os.path.exists(img_bailey)) "
~/9-abdominal-regions/generate_pdf.py
from reportlab.lib.pagesizes import A4
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm
from reportlab.lib import colors
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
HRFlowable, PageBreak, Image, KeepTogether
)
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
import os
OUTPUT = '/home/daytona/workspace/9-abdominal-regions/9_Abdominal_Regions.pdf'
IMG_GRAY = '/home/daytona/workspace/9-abdominal-regions/gray_regions.png'
IMG_BAILEY = '/home/daytona/workspace/9-abdominal-regions/bailey_pain.png'
doc = SimpleDocTemplate(
OUTPUT,
pagesize=A4,
rightMargin=2*cm, leftMargin=2*cm,
topMargin=2*cm, bottomMargin=2*cm
)
W, H = A4
styles = getSampleStyleSheet()
# Custom styles
title_style = ParagraphStyle('Title', parent=styles['Title'],
fontSize=22, textColor=colors.HexColor('#1a237e'),
spaceAfter=6, alignment=TA_CENTER, fontName='Helvetica-Bold')
subtitle_style = ParagraphStyle('Subtitle', parent=styles['Normal'],
fontSize=11, textColor=colors.HexColor('#37474f'),
spaceAfter=12, alignment=TA_CENTER)
h1_style = ParagraphStyle('H1', parent=styles['Heading1'],
fontSize=16, textColor=colors.white,
spaceBefore=14, spaceAfter=6,
fontName='Helvetica-Bold', backColor=colors.HexColor('#1a237e'),
leftIndent=-0.5*cm, rightIndent=-0.5*cm,
borderPad=6)
h2_style = ParagraphStyle('H2', parent=styles['Heading2'],
fontSize=12, textColor=colors.HexColor('#1a237e'),
spaceBefore=10, spaceAfter=4,
fontName='Helvetica-Bold',
borderPad=3)
h3_style = ParagraphStyle('H3', parent=styles['Heading3'],
fontSize=10, textColor=colors.HexColor('#b71c1c'),
spaceBefore=6, spaceAfter=3,
fontName='Helvetica-Bold')
body_style = ParagraphStyle('Body', parent=styles['Normal'],
fontSize=9.5, leading=14,
spaceAfter=4, alignment=TA_JUSTIFY,
fontName='Helvetica')
bullet_style = ParagraphStyle('Bullet', parent=styles['Normal'],
fontSize=9.5, leading=13, leftIndent=14,
bulletIndent=4, spaceAfter=2,
fontName='Helvetica')
caption_style = ParagraphStyle('Caption', parent=styles['Normal'],
fontSize=8, textColor=colors.grey,
alignment=TA_CENTER, spaceAfter=6)
def h1(text):
return Paragraph(f' {text}', h1_style)
def h2(text):
return Paragraph(text, h2_style)
def h3(text):
return Paragraph(text, h3_style)
def body(text):
return Paragraph(text, body_style)
def bullet(text):
return Paragraph(f'• {text}', bullet_style)
def sp(n=1):
return Spacer(1, n*0.3*cm)
def hr():
return HRFlowable(width='100%', thickness=0.5, color=colors.HexColor('#b0bec5'), spaceAfter=4)
story = []
# ── COVER PAGE ─────────────────────────────────────────────────────────────────
story.append(Spacer(1, 3*cm))
story.append(Paragraph('The 9 Abdominal Regions', title_style))
story.append(sp(0.5))
story.append(Paragraph('Anatomy · Pathology · Pharmacology (POM) · Surgery · Medicine', subtitle_style))
story.append(sp(0.5))
story.append(HRFlowable(width='80%', thickness=2, color=colors.HexColor('#1a237e'), spaceAfter=10))
story.append(sp(1))
# Add both images side by side on cover
if os.path.exists(IMG_GRAY) and os.path.exists(IMG_BAILEY):
img1 = Image(IMG_GRAY, width=7.5*cm, height=9*cm)
img2 = Image(IMG_BAILEY, width=7.5*cm, height=9*cm)
cover_table = Table([[img1, img2]], colWidths=[8*cm, 8*cm])
cover_table.setStyle(TableStyle([
('ALIGN', (0,0), (-1,-1), 'CENTER'),
('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(cover_table)
story.append(sp(0.3))
story.append(Paragraph('Left: Gray\'s Anatomy for Students — Nine-region pattern | Right: Bailey & Love — Nine sites of abdominal pain', caption_style))
story.append(Spacer(1, 2*cm))
story.append(Paragraph('Sources: Gray\'s Anatomy for Students · Bailey & Love\'s Short Practice of Surgery ·\nTintinalli\'s Emergency Medicine · Rosen\'s Emergency Medicine ·\nSleisenger & Fordtran\'s GI & Liver Disease · Yamada\'s Textbook of Gastroenterology', subtitle_style))
story.append(PageBreak())
# ── INTRO ──────────────────────────────────────────────────────────────────────
story.append(h1('Anatomical Basis of the Nine-Region Division'))
story.append(sp())
story.append(body(
'The abdomen is divided into <b>9 regions</b> by <b>4 planes</b>:'
))
story.append(bullet('<b>Subcostal plane (superior horizontal)</b>: immediately inferior to costal margins at lower border of costal cartilage of rib X, passing posteriorly through vertebra LIII.'))
story.append(bullet('<b>Intertubercular plane (inferior horizontal)</b>: connecting tubercles of iliac crests (~5 cm posterior to ASIS), passing through upper body of vertebra LV.'))
story.append(bullet('<b>Two midclavicular (vertical) planes</b>: from midpoint of clavicles inferiorly to midpoint between ASIS and pubic symphysis.'))
story.append(sp())
story.append(body(
'These four planes create nine regions: <b>Right Hypochondrium</b>, <b>Epigastric</b>, <b>Left Hypochondrium</b> (superior row); '
'<b>Right Flank</b>, <b>Umbilical</b>, <b>Left Flank</b> (middle row); '
'<b>Right Iliac Fossa</b>, <b>Pubic/Hypogastric</b>, <b>Left Iliac Fossa</b> (inferior row).'
))
story.append(sp(2))
# ─── REGIONS DATA ─────────────────────────────────────────────────────────────
regions = [
{
'num': '1',
'name': 'Right Hypochondrium (Right Subcostal)',
'anatomy': [
'Liver (right lobe — primary location)',
'Gallbladder',
'Hepatic flexure of colon',
'Right kidney (upper pole) and right adrenal gland',
'Part of duodenum (D1)',
],
'pathology': [
'<b>Hepatitis</b> (viral, alcoholic, autoimmune) — tender hepatomegaly',
'<b>Acute/Chronic Cholecystitis</b> — Murphy\'s sign positive',
'<b>Cholelithiasis</b> — biliary colic',
'<b>Liver abscess</b>, Hepatocellular carcinoma (HCC)',
'<b>Subphrenic abscess</b>',
],
'pharmacology': [
'<b>Ursodeoxycholic acid</b> — dissolution of cholesterol gallstones; primary biliary cholangitis',
'<b>Antivirals</b>: tenofovir/entecavir (HBV); sofosbuvir/ledipasvir (HCV)',
'<b>Antispasmodics</b> (hyoscine butylbromide) for biliary colic pain relief',
'Avoid <b>hepatotoxic drugs</b> (paracetamol overdose, isoniazid, statins) — monitor LFTs',
],
'surgery': [
'<b>Laparoscopic cholecystectomy</b> — gold standard for symptomatic gallstones',
'<b>Open cholecystectomy</b> via Kocher\'s (right subcostal) incision for complicated cases',
'<b>ERCP + sphincterotomy</b> for choledocholithiasis',
'<b>Liver resection (hepatectomy)</b> for HCC or colorectal liver metastases',
],
'medicine': [
'<b>Murphy\'s sign</b>: RUQ tenderness on deep inspiration — pathognomonic for cholecystitis',
'<b>Charcot\'s triad</b>: RUQ pain + jaundice + fever = ascending cholangitis',
'<b>Courvoisier\'s law</b>: palpable gallbladder + painless jaundice = malignancy (not stones)',
'US abdomen = first-line imaging; MRCP for bile duct evaluation',
],
},
{
'num': '2',
'name': 'Epigastric Region',
'anatomy': [
'Stomach and duodenum (D1, D2)',
'Liver (left lobe), lesser omentum',
'Pancreas (head and body)',
'Abdominal aorta (coeliac axis origin), inferior vena cava',
],
'pathology': [
'<b>Peptic ulcer disease</b> (gastric/duodenal) — burning pain; worse/better with food',
'<b>Acute pancreatitis</b> — severe epigastric pain radiating to the back',
'<b>Gastritis</b>, GORD',
'<b>Abdominal aortic aneurysm (AAA)</b> — pulsatile epigastric mass',
'<b>Gastric cancer</b>',
],
'pharmacology': [
'<b>PPIs</b> (omeprazole, lansoprazole) — first-line for GORD, peptic ulcer, H. pylori eradication',
'<b>H. pylori triple therapy</b>: PPI + clarithromycin + amoxicillin (7–14 days)',
'<b>H2-blockers</b> (famotidine) — second-line acid suppression',
'<b>Octreotide</b> — reduces pancreatic secretions in acute pancreatitis',
'<b>IV morphine</b> for severe pancreatitis pain; prokinetics (metoclopramide) for gastroparesis',
],
'surgery': [
'<b>Whipple\'s procedure</b> (pancreaticoduodenectomy) for pancreatic head/periampullary cancer',
'<b>Billroth I/II gastrectomy</b> or <b>Roux-en-Y</b> for gastric cancer',
'<b>Endoscopic hemostasis</b> for bleeding peptic ulcer (adrenaline injection, clips)',
'<b>AAA repair</b> — open (midline laparotomy) or EVAR (endovascular)',
],
'medicine': [
'<b>Ranson\'s/Glasgow score</b> for pancreatitis severity assessment',
'<b>Cullen\'s sign</b> (periumbilical bruising) + <b>Grey Turner\'s sign</b> (flank bruising) = haemorrhagic pancreatitis',
'<b>H. pylori testing</b>: urea breath test, stool antigen, CLO test on biopsy',
'Epigastric pain + ECG changes → rule out <b>inferior MI</b> (referred via phrenic nerve)',
],
},
{
'num': '3',
'name': 'Left Hypochondrium (Left Subcostal)',
'anatomy': [
'Spleen',
'Tail of pancreas',
'Stomach (fundus and body)',
'Left kidney (upper pole) and left adrenal gland',
'Splenic flexure of colon',
],
'pathology': [
'<b>Splenomegaly</b> (malaria, CML, portal hypertension, EBV, lymphoma)',
'<b>Splenic injury/rupture</b> — trauma; Kehr\'s sign (left shoulder tip pain)',
'<b>Splenic infarct</b> — sickle cell disease, cardioembolic',
'<b>Gastric volvulus</b>',
'<b>Subphrenic abscess</b> (left)',
],
'pharmacology': [
'<b>Hydroxycarbamide (hydroxyurea)</b> — reduces sickling crises; prevents splenic infarction',
'<b>Antimalarials</b> (artemisinin-based, chloroquine)',
'<b>Penicillin V prophylaxis</b> — lifelong post-splenectomy for OPSI prevention',
'<b>Post-splenectomy vaccines</b>: pneumococcal (PCV13/PPSV23), meningococcal ACWY+B, Hib, annual influenza',
],
'surgery': [
'<b>Laparoscopic splenectomy</b> — for trauma (grade IV/V), ITP, hereditary spherocytosis',
'<b>Splenic artery embolization</b> — non-operative for splenic laceration grade I–III',
'<b>Distal pancreatectomy ± splenectomy</b> for pancreatic tail tumours',
],
'medicine': [
'Massive splenomegaly causes: CML, myelofibrosis, kala-azar, tropical splenomegaly',
'<b>Traube\'s space dullness</b> on percussion indicates splenomegaly',
'<b>OPSI (Overwhelming Post-Splenectomy Infection)</b>: highest risk first 2 years; caused by encapsulated organisms (S. pneumoniae, N. meningitidis, H. influenzae)',
],
},
{
'num': '4',
'name': 'Right Flank (Right Lumbar / Right Lateral)',
'anatomy': [
'Right kidney (main body)',
'Right ureter (upper portion)',
'Ascending colon',
'Small intestinal loops',
'Right psoas muscle, right quadratus lumborum',
],
'pathology': [
'<b>Renal colic</b> (ureteric stones) — severe colicky loin-to-groin pain, haematuria',
'<b>Pyelonephritis</b> — loin pain, fever, dysuria; positive CVAT',
'<b>Renal cell carcinoma (RCC)</b> — classic triad: haematuria + loin pain + mass',
'<b>Crohn\'s disease</b> (right-sided involvement)',
'<b>Retroperitoneal fibrosis</b>',
],
'pharmacology': [
'<b>NSAIDs (diclofenac)</b> — first-line analgesia for renal colic (reduces ureteral spasm)',
'<b>Alpha-blockers (tamsulosin)</b> — medical expulsive therapy for ureteric stones',
'<b>Antibiotics for pyelonephritis</b>: ciprofloxacin or co-amoxiclav PO; IV gentamicin + amoxicillin if severe',
'<b>Sunitinib, pazopanib, nivolumab</b> — targeted/immunotherapy for metastatic RCC',
],
'surgery': [
'<b>Ureteroscopy + laser lithotripsy</b> for ureteric calculi',
'<b>ESWL</b> (extracorporeal shock wave lithotripsy) for renal/proximal ureteric stones',
'<b>PCNL</b> (percutaneous nephrolithotomy) for large staghorn calculi',
'<b>Radical nephrectomy</b> for RCC',
'<b>Right hemicolectomy</b> for Crohn\'s stricture / ascending colon cancer',
],
'medicine': [
'<b>Costovertebral angle tenderness</b> (renal angle) — pyelonephritis vs. renal colic',
'<b>CT KUB</b> (non-contrast) is gold standard for renal/ureteric calculi',
'ACE inhibitors/ARBs for renoprotection in diabetic nephropathy',
],
},
{
'num': '5',
'name': 'Umbilical Region (Periumbilical)',
'anatomy': [
'Small intestine (jejunum, ileum)',
'Transverse colon',
'Abdominal aorta and inferior mesenteric artery origin',
'Mesentery and mesenteric lymph nodes',
'Umbilicus',
],
'pathology': [
'<b>Small bowel obstruction (SBO)</b> — colicky periumbilical pain, distension, vomiting',
'<b>Abdominal aortic aneurysm (AAA)</b> — pulsatile mass above/at umbilicus; pain → back',
'<b>Mesenteric ischaemia</b> — "pain out of proportion to signs"; postprandial angina',
'<b>Umbilical hernia</b>',
'<b>Early appendicitis</b> — visceral pain starts periumbilical before migrating to RIF',
],
'pharmacology': [
'<b>IV crystalloids</b> + <b>nasogastric decompression</b> for bowel obstruction',
'<b>Heparin / warfarin</b> — prevent/treat mesenteric venous thrombosis',
'<b>Intra-arterial papaverine</b> for non-occlusive mesenteric ischaemia',
'<b>Statins</b> — slow AAA growth, reduce cardiovascular events',
],
'surgery': [
'<b>Emergency laparotomy</b> for ruptured AAA; <b>EVAR</b> if anatomically suitable',
'<b>Elective AAA repair</b>: ≥5.5 cm (men), ≥5 cm (women) or rapid expansion',
'<b>Adhesiolysis</b> (laparoscopic or open) for adhesion-related SBO',
'<b>Bowel resection</b> for mesenteric ischaemia with necrosis; second-look at 24–48 h',
'<b>Umbilical hernia repair</b> — mesh or primary suture',
],
'medicine': [
'<b>Cullen\'s sign</b> (periumbilical bruising) = haemorrhagic pancreatitis or ruptured ectopic',
'<b>Sister Mary Joseph nodule</b> = periumbilical lymph node metastasis from intra-abdominal malignancy',
'SBO: "ladder pattern" (dilated loops with valvulae conniventes) on AXR',
'Aortic bruit on auscultation → US abdomen for AAA',
],
},
{
'num': '6',
'name': 'Left Flank (Left Lumbar / Left Lateral)',
'anatomy': [
'Left kidney (main body)',
'Left ureter (upper portion)',
'Descending colon',
'Small bowel loops',
'Left psoas muscle, left quadratus lumborum',
],
'pathology': [
'<b>Renal colic</b> (left ureteric stones)',
'<b>Pyelonephritis</b> (left)',
'<b>Polycystic kidney disease (ADPKD)</b> — bilateral flank masses',
'<b>Descending colon cancer</b> — change in bowel habit, PR bleeding, obstruction',
'<b>Retroperitoneal haematoma</b>',
],
'pharmacology': [
'Same as right flank: <b>NSAIDs, tamsulosin</b> for stones; <b>antibiotics</b> for UTI/pyelonephritis',
'<b>FOLFOX / FOLFIRI</b> (fluorouracil + oxaliplatin or irinotecan) for colon cancer chemotherapy',
'<b>Bevacizumab</b> (anti-VEGF) — add-on for metastatic colorectal cancer',
'<b>Tolvaptan</b> — vasopressin V2 receptor antagonist; slows cyst growth in ADPKD',
],
'surgery': [
'Same urological procedures as right flank (ureteroscopy, ESWL, PCNL)',
'<b>Left hemicolectomy</b> for descending colon cancer',
'<b>Bilateral laparoscopic nephrectomy</b> in massive ADPKD prior to transplantation',
],
'medicine': [
'ADPKD: bilateral flank masses + hypertension + haematuria; associated with berry aneurysms (screen with MRA brain)',
'Descending colon cancer: presents with <b>obstruction</b> (narrower lumen); less likely to cause iron-deficiency anaemia than right-sided cancer',
],
},
{
'num': '7',
'name': 'Right Iliac Fossa (Right Groin / Right Inguinal Region)',
'anatomy': [
'Appendix (retrocaecal in 65% of cases)',
'Caecum and terminal ileum',
'Right ovary and right fallopian tube (females)',
'Right ureter (lower portion)',
'Inguinal structures: right femoral/inguinal canal',
],
'pathology': [
'<b>Acute appendicitis</b> — most common surgical emergency worldwide',
'<b>Ectopic pregnancy</b> (right) — positive β-hCG; no intrauterine pregnancy on US',
'<b>Ovarian cyst / torsion / Mittelschmerz</b>',
'<b>Mesenteric adenitis</b> — children; mimics appendicitis',
'<b>Indirect inguinal hernia</b> — most common, especially males',
'<b>Crohn\'s disease</b> (terminal ileitis)',
'<b>Caecal carcinoma / Psoas abscess</b>',
],
'pharmacology': [
'<b>IV antibiotics peri-appendicectomy</b>: cefuroxime + metronidazole (aerobes + anaerobes)',
'<b>Piperacillin-tazobactam / meropenem</b> for complicated (perforated) appendicitis',
'<b>IV morphine</b> — safe to give before diagnosis; does NOT mask peritonism',
'<b>Methotrexate</b> — medical management of unruptured ectopic pregnancy (β-hCG <3000 IU/L, no cardiac activity)',
'<b>Infliximab / adalimumab</b> — biologics for Crohn\'s disease',
],
'surgery': [
'<b>Laparoscopic appendicectomy</b> — standard of care',
'<b>Open appendicectomy</b> via grid-iron incision at McBurney\'s point (for simple/limited access)',
'<b>Antibiotic-only management</b> of uncomplicated appendicitis — gaining evidence (APPAC trial)',
'<b>Inguinal hernia repair</b>: open Lichtenstein (mesh) or laparoscopic TEP/TAPP',
'<b>Salpingectomy / salpingostomy</b> for ectopic pregnancy',
],
'medicine': [
'<b>McBurney\'s point</b>: 1/3 from ASIS to umbilicus — maximal tenderness in appendicitis',
'<b>Rovsing\'s sign</b>: LIF palpation causes RIF pain; <b>Psoas sign</b>; <b>Obturator sign</b>',
'<b>Alvarado score</b> (MANTRELS) for appendicitis diagnosis; score ≥7 = likely appendicitis',
'In women of childbearing age: <b>always check β-hCG</b> before attributing RIF pain to appendicitis',
],
},
{
'num': '8',
'name': 'Pubic / Hypogastric Region (Suprapubic)',
'anatomy': [
'Urinary bladder',
'Uterus (body and cervix) and fallopian tubes (females)',
'Rectum and sigmoid colon junction',
'Prostate gland (males)',
'Terminal ureters; seminal vesicles (males)',
],
'pathology': [
'<b>Pelvic inflammatory disease (PID)</b> — bilateral lower abdominal pain, vaginal discharge, cervical excitation',
'<b>Ovarian cysts / torsion</b>',
'<b>Cystitis / UTI</b> — suprapubic pain, dysuria, frequency',
'<b>Bladder cancer</b> — painless haematuria',
'<b>Uterine fibroids</b> — menorrhagia, pressure symptoms',
'<b>BPH / Prostate cancer</b> (males)',
'<b>Pelvic abscess</b> (Pouch of Douglas)',
],
'pharmacology': [
'<b>PID antibiotics</b>: doxycycline + metronidazole ± ceftriaxone (covers Chlamydia, Gonorrhoea, anaerobes)',
'<b>Antibiotics for UTI</b>: trimethoprim/nitrofurantoin (uncomplicated); ciprofloxacin (complicated)',
'<b>Anticholinergics</b> (oxybutynin, solifenacin) for overactive bladder',
'<b>5-alpha reductase inhibitors</b> (finasteride) + <b>alpha-blockers</b> (tamsulosin) for BPH',
'<b>GnRH agonists</b> (leuprolide) for fibroid management (preoperative medical menopause)',
],
'surgery': [
'<b>Laparoscopic drainage</b> of Pouch of Douglas abscess',
'<b>TURP / laser prostatectomy</b> for BPH',
'<b>Radical cystectomy + neobladder</b> for muscle-invasive bladder cancer',
'<b>Total abdominal hysterectomy ± BSO (TAH-BSO)</b> for fibroids/gynaecological cancer',
'<b>Colporrhaphy</b> (anterior/posterior repair) for pelvic organ prolapse',
],
'medicine': [
'<b>Fitz-Hugh-Curtis syndrome</b>: RUQ pain (perihepatic adhesions) secondary to ascending PID — mimics cholecystitis',
'<b>Chandelier sign</b> (cervical motion tenderness) = PID',
'PSA + TRUS-guided biopsy for prostate cancer; <b>Gleason score</b> for grading',
'Transvaginal US — first-line for ovarian/uterine pathology',
],
},
{
'num': '9',
'name': 'Left Iliac Fossa (Left Groin / Left Inguinal Region)',
'anatomy': [
'Sigmoid colon and lower descending colon',
'Left ovary and left fallopian tube (females)',
'Left ureter (lower portion)',
'Left inguinal structures',
'Left psoas muscle (lower)',
],
'pathology': [
'<b>Diverticulitis</b> — "left-sided appendicitis"; older patients; LIF pain, fever, altered bowel habit',
'<b>Diverticular abscess / perforation</b> — peritonitis, pneumoperitoneum',
'<b>Sigmoid colon cancer</b> — change in bowel habit, PR bleeding, obstruction',
'<b>Ectopic pregnancy</b> (left)',
'<b>Ovarian pathology</b> (left) — cyst, torsion',
'<b>Left inguinal hernia</b>',
],
'pharmacology': [
'<b>Antibiotics for uncomplicated diverticulitis</b>: metronidazole + ciprofloxacin PO; IV co-amoxiclav or pip-taz if severe',
'Recent evidence (AVOD/DIABOLO trials): antibiotics may not be needed for uncomplicated acute diverticulitis',
'<b>FOLFOX / FOLFIRI + bevacizumab</b> for metastatic sigmoid colon cancer',
'<b>Osmotic laxatives</b> (lactulose, macrogol) and <b>stimulant laxatives</b> (senna) for constipation',
'<b>High-fibre diet</b> — prevents diverticular disease progression',
],
'surgery': [
'<b>Hartmann\'s procedure</b> — emergency sigmoid resection + end colostomy (Hinchey III/IV peritonitis)',
'<b>Laparoscopic sigmoid colectomy</b> — elective for recurrent/complicated diverticulitis',
'<b>Anterior resection</b> — for sigmoid/upper rectal cancer (± defunctioning ileostomy)',
'<b>Abdominoperineal resection (APR)</b> — for low rectal cancer where sphincter cannot be preserved',
],
'medicine': [
'<b>Hinchey classification</b> for perforated diverticulitis: I (pericolic abscess) → IV (faecal peritonitis)',
'CT abdomen/pelvis with IV contrast = investigation of choice for diverticulitis',
'Colonoscopy contraindicated in <b>acute</b> diverticulitis; perform 6–8 weeks after resolution',
'<b>Diverticular disease</b> (asymptomatic) vs. <b>diverticulitis</b> (infected/inflamed)',
],
},
]
section_colors = [
colors.HexColor('#1a237e'), # deep blue
colors.HexColor('#4a148c'), # deep purple
colors.HexColor('#006064'), # teal
colors.HexColor('#b71c1c'), # deep red
colors.HexColor('#1b5e20'), # deep green
colors.HexColor('#e65100'), # deep orange
colors.HexColor('#880e4f'), # deep pink
colors.HexColor('#37474f'), # dark slate
colors.HexColor('#4e342e'), # brown
]
sub_headers = ['Anatomy', 'Pathology', 'Pharmacology (POM)', 'Surgery', 'Medicine']
sub_keys = ['anatomy', 'pathology', 'pharmacology', 'surgery', 'medicine']
sub_colors = [
colors.HexColor('#1565c0'),
colors.HexColor('#6a1b9a'),
colors.HexColor('#00695c'),
colors.HexColor('#b71c1c'),
colors.HexColor('#2e7d32'),
]
for i, region in enumerate(regions):
col = section_colors[i]
# Region heading
h1_p = ParagraphStyle(f'H1_{i}', parent=h1_style, backColor=col)
story.append(Paragraph(f' Region {region["num"]}: {region["name"]}', h1_p))
story.append(sp(0.5))
for j, (key, label) in enumerate(zip(sub_keys, sub_headers)):
sub_col = sub_colors[j]
h2_p = ParagraphStyle(f'H2_{i}_{j}', parent=h2_style,
textColor=sub_col,
borderPad=4)
story.append(Paragraph(f'▶ {label}', h2_p))
for item in region[key]:
story.append(Paragraph(f'• {item}', bullet_style))
story.append(sp(0.5))
story.append(hr())
if i < len(regions) - 1 and i in [2, 5]:
story.append(PageBreak())
else:
story.append(sp())
# ── SUMMARY TABLE ──────────────────────────────────────────────────────────────
story.append(PageBreak())
story.append(Paragraph(' Summary Table — All 9 Abdominal Regions',
ParagraphStyle('H1Sum', parent=h1_style, backColor=colors.HexColor('#37474f'))))
story.append(sp())
table_data = [
['Region', 'Key Organs', 'Key Pathology', 'Key Surgery', 'Key Drug(s)'],
['R. Hypochondrium', 'Liver, Gallbladder', 'Cholecystitis, Hepatitis, HCC', 'Lap cholecystectomy, Hepatectomy', 'Ursodeoxycholic acid, Antivirals'],
['Epigastric', 'Stomach, Pancreas, Aorta', 'PUD, Pancreatitis, AAA', 'Whipple\'s, Gastrectomy, EVAR', 'PPIs, H. pylori triple therapy'],
['L. Hypochondrium', 'Spleen, Stomach fundus', 'Splenomegaly, Splenic rupture', 'Splenectomy, Distal pancreatectomy', 'Penicillin V, Hydroxyurea'],
['R. Flank', 'R. Kidney, Ascending colon', 'Renal colic, Pyelonephritis, RCC', 'Nephrectomy, Ureteroscopy, PCNL', 'NSAIDs, Tamsulosin, Ciprofloxacin'],
['Umbilical', 'Small bowel, Aorta', 'SBO, AAA, Mesenteric ischaemia', 'Laparotomy, EVAR, Adhesiolysis', 'IV fluids, Heparin, Statins'],
['L. Flank', 'L. Kidney, Descending colon', 'Renal colic, Colon cancer, PKD', 'Hemicolectomy, Nephrectomy', 'FOLFOX, Tolvaptan, Tamsulosin'],
['R. Iliac Fossa', 'Appendix, Caecum, R. Ovary', 'Appendicitis, Ectopic, Crohn\'s', 'Appendicectomy, Hernia repair', 'Cefuroxime + Metronidazole'],
['Pubic/Hypogastric', 'Bladder, Uterus, Prostate', 'PID, Cystitis, BPH, Bladder Ca', 'Cystectomy, TURP, Hysterectomy', 'Doxycycline, Tamsulosin, Nitrofurantoin'],
['L. Iliac Fossa', 'Sigmoid colon, L. Ovary', 'Diverticulitis, Sigmoid Ca, Ectopic', 'Hartmann\'s, Anterior resection', 'Metronidazole + Ciprofloxacin'],
]
col_widths = [3.2*cm, 3.8*cm, 4.2*cm, 4.2*cm, 3.6*cm]
tbl = Table(table_data, colWidths=col_widths, repeatRows=1)
tbl.setStyle(TableStyle([
# Header
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#37474f')),
('TEXTCOLOR', (0,0), (-1,0), colors.white),
('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
('FONTSIZE', (0,0), (-1,0), 8),
('ALIGN', (0,0), (-1,0), 'CENTER'),
('VALIGN', (0,0), (-1,-1), 'TOP'),
# Body
('FONTNAME', (0,1), (-1,-1), 'Helvetica'),
('FONTSIZE', (0,1), (-1,-1), 7.5),
('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#f5f5f5'), colors.white]),
('GRID', (0,0), (-1,-1), 0.4, colors.HexColor('#bdbdbd')),
('LEFTPADDING', (0,0), (-1,-1), 4),
('RIGHTPADDING', (0,0), (-1,-1), 4),
('TOPPADDING', (0,0), (-1,-1), 4),
('BOTTOMPADDING', (0,0), (-1,-1), 4),
# Color first column
('BACKGROUND', (0,1), (0,-1), colors.HexColor('#e3f2fd')),
('FONTNAME', (0,1), (0,-1), 'Helvetica-Bold'),
]))
story.append(tbl)
story.append(sp(2))
# ── FOOTER REFERENCES ──────────────────────────────────────────────────────────
story.append(HRFlowable(width='100%', thickness=1, color=colors.HexColor('#90a4ae'), spaceAfter=6))
story.append(Paragraph('<b>References / Sources</b>', h2_style))
refs = [
"Gray's Anatomy for Students — Nine-region pattern, Block 2 (p. 336)",
"Bailey and Love's Short Practice of Surgery, 28th Edition — Figure 63.2",
"Tintinalli's Emergency Medicine — Abdominal pain, Appendicitis, Peptic Ulcer Disease",
"Rosen's Emergency Medicine — Abdominal quadrant pain differential diagnosis",
"Sleisenger & Fordtran's Gastrointestinal and Liver Disease — Pancreatitis, Diverticulitis",
"Yamada's Textbook of Gastroenterology, 7th Edition — Clinical features of peptic ulcer disease",
"Smith & Tanagho's General Urology, 19th Edition — Renal and ureteric pain",
"Sabiston Textbook of Surgery — Surgical management of abdominal conditions",
]
for ref in refs:
story.append(Paragraph(f'• {ref}', bullet_style))
doc.build(story)
print('PDF created:', OUTPUT)
python3 /home/daytona/workspace/9-abdominal-regions/generate_pdf.py
9 Abdominal Regions
PDF Document · PDF