Give me a presentation on hemothorax from love and bailey textbook and srb textbook of surgery

Reading File
Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Searching Images

hemothorax chest X-ray CT scan pleural blood

A composite medical diagnostic image presenting a chest radiograph, an axial CT scan, and a 3D reconstructed CT image of the thorax following trauma. The supine anteroposterior (AP) chest X-ray (top left) demonstrates complete opacification of the left hemithorax, suggestive of massive hemothorax or pleural effusion. The axial soft tissue window CT scan (bottom left) confirms a large, high-attenuation pleural collection in the left hemithorax consistent with blood (hemothorax), causing passive compressive atelectasis of the left lung parenchyma. The posterior 3D CT reconstruction (right) highlights severe skeletal trauma, specifically identifying multiple comminuted fractures of the left fourth through seventh ribs, demarcated by a yellow oval. The displaced fracture segments show significant misalignment and sharp edges. This multi-modal presentation illustrates acute thoracic trauma, skeletal injury (multiple rib fractures), and associated secondary complications (massive hemothorax) in a clinical emergency context.

A composite medical diagnostic image presenting a chest radiograph, an axial CT scan, and a 3D reconstructed CT image of the thorax following trauma. The supine anteroposterior (AP) chest X-ray (top left) demonstrates complete opacification of the left hemithorax, suggestive of massive hemothorax or pleural effusion. The axial soft tissue window CT scan (bottom left) confirms a large, high-attenuation pleural collection in the left hemithorax consistent with blood (hemothorax), causing passive compressive atelectasis of the left lung parenchyma. The posterior 3D CT reconstruction (right) highlights severe skeletal trauma, specifically identifying multiple comminuted fractures of the left fourth through seventh ribs, demarcated by a yellow oval. The displaced fracture segments show significant misalignment and sharp edges. This multi-modal presentation illustrates acute thoracic trauma, skeletal injury (multiple rib fractures), and associated secondary complications (massive hemothorax) in a clinical emergency context.

This dual-panel diagnostic image demonstrates a massive right-sided hemothorax in a post-surgical patient. Panel (a) is a posterior-anterior (PA) chest X-ray showing significant homogeneous opacity in the right lower and mid-lung fields, resulting in the obscuration of the right diaphragmatic contour and costophrenic angle. There is a blunting effect and upward-sloping meniscus characteristic of a large pleural effusion. Panel (b) is an axial contrast-enhanced CT scan of the chest at the level of the pulmonary arteries. It reveals a large, high-density fluid collection (consistent with acute blood) within the right pleural space. This collection causes significant passive atelectasis of the right lung, which is compressed medially against the mediastinum. The mediastinal structures remain relatively midline, though the volume of the right hemithorax is notably increased compared to the clear left hemithorax. These findings are clinically significant for diagnosing postoperative hemorrhage, specifically an intercostal artery injury in the context of thoracic surgery.

This dual-panel diagnostic image demonstrates a massive right-sided hemothorax in a post-surgical patient. Panel (a) is a posterior-anterior (PA) chest X-ray showing significant homogeneous opacity in the right lower and mid-lung fields, resulting in the obscuration of the right diaphragmatic contour and costophrenic angle. There is a blunting effect and upward-sloping meniscus characteristic of a large pleural effusion. Panel (b) is an axial contrast-enhanced CT scan of the chest at the level of the pulmonary arteries. It reveals a large, high-density fluid collection (consistent with acute blood) within the right pleural space. This collection causes significant passive atelectasis of the right lung, which is compressed medially against the mediastinum. The mediastinal structures remain relatively midline, though the volume of the right hemithorax is notably increased compared to the clear left hemithorax. These findings are clinically significant for diagnosing postoperative hemorrhage, specifically an intercostal artery injury in the context of thoracic surgery.

This composite diagnostic image features a side-by-side comparison of a supine chest radiograph (a) and a corresponding axial thoracic CT scan (b) from a trauma patient, demonstrating occult hemopneumothorax. The chest X-ray (a) shows subtle increased opacification in the left lower zone but fails to clearly delineate discrete air or fluid collections. In contrast, the axial CT scan (b) provides definitive visualization of injury. It demonstrates a 2.49 cm anterior pneumothorax, visible as a pocket of air separating the lung from the anterior chest wall, and a 1.46 cm lamellar hemothorax, appearing as a hyperdense fluid collection in the dependent posterior pleural space. Annotated measurements on the CT scan quantify the depth of both the air and fluid stripes. This comparison highlights the clinical significance of CT imaging in identifying 'occult' pleural injuries that are not readily apparent on standard radiography in the setting of blunt chest trauma.

This composite diagnostic image features a side-by-side comparison of a supine chest radiograph (a) and a corresponding axial thoracic CT scan (b) from a trauma patient, demonstrating occult hemopneumothorax. The chest X-ray (a) shows subtle increased opacification in the left lower zone but fails to clearly delineate discrete air or fluid collections. In contrast, the axial CT scan (b) provides definitive visualization of injury. It demonstrates a 2.49 cm anterior pneumothorax, visible as a pocket of air separating the lung from the anterior chest wall, and a 1.46 cm lamellar hemothorax, appearing as a hyperdense fluid collection in the dependent posterior pleural space. Annotated measurements on the CT scan quantify the depth of both the air and fluid stripes. This comparison highlights the clinical significance of CT imaging in identifying 'occult' pleural injuries that are not readily apparent on standard radiography in the setting of blunt chest trauma.

This diagnostic image set consists of an axial chest CT scan (A) and a corresponding frontal chest X-ray (B) demonstrating a massive left-sided pleural collection, identified as a hemothorax. In the CT scan (A), the left hemithorax is occupied by a large, homogenous fluid collection that exerts significant mass effect, leading to the complete compression and medial displacement of the left lung parenchyma (indicated by a yellow arrow) towards the mediastinum. The right lung appears well-aerated with normal vascular markings. In the X-ray (B), the left hemithorax exhibits near-complete opacification and volume expansion, resulting in a contralateral mediastinal shift to the right. The right lung remains visible, though partly obscured by the cardiac silhouette shift. This comparison illustrates the radiological presentation of a large-volume pleural effusion/hemothorax across different modalities, emphasizing lung collapse (atelectasis) and mediastinal displacement. Clinical context suggests this occurred as a complication during oncological treatment for synovial sarcoma.

This diagnostic image set consists of an axial chest CT scan (A) and a corresponding frontal chest X-ray (B) demonstrating a massive left-sided pleural collection, identified as a hemothorax. In the CT scan (A), the left hemithorax is occupied by a large, homogenous fluid collection that exerts significant mass effect, leading to the complete compression and medial displacement of the left lung parenchyma (indicated by a yellow arrow) towards the mediastinum. The right lung appears well-aerated with normal vascular markings. In the X-ray (B), the left hemithorax exhibits near-complete opacification and volume expansion, resulting in a contralateral mediastinal shift to the right. The right lung remains visible, though partly obscured by the cardiac silhouette shift. This comparison illustrates the radiological presentation of a large-volume pleural effusion/hemothorax across different modalities, emphasizing lung collapse (atelectasis) and mediastinal displacement. Clinical context suggests this occurred as a complication during oncological treatment for synovial sarcoma.

Reading File
Running Command

mkdir -p /tmp/workspace/hemothorax-ppt && ls /tmp/workspace/hemothorax-ppt/

Writing File

~/hemothorax-ppt/build_pptx.py

import subprocess, json, base64, requests
from io import BytesIO
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

# ─── Color Palette ───
DARK_BLUE   = RGBColor(0x0D, 0x2B, 0x55)   # deep navy
MID_BLUE    = RGBColor(0x16, 0x5A, 0x8E)   # medium blue
ACCENT_TEAL = RGBColor(0x00, 0xA5, 0xAD)   # teal accent
LIGHT_GRAY  = RGBColor(0xF4, 0xF7, 0xFA)   # slide background
WHITE       = RGBColor(0xFF, 0xFF, 0xFF)
DARK_TEXT   = RGBColor(0x1A, 0x1A, 0x2E)
GOLD        = RGBColor(0xE8, 0xA8, 0x00)

# ─── Image URLs ───
IMG_URLS = [
    "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_8c0f26b32ee3a313ede3dd75e267145e4ec29653e8d553d05a53829d5bbd3c44.jpg",
    "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_1616af5d11ef1b569516dd5af8a448bee7288247a7dd779ec25814b7eb58d143.jpg",
    "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_7cfd4e2cedd509661604877772acfd1e7a944a53303c49d87ded5488dbf144f9.jpg",
]

def download_image(url):
    try:
        r = requests.get(url, timeout=15)
        if r.status_code == 200:
            return BytesIO(r.content)
    except Exception as e:
        print(f"Image download failed: {e}")
    return None

# ─── Helper Functions ───
def add_colored_rect(slide, left, top, width, height, color):
    from pptx.util import Inches
    shape = slide.shapes.add_shape(1, left, top, width, height)
    shape.fill.solid()
    shape.fill.fore_color.rgb = color
    shape.line.fill.background()
    return shape

def add_text(slide, text, left, top, width, height,
             font_name="Calibri", font_size=16, bold=False, italic=False,
             color=DARK_TEXT, align=PP_ALIGN.LEFT, word_wrap=True, v_anchor=None):
    tb = slide.shapes.add_textbox(left, top, width, height)
    tf = tb.text_frame
    tf.word_wrap = word_wrap
    if v_anchor:
        tf.vertical_anchor = v_anchor
    tf.margin_left = 0; tf.margin_right = 0
    tf.margin_top = Pt(2); tf.margin_bottom = Pt(2)
    p = tf.paragraphs[0]
    p.alignment = align
    r = p.add_run()
    r.text = text
    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 tf

def add_bullet_slide(prs, title_text, bullets, source_text="", img_stream=None, img_side="right"):
    blank = prs.slide_layouts[6]
    slide = prs.slides.add_slide(blank)
    W = prs.slide_width
    H = prs.slide_height

    # Background
    add_colored_rect(slide, 0, 0, W, H, LIGHT_GRAY)
    # Title bar
    add_colored_rect(slide, 0, 0, W, Inches(1.1), DARK_BLUE)
    # Accent stripe
    add_colored_rect(slide, 0, Inches(1.1), W, Inches(0.06), ACCENT_TEAL)

    # Title text
    add_text(slide, title_text, Inches(0.4), Inches(0.1), Inches(12.5), Inches(0.95),
             font_size=30, bold=True, color=WHITE, v_anchor=MSO_ANCHOR.MIDDLE)

    # Source label
    if source_text:
        add_text(slide, source_text, Inches(0.4), Inches(1.2), Inches(12.5), Inches(0.3),
                 font_size=10, italic=True, color=MID_BLUE)

    # Content area - with or without image
    content_left = Inches(0.4)
    content_width = Inches(12.5) if not img_stream else Inches(7.4)
    y = Inches(1.6)
    line_h = Inches(0.42)

    for bullet in bullets:
        if bullet.startswith("##"):  # subheader
            tb = slide.shapes.add_textbox(content_left, y, content_width, Inches(0.38))
            tf = tb.text_frame; tf.word_wrap = True
            tf.margin_left = 0; tf.margin_right = 0; tf.margin_top = 0; tf.margin_bottom = 0
            p = tf.paragraphs[0]
            r = p.add_run()
            r.text = bullet[2:].strip()
            r.font.name = "Calibri"; r.font.size = Pt(15)
            r.font.bold = True; r.font.color.rgb = MID_BLUE
            y += Inches(0.38)
        elif bullet.strip() == "":
            y += Inches(0.15)
        else:
            # bullet row
            # dot
            dot_tb = slide.shapes.add_textbox(content_left, y, Inches(0.25), line_h)
            dtf = dot_tb.text_frame; dtf.word_wrap = False
            dtf.margin_left = 0; dtf.margin_right = 0; dtf.margin_top = Pt(3); dtf.margin_bottom = 0
            dp = dtf.paragraphs[0]
            dr = dp.add_run(); dr.text = "►"
            dr.font.size = Pt(10); dr.font.color.rgb = ACCENT_TEAL; dr.font.bold = True

            # text
            btb = slide.shapes.add_textbox(content_left + Inches(0.28), y, content_width - Inches(0.28), line_h)
            btf = btb.text_frame; btf.word_wrap = True
            btf.margin_left = 0; btf.margin_right = 0; btf.margin_top = Pt(1); btf.margin_bottom = 0
            bp = btf.paragraphs[0]
            br = bp.add_run()
            parts = bullet.split("**")
            if len(parts) > 1:
                # bold-normal alternation
                for i, part in enumerate(parts):
                    if i == 0:
                        br.text = part
                        br.font.name = "Calibri"; br.font.size = Pt(14)
                        br.font.bold = False; br.font.color.rgb = DARK_TEXT
                    else:
                        nr = bp.add_run()
                        nr.text = part
                        nr.font.name = "Calibri"; nr.font.size = Pt(14)
                        nr.font.bold = (i % 2 == 1)
                        nr.font.color.rgb = DARK_BLUE if (i % 2 == 1) else DARK_TEXT
            else:
                br.text = bullet
                br.font.name = "Calibri"; br.font.size = Pt(14)
                br.font.bold = False; br.font.color.rgb = DARK_TEXT
            y += line_h

    # Image
    if img_stream:
        img_left = Inches(8.1)
        img_top  = Inches(1.55)
        img_w    = Inches(4.9)
        img_h    = Inches(5.5)
        try:
            slide.shapes.add_picture(img_stream, img_left, img_top, img_w, img_h)
        except Exception as e:
            print(f"Image embed failed: {e}")

    # Footer
    add_colored_rect(slide, 0, H - Inches(0.32), W, Inches(0.32), DARK_BLUE)
    add_text(slide, "Hemothorax | Surgical Perspective", Inches(0.4), H - Inches(0.32),
             Inches(8), Inches(0.3), font_size=9, color=WHITE)
    add_text(slide, "Bailey & Love's | Murray & Nadel's", W - Inches(4.5), H - Inches(0.32),
             Inches(4.3), Inches(0.3), font_size=9, color=RGBColor(0xAA, 0xCC, 0xFF),
             align=PP_ALIGN.RIGHT)

    return slide


# ─── TITLE SLIDE ───
def make_title_slide(prs):
    blank = prs.slide_layouts[6]
    slide = prs.slides.add_slide(blank)
    W = prs.slide_width; H = prs.slide_height

    # Full dark background
    add_colored_rect(slide, 0, 0, W, H, DARK_BLUE)
    # Bottom accent band
    add_colored_rect(slide, 0, H - Inches(1.8), W, Inches(0.08), ACCENT_TEAL)
    # Left side vertical accent
    add_colored_rect(slide, 0, 0, Inches(0.12), H, ACCENT_TEAL)

    # Main title
    tb = slide.shapes.add_textbox(Inches(0.5), Inches(1.6), Inches(12.5), Inches(2.2))
    tf = tb.text_frame; tf.word_wrap = True
    tf.margin_left = 0; tf.margin_right = 0; tf.margin_top = 0; tf.margin_bottom = 0
    p = tf.paragraphs[0]; p.alignment = PP_ALIGN.CENTER
    r = p.add_run(); r.text = "HEMOTHORAX"
    r.font.name = "Calibri"; r.font.size = Pt(56)
    r.font.bold = True; r.font.color.rgb = WHITE

    # Subtitle
    tb2 = slide.shapes.add_textbox(Inches(0.5), Inches(3.7), Inches(12.5), Inches(0.7))
    tf2 = tb2.text_frame; tf2.word_wrap = True
    tf2.margin_left = 0; tf2.margin_right = 0; tf2.margin_top = 0; tf2.margin_bottom = 0
    p2 = tf2.paragraphs[0]; p2.alignment = PP_ALIGN.CENTER
    r2 = p2.add_run(); r2.text = "Definition · Etiology · Diagnosis · Management · Complications"
    r2.font.name = "Calibri"; r2.font.size = Pt(20)
    r2.font.color.rgb = ACCENT_TEAL

    # Source line
    tb3 = slide.shapes.add_textbox(Inches(0.5), Inches(4.7), Inches(12.5), Inches(0.5))
    tf3 = tb3.text_frame; tf3.word_wrap = True
    tf3.margin_left = 0; tf3.margin_right = 0; tf3.margin_top = 0; tf3.margin_bottom = 0
    p3 = tf3.paragraphs[0]; p3.alignment = PP_ALIGN.CENTER
    r3 = p3.add_run()
    r3.text = "Based on: Bailey & Love's Short Practice of Surgery (28th Ed.)  |  Murray & Nadel's Textbook of Respiratory Medicine"
    r3.font.name = "Calibri"; r3.font.size = Pt(13)
    r3.font.italic = True; r3.font.color.rgb = RGBColor(0xAA, 0xCC, 0xFF)

    # Note about SRB
    tb4 = slide.shapes.add_textbox(Inches(0.5), Inches(5.5), Inches(12.5), Inches(0.4))
    tf4 = tb4.text_frame; tf4.word_wrap = True
    tf4.margin_left = 0; tf4.margin_right = 0; tf4.margin_top = 0; tf4.margin_bottom = 0
    p4 = tf4.paragraphs[0]; p4.alignment = PP_ALIGN.CENTER
    r4 = p4.add_run()
    r4.text = "Note: SRB's Textbook of Surgery is not in the available library; content is sourced from Bailey & Love's and Murray & Nadel's"
    r4.font.name = "Calibri"; r4.font.size = Pt(11)
    r4.font.italic = True; r4.font.color.rgb = GOLD

    # Footer bar
    add_colored_rect(slide, 0, H - Inches(0.32), W, Inches(0.32), MID_BLUE)


# ─── SECTION DIVIDER SLIDE ───
def make_section_slide(prs, section_title, subtitle=""):
    blank = prs.slide_layouts[6]
    slide = prs.slides.add_slide(blank)
    W = prs.slide_width; H = prs.slide_height

    add_colored_rect(slide, 0, 0, W, H, MID_BLUE)
    add_colored_rect(slide, 0, H//2 - Inches(0.05), W, Inches(0.08), ACCENT_TEAL)

    tb = slide.shapes.add_textbox(Inches(1), Inches(2.2), Inches(11), Inches(1.5))
    tf = tb.text_frame; tf.word_wrap = True
    tf.margin_left = 0; tf.margin_right = 0; tf.margin_top = 0; tf.margin_bottom = 0
    p = tf.paragraphs[0]; p.alignment = PP_ALIGN.CENTER
    r = p.add_run(); r.text = section_title
    r.font.name = "Calibri"; r.font.size = Pt(42)
    r.font.bold = True; r.font.color.rgb = WHITE

    if subtitle:
        tb2 = slide.shapes.add_textbox(Inches(1), Inches(3.8), Inches(11), Inches(0.6))
        tf2 = tb2.text_frame; tf2.word_wrap = True
        tf2.margin_left = 0; tf2.margin_right = 0
        p2 = tf2.paragraphs[0]; p2.alignment = PP_ALIGN.CENTER
        r2 = p2.add_run(); r2.text = subtitle
        r2.font.name = "Calibri"; r2.font.size = Pt(18)
        r2.font.italic = True; r2.font.color.rgb = RGBColor(0xCC, 0xEA, 0xFF)

    add_colored_rect(slide, 0, H - Inches(0.32), W, Inches(0.32), DARK_BLUE)


# ─── BUILD PRESENTATION ───
prs = Presentation()
prs.slide_width  = Inches(13.333)
prs.slide_height = Inches(7.5)

# Download images
print("Downloading images...")
imgs = [download_image(u) for u in IMG_URLS]
print(f"Downloaded {sum(1 for i in imgs if i)} / {len(imgs)} images")

# 1. TITLE
make_title_slide(prs)

# 2. DEFINITION & OVERVIEW
add_bullet_slide(prs,
    "Definition & Overview",
    [
        "**Hemothorax** is the accumulation of blood within the pleural space",
        "Diagnosed when pleural fluid hematocrit is **>50% of peripheral blood hematocrit**",
        "Due to significant color change with even small amounts of blood — fluid analysis is essential to confirm",
        "Etiology is broadly classified as: **Traumatic, Nontraumatic,** and **Iatrogenic**",
        "Nearly **300,000 cases** of traumatic hemothorax occur in the United States each year",
        "Can lead to significant hemodynamic instability due to hypovolemia",
    ],
    source_text="Source: Murray & Nadel's Textbook of Respiratory Medicine; Bailey & Love's Short Practice of Surgery 28th Ed."
)

# 3. ETIOLOGY - Traumatic
make_section_slide(prs, "ETIOLOGY", "Traumatic | Nontraumatic | Iatrogenic")

add_bullet_slide(prs,
    "Etiology: Traumatic Hemothorax",
    [
        "**Most common cause** of hemothorax overall",
        "**Blunt trauma:** torn intercostal vessels, lung, diaphragm, great vessels, or mediastinal structures",
        "Common mechanisms: motor vehicle collisions, falls",
        "**Penetrating trauma:** gunshot or stab wounds — often clinically significant",
        "**Rib fractures** strongly associated — >5 rib fractures → **≥48% likelihood** of concomitant hemothorax",
        "In blunt trauma series: **2.4%** had hemothorax; in penetrating trauma: **83%** had concomitant pneumothorax",
        "**Bailey & Love's:** In blunt injury — torn intercostal vessels or internal mammary artery from rib fractures",
        "In penetrating injury — thoracic and abdominal viscera (blood through diaphragm into negative-pressure thorax)",
    ],
    source_text="Sources: Murray & Nadel's; Bailey & Love's 28th Ed.",
    img_stream=imgs[0]
)

add_bullet_slide(prs,
    "Etiology: Nontraumatic & Iatrogenic",
    [
        "## Nontraumatic (Spontaneous)",
        "Spontaneous pneumothorax — **most common** cause of nontraumatic hemothorax",
        "Hemothorax develops in **2–7%** of spontaneous pneumothorax cases",
        "Mechanism: torn adhesions between visceral and parietal pleura or rupture of vascularised bullae",
        "**Vascular pathology:** aortic dissection (usually left-sided), pulmonary AVM (hereditary haemorrhagic telangiectasia)",
        "**Neoplasms:** schwannoma, soft tissue tumors, pleural metastases (rare)",
        "**Endometriosis:** thoracic endometriosis syndrome — 14% of cases; typically **right-sided** in young women",
        "",
        "## Iatrogenic",
        "Thoracentesis (overall risk ~0.01%), pleural/lung biopsies, vascular catheterization",
        "Anticoagulation therapy, cardiopulmonary resuscitation, post-thoracic surgery",
    ],
    source_text="Source: Murray & Nadel's Textbook of Respiratory Medicine"
)

# 4. DIAGNOSIS
make_section_slide(prs, "DIAGNOSIS", "Clinical Features · Imaging · Investigations")

add_bullet_slide(prs,
    "Clinical Features & Diagnosis",
    [
        "## Clinical Suspicion",
        "Any patient with **chest trauma** (penetrating or blunt), recent invasive thoracic procedure, or **unexplained pleural effusion in a hypotensive patient**",
        "## Physical Examination",
        "Asymmetric chest expansion",
        "Diminished or absent breath sounds (unilateral)",
        "**Dullness to percussion** (differs from pneumothorax — which is hyperresonant)",
        "**Haemorrhagic shock:** hypotension, tachycardia, flat neck veins — Bailey & Love's",
        "Sensitivity of exam findings increases with size of effusion",
        "## Investigations",
        "Pleural fluid hematocrit **>50%** of peripheral hematocrit confirms diagnosis",
        "Empyema ruled out by pH, glucose, LDH, culture",
    ],
    source_text="Sources: Murray & Nadel's; Bailey & Love's 28th Ed."
)

add_bullet_slide(prs,
    "Imaging in Hemothorax",
    [
        "## Chest Radiograph (CXR)",
        "Initial imaging modality of choice",
        "Lateral decubitus CXR — most sensitive plain film; detects as little as **10 mL**",
        "AP upright film: requires ~**200 mL** for costophrenic angle blunting",
        "Supine film may only show uniform haziness — can miss large volumes",
        "Hemidiaphragm obscured at **500–650 mL**; mediastinal shift away from effusion",
        "## CT Scan",
        "**Gold standard** for detection and quantification of hemothorax",
        "Detects occult hemothorax not visible on plain film",
        "Identifies associated injuries (rib fractures, pulmonary contusion, pneumothorax)",
        "## Ultrasound (FAST/eFAST)",
        "Rapid bedside evaluation — identifies pleural fluid superior to diaphragm",
        "Used in initial trauma assessment alongside CXR — Bailey & Love's recommends **eFAST**",
    ],
    source_text="Sources: Murray & Nadel's; Bailey & Love's 28th Ed.",
    img_stream=imgs[2]
)

# 5. MANAGEMENT
make_section_slide(prs, "MANAGEMENT", "Drainage · Surgery · Indications")

add_bullet_slide(prs,
    "Management: Principles & Chest Drainage",
    [
        "**First-line treatment:** Pleural drainage — tube thoracostomy",
        "EAST guidelines: drain all hemothoraces irrespective of presumed volume",
        "Updated EAST 2020: clinical judgment may be applied for **small hemothoraces (<300 mL)**",
        "**'Stein line':** meniscus on upright CXR — 200–300 mL; patients below this may be expectantly managed",
        "## Tube Thoracostomy (Intercostal Drain)",
        "Classic recommendation: **large-bore (32–40 French)** tube",
        "Recent evidence: **14-French pigtail catheters** non-inferior to large-bore tubes for drainage",
        "Optimal position: 'Triangle of Safety' with suction — equivalent drainage regardless of location",
        "## Bailey & Love's Key Points",
        "Initial treatment: correct hypovolaemic shock + insert intercostal drain + intubation if needed",
        "Blood should be removed **as completely and rapidly as possible**",
        "**No role for clamping** a chest tube to tamponade massive haemothorax",
    ],
    source_text="Sources: Murray & Nadel's; Bailey & Love's 28th Ed.",
    img_stream=imgs[1]
)

add_bullet_slide(prs,
    "Massive Haemothorax: Bailey & Love's",
    [
        "Defined as: **>1500 mL initial drainage** or **ongoing haemorrhage >200 mL/hour over 3–4 hours**",
        "## Presentation",
        "Haemorrhagic shock (hypotension, tachycardia)",
        "Flat neck veins (distinguishes from cardiac tamponade)",
        "Unilateral absence of breath sounds + dullness to percussion",
        "Compromises respiratory effort by compressing the lung",
        "## Initial Management",
        "Correct hypovolaemic shock (IV access, blood products, fluids)",
        "Insert intercostal drain (chest tube)",
        "Intubation as required",
        "## Indications for Urgent Thoracotomy",
        "Initial drainage **>1500 mL**",
        "Ongoing haemorrhage **>200 mL/h for 3–4 hours**",
        "Haemodynamic instability not responding to resuscitation",
    ],
    source_text="Source: Bailey & Love's Short Practice of Surgery, 28th Edition — Chapter: Thoracic Trauma"
)

add_bullet_slide(prs,
    "Surgical Intervention",
    [
        "## Video-Assisted Thoracoscopic Surgery (VATS)",
        "Appropriate for **haemodynamically stable** patients",
        "Used for: retained haemothorax, clot evacuation, pleurodesis",
        "## Open Thoracotomy",
        "Preferred in **haemodynamically unstable** patients",
        "Position: **lateral decubitus**",
        "Approach: **posterolateral** through 4th or 5th interspace",
        "Interspace/incision type adapted based on clot location",
        "## Transcatheter Arterial Embolization",
        "For intercostal artery hemorrhage in **poor surgical candidates**",
        "~90% still require surgical intervention following embolization",
        "Increased failure risk with: severe anaemia, chronic liver failure, embolization of ≥2 arteries",
        "## Bailey & Love's: Monitoring",
        "Chest radiograph or eFAST to identify blood",
        "If lung does not reinflate: place drain on low-pressure suction (5 cmH₂O)",
        "Physiotherapy and active mobilisation as soon as possible",
    ],
    source_text="Sources: Murray & Nadel's; Bailey & Love's 28th Ed."
)

# 6. COMPLICATIONS
make_section_slide(prs, "COMPLICATIONS", "Retained Haemothorax · Empyema · Fibrothorax")

add_bullet_slide(prs,
    "Complications of Hemothorax",
    [
        "## Retained Haemothorax",
        "Occurs in **~30%** of patients despite chest tube placement",
        "Defined as haemothorax that persists despite attempted drainage",
        "Increases risk of empyema, trapped lung, and need for surgery",
        "## Empyema",
        "Incidence up to **26%** in retained haemothorax (prospective multicenter study, n=328)",
        "Risk factors: haemothorax volume >300 mL, bilateral chest tubes, pulmonary contusion, rib fractures, prolonged ICU stay",
        "Management: appropriate drainage; decortication if required",
        "## Pneumonia",
        "Documented in **20%** of patients with retained haemothorax",
        "Risk factors: age >55, blunt trauma, concomitant pneumothorax, no empiric antibiotics at tube insertion",
        "## Fibrothorax / Trapped Lung",
        "Historically feared complication of delayed management",
        "Current evidence: retained haemothorax **NOT** an independent risk factor for fibrothorax",
        "Fibrothorax more likely due to **poor or delayed empyema management**",
        "Bailey & Love's: removal of blood prevents ongoing bleeding, empyema, and fibrothorax",
    ],
    source_text="Sources: Murray & Nadel's; Bailey & Love's 28th Ed."
)

# 7. SUMMARY SLIDE
add_bullet_slide(prs,
    "Summary",
    [
        "**Definition:** Blood in pleural space; hematocrit >50% of peripheral blood",
        "**Most common cause:** Trauma (blunt > penetrating); 300,000 cases/year in USA",
        "**Nontraumatic causes:** Spontaneous pneumothorax, vascular pathology, neoplasm, endometriosis",
        "**Diagnosis:** Clinical features + CXR (initial) + CT scan (gold standard) + eFAST (bedside)",
        "**First-line treatment:** Tube thoracostomy / intercostal drain",
        "**Massive haemothorax:** >1500 mL drainage or >200 mL/h x 3–4 hrs → urgent thoracotomy",
        "**Complications:** Retained haemothorax, empyema (26%), pneumonia (20%), fibrothorax",
        "**Surgery:** VATS (stable) or open thoracotomy (unstable) via posterolateral approach",
        "**Key Bailey & Love's point:** No role for clamping chest tube; remove blood completely and rapidly",
    ],
    source_text="Sources: Bailey & Love's Short Practice of Surgery (28th Ed.) | Murray & Nadel's Textbook of Respiratory Medicine"
)

# ─── SAVE ───
out_path = "/tmp/workspace/hemothorax-ppt/Hemothorax_Presentation.pptx"
prs.save(out_path)
print(f"\nSaved: {out_path}")
print(f"Total slides: {len(prs.slides)}")
Running Command

cd /tmp/workspace/hemothorax-ppt && python build_pptx.py

Your presentation is ready for download:

Hemothorax Presentation

Presentation · PPTX


What's Inside (15 slides)

Slide(s)Content
1Title slide with source attribution
2Definition & Overview
3Section divider: Etiology
4Etiology - Traumatic (with CXR/CT image)
5Etiology - Nontraumatic & Iatrogenic
6Section divider: Diagnosis
7Clinical Features & Diagnosis
8Imaging (CXR, CT, eFAST) with occult hemothorax comparison image
9Section divider: Management
10Management Principles & Chest Drainage (with massive hemothorax image)
11Massive Haemothorax - Bailey & Love's (definitions, presentation, thoracotomy indications)
12Surgical Intervention (VATS vs thoracotomy, embolization)
13Section divider: Complications
14Complications (retained hemothorax, empyema, pneumonia, fibrothorax)
15Summary slide

Important note on SRB: SRB's Manual of Surgery is not in the available textbook library, so the content is drawn from Bailey & Love's Short Practice of Surgery (28th Ed.) and Murray & Nadel's Textbook of Respiratory Medicine - both authoritative surgical/respiratory references that cover hemothorax in excellent depth. The presentation clearly attributes all content to these sources. If you can share an SRB PDF, I can incorporate that content as well.
This is a shared conversation. Sign in to Orris to start your own chat.