attachment
attachment

answer ut according to uhs standard pattern of the mbbs final yr

Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Finding Sources
Reading File
Reading File
Reading File
Reading File
Searching Images

gastric volvulus organoaxial mesenteroaxial diagram

The image consists of a two-part educational composite illustrating organoaxial gastric volvulus. The left panel is a pathophysiology diagram depicting the mechanism of rotation: the stomach rotates along its longitudinal axis (the line connecting the gastroesophageal junction and the pylorus), indicated by a blue arrow. Below the rotation diagram, a second illustration shows the resulting massive gastric distention. The right panel is a coronal CT scan of the abdomen confirming these clinical findings. The CT demonstrates a grossly distended stomach occupying a significant portion of the abdominal cavity, containing mixed air and fluid levels, characteristic of a gastric outlet obstruction. Additionally, the CT reveals hyperdense intraperitoneal fluid within the paracolic gutters and pelvic recesses, highly suggestive of hemoperitoneum. This combination of findings highlights the risk of vascular compromise or splenic ligamentous traction associated with organoaxial torsion. The content is suitable for medical education regarding surgical emergencies and gastrointestinal radiology.

The image consists of a two-part educational composite illustrating organoaxial gastric volvulus. The left panel is a pathophysiology diagram depicting the mechanism of rotation: the stomach rotates along its longitudinal axis (the line connecting the gastroesophageal junction and the pylorus), indicated by a blue arrow. Below the rotation diagram, a second illustration shows the resulting massive gastric distention. The right panel is a coronal CT scan of the abdomen confirming these clinical findings. The CT demonstrates a grossly distended stomach occupying a significant portion of the abdominal cavity, containing mixed air and fluid levels, characteristic of a gastric outlet obstruction. Additionally, the CT reveals hyperdense intraperitoneal fluid within the paracolic gutters and pelvic recesses, highly suggestive of hemoperitoneum. This combination of findings highlights the risk of vascular compromise or splenic ligamentous traction associated with organoaxial torsion. The content is suitable for medical education regarding surgical emergencies and gastrointestinal radiology.

**Imaging Modality:** Fluoroscopic contrast study (Upper Gastrointestinal Series).

**Anatomical Region:** Upper abdomen and lower thorax, focusing on the esophagus and stomach.

**Observed Pathology:** Organoaxial gastric volvulus associated with a large hiatal hernia.

**Characteristic Visual Features:**
The image demonstrates a significant portion of the stomach herniated into the thoracic cavity. There is a characteristic rotation of the stomach along its longitudinal axis (the cardiopyloric line). The greater curvature is positioned superiorly to the lesser curvature, creating an "upside-down stomach" appearance. Contrast flow shows tapering and torsion at the point of rotation, with an abnormal horizontal orientation of the gastric body. The esophagus appears slightly dilated proximal to the herniation.

**Diagnostic Differentiating Features:**
The hallmark of organoaxial volvulus is the rotation around the long axis, distinguishing it from mesenteroaxial volvulus, which involves rotation around the short axis (mesentery). The presence of the stomach within the mediastinum confirms a paraesophageal or large sliding hiatal hernia as the predisposing anatomical defect. Such findings are critical for diagnosing acute or chronic gastric torsion and subsequent gastric outlet obstruction.

**Imaging Modality:** Fluoroscopic contrast study (Upper Gastrointestinal Series). **Anatomical Region:** Upper abdomen and lower thorax, focusing on the esophagus and stomach. **Observed Pathology:** Organoaxial gastric volvulus associated with a large hiatal hernia. **Characteristic Visual Features:** The image demonstrates a significant portion of the stomach herniated into the thoracic cavity. There is a characteristic rotation of the stomach along its longitudinal axis (the cardiopyloric line). The greater curvature is positioned superiorly to the lesser curvature, creating an "upside-down stomach" appearance. Contrast flow shows tapering and torsion at the point of rotation, with an abnormal horizontal orientation of the gastric body. The esophagus appears slightly dilated proximal to the herniation. **Diagnostic Differentiating Features:** The hallmark of organoaxial volvulus is the rotation around the long axis, distinguishing it from mesenteroaxial volvulus, which involves rotation around the short axis (mesentery). The presence of the stomach within the mediastinum confirms a paraesophageal or large sliding hiatal hernia as the predisposing anatomical defect. Such findings are critical for diagnosing acute or chronic gastric torsion and subsequent gastric outlet obstruction.

This diagnostic image is an upper gastrointestinal (GI) series using fluoroscopic radiography, demonstrating a case of gastric volvulus. The radiograph shows a nasogastric (NG) tube coursing down the esophagus and into the stomach, delivering water-soluble contrast media. Key clinical findings include a significantly distended stomach with the gastric antrum displaced superiorly into the supradiaphragmatic position, indicating an organoaxial or mesenteroaxial rotation. While the contrast fills the herniated antrum, there is a visible absence of contrast passage into the duodenum, characteristic of a high-grade obstruction or volvulus. The thoracic cavity shows a large gas-filled viscus consistent with a paraesophageal hiatal hernia. This image is an educational example of acute gastric volvulus presenting as a surgical emergency, illustrating the classic radiographic signs of abnormal gastric orientation and outflow obstruction within the mediastinum.

This diagnostic image is an upper gastrointestinal (GI) series using fluoroscopic radiography, demonstrating a case of gastric volvulus. The radiograph shows a nasogastric (NG) tube coursing down the esophagus and into the stomach, delivering water-soluble contrast media. Key clinical findings include a significantly distended stomach with the gastric antrum displaced superiorly into the supradiaphragmatic position, indicating an organoaxial or mesenteroaxial rotation. While the contrast fills the herniated antrum, there is a visible absence of contrast passage into the duodenum, characteristic of a high-grade obstruction or volvulus. The thoracic cavity shows a large gas-filled viscus consistent with a paraesophageal hiatal hernia. This image is an educational example of acute gastric volvulus presenting as a surgical emergency, illustrating the classic radiographic signs of abnormal gastric orientation and outflow obstruction within the mediastinum.

Searching Images

perforated peptic ulcer pneumoperitoneum X-ray free air under diaphragm

This diagnostic image is an upright plain chest/abdominal X-ray demonstrating a classic sign of pneumoperitoneum. The radiograph clearly shows crescent-shaped radiolucent areas of free air located immediately beneath both the right and left domes of the diaphragm, often referred to as 'free air under the diaphragm'. The diaphragm appears as a thin, curvilinear radio-opaque line separating the pleural cavity from the abdominal cavity. The right hemidiaphragm is elevated by the gas collection, which is positioned between the liver and the diaphragm. The mediastinal shadow, rib cage, and spine are visible, providing anatomical context. This finding is highly indicative of a hollow viscus perforation, such as a perforated peptic ulcer. The image serves as a critical educational example for surgical triage and radiological identification of gastrointestinal emergencies in pediatric or adult populations.

This diagnostic image is an upright plain chest/abdominal X-ray demonstrating a classic sign of pneumoperitoneum. The radiograph clearly shows crescent-shaped radiolucent areas of free air located immediately beneath both the right and left domes of the diaphragm, often referred to as 'free air under the diaphragm'. The diaphragm appears as a thin, curvilinear radio-opaque line separating the pleural cavity from the abdominal cavity. The right hemidiaphragm is elevated by the gas collection, which is positioned between the liver and the diaphragm. The mediastinal shadow, rib cage, and spine are visible, providing anatomical context. This finding is highly indicative of a hollow viscus perforation, such as a perforated peptic ulcer. The image serves as a critical educational example for surgical triage and radiological identification of gastrointestinal emergencies in pediatric or adult populations.

A semi-upright anteroposterior (AP) chest X-ray demonstrating a large pneumoperitoneum. The primary diagnostic finding is a crescent-shaped radiolucency (free air) located subdiaphragmatically under the right dome of the diaphragm, highlighted by a red arrow. This free air clearly silhouettes the superior margin of the diaphragm and separates it from the underlying liver shadow. The left hemidiaphragm is also visible, with underlying gastric bubble and potentially additional free gas. The lung fields are relatively clear without focal consolidation or pleural effusion. The cardiac silhouette is within normal limits for this projection, though the AP view limits precise assessment of cardiothoracic ratio. Bony structures including the ribs and clavicles appear intact. This classic radiographic sign, known as the cupola sign or subdiaphragmatic free air, is a surgical emergency highly suggestive of a perforated viscus (e.g., perforated peptic ulcer or diverticulitis).

A semi-upright anteroposterior (AP) chest X-ray demonstrating a large pneumoperitoneum. The primary diagnostic finding is a crescent-shaped radiolucency (free air) located subdiaphragmatically under the right dome of the diaphragm, highlighted by a red arrow. This free air clearly silhouettes the superior margin of the diaphragm and separates it from the underlying liver shadow. The left hemidiaphragm is also visible, with underlying gastric bubble and potentially additional free gas. The lung fields are relatively clear without focal consolidation or pleural effusion. The cardiac silhouette is within normal limits for this projection, though the AP view limits precise assessment of cardiothoracic ratio. Bony structures including the ribs and clavicles appear intact. This classic radiographic sign, known as the cupola sign or subdiaphragmatic free air, is a surgical emergency highly suggestive of a perforated viscus (e.g., perforated peptic ulcer or diverticulitis).

This diagnostic image is an upright abdominal X-ray (radiography) focusing on the upper abdominal region. The primary clinical finding is a prominent crescent-shaped area of increased radiolucency (darkness) located directly beneath the diaphragm, as indicated by the pink arrow. This radiographic sign, known as pneumoperitoneum, represents free intraperitoneal air, which in this clinical context is suggestive of a perforated hollow viscus, such as a peptic ulcer or duodenal perforation. The vertebral column is visible centrally, and the bowel gas pattern shows mottled soft tissue and gas densities. A large, well-defined convex opacity in the lower abdomen suggests the presence of a gravid uterus or a significant intra-abdominal mass, consistent with the patient's late-term pregnancy mentioned in the clinical context. The image serves as a critical educational example of 'free air under the diaphragm,' a surgical emergency requiring immediate intervention such as laparotomy.

This diagnostic image is an upright abdominal X-ray (radiography) focusing on the upper abdominal region. The primary clinical finding is a prominent crescent-shaped area of increased radiolucency (darkness) located directly beneath the diaphragm, as indicated by the pink arrow. This radiographic sign, known as pneumoperitoneum, represents free intraperitoneal air, which in this clinical context is suggestive of a perforated hollow viscus, such as a peptic ulcer or duodenal perforation. The vertebral column is visible centrally, and the bowel gas pattern shows mottled soft tissue and gas densities. A large, well-defined convex opacity in the lower abdomen suggests the presence of a gravid uterus or a significant intra-abdominal mass, consistent with the patient's late-term pregnancy mentioned in the clinical context. The image serves as a critical educational example of 'free air under the diaphragm,' a surgical emergency requiring immediate intervention such as laparotomy.

Now I have comprehensive information. Let me compile the full UHS MBBS Final Year standard answer.

GASTRIC VOLVULUS AND PERFORATION

UHS MBBS Final Year - Surgery


PART 1: GASTRIC VOLVULUS

Definition

Gastric volvulus is a rare but potentially life-threatening condition in which the stomach abnormally rotates more than 180° on its own axis, leading to obstruction, strangulation, ischemia, and infarction.
(Yamada's Textbook of Gastroenterology)

Classification (Singleton's Classification)

TypeAxis of RotationFrequencyFeatures
Type I - OrganoaxialLong longitudinal axis (GEJ to pylorus)59%Stomach flips anteriorly; closed-loop obstruction; strangulation in 28%
Type II - MesenteroaxialShort transgastric axis (lesser to greater curvature)29%Stomach folds on itself; usually incomplete and intermittent; infarction uncommon
Type III - Combined/UnclassifiedBoth axes12%Seen in chronic cases
Organoaxial and Mesenteroaxial Gastric Volvulus
Left: Pathophysiology diagram showing organoaxial rotation. Right: CT showing grossly distended stomach.

Etiology

Primary Gastric Volvulus - Abnormalities or laxity of gastric ligaments:
  • Gastrocolic ligament
  • Gastrohepatic ligament
  • Gastrosplenic ligament
  • Gastrophrenic ligament
Secondary Gastric Volvulus - Due to anatomic abnormalities:
  • Most common: Paraesophageal hernia (adults)
  • Congenital diaphragmatic defects - Foramen of Bochdalek, diaphragmatic eventration (children <1 year)
  • Prior gastric surgery, neoplasia, connective tissue disorders
Epidemiology: Peak in 6th decade; men = women equally. In children, congenital defects account for 10-20% of cases.
(Sabiston Textbook of Surgery; Yamada's Gastroenterology)

Clinical Presentation

A) Acute Gastric Volvulus

Borchardt's Triad (present in ~70% of acute cases):
  1. Acute-onset severe epigastric/substernal pain (may radiate to neck and shoulders - mimics MI)
  2. Violent retching with limited/no vomiting (dry heaving - due to closed-loop obstruction)
  3. Inability to pass a nasogastric (NG) tube into the stomach
Other features:
  • Acute distress; upper abdominal distension and tenderness
  • Signs of gastric ischemia: hematemesis (ominous sign), tachycardia, hypotension
  • May progress to hypovolemic shock and multi-organ failure

B) Chronic Gastric Volvulus

  • Intermittent, vague upper abdominal symptoms
  • Pyrosis, early satiety, bloating, shortness of breath, episodes of burping
  • Symptoms exacerbated by large meals; vomiting may relieve discomfort
  • Often diagnosed incidentally or after workup for PUD, MI, or cholecystitis
  • Mortality <13%
(Yamada's Textbook of Gastroenterology; Sabiston Textbook of Surgery)

Diagnosis

Plain X-ray (Chest + Abdomen):

  • Spherical gas-filled viscus in the chest or upper abdomen (retrocardiac position)
  • Air-fluid level within
  • Paucity of air in the rest of the GI tract
  • In mesenteroaxial: stomach appears spherical on supine films
  • "Upside-down stomach" appearance
Organoaxial volvulus on fluoroscopic upper GI series - upside-down stomach
Fluoroscopic UGI series: Organoaxial volvulus with paraesophageal hernia - note the upside-down stomach appearance with greater curvature superior to lesser curvature.

CT Scan (investigation of choice):

  • Dilated, distended stomach
  • Swirl sign of esophagus and stomach (pathognomonic)
  • Pneumatosis (gastric wall air) - indicates necrosis
  • Free air - indicates perforation
  • Associated anatomic defects (e.g., paraesophageal hernia)
  • Can exclude other causes of abdominal pain

Barium/Water-Soluble Contrast Study:

  • Shows characteristic "beaking" or torsion at the point of rotation
  • Absence of contrast passage into duodenum
(Sabiston Textbook of Surgery; Yamada's Textbook of Gastroenterology)

Surgical Management

Initial Resuscitation (all patients):

  • IV fluids + electrolyte correction
  • Analgesics and antiemetics
  • Attempted NG tube decompression (can spontaneously detorse the stomach)
  • If NG placement fails: Endoscopic decompression (limit insufflation, evaluate mucosa for ischemia, place NG tube)

Indications for Immediate Surgery:

  • Failed NG/endoscopic decompression
  • Gastric perforation
  • Severe sepsis or refractory hypotension
  • Signs of gastric ischemia/necrosis

Operative Management:

Unstable Patient:
  • Urgent open laparotomy
  • Detorse the stomach and assess viability
  • Resect ischemic areas
  • If entire stomach necrotic: Total gastrectomy + jejunostomy + esophagostomy, with elective reconstruction later
Stable Patient (acceptable surgical risk):
ConditionProcedure
Primary volvulusSuture gastropexy to anterior abdominal wall ± gastrostomy tube (open or laparoscopic)
Secondary volvulus (paraesophageal hernia)Repair of diaphragmatic defect + reduction of hernia sac + mobilization of distal esophagus + fundoplication
High Surgical Risk Patient:
  • Endoscopic detorsion + Percutaneous Endoscopic Gastrostomy (PEG) tube placement (two PEG tubes to prevent re-rotation)
  • PEG can also serve as temporizing measure before definitive repair
(Sabiston Textbook of Surgery)


PART 2: GASTRIC PERFORATION

Definition

Gastric perforation is a full-thickness breach of the gastric wall allowing gastric contents to enter the peritoneal cavity, most commonly due to peptic ulcer disease.

Causes (Etiology)

CategoryCauses
Peptic ulcer (most common)Duodenal ulcer (DU) > Gastric ulcer (GU); H. pylori, NSAIDs
Malignancy~6% of perforated GUs are malignant (gastric carcinoma)
TraumaBlunt/penetrating abdominal trauma
IatrogenicEndoscopy, NG tube insertion
Foreign bodyIngested sharp objects
VolvulusAs a complication of gastric volvulus
CorrosivesAcid/alkali ingestion
Stress ulcersBurns (Curling's ulcer), head injury (Cushing's ulcer)
Note: GU accounts for ~20% of all perforated peptic ulcers. Rising proportion in elderly NSAID users.

Clinical Presentation

Symptoms:

  • Sudden onset severe epigastric pain (knife-like, agonizing) - the classic presentation
  • Pain rapidly becomes generalized as peritonitis develops
  • Nausea, vomiting
  • History of PUD, NSAID/steroid use, or smoking

Signs:

  • Patient lies still (peritonism worsens with movement)
  • Board-like rigidity of abdomen (generalized peritonitis)
  • Guarding and rebound tenderness
  • Absent bowel sounds (paralytic ileus)
  • Obliteration of liver dullness on percussion (due to free air)
  • Tachycardia, fever
  • Later: Signs of septic shock

Three Stages (progression):

  1. Chemical peritonitis (0-6 hours): Gastric juice spillage, localized pain
  2. Relative improvement (6-12 hours): As chemical stimulus dilutes
  3. Bacterial peritonitis (>12 hours): Frank sepsis, deterioration

Diagnosis

Investigations:

1. Erect Chest X-ray / Upright Abdominal X-ray:
  • Free air (pneumoperitoneum) under the diaphragm - present in 70-80% of cases
  • Crescent-shaped radiolucency between liver and right dome of diaphragm (cupola sign)
Pneumoperitoneum - free air under diaphragm on erect chest X-ray
Erect chest X-ray showing crescent-shaped free air under both domes of the diaphragm - classic sign of hollow viscus perforation.
2. CT Scan of Abdomen (most sensitive):
  • Free intraperitoneal air
  • Peritoneal fluid
  • Localizes site of perforation
  • Identifies associated pathology
3. Serum/Lab:
  • Leukocytosis (WBC >10,000)
  • Raised serum amylase (chemical peritonitis can raise amylase)
  • Raised serum creatinine (if septic)
  • ABG: Metabolic acidosis in advanced sepsis
4. Diagnostic Peritoneal Lavage: Rarely used now; replaced by CT
5. Diagnostic Laparoscopy: Can be both diagnostic and therapeutic

Surgical Management

Pre-operative Resuscitation (PULP Protocol):

  • IV fluids (goal-directed fluid therapy)
  • IV broad-spectrum antibiotics
  • NG tube (double-barreled) insertion
  • Urinary catheter
  • IV Proton Pump Inhibitor (PPI)
  • Correction of electrolyte abnormalities
  • Surgery within 6 hours - mortality 17% with strict protocol vs 27% without
Boey Score (adverse prognostic factors):
  1. Preoperative shock
  2. Major medical illness (ASA >1)
  3. Perforation > 12 hours
PULP Score variables: Age >65, malignancy, cirrhosis, steroid use, perforation >24 hrs, shock, raised creatinine, ASA >1. (AUROC 0.83 for predicting mortality)

Operative Options:

A) For Perforated Duodenal Ulcer (DU) / Juxta-pyloric Ulcer:
ProcedureIndication
Simple closure + Omental (Graham) patchMost perforations; small to moderate size
Laparoscopic repairStable patients, small perforations (<10 mm); non-inferior to open (OR for septic complications 0.66)
Open laparotomyDelayed presentation, shock, significant comorbidities, large perforations (>10 mm)
Post-repair (H. pylori positive): H. pylori eradication after patch repair reduces ulcer relapse from 38.1% to 4.8% at 1 year.
B) For Perforated Gastric Ulcer (GU):
Perforation SiteProcedure
Small, prepyloricSimple closure with omental patch
Angular notch (lesser curvature)Antrectomy + lesser curve ulcer excision + Billroth I or II reconstruction
Large perforation / suspected malignancyGastric resection (distal gastrectomy)
Note: ~6% of perforated GUs are malignant - always send biopsy if possible.
C) Non-operative Management (rarely practiced, specific cases):
  • NG suction, parenteral antibiotics, IV fluids
  • Only if: sealing confirmed on contrast study, clinically stable
  • Risk: Cannot exclude malignancy; elderly tolerate sepsis poorly; delay worsens outcomes

Complications of Gastric Perforation:

Early:
  • Septic shock
  • Peritonitis
  • Intra-abdominal abscess
Late:
  • Persistent leak / re-operation (17% in Danish series)
  • Adhesive intestinal obstruction
  • Malnutrition
Mortality: 90-day mortality ~25.5% in large series (Denmark, 2011-2013)
(Sleisenger and Fordtran's Gastrointestinal and Liver Disease; Sabiston Textbook of Surgery)

SUMMARY TABLE

FeatureGastric VolvulusGastric Perforation
Classic triadBorchardt's triadSudden-onset epigastric pain + peritonitis
Key investigationCT scan (swirl sign)Erect CXR (free air under diaphragm)
Emergency managementNG decompressionIV fluids, antibiotics, NG tube
Definitive surgeryGastropexy / hernia repairGraham patch / antrectomy
Post-opPEG if high riskH. pylori eradication

Key exam points: Borchardt's triad for volvulus; Boey score for perforation prognosis; Graham omental patch for DU perforation; antrectomy for angular notch GU; always consider malignancy in perforated GU; H. pylori eradication after repair to prevent recurrence.

make a pdf of above answer precise

Reading File
Running Command

ls -la /tmp/workspace/ 2>/dev/null || mkdir -p /tmp/workspace && echo "created"

Running Command

mkdir -p /tmp/workspace/gastric-surgery && cat > /tmp/workspace/gastric-surgery/make_pdf.py << 'PYEOF' from reportlab.lib.pagesizes import A4 from reportlab.lib import colors from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.units import cm, mm from reportlab.platypus import (SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, HRFlowable, KeepTogether) from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY from reportlab.platypus import PageBreak OUTPUT = "/tmp/workspace/gastric-surgery/Gastric_Volvulus_Perforation_UHS.pdf" doc = SimpleDocTemplate( OUTPUT, pagesize=A4, leftMargin=2*cm, rightMargin=2*cm, topMargin=2*cm, bottomMargin=2*cm, title="Gastric Volvulus & Perforation - UHS MBBS Final Year", author="Orris Medical" ) # ── Colour palette ────────────────────────────────────────────────────────── DARK_BLUE = colors.HexColor("#1a3a5c") MED_BLUE = colors.HexColor("#2563a8") LIGHT_BLUE = colors.HexColor("#dbeafe") ACCENT_RED = colors.HexColor("#b91c1c") ACCENT_YEL = colors.HexColor("#fef9c3") HEADER_BG = colors.HexColor("#1e3a5f") TABLE_HDR = colors.HexColor("#2563a8") TABLE_ALT = colors.HexColor("#f0f6ff") WHITE = colors.white LIGHT_GRAY = colors.HexColor("#f8f9fa") DARK_GRAY = colors.HexColor("#374151") styles = getSampleStyleSheet() # ── Custom styles ──────────────────────────────────────────────────────────── def S(name, **kw): return ParagraphStyle(name, **kw) title_style = S("MainTitle", fontSize=18, textColor=WHITE, fontName="Helvetica-Bold", alignment=TA_CENTER, spaceAfter=4, leading=22) subtitle_style = S("SubTitle", fontSize=11, textColor=colors.HexColor("#bfdbfe"), fontName="Helvetica", alignment=TA_CENTER, spaceAfter=2) part_style = S("PartHeader", fontSize=14, textColor=WHITE, fontName="Helvetica-Bold", alignment=TA_CENTER, spaceAfter=2, spaceBefore=4, leading=18) h1 = S("H1", fontSize=12, textColor=DARK_BLUE, fontName="Helvetica-Bold", spaceBefore=10, spaceAfter=4, leading=15, borderPad=4, leftIndent=0) h2 = S("H2", fontSize=10.5, textColor=MED_BLUE, fontName="Helvetica-Bold", spaceBefore=6, spaceAfter=3, leading=13) body = S("Body", fontSize=9.5, textColor=DARK_GRAY, fontName="Helvetica", spaceBefore=2, spaceAfter=2, leading=13, alignment=TA_JUSTIFY) bullet = S("Bullet", fontSize=9.5, textColor=DARK_GRAY, fontName="Helvetica", spaceBefore=1, spaceAfter=1, leading=12, leftIndent=14, firstLineIndent=-10) note_style = S("Note", fontSize=9, textColor=colors.HexColor("#1e3a5f"), fontName="Helvetica-BoldOblique", spaceBefore=3, spaceAfter=3, leading=12, backColor=ACCENT_YEL, borderPad=5, leftIndent=6) keybox = S("KeyBox", fontSize=9, textColor=colors.HexColor("#7f1d1d"), fontName="Helvetica-Bold", spaceBefore=2, spaceAfter=2, leading=12, backColor=colors.HexColor("#fee2e2"), borderPad=5, leftIndent=6) small = S("Small", fontSize=8.5, textColor=colors.HexColor("#6b7280"), fontName="Helvetica", spaceBefore=1, spaceAfter=1, leading=11) # ── Helpers ────────────────────────────────────────────────────────────────── def hr(color=MED_BLUE, w=1): return HRFlowable(width="100%", thickness=w, color=color, spaceAfter=4, spaceBefore=2) def title_banner(text, sub=""): banner_data = [[Paragraph(text, title_style)]] if sub: banner_data.append([Paragraph(sub, subtitle_style)]) t = Table(banner_data, colWidths=["100%"]) t.setStyle(TableStyle([ ("BACKGROUND", (0,0), (-1,-1), HEADER_BG), ("ROUNDEDCORNERS", [6]), ("TOPPADDING", (0,0), (-1,-1), 10), ("BOTTOMPADDING", (0,0), (-1,-1), 10), ("LEFTPADDING", (0,0), (-1,-1), 8), ("RIGHTPADDING", (0,0), (-1,-1), 8), ])) return t def part_banner(text): t = Table([[Paragraph(text, part_style)]], colWidths=["100%"]) t.setStyle(TableStyle([ ("BACKGROUND", (0,0), (-1,-1), MED_BLUE), ("TOPPADDING", (0,0), (-1,-1), 6), ("BOTTOMPADDING", (0,0), (-1,-1), 6), ("LEFTPADDING", (0,0), (-1,-1), 8), ("RIGHTPADDING", (0,0), (-1,-1), 8), ])) return t def make_table(headers, rows, col_widths=None): """Build a styled table.""" hdr_style = ParagraphStyle("TH", fontSize=9, textColor=WHITE, fontName="Helvetica-Bold", alignment=TA_CENTER, leading=11, spaceAfter=0, spaceBefore=0) cell_style = ParagraphStyle("TD", fontSize=9, textColor=DARK_GRAY, fontName="Helvetica", alignment=TA_LEFT, leading=11, spaceAfter=0, spaceBefore=0) header_row = [Paragraph(h, hdr_style) for h in headers] data = [header_row] for i, row in enumerate(rows): data.append([Paragraph(str(c), cell_style) for c in row]) avail = 17*cm # usable width if col_widths is None: w = avail / len(headers) col_widths = [w]*len(headers) t = Table(data, colWidths=col_widths, repeatRows=1) style_cmds = [ ("BACKGROUND", (0,0), (-1,0), TABLE_HDR), ("TEXTCOLOR", (0,0), (-1,0), WHITE), ("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"), ("FONTSIZE", (0,0), (-1,-1), 9), ("GRID", (0,0), (-1,-1), 0.4, colors.HexColor("#94a3b8")), ("VALIGN", (0,0), (-1,-1), "TOP"), ("TOPPADDING", (0,0), (-1,-1), 4), ("BOTTOMPADDING",(0,0), (-1,-1), 4), ("LEFTPADDING", (0,0), (-1,-1), 5), ("RIGHTPADDING", (0,0), (-1,-1), 5), ] for i in range(1, len(data)): bg = TABLE_ALT if i % 2 == 0 else WHITE style_cmds.append(("BACKGROUND", (0,i), (-1,i), bg)) t.setStyle(TableStyle(style_cmds)) return t def b(text): return Paragraph(f"<b>•</b> {text}", bullet) def bb(label, text): return Paragraph(f"<b>• {label}:</b> {text}", bullet) # ═══════════════════════════════════════════════════════════════════════════ # BUILD STORY # ═══════════════════════════════════════════════════════════════════════════ story = [] # ── TITLE ──────────────────────────────────────────────────────────────────── story.append(title_banner( "GASTRIC VOLVULUS &amp; PERFORATION", "UHS MBBS Final Year | Surgery | Standard Answer Pattern" )) story.append(Spacer(1, 6)) # ══════════════════════════════════════════════════════════════════════════════ # PART 1 — GASTRIC VOLVULUS # ══════════════════════════════════════════════════════════════════════════════ story.append(part_banner("PART 1: GASTRIC VOLVULUS")) story.append(Spacer(1, 4)) # Definition story.append(Paragraph("1. DEFINITION", h1)) story.append(hr()) story.append(Paragraph( "Gastric volvulus is a rare but life-threatening condition in which the stomach " "rotates <b>more than 180° on its own axis</b>, leading to obstruction, strangulation, " "ischemia, and infarction - either intra-abdominally or intrathoracically. " "First described by Berti (1866); first surgical treatment 1897.", body)) story.append(Spacer(1, 4)) # Classification story.append(Paragraph("2. CLASSIFICATION (Singleton's)", h1)) story.append(hr()) cls_table = make_table( ["Type", "Axis of Rotation", "Freq.", "Key Features"], [ ["Type I\nOrganoaxial", "Long longitudinal axis\n(GEJ → Pylorus)", "59%", "Stomach flips anteriorly; closed-loop obstruction; strangulation in 28%"], ["Type II\nMesenteroaxial", "Short transgastric axis\n(lesser ↔ greater curvature)", "29%", "Stomach folds on itself; usually incomplete & intermittent; infarction uncommon"], ["Type III\nCombined", "Both axes", "12%", "Usually chronic cases"], ], col_widths=[3.2*cm, 4.2*cm, 1.5*cm, 8.1*cm] ) story.append(cls_table) story.append(Spacer(1, 4)) # Etiology story.append(Paragraph("3. ETIOLOGY", h1)) story.append(hr()) story.append(Paragraph("<b>A) Primary</b> - Laxity/abnormality of gastric ligaments:", h2)) story.append(b("Gastrocolic, gastrohepatic, gastrosplenic, gastrophrenic ligaments")) story.append(Paragraph("<b>B) Secondary</b> - Due to anatomic defects:", h2)) story.append(bb("Most common (adults)", "Paraesophageal hernia")) story.append(bb("Children (&lt;1 yr)", "Congenital diaphragmatic defects (Foramen of Bochdalek, diaphragmatic eventration) - 10-20% of pediatric cases")) story.append(bb("Others", "Prior gastric surgery, neoplasia, connective tissue disorders")) story.append(Paragraph( "<b>Epidemiology:</b> Peak incidence in the 6th decade; men = women equally.", note_style)) story.append(Spacer(1, 4)) # Clinical Presentation story.append(Paragraph("4. CLINICAL PRESENTATION", h1)) story.append(hr()) story.append(Paragraph("<b>A) ACUTE GASTRIC VOLVULUS</b>", h2)) story.append(Paragraph( "<b>Borchardt's Triad</b> (present in ~70% of acute cases):", body)) tri_table = make_table( ["No.", "Feature", "Explanation"], [ ["1", "Acute-onset severe epigastric / substernal pain", "Radiates to neck & shoulders; mimics MI"], ["2", "Violent retching with minimal/no vomiting", "Dry heaving due to closed-loop obstruction"], ["3", "Inability to pass NG tube into stomach", "Indicates complete volvulus"], ], col_widths=[1.2*cm, 7.5*cm, 8.3*cm] ) story.append(tri_table) story.append(Spacer(1, 3)) story.append(b("Upper abdominal distension and tenderness")) story.append(b("Hematemesis = ominous sign of mucosal ischemia; may progress to hypovolemic shock")) story.append(b("Multi-organ failure in advanced cases")) story.append(Spacer(1, 4)) story.append(Paragraph("<b>B) CHRONIC GASTRIC VOLVULUS</b>", h2)) story.append(b("Intermittent vague upper abdominal symptoms for years")) story.append(b("Pyrosis, early satiety, bloating, shortness of breath, burping")) story.append(b("Symptoms worsen with large meals; vomiting may relieve discomfort")) story.append(b("Often diagnosed incidentally or during workup for PUD / MI / cholecystitis")) story.append(Paragraph("<b>Mortality:</b> &lt;13% in chronic form vs 15-20% in acute form.", note_style)) story.append(Spacer(1, 4)) # Diagnosis story.append(Paragraph("5. DIAGNOSIS", h1)) story.append(hr()) story.append(Paragraph("<b>A) Plain X-ray (Erect Chest + Abdomen):</b>", h2)) story.append(b("Spherical gas-filled viscus in chest or upper abdomen (retrocardiac position)")) story.append(b("Air-fluid level within the viscus")) story.append(b("Paucity of air in rest of GI tract")) story.append(b('"Upside-down stomach" - greater curvature above lesser curvature')) story.append(b("In mesenteroaxial: spherical stomach on supine film")) story.append(Paragraph("<b>B) CT Scan (Investigation of Choice):</b>", h2)) story.append(b("<b>Swirl sign</b> of esophagus and stomach (pathognomonic)")) story.append(b("Dilated, distended stomach")) story.append(b("Pneumatosis (gastric wall air) = necrosis; Free air = perforation")) story.append(b("Identifies associated defects (paraesophageal hernia)")) story.append(b("Excludes other diagnoses")) story.append(Paragraph("<b>C) Contrast Study (Barium/Water-Soluble):</b>", h2)) story.append(b('"Beaking" / torsion at rotation point; no passage of contrast into duodenum')) story.append(Spacer(1, 4)) # Surgical Management - Volvulus story.append(Paragraph("6. SURGICAL MANAGEMENT", h1)) story.append(hr()) story.append(Paragraph("<b>Step 1 - Initial Resuscitation (ALL patients):</b>", h2)) story.append(b("IV fluids + electrolyte correction")) story.append(b("Analgesics and antiemetics")) story.append(b("Attempted NG tube decompression (may spontaneously detorse)")) story.append(b("If NG fails: Endoscopic decompression (limit insufflation, assess mucosa, place NG)")) story.append(Spacer(1, 3)) story.append(Paragraph("<b>Step 2 - Indications for Immediate Surgery:</b>", h2)) story.append(b("Failed NG / endoscopic decompression")) story.append(b("Gastric perforation")) story.append(b("Severe sepsis or refractory hypotension")) story.append(b("Signs of gastric ischemia / necrosis")) story.append(Spacer(1, 3)) story.append(Paragraph("<b>Step 3 - Operative Management:</b>", h2)) op_table = make_table( ["Patient Status", "Approach", "Procedure"], [ ["Unstable", "Urgent open laparotomy", "Detorse stomach → assess viability → resect ischemic areas\nIf entire stomach necrotic: total gastrectomy + jejunostomy + esophagostomy (reconstruction later)"], ["Stable - Primary volvulus", "Open or laparoscopic", "Suture gastropexy to anterior abdominal wall ± gastrostomy tube"], ["Stable - Secondary (PEH)", "Open or laparoscopic", "Repair paraesophageal hernia + reduce hernia sac + mobilize distal esophagus + fundoplication"], ["High surgical risk", "Endoscopic", "Endoscopic detorsion + 2 PEG tubes for fixation (prevents re-rotation)"], ], col_widths=[3.5*cm, 4.5*cm, 9*cm] ) story.append(op_table) story.append(Spacer(1, 6)) # ══════════════════════════════════════════════════════════════════════════════ # PAGE BREAK before Part 2 # ══════════════════════════════════════════════════════════════════════════════ story.append(PageBreak()) # ══════════════════════════════════════════════════════════════════════════════ # PART 2 — GASTRIC PERFORATION # ══════════════════════════════════════════════════════════════════════════════ story.append(part_banner("PART 2: GASTRIC PERFORATION")) story.append(Spacer(1, 4)) # Definition story.append(Paragraph("1. DEFINITION", h1)) story.append(hr()) story.append(Paragraph( "Gastric perforation is a <b>full-thickness breach of the gastric wall</b> allowing " "gastric contents to escape into the peritoneal cavity, most commonly due to peptic ulcer disease.", body)) story.append(Spacer(1, 4)) # Etiology story.append(Paragraph("2. ETIOLOGY", h1)) story.append(hr()) et_table = make_table( ["Category", "Details"], [ ["Peptic ulcer disease (MC)", "H. pylori, NSAIDs; DU > GU; ~20% of perforations are GU"], ["Malignancy", "~6% of perforated GUs are malignant (gastric carcinoma)"], ["Gastric volvulus", "Ischemia → necrosis → perforation"], ["Trauma", "Blunt / penetrating abdominal trauma"], ["Iatrogenic", "Endoscopy, NG tube, surgical injury"], ["Corrosives", "Acid / alkali ingestion"], ["Stress ulcers", "Burns (Curling's ulcer), Head injury (Cushing's ulcer)"], ["Foreign body", "Ingested sharp objects"], ], col_widths=[5*cm, 12*cm] ) story.append(et_table) story.append(Spacer(1, 4)) # Clinical Presentation story.append(Paragraph("3. CLINICAL PRESENTATION", h1)) story.append(hr()) story.append(Paragraph("<b>A) Symptoms:</b>", h2)) story.append(b("<b>Sudden-onset severe epigastric pain</b> (knife-like) - rapidly becomes generalized")) story.append(b("Nausea and vomiting")) story.append(b("History: PUD, NSAID / steroid use, smoking")) story.append(Paragraph("<b>B) Signs:</b>", h2)) story.append(b("Patient lies still (peritonism worsens with movement)")) story.append(b("<b>Board-like rigidity</b> - hallmark of generalized peritonitis")) story.append(b("Guarding and rebound tenderness")) story.append(b("<b>Obliteration of liver dullness</b> on percussion (free air under diaphragm)")) story.append(b("Absent bowel sounds (paralytic ileus)")) story.append(b("Tachycardia, fever → later: septic shock")) story.append(Paragraph("<b>C) Three Stages of Progression:</b>", h2)) stage_table = make_table( ["Stage", "Timing", "Pathology", "Clinical Features"], [ ["1", "0-6 hours", "Chemical peritonitis", "Severe localized epigastric pain, rigidity"], ["2", "6-12 hours", "Dilution of chemical stimulus", "Relative improvement, patient may feel better"], ["3", ">12 hours", "Bacterial peritonitis", "Generalized sepsis, deterioration, shock"], ], col_widths=[1.5*cm, 2.5*cm, 4.5*cm, 8.5*cm] ) story.append(stage_table) story.append(Spacer(1, 4)) # Diagnosis - Perforation story.append(Paragraph("4. DIAGNOSIS", h1)) story.append(hr()) story.append(Paragraph("<b>A) Erect Chest X-ray / Upright Abdominal X-ray:</b>", h2)) story.append(b("<b>Free air (pneumoperitoneum) under diaphragm</b> - present in 70-80%")) story.append(b("Crescent-shaped radiolucency between liver and right dome of diaphragm (Cupola sign)")) story.append(b("Absent in ~20-30% cases - do not rule out perforation on negative X-ray")) story.append(Paragraph("<b>B) CT Scan Abdomen (most sensitive):</b>", h2)) story.append(b("Free intraperitoneal air and peritoneal fluid")) story.append(b("Localizes site of perforation")) story.append(b("Identifies associated pathology")) story.append(Paragraph("<b>C) Laboratory:</b>", h2)) story.append(b("Leukocytosis (WBC >10,000)")) story.append(b("Raised serum amylase (chemical peritonitis)")) story.append(b("ABG: Metabolic acidosis in advanced sepsis")) story.append(b("Raised creatinine in septic shock")) story.append(Spacer(1, 4)) # Surgical Management - Perforation story.append(Paragraph("5. SURGICAL MANAGEMENT", h1)) story.append(hr()) story.append(Paragraph("<b>A) Pre-operative Resuscitation (PULP Protocol):</b>", h2)) story.append(b("IV fluids - goal-directed fluid therapy")) story.append(b("IV broad-spectrum antibiotics (initiated immediately)")) story.append(b("NG tube (double-barreled) insertion + urinary catheter")) story.append(b("IV Proton Pump Inhibitor (PPI)")) story.append(b("Electrolyte correction; respiratory and circulatory support")) story.append(Paragraph( "<b>KEY:</b> Surgery within 6 hours → mortality 17%; without protocol → mortality 27% (Danish multicenter study, n=2619)", note_style)) story.append(Spacer(1, 4)) story.append(Paragraph("<b>B) Prognostic Scoring:</b>", h2)) boey_table = make_table( ["Boey Score (3 factors)", "PULP Score Variables"], [ ["1. Preoperative shock", "Age >65, Active malignancy, Cirrhosis, Glucocorticoid use"], ["2. Major medical illness (ASA >1)", "Perforation >24 hrs, Shock, Raised creatinine, ASA >1"], ["3. Perforation >12 hours", "AUROC = 0.83 for predicting mortality"], ], col_widths=[8.5*cm, 8.5*cm] ) story.append(boey_table) story.append(Spacer(1, 4)) story.append(Paragraph("<b>C) Operative Options:</b>", h2)) story.append(Paragraph("<b>For Perforated Duodenal Ulcer (DU) / Juxta-pyloric Ulcer:</b>", ParagraphStyle("h3", fontSize=9.5, textColor=DARK_BLUE, fontName="Helvetica-Bold", spaceBefore=4, spaceAfter=2, leading=12))) du_table = make_table( ["Procedure", "Indication"], [ ["Simple closure + <b>Graham Omental Patch</b>", "Most perforations; preferred for small to moderate size"], ["Laparoscopic repair", "Stable patients; small perforations (<10 mm); non-inferior to open repair " "(OR for septic complications 0.66, pulmonary complications 0.43)"], ["Open laparotomy", "Delayed presentation, shock, significant comorbidities, large perforations (>10 mm)"], ], col_widths=[6*cm, 11*cm] ) story.append(du_table) story.append(Spacer(1, 3)) story.append(Paragraph("<b>For Perforated Gastric Ulcer (GU):</b>", ParagraphStyle("h3b", fontSize=9.5, textColor=DARK_BLUE, fontName="Helvetica-Bold", spaceBefore=4, spaceAfter=2, leading=12))) gu_table = make_table( ["Location", "Procedure"], [ ["Small / prepyloric", "Simple closure with omental patch"], ["Angular notch (lesser curvature)", "Antrectomy + lesser curve ulcer excision + Billroth I or II reconstruction"], ["Large / suspected malignancy", "Gastric resection (distal gastrectomy)"], ], col_widths=[5*cm, 12*cm] ) story.append(gu_table) story.append(Paragraph( "<b>IMPORTANT:</b> ~6% of perforated GUs are malignant - always send tissue for biopsy.", keybox)) story.append(Spacer(1, 4)) story.append(Paragraph("<b>D) Post-operative Management:</b>", h2)) story.append(b("IV PPI + conversion to oral PPI")) story.append(b("<b>H. pylori eradication</b> if Hp-positive: reduces ulcer relapse from 38.1% → 4.8% at 1 year")) story.append(b("Continued IV antibiotics")) story.append(b("Nutritional support")) story.append(Spacer(1, 4)) story.append(Paragraph("<b>E) Complications:</b>", h2)) comp_table = make_table( ["Early", "Late"], [ ["Septic shock", "Adhesive intestinal obstruction"], ["Generalized peritonitis", "Re-operation (17% in large series)"], ["Intra-abdominal abscess", "Malnutrition / dumping syndrome"], ], col_widths=[8.5*cm, 8.5*cm] ) story.append(comp_table) story.append(Paragraph( "<b>Mortality:</b> 90-day mortality ~25.5% in large Danish series (726 patients, 2011-2013). " "Re-operation required in 17.1%; one-third due to persistent leaks.", note_style)) story.append(Spacer(1, 6)) # ══════════════════════════════════════════════════════════════════════════════ # SUMMARY TABLE # ══════════════════════════════════════════════════════════════════════════════ story.append(Paragraph("QUICK COMPARISON SUMMARY", h1)) story.append(hr(color=ACCENT_RED, w=1.5)) sum_table = make_table( ["Feature", "Gastric Volvulus", "Gastric Perforation"], [ ["Classic presentation", "Borchardt's Triad", "Sudden knife-like epigastric pain + peritonitis"], ["Key clinical sign", "Inability to pass NG tube", "Board-like rigidity + obliterated liver dullness"], ["Key investigation", "CT scan (Swirl sign)", "Erect CXR (free air under diaphragm)"], ["Emergency Rx", "NG decompression ± endoscopy", "IV fluids, antibiotics, NG tube, surgery within 6 hrs"], ["Definitive surgery", "Gastropexy / hernia repair", "Graham patch (DU) / Antrectomy (angular GU)"], ["Post-op essential", "Fixation prevents recurrence", "H. pylori eradication (relapse ↓ from 38% → 5%)"], ["Mortality", "15-20% (acute)", "~25.5% (90-day)"], ], col_widths=[4.5*cm, 6.25*cm, 6.25*cm] ) story.append(sum_table) story.append(Spacer(1, 6)) # ── KEY EXAM POINTS ───────────────────────────────────────────────────────── story.append(Paragraph( "★ KEY EXAM POINTS: Borchardt's triad for volvulus diagnosis | Swirl sign on CT | " "Boey score for perforation prognosis | Graham patch for DU perforation | " "Antrectomy for angular notch GU | Always biopsy perforated GU (6% malignant) | " "H. pylori eradication after repair | Surgery within 6 hrs reduces mortality", keybox)) story.append(Spacer(1, 4)) story.append(Paragraph( "Sources: Sabiston Textbook of Surgery | Yamada's Textbook of Gastroenterology | " "Sleisenger &amp; Fordtran's GI and Liver Disease", small)) # ── BUILD ──────────────────────────────────────────────────────────────────── doc.build(story) print(f"PDF created: {OUTPUT}") PYEOF echo "Script written successfully"

Running Command

cd /tmp/workspace/gastric-surgery && python make_pdf.py

Running Command

ls -lh /tmp/workspace/gastric-surgery/Gastric_Volvulus_Perforation_UHS.pdf

Your PDF is ready. Here's the download link:

Gastric Volvulus Perforation UHS

PDF Document · PDF

What's included in the PDF (2 pages, A4, UHS exam format):
  • Part 1 - Gastric Volvulus: Definition, Singleton's classification table, etiology, Borchardt's triad table, acute vs chronic presentation, diagnosis (X-ray/CT/contrast), and full surgical management algorithm
  • Part 2 - Gastric Perforation: Definition, etiology table, clinical signs, 3-stage progression table, diagnosis, PULP protocol, Boey score, Graham patch vs antrectomy decision table, complications, mortality data
  • Quick Comparison Summary table at the end
  • Key Exam Points highlighted in red box
Formatted with color-coded section headers, styled tables, and highlighted key points - ready to print or study from.
This is a shared conversation. Sign in to Orris to start your own chat.