answer it according to uhs standard gynae and obs book ten teacher Arshad chohan and irfan masood
Mullerian duct development female reproductive system embryology diagram

Educational panel illustrating the expression profile of FOXE1 mRNA during avian Müllerian duct development. Section (a) contains whole-mount in situ hybridization (WISH) and transverse histological sections across three developmental stages: E5.5 (stage 28), E6.5 (stage 31), and E8.5 (stage 35) in both sexes. WISH images demonstrate the progressive elongation of the Müllerian duct (MD) along the mesonephros. Histological sections reveal specific localization of FOXE1 mRNA within the Müllerian duct mesenchyme (MDM), with a notable absence in the Müllerian duct epithelium (MDE). A sexually dimorphic pattern emerges at E8.5, where female ducts maintain strong expression while male ducts show significant downregulation, corresponding to the onset of male duct regression. Section (b) provides quantitative RT-PCR data, displaying a bar chart of fold change in FOXE1 mRNA levels. The graph confirms a statistically significant increase in FOXE1 expression in female ducts at E8.5 compared to earlier stages and male counterparts (** p < 0.01). This content serves as a model for reproductive system development and the molecular regulation of sexually dimorphic organogenesis.

This clinical photograph shows an intraoperative view of a female reproductive system following the resection of a ruptured ectopic pregnancy. The image illustrates a congenital Mullerian duct anomaly, specifically a unicornuate uterus with a non-communicating rudimentary horn. A white arrow identifies the main unicornuate uterine body, while a green arrow points to the left-sided rudimentary horn. The connection between the two structures is visible as a bridge of dense fibro-muscular tissue. Yellow arrows indicate the bilateral ovaries, which appear in their relative anatomical positions. The tissues are fleshy and vascularized, consistent with a surgical environment. This case demonstrates the anatomical relationships associated with Class II Mullerian anomalies according to the American Society for Reproductive Medicine (ASRM) classification, highlighting the risk of obstetric complications such as rudimentary horn pregnancy and rupture.

This composite educational image features an axial T2-weighted magnetic resonance image (MRI) of the female pelvis and an accompanying anatomical illustration (3) demonstrating a Müllerian duct anomaly, specifically a bicornuate or didelphys uterus. The MRI highlights two distinct uterine horns: the right horn (1) and the left horn (2). A linear hypointense structure is visible within the right uterine cavity, representing a postoperative drainage tube. The T2-weighted sequence provides high contrast, showing the hyperintense (fluid-filled) endometrial cavities against the intermediate-signal myometrium. The anatomical diagram (3) provides a schematic representation of the dual-chambered uterine configuration, illustrating the separation of the horns and their relationship to the cervical region. This visual is designed for medical students and clinicians to study congenital uterine malformations and postoperative radiological assessment. Clinical relevance includes the diagnosis of obstructive reproductive tract anomalies and associated renal conditions like kidney aplasia.

This diagnostic image is a hysterosalpingogram (HSG), a radiographic study using radiopaque contrast material to evaluate the female reproductive tract. The image demonstrates a unicornuate uterus (Class II Mullerian duct anomaly), characterized by a single, narrow, elongated uterine cavity directed toward one side of the pelvis (unilateral cornual development). A single fallopian tube is visualized extending from the horn, with the presence of contrast spill into the peritoneal cavity, indicating tubal patency on the functional side. There is a complete absence of the contralateral uterine horn and fallopian tube. The bony pelvic anatomy, including the iliac wings and femoral heads, serves as the anatomical background. This imaging is clinically significant for diagnosing congenital uterine anomalies in patients presenting with infertility or recurrent pregnancy loss. Key educational concepts include Mullerian duct malformations, HSG interpretation, and assessment of tubal patency.
sexual differentiation male female external genitalia embryo indifferent stage

Clinical photograph of a 15-year-old patient with 46,XY Differences of Sexual Development (DSD), specifically illustrating features of 17̢-hydroxysteroid dehydrogenase type 3 (17̢-HSD3) deficiency. The image displays the lower torso and perineal region in a supine position. Clinical examination reveals Tanner Stage 4 pubic hair with a male-pattern distribution extending toward the umbilicus. The external genitalia are ambiguous, characterized by severe virilization including a micropenis and fused labioscrotal folds, with no clearly identifiable female labia majora or minora. The chest is visible in the upper frame, demonstrating a lack of breast development (Tanner Stage 1), indicative of primary amenorrhea and a lack of estrogenic puberty. This visual material is used to demonstrate the physical phenotype of male pseudohermaphroditism where androgen conversion is impaired, leading to female or ambiguous external morphology at birth and significant virilization during puberty.

Comparison of sexual dimorphism in the external genitalia of male and female mouse fetuses at Gestational Day (GD) 17.0. The top panel uses purple highlights to emphasize key diagnostic features, while the bottom panel shows the raw photographs with light outlines. In the male (left), the ventral midline at the base of the genital tubercle is characterized by a 'urethral seam' (urethral raphe), appearing as a closed, raised ridge of skin resulting from the canalization and fusion of the urethral tube. In contrast, the female (right) exhibits a 'proximal urethral meatus,' visible as a distinct open dot or small orifice at the base of the clitoris. These features provide a reliable morphological method for sex determination in late-stage fetal mice. Additional differences in preputial swelling and overall tubercle shape (irregular hexagon in males versus a broader-based hexagon in females) are also visible, facilitating classification even when the primary midline structures are partially obscured.

Clinical photograph of the male external genitalia of a 15-year-old patient, demonstrating features consistent with Tanner Stage I development. The image shows prepubertal anatomy characterized by the complete absence of pubic hair (adrenarche) and a lack of secondary sexual characteristics. The penis, scrotum, and testes appear small, maintaining the proportions and size typically observed in early childhood. This visual findings represent a significant delay in physical maturation for the patient's chronological age, clinically associated with conditions such as idiopathic hypogonadotropic hypogonadism. The skin across the inguinal and genital region appears uniform in color without signs of androgen-induced rugosity or pigmentation changes.
| Kidney | Fate |
|---|---|
| Pronephros (wk 3-4) | Transient, non-functional, regresses |
| Mesonephros (wk 4-8) | Functions briefly; its duct = Wolffian duct |
| Metanephros (wk 5 onward) | Becomes the permanent kidney; its duct = ureter |
| Mullerian Duct Region | Adult Female Structure |
|---|---|
| Cranial (unfused) portions | Fallopian tubes (fimbriae develop from müllerian tunnels at the upper end) |
| Middle fused portions | Fundus and corpus of uterus |
| Distal fused portions (uterovaginal primordium) | Cervix + upper 1/3 of vagina |
| Urogenital sinus | Lower 2/3 of vagina + external female genitalia |
The caudal Mullerian ducts cross ventral to the Wolffian ducts, fuse, and form the uterovaginal canal, which gives rise to the cervix and upper vagina. - Medical Physiology, p.1578
| Factor | Detail |
|---|---|
| Genetic sex | Determined at fertilization (46,XX = female; 46,XY = male) |
| SRY gene (Y chromosome) | Encodes Testis-Determining Factor (TDF); triggers testicular development |
| Without SRY | Gonadal ridges differentiate into ovaries by default |
| With SRY | Sertoli cells develop, produce AMH; Leydig cells produce testosterone |
| Type | Defect | Result |
|---|---|---|
| Agenesis/Hypoplasia | Failure of Mullerian duct formation | MRKH syndrome |
| Unicornuate | One duct fails to develop | Single-horned uterus ± rudimentary horn |
| Didelphys | Complete failure of fusion | Double uterus, double cervix, double vagina |
| Bicornuate | Partial failure of fusion | Two uterine horns with a single cervix |
| Septate | Failure of septal resorption | Normal external contour, internal septum (most common anomaly) |
| Arcuate | Mild septal resorption failure | Minor fundal indentation (mildest form) |


| Boundary | Structure |
|---|---|
| Superior | Diaphragm |
| Inferior | Pelvic floor (levator ani + coccygeus muscles) |
| Anterior & lateral | Abdominal wall muscles |
| Posterior | Vertebral column + posterior abdominal wall muscles (psoas, iliacus, quadratus lumborum) |
| Week | Event |
|---|---|
| Week 3-4 | Pronephros forms and regresses |
| Week 4-6 | Mesonephros forms (Wolffian duct appears) |
| Week 6 | Mullerian duct appears; indifferent gonad present |
| Week 6-7 | SRY activated → testis determination (if 46,XY) |
| Week 8-9 | AMH produced → Mullerian regression in males |
| Week 8-10 | Testosterone → Wolffian duct development in males |
| Week 10 | Only one duct system survives per sex |
| Week 20 | Female internal genitalia fully formed from Mullerian ducts |
converte tha above answer into pdf including the flow charts and pictures and make it precise and delete the un necessary information only make the gyn ool los in it
mkdir -p /tmp/workspace/gyn001-pdf && ls /tmp/workspace/gyn001-pdf/
cd /tmp/workspace/gyn001-pdf && python3 -c "import requests; r = requests.get('https://cdn.orris.care/cdss_images/pmc_clinical_VQA_3dd9f5ce59660d6adc8cc8ebb33bbed146ccce84696ef3d5f2bf6076b5e5cff1.jpg', timeout=20); open('unicornuate_hsg.jpg','wb').write(r.content); print('img1 ok', r.status_code)" && python3 -c "import requests; r = requests.get('https://cdn.orris.care/cdss_images/pmc_clinical_VQA_cbff98f1da7e6365e73e2d0f546773b65a37e8f007cc2c1ce98d8506b4b64ff6.jpg', timeout=20); open('bicornuate_mri.jpg','wb').write(r.content); print('img2 ok', r.status_code)"
~/gyn001-pdf/generate_pdf.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import cm, mm
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
HRFlowable, Image, KeepTogether, PageBreak
)
from reportlab.platypus.flowables import Flowable
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.graphics.shapes import Drawing, Rect, String, Line, Arrow
from reportlab.graphics import renderPDF
import os
# ── paths ────────────────────────────────────────────────────────────────────
OUT = "/tmp/workspace/gyn001-pdf/GYN001_Genitourinary_Development.pdf"
IMG1 = "/tmp/workspace/gyn001-pdf/unicornuate_hsg.jpg"
IMG2 = "/tmp/workspace/gyn001-pdf/bicornuate_mri.jpg"
# ── colour palette ────────────────────────────────────────────────────────────
NAVY = colors.HexColor("#1a3a5c")
TEAL = colors.HexColor("#0d6e8a")
MINT = colors.HexColor("#e8f7f9")
AMBER = colors.HexColor("#f5a623")
LGREY = colors.HexColor("#f2f4f6")
WHITE = colors.white
BLACK = colors.HexColor("#1a1a1a")
RED = colors.HexColor("#c0392b")
GREEN = colors.HexColor("#27ae60")
# ── document ──────────────────────────────────────────────────────────────────
doc = SimpleDocTemplate(
OUT, pagesize=A4,
leftMargin=1.8*cm, rightMargin=1.8*cm,
topMargin=2*cm, bottomMargin=2*cm
)
W = A4[0] - 3.6*cm # usable width
# ── styles ────────────────────────────────────────────────────────────────────
ss = getSampleStyleSheet()
def S(name, **kw):
return ParagraphStyle(name, **kw)
title_sty = S("Title2", fontName="Helvetica-Bold", fontSize=20,
textColor=WHITE, alignment=TA_CENTER, spaceAfter=4)
sub_sty = S("Sub", fontName="Helvetica", fontSize=10,
textColor=colors.HexColor("#d0e8f0"), alignment=TA_CENTER)
h1_sty = S("H1", fontName="Helvetica-Bold", fontSize=13,
textColor=WHITE, spaceBefore=6, spaceAfter=2, leading=16)
h2_sty = S("H2", fontName="Helvetica-Bold", fontSize=11,
textColor=NAVY, spaceBefore=8, spaceAfter=3)
h3_sty = S("H3", fontName="Helvetica-BoldOblique", fontSize=10,
textColor=TEAL, spaceBefore=5, spaceAfter=2)
body_sty = S("Body2", fontName="Helvetica", fontSize=9,
textColor=BLACK, leading=13, spaceAfter=3, alignment=TA_JUSTIFY)
bullet_sty = S("Bullet2", fontName="Helvetica", fontSize=9,
textColor=BLACK, leading=13, leftIndent=12,
bulletIndent=0, spaceAfter=2)
note_sty = S("Note", fontName="Helvetica-Oblique", fontSize=8,
textColor=colors.HexColor("#555555"), spaceAfter=4)
caption_sty = S("Cap", fontName="Helvetica-Oblique", fontSize=8,
textColor=TEAL, alignment=TA_CENTER, spaceAfter=6)
def b(t): return f"<b>{t}</b>"
def i(t): return f"<i>{t}</i>"
def c(t, col): return f'<font color="{col}">{t}</font>'
# ── helper flowables ──────────────────────────────────────────────────────────
def section_header(title, lo=None):
"""Coloured section header band."""
data = [[Paragraph(title, h1_sty)]]
if lo:
data[0].append(Paragraph(lo, S("LO", fontName="Helvetica",
fontSize=8, textColor=colors.HexColor("#a8d8ea"))))
t = Table([[Paragraph(title, h1_sty)]], colWidths=[W])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), NAVY),
("TOPPADDING", (0,0), (-1,-1), 6),
("BOTTOMPADDING",(0,0),(-1,-1), 6),
("LEFTPADDING", (0,0), (-1,-1), 10),
]))
return t
def lo_badge(text):
"""Small teal learning-objective badge."""
t = Table([[Paragraph(text, S("LO2", fontName="Helvetica-Bold", fontSize=8,
textColor=WHITE))]], colWidths=[W])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), TEAL),
("TOPPADDING", (0,0), (-1,-1), 4),
("BOTTOMPADDING",(0,0),(-1,-1), 4),
("LEFTPADDING", (0,0), (-1,-1), 8),
]))
return t
def box_table(rows, col_w, header=True):
"""Styled data table."""
t = Table(rows, colWidths=col_w)
style = [
("FONTNAME", (0,0), (-1,-1), "Helvetica"),
("FONTSIZE", (0,0), (-1,-1), 8.5),
("GRID", (0,0), (-1,-1), 0.4, colors.HexColor("#b0c4d4")),
("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE, LGREY]),
("TOPPADDING", (0,0), (-1,-1), 4),
("BOTTOMPADDING",(0,0),(-1,-1), 4),
("LEFTPADDING", (0,0), (-1,-1), 6),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
]
if header:
style += [
("BACKGROUND", (0,0), (-1,0), TEAL),
("TEXTCOLOR", (0,0), (-1,0), WHITE),
("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
]
t.setStyle(TableStyle(style))
return t
def highlight_box(text, bg=MINT):
t = Table([[Paragraph(text, S("HB", fontName="Helvetica", fontSize=9,
textColor=NAVY, leading=13))]],
colWidths=[W])
t.setStyle(TableStyle([
("BACKGROUND", (0,0),(-1,-1), bg),
("LEFTPADDING", (0,0),(-1,-1), 10),
("RIGHTPADDING", (0,0),(-1,-1), 10),
("TOPPADDING", (0,0),(-1,-1), 6),
("BOTTOMPADDING", (0,0),(-1,-1), 6),
("BOX", (0,0),(-1,-1), 1, TEAL),
]))
return t
def warn_box(text):
return highlight_box(text, bg=colors.HexColor("#fff3cd"))
# ─────────────────────────────────────────────────────────────────────────────
# FLOWCHART helper (pure ReportLab Drawing – no external libs)
# ─────────────────────────────────────────────────────────────────────────────
class FlowchartDrawing(Flowable):
"""
Renders a vertical flowchart from a list of (label, colour) tuples.
Arrows connect boxes.
"""
BOX_W = 300
BOX_H = 28
GAP = 14 # space between boxes
ARR_H = GAP
def __init__(self, items, width=None):
Flowable.__init__(self)
self.items = items # list of (text, bg_color, text_color)
self._w = width or self.BOX_W
n = len(items)
self._h = n * self.BOX_H + (n-1) * self.GAP + 10
def wrap(self, availW, availH):
self._w = min(self._w, availW)
return (self._w, self._h)
def draw(self):
from reportlab.graphics.shapes import Drawing as D, Rect as R, String as St, Line as L
from reportlab.pdfgen import canvas as cnv_mod
c = self.canv
bw = self._w * 0.78
bx = (self._w - bw) / 2
y = self._h - 5
for idx, (text, bg, tc) in enumerate(self.items):
y -= self.BOX_H
# box
c.setFillColor(bg)
c.setStrokeColor(colors.HexColor("#0d6e8a"))
c.setLineWidth(0.8)
c.roundRect(bx, y, bw, self.BOX_H, 4, fill=1, stroke=1)
# text
c.setFillColor(tc)
c.setFont("Helvetica-Bold", 9)
c.drawCentredString(self._w/2, y + self.BOX_H/2 - 4, text)
# arrow down (not after last)
if idx < len(self.items) - 1:
ax = self._w / 2
ay_top = y
ay_bot = y - self.GAP
c.setStrokeColor(TEAL)
c.setLineWidth(1.5)
c.line(ax, ay_top, ax, ay_bot + 6)
# arrowhead
c.setFillColor(TEAL)
c.beginPath()
c.moveTo(ax, ay_bot)
c.lineTo(ax-5, ay_bot+7)
c.lineTo(ax+5, ay_bot+7)
c.closePath()
c.fill()
y -= self.GAP
def embryo_timeline_chart():
"""Returns a Table showing the embryological timeline."""
rows = [
[b("Week"), b("Event")],
["3-4", "Pronephros forms → regresses (non-functional)"],
["4-6", "Mesonephros forms; Wolffian duct appears"],
["6", "Müllerian duct appears; indifferent gonad present in both sexes"],
["6-7", "SRY activated → Testis determination (46,XY only)"],
["8-9", "AMH produced by Sertoli cells → Müllerian regression in males"],
["8-10","Testosterone → Wolffian duct development in males;\nFemales: Wolffian degenerates; Müllerian persists"],
["10", "Only one duct system survives per sex"],
["20", "Female internal genitalia fully formed from Müllerian ducts"],
]
# wrap as Paragraphs
prows = []
for i2, row in enumerate(rows):
sty = S("TCell", fontName="Helvetica-Bold" if i2==0 else "Helvetica",
fontSize=8.5, leading=12, textColor=WHITE if i2==0 else BLACK)
prows.append([Paragraph(str(row[0]), sty), Paragraph(str(row[1]), sty)])
return box_table(prows, [2.2*cm, W-2.2*cm])
# ══════════════════════════════════════════════════════════════════════════════
# BUILD STORY
# ══════════════════════════════════════════════════════════════════════════════
story = []
# ── COVER BAND ────────────────────────────────────────────────────────────────
cover = Table(
[[Paragraph("GYN-001", S("CT", fontName="Helvetica-Bold", fontSize=28,
textColor=WHITE, alignment=TA_CENTER))],
[Paragraph("Genitourinary Development", title_sty)],
[Paragraph("MBBS Year-5 | UHS | Academic Year 2025-2026", sub_sty)],
[Paragraph("Based on: Ten Teachers • Arshad Chohan • Irfan Masood", sub_sty)],
], colWidths=[W]
)
cover.setStyle(TableStyle([
("BACKGROUND", (0,0),(-1,-1), NAVY),
("TOPPADDING", (0,0),(-1,-1), 14),
("BOTTOMPADDING", (0,0),(-1,-1), 14),
("LEFTPADDING", (0,0),(-1,-1), 14),
]))
story.append(cover)
story.append(Spacer(1, 0.4*cm))
# ── LO LIST ──────────────────────────────────────────────────────────────────
lo_items = [
"LO1 — Embryological development of female genitourinary structures",
"LO2 — Sexual differentiation in early embryonic life",
"LO3 — Congenital anomalies from Müllerian tract disorders",
"LO4 — Layers & boundaries of abdominal and pelvic cavity",
]
lo_rows = [[Paragraph(b("Learning Objectives"), S("LH", fontName="Helvetica-Bold",
fontSize=9, textColor=WHITE))]]
for lo in lo_items:
lo_rows.append([Paragraph("● " + lo, S("LI", fontName="Helvetica",
fontSize=8.5, textColor=NAVY, leading=13))])
lo_t = Table(lo_rows, colWidths=[W])
lo_t.setStyle(TableStyle([
("BACKGROUND", (0,0),(0,0), TEAL),
("BACKGROUND", (0,1),(-1,-1), MINT),
("TOPPADDING", (0,0),(-1,-1), 4),
("BOTTOMPADDING", (0,0),(-1,-1), 4),
("LEFTPADDING", (0,0),(-1,-1), 10),
("BOX", (0,0),(-1,-1), 1, TEAL),
]))
story.append(lo_t)
story.append(Spacer(1, 0.5*cm))
# ══════════════════════════════════════════════════════════════════════════════
# LO 1 – EMBRYOLOGICAL DEVELOPMENT
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_header("LO1 — Embryological Development of Female Genitourinary Structures"))
story.append(Spacer(1, 0.25*cm))
story.append(Paragraph(b("Three Successive Kidneys (Indifferent Stage — Weeks 1-6)"), h2_sty))
kidney_rows = [
[b("Kidney System"), b("Weeks"), b("Fate")],
["Pronephros", "3-4", "Non-functional → completely regresses"],
["Mesonephros", "4-8", "Functions briefly; Wolffian duct formed; degenerates in females"],
["Metanephros", "5+", "Permanent kidney; ureter is its duct"],
]
prows = []
for i2, r in enumerate(kidney_rows):
sty = S("T", fontName="Helvetica-Bold" if i2==0 else "Helvetica",
fontSize=8.5, leading=12, textColor=WHITE if i2==0 else BLACK)
prows.append([Paragraph(r[0],sty), Paragraph(r[1],sty), Paragraph(r[2],sty)])
story.append(box_table(prows, [3.5*cm, 2*cm, W-5.5*cm]))
story.append(Spacer(1, 0.3*cm))
# Flowchart: Müllerian duct fate in females
story.append(Paragraph(b("Fate of Müllerian Duct in Females (Default Pathway)"), h2_sty))
story.append(Paragraph("Both duct systems coexist until week 7. In the female, Müllerian ducts persist; Wolffian ducts regress.", body_sty))
story.append(Spacer(1, 0.2*cm))
fc1_items = [
("WEEK 6 — Müllerian duct evaginates lateral to Wolffian duct", TEAL, WHITE),
("Caudal portions fuse in midline → Uterovaginal Canal", colors.HexColor("#1a6b8a"), WHITE),
("Cranial (unfused) → Fallopian Tubes + Fimbriae", NAVY, WHITE),
("Middle fused → Fundus & Corpus of Uterus", colors.HexColor("#0a4f6e"), WHITE),
("Distal fused → Cervix + Upper 1/3 Vagina", TEAL, WHITE),
("Urogenital Sinus → Lower 2/3 Vagina + External Genitalia", colors.HexColor("#145374"), WHITE),
]
story.append(FlowchartDrawing(fc1_items, width=W))
story.append(Spacer(1, 0.2*cm))
# Summary table
story.append(Paragraph(b("Müllerian Duct → Adult Structures"), h3_sty))
md_rows = [
[b("Müllerian Region"), b("Adult Female Structure")],
["Cranial (unfused)", "Fallopian tubes (fimbriae from müllerian tunnels)"],
["Middle fused", "Fundus & Corpus of Uterus"],
["Distal fused (uterovaginal primordium)", "Cervix + upper 1/3 vagina"],
["Urogenital sinus", "Lower 2/3 vagina + external genitalia"],
]
pr = []
for i2,r in enumerate(md_rows):
sty = S("T", fontName="Helvetica-Bold" if i2==0 else "Helvetica",
fontSize=8.5, leading=12, textColor=WHITE if i2==0 else BLACK)
pr.append([Paragraph(r[0],sty), Paragraph(r[1],sty)])
story.append(box_table(pr, [6*cm, W-6*cm]))
story.append(Spacer(1, 0.15*cm))
story.append(note_sty and Paragraph(
i("Source: Medical Physiology (Boron & Boulpaep) p.1578; Berek & Novak's Gynecology"), note_sty))
story.append(Spacer(1, 0.4*cm))
# ══════════════════════════════════════════════════════════════════════════════
# LO 2 – SEXUAL DIFFERENTIATION
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_header("LO2 — Sexual Differentiation in Early Embryonic Life"))
story.append(Spacer(1, 0.25*cm))
story.append(highlight_box(
b("KEY PRINCIPLE: ") + "The default developmental pathway is FEMALE. "
"Male differentiation requires active hormonal input from the testes. "
"(Jost's castration experiments, 1953)"))
story.append(Spacer(1, 0.3*cm))
# Flowchart: differentiation pathway
story.append(Paragraph(b("Sexual Differentiation Flowchart"), h2_sty))
fc2 = [
("FERTILIZATION — Genetic Sex Determined (46,XX or 46,XY)", NAVY, WHITE),
("Indifferent Gonad (same in both sexes up to wk 6)", colors.HexColor("#555"), WHITE),
("46,XY → SRY gene → TDF → TESTIS forms", RED, WHITE),
("Sertoli Cells → AMH/MIS → Müllerian ducts REGRESS", colors.HexColor("#8e1a0e"), WHITE),
("Leydig Cells → Testosterone → Wolffian ducts DEVELOP", colors.HexColor("#a04000"), WHITE),
("46,XX → No SRY → No AMH → Müllerian ducts PERSIST", GREEN, WHITE),
("No Testosterone → Wolffian ducts DEGENERATE", colors.HexColor("#1a6b3a"), WHITE),
("FEMALE internal genitalia formed (default)", TEAL, WHITE),
]
story.append(FlowchartDrawing(fc2, width=W))
story.append(Spacer(1, 0.25*cm))
story.append(Paragraph(b("AMH (Anti-Müllerian Hormone)"), h2_sty))
amh_rows = [
[b("Feature"), b("Detail")],
["Source", "Sertoli cells of fetal testis"],
["Gene locus", "Chromosome 19"],
["Structure", "140 kDa glycoprotein dimer; member of TGF-β superfamily"],
["Action", "Causes regression of Müllerian ducts in male embryos"],
["Target", "Mesenchymal cells of Müllerian duct"],
["Trigger", "Transcription factor SRY may initiate AMH transcription"],
["Note", "Testosterone CANNOT cause Müllerian regression (Jost experiment)"],
]
pr2 = []
for i2,r in enumerate(amh_rows):
sty = S("T", fontName="Helvetica-Bold" if i2==0 else "Helvetica",
fontSize=8.5, leading=12, textColor=WHITE if i2==0 else BLACK)
pr2.append([Paragraph(r[0],sty), Paragraph(r[1],sty)])
story.append(box_table(pr2, [4*cm, W-4*cm]))
story.append(Spacer(1, 0.15*cm))
story.append(Paragraph(i("Source: Medical Physiology p.1580"), note_sty))
story.append(Spacer(1, 0.4*cm))
# Embryological Timeline
story.append(Paragraph(b("Embryological Timeline"), h2_sty))
story.append(embryo_timeline_chart())
story.append(Spacer(1, 0.4*cm))
# ══════════════════════════════════════════════════════════════════════════════
# LO 3 – CONGENITAL ANOMALIES
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_header("LO3 — Congenital Anomalies from Müllerian Tract Disorders"))
story.append(Spacer(1, 0.25*cm))
story.append(warn_box(
b("Incidence: ") + "3-4% of all women; 5-10% in early pregnancy loss; "
"up to 25% in second/third trimester losses. "
"Renal imaging is MANDATORY when a Müllerian anomaly is diagnosed."))
story.append(Spacer(1, 0.3*cm))
# Flowchart: mechanism of anomalies
story.append(Paragraph(b("Mechanism of Müllerian Anomalies"), h2_sty))
fc3 = [
("Müllerian duct elongation toward each other", TEAL, WHITE),
("Fusion in the midline (by week 20)", colors.HexColor("#1a6b8a"), WHITE),
("Resorption of intervening septum", NAVY, WHITE),
("Normal uterus, cervix, fallopian tubes, upper vagina", GREEN, WHITE),
]
story.append(FlowchartDrawing(fc3, width=W))
fail_rows = [
[b("Failure At"), b("Anomaly")],
["Duct formation failure", "Agenesis/Hypoplasia → MRKH Syndrome"],
["One duct fails to develop", "Unicornuate uterus ± rudimentary horn"],
["Complete fusion failure", "Uterus didelphys (double uterus, cervix, vagina)"],
["Partial fusion failure", "Bicornuate uterus"],
["Septal resorption failure", "Septate uterus (most common anomaly)"],
["Mild resorption failure", "Arcuate uterus (mildest form)"],
]
pr3 = []
for i2,r in enumerate(fail_rows):
sty = S("T", fontName="Helvetica-Bold" if i2==0 else "Helvetica",
fontSize=8.5, leading=12, textColor=WHITE if i2==0 else BLACK)
pr3.append([Paragraph(r[0],sty), Paragraph(r[1],sty)])
story.append(Spacer(1, 0.2*cm))
story.append(box_table(pr3, [5.5*cm, W-5.5*cm]))
story.append(Spacer(1, 0.35*cm))
# MRKH box
story.append(Paragraph(b("MRKH Syndrome (Mayer-Rokitansky-Küster-Hauser)"), h2_sty))
mrkh_data = [
["Karyotype", "46,XX (genetically normal female)"],
["Features", "Vaginal agenesis + variable uterine development"],
["Primary amenorrhea", "10-15% of all cases"],
["Associated anomalies", "Renal (absent/horseshoe kidney), skeletal, cardiac, hearing"],
["Fertility", "Only via IVF + gestational carrier"],
]
pr4 = []
for r in mrkh_data:
pr4.append([Paragraph(b(r[0]), S("T", fontName="Helvetica-Bold", fontSize=8.5,
leading=12, textColor=NAVY)),
Paragraph(r[1], S("T", fontName="Helvetica", fontSize=8.5,
leading=12, textColor=BLACK))])
mrkh_t = Table(pr4, colWidths=[4.5*cm, W-4.5*cm])
mrkh_t.setStyle(TableStyle([
("BACKGROUND", (0,0),(-1,-1), MINT),
("BOX", (0,0),(-1,-1), 1.2, TEAL),
("INNERGRID", (0,0),(-1,-1), 0.4, colors.HexColor("#b0d8e0")),
("TOPPADDING", (0,0),(-1,-1), 4),
("BOTTOMPADDING", (0,0),(-1,-1), 4),
("LEFTPADDING", (0,0),(-1,-1), 8),
("VALIGN", (0,0),(-1,-1), "TOP"),
]))
story.append(mrkh_t)
story.append(Spacer(1, 0.3*cm))
# Transverse blockages
story.append(Paragraph(b("Transverse Blockages of the Müllerian System"), h2_sty))
story.append(Paragraph(
"Cause <b>cyclic pain without menstrual bleeding</b> (cryptomenorrhoea) in adolescents.",
body_sty))
block_rows = [
[b("Blockage"), b("Consequence")],
["Imperforate hymen", "Hematocolpos (most common)"],
["Transverse vaginal septum", "Hematocolpos → Hematometra"],
["Cervical agenesis", "Hematometra → Hemoperitoneum → Endometriosis"],
]
pr5 = []
for i2,r in enumerate(block_rows):
sty = S("T", fontName="Helvetica-Bold" if i2==0 else "Helvetica",
fontSize=8.5, leading=12, textColor=WHITE if i2==0 else BLACK)
pr5.append([Paragraph(r[0],sty), Paragraph(r[1],sty)])
story.append(box_table(pr5, [5*cm, W-5*cm]))
story.append(Spacer(1, 0.3*cm))
# Exam tips
exam_rows = [
[b("Anomaly"), b("Key Clinical Fact")],
["Septate uterus", "Most COMMON Müllerian anomaly; most associated with recurrent pregnancy loss"],
["Unicornuate uterus","Highest risk of ECTOPIC pregnancy (rudimentary horn)"],
["MRKH", "Primary amenorrhea + normal 2° sex characteristics + normal karyotype 46,XX"],
["Any Müllerian anomaly", "Always co-investigate for RENAL anomaly"],
["Imaging gold standard", "MRI of pelvis (best sensitivity/specificity)"],
]
pr6 = []
for i2,r in enumerate(exam_rows):
sty = S("T", fontName="Helvetica-Bold" if i2==0 else "Helvetica",
fontSize=8.5, leading=12, textColor=WHITE if i2==0 else BLACK)
pr6.append([Paragraph(r[0],sty), Paragraph(r[1],sty)])
exam_t = box_table(pr6, [4.8*cm, W-4.8*cm])
story.append(Paragraph(b("UHS Exam High-Yield Points"), h3_sty))
story.append(exam_t)
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph(i("Source: Berek & Novak's Gynecology pp.2063-2064"), note_sty))
# ── Clinical images ───────────────────────────────────────────────────────────
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph(b("Clinical Images"), h2_sty))
img_data = [
[Image(IMG1, width=8*cm, height=6*cm),
Image(IMG2, width=8*cm, height=6*cm)],
[Paragraph("Fig 1. HSG showing unicornuate uterus — single elongated cavity with one tube visible. "
"Class II Müllerian anomaly.", caption_sty),
Paragraph("Fig 2. MRI showing bicornuate uterus — two distinct uterine horns. "
"Müllerian partial fusion anomaly.", caption_sty)],
]
img_t = Table(img_data, colWidths=[W/2-0.3*cm, W/2-0.3*cm], hAlign="CENTER")
img_t.setStyle(TableStyle([
("ALIGN", (0,0),(-1,-1), "CENTER"),
("VALIGN", (0,0),(-1,-1), "MIDDLE"),
("TOPPADDING", (0,0),(-1,-1), 4),
("BOTTOMPADDING",(0,0),(-1,-1), 4),
]))
story.append(img_t)
story.append(Spacer(1, 0.4*cm))
# ══════════════════════════════════════════════════════════════════════════════
# LO 4 – ABDOMINAL & PELVIC LAYERS
# ══════════════════════════════════════════════════════════════════════════════
story.append(section_header("LO4 — Layers & Boundaries of Abdominal and Pelvic Cavity"))
story.append(Spacer(1, 0.25*cm))
story.append(Paragraph(b("Layers of the Anterior Abdominal Wall (Superficial → Deep)"), h2_sty))
fc4 = [
("1. Skin", colors.HexColor("#d4a574"), BLACK),
("2. Superficial Fascia — Camper's fascia (fatty)", colors.HexColor("#e8c49a"), BLACK),
("3. Deep Fascia — Scarpa's fascia (membranous)", colors.HexColor("#c4956a"), WHITE),
("4. Muscles: Ext. Oblique → Int. Oblique → Transversus Abdominis", TEAL, WHITE),
("5. Transversalis Fascia", NAVY, WHITE),
("6. Extraperitoneal (Preperitoneal) Fat", colors.HexColor("#4a7c59"), WHITE),
("7. Parietal Peritoneum", colors.HexColor("#2c5f3f"), WHITE),
]
story.append(FlowchartDrawing(fc4, width=W))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(i("Source: Gray's Anatomy for Students"), note_sty))
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph(b("Boundaries of the Abdomino-Pelvic Cavity"), h2_sty))
bound_rows = [
[b("Boundary"), b("Structure")],
["Superior", "Diaphragm"],
["Inferior", "Pelvic floor (levator ani + coccygeus muscles)"],
["Anterior & lateral", "Abdominal wall muscles"],
["Posterior", "Vertebral column + posterior abdominal wall muscles\n(psoas, iliacus, quadratus lumborum)"],
]
pr7 = []
for i2,r in enumerate(bound_rows):
sty = S("T", fontName="Helvetica-Bold" if i2==0 else "Helvetica",
fontSize=8.5, leading=13, textColor=WHITE if i2==0 else BLACK)
pr7.append([Paragraph(r[0],sty), Paragraph(r[1],sty)])
story.append(box_table(pr7, [5*cm, W-5*cm]))
story.append(Spacer(1, 0.15*cm))
story.append(Paragraph(i("Source: Gray's Anatomy for Students; Campbell-Walsh Urology"), note_sty))
# ── FOOTER line ───────────────────────────────────────────────────────────────
story.append(Spacer(1, 0.4*cm))
story.append(HRFlowable(width="100%", thickness=1, color=TEAL))
story.append(Spacer(1, 0.1*cm))
footer_t = Table([[
Paragraph("GYN-001 | UHS MBBS Year-5 | 2025-2026",
S("F", fontName="Helvetica", fontSize=7.5, textColor=TEAL)),
Paragraph("Ten Teachers • Arshad Chohan • Irfan Masood",
S("F2", fontName="Helvetica-Oblique", fontSize=7.5,
textColor=colors.grey, alignment=TA_CENTER)),
Paragraph("Medical Physiology • Berek & Novak • Gray's Anatomy",
S("F3", fontName="Helvetica", fontSize=7.5, textColor=TEAL,
alignment=TA_LEFT)),
]], colWidths=[W/3, W/3, W/3])
story.append(footer_t)
# ── BUILD ─────────────────────────────────────────────────────────────────────
doc.build(story)
print("PDF generated:", OUT)
print("File size:", os.path.getsize(OUT), "bytes")
cd /tmp/workspace/gyn001-pdf && python3 generate_pdf.py 2>&1
~/gyn001-pdf/generate_pdf.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/gyn001-pdf/generate_pdf.py'
cd /tmp/workspace/gyn001-pdf && python3 generate_pdf.py 2>&1
~/gyn001-pdf/generate_pdf.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/gyn001-pdf/generate_pdf.py'
cd /tmp/workspace/gyn001-pdf && python3 generate_pdf.py 2>&1
GYN001 Genitourinary Development
PDF Document · PDF
| Section | Content |
|---|---|
| Cover | GYN-001 title, UHS MBBS Yr-5, reference books |
| LO1 | 3-kidney table, Müllerian duct fate flowchart (6 steps with arrows), Müllerian → adult structures table |
| LO2 | Sexual differentiation flowchart (8-step with colour-coded male/female paths), AMH facts table, Embryological timeline table (weeks 3-20) |
| LO3 | Mechanism flowchart, Müllerian anomaly classification table, MRKH syndrome box, Transverse blockages table, High-yield UHS exam points, 2 clinical images (HSG unicornuate + MRI bicornuate) |
| LO4 | Abdominal wall layers flowchart (7 layers, skin to peritoneum), Boundaries of abdominopelvic cavity table |