detailed presentation for powerpoint cartoon styled for postgraduate internal medicine students for MEN and poly glandular syndromes
multiple endocrine neoplasia AND polyglandular syndrome
Multiple endocrine neoplasia MEN polyglandular autoimmune syndrome clinical practice resources 2025
multiple endocrine neoplasia type 2 medullary thyroid carcinoma pheochromocytoma clinical diagram
~/
https://www.ncbi.nlm.nih.gov/books/NBK481897
mkdir -p "/tmp/workspace/men-polyglandular-presentation/src" "/tmp/workspace/men-polyglandular-presentation/output" && python -c "import pptx; print('python-pptx ready')"
~/men-polyglandular-presentation/src/create_deck.py
from pptx import Presentation
from pptx.util import Inches, Pt
from pptx.dml.color import RGBColor
from pptx.enum.shapes import MSO_SHAPE
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from pptx.enum.dml import MSO_THEME_COLOR
from pptx.enum.shapes import MSO_CONNECTOR
from pptx.enum.text import MSO_AUTO_SIZE
from pptx.oxml.xmlchemy import OxmlElement
from pptx.oxml.ns import qn
OUT = '/tmp/workspace/men-polyglandular-presentation/output/MEN_and_Polyglandular_Syndromes_PGIM.pptx'
W,H = 13.333,7.5
NAVY = RGBColor(20,35,64); INK = RGBColor(29,39,55); MUTED = RGBColor(87,101,119)
CREAM = RGBColor(250,247,239); WHITE = RGBColor(255,255,255)
TEAL = RGBColor(39,173,168); SKY = RGBColor(85,176,232); ORANGE = RGBColor(247,151,69)
PINK = RGBColor(237,108,144); PURPLE = RGBColor(127,104,201); YELLOW = RGBColor(246,200,70)
RED = RGBColor(205,71,75); GREEN=RGBColor(70,162,104); PALE = RGBColor(238,244,244)
FONT='Aptos Display'; BODY='Aptos'
prs=Presentation(); prs.slide_width=Inches(W); prs.slide_height=Inches(H)
blank=prs.slide_layouts[6]
def fill(shape, color):
shape.fill.solid(); shape.fill.fore_color.rgb=color
shape.line.color.rgb=color
def textbox(slide,x,y,w,h,text,size=18,color=INK,bold=False,align=PP_ALIGN.LEFT,font=BODY,margin=0.08):
s=slide.shapes.add_textbox(Inches(x),Inches(y),Inches(w),Inches(h)); tf=s.text_frame
tf.clear(); tf.word_wrap=True; tf.margin_left=tf.margin_right=Inches(margin); tf.margin_top=tf.margin_bottom=Inches(margin)
p=tf.paragraphs[0]; p.alignment=align; r=p.add_run(); r.text=text; r.font.name=font; r.font.size=Pt(size); r.font.bold=bold; r.font.color.rgb=color
return s
def rounded(slide,x,y,w,h,color=WHITE,r=MSO_SHAPE.ROUNDED_RECTANGLE, line=None):
s=slide.shapes.add_shape(r, Inches(x), Inches(y), Inches(w), Inches(h)); fill(s,color)
if line: s.line.color.rgb=line
return s
def line(slide,x1,y1,x2,y2,color=INK,width=1.5):
l=slide.shapes.add_connector(MSO_CONNECTOR.STRAIGHT, Inches(x1), Inches(y1), Inches(x2), Inches(y2)); l.line.color.rgb=color; l.line.width=Pt(width); return l
def header(slide,title,kicker='',n=0):
textbox(slide,.48,.25,12.2,.22,kicker.upper(),9,TEAL,True,font=BODY)
textbox(slide,.48,.48,11.9,.55,title,26,NAVY,True,font=FONT)
line(slide,.48,1.12,12.83,1.12,RGBColor(207,219,221),1)
textbox(slide,.5,7.12,9,.18,'POSTGRADUATE INTERNAL MEDICINE | MEN & POLYGLANDULAR SYNDROMES',7,MUTED,True)
textbox(slide,12.1,7.08,.65,.22,str(n),9,TEAL,True,align=PP_ALIGN.RIGHT)
def bullets(slide,x,y,w,h,items,size=15,color=INK,accent=TEAL):
box=slide.shapes.add_textbox(Inches(x),Inches(y),Inches(w),Inches(h)); tf=box.text_frame; tf.clear(); tf.word_wrap=True
tf.margin_left=Inches(.06); tf.margin_right=Inches(.03); tf.margin_top=Inches(.02)
for i,item in enumerate(items):
p=tf.paragraphs[0] if i==0 else tf.add_paragraph(); p.text=item; p.level=0; p.font.name=BODY; p.font.size=Pt(size); p.font.color.rgb=color; p.space_after=Pt(8)
p._p.get_or_add_pPr().insert(0, OxmlElement('a:buChar'))
p._p.pPr[0].set('char','•')
return box
def icon(slide,x,y,label,color=TEAL,emoji=''):
rounded(slide,x,y,.54,.54,color)
textbox(slide,x,y+.06,.54,.35,emoji or label,18,WHITE,True,align=PP_ALIGN.CENTER,font='Arial')
def gland(slide,x,y,name,organ,color=TEAL,subtitle=''):
# cartoon endocrine gland orb
rounded(slide,x,y,1.55,1.42,WHITE,line=RGBColor(210,220,222))
s=slide.shapes.add_shape(MSO_SHAPE.OVAL, Inches(x+.46), Inches(y+.18), Inches(.62), Inches(.62)); fill(s,color)
# face
textbox(slide,x+.48,y+.29,.18,.15,'•',10,NAVY,True,align=PP_ALIGN.CENTER)
textbox(slide,x+.85,y+.29,.18,.15,'•',10,NAVY,True,align=PP_ALIGN.CENTER)
textbox(slide,x+.65,y+.41,.28,.12,'⌣',10,NAVY,True,align=PP_ALIGN.CENTER,font='Arial')
textbox(slide,x+.08,y+.86,1.39,.2,name,10,NAVY,True,align=PP_ALIGN.CENTER)
textbox(slide,x+.08,y+1.08,1.39,.2,organ,8,MUTED,False,align=PP_ALIGN.CENTER)
def chip(slide,x,y,text,color=TEAL,w=None):
if w is None: w=max(.8,len(text)*.105+.28)
rounded(slide,x,y,w,.32,color)
textbox(slide,x+.05,y+.05,w-.1,.18,text,8,WHITE,True,align=PP_ALIGN.CENTER)
def card(slide,x,y,w,h,title,body,accent=TEAL,title_size=15,body_size=12):
rounded(slide,x,y,w,h,WHITE,line=RGBColor(217,224,224))
rounded(slide,x,y,.08,h,accent,r=MSO_SHAPE.RECTANGLE)
textbox(slide,x+.22,y+.16,w-.34,.28,title,title_size,NAVY,True,font=FONT)
bullets(slide,x+.23,y+.54,w-.37,h-.62,body,body_size)
def case_banner(slide,x,y,text):
rounded(slide,x,y,12.3,.54,NAVY)
textbox(slide,x+.18,y+.11,11.9,.26,text,14,WHITE,True)
def add_notes(slide,text):
notes=slide.notes_slide.notes_text_frame
notes.text=text
# 1
s=prs.slides.add_slide(blank); fill(s.background, CREAM)
# title visual
rounded(s,.55,.55,7.55,5.98,WHITE,line=RGBColor(221,228,225))
textbox(s,.92,1.12,6.7,.3,'POSTGRADUATE INTERNAL MEDICINE',12,TEAL,True)
textbox(s,.9,1.55,6.8,1.12,'MEN &\nPOLYGLANDULAR SYNDROMES',32,NAVY,True,font=FONT)
textbox(s,.92,3.12,6.2,.7,'A pattern-recognition approach to inherited endocrine tumors and autoimmune endocrine failure',18,INK)
chip(s,.92,4.18,'MEN1',PURPLE); chip(s,1.86,4.18,'MEN2',ORANGE); chip(s,2.8,4.18,'APS-1',PINK); chip(s,3.82,4.18,'APS-2',TEAL)
textbox(s,.92,5.34,6.2,.3,'Diagnosis • genetics • surveillance • emergencies',13,MUTED,True)
# cartoon gland council
for a in [(8.65,1.1,'PTH','PARA',PURPLE),(10.43,1.1,'MTC','THY',ORANGE),(9.54,2.8,'ACTH','ADR',PINK),(11.24,2.8,'INS','PAN',TEAL),(8.65,4.5,'PRL','PIT',SKY)]: gland(s,*a)
textbox(s,8.4,6.35,4.25,.35,'“When one gland speaks, listen for the others.”',13,NAVY,True,align=PP_ALIGN.CENTER)
add_notes(s,'Opening: frame the session as two mirror-image disorders: tumor excess versus autoimmune failure.')
# 2 objectives
s=prs.slides.add_slide(blank); fill(s.background,CREAM); header(s,'Learning objectives','Goals',2)
objs=[('01','Classify','Separate neoplastic MEN syndromes from autoimmune polyglandular syndromes.'),('02','Recognize','Use phenotype clusters to identify MEN1, MEN2A, MEN2B, APS-1 and APS-2.'),('03','Act','Prioritize biochemistry, germline testing, family cascade testing and safe sequencing of treatment.'),('04','Prevent','Build lifelong surveillance plans and avoid endocrine emergency traps.')]
for i,(num,t,b) in enumerate(objs):
x=.75+(i%2)*6.1; y=1.55+(i//2)*2.3
rounded(s,x,y,5.55,1.72,WHITE,line=RGBColor(218,226,226)); rounded(s,x+.22,y+.25,.64,.64,[TEAL,PURPLE,ORANGE,PINK][i])
textbox(s,x+.22,y+.36,.64,.22,num,13,WHITE,True,align=PP_ALIGN.CENTER)
textbox(s,x+1.08,y+.28,4.1,.28,t,18,NAVY,True,font=FONT); textbox(s,x+1.08,y+.73,4.15,.68,b,13,INK)
# 3 framework
s=prs.slides.add_slide(blank); fill(s.background,CREAM); header(s,'The master split: excess vs failure','Framework',3)
rounded(s,.65,1.55,5.85,4.75,RGBColor(239,232,249)); rounded(s,6.83,1.55,5.85,4.75,RGBColor(228,246,244))
textbox(s,.95,1.86,5.2,.35,'NEOPLASTIC POLYGLANDULAR SYNDROMES',17,PURPLE,True,font=FONT)
textbox(s,7.13,1.86,5.2,.35,'AUTOIMMUNE POLYGLANDULAR SYNDROMES',17,TEAL,True,font=FONT)
for i,t in enumerate(['Germline growth-regulation defect','Hyperplasia → adenoma/carcinoma','Hormone EXCESS dominates','AD transmission is typical','Examples: MEN1, MEN2, MEN4']):
chip(s,1.0,2.48+i*.57,t,PURPLE,w=4.78)
for i,t in enumerate(['Loss of immune tolerance / HLA risk','Lymphocytic gland destruction','Hormone DEFICIENCY dominates','AR in APS-1; polygenic APS-2','Examples: APS-1, APS-2, APS-3']):
chip(s,7.2,2.48+i*.57,t,TEAL,w=4.78)
textbox(s,.88,5.72,11.6,.3,'Clinical trigger: one sentinel endocrine disorder should trigger active screening for its syndromic partners.',16,NAVY,True,align=PP_ALIGN.CENTER)
# 4 red flags
s=prs.slides.add_slide(blank); fill(s.background,CREAM); header(s,'When should you suspect a syndrome?','Pattern recognition',4)
flags=[('Young or multifocal tumor','Primary hyperparathyroidism, pituitary NET, pancreatic NET, pheochromocytoma or MTC at an unusual age.'),('Two endocrine axes','Do not label each lesion as “sporadic” until inheritance is considered.'),('Family pattern','Early disease, bilateral lesions, recurrent tumors, sudden death, thyroid cancer or adrenal crises.'),('Extra-endocrine clue','Mucosal neuromas, lentigines, candidiasis, vitiligo, alopecia, lipomas, renal/CNS lesions.')]
for i,(t,b) in enumerate(flags):
x=.76+(i%2)*6.1;y=1.48+(i//2)*2.28; card(s,x,y,5.55,1.68,t,[b],[ORANGE,PURPLE,TEAL,PINK][i],body_size=13)
case_banner(s,.75,6.26,'Rule: phenotype first, gene second, family third.')
# 5 MEN map
s=prs.slides.add_slide(blank); fill(s.background,CREAM); header(s,'MEN at a glance','Neoplastic syndromes',5)
# central DNA
rounded(s,5.55,2.7,2.2,1.1,NAVY); textbox(s,5.7,2.96,1.9,.25,'GERMLINE GENE',15,WHITE,True,align=PP_ALIGN.CENTER)
items=[(1.0,1.55,'MEN1','MEN1 / menin','Parathyroid • pituitary • enteropancreatic NET',PURPLE),(8.05,1.55,'MEN2A','RET GOF','MTC • pheo • ± PHPT',ORANGE),(1.0,4.35,'MEN2B','RET GOF','Aggressive MTC • pheo • neuromas',PINK),(8.05,4.35,'MEN4 / others','CDKN1B / MAX','MEN1-like; PPGL-predominant variants',TEAL)]
for x,y,a,b,c,col in items:
line(s,6.65,3.25,x+2.05,y+1.02,col,2); rounded(s,x,y,4.0,1.72,WHITE,line=RGBColor(218,226,226)); textbox(s,x+.22,y+.2,1.12,.26,a,16,col,True,font=FONT); textbox(s,x+1.35,y+.22,2.38,.22,b,11,NAVY,True); textbox(s,x+.22,y+.72,3.53,.64,c,12,INK)
# 6 MEN1
s=prs.slides.add_slide(blank); fill(s.background,CREAM); header(s,'MEN1: remember the “3 P” axis','MEN1',6)
textbox(s,.7,1.35,4.3,.42,'MEN1 = tumor-suppressor loss',20,PURPLE,True,font=FONT)
textbox(s,.7,1.88,4.45,.74,'Autosomal dominant MEN1 pathogenic variant → loss of menin function. Clinical diagnosis: ≥2 of parathyroid, pituitary, and gastroenteropancreatic endocrine tumors.',14,INK)
gland(s,.92,3.15,'PTH','PARATHYROID',PURPLE); gland(s,2.73,3.15,'PRL','PITUITARY',SKY); gland(s,4.54,3.15,'GAS','GEP-NET',ORANGE)
card(s,6.65,1.42,5.7,1.42,'Parathyroid: the sentinel lesion',['Primary hyperparathyroidism is usually earliest and multiglandular. Think MEN1 in early, recurrent, familial, or multigland disease.'],PURPLE,body_size=13)
card(s,6.65,3.04,5.7,1.42,'Pancreatic / duodenal NETs',['Gastrinoma: refractory ulcer disease / diarrhea. Insulinoma: fasting hypoglycemia. Functional and nonfunctional NETs both matter.'],ORANGE,body_size=13)
card(s,6.65,4.66,5.7,1.42,'Pituitary and non-endocrine clues',['Prolactinoma and GH excess; facial angiofibromas, collagenomas, lipomas, adrenal lesions and thoracic NETs support the diagnosis.'],SKY,body_size=13)
# 7 MEN1 workup
s=prs.slides.add_slide(blank); fill(s.background,CREAM); header(s,'MEN1: diagnostic and surveillance logic','MEN1',7)
steps=[('1. Confirm phenotype','Corrected/ionized Ca + PTH; prolactin and IGF-1; targeted fasting gut-pancreatic hormones only when indicated.'),('2. Establish anatomy','Pituitary MRI when biochemical/clinical signal; pancreatic/duodenal NET imaging with dedicated cross-sectional and receptor imaging strategy.'),('3. Test the family','Genetic counselling + MEN1 germline testing in index case. Test at-risk relatives for the familial variant.'),('4. Follow longitudinally','Age-appropriate periodic biochemical and imaging surveillance in an experienced endocrine genetics service.')]
for i,(t,b) in enumerate(steps):
x=.75+i*3.12; rounded(s,x,1.78,2.72,3.9,WHITE,line=RGBColor(218,226,226)); rounded(s,x+.88,1.35,.84,.84,[PURPLE,SKY,ORANGE,TEAL][i]); textbox(s,x+.88,1.58,.84,.22,str(i+1),16,WHITE,True,align=PP_ALIGN.CENTER)
textbox(s,x+.22,2.42,2.28,.46,t,15,NAVY,True,align=PP_ALIGN.CENTER,font=FONT); textbox(s,x+.24,3.12,2.24,1.95,b,12,INK,align=PP_ALIGN.CENTER)
case_banner(s,.75,6.18,'Do not “screen blindly”: choose tests that have an action threshold and attach each result to a management plan.')
# 8 MEN2
s=prs.slides.add_slide(blank); fill(s.background,CREAM); header(s,'MEN2: RET activation and a preventable cancer','MEN2',8)
rounded(s,.7,1.4,3.35,4.95,RGBColor(255,241,227)); textbox(s,1.03,1.72,2.7,.35,'RET proto-oncogene',21,ORANGE,True,font=FONT); textbox(s,1.03,2.28,2.72,.9,'Activating germline variants drive C-cell disease and determine risk phenotype. Genotype informs timing and intensity of management.',14,INK)
chip(s,1.04,3.52,'MTC is the anchor lesion',ORANGE,w=2.55); chip(s,1.04,4.05,'Pheochromocytoma may be bilateral',PINK,w=2.55); chip(s,1.04,4.58,'Sequence interventions safely',NAVY,w=2.55)
# 2 branches
card(s,4.45,1.55,3.72,3.94,'MEN2A',['MTC: near-universal untreated risk','Pheochromocytoma: common, often bilateral','Primary hyperparathyroidism: variable','Consider lichen amyloidosis in selected families'],ORANGE,body_size=13)
card(s,8.55,1.55,3.72,3.94,'MEN2B',['Early, aggressive MTC','Pheochromocytoma: common','Mucosal neuromas + intestinal ganglioneuromatosis','Marfanoid habitus; PHPT is absent'],PINK,body_size=13)
case_banner(s,.75,6.18,'RET carrier + adrenal lesion: biochemical exclusion of catecholamine excess precedes thyroid surgery.')
# 9 MEN2 sequencing
s=prs.slides.add_slide(blank); fill(s.background,CREAM); header(s,'MEN2: the operative safety sequence','MEN2',9)
case_banner(s,.75,1.38,'Patient with RET mutation and elevated calcitonin / thyroid nodule')
seq=[('Assess MTC','Neck ultrasound, calcitonin/CEA and specialist staging as indicated.',ORANGE),('Screen pheochromocytoma','Plasma free or urinary fractionated metanephrines. Image only after biochemical evidence or per genotype protocol.',PINK),('If pheo present','Alpha blockade, volume preparation, adrenalectomy first. Never proceed to thyroid surgery with untreated catecholamine excess.',RED),('Then thyroid plan','RET risk category, age, calcitonin, imaging and nodal status guide prophylactic or therapeutic thyroidectomy.',TEAL)]
for i,(t,b,c) in enumerate(seq):
x=.75+i*3.05; rounded(s,x,2.22,2.7,3.2,WHITE,line=RGBColor(218,226,226)); rounded(s,x+.86,2.45,.95,.95,c); textbox(s,x+.86,2.7,.95,.22,str(i+1),17,WHITE,True,align=PP_ALIGN.CENTER); textbox(s,x+.25,3.65,2.2,.34,t,14,NAVY,True,align=PP_ALIGN.CENTER,font=FONT); textbox(s,x+.25,4.16,2.2,.85,b,12,INK,align=PP_ALIGN.CENTER)
line(s,3.45,3.0,3.78,3.0,NAVY,2);line(s,6.5,3.0,6.83,3.0,NAVY,2);line(s,9.55,3.0,9.88,3.0,NAVY,2)
textbox(s,.9,5.92,11.6,.3,'High-risk action point: a hypertensive, tachycardic patient is a catecholamine problem until proven otherwise.',15,RED,True,align=PP_ALIGN.CENTER)
#10 other syndromes
s=prs.slides.add_slide(blank); fill(s.background,CREAM); header(s,'Beyond MEN1 and MEN2: phenotype-guided differentials','Other inherited syndromes',10)
rows=[('MEN4','CDKN1B','MEN1-like: parathyroid and pituitary tumors','MEN1 phenotype with negative MEN1 testing'),('MAX-associated syndrome','MAX','Pheochromocytoma / paraganglioma predominance','Bilateral or familial PPGL'),('Carney complex','PRKAR1A','PPNAD/Cushing, pituitary, thyroid lesions','Lentigines, blue nevi, atrial myxoma'),('VHL','VHL','Pheo, pancreatic NET','CNS/retinal hemangioblastoma, RCC'),('McCune-Albright','GNAS mosaic','Precocious puberty, thyroid, pituitary/adrenal hyperfunction','Café-au-lait + fibrous dysplasia')]
# table header
for x,w,t in [(0.7,2.0,'SYNDROME'),(2.75,1.65,'GENE'),(4.45,3.4,'ENDOCRINE SIGNAL'),(7.9,4.65,'CLINICAL CLUE')]:
rounded(s,x,1.4,w,.45,NAVY); textbox(s,x+.1,1.51,w-.2,.16,t,10,WHITE,True,align=PP_ALIGN.CENTER)
for i,row in enumerate(rows):
y=1.9+i*.86; col=[PURPLE,TEAL,PINK,ORANGE,SKY][i]
rounded(s,.7,y,11.85,.7,WHITE,line=RGBColor(222,228,228)); textbox(s,.82,y+.17,1.75,.22,row[0],12,col,True); textbox(s,2.87,y+.17,1.45,.22,row[1],12,NAVY,True); textbox(s,4.58,y+.1,3.14,.4,row[2],11,INK); textbox(s,8.02,y+.1,4.35,.4,row[3],11,INK)
# 11 APS 1
s=prs.slides.add_slide(blank); fill(s.background,CREAM); header(s,'APS-1 (APECED): failed central tolerance','Autoimmune polyglandular syndrome',11)
rounded(s,.72,1.38,3.38,4.95,RGBColor(255,232,240)); textbox(s,1.03,1.72,2.75,.34,'AIRE loss-of-function',20,PINK,True,font=FONT); textbox(s,1.03,2.28,2.78,.86,'Autosomal recessive failure of thymic negative selection → autoreactive T-cell escape and multi-organ autoimmunity.',14,INK)
textbox(s,4.6,1.48,7.2,.3,'Classic triad: “C-H-A”',21,NAVY,True,font=FONT)
tri=[('C','Chronic mucocutaneous candidiasis','Early, persistent oral / nail / skin candidiasis',PINK),('H','Hypoparathyroidism','Hypocalcaemia, tetany, seizures or basal ganglia calcification',PURPLE),('A','Primary adrenal insufficiency','Pigmentation, hypotension, hyponatraemia, hyperkalaemia',ORANGE)]
for i,(a,t,b,c) in enumerate(tri):
y=2.1+i*1.18; rounded(s,4.62,y,7.25,.9,WHITE,line=RGBColor(218,226,226)); rounded(s,4.83,y+.14,.58,.58,c); textbox(s,4.83,y+.3,.58,.16,a,16,WHITE,True,align=PP_ALIGN.CENTER); textbox(s,5.7,y+.14,3.25,.2,t,14,NAVY,True); textbox(s,5.7,y+.42,5.78,.21,b,11,INK)
textbox(s,4.68,5.8,7.0,.25,'Also seek: autoimmune hepatitis, keratopathy, alopecia, vitiligo, ovarian failure, pneumonitis, enteropathy.',12,MUTED,True)
# 12 APS2 vs APS3
s=prs.slides.add_slide(blank); fill(s.background,CREAM); header(s,'APS-2 and APS-3: common combinations, high stakes','Autoimmune polyglandular syndrome',12)
card(s,.76,1.45,5.6,4.85,'APS-2 (Schmidt syndrome)',['Core: Addison disease PLUS autoimmune thyroid disease and/or type 1 diabetes','Usually adult onset; polygenic with HLA association','Other partners: coeliac disease, pernicious anaemia, vitiligo, alopecia, hypogonadism','The danger is unrecognized adrenal failure in an apparently “routine” thyroid or diabetes patient'],TEAL,body_size=14)
card(s,6.8,1.45,5.6,4.85,'APS-3',['Autoimmune thyroid disease plus another autoimmune endocrine disorder, typically WITHOUT Addison disease','Common patterns: thyroid + type 1 diabetes; thyroid + pernicious anaemia','Terminology varies across sources: document actual components rather than relying on label alone','Reassess for adrenal symptoms over time'],PURPLE,body_size=14)
chip(s,1.25,5.72,'Always ask: could cortisol reserve be limited?',RED,w=4.6)
chip(s,7.3,5.72,'Treat the patient’s component diseases and screen intelligently.',NAVY,w=4.45)
# 13 APS approach
s=prs.slides.add_slide(blank); fill(s.background,CREAM); header(s,'Autoimmune polyglandular syndrome: bedside work-up','APS approach',13)
cols=[('Presenting clue','Addison, T1D, autoimmune thyroid disease, hypoparathyroidism, candidiasis, vitiligo/alopecia.',TEAL),('Immediate tests','Targeted axis testing: 8 am cortisol + ACTH, electrolytes, glucose/HbA1c, TSH/free T4, Ca/P/PTH.',ORANGE),('Etiology & risk','21-hydroxylase Ab, TPO Ab, islet Ab, intrinsic-factor/parietal-cell Ab, coeliac serology as clinically relevant.',PURPLE),('Longitudinal care','Teach sick-day rules; track evolving endocrine and non-endocrine autoimmunity; coordinate family/genetic evaluation in APS-1.',PINK)]
for i,(t,b,c) in enumerate(cols):
x=.72+i*3.12; rounded(s,x,1.72,2.77,4.35,WHITE,line=RGBColor(218,226,226)); rounded(s,x+.94,1.38,.88,.88,c); textbox(s,x+.94,1.63,.88,.2,str(i+1),17,WHITE,True,align=PP_ALIGN.CENTER); textbox(s,x+.23,2.46,2.3,.42,t,15,NAVY,True,align=PP_ALIGN.CENTER,font=FONT); textbox(s,x+.25,3.1,2.25,2.0,b,13,INK,align=PP_ALIGN.CENTER)
case_banner(s,.74,6.32,'Test by phenotype. Antibodies predict risk but do not replace functional assessment of an endocrine axis.')
#14 emergency traps
s=prs.slides.add_slide(blank); fill(s.background,CREAM); header(s,'Two endocrine traps you must not miss','Safety',14)
card(s,.75,1.52,5.68,4.72,'1. Thyroxine before cortisol in occult Addison disease',['Thyroid hormone increases cortisol clearance and metabolic demand. In a patient with weight loss, hyperpigmentation, hypotension, hyponatraemia or unexplained hypoglycaemia, assess and treat possible adrenal insufficiency first.','If adrenal crisis is possible: draw cortisol/ACTH only if this does not delay stress-dose glucocorticoid and fluid resuscitation.'],RED,body_size=14)
card(s,6.9,1.52,5.68,4.72,'2. Thyroid surgery before pheochromocytoma exclusion in MEN2',['Anaesthesia and surgery can precipitate catecholamine crisis. Biochemically evaluate for pheochromocytoma in MEN2 before thyroidectomy.','If confirmed: alpha-blockade and appropriate pre-operative preparation, then adrenal surgery precedes thyroid surgery.'],ORANGE,body_size=14)
textbox(s,.85,6.5,11.7,.25,'The sequence is treatment: identify the axis that can kill the patient during the next intervention.',16,NAVY,True,align=PP_ALIGN.CENTER)
#15 cases
s=prs.slides.add_slide(blank); fill(s.background,CREAM); header(s,'Case 1: the “recurrent stones” patient','Interactive case',15)
case_banner(s,.75,1.35,'32-year-old with recurrent nephrolithiasis, Ca 11.7 mg/dL, inappropriately high PTH, father had “pituitary surgery,” and chronic dyspepsia.')
card(s,.85,2.24,3.55,3.52,'Your working diagnosis?',['Sporadic PHPT','MEN1','MEN2A','Familial hypocalciuric hypercalcaemia'],PURPLE,body_size=15)
card(s,4.9,2.24,3.55,3.52,'Next actions',['Confirm PTH-dependent hypercalcaemia','Obtain family history precisely','Counsel and test MEN1 germline variant','Evaluate for pituitary and GEP-NET manifestations'],TEAL,body_size=14)
card(s,8.95,2.24,3.55,3.52,'Teaching pivot',['Young PHPT plus family endocrine tumors is not “just another adenoma.”','MEN1 parathyroid disease is usually multiglandular, altering surgical strategy and long-term planning.'],ORANGE,body_size=14)
textbox(s,.92,6.28,11.5,.27,'Answer: MEN1 is most likely. Identify the phenotype before choosing a focal parathyroid operation.',15,NAVY,True,align=PP_ALIGN.CENTER)
#16 cases
s=prs.slides.add_slide(blank); fill(s.background,CREAM); header(s,'Case 2: mucosal neuromas are a genetic clue','Interactive case',16)
case_banner(s,.75,1.35,'16-year-old with nodular lips and tongue, constipation, marfanoid body habitus and a thyroid nodule. Mother died during an “adrenal operation.”')
rounded(s,.83,2.18,5.6,3.75,RGBColor(255,232,240)); textbox(s,1.12,2.52,5.02,.3,'Think MEN2B',25,PINK,True,align=PP_ALIGN.CENTER,font=FONT)
textbox(s,1.14,3.15,4.95,1.55,'RET-associated aggressive medullary thyroid carcinoma + pheochromocytoma risk + mucosal neuromas / intestinal ganglioneuromatosis.',17,INK,align=PP_ALIGN.CENTER)
rounded(s,6.88,2.18,5.6,3.75,WHITE,line=RGBColor(218,226,226)); textbox(s,7.18,2.5,5.0,.25,'Order and sequence',19,NAVY,True,align=PP_ALIGN.CENTER,font=FONT)
bullets(s,7.22,3.04,4.9,2.28,['Urgent endocrine genetics and MTC assessment','Plasma free or urinary fractionated metanephrines','If pheochromocytoma present: alpha-block, then adrenalectomy before thyroid surgery','Cascade test first-degree relatives'],15)
#17 compare
s=prs.slides.add_slide(blank); fill(s.background,CREAM); header(s,'High-yield comparison: MEN vs APS','Synthesis',17)
cols=[('Feature','MEN1','MEN2','APS-1','APS-2'),('Core gene/risk','MEN1, AD','RET GOF, AD','AIRE, AR','HLA/polygenic'),('Biologic direction','Tumor / hormone excess','Tumor / hormone excess','Autoimmune gland failure','Autoimmune gland failure'),('Signature','PTH + pituitary + GEP-NET','MTC ± pheo ± PHPT','CMC + hypoPTH + Addison','Addison + thyroid and/or T1D'),('Urgent sequence','NET burden / surgical strategy','Exclude pheo before thyroid surgery','Treat adrenal crisis promptly','Exclude/treat Addison before thyroxine')]
x0=[.7,2.95,5.35,7.75,10.15]; ww=[2.2,2.3,2.3,2.3,2.3]
for j,h in enumerate(cols[0]): rounded(s,x0[j],1.35,ww[j],.55,NAVY); textbox(s,x0[j]+.06,1.54,ww[j]-.12,.17,h,11,WHITE,True,align=PP_ALIGN.CENTER)
for i,row in enumerate(cols[1:]):
y=1.93+i*.92
for j,val in enumerate(row):
rounded(s,x0[j],y,ww[j],.73,WHITE,line=RGBColor(221,228,228)); textbox(s,x0[j]+.1,y+.14,ww[j]-.2,.42,val,11,INK,True if j==0 else False,align=PP_ALIGN.CENTER)
#18 genetic workflow
s=prs.slides.add_slide(blank); fill(s.background,CREAM); header(s,'Genetic medicine is clinical medicine','Family-centered care',18)
flow=[('Recognize index phenotype','Early, multifocal, bilateral, familial, or syndromic extra-endocrine features.',TEAL),('Pre-test counselling','Explain result types, penetrance, implications for relatives, reproductive options and psychosocial impact.',PURPLE),('Germline test','Use focused gene testing when phenotype is clear; panel testing when overlap is plausible.',ORANGE),('Cascade test','Offer testing to at-risk relatives for known familial pathogenic variant. Start surveillance in carriers.',PINK),('Interpret carefully','A negative test does not erase a strong phenotype. VUS is not a management diagnosis.',NAVY)]
for i,(t,b,c) in enumerate(flow):
x=.5+i*2.55; rounded(s,x,2.0,2.18,3.88,WHITE,line=RGBColor(218,226,226)); rounded(s,x+.7,1.55,.8,.8,c);textbox(s,x+.7,1.77,.8,.2,str(i+1),16,WHITE,True,align=PP_ALIGN.CENTER);textbox(s,x+.16,2.7,1.86,.55,t,14,NAVY,True,align=PP_ALIGN.CENTER,font=FONT);textbox(s,x+.18,3.48,1.82,1.72,b,11,INK,align=PP_ALIGN.CENTER)
#19 surveillance scaffold
s=prs.slides.add_slide(blank); fill(s.background,CREAM); header(s,'A surveillance scaffold for the ward and clinic','Practical management',19)
items=[('MEN1','Annual clinical and biochemical review, targeted pituitary/parathyroid/NET monitoring, imaging dictated by syndrome protocol and prior disease.'),('MEN2','RET-directed specialist surveillance: MTC markers/anatomy and periodic catecholamine assessment. Plan surgery through expert MDT.'),('APS-1','Screen evolving gland failure and autoimmune organ disease; monitor calcium/PTH, adrenal axis, gonadal and hepatic/respiratory/GI manifestations.'),('APS-2/3','At each review: symptoms, blood pressure, pigmentation, weight, glucose, thyroid function, adrenal risk, B12/coeliac risk as appropriate.')]
for i,(t,b) in enumerate(items):
x=.78+(i%2)*6.05;y=1.48+(i//2)*2.36; card(s,x,y,5.55,1.76,t,[b],[PURPLE,ORANGE,PINK,TEAL][i],body_size=13)
case_banner(s,.78,6.28,'Use named guideline protocols for exact ages and intervals. This slide is a care architecture, not a substitute for genotype-specific schedules.')
#20 take homes
s=prs.slides.add_slide(blank); fill(s.background,CREAM); header(s,'Take-home messages','Summary',20)
msgs=[('1','A tumor constellation suggests MEN; a failure constellation suggests APS.',TEAL),('2','MEN1 = parathyroid, pituitary, GEP-NET; MEN2 = MTC, pheo ± parathyroid.',PURPLE),('3','APS-1 is AIRE-related CMC + hypoPTH + Addison; APS-2 centers on Addison with thyroid disease and/or T1D.',PINK),('4','Safety sequence: treat suspected adrenal insufficiency before thyroxine; exclude/treat pheo before thyroid surgery in MEN2.',RED),('5','A single patient is a family: counsel, test, cascade and surveil longitudinally.',ORANGE)]
for i,(num,txt,c) in enumerate(msgs):
y=1.4+i*1.02; rounded(s,.86,y,11.62,.76,WHITE,line=RGBColor(217,224,224)); rounded(s,1.05,y+.1,.52,.52,c); textbox(s,1.05,y+.25,.52,.15,num,12,WHITE,True,align=PP_ALIGN.CENTER); textbox(s,1.85,y+.22,10.1,.24,txt,14,NAVY,True)
#21 rapid quiz
s=prs.slides.add_slide(blank); fill(s.background,CREAM); header(s,'Rapid-fire checkpoint','Knowledge check',21)
qs=[('A','MEN2 patient needs thyroidectomy. What must be checked first?','Pheochromocytoma biochemistry.'),('B','What is the APS-1 triad?','Chronic mucocutaneous candidiasis, hypoparathyroidism, primary adrenal insufficiency.'),('C','Which three glands define classic MEN1?','Parathyroid, anterior pituitary and gastroenteropancreatic NET axis.'),('D','Thyroid autoimmunity plus weight loss, hypotension and pigmentation: what is the immediate concern?','Primary adrenal insufficiency / evolving adrenal crisis.')]
for i,(a,q,ans) in enumerate(qs):
x=.75+(i%2)*6.1;y=1.42+(i//2)*2.45; rounded(s,x,y,5.62,1.95,WHITE,line=RGBColor(218,226,226));rounded(s,x+.22,y+.23,.42,.42,[TEAL,PINK,PURPLE,RED][i]);textbox(s,x+.22,y+.34,.42,.12,a,11,WHITE,True,align=PP_ALIGN.CENTER);textbox(s,x+.82,y+.22,4.45,.4,q,13,NAVY,True);textbox(s,x+.82,y+.88,4.5,.58,'Answer: '+ans,12,INK)
#22 refs
s=prs.slides.add_slide(blank); fill(s.background,CREAM); header(s,'Selected references and further reading','References',22)
refs=[
'Goldman-Cecil Medicine, International Edition. Chapter 212: Polyglandular Syndromes. Textbook passages used for syndrome classification, MEN, APS phenotypes and inheritance.',
'Robbins & Kumar Basic Pathology. Multiple Endocrine Neoplasia Syndromes. Used for MEN1/MEN2 molecular pathology and phenotype distinctions.',
'Tietz Textbook of Laboratory Medicine, 7th ed. Multiple Endocrine Neoplasia. Used for MEN1 clinical diagnostic features.',
'Pieterman CRC et al. Multiple Endocrine Neoplasia Type 1. Endotext, NCBI Bookshelf. Current clinical review and surveillance context.',
'MedlinePlus Medical Encyclopedia: Multiple endocrine neoplasia I and II. Accessed October 2026. Patient-level overview and diagnostic/treatment context.',
'Use local endocrine oncology and endocrine genetics protocols for genotype-specific ages, intervals, operative thresholds and drug regimens.'
]
for i,r in enumerate(refs):
y=1.38+i*.78; rounded(s,.75,y,11.82,.58,WHITE,line=RGBColor(224,229,229)); textbox(s,.98,y+.12,11.35,.33,r,11,INK)
textbox(s,.8,6.38,11.75,.35,'Educational deck. Clinical decisions require specialist endocrine, genetic and surgical multidisciplinary input.',13,RED,True,align=PP_ALIGN.CENTER)
# universal slide metadata
for i,slide in enumerate(prs.slides,1):
# hide decorative overlaps? no
pass
prs.core_properties.title='MEN and Polyglandular Syndromes'
prs.core_properties.subject='Postgraduate Internal Medicine teaching presentation'
prs.core_properties.author='Orris'
prs.save(OUT)
print(OUT)
python "/tmp/workspace/men-polyglandular-presentation/src/create_deck.py" && ls -lh "/tmp/workspace/men-polyglandular-presentation/output/MEN_and_Polyglandular_Syndromes_PGIM.pptx"
~/men-polyglandular-presentation/src/create_deck.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/men-polyglandular-presentation/src/create_deck.py'
python "/tmp/workspace/men-polyglandular-presentation/src/create_deck.py" && ls -lh "/tmp/workspace/men-polyglandular-presentation/output/MEN_and_Polyglandular_Syndromes_PGIM.pptx"
python - <<'PY' from pptx import Presentation p='/tmp/workspace/men-polyglandular-presentation/output/MEN_and_Polyglandular_Syndromes_PGIM.pptx' prs=Presentation(p) print('slides',len(prs.slides)) for i,s in enumerate(prs.slides,1): txt=' | '.join(sh.text.replace('\n',' / ') for sh in s.shapes if getattr(sh,'has_text_frame',False) and sh.text.strip()) print(i, txt[:130]) PY
python - <<'PY' from zipfile import ZipFile from pptx import Presentation p='/tmp/workspace/men-polyglandular-presentation/output/MEN_and_Polyglandular_Syndromes_PGIM.pptx' with ZipFile(p) as z: bad=z.testzip() print('zip_integrity', 'OK' if bad is None else bad) prs=Presentation(p) print('slides',len(prs.slides),'dimensions',prs.slide_width,prs.slide_height) print('notes',sum(1 for s in prs.slides if s.has_notes_slide)) PY
MEN and Polyglandular Syndromes PGIM
Presentation · PPTX