1st degree second and 3rd degree heart block and other intraoperative arrythmia 30 marks question answer for MD examination 30marks
| Feature | Finding |
|---|---|
| P waves | Regular, occurring at faster rate than QRS |
| QRS complexes | Regular, but independent of P waves |
| PR interval | No constant relationship (dissociation) |
| Ventricular rate | Acquired: < 40 bpm; Congenital: may be faster (40-60 bpm) |
| QRS morphology | Narrow if pacemaker is junctional (above His bifurcation); Wide if ventricular (below His) |
| Level of Block | Escape Pacemaker | Rate | QRS | Stability |
|---|---|---|---|---|
| AV node (congenital) | Junctional (His bundle) | 40-60 bpm | Narrow | More stable |
| Within His bundle | Distal His-Purkinje | 25-45 bpm | Wide or narrow | Moderately stable |
| Infra-Hisian (below His) | Ventricular | < 40 bpm | Wide | Least stable, high risk |
| Condition | Indication | Class |
|---|---|---|
| Acquired complete AV block (symptomatic) | Permanent pacemaker | I |
| Acquired complete AV block (asymptomatic) | Permanent pacemaker | I |
| Second-degree Mobitz II with wide QRS | Permanent pacemaker | I |
| High-grade AV block | Permanent pacemaker | I |
| Second-degree Mobitz I (symptomatic) | Permanent pacemaker | IIa |
| First-degree AV block | No pacing (observe) | III |
| Feature | First-Degree | Second-Degree Mobitz I | Second-Degree Mobitz II | Third-Degree |
|---|---|---|---|---|
| PR interval | Fixed, prolonged > 200 ms | Progressive prolongation | Constant (no lengthening) | No relationship |
| Dropped beats | None | Present (with warning) | Present (without warning) | All P waves blocked |
| QRS | Usually narrow | Usually narrow | Usually wide (BBB) | Narrow (junctional) or wide (ventricular) |
| Site of block | AV node | AV node | His-Purkinje | AV node / His-Purkinje |
| Risk of complete block | Low | Low | HIGH | N/A |
| Treatment | None | Treat cause; atropine if symptomatic | Pacing | Emergency pacing |
Make pdf of all questions
ls -la /tmp/workspace/ 2>/dev/null || mkdir -p /tmp/workspace && ls -la /tmp/workspace/
mkdir -p /tmp/workspace/heart-block-pdf && cat > /tmp/workspace/heart-block-pdf/generate_pdf.py << 'PYEOF' from reportlab.lib.pagesizes import A4 from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.units import cm, mm from reportlab.lib import colors from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, HRFlowable, KeepTogether from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY # ── Document setup ───────────────────────────────────────────────────────────── output_path = "/tmp/workspace/heart-block-pdf/Heart_Block_Intraoperative_Arrhythmias_MD_Exam.pdf" doc = SimpleDocTemplate( output_path, pagesize=A4, rightMargin=2*cm, leftMargin=2*cm, topMargin=2.5*cm, bottomMargin=2.5*cm, title="Heart Block & Intraoperative Arrhythmias – MD Examination", author="Orris Medical AI" ) # ── Styles ────────────────────────────────────────────────────────────────────── styles = getSampleStyleSheet() NAVY = colors.HexColor("#1a3a5c") TEAL = colors.HexColor("#0d6e8a") GOLD = colors.HexColor("#c8922a") LGRAY = colors.HexColor("#f2f5f8") MGRAY = colors.HexColor("#ccd6e0") WHITE = colors.white BLACK = colors.black title_style = ParagraphStyle("TitleStyle", parent=styles["Title"], fontSize=18, textColor=WHITE, spaceAfter=4, alignment=TA_CENTER, fontName="Helvetica-Bold", leading=22) subtitle_style = ParagraphStyle("SubtitleStyle", parent=styles["Normal"], fontSize=11, textColor=WHITE, alignment=TA_CENTER, fontName="Helvetica", leading=14) h1 = ParagraphStyle("H1", parent=styles["Heading1"], fontSize=13, textColor=WHITE, spaceBefore=14, spaceAfter=4, fontName="Helvetica-Bold", leading=16, borderPad=6) h2 = ParagraphStyle("H2", parent=styles["Heading2"], fontSize=11, textColor=NAVY, spaceBefore=10, spaceAfter=3, fontName="Helvetica-Bold", leading=14, borderPad=4, leftIndent=0) h3 = ParagraphStyle("H3", parent=styles["Heading3"], fontSize=10.5, textColor=TEAL, spaceBefore=8, spaceAfter=2, fontName="Helvetica-Bold", leading=13) body = ParagraphStyle("Body", parent=styles["Normal"], fontSize=9.5, textColor=BLACK, spaceAfter=4, spaceBefore=2, fontName="Helvetica", leading=13, alignment=TA_JUSTIFY) bullet = ParagraphStyle("Bullet", parent=styles["Normal"], fontSize=9.5, textColor=BLACK, spaceAfter=3, spaceBefore=1, fontName="Helvetica", leading=13, leftIndent=14, bulletIndent=4) sub_bullet = ParagraphStyle("SubBullet", parent=styles["Normal"], fontSize=9, textColor=colors.HexColor("#333333"), spaceAfter=2, spaceBefore=1, fontName="Helvetica", leading=12, leftIndent=28, bulletIndent=18) note_style = ParagraphStyle("Note", parent=styles["Normal"], fontSize=8.5, textColor=colors.HexColor("#555555"), spaceAfter=3, fontName="Helvetica-Oblique", leading=11, leftIndent=8, borderPad=4, backColor=LGRAY) keyword_style = ParagraphStyle("KW", parent=styles["Normal"], fontSize=9.5, textColor=NAVY, fontName="Helvetica-Bold") # ── Helper: coloured section banner ──────────────────────────────────────────── def section_banner(text, bg=NAVY): data = [[Paragraph(text, ParagraphStyle("Banner", parent=styles["Normal"], fontSize=12, textColor=WHITE, fontName="Helvetica-Bold", alignment=TA_LEFT, leading=15))]] t = Table(data, colWidths=[17*cm]) t.setStyle(TableStyle([ ("BACKGROUND", (0,0), (-1,-1), bg), ("TOPPADDING", (0,0), (-1,-1), 7), ("BOTTOMPADDING", (0,0), (-1,-1), 7), ("LEFTPADDING", (0,0), (-1,-1), 10), ("RIGHTPADDING", (0,0), (-1,-1), 10), ])) return t def sub_banner(text, bg=TEAL): data = [[Paragraph(text, ParagraphStyle("SubBanner", parent=styles["Normal"], fontSize=10.5, textColor=WHITE, fontName="Helvetica-Bold", alignment=TA_LEFT, leading=13))]] t = Table(data, colWidths=[17*cm]) t.setStyle(TableStyle([ ("BACKGROUND", (0,0), (-1,-1), bg), ("TOPPADDING", (0,0), (-1,-1), 5), ("BOTTOMPADDING", (0,0), (-1,-1), 5), ("LEFTPADDING", (0,0), (-1,-1), 14), ("RIGHTPADDING", (0,0), (-1,-1), 8), ])) return t def gold_banner(text): return sub_banner(text, bg=GOLD) def make_table(headers, rows, col_widths=None): if col_widths is None: col_widths = [17*cm / len(headers)] * len(headers) header_row = [Paragraph(f"<b>{h}</b>", ParagraphStyle("TH", parent=styles["Normal"], fontSize=8.5, textColor=WHITE, fontName="Helvetica-Bold", alignment=TA_CENTER, leading=11)) for h in headers] body_rows = [] for row in rows: body_rows.append([ Paragraph(str(cell), ParagraphStyle("TD", parent=styles["Normal"], fontSize=8.5, textColor=BLACK, fontName="Helvetica", leading=11, alignment=TA_CENTER)) for cell in row ]) all_rows = [header_row] + body_rows t = Table(all_rows, colWidths=col_widths) ts = TableStyle([ ("BACKGROUND", (0,0), (-1,0), NAVY), ("TEXTCOLOR", (0,0), (-1,0), WHITE), ("GRID", (0,0), (-1,-1), 0.4, MGRAY), ("ROWBACKGROUNDS",(0,1),(-1,-1), [WHITE, LGRAY]), ("VALIGN", (0,0), (-1,-1), "MIDDLE"), ("TOPPADDING", (0,0), (-1,-1), 4), ("BOTTOMPADDING",(0,0), (-1,-1), 4), ("LEFTPADDING", (0,0), (-1,-1), 5), ("RIGHTPADDING", (0,0), (-1,-1), 5), ]) t.setStyle(ts) return t def B(text): return f"<b>{text}</b>" def I(text): return f"<i>{text}</i>" def BI(text): return f"<b><i>{text}</i></b>" # ── Build content ─────────────────────────────────────────────────────────────── story = [] # ── COVER BLOCK ──────────────────────────────────────────────────────────────── cover_data = [[ Paragraph("HEART BLOCK & INTRAOPERATIVE ARRHYTHMIAS", title_style), Paragraph("MD Examination — 30 Marks", subtitle_style), Paragraph("Based on Braunwald's Heart Disease · Fuster & Hurst's The Heart · Goldman-Cecil Medicine · Miller's Anesthesia", subtitle_style), ]] cover_table = Table([[Paragraph("HEART BLOCK & INTRAOPERATIVE ARRHYTHMIAS", ParagraphStyle("CT", parent=styles["Normal"], fontSize=20, textColor=WHITE, fontName="Helvetica-Bold", alignment=TA_CENTER, leading=26, spaceAfter=4))], [Paragraph("MD Examination Answer — 30 Marks", ParagraphStyle("CS", parent=styles["Normal"], fontSize=12, textColor=colors.HexColor("#d4e8f4"), fontName="Helvetica", alignment=TA_CENTER, leading=16))], [Paragraph("Braunwald's Heart Disease · Fuster & Hurst's The Heart · Goldman-Cecil Medicine · Miller's Anesthesia", ParagraphStyle("CR", parent=styles["Normal"], fontSize=9, textColor=colors.HexColor("#aaccdd"), fontName="Helvetica-Oblique", alignment=TA_CENTER, leading=13))] ], colWidths=[17*cm]) cover_table.setStyle(TableStyle([ ("BACKGROUND", (0,0), (-1,-1), NAVY), ("TOPPADDING", (0,0), (-1,-1), 14), ("BOTTOMPADDING", (0,0), (-1,-1), 14), ("LEFTPADDING", (0,0), (-1,-1), 20), ("RIGHTPADDING", (0,0), (-1,-1), 20), ("ROUNDEDCORNERS", [6]), ])) story.append(cover_table) story.append(Spacer(1, 0.5*cm)) # ── SECTION I: ANATOMY ────────────────────────────────────────────────────────── story.append(section_banner("SECTION I: ANATOMY OF THE CONDUCTION SYSTEM")) story.append(Spacer(1, 3*mm)) story.append(Paragraph( "The cardiac conduction system consists of the <b>SA node → AV node → Bundle of His → Right & Left bundle branches → Purkinje fibers</b>. " "The AV node is the sole electrical connection between atria and ventricles. " "<b>Heart block</b> (AV block) is a disturbance of impulse conduction through the AV node or His-Purkinje system, " "classified into three degrees by severity.", body)) story.append(Spacer(1, 2*mm)) # ── SECTION II: FIRST-DEGREE ──────────────────────────────────────────────────── story.append(section_banner("SECTION II: FIRST-DEGREE HEART BLOCK")) story.append(Spacer(1, 3*mm)) story.append(sub_banner("Definition")) story.append(Spacer(1,1*mm)) story.append(Paragraph( "PR interval <b>> 200 ms (0.20 s)</b> with <b>every P wave conducted</b> to the ventricles and a regular ventricular rate. " "Technically represents <i>conduction delay</i>, not true block. PR as long as 1.0 s has been recorded.", body)) story.append(sub_banner("ECG Features")) story.append(Spacer(1,1*mm)) for pt in [ "PR interval <b>> 200 ms</b> (fixed, constant)", "Every P wave followed by a QRS complex — no dropped beats", "QRS morphology: usually <b>narrow</b> (unless coexisting BBB)", "Skipped P waves: PR > P-P interval in extreme prolongation", ]: story.append(Paragraph(f"• {pt}", bullet)) story.append(sub_banner("Site of Delay")) story.append(Spacer(1,1*mm)) story.append(Paragraph("• <b>Normal QRS</b>: delay almost always in the <b>AV node</b> (A-H interval prolonged)", bullet)) story.append(Paragraph("• <b>BBB pattern QRS</b>: delay may be in AV node <i>or</i> His-Purkinje system; His bundle electrogram required for localisation", bullet)) story.append(sub_banner("Causes")) story.append(Spacer(1,1*mm)) for pt in [ "Increased vagal tone (athletes, inferior MI)", "Drugs: beta-blockers, calcium channel blockers, digoxin, amiodarone", "Inflammatory: rheumatic fever, Lyme disease, myocarditis", "Electrolyte: hyperkalemia", "Degenerative conduction disease (Lev/Lenègre disease)", ]: story.append(Paragraph(f"• {pt}", bullet)) story.append(sub_banner("Clinical Significance & Treatment")) story.append(Spacer(1,1*mm)) for pt in [ "<b>Usually benign</b>; excellent prognosis even with chronic bifascicular block", "Low rate of progression to third-degree AV block", "In <b>heart failure</b>: may elevate LV end-diastolic pressure, diastolic MR, reduce LV systolic function", "Associated with increased risk of AF, advanced AV block, HF and death in patients with underlying heart disease", "<b>Treatment: none required</b> in asymptomatic patients; remove offending drugs; monitor for progression", ]: story.append(Paragraph(f"• {pt}", bullet)) story.append(Spacer(1, 3*mm)) # ── SECTION III: SECOND-DEGREE ───────────────────────────────────────────────── story.append(section_banner("SECTION III: SECOND-DEGREE HEART BLOCK")) story.append(Spacer(1, 3*mm)) story.append(Paragraph( "Defined as blocking of <b>some (but not all)</b> atrial impulses to the ventricles when physiologic interference is NOT involved. " "Two subtypes: <b>Mobitz Type I (Wenckebach)</b> and <b>Mobitz Type II</b>.", body)) story.append(Spacer(1, 2*mm)) # Mobitz I story.append(gold_banner("A. MOBITZ TYPE I — WENCKEBACH SECOND-DEGREE AV BLOCK")) story.append(Spacer(1,2*mm)) story.append(sub_banner("ECG Features (5 Classic Criteria)")) story.append(Spacer(1,1*mm)) criteria = [ ("1.", "Progressive <b>prolongation of PR interval</b> before a non-conducted P wave"), ("2.", "Prolongation occurs at <b>progressively decreasing increments</b>"), ("3.", "Progressive <b>shortening of R-R intervals</b> before the dropped beat"), ("4.", "<b>Pause</b> encompassing blocked P wave is <b>shorter than two P-P cycles</b>"), ("5.", "<b>Sine qua non</b>: conducted PR after a dropped beat is always the <b>shortest PR</b>"), ] for num, text in criteria: story.append(Paragraph(f"<b>{num}</b> {text}", bullet)) story.append(sub_banner("Site of Block")) story.append(Paragraph("Almost always in the <b>AV node</b> (proximal). Narrow QRS is the rule. " "Rarely: Wenckebach in His-Purkinje system (especially with BBB pattern).", body)) story.append(sub_banner("Causes")) story.append(Spacer(1,1*mm)) for pt in ["Inferior wall MI (RCA supplies AV node)", "Increased vagal tone, athlete's heart", "Drugs: beta-blockers, digoxin, CCBs", "Myocarditis, rheumatic fever"]: story.append(Paragraph(f"• {pt}", bullet)) story.append(sub_banner("Clinical Significance & Treatment")) story.append(Spacer(1,1*mm)) for pt in [ "Generally <b>benign</b> when isolated and asymptomatic; rarely progresses to complete block", "Treatment: <b>none</b> if asymptomatic", "Symptomatic: <b>IV atropine 0.5–1 mg</b>; treat underlying cause", "Pacing rarely required", ]: story.append(Paragraph(f"• {pt}", bullet)) story.append(Spacer(1, 3*mm)) # Mobitz II story.append(gold_banner("B. MOBITZ TYPE II SECOND-DEGREE AV BLOCK")) story.append(Spacer(1,2*mm)) story.append(sub_banner("ECG Features")) story.append(Spacer(1,1*mm)) for pt in [ "<b>Constant PR intervals</b> — no progressive lengthening before dropped beat", "Constant P-P and R-R intervals", "<b>Sudden unexpected dropping of QRS</b> — without prior warning", "Pause = <b>exactly two P-P cycles</b>", "Usually occurs with <b>wide QRS (BBB)</b>", ]: story.append(Paragraph(f"• {pt}", bullet)) story.append(sub_banner("Site of Block")) story.append(Paragraph("Almost always in the <b>His-Purkinje system</b> (infra-nodal). " "When QRS is normal: most likely intra-Hisian.", body)) story.append(sub_banner("Causes")) story.append(Spacer(1,1*mm)) for pt in ["Anterior MI (LAD territory — supplies bundle branches)", "Degenerative conduction disease (Lev/Lenègre)", "Surgical trauma to the conduction system"]: story.append(Paragraph(f"• {pt}", bullet)) story.append(sub_banner("Clinical Significance & Treatment")) story.append(Spacer(1,1*mm)) for pt in [ "<b>Serious arrhythmia</b> — frequently progresses to complete AV block and sudden death", "May cause Adams-Stokes attacks (syncope)", "<b>Temporary pacemaker</b> indicated even if asymptomatic", "<b>Permanent pacemaker</b>: Class I ACC/AHA indication", "IV atropine usually <b>ineffective</b> (block is infra-nodal)", "Isoproterenol infusion (1–2 mcg/min) as a temporary bridge", "Transcutaneous pacing as immediate bridge", ]: story.append(Paragraph(f"• {pt}", bullet)) story.append(Spacer(1, 3*mm)) # 2:1 Block story.append(gold_banner("C. 2:1 AV BLOCK (Special Case)")) story.append(Spacer(1,2*mm)) story.append(Paragraph("Every alternate P wave is blocked. Cannot classify as Mobitz I or II from ECG alone.", body)) story.append(Paragraph("• <b>Narrow QRS</b>: likely AV nodal (Mobitz I behavior) — better prognosis", bullet)) story.append(Paragraph("• <b>Wide QRS (BBB)</b>: likely infranodal (Mobitz II behavior) — warrants pacing", bullet)) story.append(Paragraph("• His bundle electrogram required for definitive localisation", bullet)) story.append(Spacer(1, 2*mm)) # High-grade story.append(gold_banner("D. HIGH-GRADE (ADVANCED) AV BLOCK")) story.append(Spacer(1,2*mm)) story.append(Paragraph( "Two or more <b>consecutive P waves fail to conduct</b>. More severe than second-degree but intermittent AV conduction still occurs. " "Causes: acute coronary syndromes, rheumatic heart disease, autoimmune disorders, myocarditis, infiltrative cardiomyopathy. " "Management: same as third-degree (pacing).", body)) story.append(Spacer(1, 3*mm)) # ── SECTION IV: THIRD-DEGREE ─────────────────────────────────────────────────── story.append(section_banner("SECTION IV: THIRD-DEGREE (COMPLETE) HEART BLOCK")) story.append(Spacer(1, 3*mm)) story.append(Paragraph( "<b>No atrial activity is conducted to the ventricles.</b> Atria and ventricles are controlled by <b>independent pacemakers</b> " "(AV dissociation where atrial rate > ventricular rate). One type of complete AV dissociation.", body)) story.append(Spacer(1, 2*mm)) story.append(sub_banner("ECG Features")) story.append(Spacer(1,1*mm)) ecg_table = make_table( ["ECG Feature", "Finding"], [ ["P waves", "Regular; faster rate than QRS (atrial rate > ventricular rate)"], ["QRS complexes", "Regular; independent of P waves"], ["PR interval", "No constant relationship — complete AV dissociation"], ["Ventricular rate", "Acquired: < 40 bpm; Congenital: 40–60 bpm (faster)"], ["QRS morphology", "Narrow (junctional — above His bifurcation); Wide (ventricular — below His)"], ], col_widths=[5*cm, 12*cm] ) story.append(ecg_table) story.append(Spacer(1, 3*mm)) story.append(sub_banner("Level of Block and Escape Rhythm")) story.append(Spacer(1,1*mm)) escape_table = make_table( ["Level of Block", "Escape Pacemaker", "Rate", "QRS", "Stability"], [ ["AV node (congenital)", "Junctional (His bundle)", "40–60 bpm", "Narrow", "Most stable"], ["Within His bundle", "Distal His-Purkinje", "25–45 bpm", "Narrow/Wide", "Moderate"], ["Infra-Hisian", "Ventricular", "< 40 bpm", "Wide", "Least stable — HIGH RISK"], ], col_widths=[3.5*cm, 4*cm, 2.8*cm, 2.8*cm, 3.9*cm] ) story.append(escape_table) story.append(Spacer(1, 3*mm)) story.append(sub_banner("Causes")) story.append(Spacer(1,1*mm)) story.append(Paragraph("<b>Congenital:</b>", h3)) for pt in ["Maternal SLE (anti-Ro/La antibodies cross placenta — damage AV node)", "Structural CHD (L-TGA — levo-transposition of great arteries)"]: story.append(Paragraph(f"• {pt}", bullet)) story.append(Paragraph("<b>Acquired:</b>", h3)) causes = [ "Acute MI: Inferior MI → AV nodal block (usually reversible); Anterior MI → infra-Hisian block (serious)", "Degenerative: Lev's disease (fibrosclerosis of cardiac skeleton), Lenègre's disease (conduction system fibrosis)", "Surgical/catheter trauma; TAVI complication", "Infections: Lyme disease, bacterial endocarditis, Chagas disease, rheumatic fever", "Infiltrative: sarcoidosis, amyloidosis, hemochromatosis", "Autoimmune: SLE, scleroderma, rheumatoid arthritis", "Drugs: digoxin toxicity, beta-blockers, CCBs", "Idiopathic", ] for c in causes: story.append(Paragraph(f"• {c}", bullet)) story.append(Spacer(1, 2*mm)) story.append(sub_banner("Clinical Features")) story.append(Spacer(1,1*mm)) for pt in [ "Ventricular rate <b>< 40 bpm</b>", "<b>Adams-Stokes (Morgagni-Adams-Stokes) attacks</b>: sudden loss of consciousness before an escape rhythm develops", "Fatigue, dyspnea, exercise intolerance", "Elevated BP (peripheral vasoconstriction) + renal insufficiency (reduced CO)", "<b>Cannon A waves</b> in JVP (atria contracting against closed tricuspid valve)", "Variable intensity of first heart sound (dissociation)", "Marked <b>QT prolongation</b> risk → Torsades de Pointes (TdP)", ]: story.append(Paragraph(f"• {pt}", bullet)) story.append(Spacer(1, 2*mm)) story.append(sub_banner("Treatment")) story.append(Spacer(1,1*mm)) story.append(Paragraph("<b>Acute / Emergency:</b>", h3)) treatment_rows = [ ("1", "IV Atropine 1 mg", "Only if AV nodal block. Ineffective for infra-Hisian block."), ("2", "Isoproterenol infusion 1–2 mcg/min", "Increases ventricular rate. Use cautiously in ischaemia."), ("3", "Transcutaneous (external) pacing", "Immediate stabilisation while preparing transvenous pacing."), ("4", "Transvenous temporary pacing", "Definitive acute management."), ] tr = make_table(["Step", "Intervention", "Notes"], treatment_rows, col_widths=[1.5*cm, 6*cm, 9.5*cm]) story.append(tr) story.append(Spacer(1, 2*mm)) story.append(Paragraph( "<b>Definitive:</b> <b>Permanent pacemaker</b> (Class I ACC/AHA 2018 guidelines for acquired complete AV block). " "After AV node ablation, pace at 80 bpm for ≥6 weeks to prevent QT prolongation and TdP.", body)) story.append(Spacer(1, 3*mm)) # ── SECTION V: INTRAOPERATIVE ARRHYTHMIAS ────────────────────────────────────── story.append(section_banner("SECTION V: INTRAOPERATIVE ARRHYTHMIAS")) story.append(Spacer(1, 3*mm)) story.append(sub_banner("Incidence & Significance")) story.append(Spacer(1,1*mm)) story.append(Paragraph( "Intraoperative arrhythmias are common (up to 70% of surgical patients). Most are benign (sinus tachycardia, isolated PVCs). " "Potentially life-threatening arrhythmias require immediate recognition and management.", body)) story.append(Spacer(1, 2*mm)) story.append(sub_banner("Causes of Intraoperative Arrhythmias")) story.append(Spacer(1,1*mm)) story.append(Paragraph("<b>A. Anaesthetic Causes:</b>", h3)) for pt in [ "Volatile anaesthetics (halothane > sevoflurane > isoflurane): sensitise myocardium to catecholamines; halothane most arrhythmogenic", "Succinylcholine: vagal stimulation → bradycardia, junctional rhythms", "Endotracheal intubation: sympathetic surge → tachycardia/hypertension", "Inadequate depth of anaesthesia", "Hyperventilation (respiratory alkalosis) or hypoventilation (respiratory acidosis)", ]: story.append(Paragraph(f"• {pt}", bullet)) story.append(Paragraph("<b>B. Surgical Causes:</b>", h3)) for pt in [ "Vagal reflexes: ocular surgery (oculocardiac reflex), peritoneal traction, cervical manipulation, laryngoscopy", "Cardiac surgery: direct manipulation, cardioplegia, reperfusion injury", "Carotid endarterectomy: baroreceptor stimulation", "Mediastinal manipulation", ]: story.append(Paragraph(f"• {pt}", bullet)) story.append(Paragraph("<b>C. Physiological / Patient Causes:</b>", h3)) for pt in [ "<b>Hypoxaemia</b> — <i>most important cause; must be excluded first in every intraoperative arrhythmia</i>", "Hypercarbia / hypocarbia", "Electrolyte disturbances: hypokalaemia, hyperkalaemia, hypomagnesaemia, hypocalcaemia", "Hypothermia (Osborn J waves; VF risk below 28°C)", "Hypovolaemia / haemorrhagic shock", "Pre-existing structural heart disease, CAD, cardiomyopathy", "Pre-existing channelopathies: WPW syndrome, congenital LQTS, Brugada syndrome", "Pulmonary embolism, pneumothorax", ]: story.append(Paragraph(f"• {pt}", bullet)) story.append(Paragraph("<b>D. Drug Interactions:</b>", h3)) for pt in [ "QT-prolonging drugs (ondansetron, droperidol, haloperidol) → risk of TdP", "Dexmedetomidine → sinus bradycardia; atropine/epinephrine <b>INEFFECTIVE</b> (α2 mechanism); need vasopressors", "Propofol prolonged infusion: may unmask Brugada pattern ECG changes", "Local anaesthetic systemic toxicity (LAST): ventricular arrhythmias, cardiac arrest", ]: story.append(Paragraph(f"• {pt}", bullet)) story.append(Spacer(1, 3*mm)) # Specific arrhythmias story.append(sub_banner("Specific Intraoperative Arrhythmias and Management")) story.append(Spacer(1,2*mm)) # Table of arrhythmias arrhythmia_rows = [ ["Sinus Bradycardia", "Vagal reflex, drugs, hypoxia, hypothyroidism", "IV Atropine 0.5–1 mg; Ephedrine if hypotension; Dexmedetomidine-induced → vasopressors (NOT atropine)"], ["Sinus Tachycardia", "Light anaesthesia, pain, hypovolaemia, fever, hypoxia", "Correct underlying cause; deepen anaesthesia; volume; beta-blocker if persistent"], ["1st-degree AV Block", "Drugs, vagal tone, inferior MI", "No treatment; monitor; remove offending drug"], ["2nd-degree Mobitz I", "Vagal excess, inferior MI, drugs", "Usually benign; atropine if symptomatic; treat cause"], ["2nd-degree Mobitz II", "Anterior MI, degenerative disease", "Serious — temporary pacing (transcutaneous → transvenous); atropine usually ineffective"], ["3rd-degree (CHB)", "Any of the above at severe level", "Emergency pacing; atropine (AV nodal only); isoproterenol bridge; permanent pacer postop"], ["PVCs / VPBs", "Hypoxia, electrolytes, light anaesthesia, ischaemia", "Correct cause first; IV Lidocaine 1–1.5 mg/kg; Amiodarone for refractory"], ["Sustained VT (with pulse)", "Ischaemia, electrolytes, drugs", "Amiodarone 150 mg IV over 10 min; DC cardioversion if unstable (200 J biphasic)"], ["Pulseless VT / VF", "Most dangerous", "CPR; immediate defibrillation 200 J biphasic; Epinephrine 1 mg IV q3–5 min; Amiodarone 300 mg IV"], ["SVT", "Reentrant circuits, catecholamines", "Vagal manoeuvres; Adenosine 6 mg → 12 mg rapid bolus; CCB/beta-blocker; cardioversion if unstable"], ["AF / Flutter", "Cardiac surgery, electrolyte imbalance, PE", "Rate control: metoprolol/diltiazem/digoxin; Cardioversion: 100 J (flutter), 200 J (AF); Amiodarone"], ] arr_table = make_table( ["Arrhythmia", "Common Causes", "Management"], arrhythmia_rows, col_widths=[3.5*cm, 5*cm, 8.5*cm] ) story.append(arr_table) story.append(Spacer(1, 3*mm)) # Oculocardiac reflex story.append(gold_banner("OCULOCARDIAC REFLEX (OCR)")) story.append(Spacer(1,2*mm)) story.append(Paragraph( "<b>Trigeminovagal reflex:</b> Traction on extraocular muscles (especially medial rectus) → " "Trigeminal (V1) afferents → Vagal efferents → Bradycardia, AV block, asystole.", body)) story.append(Paragraph("• <b>Treatment:</b> Release traction immediately + IV Atropine 0.01–0.02 mg/kg", bullet)) story.append(Paragraph("• <b>Prophylaxis:</b> Retrobulbar block; premedication with atropine or glycopyrrolate", bullet)) story.append(Spacer(1, 2*mm)) # Special conditions story.append(gold_banner("SPECIAL CONDITIONS")) story.append(Spacer(1,2*mm)) story.append(Paragraph("<b>WPW Syndrome Intraoperatively:</b>", h3)) for pt in [ "<b>Avoid</b> AV nodal blockers (adenosine, verapamil, digoxin) — can cause rapid antegrade conduction through accessory pathway → VF", "Stable tachyarrhythmias: Procainamide or ibutilide", "Unstable AF/flutter with rapid ventricular response: <b>DC cardioversion immediately</b>", ]: story.append(Paragraph(f"• {pt}", bullet)) story.append(Spacer(1, 2*mm)) story.append(Paragraph("<b>Brugada Syndrome Intraoperatively:</b>", h3)) for pt in [ "Avoid: propofol infusions (bolus induction likely safe), flecainide, procainamide, neostigmine, some local anaesthetics", "Consult www.brugadadrugs.org for safe drug list", "Treat fever aggressively (hyperthermia unmasks Brugada pattern)", "VF/VT: DC cardioversion; isoproterenol for electrical storm", ]: story.append(Paragraph(f"• {pt}", bullet)) story.append(Spacer(1, 2*mm)) story.append(Paragraph("<b>Congenital LQTS Intraoperatively:</b>", h3)) for pt in [ "Avoid QT-prolonging drugs; maintain beta-blockade; avoid catecholamine surges", "Treat TdP: <b>IV Magnesium sulphate 2 g</b>; overdrive pacing; isoproterenol (shortens QT by increasing HR); correct electrolytes", ]: story.append(Paragraph(f"• {pt}", bullet)) story.append(Spacer(1, 2*mm)) story.append(Paragraph("<b>Acquired LQTS (drug-induced) Intraoperatively:</b>", h3)) for pt in [ "Remove offending drug; IV Magnesium sulphate 2 g", "Bradycardia worsens acquired LQTS → beta-blockade is <b>NOT</b> indicated (unlike congenital)", "Overdrive pacing if refractory; ICD not recommended", ]: story.append(Paragraph(f"• {pt}", bullet)) story.append(Spacer(1, 3*mm)) # General principles story.append(sub_banner("General Principles of Intraoperative Arrhythmia Management")) story.append(Spacer(1,1*mm)) principles = [ ("Step 1", "Assess haemodynamic stability first — pulseless? → CPR + immediate defibrillation"), ("Step 2", "Identify and correct the underlying cause — hypoxia, hypercarbia, electrolytes, depth of anaesthesia, hypovolaemia"), ("Step 3", "Examine the 12-lead ECG — identify the arrhythmia type before treating"), ("Step 4", "Treat reversible causes before pharmacotherapy"), ("Step 5", "Antiarrhythmic drugs as second-line after correction of precipitants"), ("Step 6", "Electrical therapy (cardioversion/pacing) for haemodynamic instability or drug failure"), ("Step 7", "Continue monitoring postoperatively — arrhythmias can recur"), ] p_table = make_table(["Step", "Action"], principles, col_widths=[2.5*cm, 14.5*cm]) story.append(p_table) story.append(Spacer(1, 3*mm)) # ── SECTION VI: PACEMAKER INDICATIONS ───────────────────────────────────────── story.append(section_banner("SECTION VI: PACEMAKER INDICATIONS FOR HEART BLOCK (ACC/AHA 2018)")) story.append(Spacer(1, 3*mm)) pm_table = make_table( ["Condition", "Recommendation", "Class"], [ ["Acquired symptomatic complete AV block", "Permanent pacemaker", "I"], ["Acquired asymptomatic complete AV block", "Permanent pacemaker", "I"], ["Second-degree Mobitz II with wide QRS", "Permanent pacemaker", "I"], ["High-grade AV block (≥2 consecutive non-conducted P waves)", "Permanent pacemaker", "I"], ["Second-degree Mobitz I (symptomatic)", "Permanent pacemaker", "IIa"], ["First-degree AV block (isolated)", "No pacing required", "III"], ], col_widths=[8*cm, 6.5*cm, 2.5*cm] ) story.append(pm_table) story.append(Spacer(1, 2*mm)) story.append(Paragraph( "<b>Preoperative temporary pacing indications:</b> Symptomatic complete AV block before elective surgery; " "Mobitz II or high-grade AV block; Acute MI with new bifascicular block + first-degree AV block.", body)) story.append(Spacer(1, 3*mm)) # ── SECTION VII: COMPARISON TABLE ───────────────────────────────────────────── story.append(section_banner("SECTION VII: COMPARISON TABLE — AV BLOCKS")) story.append(Spacer(1, 3*mm)) comp_table = make_table( ["Feature", "1st Degree", "2nd Degree Mobitz I", "2nd Degree Mobitz II", "3rd Degree (CHB)"], [ ["PR interval", "Fixed, prolonged\n>200 ms", "Progressive\nlengthening", "Constant\n(no change)", "No fixed PR\n(dissociation)"], ["Dropped beats", "None", "Present\n(with warning)", "Present\n(without warning)", "All blocked"], ["QRS", "Narrow (usually)", "Narrow (usually)", "Wide (BBB usually)", "Narrow or Wide"], ["Site of block", "AV node", "AV node", "His-Purkinje\n(infranodal)", "AV node or\nHis-Purkinje"], ["Risk of CHB", "Low", "Low", "HIGH", "—"], ["Atropine", "Not needed", "Effective", "Usually ineffective", "Effective only if\nAV nodal level"], ["Treatment", "None", "Treat cause;\nATROP if symptomatic", "PACING\n(urgent)", "Emergency pacing;\nPermanent PPM"], ], col_widths=[3.5*cm, 3.2*cm, 3.7*cm, 3.7*cm, 2.9*cm] ) story.append(comp_table) story.append(Spacer(1, 4*mm)) # ── FOOTER / REFERENCES ──────────────────────────────────────────────────────── story.append(HRFlowable(width="100%", thickness=0.8, color=MGRAY, spaceAfter=4)) story.append(Paragraph( "<b>References:</b> Braunwald's Heart Disease 12th ed. (Ch. 68) · Fuster & Hurst's The Heart 15th ed. (Ch. 38) · " "Goldman-Cecil Medicine 27th ed. (Ch. 51) · Miller's Anesthesia 10th ed. (Ch. 29) · " "Sabiston Textbook of Surgery · ACC/AHA/HRS 2018 Guideline on Bradycardia and Conduction Delay", note_style)) # ── Build ─────────────────────────────────────────────────────────────────────── doc.build(story) print(f"PDF created: {output_path}") PYEOF echo "Script written."
cd /tmp/workspace/heart-block-pdf && python generate_pdf.py 2>&1
ls -lh /tmp/workspace/heart-block-pdf/Heart_Block_Intraoperative_Arrhythmias_MD_Exam.pdf
Heart Block Intraoperative Arrhythmias MD Exam
PDF Document · PDF
| Section | Content |
|---|---|
| I | Anatomy of the Conduction System |
| II | First-Degree Heart Block — definition, ECG, causes, treatment |
| III | Second-Degree Heart Block — Mobitz I (Wenckebach), Mobitz II, 2:1 block, High-grade block |
| IV | Third-Degree (Complete) Heart Block — ECG table, escape rhythm levels table, causes, clinical features, treatment ladder |
| V | Intraoperative Arrhythmias — causes, arrhythmia management table (11 arrhythmias), OCR, WPW/Brugada/LQTS special cases, 7-step management principles |
| VI | Pacemaker Indications (ACC/AHA 2018 guideline table) |
| VII | Comparison Table — all 4 degrees of AV block side-by-side |