Hi
Presentation on epistaxis
epistaxis management guideline anterior posterior packing NHS ENT UK
epistaxis management
epistaxis nasal septum Kiesselbach plexus anatomy diagram
~/
https://entsho.com/epistaxis
mkdir -p "/tmp/workspace/epistaxis-presentation/src" "/tmp/workspace/epistaxis-presentation/assets" "/tmp/workspace/epistaxis-presentation/output" && python /tmp/skills/shared/scripts/fetch_images.py "https://cdn.orris.care/cdss_images/BAILY_1760542949578_00b05ecd-5265-42f3-a841-3be38f880233.png" > "/tmp/workspace/epistaxis-presentation/assets/images.json"
python - <<'PY' import json,base64 p='/tmp/workspace/epistaxis-presentation/assets/images.json' d=json.load(open(p)) for x in d: if x.get('base64'): raw=base64.b64decode(x['base64'].split(',',1)[1]);open('/tmp/workspace/epistaxis-presentation/assets/septum_arteries.png','wb').write(raw);print('saved',len(raw)) PY
python - <<'PY' from pathlib import Path p=Path('/tmp/workspace/epistaxis-presentation/src/create_deck.py') p.write_text(r'''from pptx import Presentation from pptx.util import Inches, Pt from pptx.enum.text import PP_ALIGN, MSO_ANCHOR from pptx.enum.shapes import MSO_SHAPE, MSO_CONNECTOR from pptx.dml.color import RGBColor from pptx.enum.dml import MSO_THEME_COLOR from pptx.enum.text import MSO_AUTO_SIZE OUT='/tmp/workspace/epistaxis-presentation/output/Epistaxis_Presentation.pptx' IMG='/tmp/workspace/epistaxis-presentation/assets/septum_arteries.png' prs=Presentation(); prs.slide_width=Inches(13.333); prs.slide_height=Inches(7.5) blank=prs.slide_layouts[6] # palette NAVY=RGBColor(16,38,62); TEAL=RGBColor(0,128,137); RED=RGBColor(190,48,62); PALE=RGBColor(239,247,247); INK=RGBColor(31,43,53); MUTED=RGBColor(91,107,119); WHITE=RGBColor(255,255,255); LIGHT=RGBColor(246,248,250); AMBER=RGBColor(233,163,45); GREY=RGBColor(220,227,232) def bg(s,c=WHITE): s.background.fill.solid();s.background.fill.fore_color.rgb=c def rect(s,x,y,w,h,fill,line=None,r=False): sh=s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE if r else MSO_SHAPE.RECTANGLE, Inches(x), Inches(y), Inches(w), Inches(h)) sh.fill.solid();sh.fill.fore_color.rgb=fill sh.line.color.rgb=line if line else fill return sh def text(s,x,y,w,h,txt,size=20,color=INK,bold=False,align=PP_ALIGN.LEFT, font='Aptos', valign=MSO_ANCHOR.TOP): tb=s.shapes.add_textbox(Inches(x),Inches(y),Inches(w),Inches(h));tf=tb.text_frame;tf.clear();tf.word_wrap=True;tf.margin_left=0;tf.margin_right=0;tf.margin_top=0;tf.margin_bottom=0;tf.vertical_anchor=valign p=tf.paragraphs[0];p.alignment=align;p.space_after=Pt(0);p.space_before=Pt(0) for i,line in enumerate(txt.split('\n')): if i: p=tf.add_paragraph();p.alignment=align;p.space_after=Pt(0);p.space_before=Pt(0) p.text=line for r in p.runs:r.font.name=font;r.font.size=Pt(size);r.font.bold=bold;r.font.color.rgb=color return tb def title(s, num, heading, sub=''): text(s,.62,.35,1,.25,f'{num:02d}',11,TEAL,True) text(s,.62,.62,12.0,.5,heading,29,NAVY,True) if sub:text(s,.62,1.18,12,.30,sub,12,MUTED) rect(s,.62,1.58,1.05,.055,TEAL) def foot(s,n): text(s,.62,7.14,8,.16,'EPITAXIS | Teaching presentation',9,MUTED) text(s,12.0,7.14,.7,.16,str(n),9,MUTED,False,PP_ALIGN.RIGHT) def bullet(s,x,y,w,items,size=17, color=INK, gap=.50): for i,item in enumerate(items): text(s,x,y+i*gap,.22,.25,'•',size,TEAL,True) text(s,x+.28,y+i*gap,w-.28,.35,item,size,color) def pill(s,x,y,w,tx,c=TEAL): rect(s,x,y,w,.33,c,None,True);text(s,x,y+.03,w,.2,tx,10,WHITE,True,PP_ALIGN.CENTER) def add_notes(s, src): ns=s.notes_slide tf=ns.notes_text_frame tf.text='Sources: '+src # 1 s=prs.slides.add_slide(blank);bg(s,NAVY) rect(s,.72,.8,.12,4.9,TEAL);text(s,1.15,1.0,9.7,.7,'EPISTAXIS',42,WHITE,True) text(s,1.18,1.86,8.2,.42,'A practical approach to assessment and management of nosebleeds',21,RGBColor(209,225,229)) pill(s,1.18,2.7,1.45,'ENT / EMERGENCY',TEAL) # abstract visual rect(s,9.65,1.05,2.35,3.9,RGBColor(24,57,84),None,True) for yy,ww,cc in [(1.52,1.5,TEAL),(2.2,1.8,RED),(2.88,1.2,TEAL),(3.56,1.65,RGBColor(74,162,169))]: rect(s,10.02,yy,ww,.18,cc,None,True) text(s,1.18,5.88,7.8,.3,'Definition • Anatomy • First aid • Escalation • Prevention',15,RGBColor(190,215,220)) text(s,1.18,6.55,5,.22,'Prepared for: ____________________',12,RGBColor(190,215,220));add_notes(s,'Rosen’s Emergency Medicine, 10e, pp. 919-920.') #2 s=prs.slides.add_slide(blank);bg(s);title(s,2,'Why epistaxis matters','Common, usually self-limiting, but occasionally life-threatening');foot(s,2) for x,number,label,desc,col in [(0.75,'90%','ANTERIOR','Usually from Little’s area / Kiesselbach’s plexus',TEAL),(4.55,'10%','POSTERIOR','Often severe, older patients and comorbidity',RED),(8.35,'ABC','FIRST PRIORITY','Airway, circulation and haemodynamic stability',NAVY)]: rect(s,x,2.05,3.55,2.65,PALE if col==TEAL else LIGHT,None,True);text(s,x+.25,2.38,3.0,.6,number,34,col,True);text(s,x+.25,3.15,3,.27,label,12,col,True);text(s,x+.25,3.65,2.9,.6,desc,16,INK) text(s,.82,5.48,11.5,.55,'Only a minority of patients need emergency care, but prompt recognition of severe or posterior bleeding is essential.',19,NAVY,True);add_notes(s,'Rosen’s Emergency Medicine, 10e, p. 919; ENT SHO Epistaxis.') #3 anatomy s=prs.slides.add_slide(blank);bg(s);title(s,3,'Anatomy: where bleeding originates','The anterior septum is a vascular crossroads');foot(s,3) s.shapes.add_picture(IMG, Inches(.75), Inches(1.9), width=Inches(5.8), height=Inches(4.7)) rect(s,7.05,1.9,5.5,4.7,LIGHT,None,True);text(s,7.4,2.28,4.7,.34,'Kiesselbach’s plexus (Little’s area)',20,NAVY,True) bullet(s,7.42,2.95,4.7,['Anteroinferior nasal septum','Convergence of ethmoidal, sphenopalatine, greater palatine and superior labial contributions','Typical source of anterior epistaxis'],16,gap=.70) text(s,.82,6.68,7,.16,'Figure: arterial supply of the nasal septum',9,MUTED);add_notes(s,'Bailey & Love’s Short Practice of Surgery, 28e, p. 785, Fig. 51.37; Rosen’s Emergency Medicine, 10e, p. 919.') #4 causes s=prs.slides.add_slide(blank);bg(s);title(s,4,'Causes and risk factors','Look for local trauma and systemic contributors');foot(s,4) for x,head,items,col in [(0.75,'LOCAL', ['Digital trauma / nose blowing','Dry or inflamed mucosa','Foreign body, infection or tumour','Iatrogenic trauma'],TEAL),(4.55,'SYSTEMIC', ['Anticoagulants or antiplatelets','Bleeding disorder / thrombocytopenia','Hereditary haemorrhagic telangiectasia','Hypertension may be associated with persistence'],RED),(8.35,'HIGH-RISK CLUES', ['Recurrent unilateral bleeding','Nasal obstruction or mass','Major trauma','Bleeding in a child under 2 years'],AMBER)]: rect(s,x,1.95,3.45,4.6,LIGHT,None,True);text(s,x+.28,2.25,2.7,.3,head,15,col,True);bullet(s,x+.28,2.9,2.9,items,15,gap=.67) add_notes(s,'Bailey & Love’s Short Practice of Surgery, 28e, p. 788; Rosen’s Emergency Medicine, 10e, pp. 919-920.') #5 triage s=prs.slides.add_slide(blank);bg(s);title(s,5,'Initial assessment','Resuscitate and diagnose in parallel');foot(s,5) steps=[('1','ABCDE','Assess airway, breathing, circulation and perfusion. Escalate immediately if unstable.'),('2','FOCUSED HISTORY','Duration, trauma, previous episodes, medications, bleeding tendency and comorbidity.'),('3','EXAMINATION','Suction clot if possible, inspect with good light and identify a source. Do not delay first aid.'),('4','TARGETED TESTS','CBC and coagulation studies only when severe bleeding, anticoagulation, or clinical concern for coagulopathy.')] for i,(n,h,d) in enumerate(steps): y=1.85+i*1.15;rect(s,.85,y,.58,.58,TEAL,None,True);text(s,.85,y+.09,.58,.25,n,16,WHITE,True,PP_ALIGN.CENTER);text(s,1.7,y,2.3,.26,h,15,NAVY,True);text(s,4.0,y,7.9,.45,d,15,INK) add_notes(s,'Rosen’s Emergency Medicine, 10e, pp. 919-920.') #6 first aid s=prs.slides.add_slide(blank);bg(s,PALE);title(s,6,'First aid: make the patient do the right thing','Effective compression is both treatment and prevention teaching');foot(s,6) for i,(h,d) in enumerate([('SIT FORWARD','Lean over a bowl or sink. Spit blood out, do not swallow it.'),('PINCH SOFT NOSE','Compress the cartilaginous, fleshy part of both nostrils.'),('HOLD CONTINUOUSLY','Do not release pressure to check. Maintain for 15-20 minutes.'),('ADJUNCTS','Topical vasoconstrictor may help; use suction and illumination after control.')]): x=.8+(i%2)*6.15;y=1.9+(i//2)*2.1;rect(s,x,y,5.6,1.55,WHITE,None,True);text(s,x+.28,y+.28,4.8,.28,f'{i+1:02d} {h}',16,TEAL,True);text(s,x+.28,y+.75,4.85,.42,d,16,INK) text(s,.86,6.32,11.3,.35,'Avoid tilting the head back: it obscures bleeding and promotes swallowing of blood.',18,RED,True);add_notes(s,'ENT SHO Epistaxis; Rosen’s Emergency Medicine, 10e, p. 920.') #7 pathway s=prs.slides.add_slide(blank);bg(s);title(s,7,'Escalation pathway','Treat the source when visible, pack when direct therapy is not possible or fails');foot(s,7) items=[('COMPRESSION + VASOCONSTRICTOR','First-line for non-life-threatening bleeding',TEAL),('DIRECT THERAPY','Visible point: chemical cautery or electrocautery. Do not cauterise broad areas or both septal sides.',TEAL),('ANTERIOR PACKING','Absorbable material, sponge or balloon device if ongoing bleeding and direct treatment fails.',AMBER),('POSTERIOR / REFRACTORY BLEED','ENT-led endoscopy, posterior pack, sphenopalatine artery control or embolisation.',RED)] for i,(h,d,c) in enumerate(items): y=1.8+i*1.18;rect(s,.82,y,11.65,.83,LIGHT,None,True);rect(s,.82,y,.15,.83,c);text(s,1.2,y+.14,3.2,.24,h,14,c,True);text(s,4.55,y+.14,7.3,.35,d,15,INK) add_notes(s,'Bailey & Love’s Short Practice of Surgery, 28e, pp. 788-789; ENT SHO Epistaxis.') #8 anterior posterior s=prs.slides.add_slide(blank);bg(s);title(s,8,'Anterior versus posterior epistaxis','Pattern recognition determines urgency and pathway');foot(s,8) for x,hd,col,lines in [(0.75,'ANTERIOR',TEAL,['Most common','Usually unilateral and visible anteriorly','Typically from Little’s area','Often responds to first aid or cautery']),(6.82,'POSTERIOR',RED,['Small minority of cases','Blood in throat and both nostrils','Brisk bleeding despite anterior packing','Older adult with comorbidity: higher risk'])]: rect(s,x,1.9,5.72,4.55,PALE if col==TEAL else LIGHT,None,True);text(s,x+.35,2.3,4.4,.4,hd,22,col,True);bullet(s,x+.38,3.05,4.65,lines,17,gap=.65) add_notes(s,'Rosen’s Emergency Medicine, 10e, p. 919; ENT SHO Epistaxis.') #9 red flags s=prs.slides.add_slide(blank);bg(s,NAVY);text(s,.65,.55,11.7,.48,'When to escalate or admit',30,WHITE,True);rect(s,.65,1.27,1.1,.055,TEAL);foot(s,9) for i,(h,d) in enumerate([('UNCONTROLLED BLEEDING','Heavy bleeding or ongoing bleeding after effective first aid and packing.'),('AIRWAY OR HAEMODYNAMIC CONCERN','Aspiration risk, syncope, shock, significant blood loss or inability to protect airway.'),('HIGH-RISK CONTEXT','Anticoagulation, major trauma, bleeding disorder, frailty or major cardiopulmonary disease.'),('POSTERIOR BLEED SUSPECTED','Bilateral bleeding, throat flooding or bleeding that continues despite anterior packing.')]): y=1.75+i*1.16;rect(s,.8,y,11.55,.82,RGBColor(24,57,84),None,True);text(s,1.1,y+.16,3.1,.22,h,14,RGBColor(99,202,206),True);text(s,4.3,y+.16,7.3,.37,d,15,WHITE) add_notes(s,'ENT SHO Epistaxis; Rosen’s Emergency Medicine, 10e, pp. 919-920.') #10 recurrence s=prs.slides.add_slide(blank);bg(s);title(s,10,'Aftercare and prevention','Reduce trauma and moisturise the mucosa');foot(s,10) bullet(s,.9,1.95,5.6,['Avoid nose picking, blowing, strenuous exercise, hot drinks and alcohol for several days after an episode.','Use saline sprays or a nasal moisturiser when mucosa is dry.','Review antithrombotic therapy only with the clinician who prescribed it.','Arrange ENT evaluation for recurrent, severe or unilateral episodes.'],17,gap=.82) rect(s,7.2,1.95,4.7,3.8,PALE,None,True);text(s,7.57,2.35,3.9,.3,'Remember',19,NAVY,True);text(s,7.57,2.95,3.75,1.55,'Correct first aid is the most useful skill to teach every patient with recurrent anterior epistaxis.',24,TEAL,True);add_notes(s,'University Hospitals Sussex NHS Epistaxis leaflet; ENT SHO Epistaxis.') #11 takehome s=prs.slides.add_slide(blank);bg(s,PALE);title(s,11,'Take-home messages','A simple sequence prevents most avoidable escalation');foot(s,11) for i,tx in enumerate(['Stabilise first: ABCDE and assess severity.','Most bleeds are anterior, from Kiesselbach’s plexus.','Head forward, pinch the soft nose continuously for 15-20 minutes.','Identify and treat a visible source before packing when possible.','Posterior, uncontrolled or high-risk bleeding needs urgent senior / ENT input.']): y=1.72+i*.86;rect(s,.82,y,.43,.43,TEAL,None,True);text(s,.82,y+.07,.43,.2,'✓',13,WHITE,True,PP_ALIGN.CENTER);text(s,1.47,y+.02,10.6,.35,tx,18,NAVY if i<2 else INK, i<2) add_notes(s,'Rosen’s Emergency Medicine, 10e; Bailey & Love’s Short Practice of Surgery, 28e; ENT SHO Epistaxis.') #12 refs s=prs.slides.add_slide(blank);bg(s);title(s,12,'References','Selected sources used in this presentation');foot(s,12) refs=['Walls RM, et al. Rosen’s Emergency Medicine: Concepts and Clinical Practice. 10th ed. Epistaxis, pp. 919-920.','Williams NS, et al. Bailey & Love’s Short Practice of Surgery. 28th ed. Epistaxis, pp. 788-789.','ENT SHO. Epistaxis clinical guidance. https://entsho.com/epistaxis (accessed 1 September 2026).','University Hospitals Sussex NHS Foundation Trust. Nosebleed (epistaxis) emergency department leaflet.'] for i,r in enumerate(refs): text(s,.9,1.9+i*1.0,11.2,.55,f'{i+1}. {r}',16,INK) text(s,.9,6.3,11.1,.36,'For educational use. Local protocols and senior clinical judgement take precedence in patient care.',13,RED,True);add_notes(s,'References listed on slide.') prs.save(OUT) print(OUT) ''') PY python "/tmp/workspace/epistaxis-presentation/src/create_deck.py"
python - <<'PY' from pptx import Presentation p='/tmp/workspace/epistaxis-presentation/output/Epistaxis_Presentation.pptx' prs=Presentation(p) print('slides',len(prs.slides)) for i,s in enumerate(prs.slides,1): texts=[] for sh in s.shapes: if sh.has_text_frame and sh.text.strip(): texts.append(sh.text.replace('\n',' | ')) print(i, ' :: '.join(texts[:3])) PY python - <<'PY' from pathlib import Path p=Path('/tmp/workspace/epistaxis-presentation/output/Epistaxis_Presentation.pptx') print('exists',p.exists(),'bytes',p.stat().st_size) PY
~/epistaxis-presentation/src/create_deck.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/epistaxis-presentation/src/create_deck.py'
python "/tmp/workspace/epistaxis-presentation/src/create_deck.py" && python - <<'PY' from pptx import Presentation from pathlib import Path p=Path('/tmp/workspace/epistaxis-presentation/output/Epistaxis_Presentation.pptx') prs=Presentation(p) assert len(prs.slides)==12 assert p.stat().st_size>50000 for i,s in enumerate(prs.slides,1): assert any(sh.has_text_frame and sh.text.strip() for sh in s.shapes), i print('verified',len(prs.slides),'slides',p.stat().st_size,'bytes') PY
Epistaxis Presentation
Presentation · PPTX