attachment
attachment
attachment
attachment

Make a pdf of answer of these questions with take reference from ashwini sir notes and anatomy by vishram singh book and mention that pdf made by Mihir

Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Running Command

mkdir -p /tmp/workspace/anatomy-exam && ls /tmp/workspace/anatomy-exam/

Writing File

~/anatomy-exam/generate_pdf.py


from reportlab.lib.pagesizes import A4
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm, mm
from reportlab.lib import colors
from reportlab.platypus import (
    SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
    HRFlowable, PageBreak, ListFlowable, ListItem, KeepTogether
)
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus.flowables import HRFlowable

OUTPUT = "/tmp/workspace/anatomy-exam/Anatomy_Answers_Mihir.pdf"

doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=A4,
    rightMargin=2*cm,
    leftMargin=2*cm,
    topMargin=2.5*cm,
    bottomMargin=2*cm,
    title="Anatomy 3rd Internal Paper II - Answers",
    author="Mihir"
)

styles = getSampleStyleSheet()

# Custom styles
title_style = ParagraphStyle(
    'TitleStyle', parent=styles['Title'],
    fontSize=16, spaceAfter=6, textColor=colors.HexColor('#1a237e'),
    alignment=TA_CENTER, fontName='Helvetica-Bold'
)
subtitle_style = ParagraphStyle(
    'SubtitleStyle', parent=styles['Normal'],
    fontSize=10, spaceAfter=4, textColor=colors.HexColor('#37474f'),
    alignment=TA_CENTER
)
section_style = ParagraphStyle(
    'SectionStyle', parent=styles['Heading1'],
    fontSize=13, spaceAfter=6, spaceBefore=12,
    textColor=colors.HexColor('#0d47a1'),
    fontName='Helvetica-Bold', borderPad=4,
    backColor=colors.HexColor('#e3f2fd')
)
question_style = ParagraphStyle(
    'QuestionStyle', parent=styles['Heading2'],
    fontSize=11, spaceAfter=4, spaceBefore=10,
    textColor=colors.HexColor('#1565c0'),
    fontName='Helvetica-Bold'
)
subq_style = ParagraphStyle(
    'SubQStyle', parent=styles['Heading3'],
    fontSize=10.5, spaceAfter=3, spaceBefore=6,
    textColor=colors.HexColor('#283593'),
    fontName='Helvetica-Bold'
)
body_style = ParagraphStyle(
    'BodyStyle', parent=styles['Normal'],
    fontSize=10, spaceAfter=4, leading=15,
    alignment=TA_JUSTIFY, fontName='Helvetica'
)
bullet_style = ParagraphStyle(
    'BulletStyle', parent=styles['Normal'],
    fontSize=10, spaceAfter=3, leading=14,
    leftIndent=20, bulletIndent=5,
    fontName='Helvetica'
)
footer_style = ParagraphStyle(
    'FooterStyle', parent=styles['Normal'],
    fontSize=8, textColor=colors.grey,
    alignment=TA_CENTER
)

story = []

# ---- HEADER ----
story.append(Paragraph("3rd Internal Paper II Remedial Examination", title_style))
story.append(Paragraph("ANATOMY - Model Answers", title_style))
story.append(Spacer(1, 4))
story.append(Paragraph("Date: 20.7.26 | Time: 3 Hours | Total Marks: 100", subtitle_style))
story.append(Paragraph(
    "<i>Reference: Ashwini Sir Notes &amp; Anatomy by Vishram Singh</i>",
    subtitle_style
))
story.append(Paragraph("<b>PDF made by Mihir</b>", subtitle_style))
story.append(HRFlowable(width="100%", thickness=2, color=colors.HexColor('#1a237e')))
story.append(Spacer(1, 10))

# ===========================
# SECTION A
# ===========================
story.append(Paragraph("SECTION A  (Total Marks: 50)", section_style))
story.append(Spacer(1, 6))

# Q1
story.append(Paragraph("Q1) Describe the stomach under the following headings  [6+4+3+2 = 15 marks]", question_style))

# Q1a
story.append(Paragraph("(a) Artery Supply of Stomach with Diagram", subq_style))
story.append(Paragraph(
    "The stomach has a rich blood supply from branches of the <b>celiac trunk</b>. The arterial supply is as follows:",
    body_style
))
supply_data = [
    ["Artery", "Origin", "Supplies"],
    ["Left gastric artery", "Celiac trunk (direct)", "Lesser curvature (upper part); esophagus"],
    ["Right gastric artery", "Hepatic artery proper", "Lesser curvature (lower part)"],
    ["Right gastro-omental (gastroepiploic)", "Gastroduodenal artery", "Greater curvature (right side)"],
    ["Left gastro-omental (gastroepiploic)", "Splenic artery", "Greater curvature (left side)"],
    ["Short gastric arteries (vasa brevia)", "Splenic artery (terminal branches)", "Fundus of stomach"],
    ["Posterior gastric artery", "Splenic artery", "Posterior gastric wall"],
]
t = Table(supply_data, colWidths=[4.5*cm, 5*cm, 6.5*cm])
t.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#1565c0')),
    ('TEXTCOLOR', (0,0), (-1,0), colors.white),
    ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
    ('FONTSIZE', (0,0), (-1,-1), 9),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#f5f5f5'), colors.white]),
    ('GRID', (0,0), (-1,-1), 0.5, colors.grey),
    ('VALIGN', (0,0), (-1,-1), 'TOP'),
    ('PADDING', (0,0), (-1,-1), 5),
]))
story.append(t)
story.append(Spacer(1, 6))
story.append(Paragraph(
    "<b>Note on diagram:</b> Draw a simple outline of stomach. Label lesser curvature (right &amp; left gastric arteries anastomosing), greater curvature (right &amp; left gastro-omental arteries anastomosing), fundus (short gastric arteries), and celiac trunk at top giving left gastric, hepatic &amp; splenic branches.",
    body_style
))
story.append(Paragraph(
    "<b>Venous drainage:</b> Corresponds to arteries. Left and right gastric veins drain into portal vein. Right gastro-omental vein into superior mesenteric vein. Left gastro-omental vein and short gastric veins into splenic vein.",
    body_style
))
story.append(Paragraph(
    "<i>(Ref: Vishram Singh - Abdominal Part II; Ashwini Sir Notes - Stomach)</i>",
    ParagraphStyle('ref', parent=body_style, fontSize=9, textColor=colors.grey)
))

# Q1b
story.append(Spacer(1, 4))
story.append(Paragraph("(b) Types of Cells Lining the Mucosa of Stomach", subq_style))
story.append(Paragraph(
    "The gastric mucosa contains specialized glands that differ in different regions. The cells lining the gastric mucosa include:",
    body_style
))
cells_data = [
    ["Cell Type", "Location", "Secretion / Function"],
    ["Surface mucous cells", "Entire stomach (surface & pits)", "Mucus - protects mucosa from acid"],
    ["Mucous neck cells", "Neck of gastric glands", "Soluble mucus; stem cells for renewal"],
    ["Parietal (Oxyntic) cells", "Fundus & body glands", "HCl (hydrochloric acid) and Intrinsic factor (IF)"],
    ["Chief (Peptic/Zymogenic) cells", "Base of fundic glands", "Pepsinogen (activated to pepsin by HCl)"],
    ["Enteroendocrine (G cells)", "Mainly pyloric antrum", "Gastrin (stimulates HCl secretion)"],
    ["Enteroendocrine (D cells)", "Pyloric antrum", "Somatostatin (inhibits gastrin)"],
    ["Enteroendocrine (ECL cells)", "Fundic glands", "Histamine (stimulates parietal cells)"],
]
t2 = Table(cells_data, colWidths=[4.2*cm, 4.5*cm, 7.3*cm])
t2.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#1565c0')),
    ('TEXTCOLOR', (0,0), (-1,0), colors.white),
    ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
    ('FONTSIZE', (0,0), (-1,-1), 9),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#f5f5f5'), colors.white]),
    ('GRID', (0,0), (-1,-1), 0.5, colors.grey),
    ('VALIGN', (0,0), (-1,-1), 'TOP'),
    ('PADDING', (0,0), (-1,-1), 5),
]))
story.append(t2)
story.append(Paragraph(
    "<b>Microanatomy note:</b> The stomach wall has 4 layers: Mucosa (surface epithelium, lamina propria with glands, muscularis mucosae), Submucosa (vessels, nerves), Muscularis externa (inner oblique, middle circular, outer longitudinal), and Serosa.",
    body_style
))
story.append(Paragraph(
    "<i>(Ref: Vishram Singh - Microanatomy of Stomach; Ashwini Sir Notes)</i>",
    ParagraphStyle('ref', parent=body_style, fontSize=9, textColor=colors.grey)
))

# Q1c
story.append(Spacer(1, 4))
story.append(Paragraph("(c) Well Labeled Diagram of Microanatomy of the Stomach", subq_style))
story.append(Paragraph(
    "<b>Description of the gastric wall microanatomy (for diagram):</b> The stomach wall from inside outward:",
    body_style
))
for item in [
    "1. <b>Mucosa:</b> Simple columnar epithelium (surface mucous cells), gastric pits (foveolae), lamina propria containing gastric glands (fundic/chief/parietal/mucous cells), muscularis mucosae (2 layers of smooth muscle)",
    "2. <b>Submucosa:</b> Dense irregular connective tissue with blood vessels, lymphatics, Meissner's (submucosal) nerve plexus",
    "3. <b>Muscularis externa (propria):</b> Three layers - inner oblique, middle circular (forms pyloric sphincter), outer longitudinal; Auerbach's (myenteric) nerve plexus between middle and outer layers",
    "4. <b>Serosa:</b> Simple squamous epithelium (mesothelium) covering visceral peritoneum",
]:
    story.append(Paragraph(item, bullet_style))
story.append(Paragraph(
    "<b>Gastric gland types by region:</b> Cardiac glands (mucous), Fundic/Oxyntic glands (chief + parietal cells), Pyloric glands (mucous + G cells).",
    body_style
))

# Q1d
story.append(Spacer(1, 4))
story.append(Paragraph("(d) Ligaments Attached to Stomach", subq_style))
story.append(Paragraph(
    "The stomach is attached to surrounding structures by peritoneal folds (ligaments):",
    body_style
))
ligs = [
    ("<b>Gastrohepatic ligament (Lesser omentum - upper part)</b>", "Connects lesser curvature to liver (porta hepatis); contains right gastric artery & vein, left gastric artery, lymphatics"),
    ("<b>Hepatoduodenal ligament (Lesser omentum - lower part)</b>", "Contains portal triad: portal vein, hepatic artery, bile duct; forms anterior wall of epiploic foramen (of Winslow)"),
    ("<b>Gastrocolic ligament (Greater omentum - upper part)</b>", "Connects greater curvature to transverse colon; contains right and left gastro-omental vessels"),
    ("<b>Gastrosplenic ligament (Gastrolienal)</b>", "Connects greater curvature to hilum of spleen; contains short gastric and left gastro-omental vessels"),
    ("<b>Gastrophrenic ligament</b>", "Connects fundus to diaphragm; has no major vessels"),
    ("<b>Gastropancreatic fold</b>", "Peritoneal fold over left gastric artery running to celiac trunk"),
    ("<b>Phrenicosplenic ligament</b>", "Connects spleen to diaphragm (indirectly related)"),
]
for name, desc in ligs:
    story.append(Paragraph(f"{name}: {desc}", bullet_style))
story.append(Paragraph(
    "<i>(Ref: Vishram Singh - Peritoneal Folds; Ashwini Sir Notes - Stomach ligaments)</i>",
    ParagraphStyle('ref', parent=body_style, fontSize=9, textColor=colors.grey)
))

# Q2
story.append(Spacer(1, 8))
story.append(Paragraph("Q2) Write Short Notes  [5x3 = 15 marks]", question_style))

# Q2a - Tibialis Posterior
story.append(Paragraph("(a) Tibialis Posterior Muscle", subq_style))
for line in [
    "<b>Origin:</b> Posterior surface of interosseous membrane, adjacent surfaces of tibia (lateral to vertical line) and fibula.",
    "<b>Insertion:</b> Tuberosity of navicular (main); sustentaculum tali of calcaneus; all three cuneiforms; cuboid; bases of 2nd, 3rd, 4th metatarsals.",
    "<b>Nerve supply:</b> Tibial nerve (L4, L5).",
    "<b>Action:</b> Plantarflexion of foot at ankle; inversion of foot (main invertor); supports medial longitudinal arch of foot.",
    "<b>Relations:</b> Deepest muscle of posterior leg; lies between flexor hallucis longus (laterally) and flexor digitorum longus (medially); its tendon passes behind medial malleolus (most anterior in the flexor retinaculum groove - mnemonic: Tom, Dick And Very Nervous Harry = Tibialis posterior, flexor Digitorum longus, posterior tibial Artery, tibial Vein, tibial Nerve, flexor Hallucis longus).",
    "<b>Clinical:</b> Rupture leads to progressive flat foot (acquired pes planus); tibialis posterior tendinopathy is common in middle-aged women.",
]:
    story.append(Paragraph(line, bullet_style))

# Q2b - Flat Foot
story.append(Spacer(1, 4))
story.append(Paragraph("(b) Flat Foot (Pes Planus)", subq_style))
for line in [
    "<b>Definition:</b> Flattening or loss of the medial longitudinal arch of the foot.",
    "<b>Types:</b> (1) Flexible (mobile) flat foot - arch present on tip-toe, disappears on weight bearing; (2) Rigid flat foot - arch absent in all positions.",
    "<b>Causes:</b> Ligamentous laxity, obesity, tibialis posterior tendon dysfunction, calcaneal valgus, fallen arches due to loss of muscle tone.",
    "<b>Anatomy of medial longitudinal arch:</b> Bones: calcaneus, talus, navicular, 3 cuneiforms, medial 3 metatarsals. Keystone: talus. Supported by: plantar calcaneonavicular (spring) ligament (main static support), tibialis posterior (main dynamic support), flexor hallucis longus, plantar fascia (bowstring), plantar intrinsic muscles.",
    "<b>Clinical features:</b> Pain along medial border of foot, fatigue, heel valgus, forefoot abduction.",
    "<b>Treatment:</b> Physiotherapy, medial arch support, corrective footwear; surgery in severe cases.",
]:
    story.append(Paragraph(line, bullet_style))

# Q2c - Branches of Femoral Nerve
story.append(Spacer(1, 4))
story.append(Paragraph("(c) Enumerate Branches of Femoral Nerve", subq_style))
story.append(Paragraph(
    "<b>Femoral Nerve (L2, L3, L4)</b> - largest branch of lumbar plexus. Formed in the substance of psoas major. Enters femoral triangle lateral to femoral artery, lateral to femoral sheath.",
    body_style
))
story.append(Paragraph("<b>Branches (divided into above and below inguinal ligament):</b>", body_style))
story.append(Paragraph("<b>In the Abdomen (above inguinal ligament):</b>", bullet_style))
for b in [
    "Nerve to iliacus (L2, L3)",
    "Nerve to pectineus (L2, L3) - sometimes from femoral proper",
]:
    story.append(Paragraph(f"• {b}", ParagraphStyle('bb', parent=bullet_style, leftIndent=35)))
story.append(Paragraph("<b>In the Femoral Triangle (below inguinal ligament):</b>", bullet_style))
story.append(Paragraph("<u>Anterior (superficial) branches:</u>", ParagraphStyle('bb', parent=bullet_style, leftIndent=35)))
for b in [
    "Medial cutaneous nerve of thigh (anterior cutaneous - skin over medial/anteromedial thigh)",
    "Intermediate cutaneous nerve of thigh (anterior cutaneous - skin over anterior thigh)",
    "Nerve to sartorius",
]:
    story.append(Paragraph(f"• {b}", ParagraphStyle('bb', parent=bullet_style, leftIndent=45)))
story.append(Paragraph("<u>Posterior (deep) branches:</u>", ParagraphStyle('bb', parent=bullet_style, leftIndent=35)))
for b in [
    "Nerve to rectus femoris",
    "Nerve to vastus lateralis",
    "Nerve to vastus medialis",
    "Nerve to vastus intermedius",
    "Saphenous nerve (longest cutaneous nerve of body - L3,L4) - terminal branch; sensory to medial side of leg, ankle, medial foot to base of big toe",
    "Articular branch to hip joint",
    "Articular branch to knee joint",
]:
    story.append(Paragraph(f"• {b}", ParagraphStyle('bb', parent=bullet_style, leftIndent=45)))
story.append(Paragraph(
    "<i>(Ref: Vishram Singh - Lower Limb; Ashwini Sir Notes - Femoral nerve)</i>",
    ParagraphStyle('ref', parent=body_style, fontSize=9, textColor=colors.grey)
))

# Q2d - Adductor Magnus
story.append(Spacer(1, 4))
story.append(Paragraph("(d) Structures Passing Through Osseoaponeurotic Openings of Adductor Magnus", subq_style))
story.append(Paragraph(
    "<b>Adductor magnus</b> has two parts: adductor part (pubis to linea aspera) and hamstring part (ischium to adductor tubercle). Between these two parts is the <b>hiatus (osseoaponeurotic opening)</b> in the tendon of adductor magnus, located at the junction of middle and lower thirds of medial femur.",
    body_style
))
story.append(Paragraph("<b>Structures passing through the adductor hiatus:</b>", body_style))
for s in [
    "<b>Femoral artery</b> - passes through and becomes popliteal artery in popliteal fossa",
    "<b>Femoral vein</b> - passes through from posterior to become femoral vein (popliteal vein becomes femoral vein)",
    "Note: The nerve (saphenous nerve) does NOT pass through the hiatus; it exits through the adductor canal anteriorly through the sartorius.",
]:
    story.append(Paragraph(f"• {s}", bullet_style))
story.append(Paragraph(
    "<b>Adductor canal (Hunter's canal) - upper opening:</b> Bounded by vastus medialis (anterolaterally), adductor longus and magnus (posteromedially), sartorius (roof). Contents: femoral artery, femoral vein, saphenous nerve, nerve to vastus medialis, descending genicular artery.",
    body_style
))
story.append(Paragraph(
    "<b>Upper osseoaponeurotic opening of adductor magnus:</b> For the profunda femoris (deep femoral) vessels and perforating arteries to enter/exit; there are typically 4 perforating foramina in the adductor magnus for the 4 perforating arteries.",
    body_style
))

# Q2e - First part of duodenum
story.append(Spacer(1, 4))
story.append(Paragraph("(e) Peculiarities of First Part of Duodenum", subq_style))
story.append(Paragraph(
    "The first (superior) part of duodenum is approximately <b>5 cm long</b>, begins at the pylorus and ends at the superior duodenal flexure.",
    body_style
))
story.append(Paragraph("<b>Peculiarities (unique features) compared to other parts:</b>", body_style))
for p in [
    "<b>Mobile:</b> The proximal 2.5 cm ('duodenal cap/bulb') is surrounded by peritoneum and is mobile (intraperitoneal), unlike the rest which is retroperitoneal.",
    "<b>Smooth mucous membrane:</b> The duodenal cap has smooth mucosa on radiological imaging (barium meal), unlike the rest which shows prominent circular folds (plicae circulares/valvulae conniventes).",
    "<b>Circular folds (Kerckring's):</b> Absent in the first 2-3 cm of first part.",
    "<b>Direction:</b> Passes upward, backward, and to the right from the pylorus.",
    "<b>Relations:</b> Anterosuperiorly - quadrate lobe of liver and gallbladder; Posteriorly - portal vein, gastroduodenal artery, common bile duct, inferior vena cava; Superiorly - hepatoduodenal ligament (containing portal triad).",
    "<b>Radiological importance:</b> The 'duodenal cap' is the site of 95% of duodenal ulcers (peptic ulcers). Spasm of the cap is the earliest X-ray sign. Persistent deformity = scarring from peptic ulcer.",
    "<b>Blood supply:</b> Supraduodenal artery (from gastroduodenal artery), right gastric artery branches.",
]:
    story.append(Paragraph(f"• {p}", bullet_style))

# Q3
story.append(Spacer(1, 8))
story.append(Paragraph("Q3) Answer Briefly - Clinical Anatomy  [5x2 = 10 marks]", question_style))

# Q3a
story.append(Paragraph("(a) Ovarian pain is referred to the umbilical area", subq_style))
story.append(Paragraph(
    "The ovary is a <b>retroperitoneal organ</b> derived from the gonadal ridge near the mesonephros. Its visceral afferent (pain) fibers travel with the <b>sympathetic nerves</b> along the <b>ovarian vessels</b> (suspensory ligament of ovary) to reach the <b>aortic (preaortic) plexus</b>, from where they ascend to the <b>T10 spinal segment</b> via the lesser and least splanchnic nerves.",
    body_style
))
story.append(Paragraph(
    "T10 dermatome corresponds to the <b>umbilical region</b> of the anterior abdominal wall. Since the central nervous system cannot distinguish whether pain is coming from the ovary or the umbilical skin (both send impulses to T10), the brain interprets ovarian pain as coming from the umbilical area - this is the basis of <b>referred pain</b> (Law of dermatomal reference).",
    body_style
))
story.append(Paragraph(
    "This is clinically important in ectopic pregnancy and ovarian torsion, where patients report periumbilical pain.",
    body_style
))

# Q3b
story.append(Spacer(1, 4))
story.append(Paragraph("(b) Anatomical basis for metastasis of prostate cancer to vertebral column and brain", subq_style))
story.append(Paragraph(
    "The prostate is drained by the <b>prostatic venous plexus</b> (plexus of Santorini), which communicates freely with the <b>internal vertebral venous plexus (Batson's plexus)</b>. Batson's plexus is a valveless network of veins running along the entire length of the vertebral column.",
    body_style
))
story.append(Paragraph("<b>Mechanism of metastasis:</b>", body_style))
for p in [
    "Batson's plexus is <b>valveless</b>, allowing bidirectional flow of blood.",
    "During activities that increase intra-abdominal/intrathoracic pressure (coughing, straining), blood is forced from prostatic veins into Batson's plexus.",
    "Cancer cells travel retrogradely through these valveless veins directly to the vertebral bodies, bypassing the pulmonary circulation.",
    "From vertebral veins, tumor emboli can also reach the <b>skull and brain</b> via cranial extensions of Batson's plexus.",
    "<b>Result:</b> Osteoblastic (sclerotic) metastases in vertebrae (most common site), ribs, skull, and pelvis.",
]:
    story.append(Paragraph(f"• {p}", bullet_style))

# Q3c
story.append(Spacer(1, 4))
story.append(Paragraph("(c) Women are more susceptible to urinary tract infections (UTI) than men", subq_style))
for p in [
    "<b>Shorter urethra:</b> Female urethra is only 3.5-4 cm long vs. 20 cm in males. Bacteria from the perineum have a much shorter distance to travel to reach the bladder.",
    "<b>Wider urethra:</b> Female urethra is wider and straighter, offering less resistance.",
    "<b>Proximity of external urethral orifice to anus:</b> The vaginal introitus and urethral meatus are close to the anal opening (contaminated with gut flora like E. coli).",
    "<b>No prostatic secretions:</b> In males, the prostate secretes zinc-containing antibacterial factor that inhibits UTI. Women lack this protection.",
    "<b>Sexual intercourse:</b> Mechanical effect can introduce bacteria ('honeymoon cystitis').",
    "<b>Hormonal factor:</b> Estrogen maintains acidic vaginal pH and lactobacilli; postmenopausal women (low estrogen) have higher UTI rates.",
]:
    story.append(Paragraph(f"• {p}", bullet_style))

# Q3d
story.append(Spacer(1, 4))
story.append(Paragraph("(d) Urethral injuries are more common in men than women", subq_style))
for p in [
    "<b>Length:</b> Male urethra (20 cm) is much longer and thus more exposed to injury than the female urethra (3.5 cm).",
    "<b>Fixed segments:</b> The male urethra has a <b>fixed part</b> (membranous urethra, 1.2 cm) and a <b>mobile part</b>. At the junction (membranous-spongy junction), shearing forces during trauma cause rupture.",
    "<b>Membranous urethra:</b> Most vulnerable - passes through the urogenital diaphragm and is held fixed. Any fracture of the pubic rami or disruption of the pelvic ring (straddle injury, pelvic fractures) can tear the membranous urethra (injury to posterior urethra - above UG diaphragm) or bulbar urethra (below UG diaphragm - straddle injury).",
    "<b>Bulbar urethra:</b> In straddle injuries, the bulb of urethra is compressed between a hard object and the pubic arch.",
    "<b>Female urethra:</b> Short, straight, and mobile (not fixed to UG diaphragm as firmly); surrounded by more mobile soft tissue; rarely injured even in pelvic fractures.",
]:
    story.append(Paragraph(f"• {p}", bullet_style))

# Q3e
story.append(Spacer(1, 4))
story.append(Paragraph("(e) Ureteric pain is spasmodic and agonizing and may cause retraction of testes", subq_style))
story.append(Paragraph(
    "<b>Spasmodic and agonizing nature:</b> The ureter is lined by smooth muscle. When a calculus (stone) lodges in the ureter, peristaltic contractions attempt to push it along. These powerful waves of smooth muscle spasm against an obstruction cause <b>renal/ureteric colic</b> - severe, colicky, intermittent pain radiating from loin to groin.",
    body_style
))
story.append(Paragraph(
    "<b>Retraction of testes - anatomical basis:</b>",
    body_style
))
for p in [
    "The ureter and the testis (gonad) share the same visceral afferent pain pathway (T10-L1 sympathetics via the renal/gonadal plexus).",
    "The <b>genitofemoral nerve (L1, L2)</b> supplies both the cremaster muscle and skin over the scrotum/mons pubis.",
    "Ureteric stimulation reflexly activates the <b>cremaster reflex</b> via the genitofemoral nerve, causing cremasteric muscle spasm and testicular retraction.",
    "This is because the ureter and testis develop from the mesonephric (Wolffian) system and have related innervation from the same spinal segments.",
]:
    story.append(Paragraph(f"• {p}", bullet_style))

# Q4
story.append(Spacer(1, 8))
story.append(Paragraph("Q4) Fill in the Blanks  [10x1 = 10 marks]", question_style))
fill_data = [
    ["#", "Question", "Answer"],
    ["a)", "The fallopian tube is lined by ___ epithelium", "Simple columnar ciliated (with peg/secretory cells)"],
    ["b)", "The mucosa of urinary bladder is lined by ___ epithelium", "Transitional epithelium (Urothelium)"],
    ["c)", "Popliteus muscle is supplied by ___ nerve", "Tibial nerve (L4, L5, S1)"],
    ["d)", "Skin over medial border of foot is supplied by ___ nerve", "Saphenous nerve (branch of femoral nerve, L3, L4)"],
    ["e)", "Skin over lateral border of foot is supplied by ___ nerve", "Sural nerve (branch of tibial + common peroneal, S1, S2)"],
    ["f)", "Semitendinosus muscle is supplied by ___ nerve", "Tibial division of sciatic nerve (L5, S1, S2)"],
    ["g)", "Gracilis is supplied by ___ nerve", "Obturator nerve (L2, L3)"],
    ["h)", "Ligamentum teres hepatis is remnant of ___", "Left umbilical vein"],
    ["i)", "The main support of liver is ___", "Inferior vena cava (by hepatic veins) / Coronary ligament / Hepatic veins"],
    ["j)", "Spleen is supplied by ___ artery", "Splenic artery (branch of celiac trunk)"],
]
ft = Table(fill_data, colWidths=[1*cm, 8*cm, 7*cm])
ft.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#1565c0')),
    ('TEXTCOLOR', (0,0), (-1,0), colors.white),
    ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
    ('FONTSIZE', (0,0), (-1,-1), 9),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#f5f5f5'), colors.white]),
    ('GRID', (0,0), (-1,-1), 0.5, colors.grey),
    ('VALIGN', (0,0), (-1,-1), 'TOP'),
    ('PADDING', (0,0), (-1,-1), 5),
]))
story.append(ft)
story.append(Paragraph(
    "<b>Note for (i):</b> The main support of liver is the <b>inferior vena cava</b> via the hepatic veins (coronary/falciform ligament and hepatogastric/hepatoduodenal ligaments of lesser omentum provide additional support).",
    body_style
))

story.append(PageBreak())

# ===========================
# SECTION B
# ===========================
story.append(Paragraph("SECTION B  (Total Marks: 50)", section_style))
story.append(Spacer(1, 6))

# Q5
story.append(Paragraph("Q5) Describe the Uterus under the following headings  [6+4+3+2 = 15 marks]", question_style))

# Q5a
story.append(Paragraph("(a) Enumerate the Supports of Uterus", subq_style))
story.append(Paragraph(
    "The uterus is maintained in its normal position (anteverted, anteflexed) by various active (muscular/ligamentous) and passive (peritoneal fold) supports. The supports are divided into:",
    body_style
))
story.append(Paragraph("<b>LEVEL I - Primary (Main) Supports (most important):</b>", body_style))
for s in [
    "<b>Transverse cervical (Cardinal/Mackenrodt's) ligament:</b> Most important ligament; runs from cervix and upper vagina to lateral pelvic wall (fascia of obturator internus); prevents lateral displacement and downward prolapse.",
    "<b>Pubocervical ligament:</b> From cervix to pubic symphysis (anterior); prevents posterior displacement.",
    "<b>Uterosacral (Rectouterine) ligament:</b> From posterior cervix to sacrum (S2-S4); keeps cervix retracted posteriorly and prevents forward displacement; most important in maintaining anteversion.",
]:
    story.append(Paragraph(f"• {s}", bullet_style))
story.append(Paragraph("<b>LEVEL II - Secondary Supports:</b>", body_style))
for s in [
    "<b>Levator ani muscle (pelvic floor):</b> The most important muscular support; forms the pelvic diaphragm; 'levator plate' provides the platform on which the uterus rests.",
    "<b>Perineal body:</b> Supports the posterior vaginal wall.",
    "<b>Urogenital diaphragm:</b> Supports the bladder neck and urethra.",
]:
    story.append(Paragraph(f"• {s}", bullet_style))
story.append(Paragraph("<b>LEVEL III - Accessory (Peritoneal fold) Supports:</b>", body_style))
for s in [
    "<b>Broad ligament:</b> Double fold of peritoneum extending from uterus to lateral pelvic wall; prevents lateral displacement; contains mesovarium, mesosalpinx, round ligament, ovarian ligament, uterine vessels.",
    "<b>Round ligament of uterus:</b> From uterine cornu to labium majus via inguinal canal; maintains anteversion (less important mechanically).",
    "<b>Peritoneum itself:</b> Vesicouterine pouch anteriorly, Pouch of Douglas (rectouterine pouch) posteriorly.",
]:
    story.append(Paragraph(f"• {s}", bullet_style))
story.append(Paragraph(
    "<b>Clinical note:</b> Prolapse of the uterus occurs mainly due to damage to the cardinal ligament and levator ani (during childbirth). Uterosacral ligaments are used in surgical repair (sacrospinous fixation).",
    body_style
))
story.append(Paragraph(
    "<i>(Ref: Vishram Singh - Pelvis & Perineum; Ashwini Sir Notes - Uterus supports)</i>",
    ParagraphStyle('ref', parent=body_style, fontSize=9, textColor=colors.grey)
))

# Q5b
story.append(Spacer(1, 4))
story.append(Paragraph("(b) Artery Supply of Uterus", subq_style))
uterus_art = [
    ["Artery", "Origin", "Course & Supply"],
    ["Uterine artery (main)", "Anterior division of internal iliac artery (hypogastric artery)", "Runs in the base of broad ligament; crosses ureter ('water under bridge') 1.5 cm lateral to cervix; ascends along lateral border of uterus; anastomoses with ovarian artery at uterine cornu"],
    ["Ovarian artery", "Abdominal aorta (at L2 level)", "Enters broad ligament via suspensory ligament of ovary; supplies ovary, uterine tube, and fundus of uterus; anastomoses with uterine artery"],
    ["Vaginal artery", "Anterior division of internal iliac", "Supplies upper vagina, cervix (with uterine artery)"],
]
ta = Table(uterus_art, colWidths=[3.5*cm, 5*cm, 7.5*cm])
ta.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#1565c0')),
    ('TEXTCOLOR', (0,0), (-1,0), colors.white),
    ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
    ('FONTSIZE', (0,0), (-1,-1), 9),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#f5f5f5'), colors.white]),
    ('GRID', (0,0), (-1,-1), 0.5, colors.grey),
    ('VALIGN', (0,0), (-1,-1), 'TOP'),
    ('PADDING', (0,0), (-1,-1), 5),
]))
story.append(ta)
story.append(Paragraph(
    "<b>Important surgical point:</b> The uterine artery crosses the ureter 1.5 cm lateral to the supravaginal cervix at the base of the broad ligament (\"water flows under the bridge\"). This is critical during hysterectomy to avoid ureteric injury when ligating the uterine artery.",
    body_style
))
story.append(Paragraph(
    "<b>Venous drainage:</b> Uterine venous plexus drains via uterine vein into internal iliac vein.",
    body_style
))

# Q5c
story.append(Spacer(1, 4))
story.append(Paragraph("(c) Parts and Measurements of Uterus", subq_style))
story.append(Paragraph(
    "The adult nulliparous uterus is pear-shaped. Normal measurements:",
    body_style
))
story.append(Paragraph(
    "• <b>Length:</b> 7.5 cm (body 5 cm + cervix 2.5 cm) | <b>Width:</b> 5 cm at fundus | <b>Thickness:</b> 2.5 cm | <b>Weight:</b> 30-40 g",
    bullet_style
))
story.append(Paragraph("<b>Parts of the uterus:</b>", body_style))
parts_data = [
    ["Part", "Description", "Features"],
    ["Fundus", "Rounded upper part above uterine tube openings", "Covered by peritoneum; site of implantation in anomalies"],
    ["Body (Corpus)", "Main triangular part between fundus and cervix; 5 cm", "Cavity is triangular; anterior wall = 4 cm, posterior = 4.5 cm"],
    ["Isthmus", "0.5 cm narrow junction between body and cervix", "Lower uterine segment in pregnancy; site of LSCS incision; contains internal os"],
    ["Cervix", "Cylindrical lower part; 2.5 cm; projects into vagina", "Supravaginal (above vaginal fornix) and vaginal (portio vaginalis) parts; external os; cervical canal"],
]
tp = Table(parts_data, colWidths=[2.5*cm, 5.5*cm, 8*cm])
tp.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#1565c0')),
    ('TEXTCOLOR', (0,0), (-1,0), colors.white),
    ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'),
    ('FONTSIZE', (0,0), (-1,-1), 9),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#f5f5f5'), colors.white]),
    ('GRID', (0,0), (-1,-1), 0.5, colors.grey),
    ('VALIGN', (0,0), (-1,-1), 'TOP'),
    ('PADDING', (0,0), (-1,-1), 5),
]))
story.append(tp)
story.append(Paragraph(
    "<b>Normal position:</b> Anteverted (forward relative to vaginal axis) and anteflexed (forward bend at isthmus). Retroversion and retroflexion are abnormal.",
    body_style
))

# Q5d
story.append(Spacer(1, 4))
story.append(Paragraph("(d) Corpus Luteum and Hormones Secreted by it", subq_style))
story.append(Paragraph(
    "<b>Definition:</b> The corpus luteum (Latin: yellow body) is a transient endocrine structure formed in the ovary from the ruptured Graafian follicle after ovulation.",
    body_style
))
story.append(Paragraph("<b>Formation:</b>", body_style))
for s in [
    "After ovulation (day 14), the remaining granulosa and theca interna cells of the follicle undergo <b>luteinization</b> (accumulate yellow lipid - lutein).",
    "Granulosa lutein cells: large, pale, more abundant",
    "Theca lutein cells: smaller, darker, peripheral",
    "LH surge triggers luteinization and steroidogenesis.",
]:
    story.append(Paragraph(f"• {s}", bullet_style))
story.append(Paragraph("<b>Hormones secreted:</b>", body_style))
for s in [
    "<b>Progesterone (main hormone):</b> Prepares endometrium for implantation (secretory phase); maintains uterine quiescence in early pregnancy; inhibits myometrial contractions; causes rise in basal body temperature.",
    "<b>Estrogen:</b> Continued secretion (mainly estradiol); works synergistically with progesterone.",
    "<b>Inhibin A:</b> Inhibits FSH secretion.",
    "<b>Relaxin:</b> Small amounts, helps in implantation and early pregnancy.",
]:
    story.append(Paragraph(f"• {s}", bullet_style))
story.append(Paragraph("<b>Fate:</b>", body_style))
for s in [
    "<b>If no pregnancy:</b> Corpus luteum degenerates after 14 days → corpus albicans (white scar). Progesterone withdrawal triggers menstruation.",
    "<b>If pregnancy occurs:</b> hCG from syncytiotrophoblast 'rescues' the corpus luteum → Corpus luteum of pregnancy persists for 3-4 months, until placenta takes over (luteo-placental shift).",
]:
    story.append(Paragraph(f"• {s}", bullet_style))
story.append(Paragraph(
    "<i>(Ref: Vishram Singh - Reproductive System; Ashwini Sir Notes - Ovary)</i>",
    ParagraphStyle('ref', parent=body_style, fontSize=9, textColor=colors.grey)
))

# Q6
story.append(Spacer(1, 8))
story.append(Paragraph("Q6) Write Short Notes  [3x5 = 15 marks]", question_style))

# Q6a
story.append(Paragraph("(a) Medial Longitudinal Arch of Foot", subq_style))
story.append(Paragraph(
    "<b>Definition:</b> The medial longitudinal arch is the main weight-bearing arch of the foot, higher and more important than the lateral longitudinal arch.",
    body_style
))
story.append(Paragraph("<b>Bones forming the arch (medial to lateral):</b> Calcaneus → Talus (keystone) → Navicular → Three cuneiforms (medial, intermediate, lateral) → 1st, 2nd, 3rd metatarsals.", body_style))
story.append(Paragraph("<b>Supports of the arch:</b>", body_style))
story.append(Paragraph("<u>Passive supports (Ligaments):</u>", ParagraphStyle('bb2', parent=bullet_style, leftIndent=20)))
for s in [
    "<b>Plantar calcaneonavicular (Spring) ligament:</b> Most important passive support; from sustentaculum tali of calcaneus to navicular; supports head of talus (keystone)",
    "Long plantar ligament: calcaneus to cuboid and 2nd-5th metatarsal bases",
    "Short plantar (plantar calcaneocuboid) ligament",
    "Plantar fascia (plantar aponeurosis): 'Bowstring' of the arch; from calcaneal tuberosity to toes",
]:
    story.append(Paragraph(f"• {s}", ParagraphStyle('bb3', parent=bullet_style, leftIndent=35)))
story.append(Paragraph("<u>Active supports (Muscles):</u>", ParagraphStyle('bb2', parent=bullet_style, leftIndent=20)))
for s in [
    "<b>Tibialis posterior (main dynamic support):</b> Inserts on navicular and sustentaculum; holds arch",
    "Flexor hallucis longus: Acts as 'tie-beam' on medial side",
    "Flexor digitorum longus: Supports arch",
    "Intrinsic foot muscles (abductor hallucis, flexor digitorum brevis)",
    "Peroneus longus: Crosses from lateral to medial - 'sling' under the arch",
]:
    story.append(Paragraph(f"• {s}", ParagraphStyle('bb3', parent=bullet_style, leftIndent=35)))
story.append(Paragraph(
    "<b>Clinical significance:</b> Flat foot (pes planus) = fallen medial arch; Pes cavus = abnormally high arch.",
    body_style
))

# Q6b
story.append(Spacer(1, 4))
story.append(Paragraph("(b) Femoral Triangle", subq_style))
story.append(Paragraph(
    "The femoral triangle is a <b>subfascial space</b> on the anteromedial aspect of the upper thigh, below the inguinal ligament.",
    body_style
))
story.append(Paragraph("<b>Boundaries:</b>", body_style))
for s in [
    "<b>Base (superior):</b> Inguinal ligament",
    "<b>Medial border:</b> Medial border of adductor longus",
    "<b>Lateral border:</b> Medial border of sartorius",
    "<b>Floor:</b> Iliopsoas (lateral) + pectineus (medial) + adductor longus (apex)",
    "<b>Roof:</b> Fascia lata (deep fascia of thigh) + skin",
    "<b>Apex:</b> Where medial border of sartorius meets medial border of adductor longus (~10 cm below inguinal ligament); continuous with adductor canal",
]:
    story.append(Paragraph(f"• {s}", bullet_style))
story.append(Paragraph("<b>Contents (Lateral to Medial: NAVEL):</b>", body_style))
for s in [
    "<b>N</b>erve - Femoral nerve (lateral, outside femoral sheath)",
    "<b>A</b>rtery - Femoral artery (within sheath, lateral to vein)",
    "<b>V</b>ein - Femoral vein (within sheath, medial to artery)",
    "<b>E</b>mpty space - Femoral canal (medial compartment of sheath; contains Cloquet's lymph node, fat, lymphatics)",
    "<b>L</b>ymphatics (deep inguinal lymph nodes)",
    "Also: Deep inguinal lymph nodes, femoral branch of genitofemoral nerve",
]:
    story.append(Paragraph(f"• {s}", bullet_style))
story.append(Paragraph(
    "<b>Femoral sheath:</b> Funnel-shaped fascial sheath of femoral vessels (fascia iliaca + transversalis fascia); extends 3-4 cm below inguinal ligament; contains 3 compartments (lateral: femoral artery, intermediate: femoral vein, medial: femoral canal). Note: femoral nerve is NOT in the femoral sheath.",
    body_style
))
story.append(Paragraph(
    "<b>Clinical:</b> Femoral hernia passes through the femoral canal and appears below and lateral to the pubic tubercle. Femoral pulse palpable at midinguinal point.",
    body_style
))

# Q6c
story.append(Spacer(1, 4))
story.append(Paragraph("(c) Adductor Longus Muscle", subq_style))
for s in [
    "<b>Origin:</b> Body of pubis, below pubic crest, between pubic tubercle and pubic symphysis (anterior surface).",
    "<b>Insertion:</b> Middle one-third of linea aspera of femur (medial lip).",
    "<b>Nerve supply:</b> Anterior division of obturator nerve (L2, L3, L4).",
    "<b>Action:</b> Adduction of thigh (main action); assists in flexion and medial rotation of hip.",
    "<b>Relations:</b> Forms medial boundary of femoral triangle; anterior surface of adductor longus is the floor of the lower part of femoral triangle; the femoral artery rests on adductor longus in the adductor canal.",
    "<b>Applied anatomy:</b> 'Footballer's groin' = avulsion injury at origin. Adductor longus forms the medial boundary of femoral triangle - enlargement (lymphoma, metastasis) can fill the triangle.",
]:
    story.append(Paragraph(f"• {s}", bullet_style))

# Q7
story.append(Spacer(1, 8))
story.append(Paragraph("Q7) Write Briefly - Clinical Anatomy  [5x2 = 10 marks]", question_style))

# Q7a
story.append(Paragraph("(a) The patella has an inherent tendency to dislocate laterally", subq_style))
story.append(Paragraph("<b>Anatomical reasons for lateral patellar dislocation tendency:</b>", body_style))
for s in [
    "<b>Quadriceps (Q) angle (Q-angle):</b> The quadriceps muscle line of pull is directed laterally (from ASIS to tibial tuberosity, the line passes lateral to midline). This lateral pull is the main reason.",
    "<b>Lateral femoral condyle less prominent:</b> The lateral lip of the patellar groove (trochlear groove) is lower than normal, reducing bony resistance to lateral dislocation.",
    "<b>Vastus medialis obliquus (VMO):</b> The oblique fibers of vastus medialis (pull medially at 50-55°) counteract lateral pull; if VMO is weak (as in disuse), lateral tendency increases.",
    "<b>Lateral retinaculum tight:</b> Tight lateral retinaculum and iliotibial band pull patella laterally.",
    "<b>Valgus knee (knock knee):</b> Increases the Q-angle, enhancing lateral drift.",
    "<b>High-riding patella (patella alta):</b> Less bony contact in trochlear groove, easier lateral displacement.",
    "<b>Femoral anteversion / external tibial torsion:</b> Rotational malalignment increases Q-angle.",
]:
    story.append(Paragraph(f"• {s}", bullet_style))

# Q7b
story.append(Spacer(1, 4))
story.append(Paragraph("(b) In acute osteomyelitis of upper end of tibia, the knee joint is NOT involved", subq_style))
for s in [
    "In the upper end of tibia, the <b>epiphyseal plate (growth plate)</b> is located <b>extraarticular</b> (outside the knee joint capsule).",
    "The knee joint capsule attaches below the articular surfaces; the upper tibial epiphysis (proximal tibial growth plate) is <b>outside the joint capsule</b>.",
    "In acute osteomyelitis, the infection spreads from the metaphysis to the epiphysis. However, since the epiphyseal plate is extraarticular, pus does not track into the knee joint.",
    "Compare with the <b>hip joint</b>: The upper femoral epiphysis is INTRAarticular (within hip joint capsule), so osteomyelitis of the upper femur can spread to the hip joint and cause septic arthritis.",
    "Therefore, the knee joint capsule acts as a protective barrier, and the knee joint is spared in tibial osteomyelitis.",
    "<b>Contrast:</b> At the upper end of humerus and femur, the epiphysis is intraarticular → joint is involved.",
]:
    story.append(Paragraph(f"• {s}", bullet_style))

# Q7c
story.append(Spacer(1, 4))
story.append(Paragraph("(c) Avascular necrosis of head of femur is more common in intracapsular fractures", subq_style))
story.append(Paragraph(
    "<b>Blood supply of head of femur:</b>",
    body_style
))
for s in [
    "<b>Medial circumflex femoral artery (MCFA):</b> Main supply (80%) via retinacular arteries (superior, anterior, inferior retinacular arteries) that run along the femoral neck INSIDE the joint capsule (intracapsularly).",
    "<b>Lateral circumflex femoral artery (LCFA):</b> Minor supply via inferior retinacular artery.",
    "<b>Artery of ligamentum teres (foveal artery):</b> Branch of obturator artery; supplies only the small area around the fovea; important only in children under 8 years; negligible in adults.",
]:
    story.append(Paragraph(f"• {s}", bullet_style))
story.append(Paragraph("<b>Why intracapsular > extracapsular:</b>", body_style))
for s in [
    "<b>Intracapsular fractures</b> (subcapital, transcervical): Retinacular vessels run along the femoral neck within the joint capsule; fracture disrupts these vessels + intracapsular hematoma compresses them → AVN of femoral head.",
    "<b>Extracapsular fractures</b> (intertrochanteric, subtrochanteric): Fracture is outside the capsule; retinacular vessels along the neck are intact; blood supply to head preserved → Low risk of AVN.",
    "Subcapital fracture has the highest rate of AVN (up to 30%).",
]:
    story.append(Paragraph(f"• {s}", bullet_style))

# Q7d
story.append(Spacer(1, 4))
story.append(Paragraph("(d) Traumatic dislocation of hip joint is uncommon", subq_style))
for s in [
    "<b>Deep acetabulum:</b> The acetabulum is a deep, cup-shaped socket that covers more than half (over 170°) of the femoral head, providing inherent bony stability.",
    "<b>Strong ligaments:</b> The hip joint has the strongest ligaments in the body: Iliofemoral ligament (Y-shaped/ligament of Bigelow - strongest, resists extension and lateral rotation), ischiofemoral ligament, pubofemoral ligament.",
    "<b>Strong muscles:</b> Surrounded by powerful muscles of the thigh and buttock (glutei, iliopsoas, hamstrings) providing muscular stability.",
    "<b>Negative intra-articular pressure:</b> The joint capsule maintains negative pressure (suction effect) holding the head in the socket.",
    "<b>When it does dislocate:</b> Requires very high-energy trauma (dashboard injury - posterior dislocation, 90% of cases). The mechanism is axial force along the femur with hip flexed and adducted.",
]:
    story.append(Paragraph(f"• {s}", bullet_style))

# Q7e
story.append(Spacer(1, 4))
story.append(Paragraph("(e) Anatomical reasons for recurrent dislocation of patella", subq_style))
for s in [
    "<b>Generalized ligamentous laxity:</b> Hypermobile joints allow medial retinaculum to stretch, allowing lateral displacement.",
    "<b>Small, high-riding patella (patella alta):</b> Less patellar engagement in the trochlear groove (less bony constraint).",
    "<b>Shallow trochlear groove (trochlear dysplasia):</b> Less bony socket to retain the patella.",
    "<b>Lateral femoral condyle hypoplasia:</b> Reduced lateral buttress against lateral patellar escape.",
    "<b>Increased Q-angle:</b> Valgus knee, external tibial torsion, femoral anteversion all increase lateral pull.",
    "<b>Vastus medialis obliquus weakness:</b> Reduced medial dynamic stabilization.",
    "<b>Previous dislocation:</b> Stretches/tears the medial patellofemoral ligament (MPFL) - primary passive restraint; not repaired properly → repeated events.",
    "<b>Medial patellofemoral ligament (MPFL) laxity:</b> Torn in first dislocation; if not healed, allows recurrent dislocation.",
]:
    story.append(Paragraph(f"• {s}", bullet_style))

# Q8
story.append(Spacer(1, 8))
story.append(Paragraph("Q8) Write Briefly - Clinical Anatomy  [5x2 = 10 marks]", question_style))

# Q8a
story.append(Paragraph("(a) The distended urinary bladder can be drained through the anterior abdominal wall without injuring the peritoneum", subq_style))
for s in [
    "When the urinary bladder is empty, it lies entirely in the <b>true pelvis (lesser pelvis)</b>, and the peritoneum drapes over its superior surface.",
    "When the bladder is <b>distended</b>, it rises up above the pubic symphysis into the <b>anterior abdominal wall</b>. As it rises, it <b>peels the peritoneum off the anterior abdominal wall</b>, creating a <b>potential space between the anterior abdominal wall and the peritoneum</b> (retropubic/prevesical space of Retzius).",
    "This means a needle or trocar can be inserted in the <b>midline suprapubically</b> (above the pubic symphysis) to reach the distended bladder <b>extraperitoneally</b>, without entering the peritoneal cavity.",
    "This is the basis of <b>suprapubic cystostomy (SPC)</b> - surgical drainage of bladder via suprapubic route in cases of urethral obstruction, urethral trauma, or urinary retention where urethral catheterization is not possible.",
]:
    story.append(Paragraph(f"• {s}", bullet_style))

# Q8b
story.append(Spacer(1, 4))
story.append(Paragraph("(b) Anatomical reasons for pain in hypogastric region at end of micturition", subq_style))
for s in [
    "During micturition, the trigone contracts and urine flows down the urethra. At the <b>end of micturition</b>, the last drops of urine are expelled by a terminal contraction of the <b>detrusor muscle</b>.",
    "The trigone and bladder base (where the ureters enter) contract forcefully; the area of the trigone is supplied by visceral afferents that refer pain to the <b>hypogastric (suprapubic) region</b> (L2 dermatome).",
    "In conditions like <b>cystitis</b>, the inflamed trigone is hypersensitive; terminal contractions cause a painful stinging/burning sensation referred to the hypogastric region and perineum.",
    "The <b>internal urethral sphincter</b> (smooth muscle, involuntary) opens at the beginning and closes at the end; the closure causes a reflex detrusor squeeze that can be painful in an inflamed bladder.",
    "Also: In males, at the end of urination, small amounts of urine reflux into the prostatic urethra; if there is <b>prostatic hypertrophy or trigonitis</b>, this causes hypogastric discomfort.",
]:
    story.append(Paragraph(f"• {s}", bullet_style))

# Q8c
story.append(Spacer(1, 4))
story.append(Paragraph("(c) In benign hypertrophy of prostate, the adenoma is enucleated leaving behind the capsule of the gland", subq_style))
story.append(Paragraph(
    "<b>Anatomy of prostate - two zones:</b>",
    body_style
))
for s in [
    "<b>Inner (transitional) zone:</b> Periurethral glands and transitional zone; this is the zone that undergoes <b>benign prostatic hyperplasia (BPH)</b>. The enlarging nodules of BPH compress the outer zone.",
    "<b>Outer (peripheral + central) zone:</b> The compressed outer true prostatic glandular tissue forms a <b>false capsule</b> (surgical capsule) around the hypertrophied inner zone.",
    "In BPH, the hypertrophied inner glandular mass (adenoma) is separated from the peripheral true gland by a well-defined <b>cleavage plane</b> (the 'surgical capsule' or false capsule).",
    "During <b>open prostatectomy (Millin's/transvesical retropubic)</b> or TURP (transurethral resection), the surgeon finds this cleavage plane and enucleates (scoops out) the adenoma, leaving behind the outer true glandular capsule intact.",
    "The outer capsule contains the neurovascular bundles; preserving it minimizes postoperative incontinence and preserves the external sphincter mechanism.",
    "<b>Important:</b> In <b>carcinoma of prostate</b>, the tumor arises in the PERIPHERAL zone and does NOT have this cleavage plane; therefore simple enucleation is NOT possible → radical prostatectomy or radiation is needed.",
]:
    story.append(Paragraph(f"• {s}", bullet_style))

# Q8d
story.append(Spacer(1, 4))
story.append(Paragraph("(d) Ureteric stones can be palpated on vaginal examination", subq_style))
for s in [
    "The ureter runs retroperitoneally in the pelvis and crosses the pelvic brim at the bifurcation of the common iliac artery.",
    "In the pelvis, the lower ureter runs close to the <b>lateral fornix of the vagina</b>. At the level of the intramural ureter (where it enters the bladder), it is <b>only 1-2 cm from the lateral vaginal fornix</b>.",
    "The ureter passes through the base of the broad ligament, lies 1.5 cm lateral to the cervix, and then runs anteromedially to enter the trigone of the bladder.",
    "A stone lodged in the <b>lower third of the ureter</b> (pelvic ureter, juxtavesical segment) can be palpated through the <b>lateral vaginal fornix</b> during bimanual pelvic examination, as it is very close to the vaginal wall at this point.",
    "This is also the region where the ureter is at risk of injury during hysterectomy.",
]:
    story.append(Paragraph(f"• {s}", bullet_style))

# Q8e
story.append(Spacer(1, 4))
story.append(Paragraph("(e) Bacterial infection of vagina is more common at extremes of life (infancy and after menopause)", subq_style))
for s in [
    "<b>Normal protection:</b> In reproductive years (menarche to menopause), estrogen stimulates vaginal epithelium to produce glycogen; Lactobacillus acidophilus (Doderlein's bacilli) ferment glycogen to lactic acid, maintaining an <b>acidic vaginal pH (3.8-4.5)</b>, which inhibits bacterial growth.",
    "<b>In infancy:</b> Neonates have maternal estrogen effect initially, but this wanes within weeks; absence of estrogen → thin atrophic vaginal epithelium → little glycogen → no lactic acid production → vaginal pH rises (alkaline) → susceptibility to bacterial vaginosis and vulvovaginitis.",
    "<b>After menopause:</b> Estrogen levels fall sharply → vaginal epithelium becomes thin, atrophic, and dry (atrophic vaginitis) → reduced glycogen → loss of Lactobacilli → alkaline pH → common bacterial infections.",
    "<b>Predisposing factors at extremes:</b> Thin atrophic epithelium (easily abraded), alkaline pH, lack of normal flora, poor mucous secretion.",
    "<b>Common organisms:</b> In infancy - E. coli, streptococci; After menopause - Gardnerella vaginalis, E. coli, streptococci.",
]:
    story.append(Paragraph(f"• {s}", bullet_style))

# ---- FOOTER ----
story.append(Spacer(1, 16))
story.append(HRFlowable(width="100%", thickness=1, color=colors.HexColor('#1a237e')))
story.append(Spacer(1, 4))
story.append(Paragraph(
    "<b>PDF made by Mihir</b> | Reference: Ashwini Sir Notes &amp; Anatomy by Vishram Singh (Volumes I, II, III) | Gray's Anatomy for Students",
    ParagraphStyle('foot', parent=styles['Normal'], fontSize=9, textColor=colors.HexColor('#37474f'), alignment=TA_CENTER)
))
story.append(Paragraph(
    "3rd Internal Paper II Remedial Examination - ANATOMY | Date: 20.7.26",
    ParagraphStyle('foot2', parent=styles['Normal'], fontSize=8, textColor=colors.grey, alignment=TA_CENTER)
))

doc.build(story)
print(f"PDF saved to: {OUTPUT}")
Running Command

cd /tmp/workspace/anatomy-exam && python generate_pdf.py 2>&1

Running Command

ls -lh /tmp/workspace/anatomy-exam/Anatomy_Answers_Mihir.pdf

Your PDF is ready! Download it here:

Anatomy Answers Mihir

PDF Document · PDF


Here's a summary of everything covered in the PDF:
Header: "PDF made by Mihir | Reference: Ashwini Sir Notes & Anatomy by Vishram Singh"

SECTION A (50 marks)
Q1 - Stomach (15 marks)
  • (a) Artery supply: Full table of all 6 arteries (left/right gastric, left/right gastro-omental, short gastric, posterior gastric) with origins from celiac trunk + diagram description for drawing
  • (b) Cells of gastric mucosa: Table of all 7 cell types (surface mucous, neck mucous, parietal/oxyntic, chief/zymogenic, G cells, D cells, ECL cells) with secretions
  • (c) Microanatomy diagram: Detailed description of all 4 layers (mucosa, submucosa, muscularis externa with 3 sublayers, serosa) with nerve plexuses
  • (d) Gastric ligaments: All 6 ligaments with contents (gastrohepatic, hepatoduodenal, gastrocolic, gastrosplenic, gastrophrenic, gastropancreatic)
Q2 - Short notes (15 marks)
  • (a) Tibialis posterior: Origin, insertion (navicular + cuneiforms + metatarsals), L4-L5 nerve supply, Tom Dick ANVNHarry mnemonic
  • (b) Flat foot: Medial arch bones (calcaneus-talus-navicular-cuneiforms-metatarsals), spring ligament, tibialis posterior support
  • (c) Femoral nerve branches: Complete list - anterior cutaneous branches, posterior deep branches, saphenous nerve, motor branches to all quads + iliacus + pectineus
  • (d) Adductor magnus openings: Femoral artery/vein through hiatus becoming popliteal; perforating arteries through upper foramina
  • (e) First part of duodenum: Mobility, smooth cap on X-ray, site of peptic ulcer, relations
Q3 - Applied anatomy (10 marks): Referred pain T10, Batson's plexus, shorter female urethra, membranous urethral vulnerability, genitofemoral nerve-ureteric connection
Q4 - Fill in blanks (10 marks): All 10 answers (ciliated columnar, transitional epithelium, tibial nerve, saphenous, sural, tibial-sciatic, obturator, left umbilical vein, IVC, splenic artery)

SECTION B (50 marks)
Q5 - Uterus (15 marks)
  • (a) Supports: 3-level classification - Cardinal (Mackenrodt's), pubocervical, uterosacral ligaments + levator ani + broad/round ligaments
  • (b) Artery supply: Uterine artery from internal iliac, "water under bridge" ureter crossing, ovarian artery anastomosis
  • (c) Parts & measurements: 7.5 cm (body 5 + cervix 2.5), fundus/body/isthmus/cervix table; LSCS at isthmus
  • (d) Corpus luteum: Formation, progesterone + estrogen + inhibin A secretion, rescue by hCG in pregnancy
Q6 - Short notes (15 marks): Medial longitudinal arch (spring ligament + tibialis posterior), Femoral triangle (NAVEL contents, femoral sheath), Adductor longus
Q7 - Clinical (10 marks): Lateral patellar dislocation (Q-angle, VMO, trochlear dysplasia), tibial osteomyelitis (extraarticular epiphysis), AVN of femoral head (MCFA retinacular vessels), hip stability, recurrent patellar dislocation (MPFL tear)
Q8 - Clinical (10 marks): Suprapubic cystostomy (space of Retzius), end-of-micturition pain, BPH enucleation (false capsule/surgical capsule), lower ureteric stone palpation vaginally, atrophic vaginitis (loss of Lactobacilli + alkaline pH)
This is a shared conversation. Sign in to Orris to start your own chat.