anatomy , histology & physiology of adrenal gland with applied anatomy & physiology
adrenal gland anatomy histology cortex medulla zones

An educational infographic and diagnostic image composite illustrating the anatomy and functional histology of the adrenal gland. On the left, a schematic diagram depicts the adrenal gland situated on the superior pole of the kidney. A high-magnification histological section (Hematoxylin and Eosin stain) of a macaque adrenal gland is featured in the center, showing the distinct layered architecture. The image labels the adrenal cortex and its three functional zones from superficial to deep: the zona glomerulosa (mineralocorticoids/aldosterone), the thickest layer, zona fasciculata (glucocorticoids/cortisol and corticosterone), and the zona reticularis (androgens/dehydroepiandrosterone). The innermost region is identified as the adrenal medulla, responsible for secreting catecholamines (epinephrine and norepinephrine). The histological section displays characteristic cellular morphology, including the rounded clusters of the glomerulosa, the linear cords of the fasciculata, and the branching network of the reticularis. This graphic is designed for medical education to correlate anatomical structure with endocrine function.

This histology image depicts a low-power hematoxylin-eosin stained cross-section of the mammalian adrenal gland, showing the capsule and the steroidogenic cortex with its three distinct zonal architectures. The adrenal cortex comprises approximately 90% of the gland and is organized into zona glomerulosa (outermost), zona fasciculata (widest middle layer), and zona reticularis (inner zone) adjacent to the medulla. The cortex appears pale and vesiculated due to lipid-rich, foamy cytoplasm within steroid-producing cells, arranged in cords and fascicles separated by sinusoids. At this low magnification, the boundary between capsule and cortex is evident, although a detailed medullary region is not fully resolved. The image demonstrates normal cortical histology without overt neoplasia, hemorrhage, or fibrosis. The adrenal cortex synthesizes glucocorticoids, mineralocorticoids, and androgens under ACTH regulation, with zonation reflecting functional segregation: zona glomerulosa producing aldosterone, zona fasciculata secreting cortisol, and zona reticularis generating dehydroepiandrosterone. Clinically, this pattern is essential for understanding endocrine physiology and adrenal disorders. This composite image serves educational reference for histology, pathology, and medical education, enabling comparison to hyperplasia, adenomas, or pheochromocytoma in other sections. The slide illustrates capsule integrity, distinct cortical zones, and ordinary vascular architecture relevant to teaching. Useful for exams, case discussions, and comparative pathology analyses exercises.

Imaging modality: Light microscopy of adrenal gland tissue, Hematoxylin and Eosin (H&E) stained section, viewed under brightfield illumination at high magnification (approximately 400x). Anatomical location: adrenal cortex with zona reticularis occupying the deepest corticoid layer, immediately superficial to the adrenal medulla, behind zona fasciculata. Visual features: cells arranged in anastomosing cords and small nests; cytoplasm is acidophilic and granular; nuclei are round to vesicular with prominent punctate nucleoli; capillary sinusoids are intermixed, producing a lobular vascular network. The zona reticularis lies between the zona fasciculata and the medulla, forming a reticular, fine meshwork. The cellular morphology indicates steroidogenic chromaffin-adjacent cells with robust endoplasmic reticulum and lipid-poor cytoplasm relative to fasciculata. Notable features include tight cell-to-cell contacts, vascularized stroma, and delineation from the surrounding zones. Pathophysiology/diagnostic significance: Normal zonation of the adrenal cortex is demonstrated; zona reticularis is responsible for glucocorticoid and sex hormone synthesis (androgen precursors), contributing to the endocrine milieu. Clinical relevance: understanding this histology supports differential diagnosis of adrenal cortical neoplasms and endocrine disorders; potential use in educational contexts, research on steroidogenesis, and histopathology training. This image serves as a reference for adrenal cortical anatomy, steroidogenic cell morphology, and the interface with the medulla.

High-magnification light microscopy of an adrenal gland biopsy illustrating mixed cortical and medullary anatomy with a pheochromocytoma component. The left one-third of the image contains medullary tumor cells arranged in clusters and nests (zellballen) within a rich vascular stroma, characteristic of pheochromocytoma. These chromaffin cells exhibit polygonal to rounded outlines with granular, eosinophilic cytoplasm and round to oval nuclei. The central zone demonstrates cortical architecture: the middle band corresponds to zona reticularis, composed of cells with deeply eosinophilic cytoplasm arranged in an irregular network. The right one-third shows zona fasciculata, typified by large cords of cells with pale, vacuolated (lipid-rich) cytoplasm giving foamy appearance. This juxtaposition highlights the three adrenal compartments: medulla (pheochromocytoma) and two cortical zones (fasciculata and reticularis). Zona fasciculata and zona reticularis synthesize glucocorticoids (cortisol) and androgens/estrogens; their cytologic features reflect lipid content and steroidogenic activity. Clinically relevant: pheochromocytoma may secrete catecholamines; cortical zones participate in steroidogenesis. The image aids differential diagnosis among adrenal medullary tumors and cortical lesions, with potential correlations to hypertension, catecholamine excess, or hormonal syndromes. In educational settings, this slide exemplifies gross-to-histology correlations, cell morphology, pattern recognition (zellballen), and zonal adrenocortical histology, reinforcing terminology for endocrinology, pathology, and medical education.

This histologic image depicts an adult human adrenal gland with cortical zona reticularis at the outer portion and medulla occupying the lower two-thirds of the gland. The medullary parenchyma is composed of chromaffin cells arranged in interconnected cords and nests, separated by a prominent fenestrated capillary network. Chromaffin cells display polygonal to round morphology with abundant eosinophilic cytoplasm and basophilic nuclei. Electron-dense, membrane-bound secretory vesicles containing catecholamines predominate within the cytoplasm, consistent with stored epinephrine as the major secretory product, with smaller stores of norepinephrine. The cortex shows layers surrounding the medulla, including the zona reticularis at the periphery, which has compact, darker-staining cords. The microvasculature supports rapid catecholamine release into the systemic circulation. Staining is consistent with routine light microscopy (H&E) typical for normal adrenal histology. Clinically, these features reflect the physiological role of the adrenal medulla in the sympathetic-adrenal axis, mediating the fight-or-flight response via epinephrine predominance. Diagnostic significance lies in recognizing normal medullary architecture and distinguishing it from neoplastic processes such as pheochromocytoma, which would alter cellular arrangement, cytology, and vascular patterns. This knowledge supports educational queries in histology, anatomy, and endocrine physiology, and aids radiology correlations when linking structural medullary features with hormonal secretory function and systemic adrenergic responses.

Imaging modality: Light microscopy of hematoxylin and eosin stained adrenal gland cortex section, intermediate magnification. The specimen reveals the three concentric zones of the adrenal cortex arranged from capsule to medulla: the zona glomerulosa immediately beneath the capsule forms small, compact clusters of darker-staining parenchymal cells; the zona fasciculata comprises the majority of cortex with radially oriented cords of pale, lipid-rich cells exhibiting a spongy cytoplasm; the zona reticularis lies nearest the medulla, composed of anastomosing cords of polygonal cells with acidophilic cytoplasm. The cortex shows preserved architecture with slender septa and numerous sinusoidal capillaries evident between cords. The cells demonstrate typical endocrine morphology: small dense nuclei, minimal cytoplasmic granularity in glomerulosa; prominent lipid droplets in fasciculata; reticularis cells with irregular outlines. No overt inflammatory infiltrate, neoplastic glands, or disrupted zonation are observed in this field, consistent with normal histology. Clinically, this zonation underpins steroidogenesis: mineralocorticoids from glomerulosa regulated by angiotensin II and potassium; glucocorticoids from fasciculata, including cortisol; androgen precursors from reticularis. Diagnostic significance lies in confirming trilaminar architecture and zonal differentiation essential for endocrinology education and pathologic assessment of adrenal disorders such as hyperplasia, adenomas, or cortisol-producing tumors. This slide is valuable for education, histology atlases, and research references.
adrenal gland blood supply relations anatomy retroperitoneal

This composite figure illustrates the vascular anatomy of the right adrenal gland in a mouse model, utilizing vascular corrosion casting and schematic diagrams. Panels A and B present close-up views of a vascular corrosion cast (plastination), demonstrating the 3D arterial architecture. The right adrenal gland receives its blood supply from the right inferior phrenic artery (r-IPA), which branches into three distinct vessels: the superior (SAA), middle (MAA), and inferior (IAA) adrenal arteries. The relationship between the aorta (AO), renal artery (r-RA), and the kidney is visible. Panel C provides a labeled anatomical diagram of the retroperitoneal vasculature, including the inferior vena cava (IVC), renal veins (r-RV, l-RV), celiac trunk (CT), and superior mesenteric artery (SMA). Panel D details a surgical ligation and perfusion protocol, showing strategic placement of six ligatures (I-VI) and catheters to isolate the right adrenal gland for physiological study. This resource is designed for advanced biomedical research and comparative anatomy, focusing on endocrine organ microvasculature and ex vivo organ perfusion techniques.

This endoscopic clinical photograph captures an intraoperative view of a retroperitoneal surgical procedure, specifically focusing on the exposure and mobilization of the adrenal gland. The adrenal gland is visible as an irregular, elongated structure with a mottled tan and reddish appearance, situated within the retroperitoneal fat. A Kelly forceps is actively engaged in the surgical field; however, rather than grasping the gland directly to avoid parenchymal damage, the instrument is seen gripping the adjacent periadrenal connective and adipose tissue for retraction. The surrounding anatomy includes partially dissected fascia and fatty tissue, with the kidney and associated renal vasculature located in the nearby operative field. The image demonstrates a key step in adrenalectomy, highlighting the surgical technique of using periadrenal tissue as a handle to facilitate the circumferential dissection of the gland from its attachments, including the phrenicoabdominal vein and visceral adrenal capsule.

This diagnostic axial CT scan of the abdomen with intravenous contrast demonstrates bilateral adrenal gland pathology. The primary findings are significant bilateral enlargement of the adrenal glands, which exhibit mixed attenuation consistent with acute spontaneous bilateral adrenal hemorrhage. Yellow arrows highlight the areas of involvement, specifically pointing to periadrenal infiltration and stranding in the retroperitoneal fat. These infiltrative changes indicate edema or extravasated blood extending beyond the adrenal capsules. The surrounding anatomy shows the liver, spleen, kidneys, and abdominal aorta. This clinical imaging is characteristic of Waterhouse-Friderichsen syndrome or secondary adrenal insufficiency due to hemorrhage. The educational focus is on identifying acute adrenal morphology changes and recognizing signs of periadrenal inflammation or hemorrhage on cross-sectional imaging.
| Right Adrenal | Left Adrenal | |
|---|---|---|
| Shape | Pyramidal/triangular | Semilunar/crescentic |
| Anterior | Bare area of liver, inferior vena cava (IVC) | Stomach, pancreatic tail, splenic vessels |
| Posterior | Right crus of diaphragm | Left crus of diaphragm |
| Medial | IVC, right celiac ganglion | Aorta, left celiac ganglion |
| Inferior | Upper pole of right kidney | Upper pole of left kidney |
| Component | Origin | Week of Appearance |
|---|---|---|
| Cortex | Mesoderm (coelomic mesothelium, between mesentery root and gonadal ridge) | Week 5 |
| Medulla | Neuroectoderm (neural crest cells migrating from sympathetic ganglia) | Week 6-7 |


Mnemonic for zones and secretions: "GFR" = Glomerulosa (aldosterone), Fasciculata (cortisol/glucocorticoids), Reticularis (androgens). Or: "Salt, Sugar, Sex" (outermost to innermost).
| System | Effect |
|---|---|
| Carbohydrate | Increases gluconeogenesis, decreases glucose uptake (anti-insulin) → hyperglycemia |
| Protein | Promotes catabolism, mobilizes amino acids from muscle/tissues |
| Fat | Promotes lipolysis; central fat redistribution (excess) |
| Immune | Anti-inflammatory, immunosuppressive (decreases cytokines, lymphocytes, eosinophils) |
| Bone | Inhibits osteoblasts → osteoporosis with excess |
| Cardiovascular | Increases vascular reactivity to catecholamines (upregulates α1 receptors); mild mineralocorticoid effect |
| CNS | Affects mood, behavior, cognition |
| Development | Required for fetal lung maturation (surfactant) |
| Effect | Mechanism |
|---|---|
| Increased heart rate & contractility | β1 receptors |
| Vasoconstriction (skin, viscera) | α1 receptors |
| Vasodilation (skeletal muscle) | β2 receptors |
| Bronchodilation | β2 receptors |
| Glycogenolysis & gluconeogenesis | β2 receptors |
| Lipolysis | β1/β3 receptors |
| Pupillary dilation | α1 receptors |
| Decreased GI motility | α2, β2 receptors |
make a more detailed pdf
mkdir -p /tmp/workspace/adrenal-gland && ls /tmp/workspace/
~/adrenal-gland/generate_pdf.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm, mm
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
PageBreak, HRFlowable, KeepTogether
)
from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_JUSTIFY
from reportlab.platypus.flowables import Flowable
import io
# ── Colour palette ────────────────────────────────────────────────────────────
DARK_BLUE = colors.HexColor("#1a3a5c")
MID_BLUE = colors.HexColor("#2563a8")
LIGHT_BLUE = colors.HexColor("#dbeafe")
TEAL = colors.HexColor("#0f766e")
TEAL_LIGHT = colors.HexColor("#ccfbf1")
ORANGE = colors.HexColor("#c2410c")
ORANGE_LT = colors.HexColor("#ffedd5")
PURPLE = colors.HexColor("#6d28d9")
PURPLE_LT = colors.HexColor("#ede9fe")
GREEN = colors.HexColor("#15803d")
GREEN_LT = colors.HexColor("#dcfce7")
RED = colors.HexColor("#b91c1c")
YELLOW_LT = colors.HexColor("#fef9c3")
GRAY_DARK = colors.HexColor("#374151")
GRAY_MID = colors.HexColor("#6b7280")
GRAY_LIGHT = colors.HexColor("#f3f4f6")
WHITE = colors.white
W, H = A4
# ── Document ──────────────────────────────────────────────────────────────────
doc = SimpleDocTemplate(
"/tmp/workspace/adrenal-gland/Adrenal_Gland_Complete.pdf",
pagesize=A4,
leftMargin=2*cm, rightMargin=2*cm,
topMargin=2.2*cm, bottomMargin=2.2*cm,
title="Adrenal Gland – Complete Medical Reference",
author="Orris Medical Education",
)
styles = getSampleStyleSheet()
# ── Custom styles ─────────────────────────────────────────────────────────────
def S(name, **kw):
return ParagraphStyle(name, **kw)
cover_title = S("CoverTitle", fontSize=32, textColor=WHITE, fontName="Helvetica-Bold",
alignment=TA_CENTER, leading=38, spaceAfter=8)
cover_sub = S("CoverSub", fontSize=16, textColor=colors.HexColor("#bfdbfe"),
fontName="Helvetica", alignment=TA_CENTER, leading=22, spaceAfter=4)
cover_tag = S("CoverTag", fontSize=11, textColor=colors.HexColor("#93c5fd"),
fontName="Helvetica-Oblique", alignment=TA_CENTER)
h_chapter = S("HChapter", fontSize=18, textColor=WHITE, fontName="Helvetica-Bold",
alignment=TA_LEFT, leading=22, spaceAfter=2)
h1 = S("H1", fontSize=14, textColor=DARK_BLUE, fontName="Helvetica-Bold",
spaceBefore=14, spaceAfter=4, leading=17)
h2 = S("H2", fontSize=12, textColor=MID_BLUE, fontName="Helvetica-Bold",
spaceBefore=10, spaceAfter=3, leading=15)
h3 = S("H3", fontSize=11, textColor=TEAL, fontName="Helvetica-Bold",
spaceBefore=7, spaceAfter=2, leading=13)
body = S("Body", fontSize=10, textColor=GRAY_DARK, fontName="Helvetica",
alignment=TA_JUSTIFY, leading=15, spaceAfter=5)
body_b = S("BodyB", fontSize=10, textColor=GRAY_DARK, fontName="Helvetica-Bold",
leading=15)
bullet_s = S("BulletS", fontSize=10, textColor=GRAY_DARK, fontName="Helvetica",
leftIndent=16, bulletIndent=4, alignment=TA_JUSTIFY, leading=14, spaceAfter=3)
small_it = S("SmallIt", fontSize=8.5, textColor=GRAY_MID, fontName="Helvetica-Oblique",
alignment=TA_CENTER, spaceAfter=2)
note_box = S("NoteBox", fontSize=9.5, textColor=GRAY_DARK, fontName="Helvetica-Oblique",
alignment=TA_JUSTIFY, leading=14)
key_point = S("KeyPoint", fontSize=10, textColor=DARK_BLUE, fontName="Helvetica-Bold",
leading=14, spaceAfter=3)
mnemonic = S("Mnemonic", fontSize=11, textColor=ORANGE, fontName="Helvetica-Bold",
alignment=TA_CENTER, spaceBefore=4, spaceAfter=4)
# ── Helper: coloured banner (chapter header) ──────────────────────────────────
class Banner(Flowable):
def __init__(self, text, bg=DARK_BLUE, height=1.1*cm):
Flowable.__init__(self)
self.text = text
self.bg = bg
self.bh = height
def wrap(self, avW, avH):
self.W = avW
return avW, self.bh + 6
def draw(self):
c = self.canv
c.setFillColor(self.bg)
c.roundRect(0, 0, self.W, self.bh, 5, fill=1, stroke=0)
c.setFillColor(WHITE)
c.setFont("Helvetica-Bold", 13)
c.drawString(10, self.bh*0.28, self.text)
class InfoBox(Flowable):
"""Coloured background info / key-fact box."""
def __init__(self, paragraphs, bg=LIGHT_BLUE, border=MID_BLUE, radius=6):
Flowable.__init__(self)
self.paragraphs = paragraphs
self.bg = bg
self.border = border
self.radius = radius
def wrap(self, avW, avH):
self.W = avW
total_h = 12
self._wrapped = []
for p in self.paragraphs:
w, h = p.wrap(avW - 24, avH)
self._wrapped.append((p, w, h))
total_h += h + 4
self.H = total_h
return avW, self.H
def draw(self):
c = self.canv
c.setFillColor(self.bg)
c.setStrokeColor(self.border)
c.setLineWidth(1)
c.roundRect(0, 0, self.W, self.H, self.radius, fill=1, stroke=1)
y = self.H - 10
for p, w, h in self._wrapped:
y -= h
p.drawOn(c, 12, y)
y -= 4
def bul(text, style=bullet_s):
return Paragraph(f"<bullet>•</bullet> {text}", style)
def sp(h=6):
return Spacer(1, h)
def hr(color=MID_BLUE, thickness=0.5):
return HRFlowable(width="100%", thickness=thickness, color=color, spaceAfter=4, spaceBefore=4)
# ── TABLE helper ──────────────────────────────────────────────────────────────
def make_table(data, col_widths, header_bg=DARK_BLUE, row_bg1=GRAY_LIGHT, row_bg2=WHITE,
header_color=WHITE, font_size=9):
style = [
("BACKGROUND", (0,0), (-1,0), header_bg),
("TEXTCOLOR", (0,0), (-1,0), header_color),
("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
("FONTSIZE", (0,0), (-1,-1), font_size),
("ALIGN", (0,0), (-1,-1), "LEFT"),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING",(0,0),(-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 7),
("RIGHTPADDING",(0,0), (-1,-1), 7),
("GRID", (0,0), (-1,-1), 0.4, colors.HexColor("#d1d5db")),
("ROWBACKGROUNDS",(0,1),(-1,-1),[row_bg1, row_bg2]),
]
t = Table(data, colWidths=col_widths)
t.setStyle(TableStyle(style))
return t
# ══════════════════════════════════════════════════════════════════════════════
# CONTENT
# ══════════════════════════════════════════════════════════════════════════════
story = []
# ── COVER ─────────────────────────────────────────────────────────────────────
cover_data = [[
Paragraph("ADRENAL GLAND", cover_title),
Paragraph("Anatomy · Histology · Physiology · Applied", cover_sub),
sp(8),
Paragraph("A Comprehensive Medical Reference", cover_tag),
sp(4),
Paragraph("Based on Costanzo Physiology 7e · Medical Physiology (Barrett) ·<br/>"
"Langman's Embryology · Schwartz's Principles of Surgery ·<br/>"
"Fischer's Mastery of Surgery · Histology: A Text and Atlas", cover_tag),
]]
cover_tbl = Table(cover_data, colWidths=[W - 4*cm])
cover_tbl.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), DARK_BLUE),
("TOPPADDING", (0,0),(-1,-1), 50),
("BOTTOMPADDING", (0,0),(-1,-1), 50),
("LEFTPADDING", (0,0),(-1,-1), 20),
("RIGHTPADDING", (0,0),(-1,-1), 20),
("ROUNDEDCORNERS",(0,0),(-1,-1), [10,10,10,10]),
]))
story.append(cover_tbl)
story.append(PageBreak())
# ══════════════════════════════════════════════════════════════════════════════
# CHAPTER 1 – ANATOMY
# ══════════════════════════════════════════════════════════════════════════════
story.append(Banner("CHAPTER 1 · GROSS ANATOMY", bg=DARK_BLUE))
story.append(sp(6))
story.append(Paragraph("1.1 Overview & Location", h1))
story.append(Paragraph(
"The <b>adrenal (suprarenal) glands</b> are paired, retroperitoneal endocrine organs situated "
"<b>superomedially on the upper poles of each kidney</b>, within Gerota's (perirenal) fascia. "
"Each gland weighs approximately <b>4 g</b> in the adult but receives one of the highest blood flows "
"per gram of any organ in the body — reflecting its intense secretory activity. "
"Macroscopically, a bright-yellow outer cortex encloses a dark-brown/grey medulla.",
body))
story.append(Paragraph("1.2 Shape & Side Differences", h1))
rel_data = [
["Feature", "Right Adrenal", "Left Adrenal"],
["Shape", "Pyramidal / triangular", "Semilunar / crescentic"],
["Anterior", "Bare area of liver; IVC", "Stomach; pancreatic tail; splenic vessels"],
["Posterior", "Right crus of diaphragm", "Left crus of diaphragm"],
["Medial", "IVC; right celiac ganglion", "Aorta; left celiac ganglion"],
["Inferior", "Upper pole of right kidney", "Upper pole of left kidney"],
["Adrenal vein drains into", "IVC directly (short, <1 cm)", "Left renal vein"],
]
story.append(make_table(rel_data,
col_widths=[4.5*cm, 7*cm, 7*cm]))
story.append(sp(6))
story.append(Paragraph("1.3 Blood Supply", h1))
story.append(Paragraph(
"The adrenal gland has a <b>triple arterial supply</b> — unlike most abdominal organs that have a single "
"dominant vessel. All three sources anastomose in a subcapsular plexus before penetrating the cortex "
"as sinusoids that flow centripetally toward the medulla.",
body))
art_data = [
["Artery", "Origin", "Territory"],
["Superior suprarenal (multiple small branches)", "Inferior phrenic artery", "Upper cortex"],
["Middle suprarenal", "Abdominal aorta (directly)", "Midcortex"],
["Inferior suprarenal", "Renal artery", "Lower cortex / medulla"],
]
story.append(make_table(art_data, col_widths=[6*cm, 5*cm, 5.5*cm]))
story.append(sp(5))
story.append(Paragraph("<b>Venous drainage:</b> Each gland drains via a <b>single central adrenal vein.</b>", body))
story.append(bul("<b>Right adrenal vein:</b> Very short (<1 cm); drains <b>directly into the IVC</b>. "
"Surgically hazardous — prone to avulsion during right adrenalectomy."))
story.append(bul("<b>Left adrenal vein:</b> Longer; drains into the <b>left renal vein</b>, which also "
"receives the left gonadal vein."))
story.append(sp(4))
story.append(Paragraph("1.4 Lymphatic Drainage & Nerve Supply", h1))
story.append(bul("<b>Lymphatics:</b> Drain to lateral aortic (para-aortic) lymph nodes."))
story.append(bul("<b>Nerve supply:</b> Preganglionic sympathetic fibres from the <b>greater, lesser, and least "
"splanchnic nerves</b> (T8–L1). These pass through the celiac plexus <i>without synapsing</i> "
"and synapse directly on chromaffin cells of the medulla — the chromaffin cells are therefore "
"functionally equivalent to post-ganglionic sympathetic neurons."))
story.append(sp(4))
story.append(InfoBox([
Paragraph("<b>Key Anatomical Points (Exam Favourites)</b>", key_point),
bul("Right adrenal vein is SHORT and drains directly to IVC — highest risk during surgery."),
bul("Triple arterial supply means single-vessel ligation does NOT devascularise the gland."),
bul("Both glands lie within Gerota's fascia — adrenalectomy approaches must respect this layer."),
bul("Left adrenal vein receives the left inferior phrenic vein before entering left renal vein."),
], bg=LIGHT_BLUE, border=MID_BLUE))
story.append(sp(8))
story.append(PageBreak())
# ══════════════════════════════════════════════════════════════════════════════
# CHAPTER 2 – EMBRYOLOGY
# ══════════════════════════════════════════════════════════════════════════════
story.append(Banner("CHAPTER 2 · EMBRYOLOGY & DEVELOPMENT", bg=TEAL))
story.append(sp(6))
story.append(Paragraph("2.1 Dual Embryological Origin", h1))
story.append(Paragraph(
"The adrenal gland is unique among endocrine organs in being derived from <b>two completely separate "
"embryological sources</b> — one mesodermal (cortex) and one ectodermal/neuroectodermal (medulla).",
body))
emb_data = [
["Component", "Embryological Origin", "Week", "Key Events"],
["Cortex", "Coelomic mesothelium\n(mesodermal)", "Week 5",
"Mesothelial cells between root of mesentery and gonadal ridge proliferate, "
"penetrate mesenchyme → large acidophilic fetal cortex forms"],
["Medulla", "Neural crest cells\n(neuroectodermal)", "Week 6–7",
"Neural crest cells migrate, guided by BMP signals from dorsal aorta, "
"invade medial fetal cortex → differentiate into chromaffin cells"],
]
story.append(make_table(emb_data, col_widths=[3.2*cm, 3.8*cm, 2*cm, 7.5*cm]))
story.append(sp(6))
story.append(Paragraph("2.2 Fetal Cortex (Fetal Zone)", h1))
story.append(Paragraph(
"The <b>first wave</b> of mesodermal cells forms the <b>fetal cortex (fetal zone)</b>, a large "
"mass of eosinophilic cells constituting ~80% of the gland's mass by the fourth fetal month. "
"The <b>second wave</b> of mesothelial cells surrounds the first and forms the thin "
"<b>permanent (definitive) cortex</b>, which resembles the adult zona glomerulosa.",
body))
story.append(bul("By 4th fetal month: adrenal gland is nearly as large as the adjacent kidney."))
story.append(bul("At term: adrenal glands weigh the same as adult glands (~4 g each) and produce "
"<b>100–200 mg of steroids/day</b> — about twice the adult rate."))
story.append(bul("Fetal cortex secretes <b>DHEA</b>, which is converted to <b>oestrogen</b> by the placenta "
"— essential for maintaining placental function and pregnancy."))
story.append(sp(4))
story.append(Paragraph("2.3 Postnatal Involution & Adult Zonation", h1))
story.append(Paragraph(
"After birth, the fetal cortex <b>rapidly involutes</b> (stimulated by withdrawal of placental "
"oestrogen and ACTH). Over 1–3 years, it is completely replaced by the three-layered adult cortex "
"(zona glomerulosa, fasciculata, reticularis). Neural crest-derived chromaffin cells differentiate "
"fully and become enclosed within the definitive cortex.",
body))
story.append(InfoBox([
Paragraph("<b>Clinical Correlate – Congenital Adrenal Hyperplasia (CAH)</b>", key_point),
Paragraph(
"Defects in steroidogenic enzymes (most commonly <b>21-hydroxylase / CYP21A2</b>) prevent normal "
"cortisol synthesis even during fetal life. Excess ACTH drives the fetal adrenal to overproduce "
"androgens, leading to virilisation of the female fetus. CAH can present at birth as ambiguous "
"genitalia or as a life-threatening salt-wasting crisis in the neonatal period.",
note_box),
], bg=ORANGE_LT, border=ORANGE))
story.append(sp(8))
story.append(PageBreak())
# ══════════════════════════════════════════════════════════════════════════════
# CHAPTER 3 – HISTOLOGY
# ══════════════════════════════════════════════════════════════════════════════
story.append(Banner("CHAPTER 3 · HISTOLOGY", bg=PURPLE))
story.append(sp(6))
story.append(Paragraph("3.1 General Structure", h1))
story.append(Paragraph(
"The adrenal gland is enclosed in a <b>fibrous capsule</b> from which septa extend inwards. "
"Deep to the capsule is the <b>cortex</b> (80% of tissue, mesodermal origin) and centrally lies "
"the <b>medulla</b> (20%, neuroectodermal origin). Blood flows <b>centripetally</b> — cortical "
"sinusoids drain into medullary sinusoids, exposing the medulla to high concentrations of cortisol "
"(which is required for the final step of epinephrine synthesis).",
body))
story.append(sp(4))
story.append(Paragraph("3.2 The Three Zones of the Cortex", h1))
story.append(Paragraph(
'<b>Mnemonic: "GFR" (outer → inner)</b> — Glomerulosa, Fasciculata, Reticularis',
mnemonic))
# Zone table
zone_data = [
["Zone", "% Cortex", "Cell Arrangement", "Cytoplasm", "Secretion", "Regulator"],
["Zona\nGlomerulosa\n(outer)", "~15%",
"Rounded arches /\nclusters (glomerular\npattern)",
"Small cells, scanty,\nsomewhat basophilic;\nclosely packed nuclei",
"Aldosterone\n(mineralocorticoids)", "Angiotensin II,\nHyperkalemia\n(not ACTH)"],
["Zona\nFasciculata\n(middle)", "~75%",
"Long radial cords\n(fascicles) separated\nby sinusoids",
"Large spongiocytes:\npale, vacuolated,\nlipid-rich (foamy)",
"Cortisol\n(glucocorticoids)\n+ some androgens", "ACTH"],
["Zona\nReticularis\n(inner)", "~10%",
"Anastomosing cords\n(net/reticular pattern)",
"Compact, acidophilic\n(eosinophilic),\nlipid-poor; darker nuclei",
"DHEA, androstenedione\n(adrenal androgens)\n+ glucocorticoids", "ACTH"],
]
story.append(make_table(zone_data,
col_widths=[3*cm, 1.8*cm, 3.5*cm, 3.5*cm, 3.5*cm, 3.2*cm],
header_bg=PURPLE, font_size=8.5))
story.append(sp(6))
story.append(Paragraph("3.3 Zona Glomerulosa – Detailed Histology", h2))
story.append(bul("Cells arranged in <b>arched groups (glomeruli)</b> that extend into short cords."))
story.append(bul("Small cells with <b>closely packed nuclei and scanty cytoplasm</b>."))
story.append(bul("Slight basophilia of cytoplasm in H&E preparations."))
story.append(bul("Contains the enzyme <b>aldosterone synthase (CYP11B2)</b> — unique to this zone."))
story.append(bul("Lacks 17α-hydroxylase — cannot produce cortisol or sex steroids."))
story.append(sp(3))
story.append(Paragraph("3.4 Zona Fasciculata – Detailed Histology", h2))
story.append(bul("Widest zone; cells called <b>spongiocytes</b> due to foamy vacuolated cytoplasm."))
story.append(bul("Vacuoles represent dissolved <b>cholesterol ester lipid droplets</b> — the substrate for steroidogenesis."))
story.append(bul("Cells arranged in <b>long parallel cords (fascicles)</b> radiating from medulla outward."))
story.append(bul("Sinusoidal capillaries run between the cords, facilitating hormone secretion."))
story.append(bul("Large, pale-staining cells with round euchromatic nuclei."))
story.append(sp(3))
story.append(Paragraph("3.5 Zona Reticularis – Detailed Histology", h2))
story.append(bul("Cells form an <b>anastomosing network of cords</b> (reticular = net-like pattern)."))
story.append(bul("Cells are <b>compact with eosinophilic (acidophilic) cytoplasm</b> — lipid-poor."))
story.append(bul("Nuclei are slightly smaller and darker than in zona fasciculata."))
story.append(bul("Irregular, polygonal cells with prominent vascular sinusoids interspersed."))
story.append(bul("Contains <b>17,20-lyase (CYP17A1)</b> at high activity — produces DHEA and androstenedione."))
story.append(sp(3))
story.append(Paragraph("3.6 Adrenal Medulla – Detailed Histology", h2))
story.append(Paragraph(
"The medulla is composed of <b>chromaffin cells (pheochromocytes)</b> of neural crest origin, "
"arranged in cords, clusters, and nests supported by a rich sinusoidal vascular network.",
body))
story.append(bul("Cells: large, polygonal, with <b>abundant granular eosinophilic cytoplasm</b>."))
story.append(bul("Cytoplasmic granules contain stored catecholamines (epinephrine and norepinephrine)."))
story.append(bul("<b>Chromaffin reaction</b>: Cells stain yellow-brown with chrome salts due to oxidation of catecholamines."))
story.append(bul("<b>Two cell populations:</b>"))
story.append(Paragraph(" • <b>Epinephrine-secreting cells</b> (~80%): "
"lighter staining, smaller granules; contain PNMT enzyme.", body))
story.append(Paragraph(" • <b>Norepinephrine-secreting cells</b> (~20%): "
"darker staining, denser, larger granules.", body))
story.append(bul("<b>Sustentacular (supporting) cells</b>: peripheral, spindle-shaped; S-100 positive."))
story.append(bul("Medullary sinusoids are large and fenestrated, enabling rapid catecholamine release."))
story.append(sp(4))
story.append(InfoBox([
Paragraph("<b>Histological Mnemonics</b>", key_point),
Paragraph(
'<b>"Salt, Sugar, Sex"</b> (outer → inner): Glomerulosa (salt = aldosterone), '
'Fasciculata (sugar = cortisol), Reticularis (sex = androgens).<br/>'
'<b>"GFR"</b> matches kidney GFR — both involve filtration/regulation of electrolytes and fluids.<br/>'
'<b>Spongiocytes</b> = Zona fasciculata (spongey = lipid-rich = cortisol factory).<br/>'
'<b>Chromaffin cells</b> = medulla (chrome staining = catecholamines).',
note_box),
], bg=YELLOW_LT, border=colors.HexColor("#ca8a04")))
story.append(PageBreak())
# ══════════════════════════════════════════════════════════════════════════════
# CHAPTER 4 – PHYSIOLOGY: CORTEX
# ══════════════════════════════════════════════════════════════════════════════
story.append(Banner("CHAPTER 4 · PHYSIOLOGY — ADRENAL CORTEX", bg=TEAL))
story.append(sp(6))
story.append(Paragraph("4.1 Steroidogenesis – Shared Pathway", h1))
story.append(Paragraph(
"All adrenocortical hormones are <b>steroid hormones</b> derived from cholesterol (a 27-carbon molecule). "
"The rate-limiting step is the transfer of cholesterol into the inner mitochondrial membrane by "
"<b>StAR protein (Steroidogenic Acute Regulatory protein)</b>, stimulated by ACTH. "
"The shared precursor is <b>pregnenolone</b>.",
body))
story.append(bul("<b>Glucocorticoids (cortisol)</b>: 21-carbon steroids; hydroxyl groups at C11, C17, C21."))
story.append(bul("<b>Mineralocorticoids (aldosterone)</b>: 21-carbon steroids; aldehyde at C18; lacks 17-OH."))
story.append(bul("<b>Androgens (DHEA)</b>: 19-carbon steroids; ketone at C17; lack C20–C21 side chain."))
story.append(sp(6))
story.append(Paragraph("4.2 Cortisol (Glucocorticoid)", h1))
story.append(Paragraph("4.2.1 Regulation – HPA Axis", h2))
story.append(bul("<b>CRH</b> (41 amino acids) secreted by paraventricular nuclei of hypothalamus → "
"travels in hypothalamic-hypophysial portal blood → acts on corticotrophs via "
"adenylyl cyclase/cAMP."))
story.append(bul("<b>ACTH</b> from anterior pituitary corticotrophs → acts on zona fasciculata/reticularis:"))
story.append(Paragraph(" • <b>Immediate:</b> Activates cholesterol desmolase; "
"transfers cholesterol to mitochondria; stimulates StAR.", body))
story.append(Paragraph(" • <b>Long-term:</b> Upregulates CYP450 genes, "
"adrenodoxin, and ACTH receptors.", body))
story.append(Paragraph(" • <b>Chronic elevated ACTH:</b> Hypertrophy and "
"hyperplasia of cortical cells (via IGF-2).", body))
story.append(bul("<b>Negative feedback:</b> Cortisol inhibits (1) CRH from hypothalamus, "
"(2) ACTH synthesis and secretion from pituitary, (3) ACTH gene transcription."))
story.append(bul("<b>Diurnal rhythm:</b> Peak ~8 AM (just before awakening); nadir ~midnight. "
"~10 pulsatile secretory bursts per 24 hours. Abolished by coma, blindness, or constant light/dark."))
story.append(sp(4))
story.append(Paragraph("4.2.2 Transport in Blood", h2))
story.append(bul("75–80%: bound to <b>corticosteroid-binding globulin (CBG / transcortin)</b>"))
story.append(bul("~15%: loosely bound to albumin"))
story.append(bul("~5%: <b>free (biologically active)</b> form"))
story.append(bul("Half-life in plasma: ~60–90 minutes"))
story.append(sp(4))
story.append(Paragraph("4.2.3 Actions of Cortisol", h2))
act_data = [
["System / Tissue", "Effect of Cortisol", "Net Result"],
["Carbohydrate\nmetabolism", "↑ Gluconeogenesis (liver)\n↓ Peripheral glucose uptake\n↑ Glycogen synthesis", "Hyperglycaemia (diabetogenic)"],
["Protein\nmetabolism", "↑ Protein catabolism in muscle/skin/bone\n↑ Amino acid mobilisation → liver", "Muscle wasting, thin skin, poor wound healing"],
["Fat metabolism", "↑ Lipolysis in extremities\nRedistributes fat centrally", "Thin arms/legs; central obesity, moon face, buffalo hump"],
["Immune system", "↓ Cytokines (IL-1, IL-2, TNF-α)\n↓ Lymphocytes, eosinophils\nStabilises lysosomal membranes", "Anti-inflammatory, immunosuppressive"],
["Bone", "↓ Osteoblast activity\n↓ Intestinal Ca²⁺ absorption\n↑ Renal Ca²⁺ excretion", "Osteoporosis with chronic excess"],
["Cardiovascular", "↑ Vascular reactivity (upregulates α1 adrenoceptors)\nWeak mineralocorticoid effect", "Hypertension in excess"],
["Kidney", "Weak mineralocorticoid activity\n(inactivated by 11β-HSD2 in collecting duct)", "Mild Na⁺ retention, K⁺ loss"],
["CNS", "Affects mood, cognition, sleep", "Euphoria/psychosis in excess; depression in deficiency"],
["Fetal lung", "↑ Surfactant synthesis by type II pneumocytes", "Lung maturation before birth"],
["GI tract", "↑ Gastric acid secretion\n↓ Mucosal cell turnover", "Peptic ulcer risk"],
["Haematology", "↑ RBC, platelets, neutrophils\n↓ Lymphocytes, eosinophils, basophils", "Leukocytosis on blood count"],
]
story.append(make_table(act_data, col_widths=[3.5*cm, 7*cm, 5.5*cm], header_bg=TEAL, font_size=8.5))
story.append(sp(8))
story.append(PageBreak())
# ── Aldosterone ───────────────────────────────────────────────────────────────
story.append(Paragraph("4.3 Aldosterone (Mineralocorticoid)", h1))
story.append(Paragraph("4.3.1 Regulation – RAAS", h2))
story.append(Paragraph(
"Aldosterone secretion is primarily regulated by the <b>Renin-Angiotensin-Aldosterone System (RAAS)</b> "
"and by plasma <b>potassium (K⁺) levels</b>. ACTH plays only a minor role.",
body))
raas_data = [
["Step", "Location", "Event"],
["1", "Kidney juxtaglomerular (JG) cells", "↓ BP / ↓ Na⁺ / β1 stimulation → release Renin"],
["2", "Liver", "Renin cleaves angiotensinogen → Angiotensin I (10 AA)"],
["3", "Pulmonary endothelium", "ACE converts Angiotensin I → Angiotensin II (8 AA)"],
["4", "Adrenal zona glomerulosa", "Angiotensin II (+ hyperkalaemia) → Aldosterone secretion"],
["5", "Kidney (late DCT, collecting duct)", "Aldosterone binds intracellular MR → ↑ ENaC & Na⁺/K⁺-ATPase"],
["6", "Systemic", "↑ Na⁺ & water retention → ↑ BP → ↓ Renin (negative feedback)"],
]
story.append(make_table(raas_data, col_widths=[1.2*cm, 5.5*cm, 9.8*cm], header_bg=TEAL, font_size=9))
story.append(sp(5))
story.append(Paragraph("4.3.2 Actions of Aldosterone", h2))
story.append(bul("<b>Principal cells of late distal tubule and collecting duct:</b>"))
story.append(Paragraph(" • ↑ Na⁺ reabsorption via ENaC (epithelial Na⁺ channels) → "
"water retention → volume expansion → hypertension.", body))
story.append(Paragraph(" • ↑ K⁺ secretion via ROMK channels → "
"hypokalaemia in excess.", body))
story.append(Paragraph(" • ↑ H⁺ secretion via H⁺-ATPase → "
"metabolic alkalosis in excess.", body))
story.append(bul("<b>Secondary sites:</b> Salivary glands, sweat glands, colon (reduces Na⁺ losses)."))
story.append(sp(4))
story.append(Paragraph("4.3.3 Why Cortisol Does NOT Act as a Mineralocorticoid (Normally)", h2))
story.append(InfoBox([
Paragraph("<b>The 11β-HSD2 'Protection' Mechanism</b>", key_point),
Paragraph(
"Mineralocorticoid receptors (MR) bind cortisol with equal affinity as aldosterone. Since circulating "
"cortisol levels are ~100-1000× higher than aldosterone, cortisol would otherwise dominate MRs. "
"Renal tubular cells solve this by expressing <b>11β-hydroxysteroid dehydrogenase type 2 (11β-HSD2)</b>, "
"which converts cortisol → cortisone (inactive at MR). This 'protects' MRs for aldosterone. "
"<b>Clinical consequence:</b> Inhibition of 11β-HSD2 (e.g. by liquorice/carbenoxolone or "
"in apparent mineralocorticoid excess syndrome) allows cortisol to activate MRs → "
"hypertension + hypokalaemia even though aldosterone levels are low.",
note_box),
], bg=TEAL_LIGHT, border=TEAL))
story.append(sp(6))
story.append(Paragraph("4.4 Adrenal Androgens", h1))
story.append(Paragraph(
"The adrenal zona reticularis produces <b>DHEA (dehydroepiandrosterone)</b>, "
"<b>DHEAS (sulphated form)</b>, and <b>androstenedione</b> — all weak androgens that are "
"converted peripherally to testosterone and oestrogens.",
body))
story.append(bul("Regulated by ACTH (parallel diurnal variation to cortisol)."))
story.append(bul("DHEAS circulates at much higher concentrations than DHEA (half-life ~10 hours vs ~20 min) "
"and shows no diurnal variation."))
story.append(bul("<b>In males:</b> Minor role — testicular testosterone synthesis far exceeds adrenal contribution."))
story.append(bul("<b>In females:</b> Adrenal androgens are the <b>primary androgen source</b> — responsible for "
"pubic/axillary hair development and libido."))
story.append(bul("<b>Excess:</b> Virilisation in females; early pubic/axillary hair; suppresses gonadal function. "
"↑ Urinary 17-ketosteroids."))
story.append(sp(4))
story.append(Paragraph("4.5 Steroid Hormone Receptor Mechanism", h1))
story.append(Paragraph(
"Steroid hormones are <b>lipid-soluble</b> — they diffuse across the cell membrane and bind to "
"<b>intracellular (cytoplasmic or nuclear) receptors</b>. The hormone-receptor complex then acts as a "
"transcription factor, binding hormone-response elements (HREs) in DNA to modulate gene expression. "
"This mechanism has a <b>delayed onset (hours)</b> but <b>prolonged duration</b> compared with peptide hormones.",
body))
story.append(PageBreak())
# ══════════════════════════════════════════════════════════════════════════════
# CHAPTER 5 – PHYSIOLOGY: MEDULLA
# ══════════════════════════════════════════════════════════════════════════════
story.append(Banner("CHAPTER 5 · PHYSIOLOGY — ADRENAL MEDULLA", bg=colors.HexColor("#92400e")))
story.append(sp(6))
story.append(Paragraph("5.1 Catecholamine Synthesis Pathway", h1))
story.append(Paragraph(
"Catecholamines are synthesised from the amino acid <b>tyrosine</b> in a four-step pathway within "
"chromaffin cell cytoplasm and vesicles. <b>PNMT (phenylethanolamine-N-methyltransferase)</b>, "
"the enzyme converting norepinephrine → epinephrine, requires <b>high local cortisol concentrations</b> — "
"delivered via the portal blood from the adrenal cortex. This explains why the medulla is surrounded "
"by cortex: cortisol is needed to maintain full epinephrine synthesis.",
body))
syn_data = [
["Step", "Substrate", "Enzyme", "Product", "Location"],
["1", "Tyrosine", "Tyrosine hydroxylase (rate-limiting)", "DOPA (L-DOPA)", "Cytoplasm"],
["2", "DOPA", "DOPA decarboxylase (AAAD)", "Dopamine", "Cytoplasm"],
["3", "Dopamine", "Dopamine β-hydroxylase (DBH)", "Norepinephrine", "Secretory vesicle"],
["4 (medulla only)", "Norepinephrine", "PNMT (requires cortisol)", "Epinephrine", "Cytoplasm"],
]
story.append(make_table(syn_data, col_widths=[3*cm, 3*cm, 5*cm, 3.5*cm, 2.5*cm],
header_bg=colors.HexColor("#92400e"), font_size=9))
story.append(sp(5))
story.append(Paragraph("5.2 Secretion & Storage", h1))
story.append(bul("Catecholamines are stored in <b>chromaffin granules</b> complexed with ATP and chromogranins."))
story.append(bul("Released by <b>exocytosis</b> triggered by preganglionic ACh acting on nicotinic receptors."))
story.append(bul("Medulla secretes: ~<b>80% epinephrine, ~20% norepinephrine</b>."))
story.append(bul("Plasma half-life: ~2 minutes (rapidly inactivated)."))
story.append(sp(4))
story.append(Paragraph("5.3 Catecholamine Receptors & Actions", h1))
cat_data = [
["Receptor", "Location", "Mediator", "Effect"],
["α1", "Skin, viscera, arterioles", "Both (NE>Epi)", "Vasoconstriction, ↑ peripheral resistance"],
["α2", "Presynaptic nerve terminals, GI", "NE", "↓ NE release (feedback), ↓ GI motility"],
["β1", "Heart, JG cells (kidney)", "Both (Epi=NE)", "↑ Heart rate, ↑ contractility, ↑ renin"],
["β2", "Bronchi, skeletal muscle vessels", "Epi > NE", "Bronchodilation, vasodilation, glycogenolysis"],
["β3", "Adipose tissue, bladder", "NE > Epi", "Lipolysis, bladder relaxation"],
]
story.append(make_table(cat_data, col_widths=[2.5*cm, 4.5*cm, 3.5*cm, 7*cm],
header_bg=colors.HexColor("#92400e"), font_size=9))
story.append(sp(5))
story.append(Paragraph("5.4 Physiological Role (Fight-or-Flight Response)", h1))
ff_data = [
["System", "Response", "Purpose"],
["Heart", "↑ Rate, ↑ force (β1)", "↑ Cardiac output"],
["Vasculature", "Vasoconstriction skin/viscera (α1); vasodilation muscle (β2)", "Blood redirected to muscle"],
["Lungs", "Bronchodilation (β2)", "↑ O₂ delivery"],
["Liver/muscle", "Glycogenolysis (β2/β1)", "↑ Blood glucose for energy"],
["Adipose", "Lipolysis (β3/β1)", "↑ Free fatty acids for energy"],
["Pupils", "Dilation (α1 radial muscle)", "↑ Visual field"],
["GI tract", "↓ Motility, sphincter contraction (α)", "Redirect blood flow"],
["Bladder", "Sphincter contraction (α1), detrusor relaxation (β2)", "Retain urine"],
["Sweat glands", "↑ Sweating (cholinergic despite sympathetic)", "Thermoregulation"],
]
story.append(make_table(ff_data, col_widths=[3.5*cm, 8*cm, 5*cm],
header_bg=colors.HexColor("#92400e"), font_size=9))
story.append(sp(5))
story.append(Paragraph("5.5 Catecholamine Metabolism", h1))
story.append(bul("<b>MAO (monoamine oxidase)</b>: Intraneuronal; degrades free cytoplasmic catecholamines."))
story.append(bul("<b>COMT (catechol-O-methyltransferase)</b>: Extraneuronal; methylates catecholamines."))
story.append(bul("<b>End metabolites:</b>"))
story.append(Paragraph(" • Epinephrine → <b>Metanephrine</b> (COMT) → VMA", body))
story.append(Paragraph(" • Norepinephrine → <b>Normetanephrine</b> (COMT) → VMA", body))
story.append(Paragraph(" • Both → <b>VMA (Vanillylmandelic acid)</b> (final urine metabolite)", body))
story.append(PageBreak())
# ══════════════════════════════════════════════════════════════════════════════
# CHAPTER 6 – APPLIED ANATOMY & PHYSIOLOGY
# ══════════════════════════════════════════════════════════════════════════════
story.append(Banner("CHAPTER 6 · APPLIED ANATOMY & CLINICAL PHYSIOLOGY", bg=RED))
story.append(sp(6))
story.append(Paragraph("6.1 Cushing's Syndrome vs Cushing's Disease", h1))
cush_data = [
["Feature", "Cushing's SYNDROME (Primary)", "Cushing's DISEASE (Pituitary)"],
["Cause", "Autonomous cortisol-secreting adrenal adenoma/carcinoma or ectopic ACTH", "ACTH-secreting pituitary microadenoma"],
["Primary defect", "Adrenal cortex", "Anterior pituitary"],
["ACTH levels", "↓ LOW (suppressed by high cortisol)", "↑ HIGH"],
["Clinical features", "Shared: central obesity, moon face, buffalo hump, striae, muscle wasting, osteoporosis, hypertension, hyperglycaemia, poor wound healing", "Same + hyperpigmentation if ACTH very high"],
["Dexamethasone\nsuppression test", "NOT suppressed by either low- or\nhigh-dose dexamethasone (autonomous)", "Suppressed by HIGH-dose; not by low-dose"],
["Treatment", "Ketoconazole / metyrapone (block synthesis);\nif failed: bilateral adrenalectomy + replacement", "Transsphenoidal pituitary adenoma resection"],
]
story.append(make_table(cush_data, col_widths=[4*cm, 6.5*cm, 6*cm], header_bg=RED, font_size=8.5))
story.append(sp(6))
story.append(Paragraph("6.2 Conn's Syndrome (Primary Hyperaldosteronism)", h1))
story.append(bul("<b>Cause:</b> Aldosterone-secreting adrenal adenoma (or bilateral adrenal hyperplasia)."))
story.append(bul("<b>Hallmarks (explain by physiology):</b>"))
story.append(Paragraph(" • <b>Hypertension</b> — ↑ Na⁺ retention → ↑ ECF volume.", body))
story.append(Paragraph(" • <b>Hypokalaemia</b> — ↑ K⁺ secretion at collecting duct.", body))
story.append(Paragraph(" • <b>Metabolic alkalosis</b> — ↑ H⁺ secretion.", body))
story.append(Paragraph(" • <b>Low plasma renin</b> — volume expansion suppresses JG cell renin release.", body))
story.append(bul("<b>Diagnosis:</b> Elevated aldosterone : renin ratio (ARR). Confirmed by CT adrenals ± adrenal vein sampling."))
story.append(bul("<b>Treatment:</b> Spironolactone (MR antagonist) or eplerenone; unilateral adrenalectomy for adenoma."))
story.append(sp(5))
story.append(Paragraph("6.3 Addison's Disease (Primary Adrenal Insufficiency)", h1))
add_data = [
["Feature", "Details"],
["Cause", "Autoimmune adrenalitis (most common in developed world); TB (most common globally); haemorrhage; metastasis; fungal infection"],
["Deficiencies", "Cortisol + Aldosterone + Androgens (all three cortical zones affected)"],
["Symptoms", "Fatigue, weakness, weight loss, anorexia, nausea, vomiting, diarrhoea, abdominal pain, postural dizziness"],
["Signs", "Hypotension, hyperpigmentation (buccal mucosa, palmar creases, scars — due to ↑ ACTH/MSH), dehydration"],
["Electrolytes", "↓ Na⁺ (hyponatraemia), ↑ K⁺ (hyperkalaemia), ↓ glucose (hypoglycaemia), metabolic acidosis"],
["Diagnosis", "8 AM serum cortisol; ACTH stimulation test (cosyntropin); ↑ plasma ACTH; anti-21-hydroxylase antibodies"],
["Addisonian crisis", "Precipitated by illness/surgery/trauma; severe hypotension, shock, fever, vomiting; treat with IV hydrocortisone + saline + dextrose IMMEDIATELY"],
["Treatment", "Hydrocortisone (glucocorticoid replacement) + fludrocortisone (mineralocorticoid replacement); double dose during illness ('sick day rules')"],
]
story.append(make_table(add_data, col_widths=[4.5*cm, 12*cm], header_bg=RED, font_size=9))
story.append(sp(6))
story.append(Paragraph("6.4 Congenital Adrenal Hyperplasia (CAH)", h1))
story.append(Paragraph(
"<b>Most common cause (>90%):</b> 21-hydroxylase (CYP21A2) deficiency. "
"Without this enzyme, the pathway to cortisol and aldosterone is blocked; "
"precursors (17-hydroxyprogesterone) are shunted into the androgen synthesis pathway. "
"Low cortisol causes chronic ACTH elevation → bilateral adrenal hyperplasia.",
body))
cah_data = [
["Form", "Enzyme", "Aldosterone", "Cortisol", "Androgens", "Clinical Presentation"],
["Salt-wasting CAH\n(most severe)", "21-hydroxylase\n(CYP21A2)", "↓↓", "↓↓", "↑↑", "Neonatal crisis: vomiting, dehydration, shock, hyperkalaemia, hyponatraemia. Ambiguous genitalia (46XX females)."],
["Simple virilising CAH", "21-hydroxylase\n(CYP21A2)", "Normal/low", "↓", "↑↑", "Virilisation in females; precocious puberty in males. No salt-wasting crisis."],
["11β-Hydroxylase\ndeficiency", "CYP11B1", "Low\n(but 11-DOC↑)", "↓", "↑", "Virilisation + HYPERTENSION (↑ deoxycorticosterone has mineralocorticoid activity)."],
["17α-Hydroxylase\ndeficiency", "CYP17A1", "↑", "↓", "↓↓", "Hypertension, hypokalaemia; sexual infantilism (↓ sex steroids); primary amenorrhoea in females."],
]
story.append(make_table(cah_data, col_widths=[2.8*cm, 2.8*cm, 2*cm, 2*cm, 2*cm, 6.9*cm],
header_bg=RED, font_size=8.5))
story.append(sp(6))
story.append(PageBreak())
story.append(Paragraph("6.5 Phaeochromocytoma", h1))
story.append(InfoBox([
Paragraph('<b>Rule of 10s for Phaeochromocytoma</b>', key_point),
bul("10% bilateral"),
bul("10% malignant"),
bul("10% extraadrenal (paraganglioma — most commonly organ of Zuckerkandl near aortic bifurcation)"),
bul("10% paediatric"),
bul("10% familial (MEN 2A, MEN 2B, von Hippel-Lindau, NF-1, SDH mutations)"),
], bg=ORANGE_LT, border=ORANGE))
story.append(sp(4))
pheo_data = [
["Feature", "Details"],
["Symptoms", "Classic triad: episodic headache + palpitations + diaphoresis. Paroxysmal or sustained hypertension, pallor, anxiety, tremor"],
["Biochemical\ndiagnosis", "Plasma/urine metanephrines (most sensitive + specific). Urine VMA and catecholamines. 24-hour urine collection."],
["Imaging", "CT/MRI abdomen (adrenals + paraganglia). ¹²³I-MIBG scan for localisation of metastatic/extraadrenal disease. ⁶⁸Ga-DOTATATE PET for SDH-related tumours."],
["Histology", "Chromaffin cells in Zellballen (nest/alveolar) pattern with sustentacular cells at periphery (S-100+). Pleomorphism does not = malignancy; only metastasis confirms malignancy."],
["Surgical\npreparation", "α-blocker (phenoxybenzamine 10–14 days pre-op) FIRST → then β-blocker if needed. NEVER start β-blocker first (unopposed α → hypertensive crisis). IV fluids to expand volume post-α blockade."],
["Anaesthetic risks", "Hypertensive crisis on induction/tumour manipulation; hypotension after tumour removal (volume depletion). Treat crisis with phentolamine or nitroprusside IV."],
["Treatment", "Laparoscopic adrenalectomy (gold standard). Bilateral: cortex-sparing surgery to avoid lifelong steroid replacement."],
]
story.append(make_table(pheo_data, col_widths=[4*cm, 12.5*cm], header_bg=RED, font_size=9))
story.append(sp(6))
story.append(Paragraph("6.6 Waterhouse-Friderichsen Syndrome", h1))
story.append(bul("<b>Definition:</b> Bilateral adrenal haemorrhage causing acute adrenal crisis."))
story.append(bul("<b>Classic cause:</b> Meningococcal septicaemia (<i>Neisseria meningitidis</i>). Also: Pseudomonas, pneumococcus, DIC."))
story.append(bul("<b>Pathology:</b> Massive bilateral adrenal infarction/haemorrhage → acute loss of all cortical and medullary hormones."))
story.append(bul("<b>Clinical features:</b> High fever, purpuric/petechial rash, shock, DIC, rapid deterioration."))
story.append(bul("<b>Treatment:</b> Immediate IV hydrocortisone + fluid resuscitation + antibiotics. High mortality."))
story.append(sp(5))
story.append(Paragraph("6.7 Adrenal Incidentaloma", h1))
story.append(Paragraph(
"An adrenal incidentaloma is an adrenal mass ≥1 cm discovered incidentally on imaging "
"performed for a non-adrenal indication. Prevalence increases with age (~5% of CT scans in adults >50).",
body))
story.append(bul("<b>Workup:</b> Hormonal screening (overnight 1 mg dexamethasone suppression test; "
"plasma/urine metanephrines; plasma aldosterone:renin ratio if hypertensive; DHEAS)."))
story.append(bul("<b>Radiology clues:</b> Lipid-rich adenoma: <10 HU on non-contrast CT. "
"Lipid-poor / indeterminate: >10 HU; washout characteristics used."))
story.append(bul("<b>Surgical indications:</b> Functional tumours; size >4 cm; growth on follow-up."))
story.append(sp(5))
story.append(Paragraph("6.8 Neuroblastoma", h1))
story.append(bul("<b>Definition:</b> Malignant tumour of neural crest origin arising from adrenal medulla or sympathetic chain."))
story.append(bul("<b>Epidemiology:</b> Most common extracranial solid tumour of childhood; median age 17–19 months."))
story.append(bul("<b>Biochemical markers:</b> ↑ urine VMA (vanillylmandelic acid) and HVA (homovanillic acid)."))
story.append(bul("<b>Histology:</b> Small round blue cells; Homer-Wright pseudorosettes; differentiating forms show ganglion cells."))
story.append(bul("<b>MYCN amplification:</b> Poor prognostic marker."))
story.append(bul("<b>Presentation:</b> Abdominal mass crossing midline, raccoon eyes (periorbital ecchymosis), proptosis, bone pain, Horner's syndrome."))
story.append(sp(5))
story.append(Paragraph("6.9 Critical Illness-Related Corticosteroid Insufficiency (CIRCI)", h1))
story.append(Paragraph(
"CIRCI describes disruption of the HPA axis during critical illness (sepsis, major trauma, burns, "
"pancreatitis, hepatic failure) resulting in relative glucocorticoid deficiency and exaggerated "
"systemic inflammation.",
body))
story.append(bul("Presents as vasopressor-dependent hypotension in ICU patients."))
story.append(bul("Classic Addisonian markers (hyperpigmentation, hyperkalaemia) typically absent."))
story.append(bul("Cosyntropin (ACTH) stimulation test: utility in ICU is controversial."))
story.append(bul("Current Surviving Sepsis Guidelines (2021): do NOT recommend stimulation testing to guide steroid use; "
"recommend hydrocortisone 200 mg/day IV if vasopressors not weaned within first days."))
story.append(PageBreak())
# ══════════════════════════════════════════════════════════════════════════════
# CHAPTER 7 – SUMMARY TABLES & QUICK REVIEW
# ══════════════════════════════════════════════════════════════════════════════
story.append(Banner("CHAPTER 7 · SUMMARY TABLES & QUICK REVIEW", bg=colors.HexColor("#475569")))
story.append(sp(6))
story.append(Paragraph("7.1 Hormones at a Glance", h1))
hor_data = [
["Hormone", "Zone/Source", "Regulator", "Receptor", "Key Actions", "Excess Syndrome", "Deficiency Syndrome"],
["Cortisol", "Zona fasciculata", "ACTH (HPA axis); diurnal", "Intracellular GR", "Gluconeogenesis; anti-inflammatory; lipolysis; protein catabolism", "Cushing's syndrome/disease", "Addison's disease; adrenal crisis"],
["Aldosterone", "Zona glomerulosa", "Angiotensin II; K⁺; minor ACTH", "Intracellular MR", "↑ Na⁺ reabsorption; ↑ K⁺ & H⁺ secretion", "Conn's syndrome (1° hyperaldosteronism)", "Addison's disease; hyperkalaemia, hyponatraemia"],
["DHEA / DHEAS", "Zona reticularis", "ACTH", "Intracellular AR (peripheral)", "Weak androgen; pubic/axillary hair; libido (female)", "CAH; adrenogenital syndrome (virilisation)", "Loss of pubic/axillary hair; ↓ libido (female)"],
["Epinephrine (~80%)", "Adrenal medulla", "Preganglionic ACh; stress", "α & β adrenoceptors", "↑ HR/CO; bronchodilation; glycogenolysis; vasodilation muscle", "Phaeochromocytoma", "Impaired stress response"],
["Norepinephrine (~20%)", "Adrenal medulla", "Preganglionic ACh; stress", "α > β adrenoceptors", "Vasoconstriction; ↑ BP (mainly diastolic); little HR effect alone", "Phaeochromocytoma", "—"],
]
story.append(make_table(hor_data, col_widths=[2.5*cm, 2.5*cm, 2.5*cm, 2.3*cm, 4*cm, 2.8*cm, 2.9*cm],
header_bg=colors.HexColor("#475569"), font_size=7.5))
story.append(sp(6))
story.append(Paragraph("7.2 Clinical Electrolyte Patterns in Adrenal Disorders", h1))
elec_data = [
["Disorder", "Na⁺", "K⁺", "HCO₃⁻ (acid-base)", "Glucose", "BP"],
["Conn's syndrome", "↑ (normal–high)", "↓↓", "↑ (alkalosis)", "Normal", "↑↑ Hypertension"],
["Addison's disease", "↓↓", "↑↑", "↓ (acidosis)", "↓ (fasting)", "↓ Hypotension"],
["Cushing's syndrome", "↑ (mild)", "↓ (mild)", "↑ (mild alkalosis)", "↑↑ Hyperglycaemia", "↑ Hypertension"],
["CAH – 21-OH def (salt-wasting)", "↓↓", "↑↑", "↓ (acidosis)", "↓", "↓ Hypotension/shock"],
["CAH – 11β-OH def", "↑", "↓", "↑ (alkalosis)", "↓", "↑↑ Hypertension"],
["Phaeochromocytoma", "Normal", "Normal", "Normal", "↑ (catecholamine)", "↑↑ Paroxysmal hypertension"],
]
story.append(make_table(elec_data, col_widths=[4*cm, 2*cm, 2*cm, 3.5*cm, 2.8*cm, 3.2*cm],
header_bg=colors.HexColor("#475569"), font_size=9))
story.append(sp(6))
story.append(Paragraph("7.3 High-Yield Mnemonics", h1))
mn_data = [
[Paragraph("<b>Mnemonic</b>", body_b), Paragraph("<b>Meaning</b>", body_b)],
["GFR (outer→inner cortex)", "Glomerulosa (salt/aldosterone) → Fasciculata (sugar/cortisol) → Reticularis (sex/androgens)"],
["Salt, Sugar, Sex", "Same as above — aldosterone, cortisol, androgens"],
["Spongiocytes", "Zona Fasciculata — foamy lipid-rich cytoplasm = cortisol factory"],
["Rule of 10s", "Phaeochromocytoma: 10% bilateral / malignant / extraadrenal / paediatric / familial"],
["α before β", "Phaeochromocytoma surgery: give α-blocker FIRST, then β-blocker"],
["ACTH-independent aldosterone", "Zona glomerulosa is NOT regulated by ACTH (regulated by Ang II + K⁺)"],
["Waterhouse-Friderichsen", "Bilateral adrenal haemorrhage → meningococcaemia → purpura + shock + adrenal crisis"],
["StAR = rate limiting", "Steroidogenic Acute Regulatory protein = rate-limiting step in steroidogenesis"],
["Cortisol diurnal peak", "Peak 8 AM, nadir midnight (like cortisol peaks before a 'morning rush')"],
["11β-HSD2 protects kidney MR", "Converts cortisol → cortisone in kidney → aldosterone can work without interference"],
["PNMT needs cortisol", "Medulla needs high cortisol (from cortical portal blood) to convert NE → Epi"],
]
story.append(make_table(mn_data, col_widths=[5.5*cm, 11*cm],
header_bg=colors.HexColor("#475569"), font_size=9))
story.append(sp(6))
story.append(Paragraph("7.4 Key Laboratory Investigations", h1))
lab_data = [
["Test", "What it Measures", "Used For"],
["8 AM serum cortisol", "Baseline cortisol at diurnal peak", "Screen for adrenal insufficiency; if <3 µg/dL = Addison's"],
["Overnight 1 mg DST (dexamethasone suppression test)", "Post-dex cortisol <1.8 µg/dL = normal suppression", "Screen for Cushing's syndrome"],
["High-dose DST (8 mg)", "Cortisol suppressed in Cushing's disease but not adrenal Cushing's", "Distinguish pituitary vs adrenal Cushing's"],
["24-h urine free cortisol", "Total daily cortisol production", "Confirm Cushing's syndrome"],
["Plasma ACTH", "Pituitary ACTH level", "↓ in primary adrenal disease; ↑ in Cushing's disease / Addison's"],
["ACTH stimulation test\n(cosyntropin/synacthen)", "Cortisol response at 30 & 60 min (normal >18 µg/dL)", "Diagnose primary/secondary adrenal insufficiency"],
["Aldosterone : Renin ratio (ARR)", "Autonomous aldosterone production", "Screen for Conn's syndrome"],
["Plasma/urine metanephrines", "Catecholamine metabolites", "Screen for phaeochromocytoma (high sensitivity)"],
["Urine VMA + HVA", "Catecholamine metabolites", "Screen for neuroblastoma in children"],
["17-hydroxyprogesterone (17-OHP)", "Precursor to cortisol (accumulates in 21-OH deficiency)", "Diagnose CAH (21-hydroxylase deficiency)"],
["24-h urine 17-ketosteroids", "Adrenal androgen metabolites", "↑ in CAH, adrenogenital syndrome, adrenal carcinoma"],
]
story.append(make_table(lab_data, col_widths=[5*cm, 5.5*cm, 6*cm],
header_bg=colors.HexColor("#475569"), font_size=8.5))
story.append(sp(8))
# Footer references
story.append(hr(color=GRAY_MID))
story.append(Paragraph(
"<b>Sources:</b> Costanzo Physiology 7e | Medical Physiology – Barrett | Langman's Medical Embryology | "
"Histology: A Text and Atlas – Ross & Pawlina | Schwartz's Principles of Surgery 11e | "
"Fischer's Mastery of Surgery 8e | Sabiston Textbook of Surgery | Morgan & Mikhail's Clinical Anaesthesiology 7e",
small_it))
# ── BUILD ─────────────────────────────────────────────────────────────────────
def add_page_number(canvas, doc):
canvas.saveState()
canvas.setFont("Helvetica", 8)
canvas.setFillColor(colors.HexColor("#9ca3af"))
page_num = canvas.getPageNumber()
canvas.drawRightString(A4[0] - 2*cm, 1.2*cm, f"Page {page_num}")
canvas.drawString(2*cm, 1.2*cm, "Adrenal Gland — Complete Medical Reference | Orris")
canvas.restoreState()
doc.build(story, onFirstPage=add_page_number, onLaterPages=add_page_number)
print("PDF created successfully!")
cd /tmp/workspace/adrenal-gland && python generate_pdf.py 2>&1
ls -lh /tmp/workspace/adrenal-gland/Adrenal_Gland_Complete.pdf
Adrenal Gland Complete
PDF Document · PDF
| Chapter | Content |
|---|---|
| 1 - Gross Anatomy | Location, side-by-side relations table, triple arterial supply table, venous drainage (including surgical note on right adrenal vein), lymphatics, nerve supply |
| 2 - Embryology | Dual origin table (mesoderm vs neuroectoderm), fetal cortex, DHEA-placenta axis, postnatal involution, chromaffin cell differentiation + CAH clinical box |
| 3 - Histology | All three cortical zones in a detailed comparison table (cell arrangement, cytoplasm, enzyme, secretion, regulator), spongiocytes, chromaffin cells, sustentacular cells, chromaffin reaction, mnemonic box |
| 4 - Adrenal Cortex Physiology | Steroidogenesis, StAR protein, HPA axis step-by-step, diurnal rhythm, cortisol transport, full actions table (11 systems), aldosterone RAAS cascade table, 11β-HSD2 protection box, adrenal androgens |
| 5 - Adrenal Medulla Physiology | Catecholamine synthesis 4-step table, PNMT + cortisol dependency, receptor table (α1/α2/β1/β2/β3), fight-or-flight response table, VMA/metanephrine metabolism |
| 6 - Applied Anatomy & Clinical | Cushing's vs Cushing's disease comparison, Conn's syndrome, Addison's disease full table, CAH enzyme variants table (4 types), Phaeochromocytoma Rule of 10s + perioperative management, Waterhouse-Friderichsen, adrenal incidentaloma, neuroblastoma, CIRCI |
| 7 - Summary & Quick Review | All hormones at a glance, electrolyte pattern table for all disorders, mnemonics table (11 mnemonics), key lab investigations table (11 tests) |
Anatomy, histology &p physiology of thyroid gland with applied physiology
thyroid gland anatomy histology follicle colloid parafollicular cells
thyroid follicles colloid H&E histology
thyroid gland gross anatomy lobes isthmus blood supply
thyroid follicles colloid histology micrograph

Imaging modality and technique: Bright-field light microscopy of a hematoxylin and eosin–stained thyroid tissue section. Specimen is a thyroid parenchymal biopsy/resection showing multinodular goiter with heterogenous follicle sizes. The micrograph reveals variably sized, dilated follicles interspersed with smaller hypercellular follicles; cells lining some follicles are flattened to cuboidal with scant colloid, while other follicles are large and colloid-rich, producing a biphasic appearance. The stroma is not heavily fibrotic; nodular architecture creates broad fibrous separations. Notable features include very large colloid-containing follicles, uneven distribution, and thickened septa in some areas. Overall thyroid architecture shows nodular hyperplasia without cytologic atypia; there is no invasion or malignant features evident. The image is representative of benign nodular goiter, reflecting long-standing iodine deficiency in some cases or chronic compensatory hyperplasia. Diagnostic significance: demonstrates classic histologic spectrum of multinodular goiter with variable follicle size and colloid content; important to distinguish from follicular neoplasms and inflammatory thyroid disease. Clinical correlation: correlates with clinically enlarging neck mass; usually euthyroid; histology informs management and follow-up. Feature set aligns with common teaching examples for medical education and pathology atlases, enabling search queries for terms such as multinodular goiter, colloid-rich follicles, flattened follicular epithelium, and nodular hyperplasia.

Struma ovarii is a monodermal variant of ovarian teratoma composed predominantly or exclusively of mature thyroid tissue. The micrograph shows thyroid follicles within the cyst wall in a case of struma ovarii. Follicles vary in size and architectural pattern, ranging from normal-like to hyperplastic or adenomatous. The follicular lining is cuboidal to flattened and may exhibit clear or oxyphilic cytoplasm. Nuclei are uniform, hyperchromatic, and basally located, with little to no mitotic activity. Follicles are filled with eosinophilic colloid; occasional birefringent calcium oxalate crystals may be present within colloid material. Parafollicular C cells are not identified in this specimen. The stromal compartment surrounding the follicles is typically scant and collagenous, but in some cases it can be more abundant and edematous; rare instances show stromal luteinization. The combination of thyroid-type follicles within an ovarian cyst wall confirms the diagnosis of struma ovarii. Clinically, these lesions are usually benign, though malignant transformation has been described and occasional thyrotoxicosis may occur with functional ovarian tissue. Histology is essential to differentiate struma ovarii from metastatic thyroid tissue, toxic goiter involving the ovary, or other teratomatous components. Immunohistochemical staining for thyroglobulin and TTF-1 can corroborate thyroid origin. This educational image aids diagnostic correlation greatly.

This is a light micrograph of thyroid gland tissue prepared for histopathology and stained with Hematoxylin and Eosin (H&E). The sample reveals multiple spherical to irregular follicles of varying size separated by wispy fibrous septa. The colloid-filled lumens are pink to pale pink, while the surrounding follicular epithelium is a uniform single layer of cuboidal to low-columnar cells with round to oval nuclei and inconspicuous nucleoli. No nuclear grooves, inclusions, or pseudoinclusions characteristic of papillary carcinoma are evident. The stromal background is relatively scant with no dense lymphocytic infiltrate or Hurthle cell metaplasia apparent. The architecture is reminiscent of normal thyroid parenchyma or benign nodular colloid goiter pattern, where follicle size varies and colloid predominates. There are no mitotic figures or cytologic atypia observed. This image demonstrates classic histology of endocrine gland tissue with preserved colloid and regular follicle lining, suitable as reference for normal thyroid architecture in educational, diagnostic, and research contexts. Clinically, such histology supports benign thyroid pathology when correlated with imaging and labs. In malignant differentials, absence of papillary nuclear features or tall columnar cells argues against papillary thyroid carcinoma; however, definitive diagnosis should consider capsule invasion and margin status in surgical specimens.

Imaging modality: Bright-field light microscopy of hematoxylin and eosin (H&E) stained tissue from an ovarian teratoma composed of ectopic thyroid tissue (struma ovarii). Precise anatomical context: pelvic ovary; thyroid-like follicular epithelium organizing into trabecular cords and small follicular clusters with colloid-filled lumina, reminiscent of native thyroid architecture. The current micrograph demonstrates thyroid follicles arranged in a trabecular pattern within the stromal background of ovarian tissue. Follicular cells are cuboidal to low-columnar with uniform nuclei and scant cytoplasm; colloid within follicles stains eosinophilic and appears pale pink on H&E. The overall morphology is benign-appearing; no overt cellular atypia, mitotic activity, or stromal invasion is evident in this field. In struma ovarii, this ectopic thyroid tissue mirrors normal thyroid histology, and is a diagnostic clue when evaluating ovarian teratomas. Key differential considerations include other patterns of struma ovarii (solid sheets, pseudopapillary, pseudotubular, or cystic) and rare malignant transformation such as papillary thyroid carcinoma arising in struma ovarii; clinical correlation with thyroid function and imaging is advised. This description supports diagnosis of ectopic thyroid tissue within an ovarian lesion and assists in distinguishing struma ovarii from metastatic thyroid carcinoma to the ovary. Potential clinical use: surgical planning, risk assessment, and subtler differential diagnosis in ovarian mass workup.

This is a light-micrograph of thyroid parenchyma illustrating dyshormonogenetic goiter with prominent cytologic atypia in follicular cells. Acquired from a thyroid tissue specimen, the slide is stained with Hematoxylin and Eosin (H&E) and examined at high magnification under light microscopy. The architectural pattern shows numerous small follicles embedded in a fibrous stroma with variable colloid content and papillary-like nuclear changes. Follicular cells display marked variation in size and shape, hyperchromatic nuclei, nuclear crowding, and occasional grooves or grooves-like features that can mimic papillary carcinoma. The presence of abundant cytoplasm, irregular nucleo-cytoplasmic borders, and pseudoinclusions contribute to diagnostic confusion. In dyshormonogenetic goiter, these cytologic changes can be striking, and in up to about 20% of cases may lead to misinterpretation as follicular, papillary, medullary, or undifferentiated carcinoma, underscoring a clinically significant pitfall. Notable benign features include preservation of follicular arrangement, presence of colloid within many follicles, and absence of unequivocal invasion or stromal desmoplasia. This image highlights the key diagnostic challenge: the need to differentiate benign dyshormonogenetic changes from malignant thyroid neoplasia on cytology or limited histology. Clinically, dyshormonogenesis is associated with congenital hypothyroidism and goiter; diagnosis relies on correlating cytology with clinical data, family history, and, when needed, molecular testing.
Graves disease exophthalmos goiter clinical photo
| Vessel | Origin | Course |
|---|---|---|
| Superior thyroid artery | First branch of external carotid artery | Descends to superior pole, divides into anterior/posterior glandular branches |
| Inferior thyroid artery | Thyrocervical trunk (from subclavian artery) | Ascends behind carotid sheath to reach the gland posteriorly; closely related to recurrent laryngeal nerve |
| Thyroid ima artery (variable, ~10%) | Directly from aorta or brachiocephalic trunk | Ascends to isthmus |

| Step | Process | Enzyme/Mechanism |
|---|---|---|
| 1. Iodide trapping | Active uptake of I⁻ from blood into thyrocyte across basal membrane | Na⁺/I⁻ symporter (NIS) |
| 2. Thyroglobulin synthesis | Made in thyrocyte, secreted into colloid by exocytosis | Ribosomes → Golgi → secretory vesicles |
| 3. Organification | Oxidation of iodide to iodine; incorporation onto tyrosine residues of thyroglobulin at the apical membrane/colloid interface | Thyroid peroxidase (TPO) |
| 4. Coupling | MIT + DIT → T3; DIT + DIT → T4 (within thyroglobulin) | Thyroid peroxidase |
| 5. Storage | Iodinated thyroglobulin stored in colloid | - |
| 6. Release | Colloid endocytosed by thyrocyte → lysosomal proteolysis → free T3/T4 released into capillaries | Lysosomal hydrolysis |
99% of circulating T3/T4 is protein-bound: mainly thyroxine-binding globulin (TBG), plus transthyretin and albumin
| Target Tissue | Effect | Mechanism |
|---|---|---|
| Heart | ↑ Chronotropic & inotropic effect | ↑ β-adrenergic receptors; ↑ α-myosin heavy chain (higher ATPase activity) |
| Metabolic rate | ↑ Basal metabolic rate (calorigenic action) | ↑ O2 consumption, ↑ Na⁺/K⁺-ATPase activity in most tissues |
| Carbohydrate metabolism | ↑ Intestinal glucose absorption; ↑ glycogenolysis and gluconeogenesis | - |
| Lipid metabolism | ↑ Lipolysis; ↑ LDL receptor expression (↓ cholesterol) | - |
| Protein metabolism | Normal levels: anabolic (growth); excess: catabolic (muscle wasting) | - |
| Growth & development | Essential for normal skeletal growth and CNS/brain development (critical in fetal/neonatal period) | Synergizes with GH |
| Blood | ↑ 2,3-DPG in RBCs → ↑ O2 dissociation from hemoglobin | - |
| Thermogenesis | Maintains body temperature | ↑ Uncoupling proteins, ↑ heat production |
| Condition | TSH | Free T4 | Free T3 |
|---|---|---|---|
| Primary hyperthyroidism | ↓↓ | ↑ | ↑ |
| Primary hypothyroidism | ↑↑ | ↓ | ↓/normal |
| Subclinical hyperthyroidism | ↓ | Normal | Normal |
| Subclinical hypothyroidism | ↑ | Normal | Normal |
| Secondary (pituitary) hypothyroidism | ↓/normal (inappropriately low) | ↓ | ↓ |
| Sick euthyroid syndrome | Normal/low | Normal/low | ↓↓ (↓ conversion) |
More detail
| Anomaly | Description |
|---|---|
| Thyroglossal duct cyst | Persistent duct remnant; midline neck mass that moves with tongue protrusion/swallowing (pathognomonic) |
| Lingual thyroid | Ectopic thyroid tissue at tongue base - may be the ONLY functioning thyroid tissue |
| Pyramidal lobe | Persistent inferior part of the duct, projects upward from isthmus (present in ~50% of people) |
| Thyroid agenesis/dysgenesis | Cause of congenital hypothyroidism |
| Ectopic thyroid | Anywhere along the descent path (sublingual to mediastinal) |
| Enzyme | Location | Reaction | Physiological Role |
|---|---|---|---|
| Type 1 (D1) | Liver, kidney, thyroid | T4 → T3 (outer ring) AND T4 → rT3 (inner ring) | Major source of circulating T3 (~80%); contributes to plasma T3 pool |
| Type 2 (D2) | Brain, pituitary, brown fat, skeletal muscle, placenta | T4 → T3 (outer ring only) | Local/intracellular T3 generation - critical for CNS and pituitary feedback; provides local thermogenic T3 in brown fat |
| Type 3 (D3) | Placenta, fetal tissues, brain, skin | T4 → rT3; T3 → T2 (inner ring, inactivating) | Inactivates thyroid hormone - protects fetus from excess maternal hormone; important in illness ("sick euthyroid" ↑D3 activity) |
| Mechanism | Drug(s) | Effect on Tests |
|---|---|---|
| ↑ TBG synthesis | Estrogens, tamoxifen, SERMs, methadone, heroin | ↑ Total T4/T3; normal free T4/T3, TSH |
| ↓ TBG synthesis | Androgens, glucocorticoids (high dose), nephrotic syndrome | ↓ Total T4/T3; normal free hormone |
| Competitive displacement from binding proteins | Phenytoin, carbamazepine, salicylates, furosemide | ↓ Total T4 (artifactual); free T4 usually normal |
| ↓ Central TSH secretion | Dopamine, glucocorticoids (high dose), somatostatin/octreotide | ↓ TSH without true hypothyroidism |
| ↓ T4→T3 conversion (D1 inhibition) | Propranolol (high dose), glucocorticoids, PTU, amiodarone | ↓ T3, may be used therapeutically in thyroid storm |
| ↑ Hepatic clearance of T4 | Phenobarbital, phenytoin, rifampin, carbamazepine | ↑ Hormone requirement in patients on levothyroxine |
| Direct synthesis inhibition | Thionamides, lithium, iodides, amiodarone | Variable hypo/hyperthyroidism |
| Type | Mechanism | Phase Pattern | Key Features |
|---|---|---|---|
| Hashimoto thyroiditis | Autoimmune - anti-TPO & anti-thyroglobulin antibodies; CD8+ T-cell mediated destruction; genetic links (CTLA4, PTPN22, IL2RA polymorphisms) | Progressive hypothyroidism (may have transient early thyrotoxic "hashitoxicosis") | Most common cause of hypothyroidism in iodine-sufficient areas; F:M = 10-20:1; ages 45-65; lymphocytic infiltration with germinal centers; ↑ risk of thyroid lymphoma |
| Subacute (de Quervain) granulomatous thyroiditis | Post-viral (often after URI) | Painful thyrotoxic phase (2-6 weeks) → hypothyroid phase → recovery | Tender, enlarged gland; ↑ ESR; granulomatous inflammation with giant cells on histology; self-limited |
| Subacute lymphocytic (silent/painless) thyroiditis | Autoimmune, includes postpartum thyroiditis | Painless transient thyrotoxicosis → hypothyroidism → recovery (most resolve) | No pain; occurs 1-6 months postpartum in ~5-10% of women |
| Riedel thyroiditis | Fibrosing process (IgG4-related disease spectrum) | Euthyroid or hypothyroid | Rock-hard, "woody" gland fixed to surrounding structures; mimics anaplastic carcinoma clinically; may cause airway/esophageal compression |
| Acute suppurative thyroiditis | Bacterial infection (rare - gland is normally infection-resistant) | Acute pain, fever, abscess | Usually from pyriform sinus fistula (children) or immunocompromise |
| Type | Frequency | Cell of Origin | Key Features |
|---|---|---|---|
| Papillary carcinoma | ~85% (most common) | Follicular cell | Best prognosis; psammoma bodies, "Orphan Annie eye" nuclei, nuclear grooves; spreads via lymphatics; RET/PTC and BRAF mutations; associated with childhood radiation exposure |
| Follicular carcinoma | ~10% | Follicular cell | Hematogenous spread (bone, lung); RAS mutations; diagnosis requires demonstrating capsular/vascular invasion (cannot diagnose on FNA alone) |
| Medullary carcinoma | ~5% | Parafollicular (C) cells | Secretes calcitonin (tumor marker) and CEA; amyloid deposits (from calcitonin) on histology; RET mutations; associated with MEN 2A/2B |
| Anaplastic carcinoma | <5% | Follicular cell (dedifferentiated) | Highly aggressive, rapid growth, poor prognosis, elderly patients, local invasion causing airway obstruction |
Form pdf of full expanded version with relevant flow chart and understanding diagram for students
ls -la /tmp/workspace/ && ls -la /tmp/workspace/adrenal-gland/ 2>/dev/null && mkdir -p /tmp/workspace/thyroid-gland/assets /tmp/workspace/thyroid-gland/output
~/thyroid-gland/assets/make_diagrams.py
"""
Generates all educational diagrams for the Thyroid Gland PDF using matplotlib.
Output: PNG files in /tmp/workspace/thyroid-gland/assets/
"""
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
from matplotlib.patches import FancyBboxPatch, FancyArrowPatch, Circle, Ellipse, Polygon, Rectangle
from matplotlib.lines import Line2D
import numpy as np
OUT = "/tmp/workspace/thyroid-gland/assets/"
DARK_BLUE = "#1a3a5c"
MID_BLUE = "#2563a8"
LIGHT_BLUE = "#dbeafe"
TEAL = "#0f766e"
TEAL_LIGHT = "#ccfbf1"
ORANGE = "#c2410c"
ORANGE_LT = "#ffedd5"
PURPLE = "#6d28d9"
PURPLE_LT = "#ede9fe"
GREEN = "#15803d"
GREEN_LT = "#dcfce7"
RED = "#b91c1c"
RED_LT = "#fee2e2"
YELLOW_LT = "#fef9c3"
GRAY_DARK = "#374151"
GRAY_MID = "#6b7280"
WHITE = "#ffffff"
def box(ax, x, y, w, h, text, fc=LIGHT_BLUE, ec=MID_BLUE, fontsize=10, fontweight="bold", textcolor=DARK_BLUE, radius=0.02):
b = FancyBboxPatch((x, y), w, h, boxstyle=f"round,pad=0.008,rounding_size={radius}",
linewidth=1.8, edgecolor=ec, facecolor=fc, zorder=2)
ax.add_patch(b)
ax.text(x + w/2, y + h/2, text, ha="center", va="center", fontsize=fontsize,
fontweight=fontweight, color=textcolor, zorder=3, wrap=True)
return b
def arrow(ax, x1, y1, x2, y2, color=GRAY_DARK, lw=2, style="-|>", connectionstyle="arc3,rad=0.0"):
a = FancyArrowPatch((x1, y1), (x2, y2), arrowstyle=style, mutation_scale=18,
linewidth=lw, color=color, zorder=1, connectionstyle=connectionstyle)
ax.add_patch(a)
def setup_ax(figsize=(9,11)):
fig, ax = plt.subplots(figsize=figsize)
ax.set_xlim(0, 10)
ax.set_ylim(0, 12)
ax.axis("off")
return fig, ax
# ══════════════════════════════════════════════════════════════════
# DIAGRAM 1: HPT AXIS FLOWCHART (with negative feedback)
# ══════════════════════════════════════════════════════════════════
fig, ax = setup_ax((8.5, 11))
ax.set_title("Hypothalamic-Pituitary-Thyroid (HPT) Axis", fontsize=16, fontweight="bold", color=DARK_BLUE, pad=14)
box(ax, 2.7, 10.2, 4.6, 1.1, "HYPOTHALAMUS\n(Paraventricular nucleus)", fc=PURPLE_LT, ec=PURPLE, fontsize=11)
arrow(ax, 5, 10.2, 5, 9.15, color=PURPLE, lw=2.5)
ax.text(5.5, 9.65, "TRH", fontsize=11, color=PURPLE, fontweight="bold", ha="left")
ax.text(2.4, 9.65, "(cold \u2192 \u2191TRH\nstress \u2192 \u2193TRH)", fontsize=8, color=GRAY_MID, ha="left", style="italic")
box(ax, 2.7, 8.1, 4.6, 1.05, "ANTERIOR PITUITARY\n(Thyrotrophs)", fc=LIGHT_BLUE, ec=MID_BLUE, fontsize=11)
arrow(ax, 5, 8.1, 5, 7.05, color=MID_BLUE, lw=2.5)
ax.text(5.5, 7.55, "TSH", fontsize=11, color=MID_BLUE, fontweight="bold", ha="left")
box(ax, 2.7, 6.0, 4.6, 1.05, "THYROID GLAND\n(Follicular cells)", fc=TEAL_LIGHT, ec=TEAL, fontsize=11)
arrow(ax, 5, 6.0, 5, 4.95, color=TEAL, lw=2.5)
ax.text(5.55, 5.45, "T4 (90%) + T3 (10%)", fontsize=10.5, color=TEAL, fontweight="bold", ha="left")
box(ax, 2.7, 3.9, 4.6, 1.05, "PERIPHERAL TISSUES\n(Liver, kidney, muscle, brain)", fc=GREEN_LT, ec=GREEN, fontsize=10.5)
ax.text(5, 3.55, "D1/D2 deiodinase: T4 \u2192 T3 (active)", fontsize=9, color=GREEN, ha="center", style="italic")
ax.text(5, 3.25, "D3 deiodinase: T4/T3 \u2192 rT3/T2 (inactive)", fontsize=9, color=GRAY_MID, ha="center", style="italic")
# Negative feedback loops (curved arrows going back up, dashed red)
arrow(ax, 2.6, 6.3, 2.6, 8.35, color=RED, lw=1.8, style="-|>", connectionstyle="arc3,rad=-0.5")
ax.text(1.15, 7.3, "Negative\nfeedback\n(T3/T4 \u2193 TSH)", fontsize=8.3, color=RED, ha="center", fontweight="bold")
arrow(ax, 2.6, 6.5, 2.6, 10.4, color=RED, lw=1.8, style="-|>", connectionstyle="arc3,rad=-0.65")
ax.text(0.35, 8.6, "Negative feedback\n(T3/T4 \u2193 TRH\n-- minor)", fontsize=7.8, color=RED, ha="center", fontweight="bold")
# Side notes
box(ax, 6.9, 6.9, 2.6, 1.6, "TSH acts via\nGs-cAMP-PKA\n(& Gq-PLC at\nhigh conc.)\n\u2192 growth +\nhormone release", fc=YELLOW_LT, ec="#ca8a04", fontsize=8.5, fontweight="normal", textcolor=GRAY_DARK)
box(ax, 6.9, 4.6, 2.6, 1.5, "Diurnal rhythm:\nTSH peaks\nlate night /\nearly morning", fc="#f3f4f6", ec=GRAY_MID, fontsize=8.5, fontweight="normal", textcolor=GRAY_DARK)
box(ax, 0.3, 2.3, 9.3, 1.0, "CLINICAL: \u2191TSH + \u2193Free T4 = Primary hypothyroidism | \u2193TSH + \u2191Free T4 = Primary hyperthyroidism | \u2193TSH + \u2193Free T4 = Secondary (pituitary) hypothyroidism",
fc=ORANGE_LT, ec=ORANGE, fontsize=8.7, fontweight="bold", textcolor=ORANGE)
plt.tight_layout()
plt.savefig(OUT + "hpt_axis.png", dpi=200, bbox_inches="tight", facecolor="white")
plt.close()
# ══════════════════════════════════════════════════════════════════
# DIAGRAM 2: THYROID HORMONE SYNTHESIS PATHWAY (inside thyrocyte)
# ══════════════════════════════════════════════════════════════════
fig, ax = setup_ax((10, 8))
ax.set_xlim(0, 12)
ax.set_ylim(0, 9)
ax.axis("off")
ax.set_title("Thyroid Hormone Synthesis (within the Follicular Cell)", fontsize=15, fontweight="bold", color=DARK_BLUE, pad=10)
# Cell outline
cell = FancyBboxPatch((1, 1.5), 6.2, 6, boxstyle="round,pad=0.02,rounding_size=0.15",
linewidth=2, edgecolor=TEAL, facecolor="#f0fdfa", zorder=1)
ax.add_patch(cell)
ax.text(4.1, 7.7, "THYROCYTE (Follicular Cell)", fontsize=10.5, fontweight="bold", color=TEAL, ha="center")
# Colloid lumen (right side)
colloid = FancyBboxPatch((7.6, 1.5), 3.6, 6, boxstyle="round,pad=0.02,rounding_size=0.15",
linewidth=2, edgecolor=ORANGE, facecolor=ORANGE_LT, zorder=1)
ax.add_patch(colloid)
ax.text(9.4, 7.7, "COLLOID (Follicular Lumen)", fontsize=10.5, fontweight="bold", color=ORANGE, ha="center")
# blood side label
ax.text(0.1, 4.5, "BLOOD\n(basal side)", fontsize=9.5, fontweight="bold", color=GRAY_DARK, ha="center", rotation=90)
# Step 1: Iodide trapping
box(ax, 0.4, 5.7, 2.6, 0.9, "I\u207b uptake\n(NIS symporter)", fc=LIGHT_BLUE, ec=MID_BLUE, fontsize=9)
arrow(ax, 3.0, 6.15, 3.9, 6.15, color=MID_BLUE, lw=2)
ax.text(0.55, 6.75, "\u2460", fontsize=13, fontweight="bold", color=MID_BLUE)
# Thyroglobulin synthesis
box(ax, 3.9, 5.7, 2.9, 0.9, "Thyroglobulin (Tg)\nsynthesis (RER/Golgi)", fc=LIGHT_BLUE, ec=MID_BLUE, fontsize=8.7)
ax.text(4.0, 6.75, "\u2461", fontsize=13, fontweight="bold", color=MID_BLUE)
arrow(ax, 6.8, 6.15, 7.7, 6.15, color=MID_BLUE, lw=2)
# Oxidation at apical membrane
box(ax, 4.0, 4.2, 2.7, 0.9, "Oxidation:\nI\u207b \u2192 I\u2082/I\u2070\n(Thyroid Peroxidase, TPO)", fc=PURPLE_LT, ec=PURPLE, fontsize=8.2)
ax.text(4.1, 5.2, "\u2462", fontsize=13, fontweight="bold", color=PURPLE)
arrow(ax, 6.7, 4.65, 7.7, 4.65, color=PURPLE, lw=2)
# Organification in colloid
box(ax, 8.0, 4.2, 3.0, 0.9, "Organification:\nI + Tyrosine-Tg \u2192 MIT, DIT\n(via TPO)", fc="#fff7ed", ec=ORANGE, fontsize=8.2)
ax.text(8.1, 5.2, "\u2463", fontsize=13, fontweight="bold", color=ORANGE)
# Coupling
box(ax, 8.0, 2.8, 3.0, 0.9, "Coupling (TPO):\nDIT + DIT \u2192 T4\nMIT + DIT \u2192 T3", fc="#fff7ed", ec=ORANGE, fontsize=8.5)
ax.text(8.1, 3.8, "\u2464", fontsize=13, fontweight="bold", color=ORANGE)
arrow(ax, 9.5, 4.15, 9.5, 3.75, color=ORANGE, lw=1.8, connectionstyle="arc3,rad=0")
# Storage
box(ax, 8.0, 1.6, 3.0, 0.85, "STORAGE:\nIodinated Tg in colloid\n(reserve ~2-3 months)", fc=YELLOW_LT, ec="#ca8a04", fontsize=8.2)
arrow(ax, 9.5, 2.8, 9.5, 2.5, color="#ca8a04", lw=1.8)
# Endocytosis back into cell
arrow(ax, 8.0, 2.0, 6.9, 2.0, color=RED, lw=2)
ax.text(7.3, 2.3, "\u2465 Endocytosis", fontsize=8, color=RED, fontweight="bold", ha="center")
box(ax, 3.9, 1.6, 2.9, 0.9, "Lysosomal proteolysis\nof thyroglobulin", fc=RED_LT, ec=RED, fontsize=8.7)
ax.text(4.0, 2.65, "\u2466", fontsize=13, fontweight="bold", color=RED)
arrow(ax, 3.9, 2.0, 3.0, 2.0, color=RED, lw=2)
box(ax, 0.4, 1.6, 2.6, 0.9, "Release into blood:\nT4 (90%) + T3 (10%)", fc=GREEN_LT, ec=GREEN, fontsize=8.7)
ax.text(0.55, 2.65, "\u2467", fontsize=13, fontweight="bold", color=GREEN)
# Note box at bottom
ax.text(6, 0.6, "Note: T3 has 10x greater receptor affinity than T4. Most circulating T3 (~80%) comes from peripheral deiodination of T4, not direct thyroid secretion.",
fontsize=8.3, color=GRAY_DARK, ha="center", style="italic",
bbox=dict(boxstyle="round,pad=0.4", fc="#f3f4f6", ec=GRAY_MID))
plt.tight_layout()
plt.savefig(OUT + "hormone_synthesis.png", dpi=200, bbox_inches="tight", facecolor="white")
plt.close()
# ══════════════════════════════════════════════════════════════════
# DIAGRAM 3: THYROID GLAND GROSS ANATOMY (schematic)
# ══════════════════════════════════════════════════════════════════
fig, ax = plt.subplots(figsize=(8, 9.5))
ax.set_xlim(0, 10)
ax.set_ylim(0, 12)
ax.axis("off")
ax.set_title("Thyroid Gland - Anterior Neck Anatomy", fontsize=15, fontweight="bold", color=DARK_BLUE, pad=10)
# Trachea (central vertical rectangle with rings)
trach = Rectangle((4.3, 1.5), 1.4, 8.5, facecolor="#fce7f3", edgecolor="#9d174d", linewidth=1.5, zorder=1)
ax.add_patch(trach)
for ring_y in np.arange(2, 9.5, 0.6):
ax.plot([4.3, 5.7], [ring_y, ring_y], color="#9d174d", lw=0.8, alpha=0.5)
ax.text(5, 0.9, "Trachea", fontsize=9.5, ha="center", color="#9d174d", fontweight="bold")
# Thyroid cartilage (above)
thyc = Polygon([[4.1,9.9],[5.9,9.9],[5.6,11.0],[4.4,11.0]], closed=True, facecolor="#e0e7ff", edgecolor="#4338ca", linewidth=1.5, zorder=1)
ax.add_patch(thyc)
ax.text(5, 11.3, "Thyroid & Cricoid\nCartilage", fontsize=9, ha="center", color="#4338ca", fontweight="bold")
# Cricoid
cric = Rectangle((4.35, 9.5), 1.3, 0.45, facecolor="#e0e7ff", edgecolor="#4338ca", linewidth=1.2, zorder=1)
ax.add_patch(cric)
# Left lobe
left_lobe = Ellipse((3.1, 6.8), 2.0, 3.6, angle=8, facecolor=TEAL_LIGHT, edgecolor=TEAL, linewidth=2, zorder=2)
ax.add_patch(left_lobe)
ax.text(3.1, 6.8, "LEFT\nLOBE", fontsize=10, ha="center", va="center", color=TEAL, fontweight="bold")
# Right lobe
right_lobe = Ellipse((6.9, 6.8), 2.0, 3.6, angle=-8, facecolor=TEAL_LIGHT, edgecolor=TEAL, linewidth=2, zorder=2)
ax.add_patch(right_lobe)
ax.text(6.9, 6.8, "RIGHT\nLOBE", fontsize=10, ha="center", va="center", color=TEAL, fontweight="bold")
# Isthmus
isth = Rectangle((4.1, 8.0), 1.8, 0.9, facecolor=TEAL_LIGHT, edgecolor=TEAL, linewidth=2, zorder=2)
ax.add_patch(isth)
ax.text(5, 8.45, "Isthmus", fontsize=8, ha="center", color=TEAL, fontweight="bold")
# Pyramidal lobe
pyr = Polygon([[4.7,8.9],[5.3,8.9],[5.15,9.9],[4.85,9.9]], closed=True, facecolor=TEAL_LIGHT, edgecolor=TEAL, linewidth=1.5, zorder=2)
ax.add_patch(pyr)
ax.text(6.3, 9.5, "Pyramidal lobe\n(~50% of people)", fontsize=7.5, ha="left", color=TEAL, style="italic")
arrow(ax, 6.2, 9.4, 5.25, 9.3, color=TEAL, lw=1)
# RLN (running behind, dashed lines)
ax.plot([3.9, 3.9], [3.5, 8.2], color=RED, linewidth=2, linestyle="--", zorder=3)
ax.plot([6.1, 6.1], [3.5, 8.2], color=RED, linewidth=2, linestyle="--", zorder=3)
ax.text(3.55, 4.5, "Recurrent\nLaryngeal\nNerve (L)", fontsize=7.3, color=RED, ha="center", fontweight="bold")
ax.text(6.45, 4.5, "Recurrent\nLaryngeal\nNerve (R)", fontsize=7.3, color=RED, ha="center", fontweight="bold")
# Superior thyroid artery
arrow(ax, 2.2, 10.2, 2.9, 8.5, color=MID_BLUE, lw=2)
ax.text(1.1, 10.3, "Superior thyroid a.\n(from ext. carotid)", fontsize=7.3, color=MID_BLUE, ha="center", fontweight="bold")
arrow(ax, 7.8, 10.2, 7.1, 8.5, color=MID_BLUE, lw=2)
ax.text(8.9, 10.3, "Superior thyroid a.\n(from ext. carotid)", fontsize=7.3, color=MID_BLUE, ha="center", fontweight="bold")
# Inferior thyroid artery
arrow(ax, 1.3, 4.0, 2.6, 5.7, color=MID_BLUE, lw=2)
ax.text(0.6, 3.3, "Inferior thyroid a.\n(from thyrocervical\ntrunk)", fontsize=7.3, color=MID_BLUE, ha="center", fontweight="bold")
arrow(ax, 8.7, 4.0, 7.4, 5.7, color=MID_BLUE, lw=2)
ax.text(9.4, 3.3, "Inferior thyroid a.\n(from thyrocervical\ntrunk)", fontsize=7.3, color=MID_BLUE, ha="center", fontweight="bold")
# Parathyroid glands (small circles behind lobes)
for (px,py) in [(2.6,7.6),(2.6,6.0),(7.4,7.6),(7.4,6.0)]:
circ = Circle((px,py), 0.18, facecolor="#fde68a", edgecolor="#92400e", linewidth=1, zorder=4)
ax.add_patch(circ)
ax.text(5, 1.6, "Small circles = parathyroid glands (posterior surface, within true capsule)", fontsize=7.5, ha="center", color="#92400e", style="italic")
plt.tight_layout()
plt.savefig(OUT + "gross_anatomy.png", dpi=200, bbox_inches="tight", facecolor="white")
plt.close()
print("Diagrams batch 1 done: hpt_axis.png, hormone_synthesis.png, gross_anatomy.png")
cd /tmp/workspace/thyroid-gland/assets && python make_diagrams.py 2>&1
~/thyroid-gland/assets/make_diagrams2.py
"""
Batch 2: Histology diagram, Deiodinase pathway, Thyroid storm treatment algorithm,
Thyroiditis pattern comparison chart.
"""
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
from matplotlib.patches import FancyBboxPatch, FancyArrowPatch, Circle, Ellipse, Polygon, Rectangle
import numpy as np
OUT = "/tmp/workspace/thyroid-gland/assets/"
DARK_BLUE = "#1a3a5c"
MID_BLUE = "#2563a8"
LIGHT_BLUE = "#dbeafe"
TEAL = "#0f766e"
TEAL_LIGHT = "#ccfbf1"
ORANGE = "#c2410c"
ORANGE_LT = "#ffedd5"
PURPLE = "#6d28d9"
PURPLE_LT = "#ede9fe"
GREEN = "#15803d"
GREEN_LT = "#dcfce7"
RED = "#b91c1c"
RED_LT = "#fee2e2"
YELLOW_LT = "#fef9c3"
GRAY_DARK = "#374151"
GRAY_MID = "#6b7280"
def box(ax, x, y, w, h, text, fc=LIGHT_BLUE, ec=MID_BLUE, fontsize=10, fontweight="bold", textcolor=DARK_BLUE, radius=0.02):
b = FancyBboxPatch((x, y), w, h, boxstyle=f"round,pad=0.008,rounding_size={radius}",
linewidth=1.8, edgecolor=ec, facecolor=fc, zorder=2)
ax.add_patch(b)
ax.text(x + w/2, y + h/2, text, ha="center", va="center", fontsize=fontsize,
fontweight=fontweight, color=textcolor, zorder=3)
return b
def arrow(ax, x1, y1, x2, y2, color=GRAY_DARK, lw=2, style="-|>", connectionstyle="arc3,rad=0.0"):
a = FancyArrowPatch((x1, y1), (x2, y2), arrowstyle=style, mutation_scale=18,
linewidth=lw, color=color, zorder=1, connectionstyle=connectionstyle)
ax.add_patch(a)
# ══════════════════════════════════════════════════════════════════
# DIAGRAM 4: THYROID FOLLICLE HISTOLOGY (labelled schematic)
# ══════════════════════════════════════════════════════════════════
fig, ax = plt.subplots(figsize=(9, 8))
ax.set_xlim(0, 12)
ax.set_ylim(0, 10)
ax.axis("off")
ax.set_title("Thyroid Follicle - Histological Structure", fontsize=15, fontweight="bold", color=DARK_BLUE, pad=10)
# Large follicle circle (colloid)
colloid_circ = Circle((4.3, 5), 2.6, facecolor="#fed7aa", edgecolor=ORANGE, linewidth=2, zorder=1)
ax.add_patch(colloid_circ)
ax.text(4.3, 5, "COLLOID\n(Thyroglobulin)", fontsize=11, ha="center", va="center", color="#7c2d12", fontweight="bold")
# Follicular cells ring - draw small cuboidal cells around the circle
n_cells = 22
for i in range(n_cells):
theta = 2*np.pi*i/n_cells
r_in, r_out = 2.62, 3.25
x0, y0 = 4.3 + r_in*np.cos(theta), 5 + r_in*np.sin(theta)
x1, y1 = 4.3 + r_out*np.cos(theta), 5 + r_out*np.sin(theta)
ax.plot([x0,x1],[y0,y1], color=TEAL, lw=1.2, zorder=2)
outer_circ = Circle((4.3, 5), 3.25, facecolor="none", edgecolor=TEAL, linewidth=2, zorder=2)
ax.add_patch(outer_circ)
inner_circ_line = Circle((4.3, 5), 2.62, facecolor="none", edgecolor=TEAL, linewidth=1.5, zorder=2)
ax.add_patch(inner_circ_line)
ax.text(4.3, 8.5, "Follicular cells\n(Thyrocytes)", fontsize=9.5, ha="center", color=TEAL, fontweight="bold")
arrow(ax, 4.3, 8.3, 4.3, 8.35, color=TEAL, lw=0)
# label pointer for follicular cell
arrow(ax, 6.0, 7.9, 5.3, 7.0, color=TEAL, lw=1.5)
# Basement membrane label
ax.text(8.3, 6.7, "Basement\nmembrane", fontsize=8.5, ha="left", color=GRAY_DARK, fontweight="bold")
arrow(ax, 8.2, 6.6, 6.9, 6.2, color=GRAY_DARK, lw=1.3)
# Capillary + parafollicular cell (C cell) outside the follicle
cap = Ellipse((9.3, 3.2), 1.6, 0.8, facecolor="#fecaca", edgecolor=RED, linewidth=1.5, zorder=1)
ax.add_patch(cap)
ax.text(9.3, 3.2, "Capillary\n(RBCs)", fontsize=7.8, ha="center", va="center", color=RED, fontweight="bold")
arrow(ax, 8.4, 3.6, 7.0, 4.4, color=RED, lw=1.3, connectionstyle="arc3,rad=0.15")
ax.text(9.6, 4.5, "Fenestrated\nsinusoidal\ncapillary network", fontsize=7.5, ha="left", color=RED, style="italic")
# Parafollicular C cell
c_cell = Ellipse((6.3, 7.9), 0.85, 0.55, facecolor=PURPLE_LT, edgecolor=PURPLE, linewidth=1.8, zorder=3)
ax.add_patch(c_cell)
ax.text(6.3, 7.9, "C cell", fontsize=7.3, ha="center", va="center", color=PURPLE, fontweight="bold")
ax.text(7.7, 8.6, "Parafollicular (C) cell\nsecretes CALCITONIN\n(neural crest origin)", fontsize=8, ha="left", color=PURPLE, fontweight="bold")
arrow(ax, 7.6, 8.4, 6.6, 8.05, color=PURPLE, lw=1.3)
# resorption vacuoles label
ax.text(2.0, 3.3, "Colloid resorption\nvacuoles at apex\n(sign of active\nhormone release)", fontsize=7.5, ha="center", color="#7c2d12", style="italic")
arrow(ax, 2.3, 3.7, 3.0, 4.3, color="#7c2d12", lw=1.2)
# Legend box - function summary
legend_txt = ("FUNCTION SUMMARY\n"
"\u2022 Follicular cells: T4 & T3 synthesis (TSH-dependent)\n"
"\u2022 Colloid: extracellular hormone reservoir (~2-3 months supply)\n"
"\u2022 Parafollicular (C) cells: Calcitonin \u2192 \u2193 serum Ca\u00b2\u207a\n"
"\u2022 Cuboidal/columnar epithelium = active; squamous = inactive")
ax.text(0.3, 1.5, legend_txt, fontsize=8.7, ha="left", va="top", color=GRAY_DARK,
bbox=dict(boxstyle="round,pad=0.5", fc="#f3f4f6", ec=GRAY_MID))
plt.tight_layout()
plt.savefig(OUT + "follicle_histology.png", dpi=200, bbox_inches="tight", facecolor="white")
plt.close()
# ══════════════════════════════════════════════════════════════════
# DIAGRAM 5: DEIODINASE PATHWAY (T4 metabolism)
# ══════════════════════════════════════════════════════════════════
fig, ax = plt.subplots(figsize=(9, 7))
ax.set_xlim(0, 12)
ax.set_ylim(0, 9)
ax.axis("off")
ax.set_title("Peripheral Metabolism of T4: The Deiodinase System", fontsize=14.5, fontweight="bold", color=DARK_BLUE, pad=10)
box(ax, 4.7, 6.9, 2.6, 1.1, "T4\n(Thyroxine)\nsecreted by thyroid", fc=TEAL_LIGHT, ec=TEAL, fontsize=10)
# Outer ring deiodination -> T3 (active)
arrow(ax, 5.3, 6.9, 3.0, 5.2, color=GREEN, lw=2.3)
box(ax, 0.5, 5.4, 3.3, 1.0, "D1 (liver, kidney)\nD2 (brain, pituitary,\nbrown fat, muscle)\nOUTER ring deiodination", fc=GREEN_LT, ec=GREEN, fontsize=8)
box(ax, 0.5, 3.9, 3.3, 1.0, "T3 (ACTIVE)\n10x greater receptor\naffinity than T4", fc=GREEN_LT, ec=GREEN, fontsize=10, fontweight="bold")
arrow(ax, 2.15, 5.4, 2.15, 4.9, color=GREEN, lw=2)
# Inner ring deiodination -> rT3 (inactive)
arrow(ax, 6.7, 6.9, 9.0, 5.2, color=RED, lw=2.3)
box(ax, 8.2, 5.4, 3.3, 1.0, "D3 (placenta, fetal\ntissue, skin, brain)\nINNER ring deiodination", fc=RED_LT, ec=RED, fontsize=8)
box(ax, 8.2, 3.9, 3.3, 1.0, "rT3 (Reverse T3)\nINACTIVE\n\u2191 in illness/starvation", fc=RED_LT, ec=RED, fontsize=9.7, fontweight="bold")
arrow(ax, 9.85, 5.4, 9.85, 4.9, color=RED, lw=2)
# D3 also converts T3 -> T2 (inactivating)
arrow(ax, 2.15, 3.9, 6.5, 2.0, color=RED, lw=1.8, connectionstyle="arc3,rad=-0.2")
box(ax, 5.3, 1.5, 2.9, 0.9, "T2 (inactive)\nvia D3 on T3", fc="#fecaca", ec=RED, fontsize=9)
ax.text(4.2, 2.6, "D3 also inactivates\nT3 \u2192 T2", fontsize=8, color=RED, style="italic", ha="center")
# central note
ax.text(6, 0.5, "~80% of circulating T3 comes from peripheral D1/D2 conversion of T4, NOT direct thyroidal secretion.\nSick euthyroid syndrome: \u2191D3 / \u2193D1 activity \u2192 \u2193T3, \u2191rT3, with normal/low TSH (adaptive, do not treat).",
fontsize=8.3, color=GRAY_DARK, ha="center", style="italic",
bbox=dict(boxstyle="round,pad=0.4", fc="#f3f4f6", ec=GRAY_MID))
plt.tight_layout()
plt.savefig(OUT + "deiodinase_pathway.png", dpi=200, bbox_inches="tight", facecolor="white")
plt.close()
# ══════════════════════════════════════════════════════════════════
# DIAGRAM 6: THYROID STORM MANAGEMENT ALGORITHM
# ══════════════════════════════════════════════════════════════════
fig, ax = plt.subplots(figsize=(8.5, 10))
ax.set_xlim(0, 10)
ax.set_ylim(0, 13)
ax.axis("off")
ax.set_title("Thyroid Storm - Sequential Management Algorithm", fontsize=14.5, fontweight="bold", color=DARK_BLUE, pad=10)
box(ax, 2.2, 11.6, 5.6, 1.0, "SUSPECTED THYROID STORM\n(Burch-Wartofsky criteria, precipitating illness)", fc=RED_LT, ec=RED, fontsize=9.5)
arrow(ax, 5, 11.6, 5, 10.75, color=RED, lw=2.3)
box(ax, 1.5, 9.75, 7, 1.0, "STEP 1: Beta-blocker (Propranolol)\n\u2192 Immediate symptom control + \u2193 peripheral T4\u2192T3 conversion", fc=LIGHT_BLUE, ec=MID_BLUE, fontsize=9.3)
arrow(ax, 5, 9.75, 5, 8.9, color=MID_BLUE, lw=2.3)
box(ax, 1.5, 7.9, 7, 1.0, "STEP 2: Thionamide (PTU preferred)\n\u2192 Blocks NEW hormone synthesis + blocks T4\u2192T3 (PTU)", fc=TEAL_LIGHT, ec=TEAL, fontsize=9.3)
arrow(ax, 5, 7.9, 5, 7.05, color=TEAL, lw=2.3)
box(ax, 1.5, 6.05, 7, 1.0, "STEP 3 (\u22651 hr AFTER thionamide): Iodine solution (Lugol's/SSKI)\n\u2192 Blocks hormone RELEASE (Wolff-Chaikoff)", fc=YELLOW_LT, ec="#ca8a04", fontsize=9)
arrow(ax, 5, 6.05, 5, 5.2, color="#ca8a04", lw=2.3)
box(ax, 1.5, 4.2, 7, 1.0, "STEP 4: Glucocorticoids (Hydrocortisone)\n\u2192 \u2193 T4\u2192T3 conversion + covers relative adrenal insufficiency", fc=PURPLE_LT, ec=PURPLE, fontsize=9.3)
arrow(ax, 5, 4.2, 5, 3.35, color=PURPLE, lw=2.3)
box(ax, 1.5, 2.35, 7, 1.0, "SUPPORTIVE CARE:\nCooling, IV fluids, treat precipitant, avoid aspirin (\u2191free T4)", fc="#f3f4f6", ec=GRAY_MID, fontsize=9)
ax.text(5, 1.6, "KEY LOGIC: Iodine must be given AFTER the thionamide -\notherwise it provides substrate that the gland can still use for synthesis.",
fontsize=8.7, color=RED, ha="center", fontweight="bold", style="italic")
plt.tight_layout()
plt.savefig(OUT + "thyroid_storm_algorithm.png", dpi=200, bbox_inches="tight", facecolor="white")
plt.close()
# ══════════════════════════════════════════════════════════════════
# DIAGRAM 7: THYROIDITIS PATTERN COMPARISON (phase chart)
# ══════════════════════════════════════════════════════════════════
fig, ax = plt.subplots(figsize=(9.5, 6))
ax.set_xlim(0, 10)
ax.set_ylim(-1.5, 3)
ax.set_title("Thyroid Hormone Phases in Destructive Thyroiditis\n(Subacute Granulomatous & Silent/Postpartum Thyroiditis)",
fontsize=13, fontweight="bold", color=DARK_BLUE, pad=10)
x = np.linspace(0, 10, 500)
y = 1.6*np.exp(-((x-2.2)**2)/1.3) - 1.1*np.exp(-((x-5.7)**2)/2.2) + 0.15*np.sin(x/6)
ax.plot(x, y, color=MID_BLUE, linewidth=3)
ax.axhline(0, color=GRAY_MID, linewidth=1, linestyle="--")
ax.fill_between(x, y, 0, where=(y>0), color=RED, alpha=0.15)
ax.fill_between(x, y, 0, where=(y<0), color=TEAL, alpha=0.15)
ax.text(2.0, 1.9, "PHASE 1:\nThyrotoxic\n(hormone leaks from\ndamaged follicles)\nRAIU = LOW", fontsize=8.5, ha="center", color=RED, fontweight="bold")
ax.text(5.7, -1.55, "PHASE 2:\nHypothyroid\n(stores depleted)", fontsize=8.5, ha="center", color=TEAL, fontweight="bold")
ax.text(8.7, 0.3, "PHASE 3:\nRecovery to\nEuthyroid\n(most patients)", fontsize=8.5, ha="center", color=DARK_BLUE, fontweight="bold")
ax.set_xlabel("Time (weeks to months)", fontsize=10)
ax.set_ylabel("Serum Free T4 relative\nto normal (dashed line = 0)", fontsize=9.5)
ax.set_xticks([])
ax.set_yticks([])
for spine in ["top","right","left"]:
ax.spines[spine].set_visible(False)
ax.text(5, -1.45, "Key point: Destructive release (not increased synthesis) \u2192 RAIU is LOW during thyrotoxic phase - distinguishes from Graves' disease (RAIU HIGH)",
fontsize=8, ha="center", color=GRAY_DARK, style="italic",
bbox=dict(boxstyle="round,pad=0.4", fc="#f3f4f6", ec=GRAY_MID))
plt.tight_layout()
plt.savefig(OUT + "thyroiditis_phases.png", dpi=200, bbox_inches="tight", facecolor="white")
plt.close()
print("Batch 2 done: follicle_histology.png, deiodinase_pathway.png, thyroid_storm_algorithm.png, thyroiditis_phases.png")
cd /tmp/workspace/thyroid-gland/assets && python make_diagrams2.py 2>&1
ls -la /tmp/workspace/thyroid-gland/assets/*.png
~/thyroid-gland/assets/make_diagrams3.py
"""
Batch 3: Thyroid function test diagnostic algorithm.
"""
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
from matplotlib.patches import FancyBboxPatch, FancyArrowPatch
OUT = "/tmp/workspace/thyroid-gland/assets/"
DARK_BLUE = "#1a3a5c"; MID_BLUE = "#2563a8"; LIGHT_BLUE = "#dbeafe"
TEAL = "#0f766e"; TEAL_LIGHT = "#ccfbf1"; ORANGE = "#c2410c"; ORANGE_LT = "#ffedd5"
GREEN = "#15803d"; GREEN_LT = "#dcfce7"; RED = "#b91c1c"; RED_LT = "#fee2e2"
YELLOW_LT = "#fef9c3"; GRAY_DARK = "#374151"; GRAY_MID = "#6b7280"
def box(ax, x, y, w, h, text, fc=LIGHT_BLUE, ec=MID_BLUE, fontsize=9, fontweight="bold", textcolor=DARK_BLUE, radius=0.02):
b = FancyBboxPatch((x, y), w, h, boxstyle=f"round,pad=0.008,rounding_size={radius}",
linewidth=1.8, edgecolor=ec, facecolor=fc, zorder=2)
ax.add_patch(b)
ax.text(x + w/2, y + h/2, text, ha="center", va="center", fontsize=fontsize,
fontweight=fontweight, color=textcolor, zorder=3)
return b
def arrow(ax, x1, y1, x2, y2, color=GRAY_DARK, lw=2, style="-|>", connectionstyle="arc3,rad=0.0"):
a = FancyArrowPatch((x1, y1), (x2, y2), arrowstyle=style, mutation_scale=16,
linewidth=lw, color=color, zorder=1, connectionstyle=connectionstyle)
ax.add_patch(a)
fig, ax = plt.subplots(figsize=(10, 9))
ax.set_xlim(0, 12); ax.set_ylim(0, 11); ax.axis("off")
ax.set_title("Diagnostic Algorithm: Interpreting Thyroid Function Tests", fontsize=14.5, fontweight="bold", color=DARK_BLUE, pad=10)
box(ax, 4.2, 9.7, 3.6, 0.8, "STEP 1: Check Serum TSH", fc=LIGHT_BLUE, ec=MID_BLUE, fontsize=10.5)
arrow(ax, 5.2, 9.7, 2.6, 8.4, color=MID_BLUE, lw=2)
arrow(ax, 6.8, 9.7, 9.4, 8.4, color=MID_BLUE, lw=2)
arrow(ax, 6, 9.7, 6, 8.4, color=MID_BLUE, lw=2)
box(ax, 0.5, 7.6, 3.6, 0.8, "TSH LOW", fc=RED_LT, ec=RED, fontsize=10.5)
box(ax, 4.2, 7.6, 3.6, 0.8, "TSH NORMAL", fc="#f3f4f6", ec=GRAY_MID, fontsize=10.5)
box(ax, 7.9, 7.6, 3.6, 0.8, "TSH HIGH", fc=TEAL_LIGHT, ec=TEAL, fontsize=10.5)
arrow(ax, 2.3, 7.6, 2.3, 6.7, color=RED, lw=2)
box(ax, 0.5, 5.85, 3.6, 0.85, "Check Free T4/T3", fc=RED_LT, ec=RED, fontsize=9.5)
arrow(ax, 6, 7.6, 6, 6.7, color=GRAY_MID, lw=2)
box(ax, 4.2, 5.85, 3.6, 0.85, "Likely EUTHYROID\n(or early subclinical\ndisease)", fc="#f3f4f6", ec=GRAY_MID, fontsize=8.7)
arrow(ax, 9.7, 7.6, 9.7, 6.7, color=TEAL, lw=2)
box(ax, 7.9, 5.85, 3.6, 0.85, "Check Free T4/T3", fc=TEAL_LIGHT, ec=TEAL, fontsize=9.5)
arrow(ax, 1.5, 5.85, 1.5, 4.8, color=RED, lw=1.8)
arrow(ax, 3.1, 5.85, 3.1, 4.8, color=RED, lw=1.8)
box(ax, 0.2, 3.9, 2.6, 0.85, "\u2191 Free T4/T3:\nOVERT\nHYPERTHYROIDISM\n(e.g. Graves')", fc=RED_LT, ec=RED, fontsize=7.7)
box(ax, 2.9, 3.9, 2.6, 0.85, "Normal Free T4/T3:\nSUBCLINICAL\nHYPERTHYROIDISM", fc=RED_LT, ec=RED, fontsize=7.7)
arrow(ax, 8.6, 5.85, 8.6, 4.8, color=TEAL, lw=1.8)
arrow(ax, 10.2, 5.85, 10.2, 4.8, color=TEAL, lw=1.8)
box(ax, 7.3, 3.9, 2.6, 0.85, "\u2193 Free T4/T3:\nOVERT\nHYPOTHYROIDISM\n(e.g. Hashimoto's)", fc=TEAL_LIGHT, ec=TEAL, fontsize=7.7)
box(ax, 10.0, 3.9, 2.0, 0.85, "Normal:\nSUBCLINICAL\nHYPO-\nTHYROIDISM", fc=TEAL_LIGHT, ec=TEAL, fontsize=7.2)
# Special case: low TSH + low FT4
ax.annotate("", xy=(1.5, 3.9), xytext=(1.5, 3.4),
arrowprops=dict(arrowstyle="-|>", color=ORANGE, lw=1.6))
box(ax, 0.2, 2.5, 2.6, 0.85, "If TSH LOW +\nFT4 also LOW:\nconsider SECONDARY\n(pituitary) disease", fc=ORANGE_LT, ec=ORANGE, fontsize=7.2)
box(ax, 3.3, 1.2, 7.0, 1.0,
"Next steps: TPO/Tg antibodies (autoimmune), TSH-receptor Ab / TSI (Graves), RAIU scan\n(HIGH in Graves/toxic nodule vs LOW in destructive thyroiditis/exogenous hormone)",
fc=YELLOW_LT, ec="#ca8a04", fontsize=8.3)
plt.tight_layout()
plt.savefig(OUT + "diagnostic_algorithm.png", dpi=200, bbox_inches="tight", facecolor="white")
plt.close()
print("diagnostic_algorithm.png done")
cd /tmp/workspace/thyroid-gland/assets && python make_diagrams3.py 2>&1 && ls -la *.png
~/thyroid-gland/generate_pdf.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
PageBreak, HRFlowable, Image
)
from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_JUSTIFY
from reportlab.platypus.flowables import Flowable
from PIL import Image as PILImage
ASSETS = "/tmp/workspace/thyroid-gland/assets/"
# ── Colour palette ────────────────────────────────────────────────────────────
DARK_BLUE = colors.HexColor("#1a3a5c")
MID_BLUE = colors.HexColor("#2563a8")
LIGHT_BLUE = colors.HexColor("#dbeafe")
TEAL = colors.HexColor("#0f766e")
TEAL_LIGHT = colors.HexColor("#ccfbf1")
ORANGE = colors.HexColor("#c2410c")
ORANGE_LT = colors.HexColor("#ffedd5")
PURPLE = colors.HexColor("#6d28d9")
PURPLE_LT = colors.HexColor("#ede9fe")
GREEN = colors.HexColor("#15803d")
GREEN_LT = colors.HexColor("#dcfce7")
RED = colors.HexColor("#b91c1c")
YELLOW_LT = colors.HexColor("#fef9c3")
GRAY_DARK = colors.HexColor("#374151")
GRAY_MID = colors.HexColor("#6b7280")
GRAY_LIGHT = colors.HexColor("#f3f4f6")
WHITE = colors.white
W, H = A4
doc = SimpleDocTemplate(
"/tmp/workspace/thyroid-gland/output/Thyroid_Gland_Complete.pdf",
pagesize=A4,
leftMargin=2*cm, rightMargin=2*cm,
topMargin=2.2*cm, bottomMargin=2.2*cm,
title="Thyroid Gland - Complete Medical Reference",
author="Orris Medical Education",
)
styles = getSampleStyleSheet()
def S(name, **kw):
return ParagraphStyle(name, **kw)
cover_title = S("CoverTitle", fontSize=30, textColor=WHITE, fontName="Helvetica-Bold",
alignment=TA_CENTER, leading=36, spaceAfter=8)
cover_sub = S("CoverSub", fontSize=15, textColor=colors.HexColor("#bfdbfe"),
fontName="Helvetica", alignment=TA_CENTER, leading=20, spaceAfter=4)
cover_tag = S("CoverTag", fontSize=10.5, textColor=colors.HexColor("#93c5fd"),
fontName="Helvetica-Oblique", alignment=TA_CENTER)
h1 = S("H1", fontSize=14, textColor=DARK_BLUE, fontName="Helvetica-Bold",
spaceBefore=14, spaceAfter=4, leading=17)
h2 = S("H2", fontSize=12, textColor=MID_BLUE, fontName="Helvetica-Bold",
spaceBefore=10, spaceAfter=3, leading=15)
h3 = S("H3", fontSize=11, textColor=TEAL, fontName="Helvetica-Bold",
spaceBefore=7, spaceAfter=2, leading=13)
body = S("Body", fontSize=10, textColor=GRAY_DARK, fontName="Helvetica",
alignment=TA_JUSTIFY, leading=15, spaceAfter=5)
body_b = S("BodyB", fontSize=10, textColor=GRAY_DARK, fontName="Helvetica-Bold",
leading=15)
bullet_s = S("BulletS", fontSize=10, textColor=GRAY_DARK, fontName="Helvetica",
leftIndent=16, bulletIndent=4, alignment=TA_JUSTIFY, leading=14, spaceAfter=3)
small_it = S("SmallIt", fontSize=8.5, textColor=GRAY_MID, fontName="Helvetica-Oblique",
alignment=TA_CENTER, spaceAfter=2)
note_box = S("NoteBox", fontSize=9.5, textColor=GRAY_DARK, fontName="Helvetica-Oblique",
alignment=TA_JUSTIFY, leading=14)
key_point = S("KeyPoint", fontSize=10, textColor=DARK_BLUE, fontName="Helvetica-Bold",
leading=14, spaceAfter=3)
fig_caption = S("FigCaption", fontSize=9, textColor=GRAY_MID, fontName="Helvetica-Oblique",
alignment=TA_CENTER, spaceBefore=4, spaceAfter=10)
class Banner(Flowable):
def __init__(self, text, bg=DARK_BLUE, height=1.1*cm):
Flowable.__init__(self); self.text = text; self.bg = bg; self.bh = height
def wrap(self, avW, avH):
self.W = avW; return avW, self.bh + 6
def draw(self):
c = self.canv
c.setFillColor(self.bg); c.roundRect(0, 0, self.W, self.bh, 5, fill=1, stroke=0)
c.setFillColor(WHITE); c.setFont("Helvetica-Bold", 13)
c.drawString(10, self.bh*0.28, self.text)
class InfoBox(Flowable):
def __init__(self, paragraphs, bg=LIGHT_BLUE, border=MID_BLUE, radius=6):
Flowable.__init__(self); self.paragraphs = paragraphs; self.bg = bg; self.border = border; self.radius = radius
def wrap(self, avW, avH):
self.W = avW; total_h = 12; self._wrapped = []
for p in self.paragraphs:
w, h = p.wrap(avW - 24, avH); self._wrapped.append((p, w, h)); total_h += h + 4
self.H = total_h; return avW, self.H
def draw(self):
c = self.canv
c.setFillColor(self.bg); c.setStrokeColor(self.border); c.setLineWidth(1)
c.roundRect(0, 0, self.W, self.H, self.radius, fill=1, stroke=1)
y = self.H - 10
for p, w, h in self._wrapped:
y -= h; p.drawOn(c, 12, y); y -= 4
def bul(text, style=bullet_s):
return Paragraph(f"<bullet>•</bullet> {text}", style)
def sp(h=6):
return Spacer(1, h)
def hr(color=MID_BLUE, thickness=0.5):
return HRFlowable(width="100%", thickness=thickness, color=color, spaceAfter=4, spaceBefore=4)
def make_table(data, col_widths, header_bg=DARK_BLUE, row_bg1=GRAY_LIGHT, row_bg2=WHITE,
header_color=WHITE, font_size=9):
style = [
("BACKGROUND", (0,0), (-1,0), header_bg),
("TEXTCOLOR", (0,0), (-1,0), header_color),
("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
("FONTSIZE", (0,0), (-1,-1), font_size),
("ALIGN", (0,0), (-1,-1), "LEFT"),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING",(0,0),(-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 7),
("RIGHTPADDING",(0,0), (-1,-1), 7),
("GRID", (0,0), (-1,-1), 0.4, colors.HexColor("#d1d5db")),
("ROWBACKGROUNDS",(0,1),(-1,-1),[row_bg1, row_bg2]),
]
t = Table(data, colWidths=col_widths)
t.setStyle(TableStyle(style))
return t
def fig_image(path, max_width=16*cm, caption=None):
im = PILImage.open(path)
iw, ih = im.size
ratio = ih / iw
w = min(max_width, 16*cm)
h = w * ratio
max_h = 21*cm
if h > max_h:
h = max_h
w = h / ratio
flow = [Image(path, width=w, height=h)]
if caption:
flow.append(Paragraph(caption, fig_caption))
return flow
story = []
# ── COVER ─────────────────────────────────────────────────────────────────────
cover_data = [[
Paragraph("THYROID GLAND", cover_title),
Paragraph("Anatomy · Histology · Physiology · Applied Physiology", cover_sub),
sp(8),
Paragraph("A Comprehensive Illustrated Medical Reference for Students", cover_tag),
sp(4),
Paragraph("With Flowcharts & Diagrams for Visual Learning", cover_tag),
sp(10),
Paragraph("Based on Gray's Anatomy for Students · Junqueira's Basic Histology ·<br/>"
"Ganong's Review of Medical Physiology · Robbins Pathologic Basis of Disease ·<br/>"
"Katzung's Pharmacology · Sabiston Textbook of Surgery", cover_tag),
]]
cover_tbl = Table(cover_data, colWidths=[W - 4*cm])
cover_tbl.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), DARK_BLUE),
("TOPPADDING", (0,0),(-1,-1), 50),
("BOTTOMPADDING", (0,0),(-1,-1), 50),
("LEFTPADDING", (0,0),(-1,-1), 20),
("RIGHTPADDING", (0,0),(-1,-1), 20),
]))
story.append(cover_tbl)
story.append(PageBreak())
# ══════════════════════════════════════════════════════════════════════════════
# CHAPTER 1 – ANATOMY
# ══════════════════════════════════════════════════════════════════════════════
story.append(Banner("CHAPTER 1 · GROSS ANATOMY", bg=DARK_BLUE))
story.append(sp(6))
story.append(Paragraph("1.1 Overview & Location", h1))
story.append(Paragraph(
"The thyroid gland is a butterfly-shaped, highly vascular endocrine gland located in the "
"<b>anterior neck</b>, below and lateral to the thyroid cartilage, at the level of <b>C5-T1 vertebrae</b>. "
"It lies within the <b>visceral compartment</b> of the neck (with the pharynx, trachea, and esophagus), "
"enclosed by the pretracheal fascia. Weighing 15-20 g, it consists of two lateral lobes joined by an isthmus.",
body))
story.extend(fig_image(ASSETS + "gross_anatomy.png",
caption="Fig. 1.1 - Thyroid gland anatomy: lobes, isthmus, pyramidal lobe, arterial supply, and the course of the recurrent laryngeal nerve relative to the gland."))
story.append(Paragraph("1.2 Capsule & Ligament of Berry", h1))
story.append(bul("<b>True capsule</b>: thin fibrous layer adherent to the gland, sends septa into the parenchyma."))
story.append(bul("<b>False capsule</b>: derived from pretracheal fascia; forms the surgical dissection plane."))
story.append(bul("<b>Suspensory ligament of Berry</b>: attaches the gland posteromedially to the cricoid and first tracheal rings - explains why the thyroid moves upward on swallowing, and is a key structure where the RLN passes close to the gland during surgery."))
story.append(sp(4))
story.append(Paragraph("1.3 Relations", h1))
rel_data = [
["Direction", "Structures"],
["Anterior (superficial to deep)", "Skin \u2192 platysma \u2192 deep cervical fascia \u2192 sternohyoid, sternothyroid, omohyoid \u2192 pretracheal fascia"],
["Medial", "Larynx, trachea, pharynx, esophagus, external laryngeal nerve (on cricothyroid), recurrent laryngeal nerve (tracheoesophageal groove)"],
["Posterolateral", "Carotid sheath: common carotid artery, internal jugular vein, vagus nerve"],
["Posterior surface", "Parathyroid glands (embedded within the true capsule)"],
]
story.append(make_table(rel_data, col_widths=[4.5*cm, 13.5*cm]))
story.append(sp(6))
story.append(PageBreak())
story.append(Paragraph("1.4 Blood Supply & Surgical Anatomy", h1))
art_data = [
["Artery", "Origin", "Surgical Note"],
["Superior thyroid artery", "First branch of external carotid artery", "External laryngeal nerve runs close to these vessels near the superior pole - at risk during upper pole dissection"],
["Inferior thyroid artery", "Thyrocervical trunk (from subclavian artery)", "Variable relationship with RLN (nerve may pass anterior, posterior, or between branches) - nerve must be visually identified, never dissected blindly"],
["Thyroid ima artery (variable, ~10%)", "Directly from aorta or brachiocephalic trunk", "Ascends to isthmus"],
]
story.append(make_table(art_data, col_widths=[4.3*cm, 5.7*cm, 8*cm], font_size=8.5))
story.append(sp(5))
story.append(Paragraph(
"<b>Venous drainage:</b> Superior and middle thyroid veins drain to the internal jugular vein. "
"Inferior thyroid veins form a venous plexus anterior to the trachea, draining into the "
"<b>left brachiocephalic vein</b> - this plexus is why a low tracheostomy risks venous hemorrhage.",
body))
story.append(sp(4))
story.append(Paragraph("<b>Lymphatics:</b> Drain to pretracheal, paratracheal, and deep cervical lymph nodes.", body))
story.append(sp(6))
story.append(InfoBox([
Paragraph("<b>Key Nerve Relations (Exam & Surgical Importance)</b>", key_point),
bul("<b>Recurrent laryngeal nerve (RLN):</b> supplies all intrinsic laryngeal muscles except cricothyroid. Unilateral injury \u2192 hoarseness; bilateral injury \u2192 aphonia or airway obstruction (emergency)."),
bul("<b>External laryngeal nerve:</b> supplies cricothyroid (controls voice pitch). Injury \u2192 loss of high-pitched voice (\u2018singer\u2019s nerve\u2019)."),
], bg=LIGHT_BLUE, border=MID_BLUE))
story.append(sp(6))
story.append(Paragraph("1.5 Embryology", h1))
story.append(Paragraph(
"The thyroid has a <b>dual embryological origin</b>. The <b>median anlage</b> arises as an endodermal "
"thickening at the <b>foramen cecum</b> of the tongue (~day 24), descends via the <b>thyroglossal duct</b> "
"to its pretracheal position by week 7, and gives rise to <b>follicular cells</b>. The <b>lateral anlage "
"(ultimobranchial bodies)</b>, derived from the 4th pharyngeal pouch and neural crest, fuses with the "
"median anlage and contributes the <b>parafollicular (C) cells</b>.",
body))
emb_data = [
["Anomaly", "Description"],
["Thyroglossal duct cyst", "Persistent duct remnant; midline neck mass that moves with tongue protrusion/swallowing (pathognomonic)"],
["Lingual thyroid", "Ectopic thyroid tissue at tongue base - may be the ONLY functioning thyroid tissue"],
["Pyramidal lobe", "Persistent inferior duct remnant projecting upward from isthmus (~50% of people)"],
["Thyroid agenesis/dysgenesis", "Cause of congenital hypothyroidism"],
]
story.append(make_table(emb_data, col_widths=[5*cm, 13*cm], header_bg=TEAL, font_size=9))
story.append(PageBreak())
# ══════════════════════════════════════════════════════════════════════════════
# CHAPTER 2 – HISTOLOGY
# ══════════════════════════════════════════════════════════════════════════════
story.append(Banner("CHAPTER 2 · HISTOLOGY", bg=PURPLE))
story.append(sp(6))
story.append(Paragraph("2.1 General Architecture", h1))
story.append(Paragraph(
"The thyroid is enclosed in a fibrous capsule with septa dividing it into lobules; each lobule contains "
"<b>20-40 colloid-filled follicles</b> - the functional unit of the gland.",
body))
story.extend(fig_image(ASSETS + "follicle_histology.png",
caption="Fig. 2.1 - Thyroid follicle structure: follicular cells surrounding colloid, basement membrane, fenestrated capillary network, and a parafollicular (C) cell secreting calcitonin."))
story.append(Paragraph("2.2 Follicular Cells (Thyrocytes)", h1))
story.append(bul("Range from <b>squamous (inactive)</b> to <b>low columnar (active)</b>, depending on TSH stimulation."))
story.append(bul("<b>Polarized cell:</b> Basal membrane faces the capillary/interstitium and contains the Na\u207a/I\u207b symporter (NIS) and TSH receptors; apical membrane faces colloid and contains thyroid peroxidase (TPO) and pendrin."))
story.append(bul("Well-developed rough ER and Golgi for thyroglobulin synthesis; microvilli project into colloid."))
story.append(bul("<b>Colloid scalloping</b> (resorption vacuoles at the apical border) indicates active hormone release."))
story.append(sp(4))
story.append(Paragraph("2.3 Colloid", h1))
story.append(Paragraph(
"Gelatinous, acidophilic (eosinophilic) material filling the follicular lumen, composed largely of "
"<b>thyroglobulin</b> (660 kDa glycoprotein) - the storage precursor of thyroid hormones. The thyroid is "
"unique among endocrine glands in storing its hormone <b>extracellularly</b>, with a reserve sufficient "
"for <b>2-3 months</b> without new synthesis.",
body))
story.append(sp(4))
story.append(Paragraph("2.4 Parafollicular (C) Cells", h1))
story.append(bul("Constitute <0.1% of thyroid mass; concentrated in the upper/middle thirds of the posterior lobes."))
story.append(bul("Neural crest origin (via ultimobranchial bodies); located within the follicular basal lamina or interfollicular tissue."))
story.append(bul("Stain poorly with H&E; identified with silver stains or immunohistochemistry (calcitonin, chromogranin A, synaptophysin)."))
story.append(bul("Secrete <b>calcitonin</b>, which lowers blood calcium by inhibiting osteoclast activity."))
story.append(bul("Neoplastic transformation \u2192 <b>medullary thyroid carcinoma</b> (RET mutations, MEN 2A/2B)."))
story.append(sp(6))
story.append(InfoBox([
Paragraph("<b>Histology Functional Correlation</b>", key_point),
Paragraph(
"Small follicles + scant colloid + tall columnar epithelium = hyperactive gland (e.g. Graves\u2019 disease).<br/>"
"Large distended follicles + abundant colloid + flattened epithelium = hypoactive/involuted gland "
"(e.g. colloid goiter, post-radioiodine).",
note_box),
], bg=YELLOW_LT, border=colors.HexColor("#ca8a04")))
story.append(PageBreak())
# ══════════════════════════════════════════════════════════════════════════════
# CHAPTER 3 – PHYSIOLOGY
# ══════════════════════════════════════════════════════════════════════════════
story.append(Banner("CHAPTER 3 · PHYSIOLOGY", bg=TEAL))
story.append(sp(6))
story.append(Paragraph("3.1 Iodine Metabolism", h1))
story.append(Paragraph(
"Daily iodine requirement is ~150 \u00b5g/day in adults (higher in pregnancy, ~250 \u00b5g/day). Ingested iodide "
"is absorbed in the GI tract; ~1/3 is taken up by the thyroid via the <b>Na\u207a/I\u207b symporter (NIS)</b>, a "
"secondary active transporter powered by the Na\u207a/K\u207a-ATPase gradient. The thyroid:plasma iodide gradient "
"is normally 20-40:1, rising to >100:1 under TSH stimulation - the physiological basis for radioactive "
"iodine uptake (RAIU) scanning and I-131 therapy.",
body))
story.append(sp(4))
story.append(Paragraph("3.2 Thyroid Hormone Synthesis", h1))
story.extend(fig_image(ASSETS + "hormone_synthesis.png",
caption="Fig. 3.1 - Stepwise thyroid hormone synthesis: iodide trapping, thyroglobulin synthesis, oxidation, organification, coupling, storage, and release."))
syn_data = [
["Step", "Process", "Enzyme / Mechanism"],
["1. Iodide trapping", "Active uptake of I\u207b from blood across basal membrane", "Na\u207a/I\u207b symporter (NIS)"],
["2. Thyroglobulin synthesis", "Made in thyrocyte, secreted into colloid by exocytosis", "RER \u2192 Golgi \u2192 secretory vesicles"],
["3. Oxidation", "I\u207b oxidized to I\u2082/I\u2070 at apical membrane", "Thyroid peroxidase (TPO)"],
["4. Organification", "Iodine incorporated onto tyrosine residues of thyroglobulin", "Thyroid peroxidase (TPO)"],
["5. Coupling", "MIT + DIT \u2192 T3; DIT + DIT \u2192 T4 (within thyroglobulin)", "Thyroid peroxidase (TPO)"],
["6. Storage", "Iodinated thyroglobulin stored in colloid (~2-3 month reserve)", "-"],
["7. Release", "Colloid endocytosed \u2192 lysosomal proteolysis \u2192 free T3/T4 released", "Lysosomal hydrolysis"],
]
story.append(make_table(syn_data, col_widths=[3.5*cm, 8.5*cm, 5.5*cm], header_bg=TEAL, font_size=8.7))
story.append(sp(6))
story.append(Paragraph(
"T4 accounts for ~90% of secreted hormone but is less biologically active; T3 (~10% secreted directly) "
"has <b>10-fold greater receptor affinity</b>. Most circulating T3 is generated by peripheral deiodination of T4.",
body))
story.append(PageBreak())
story.append(Paragraph("3.3 Regulation - The HPT Axis", h1))
story.extend(fig_image(ASSETS + "hpt_axis.png", max_width=13*cm,
caption="Fig. 3.2 - Hypothalamic-Pituitary-Thyroid axis with negative feedback loops. Note the diagnostic implications of TSH/Free T4 patterns."))
story.append(Paragraph(
"<b>Hypothalamus</b> secretes <b>TRH</b> \u2192 acts on anterior pituitary thyrotrophs \u2192 <b>TSH</b> release \u2192 "
"acts on thyroid follicular cells via a <b>Gs-cAMP-PKA</b> pathway (dominant, stimulates hormone synthesis/release) "
"and a <b>Gq-PLC</b> pathway at higher concentrations (stimulates growth) \u2192 T3/T4 secretion.",
body))
story.append(bul("<b>Negative feedback:</b> T3/T4 inhibit TSH secretion mainly at the pituitary level (measurable drop within 1 hour of T3/T4 infusion), with a smaller hypothalamic component."))
story.append(bul("<b>Cold exposure:</b> increases TRH/TSH (marked in infants, negligible in adults)."))
story.append(bul("<b>Stress and glucocorticoids:</b> inhibit TRH/TSH secretion."))
story.append(sp(4))
story.append(Paragraph("3.4 Peripheral Deiodination", h1))
story.extend(fig_image(ASSETS + "deiodinase_pathway.png", max_width=13*cm,
caption="Fig. 3.3 - Peripheral T4 metabolism by deiodinase enzymes D1, D2, and D3."))
deio_data = [
["Enzyme", "Location", "Reaction", "Role"],
["D1", "Liver, kidney, thyroid", "T4\u2192T3 & T4\u2192rT3", "Major source of circulating T3 (~80%)"],
["D2", "Brain, pituitary, brown fat, muscle", "T4\u2192T3 (outer ring only)", "Local/intracellular T3; pituitary feedback"],
["D3", "Placenta, fetal tissue, skin, brain", "T4\u2192rT3; T3\u2192T2 (inactivating)", "Protects fetus from excess hormone; \u2191 in illness"],
]
story.append(make_table(deio_data, col_widths=[2*cm, 5.5*cm, 5.5*cm, 4.5*cm], header_bg=TEAL, font_size=8.5))
story.append(sp(6))
story.append(Paragraph("3.5 Transport & Mechanism of Action", h1))
story.append(bul(">99% of circulating T3/T4 is protein-bound: mainly <b>thyroxine-binding globulin (TBG)</b>, plus transthyretin and albumin. Only the small free fraction is biologically active."))
story.append(bul("T3 binds nuclear <b>thyroid hormone receptors (TR\u03b1, TR\u03b2)</b> - members of the nuclear receptor superfamily; the hormone-receptor complex binds DNA via zinc fingers to alter gene transcription."))
story.append(sp(6))
story.append(PageBreak())
story.append(Paragraph("3.6 Physiological Actions", h1))
act_data = [
["Target Tissue", "Effect", "Mechanism"],
["Heart", "\u2191 Chronotropic & inotropic effect", "\u2191 \u03b2-adrenergic receptors; \u2191 \u03b1-myosin heavy chain (higher ATPase)"],
["Metabolic rate", "\u2191 Basal metabolic rate (calorigenic)", "\u2191 O2 consumption; \u2191 Na\u207a/K\u207a-ATPase activity"],
["Carbohydrate", "\u2191 Intestinal glucose absorption; \u2191 glycogenolysis/gluconeogenesis", "-"],
["Lipid", "\u2191 Lipolysis; \u2191 LDL receptor expression (\u2193 cholesterol)", "-"],
["Protein", "Normal: anabolic (growth); Excess: catabolic (muscle wasting)", "-"],
["Growth & CNS", "Essential for skeletal growth and fetal/neonatal brain development", "Synergizes with GH"],
["Blood", "\u2191 2,3-DPG in RBCs \u2192 \u2191 O2 dissociation from Hb", "-"],
["Thermogenesis", "Maintains body temperature", "\u2191 UCP1 in brown fat - uncouples oxidative phosphorylation"],
]
story.append(make_table(act_data, col_widths=[3*cm, 8.5*cm, 6*cm], header_bg=TEAL, font_size=8.5))
story.append(sp(6))
story.append(InfoBox([
Paragraph("<b>Mechanistic Note: Why Hyperthyroid Patients Look 'Adrenergic'</b>", key_point),
Paragraph(
"Thyroid hormone upregulates \u03b2-adrenergic receptor density and post-receptor signaling, "
"amplifying the effect of normal catecholamine levels. This explains the tachycardia, tremor, "
"and anxiety-like symptoms of hyperthyroidism, and why <b>beta-blockers</b> are so effective "
"for rapid symptom relief even before antithyroid drugs take effect.",
note_box),
], bg=TEAL_LIGHT, border=TEAL))
story.append(PageBreak())
# ══════════════════════════════════════════════════════════════════════════════
# CHAPTER 4 – APPLIED PHYSIOLOGY
# ══════════════════════════════════════════════════════════════════════════════
story.append(Banner("CHAPTER 4 · APPLIED ANATOMY & PHYSIOLOGY", bg=RED))
story.append(sp(6))
story.append(Paragraph("4.1 Diagnostic Approach to Thyroid Function Tests", h1))
story.extend(fig_image(ASSETS + "diagnostic_algorithm.png",
caption="Fig. 4.1 - Stepwise diagnostic algorithm for interpreting TSH and free T4/T3 results."))
story.append(Paragraph("4.2 Wolff-Chaikoff Effect & Jod-Basedow Phenomenon", h1))
story.append(bul("<b>Wolff-Chaikoff effect:</b> A large acute iodide load transiently suppresses organification and hormone synthesis (autoregulatory protection). Normal glands 'escape' this within ~10-14 days by downregulating NIS. Used clinically: pre-operative Graves' disease management and thyroid storm."))
story.append(bul("<b>Failure to escape</b> \u2192 iodine-induced hypothyroidism (amiodarone, iodinated contrast, underlying autoimmune disease)."))
story.append(bul("<b>Jod-Basedow phenomenon:</b> In an iodine-deficient gland with autonomous nodules, sudden iodine loading provides substrate for uncontrolled hormone overproduction \u2192 hyperthyroidism."))
story.append(sp(6))
story.append(Paragraph("4.3 Thyroiditis - Detailed Classification", h1))
thyroiditis_data = [
["Type", "Mechanism", "Pattern", "Key Features"],
["Hashimoto\nthyroiditis", "Autoimmune: anti-TPO & anti-Tg antibodies; CD8+ T-cell mediated destruction", "Progressive hypothyroidism (may have transient early thyrotoxic phase)", "Most common cause of hypothyroidism in iodine-sufficient areas; F:M = 10-20:1; lymphocytic infiltration with germinal centers"],
["Subacute (de Quervain)\ngranulomatous", "Post-viral (often after URI)", "Painful thyrotoxic phase (2-6 wks) \u2192 hypothyroid \u2192 recovery", "Tender gland; \u2191ESR; granulomatous inflammation with giant cells; self-limited"],
["Subacute lymphocytic\n(silent/postpartum)", "Autoimmune", "Painless transient thyrotoxicosis \u2192 hypothyroidism \u2192 recovery", "No pain; occurs 1-6 months postpartum in 5-10% of women"],
["Riedel\nthyroiditis", "Fibrosing (IgG4-related disease spectrum)", "Euthyroid or hypothyroid", "Rock-hard 'woody' gland fixed to surrounding structures; mimics anaplastic carcinoma"],
]
story.append(make_table(thyroiditis_data, col_widths=[2.8*cm, 4.2*cm, 4.5*cm, 6*cm], header_bg=RED, font_size=7.8))
story.append(sp(4))
story.extend(fig_image(ASSETS + "thyroiditis_phases.png", max_width=13*cm,
caption="Fig. 4.2 - Phasic pattern of destructive thyroiditis (subacute granulomatous / silent-postpartum): thyrotoxic phase (LOW RAIU) followed by hypothyroid phase and recovery."))
story.append(Paragraph(
"<b>Key physiologic point:</b> both subacute granulomatous and silent thyroiditis follow the SAME "
"thyrotoxic\u2192hypothyroid\u2192recovery pattern because the mechanism is <b>destructive release of preformed "
"hormone</b>, not increased synthesis - this is why <b>RAIU is LOW</b> in these conditions, distinguishing "
"them from Graves' disease (RAIU HIGH).",
body))
story.append(PageBreak())
story.append(Paragraph("4.4 Hyperthyroidism", h1))
story.append(Paragraph(
"<b>Graves' disease</b> (most common cause): autoimmune - <b>TSH receptor autoantibodies (TSI/TRAb)</b> "
"stimulate the TSH receptor directly, causing continuous hormone overproduction independent of pituitary "
"control. Features: diffuse goiter, <b>exophthalmos</b> (retro-orbital lymphocytic infiltration and "
"glycosaminoglycan deposition), pretibial myxedema, weight loss with \u2191appetite, heat intolerance, "
"tremor, tachycardia/AF, warm moist skin, lid lag.",
body))
story.append(sp(4))
story.append(Paragraph("4.5 Hypothyroidism", h1))
story.append(Paragraph(
"Causes: Hashimoto's thyroiditis (autoimmune, most common in iodine-sufficient areas), iodine deficiency "
"(most common globally), post-thyroidectomy/radioiodine, congenital. Consequences: \u2193 metabolic rate "
"(weight gain, cold intolerance, bradycardia), accumulation of glycosaminoglycans (<b>myxedema</b>), "
"\u2193 cardiac contractility, constipation, dry skin.",
body))
story.append(bul("<b>Congenital hypothyroidism (cretinism):</b> irreversible intellectual disability and growth failure if untreated in infancy - basis of mandatory neonatal TSH screening."))
story.append(bul("<b>Myxedema coma:</b> hypothermia, hypoventilation, hyponatremia, altered mental status - medical emergency treated with IV levothyroxine \u00b1 T3, IV glucocorticoids, passive rewarming."))
story.append(sp(6))
story.append(Paragraph("4.6 Thyroid Storm - Management Algorithm", h1))
story.extend(fig_image(ASSETS + "thyroid_storm_algorithm.png", max_width=12.5*cm,
caption="Fig. 4.3 - Sequential management of thyroid storm. Note the critical logic: iodine is given AFTER the thionamide."))
story.append(sp(4))
story.append(PageBreak())
story.append(Paragraph("4.7 Antithyroid Drug Pharmacology", h1))
drug_data = [
["Drug Class", "Mechanism", "Clinical Notes"],
["Thionamides\n(Methimazole, PTU)", "Inhibit thyroid peroxidase (TPO) \u2192 block organification & coupling", "Onset delayed 3-4 wks (doesn't affect stored hormone). PTU also inhibits D1 (T4\u2192T3) - preferred in 1st trimester pregnancy & thyroid storm. Side effect: agranulocytosis, hepatotoxicity"],
["Iodides\n(Lugol's, SSKI)", "Wolff-Chaikoff effect; \u2193 gland vascularity", "Pre-operative use; thyroid storm (after thionamide)"],
["Radioactive Iodine\n(I-131)", "NIS uptake \u2192 beta-particle emission \u2192 follicular cell destruction", "Definitive Rx for Graves'/toxic nodules; contraindicated in pregnancy/lactation"],
["Beta-blockers\n(Propranolol)", "Symptom control; mild \u2193 T4\u2192T3 conversion", "First-line rapid control in thyroid storm while thionamides take effect"],
]
story.append(make_table(drug_data, col_widths=[3.2*cm, 6*cm, 8.3*cm], header_bg=RED, font_size=8.3))
story.append(sp(6))
story.append(Paragraph("4.8 Drug Effects on Thyroid Function Tests", h1))
tft_data = [
["Mechanism", "Drug(s)", "Effect on Tests"],
["\u2191 TBG synthesis", "Estrogens, tamoxifen, methadone, heroin", "\u2191 Total T4/T3; normal free hormone, TSH"],
["\u2193 TBG synthesis", "Androgens, high-dose glucocorticoids", "\u2193 Total T4/T3; normal free hormone"],
["Displacement from binding proteins", "Phenytoin, carbamazepine, salicylates", "\u2193 Total T4 (artifactual); free T4 usually normal"],
["\u2193 Central TSH secretion", "Dopamine, high-dose glucocorticoids, octreotide", "\u2193 TSH without true hypothyroidism"],
["\u2193 T4\u2192T3 conversion", "Propranolol (high dose), glucocorticoids, PTU, amiodarone", "\u2193 T3; used therapeutically in thyroid storm"],
["\u2191 Hepatic clearance of T4", "Phenobarbital, phenytoin, rifampin, carbamazepine", "\u2191 Levothyroxine dose requirement"],
]
story.append(make_table(tft_data, col_widths=[4.5*cm, 6*cm, 7*cm], header_bg=RED, font_size=8.3))
story.append(sp(6))
story.append(PageBreak())
story.append(Paragraph("4.9 Thyroid Carcinoma - Applied Correlation", h1))
ca_data = [
["Type", "Frequency", "Origin", "Key Features"],
["Papillary", "~85%", "Follicular cell", "Best prognosis; psammoma bodies; 'Orphan Annie eye' nuclei; nuclear grooves; lymphatic spread; BRAF/RET-PTC mutations; radiation-associated"],
["Follicular", "~10%", "Follicular cell", "Hematogenous spread (bone, lung); RAS mutations; requires demonstrating capsular/vascular invasion (not diagnosable on FNA alone)"],
["Medullary", "~5%", "Parafollicular (C) cell", "Secretes calcitonin + CEA (tumor markers); amyloid deposits; RET mutations; MEN 2A/2B association"],
["Anaplastic", "<5%", "Follicular cell (dedifferentiated)", "Highly aggressive; rapid growth; elderly; airway obstruction; poor prognosis"],
]
story.append(make_table(ca_data, col_widths=[2.5*cm, 2*cm, 3.5*cm, 9.5*cm], header_bg=RED, font_size=8.3))
story.append(sp(6))
story.append(Paragraph("4.10 Pregnancy-Related Applied Physiology", h1))
story.append(bul("<b>hCG</b> has weak TSH-receptor agonist activity (shares the alpha subunit) \u2192 mild physiologic \u2191 free T4 and \u2193 TSH in first trimester, most pronounced in hyperemesis gravidarum."))
story.append(bul("<b>Estrogen</b> \u2191 TBG synthesis and \u2193 clearance \u2192 \u2191 total T4/T3 (free hormone normal in euthyroid women due to compensation)."))
story.append(bul("Maternal T4 is essential for <b>fetal neurodevelopment</b> before the fetal thyroid becomes functional (~week 12) - basis for universal neonatal TSH screening and prompt treatment of maternal hypothyroidism."))
story.append(sp(6))
story.append(Paragraph("4.11 Critical Illness Physiology", h1))
story.append(Paragraph(
"<b>Euthyroid sick syndrome (non-thyroidal illness syndrome):</b> seen in critically ill patients - "
"\u2193 T3 (\u2193D1, \u2191D3 activity), variable T4, <b>normal or low TSH</b> despite low hormone levels "
"(cytokine suppression of TRH/TSH plus altered binding proteins). This reflects an <b>adaptive "
"hypometabolic response</b> - treatment with thyroid hormone does NOT improve outcomes and is not recommended.",
body))
story.append(PageBreak())
# ══════════════════════════════════════════════════════════════════════════════
# CHAPTER 5 – SUMMARY & QUICK REVIEW
# ══════════════════════════════════════════════════════════════════════════════
story.append(Banner("CHAPTER 5 · SUMMARY TABLES & QUICK REVIEW", bg=colors.HexColor("#475569")))
story.append(sp(6))
story.append(Paragraph("5.1 Hyperthyroidism vs Hypothyroidism - Clinical Comparison", h1))
comp_data = [
["Feature", "Hyperthyroidism", "Hypothyroidism"],
["Weight", "Loss despite \u2191appetite", "Gain"],
["Temperature tolerance", "Heat intolerance", "Cold intolerance"],
["Heart rate", "Tachycardia, AF risk", "Bradycardia"],
["Skin", "Warm, moist", "Dry, cold, myxedema"],
["Bowel habit", "Diarrhea/\u2191motility", "Constipation"],
["Reflexes", "Hyperreflexia", "Delayed relaxation phase"],
["Mood", "Anxiety, irritability", "Depression, lethargy"],
["Menstrual", "Oligomenorrhea", "Menorrhagia"],
["Classic cause", "Graves' disease", "Hashimoto's thyroiditis / iodine deficiency"],
]
story.append(make_table(comp_data, col_widths=[4*cm, 6.5*cm, 6.5*cm], header_bg=colors.HexColor("#475569"), font_size=9))
story.append(sp(6))
story.append(Paragraph("5.2 High-Yield Mnemonics", h1))
mn_data = [
[Paragraph("<b>Mnemonic</b>", body_b), Paragraph("<b>Meaning</b>", body_b)],
["MIT + DIT = T3; DIT + DIT = T4", "Coupling reaction in thyroid hormone synthesis (fewer iodines combine for T3)"],
["NIS traps, TPO organifies/couples", "Two key enzymes/transporters in synthesis"],
["T3 > T4 potency, T4 > T3 quantity", "T4 is 90% of secretion but T3 has 10x receptor affinity"],
["\u201cIodine AFTER thionamide\u201d", "Thyroid storm treatment order - iodine given after thionamide to avoid providing substrate"],
["RAIU: HIGH = Graves/toxic nodule; LOW = destructive thyroiditis", "Differentiates true overproduction from hormone leakage"],
["Wolff-Chaikoff = too much iodine \u2192 shutdown", "High iodine load transiently blocks synthesis"],
["Jod-Basedow = iodine-deficient gland + iodine \u2192 hyperthyroid", "Opposite of Wolff-Chaikoff, occurs in susceptible/nodular glands"],
["PTU in pregnancy (1st trimester)", "Methimazole is teratogenic (aplasia cutis, choanal atresia)"],
["Psammoma bodies = Papillary carcinoma", "Classic histology clue"],
["Calcitonin = C cells = Medullary carcinoma", "Parafollicular cell tumor marker"],
]
story.append(make_table(mn_data, col_widths=[6.5*cm, 10.5*cm], header_bg=colors.HexColor("#475569"), font_size=8.7))
story.append(sp(6))
story.append(Paragraph("5.3 Key Laboratory Investigations", h1))
lab_data = [
["Test", "Used For"],
["Serum TSH", "First-line screening test for thyroid dysfunction"],
["Free T4 / Free T3", "Confirms overt vs subclinical disease; assesses severity"],
["Anti-TPO / Anti-thyroglobulin antibodies", "Diagnose Hashimoto's thyroiditis"],
["TSH-receptor antibody (TRAb/TSI)", "Diagnose Graves' disease"],
["Radioactive iodine uptake (RAIU) scan", "Differentiate Graves'/toxic nodule (HIGH) from destructive thyroiditis/exogenous hormone (LOW)"],
["Serum calcitonin, CEA", "Tumor markers for medullary thyroid carcinoma"],
["Fine needle aspiration (FNA) cytology", "Evaluate thyroid nodules for malignancy"],
["Urinary iodine", "Population marker of iodine sufficiency"],
]
story.append(make_table(lab_data, col_widths=[6*cm, 11*cm], header_bg=colors.HexColor("#475569"), font_size=9))
story.append(sp(8))
story.append(hr(color=GRAY_MID))
story.append(Paragraph(
"<b>Sources:</b> Gray's Anatomy for Students | Junqueira's Basic Histology 17e | Ganong's Review of Medical "
"Physiology 26e | Robbins, Cotran & Kumar Pathologic Basis of Disease | Katzung's Basic and Clinical "
"Pharmacology 16e | Sabiston Textbook of Surgery | Henry's Clinical Diagnosis and Management by Laboratory Methods",
small_it))
def add_page_number(canvas, doc):
canvas.saveState()
canvas.setFont("Helvetica", 8)
canvas.setFillColor(colors.HexColor("#9ca3af"))
page_num = canvas.getPageNumber()
canvas.drawRightString(A4[0] - 2*cm, 1.2*cm, f"Page {page_num}")
canvas.drawString(2*cm, 1.2*cm, "Thyroid Gland — Complete Medical Reference | Orris")
canvas.restoreState()
doc.build(story, onFirstPage=add_page_number, onLaterPages=add_page_number)
print("PDF created successfully!")
The full thyroid PDF spans 4 major areas. Which would you like me to finalize/go deep on right now?
| Right Adrenal | Left Adrenal | |
|---|---|---|
| Shape | Pyramidal/triangular | Semilunar/crescentic |
| Anterior | Bare area of liver, inferior vena cava (IVC) | Stomach, pancreatic tail, splenic vessels |
| Posterior | Right crus of diaphragm | Left crus of diaphragm |
| Medial | IVC, right celiac ganglion | Aorta, left celiac ganglion |
| Inferior | Upper pole of right kidney | Upper pole of left kidney |
| Component | Origin | Week of Appearance |
|---|---|---|
| Cortex | Mesoderm (coelomic mesothelium, between mesentery root and gonadal ridge) | Week 5 |
| Medulla | Neuroectoderm (neural crest cells migrating from sympathetic ganglia) | Week 6-7 |


Mnemonic for zones and secretions: "GFR" = Glomerulosa (aldosterone), Fasciculata (cortisol/glucocorticoids), Reticularis (androgens). Or: "Salt, Sugar, Sex" (outermost to innermost).
| System | Effect |
|---|---|
| Carbohydrate | Increases gluconeogenesis, decreases glucose uptake (anti-insulin) → hyperglycemia |
| Protein | Promotes catabolism, mobilizes amino acids from muscle/tissues |
| Fat | Promotes lipolysis; central fat redistribution (excess) |
| Immune | Anti-inflammatory, immunosuppressive (decreases cytokines, lymphocytes, eosinophils) |
| Bone | Inhibits osteoblasts → osteoporosis with excess |
| Cardiovascular | Increases vascular reactivity to catecholamines (upregulates α1 receptors); mild mineralocorticoid effect |
| CNS | Affects mood, behavior, cognition |
| Development | Required for fetal lung maturation (surfactant) |
| Effect | Mechanism |
|---|---|
| Increased heart rate & contractility | β1 receptors |
| Vasoconstriction (skin, viscera) | α1 receptors |
| Vasodilation (skeletal muscle) | β2 receptors |
| Bronchodilation | β2 receptors |
| Glycogenolysis & gluconeogenesis | β2 receptors |
| Lipolysis | β1/β3 receptors |
| Pupillary dilation | α1 receptors |
| Decreased GI motility | α2, β2 receptors |
Adrenal Gland Complete
PDF Document · PDF
| Chapter | Content |
|---|---|
| 1 - Gross Anatomy | Location, side-by-side relations table, triple arterial supply table, venous drainage (including surgical note on right adrenal vein), lymphatics, nerve supply |
| 2 - Embryology | Dual origin table (mesoderm vs neuroectoderm), fetal cortex, DHEA-placenta axis, postnatal involution, chromaffin cell differentiation + CAH clinical box |
| 3 - Histology | All three cortical zones in a detailed comparison table (cell arrangement, cytoplasm, enzyme, secretion, regulator), spongiocytes, chromaffin cells, sustentacular cells, chromaffin reaction, mnemonic box |
| 4 - Adrenal Cortex Physiology | Steroidogenesis, StAR protein, HPA axis step-by-step, diurnal rhythm, cortisol transport, full actions table (11 systems), aldosterone RAAS cascade table, 11β-HSD2 protection box, adrenal androgens |
| 5 - Adrenal Medulla Physiology | Catecholamine synthesis 4-step table, PNMT + cortisol dependency, receptor table (α1/α2/β1/β2/β3), fight-or-flight response table, VMA/metanephrine metabolism |
| 6 - Applied Anatomy & Clinical | Cushing's vs Cushing's disease comparison, Conn's syndrome, Addison's disease full table, CAH enzyme variants table (4 types), Phaeochromocytoma Rule of 10s + perioperative management, Waterhouse-Friderichsen, adrenal incidentaloma, neuroblastoma, CIRCI |
| 7 - Summary & Quick Review | All hormones at a glance, electrolyte pattern table for all disorders, mnemonics table (11 mnemonics), key lab investigations table (11 tests) |
| Vessel | Origin | Course |
|---|---|---|
| Superior thyroid artery | First branch of external carotid artery | Descends to superior pole, divides into anterior/posterior glandular branches |
| Inferior thyroid artery | Thyrocervical trunk (from subclavian artery) | Ascends behind carotid sheath to reach the gland posteriorly; closely related to recurrent laryngeal nerve |
| Thyroid ima artery (variable, ~10%) | Directly from aorta or brachiocephalic trunk | Ascends to isthmus |

| Step | Process | Enzyme/Mechanism |
|---|---|---|
| 1. Iodide trapping | Active uptake of I⁻ from blood into thyrocyte across basal membrane | Na⁺/I⁻ symporter (NIS) |
| 2. Thyroglobulin synthesis | Made in thyrocyte, secreted into colloid by exocytosis | Ribosomes → Golgi → secretory vesicles |
| 3. Organification | Oxidation of iodide to iodine; incorporation onto tyrosine residues of thyroglobulin at the apical membrane/colloid interface | Thyroid peroxidase (TPO) |
| 4. Coupling | MIT + DIT → T3; DIT + DIT → T4 (within thyroglobulin) | Thyroid peroxidase |
| 5. Storage | Iodinated thyroglobulin stored in colloid | - |
| 6. Release | Colloid endocytosed by thyrocyte → lysosomal proteolysis → free T3/T4 released into capillaries | Lysosomal hydrolysis |
99% of circulating T3/T4 is protein-bound: mainly thyroxine-binding globulin (TBG), plus transthyretin and albumin
| Target Tissue | Effect | Mechanism |
|---|---|---|
| Heart | ↑ Chronotropic & inotropic effect | ↑ β-adrenergic receptors; ↑ α-myosin heavy chain (higher ATPase activity) |
| Metabolic rate | ↑ Basal metabolic rate (calorigenic action) | ↑ O2 consumption, ↑ Na⁺/K⁺-ATPase activity in most tissues |
| Carbohydrate metabolism | ↑ Intestinal glucose absorption; ↑ glycogenolysis and gluconeogenesis | - |
| Lipid metabolism | ↑ Lipolysis; ↑ LDL receptor expression (↓ cholesterol) | - |
| Protein metabolism | Normal levels: anabolic (growth); excess: catabolic (muscle wasting) | - |
| Growth & development | Essential for normal skeletal growth and CNS/brain development (critical in fetal/neonatal period) | Synergizes with GH |
| Blood | ↑ 2,3-DPG in RBCs → ↑ O2 dissociation from hemoglobin | - |
| Thermogenesis | Maintains body temperature | ↑ Uncoupling proteins, ↑ heat production |
| Condition | TSH | Free T4 | Free T3 |
|---|---|---|---|
| Primary hyperthyroidism | ↓↓ | ↑ | ↑ |
| Primary hypothyroidism | ↑↑ | ↓ | ↓/normal |
| Subclinical hyperthyroidism | ↓ | Normal | Normal |
| Subclinical hypothyroidism | ↑ | Normal | Normal |
| Secondary (pituitary) hypothyroidism | ↓/normal (inappropriately low) | ↓ | ↓ |
| Sick euthyroid syndrome | Normal/low | Normal/low | ↓↓ (↓ conversion) |
| Anomaly | Description |
|---|---|
| Thyroglossal duct cyst | Persistent duct remnant; midline neck mass that moves with tongue protrusion/swallowing (pathognomonic) |
| Lingual thyroid | Ectopic thyroid tissue at tongue base - may be the ONLY functioning thyroid tissue |
| Pyramidal lobe | Persistent inferior part of the duct, projects upward from isthmus (present in ~50% of people) |
| Thyroid agenesis/dysgenesis | Cause of congenital hypothyroidism |
| Ectopic thyroid | Anywhere along the descent path (sublingual to mediastinal) |
| Enzyme | Location | Reaction | Physiological Role |
|---|---|---|---|
| Type 1 (D1) | Liver, kidney, thyroid | T4 → T3 (outer ring) AND T4 → rT3 (inner ring) | Major source of circulating T3 (~80%); contributes to plasma T3 pool |
| Type 2 (D2) | Brain, pituitary, brown fat, skeletal muscle, placenta | T4 → T3 (outer ring only) | Local/intracellular T3 generation - critical for CNS and pituitary feedback; provides local thermogenic T3 in brown fat |
| Type 3 (D3) | Placenta, fetal tissues, brain, skin | T4 → rT3; T3 → T2 (inner ring, inactivating) | Inactivates thyroid hormone - protects fetus from excess maternal hormone; important in illness ("sick euthyroid" ↑D3 activity) |
| Mechanism | Drug(s) | Effect on Tests |
|---|---|---|
| ↑ TBG synthesis | Estrogens, tamoxifen, SERMs, methadone, heroin | ↑ Total T4/T3; normal free T4/T3, TSH |
| ↓ TBG synthesis | Androgens, glucocorticoids (high dose), nephrotic syndrome | ↓ Total T4/T3; normal free hormone |
| Competitive displacement from binding proteins | Phenytoin, carbamazepine, salicylates, furosemide | ↓ Total T4 (artifactual); free T4 usually normal |
| ↓ Central TSH secretion | Dopamine, glucocorticoids (high dose), somatostatin/octreotide | ↓ TSH without true hypothyroidism |
| ↓ T4→T3 conversion (D1 inhibition) | Propranolol (high dose), glucocorticoids, PTU, amiodarone | ↓ T3, may be used therapeutically in thyroid storm |
| ↑ Hepatic clearance of T4 | Phenobarbital, phenytoin, rifampin, carbamazepine | ↑ Hormone requirement in patients on levothyroxine |
| Direct synthesis inhibition | Thionamides, lithium, iodides, amiodarone | Variable hypo/hyperthyroidism |
| Type | Mechanism | Phase Pattern | Key Features |
|---|---|---|---|
| Hashimoto thyroiditis | Autoimmune - anti-TPO & anti-thyroglobulin antibodies; CD8+ T-cell mediated destruction; genetic links (CTLA4, PTPN22, IL2RA polymorphisms) | Progressive hypothyroidism (may have transient early thyrotoxic "hashitoxicosis") | Most common cause of hypothyroidism in iodine-sufficient areas; F:M = 10-20:1; ages 45-65; lymphocytic infiltration with germinal centers; ↑ risk of thyroid lymphoma |
| Subacute (de Quervain) granulomatous thyroiditis | Post-viral (often after URI) | Painful thyrotoxic phase (2-6 weeks) → hypothyroid phase → recovery | Tender, enlarged gland; ↑ ESR; granulomatous inflammation with giant cells on histology; self-limited |
| Subacute lymphocytic (silent/painless) thyroiditis | Autoimmune, includes postpartum thyroiditis | Painless transient thyrotoxicosis → hypothyroidism → recovery (most resolve) | No pain; occurs 1-6 months postpartum in ~5-10% of women |
| Riedel thyroiditis | Fibrosing process (IgG4-related disease spectrum) | Euthyroid or hypothyroid | Rock-hard, "woody" gland fixed to surrounding structures; mimics anaplastic carcinoma clinically; may cause airway/esophageal compression |
| Acute suppurative thyroiditis | Bacterial infection (rare - gland is normally infection-resistant) | Acute pain, fever, abscess | Usually from pyriform sinus fistula (children) or immunocompromise |
| Type | Frequency | Cell of Origin | Key Features |
|---|---|---|---|
| Papillary carcinoma | ~85% (most common) | Follicular cell | Best prognosis; psammoma bodies, "Orphan Annie eye" nuclei, nuclear grooves; spreads via lymphatics; RET/PTC and BRAF mutations; associated with childhood radiation exposure |
| Follicular carcinoma | ~10% | Follicular cell | Hematogenous spread (bone, lung); RAS mutations; diagnosis requires demonstrating capsular/vascular invasion (cannot diagnose on FNA alone) |
| Medullary carcinoma | ~5% | Parafollicular (C) cells | Secretes calcitonin (tumor marker) and CEA; amyloid deposits (from calcitonin) on histology; RET mutations; associated with MEN 2A/2B |
| Anaplastic carcinoma | <5% | Follicular cell (dedifferentiated) | Highly aggressive, rapid growth, poor prognosis, elderly patients, local invasion causing airway obstruction |
mkdir -p /tmp/workspace/thyroid-gland/output && cd /tmp/workspace/thyroid-gland && python generate_pdf.py 2>&1
ls -lh /tmp/workspace/thyroid-gland/output/Thyroid_Gland_Complete.pdf
Thyroid Gland Complete
PDF Document · PDF
| Chapter | Content | Diagrams Included |
|---|---|---|
| 1. Gross Anatomy | Location/relations, capsule & ligament of Berry, blood supply table, nerve relations, embryology + anomalies table | Gross anatomy schematic (lobes, isthmus, arteries, RLN course) |
| 2. Histology | Follicle architecture, thyrocyte polarity, colloid, parafollicular (C) cells | Labelled follicle histology diagram |
| 3. Physiology | Iodine metabolism, synthesis pathway (7-step table), HPT axis + feedback, deiodinase system (D1/D2/D3), transport/mechanism, actions table | Hormone synthesis flowchart, HPT axis flowchart, deiodinase pathway diagram |
| 4. Applied Physiology | TFT diagnostic algorithm, Wolff-Chaikoff/Jod-Basedow, thyroiditis classification, hyper/hypothyroidism, thyroid storm, antithyroid pharmacology, drug effects on TFTs, carcinoma table, pregnancy physiology, sick euthyroid syndrome | Diagnostic algorithm, thyroiditis phase chart, thyroid storm treatment algorithm |
| 5. Summary | Hyper vs hypo comparison table, high-yield mnemonics, key lab investigations | - |