Can you create Endocrine physiology flash cards for first year medial student
mkdir -p /home/daytona/workspace/endocrine-flashcards && ls /home/daytona/worksp…
~/endocrine-flashcards/build.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Endocrine Physiology Flashcards";
pres.author = "Orris Medical";
// ─── PALETTE ───────────────────────────────────────────────────────────────
const DARK_BG = "0D1B2A"; // deep navy
const ACCENT = "00B4D8"; // bright cyan
const LIGHT_BG = "E8F4F8"; // pale blue for answer side
const WHITE = "FFFFFF";
const GOLD = "F4A261"; // warm orange for highlight
const GRAY_TEXT = "5C677D";
const DARK_TEXT = "0D1B2A";
// ─── SECTION COLOURS ───────────────────────────────────────────────────────
const sections = {
"Hypothalamus": { bg: "1A2E4A", accent: "48CAE4" },
"Pituitary": { bg: "1B3A4B", accent: "90E0EF" },
"Thyroid": { bg: "144A3C", accent: "52B788" },
"Adrenal Cortex": { bg: "3D1A1A", accent: "E63946" },
"Adrenal Medulla":{ bg: "3B1C32", accent: "C77DFF" },
"Pancreas": { bg: "1A3A1F", accent: "95D5B2" },
"Gonads": { bg: "2B2D42", accent: "EF233C" },
};
// ─── HELPERS ───────────────────────────────────────────────────────────────
function addTitleSlide(pres) {
const slide = pres.addSlide();
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: DARK_BG } });
// Cyan stripe
slide.addShape(pres.ShapeType.rect, { x: 0, y: 2.3, w: 10, h: 0.08, fill: { color: ACCENT } });
slide.addText("ENDOCRINE PHYSIOLOGY", {
x: 0.5, y: 1.1, w: 9, h: 0.8,
fontSize: 36, bold: true, color: WHITE, align: "center",
fontFace: "Arial", charSpacing: 4,
});
slide.addText("Flashcard Deck for Year 1 Medical Students", {
x: 0.5, y: 2.1, w: 9, h: 0.5,
fontSize: 16, color: ACCENT, align: "center", fontFace: "Arial",
});
slide.addText("Topics: Hypothalamus · Pituitary · Thyroid · Adrenal · Pancreas · Gonads", {
x: 0.5, y: 2.6, w: 9, h: 0.6,
fontSize: 12, color: "8ECAE6", align: "center", fontFace: "Arial", italic: true,
});
slide.addText("Source: Physiology, Costanzo (6th ed.)", {
x: 0.5, y: 5.1, w: 9, h: 0.35,
fontSize: 10, color: "556677", align: "center", fontFace: "Arial",
});
}
function addSectionDivider(pres, title, num, sectionColors) {
const sc = sectionColors;
const slide = pres.addSlide();
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: sc.bg } });
slide.addShape(pres.ShapeType.rect, { x: 0, y: 2.5, w: 10, h: 0.1, fill: { color: sc.accent } });
slide.addText(`SECTION ${num}`, {
x: 0.5, y: 1.5, w: 9, h: 0.5,
fontSize: 13, color: sc.accent, align: "center", charSpacing: 6, bold: true, fontFace: "Arial",
});
slide.addText(title, {
x: 0.5, y: 2.1, w: 9, h: 0.8,
fontSize: 40, bold: true, color: WHITE, align: "center", fontFace: "Arial",
});
}
// Q side: dark, A side: light
function addFlashcard(pres, q, answer, tag, sectionColors) {
const sc = sectionColors;
// ── QUESTION SLIDE ──────────────────────────────────────────────────────
const qSlide = pres.addSlide();
qSlide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: sc.bg } });
// top bar
qSlide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.55, fill: { color: sc.accent } });
qSlide.addText(tag, {
x: 0.2, y: 0, w: 7, h: 0.55,
fontSize: 11, bold: true, color: DARK_BG, align: "left", fontFace: "Arial", valign: "middle", margin: 0,
});
qSlide.addText("QUESTION", {
x: 7.2, y: 0, w: 2.6, h: 0.55,
fontSize: 10, color: DARK_BG, align: "right", fontFace: "Arial", valign: "middle", margin: 0,
});
// Q icon
qSlide.addShape(pres.ShapeType.ellipse, {
x: 0.35, y: 1.3, w: 0.55, h: 0.55, fill: { color: sc.accent }, line: { color: sc.accent },
});
qSlide.addText("Q", {
x: 0.35, y: 1.3, w: 0.55, h: 0.55,
fontSize: 16, bold: true, color: sc.bg, align: "center", valign: "middle", fontFace: "Arial", margin: 0,
});
qSlide.addText(q, {
x: 1.05, y: 1.1, w: 8.6, h: 3.5,
fontSize: 22, color: WHITE, fontFace: "Arial", valign: "middle",
wrap: true,
});
// ── ANSWER SLIDE ─────────────────────────────────────────────────────────
const aSlide = pres.addSlide();
aSlide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: LIGHT_BG } });
// top bar
aSlide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.55, fill: { color: sc.accent } });
aSlide.addText(tag, {
x: 0.2, y: 0, w: 7, h: 0.55,
fontSize: 11, bold: true, color: DARK_BG, align: "left", fontFace: "Arial", valign: "middle", margin: 0,
});
aSlide.addText("ANSWER", {
x: 7.2, y: 0, w: 2.6, h: 0.55,
fontSize: 10, color: DARK_BG, align: "right", fontFace: "Arial", valign: "middle", margin: 0,
});
// question echo (smaller)
aSlide.addText(q, {
x: 0.4, y: 0.65, w: 9.2, h: 0.7,
fontSize: 11, color: GRAY_TEXT, fontFace: "Arial", italic: true, wrap: true,
});
// divider
aSlide.addShape(pres.ShapeType.line, {
x: 0.4, y: 1.35, w: 9.2, h: 0,
line: { color: sc.accent, width: 1.5 },
});
// A icon
aSlide.addShape(pres.ShapeType.ellipse, {
x: 0.35, y: 1.5, w: 0.5, h: 0.5, fill: { color: sc.accent }, line: { color: sc.accent },
});
aSlide.addText("A", {
x: 0.35, y: 1.5, w: 0.5, h: 0.5,
fontSize: 14, bold: true, color: WHITE, align: "center", valign: "middle", fontFace: "Arial", margin: 0,
});
// Parse answer into bullet lines
const lines = answer.split("\n").filter(l => l.trim());
const richLines = lines.map((l, i) => ({
text: l.trim(),
options: { bullet: lines.length > 1, breakLine: i < lines.length - 1, color: DARK_TEXT },
}));
aSlide.addText(richLines, {
x: 1.0, y: 1.45, w: 8.6, h: 3.7,
fontSize: 16, fontFace: "Arial", valign: "top", wrap: true,
});
}
// ─── FLASHCARD DATA ────────────────────────────────────────────────────────
const cards = [
// ── 1. HYPOTHALAMUS ─────────────────────────────────────────────────────
{ section: "Hypothalamus", q: "Where is the hypothalamus located and what is its relationship to the pituitary?",
a: "The hypothalamus lies ventral to the thalamus. It is connected to the pituitary gland via the infundibulum (a thin stalk). It controls the pituitary by both neural and hormonal mechanisms." },
{ section: "Hypothalamus", q: "What are the two types of hormones secreted by the hypothalamus to control the anterior pituitary?",
a: "Releasing hormones (stimulate anterior pituitary hormone release)\nRelease-inhibiting hormones (suppress anterior pituitary hormone release)\nThese hormones travel via the hypophysial portal blood." },
{ section: "Hypothalamus", q: "Name the two hormones released from the posterior pituitary and their cell body locations.",
a: "ADH (antidiuretic hormone / vasopressin) — primarily from supraoptic nuclei\nOxytocin — primarily from paraventricular nuclei\nBoth are neuropeptides synthesised in the hypothalamus and stored in posterior pituitary nerve terminals." },
{ section: "Hypothalamus", q: "What is the functional significance of hypophysial portal blood?",
a: "Portal blood carries hypothalamic releasing/inhibiting hormones in high concentration directly to the anterior pituitary. This allows very small amounts of hypothalamic hormone to have potent effects on anterior pituitary cells without entering the systemic circulation first." },
// ── 2. PITUITARY ────────────────────────────────────────────────────────
{ section: "Pituitary", q: "Distinguish the embryological origins of the anterior vs posterior pituitary.",
a: "Anterior pituitary (adenohypophysis) — derived from oral ectoderm (Rathke's pouch); secretes peptide hormones under hypothalamic control.\nPosterior pituitary (neurohypophysis) — derived from neural tissue (brain); stores and releases ADH and oxytocin made in the hypothalamus." },
{ section: "Pituitary", q: "List the six major hormones of the anterior pituitary and their primary targets.",
a: "GH (growth hormone) — liver, muscle, bone\nTSH — thyroid gland\nACTH — adrenal cortex\nFSH — gonads (follicle / spermatogenesis)\nLH — gonads (ovulation / testosterone)\nProlactin — mammary gland" },
{ section: "Pituitary", q: "How is ADH released from the posterior pituitary?",
a: "ADH is synthesised in hypothalamic supraoptic nuclei, transported down axons in neurosecretory vesicles, and stored in bulbous nerve terminals in the posterior pituitary. When the hypothalamic cell body is stimulated (e.g. by increased plasma osmolarity), vesicles are released by exocytosis and ADH enters fenestrated capillaries." },
{ section: "Pituitary", q: "What is the primary stimulus for ADH secretion and what is its renal effect?",
a: "Primary stimulus: increased plasma osmolarity (detected by hypothalamic osmoreceptors).\nRenal effect: ADH acts on V2 receptors in collecting duct principal cells → inserts aquaporin-2 (AQP2) water channels → increased water reabsorption → concentrated urine." },
// ── 3. THYROID ──────────────────────────────────────────────────────────
{ section: "Thyroid", q: "What are the two active thyroid hormones and how do they differ in potency?",
a: "T3 (triiodothyronine) — 3 iodine atoms; biologically MORE potent; shorter half-life.\nT4 (thyroxine) — 4 iodine atoms; less potent; converted to T3 in target tissues by 5'-deiodinase.\nBoth are synthesised from tyrosine residues on thyroglobulin." },
{ section: "Thyroid", q: "Describe the synthesis steps for thyroid hormones.",
a: "1. Iodide (I⁻) is actively transported into follicular cells via Na⁺/I⁻ symporter.\n2. I⁻ is oxidised to I₂ by thyroid peroxidase (TPO).\n3. I₂ organifies tyrosine residues on thyroglobulin → MIT and DIT.\n4. Coupling: DIT + DIT → T4; DIT + MIT → T3.\n5. Thyroglobulin is endocytosed, proteolysed → T3 and T4 released into blood." },
{ section: "Thyroid", q: "What are the major physiological actions of thyroid hormones?",
a: "Thermogenesis: stimulate Na⁺-K⁺ ATPase → ↑O₂ consumption, ↑metabolic rate, ↑heat production.\nGrowth and development: essential for normal brain maturation (deficiency → cretinism).\nCardiovascular: ↑heart rate and cardiac output.\nMetabolism: ↑glucose absorption, ↑lipolysis, ↑protein synthesis (physiological) or catabolism (excess)." },
{ section: "Thyroid", q: "What is the mechanism of action of thyroid hormones at the cellular level?",
a: "Thyroid hormones use the STEROID hormone mechanism:\n1. Diffuse into cell (lipophilic).\n2. Bind cytosolic or nuclear receptors with zinc-finger DNA-binding domains.\n3. Hormone-receptor complex dimerises → binds steroid-responsive elements (SREs) in DNA.\n4. Regulates gene transcription → new proteins → physiological effects.\nOnset is slow (hours), unlike peptide hormones." },
{ section: "Thyroid", q: "Compare hypothyroidism vs hyperthyroidism in terms of metabolic effects.",
a: "Hypothyroidism: ↓metabolic rate, ↓O₂ consumption, ↓heat production → cold intolerance, weight gain, bradycardia, myxedema.\nHyperthyroidism (e.g. Graves disease): ↑metabolic rate, ↑heat production → heat intolerance, weight loss, tachycardia, exophthalmos (Graves).\nBoth are among the most common endocrinopathies." },
// ── 4. ADRENAL CORTEX ───────────────────────────────────────────────────
{ section: "Adrenal Cortex", q: "Name the three zones of the adrenal cortex and their major hormone products.",
a: "Zona glomerulosa (outermost) → Mineralocorticoids (aldosterone)\nZona fasciculata (middle, largest) → Glucocorticoids (cortisol)\nZona reticularis (inner) → Androgens (DHEA, androstenedione)\nMnemonic: GFR — \"Go Find Receptors\" (Glomerulosa, Fasciculata, Reticularis)" },
{ section: "Adrenal Cortex", q: "What are the major actions of cortisol?",
a: "Metabolic: ↑gluconeogenesis, ↑lipolysis, protein catabolism → ↑blood glucose.\nAnti-inflammatory: ↓phospholipase A2 → ↓prostaglandins; stabilises mast cell membranes.\nImmunosuppressive: ↓lymphocyte proliferation.\nCardiovascular: permissive action for catecholamines on blood pressure.\nStress response: activated by ACTH from anterior pituitary via CRH from hypothalamus." },
{ section: "Adrenal Cortex", q: "Describe the renin-angiotensin-aldosterone system (RAAS) step by step.",
a: "1. ↓Blood pressure → ↓renal perfusion → juxtaglomerular cells release renin.\n2. Renin cleaves angiotensinogen → angiotensin I (inactive decapeptide).\n3. ACE (in lungs/kidneys) converts angiotensin I → angiotensin II.\n4. Angiotensin II → stimulates zona glomerulosa → releases aldosterone.\n5. Aldosterone acts on renal distal tubule/collecting duct → ↑Na⁺ reabsorption → ↑ECF volume → ↑BP." },
{ section: "Adrenal Cortex", q: "What are the effects of aldosterone on the kidney?",
a: "Aldosterone binds intracellular mineralocorticoid receptors in principal cells of the distal tubule and collecting duct.\nEffects:\n↑Na⁺ reabsorption (via ENaC and Na⁺-K⁺ ATPase)\n↑K⁺ and H⁺ secretion\nNet result: ↑ECF volume, ↑blood pressure, ↓K⁺ (hypokalemia if excess).\nAction requires gene transcription (hours to days)." },
// ── 5. ADRENAL MEDULLA ──────────────────────────────────────────────────
{ section: "Adrenal Medulla", q: "What is the adrenal medulla functionally equivalent to?",
a: "The adrenal medulla is a specialised sympathetic ganglion. Its chromaffin cells are the postganglionic 'neurons.' Preganglionic fibres from thoracic spinal cord travel via the greater splanchnic nerve and release ACh → activates nicotinic receptors on chromaffin cells → catecholamine secretion." },
{ section: "Adrenal Medulla", q: "What catecholamines does the adrenal medulla secrete and in what proportions?",
a: "Epinephrine (adrenaline): ~80%\nNorepinephrine (noradrenaline): ~20%\nKey enzyme: PNMT (phenylethanolamine-N-methyltransferase) converts NE → E. PNMT requires cortisol supplied from nearby adrenal cortical blood. Sympathetic postganglionic neurons lack PNMT → secrete only NE." },
{ section: "Adrenal Medulla", q: "How does a pheochromocytoma differ from normal adrenal medulla secretion?",
a: "Normal medulla: mainly epinephrine (80%) due to PNMT activity from cortisol supply.\nPheochromocytoma (tumour of adrenal medulla): mainly NOREPINEPHRINE — the tumour may be ectopic and lacks access to adrenal cortical cortisol → PNMT inactive → NE not converted to E.\nClassic symptoms: hypertension (sustained or paroxysmal), headache, sweating, palpitations." },
// ── 6. ENDOCRINE PANCREAS ───────────────────────────────────────────────
{ section: "Pancreas", q: "Describe the cell types in the islets of Langerhans and their hormone products.",
a: "β cells (65%) → Insulin\nα cells (~20%) → Glucagon\nδ cells (~10%) → Somatostatin\nPP cells → Pancreatic polypeptide\nIslets of Langerhans make up only 1–2% of pancreatic mass but contain ~1 million islets × 2500 cells each." },
{ section: "Pancreas", q: "What stimulates and inhibits insulin secretion?",
a: "Stimulate: ↑blood glucose (main stimulus), amino acids (arginine, leucine), GIP (incretin), glucagon, vagal stimulation, β2 agonists, sulfonylureas.\nInhibit: hypoglycemia, somatostatin, epinephrine (α2 receptor), fasting." },
{ section: "Pancreas", q: "What are the major metabolic actions of insulin?",
a: "ANABOLIC hormone ('fed state'):\nGlucose: ↑uptake into muscle/fat (GLUT4), ↑glycogenesis, ↓gluconeogenesis → ↓blood glucose.\nFat: ↑lipogenesis, ↓lipolysis.\nProtein: ↑protein synthesis, ↓proteolysis.\nK⁺: stimulates Na⁺-K⁺ ATPase → drives K⁺ into cells → ↓plasma K⁺ (clinically important in DKA treatment)." },
{ section: "Pancreas", q: "What are the major metabolic actions of glucagon?",
a: "CATABOLIC hormone ('fasting state'):\nGlucose: ↑glycogenolysis, ↑gluconeogenesis in liver → ↑blood glucose.\nFat: ↑lipolysis → ↑fatty acids and ketone body formation.\nActed via cAMP-PKA pathway (Gs-linked receptor).\nStimulated by hypoglycemia and amino acids; inhibited by glucose and insulin." },
{ section: "Pancreas", q: "What is an incretin and which GI hormone is the major one?",
a: "An incretin is a gut hormone that enhances insulin secretion in response to food.\nMajor incretin: GIP (Glucose-dependent Insulinotropic Peptide), also called Gastric Inhibitory Peptide.\nSecreted by K cells of duodenum/jejunum in response to all 3 macronutrients (glucose, amino acids, fats).\nExplains why oral glucose produces greater insulin response than IV glucose." },
// ── 7. GONADS ───────────────────────────────────────────────────────────
{ section: "Gonads", q: "What is the hypothalamic-pituitary-gonadal (HPG) axis?",
a: "Hypothalamus → GnRH (pulsatile) → Anterior pituitary → FSH and LH → Gonads.\nFSH: promotes follicle development (female) and spermatogenesis (male).\nLH: triggers ovulation and corpus luteum formation (female); stimulates Leydig cells → testosterone (male).\nNegative feedback: sex steroids (estrogen, progesterone, testosterone) inhibit GnRH and FSH/LH." },
{ section: "Gonads", q: "What are the major actions of testosterone?",
a: "Development: stimulates male secondary sex characteristics at puberty (voice deepening, facial hair, muscle mass, penile/testicular growth).\nMetabolic: ↑protein synthesis → anabolism; ↑erythropoiesis (↑RBC mass).\nFeedback: negative feedback on hypothalamus/pituitary to suppress GnRH and LH.\nMechanism: binds intracellular androgen receptor → gene transcription (steroid hormone mechanism)." },
{ section: "Gonads", q: "What is the role of estrogen in the female reproductive cycle?",
a: "Follicular phase: rising estrogen from growing follicle → proliferation of endometrium; at peak → positive feedback on LH → LH surge → ovulation.\nLuteal phase: estrogen + progesterone (from corpus luteum) → secretory endometrium.\nFeedback: usually inhibits GnRH/FSH/LH (negative); high sustained estrogen briefly causes positive feedback (mid-cycle LH surge).\nLong-term: maintains bone density, cardiovascular protection, secondary sex characteristics." },
{ section: "Gonads", q: "What is the difference between FSH and LH targets in males vs females?",
a: "FEMALES:\nFSH → granulosa cells → follicle growth, estrogen synthesis (aromatase)\nLH → theca cells → androgen precursors; at ovulation triggers egg release; luteinises granulosa cells → corpus luteum → progesterone\n\nMALES:\nFSH → Sertoli cells → spermatogenesis support (inhibin feedback)\nLH → Leydig cells → testosterone synthesis" },
];
// ─── BUILD SLIDES ──────────────────────────────────────────────────────────
addTitleSlide(pres);
const sectionOrder = ["Hypothalamus","Pituitary","Thyroid","Adrenal Cortex","Adrenal Medulla","Pancreas","Gonads"];
sectionOrder.forEach((sec, idx) => {
const sc = sections[sec];
addSectionDivider(pres, sec, idx + 1, sc);
const sectionCards = cards.filter(c => c.section === sec);
sectionCards.forEach(card => {
addFlashcard(pres, card.q, card.a, sec, sc);
});
});
// ─── WRITE FILE ────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/endocrine-flashcards/Endocrine_Physiology_Flashcards.pptx" })
.then(() => console.log("Done: Endocrine_Physiology_Flashcards.pptx"))
.catch(err => { console.error(err); process.exit(1); });
cd /home/daytona/workspace/endocrine-flashcards && node build.js
ls -lh /home/daytona/workspace/endocrine-flashcards/Endocrine_Physiology_Flashca…
Endocrine Physiology Flashcards
Presentation · PPTX
| Section | Cards | Colour |
|---|---|---|
| Hypothalamus | 4 | Deep navy / cyan |
| Pituitary | 4 | Steel blue / sky blue |
| Thyroid | 5 | Forest green / emerald |
| Adrenal Cortex | 4 | Deep red / crimson |
| Adrenal Medulla | 3 | Purple / violet |
| Pancreas (Endocrine) | 5 | Dark green / mint |
| Gonads | 4 | Charcoal / red |
Add practice questions on pathology (hypothyroidism, Cushing's syndrome, diabetes)
~/endocrine-flashcards/build.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/endocrine-flashcards/build.js'
~/endocrine-flashcards/build.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/endocrine-flashcards/build.js'
~/endocrine-flashcards/build.js
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/endocrine-flashcards/build.js'
cd /home/daytona/workspace/endocrine-flashcards && node build.js 2>&1
ls -lh /home/daytona/workspace/endocrine-flashcards/Endocrine_Physiology_Flashca…
Endocrine Physiology Flashcards
Presentation · PPTX