Powerpoint presentation on ischaemic heart disease - definition,etiopathogenesis,classification,symptoms,diagnosis,medical and surgical treatment with images and tables from Harrison if required and if required relevant ecgs
12 lead ECG acute ST elevation myocardial infarction anterior leads

This diagnostic image is a 12-lead electrocardiogram (ECG) printed on standard grid paper (25 mm/s, 10 mm/mV). The tracing demonstrates significant ST-segment elevation in both the anterior leads (V1-V6) and the inferior leads (II, III, and aVF). In the inferior leads (II, III, aVF), pathological Q waves are clearly visible alongside the ST-segment elevation, suggesting a possible evolving or prior inferior myocardial infarction. The anterior leads, particularly V1 through V4, show prominent ST-segment elevation and developing Q waves, consistent with an acute anterior ST-elevation myocardial infarction (STEMI). Reciprocal ST-segment depression is noted in lead aVL. The rhythm appears to be sinus, though baseline artifacts are present in lead V5. This ECG illustrates extensive cardiac ischemia and injury involving multiple myocardial territories, which is clinically significant for the diagnosis of multi-vessel involvement or a proximal coronary artery occlusion.

This is a 12-lead electrocardiogram (ECG) demonstrating an acute ST-segment elevation myocardial infarction (STEMI). The diagnostic hallmark is prominent ST-segment elevation across the precordial leads V1 through V6, with the most significant convex elevation appearing in leads V2, V3, and V4. These findings are highly characteristic of an acute anterior wall infarction, typically involving the left anterior descending (LAD) coronary artery. In the limb leads, mild ST-segment elevation is also visible in leads I, II, III, and aVF, accompanied by positive, upright T waves. Lead aVR shows expected global inversion. The tracing displays a sinus rhythm with regular morphology, but the ST-segment deviations from the isoelectric baseline indicate acute myocardial injury. This visual material is a critical educational tool for teaching the ECG localization of coronary occlusions and the identification of STEMI criteria in an emergency clinical context.

This diagnostic image is a 12-lead electrocardiogram (ECG) demonstrating an acute anterior ST-elevation myocardial infarction (STEMI). The tracing reveals significant concave ST-segment elevation in the high lateral lead aVL and the anterior precordial leads V2, V3, and V4. These findings are highly suggestive of a proximal occlusion of the left anterior descending (LAD) coronary artery. Accompanying these changes is evident reciprocal ST-segment depression in the inferior leads III and aVF, which confirms the acute nature of the ischemic event. The ECG also shows hyperacute T waves in the affected precordial leads and preserved R-wave progression in the early stages of this infarction. This visual material is a primary educational resource for cardiology and emergency medicine, teaching the identification of ST-segment changes and the concept of reciprocal leads in localizing myocardial ischemia.

This diagnostic image is a 12-lead electrocardiogram (ECG) demonstrating signs consistent with an acute anterolateral ST-elevation myocardial infarction (STEMI). The precordial leads (V1-V6) show significant ST-segment elevation with a convex upward morphology, particularly prominent in V2 through V5, where the elevated segments merge into peaked T-waves. In the limb leads, there is ST-segment elevation in leads I and aVL, representing the lateral wall of the heart. Reciprocal ST-segment depression is visible in lead aVR. Pathological Q-waves are observed in several leads, including I, II, III, aVL, and aVF, suggesting areas of myocardial necrosis or evolving infarction. The QRS complexes exhibit some widening but maintain a recognizable morphology. This ECG serves as a critical educational tool for identifying the electrical patterns of acute coronary syndromes and localizing myocardial ischemia to the anterior and lateral walls of the left ventricle.

A 12-lead electrocardiogram (ECG) displayed on standard red grid paper, demonstrating acute anterolateral myocardial injury. The diagnostic image reveals significant ST-segment elevation across the precordial leads V1 through V6, as well as in the high lateral leads I and aVL. The ST segments in the anterior leads (V1-V4) exhibit a distinct convex upward (coving) morphology. Accompanying the ST elevation are tall, hyperacute, peaked T waves, most prominent in the precordial leads. There is evidence of reciprocal ST-segment depression in the inferior leads (II, III, and aVF). The rhythm is tachycardic, and the overall findings are consistent with an acute ST-elevation myocardial infarction (STEMI) involving the territory of the left anterior descending artery. This ECG serves as a critical clinical teaching tool for identifying myocardial ischemia and injury patterns in acute coronary syndromes.

This diagnostic image is a standard 12-lead electrocardiogram (ECG) demonstrating an acute inferior ST-elevation myocardial infarction (STEMI). The tracing exhibits significant ST-segment elevation in the inferior leads (II, III, and aVF), accompanied by hyperacute T-wave morphology in these same leads. Reciprocal ST-segment depression is clearly visible in the anterior leads, specifically V2 and V3, with associated T-wave inversion. The QRS complexes are narrow and suggest a supraventricular rhythm, while the overall axis appears normal with upright complexes in leads I and aVF. Lead I also shows mild ST-segment depression. This ECG is a classic representation of acute myocardial injury involving the inferior wall of the heart, highlighting the importance of recognizing ST-segment elevation and reciprocal changes for rapid clinical diagnosis and intervention in cardiology and emergency medicine.
coronary artery atherosclerosis diagram plaque rupture thrombosis
ischemic heart disease AND treatment
2024 ESC chronic coronary syndromes guideline diagnosis medical treatment revascularization
coronary angiogram left anterior descending artery stenosis image

This diagnostic image is a coronary angiogram (X-ray radiography with contrast) focusing on the left coronary artery system. The visual content demonstrates the left main coronary artery branching into the left anterior descending (LAD) and the circumflex (LCx) arteries. A white arrow points specifically to a focal, moderate stenosis located in the mid-segment of the left anterior descending artery. The stenosis is characterized by a visible reduction in the vessel's luminal diameter compared to the proximal and distal segments. The distal coronary flow appears preserved beyond the lesion. The image is useful for medical education in cardiology and interventional radiology to demonstrate common sites of atherosclerotic narrowing and the visual assessment of coronary artery disease. The surrounding pulmonary vasculature and ribs are faintly visible in the background, providing anatomical orientation within the thoracic cavity.

This diagnostic image is a coronary angiogram (fluoroscopic x-ray) of the left coronary arterial system. The image displays the left main coronary artery bifurcating into the left circumflex and the left anterior descending (LAD) artery, with subsequent branching into diagonal and septal perforator vessels. A blue arrow highlights a focal, high-grade obstructive lesion (approximately 90% stenosis) in the mid-segment of the left anterior descending artery. The stenosis is characterized by a significant narrowing of the contrast-filled lumen compared to the proximal and distal vessel diameters, indicating restricted blood flow. The background shows the silhouette of the heart and thoracic structures with pulmonary vascular markings. This visual serves as a critical educational example of atherosclerotic coronary artery disease and is used to assess the need for revascularization procedures like percutaneous coronary intervention (PCI) or coronary artery bypass grafting (CABG) in a clinical preoperative setting.

This composite diagnostic image consists of four panels (A-D) showcasing results from cardiac catheterization and aortography. Panel A: Coronary angiogram of the left coronary artery system demonstrating a 70% mid-segment stenosis in the left anterior descending (LAD) artery, annotated with a fractional flow reserve (FFR) of 0.82. Panel B: Aortogram revealing an anomalous systemic feeding artery originating from the descending thoracic aorta and supplying the lower lobe of the left lung, a pathognomonic finding for intralobar pulmonary sequestration. Panel C: Left coronary angiogram highlighting a normal circumflex branch with minimal disease in the obtuse marginal (OM) branches. Panel D: Right coronary angiogram showing a normal, patent right coronary artery (RCA) with typical C-shaped morphology and branching. This educational visual contrasts coronary atherosclerotic disease with congenital vascular anomalies like pulmonary sequestration, demonstrating the utility of invasive angiography in diagnosing both cardiac and extra-cardiac thoracic vascular conditions.

Summary : This figure presents two imaging modalities used to assess coronary artery disease, specifically showing a severe mid-vessel stenosis in the left anterior descending artery. The left panel (A) is a coronary CT angiography image, and the right panel (B) is an invasive coronary angiography image. Both images use arrows to indicate the location of the stenosis.

This diagnostic image is a coronary angiogram captured in a Right Anterior Oblique (RAO) view, visualizing the left coronary artery system. The angiogram utilizes radiopaque contrast media to delineate the vascular anatomy. Two primary vessels are highlighted: the Left Anterior Descending (LAD) artery and the Left Circumflex (LCx) artery. The LAD courses along the top portion of the frame with several diagonal branches, while the LCx descends and branches toward the left lateral aspect of the heart. Clinical pathology is indicated by marked stenotic lesions. A white arrow points to a significant area of narrowing (stenosis) in the proximal-to-mid LAD, and a second arrow highlights focal stenosis within the circumflex artery. The image demonstrates the diagnostic utility of invasive angiography in identifying coronary artery disease and assessing the severity of atherosclerotic luminal narrowing. This visual serves as an educational example of obstructive coronary artery disease requiring clinical intervention such as fractional flow reserve (FFR) assessment or percutaneous coronary intervention.

A coronary angiogram frame in the Left Anterior Oblique (LAO) caudal view, visualizing the left coronary system. The image demonstrates multi-vessel obstructive coronary artery disease. A yellow arrow points to the ostium-to-proximal segment of the Left Anterior Descending (LAD) artery, which shows severe narrowing consistent with 99% stenosis. A red arrow identifies the ostium-to-proximal segment of the Left Circumflex (LCx) artery, exhibiting high-grade 90% stenosis. The radiopaque contrast medium outlines the remaining patent lumen of the coronary vasculature, highlighting the critical luminal reduction in these major epicardial vessels. This diagnostic imaging is characteristic of an evaluation for ischemic heart disease or an acute coronary syndrome (ACS) event. The anatomical detail is optimized for interventional cardiology education, focusing on lesion localization and stenosis severity assessment.
~/
https://www.escardio.org/guidelines/clinical-practice-guidel…
mkdir -p "/tmp/workspace/ihd-presentation/assets" "/tmp/workspace/ihd-presentation/src" "/tmp/workspace/ihd-presentation/output" && python /tmp/skills/shared/scripts/fetch_images.py "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_16738d4b125195130b5e53a811645d4064182fc2bbd0de16b0e00a57af7ff6ef.jpg" "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_57feca7cc9081d9b72ec350bf2c3c85c246f2ac2f81d99ca8f3a22fe5662302c.jpg" > "/tmp/workspace/ihd-presentation/assets/images.json"
~/ihd-presentation/
~/ihd-presentation/src/create_ihd_presentation.py
import json, base64, os
from io import BytesIO
from pptx import Presentation
from pptx.util import Inches, Pt
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from pptx.enum.shapes import MSO_SHAPE, MSO_CONNECTOR
from pptx.enum.dml import MSO_THEME_COLOR
OUT='/tmp/workspace/ihd-presentation/output/Ischaemic_Heart_Disease_Harrison_Aligned.pptx'
AS='/tmp/workspace/ihd-presentation/assets'
W,H=13.333,7.5
NAVY=RGBColor(11,37,65); BLUE=RGBColor(20,92,138); TEAL=RGBColor(0,145,150); RED=RGBColor(190,55,55)
ORANGE=RGBColor(234,132,44); SKY=RGBColor(226,242,249); PALE=RGBColor(244,248,251); INK=RGBColor(28,43,55); GREY=RGBColor(102,116,128); WHITE=RGBColor(255,255,255); GREEN=RGBColor(44,132,86)
prs=Presentation(); prs.slide_width=Inches(W); prs.slide_height=Inches(H); blank=prs.slide_layouts[6]
def fill(shape,c): shape.fill.solid(); shape.fill.fore_color.rgb=c; shape.line.color.rgb=c
def textbox(s,x,y,w,h,text,size=18,color=INK,bold=False,align=None,margin=0.08,font='Aptos'):
sh=s.shapes.add_textbox(Inches(x),Inches(y),Inches(w),Inches(h)); tf=sh.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.text=text
if align: p.alignment=align
for r in p.runs:
r.font.name=font; r.font.size=Pt(size); r.font.bold=bold; r.font.color.rgb=color
return sh
def rect(s,x,y,w,h,c,rad=False,line=None):
sh=s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE if rad else MSO_SHAPE.RECTANGLE, Inches(x),Inches(y), Inches(w),Inches(h)); fill(sh,c)
if line: sh.line.color.rgb=line
return sh
def title(s,t,sub=None,n=None):
rect(s,0,0,W,0.26,NAVY); textbox(s,.55,.38,11.8,.45,t,26,NAVY,True)
if sub: textbox(s,.57,.88,11.5,.3,sub,10,GREY)
if n is not None: textbox(s,12.35,7.10,.45,.2,str(n).zfill(2),9,GREY,True,PP_ALIGN.RIGHT)
def footer(s,txt='Educational overview - not a patient-specific management protocol'):
textbox(s,.57,7.10,10.8,.18,txt,7,GREY)
def bulletbox(s,x,y,w,h,items,accent=BLUE,fs=16):
rect(s,x,y,w,h,WHITE,True,line=RGBColor(214,225,232)); rect(s,x,y,.09,h,accent)
sh=s.shapes.add_textbox(Inches(x+.22),Inches(y+.16),Inches(w-.38),Inches(h-.28)); tf=sh.text_frame; tf.clear(); tf.word_wrap=True
tf.margin_left=tf.margin_right=Inches(.02); tf.margin_top=tf.margin_bottom=Inches(.02)
for i,it in enumerate(items):
p=tf.paragraphs[0] if i==0 else tf.add_paragraph(); p.text=it; p.level=0; p.font.size=Pt(fs); p.font.color.rgb=INK; p.space_after=Pt(7); p.bullet=True
return sh
def table(s,x,y,w,h,headers,rows,widths=None,fs=11):
r=len(rows)+1;c=len(headers); sh=s.shapes.add_table(r,c,Inches(x),Inches(y),Inches(w),Inches(h)); tb=sh.table
if widths:
for j,v in enumerate(widths): tb.columns[j].width=Inches(v)
for j,hdr in enumerate(headers):
cell=tb.cell(0,j); cell.text=hdr; cell.fill.solid(); cell.fill.fore_color.rgb=NAVY
for p in cell.text_frame.paragraphs:
for rr in p.runs: rr.font.name='Aptos';rr.font.size=Pt(fs);rr.font.bold=True;rr.font.color.rgb=WHITE
for i,row in enumerate(rows,1):
for j,val in enumerate(row):
cell=tb.cell(i,j); cell.text=val; cell.fill.solid();cell.fill.fore_color.rgb=WHITE if i%2 else PALE
cell.margin_left=cell.margin_right=Inches(.07);cell.margin_top=cell.margin_bottom=Inches(.04)
for p in cell.text_frame.paragraphs:
for rr in p.runs: rr.font.name='Aptos';rr.font.size=Pt(fs);rr.font.color.rgb=INK
return sh
def add_img(s,path,x,y,w,h):
s.shapes.add_picture(path,Inches(x),Inches(y),width=Inches(w),height=Inches(h))
# Decode two downloaded images
with open(os.path.join(AS,'images.json')) as f: data=json.load(f)
paths=[]
for i,obj in enumerate(data):
raw=base64.b64decode(obj['base64'].split(',',1)[1]); p=os.path.join(AS,f'image_{i}.jpg'); open(p,'wb').write(raw); paths.append(p)
ecg,angio=paths
# 1
s=prs.slides.add_slide(blank); rect(s,0,0,W,H,NAVY); rect(s,0,5.78,W,1.72,TEAL)
textbox(s,.75,.75,11.6,.8,'Ischaemic Heart Disease',34,WHITE,True)
textbox(s,.78,1.68,9.8,.55,'Definition • Etiopathogenesis • Classification • Diagnosis • Medical and surgical treatment',18,RGBColor(211,230,241))
textbox(s,.8,2.62,7.2,.42,'A Harrison-aligned clinical teaching presentation',17,WHITE,False)
# stylized flow line
for x,c,lab in [(1.0,ORANGE,'Risk factors'),(3.6,RED,'Plaque rupture'),(6.2,WHITE,'Thrombus'),(8.8,SKY,'Ischaemia')]:
sh=s.shapes.add_shape(MSO_SHAPE.OVAL,Inches(x),Inches(4.1),Inches(1.2),Inches(1.2));fill(sh,c);textbox(s,x-.25,5.38,1.7,.28,lab,11,WHITE,True,PP_ALIGN.CENTER)
if x<8: rect(s,x+1.15,4.62,1.35,.12,TEAL)
textbox(s,.78,6.63,10.2,.28,'Source framework: Harrison’s Principles of Internal Medicine, 22nd ed. (2025) | Content current to ESC 2024 CCS guidance',9,WHITE)
#2
s=prs.slides.add_slide(blank);title(s,'Learning objectives','Understand the clinical spectrum and choose an appropriate diagnostic and management pathway',2)
bulletbox(s,.65,1.45,3.85,4.8,['Define ischaemic heart disease (IHD) and explain myocardial oxygen supply-demand imbalance.','Link atherosclerosis, plaque disruption and thrombosis to acute coronary syndromes.'],TEAL,17)
bulletbox(s,4.74,1.45,3.85,4.8,['Classify chronic coronary syndromes and acute coronary syndromes.','Recognise typical symptoms, anginal equivalents and high-risk presentations.'],BLUE,17)
bulletbox(s,8.83,1.45,3.85,4.8,['Select ECG, troponin, imaging and invasive testing appropriately.','Summarise medical therapy, PCI and CABG indications.'],ORANGE,17);footer(s)
#3
s=prs.slides.add_slide(blank);title(s,'Definition and clinical spectrum','IHD is myocardial ischaemia resulting when coronary blood supply is inadequate for myocardial metabolic demand',3)
rect(s,.65,1.35,12.0,.85,SKY,True);textbox(s,.9,1.55,11.5,.38,'Most IHD reflects atherosclerotic epicardial coronary disease, but vasospasm, microvascular dysfunction, embolism, dissection and supply-demand mismatch may also cause ischaemia.',17,NAVY,True,PP_ALIGN.CENTER)
table(s,.75,2.65,11.8,2.8,['Chronic coronary syndrome','Acute coronary syndrome'],[['Predictable exertional angina or silent ischaemia','Unstable angina, NSTEMI, STEMI'],['Fixed obstructive plaque, microvascular disease or vasomotor disorder','Usually plaque rupture/erosion with superimposed thrombosis'],['Symptoms often stable; goal is symptom control and event prevention','Time-sensitive risk stratification and reperfusion/antithrombotic care']], [5.9,5.9],15)
textbox(s,.82,5.75,11.8,.35,'Core concept: ischaemia may arise from reduced coronary supply, increased demand, or both.',19,RED,True,PP_ALIGN.CENTER);footer(s,'Harrison’s Principles of Internal Medicine, 22nd ed. (2025), coronary artery disease chapters')
#4
s=prs.slides.add_slide(blank);title(s,'Etiopathogenesis: from risk factors to infarction','Atherosclerosis is the dominant substrate; acute events usually arise from plaque disruption and thrombosis',4)
steps=[('1','Endothelial dysfunction','Smoking, diabetes, hypertension, LDL-C, CKD, age/family history'),('2','Atheroma formation','LDL retention, inflammation, foam cells and fibrous plaque'),('3','Plaque instability','Rupture or erosion exposes thrombogenic material'),('4','Thrombosis / vasoconstriction','Abrupt reduction in coronary flow'),('5','Ischaemia / necrosis','Angina, arrhythmia, LV dysfunction or myocardial infarction')]
for i,(num,head,body) in enumerate(steps):
x=.45+i*2.55; sh=s.shapes.add_shape(MSO_SHAPE.OVAL,Inches(x+.73),Inches(1.58),Inches(.58),Inches(.58));fill(sh,TEAL if i<3 else RED);textbox(s,x+.73,1.68,.58,.22,num,12,WHITE,True,PP_ALIGN.CENTER)
rect(s,x,2.35,2.05,2.3,WHITE,True,line=RGBColor(206,220,229));textbox(s,x+.16,2.62,1.72,.45,head,15,NAVY,True,PP_ALIGN.CENTER);textbox(s,x+.15,3.25,1.75,.95,body,11,INK,False,PP_ALIGN.CENTER)
if i<4: rect(s,x+2.05,3.32,.5,.09,ORANGE)
textbox(s,.8,5.45,11.7,.34,'Other mechanisms: coronary spasm, spontaneous coronary artery dissection, embolism, severe anaemia/hypoxaemia, tachyarrhythmia or hypotension (type 2 MI context).',14,INK,False,PP_ALIGN.CENTER);footer(s)
#5
s=prs.slides.add_slide(blank);title(s,'Classification','Use the clinical syndrome, ECG and troponin pattern to guide urgency and treatment',5)
table(s,.65,1.35,12.0,4.7,['Category','Typical features','Key distinction / implication'],[['Chronic coronary syndrome (CCS)','Stable exertional angina, dyspnoea equivalent, or asymptomatic ischaemia','Assess likelihood of obstructive CAD; control symptoms and prevent events'],['Unstable angina','New, crescendo or rest angina without acute troponin rise','ACS phenotype, but no myocardial necrosis biomarker'],['NSTEMI','Ischaemic symptoms ± ST depression/T-wave change with rise/fall in cardiac troponin','Risk stratify; antithrombotic therapy and invasive strategy according to risk'],['STEMI','Persistent ST-segment elevation or equivalent with acute coronary occlusion pattern','Immediate reperfusion pathway, usually primary PCI'],['MI types','Type 1: atherothrombosis; Type 2: supply-demand imbalance; Types 3-5: sudden death/procedural','Identify mechanism, not simply troponin elevation']], [2.45,4.7,4.85],13);footer(s,'MI terminology based on the Universal Definition framework; clinical pathways must follow local protocol.')
#6
s=prs.slides.add_slide(blank);title(s,'Symptoms and clinical assessment','The symptom description changes clinical likelihood, but atypical presentations are common',6)
bulletbox(s,.65,1.25,5.95,4.95,['Typical angina: substernal pressure/tightness, provoked by exertion or emotion, relieved by rest or nitroglycerin.','Radiation: arm, shoulder, jaw, neck, back or epigastrium.','Anginal equivalents: exertional dyspnoea, fatigue, diaphoresis, nausea.','Atypical or silent presentations occur more often in older adults, women and people with diabetes.'],TEAL,16)
bulletbox(s,6.75,1.25,5.9,4.95,['Examine for haemodynamic instability, heart failure, new murmur, arrhythmia and peripheral vascular disease.','Risk factors: tobacco exposure, hypertension, dyslipidaemia, diabetes, obesity, CKD, family history of premature CAD.','Red flags: ongoing pain, syncope, hypotension, pulmonary oedema or malignant arrhythmia.'],RED,16)
footer(s)
#7
s=prs.slides.add_slide(blank);title(s,'Diagnosis: an integrated pathway','Test choice follows clinical likelihood, stability, resting ECG, exercise capacity and local expertise',7)
# pathway
for x,y,w,h,head,body,c in [(0.65,1.45,2.15,1.35,'1. Initial assessment','History, exam, risk factors\n12-lead ECG',TEAL),(3.0,1.45,2.15,1.35,'2. Is ACS likely?','Serial hs-cTn\nECG monitoring',RED),(5.35,1.45,2.15,1.35,'3. Define anatomy / ischaemia','CCTA or functional imaging',BLUE),(7.7,1.45,2.15,1.35,'4. Risk stratify','LV function, ischaemic burden\nclinical risk',ORANGE),(10.05,1.45,2.15,1.35,'5. Angiography','High-risk ACS or\nrefractory / high-risk CCS',NAVY)]:
rect(s,x,y,w,h,WHITE,True,line=c);textbox(s,x+.1,y+.18,w-.2,.32,head,14,c,True,PP_ALIGN.CENTER);textbox(s,x+.12,y+.65,w-.24,.48,body,11,INK,False,PP_ALIGN.CENTER)
for x in [2.8,5.15,7.5,9.85]: rect(s,x,2.04,.22,.08,GREY)
table(s,.8,3.45,11.75,2.4,['Test','What it answers','Illustrative role'],[['12-lead ECG','Acute injury/ischaemia, rhythm, prior infarction','Immediate in chest pain; repeat if symptoms evolve'],['High-sensitivity cardiac troponin','Myocardial injury with rise/fall pattern','Serial sampling supports/excludes acute MI in context'],['CCTA / stress imaging','Anatomy or inducible ischaemia','Useful in selected stable or intermediate-risk patients'],['Invasive coronary angiography ± FFR/iFR','Coronary anatomy and lesion physiology','ACS/high-risk findings or revascularization planning']], [2.4,4.1,5.25],11);footer(s,'Harrison 22e notes diagnostic testing should be interpreted against clinical pretest probability.')
#8 ECG
s=prs.slides.add_slide(blank);title(s,'ECG in acute ischaemia','ECG changes must be interpreted with symptoms, serial tracings and cardiac troponin',8)
add_img(s,ecg,.6,1.25,6.3,4.85);rect(s,7.15,1.25,5.55,4.85,WHITE,True,line=RGBColor(210,222,231))
textbox(s,7.45,1.55,4.9,.4,'Teaching example: anterior STEMI pattern',19,RED,True)
bulletbox(s,7.45,2.18,4.9,2.65,['ST elevation in contiguous anterior precordial leads supports acute anterior injury pattern.','Reciprocal ST depression may strengthen the diagnosis in appropriate territories.','Do not delay reperfusion for biomarker confirmation when STEMI criteria and clinical context are present.'],RED,14)
textbox(s,.75,6.25,12.0,.3,'Image: educational 12-lead ECG from indexed clinical image collection. It is an illustrative tracing, not a diagnostic substitute.',9,GREY,False,PP_ALIGN.CENTER);footer(s)
#9
s=prs.slides.add_slide(blank);title(s,'Medical treatment: chronic coronary syndrome','Two parallel goals: improve symptoms and reduce future cardiovascular events',9)
table(s,.55,1.25,12.25,4.95,['Goal','Interventions','Clinical notes'],[['Risk-factor modification','Smoking cessation; Mediterranean-style diet; physical activity/cardiac rehabilitation; BP, diabetes and weight management','Foundation of management; address adherence and psychosocial factors'],['Lipid lowering','High-intensity statin; add non-statin lipid therapy where indicated','Aim for intensive LDL-C lowering in established ASCVD per guideline targets'],['Antithrombotic therapy','Single antiplatelet therapy in appropriate chronic CAD; tailor intensity/duration to ischaemic vs bleeding risk','Avoid routine combinations without a defined indication'],['Angina control','Beta-blocker and/or calcium-channel blocker; nitrates for relief; other agents selected to physiology/comorbidity','Choice is individualised by heart rate, BP, LV function, vasospasm and tolerance'],['Disease-modifying comorbidity care','ACE inhibitor/ARB when indicated; SGLT2 inhibitor/GLP-1 RA in appropriate diabetes/obesity context','Use guideline-directed therapy for hypertension, diabetes and heart failure']], [2.15,5.15,4.95],12);footer(s,'Adapted into a teaching summary from Harrison 22e and 2024 ESC chronic coronary syndrome guidance. Drug choice/dose requires patient-specific review.')
#10
s=prs.slides.add_slide(blank);title(s,'Acute coronary syndrome: immediate medical priorities','Treat suspected ACS as time-sensitive; activate local emergency and reperfusion protocols',10)
table(s,.7,1.3,11.9,4.35,['Priority','Actions','Key cautions'],[['Stabilise and diagnose','ABCs, monitor, IV access, serial ECG, hs-cTn; assess shock/heart failure/arrhythmia','Oxygen only for hypoxaemia or respiratory distress, not routinely'],['Relieve ischaemia','Nitrates if appropriate; beta-blockade selectively when no acute HF/shock/bradycardia','Avoid nitrates with hypotension, RV infarct concern or recent PDE-5 inhibitor'],['Antithrombotic treatment','Aspirin plus P2Y12 inhibitor and anticoagulation according to ACS/revascularization strategy','Balance bleeding risk; choice/timing follow local guideline'],['Reperfusion / invasive strategy','STEMI: immediate primary PCI where available. NSTEMI: invasive timing based on risk and instability','Persistent pain, dynamic ST changes, shock or arrhythmia increase urgency']], [2.2,5.25,4.45],12)
rect(s,.7,5.95,11.9,.55,RGBColor(254,241,240),True);textbox(s,.95,6.10,11.4,.22,'Suspected ACS requires urgent in-person assessment. This slide is for education, not self-treatment.',13,RED,True,PP_ALIGN.CENTER);footer(s,'Harrison 22e, NSTE-ACS: serial hs-troponin and ECG assessment; nitrates and beta-blockers used selectively.')
#11
s=prs.slides.add_slide(blank);title(s,'Revascularization: PCI and CABG','The Heart Team integrates symptoms, anatomy, LV function, diabetes, procedural risk and patient preferences',11)
add_img(s,angio,.65,1.35,5.25,4.25);textbox(s,.72,5.72,5.1,.3,'Coronary angiogram: severe mid-LAD stenosis (educational example).',10,GREY,False,PP_ALIGN.CENTER)
table(s,6.2,1.35,6.45,4.25,['PCI','CABG'],[['Catheter-based balloon/stent treatment','Surgical bypass using arterial/venous conduits'],['Preferred for acute culprit-vessel reperfusion in STEMI','Often favoured in complex multivessel disease, left main disease or diabetes with suitable anatomy'],['Useful for focal lesions or when anatomy/surgical risk supports it','May offer more complete revascularization in selected complex CAD'],['Requires dual antiplatelet therapy after stenting','Requires assessment of operative risk and conduit targets']], [3.225,3.225],11)
bulletbox(s,6.2,5.85,6.45,.65,['In stable disease, revascularization is primarily for unacceptable symptoms despite medical therapy and for selected prognostic anatomy/physiology.'],ORANGE,12);footer(s)
#12
s=prs.slides.add_slide(blank);title(s,'A practical decision framework','Match urgency to syndrome, then tailor testing and treatment to risk',12)
for i,(head,body,c) in enumerate([('Stable symptoms','Estimate clinical likelihood\nECG + targeted CCTA / stress imaging',TEAL),('Low-risk findings','Prevention + antianginal care\nfollow symptoms and adherence',BLUE),('High-risk anatomy / refractory symptoms','Angiography ± physiology\nHeart Team discussion',ORANGE),('ACS / STEMI','Immediate emergency pathway\nreperfusion and antithrombotic care',RED)]):
x=.75+i*3.1;rect(s,x,1.65,2.55,2.25,WHITE,True,line=c);textbox(s,x+.18,2.05,2.2,.45,head,17,c,True,PP_ALIGN.CENTER);textbox(s,x+.18,2.75,2.2,.65,body,13,INK,False,PP_ALIGN.CENTER)
if i<3: rect(s,x+2.55,2.71,.55,.1,GREY)
rect(s,.85,4.72,11.6,1.05,SKY,True);textbox(s,1.12,4.98,11.05,.5,'Take-home message: IHD is not a single entity. Accurate syndrome recognition, appropriate risk stratification, preventive therapy and timely revascularization where indicated determine outcomes.',17,NAVY,True,PP_ALIGN.CENTER);footer(s)
#13 references
s=prs.slides.add_slide(blank);title(s,'References and image attributions','Core textbook and guideline sources used to develop this educational deck',13)
refs=['Harrison’s Principles of Internal Medicine. 22nd ed. McGraw Hill Medical; 2025. Chapters on coronary artery disease, cardiac imaging and acute coronary syndromes.','European Society of Cardiology. 2024 ESC Guidelines for the management of chronic coronary syndromes.','European Society of Cardiology. 2023 ESC Guidelines for the management of acute coronary syndromes.','Thygesen K, et al. Fourth Universal Definition of Myocardial Infarction. Circulation. 2018;138:e618-e651.','ECG and coronary angiogram: de-identified educational images retrieved from the indexed clinical image collection; captions are included on respective slides.']
bulletbox(s,.8,1.25,11.75,4.55,refs,BLUE,15)
rect(s,.8,6.05,11.75,.55,RGBColor(254,248,230),True);textbox(s,1.0,6.2,11.3,.21,'Educational use only. Recommendations evolve: apply current local guidelines and patient-specific clinical judgement.',12,INK,True,PP_ALIGN.CENTER);footer(s,'Prepared October 2026')
# add minimal core properties
prs.core_properties.title='Ischaemic Heart Disease - Harrison-Aligned Teaching Presentation';prs.core_properties.subject='Definition, etiopathogenesis, classification, diagnosis and management of IHD';prs.core_properties.author='Orris'
prs.save(OUT)
print(OUT)
python "/tmp/workspace/ihd-presentation/src/create_ihd_presentation.py" && python - <<'PY' from pptx import Presentation p='/tmp/workspace/ihd-presentation/output/Ischaemic_Heart_Disease_Harrison_Aligned.pptx' prs=Presentation(p) print('slides',len(prs.slides)) for i,s in enumerate(prs.slides,1): texts=[] for sh in s.shapes: if getattr(sh,'has_text_frame',False) and sh.text_frame.text.strip(): texts.append(sh.text_frame.text.replace('\n',' | ')[:100]) print(i, ' | '.join(texts[:3])) PY
python - <<'PY' from pptx import Presentation from pathlib import Path p=Path('/tmp/workspace/ihd-presentation/output/Ischaemic_Heart_Disease_Harrison_Aligned.pptx') prs=Presentation(str(p)) assert p.exists() and p.stat().st_size > 50000 assert len(prs.slides)==13 for i,s in enumerate(prs.slides,1): assert len(s.shapes)>0, i print(f'OK: {p.name} | {p.stat().st_size} bytes | {len(prs.slides)} slides') PY
Ischaemic Heart Disease Harrison Aligned
Presentation · PPTX
More detailed and add first slide with title ischaemic heart disease presented by Dr Dhwani Shah (Assistant Professor- Genaral Medicine)
~/
coronary artery disease AND revascularization
2024 ESC chronic coronary syndromes guideline key messages diagnosis revascularization
~/ihd-presentation/assets
~/ihd-presentation/output
"# 13" in ~/ihd-presentation/src
~/ihd-presentation/src/expand_presentation.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
from pathlib import Path
src=Path('/tmp/workspace/ihd-presentation/output/Ischaemic_Heart_Disease_Harrison_Aligned.pptx')
out=Path('/tmp/workspace/ihd-presentation/output/Ischaemic_Heart_Disease_Dr_Dhwani_Shah_Detailed.pptx')
prs=Presentation(str(src))
W,H=13.333,7.5
NAVY=RGBColor(11,37,65); BLUE=RGBColor(20,92,138); TEAL=RGBColor(0,145,150); RED=RGBColor(190,55,55)
ORANGE=RGBColor(234,132,44); PALE=RGBColor(244,248,251); INK=RGBColor(28,43,55); GREY=RGBColor(102,116,128); WHITE=RGBColor(255,255,255); GREEN=RGBColor(44,132,86)
blank=prs.slide_layouts[6]
def fill(sh,c): sh.fill.solid(); sh.fill.fore_color.rgb=c; sh.line.color.rgb=c
def rect(s,x,y,w,h,c,round=False):
sh=s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE if round else MSO_SHAPE.RECTANGLE, Inches(x),Inches(y),Inches(w),Inches(h)); fill(sh,c); return sh
def text(s,x,y,w,h,txt,sz=17,c=INK,bold=False,align=None):
sh=s.shapes.add_textbox(Inches(x),Inches(y),Inches(w),Inches(h)); tf=sh.text_frame; tf.clear(); tf.word_wrap=True
tf.margin_left=tf.margin_right=Inches(.07);tf.margin_top=tf.margin_bottom=Inches(.04)
p=tf.paragraphs[0];p.text=txt
if align is not None:p.alignment=align
for r in p.runs:r.font.name='Aptos';r.font.size=Pt(sz);r.font.bold=bold;r.font.color.rgb=c
return sh
def title(s,heading,sub,n):
rect(s,0,0,W,.26,NAVY);text(s,.52,.38,11.8,.42,heading,25,NAVY,True);text(s,.55,.85,11.5,.3,sub,10,GREY);text(s,12.1,7.05,.6,.22,str(n).zfill(2),9,GREY,True,PP_ALIGN.RIGHT);text(s,.55,7.05,10.7,.18,'Educational presentation - use local protocols for patient care',7,GREY)
def bullets(s,x,y,w,h,items,accent=BLUE,fs=15):
rect(s,x,y,w,h,WHITE,True); s.shapes[-1].line.color.rgb=RGBColor(210,222,230);rect(s,x,y,.10,h,accent)
box=s.shapes.add_textbox(Inches(x+.24), Inches(y+.14), Inches(w-.36), Inches(h-.25)); tf=box.text_frame;tf.clear();tf.word_wrap=True
for i,v in enumerate(items):
p=tf.paragraphs[0] if i==0 else tf.add_paragraph();p.text=v;p.font.name='Aptos';p.font.size=Pt(fs);p.font.color.rgb=INK;p.space_after=Pt(8);p.bullet=True
def table(s,x,y,w,h,heads,rows,fs=11):
sh=s.shapes.add_table(len(rows)+1,len(heads),Inches(x),Inches(y),Inches(w),Inches(h));tb=sh.table
for j,hdr in enumerate(heads):
c=tb.cell(0,j);c.text=hdr;c.fill.solid();c.fill.fore_color.rgb=NAVY
for p in c.text_frame.paragraphs:
for r in p.runs:r.font.name='Aptos';r.font.size=Pt(fs);r.font.bold=True;r.font.color.rgb=WHITE
for i,row in enumerate(rows,1):
for j,val in enumerate(row):
c=tb.cell(i,j);c.text=val;c.fill.solid();c.fill.fore_color.rgb=WHITE if i%2 else PALE;c.margin_left=c.margin_right=Inches(.06)
for p in c.text_frame.paragraphs:
for r in p.runs:r.font.name='Aptos';r.font.size=Pt(fs);r.font.color.rgb=INK
return sh
# Replace original title slide with requested presenter line
s=prs.slides[0]
for shape in s.shapes:
if getattr(shape,'has_text_frame',False):
val=shape.text_frame.text.strip()
if val=='Ischaemic Heart Disease':
shape.text_frame.paragraphs[0].text='ISCHAEMIC HEART DISEASE'
for r in shape.text_frame.paragraphs[0].runs:r.font.size=Pt(36);r.font.bold=True;r.font.color.rgb=WHITE
elif 'Harrison-aligned' in val:
shape.text_frame.paragraphs[0].text='Presented by Dr Dhwani Shah\nAssistant Professor- Genaral Medicine'
for r in shape.text_frame.paragraphs[0].runs:r.font.size=Pt(18);r.font.color.rgb=WHITE
elif 'Definition' in val:
shape.text_frame.paragraphs[0].text='Definition | Etiopathogenesis | Classification | Clinical features | Diagnosis | Medical and surgical treatment'
for r in shape.text_frame.paragraphs[0].runs:r.font.size=Pt(16);r.font.color.rgb=RGBColor(211,230,241)
# append detailed slides
n=len(prs.slides)+1
s=prs.slides.add_slide(blank);title(s,'Coronary circulation and oxygen balance','IHD develops when myocardial oxygen supply cannot match metabolic demand',n)
text(s,.7,1.35,5.6,.35,'MYOCARDIAL OXYGEN SUPPLY',16,BLUE,True);bullets(s,.65,1.75,5.85,4.65,['Coronary perfusion occurs predominantly during diastole, especially in the left ventricle.','Supply depends on coronary perfusion pressure, diastolic time, arterial oxygen content and epicardial/microvascular patency.','Fixed obstruction, vasospasm, embolus, anaemia or hypoxaemia may reduce effective oxygen delivery.'],TEAL,15)
text(s,6.85,1.35,5.6,.35,'MYOCARDIAL OXYGEN DEMAND',16,RED,True);bullets(s,6.8,1.75,5.85,4.65,['Heart rate, contractility and LV wall stress are the principal determinants.','Tachycardia shortens diastole and simultaneously raises demand.','Hypertension, LV hypertrophy, fever and thyrotoxicosis can precipitate demand ischaemia.'],RED,15)
n+=1;s=prs.slides.add_slide(blank);title(s,'Risk factors and prevention targets','Risk-factor control is disease-modifying, not simply supportive care',n)
table(s,.6,1.35,12.1,4.95,['Non-modifiable','Modifiable / associated','Preventive response'],[['Age, male sex, family history of premature ASCVD','Tobacco exposure','Complete cessation; avoid passive smoke'],['Premature menopause / adverse pregnancy history','Dyslipidaemia, diabetes, hypertension','Risk-based lipid lowering; BP and glycaemic control'],['Genetic dyslipidaemia','Obesity, sedentary lifestyle, unhealthy diet','Exercise, weight management, cardioprotective dietary pattern'],['','CKD, inflammatory disease, psychosocial stress','Treat comorbidity; cardiac rehabilitation and adherence support']],11)
text(s,.72,6.55,11.7,.25,'Clinical point: assess global atherosclerotic cardiovascular risk and address all modifiable factors together.',11,BLUE,True)
n+=1;s=prs.slides.add_slide(blank);title(s,'Stable angina: characterising the symptom','Angina is a clinical syndrome. Symptoms, triggers and risk profile determine likelihood.',n)
text(s,.65,1.35,3.8,.3,'TYPICAL ANGINA',15,TEAL,True);bullets(s,.65,1.72,3.9,4.5,['Retrosternal pressure, heaviness or tightness.','Provoked by exertion or emotional stress.','Relieved by rest and/or nitroglycerin within minutes.'],TEAL,16)
text(s,4.75,1.35,3.8,.3,'ANGINAL EQUIVALENTS',15,ORANGE,True);bullets(s,4.75,1.72,3.9,4.5,['Exertional dyspnoea, fatigue, diaphoresis or nausea.','Pain may radiate to arm, shoulder, jaw, neck, back or epigastrium.','More frequent in older people, women and patients with diabetes.'],ORANGE,15)
text(s,8.85,1.35,3.8,.3,'HIGH-RISK FEATURES',15,RED,True);bullets(s,8.85,1.72,3.8,4.5,['Crescendo pattern, rest pain or prolonged pain.','Syncope, acute heart failure, hypotension or malignant arrhythmia.','Treat as potential ACS: obtain ECG and troponin urgently.'],RED,15)
n+=1;s=prs.slides.add_slide(blank);title(s,'Troponin and the Universal Definition of MI','Myocardial infarction requires acute myocardial injury plus evidence of ischaemia',n)
table(s,.65,1.35,12.0,4.8,['Term','Key concept','Examples / implications'],[['Myocardial injury','Cardiac troponin above the 99th percentile upper reference limit','Acute if a rise and/or fall is present'],['Myocardial infarction','Acute myocardial injury WITH clinical evidence of ischaemia','Symptoms, new ischaemic ECG changes, imaging evidence or coronary thrombus'],['Type 1 MI','Acute atherothrombosis due to plaque rupture or erosion','Typical ACS; antithrombotic therapy and revascularisation evaluation'],['Type 2 MI','Supply-demand imbalance without acute coronary atherothrombosis','Tachyarrhythmia, severe anaemia, hypoxaemia, hypotension: treat precipitant and assess CAD selectively']],11)
text(s,.72,6.45,11.6,.33,'Do not diagnose MI from a single troponin result alone. Interpret serial change in the clinical context.',11,RED,True)
n+=1;s=prs.slides.add_slide(blank);title(s,'ECG localisation in acute coronary occlusion','Acquire and interpret a 12-lead ECG promptly. Repeat when symptoms persist or evolve.',n)
table(s,.65,1.35,12.0,4.9,['Territory','ST elevation leads','Common infarct-related artery / useful reciprocal pattern'],[['Inferior','II, III, aVF','RCA or LCx; reciprocal ST depression in I and aVL'],['Anterior / septal','V1-V4','LAD; more extensive changes may include I, aVL, V5-V6'],['Lateral','I, aVL, V5-V6','LCx or diagonal branch'],['Posterior','ST depression V1-V3 with tall R waves; confirm V7-V9','LCx or RCA; posterior leads may reveal ST elevation'],['Right ventricular','V3R-V4R with inferior STEMI','Proximal RCA; avoid routine nitrates if hypotensive/preload dependent']],11)
text(s,.72,6.45,11.7,.28,'New ST elevation, dynamic ST-T change or ongoing ischaemic symptoms requires immediate escalation under local ACS pathways.',10,RED,True)
n+=1;s=prs.slides.add_slide(blank);title(s,'Non-invasive and invasive diagnostic tests','Choose tests according to clinical likelihood, ability to exercise, ECG interpretability and local availability',n)
table(s,.55,1.25,12.25,5.3,['Test','What it answers','Strengths / limitations'],[['Rest ECG + hs-cTn','Acute ischaemia / myocardial injury','First-line in suspected ACS; serial testing is often required'],['Echocardiography','LV function, regional wall-motion abnormality, alternative diagnoses','Immediate bedside value; normal result does not exclude CAD'],['CCTA','Anatomy and plaque / obstructive CAD','High sensitivity; less suitable with heavy calcium, rapid irregular rhythm or contrast contraindication'],['Stress echo, SPECT/PET, stress CMR','Inducible ischaemia and functional significance','Choice depends on expertise, availability and patient factors'],['Invasive coronary angiography ± FFR/iFR','Coronary anatomy and physiologic significance','For ACS/high-risk cases or when revascularisation is likely']],10)
text(s,.65,6.7,11.8,.2,'Harrison notes that testing must be interpreted through pre-test probability and post-test likelihood.',9,BLUE,True)
n+=1;s=prs.slides.add_slide(blank);title(s,'Long-term pharmacotherapy: how the drug classes fit','Individualise treatment to symptoms, haemodynamics, comorbidity and contraindications',n)
table(s,.5,1.25,12.35,5.4,['Therapy','Primary role','Key cautions / comments'],[['Antiplatelet therapy','Secondary prevention after MI / established CAD; DAPT after ACS or PCI for selected duration','Balance ischaemic benefit against bleeding risk'],['High-intensity statin ± additional lipid lowering','LDL-C lowering and event prevention','Monitor adherence, response and tolerance; add-on treatment when indicated'],['Beta blocker','Angina relief; post-MI or LV dysfunction when indicated','Avoid or use cautiously with bradycardia, shock, severe bronchospasm or acute HF'],['Nitrates','Rapid relief of angina; long-acting form for prophylaxis','Avoid with hypotension, RV infarction or recent PDE-5 inhibitor use'],['ACE inhibitor / ARB','Prognostic benefit in selected patients: HTN, diabetes, CKD, LV dysfunction or HF','Monitor BP, potassium and renal function'],['CCB / ranolazine / other antianginals','Symptom control when beta blocker unsuitable or insufficient','Select according to HR, BP, LV function and interactions']],10)
n+=1;s=prs.slides.add_slide(blank);title(s,'ACS: emergency approach and complications','Time-sensitive diagnosis, antithrombotic therapy and reperfusion planning reduce myocardium at risk',n)
text(s,.65,1.35,5.9,.32,'INITIAL ACTIONS',16,RED,True);bullets(s,.65,1.75,5.9,4.75,['ABC assessment, monitoring, IV access and rapid 12-lead ECG.','Serial hs-cTn and repeat ECG if initial studies are nondiagnostic.','Aspirin unless contraindicated; add P2Y12 inhibitor and anticoagulation per local protocol.','Oxygen only for hypoxaemia, respiratory distress or shock.','Nitrates for pain if haemodynamically appropriate; analgesia if pain persists.','Activate immediate reperfusion pathway for STEMI or ongoing high-risk ischaemia.'],RED,14)
text(s,6.8,1.35,5.8,.32,'LOOK FOR COMPLICATIONS',16,BLUE,True);bullets(s,6.8,1.75,5.8,4.75,['Arrhythmias: VT/VF, bradyarrhythmia, AV block.','Acute LV failure / pulmonary oedema and cardiogenic shock.','Mechanical complications: papillary muscle rupture, VSD, free-wall rupture.','Pericarditis and LV thrombus in large anterior infarction.','Secondary prevention before discharge: rehab, smoking cessation, lipid and BP targets, adherence plan.'],BLUE,14)
n+=1;s=prs.slides.add_slide(blank);title(s,'When to choose PCI or CABG','Revascularisation is used for ACS, refractory symptoms and selected prognostic indications',n)
table(s,.6,1.32,12.1,4.9,['Scenario','Preferred consideration','Decision factors'],[['STEMI / ongoing coronary occlusion','Primary PCI when timely available; fibrinolysis only in eligible settings when PCI delay is excessive','Time from symptom onset, bleeding risk, availability, transfer time'],['NSTE-ACS with very-high/high risk features','Early invasive angiography, with PCI as anatomically appropriate','Recurrent ischaemia, troponin, ST changes, instability, GRACE risk'],['Left main or complex multivessel CAD','Heart Team discussion, often CABG favoured in suitable anatomy','Anatomic complexity, diabetes, LV function, surgical risk, patient preference'],['Persistent limiting angina despite GDMT','PCI or CABG may improve symptoms when lesion is physiologically significant','Symptom burden, objective ischaemia, FFR/iFR, anatomy'],['Ischaemic LV dysfunction','Individualised viability/anatomy/Heart Team assessment; CABG may benefit selected surgical candidates','Comorbidity, coronary targets, completeness of revascularisation']],10)
text(s,.7,6.55,11.7,.24,'PCI treats focal culprit lesions; CABG bypasses diseased coronary segments. Shared decision-making is integral.',10,BLUE,True)
n+=1;s=prs.slides.add_slide(blank);title(s,'Take-home messages','A structured approach makes diagnosis and treatment safer and more consistent',n)
bullets(s,.75,1.4,11.8,4.9,['IHD is usually atherosclerotic, but supply-demand imbalance, vasospasm and microvascular disease are important alternatives.','Differentiate chronic coronary syndrome from ACS quickly. Rest pain, dynamic ECG changes, troponin rise or instability warrant urgent escalation.','Use symptom-based clinical likelihood, ECG, hs-troponin and selective imaging to confirm disease and stratify risk.','Treat both the current syndrome and the underlying atherosclerotic risk: tobacco cessation, lipid lowering, BP/diabetes control, activity and adherence.','Revascularisation decisions should integrate clinical presentation, anatomy, functional significance, LV function and patient preference.'],TEAL,16)
text(s,.85,6.55,11.5,.25,'Reference base: Harrison’s Principles of Internal Medicine, 22nd ed. (2025); ESC CCS guideline (2024); ESC ACS guideline (2023).',9,GREY)
prs.save(str(out)); print(out)
python "/tmp/workspace/ihd-presentation/src/expand_presentation.py" && python - <<'PY' from pptx import Presentation from pathlib import Path p=Path('/tmp/workspace/ihd-presentation/output/Ischaemic_Heart_Disease_Dr_Dhwani_Shah_Detailed.pptx') prs=Presentation(str(p)) print('slides:',len(prs.slides), 'size:',p.stat().st_size) for i,s in enumerate(prs.slides,1): vals=[sh.text_frame.text.replace('\n',' | ') for sh in s.shapes if getattr(sh,'has_text_frame',False) and sh.text_frame.text.strip()] print(i, vals[0][:85] if vals else 'NO TEXT') assert len(prs.slides)==22 assert 'Presented by Dr Dhwani Shah' in '\n'.join(sh.text_frame.text for sh in prs.slides[0].shapes if getattr(sh,'has_text_frame',False)) PY
python - <<'PY' from pptx import Presentation from pathlib import Path p=Path('/tmp/workspace/ihd-presentation/output/Ischaemic_Heart_Disease_Dr_Dhwani_Shah_Detailed.pptx') assert p.exists() and p.stat().st_size > 100000 prs=Presentation(str(p)) assert len(prs.slides)==23 first='\n'.join(sh.text_frame.text for sh in prs.slides[0].shapes if getattr(sh,'has_text_frame',False)) assert 'ISCHAEMIC HEART DISEASE' in first assert 'Presented by Dr Dhwani Shah' in first assert 'Assistant Professor- Genaral Medicine' in first for i, slide in enumerate(prs.slides,1): assert len(slide.shapes)>0, f'empty slide {i}' print(f'Validated: {len(prs.slides)} slides; {p.stat().st_size} bytes; title metadata present') PY
Ischaemic Heart Disease Dr Dhwani Shah Detailed
Presentation · PPTX
Add thrombolysis slide in it
~/ihd-presentation/
2023 ESC acute coronary syndromes guideline fibrinolytic therapy STEMI contraindications dosing tenecteplase
ST elevation myocardial infarction AND fibrinolysis
~/ihd-presentation/src/add_thrombolysis_slide.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
from pathlib import Path
src=Path('/tmp/workspace/ihd-presentation/output/Ischaemic_Heart_Disease_Dr_Dhwani_Shah_Detailed.pptx')
out=Path('/tmp/workspace/ihd-presentation/output/Ischaemic_Heart_Disease_Dr_Dhwani_Shah_Detailed_with_Thrombolysis.pptx')
prs=Presentation(str(src))
W,H=13.333,7.5
NAVY=RGBColor(11,37,65); BLUE=RGBColor(20,92,138); TEAL=RGBColor(0,145,150); RED=RGBColor(190,55,55)
PALE=RGBColor(244,248,251); INK=RGBColor(28,43,55); GREY=RGBColor(102,116,128); WHITE=RGBColor(255,255,255); GREEN=RGBColor(44,132,86); ORANGE=RGBColor(234,132,44)
blank=prs.slide_layouts[6]
def fill(sh,c):
sh.fill.solid(); sh.fill.fore_color.rgb=c; sh.line.color.rgb=c
def rect(s,x,y,w,h,c,rounded=False):
sh=s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE if rounded else MSO_SHAPE.RECTANGLE, Inches(x),Inches(y),Inches(w),Inches(h)); fill(sh,c); return sh
def text(s,x,y,w,h,txt,sz=16,c=INK,bold=False,align=None):
sh=s.shapes.add_textbox(Inches(x),Inches(y),Inches(w),Inches(h)); tf=sh.text_frame; tf.clear(); tf.word_wrap=True
tf.margin_left=tf.margin_right=Inches(.07); tf.margin_top=tf.margin_bottom=Inches(.04)
p=tf.paragraphs[0]; p.text=txt
if align is not None: p.alignment=align
for r in p.runs:
r.font.name='Aptos'; r.font.size=Pt(sz); r.font.bold=bold; r.font.color.rgb=c
return sh
def bullets(s,x,y,w,h,items,accent=BLUE,fs=14):
box=rect(s,x,y,w,h,WHITE,True); box.line.color.rgb=RGBColor(210,222,230); rect(s,x,y,.10,h,accent)
sh=s.shapes.add_textbox(Inches(x+.24),Inches(y+.13),Inches(w-.38),Inches(h-.22)); tf=sh.text_frame; tf.clear(); tf.word_wrap=True
for i,item in enumerate(items):
p=tf.paragraphs[0] if i==0 else tf.add_paragraph(); p.text=item; p.font.name='Aptos'; p.font.size=Pt(fs); p.font.color.rgb=INK; p.space_after=Pt(6); p.bullet=True
def table(s,x,y,w,h,heads,rows,fs=10):
sh=s.shapes.add_table(len(rows)+1,len(heads),Inches(x),Inches(y),Inches(w),Inches(h)); tb=sh.table
for j,h in enumerate(heads):
c=tb.cell(0,j); c.text=h; c.fill.solid(); c.fill.fore_color.rgb=NAVY
for p in c.text_frame.paragraphs:
for r in p.runs: r.font.name='Aptos'; r.font.size=Pt(fs); r.font.bold=True; r.font.color.rgb=WHITE
for i,row in enumerate(rows,1):
for j,val in enumerate(row):
c=tb.cell(i,j); c.text=val; c.fill.solid(); c.fill.fore_color.rgb=WHITE if i%2 else PALE
c.margin_left=c.margin_right=Inches(.06);c.margin_top=c.margin_bottom=Inches(.035)
for p in c.text_frame.paragraphs:
for r in p.runs: r.font.name='Aptos'; r.font.size=Pt(fs); r.font.color.rgb=INK
s=prs.slides.add_slide(blank)
rect(s,0,0,W,.26,NAVY)
text(s,.52,.38,11.8,.42,'Thrombolysis (Fibrinolysis) in STEMI',25,NAVY,True)
text(s,.55,.85,11.7,.30,'A time-critical reperfusion option when timely primary PCI is not feasible',10,GREY)
text(s,12.05,7.05,.65,.22,str(len(prs.slides)).zfill(2),9,GREY,True,PP_ALIGN.RIGHT)
text(s,.55,7.05,10.7,.18,'Educational presentation - use local STEMI network protocols and drug labels for patient care',7,GREY)
# Time pathway
text(s,.65,1.25,3.8,.28,'Decision pathway',15,NAVY,True)
for x,w,col,lab,sub in [(.65,2.55,TEAL,'STEMI <12 h','Persistent ST elevation / new LBBB equivalent'),(3.47,2.55,BLUE,'Primary PCI available?','Expected device time within 120 min'),(6.29,2.55,GREEN,'Primary PCI','Preferred reperfusion strategy'),(9.11,3.45,ORANGE,'If delay >120 min','Fibrinolysis if eligible, then transfer')]:
rect(s,x,1.64,w,1.02,col,True); text(s,x+.12,1.79,w-.24,.24,lab,14,WHITE,True,PP_ALIGN.CENTER); text(s,x+.15,2.12,w-.30,.32,sub,9,WHITE,False,PP_ALIGN.CENTER)
if x<9: text(s,x+w+.03,1.92,.25,.22,'→',20,NAVY,True,PP_ALIGN.CENTER)
bullets(s,.65,2.98,3.9,2.78,[
'Give only for confirmed STEMI with symptom onset generally within 12 hours when primary PCI cannot be delivered promptly.',
'Do not use for NSTE-ACS or isolated ST-depression: benefit is absent and harm may occur.',
'Aim for door-to-needle time ≤30 minutes. Transfer to a PCI-capable centre after lysis.'
],TEAL,13)
bullets(s,4.72,2.98,3.9,2.78,[
'Mechanism: plasminogen activation to plasmin, producing fibrin clot lysis and reopening of the infarct-related artery.',
'Agents: tenecteplase, alteplase, reteplase or streptokinase according to availability and protocol.',
'Use adjunct antiplatelet and anticoagulant therapy as locally indicated; assess bleeding risk before treatment.'
],BLUE,13)
bullets(s,8.79,2.98,3.79,2.78,[
'Assess response at 60-90 min: pain relief, ≥50% ST-segment resolution in the lead with maximum elevation, and reperfusion arrhythmias support success.',
'Failed fibrinolysis or ongoing instability → rescue PCI.',
'Even after apparent success, plan early coronary angiography/PCI in a pharmaco-invasive strategy.'
],ORANGE,13)
text(s,.65,6.00,3.9,.24,'Absolute contraindications - examples',14,RED,True)
table(s,.65,6.28,11.93,.60,['Avoid fibrinolysis when any is present'],[["Previous intracranial haemorrhage or known intracranial structural lesion/malignancy; ischaemic stroke within 3 months; suspected aortic dissection; active bleeding or major bleeding diathesis; significant closed head/facial trauma within 3 months."]],10)
text(s,.67,6.93,11.6,.13,'Relative contraindications and drug doses vary by guideline, age, weight, renal function and local protocol. Screen carefully for bleeding risk.',8,GREY)
prs.save(str(out))
print(out)
python "/tmp/workspace/ihd-presentation/src/add_thrombolysis_slide.py" && python - <<'PY' from pptx import Presentation from pathlib import Path p=Path('/tmp/workspace/ihd-presentation/output/Ischaemic_Heart_Disease_Dr_Dhwani_Shah_Detailed_with_Thrombolysis.pptx') prs=Presentation(str(p)) assert p.exists() and p.stat().st_size > 150000 assert len(prs.slides)==24 last='\n'.join(sh.text_frame.text for sh in prs.slides[-1].shapes if getattr(sh,'has_text_frame',False)) assert 'Thrombolysis (Fibrinolysis) in STEMI' in last assert 'door-to-needle time' in last print(f'Validated: {len(prs.slides)} slides; {p.stat().st_size} bytes') PY
Ischaemic Heart Disease Dr Dhwani Shah Detailed with Thrombolysis
Presentation · PPTX