Reproductive physiology notes for professional exam mbbs 1st yr
| Component | Proportion | Function |
|---|---|---|
| Seminiferous tubules | 80% of testis | Spermatogenesis |
| Leydig cells | In connective tissue | Testosterone synthesis |
| Sertoli cells | Line seminiferous tubules | Support spermatogenesis |
Exam tip: Sertoli cells are regulated by FSH. Leydig cells are regulated by LH.
| Mediated by Testosterone | Mediated by DHT (5α-reduced) |
|---|---|
| Differentiation of epididymis, vas deferens, seminal vesicles | Differentiation of penis, scrotum, prostate |
| Increased muscle mass | Male hair pattern |
| Pubertal growth spurt | Male pattern baldness |
| Epiphyseal closure | Sebaceous gland activity |
| Deepening of voice | Growth of prostate |
| Spermatogenesis | |
| Negative feedback on anterior pituitary | |
| Libido |
| Stage | Event |
|---|---|
| Gestational weeks 8-9 | Oogonia enter meiosis → become primary oocytes |
| Weeks 20-24 gestation | Peak ~7 million oogonia |
| Birth | ~2 million oocytes remain |
| Puberty | ~400,000 oocytes remain |
| Menopause | Few/none remain |

Ovulation occurs ~36 hours after onset of the LH surge
| Phase | Dominant Hormone | FSH | LH | Estrogen | Progesterone |
|---|---|---|---|---|---|
| Menstruation (D1-5) | Low all | ↑ starts | Low | Low | Low |
| Follicular (D5-14) | Estrogen | ↑ then ↓ | Low then surge | Rising → peak | Low |
| Ovulation (D14) | LH surge | Mid-cycle surge | Surge | Peak just before | Low |
| Luteal (D14-28) | Progesterone | Low | Low | Moderate | High |
Hypothalamus
|
GnRH (pulsatile)
|
Anterior Pituitary
/ \
FSH LH
| |
Granulosa Theca/Leydig
cells cells
| |
Inhibin Estrogen/
Testosterone
|
Negative feedback (usually)
Positive feedback at mid-cycle surge (estrogen only)
| Cell | Hormone Produced | Regulated by |
|---|---|---|
| Leydig cells | Testosterone | LH |
| Sertoli cells | Inhibin, ABP | FSH |
| Theca interna | Androgens | LH |
| Granulosa cells | Estrogen, Inhibin | FSH |
| Corpus luteum | Progesterone + Estrogen | LH (then hCG) |
| Trophoblast | hCG | - |
| Fact | Number |
|---|---|
| Duration of spermatogenesis | 64 days |
| Sperm produced per day | 128 million |
| Oogonia at peak (gestation weeks 20-24) | 7 million |
| Oocytes at birth | 2 million |
| Oocytes at puberty | 400,000 |
| Average menstrual cycle length | 28 days |
| Ovulation occurs after LH surge | ~36 hours |
| Fertilization to implantation | ~6-7 days |
| Time for blastocyst to reach uterus | ~3 days |
| Temperature rise at ovulation (BBT) | ~0.5°C |
| Testicular temperature | 35-36°C (1-2°C below core) |
1
Create notes as flowchart and diagram create it into doc format
mkdir -p /home/daytona/workspace/repro-physiology && ls /home/daytona/workspace/…
~/repro-physiology/build.js
const {
Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
HeadingLevel, AlignmentType, BorderStyle, WidthType, ShadingType,
VerticalAlign, PageNumber, Header, Footer, PageBreak,
convertInchesToTwip, UnderlineType
} = require('docx');
const fs = require('fs');
// ─── colour palette ──────────────────────────────────────────────────
const BLUE = "1F4E79";
const LBLUE = "2E75B6";
const TEAL = "17375E";
const LTBLUE = "BDD7EE";
const LLBLUE = "DEEAF1";
const PINK = "C00000";
const GREEN = "375623";
const LGREEN = "E2EFDA";
const LYELLOW = "FFF2CC";
const LORANGE = "FCE4D6";
const LGREY = "F2F2F2";
const WHITE = "FFFFFF";
const DARKGREY = "404040";
const BLACK = "000000";
// ─── helper builders ─────────────────────────────────────────────────
function heading1(text) {
return new Paragraph({
text,
heading: HeadingLevel.HEADING_1,
spacing: { before: 360, after: 120 },
shading: { type: ShadingType.SOLID, color: BLUE },
run: { color: WHITE, bold: true },
});
}
function heading2(text) {
return new Paragraph({
text,
heading: HeadingLevel.HEADING_2,
spacing: { before: 240, after: 80 },
});
}
function heading3(text) {
return new Paragraph({
text,
heading: HeadingLevel.HEADING_3,
spacing: { before: 160, after: 60 },
});
}
function para(text, opts = {}) {
return new Paragraph({
children: [new TextRun({ text, color: opts.color || BLACK, bold: opts.bold, italics: opts.italic, size: opts.size || 22 })],
spacing: { before: 60, after: 60 },
alignment: opts.align || AlignmentType.LEFT,
indent: opts.indent ? { left: convertInchesToTwip(0.3) } : undefined,
});
}
function bullet(text, level = 0, color = BLACK) {
return new Paragraph({
children: [new TextRun({ text, color, size: 22 })],
bullet: { level },
spacing: { before: 40, after: 40 },
});
}
function keyPoint(label, value) {
return new Paragraph({
children: [
new TextRun({ text: label + ": ", bold: true, color: LBLUE, size: 22 }),
new TextRun({ text: value, color: BLACK, size: 22 }),
],
spacing: { before: 50, after: 50 },
indent: { left: convertInchesToTwip(0.2) },
});
}
function divider() {
return new Paragraph({
text: "",
border: { bottom: { color: LBLUE, size: 6, style: BorderStyle.SINGLE } },
spacing: { before: 120, after: 120 },
});
}
function pageBreak() {
return new Paragraph({ children: [new PageBreak()] });
}
function centeredBold(text, size = 28, color = WHITE, shade = LBLUE) {
return new Paragraph({
children: [new TextRun({ text, bold: true, color, size })],
alignment: AlignmentType.CENTER,
spacing: { before: 80, after: 80 },
shading: { type: ShadingType.SOLID, color: shade },
});
}
// ─── TABLE helpers ────────────────────────────────────────────────────
function makeCell(text, opts = {}) {
return new TableCell({
children: [new Paragraph({
children: [new TextRun({
text,
bold: opts.bold || false,
color: opts.textColor || BLACK,
size: opts.size || 20,
})],
alignment: opts.align || AlignmentType.LEFT,
spacing: { before: 40, after: 40 },
})],
shading: opts.shade ? { type: ShadingType.SOLID, color: opts.shade } : undefined,
verticalAlign: VerticalAlign.CENTER,
width: opts.width ? { size: opts.width, type: WidthType.PERCENTAGE } : undefined,
columnSpan: opts.span || 1,
});
}
function headerRow(cells, shade = LBLUE) {
return new TableRow({
children: cells.map(c =>
typeof c === 'string'
? makeCell(c, { bold: true, textColor: WHITE, shade, align: AlignmentType.CENTER })
: makeCell(c.text, { bold: true, textColor: WHITE, shade, align: AlignmentType.CENTER, width: c.w })
),
tableHeader: true,
});
}
function dataRow(cells, altShade) {
return new TableRow({
children: cells.map(c =>
typeof c === 'string'
? makeCell(c, { shade: altShade })
: makeCell(c.text, { shade: altShade || c.shade, bold: c.bold, textColor: c.color, align: c.align, width: c.w })
),
});
}
function simpleTable(headers, rows, colWidths) {
const tRows = [headerRow(headers.map((h, i) => ({ text: h, w: colWidths ? colWidths[i] : undefined })))];
rows.forEach((r, idx) => {
tRows.push(dataRow(r.map((c, i) => ({
text: c,
w: colWidths ? colWidths[i] : undefined,
shade: idx % 2 === 0 ? LGREY : WHITE,
})));
});
return new Table({
rows: tRows,
width: { size: 100, type: WidthType.PERCENTAGE },
margins: { top: 80, bottom: 80, left: 100, right: 100 },
});
}
// ─── FLOWCHART via ASCII-art table ───────────────────────────────────
function flowBox(text, shade = LTBLUE, textColor = TEAL, bold = true) {
return new Table({
rows: [new TableRow({ children: [makeCell(text, { shade, textColor: textColor, bold, align: AlignmentType.CENTER, size: 22 })] })],
width: { size: 60, type: WidthType.PERCENTAGE },
float: { horizontalAnchor: "margin", absoluteHorizontalPosition: convertInchesToTwip(1.5) },
});
}
function arrow() {
return new Paragraph({
children: [new TextRun({ text: "↓", color: LBLUE, bold: true, size: 32 })],
alignment: AlignmentType.CENTER,
spacing: { before: 60, after: 60 },
});
}
function flowStep(label, detail, shade = LLBLUE) {
return [
new Table({
rows: [new TableRow({
children: [
makeCell(label, { shade, bold: true, textColor: TEAL, align: AlignmentType.CENTER, size: 20, w: 30 }),
makeCell(detail, { shade: WHITE, textColor: BLACK, align: AlignmentType.LEFT, size: 20, w: 70 }),
],
})],
width: { size: 100, type: WidthType.PERCENTAGE },
}),
arrow(),
];
}
// ─── CONTENT BUILDER ─────────────────────────────────────────────────
const children = [];
// ══════════════════════════════════════════════════════════════════════
// TITLE PAGE
// ══════════════════════════════════════════════════════════════════════
children.push(
new Paragraph({ spacing: { before: 600 } }),
new Paragraph({
children: [new TextRun({ text: "REPRODUCTIVE PHYSIOLOGY", bold: true, color: WHITE, size: 52 })],
alignment: AlignmentType.CENTER,
shading: { type: ShadingType.SOLID, color: BLUE },
spacing: { before: 200, after: 60 },
}),
new Paragraph({
children: [new TextRun({ text: "MBBS 1st Year — Professional Exam Notes", bold: false, color: WHITE, size: 28 })],
alignment: AlignmentType.CENTER,
shading: { type: ShadingType.SOLID, color: LBLUE },
spacing: { before: 0, after: 200 },
}),
new Paragraph({
children: [new TextRun({ text: "Flowcharts • Diagrams • Tables • High-Yield Points", italics: true, color: LBLUE, size: 24 })],
alignment: AlignmentType.CENTER,
spacing: { before: 200, after: 60 },
}),
new Paragraph({
children: [new TextRun({ text: "Sources: Costanzo Physiology 7e | Ganong's 26e | Guyton & Hall | Berek & Novak", italics: true, color: DARKGREY, size: 20 })],
alignment: AlignmentType.CENTER,
spacing: { before: 60, after: 400 },
}),
pageBreak()
);
// ══════════════════════════════════════════════════════════════════════
// SECTION 1 — HPG AXIS FLOWCHART
// ══════════════════════════════════════════════════════════════════════
children.push(
heading1("1. HYPOTHALAMO-PITUITARY-GONADAL (HPG) AXIS"),
para("The entire reproductive system is governed by a 3-tier hormonal hierarchy."),
divider(),
);
// Flowchart built as a vertical table
const hpgRows = [
["HYPOTHALAMUS", "Arcuate nucleus\nPulse generator → GnRH (pulsatile, q 60-90 min)\nContinuous GnRH → downregulation (used therapeutically)", BLUE, WHITE],
["↓ GnRH ↓", "Gonadotropin-Releasing Hormone (decapeptide)", LBLUE, WHITE],
["ANTERIOR PITUITARY", "Gonadotroph cells\nFSH + LH secreted in response to GnRH", TEAL, WHITE],
["↓ FSH + LH ↓", "Gonadotropins travel via bloodstream", LTBLUE, TEAL],
["GONADS (Testes / Ovaries)", "Testes: Sertoli cells (FSH) + Leydig cells (LH)\nOvaries: Granulosa cells (FSH) + Theca cells (LH)", LGREEN, GREEN],
["↑ Negative Feedback ↑", "Testosterone / Estrogen / Inhibin → suppress hypothalamus & pituitary", LORANGE, PINK],
["⚡ EXCEPTION: Positive Feedback", "High sustained estrogen (>200 pg/mL, >50 hrs) → triggers LH SURGE → Ovulation", LYELLOW, PINK],
];
const hpgTable = new Table({
rows: hpgRows.map(([label, detail, shade, tc]) =>
new TableRow({
children: [
makeCell(label, { shade, bold: true, textColor: tc, align: AlignmentType.CENTER, size: 22, w: 30 }),
makeCell(detail, { shade: label.includes("↓") || label.includes("↑") ? shade : WHITE, textColor: BLACK, align: AlignmentType.LEFT, size: 20, w: 70 }),
],
})
),
width: { size: 100, type: WidthType.PERCENTAGE },
});
children.push(hpgTable, para(""), divider());
// Key regulators table
children.push(heading2("Key Regulatory Hormones"));
children.push(simpleTable(
["Hormone", "Source", "Target", "Key Action"],
[
["GnRH", "Hypothalamus", "Ant. Pituitary", "Stimulates FSH + LH (must be pulsatile)"],
["FSH", "Ant. Pituitary", "Sertoli / Granulosa cells", "Spermatogenesis / Follicle development"],
["LH", "Ant. Pituitary", "Leydig / Theca cells", "Testosterone / Androgen synthesis"],
["Inhibin", "Sertoli / Granulosa", "Ant. Pituitary", "Selectively suppresses FSH"],
["Testosterone", "Leydig cells", "Multiple", "Secondary sex characteristics, spermatogenesis"],
["Estradiol (E2)", "Granulosa cells", "Multiple", "Follicular phase, positive feedback → LH surge"],
["Progesterone", "Corpus luteum", "Uterus / Pituitary", "Secretory phase, maintain pregnancy"],
["hCG", "Trophoblast", "Corpus luteum", "Maintains CL in early pregnancy"],
],
));
children.push(para(""), pageBreak());
// ══════════════════════════════════════════════════════════════════════
// SECTION 2 — MALE REPRODUCTIVE PHYSIOLOGY
// ══════════════════════════════════════════════════════════════════════
children.push(
heading1("2. MALE REPRODUCTIVE PHYSIOLOGY"),
heading2("A. Testicular Structure"),
);
children.push(simpleTable(
["Component", "% of Testis", "Cell Type", "Function"],
[
["Seminiferous tubules", "80%", "Sertoli cells + Spermatogonia", "Spermatogenesis"],
["Connective tissue + Leydig", "20%", "Leydig cells", "Testosterone synthesis"],
["Epididymis", "—", "Stereocilia epithelium", "Sperm maturation & storage"],
],
));
children.push(
heading2("B. Sertoli Cell Functions"),
para("Regulated by FSH. Located in seminiferous tubule epithelium."),
);
const sertoliFn = [
["1. NUTRITIVE", "Provide nutrients to developing sperm (isolated from blood)", LLBLUE],
["2. BLOOD-TESTIS BARRIER", "Tight junctions between Sertoli cells; selective permeability; protects developing sperm", LLBLUE],
["3. FLUID SECRETION", "Aqueous fluid → transports sperm toward epididymis", LGREEN],
["4. ANDROGEN-BINDING PROTEIN (ABP)", "Secreted into tubule lumen; maintains high local testosterone near sperm", LYELLOW],
];
children.push(new Table({
rows: sertoliFn.map(([fn, detail, shade]) =>
new TableRow({ children: [
makeCell(fn, { shade: LBLUE, bold: true, textColor: WHITE, align: AlignmentType.CENTER, w: 35 }),
makeCell(detail, { shade, textColor: BLACK, w: 65 }),
]})
),
width: { size: 100, type: WidthType.PERCENTAGE },
}));
// Spermatogenesis Flowchart
children.push(
heading2("C. Spermatogenesis Flowchart"),
para("Duration: ~64 days | Output: 128 million sperm/day", { bold: true }),
para(""),
);
const spermFlow = new Table({
rows: [
new TableRow({ children: [
makeCell("SPERMATOGONIUM (2n)", { shade: BLUE, bold: true, textColor: WHITE, align: AlignmentType.CENTER }),
makeCell("Stem cell | Mitotic divisions in basal compartment of seminiferous tubule", { shade: LLBLUE }),
]}),
new TableRow({ children: [
makeCell("↓ Mitosis ↓", { shade: LTBLUE, bold: true, textColor: TEAL, align: AlignmentType.CENTER }),
makeCell("", { shade: WHITE }),
]}),
new TableRow({ children: [
makeCell("PRIMARY SPERMATOCYTE (2n)", { shade: LBLUE, bold: true, textColor: WHITE, align: AlignmentType.CENTER }),
makeCell("Largest cell; enters Meiosis I; arrested in prophase I for days", { shade: LLBLUE }),
]}),
new TableRow({ children: [
makeCell("↓ Meiosis I ↓", { shade: LTBLUE, bold: true, textColor: TEAL, align: AlignmentType.CENTER }),
makeCell("Reductional division: chromosome number halved", { shade: WHITE }),
]}),
new TableRow({ children: [
makeCell("SECONDARY SPERMATOCYTE (n)", { shade: TEAL, bold: true, textColor: WHITE, align: AlignmentType.CENTER }),
makeCell("Haploid; short-lived; quickly enters Meiosis II", { shade: LLBLUE }),
]}),
new TableRow({ children: [
makeCell("↓ Meiosis II ↓", { shade: LTBLUE, bold: true, textColor: TEAL, align: AlignmentType.CENTER }),
makeCell("Equational division: sister chromatids separated", { shade: WHITE }),
]}),
new TableRow({ children: [
makeCell("SPERMATID (n)", { shade: GREEN, bold: true, textColor: WHITE, align: AlignmentType.CENTER }),
makeCell("Round cell; haploid; no further division", { shade: LGREEN }),
]}),
new TableRow({ children: [
makeCell("↓ Spermiogenesis ↓", { shade: LGREEN, bold: true, textColor: GREEN, align: AlignmentType.CENTER }),
makeCell("Morphological transformation: acrosome, flagellum, loss of cytoplasm", { shade: WHITE }),
]}),
new TableRow({ children: [
makeCell("MATURE SPERMATOZOON (n)", { shade: PINK, bold: true, textColor: WHITE, align: AlignmentType.CENTER }),
makeCell("Head + midpiece + tail; 64 sperm from each spermatogonium", { shade: LORANGE }),
]}),
],
width: { size: 100, type: WidthType.PERCENTAGE },
});
children.push(spermFlow);
// Testosterone table
children.push(heading2("D. Testosterone — Actions"), para(""));
children.push(simpleTable(
["Action mediated by TESTOSTERONE", "Action mediated by DHT (5α-reductase)"],
[
["Differentiation: epididymis, vas deferens, seminal vesicles", "Differentiation: penis, scrotum, prostate"],
["Increased muscle mass", "Male hair pattern (beard, chest)"],
["Pubertal growth spurt", "Male pattern baldness"],
["Epiphyseal closure", "Sebaceous gland activity"],
["Deepening of voice", "Growth of prostate"],
["Spermatogenesis", ""],
["Negative feedback on pituitary", ""],
["Libido", ""],
],
[50, 50]
));
// Sperm pathway diagram
children.push(heading2("E. Sperm Pathway (ASCII Flowchart)"), para(""));
const spermPath = new Table({
rows: [
["TESTES (Seminiferous tubules)"],
["↓"],
["RETE TESTIS"],
["↓"],
["EFFERENT DUCTULES"],
["↓"],
["EPIDIDYMIS → Maturation + Storage (viable months)"],
["↓"],
["VAS DEFERENS → smooth muscle contractions at ejaculation"],
["↓"],
["EJACULATORY DUCT (joins seminal vesicle duct)"],
["↓"],
["URETHRA (+ prostate secretions added)"],
["↓"],
["EJACULATE: Seminal vesicles 60% + Prostate 30% + Sperm 10%"],
].map(([t], i) => new TableRow({ children: [
makeCell(t, {
shade: i % 2 === 0 ? LLBLUE : WHITE,
bold: !t.includes("↓"),
textColor: t.includes("↓") ? LBLUE : TEAL,
align: AlignmentType.CENTER,
}),
]})),
width: { size: 80, type: WidthType.PERCENTAGE },
});
children.push(spermPath, para(""), pageBreak());
// ══════════════════════════════════════════════════════════════════════
// SECTION 3 — FEMALE REPRODUCTIVE PHYSIOLOGY
// ══════════════════════════════════════════════════════════════════════
children.push(heading1("3. FEMALE REPRODUCTIVE PHYSIOLOGY"));
// Oogenesis flowchart
children.push(heading2("A. Oogenesis Flowchart"), para(""));
const oogenesisFlow = new Table({
rows: [
["Gestational weeks 4-6:\nPrimordial germ cells migrate to gonadal ridge → OOGONIA (2n) — multiply by MITOSIS"],
["Gestational weeks 8-9:\nOogonia → PRIMARY OOCYTES — enter Meiosis I — ARRESTED in Prophase I ← key exam point"],
["Gestational weeks 20-24:\nPeak 7 MILLION oogonia/oocytes"],
["AT BIRTH:\n~2 million oocytes remain (atresia begins)"],
["AT PUBERTY:\n~400,000 oocytes remain"],
["EACH CYCLE (after puberty):\nFSH recruits 6-12 follicles → dominant follicle selected → meiosis I RESUMES"],
["JUST BEFORE OVULATION:\nMeiosis I COMPLETED → Secondary oocyte (n) + First polar body\nSecondary oocyte ARRESTED at Metaphase II"],
["AT FERTILIZATION (only if sperm penetrates):\nMeiosis II COMPLETED → Mature ovum (n) + Second polar body"],
["AT MENOPAUSE:\nFew/no oocytes remain"],
].map(([t], i) => new TableRow({ children: [
makeCell(t, {
shade: [BLUE, LBLUE, LTBLUE, LLBLUE, LGREEN, LYELLOW, LORANGE, LGREEN, LGREY][i] || WHITE,
bold: false,
textColor: i < 2 ? WHITE : BLACK,
align: AlignmentType.LEFT,
}),
]})),
width: { size: 100, type: WidthType.PERCENTAGE },
});
children.push(oogenesisFlow);
// Key numbers
children.push(heading3("Key Numbers — Oogenesis"), simpleTable(
["Timepoint", "Number of Oocytes"],
[
["Peak (Gestational weeks 20-24)", "~7 million"],
["Birth", "~2 million"],
["Puberty", "~400,000"],
["Each month ovulated", "1 (usually)"],
["Menopause", "~0"],
],
[60, 40]
));
// Follicle Development
children.push(heading2("B. Follicular Development Stages"), para(""));
children.push(new Table({
rows: [
new TableRow({ children: [
makeCell("Stage", { shade: BLUE, bold: true, textColor: WHITE, align: AlignmentType.CENTER, w: 25 }),
makeCell("Structure", { shade: BLUE, bold: true, textColor: WHITE, align: AlignmentType.CENTER, w: 40 }),
makeCell("Stimulus", { shade: BLUE, bold: true, textColor: WHITE, align: AlignmentType.CENTER, w: 35 }),
]}),
new TableRow({ children: [
makeCell("Primordial follicle", { shade: LLBLUE, bold: true, w: 25 }),
makeCell("Oocyte + single flat granulosa cell layer", { w: 40 }),
makeCell("None (quiescent)", { w: 35 }),
]}),
new TableRow({ children: [
makeCell("Primary follicle", { shade: LGREEN, bold: true, w: 25 }),
makeCell("Oocyte + cuboidal granulosa (multi-layer)", { w: 40 }),
makeCell("FSH (early)", { w: 35 }),
]}),
new TableRow({ children: [
makeCell("Secondary follicle", { shade: LYELLOW, bold: true, w: 25 }),
makeCell("+ Theca interna + Theca externa form", { w: 40 }),
makeCell("FSH + local estrogen", { w: 35 }),
]}),
new TableRow({ children: [
makeCell("Antral (Graafian) follicle", { shade: LORANGE, bold: true, w: 25 }),
makeCell("Antrum filled with estrogen-rich fluid\nZona pellucida visible", { w: 40 }),
makeCell("FSH + LH (both needed)", { w: 35 }),
]}),
new TableRow({ children: [
makeCell("Dominant follicle", { shade: PINK, bold: true, textColor: WHITE, w: 25 }),
makeCell("One selected ~Day 6; others → atresia", { w: 40 }),
makeCell("Estrogen positive feedback on self (more FSH receptors)", { w: 35 }),
]}),
],
width: { size: 100, type: WidthType.PERCENTAGE },
}));
// Two-cell two-gonadotropin
children.push(
heading2("C. Two-Cell, Two-Gonadotropin Theory"),
para(""),
new Table({
rows: [
new TableRow({ children: [
makeCell("THECA INTERNA CELL\n(stimulated by LH)", { shade: LBLUE, bold: true, textColor: WHITE, align: AlignmentType.CENTER }),
makeCell("", { shade: WHITE, align: AlignmentType.CENTER }),
makeCell("GRANULOSA CELL\n(stimulated by FSH)", { shade: GREEN, bold: true, textColor: WHITE, align: AlignmentType.CENTER }),
]}),
new TableRow({ children: [
makeCell("Produces ANDROGENS\n(androstenedione, testosterone)", { shade: LLBLUE, align: AlignmentType.CENTER }),
makeCell("→ Diffuse across basement membrane →", { shade: LGREY, align: AlignmentType.CENTER, bold: true, textColor: LBLUE }),
makeCell("AROMATASE converts\nAndrogens → ESTROGENS", { shade: LGREEN, align: AlignmentType.CENTER }),
]}),
new TableRow({ children: [
makeCell("", { shade: WHITE }),
makeCell("→ ESTRADIOL (E2) released into circulation", { shade: LYELLOW, align: AlignmentType.CENTER, bold: true, textColor: PINK }),
makeCell("", { shade: WHITE }),
]}),
],
width: { size: 100, type: WidthType.PERCENTAGE },
}),
para(""),
pageBreak()
);
// ══════════════════════════════════════════════════════════════════════
// SECTION 4 — MENSTRUAL CYCLE
// ══════════════════════════════════════════════════════════════════════
children.push(heading1("4. THE MENSTRUAL CYCLE — FLOWCHART"));
children.push(para("Average: 28 days | Day 1 = First day of menstrual bleeding", { bold: true }));
children.push(para(""));
// Menstrual cycle as a large flowchart-table
const mcRows = [
// Headers
null,
// Menstrual phase
["DAYS 1–5\nMENSTRUAL PHASE", "Uterine endometrium sheds\n→ Menstrual bleeding\nSpiral arteries vasospasm → ischemia → necrosis", "FSH ↑ slightly (rising)\nEstrogen LOW\nProgesterone LOW", PINK, WHITE],
["↓", "", "", LGREY, DARKGREY],
["DAYS 1–14\nFOLLICULAR PHASE\n(PROLIFERATIVE)", "Dominant follicle grows\nGranulosa cells produce estradiol\nEndometrium proliferates\nCervical mucus: watery, elastic, FERNING (+)", "FSH → ↓ as E2 rises\nLH low\nE2 → rising peak", LBLUE, WHITE],
["↓", "", "", LGREY, DARKGREY],
["DAY ~12-13\nPRE-OVULATORY", "E2 > 200 pg/mL sustained >50 hrs\n→ POSITIVE FEEDBACK\n→ Anterior pituitary: massive LH SURGE", "LH SURGE ← critical\nFSH mid-cycle surge (progesterone effect)\nE2 peaks just before ovulation", TEAL, WHITE],
["↓", "", "", LGREY, DARKGREY],
["DAY 14\nOVULATION", "Dominant follicle ruptures\nOocyte released into peritoneal cavity\nPicked up by fimbriae of fallopian tube\nMittelschmerz (fleeting pelvic pain)", "LH surge → ~36 hrs → OVULATION\nFollicle wall enzymes (collagenase)\n+ Prostaglandins → rupture", BLUE, WHITE],
["↓", "", "", LGREY, DARKGREY],
["DAYS 14–28\nLUTEAL PHASE\n(SECRETORY)", "Corpus luteum forms from ruptured follicle\nSecrets progesterone + estrogen\nEndometrium: tortuous glands, glycogen, edema\nCervical mucus: thick, non-elastic, NO FERNING\nBBT rises ~0.5°C", "Progesterone HIGH\nEstrogen moderate\nFSH + LH LOW (neg. feedback)", LGREEN, BLACK],
["↓", "", "", LGREY, DARKGREY],
["DAY 28 — NO PREGNANCY", "Corpus luteum degenerates → Corpus albicans\n↓ Estrogen + Progesterone → Withdrawal bleeding\n→ NEW CYCLE BEGINS", "All hormones fall\nFSH starts rising → next cycle", LORANGE, BLACK],
["↓ PREGNANCY", "hCG from trophoblast (LH-like)\n→ Rescues corpus luteum\n→ Continues progesterone until placenta takes over (~10 wks)", "hCG detectable from day ~8-10 post-fertilization\nBasis of pregnancy tests", LYELLOW, BLACK],
];
const mcTable = new Table({
rows: mcRows.slice(1).map(([phase, endo, hormones, shade, tc]) => {
if (phase === "↓") {
return new TableRow({ children: [
makeCell("↓", { shade: LGREY, bold: true, textColor: LBLUE, align: AlignmentType.CENTER }),
makeCell("", { shade: WHITE }),
makeCell("", { shade: WHITE }),
]});
}
return new TableRow({ children: [
makeCell(phase, { shade, bold: true, textColor: tc, align: AlignmentType.CENTER, w: 20 }),
makeCell(endo, { shade: WHITE, textColor: BLACK, w: 50 }),
makeCell(hormones, { shade: LGREY, textColor: DARKGREY, w: 30 }),
]});
}),
width: { size: 100, type: WidthType.PERCENTAGE },
});
children.push(mcTable);
// Hormone level summary
children.push(heading2("Hormone Levels at a Glance"), para(""), simpleTable(
["Phase", "FSH", "LH", "Estrogen", "Progesterone"],
[
["Menstrual (D1-5)", "↑ Rising", "Low", "Low", "Low"],
["Follicular (D5-14)", "↑ then ↓", "Low", "Rising", "Low"],
["Ovulation (D14)", "Mid-surge", "⚡ SURGE", "Peak (just before)", "Low"],
["Luteal (D14-28)", "Low", "Low", "Moderate", "HIGH ↑"],
["If pregnant", "Suppressed", "Suppressed", "Rising", "HIGH (CL + placenta)"],
],
[22, 15, 15, 25, 23]
));
children.push(para(""), pageBreak());
// ══════════════════════════════════════════════════════════════════════
// SECTION 5 — CERVICAL MUCUS & ENDOMETRIUM
// ══════════════════════════════════════════════════════════════════════
children.push(heading1("5. CERVICAL MUCUS & ENDOMETRIAL CHANGES"));
children.push(simpleTable(
["Feature", "FOLLICULAR (Estrogen dominant)", "LUTEAL (Progesterone dominant)"],
[
["Cervical mucus", "Copious, watery, elastic", "Scant, thick, non-elastic"],
["Ferning pattern", "PRESENT (spinn-barkheit, sperm-friendly)", "ABSENT (sperm-hostile)"],
["Endometrium", "Proliferates (glands + stroma grow)", "Secretory (glands tortuous, glycogen, edema)"],
["Spiral arteries", "Elongate", "Coil + elongate further"],
["BBT", "Lower (pre-ovulatory baseline)", "Rises ~0.5°C (thermogenic effect of P4)"],
["Sperm penetration", "Easy (channels in mucus)", "Blocked"],
],
[25, 37, 38]
));
children.push(heading2("Endometrial Phases in Detail"), para(""));
children.push(new Table({
rows: [
new TableRow({ children: [
makeCell("Phase", { shade: BLUE, bold: true, textColor: WHITE, align: AlignmentType.CENTER, w: 20 }),
makeCell("Days", { shade: BLUE, bold: true, textColor: WHITE, align: AlignmentType.CENTER, w: 10 }),
makeCell("Hormone", { shade: BLUE, bold: true, textColor: WHITE, align: AlignmentType.CENTER, w: 15 }),
makeCell("Histological Changes", { shade: BLUE, bold: true, textColor: WHITE, align: AlignmentType.CENTER, w: 55 }),
]}),
new TableRow({ children: [
makeCell("Menstrual", { shade: LORANGE, w: 20 }), makeCell("1–5", { shade: LORANGE, w: 10 }), makeCell("Low E + P", { shade: LORANGE, w: 15 }),
makeCell("Functional layer shed; spiral arteries vasospasm; prostaglandin-induced ischemia", { w: 55 }),
]}),
new TableRow({ children: [
makeCell("Proliferative", { shade: LGREEN, w: 20 }), makeCell("5–14", { shade: LGREEN, w: 10 }), makeCell("Estrogen ↑", { shade: LGREEN, w: 15 }),
makeCell("Straight tubular glands; mitoses in stroma; compact; stromal edema absent", { w: 55 }),
]}),
new TableRow({ children: [
makeCell("Early Secretory", { shade: LYELLOW, w: 20 }), makeCell("14–21", { shade: LYELLOW, w: 10 }), makeCell("Progesterone ↑", { shade: LYELLOW, w: 15 }),
makeCell("Subnuclear vacuoles in glands (glycogen below nucleus) ← EARLIEST secretory change", { w: 55 }),
]}),
new TableRow({ children: [
makeCell("Late Secretory", { shade: LLBLUE, w: 20 }), makeCell("21–28", { shade: LLBLUE, w: 10 }), makeCell("P4 + E2", { shade: LLBLUE, w: 15 }),
makeCell("Glands tortuous + serrated ('saw-tooth'); stromal edema; decidualization; coiled arteries", { w: 55 }),
]}),
],
width: { size: 100, type: WidthType.PERCENTAGE },
}));
children.push(para(""), pageBreak());
// ══════════════════════════════════════════════════════════════════════
// SECTION 6 — FERTILIZATION & IMPLANTATION
// ══════════════════════════════════════════════════════════════════════
children.push(heading1("6. FERTILIZATION & IMPLANTATION FLOWCHART"), para(""));
const fertFlow = new Table({
rows: [
["OVULATION → Oocyte released into peritoneal cavity\n(Still in Metaphase II — meiosis not yet complete)", BLUE, WHITE],
["↓ Fimbriae pick up oocyte → Transport in fallopian tube", LGREY, DARKGREY],
["CAPACITATION OF SPERM in female tract\n(Removal of cholesterol from sperm membrane → hypermotility, hyperactivation)", LBLUE, WHITE],
["↓ 50-100 sperm reach the ampulla", LGREY, DARKGREY],
["SPERM CONTACT: Zona Pellucida binding via ZP3 receptor", LTBLUE, TEAL],
["↓", LGREY, DARKGREY],
["ACROSOMAL REACTION: Acrosome releases enzymes (acrosin - trypsin-like)\n→ Zona penetration", LYELLOW, BLACK],
["↓", LGREY, DARKGREY],
["SPERM-EGG FUSION via FERTILIN protein on sperm head\n→ Sperm nucleus enters oocyte cytoplasm", LGREEN, BLACK],
["↓", LGREY, DARKGREY],
["PREVENTION OF POLYSPERMY:\n1. Fast block: Rapid change in oocyte membrane potential\n2. Slow block: Cortical reaction → Zona hardening", LORANGE, BLACK],
["↓", LGREY, DARKGREY],
["MEIOSIS II COMPLETED: Secondary oocyte → Mature ovum + 2nd polar body\nZygote (2n) formed", LGREEN, BLACK],
["↓ Cleavage divisions begin", LGREY, DARKGREY],
["Day 1-3: Zygote → 2-cell → 4-cell → 8-cell → Morula", LLBLUE, TEAL],
["↓ Travels down fallopian tube (~3 days)", LGREY, DARKGREY],
["Day 4-5: BLASTOCYST forms (inner cell mass + trophoblast)", LTBLUE, TEAL],
["↓ Enters uterine cavity", LGREY, DARKGREY],
["Day 6-7: IMPLANTATION in posterior wall of uterine body\n(Trophoblast cells invade decidualized endometrium)", BLUE, WHITE],
["↓", LGREY, DARKGREY],
["TROPHOBLAST secretes hCG → Rescues corpus luteum → Continued progesterone\n→ PREGNANCY MAINTAINED", PINK, WHITE],
].map(([t, shade, tc]) => new TableRow({ children: [
makeCell(t, { shade, textColor: tc, align: t === "↓" ? AlignmentType.CENTER : AlignmentType.LEFT, bold: !t.startsWith("↓") && !t.startsWith("Day") }),
]})),
width: { size: 100, type: WidthType.PERCENTAGE },
});
children.push(fertFlow);
children.push(para(""), pageBreak());
// ══════════════════════════════════════════════════════════════════════
// SECTION 7 — ESTROGEN & PROGESTERONE ACTIONS
// ══════════════════════════════════════════════════════════════════════
children.push(heading1("7. ESTROGEN & PROGESTERONE — ACTIONS DIAGRAM"));
children.push(new Table({
rows: [
new TableRow({ children: [
makeCell("TARGET ORGAN", { shade: BLUE, bold: true, textColor: WHITE, align: AlignmentType.CENTER, w: 20 }),
makeCell("ESTROGEN (E2) ACTION", { shade: LBLUE, bold: true, textColor: WHITE, align: AlignmentType.CENTER, w: 40 }),
makeCell("PROGESTERONE (P4) ACTION", { shade: GREEN, bold: true, textColor: WHITE, align: AlignmentType.CENTER, w: 40 }),
]}),
...([
["Uterus", "Endometrial proliferation\nGrowth of glands + stroma\nSpiral artery elongation", "Secretory transformation\nGlycogens in glands\nRaised threshold for contractions (maintain pregnancy)"],
["Cervix", "Watery, elastic, copious mucus\nFerning (+) — sperm-friendly", "Thick, scant, non-elastic mucus\nFerning (−) — sperm-hostile"],
["Breast", "Ductal growth\nAreolar pigmentation\nFat deposition (female shape)", "Alveolar development\nSecretory activity in ducts"],
["Bone", "Pubertal growth spurt\nEpiphyseal closure at end of puberty", "Minimal direct effect"],
["Pituitary", "Negative feedback (usually)\nPositive feedback at mid-cycle surge\nStimulates prolactin secretion", "Negative feedback\nResponsible for FSH mid-cycle surge"],
["Fat distribution", "Subcutaneous fat (hips, thighs)", "Mild thermogenic effect (↑BBT 0.5°C)"],
["External genitalia", "Enlargement", "—"],
["Vagina", "Cornification of epithelium", "Decreased cornification"],
].map(([org, e, p], i) => new TableRow({ children: [
makeCell(org, { shade: i % 2 === 0 ? LLBLUE : WHITE, bold: true, w: 20 }),
makeCell(e, { shade: i % 2 === 0 ? LGREY : WHITE, w: 40 }),
makeCell(p, { shade: i % 2 === 0 ? LGREEN : WHITE, w: 40 }),
]}))),
],
width: { size: 100, type: WidthType.PERCENTAGE },
}));
children.push(para(""), pageBreak());
// ══════════════════════════════════════════════════════════════════════
// SECTION 8 — PUBERTY
// ══════════════════════════════════════════════════════════════════════
children.push(heading1("8. PUBERTY — SEQUENCE FLOWCHART"));
children.push(heading2("Female Puberty (mnemonic: THELARCHE first)"), para(""));
const femalePuberty = new Table({
rows: [
["1. THELARCHE (Breast bud)", "First sign of puberty in girls\nAverage age: 8-13 years\nEstrogen-driven", LLBLUE],
["2. PUBARCHE", "Pubic and axillary hair growth\nAdrenal androgens (adrenarche)", LGREEN],
["3. PEAK GROWTH SPURT", "Estrogen + GH → rapid height gain", LYELLOW],
["4. MENARCHE", "First menstrual period\nAverage age: 12-13 years (range 10-16)\nInitially anovulatory cycles common", LORANGE],
["5. ADULT BODY COMPOSITION", "Final fat distribution, bone density\nEpiphyseal closure", LGREY],
].map(([step, detail, shade]) => new TableRow({ children: [
makeCell(step, { shade: LBLUE, bold: true, textColor: WHITE, align: AlignmentType.CENTER, w: 30 }),
makeCell(detail, { shade, w: 70 }),
]})),
width: { size: 100, type: WidthType.PERCENTAGE },
});
children.push(femalePuberty);
children.push(heading2("Male Puberty"), para(""));
const malePuberty = new Table({
rows: [
["1. TESTICULAR ENLARGEMENT", "First sign in boys\nAverage age: 9-14 years\nLH → Leydig cells → testosterone", LLBLUE],
["2. PUBARCHE + SCROTAL PIGMENTATION", "Androgens → pubic, axillary, facial hair", LGREEN],
["3. PENILE GROWTH + VOICE CHANGE", "Testosterone → laryngeal enlargement → deepening", LYELLOW],
["4. PEAK GROWTH SPURT", "Later than females; taller final height", LORANGE],
["5. SPERMARCHE", "First ejaculation with sperm\nMay have nocturnal emissions", LGREY],
].map(([step, detail, shade]) => new TableRow({ children: [
makeCell(step, { shade: TEAL, bold: true, textColor: WHITE, align: AlignmentType.CENTER, w: 30 }),
makeCell(detail, { shade, w: 70 }),
]})),
width: { size: 100, type: WidthType.PERCENTAGE },
});
children.push(malePuberty, para(""), pageBreak());
// ══════════════════════════════════════════════════════════════════════
// SECTION 9 — HIGH-YIELD QUICK REVISION
// ══════════════════════════════════════════════════════════════════════
children.push(heading1("9. HIGH-YIELD EXAM SUMMARY"));
children.push(heading2("Key Numbers Table"), simpleTable(
["Fact", "Value"],
[
["Duration of spermatogenesis", "64 days"],
["Sperm produced daily", "~128 million"],
["Peak oogonia (gestational wks 20-24)", "~7 million"],
["Oocytes at birth", "~2 million"],
["Oocytes at puberty", "~400,000"],
["Average menstrual cycle", "28 days"],
["Ovulation after LH surge", "~36 hours"],
["Fertilization → implantation", "~6-7 days"],
["Fallopian tube transit time", "~3 days"],
["BBT rise at ovulation", "~0.5°C"],
["Testicular temperature", "35-36°C (1-2°C below body)"],
["hCG detectable (post-fertilization)", "~Day 8-10"],
["Placenta takes over from CL", "~10 weeks gestation"],
],
[70, 30]
));
children.push(heading2("Cells and Hormones — Quick Reference"), simpleTable(
["Cell", "Hormone Produced", "Regulated By"],
[
["Leydig cells (testis)", "Testosterone", "LH"],
["Sertoli cells (testis)", "Inhibin, ABP, fluid", "FSH"],
["Theca interna (ovary)", "Androgens → aromatized to estrogen", "LH"],
["Granulosa cells (ovary)", "Estrogen (via aromatase), Inhibin", "FSH"],
["Corpus luteum", "Progesterone + Estrogen", "LH (then hCG)"],
["Trophoblast (early pregnancy)", "hCG", "—"],
["Placenta (mid-late pregnancy)", "Progesterone + Estrogen", "—"],
],
));
children.push(heading2("Top 12 Exam Points"), para(""));
const examPoints = [
"Blood-testis barrier = tight junctions between SERTOLI cells (not Leydig cells)",
"FSH → Sertoli cells (spermatogenesis) | LH → Leydig cells (testosterone) — memorize this",
"Female meiosis arrested in PROPHASE I from fetal life until ovulation — completed at fertilization",
"FERNING of cervical mucus = follicular/estrogenic phase; NO ferning = luteal/progestogenic phase",
"MITTELSCHMERZ = mid-cycle pain at ovulation (minor blood irritating peritoneum)",
"POSITIVE feedback: High sustained estrogen → LH surge → Ovulation (unique exception to negative feedback)",
"hCG = 'pregnancy hormone'; same α-subunit as LH/FSH/TSH; rescues corpus luteum in early pregnancy",
"INHIBIN selectively suppresses FSH (not LH) — from Sertoli cells and granulosa cells",
"Testosterone → muscle/voice/libido; DHT (5α-reduced) → prostate/hair/genitalia",
"GnRH must be PULSATILE — continuous GnRH = receptor downregulation = no gonadotropins (used for endometriosis, prostate CA)",
"Corpus luteum → progesterone dominance; if no pregnancy → luteolysis → withdrawal bleeding",
"Subnuclear vacuoles in endometrial glands = EARLIEST histological sign of secretory (post-ovulatory) phase",
];
examPoints.forEach((pt, i) =>
children.push(new Paragraph({
children: [
new TextRun({ text: `${i+1}. `, bold: true, color: PINK, size: 22 }),
new TextRun({ text: pt, size: 22, color: BLACK }),
],
spacing: { before: 80, after: 60 },
shading: { type: ShadingType.SOLID, color: i % 2 === 0 ? LGREY : WHITE },
}))
);
// Footer note
children.push(para(""), divider(), new Paragraph({
children: [new TextRun({ text: "Notes compiled from: Costanzo Physiology 7e | Ganong's Review of Medical Physiology 26e | Guyton & Hall Textbook of Medical Physiology | Berek & Novak's Gynecology", italics: true, size: 18, color: DARKGREY })],
alignment: AlignmentType.CENTER,
spacing: { before: 100, after: 40 },
}));
// ─── BUILD DOC ────────────────────────────────────────────────────────
const doc = new Document({
styles: {
default: {
document: {
run: { font: "Calibri", size: 22 },
},
},
paragraphStyles: [
{
id: "Heading1",
name: "Heading 1",
basedOn: "Normal",
run: { bold: true, size: 32, color: WHITE, font: "Calibri" },
paragraph: { spacing: { before: 360, after: 120 }, shading: { type: ShadingType.SOLID, color: BLUE } },
},
{
id: "Heading2",
name: "Heading 2",
basedOn: "Normal",
run: { bold: true, size: 26, color: TEAL, font: "Calibri" },
paragraph: { spacing: { before: 240, after: 80 }, border: { bottom: { style: BorderStyle.SINGLE, color: LTBLUE, size: 4 } } },
},
{
id: "Heading3",
name: "Heading 3",
basedOn: "Normal",
run: { bold: true, size: 22, color: LBLUE, font: "Calibri" },
paragraph: { spacing: { before: 160, after: 60 } },
},
],
},
sections: [{
properties: {
page: {
margin: {
top: convertInchesToTwip(0.8),
right: convertInchesToTwip(0.8),
bottom: convertInchesToTwip(0.8),
left: convertInchesToTwip(0.8),
},
},
},
headers: {
default: new Header({
children: [new Paragraph({
children: [
new TextRun({ text: "REPRODUCTIVE PHYSIOLOGY — MBBS 1st Year Notes", bold: true, color: WHITE, size: 18 }),
new TextRun({ text: " Page ", size: 18, color: WHITE }),
new PageNumber({ type: "current", color: WHITE }),
],
shading: { type: ShadingType.SOLID, color: BLUE },
spacing: { before: 80, after: 80 },
})],
}),
},
children,
}],
});
Packer.toBuffer(doc).then(buf => {
fs.writeFileSync("/home/daytona/workspace/repro-physiology/Reproductive_Physiology_Notes.docx", buf);
console.log("Done: Reproductive_Physiology_Notes.docx");
}).catch(e => { console.error(e); process.exit(1); });
cd /home/daytona/workspace/repro-physiology && node build.js 2>&1
~/repro-physiology/build.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/repro-physiology/build.js'
cd /home/daytona/workspace/repro-physiology && node build.js 2>&1
~/repro-physiology/build.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/repro-physiology/build.js'
~/repro-physiology/build.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/repro-physiology/build.js'
cd /home/daytona/workspace/repro-physiology && node build.js 2>&1
python /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/worksp…
cd /home/daytona/workspace/repro-physiology && python -c "import zipfile; z=zipf…
Reproductive Physiology Notes
Word Document · DOCX
| Section | Content |
|---|---|
| Title Page | Styled cover with source references |
| 1. HPG Axis | Full flowchart table (Hypothalamus → Pituitary → Gonads → Feedback), key hormones table, positive vs. negative feedback |
| 2. Male Physiology | Testicular structure, Sertoli cell functions (4-row diagram), Spermatogenesis flowchart (Spermatogonium → Spermatozoon step-by-step), Testosterone actions table (T vs. DHT), Sperm pathway diagram |
| 3. Female Physiology | Oogenesis flowchart (fetal to menopause), follicle development stages diagram, Two-cell Two-gonadotropin theory diagram |
| 4. Menstrual Cycle | Full 28-day cycle flowchart (all 5 phases with hormones + endometrial changes), hormone levels table |
| 5. Cervical Mucus & Endometrium | Ferning vs. no ferning comparison, endometrial phases histology table |
| 6. Fertilization & Implantation | Step-by-step flowchart (capacitation → acrosomal reaction → polyspermy block → implantation → hCG) |
| 7. Estrogen & Progesterone | Side-by-side actions table (8 organ systems) |
| 8. Puberty | Separate flowcharts for female and male puberty sequences |
| 9. High-Yield Summary | Key numbers table, cells & hormones quick-ref, Top 12 exam points highlighted |