Give a detailed notes easy to understand and remember on a flow and add additional detail for understanding. Use this lecture notes
cd /tmp/workspace/attachments/6d777fb2-3783-43b1-8f92-0a79a5cb9274 && python3 -c " from pptx import Presentation prs = Presentation('Infective Endocarditis.pptx') for i, slide in enumerate(prs.slides, 1): print(f'\n=== SLIDE {i} ===') for shape in slide.shapes: if shape.has_text_frame and shape.text_frame.text.strip(): print(shape.text_frame.text) "
infective endocarditis vegetation cardiac valve pathology

Histology of a cardiac valve vegetation from an intravenous drug user with infective endocarditis. The specimen was processed for light microscopy and stained with hematoxylin and eosin (H&E). The vegetative mass adheres to the valvular surface and shows a dominant thrombus composed of densely packed fibrin and platelets, with admixed bacterial colonies appearing as dark purple clusters within the eosinophilic matrix. The core is friable and irregular, with a leafy, chain-like fringe along the valve edge. The bacterial colonies are variably distributed, forming focal microcolonies that disrupt surrounding tissue architecture. There is limited or variable inflammatory cell infiltrate; neutrophils may be present at the margins, consistent with acute infective endocarditis. The overall pattern is consistent with septic endocarditis in an intravenous drug user, where bacteria colonize a pre-existing thrombus on the valve surface, producing vegetations that may embolize. Clinically, histology complements microbiology and imaging to confirm diagnosis and guide antibiotic therapy. Diagnostic significance includes identification of infectious vegetations on valves, distinguishing from sterile thrombi, and informing prognosis. Potential differential diagnoses include nonbacterial thrombotic endocarditis and Libman-Sacks endocarditis in alternative clinical settings. This image is valuable for education on endocarditis pathology, valve destruction, and the histopathology of septic vegetations.

Infective endocarditis histology image demonstrating a valve leaflet vegetation attached to the endocardial surface. The lesion is a friable thrombus-rich mass composed predominantly of fibrin and platelets with an inflammatory cell infiltrate. Bacterial colonies are not evident on routine hematoxylin and eosin staining, which can occur in culture-negative endocarditis or after prior antibiotic exposure; additional stains or culture may reveal organisms. The vegetation is anchored to the valve leaflet, illustrating the pathological substrate of infection and its interface with native tissue. This pattern supports a diagnosis of infective endocarditis in the clinical context and helps distinguish from noninfectious vegetations such as marantic endocarditis or Libman-Sacks endocarditis. Clinically, the histology guides antimicrobial strategy, duration, and need for surgical evaluation, given the embolic potential of friable vegetations. Educationally, this image is valuable for cardiac pathology and infectious disease training, highlighting thrombus-dominated composition, inflammatory infiltration, and the frequent absence of visible bacteria on standard histology.

Gross pathology photograph of an explanted heart demonstrating left-sided infective endocarditis with mitral valve involvement. The image highlights a shaggy vegetative mass on the mitral valve, with thickened chordae tendineae and irregular nodularity of the cusp just to the right of the vegetation. The vegetations are friable and tan-pink, with adjacent valvular tissue showing edema and thickening. The chords appear markedly elongated and edematous, consistent with valvular destruction and tethering. The cusp shows focal thickening and rime-like nodules indicative of inflammatory deposition and possible microabscess formation. This gross morphology correlates with acute/subacute infective endocarditis, often due to bacterial pathogens such as Staphylococcus aureus or viridans streptococci, though fungal infections can also be implicated. Clinically, such findings signal bacteremia, embolic risk, and potential heart failure from valvular insufficiency. The image is valuable for education in cardiac pathology, surgical pathology, and infectious disease teaching; it demonstrates typical mitral valve vegetations, chordal involvement, and cusp irregularity useful for differential diagnosis with Libman-Sacks endocarditis, rheumatic disease, or marantic endocarditis. In practice, correlation with blood cultures, echocardiography, and systemic evaluation is essential for diagnosis and management. Documentation of vegetative morphology aids correlating radiographic and microbiological findings, informs prognosis, and guides rheology of therapeutic interventions management.
Think of it this way: Bugs enter the bloodstream β stick to a damaged valve β form a clump (vegetation) β this clump can break off and travel anywhere in the body.
PREDISPOSING FACTOR (damaged valve / IV drug use)
β
BACTERAEMIA (bacteria enter the blood)
- Dental procedures, surgery, GI/GU manipulation,
IV drug injection, intravascular catheters
β
BACTERIA SEED A VALVE
- Damaged endothelium β sterile platelet-fibrin clot forms
- Bacteria stick to this clot
β
VEGETATION FORMS
(fibrin + platelets + bacteria = friable clump on valve)
β
THREE PATHWAYS OF DAMAGE:
1. Local destruction (valve rupture, myocardial abscess)
2. Embolization (vegetations break off β travel to brain, kidneys, skin)
3. Immune complex deposition (circulating immune complexes β Osler's nodes, Roth spots)
| Risk Factor | Why It Matters |
|---|---|
| Rheumatic valvular disease | Scarred, irregular valve surface - bacteria can easily stick |
| Congenital heart disease (VSD, PDA) | Turbulent blood flow damages endothelium |
| Prosthetic valve surgery | Foreign material = easy bacterial colonization |
| Intravenous drug use (IDU) | Direct injection of bacteria into bloodstream; often affects right-sided valves (tricuspid) |
| Degenerative cardiac diseases | Calcium deposits on valves create rough surfaces |
| PPM (Pacemaker), Central catheters, Dialysis shunts | Lines provide a physical path for bacteria to reach the heart |
Memory tip: "RCP-IDD" - Rheumatic, Congenital, Prosthetic, IV drugs, Degenerative, Devices
IE
βββ 1. Native Valve Endocarditis
β βββ Congenital heart disease
β βββ Rheumatic heart disease
β βββ Degenerative heart disease
β
βββ 2. Prosthetic Valve Endocarditis
β (Early <60 days vs Late >60 days post-surgery)
β
βββ 3. IE in IV Drug Abusers
β (Often affects right-sided valves; S. aureus dominant)
β
βββ 4. Health Care-Associated IE
(Catheters, dialysis, pacemakers)
| Organism | Clinical Setting | Type of IE |
|---|---|---|
| Viridans Streptococci (S. mutans, S. sanguinis) | Normal oral flora; dental procedures | Subacute IE |
| Enterococcus faecalis / faecium | GI/GU procedures, elderly | Subacute IE |
| S. bovis (S. gallolyticus) | Associated with colon cancer! | Subacute IE |
| S. aureus | Skin, IV drug users, healthcare | Acute IE - most aggressive |
| Coagulase-negative Staph (S. epidermidis) | Prosthetic valves | Subacute IE |
Memory tip for most common: "SSS EE" - Streptococci viridans, S. aureus, S. bovis, Enterococci, E. faecalis
| H | Haemophilus spp. (aphrophilus, paraphrophilus, influenzae, parainfluenzae) |
|---|---|
| A | Actinobacillus actinomycetemcomitans |
| C | Cardiobacterium hominis |
| E | Eikenella corrodens |
| K | Kingella kingae, K. denitrificans |
Key point: HACEK are oral commensals. They cause IE after dental procedures or poor oral hygiene. With modern automated blood culture systems, they usually grow within 2-3 days (historically were difficult to culture).
| Organism | Clue / Special Test |
|---|---|
| Coxiella burnetii (Q fever) | Anti-phase 1 IgG antibody titre > 1:800 (serology) |
| Bartonella spp. | Serology; often in homeless/cat exposure |
| Chlamydia psittaci | Serology; bird exposure |
| Brucella spp. | Repeat culture with special media |
| Legionella spp. | Serology / urine antigen |
| Tropheryma whipplei | PCR; causes Whipple's disease |
| Fungi (Candida, Aspergillus) | Blood culture + special fungal media |
Why is it culture-negative? Either: (1) prior antibiotics killed the bacteria before culture, or (2) the organism is inherently fastidious.
SOURCE 1 β LOCAL CARDIAC DAMAGE
- New or changed heart murmur (valve destruction)
- Heart failure (valve regurgitation)
- Myocardial abscess
- Valve rupture
SOURCE 2 β EMBOLIZATION (vegetation breaks off)
- Brain: stroke / mycotic aneurysm
- Kidneys: flank pain, hematuria
- Spleen: splenomegaly, infarcts
- Lungs (right-sided IE): septic pulmonary emboli
- Skin: Janeway lesions (non-tender, on palms/soles) β emboli
- Eyes: emboli to retinal vessels
SOURCE 3 β IMMUNE COMPLEX DEPOSITION (body's immune response)
- Osler's nodes: TENDER nodules on finger/toe pads β immune complexes
- Roth spots: retinal hemorrhages with pale center β immune complexes
- Glomerulonephritis (immune complex deposition in kidney)
- Arthritis
CONSTANT BACTERAEMIA β Fever (most consistent symptom!)
Memory: Janeway vs Osler - "Janeway = Just emboli (painless), Osler = Ouch! (painful, immune)"
| Feature | ACUTE IE | SUBACUTE IE (SABE) |
|---|---|---|
| Course | Fulminant (days to <6 weeks) | Insidious (6 weeks to months) |
| Fever | High fever | Low-grade fever, night sweats |
| Toxicity | Severe systemic toxicity | Vague systemic complaints (fatigue, weight loss) |
| WBC | Leucocytosis | Normal or mildly elevated |
| Prior valve disease | Not required | Usually present |
| Organisms | S. aureus, S. pneumoniae, S. pyogenes, N. gonorrhoeae | Viridans Streptococci, S. bovis, Enterococci, CoNS |
| Valve | Can attack normal valves | Usually abnormal/damaged valves |
Analogy: Acute IE is like a wildfire - fast, destroys everything. Subacute IE is like dry rot - slow, sneaky, but still destructive.
Purpose: Classify patients as Definite / Possible / Rejected IE
BLOOD CULTURE PROTOCOL:
βββ Number: 3 sets is ideal (2 may be enough)
βββ Timing: At hourly intervals, within 24 hours
β (NOT less than 1 hour apart)
βββ Volume: Adults = 10 ml (minimum 5 ml) per bottle
β Children = 1-3 ml
βββ Technique: Strict aseptic measures
β Clean skin with 70% alcohol / povidone-iodine
β
βββ When to take extra sets?
β - If patient already on antibiotics
β - If fastidious organisms are suspected
β
βββ Why multiple cultures?
Bacteremia in IE is CONTINUOUS (not intermittent like in other infections)
β No need to time with fever spikes


Take 3 blood cultures first, THEN start antibiotics!
Important update: Guidelines now recommend prophylaxis only for the highest-risk patients undergoing only a few specific procedures - not for all patients with any heart condition.
BACTERAEMIA (dental/surgery/IV drugs)
β
Bacteria adhere to damaged valve
β
VEGETATION FORMS (fibrin + platelets + bugs)
β
ββββββββββββββββββββ¬βββββββββββββββββββββ
β β β
Local damage Embolism Immune Complexes
(murmur, CHF, (stroke, infarcts, (Osler's nodes,
abscess) Janeway lesions) Roth spots, GN)
β
DIAGNOSIS: Blood culture + Echo (Duke Criteria)
β
TREATMENT: IV Bactericidal antibiotics x 4-6 weeks
β
PREVENTION: Prophylaxis in HIGH-RISK patients
| Concept | Memory Aid |
|---|---|
| Organisms in native valve IE | "VS-E-SE": Viridans Strep, Enterococci, S. aureus, S. epidermidis |
| HACEK | "Have A Clean Eating Kitchen" |
| Culture-negative organisms | "Big Cats Bring Loud Trouble" - Bartonella, Coxiella, Brucella, Legionella, Tropheryma |
| Janeway vs Osler | Janeway = painless, palms/soles (embolism); Osler = painful, fingers (immune) |
| Acute vs Subacute organisms | Acute = S. aureus (the destroyer); Subacute = Viridans Strep (the sneak) |
| Blood culture rule | 3 sets, 1 hour apart, aseptic technique, adults 10 ml each |
| Treatment duration | 4-6 weeks IV bactericidal antibiotics |
Give newly modified duke criteria 2026
modified Duke criteria 2023 2024 2025 updated infective endocarditis new criteria
"Duke criteria" AND "infective endocarditis" AND diagnosis
https://pubrica.com/wp-content/uploads/2025/11/Clinical-Infeβ¦
PMID: 37138445
Duke ISCVID 2023 criteria complete table minor criteria predisposing conditions imaging PET CT full list
https://pmc.ncbi.nlm.nih.gov/articles/PMC10681650
Important clarification: There is no separate "2026" revision. The most current version is the 2023 Duke-ISCVID Criteria published in Clinical Infectious Diseases by Fowler et al. (PMID: 37138445). This replaced the Modified Duke Criteria (Li 2000) and is the current gold standard as of 2026. It is designed as a "Living Document" with periodic online updates.
| Classification | Criteria |
|---|---|
| DEFINITE IE | 2 Major; OR 1 Major + 3 Minor; OR 5 Minor (Clinical) OR Pathologic criteria |
| POSSIBLE IE | 1 Major + 1 Minor; OR 3 Minor |
| REJECTED IE | Firm alternative diagnosis; OR resolution with antibiotics β€4 days; OR no pathologic evidence at surgery/autopsy after β€4 days of antibiotics |
New addition: Molecular identification methods (PCR, sequencing) are now formally included alongside culture
| Old Modified Duke (2000) | New Duke-ISCVID (2023) | |
|---|---|---|
| Typical organisms | 2 separate cultures, timed >12h apart | 2 or more separate blood culture sets - timing requirements removed |
| Nontypical organisms | Not specified separately | 3 or more separate blood culture sets |
| Venipuncture requirement | Separate venipunctures required | Separate venipuncture requirement removed |
| Test | Organism | Criterion Level |
|---|---|---|
| PCR or nucleic acid-based technique | Coxiella burnetii, Bartonella spp., Tropheryma whipplei - from blood or tissue | MAJOR |
| Enzyme immunoassay (EIA) | Anti-phase 1 IgG for Coxiella burnetii titre > 1:800 | MAJOR |
| Amplicon or metagenomic sequencing | Coxiella, Bartonella, T. whipplei from blood/tissue | MAJOR |
| In situ hybridization | Any organism in appropriate tissue sample | MAJOR (pathologic) |
| PCR/sequencing for OTHER organisms | Any other organism from blood (not above 3) | MINOR only (pending more data) |
| Modality | Findings for Major Criterion | Notes |
|---|---|---|
| Echocardiography (TTE/TEE) | Vegetation, abscess, pseudoaneurysm, intracardiac fistula, valvular perforation, new partial dehiscence of prosthetic valve | Unchanged; cornerstone; TEE preferred |
| Cardiac CT (NEW) | Paravalvular lesions (abscess, pseudoaneurysm, fistula), new partial dehiscence of prosthetic valve | Equivalent to echo; especially useful for prosthetic valves |
| [18F]FDG PET/CT (NEW) | Abnormal metabolic activity involving a native or prosthetic valve, ascending aortic graft (with valve involvement), intracardiac device leads, or other prosthetic material | Valid for prosthetic valve only if >3 months post-surgery; for CIEDs/leads at any time |
Why was PET/CT added? Echocardiography can miss IE on prosthetic valves (metal artifacts). PET/CT detects metabolic activity of infection even when echo is negative.
Why added? Surgeons often directly see IE evidence during emergency surgery, before labs confirm it. This gives those findings formal diagnostic weight.
| Feature | Old Modified Duke (2000) | New Duke-ISCVID (2023) |
|---|---|---|
| Blood culture timing | Required 12h apart / 24h window | Timing removed |
| Separate venipuncture | Required | Removed |
| Typical organisms | Narrow list | Expanded (S. lugdunensis, E. faecalis, S. pyogenes added) |
| Prosthesis-specific organisms | Not recognized | New category: CoNS & C. acnes = typical only with prosthesis |
| Cardiac CT | Not recognized | New MAJOR imaging criterion |
| 18F-FDG PET/CT | Not recognized | New MAJOR (>3 months post-surgery) or Minor (<3 months) |
| Surgical evidence | Not recognized | New MAJOR criterion |
| PCR / Metagenomic sequencing | Not recognized | MAJOR for Coxiella/Bartonella/Whipplei; MINOR for others |
| Prior IE as predisposing | Not included | New MINOR predisposing condition |
| CIED/TAVI | Not included | New MINOR predisposing conditions |
| Splenic/cerebral abscess | Not included | New MINOR vascular phenomena |
| Fever | Minor criterion | Unchanged (though 2025 studies suggest removing it improves specificity) |
3 domains of MAJOR criteria:
M - MICROBIOLOGY (blood cultures + PCR/serology for Coxiella/Bartonella/Whipplei)
I - IMAGING (Echo + Cardiac CT + PET/CT >3 months post-op)
S - SURGERY (direct intraoperative inspection)
Bottom line for 2026 clinical practice: The 2023 Duke-ISCVID criteria are what you use today. The biggest practical changes are: (1) Cardiac CT and PET/CT are now formal major criteria - order them when echo is non-diagnostic, especially for prosthetic valves; (2) Molecular tests (PCR, metagenomic sequencing) now have formal diagnostic standing; (3) Blood culture timing rules are relaxed. The criteria are maintained as a living document by ISCVID.
make pdf π
use this lab manual to re create the laboratory diagnosis part and give a nice detailed flow chart using the lecture note also
cd "/tmp/workspace/attachments/6d777fb2-3783-43b1-8f92-0a79a5cb9274" && python3 -c " from pptx import Presentation prs = Presentation('Infective Endocarditis.pptx') for i, slide in enumerate(prs.slides, 1): txt = [] for shape in slide.shapes: if shape.has_text_frame and shape.text_frame.text.strip(): txt.append(shape.text_frame.text.strip()) if txt: print(f'\n=== SLIDE {i} ===') for t in txt: print(t) "
python3 -c " import pdfplumber path = '/tmp/workspace/attachments/6d777fb2-3783-43b1-8f92-0a79a5cb9274/Lab-Manual-1 (1) 2.pdf' with pdfplumber.open(path) as pdf: print(f'Total pages: {len(pdf.pages)}') for i, page in enumerate(pdf.pages, 1): text = page.extract_text() if text and text.strip(): print(f'\n===PAGE {i}===') print(text) " 2>&1 | head -400
python3 -c " import pdfplumber path = '/tmp/workspace/attachments/6d777fb2-3783-43b1-8f92-0a79a5cb9274/Lab-Manual-1 (1) 2.pdf' with pdfplumber.open(path) as pdf: # Blood and bone marrow cultures starts at page 1 (index 12 approx, after front matter) # Let's get pages 12-35 (section 1.1 blood culture) for i in range(12, 50): page = pdf.pages[i] text = page.extract_text() if text and text.strip(): print(f'\n===PAGE {i+1}===') print(text) " 2>&1
mkdir -p /tmp/workspace/ie-lab-notes && cat > /tmp/workspace/ie-lab-notes/build_pdf.py << 'PYEOF' from reportlab.lib.pagesizes import A4 from reportlab.lib import colors from reportlab.lib.units import cm, mm from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.platypus import (SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, PageBreak, HRFlowable, KeepTogether) from reportlab.platypus.flowables import Flowable from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY from reportlab.pdfgen import canvas from reportlab.graphics.shapes import Drawing, Rect, String, Line, Polygon from reportlab.graphics import renderPDF import textwrap # ββ Colour palette ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ DARK_BLUE = colors.HexColor('#1A3A5C') MID_BLUE = colors.HexColor('#2E6DA4') LIGHT_BLUE = colors.HexColor('#D6E8F7') ACCENT = colors.HexColor('#E74C3C') GREEN = colors.HexColor('#27AE60') AMBER = colors.HexColor('#E67E22') LIGHT_GREY = colors.HexColor('#F4F6F8') MID_GREY = colors.HexColor('#BDC3C7') WHITE = colors.white YELLOW_HL = colors.HexColor('#FFF9C4') W, H = A4 # ββ Document βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ doc = SimpleDocTemplate( '/tmp/workspace/ie-lab-notes/IE_Lab_Diagnosis.pdf', pagesize=A4, leftMargin=1.8*cm, rightMargin=1.8*cm, topMargin=2*cm, bottomMargin=2*cm, title='IE Laboratory Diagnosis', author='SLCM Lab Manual / IE Lecture Notes' ) styles = getSampleStyleSheet() def S(name, **kw): return ParagraphStyle(name, **kw) title_style = S('Title2', fontName='Helvetica-Bold', fontSize=22, textColor=WHITE, alignment=TA_CENTER, spaceAfter=4) subtitle_style = S('Sub', fontName='Helvetica', fontSize=11, textColor=LIGHT_BLUE, alignment=TA_CENTER, spaceAfter=2) h1 = S('H1', fontName='Helvetica-Bold', fontSize=14, textColor=WHITE, spaceAfter=6, spaceBefore=4) h2 = S('H2', fontName='Helvetica-Bold', fontSize=12, textColor=DARK_BLUE, spaceAfter=4, spaceBefore=8) h3 = S('H3', fontName='Helvetica-Bold', fontSize=10.5, textColor=MID_BLUE, spaceAfter=3, spaceBefore=5) body = S('Body2', fontName='Helvetica', fontSize=9.5, leading=14, textColor=colors.HexColor('#2C3E50'), spaceAfter=3, alignment=TA_JUSTIFY) bullet = S('Bullet2', fontName='Helvetica', fontSize=9.5, leading=14, textColor=colors.HexColor('#2C3E50'), leftIndent=14, spaceAfter=2, bulletIndent=4, bulletFontName='Helvetica') note_style = S('Note', fontName='Helvetica-Oblique', fontSize=9, textColor=colors.HexColor('#7F8C8D'), leftIndent=10, spaceAfter=4, leading=13) bold_body = S('BoldBody', fontName='Helvetica-Bold', fontSize=9.5, textColor=DARK_BLUE, spaceAfter=2) red_note = S('RedNote', fontName='Helvetica-Bold', fontSize=9.5, textColor=ACCENT, spaceAfter=3, leading=13) def B(text): return f'<b>{text}</b>' def I(text): return f'<i>{text}</i>' def C(text, col='#E74C3C'): return f'<font color="{col}">{text}</font>' # ββ Helper flowables ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ def header_box(text, bg=DARK_BLUE, fg=WHITE, fontsize=14): data = [[Paragraph(f'<font color="white"><b>{text}</b></font>', ParagraphStyle('hb', fontName='Helvetica-Bold', fontSize=fontsize, textColor=fg, alignment=TA_CENTER))]] t = Table(data, colWidths=[doc.width]) t.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,-1), bg), ('TOPPADDING', (0,0), (-1,-1), 8), ('BOTTOMPADDING', (0,0), (-1,-1), 8), ('LEFTPADDING', (0,0), (-1,-1), 10), ('RIGHTPADDING', (0,0), (-1,-1), 10), ('ROUNDEDCORNERS', [6,6,6,6]), ])) return t def section_box(text, bg=LIGHT_BLUE, fg=DARK_BLUE, fontsize=11): data = [[Paragraph(f'<font color="{fg.hexval()}"><b>{text}</b></font>', ParagraphStyle('sb', fontName='Helvetica-Bold', fontSize=fontsize, textColor=fg, alignment=TA_LEFT))]] t = Table(data, colWidths=[doc.width]) t.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,-1), bg), ('TOPPADDING', (0,0), (-1,-1), 6), ('BOTTOMPADDING', (0,0), (-1,-1), 6), ('LEFTPADDING', (0,0), (-1,-1), 10), ('BOX', (0,0), (-1,-1), 0.5, MID_BLUE), ])) return t def highlight_box(text, bg=YELLOW_HL, border=AMBER): data = [[Paragraph(text, ParagraphStyle('hl', fontName='Helvetica', fontSize=9.5, leading=14, textColor=colors.HexColor('#2C3E50')))]] t = Table(data, colWidths=[doc.width]) t.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,-1), bg), ('BOX', (0,0), (-1,-1), 1.5, border), ('TOPPADDING', (0,0), (-1,-1), 6), ('BOTTOMPADDING', (0,0), (-1,-1), 6), ('LEFTPADDING', (0,0), (-1,-1), 10), ('RIGHTPADDING', (0,0), (-1,-1), 10), ])) return t def two_col_table(left_data, right_data, left_head='', right_head=''): half = doc.width / 2 - 3*mm header_row = [ Paragraph(f'<b>{left_head}</b>', ParagraphStyle('th', fontName='Helvetica-Bold', fontSize=9.5, textColor=WHITE, alignment=TA_CENTER)), Paragraph(f'<b>{right_head}</b>', ParagraphStyle('th', fontName='Helvetica-Bold', fontSize=9.5, textColor=WHITE, alignment=TA_CENTER)), ] rows = [header_row] max_r = max(len(left_data), len(right_data)) for i in range(max_r): l = left_data[i] if i < len(left_data) else '' r = right_data[i] if i < len(right_data) else '' rows.append([ Paragraph(l, bullet) if l else Paragraph('', bullet), Paragraph(r, bullet) if r else Paragraph('', bullet), ]) t = Table(rows, colWidths=[half, half], spaceBefore=4) ts = TableStyle([ ('BACKGROUND', (0,0), (1,0), MID_BLUE), ('TEXTCOLOR', (0,0), (1,0), WHITE), ('FONTNAME', (0,0), (-1,-1), 'Helvetica'), ('FONTSIZE', (0,0), (-1,-1), 9), ('ROWBACKGROUNDS', (0,1), (-1,-1), [WHITE, LIGHT_GREY]), ('GRID', (0,0), (-1,-1), 0.3, MID_GREY), ('VALIGN', (0,0), (-1,-1), 'TOP'), ('TOPPADDING', (0,0), (-1,-1), 4), ('BOTTOMPADDING', (0,0), (-1,-1), 4), ('LEFTPADDING', (0,0), (-1,-1), 6), ]) t.setStyle(ts) return t def info_table(data, col_widths, headers=None, stripe=True): rows = [] if headers: rows.append([Paragraph(f'<b>{h}</b>', ParagraphStyle('th', fontName='Helvetica-Bold', fontSize=9, textColor=WHITE, alignment=TA_CENTER)) for h in headers]) for row in data: rows.append([Paragraph(str(c), ParagraphStyle('td', fontName='Helvetica', fontSize=9, leading=13, textColor=colors.HexColor('#2C3E50'))) for c in row]) t = Table(rows, colWidths=col_widths, spaceBefore=4, spaceAfter=4) ts_cmds = [ ('FONTNAME', (0,0), (-1,-1), 'Helvetica'), ('FONTSIZE', (0,0), (-1,-1), 9), ('GRID', (0,0), (-1,-1), 0.3, MID_GREY), ('VALIGN', (0,0), (-1,-1), 'MIDDLE'), ('TOPPADDING', (0,0), (-1,-1), 4), ('BOTTOMPADDING', (0,0), (-1,-1), 4), ('LEFTPADDING', (0,0), (-1,-1), 6), ] if headers: ts_cmds += [ ('BACKGROUND', (0,0), (-1,0), MID_BLUE), ('TEXTCOLOR', (0,0), (-1,0), WHITE), ] if stripe: ts_cmds.append(('ROWBACKGROUNDS', (0,1), (-1,-1), [WHITE, LIGHT_GREY])) else: if stripe: ts_cmds.append(('ROWBACKGROUNDS', (0,0), (-1,-1), [WHITE, LIGHT_GREY])) t.setStyle(TableStyle(ts_cmds)) return t # ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ # FLOWCHART DRAWING (Page 3 - full A4 width) # ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ class FlowchartFlowable(Flowable): def __init__(self, width, height): Flowable.__init__(self) self.width = width self.height = height def draw(self): c = self.canv W = self.width # colours DB = colors.HexColor('#1A3A5C') MB = colors.HexColor('#2E6DA4') LB = colors.HexColor('#D6E8F7') GR = colors.HexColor('#27AE60') LGR = colors.HexColor('#D5F5E3') AM = colors.HexColor('#E67E22') LAM = colors.HexColor('#FDEBD0') RE = colors.HexColor('#E74C3C') LRE = colors.HexColor('#FDEDEC') PU = colors.HexColor('#8E44AD') LPU = colors.HexColor('#F3E5F5') WH = colors.white BL = colors.black def box(x, y, w, h, fill, stroke, text_lines, text_color=BL, radius=4, fontsize=8.5, bold=False): c.setFillColor(fill) c.setStrokeColor(stroke) c.setLineWidth(1.2) c.roundRect(x, y, w, h, radius, fill=1, stroke=1) ff = 'Helvetica-Bold' if bold else 'Helvetica' c.setFillColor(text_color) line_h = fontsize * 1.35 total_h = len(text_lines) * line_h start_y = y + h/2 + total_h/2 - line_h * 0.75 for i, line in enumerate(text_lines): c.setFont(ff, fontsize) c.drawCentredString(x + w/2, start_y - i * line_h, line) def diamond(x, y, w, h, fill, stroke, text_lines, text_color=BL, fontsize=8): c.setFillColor(fill) c.setStrokeColor(stroke) c.setLineWidth(1.2) path = c.beginPath() path.moveTo(x + w/2, y + h) path.lineTo(x + w, y + h/2) path.lineTo(x + w/2, y) path.lineTo(x, y + h/2) path.close() c.drawPath(path, fill=1, stroke=1) c.setFillColor(text_color) line_h = fontsize * 1.35 total_h = len(text_lines) * line_h start_y = y + h/2 + total_h/2 - line_h * 0.75 for i, line in enumerate(text_lines): c.setFont('Helvetica-Bold', fontsize) c.drawCentredString(x + w/2, start_y - i * line_h, line) def arrow(x1, y1, x2, y2, label='', label_side='right'): c.setStrokeColor(DB) c.setLineWidth(1.2) c.line(x1, y1, x2, y2) # arrowhead import math angle = math.atan2(y2-y1, x2-x1) al = 7 aw = 3 c.setFillColor(DB) p = c.beginPath() p.moveTo(x2, y2) p.lineTo(x2 - al*math.cos(angle) + aw*math.sin(angle), y2 - al*math.sin(angle) - aw*math.cos(angle)) p.lineTo(x2 - al*math.cos(angle) - aw*math.sin(angle), y2 - al*math.sin(angle) + aw*math.cos(angle)) p.close() c.drawPath(p, fill=1, stroke=0) if label: c.setFillColor(AM) c.setFont('Helvetica-Bold', 7.5) mx, my = (x1+x2)/2, (y1+y2)/2 if label_side == 'right': c.drawString(mx+3, my, label) else: c.drawRightString(mx-3, my, label) def horiz_arrow(x1, y, x2, label='', label_side='top'): arrow(x1, y, x2, y, label, label_side) def vert_arrow(x, y1, y2, label='', label_side='right'): arrow(x, y1, x, y2, label, label_side) # ββ Layout constants ββ CX = W / 2 # centre x BW = W * 0.52 # standard box width BX = CX - BW/2 # standard box left # Y positions (top to bottom, drawing coords are bottom-up) TOTAL_H = self.height TOP = TOTAL_H - 10 # ---------- TITLE BAR ---------- c.setFillColor(DB) c.rect(0, TOP - 28, W, 28, fill=1, stroke=0) c.setFillColor(WH) c.setFont('Helvetica-Bold', 13) c.drawCentredString(CX, TOP - 20, 'LABORATORY DIAGNOSIS OF INFECTIVE ENDOCARDITIS - FLOWCHART') y = TOP - 50 # ---- STEP 1: Clinical suspicion ---- bh = 38 box(BX, y - bh, BW, bh, DB, DB, ['STEP 1: CLINICAL SUSPICION OF IE', 'Fever + new murmur / predisposing factor / positive Duke criteria'], text_color=WH, bold=True, fontsize=8.5) vert_arrow(CX, y - bh, y - bh - 14) y -= bh + 14 # ---- STEP 2: COLLECT BLOOD CULTURES ---- bh = 62 box(BX, y - bh, BW, bh, colors.HexColor('#154360'), colors.HexColor('#154360'), ['STEP 2: BLOOD CULTURE COLLECTION', '(Single most important test)', '3 sets ideal (minimum 2) | Adults: 6-10 ml per bottle', 'Children: 3-5 ml | Neonates: 1 ml per bottle', 'Two different venepuncture sites | Strict aseptic technique', 'Clean skin: 70% alcohol then povidone-iodine, dry 2 min'], text_color=WH, bold=False, fontsize=8) vert_arrow(CX, y - bh, y - bh - 14) y -= bh + 14 # ---- STEP 3: TRANSPORT ---- bh = 38 box(BX, y - bh, BW, bh, MB, MB, ['STEP 3: TRANSPORT & INCUBATION', 'Send immediately to lab - DO NOT refrigerate', 'Incubate at 35Β°C | IE: incubate up to 3 WEEKS (manual culture)'], text_color=WH, fontsize=8.5) vert_arrow(CX, y - bh, y - bh - 14) y -= bh + 14 # ---- STEP 4: DAY 0 - Receipt ---- bh = 38 box(BX, y - bh, BW, bh, LB, MB, ['DAY 0 - LAB RECEIPT', 'Record date/time, inspect: turbidity, haemolysis, pellicle, "puffballs"', 'Enter in specimen register | Place in incubator at 35Β°C'], text_color=DB, fontsize=8.5) vert_arrow(CX, y - bh, y - bh - 14) y -= bh + 14 # ---- STEP 5: DAY 1 - Inspect ---- dw = BW * 0.62 dh = 34 dx = CX - dw/2 diamond(dx, y - dh, dw, dh, LAM, AM, ['DAY 1: Inspect bottles', 'after overnight incubation', 'Changes present?'], text_color=colors.HexColor('#6E2C00'), fontsize=8) # YES branch (right) ya_x = dx + dw ya_y = y - dh/2 box_rx = ya_x + 18 box_rw = W - box_rx - 8*mm box_rh = 50 box_ry = ya_y - box_rh/2 c.setStrokeColor(DB); c.setLineWidth(1.2) c.line(ya_x, ya_y, box_rx, ya_y) box(box_rx, box_ry, box_rw, box_rh, LRE, RE, ['YES - Gram Stain broth', '+ Inform Microbiologist/MO', '+ Inform Clinician', '+ Direct sensitivity test', '(ABST)'], text_color=RE, fontsize=7.5) # arrow from right box down c.setStrokeColor(DB); c.setLineWidth(1.0) # NO branch (left and down) na_x = dx na_y = y - dh/2 box_lx = 4*mm box_lw = dx - 4*mm - 18 box_lh = 46 box_ly = na_y - box_lh/2 c.setStrokeColor(DB); c.setLineWidth(1.2) c.line(na_x, na_y, box_lx + box_lw, na_y) box(box_lx, box_ly, box_lw, box_lh, LGR, GR, ['NO - Blind subculture', 'Blood agar (with S.aureus stab)', 'MacConkey agar', 'Chocolate agar', 'Incubate 35Β°C, 5-10% CO2'], text_color=colors.HexColor('#145A32'), fontsize=7.5) vert_arrow(CX, y - dh, y - dh - 14) y -= dh + 14 # ---- DAY 2: READ PLATES ---- bh = 42 box(BX, y - bh, BW, bh, LGR, GR, ['DAY 2: READ PLATES', 'No growth: re-incubate 24h, send interim report', 'Growth: Gram stain colonies, identify, ABST', 'Inform Microbiologist / MO / Clinician immediately'], text_color=colors.HexColor('#145A32'), fontsize=8.5) vert_arrow(CX, y - bh, y - bh - 14) y -= bh + 14 # ---- IDENTIFICATION BOX ---- bh = 72 id_bx = 4*mm id_bw = (W - 12*mm) * 0.48 id_bx2 = id_bx + id_bw + 6*mm id_bw2 = (W - 12*mm) * 0.48 # Left: Gram Positive box(id_bx, y - bh, id_bw, bh, LB, MB, ['GRAM POSITIVE COCCI', 'Catalase (+) β Staphylococci', ' Coagulase (+) = S. aureus', ' Coagulase (-) = CoNS', 'Catalase (-) β Streptococci', ' Optochin S = S. pneumoniae', ' Bacitracin S = S. pyogenes', ' Bile soluble = S. pneumoniae', ' Viridans / Enterococci - ID further'], text_color=DB, fontsize=7.5) # Right: Gram Negative box(id_bx2, y - bh, id_bw2, bh, LAM, AM, ['GRAM NEGATIVE', 'MacConkey growth:', ' LF + Oxidase(-) β Coliform (API 20E)', ' NLF + Oxidase(+) β Pseudomonas', ' Acinetobacter / others', 'No MacConkey growth:', ' Haemophilus spp. (X,V,XV discs)', 'HACEK organisms:', ' Slow-growing; API 20NE'], text_color=colors.HexColor('#6E2C00'), fontsize=7.5) # label above c.setFont('Helvetica-Bold', 9) c.setFillColor(DB) c.drawCentredString(CX, y + 6, 'ORGANISM IDENTIFICATION') vert_arrow(CX, y - bh, y - bh - 14) y -= bh + 14 # ---- ABST / MIC ---- bh = 46 box(BX, y - bh, BW, bh, LPU, PU, ['ANTIMICROBIAL SUSCEPTIBILITY TESTING (ABST)', 'IE isolate (e.g. Viridans Strep) β MIC for Penicillin (NOT disc only)', 'Enterococcus β High-level aminoglycoside resistance screening', 'Staphylococci β Cefoxitin (MRSA screen)', 'Monitor serum aminoglycoside levels during treatment'], text_color=PU, fontsize=8) vert_arrow(CX, y - bh, y - bh - 14) y -= bh + 14 # ---- CULTURE NEGATIVE BRANCH ---- dw2 = BW * 0.62 dh2 = 34 dx2 = CX - dw2/2 diamond(dx2, y - dh2, dw2, dh2, colors.HexColor('#FDEDEC'), RE, ['Culture NEGATIVE', 'after 5 days?'], text_color=RE, fontsize=8.5) # YES right ya2_x = dx2 + dw2 ya2_y = y - dh2/2 box_rx2 = ya2_x + 14 box_rw2 = W - box_rx2 - 8*mm box_rh2 = 64 box_ry2 = ya2_y - box_rh2/2 c.setStrokeColor(DB); c.setLineWidth(1.2) c.line(ya2_x, ya2_y, box_rx2, ya2_y) box(box_rx2, box_ry2, box_rw2, box_rh2, LRE, RE, ['CULTURE-NEGATIVE APPROACH', '1. Prior antibiotics?', ' Repeat cultures in 3-4 days', '2. Brucella? Special media', ' + repeat culture', '3. Coxiella / Chlamydia?', ' Serology (IgG phase 1 >1:800)', '4. PCR / Metagenomic seq.', ' (Bartonella, Whipplei)'], text_color=RE, fontsize=7.5) # NO down vert_arrow(CX, y - dh2, y - dh2 - 14) y -= dh2 + 14 # ---- OTHER SPECIMENS ---- bh3 = 42 box(BX, y - bh3, BW, bh3, LGR, GR, ['OTHER SPECIMENS (if surgery performed)', 'Culture of heart valves removed at surgery', 'Culture of emboli removed at surgery', 'Serology: Coxiella (IgG >1:800), Chlamydia psittaci, Brucella'], text_color=colors.HexColor('#145A32'), fontsize=8.5) vert_arrow(CX, y - bh3, y - bh3 - 14) y -= bh3 + 14 # ---- FINAL REPORT ---- bh4 = 34 box(BX, y - bh4, BW, bh4, GR, GR, ['FINAL REPORT', 'Organism identified + ABST + MIC + serum drug levels', 'Guide: Bactericidal IV antibiotics x 4-6 weeks'], text_color=WH, bold=True, fontsize=8.5) # Footer note c.setFont('Helvetica-Oblique', 7.5) c.setFillColor(colors.HexColor('#7F8C8D')) c.drawCentredString(CX, 8, 'Sources: SLCM Laboratory Manual in Microbiology (2nd Ed.) | IE Lecture Notes | Robbins & Kumar Pathology') # ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ # BUILD CONTENT # ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ story = [] # ββ PAGE 1: COVER ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ class CoverPage(Flowable): def __init__(self, w, h): Flowable.__init__(self) self.width = w self.height = h def draw(self): c = self.canv # dark gradient bg c.setFillColor(colors.HexColor('#0D2137')) c.rect(0, 0, self.width, self.height, fill=1, stroke=0) # accent strip top c.setFillColor(colors.HexColor('#2E6DA4')) c.rect(0, self.height - 6, self.width, 6, fill=1, stroke=0) # accent strip bottom c.rect(0, 0, self.width, 6, fill=1, stroke=0) # big heart icon (unicode text) c.setFillColor(colors.HexColor('#E74C3C')) c.setFont('Helvetica-Bold', 72) c.drawCentredString(self.width/2, self.height * 0.60, '\u2665') c.setFillColor(colors.white) c.setFont('Helvetica-Bold', 26) c.drawCentredString(self.width/2, self.height * 0.52, 'INFECTIVE ENDOCARDITIS') c.setFont('Helvetica-Bold', 18) c.setFillColor(colors.HexColor('#AED6F1')) c.drawCentredString(self.width/2, self.height * 0.465, 'LABORATORY DIAGNOSIS') c.setFont('Helvetica', 12) c.setFillColor(colors.HexColor('#7FB3D3')) c.drawCentredString(self.width/2, self.height * 0.41, 'Detailed Notes + Step-by-Step Flowchart') # divider c.setStrokeColor(colors.HexColor('#2E6DA4')) c.setLineWidth(1.5) c.line(self.width*0.2, self.height*0.38, self.width*0.8, self.height*0.38) c.setFont('Helvetica', 10) c.setFillColor(colors.HexColor('#AED6F1')) c.drawCentredString(self.width/2, self.height * 0.355, 'Based on: SLCM Laboratory Manual in Microbiology (2nd Edition)') c.drawCentredString(self.width/2, self.height * 0.33, '& IE Lecture Notes | Robbins & Kumar | Tietz Laboratory Medicine') c.setFont('Helvetica-Oblique', 9) c.setFillColor(colors.HexColor('#5D8AA8')) c.drawCentredString(self.width/2, self.height * 0.29, 'Sri Lanka College of Microbiologists') cover_w = doc.width cover_h = doc.height story.append(CoverPage(cover_w, cover_h)) story.append(PageBreak()) # ββ PAGE 2+: NOTES ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ # ββ SECTION HEADER 1 ββ story.append(header_box('LABORATORY DIAGNOSIS OF INFECTIVE ENDOCARDITIS', DARK_BLUE)) story.append(Spacer(1, 8)) story.append(Paragraph( 'The laboratory diagnosis of IE relies on <b>blood culture as the cornerstone</b>, supplemented by ' 'serology, molecular techniques, direct culture of surgical specimens, and antimicrobial susceptibility ' 'testing. All steps must follow strict protocols to ensure reliable results.', body)) story.append(Spacer(1, 6)) # ββ SECTION 1: BLOOD CULTURE ββ story.append(section_box('1. BLOOD CULTURE - The Single Most Important Test', bg=LIGHT_BLUE)) story.append(Spacer(1, 4)) story.append(Paragraph( 'Blood culture is the <b>gold standard investigation</b> for IE. The bacteraemia in IE is ' '<b>continuous</b> (not intermittent), so timing with fever spikes is NOT necessary - cultures ' 'can be collected at any time.', body)) story.append(Spacer(1, 4)) story.append(Paragraph('<b>A. Number of Blood Culture Sets</b>', h3)) num_data = [ ['Ideal number', '3 sets (3 separate venepunctures)'], ['Minimum acceptable', '2 sets (may be enough to detect organism)'], ['When to collect extra sets', 'Patient already on antibiotics; Fastidious organisms suspected'], ['Timing (SLCM Manual)', 'At hourly intervals, within a 24-hour window'], ['Why multiple sets?', 'Increases sensitivity; helps distinguish contaminants (1 positive = likely contaminant; 2+ positives = significant)'], ] story.append(info_table(num_data, [5.5*cm, doc.width - 5.5*cm])) story.append(Spacer(1, 6)) story.append(Paragraph('<b>B. Blood Volume per Set</b>', h3)) vol_data = [ ['Patient Group', 'Volume per Bottle', 'Blood:Broth Ratio'], ['Adults', '6-10 ml (minimum 5 ml)', '1:5 to 1:10'], ['Children', '3-5 ml per bottle', '1:5 to 1:10'], ['Neonates (< 4 kg)', '1 ml per bottle', '1:5 to 1:10'], ] story.append(info_table(vol_data[1:], [5*cm, 5.5*cm, doc.width-10.5*cm], headers=vol_data[0])) story.append(Paragraph( I('Note: Volume of blood cultured is CRUCIAL to increase sensitivity. ' 'Likelihood of recovering a pathogen increases with blood volume.'), note_style)) story.append(Spacer(1, 4)) story.append(Paragraph('<b>C. Specimen Collection - Aseptic Technique (Step by Step)</b>', h3)) steps = [ 'Select a <b>different venepuncture site</b> for each blood culture set - do NOT draw from a vein into which IV solution is being infused.', 'Clean skin with <b>70% ethyl alcohol for 1 minute</b> and allow to dry.', 'Wipe concentrically (center outward) with <b>7.5% povidone iodine</b> - allow to dry for <b>2 full minutes</b>.', 'Do NOT touch the site after cleaning.', 'Label all bottles: patient ID, date, time, site of collection.', 'Wipe the top of blood culture bottle with 70% alcohol, allow 30-60 seconds to dry.', 'Wash hands, wear sterile gloves.', 'Draw blood with disposable sterile needle and syringe in recommended volumes.', 'Inoculate <b>aerobic bottle FIRST</b>, then anaerobic bottle.', 'Thoroughly mix bottles to prevent clotting.', 'Remove iodine from skin with 70% alcohol swab after phlebotomy.', 'Dispose needle/syringe in sharps bin immediately - <b>NEVER recap sharps</b>.', ] for i, s in enumerate(steps, 1): story.append(Paragraph(f'{i}. {s}', bullet)) story.append(Spacer(1, 4)) story.append(Paragraph('<b>D. Bottles Available (SLCM Context)</b>', h3)) bottle_data = [ ['Bottle Type', 'Medium', 'Use'], ['Aerobic (adults)', 'BHI broth + SPS (60 ml in 100 ml bottle)', 'Routine - most commonly available in Sri Lanka'], ['Aerobic (children)', 'BHI broth + SPS (30 ml in 50 ml bottle)', 'Paediatric use'], ['Aerobic (neonates)', 'BHI broth (10 ml universal bottle)', 'Neonatal use'], ['Anaerobic', 'BHI + reducing agents', 'Available at MRI Bacteriology Dept. Tel: 011 2691350'], ['Fungal', 'Special fungal medium', 'Available at MRI Mycology Dept. Tel: 011 2698725'], ['Automated systems', 'Commercial (Bactec/BacT/Alert)', 'Follow manufacturer instructions exactly'], ] story.append(info_table(bottle_data[1:], [3.5*cm, 7*cm, doc.width-10.5*cm], headers=bottle_data[0])) story.append(Paragraph( I('SPS (Sodium Polyanethol Sulphonate) at 0.025-0.05% increases isolation rate but may be inhibitory to certain bacteria (e.g. Neisseria, some anaerobes).'), note_style)) story.append(Spacer(1, 4)) story.append(Paragraph('<b>E. Transport & Storage</b>', h3)) transport_data = [ ['Do NOT refrigerate blood cultures - keep at room temperature'], ['Send to laboratory IMMEDIATELY with properly completed request form'], ['If immediate transport not possible: store at room temperature in ward'], ['Blood cultures taken after hours: keep at room temperature, send to lab the following morning'], ['For automated systems: follow manufacturer instructions for storage prior to loading'], ] for row in transport_data: story.append(Paragraph(f'\u2022 {row[0]}', bullet)) story.append(Spacer(1, 4)) story.append(Paragraph('<b>F. Rejection Criteria (When to Reject a Blood Culture)</b>', h3)) reject_data = [ ['Leaking bottle', 'Likely contamination - inform ward, request repeat, document'], ['Broken/cracked bottle', 'Biohazard - inform ward before discarding'], ['Mismatch: label vs form', 'Inform MO - do NOT discard; ward staff must authenticate in writing'], ['Unlabelled specimen', 'Inform MO - do NOT discard; get authentication'], ['NOT rejected even if...', 'Medium expired, insufficient volume, received >12h after collection\n(Document deficiency and its effect on reliability in report)'], ] story.append(info_table(reject_data, [4.5*cm, doc.width-4.5*cm])) story.append(Spacer(1, 8)) # ββ SECTION 2: PROCESSING ββ story.append(section_box('2. PROCESSING OF BLOOD CULTURES IN THE LABORATORY', bg=LIGHT_BLUE)) story.append(Spacer(1, 4)) story.append(Paragraph('<b>A. Day-by-Day Protocol</b>', h3)) day_data = [ ['Timepoint', 'Action', 'Key Notes'], ['Day 0\n(Receipt)', 'Record date/time; note turbidity, haemolysis, pellicle, "puffballs";\nEnter in specimen register; place in incubator at 35Β°C', 'Mark bottle and request form with lab number'], ['Day 1\n(Inspect)', 'Inspect ALL bottles after overnight incubation.\nIf NO change: blind subculture onto BA, MacConkey, Chocolate agar\nIf changes present: Gram stain broth + direct ABST + Inform MO/Clinician', 'Gram stain smear using battlement technique; read with x100 (oil)'], ['Day 2', 'Read all plates\nNo growth: report interim, re-incubate 24h\nGrowth: identify + ABST + inform MO and clinician', 'Discuss significance of isolate with clinician'], ['Day 3-7', 'Re-incubate negative bottles daily; subculture if growth detected', 'Reports only issued on positives'], ['Day 7', 'Final blind subculture from all negative bottles\nRead after overnight, send FINAL report', 'For IE: extend to 3 weeks (manual cultures)'], ['Special IE\nIncubation', '3 WEEKS (manual culture systems)', 'Typhoid = 2 weeks; Automated systems usually 5 days but extend for IE'], ] story.append(info_table(day_data[1:], [2.5*cm, 8*cm, doc.width-10.5*cm], headers=day_data[0])) story.append(Spacer(1, 4)) story.append(Paragraph('<b>B. Subculture Media and Conditions</b>', h3)) media_data = [ ['Medium', 'Incubation Conditions', 'Purpose'], ['Blood Agar (BA)', '35Β°C, 5-10% CO2, overnight', 'Primary isolation; S. aureus stab for satellitism (Haemophilus)'], ['MacConkey Agar', '35Β°C, aerobically overnight', 'Gram-negative differentiation (LF vs NLF)'], ['Chocolate Agar', '35Β°C, 5-10% CO2, overnight', 'Fastidious organisms - Haemophilus, HACEK, Neisseria'], ['BHI / Blood culture broth', '35Β°C with rotation/agitation', 'Enrichment; HACEK organisms grow well in broth'], ] story.append(info_table(media_data[1:], [3.5*cm, 5.5*cm, doc.width-9*cm], headers=media_data[0])) story.append(Spacer(1, 4)) story.append(Paragraph('<b>C. Safety Precautions in the Lab</b>', h3)) safety = [ 'Process blood cultures in a <b>biosafety cabinet</b> to minimise contamination and exposure risk.', 'Always wear <b>gloves</b> - blood cultures may contain bloodborne pathogens (HIV, HBV, HCV).', 'Never recap sharps; dispose in puncture-proof containers.', 'Laboratory contamination is a recognised problem if bottles are opened for subculturing - use strict technique.', ] for s in safety: story.append(Paragraph(f'\u26a0 {s}', bullet)) story.append(Spacer(1, 8)) # ββ SECTION 3: ORGANISM IDENTIFICATION ββ story.append(section_box('3. ORGANISM IDENTIFICATION FROM BLOOD CULTURE', bg=LIGHT_BLUE)) story.append(Spacer(1, 4)) story.append(Paragraph( 'When growth is detected (turbidity, pellicle, or positive automated signal), ' '<b>Gram stain the broth immediately</b> and follow the identification algorithm below.', body)) story.append(Spacer(1, 4)) story.append(Paragraph('<b>Gram Positive Cocci</b>', h3)) gp_data = [ ['Catalase TEST', 'Catalase (+) = Staphylococci', 'Catalase (-) = Streptococci / Enterococci'], ['Coagulase test (Staph)', 'Coagulase (+) = S. aureus (INFORM MO IMMEDIATELY)', 'Coagulase (-) = CoNS (e.g. S. epidermidis - check significance)'], ['Haemolysis (Strep)', 'Ξ²-haemolysis', 'Ξ±-haemolysis or no haemolysis'], ['Ξ²-haemolytic Strep', 'Bacitracin S = S. pyogenes (Group A)', 'Grouping kit if available'], ['Ξ±-haemolytic Strep', 'Optochin S = S. pneumoniae; Bile soluble = S. pneumoniae', 'Optochin R + bile insoluble = Viridans Streptococci'], ['Enterococci', 'Bile aesculin (+) AND growth in 6.5% NaCl', 'E. faecalis / faecium'], ] story.append(info_table(gp_data, [4*cm, 6.5*cm, doc.width-10.5*cm])) story.append(Spacer(1, 4)) story.append(Paragraph('<b>Gram Negative</b>', h3)) gn_data = [ ['MacConkey growth?', 'Identifies Gram-negatives'], ['LF + Oxidase (-)','Enterobacteriaceae - use API 20E or biochemical tests (KIA, IMVC, motility)'], ['NLF + Oxidase (+)', 'Pseudomonas aeruginosa - API 20NE or biochemicals'], ['NLF + Oxidase (-)', 'Acinetobacter spp. (KIA no reaction, urea variable)'], ['No MacConkey growth', 'Haemophilus spp. - use X, V, XV factor discs; check satellitism on BA'], ['HACEK organisms', 'Slow-growing; often need Chocolate agar + CO2 + extended incubation;\nIdentify with API 20NE; fastidious - may take 2-3 days in automated systems'], ] story.append(info_table(gn_data, [4.5*cm, doc.width-4.5*cm])) story.append(Spacer(1, 8)) # ββ SECTION 4: ABST ββ story.append(section_box('4. ANTIMICROBIAL SUSCEPTIBILITY TESTING (ABST)', bg=LIGHT_BLUE)) story.append(Spacer(1, 4)) story.append(Paragraph( 'ABST must be performed on <b>ALL blood culture isolates</b>. For IE specifically, ' '<b>MIC (Minimum Inhibitory Concentration)</b> is required - disc diffusion alone is insufficient ' 'for key organisms.', body)) story.append(Spacer(1, 4)) abst_data = [ ['Organism', 'Key ABST Requirement', 'Note'], ['Viridans Streptococci', 'MIC for Penicillin (contact MRI if not available)', 'Do NOT do routine disc sensitivity only'], ['Enterococcus', 'Penicillin, Ampicillin, Gentamicin 120Β΅g (HLAR screening)', 'High-level aminoglycoside resistance screening essential for IE'], ['S. aureus', 'Cefoxitin (MRSA screen), Penicillin, Vancomycin MIC', 'Vancomycin: MIC method (not disc) per CLSI'], ['Coagulase-neg. Staph', 'Cefoxitin + full panel', 'Assess clinical significance first - frequent contaminant'], ['S. pneumoniae', 'Oxacillin disc (then Penicillin MIC if zone β€19mm)', 'Zone β₯20mm = susceptible; β€19mm = MIC required'], ['Ξ²-haemolytic Strep', 'Penicillin (no resistance described to date)', 'If resistant - reidentify and repeat ABST'], ['Coliforms', '1st line: Ampicillin, Gent, Cefuroxime, Co-amox, Ciprofloxacin', 'ESBL screening mandatory for E. coli, Klebsiella, Proteus'], ['HACEK organisms', 'MIC recommended for all non-enterobacteriaceae', 'Ξ²-lactamase test for Haemophilus (rapid ampicillin resistance detection)'], ] story.append(info_table(abst_data[1:], [3.5*cm, 6*cm, doc.width-9.5*cm], headers=abst_data[0])) story.append(Spacer(1, 4)) story.append(highlight_box( '<b>Monitoring Serum Drug Levels:</b> Serum levels of <b>aminoglycosides</b> must be monitored ' 'during IE treatment to: (1) Ensure adequate therapeutic levels, ' '(2) Confirm adequacy of treatment, (3) Minimise nephrotoxicity and ototoxicity.', bg=YELLOW_HL, border=AMBER)) story.append(Spacer(1, 8)) # ββ SECTION 5: CULTURE NEGATIVE ββ story.append(section_box('5. CULTURE-NEGATIVE ENDOCARDITIS (CNE) - Approach', bg=LIGHT_BLUE)) story.append(Spacer(1, 4)) story.append(Paragraph( 'Culture-negative IE accounts for approximately <b>10% of all IE cases</b>. ' 'Investigation must be systematic based on the likely cause.', body)) story.append(Spacer(1, 4)) cne_data = [ ['Cause', 'Organism', 'Diagnostic Approach'], ['Prior antibiotic therapy', 'Any organism', 'Repeat blood cultures over several days without antibiotics; stop antibiotics if safe'], ['Fastidious/slow-growing bacteria', 'Brucella spp.', 'Repeat culture with special media; extend incubation; BACTEC with extended time'], ['Obligate intracellular / serological', 'Coxiella burnetii (Q fever)', 'Serology: Anti-phase 1 IgG titre > 1:800 = Major criterion (Duke-ISCVID 2023)'], ['Obligate intracellular', 'Chlamydia psittaci', 'Serology; bird exposure history essential'], ['Obligate intracellular', 'Bartonella spp.', 'Serology; PCR; homeless/cat/louse exposure'], ['Rare organisms', 'Legionella, Tropheryma whipplei', 'Serology / PCR; metagenomic sequencing now available'], ['Corynebacteria (Diphtheroids)', 'Cutibacterium acnes etc.', 'Assess significance (often contaminant); anaerobic cultures'], ['Fungal endocarditis', 'Candida albicans, Aspergillus spp.', 'Fungal blood cultures (MRI Mycology); (1,3)-Ξ²-D-glucan; direct culture'], ] story.append(info_table(cne_data[1:], [3.5*cm, 4.5*cm, doc.width-8*cm], headers=cne_data[0])) story.append(Spacer(1, 8)) # ββ SECTION 6: OTHER SPECIMENS ββ story.append(section_box('6. OTHER SPECIMENS FOR LABORATORY DIAGNOSIS', bg=LIGHT_BLUE)) story.append(Spacer(1, 4)) other_data = [ ['Specimen', 'Method', 'Indication'], ['Heart valves (surgical)', 'Direct culture on BA, MacConkey, Chocolate agar; Gram stain; PCR if culture negative', 'Cardiac surgery; provides definitive diagnosis even after prior antibiotics'], ['Emboli removed at surgery', 'Culture + Gram stain; send in sterile container', 'Peripheral emboli; mesenteric, splenic, cerebral emboli'], ['Serology (blood)', 'Coxiella: Anti-phase 1 IgG > 1:800\nChlamydia psittaci: IgG/IgM\nBrucella: SAT / ELISA', 'Culture-negative IE; occupational/animal exposure'], ['PCR / Molecular (2023 Duke-ISCVID)', 'PCR from blood or tissue for Coxiella, Bartonella, T. whipplei\nMetagenomic sequencing', 'NOW a Major Criterion - equivalent to positive culture for these 3 organisms'], ['Cardiac imaging (not lab)', '18F-FDG PET/CT; Cardiac CT; Echocardiography', 'Added as new Major Criteria in 2023 Duke-ISCVID guidelines'], ] story.append(info_table(other_data[1:], [3.5*cm, 6*cm, doc.width-9.5*cm], headers=other_data[0])) story.append(Spacer(1, 8)) # ββ SECTION 7: REPORTING ββ story.append(section_box('7. REPORTING PROCEDURE', bg=LIGHT_BLUE)) story.append(Spacer(1, 4)) report_data = [ ['Situation', 'Action', 'Timing'], ['Gram stain positive in broth', 'Phone ward IMMEDIATELY with organism seen + preliminary ABST', 'Same day/within hours'], ['No growth Day 2', '"Blood culture: No growth after 24 hours of incubation"\nRe-incubate', 'Day 2'], ['Positive culture', 'Phone: preliminary identity\nFinal report: full identity + ABST', '24-48 hrs'], ['IE-specific isolate (Viridans Strep)', '"... isolated after ... days. MIC for penicillin: ..."', '48-72 hrs'], ['Contaminant suspected\n(CoNS, diphtheroids)', 'Report ABST only after consulting MO for clinical significance', 'As relevant'], ['Culture-negative at Day 7', 'Final report: "No growth after 7 days (14/21 days)"\nDocument need for serology/special cultures', 'Day 7/14/21'], ] story.append(info_table(report_data[1:], [4*cm, 6.5*cm, doc.width-10.5*cm], headers=report_data[0])) story.append(Spacer(1, 4)) story.append(highlight_box( '<b>Important IE-Specific Note:</b> For IE blood culture isolates such as Viridans Streptococci, ' 'do NOT rely on routine disc diffusion alone. ' '<b>MIC for penicillin is required.</b> If MIC facilities are not available at your laboratory, ' '<b>contact MRI (Medical Research Institute, Colombo)</b> for assistance.', bg=LIGHT_BLUE, border=MID_BLUE)) story.append(PageBreak()) # ββ PAGE 3+: FLOWCHART ββ story.append(header_box('COMPLETE FLOWCHART: LABORATORY DIAGNOSIS OF IE', MID_BLUE)) story.append(Spacer(1, 8)) fc_h = doc.height - 3*cm story.append(FlowchartFlowable(doc.width, fc_h)) # ββ Build ββ doc.build(story) print('PDF BUILT SUCCESSFULLY: /tmp/workspace/ie-lab-notes/IE_Lab_Diagnosis.pdf') PYEOF python3 /tmp/workspace/ie-lab-notes/build_pdf.py
python3 -c " from reportlab.lib.pagesizes import A4 W, H = A4 print(f'A4: {W} x {H}') "
explain about biofilms
biofilm structure bacteria formation microscopy

This set of Scanning Electron Microscopy (SEM) images illustrates the study of bacterial biofilm formation on an abiotic surface, specifically a medical-grade plastic cell strainer. The imagery demonstrates the interaction between Xanthomonas campestris pv. campestris and various antimicrobial interventions. Panes (h) and (j) show the overall grid-like structure of the woven synthetic mesh at 500x magnification, revealing a consistent interlaced fiber network. Panes (g) and (i) provide high-magnification views (up to 4.06 Kx) of individual fiber surfaces. Pane (g) shows relatively smooth fibers following treatment with Moringa oleifera extracts (HAMD-MOL), indicating successful inhibition of extracellular polymeric substance (EPS) and biofilm maturation. In contrast, pane (i) displays the adherence of small, rod-shaped bacteria (approximately 1-2 Β΅m in size) and particulate matter to the fiber surface under different treatment conditions. These images serve as an educational model for evaluating anti-adhesive and anti-biofilm properties of phytochemical compounds intended to prevent medical device colonization and subsequent infection.

Microscopic characterization of Pseudomonas aeruginosa biofilm formation and removal on glass beads. Panels aβc show scanning electron microscopy (SEM) images of a dense, uniform biofilm monolayer before treatment. High magnification (c) reveals the characteristic rod-shaped bacterial morphology. Panels dβf illustrate the same surface after sonication; the bead appears largely cleared of biological material, with only sparse, irregular debris remaining. Panel g presents a Confocal Laser Scanning Microscopy (CLSM) image utilizing dual fluorescence: Concanavalin A (magenta) labels the extracellular sugar matrix, while Syto60 (green) identifies individual bacteria within the complex structure. Panels h and i demonstrate bacterial viability using LIVE/DEAD staining. Before sonication (h), the intact biofilm exhibits a predominant green signal, indicating a high concentration of live bacteria. After sonication (i), only isolated green fluorescence remains, confirming that while the biofilm architecture was successfully disrupted, the detached bacteria remain viable. This image series serves as an educational reference for understanding biofilm adherence, extracellular matrix composition, and the efficacy of physical detachment methods in microbiology.

This composite educational material presents a Scanning Electron Microscopy (SEM) analysis and quantitative data regarding biofilm formation on dental zirconia surfaces. Panels (a) through (e) display high-magnification (10,000x) SEM micrographs showing the morphology of salivary bacteria on acid-etched yttria-stabilized tetragonal zirconia polycrystal (Y-TZP) discs after various decontamination treatments: (a) Untreated control, (b) titanium curette, (c) air abrasive device, (d) plastic curette, and (e) ultrasonic scaler. The images reveal a dense, complex biofilm structure characterized by spherical bacterial cells (cocci) intertwined within a fibrous, three-dimensional network of extracellular polymeric substance (EPS). Panel (f) provides a corresponding bar graph of a Bacterial Adhesion Assay, measuring bacterial numbers via optical density (OD600). The results illustrate that despite different surface instrumentation, the overall morphology and quantitative adhesion of the biofilm remain consistent across all groups. This visual is used in dental materials science and periodontology to study the effects of implant maintenance tools on bacterial colonization and biocompatibility of zirconia-based dental implants.
give treatment table and give easy way to remember
Generate a quick reference PDF cheat sheet for IE therapy