Osteomyelitis complete explanation give as ppt for presentation
mkdir -p /tmp/workspace/osteomyelitis-ppt && ls /tmp/workspace/osteomyelitis-ppt/
~/osteomyelitis-ppt/build_pptx.py
from pptx import Presentation
from pptx.util import Inches, Pt, Emu
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from pptx.util import Inches, Pt
from io import BytesIO
prs = Presentation()
prs.slide_width = Inches(13.333)
prs.slide_height = Inches(7.5)
# Color Palette
DARK_BLUE = RGBColor(0x0D, 0x2B, 0x55) # deep navy
MED_BLUE = RGBColor(0x1A, 0x5F, 0x9B) # medium blue
ACCENT = RGBColor(0xE8, 0x4A, 0x4A) # red accent
LIGHT_GRAY = RGBColor(0xF2, 0xF5, 0xF9) # slide bg
WHITE = RGBColor(0xFF, 0xFF, 0xFF)
TEXT_DARK = RGBColor(0x1A, 0x1A, 0x2E)
TEAL = RGBColor(0x0A, 0x9E, 0x9E)
GOLD = RGBColor(0xF5, 0xA6, 0x23)
LIGHT_BLUE = RGBColor(0xD6, 0xE8, 0xF7)
def hex_to_rgb(hex_str):
h = hex_str.lstrip('#')
return RGBColor(int(h[0:2],16), int(h[2:4],16), int(h[4:6],16))
def add_rect(slide, left, top, width, height, fill_color, line_color=None, line_width=None):
from pptx.util import Pt
shape = slide.shapes.add_shape(1, Inches(left), Inches(top), Inches(width), Inches(height))
shape.fill.solid()
shape.fill.fore_color.rgb = fill_color
if line_color:
shape.line.color.rgb = line_color
if line_width:
shape.line.width = Pt(line_width)
else:
shape.line.fill.background()
return shape
def add_textbox(slide, text, left, top, width, height,
font_name="Calibri", font_size=16, bold=False, italic=False,
color=TEXT_DARK, align=PP_ALIGN.LEFT, v_anchor=MSO_ANCHOR.TOP,
word_wrap=True, margin_left=0.1, margin_top=0.05):
tb = slide.shapes.add_textbox(Inches(left), Inches(top), Inches(width), Inches(height))
tf = tb.text_frame
tf.word_wrap = word_wrap
tf.vertical_anchor = v_anchor
tf.margin_left = Inches(margin_left)
tf.margin_right = Inches(0.05)
tf.margin_top = Inches(margin_top)
tf.margin_bottom = Inches(0.05)
p = tf.paragraphs[0]
p.alignment = align
p.text = text
r = p.runs[0]
r.font.name = font_name
r.font.size = Pt(font_size)
r.font.bold = bold
r.font.italic = italic
r.font.color.rgb = color
return tb, tf
def add_para(tf, text, font_name="Calibri", font_size=14, bold=False,
color=TEXT_DARK, align=PP_ALIGN.LEFT, space_before=6, bullet=False):
from pptx.oxml.ns import qn
from lxml import etree
p = tf.add_paragraph()
p.alignment = align
p.space_before = Pt(space_before)
if bullet:
pPr = p._p.get_or_add_pPr()
buChar = etree.SubElement(pPr, qn('a:buChar'))
buChar.set('char', '•')
r = p.add_run()
r.text = text
r.font.name = font_name
r.font.size = Pt(font_size)
r.font.bold = bold
r.font.color.rgb = color
return p
def slide_bg(slide, color=LIGHT_GRAY):
bg = slide.background
fill = bg.fill
fill.solid()
fill.fore_color.rgb = color
def title_bar(slide, title, subtitle=None):
# Full-width navy top bar
add_rect(slide, 0, 0, 13.333, 1.3, DARK_BLUE)
# Accent line
add_rect(slide, 0, 1.3, 13.333, 0.06, ACCENT)
tb, tf = add_textbox(slide, title, 0.4, 0.1, 10, 0.85,
font_size=28, bold=True, color=WHITE,
align=PP_ALIGN.LEFT, v_anchor=MSO_ANCHOR.MIDDLE)
if subtitle:
add_textbox(slide, subtitle, 0.4, 0.85, 12, 0.45,
font_size=14, italic=True, color=RGBColor(0xBB, 0xD4, 0xF0),
align=PP_ALIGN.LEFT)
# ─────────────────────────────────────────────
# SLIDE 1 — Title Slide
# ─────────────────────────────────────────────
blank = prs.slide_layouts[6]
slide = prs.slides.add_slide(blank)
slide_bg(slide, DARK_BLUE)
# Decorative diagonal band
add_rect(slide, 0, 0, 13.333, 7.5, DARK_BLUE)
# Large accent rectangle left
shape = slide.shapes.add_shape(1, Inches(0), Inches(0), Inches(0.4), Inches(7.5))
shape.fill.solid(); shape.fill.fore_color.rgb = ACCENT
shape.line.fill.background()
# Center box
add_rect(slide, 1.2, 1.5, 10.8, 4.5, MED_BLUE)
# Title
tb, tf = add_textbox(slide, "OSTEOMYELITIS", 1.5, 1.8, 10.2, 1.5,
font_size=48, bold=True, color=WHITE,
align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
# Red line under title
add_rect(slide, 3.5, 3.4, 6.3, 0.07, ACCENT)
# Subtitle
add_textbox(slide, "Bone Infection: A Complete Clinical Overview", 1.5, 3.55, 10.2, 0.6,
font_size=18, italic=True, color=LIGHT_BLUE, align=PP_ALIGN.CENTER)
# Bottom info
add_textbox(slide, "Pathology | Diagnosis | Classification | Management",
1.5, 4.4, 10.2, 0.5, font_size=14, color=GOLD, align=PP_ALIGN.CENTER)
# Sources tag
add_textbox(slide, "Sources: Robbins Pathology | Bailey & Love Surgery | Goldman-Cecil Medicine | Rosen's EM | Grainger Radiology",
0.5, 6.8, 12.3, 0.5, font_size=10, italic=True,
color=RGBColor(0x88, 0xAA, 0xCC), align=PP_ALIGN.CENTER)
# ─────────────────────────────────────────────
# SLIDE 2 — Definition & Overview
# ─────────────────────────────────────────────
slide = prs.slides.add_slide(blank)
slide_bg(slide)
title_bar(slide, "Definition & Overview")
# Left content block
add_rect(slide, 0.4, 1.55, 5.9, 5.6, WHITE)
add_rect(slide, 0.4, 1.55, 0.12, 5.6, MED_BLUE)
tb, tf = add_textbox(slide, "What is Osteomyelitis?", 0.7, 1.65, 5.4, 0.5,
font_size=16, bold=True, color=MED_BLUE)
add_para(tf, "Osteomyelitis is bone and marrow inflammation, virtually always secondary to infection.",
font_size=13, color=TEXT_DARK, space_before=4)
add_para(tf, "It may complicate any systemic infection but frequently manifests as a primary solitary focus.",
font_size=13, color=TEXT_DARK, space_before=4)
add_para(tf, "All types of organisms can produce osteomyelitis — viruses, parasites, fungi, and bacteria — but pyogenic bacteria and mycobacteria are most common.",
font_size=13, color=TEXT_DARK, space_before=8)
# Epidemiology box
add_rect(slide, 0.4, 4.4, 5.9, 2.65, LIGHT_BLUE)
tb2, tf2 = add_textbox(slide, "Key Epidemiology", 0.6, 4.5, 5.5, 0.4,
font_size=14, bold=True, color=DARK_BLUE)
add_para(tf2, "• Children: Predominantly hematogenous, long bones (male:female = 2–3:1)",
font_size=12, color=TEXT_DARK, space_before=3)
add_para(tf2, "• Adults: Often complication of open fractures, surgery, or diabetes",
font_size=12, color=TEXT_DARK, space_before=3)
add_para(tf2, "• Diabetic patients: Particularly predisposed to foot infections",
font_size=12, color=TEXT_DARK, space_before=3)
add_para(tf2, "• Sickle cell anemia: Salmonella most common (+ S. aureus)",
font_size=12, color=TEXT_DARK, space_before=3)
# Right: Routes of infection
add_rect(slide, 6.7, 1.55, 6.23, 5.6, WHITE)
add_rect(slide, 6.7, 1.55, 0.12, 5.6, ACCENT)
tb3, tf3 = add_textbox(slide, "Routes of Infection", 7.0, 1.65, 5.8, 0.5,
font_size=16, bold=True, color=ACCENT)
routes = [
("1. Hematogenous Spread",
"Most common in children. Bacteremia seeds metaphysis of long bones where blood flow is sluggish through looped vessels, combined with microtrauma."),
("2. Direct Implantation",
"Penetrating injuries, compound fractures, orthopedic procedures. Mixed infections common."),
("3. Contiguous Spread",
"Extension from adjacent infected soft tissue (e.g., diabetic foot ulcer, pressure sore)."),
]
y = 2.25
for title_r, desc_r in routes:
add_rect(slide, 7.0, y, 5.6, 0.28, MED_BLUE)
tb_r, tf_r = add_textbox(slide, title_r, 7.1, y, 5.4, 0.28,
font_size=12, bold=True, color=WHITE,
v_anchor=MSO_ANCHOR.MIDDLE)
tb_d, tf_d = add_textbox(slide, desc_r, 7.1, y+0.3, 5.5, 0.7,
font_size=11.5, color=TEXT_DARK, word_wrap=True)
y += 1.15
# ─────────────────────────────────────────────
# SLIDE 3 — Etiology & Causative Organisms
# ─────────────────────────────────────────────
slide = prs.slides.add_slide(blank)
slide_bg(slide)
title_bar(slide, "Etiology & Causative Organisms")
# Table headers
headers = ["Patient Group", "Common Organisms"]
col_x = [0.4, 6.8]
col_w = [6.2, 6.13]
add_rect(slide, 0.4, 1.55, 12.53, 0.45, DARK_BLUE)
for i, h in enumerate(headers):
add_textbox(slide, h, col_x[i]+0.1, 1.6, col_w[i]-0.2, 0.35,
font_size=14, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
rows = [
("Neonates (< 1 month)", "Group B Streptococcus, E. coli, S. aureus"),
("Children (1 month – 16 yr)", "S. aureus (most common incl. MRSA), Strep. pyogenes, H. influenzae (rare now)"),
("Adults (general)", "S. aureus (most common overall), Coagulase-negative Staphylococci"),
("Diabetic foot", "Polymicrobial, S. aureus, gram-negative bacilli, anaerobes"),
("Sickle cell disease", "Salmonella spp., S. aureus, gram-negative organisms"),
("IV drug users", "S. aureus, Pseudomonas aeruginosa, Candida spp."),
("Post-surgical / open fracture","S. aureus, Pseudomonas, E. coli, mixed flora"),
("Immunocompromised / TB", "Mycobacterium tuberculosis (Pott's disease), Fungi (Candida, Aspergillus)"),
("No organism identified", "~50% of cases — empirical therapy required"),
]
row_colors = [WHITE, LIGHT_GRAY]
y = 2.0
for idx, (pg, org) in enumerate(rows):
bg = row_colors[idx % 2]
add_rect(slide, 0.4, y, 12.53, 0.48, bg)
add_textbox(slide, pg, col_x[0]+0.1, y+0.02, col_w[0]-0.2, 0.44,
font_size=12, color=TEXT_DARK, v_anchor=MSO_ANCHOR.MIDDLE)
add_textbox(slide, org, col_x[1]+0.1, y+0.02, col_w[1]-0.2, 0.44,
font_size=12, color=TEXT_DARK, v_anchor=MSO_ANCHOR.MIDDLE, word_wrap=True)
y += 0.48
# Bottom note
add_rect(slide, 0.4, 6.85, 12.53, 0.4, ACCENT)
add_textbox(slide, "Note: S. aureus cell wall proteins bind bone matrix collagen — key virulence mechanism for bone adherence",
0.5, 6.87, 12.3, 0.38, font_size=11, italic=True, color=WHITE,
v_anchor=MSO_ANCHOR.MIDDLE)
# ─────────────────────────────────────────────
# SLIDE 4 — Pathophysiology (Acute Phase)
# ─────────────────────────────────────────────
slide = prs.slides.add_slide(blank)
slide_bg(slide)
title_bar(slide, "Pathophysiology — Acute Phase")
steps = [
("STEP 1", "Bacteremia & Seeding",
"Bacteria reach metaphysis via bloodstream. Sluggish blood flow + microtrauma in looped metaphyseal vessels allows bacterial seeding."),
("STEP 2", "Acute Inflammation",
"Bacteria proliferate → neutrophilic inflammatory reaction within 48 hours. Necrosis of bone cells and marrow ensues."),
("STEP 3", "Spread Through Haversian Systems",
"Inflammation spreads longitudinally and radially through Haversian canals toward the periosteum."),
("STEP 4", "Periosteal Elevation",
"In children, loosely attached periosteum is detached by inflammatory infiltrate → subperiosteal abscess forms. Blood supply impaired → further necrosis."),
("STEP 5", "Sinus Tract Formation",
"Periosteum ruptures → soft tissue abscess → tracks to skin surface creating a draining sinus. Pus may spread into adjacent joint → septic arthritis."),
("STEP 6", "Epiphyseal Complications",
"Infection may spread through articular surface or along capsular insertions into joint → septic arthritis, cartilage destruction, permanent disability."),
]
cols = 3
for i, (step_label, step_title, step_desc) in enumerate(steps):
col = i % cols
row = i // cols
x = 0.4 + col * 4.27
y = 1.55 + row * 2.8
add_rect(slide, x, y, 4.0, 2.55, WHITE)
# Color-coded top strip
strip_colors = [MED_BLUE, TEAL, ACCENT, GOLD, MED_BLUE, TEAL]
add_rect(slide, x, y, 4.0, 0.38, strip_colors[i])
add_textbox(slide, step_label, x+0.1, y+0.04, 1.2, 0.3,
font_size=11, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
add_textbox(slide, step_title, x+1.3, y+0.04, 2.6, 0.3,
font_size=11, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
add_textbox(slide, step_desc, x+0.15, y+0.45, 3.7, 2.0,
font_size=12, color=TEXT_DARK, word_wrap=True)
# ─────────────────────────────────────────────
# SLIDE 5 — Pathophysiology (Chronic Phase)
# ─────────────────────────────────────────────
slide = prs.slides.add_slide(blank)
slide_bg(slide)
title_bar(slide, "Pathophysiology — Chronic Phase & Key Terms")
# Left: Chronic changes
add_rect(slide, 0.4, 1.55, 7.5, 5.6, WHITE)
add_rect(slide, 0.4, 1.55, 0.12, 5.6, MED_BLUE)
tb, tf = add_textbox(slide, "Transition to Chronic Osteomyelitis", 0.65, 1.65, 7.1, 0.45,
font_size=16, bold=True, color=MED_BLUE)
add_para(tf, "After the first week, chronic inflammatory cells release cytokines that stimulate:",
font_size=13, color=TEXT_DARK, space_before=6)
add_para(tf, "• Osteoclastic bone resorption", font_size=13, color=TEXT_DARK, space_before=3, bullet=False)
add_para(tf, "• Ingrowth of fibrous tissue", font_size=13, color=TEXT_DARK, space_before=3, bullet=False)
add_para(tf, "• Deposition of reactive new bone at periphery", font_size=13, color=TEXT_DARK, space_before=3, bullet=False)
add_para(tf, "\nChronic infection occurs in 5-25% of acute cases, especially with:",
font_size=13, color=TEXT_DARK, space_before=8)
add_para(tf, "• Delayed diagnosis", font_size=13, color=TEXT_DARK, space_before=3)
add_para(tf, "• Weakened host defenses", font_size=13, color=TEXT_DARK, space_before=3)
add_para(tf, "• Extensive bone necrosis", font_size=13, color=TEXT_DARK, space_before=3)
add_para(tf, "• Inadequate antibiotics or surgical debridement", font_size=13, color=TEXT_DARK, space_before=3)
# Right: Key terms
terms = [
("SEQUESTRUM", ACCENT,
"Dead bone that has separated from living bone. Low signal on T2 MRI. Appears as dense fragment surrounded by lucency on X-ray."),
("INVOLUCRUM", MED_BLUE,
"Shell of new living bone deposited by periosteum around the sequestrum. Creates 'bone-within-bone' appearance."),
("BRODIE ABSCESS", TEAL,
"Chronic subacute form. Well-defined lytic lesion with sclerotic rim. Characteristic 'penumbra sign' on MRI (granulation tissue ring)."),
("CLOACA", GOLD,
"Gaps/perforations in the involucrum through which pus and sequestra can escape to soft tissue and skin surface."),
("SINUS TRACT", RGBColor(0x8B, 0x00, 0x8B),
"Chronic draining tract from bone to skin surface. Risk of malignant transformation to squamous cell carcinoma."),
]
y = 1.55
for term, color, desc in terms:
add_rect(slide, 8.2, y, 4.73, 0.95, color)
add_textbox(slide, term, 8.3, y+0.03, 2.0, 0.35,
font_size=12, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
add_textbox(slide, desc, 8.3, y+0.38, 4.5, 0.55,
font_size=11, color=WHITE, word_wrap=True)
y += 1.05
# Complications at bottom
add_rect(slide, 0.4, 6.7, 12.53, 0.55, DARK_BLUE)
add_textbox(slide, "Complications of Chronic Osteomyelitis: Pathologic fracture | Reactive (secondary) amyloidosis | Endocarditis | Sepsis | Squamous cell carcinoma in sinus tract | Sarcoma",
0.6, 6.72, 12.1, 0.5, font_size=11, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
# ─────────────────────────────────────────────
# SLIDE 6 — Classification (Waldvogel + Cierny-Mader)
# ─────────────────────────────────────────────
slide = prs.slides.add_slide(blank)
slide_bg(slide)
title_bar(slide, "Classification of Osteomyelitis")
# Left: Waldvogel
add_rect(slide, 0.4, 1.55, 6.0, 5.6, WHITE)
add_rect(slide, 0.4, 1.55, 0.12, 5.6, MED_BLUE)
tb, tf = add_textbox(slide, "Waldvogel Classification (by route)", 0.65, 1.65, 5.6, 0.45,
font_size=15, bold=True, color=MED_BLUE)
wald_cats = [
("Hematogenous", TEAL,
"• Acute: Children, long bone metaphysis\n• Subacute: Brodie abscess, insidious onset\n• Chronic: Persistent >6 weeks, involucrum/sequestrum"),
("Contiguous Focus\n(Without vascular insufficiency)", MED_BLUE,
"• Post-trauma, post-surgical\n• Mixed bacterial infections common\n• Young to middle-aged adults"),
("Contiguous Focus\n(With vascular insufficiency)", ACCENT,
"• Diabetic foot, peripheral vascular disease\n• Polymicrobial infections\n• Elderly patients, difficult to treat"),
]
y = 2.2
for cat_title, cat_color, cat_desc in wald_cats:
add_rect(slide, 0.65, y, 5.5, 0.32, cat_color)
add_textbox(slide, cat_title, 0.75, y+0.02, 5.2, 0.28,
font_size=12, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
add_textbox(slide, cat_desc, 0.75, y+0.35, 5.2, 0.85,
font_size=11.5, color=TEXT_DARK, word_wrap=True)
y += 1.35
# Right: Cierny-Mader
add_rect(slide, 6.7, 1.55, 6.23, 5.6, WHITE)
add_rect(slide, 6.7, 1.55, 0.12, 5.6, ACCENT)
tb2, tf2 = add_textbox(slide, "Cierny-Mader Classification (Anatomic Stage)", 6.95, 1.65, 5.85, 0.45,
font_size=15, bold=True, color=ACCENT)
stages = [
("Stage I — Medullary", "Infection confined to the medullary canal (intramedullary)"),
("Stage II — Superficial", "Infection limited to bone surface (from contiguous tissue)"),
("Stage III — Localized", "Full thickness cortical involvement; sequestrum present; bone remains stable"),
("Stage IV — Diffuse", "Permeative; mechanically unstable bone; requires resection for cure"),
]
add_para(tf2, "Anatomic Types:", font_size=12, bold=True, color=TEXT_DARK, space_before=8)
for s_title, s_desc in stages:
add_para(tf2, f"• {s_title}: {s_desc}", font_size=12, color=TEXT_DARK, space_before=4)
add_para(tf2, "\nPhysiologic Host Class:", font_size=12, bold=True, color=TEXT_DARK, space_before=8)
hosts = [
"Class A: Normal immune system",
"Class B: Compromised locally (BL) or systemically (BS)",
"Class C: Treatment worse than disease (supportive care only)",
]
for h in hosts:
add_para(tf2, f"• {h}", font_size=12, color=TEXT_DARK, space_before=3)
add_para(tf2, "\nAcute vs Chronic: Symptoms <2 weeks = acute; >2-3 weeks = chronic",
font_size=11, italic=True, color=MED_BLUE, space_before=8)
# ─────────────────────────────────────────────
# SLIDE 7 — Clinical Features
# ─────────────────────────────────────────────
slide = prs.slides.add_slide(blank)
slide_bg(slide)
title_bar(slide, "Clinical Features")
# Acute box (left)
add_rect(slide, 0.4, 1.55, 6.0, 2.8, WHITE)
add_rect(slide, 0.4, 1.55, 0.12, 2.8, ACCENT)
tb, tf = add_textbox(slide, "Acute Osteomyelitis", 0.65, 1.62, 5.6, 0.42,
font_size=15, bold=True, color=ACCENT)
acute_sx = [
"Fever, rigors, may appear toxic",
"Systemic: headache, fatigue, malaise, anorexia",
"Point tenderness over infected bone (predominant finding)",
"Localized warmth, swelling, erythema (variable)",
"Children: sudden limp or inability to bear weight",
"Sympathetic joint effusion may develop",
"Leukocytosis, elevated ESR and CRP",
]
for sx in acute_sx:
add_para(tf, f"• {sx}", font_size=12, color=TEXT_DARK, space_before=3)
# Chronic box (left lower)
add_rect(slide, 0.4, 4.5, 6.0, 2.7, WHITE)
add_rect(slide, 0.4, 4.5, 0.12, 2.7, MED_BLUE)
tb2, tf2 = add_textbox(slide, "Chronic Osteomyelitis", 0.65, 4.57, 5.6, 0.42,
font_size=15, bold=True, color=MED_BLUE)
chronic_sx = [
"Systemic symptoms less pronounced",
"Pain may be dull or intermittent",
"Palpable involucrum or sequestrum",
"Draining sinus tracts to skin",
"Flare-ups after years of apparent dormancy",
"Adjacent joint deformity in children",
]
for sx in chronic_sx:
add_para(tf2, f"• {sx}", font_size=12, color=TEXT_DARK, space_before=3)
# Right: Special populations
add_rect(slide, 6.7, 1.55, 6.23, 5.6, LIGHT_GRAY)
sp_groups = [
("Children (AHO)", MED_BLUE,
"Ages 3 months – 16 years. Distal metaphysis most common. Fever + point tenderness + refusal to use limb. Blood cultures positive in ~40%."),
("Neonates", ACCENT,
"Diagnosis difficult — irritability, pseudoparalysis, poor feeding. May lack fever. Often multifocal. High risk of growth disturbance."),
("Vertebral Osteomyelitis\n(Adults)", TEAL,
"Most common in adults >50 yr. Insidious back/neck pain + fever. Can cause spinal cord compression. Staphylococci most common."),
("Diabetic Foot", GOLD,
"Often painless due to neuropathy. May present as non-healing ulcer. Probe-to-bone test (positive = suspected). Polymicrobial."),
]
y = 1.6
for grp_title, grp_color, grp_desc in sp_groups:
add_rect(slide, 6.75, y, 5.9, 0.32, grp_color)
add_textbox(slide, grp_title, 6.85, y+0.02, 5.6, 0.28,
font_size=12, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
add_textbox(slide, grp_desc, 6.85, y+0.35, 5.7, 0.8,
font_size=11.5, color=TEXT_DARK, word_wrap=True)
y += 1.32
# ─────────────────────────────────────────────
# SLIDE 8 — Investigations
# ─────────────────────────────────────────────
slide = prs.slides.add_slide(blank)
slide_bg(slide)
title_bar(slide, "Investigations & Diagnosis")
inv_sections = [
("Laboratory Tests", MED_BLUE, [
"FBC: Leukocytosis (WBC >11,000) in acute cases",
"ESR: Elevated (>20 mm/hr); sensitive but non-specific",
"CRP: Elevated; faster response than ESR; useful for monitoring",
"Blood cultures: Positive in ~40% of children, lower in adults",
"Bone biopsy for culture: Gold standard — obtain before antibiotics if possible",
"No organism identified in ~50% of cases",
]),
("X-Ray (Plain Radiograph)", ACCENT, [
"Earliest finding: Soft tissue swelling (1–3 days)",
"Bone changes lag by 10–21 days after onset",
"Later: Cortical irregularity (destruction) + periosteal reaction",
"Chronic: Dense sequestrum + radiolucent halo + involucrum",
"TB (dactylitis): Spina ventosa — cyst-like cavities + diaphyseal expansion",
]),
("MRI (Investigation of Choice)", TEAL, [
"Highest sensitivity and specificity",
"T1: Low signal in medullary cavity (edema replaces fat)",
"T2/STIR: High signal (inflammatory exudate/edema)",
"Brodie abscess: 'Penumbra sign' — high-signal rim of granulation tissue",
"Contrast-enhanced: Identifies soft tissue abscess",
"Whole-body MRI for multifocal disease in neonates",
]),
("Other Imaging", GOLD, [
"Ultrasound: Simple, no radiation; detects subperiosteal abscess; guides aspiration",
"CT: Defines cortical destruction; identifies sequestra; higher radiation",
"Tc-99m bone scan: High sensitivity but low specificity; useful when MRI unavailable",
"Gallium/Indium-labeled WBC scan: Better specificity than bone scan for infection",
"PET-CT: Emerging for chronic/complex cases",
]),
]
xs = [0.4, 0.4, 6.87, 6.87]
ys = [1.55, 4.35, 1.55, 4.35]
widths = [6.2, 6.2, 6.13, 6.13]
heights = [2.65, 2.9, 2.65, 2.9]
for idx, (sec_title, sec_color, bullets) in enumerate(inv_sections):
x, y, w, h = xs[idx], ys[idx], widths[idx], heights[idx]
add_rect(slide, x, y, w, h, WHITE)
add_rect(slide, x, y, 0.12, h, sec_color)
add_rect(slide, x, y, w, 0.4, sec_color)
add_textbox(slide, sec_title, x+0.2, y+0.05, w-0.3, 0.3,
font_size=13, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
tb_b, tf_b = add_textbox(slide, bullets[0], x+0.25, y+0.48, w-0.35, 0.3,
font_size=11.5, color=TEXT_DARK)
for b in bullets[1:]:
add_para(tf_b, b, font_size=11.5, color=TEXT_DARK, space_before=2)
# ─────────────────────────────────────────────
# SLIDE 9 — Histopathology & Radiology
# ─────────────────────────────────────────────
slide = prs.slides.add_slide(blank)
slide_bg(slide)
title_bar(slide, "Histopathology & Radiological Findings")
# Acute histology
add_rect(slide, 0.4, 1.55, 4.0, 2.7, WHITE)
add_rect(slide, 0.4, 1.55, 0.12, 2.7, MED_BLUE)
tb, tf = add_textbox(slide, "Acute — Histology", 0.65, 1.62, 3.7, 0.4,
font_size=14, bold=True, color=MED_BLUE)
for item in [
"Neutrophilic exudate in marrow",
"Vascular congestion and thrombosis",
"Osteocyte necrosis within 48 hours",
"Periosteal elevation and subperiosteal abscess",
"Cortical resorption via osteoclasts",
]:
add_para(tf, f"• {item}", font_size=12, color=TEXT_DARK, space_before=3)
# Chronic histology
add_rect(slide, 0.4, 4.35, 4.0, 2.9, WHITE)
add_rect(slide, 0.4, 4.35, 0.12, 2.9, ACCENT)
tb2, tf2 = add_textbox(slide, "Chronic — Histology", 0.65, 4.42, 3.7, 0.4,
font_size=14, bold=True, color=ACCENT)
for item in [
"Lymphocytes and plasma cells infiltrate",
"Marrow fibrosis",
"Sequestrum: dead bone fragment (lamellar bone, empty lacunae)",
"Involucrum: periosteal new bone shell",
"Occasionally granulomatous (TB: caseating granulomas)",
]:
add_para(tf2, f"• {item}", font_size=12, color=TEXT_DARK, space_before=3)
# Radiological timeline
add_rect(slide, 4.65, 1.55, 8.27, 5.7, WHITE)
add_rect(slide, 4.65, 1.55, 0.12, 5.7, TEAL)
tb3, tf3 = add_textbox(slide, "Radiological Timeline of Changes", 4.9, 1.62, 7.9, 0.4,
font_size=14, bold=True, color=TEAL)
timeline = [
("Day 1–3", LIGHT_GRAY, "Soft tissue swelling only on plain X-ray"),
("Day 3–7", LIGHT_BLUE, "Edema causing displacement of muscle planes"),
("Day 10–21", RGBColor(0xC8,0xE6,0xC9), "First bony changes: subtle osteopenia, periosteal reaction"),
("> 3 weeks", RGBColor(0xFFF9C4,0,0), "Cortical destruction, lytic lesion visible"),
("Chronic phase", RGBColor(0xFF,0xCC,0xBC), "Sclerosis, involucrum, sequestrum — 'bone-within-bone'"),
("MRI advantage", RGBColor(0xE1,0xBE,0xE7), "Abnormal signal within 1–3 days of infection onset"),
]
# fix tuple
timeline = [
("Day 1–3", LIGHT_GRAY, "Soft tissue swelling only on plain X-ray"),
("Day 3–7", LIGHT_BLUE, "Edema causing displacement of muscle planes"),
("Day 10–21", RGBColor(0xC8,0xE6,0xC9), "First bony changes: subtle osteopenia, periosteal reaction"),
("> 3 weeks", RGBColor(0xFF,0xE0,0x82), "Cortical destruction, lytic lesion visible on X-ray"),
("Chronic phase", RGBColor(0xFF,0xCC,0xBC), "Sclerosis, involucrum, sequestrum — 'bone-within-bone'"),
("MRI advantage", RGBColor(0xE1,0xBE,0xE7), "Abnormal marrow signal within 1–3 days of infection onset"),
]
y = 2.1
for time_label, t_color, t_desc in timeline:
add_rect(slide, 4.8, y, 7.9, 0.75, t_color)
add_rect(slide, 4.8, y, 1.5, 0.75, TEAL)
add_textbox(slide, time_label, 4.85, y+0.1, 1.3, 0.55,
font_size=11, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
add_textbox(slide, t_desc, 6.4, y+0.1, 6.2, 0.55,
font_size=12, color=TEXT_DARK, v_anchor=MSO_ANCHOR.MIDDLE, word_wrap=True)
y += 0.82
# ─────────────────────────────────────────────
# SLIDE 10 — Management: Antibiotic Therapy
# ─────────────────────────────────────────────
slide = prs.slides.add_slide(blank)
slide_bg(slide)
title_bar(slide, "Management — Antibiotic Therapy")
# General principles
add_rect(slide, 0.4, 1.55, 12.53, 0.9, DARK_BLUE)
tb, tf = add_textbox(slide, "General Principles", 0.6, 1.6, 5.0, 0.35,
font_size=14, bold=True, color=GOLD, v_anchor=MSO_ANCHOR.MIDDLE)
add_para(tf, "Obtain cultures BEFORE antibiotics if possible • Start IV, transition to oral when CRP/ESR normalizing • Duration: 4–6 weeks total (longer for chronic) • MRSA common — vancomycin is cornerstone empirical therapy",
font_size=12, color=WHITE, space_before=2)
# Antibiotic table
atx_headers = ["Clinical Setting", "Empirical / 1st Line", "MRSA / Alternative", "Duration"]
col_x2 = [0.4, 3.65, 7.5, 11.1]
col_w2 = [3.1, 3.75, 3.5, 2.1]
add_rect(slide, 0.4, 2.58, 12.53, 0.42, MED_BLUE)
for i, h in enumerate(atx_headers):
add_textbox(slide, h, col_x2[i]+0.08, 2.6, col_w2[i]-0.1, 0.38,
font_size=12, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
atx_rows = [
("Children (S. aureus likely)", "Flucloxacillin IV (Nafcillin)", "Vancomycin (if MRSA risk)", "3–6 weeks"),
("Adults — community acquired", "Flucloxacillin / Nafcillin IV", "Vancomycin or Daptomycin", "4–6 weeks"),
("Diabetic foot (polymicrobial)", "Piperacillin-tazobactam", "Add vancomycin + metronidazole", "4–8 weeks"),
("Sickle cell (Salmonella)", "Ciprofloxacin or cephalosporin", "Ampicillin + gentamicin", "4–6 weeks"),
("Post-surgical / Pseudomonas", "Cefepime or piperacillin-tazobactam", "Ciprofloxacin + MRSA cover", "6–8 weeks"),
("Vertebral (S. aureus)", "Flucloxacillin IV → oral", "Vancomycin if MRSA", "6–12 weeks"),
("TB osteomyelitis (Pott's)", "RHEZ: Rifampicin + INH + Ethambutol + Pyrazinamide", "DOTS program", "9–12 months"),
]
y = 3.0
row_colors2 = [WHITE, LIGHT_GRAY]
for idx, row_data in enumerate(atx_rows):
bg = row_colors2[idx % 2]
add_rect(slide, 0.4, y, 12.53, 0.52, bg)
for ci, cell_text in enumerate(row_data):
add_textbox(slide, cell_text, col_x2[ci]+0.08, y+0.03, col_w2[ci]-0.1, 0.46,
font_size=11, color=TEXT_DARK, v_anchor=MSO_ANCHOR.MIDDLE, word_wrap=True)
y += 0.52
# Note
add_rect(slide, 0.4, 6.7, 12.53, 0.55, LIGHT_BLUE)
add_textbox(slide, "RHEZ = Rifampicin + Isoniazid + Ethambutol + Pyrazinamide | IV-to-oral switch guided by clinical response, CRP normalization, and ability to take oral medications | Seek Infectious Disease input for complex cases",
0.6, 6.72, 12.1, 0.5, font_size=11, color=DARK_BLUE, v_anchor=MSO_ANCHOR.MIDDLE)
# ─────────────────────────────────────────────
# SLIDE 11 — Surgical Management
# ─────────────────────────────────────────────
slide = prs.slides.add_slide(blank)
slide_bg(slide)
title_bar(slide, "Surgical Management")
surg_items = [
("Indications for Surgery", ACCENT, [
"Failure to respond to antibiotics within 24–48 hours",
"Subperiosteal or soft tissue abscess formation",
"Sequestrum requiring removal (chronic disease)",
"Pathologic fracture",
"Spinal cord compression in vertebral osteomyelitis",
"Infected hardware requiring removal",
]),
("Surgical Principles", MED_BLUE, [
"Adequate debridement: Remove all necrotic bone and tissue",
"Sequestrectomy: Remove dead bone fragments",
"Saucerization: Surgical saucer-shaped cavity prevents pus collection",
"Bone biopsy and culture during operation",
"Dead space management: Muscle flap, cancellous bone graft, antibiotic beads",
"Wound: Leave open or delayed primary closure",
]),
("Special Procedures", TEAL, [
"Antibiotic-loaded beads: Local delivery of high-dose antibiotics",
"Ilizarov technique: Bone transport for large defects after resection",
"Free muscle flaps: Fill dead space + improve vascularity",
"Amputation: Last resort for uncontrolled infection with vascular insufficiency",
"DAIR (Debridement, Antibiotics, Irrigation, Retention): For prosthetic joint infection",
]),
("Post-Operative Care", GOLD, [
"Immobilization and elevation of affected limb",
"Continue IV antibiotics → oral transition",
"Regular wound care and dressing changes",
"Monitor ESR, CRP for response",
"Physiotherapy for rehabilitation",
"Long-term orthopaedic follow-up in children until normal growth confirmed",
]),
]
xs2 = [0.4, 6.87, 0.4, 6.87]
ys2 = [1.55, 1.55, 4.35, 4.35]
for idx, (s_title, s_color, s_bullets) in enumerate(surg_items):
x, y = xs2[idx], ys2[idx]
w, h = 6.2, 2.65
add_rect(slide, x, y, w, h, WHITE)
add_rect(slide, x, y, 0.12, h, s_color)
add_rect(slide, x, y, w, 0.4, s_color)
add_textbox(slide, s_title, x+0.2, y+0.05, w-0.3, 0.3,
font_size=13, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
tb_b, tf_b = add_textbox(slide, s_bullets[0], x+0.25, y+0.48, w-0.35, 0.35,
font_size=11.5, color=TEXT_DARK)
for b in s_bullets[1:]:
add_para(tf_b, f"• {b}", font_size=11.5, color=TEXT_DARK, space_before=2)
# ─────────────────────────────────────────────
# SLIDE 12 — Special Forms
# ─────────────────────────────────────────────
slide = prs.slides.add_slide(blank)
slide_bg(slide)
title_bar(slide, "Special Forms of Osteomyelitis")
special_forms = [
("Pott's Disease\n(Spinal TB)", MED_BLUE,
"Mycobacterium tuberculosis. Spine in 40% of TB osteomyelitis cases. Disc space destruction → vertebral collapse → kyphosis. Psoas abscess (cold abscess). Treatment: RHEZ x 9–12 months + surgery for instability."),
("Brodie Abscess", TEAL,
"Subacute/chronic form. Walled-off abscess, usually distal tibia in children. Well-defined lytic lesion + sclerotic rim on X-ray. Penumbra sign on MRI. Treatment: curettage + antibiotics."),
("Chronic Recurrent\nMultifocal Osteomyelitis (CRMO)", ACCENT,
"Non-infectious inflammatory condition. Children and adolescents. Multifocal bone lesions, often clavicle, tibia, spine. Mimics infectious osteomyelitis — requires exclusion. Treatment: NSAIDs, bisphosphonates."),
("Neonatal Osteomyelitis", GOLD,
"Multifocal in up to 40%. Group B Strep + S. aureus. Vascular channels cross physis → epiphyseal + joint involvement. High risk of growth disturbance. Presentation subtle — irritability, pseudoparalysis."),
("Diabetic Foot\nOsteomyelitis", RGBColor(0x55, 0x6B, 0x2F),
"Contiguous spread from ulcer. Probe-to-bone test: sensitivity 66%, specificity 85%. MRI most accurate. Multidisciplinary approach: podiatry, vascular surgery, infectious disease. Beware of Charcot arthropathy mimicking."),
("Post-Traumatic /\nPost-Surgical", RGBColor(0x8B, 0x00, 0x8B),
"Open fractures, hardware infection. Biofilm formation on implants. S. aureus most common. Complex: often requires hardware removal, extensive debridement, prolonged IV antibiotics. DAIR if early infection."),
]
cols = 3
for i, (sf_title, sf_color, sf_desc) in enumerate(special_forms):
col = i % cols
row = i // cols
x = 0.4 + col * 4.27
y = 1.55 + row * 2.85
add_rect(slide, x, y, 4.0, 2.6, WHITE)
add_rect(slide, x, y, 4.0, 0.45, sf_color)
add_textbox(slide, sf_title, x+0.1, y+0.04, 3.8, 0.38,
font_size=12, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE,
align=PP_ALIGN.CENTER)
add_textbox(slide, sf_desc, x+0.12, y+0.5, 3.76, 1.95,
font_size=11.5, color=TEXT_DARK, word_wrap=True)
# ─────────────────────────────────────────────
# SLIDE 13 — Complications
# ─────────────────────────────────────────────
slide = prs.slides.add_slide(blank)
slide_bg(slide)
title_bar(slide, "Complications of Osteomyelitis")
comp_groups = [
("Acute Complications", ACCENT, [
"Bacteremia and sepsis (life-threatening)",
"Septic arthritis (direct spread to adjacent joint)",
"Meningitis or brain abscess (hematogenous)",
"Pneumonia / empyema (in rib osteomyelitis)",
"Spinal cord compression (vertebral OM)",
"Pathologic fracture at infection site",
]),
("Chronic Complications", MED_BLUE, [
"Chronic draining sinuses",
"Persistent / recurrent infection after 'dormancy'",
"Growth disturbance in children (physis involvement)",
"Limb length discrepancy / angular deformity",
"Soft tissue contractures and loss of function",
"Reactive (secondary) amyloidosis — systemic complication",
]),
("Malignant Complications", DARK_BLUE, [
"Squamous cell carcinoma in chronic sinus tract (Marjolin's ulcer)",
"Sarcoma arising in chronically infected bone",
"Rare but important: chronic sinus > 10 years especially at risk",
]),
("Treatment Complications", TEAL, [
"Antibiotic toxicity (vancomycin: nephrotoxicity, ototoxicity)",
"Clostridium difficile colitis",
"Post-surgical wound infection",
"Implant failure / refracture after debridement",
"PICC line / IV access complications",
]),
]
xs3 = [0.4, 6.87, 0.4, 6.87]
ys3 = [1.55, 1.55, 4.5, 4.5]
for idx, (comp_t, comp_c, comp_b) in enumerate(comp_groups):
x, y = xs3[idx], ys3[idx]
w = 6.2 if idx % 2 == 0 else 6.13
h = 2.8 if idx < 2 else 2.65
add_rect(slide, x, y, w, h, WHITE)
add_rect(slide, x, y, 0.12, h, comp_c)
add_rect(slide, x, y, w, 0.38, comp_c)
add_textbox(slide, comp_t, x+0.2, y+0.04, w-0.3, 0.3,
font_size=13, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)
tb_c, tf_c = add_textbox(slide, "• " + comp_b[0], x+0.25, y+0.46, w-0.35, 0.4,
font_size=12, color=TEXT_DARK)
for b in comp_b[1:]:
add_para(tf_c, f"• {b}", font_size=12, color=TEXT_DARK, space_before=3)
# ─────────────────────────────────────────────
# SLIDE 14 — Summary & Key Points
# ─────────────────────────────────────────────
slide = prs.slides.add_slide(blank)
slide_bg(slide, DARK_BLUE)
# Top bar
add_rect(slide, 0, 0, 13.333, 1.3, MED_BLUE)
add_rect(slide, 0, 1.3, 13.333, 0.06, GOLD)
add_textbox(slide, "Summary & Key Take-Home Points", 0.4, 0.1, 12.5, 0.9,
font_size=28, bold=True, color=WHITE,
align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
key_points = [
(ACCENT, "Definition", "Bone and marrow inflammation, virtually always infectious. Pyogenic bacteria (esp. S. aureus) and TB are most common causes."),
(MED_BLUE, "Pathogenesis", "Hematogenous > contiguous spread > direct inoculation. Metaphysis of long bones most affected in children. Sequestrum + involucrum = hallmarks of chronicity."),
(TEAL, "Diagnosis", "MRI is gold standard (earliest changes at 1–3 days). X-ray lags by 10–21 days. Bone biopsy + culture = definitive. Blood cultures positive in ~40%."),
(GOLD, "Classification", "Waldvogel: Hematogenous / Contiguous (with or without vascular insufficiency). Cierny-Mader: Stage I–IV by anatomy + Host class A/B/C."),
(ACCENT, "Treatment", "Antibiotics (4–12 weeks depending on type) + surgical drainage/debridement when indicated. Vancomycin for MRSA. RHEZ for TB osteomyelitis."),
(MED_BLUE, "Complications", "Sepsis, septic arthritis, growth arrest in children, pathologic fracture, amyloidosis, Marjolin's ulcer in chronic sinus tracts."),
(TEAL, "Special Points", "50% culture-negative. S. aureus binds bone collagen. Diabetic foot: probe-to-bone test. Pott's disease: 40% of TB osteomyelitis. CRMO is non-infectious mimic."),
]
y = 1.5
for kp_color, kp_title, kp_desc in key_points:
add_rect(slide, 0.4, y, 12.53, 0.68, RGBColor(0x14, 0x3A, 0x6B))
add_rect(slide, 0.4, y, 1.8, 0.68, kp_color)
add_textbox(slide, kp_title, 0.45, y+0.08, 1.65, 0.52,
font_size=12, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE,
align=PP_ALIGN.CENTER)
add_textbox(slide, kp_desc, 2.35, y+0.08, 10.45, 0.52,
font_size=12, color=RGBColor(0xDD, 0xEE, 0xFF),
v_anchor=MSO_ANCHOR.MIDDLE, word_wrap=True)
y += 0.73
# ─────────────────────────────────────────────
# Save
# ─────────────────────────────────────────────
output_path = "/tmp/workspace/osteomyelitis-ppt/Osteomyelitis_Complete.pptx"
buf = BytesIO()
prs.save(buf)
with open(output_path, "wb") as f:
f.write(buf.getvalue())
print(f"Saved: {output_path}")
print(f"Slides: {len(prs.slides)}")
cd /tmp/workspace/osteomyelitis-ppt && python build_pptx.py 2>&1
~/osteomyelitis-ppt/build_pptx.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/osteomyelitis-ppt/build_pptx.py'
~/osteomyelitis-ppt/build_pptx.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/osteomyelitis-ppt/build_pptx.py'
cd /tmp/workspace/osteomyelitis-ppt && python build_pptx.py 2>&1
~/osteomyelitis-ppt/build_pptx.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/osteomyelitis-ppt/build_pptx.py'
~/osteomyelitis-ppt/build_pptx.py
Error: String not found in file: 'timeline = [
("Day 1–3", LIGHT_GRAY, "Soft tissue swelling only on plain X-ray"),
("Day 3–7", LIGHT_BLUE, "Edema causing displacement of muscle planes"),
("Day 10–21", RGBColor(0xC8,0xE6,0xC9), "First bony changes: subtle osteopenia, periosteal reaction"),
("> 3 weeks", RGBColor(0xFF,0xE0,0x82), "Cortical destruction, lytic lesion visible on X-ray"),
("Chronic phase", RGBColor(0xFF,0xCC,0xBC), "Sclerosis, involucrum, sequestrum — 'bone-within-bone'"),
("MRI advantage", RGBColor(0xE1,0xBE,0xE7), "Abnormal marrow signal within 1–3 days of infection onset"),
]
# fix tuple
timeline = [
("Day 1–3", LIGHT_GRAY, "Soft tissue swelling only on plain X-ray"),
("Day 3–7", LIGHT_BLUE, "Edema causing displacement of muscle planes"),
("Day 10–21", RGBColor(0xC8,0xE6,0xC9), "First bony changes: subtle osteopenia, periosteal reaction"),
("> 3 weeks", RGBColor(0xFF,0xE0,0x82), "Cortical destruction, lytic lesion visible on X-ray"),
("Chronic phase", RGBColor(0xFF,0xCC,0xBC), "Sclerosis, involucrum, sequestrum — 'bone-within-bone'"),
("MRI advantage", RGBColor(0xE1,0xBE,0xE7), "Abnormal marrow signal within 1–3 days of infection onset"),
]
y = 2.1
for time_label'cd /tmp/workspace/osteomyelitis-ppt && python build_pptx.py 2>&1
sed -n '570,600p' /tmp/workspace/osteomyelitis-ppt/build_pptx.py
python3 -c " content = open('/tmp/workspace/osteomyelitis-ppt/build_pptx.py').read() # Remove the first broken timeline block (lines 577-584) old_block = '''timeline = [ (\"Day 1\u20133\", LIGHT_GRAY, \"Soft tissue swelling only on plain X-ray\"), (\"Day 3\u20137\", LIGHT_BLUE, \"Edema causing displacement of muscle planes\"), (\"Day 10\u201321\", RGBColor(0xC8,0xE6,0xC9), \"First bony changes: subtle osteopenia, periosteal reaction\"), (\"> 3 weeks\", RGBColor(0xFFF9C4,0,0), \"Cortical destruction, lytic lesion visible\"), (\"Chronic phase\", RGBColor(0xFF,0xCC,0xBC), \"Sclerosis, involucrum, sequestrum \u2014 \'bone-within-bone\'\"), (\"MRI advantage\", RGBColor(0xE1,0xBE,0xE7), \"Abnormal signal within 1\u20133 days of infection onset\"), ] # fix tuple ''' content = content.replace(old_block, '') open('/tmp/workspace/osteomyelitis-ppt/build_pptx.py','w').write(content) print('Done, remaining timeline entries:') import re print(re.findall(r'timeline = \[', content)) "
build_pptx.py) has been written and debugged at:/tmp/workspace/osteomyelitis-ppt/build_pptx.pytimeline block has been removed. The script is now clean and ready to run. It will produce a 14-slide professional PPTX covering:| Slide | Content |
|---|---|
| 1 | Title slide (navy/red design) |
| 2 | Definition & Overview + Routes of infection |
| 3 | Etiology table by patient group (S. aureus, MRSA, TB, Salmonella, etc.) |
| 4 | Pathophysiology - Acute Phase (6-step cards) |
| 5 | Pathophysiology - Chronic Phase + Key Terms (Sequestrum, Involucrum, Brodie Abscess, Cloaca, Sinus Tract) |
| 6 | Classification - Waldvogel + Cierny-Mader (Stage I-IV + Host A/B/C) |
| 7 | Clinical Features - Acute, Chronic + Special Populations |
| 8 | Investigations - Labs, X-Ray, MRI, Other Imaging |
| 9 | Histopathology + Radiological Timeline |
| 10 | Management - Antibiotic table by clinical setting (incl. TB: RHEZ) |
| 11 | Surgical Management - Indications, Principles, Special Procedures |
| 12 | Special Forms - Pott's, Brodie, CRMO, Neonatal, Diabetic Foot, Post-traumatic |
| 13 | Complications - Acute, Chronic, Malignant, Treatment-related |
| 14 | Summary - 7 color-coded key take-home points |
python build_pptx.py command needs to run to generate the .pptx file. One more iteration will complete this.