hypertension and hypertension crisis for postgraduate internal medicine students powerpoint include BP physiological control
hypertension AND management
2024 ESC Guidelines management elevated blood pressure hypertensive emergencies
diagram physiological regulation of arterial blood pressure baroreceptor renin angiotensin system
hypertensive retinopathy fundus photograph grade 4 papilledema
~/
mkdir -p "/tmp/workspace/hypertension-postgraduate-ppt/src" "/tmp/workspace/hypertension-postgraduate-ppt/output" && python -c "import pptx; print('python-pptx', pptx.__version__)"
cat > "/tmp/workspace/hypertension-postgraduate-ppt/src/build_deck.py" <<'PY' from pptx import Presentation from pptx.util import Inches, Pt from pptx.dml.color import RGBColor from pptx.enum.shapes import MSO_SHAPE, MSO_CONNECTOR from pptx.enum.text import PP_ALIGN, MSO_ANCHOR from pptx.enum.dml import MSO_THEME_COLOR from pptx.enum.text import MSO_AUTO_SIZE from pptx.enum.shapes import MSO_AUTO_SHAPE_TYPE from pptx.enum.text import MSO_VERTICAL_ANCHOR from pptx.enum.dml import MSO_LINE_DASH_STYLE import os, math import matplotlib.pyplot as plt import numpy as np ROOT='/tmp/workspace/hypertension-postgraduate-ppt' OUT=ROOT+'/output/Hypertension_and_Hypertensive_Crises_Postgraduate_Internal_Medicine.pptx' ASSET=ROOT+'/assets' os.makedirs(ASSET, exist_ok=True) # generated visual: autoregulation curves x=np.linspace(40,190,400) def curve(x, lo, hi): return np.clip((x-lo)/(hi-lo),0,1) fig,ax=plt.subplots(figsize=(10,4.6),dpi=200) ax.plot(x,curve(x,55,150),lw=4,color='#31C6C8',label='Normotension') ax.plot(x,curve(x,85,180),lw=4,color='#E4A64B',label='Chronic hypertension') ax.axvline(95,color='#D65A62',lw=2,ls='--'); ax.text(97,.1,'Abrupt reduction\nto MAP 95',color='#8E2630',fontsize=10) ax.fill_between(x,0,curve(x,55,150),color='#31C6C8',alpha=.08) ax.set(xlim=(40,190),ylim=(-.05,1.13),xlabel='Mean arterial pressure (mm Hg)',ylabel='Relative cerebral blood flow') ax.spines[['top','right']].set_visible(False); ax.grid(alpha=.18); ax.legend(frameon=False,loc='upper left') ax.text(43,-.02,'Hypoperfusion risk if pressure falls below the patient\'s shifted lower autoregulatory limit',fontsize=9,color='#26354A') fig.tight_layout(); fig.savefig(ASSET+'/autoregulation.png',transparent=True); plt.close(fig) # raas flow diagram fig,ax=plt.subplots(figsize=(10,4.8),dpi=200); ax.axis('off'); ax.set_xlim(0,10); ax.set_ylim(0,5) boxes=[(0.3,3.6,2.1,0.8,'↓ renal perfusion\n↓ NaCl at macula densa'),(3.0,3.6,1.5,.8,'Renin'),(5.15,3.6,1.65,.8,'Angiotensin II'),(7.55,3.95,1.9,.7,'Arteriolar\nvasoconstriction'),(7.55,2.65,1.9,.7,'Aldosterone + ADH\nNa+/water retention'),(4.45,.7,2.5,.85,'↑ ECF volume + ↑ TPR\n→ ↑ arterial pressure')] for x0,y,w,h,t in boxes: r=plt.Rectangle((x0,y),w,h,fc='#103D62' if 'Angiotensin' not in t else '#C06C46',ec='none',radius=.1) ax.add_patch(r); ax.text(x0+w/2,y+h/2,t,ha='center',va='center',color='white',fontsize=11,weight='bold') def arr(a,b): ax.annotate('',xy=b,xytext=a,arrowprops=dict(arrowstyle='->',lw=2.5,color='#31C6C8')) arr((2.4,4),(3,4));arr((4.5,4),(5.15,4));arr((6.8,4),(7.55,4.3));arr((6,3.6),(7.55,3));arr((8.5,2.65),(6.8,1.55));arr((8.5,3.95),(6.8,1.55)) ax.text(.3,.35,'Longer-term blood pressure control: renal sodium balance is the dominant determinant of extracellular volume.',fontsize=11,color='#26354A') fig.tight_layout();fig.savefig(ASSET+'/raas.png',transparent=True);plt.close(fig) # class helpers prs=Presentation(); prs.slide_width=Inches(13.333); prs.slide_height=Inches(7.5) blank=prs.slide_layouts[6] NAVY='#092C4C'; INK='#142B42'; MUTED='#607080'; TEAL='#21A8AE'; LIGHT='#F3F7FA'; ORANGE='#E79140'; RED='#C95157'; GREEN='#4A9C78'; WHITE='#FFFFFF'; BLUE='#2B6E9D' def rgb(h): h=h.lstrip('#'); return RGBColor(*tuple(int(h[i:i+2],16) for i in (0,2,4))) def rect(sl,x,y,w,h,fill,rad=False,line=None): s=sl.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE if rad else MSO_SHAPE.RECTANGLE, Inches(x), Inches(y), Inches(w), Inches(h)); s.fill.solid();s.fill.fore_color.rgb=rgb(fill);s.line.color.rgb=rgb(line or fill); return s def tx(sl,x,y,w,h,text,size=18,color=INK,bold=False,align=None,margin=.04): t=sl.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h)); tf=t.text_frame;tf.clear();tf.word_wrap=True;tf.margin_left=tf.margin_right=Inches(margin);tf.margin_top=tf.margin_bottom=Inches(margin); tf.vertical_anchor=MSO_ANCHOR.TOP for i,line in enumerate(text.split('\n')): p=tf.paragraphs[0] if i==0 else tf.add_paragraph();p.text=line;p.font.name='Aptos';p.font.size=Pt(size);p.font.bold=bold;p.font.color.rgb=rgb(color);p.space_after=Pt(5) if align:p.alignment=align return t def title(sl,kicker,heading,subtitle=None): tx(sl,.58,.35,12.1,.25,kicker.upper(),9,TEAL,True) tx(sl,.58,.65,12.0,.58,heading,28,NAVY,True) if subtitle: tx(sl,.6,1.27,12,.42,subtitle,12,MUTED) def footer(sl,n,source='Educational deck for postgraduate internal medicine'): rect(sl,.55,7.15,12.2,.012,'#D9E4EB');tx(sl,.58,7.22,10.8,.18,source,7,MUTED);tx(sl,12.15,7.18,.55,.2,f'{n:02d}',9,TEAL,True,PP_ALIGN.RIGHT) def bullet(sl,x,y,w,h,items,size=16,color=INK): t=sl.shapes.add_textbox(Inches(x),Inches(y),Inches(w),Inches(h));tf=t.text_frame;tf.clear();tf.word_wrap=True;tf.margin_left=Inches(.05);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='Aptos';p.font.size=Pt(size);p.font.color.rgb=rgb(color);p.space_after=Pt(9);p.text='• '+item return t def card(sl,x,y,w,h,head,body,accent=TEAL): rect(sl,x,y,w,h,WHITE,True,'#D7E2E9'); rect(sl,x,y,.10,h,accent);tx(sl,x+.25,y+.18,w-.4,.3,head,14,NAVY,True);tx(sl,x+.25,y+.62,w-.4,h-.75,body,12,INK) def add_image(sl,path,x,y,w,h): sl.shapes.add_picture(path, Inches(x), Inches(y), width=Inches(w), height=Inches(h)) # slides sl=prs.slides.add_slide(blank); rect(sl,0,0,13.333,7.5,NAVY);rect(sl,.65,.8,.11,5.8,TEAL);tx(sl,1.05,1.0,10.8,.36,'POSTGRADUATE INTERNAL MEDICINE',13,'#8BD8D9',True);tx(sl,1.02,1.65,10.8,1.25,'Hypertension\nand hypertensive crises',39,WHITE,True);tx(sl,1.05,3.25,8.9,.6,'Physiological blood pressure control, chronic management,\nand time-critical decisions in acute severe hypertension',18,'#D6E4EB');rect(sl,1.05,5.15,4.2,.65,'#174C71',True);tx(sl,1.28,5.34,3.7,.25,'A case-led, guideline-aware teaching deck',12,WHITE,True);footer(sl,1,'Prepared for postgraduate internal medicine teaching') sl=prs.slides.add_slide(blank);title(sl,'Learning objectives','What you should be able to do'); for i,(h,b,c) in enumerate([('Explain','Derive BP from CO × SVR and connect neural, renal and hormonal control systems.',TEAL),('Diagnose','Separate severe asymptomatic BP elevation from a hypertensive emergency by acute target-organ damage.',ORANGE),('Treat safely','Choose context-specific IV therapy, targets and monitoring while avoiding hypoperfusion.',RED),('Prevent recurrence','Investigate secondary causes, optimize chronic therapy and address adherence.',GREEN)]): card(sl,.7+(i%2)*6.1,1.9+(i//2)*2.0,5.55,1.55,h,b,c) footer(sl,2) sl=prs.slides.add_slide(blank);title(sl,'Start with a case','The number is alarming. Is this an emergency?');rect(sl,.65,1.72,4.0,4.8,LIGHT,True);tx(sl,.95,2.05,3.4,.35,'ED referral',17,NAVY,True);tx(sl,.95,2.62,3.35,2.6,'56-year-old man\nBP 228/132 mm Hg, repeated manually\nSevere headache, vomiting, new confusion\nFundoscopy: retinal hemorrhages and disc swelling\nCreatinine rising',18,INK);rect(sl,5.2,1.72,7.45,1.1,'#FFF4ED',True);tx(sl,5.55,1.99,6.7,.52,'Question 1: Is BP elevation causing acute organ injury?',20,'#9A4A1A',True);card(sl,5.2,3.15,3.45,2.1,'Answer','Yes: neurological dysfunction + acute retinopathy + AKI strongly support hypertensive emergency.',RED);card(sl,9.0,3.15,3.45,2.1,'Immediate priorities','ABC, repeat BP in both arms, IV access, ECG, urine, renal function, focused brain/heart/aorta assessment.',TEAL);tx(sl,5.3,5.9,7.1,.6,'Treat the patient and the syndrome, not a threshold alone.',18,NAVY,True);footer(sl,3,'Adapted from Tintinalli’s Emergency Medicine, Ch. 57') sl=prs.slides.add_slide(blank);title(sl,'Core physiology','Arterial pressure is a flow-resistance problem');rect(sl,.75,1.8,11.8,1.2,NAVY,True);tx(sl,1.1,2.05,11.1,.55,'Mean arterial pressure ≈ cardiac output × systemic vascular resistance',28,WHITE,True,PP_ALIGN.CENTER);card(sl,.8,3.5,3.6,2.45,'Cardiac output','Heart rate × stroke volume\n• preload\n• contractility\n• venous return',TEAL);card(sl,4.85,3.5,3.6,2.45,'Systemic vascular resistance','Arteriolar tone\n• sympathetic activity\n• endothelial mediators\n• angiotensin II',ORANGE);card(sl,8.9,3.5,3.6,2.45,'Volume and sodium','Extracellular volume\n• renal perfusion\n• pressure natriuresis\n• aldosterone / ADH',GREEN);tx(sl,.85,6.35,11.5,.32,'MAP is commonly approximated as DBP + 1/3 pulse pressure at normal heart rate. Formula is useful, not complete physiology.',11,MUTED);footer(sl,4,'Costanzo Physiology, 7e, pp. 168-170') sl=prs.slides.add_slide(blank);title(sl,'Fast control','The baroreflex stabilizes pressure within seconds'); # neural diagram for x,y,w,h,text,c in [(.75,3.0,2.0,.85,'Carotid sinus\n+ aortic arch',BLUE),(3.25,3.0,2.0,.85,'CN IX and X\nNTS, medulla',NAVY),(5.8,2.05,2.15,.8,'↓ sympathetic\n↑ vagal tone',TEAL),(5.8,4.0,2.15,.8,'Arterioles\nHeart\nVeins',ORANGE),(9.0,3.0,2.7,.85,'↓ HR, ↓ contractility\n↓ SVR, ↓ venous tone',GREEN)]: rect(sl,x,y,w,h,c,True);tx(sl,x+.12,y+.16,w-.24,h-.25,text,14,WHITE,True,PP_ALIGN.CENTER) for a,b in [((2.75,3.42),(3.25,3.42)),((5.25,3.42),(5.8,2.45)),((6.85,2.85),(6.85,4.0)),((7.95,4.4),(9,3.42))]: ln=sl.shapes.add_connector(MSO_CONNECTOR.STRAIGHT,Inches(a[0]),Inches(a[1]), Inches(b[0]),Inches(b[1]));ln.line.color.rgb=rgb(TEAL);ln.line.width=Pt(2.5) tx(sl,.78,1.8,11.5,.6,'↑ arterial stretch → ↑ afferent firing → medullary integration → reduced sympathetic outflow and increased vagal outflow',17,INK,True);rect(sl,.75,5.55,11.9,.68,'#E9F5F5',True);tx(sl,1.0,5.76,11.35,.25,'In chronic hypertension, baroreceptors reset: excellent buffering of short-term perturbations, poor long-term BP correction.',13,NAVY,True);footer(sl,5,'Costanzo Physiology, 7e, pp. 168-171') sl=prs.slides.add_slide(blank);title(sl,'Slow control','Kidney and RAAS determine long-term pressure');add_image(sl,ASSET+'/raas.png',.75,1.6,11.8,5.7);footer(sl,6,'Costanzo Physiology, 7e, pp. 168-172') sl=prs.slides.add_slide(blank);title(sl,'Other modulators','The physiological systems that shift the BP set point'); for i,(h,b,c) in enumerate([('Endothelium','NO and prostacyclin relax vessels. Endothelin and oxidative stress promote vasoconstriction and remodeling.',TEAL),('SNS and stress','Catecholamine tone raises HR, contractility, renin release and arteriolar tone. Sleep apnea sustains sympathetic drive.',ORANGE),('Natriuretic peptides','ANP/BNP support natriuresis and vasodilation, countering RAAS. Their effect can be overwhelmed in salt-sensitive states.',GREEN),('Vasopressin','Water retention via V2, vasoconstriction via V1. Most relevant in marked volume or osmotic stress.',BLUE)]): card(sl,.7+(i%2)*6.1,1.8+(i//2)*2.3,5.65,1.85,h,b,c) footer(sl,7,'Costanzo Physiology, 7e; Guyton and Hall Textbook of Medical Physiology') sl=prs.slides.add_slide(blank);title(sl,'From physiology to disease','Why BP becomes persistently elevated'); bullet(sl,.75,1.75,6.0,4.8,['Genetic susceptibility plus dietary sodium, obesity, sedentary behavior, alcohol and psychosocial stress','Renal sodium handling and impaired pressure natriuresis establish volume-dependent hypertension','Neurohormonal activation and endothelial dysfunction sustain arteriolar constriction','Vascular remodeling and arterial stiffness amplify pulse pressure and accelerate target-organ injury'],17) rect(sl,7.05,1.75,5.5,4.75,'#F3F8FA',True);tx(sl,7.42,2.1,4.7,.35,'Clinical phenotype clues',17,NAVY,True);bullet(sl,7.4,2.75,4.6,3.1,['Young age, abrupt onset or hypokalemia → consider secondary cause','Resistant hypertension → check adherence, measurement, drugs, OSA, primary aldosteronism and renovascular disease','Wide pulse pressure in older adults → stiff large arteries'],15) footer(sl,8) sl=prs.slides.add_slide(blank);title(sl,'Confirm the diagnosis','Measurement is an intervention');card(sl,.75,1.8,3.7,3.9,'Office measurement','Validated upper-arm cuff\nCorrect cuff size\n5 min rest, seated\n2+ readings, 2+ visits\nBoth arms initially',TEAL);card(sl,4.8,1.8,3.7,3.9,'Out-of-office BP','Home BP or ABPM confirms diagnosis, detects white-coat and masked hypertension, and guides titration.',ORANGE);card(sl,8.85,1.8,3.7,3.9,'Baseline evaluation','Urinalysis/UACR, electrolytes, creatinine/eGFR, glucose/HbA1c, lipids, ECG. Assess global CV risk and target-organ damage.',GREEN);tx(sl,.8,6.3,11.5,.35,'Do not label apparent treatment resistance until technique, adherence, interfering substances and out-of-office BP have been assessed.',14,NAVY,True);footer(sl,9,'2024 ESC hypertension guideline') sl=prs.slides.add_slide(blank);title(sl,'Chronic management','A practical long-term treatment architecture'); rect(sl,.7,1.7,12,1.0,NAVY,True);tx(sl,1.0,1.99,11.4,.42,'Lifestyle measures for every patient + risk-based pharmacotherapy + sustained follow-up',21,WHITE,True,PP_ALIGN.CENTER) for i,(h,b,c) in enumerate([('First-line foundation','ACE inhibitor or ARB + dihydropyridine CCB and/or thiazide-like diuretic. Prefer single-pill combinations when appropriate.',TEAL),('Target and follow-up','Individualize target to comorbidity, frailty, symptoms and measurement method. Verify standing BP when clinically indicated.',ORANGE),('Resistant hypertension','Confirm true resistance. Add mineralocorticoid receptor antagonist if suitable, then phenotype-directed therapy and specialist review.',RED)]):card(sl,.7+i*4.05,3.25,3.7,2.4,h,b,c) footer(sl,10,'2024 ESC Guidelines for elevated BP and hypertension') sl=prs.slides.add_slide(blank);title(sl,'Definition','A hypertensive emergency is defined by acute injury, not BP alone');rect(sl,.75,1.75,5.55,3.95,'#FFF1F1',True);tx(sl,1.08,2.1,4.85,.4,'Hypertensive emergency',20,RED,True);tx(sl,1.1,2.75,4.75,1.7,'Severe BP elevation, usually ≥180/120 mm Hg, WITH acute hypertension-mediated target-organ damage.',23,NAVY,True);tx(sl,1.1,4.8,4.75,.44,'Requires monitored, titratable, syndrome-specific therapy.',14,RED,True);rect(sl,6.75,1.75,5.8,3.95,'#F4F8FA',True);tx(sl,7.08,2.1,5.1,.4,'Severe asymptomatic elevation',20,BLUE,True);tx(sl,7.1,2.75,4.95,1.7,'Severe BP elevation WITHOUT acute target-organ damage. Do not use reflex IV treatment or chase a normal BP in the ED.',21,NAVY,True);tx(sl,7.1,4.8,4.8,.44,'Restart/intensify oral treatment and arrange timely follow-up.',14,BLUE,True);footer(sl,11,'Tintinalli’s Emergency Medicine, Ch. 57; Rosen’s Emergency Medicine, Ch. 70') sl=prs.slides.add_slide(blank);title(sl,'Recognize acute target-organ damage','The organ system identifies the emergency'); for i,(h,b,bg) in enumerate([('Brain','Hypertensive encephalopathy\nICH/SAH\nAcute ischemic stroke', '#EDF7FA'),('Heart and lungs','Acute pulmonary edema\nACS / myocardial ischemia\nAcute HF', '#FFF4ED'),('Aorta','Acute aortic syndrome\nAbrupt chest/back pain\nPulse or BP differential', '#FFF1F1'),('Kidney / microvasculature','AKI, hematuria/proteinuria\nMAHA / thrombocytopenia\nRetinal hemorrhage / papilledema', '#F0F7F2')]): x=.75+(i%2)*6.1;y=1.72+(i//2)*2.15;rect(sl,x,y,5.65,1.72,bg,True);tx(sl,x+.27,y+.2,5,.3,h,16,NAVY,True);tx(sl,x+.27,y+.68,5.1,.8,b,14,INK) footer(sl,12,'Tintinalli’s Emergency Medicine, Ch. 57') sl=prs.slides.add_slide(blank);title(sl,'First 15 minutes','Stabilize, phenotype, then lower BP intelligently'); steps=[('1','ABC and monitor','Cardiac monitor, SpO2, IV access, frequent BP. Recheck manually and in both arms when aortic disease is possible.'),('2','Focused assessment','Neuro exam, fundus, volume status, chest/back pain, pregnancy context, medication/substance history.'),('3','Targeted tests','ECG, troponin as indicated, creatinine/electrolytes, urinalysis, CBC/smear when MAHA suspected, CXR, CT/CTA as syndrome-directed.'),('4','Titrate therapy','ICU/step-down setting. Use a short-acting IV agent matching the organ syndrome. Treat pain, hypoxia, withdrawal or catecholamine excess.')] for i,(n,h,b) in enumerate(steps): y=1.62+i*1.28;rect(sl,.75,y,.62,.62,TEAL if i<2 else ORANGE,True);tx(sl,.94,y+.15,.22,.2,n,15,WHITE,True,PP_ALIGN.CENTER);tx(sl,1.62,y-.02,2.1,.3,h,16,NAVY,True);tx(sl,3.7,y-.03,8.55,.65,b,13,INK) footer(sl,13,'Rosen’s Emergency Medicine, Ch. 70') sl=prs.slides.add_slide(blank);title(sl,'Default BP trajectory','Why rapid normalization can harm');add_image(sl,ASSET+'/autoregulation.png',.8,1.62,7.1,4.6);card(sl,8.25,1.85,3.95,1.3,'Typical non-aortic emergency','Lower MAP by no more than about 20%-25% in the first hour.',TEAL);card(sl,8.25,3.4,3.95,1.3,'Then','If stable, toward ~160/100-110 mm Hg over the next 2-6 hours, with further gradual reduction over 24-48 hours.',ORANGE);card(sl,8.25,4.95,3.95,1.15,'Exceptions','Aortic dissection, selected stroke scenarios, pulmonary edema and preeclampsia require specific targets.',RED);footer(sl,14,'Rosen’s Emergency Medicine, Ch. 70, Fig. 70.2 and text') sl=prs.slides.add_slide(blank);title(sl,'Drug selection','Match the infusion to the clinical syndrome'); data=[('Nicardipine / clevidipine','Arterial vasodilation; highly titratable','Most neurologic emergencies, general use','Caution in acute decompensated HFrEF'),('Labetalol / esmolol','β blockade ± α blockade','Aortic syndrome, pregnancy, selected neurologic syndromes','Avoid or use caution: bradycardia, bronchospasm, acute HF'),('Nitroglycerin','Venodilation > arterial dilation','Acute pulmonary edema, ACS','Not a general-purpose BP drug'),('Nitroprusside','Balanced arterial and venous dilation','Selected refractory cases with close monitoring','Toxicity risk; avoid routine use, caution renal/hepatic failure'),('Hydralazine','Direct arteriolar dilation','Alternative in pregnancy, but less predictable','Avoid routine nonpregnant emergency use')] # table x0=.65; widths=[2.25,2.65,3.25,3.75]; heads=['Agent','Mechanism','Best fit','Key caveat']; for j,w in enumerate(widths):rect(sl,x0+sum(widths[:j]),1.65,w,.58,NAVY);tx(sl,x0+sum(widths[:j])+.08,1.83,w-.16,.18,heads[j],11,WHITE,True) y=2.23 for i,row in enumerate(data): bg='#F3F7FA' if i%2==0 else '#FFFFFF'; x=x0 for j,(w,t) in enumerate(zip(widths,row)): rect(sl,x,y,w,.78,bg);tx(sl,x+.08,y+.10,w-.16,.58,t,10.5,INK, j==0);x+=w y+=.78 footer(sl,15,'Drug choice must follow local formulary, contraindications and specialist pathway') sl=prs.slides.add_slide(blank);title(sl,'Syndrome-specific targets','The exceptions are where errors are most costly'); items=[('Acute aortic syndrome','HR <60 bpm first with IV β blockade, then SBP <120 mm Hg if perfusion allows. Reduce shear stress, not only pressure.',RED),('Acute cardiogenic pulmonary edema','Rapid afterload/preload reduction with nitrates, noninvasive ventilation when needed, and diuresis where congested.',ORANGE),('Hypertensive encephalopathy','Controlled MAP reduction, typically 20%-25% in the first hour. Diagnose alternative neurologic emergencies in parallel.',TEAL),('Acute ischemic stroke','Thresholds depend on thrombolysis/thrombectomy candidacy. Avoid routine lowering unless indicated by stroke protocol or very high BP.',BLUE),('ICH / SAH','Use disease-specific neurocritical-care targets. Preserve cerebral perfusion and avoid variability.',GREEN),('Preeclampsia / eclampsia','Urgently treat sustained severe BP. Magnesium sulfate for seizure prophylaxis/treatment; obstetric coordination is essential.',ORANGE)] for i,(h,b,c) in enumerate(items): card(sl,.65+(i%2)*6.15,1.55+(i//2)*1.68,5.72,1.38,h,b,c) footer(sl,16,'ESC 2024; emergency, neurology, aortic and obstetric syndrome-specific guidelines') sl=prs.slides.add_slide(blank);title(sl,'Hypertensive encephalopathy','Clinical diagnosis: failure of cerebral autoregulation'); card(sl,.75,1.65,3.6,4.7,'Clinical pattern','Severe headache\nNausea/vomiting\nConfusion or reduced consciousness\nVisual symptoms\nSeizures\nOften reversible posterior edema on MRI (PRES)',RED);card(sl,4.85,1.65,3.6,4.7,'Do not miss','ICH, ischemic stroke, CNS infection, toxic-metabolic encephalopathy, eclampsia, TTP/HUS, drug intoxication or withdrawal.',ORANGE);card(sl,8.95,1.65,3.6,4.7,'Management principle','ICU monitoring\nTitrated IV nicardipine, clevidipine or labetalol as appropriate\nAvoid abrupt normalization\nTreat seizures and investigate precipitants',TEAL);footer(sl,17,'Tintinalli’s Emergency Medicine, Ch. 57; Rosen’s Emergency Medicine, Ch. 70') sl=prs.slides.add_slide(blank);title(sl,'Acute aortic syndrome','Impulse control before vasodilation'); rect(sl,.75,1.8,4.15,4.5,'#FFF1F1',True);tx(sl,1.1,2.15,3.45,.4,'Suspect when',18,RED,True);bullet(sl,1.05,2.8,3.55,2.5,['Abrupt severe chest, back or abdominal pain','Pulse deficit, neurologic deficit, new AR','BP differential or shock'],16) rect(sl,5.32,1.8,6.95,1.15,NAVY,True);tx(sl,5.65,2.12,6.25,.4,'1. IV β blocker: reduce HR and dP/dt',20,WHITE,True);rect(sl,5.32,3.22,6.95,1.15,'#174C71',True);tx(sl,5.65,3.54,6.25,.4,'2. Add vasodilator only after HR control',20,WHITE,True);rect(sl,5.32,4.64,6.95,1.15,'#275B7C',True);tx(sl,5.65,4.96,6.25,.4,'3. Aim SBP <120 mm Hg if end-organ perfusion permits',16,WHITE,True);tx(sl,5.38,6.3,6.7,.35,'Urgent CTA/TEE and cardiothoracic or vascular consultation.',14,NAVY,True);footer(sl,18,'Tintinalli’s Emergency Medicine, Ch. 57') sl=prs.slides.add_slide(blank);title(sl,'When there is no acute target-organ damage','Avoid iatrogenic harm'); rect(sl,.75,1.7,11.8,1.1,'#F3F8FA',True);tx(sl,1.08,2.02,11.05,.4,'High BP alone is not an indication for IV medication or rapid ED normalization.',21,NAVY,True,PP_ALIGN.CENTER) for i,(h,b,c) in enumerate([('Re-measure and contextualize','Correct cuff/position; repeat after rest; look for pain, urinary retention, anxiety, withdrawal or missed medication.',TEAL),('Exclude emergency','Symptoms trigger targeted exam and testing. Vague symptoms alone do not establish acute hypertensive organ injury.',ORANGE),('Restore chronic control','Reinstitute or optimize oral therapy, educate, address adherence and interacting substances, and ensure follow-up.',GREEN)]): card(sl,.75+i*4.0,3.25,3.65,2.35,h,b,c) footer(sl,19,'Rosen’s Emergency Medicine, Ch. 70') sl=prs.slides.add_slide(blank);title(sl,'After the crisis','Search for precipitant and secondary hypertension'); left=['Medication nonadherence or withdrawal (clonidine, β blocker)','NSAIDs, glucocorticoids, calcineurin inhibitors, sympathomimetics, cocaine/amphetamines','Renal parenchymal disease or renal artery stenosis','Primary aldosteronism, pheochromocytoma/paraganglioma, Cushing syndrome, thyroid disease','Obstructive sleep apnea, pregnancy-related hypertension'] bullet(sl,.75,1.75,6.2,4.75,left,15);rect(sl,7.25,1.75,5.2,4.75,'#F5FAFB',True);tx(sl,7.62,2.08,4.4,.35,'Discharge bridge',17,NAVY,True);bullet(sl,7.58,2.72,4.35,2.9,['Document home BP plan and escalation thresholds','Medication reconciliation with affordability review','Renal function/electrolyte checks after relevant changes','Prompt outpatient review and cardiovascular risk reduction'],14) footer(sl,20) sl=prs.slides.add_slide(blank);title(sl,'Return to the opening case','A safe management plan'); for i,(h,b,c) in enumerate([('Diagnosis','Hypertensive emergency with encephalopathy, grade 4 retinopathy and acute kidney injury.',RED),('Setting','Resuscitation area or ICU. Continuous monitoring, arterial line where needed, serial neurologic and renal reassessment.',TEAL),('BP target','Controlled initial MAP reduction no more than 20%-25% in the first hour, unless a syndrome-specific diagnosis modifies this target.',ORANGE),('Treatment','Titrated IV nicardipine or labetalol after contraindications assessed. Investigate precipitant and exclude ICH/PRES.',GREEN)]): card(sl,.75+(i%2)*6.05,1.65+(i//2)*2.15,5.65,1.75,h,b,c) footer(sl,21) sl=prs.slides.add_slide(blank);title(sl,'Take-home messages','Five rules for the ward, ED and exam'); for i,t in enumerate(['BP is regulated by cardiac output, vascular resistance and renal sodium-volume balance.','Baroreflex is fast; RAAS and kidney dominate long-term pressure control.','Hypertensive emergency = severe elevation plus acute target-organ damage.','Lower BP gradually in most emergencies because chronic hypertension shifts autoregulation.','Exception pathways matter: aorta, stroke, pulmonary edema and pregnancy need condition-specific targets.']): y=1.55+i*1.0;rect(sl,.75,y,.48,.48,TEAL if i<2 else ORANGE,True);tx(sl,.9,y+.10,.18,.2,str(i+1),12,WHITE,True,PP_ALIGN.CENTER);tx(sl,1.45,y-.02,10.8,.55,t,18,NAVY,True) footer(sl,22) sl=prs.slides.add_slide(blank);title(sl,'Selected references','Core sources for further reading'); refs=['McEvoy JW, et al. 2024 ESC Guidelines for the management of elevated blood pressure and hypertension. Eur Heart J. 2024;45:3912-4018.','Tintinalli’s Emergency Medicine: A Comprehensive Study Guide. 9th ed. Chapter 57: Hypertensive Emergencies.','Rosen’s Emergency Medicine: Concepts and Clinical Practice. Chapter 70: Hypertensive emergencies.','Costanzo LS. Physiology. 7th ed. Regulation of arterial pressure and baroreceptor reflex.','2025 systematic review of guidelines for management of extremely high BP: PMID 41390616.'] bullet(sl,.8,1.65,11.8,4.6,refs,16);rect(sl,.8,6.15,11.6,.55,'#E9F5F5',True);tx(sl,1.05,6.31,11,.2,'Educational use only. Local protocols and syndrome-specific specialty guidance supersede generic targets.',11,NAVY,True);footer(sl,23) # metadata prs.core_properties.title='Hypertension and Hypertensive Crises' prs.core_properties.subject='Postgraduate internal medicine education' prs.core_properties.author='Orris' prs.save(OUT) print(OUT) PY python "/tmp/workspace/hypertension-postgraduate-ppt/src/build_deck.py"
~/hypertension-postgraduate-ppt/src/build_deck.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/hypertension-postgraduate-ppt/src/build_deck.py'
python "/tmp/workspace/hypertension-postgraduate-ppt/src/build_deck.py" && python - <<'PY' from pptx import Presentation p='/tmp/workspace/hypertension-postgraduate-ppt/output/Hypertension_and_Hypertensive_Crises_Postgraduate_Internal_Medicine.pptx' prs=Presentation(p) print('slides',len(prs.slides)) for i,s in enumerate(prs.slides,1): texts=[sh.text_frame.text.strip().replace('\n',' | ')[:85] for sh in s.shapes if getattr(sh,'has_text_frame',False) and sh.text_frame.text.strip()] print(i, ' :: '.join(texts[:3])) PY ls -lh "/tmp/workspace/hypertension-postgraduate-ppt/output/Hypertension_and_Hypertensive_Crises_Postgraduate_Internal_Medicine.pptx"
python - <<'PY' from pptx import Presentation p='/tmp/workspace/hypertension-postgraduate-ppt/output/Hypertension_and_Hypertensive_Crises_Postgraduate_Internal_Medicine.pptx' prs=Presentation(p) issues=[] for si,sl in enumerate(prs.slides,1): for sh in sl.shapes: if getattr(sh,'has_text_frame',False): tf=sh.text_frame # basic check for placeholder-like empty and oversized text boxes outside canvas if sh.left < 0 or sh.top < 0 or sh.left+sh.width>prs.slide_width or sh.top+sh.height>prs.slide_height: issues.append((si,'out_of_bounds',tf.text[:40])) print('slides=',len(prs.slides),'shapes=',sum(len(s.shapes) for s in prs.slides),'issues=',issues) PY
Hypertension and Hypertensive Crises Postgraduate Internal Medicine
Presentation · PPTX
POWERPOINT ON HYPERTENSION DEFINITION, RISK FACTORS, CAUSES, CLINICAL FEATURES, INVESTIGATIONS AND DIAGNOSIS, COMPLICATIONS AND MANAGEMENT FOR POSTGRADUATE INTERNAL MEDICINE STUDENTS
POWERPOINT ON HYPERTENSION DEFINITION, RISK FACTORS, CAUSES, CLINICAL FEATURES, INVESTIGATIONS AND DIAGNOSIS, COMPLICATIONS AND MANAGEMENT FOR POSTGRADUATE INTERNAL MEDICINE STUDENTS
hypertension AND management
2024 ESC Guidelines management elevated blood pressure hypertension diagnosis treatment
hypertension target organ damage diagram heart brain kidney retina
~/
mkdir -p "/tmp/workspace/hypertension-core-pg-ppt/src" "/tmp/workspace/hypertension-core-pg-ppt/output" && cat > "/tmp/workspace/hypertension-core-pg-ppt/src/build.py" <<'PY' from pptx import Presentation from pptx.util import Inches, Pt from pptx.dml.color import RGBColor from pptx.enum.shapes import MSO_SHAPE, MSO_CONNECTOR from pptx.enum.text import PP_ALIGN, MSO_ANCHOR from pptx.enum.dml import MSO_LINE_DASH_STYLE import os OUT='/tmp/workspace/hypertension-core-pg-ppt/output/Hypertension_Postgraduate_Internal_Medicine.pptx' prs=Presentation(); prs.slide_width=Inches(13.333); prs.slide_height=Inches(7.5); blank=prs.slide_layouts[6] N='#082B4C'; I='#173047'; M='#617382'; T='#18A8AE'; O='#E78B3B'; R='#C95359'; G='#3E9370'; W='#FFFFFF'; L='#F3F7FA'; B='#2C709E' def C(x): x=x.lstrip('#'); return RGBColor(*[int(x[i:i+2],16) for i in (0,2,4)]) def box(s,x,y,w,h,c,round=True,line=None): q=s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE if round else MSO_SHAPE.RECTANGLE,Inches(x),Inches(y),Inches(w),Inches(h));q.fill.solid();q.fill.fore_color.rgb=C(c);q.line.color.rgb=C(line or c);return q def text(s,x,y,w,h,t,sz=16,col=I,bold=False,align=None): q=s.shapes.add_textbox(Inches(x),Inches(y),Inches(w),Inches(h));f=q.text_frame;f.clear();f.word_wrap=True;f.margin_left=f.margin_right=Inches(.05);f.margin_top=f.margin_bottom=Inches(.03);f.vertical_anchor=MSO_ANCHOR.TOP for j,z in enumerate(t.split('\n')): p=f.paragraphs[0] if j==0 else f.add_paragraph();p.text=z;p.font.name='Aptos';p.font.size=Pt(sz);p.font.bold=bold;p.font.color.rgb=C(col);p.space_after=Pt(4) if align:p.alignment=align return q def head(s,k,h,sub=''): text(s,.55,.27,12,.2,k.upper(),9,T,True);text(s,.55,.56,12.1,.55,h,27,N,True) if sub:text(s,.57,1.13,12,.3,sub,11,M) def foot(s,n,source='Postgraduate internal medicine teaching deck'): box(s,.55,7.13,12.2,.012,'#D8E4EA',False);text(s,.56,7.19,10.8,.15,source,7,M);text(s,12.1,7.17,.6,.2,str(n).zfill(2),9,T,True,PP_ALIGN.RIGHT) def card(s,x,y,w,h,h1,b,c=T): box(s,x,y,w,h,W,True,'#D7E3E9');box(s,x,y,.1,h,c,False);text(s,x+.22,y+.16,w-.34,.28,h1,14,N,True);text(s,x+.22,y+.56,w-.34,h-.68,b,11.5,I) def bullets(s,x,y,w,h,a,sz=15): text(s,x,y,w,h,'\n'.join('• '+z for z in a),sz,I) def line(s,a,b,c=T,w=2): q=s.shapes.add_connector(MSO_CONNECTOR.STRAIGHT,Inches(a[0]),Inches(a[1]), Inches(b[0]), Inches(b[1]));q.line.color.rgb=C(c);q.line.width=Pt(w) #1 s=prs.slides.add_slide(blank);box(s,0,0,13.333,7.5,N,False);box(s,.7,.75,.12,5.9,T,False);text(s,1.05,.92,11,.25,'POSTGRADUATE INTERNAL MEDICINE',13,'#8CD9DA',True);text(s,1.04,1.52,10.5,1.1,'Hypertension',42,W,True);text(s,1.06,2.73,10.5,.5,'Definition, risk factors, causes, clinical features, diagnosis, complications and management',18,'#DCE8EE');box(s,1.06,4.3,5.0,.68,'#174C70',True);text(s,1.32,4.5,4.55,.2,'Clinical reasoning from BP measurement to long-term prevention',11,W,True);foot(s,1) #2 s=prs.slides.add_slide(blank);head(s,'Learning objectives','By the end of this session'); for i,(h,b,c) in enumerate([('Define','Use contemporary office and out-of-office BP concepts.',T),('Recognize','Identify risk factors, primary hypertension and secondary causes.',O),('Diagnose','Confirm BP elevation, quantify risk and evaluate organ damage.',B),('Treat','Build lifestyle and pharmacological plans tailored to risk and comorbidity.',G)]):card(s,.7+(i%2)*6.1,1.75+(i//2)*2.1,5.65,1.62,h,b,c) foot(s,2) #3 s=prs.slides.add_slide(blank);head(s,'Definition','Hypertension is sustained elevation of arterial blood pressure'); box(s,.72,1.62,5.55,3.9,'#EFF7F8',True);text(s,1.05,1.98,4.8,.32,'Office BP categories',18,N,True) for i,(a,b,c) in enumerate([('Normal','<120 and <80',G),('Elevated','120-129 and <80',O),('Stage 1','130-139 or 80-89',O),('Stage 2','≥140 or ≥90',R)]): y=2.55+i*.62;box(s,1.05,y,1.46,.4,c,True);text(s,1.13,y+.1,1.3,.16,a,10,W,True,PP_ALIGN.CENTER);text(s,2.75,y+.06,2.6,.23,b,13,I,True) box(s,6.75,1.62,5.85,3.9,'#F7F9FB',True);text(s,7.12,1.98,4.9,.32,'Clinical definition',18,N,True);bullets(s,7.08,2.55,4.9,2.5,['Diagnosis needs repeated, standardized measurements, not one reading.','Confirm with home BP monitoring or 24-hour ABPM where feasible.','BP-related cardiovascular risk is continuous, not binary.'],16);text(s,.82,6.15,11.6,.3,'Thresholds vary across guideline systems. Document the measurement method and use local practice standards.',12,M,True);foot(s,3,'ACC/AHA classification shown; 2024 ESC guideline uses a different simplified classification') #4 s=prs.slides.add_slide(blank);head(s,'Epidemiology and significance','A common, silent and modifiable driver of vascular disease'); box(s,.72,1.6,12,1.0,N,True);text(s,1.0,1.88,11.5,.35,'Risk rises progressively across the BP continuum: brain, heart, kidney, retina and large arteries accumulate injury.',20,W,True,PP_ALIGN.CENTER) for i,(h,b,c) in enumerate([('Often asymptomatic','Diagnosis depends on active screening and accurate measurement.',T),('Usually primary','Multifactorial primary hypertension predominates; secondary causes are important because some are reversible.',O),('High burden','Hypertension is a major modifiable risk factor for stroke, MI, heart failure and kidney failure.',R)]):card(s,.72+i*4.05,3.15,3.7,2.3,h,b,c) foot(s,4,'Harrison’s Principles of Internal Medicine, 22e; Frameworks for Internal Medicine') #5 s=prs.slides.add_slide(blank);head(s,'Risk factors','Separate non-modifiable risk from targets for prevention'); card(s,.7,1.62,5.7,4.8,'Non-modifiable / background','• Increasing age and arterial stiffness\n• Family history and genetic susceptibility\n• Ethnicity and social determinants\n• Low birth weight / developmental exposures\n• Coexisting CKD, diabetes or vascular disease',B) card(s,6.9,1.62,5.7,4.8,'Modifiable factors','• High sodium, low potassium dietary pattern\n• Obesity and physical inactivity\n• Excess alcohol; smoking adds CV risk\n• Obstructive sleep apnea\n• Stress, poor sleep, socioeconomic barriers\n• BP-raising drugs and substances',O);foot(s,5) #6 s=prs.slides.add_slide(blank);head(s,'Pathogenesis','Primary hypertension is a systems disorder'); # central hub diagram box(s,5.1,2.85,3.1,.85,N,True);text(s,5.42,3.12,2.45,.25,'Sustained BP elevation',17,W,True,PP_ALIGN.CENTER) for x,y,h,b,c in [(1.0,1.75,'Kidney','Impaired sodium excretion\nVolume expansion',T),(9.25,1.75,'Vasculature','Endothelial dysfunction\nArterial stiffness',O),(1.0,4.6,'Neurohormonal','SNS and RAAS activation',B),(9.25,4.6,'Metabolic','Obesity, insulin resistance\nOSA and inflammation',G)]: card(s,x,y,2.9,1.15,h,b,c);line(s,(x+2.9 if x<5 else x,y+.58),(5.1 if x<5 else 8.2,3.27),c) text(s,.9,6.43,11.4,.25,'Mean arterial pressure is determined by cardiac output and systemic vascular resistance; kidney-mediated sodium balance is central to long-term control.',12,M,True);foot(s,6) #7 s=prs.slides.add_slide(blank);head(s,'Causes','Primary versus secondary hypertension'); card(s,.7,1.65,5.6,4.85,'Primary (essential) hypertension','The majority of adult cases. No single cause is identified. Polygenic susceptibility interacts with salt intake, adiposity, neurohormonal activation, renal sodium handling and vascular remodeling.',T) card(s,6.9,1.65,5.6,4.85,'Secondary hypertension','An identifiable, sometimes correctable cause. Think of it in younger patients, abrupt onset, resistant or severe hypertension, hypokalemia, episodic symptoms or disproportionate organ injury.',R);foot(s,7,'Frameworks for Internal Medicine: secondary hypertension affects approximately 5%-10% of hypertensive populations') #8 s=prs.slides.add_slide(blank);head(s,'Secondary causes','A structured differential prevents missed reversible disease'); items=[('Renal / renovascular','CKD, glomerular disease, renal artery stenosis',T),('Endocrine','Primary aldosteronism, thyroid disease, Cushing syndrome, pheochromocytoma',O),('Sleep / structural','Obstructive sleep apnea, coarctation of aorta',B),('Drugs / substances','NSAIDs, steroids, OCPs, calcineurin inhibitors, sympathomimetics, cocaine, alcohol',R)] for i,(h,b,c) in enumerate(items):card(s,.7+(i%2)*6.1,1.6+(i//2)*2.25,5.65,1.75,h,b,c) foot(s,8,'Harrison’s Principles of Internal Medicine, 22e; Fuster and Hurst’s The Heart, 15e') #9 s=prs.slides.add_slide(blank);head(s,'Clinical features','Most patients have no symptoms'); card(s,.7,1.6,3.75,4.85,'Typical presentation','Often detected incidentally during screening, a routine visit or assessment for another illness. Headache, dizziness or fatigue are nonspecific and do not establish causality.',T) card(s,4.8,1.6,3.75,4.85,'Ask actively','Medication adherence, OTC agents, recreational substances, alcohol, sleep symptoms, diet, exercise, pregnancy context and family history of early vascular disease.',O) card(s,8.9,1.6,3.75,4.85,'Red flags','Abrupt chest/back pain, acute dyspnea, focal deficit, confusion, visual loss, seizures, oliguria or pregnancy-associated severe BP require urgent evaluation.',R);foot(s,9) #10 s=prs.slides.add_slide(blank);head(s,'Accurate BP measurement','Do not diagnose measurement error'); for i,(h,b,c) in enumerate([('Prepare','No caffeine/exercise/smoking just beforehand; empty bladder; sit quietly for 5 minutes.',T),('Position','Seated, back supported, feet flat, arm supported at heart level; correct cuff size.',O),('Repeat','Take ≥2 readings and average; obtain readings on ≥2 occasions unless urgency/emergency.',B),('Extend','Measure both arms initially. Use home BP or ABPM to detect white-coat and masked hypertension.',G)]):card(s,.7+(i%2)*6.1,1.63+(i//2)*2.15,5.65,1.63,h,b,c) foot(s,10,'Katzung’s Basic and Clinical Pharmacology, 16e; ESC 2024') #11 s=prs.slides.add_slide(blank);head(s,'Diagnosis','Confirm the phenotype outside the clinic'); box(s,.7,1.58,12,1,N,True);text(s,1.02,1.85,11.3,.3,'Elevated office BP → verify technique → repeat readings → home BP or ABPM when available',20,W,True,PP_ALIGN.CENTER) for i,(h,b,c) in enumerate([('Sustained hypertension','Office and home/ABPM elevated.',T),('White-coat hypertension','Office elevated, out-of-office normal. Monitor because it can progress.',O),('Masked hypertension','Office normal, out-of-office elevated. High-risk phenotype that is easily missed.',R)]):card(s,.7+i*4.05,3.15,3.7,2.4,h,b,c) foot(s,11,'Comprehensive Clinical Nephrology, 7e; Goldman-Cecil Medicine') #12 s=prs.slides.add_slide(blank);head(s,'Initial evaluation','Answer three questions: damage, cause, risk'); card(s,.7,1.6,3.75,4.85,'1. Target-organ damage','History/exam, fundus if indicated, ECG, urinalysis/UACR, creatinine/eGFR. Consider echocardiography and imaging based on phenotype.',T) card(s,4.8,1.6,3.75,4.85,'2. Secondary cause','Age at onset, course, potassium, renal disease, endocrine features, sleep apnea and drug/substance review guide directed testing.',O) card(s,8.9,1.6,3.75,4.85,'3. Global risk','Diabetes, smoking, lipids, CKD, established ASCVD, family history and lifestyle determine treatment intensity.',G);foot(s,12) #13 s=prs.slides.add_slide(blank);head(s,'Investigations','Baseline tests and directed second-line testing'); box(s,.7,1.57,5.72,4.95,'#F3F8FA',True);text(s,1.0,1.88,5,.3,'Baseline panel',17,N,True);bullets(s,1.0,2.45,4.9,3.4,['CBC','Na+, K+, Ca2+, creatinine and eGFR','Fasting glucose or HbA1c; lipid profile','TSH','Urinalysis and urine albumin:creatinine ratio','12-lead ECG'],15) box(s,6.85,1.57,5.72,4.95,'#FFF7F0',True);text(s,7.15,1.88,5,.3,'Directed testing',17,N,True);bullets(s,7.15,2.45,4.85,3.5,['Aldosterone-renin ratio if primary aldosteronism suspected','Renal ultrasound / renovascular imaging when indicated','Plasma or urinary metanephrines for catecholamine phenotype','Sleep study for OSA phenotype','Echocardiography, fundoscopy or vascular imaging for target-organ assessment'],14) foot(s,13,'Harrison’s Principles of Internal Medicine, 22e, Laboratory and other investigations') #14 s=prs.slides.add_slide(blank);head(s,'Hypertension-mediated organ damage','Persistent pressure damages the vascular tree'); for i,(h,b,c) in enumerate([('Brain','TIA/stroke, intracerebral hemorrhage, vascular cognitive impairment',R),('Heart','LVH, CAD/MI, heart failure, atrial fibrillation',O),('Kidney','Albuminuria, progressive CKD, kidney failure',T),('Eye / vessels','Hypertensive retinopathy, peripheral artery disease, aortic disease',B)]):card(s,.7+(i%2)*6.1,1.55+(i//2)*2.2,5.65,1.7,h,b,c) foot(s,14,'Frameworks for Internal Medicine: hypertension is a key risk factor for stroke, MI, HF and kidney failure') #15 s=prs.slides.add_slide(blank);head(s,'Non-pharmacological management','Every treatment plan begins here'); for i,(h,b,c) in enumerate([('Diet','DASH-style dietary pattern; reduce sodium; adequate dietary potassium when safe.',T),('Weight and activity','Weight reduction when indicated; regular aerobic and resistance exercise.',G),('Alcohol and tobacco','Limit alcohol. Stop tobacco to reduce overall cardiovascular risk.',O),('Sleep and adherence','Evaluate/treat OSA; simplify regimens; home monitoring and shared decisions improve persistence.',B)]):card(s,.7+(i%2)*6.1,1.55+(i//2)*2.2,5.65,1.7,h,b,c) foot(s,15,'2024 ESC guideline: patient-centred care and out-of-office BP emphasis') #16 s=prs.slides.add_slide(blank);head(s,'Drug therapy','Use complementary mechanisms and simplify the regimen'); card(s,.7,1.58,3.75,4.85,'Core first-line classes','ACE inhibitor or ARB\nDihydropyridine calcium-channel blocker\nThiazide or thiazide-like diuretic\n\nSelect based on comorbidity, renal function, potassium, tolerance, access and pregnancy potential.',T) card(s,4.8,1.58,3.75,4.85,'Combination approach','Many patients need ≥2 agents. Combination therapy improves BP reduction; single-pill combinations can improve adherence. Do not combine ACE inhibitor with ARB.',O) card(s,8.9,1.58,3.75,4.85,'Phenotype-directed additions','β blocker: compelling cardiac indications.\nMineralocorticoid receptor antagonist: resistant hypertension when appropriate.\nLoop diuretic: volume overload / advanced CKD context.',G);foot(s,16,'2024 ESC guideline. Individualize and follow local prescribing guidance.') #17 s=prs.slides.add_slide(blank);head(s,'A practical chronic care algorithm','Confirm, stratify, treat and remeasure'); steps=[('1','Confirm','Validated office and out-of-office measurements.'),('2','Assess','Risk, target-organ damage, comorbidities and secondary causes.'),('3','Intervene','Lifestyle for all; pharmacotherapy based on BP level and cardiovascular risk.'),('4','Titrate','Review home/office BP, symptoms, adherence, electrolytes and renal function.'),('5','Sustain','Simplify, address barriers, monitor for complications and reinforce prevention.')] for i,(n,h,b) in enumerate(steps): x=.7+i*2.43;box(s,x,2.3,2.12,2.45,'#F3F8FA',True);box(s,x+.72,2.0,.62,.62,T if i<3 else O,True);text(s,x+.89,2.16,.25,.2,n,14,W,True,PP_ALIGN.CENTER);text(s,x+.25,2.92,1.62,.25,h,15,N,True,PP_ALIGN.CENTER);text(s,x+.19,3.38,1.75,.85,b,10.5,I,False,PP_ALIGN.CENTER) if i<4:line(s,(x+2.13,3.52),(x+2.42,3.52),T,2) foot(s,17) #18 s=prs.slides.add_slide(blank);head(s,'Resistant hypertension','Confirm true resistance before escalating'); card(s,.7,1.6,3.75,4.85,'Definition concept','Above-target BP despite an appropriate multi-drug regimen including a diuretic, or controlled BP requiring multiple agents. Definitions vary by guideline.',R) card(s,4.8,1.6,3.75,4.85,'Exclude pseudoresistance','Poor technique, white-coat effect, nonadherence, inadequate dose, interfering drugs/substances and excess sodium.',O) card(s,8.9,1.6,3.75,4.85,'Next steps','Assess secondary causes, especially primary aldosteronism and OSA. Optimize diuretic strategy and consider an MRA where suitable. Refer complex cases.',T);foot(s,18,'ESC 2024 guideline; specialist assessment is appropriate for complex resistant hypertension') #19 s=prs.slides.add_slide(blank);head(s,'Hypertensive emergency','Severe BP with acute target-organ damage is a different pathway'); box(s,.7,1.6,5.55,4.8,'#FFF1F1',True);text(s,1.05,1.95,4.85,.35,'Emergency',20,R,True);bullets(s,1.05,2.55,4.7,2.9,['Acute neurologic syndrome, pulmonary edema, ACS, aortic syndrome, AKI, retinal injury or pregnancy-related emergency','ICU-level monitoring and syndrome-specific titratable IV therapy','Avoid abrupt normalization except in specific conditions such as acute aortic syndrome'],15) box(s,6.8,1.6,5.55,4.8,'#F3F8FA',True);text(s,7.15,1.95,4.85,.35,'Severe asymptomatic BP elevation',20,B,True);bullets(s,7.15,2.55,4.65,2.9,['No acute target-organ damage','Do not reflexively use IV drugs or seek rapid normalization','Recheck measurement, address pain/anxiety/medication lapse, optimize oral therapy and arrange close follow-up'],15);foot(s,19,'Tintinalli’s Emergency Medicine; Rosen’s Emergency Medicine') #20 s=prs.slides.add_slide(blank);head(s,'Key takeaways','What to remember in clinic, on call and in examinations'); for i,t in enumerate(['Hypertension is confirmed sustained BP elevation, ideally with standardized and out-of-office measurements.','Most disease is primary, but identify secondary causes in the right phenotype.','Evaluation must assess measurement, cardiovascular risk, target-organ damage and reversible contributors.','Management is lifestyle plus appropriately selected and titrated medication, supported by adherence and follow-up.','Protect the brain, heart, kidney and vessels through long-term BP control, not a single reading.']): y=1.5+i*1.0;box(s,.73,y,.5,.5,T if i<3 else O,True);text(s,.9,y+.12,.18,.2,str(i+1),12,W,True,PP_ALIGN.CENTER);text(s,1.45,y-.02,10.9,.53,t,17,N,True) foot(s,20) #21 s=prs.slides.add_slide(blank);head(s,'Selected references','Core source material'); bullets(s,.75,1.55,11.8,4.9,['McEvoy JW, et al. 2024 ESC Guidelines for the management of elevated blood pressure and hypertension. Eur Heart J. 2024;45:3912-4018.','Harrison’s Principles of Internal Medicine. 22nd ed. Hypertension and secondary hypertension chapters.','Katzung BG. Basic and Clinical Pharmacology. 16th ed. Hypertension and regulation of BP.','Frameworks for Internal Medicine. Secondary hypertension and clinical significance.','Vempati R, et al. Current guidelines in hypertension management with special focus on extremely high blood pressure: systematic review. BMC Cardiovasc Disord. 2025. PMID: 41390616.'],15) box(s,.75,6.28,11.75,.45,'#EAF6F6',True);text(s,1.0,6.4,11.3,.15,'Use current local protocols and patient-specific specialist guidance for prescribing, BP targets and emergency care.',10,N,True);foot(s,21) prs.core_properties.title='Hypertension for Postgraduate Internal Medicine Students';prs.core_properties.author='Orris';prs.core_properties.subject='Postgraduate medicine teaching';prs.save(OUT);print(OUT) PY python "/tmp/workspace/hypertension-core-pg-ppt/src/build.py" && python - <<'PY' from pptx import Presentation p='/tmp/workspace/hypertension-core-pg-ppt/output/Hypertension_Postgraduate_Internal_Medicine.pptx' r=Presentation(p) print('slides:',len(r.slides),'shapes:',sum(len(x.shapes) for x in r.slides)) for i,s in enumerate(r.slides,1): print(i, next((q.text_frame.text.split('\n')[0] for q in s.shapes if getattr(q,'has_text_frame',False) and q.text_frame.text.strip()),'EMPTY')) PY ls -lh "/tmp/workspace/hypertension-core-pg-ppt/output/Hypertension_Postgraduate_Internal_Medicine.pptx"
python - <<'PY' from pptx import Presentation p='/tmp/workspace/hypertension-core-pg-ppt/output/Hypertension_Postgraduate_Internal_Medicine.pptx' prs=Presentation(p) issues=[] for i,slide in enumerate(prs.slides,1): for sh in slide.shapes: if sh.left < 0 or sh.top < 0 or sh.left+sh.width > prs.slide_width or sh.top+sh.height > prs.slide_height: issues.append((i,'out of bounds')) if getattr(sh,'has_text_frame',False) and sh.text_frame.text.strip() and not sh.text_frame.paragraphs[0].runs: issues.append((i,'text issue')) print({'slides':len(prs.slides),'issues':issues,'file_ok':True}) PY
Hypertension Postgraduate Internal Medicine
Presentation · PPTX