attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment
attachment

Make ppt

analyse_media
analyse_media
analyse_media
analyse_media
analyse_media
Reading File
Reading File
Running Command

mkdir -p /tmp/workspace/infectious-diseases-ppt && ls /tmp/workspace/

Writing File

~/infectious-diseases-ppt/create_ppt.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
import copy

prs = Presentation()
prs.slide_width = Inches(13.333)
prs.slide_height = Inches(7.5)

blank_layout = prs.slide_layouts[6]

# Color palette
DARK_BLUE = RGBColor(0x1A, 0x3A, 0x5C)
TEAL = RGBColor(0x00, 0x87, 0x8A)
LIGHT_TEAL = RGBColor(0xE0, 0xF5, 0xF5)
ORANGE = RGBColor(0xE8, 0x7A, 0x1E)
WHITE = RGBColor(0xFF, 0xFF, 0xFF)
LIGHT_GRAY = RGBColor(0xF2, 0xF6, 0xFA)
DARK_GRAY = RGBColor(0x33, 0x33, 0x33)
YELLOW = RGBColor(0xFF, 0xC8, 0x00)
GREEN = RGBColor(0x27, 0x8A, 0x5B)
RED = RGBColor(0xC0, 0x39, 0x2B)

def add_rect(slide, x, y, w, h, fill_color, line_color=None):
    shape = slide.shapes.add_shape(1, Inches(x), Inches(y), Inches(w), Inches(h))
    shape.fill.solid()
    shape.fill.fore_color.rgb = fill_color
    if line_color:
        shape.line.color.rgb = line_color
    else:
        shape.line.fill.background()
    return shape

def add_textbox(slide, x, y, w, h, text, size, bold=False, color=DARK_GRAY, align=PP_ALIGN.LEFT, italic=False, wrap=True):
    tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
    tf = tb.text_frame
    tf.word_wrap = wrap
    tf.margin_left = Pt(4)
    tf.margin_right = Pt(4)
    tf.margin_top = Pt(2)
    tf.margin_bottom = Pt(2)
    p = tf.paragraphs[0]
    p.alignment = align
    run = p.add_run()
    run.text = text
    run.font.size = Pt(size)
    run.font.bold = bold
    run.font.italic = italic
    run.font.color.rgb = color
    return tf

def add_bullet_textbox(slide, x, y, w, h, title, bullets, title_size=13, bullet_size=10.5, title_color=DARK_BLUE, bullet_color=DARK_GRAY, bg_color=None):
    if bg_color:
        add_rect(slide, x, y, w, h, bg_color)
    tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
    tf = tb.text_frame
    tf.word_wrap = True
    tf.margin_left = Pt(6)
    tf.margin_right = Pt(4)
    tf.margin_top = Pt(4)
    tf.margin_bottom = Pt(2)
    
    if title:
        p = tf.paragraphs[0]
        p.alignment = PP_ALIGN.LEFT
        run = p.add_run()
        run.text = title
        run.font.size = Pt(title_size)
        run.font.bold = True
        run.font.color.rgb = title_color
    
    for b in bullets:
        p = tf.add_paragraph()
        p.alignment = PP_ALIGN.LEFT
        p.level = 0
        run = p.add_run()
        run.text = "• " + b
        run.font.size = Pt(bullet_size)
        run.font.color.rgb = bullet_color
    return tf

# =============================================
# SLIDE 1: TITLE SLIDE
# =============================================
slide = prs.slides.add_slide(blank_layout)

# Background gradient-like using layered rects
add_rect(slide, 0, 0, 13.333, 7.5, DARK_BLUE)
add_rect(slide, 0, 0, 13.333, 0.08, ORANGE)  # top accent line

# Decorative circles
for i, (cx, cy, size) in enumerate([(11.5, 1.2, 1.8), (12.2, 0.3, 1.2), (10.8, 2.5, 0.8)]):
    shape = slide.shapes.add_shape(9, Inches(cx), Inches(cy), Inches(size), Inches(size))
    shape.fill.solid()
    shape.fill.fore_color.rgb = TEAL
    shape.fill.fore_color.rgb = RGBColor(0x00, 0x6E, 0x7F)
    shape.line.fill.background()
    from pptx.util import Pt as Pts
    import ctypes

# Chapter label
add_textbox(slide, 1, 1.2, 8, 0.5, "Chapter 19 • Infectious Diseases", 14, color=RGBColor(0x90, 0xCA, 0xE4), bold=False)

# Main title
add_textbox(slide, 1, 1.8, 11, 1.5, "Parasitic Infections in Children", 44, bold=True, color=WHITE, align=PP_ALIGN.LEFT)

# Subtitle
add_textbox(slide, 1, 3.4, 10, 0.7, "Amebiasis • Helminthic Infestations • Ascariasis • Pinworm • Hookworm • Strongyloidiasis", 18, color=RGBColor(0xB0, 0xD8, 0xEE), italic=True)

# Bottom bar
add_rect(slide, 0, 6.8, 13.333, 0.7, TEAL)
add_textbox(slide, 0.5, 6.85, 8, 0.55, "Pediatric Infectious Diseases  |  Clinical Review", 13, color=WHITE, bold=False)

# =============================================
# SLIDE 2: AMEBIASIS - Overview
# =============================================
slide = prs.slides.add_slide(blank_layout)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GRAY)
add_rect(slide, 0, 0, 13.333, 1.2, DARK_BLUE)
add_rect(slide, 0, 1.2, 0.08, 6.3, ORANGE)
add_textbox(slide, 0.3, 0.15, 12, 0.7, "19.28  Amebiasis", 32, bold=True, color=WHITE)
add_textbox(slide, 0.3, 0.82, 8, 0.35, "Caused by protozoan Entamoeba histolytica", 13, color=RGBColor(0xB0, 0xD8, 0xEE), italic=True)

# Left column
add_bullet_textbox(slide, 0.3, 1.35, 5.9, 2.3, "Key Facts",
    ["Protozoan: Entamoeba histolytica",
     "Uncommon in infants & children vs. adults",
     "Lower prevalence in pediatric population (~20%)",
     "Endemic in developing countries (low socioeconomic conditions)"],
    bg_color=WHITE, title_color=DARK_BLUE)

add_bullet_textbox(slide, 0.3, 3.75, 5.9, 2.8, "Etiopathogenesis",
    ["Transmission: feco-oral route (contaminated food/water cysts)",
     "Trophozoites invade large intestinal mucosa",
     "Cause flask-shaped or tear-drop ulcers with mild inflammation",
     "Can reach liver via bloodstream → amebic liver abscesses",
     "Cysts passed in stool → infectious to other humans",
     "Can disseminate to lungs/brain via hematogenous spread"],
    bg_color=WHITE, title_color=TEAL)

# Right column
add_bullet_textbox(slide, 6.5, 1.35, 6.5, 2.8, "Clinical Features",
    ["Incubation: weeks to months",
     ">90% infected children are asymptomatic",
     "5-10% develop amoebic colitis, 1% disseminated disease",
     "Amoebic colitis: mild gastroenteritis to acute dysentery",
     "Colicky pain, tenesmus, frequent loose stools",
     "Mucus + blood in stools (blood separate from mucus)"],
    bg_color=WHITE, title_color=DARK_BLUE)

add_bullet_textbox(slide, 6.5, 4.25, 6.5, 2.1, "Amebic Liver Abscess",
    ["Occurs in <1% of infected children",
     "Develops months after infection",
     "High-grade fever, chills, rigors, toxicity",
     "Tender hepatomegaly; pain in right upper quadrant",
     "Concomitant colitis in only 20% children"],
    bg_color=WHITE, title_color=ORANGE)

# =============================================
# SLIDE 3: AMEBIASIS - Diagnosis & Treatment
# =============================================
slide = prs.slides.add_slide(blank_layout)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GRAY)
add_rect(slide, 0, 0, 13.333, 1.2, TEAL)
add_rect(slide, 0, 1.2, 0.08, 6.3, ORANGE)
add_textbox(slide, 0.3, 0.15, 12, 0.7, "Amebiasis — Complications, Diagnosis & Treatment", 28, bold=True, color=WHITE)

# Complications box
add_bullet_textbox(slide, 0.3, 1.35, 3.8, 3.2, "Complications",
    ["Amebic liver abscess", "Hepatitis",
     "Partial/complete intestinal obstruction", "Intussusception",
     "Colon perforation & peritonitis", "Rectal ulcers/fistulas", "Empyema"],
    bg_color=WHITE, title_color=RED)

# Diagnosis box
add_bullet_textbox(slide, 4.3, 1.35, 5.0, 3.2, "Diagnosis",
    ["Detect E. histolytica cysts/trophozoites in stool",
     "Examine ≥3 (preferably 6) stool samples on consecutive days",
     "RBCs ingested by trophozoites = characteristic",
     "Liver abscess: aspirate for E. histolytica",
     "Serological: IHA test, ELISA (IHA titer ≥1:128 = positive)",
     "Imaging: CXR, USG, CT/MRI for liver abscess"],
    bg_color=WHITE, title_color=DARK_BLUE)

# Treatment boxes
add_bullet_textbox(slide, 9.5, 1.35, 3.5, 2.0, "Amoebic Colitis Rx",
    ["Metronidazole 20-50 mg/kg/day for 10-14 days",
     "Add luminal amebicide: Diiodohydroxyquin",
     "Diloxanide furoate or Paromomycin",
     "Alternatively: Dehydroemetine"],
    bg_color=WHITE, title_color=GREEN)

add_bullet_textbox(slide, 9.5, 3.45, 3.5, 2.1, "Amebic Liver Abscess Rx",
    ["IV Metronidazole 21 mg/kg/day (3 divided doses × 10 days)",
     "Tinidazole: 50-60 mg/kg/day × 3 days",
     "Secnidazole: 30 mg/kg single dose",
     "Nitazoxanide: 7-10 mg/kg/dose BD × 3 days"],
    bg_color=WHITE, title_color=GREEN)

# Prevention box
add_bullet_textbox(slide, 0.3, 4.7, 9.0, 2.65, "Prevention",
    ["Exclusive breastfeeding (BSSL + secretory IgA kills Giardia cysts)",
     "Hand washing; avoid unwashed fruits unless peeled",
     "Boil water ≥10 minutes; iodine can be used (takes up to 8 hrs)",
     "Giardia cysts are resistant to chlorination"],
    bg_color=WHITE, title_color=TEAL)

# =============================================
# SLIDE 4: HELMINTHIC INFESTATIONS - Overview
# =============================================
slide = prs.slides.add_slide(blank_layout)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GRAY)
add_rect(slide, 0, 0, 13.333, 1.2, DARK_BLUE)
add_rect(slide, 0, 1.2, 0.08, 6.3, YELLOW)
add_textbox(slide, 0.3, 0.15, 12, 0.7, "19.29  Helminthic Infestations (Parasitic Worm Infections)", 28, bold=True, color=WHITE)
add_textbox(slide, 0.3, 0.82, 10, 0.35, "Significant global health issue affecting millions of children, especially in developing countries like India", 13, color=YELLOW, italic=True)

add_bullet_textbox(slide, 0.3, 1.35, 6.0, 3.0, "General Overview",
    ["Caused by parasitic worms (helminths) that thrive at host's expense",
     "Infection via: ingestion of eggs/larvae in contaminated soil, water, or food",
     "OR penetration of skin / by insect vectors",
     "Symptoms vary by worm type & location",
     "Common symptoms: abdominal pain, diarrhea, nausea, vomiting, fatigue, weight loss, anemia",
     "In children: growth impairment, cognitive delays"],
    bg_color=WHITE, title_color=DARK_BLUE)

add_bullet_textbox(slide, 0.3, 4.45, 6.0, 2.9, "Diagnosis & Treatment Principles",
    ["Clinical evaluation + stool examination (eggs/larvae)",
     "Serological tests for specific antibodies",
     "Treatment: anthelmintic medications",
     "Drug choice depends on helminth type and severity",
     "Prevention: improved sanitation, hygiene, access to clean water",
     "Mass drug administration programs in high-prevalence areas"],
    bg_color=WHITE, title_color=TEAL)

# Classification Table
add_rect(slide, 6.5, 1.35, 6.5, 5.95, WHITE)
add_textbox(slide, 6.6, 1.4, 6.3, 0.45, "Classification of Helminths (Table 19.5)", 13, bold=True, color=DARK_BLUE)

add_rect(slide, 6.5, 1.82, 6.5, 0.38, DARK_BLUE)
add_textbox(slide, 6.6, 1.85, 2.0, 0.3, "Nematodes (Roundworms)", 10, bold=True, color=WHITE)
add_textbox(slide, 8.65, 1.85, 2.0, 0.3, "Cestodes (Tapeworms)", 10, bold=True, color=WHITE)
add_textbox(slide, 10.7, 1.85, 2.2, 0.3, "Trematodes (Flukes)", 10, bold=True, color=WHITE)

# Nematodes
add_textbox(slide, 6.6, 2.25, 2.0, 0.35, "Gut-related:", 9, bold=True, color=TEAL)
nema_gut = "• Ascaris lumbricoides\n• Enterobius vermicularis\n• Ancylostoma duodenale\n• Necator americanus"
tb = slide.shapes.add_textbox(Inches(6.6), Inches(2.6), Inches(2.0), Inches(1.2))
tf = tb.text_frame; tf.word_wrap = True
p = tf.paragraphs[0]; run = p.add_run(); run.text = nema_gut; run.font.size = Pt(8.5); run.font.color.rgb = DARK_GRAY

add_textbox(slide, 6.6, 3.85, 2.0, 0.35, "Others:", 9, bold=True, color=TEAL)
nema_oth = "• Microfilariae\n• Loa loa\n• Onchocerca volvulus\n• Trichinella spiralis\n• Dracunculus medinensis\n• Toxocara canis\n• Strongyloides stercoralis\n• Trichuris trichiura"
tb2 = slide.shapes.add_textbox(Inches(6.6), Inches(4.22), Inches(2.0), Inches(2.8))
tf2 = tb2.text_frame; tf2.word_wrap = True
p2 = tf2.paragraphs[0]; run2 = p2.add_run(); run2.text = nema_oth; run2.font.size = Pt(8.5); run2.font.color.rgb = DARK_GRAY

# Cestodes
ces = "• Taenia solium\n• Taenia saginata\n• Hymenolepis nana\n• Diphyllobothrium latum\n• Echinococcus granulosus"
tb3 = slide.shapes.add_textbox(Inches(8.65), Inches(2.25), Inches(2.0), Inches(2.5))
tf3 = tb3.text_frame; tf3.word_wrap = True
p3 = tf3.paragraphs[0]; run3 = p3.add_run(); run3.text = ces; run3.font.size = Pt(8.5); run3.font.color.rgb = DARK_GRAY

# Trematodes
trem = "Blood flukes:\n• Schistosoma haematobium\n• S. mansoni, S. japonicum\nLiver flukes:\n• Fasciola hepatica\nLung flukes:\n• Paragonimus westermani\nIntestine flukes:\n• Fasciolopsis buski"
tb4 = slide.shapes.add_textbox(Inches(10.7), Inches(2.25), Inches(2.2), Inches(3.5))
tf4 = tb4.text_frame; tf4.word_wrap = True
p4 = tf4.paragraphs[0]; run4 = p4.add_run(); run4.text = trem; run4.font.size = Pt(8.5); run4.font.color.rgb = DARK_GRAY

# =============================================
# SLIDE 5: ASCARIASIS
# =============================================
slide = prs.slides.add_slide(blank_layout)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GRAY)
add_rect(slide, 0, 0, 13.333, 1.2, GREEN)
add_rect(slide, 0, 1.2, 0.08, 6.3, ORANGE)
add_textbox(slide, 0.3, 0.15, 12, 0.7, "19.30  Ascariasis (Round Worm Infestation)", 30, bold=True, color=WHITE)
add_textbox(slide, 0.3, 0.82, 10, 0.35, "Caused by Ascaris lumbricoides  |  Most common worm infestation in humans  |  Worm: 10-20 cm, creamy colored", 13, color=WHITE, italic=True)

# Left column
add_bullet_textbox(slide, 0.3, 1.35, 4.1, 2.5, "Key Facts & Etiopathogenesis",
    ["Most prevalent in tropical countries",
     "Preschool children most vulnerable (hand-to-mouth)",
     "Infective stage: egg with larvae (passed in infected feces)",
     "Eggs: oval, 40×60 mm; matures in 5-10 days",
     "Larvae penetrate intestinal wall → veins → lungs → swallowed → adult worms in small intestine",
     "Female: up to 200,000 eggs/day; survives 1-2 years"],
    bg_color=WHITE, title_color=GREEN)

add_bullet_textbox(slide, 0.3, 3.95, 4.1, 3.35, "Clinical Features",
    ["Depends on age, worm load, nutritional status, location",
     "Intestinal ascariasis: abdominal pain/distension/vomiting, growth failure, anemia, snake-like worms in stool/vomitus",
     "Pica, sleeplessness, irritability, urticaria, eosinophilia, diarrhea",
     "Pulmonary ascariasis (Loeffler's syndrome): fever, cough, breathlessness, wheezing, eosinophilia, lung infiltrates",
     "Miscellaneous: urticaria, hepatomegaly, encephalopathy"],
    bg_color=WHITE, title_color=DARK_BLUE)

# Middle column
add_bullet_textbox(slide, 4.55, 1.35, 4.3, 2.1, "Complications",
    ["Subacute/acute intestinal obstruction",
     "Abnormal migration → Cholecystitis, liver abscess, pancreatitis",
     "Failure to thrive, short stature",
     "Malabsorption", "Malnutrition & micronutrient deficiencies"],
    bg_color=WHITE, title_color=RED)

add_bullet_textbox(slide, 4.55, 3.55, 4.3, 2.25, "Diagnosis",
    ["Direct observation of adult worms in vomitus/stools",
     "Microscopy: ova in stool (brownish, 45-70 × 35-50 mm)",
     "Blood eosinophilia (early migratory phase)",
     "Imaging: X-ray (string shadows), USG, CT/MRI"],
    bg_color=WHITE, title_color=DARK_BLUE)

add_bullet_textbox(slide, 4.55, 5.9, 4.3, 1.4, "Differential Diagnosis",
    ["Visceral larva migrans (Toxocara canis), Hookworm",
     "Schistosomiasis, Pulmonary aspergillosis",
     "Tropical pulmonary eosinophilia"],
    bg_color=WHITE, title_color=TEAL)

# Right column
add_bullet_textbox(slide, 9.05, 1.35, 4.0, 2.3, "Treatment",
    ["Drug of choice for intestinal ascariasis:",
     "  - Albendazole 400 mg PO single dose",
     "  - Mebendazole 100 mg BD × 3 days",
     "  - Nitazoxanide, Pyrantelpamoate, Ivermectin also effective",
     "Piperazine 75 mg/kg/day × 2 days (intestinal obstruction)"],
    bg_color=WHITE, title_color=GREEN)

# Life cycle note
add_rect(slide, 9.05, 3.75, 4.0, 3.55, WHITE)
add_textbox(slide, 9.15, 3.8, 3.8, 0.35, "Life Cycle Summary", 12, bold=True, color=GREEN)
lc_text = "1. Adults in small intestine (diagnostic stage)\n2. Fertilized egg in feces (diagnostic stage)\n3. Embryonated egg with L3 larva (infective stage)\n4. Ingestion of embryonated eggs\n5. Hatched larvae enter circulation → migrate to lungs\n6. Larvae enter bronchial tree\n7. Larvae coughed up, re-swallowed → mature in small intestine"
tb_lc = slide.shapes.add_textbox(Inches(9.15), Inches(4.2), Inches(3.8), Inches(3.0))
tf_lc = tb_lc.text_frame; tf_lc.word_wrap = True
p_lc = tf_lc.paragraphs[0]; run_lc = p_lc.add_run()
run_lc.text = lc_text; run_lc.font.size = Pt(9); run_lc.font.color.rgb = DARK_GRAY

# =============================================
# SLIDE 6: PINWORM (ENTEROBIASIS)
# =============================================
slide = prs.slides.add_slide(blank_layout)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GRAY)
add_rect(slide, 0, 0, 13.333, 1.2, RGBColor(0x55, 0x2D, 0x8B))
add_rect(slide, 0, 1.2, 0.08, 6.3, YELLOW)
add_textbox(slide, 0.3, 0.15, 12, 0.7, "19.31  Pinworm Infestation (Enterobiasis / Oxyuriasis / Threadworm)", 27, bold=True, color=WHITE)
add_textbox(slide, 0.3, 0.82, 10, 0.35, "Caused by Enterobius vermicularis  |  Found in ileocecum and ascending colon  |  Worms: 2-3 mm, white, thread-like", 13, color=YELLOW, italic=True)

# Left column - Facts & Etiopathogenesis
add_bullet_textbox(slide, 0.3, 1.35, 4.1, 2.8, "Epidemiology & Etiopathogenesis",
    ["Prevalent among infants and young children",
     "Human is the only natural host",
     "Infected by ingesting embryonated eggs from clothing, bedding, house dust, or under fingernails",
     "After hatching in small intestine, larvae move to cecal region → adult worms",
     "Gravid female migrates to perianal region at night to lay eggs",
     "Each egg: 30-60 mm, matures to single-coiled larva in 6 hrs",
     "Can survive 20 days; easily transmitted person-to-person"],
    bg_color=WHITE, title_color=RGBColor(0x55, 0x2D, 0x8B))

add_bullet_textbox(slide, 0.3, 4.25, 4.1, 3.05, "Clinical Features",
    ["Most frequent: intense itching in the anal region (perianal pruritus)",
     "Secondary infections from excessive scratching",
     "Girls: inflammation of vulva and vagina",
     "Irritability, sleep disturbances, teeth grinding, masturbation, bedwetting",
     "Abdominal discomfort, diarrhea, loss of appetite & weight",
     "Serious: appendicitis, inflammation of fallopian tubes",
     "Rarely: migration to liver, kidney, lungs, eyes"],
    bg_color=WHITE, title_color=DARK_BLUE)

# Middle - Diagnosis
add_bullet_textbox(slide, 4.55, 1.35, 4.3, 3.0, "Diagnosis",
    ["Direct observation of worms in stools/perianal region",
     "Microscopic demonstration of eggs in perianal swab (taken before defecation)",
     "Only 5% patients have eggs in stools",
     "Cellophane/Scotch Tape Technique (GOLD STANDARD):",
     "  - Transparent cellulose acetate strip on perianal area",
     "  - Press tape on glass slide for microscopy",
     "  - Done early morning before sleep for ≥3 consecutive days",
     "Routine stool exam usually ineffective"],
    bg_color=WHITE, title_color=DARK_BLUE)

add_bullet_textbox(slide, 4.55, 4.45, 4.3, 2.85, "Treatment",
    ["Infected person + all family members should be treated",
     "Drug of choice:",
     "  - Albendazole 400 mg PO single dose",
     "  - Mebendazole 100 mg PO single dose",
     "  - Single dose Ivermectin & Pyrantelpamoate equally effective",
     "Dose repeated after 2 weeks (drugs active only against adult worms)",
     "Supportive: Hand hygiene, perineal hygiene, cut nails, frequent handwashing"],
    bg_color=WHITE, title_color=GREEN)

# Right - Life cycle
add_rect(slide, 9.05, 1.35, 4.0, 5.95, WHITE)
add_textbox(slide, 9.15, 1.4, 3.8, 0.38, "Life Cycle of Pinworm", 12, bold=True, color=RGBColor(0x55, 0x2D, 0x8B))
lc2 = "Step 1: Eggs deposited on perianal folds (diagnostic stage)\n\nStep 2: Embryonated eggs ingested by human (infective stage)\n\nStep 3: Larvae hatch in small intestine\n\nStep 4: Adult worm in lumen of cecum\n\nStep 5: Gravid female migrates to perianal region at night to lay eggs\n\n→ Note: Larvae inside eggs mature within 4-6 hours"
tb_lc2 = slide.shapes.add_textbox(Inches(9.15), Inches(1.85), Inches(3.8), Inches(5.0))
tf_lc2 = tb_lc2.text_frame; tf_lc2.word_wrap = True
p_lc2 = tf_lc2.paragraphs[0]; run_lc2 = p_lc2.add_run()
run_lc2.text = lc2; run_lc2.font.size = Pt(10); run_lc2.font.color.rgb = DARK_GRAY

# =============================================
# SLIDE 7: HOOKWORM (ANCYLOSTOMIASIS)
# =============================================
slide = prs.slides.add_slide(blank_layout)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GRAY)
add_rect(slide, 0, 0, 13.333, 1.2, RGBColor(0x8B, 0x22, 0x22))
add_rect(slide, 0, 1.2, 0.08, 6.3, ORANGE)
add_textbox(slide, 0.3, 0.15, 12, 0.7, "19.32  Ancylostomiasis (Hookworm Infestation)", 30, bold=True, color=WHITE)
add_textbox(slide, 0.3, 0.82, 11, 0.35, "Caused by Ancylostoma duodenale & Necator americanus  |  Most prevalent in tropical/subtropical rural areas", 13, color=YELLOW, italic=True)

# Left column
add_bullet_textbox(slide, 0.3, 1.35, 4.1, 3.4, "Etiopathogenesis",
    ["Larvae found in warm, moist soil; infectious after 2 molts (1-2 weeks)",
     "Enter host by penetrating skin (bare feet) → travel via veins → lungs → pharynx → swallowed → small intestine",
     "Mature into adults: 5-13 mm in length",
     "Sexual maturity in 2-4 weeks; start laying eggs",
     "A. duodenale: ~30,000 eggs/day; N. americanus: ~9,000 eggs/day",
     "Eggs: 36×58 mm, 4 embryonic segments",
     "Larvae survive in soil 1-2 weeks; can also be ingested",
     "Hookworm infection also through ingestion",
     "Adult worm lifespan: 1-5 years"],
    bg_color=WHITE, title_color=RGBColor(0x8B, 0x22, 0x22))

add_bullet_textbox(slide, 0.3, 4.85, 4.1, 2.45, "Special: Infantile Hookworm Disease",
    ["Unique clinical condition in infants",
     "Nausea, vomiting, diarrhea with bloody stools, restlessness, melena, anemia",
     "Transplacental / transmammary transmission possible",
     "Especially when mother is also infected"],
    bg_color=WHITE, title_color=ORANGE)

# Middle column
add_bullet_textbox(slide, 4.55, 1.35, 4.3, 3.45, "Clinical Features",
    ["Main symptoms: iron deficiency anemia (worsens over time)",
     "Loss of appetite, abdominal pain, malnutrition",
     "Pica (eating nonfood items) in severe cases",
     "Anasarca (protein loss causing whole-body swelling)",
     "Diarrhea alternating with constipation",
     "Malabsorption",
     "Ground itch: larval invasion of skin (mild-moderate; papulovesicular rash / cutaneous larva migrans)",
     "Transient pulmonary symptoms: fever, cough, dyspnea, wheeze (larval migration)"],
    bg_color=WHITE, title_color=DARK_BLUE)

add_bullet_textbox(slide, 4.55, 4.9, 4.3, 2.4, "Diagnosis",
    ["Characteristic hookworm eggs in stool by microscopy (two species indistinguishable)",
     "CBC: magnitude & type of anemia + eosinophilia",
     "Hypoalbuminemia"],
    bg_color=WHITE, title_color=DARK_BLUE)

# Right column
add_bullet_textbox(slide, 9.05, 1.35, 4.0, 2.6, "Treatment",
    ["Drug of choice:",
     "  - Albendazole 400 mg PO single dose",
     "  - Mebendazole 100 mg BD × 3 days",
     "  - Pyrantel pamoate equally effective",
     "Correct anemia: iron supplementation and/or packed cell transfusion"],
    bg_color=WHITE, title_color=GREEN)

add_bullet_textbox(slide, 9.05, 4.05, 4.0, 1.2, "Prevention",
    ["Discourage bare-foot walking",
     "Improve sanitation & hygiene"],
    bg_color=WHITE, title_color=TEAL)

# Blood loss note
add_rect(slide, 9.05, 5.35, 4.0, 1.95, RGBColor(0xFF, 0xF0, 0xE0))
add_textbox(slide, 9.15, 5.4, 3.8, 0.35, "Blood Loss", 11, bold=True, color=ORANGE)
add_textbox(slide, 9.15, 5.78, 3.8, 1.4, "Each worm causes blood loss of 0.03-0.3 mL per worm per day → leads to iron deficiency anemia and hypoproteinemia", 10, color=DARK_GRAY, wrap=True)

# =============================================
# SLIDE 8: STRONGYLOIDIASIS
# =============================================
slide = prs.slides.add_slide(blank_layout)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GRAY)
add_rect(slide, 0, 0, 13.333, 1.2, RGBColor(0x1A, 0x5C, 0x3A))
add_rect(slide, 0, 1.2, 0.08, 6.3, TEAL)
add_textbox(slide, 0.3, 0.15, 12, 0.7, "19.33  Strongyloidiasis", 32, bold=True, color=WHITE)
add_textbox(slide, 0.3, 0.82, 10, 0.35, "Caused by Strongyloides stercoralis  |  Similar to hookworm infestation", 13, color=RGBColor(0xA8, 0xE6, 0xC0), italic=True)

# Left column
add_bullet_textbox(slide, 0.3, 1.35, 4.1, 3.65, "Etiopathogenesis",
    ["Larvae expelled by infected individuals → become free-living adults or infective filiform larvae in soil",
     "Infective larvae penetrate skin → venous circulation → lungs → final destination: upper small intestine",
     "Mature worms burrow into epithelium → lay eggs → small larvae passed in feces",
     "Larvae in soil (or intestine/anal region) undergo changes to become infective",
     "Impact influenced by: worm number, host nutritional status, immune status",
     "Disseminated strongyloidiasis in rare cases → Gram-negative septicemia"],
    bg_color=WHITE, title_color=RGBColor(0x1A, 0x5C, 0x3A))

add_bullet_textbox(slide, 0.3, 5.1, 4.1, 2.2, "Key Differentiating Feature",
    ["Unlike hookworm and Ascaris: the larvae present in the soil (or intestine/anal region) can undergo changes to infect a human host",
     "This allows autoinfection — the reason infection may persist for years"],
    bg_color=RGBColor(0xE0, 0xF5, 0xEA), title_color=RGBColor(0x1A, 0x5C, 0x3A))

# Middle column
add_bullet_textbox(slide, 4.55, 1.35, 4.3, 3.65, "Clinical Features",
    ["Skin penetration: mild itching, raised skin welts (urticaria) at entry site",
     "Transient pulmonary symptoms: fever, cough, dyspnea, wheeze (larval migration)",
     "Intestinal: diarrhea, constipation, abdominal pain/bloating, malabsorption",
     "Ground itch (larval skin invasion); papulovesicular rash / cutaneous larva migrans",
     "Disseminated: multiple organ involvement",
     "Can lead to Gram-negative septicemia (disseminated strongyloidiasis)"],
    bg_color=WHITE, title_color=DARK_BLUE)

# Right column
add_bullet_textbox(slide, 9.05, 1.35, 4.0, 3.2, "Comparison: Hookworm vs Strongyloides",
    ["Both: skin penetration → veins → lungs → small intestine",
     "Both: ground itch, transient pulmonary symptoms",
     "Hookworm: ONLY fecal-oral / skin transmission",
     "Strongyloides: also AUTOINFECTION possible",
     "Hookworm: adults attach to mucosa, cause blood loss & anemia",
     "Strongyloides: adults burrow into epithelium, cause malabsorption",
     "Severe Strongyloides: Disseminated disease, Gram-negative sepsis"],
    bg_color=WHITE, title_color=TEAL)

add_bullet_textbox(slide, 9.05, 4.65, 4.0, 2.65, "Treatment of Strongyloidiasis",
    ["Ivermectin (drug of choice)",
     "Albendazole: alternative option",
     "Thiabendazole: older agent, rarely used now",
     "Treat underlying immunosuppression if present",
     "In disseminated disease: prolonged treatment required",
     "Supportive care for Gram-negative sepsis"],
    bg_color=WHITE, title_color=GREEN)

# =============================================
# SLIDE 9: SUMMARY / QUICK REFERENCE
# =============================================
slide = prs.slides.add_slide(blank_layout)
add_rect(slide, 0, 0, 13.333, 7.5, DARK_BLUE)
add_rect(slide, 0, 0, 13.333, 1.2, TEAL)
add_textbox(slide, 0.3, 0.15, 12, 0.7, "Quick Reference — Treatment Summary", 30, bold=True, color=WHITE)
add_textbox(slide, 0.3, 0.82, 10, 0.35, "Parasitic Infections: First-Line Drug Choices", 14, color=WHITE)

# Table headers
headers = ["Disease", "Organism", "Drug of Choice", "Dose"]
col_widths = [2.5, 3.0, 3.5, 3.8]
col_starts = [0.2, 2.75, 5.8, 9.35]

add_rect(slide, 0.2, 1.3, 12.9, 0.5, TEAL)
for i, (h, w, x) in enumerate(zip(headers, col_widths, col_starts)):
    add_textbox(slide, x, 1.33, w, 0.44, h, 12, bold=True, color=WHITE)

rows = [
    ("Amebiasis (Colitis)", "Entamoeba histolytica", "Metronidazole", "20-50 mg/kg/day × 10-14 days"),
    ("Amebic Liver Abscess", "Entamoeba histolytica", "IV Metronidazole / Tinidazole", "21 mg/kg/day ÷ 3 doses × 10 days"),
    ("Ascariasis", "Ascaris lumbricoides", "Albendazole", "400 mg PO single dose"),
    ("Pinworm (Enterobiasis)", "Enterobius vermicularis", "Albendazole / Mebendazole", "400 mg single dose; repeat in 2 weeks"),
    ("Hookworm", "Ancylostoma / Necator", "Albendazole / Mebendazole", "400 mg single dose OR 100 mg BD × 3 days"),
    ("Strongyloidiasis", "Strongyloides stercoralis", "Ivermectin", "200 mcg/kg/day × 2 days"),
]

for i, (dis, org, drug, dose) in enumerate(rows):
    row_y = 1.85 + i * 0.82
    bg = RGBColor(0x1E, 0x4A, 0x6E) if i % 2 == 0 else RGBColor(0x16, 0x3A, 0x5A)
    add_rect(slide, 0.2, row_y, 12.9, 0.78, bg)
    data = [dis, org, drug, dose]
    for j, (val, w, x) in enumerate(zip(data, col_widths, col_starts)):
        add_textbox(slide, x, row_y + 0.05, w, 0.7, val, 10.5, color=WHITE)

# Bottom note
add_rect(slide, 0.2, 6.8, 12.9, 0.5, TEAL)
add_textbox(slide, 0.3, 6.83, 12.7, 0.44, "Note: Always treat entire family for Pinworm  •  Add luminal amebicide for Amebiasis  •  Repeat doses improve cure rates", 11, color=WHITE, italic=True)

# Save
output_path = "/tmp/workspace/infectious-diseases-ppt/Infectious_Diseases_Parasitic_Infections.pptx"
prs.save(output_path)
print(f"Saved: {output_path}")
Running Command

cd /tmp/workspace/infectious-diseases-ppt && python create_ppt.py 2>&1

Running Command

cd /tmp/workspace/infectious-diseases-ppt && python -c " from pptx import Presentation prs = Presentation('Infectious_Diseases_Parasitic_Infections.pptx') print(f'Total slides: {len(prs.slides)}') for i, slide in enumerate(prs.slides, 1): texts = [] for shape in slide.shapes: if shape.has_text_frame: t = shape.text_frame.text.strip() if t: texts.append(t[:60]) print(f'Slide {i}: {texts[0] if texts else \"(no text)\"}') "

Your PPT is ready! Here's the download link:

Infectious Diseases Parasitic Infections

Presentation · PPTX


What's inside — 9 slides covering everything from your textbook pages:
SlideContent
1Title Slide - Parasitic Infections in Children
2Amebiasis - Overview, Key Facts, Etiopathogenesis, Clinical Features, Liver Abscess
3Amebiasis - Complications, Diagnosis, Treatment (Colitis + Liver Abscess), Prevention
4Helminthic Infestations - Overview + Full Classification Table (Nematodes / Cestodes / Trematodes)
5Ascariasis - Etiopathogenesis, Clinical Features, Complications, Diagnosis, Treatment, Life Cycle
6Pinworm (Enterobiasis) - Etiopathogenesis, Clinical Features, Diagnosis (Cellophane Tape Technique), Treatment, Life Cycle
7Hookworm (Ancylostomiasis) - Etiopathogenesis, Clinical Features, Infantile Hookworm Disease, Diagnosis, Treatment
8Strongyloidiasis - Etiopathogenesis, Clinical Features, Comparison with Hookworm, Treatment
9Quick Reference Summary Table - All 6 diseases with organism, drug of choice, and doses
The design uses color-coded section headers (dark blue, teal, green, purple, red) per disease for easy visual navigation, with white content boxes on a light gray background.
This is a shared conversation. Sign in to Orris to start your own chat.