What is ivf indications how to do it prepare a powerpoint presentation of 10-15 slides
ls -la /tmp/workspace/ 2>/dev/null || mkdir -p /tmp/workspace && ls -la /tmp/workspace/
mkdir -p /tmp/workspace/ivf-presentation && cat << 'PYEOF' > /tmp/workspace/ivf-presentation/create_ivf_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 import copy prs = Presentation() prs.slide_width = Inches(13.333) prs.slide_height = Inches(7.5) # Color palette - medical/clinical theme NAVY = RGBColor(0x00, 0x33, 0x66) TEAL = RGBColor(0x00, 0x7A, 0x8A) LIGHT_TEAL = RGBColor(0xD6, 0xF0, 0xF4) WHITE = RGBColor(0xFF, 0xFF, 0xFF) DARK_GRAY = RGBColor(0x2D, 0x2D, 0x2D) MED_GRAY = RGBColor(0x55, 0x55, 0x55) LIGHT_GRAY = RGBColor(0xF2, 0xF5, 0xF7) ACCENT = RGBColor(0xE8, 0x5D, 0x04) GOLD = RGBColor(0xF0, 0xA8, 0x0A) LIGHT_BLUE = RGBColor(0xE8, 0xF4, 0xFD) GREEN = RGBColor(0x1A, 0x7A, 0x3C) blank_layout = prs.slide_layouts[6] def add_rect(slide, x, y, w, h, fill_color, opacity=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 shape.line.fill.background() return shape def add_textbox(slide, text, x, y, w, h, font_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(font_size) run.font.bold = bold run.font.italic = italic run.font.color.rgb = color run.font.name = "Calibri" return tb def add_bullets(slide, items, x, y, w, h, font_size=16, title=None, title_size=18, bullet_color=TEAL, text_color=DARK_GRAY, bg_color=None, padding=0.15): if bg_color: add_rect(slide, x, y, w, h, bg_color) tb = slide.shapes.add_textbox(Inches(x+padding), Inches(y+0.05), Inches(w-padding*2), Inches(h-0.1)) tf = tb.text_frame tf.word_wrap = True tf.margin_left = Pt(2) tf.margin_right = Pt(2) tf.margin_top = Pt(4) tf.margin_bottom = Pt(4) first = True if title: p = tf.paragraphs[0] if first else tf.add_paragraph() first = False r = p.add_run() r.text = title r.font.size = Pt(title_size) r.font.bold = True r.font.color.rgb = NAVY r.font.name = "Calibri" p.space_after = Pt(6) for item in items: p = tf.add_paragraph() if not first else tf.paragraphs[0] first = False p.space_before = Pt(3) p.space_after = Pt(3) # bullet dot r0 = p.add_run() r0.text = " \u25CF " r0.font.size = Pt(font_size - 2) r0.font.color.rgb = bullet_color r0.font.name = "Calibri" r1 = p.add_run() r1.text = item r1.font.size = Pt(font_size) r1.font.color.rgb = text_color r1.font.name = "Calibri" return tb def slide_header(slide, title, subtitle=None): # Top bar add_rect(slide, 0, 0, 13.333, 1.0, NAVY) add_textbox(slide, title, 0.3, 0.05, 12.5, 0.85, 32, bold=True, color=WHITE, align=PP_ALIGN.LEFT) if subtitle: add_rect(slide, 0, 1.0, 13.333, 0.38, TEAL) add_textbox(slide, subtitle, 0.3, 1.02, 12.5, 0.34, 15, bold=False, color=WHITE, align=PP_ALIGN.LEFT) # Bottom bar add_rect(slide, 0, 7.2, 13.333, 0.3, NAVY) add_textbox(slide, "IVF - In Vitro Fertilization | Reproductive Medicine", 0.3, 7.2, 10, 0.3, 9, color=WHITE) # ───────────────────────────────────────────────── # SLIDE 1: TITLE SLIDE # ───────────────────────────────────────────────── slide = prs.slides.add_slide(blank_layout) # Background add_rect(slide, 0, 0, 13.333, 7.5, NAVY) add_rect(slide, 0, 0, 6.5, 7.5, TEAL) # Decorative lines add_rect(slide, 6.5, 0, 0.07, 7.5, WHITE) add_rect(slide, 6.7, 1.5, 6.4, 0.06, GOLD) # Title text tb = slide.shapes.add_textbox(0.5, Inches(1.2), Inches(5.8), Inches(2.5)) tf = tb.text_frame tf.word_wrap = True p = tf.paragraphs[0] p.alignment = PP_ALIGN.LEFT r = p.add_run() r.text = "IN VITRO" r.font.size = Pt(52) r.font.bold = True r.font.color.rgb = WHITE r.font.name = "Calibri" p2 = tf.add_paragraph() p2.alignment = PP_ALIGN.LEFT r2 = p2.add_run() r2.text = "FERTILIZATION" r2.font.size = Pt(52) r2.font.bold = True r2.font.color.rgb = GOLD r2.font.name = "Calibri" p3 = tf.add_paragraph() p3.space_before = Pt(10) r3 = p3.add_run() r3.text = "(IVF)" r3.font.size = Pt(38) r3.font.bold = True r3.font.color.rgb = WHITE r3.font.name = "Calibri" add_textbox(slide, "Indications, Protocol & Procedure", 0.5, 3.9, 5.8, 0.7, 18, italic=True, color=LIGHT_TEAL, align=PP_ALIGN.LEFT) add_textbox(slide, "A Comprehensive Clinical Overview", 0.5, 4.6, 5.8, 0.5, 14, color=WHITE, align=PP_ALIGN.LEFT) # Right side content boxes add_rect(slide, 7.0, 1.2, 5.8, 1.1, RGBColor(0xFF,0xFF,0xFF)) add_textbox(slide, "First successful IVF baby: Louise Brown, 1978", 7.15, 1.3, 5.5, 0.85, 15, color=NAVY, align=PP_ALIGN.LEFT) add_rect(slide, 7.0, 2.5, 5.8, 1.1, LIGHT_TEAL) add_textbox(slide, "Success rate: 30-32% per embryo transfer cycle", 7.15, 2.6, 5.5, 0.85, 15, color=NAVY, align=PP_ALIGN.LEFT) add_rect(slide, 7.0, 3.8, 5.8, 1.1, RGBColor(0xFF,0xFF,0xFF)) add_textbox(slide, "Millions of babies born worldwide via ART", 7.15, 3.9, 5.5, 0.85, 15, color=NAVY, align=PP_ALIGN.LEFT) add_rect(slide, 7.0, 5.1, 5.8, 1.1, LIGHT_TEAL) add_textbox(slide, "Pioneer: Robert G. Edwards & Patrick Steptoe", 7.15, 5.2, 5.5, 0.85, 15, color=NAVY, align=PP_ALIGN.LEFT) add_textbox(slide, "Reproductive Medicine | Assisted Reproductive Technology", 0.3, 7.1, 13, 0.35, 10, color=RGBColor(0xCC,0xCC,0xCC), align=PP_ALIGN.CENTER) # ───────────────────────────────────────────────── # SLIDE 2: WHAT IS IVF? # ───────────────────────────────────────────────── slide = prs.slides.add_slide(blank_layout) add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GRAY) slide_header(slide, "What is IVF?", "Definition & Historical Background") add_rect(slide, 0.4, 1.55, 12.5, 5.35, WHITE) # Definition box add_rect(slide, 0.4, 1.55, 12.5, 1.2, NAVY) add_textbox(slide, "IVF (In Vitro Fertilization) is an Assisted Reproductive Technology (ART) in which " "eggs are surgically retrieved from the ovaries, fertilized with sperm in a laboratory dish, " "and the resulting embryo(s) are transferred back into the uterus.", 0.6, 1.58, 12.1, 1.15, 15, color=WHITE) # Left column add_textbox(slide, "Key Concepts", 0.6, 2.9, 5.8, 0.4, 16, bold=True, color=NAVY) concepts = [ "Fertilization occurs OUTSIDE the human body (in vitro = 'in glass')", "Involves manipulation of both eggs and sperm", "Embryo transferred on Day 3-5 of development", "Multiple embryos can be cryopreserved for future use", "May be combined with ICSI, PGT, or donor gametes", ] add_bullets(slide, concepts, 0.4, 3.3, 6.0, 3.4, 14, bg_color=LIGHT_BLUE) # Right column - historical add_textbox(slide, "Historical Milestones", 6.7, 2.9, 6.0, 0.4, 16, bold=True, color=NAVY) history = [ "1978 - First IVF baby: Louise Brown (England)", "1978 - Pioneered by Edwards & Steptoe", "1980 - First IVF clinic: Norfolk, Virginia", "1992 - ICSI introduced (Palermo et al.)", "Today - >30% pregnancy rate per transfer cycle", ] add_bullets(slide, history, 6.6, 3.3, 6.4, 3.4, 14, bg_color=LIGHT_TEAL) # ───────────────────────────────────────────────── # SLIDE 3: INDICATIONS - PART 1 # ───────────────────────────────────────────────── slide = prs.slides.add_slide(blank_layout) add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GRAY) slide_header(slide, "Indications for IVF", "Primary & Secondary Indications") # 3 columns cols = [ { "title": "Tubal Factor", "color": NAVY, "light": LIGHT_BLUE, "items": [ "Bilateral tubal occlusion", "Surgically uncorrectable tubal damage", "History of ectopic pregnancy", "Absence of fallopian tubes (salpingectomy)", "PRIMARY indication for IVF", ] }, { "title": "Male Factor Infertility", "color": TEAL, "light": LIGHT_TEAL, "items": [ "Severe oligospermia", "Azoospermia (testicular/epididymal sperm extraction)", "Asthenospermia / teratospermia", "Failed intrauterine insemination", "Combined with ICSI technique", ] }, { "title": "Ovarian / Endocrine", "color": RGBColor(0x5B, 0x2D, 0x8E), "light": RGBColor(0xEE, 0xE5, 0xF8), "items": [ "Polycystic Ovary Syndrome (PCOS)", "Premature ovarian insufficiency", "Diminished ovarian reserve", "Resistant ovary syndrome", "Failed ovulation induction", ] }, ] col_w = 4.0 for i, col in enumerate(cols): x = 0.4 + i * (col_w + 0.13) add_rect(slide, x, 1.55, col_w, 0.55, col["color"]) add_textbox(slide, col["title"], x+0.1, 1.57, col_w-0.2, 0.52, 15, bold=True, color=WHITE, align=PP_ALIGN.CENTER) add_rect(slide, x, 2.1, col_w, 5.0, col["light"]) tb2 = slide.shapes.add_textbox(Inches(x+0.15), Inches(2.15), Inches(col_w-0.3), Inches(4.85)) tf2 = tb2.text_frame tf2.word_wrap = True first2 = True for item in col["items"]: p = tf2.paragraphs[0] if first2 else tf2.add_paragraph() first2 = False p.space_before = Pt(5) p.space_after = Pt(5) r0 = p.add_run() r0.text = " \u2714 " r0.font.size = Pt(12) r0.font.color.rgb = col["color"] r0.font.name = "Wingdings" r1 = p.add_run() r1.text = item r1.font.size = Pt(13) r1.font.color.rgb = DARK_GRAY r1.font.name = "Calibri" # ───────────────────────────────────────────────── # SLIDE 4: INDICATIONS - PART 2 # ───────────────────────────────────────────────── slide = prs.slides.add_slide(blank_layout) add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GRAY) slide_header(slide, "Indications for IVF (Continued)", "Additional & Special Indications") cols2 = [ { "title": "Endometriosis", "color": RGBColor(0xC0, 0x39, 0x2B), "light": RGBColor(0xFD, 0xED, 0xEC), "items": [ "Moderate to severe endometriosis", "Failed conservative treatment", "Endometrioma affecting ovarian reserve", "Peritoneal endometriosis with adhesions", ] }, { "title": "Unexplained Infertility", "color": RGBColor(0x14, 0x6B, 0x3A), "light": RGBColor(0xE9, 0xF7, 0xEF), "items": [ "Failed IUI (3+ cycles)", "Normal investigations but no conception", "Duration >2 years of infertility", "Advanced maternal age (>35 years)", ] }, { "title": "Genetic / Special Indications", "color": RGBColor(0xB7, 0x59, 0x00), "light": RGBColor(0xFE, 0xF9, 0xE7), "items": [ "Preimplantation Genetic Testing (PGT)", "X-linked disease carriers", "Autosomal dominant/recessive disease", "Single gene disorders", "Chromosomal translocations", ] }, { "title": "Uterine / Other Factors", "color": RGBColor(0x1A, 0x53, 0x76), "light": RGBColor(0xD6, 0xEA, 0xF8), "items": [ "Uterine factor requiring surrogacy", "Gonadal dysgenesis (donor oocytes)", "Cancer patients - fertility preservation", "Same-sex couples / single parents", ] }, ] col_w2 = 3.0 for i, col in enumerate(cols2): x = 0.3 + i * (col_w2 + 0.17) add_rect(slide, x, 1.55, col_w2, 0.55, col["color"]) add_textbox(slide, col["title"], x+0.05, 1.57, col_w2-0.1, 0.52, 13, bold=True, color=WHITE, align=PP_ALIGN.CENTER) add_rect(slide, x, 2.1, col_w2, 4.95, col["light"]) tb2 = slide.shapes.add_textbox(Inches(x+0.12), Inches(2.18), Inches(col_w2-0.24), Inches(4.8)) tf2 = tb2.text_frame tf2.word_wrap = True first2 = True for item in col["items"]: p = tf2.paragraphs[0] if first2 else tf2.add_paragraph() first2 = False p.space_before = Pt(7) p.space_after = Pt(7) r0 = p.add_run() r0.text = " \u25BA " r0.font.size = Pt(11) r0.font.color.rgb = col["color"] r0.font.name = "Calibri" r1 = p.add_run() r1.text = item r1.font.size = Pt(13) r1.font.color.rgb = DARK_GRAY r1.font.name = "Calibri" # ───────────────────────────────────────────────── # SLIDE 5: PATIENT SELECTION & WORKUP # ───────────────────────────────────────────────── slide = prs.slides.add_slide(blank_layout) add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GRAY) slide_header(slide, "Patient Selection & Pre-IVF Workup", "Assessment Before Starting IVF") # Two columns add_rect(slide, 0.4, 1.55, 6.0, 5.55, WHITE) add_rect(slide, 0.4, 1.55, 6.0, 0.5, NAVY) add_textbox(slide, "Female Partner Assessment", 0.5, 1.57, 5.8, 0.45, 15, bold=True, color=WHITE) female_items = [ ("Ovarian Reserve", "AMH, antral follicle count (AFC), Day 3 FSH/LH/E2"), ("Uterine Cavity", "Hysteroscopy, saline infusion sonography (SIS)"), ("Hormonal Profile", "TSH, prolactin, androgen levels"), ("Infectious Screening", "HIV, Hepatitis B/C, rubella immunity, STI screen"), ("Genetic Screening", "Karyotype if indicated, carrier screening"), ("BMI & Lifestyle", "Optimize weight, smoking cessation, folate supplementation"), ] y_pos = 2.18 for label, detail in female_items: add_rect(slide, 0.5, y_pos, 5.8, 0.72, LIGHT_BLUE) add_textbox(slide, label, 0.6, y_pos+0.02, 5.6, 0.28, 13, bold=True, color=NAVY) add_textbox(slide, detail, 0.6, y_pos+0.3, 5.6, 0.38, 12, color=MED_GRAY) y_pos += 0.78 # Male column add_rect(slide, 6.9, 1.55, 6.0, 5.55, WHITE) add_rect(slide, 6.9, 1.55, 6.0, 0.5, TEAL) add_textbox(slide, "Male Partner Assessment", 7.0, 1.57, 5.8, 0.45, 15, bold=True, color=WHITE) male_items = [ ("Semen Analysis", "WHO criteria: volume, motility, morphology, count"), ("Sperm DNA Fragmentation", "DFI - DNA Fragmentation Index"), ("Hormonal Profile", "FSH, LH, testosterone levels"), ("Infectious Screening", "HIV, Hepatitis B surface antigen, HIV I & II"), ("Testicular Assessment", "Ultrasound if azoospermia or severe oligospermia"), ("Genetic Testing", "Y-chromosome microdeletion, karyotype"), ] y_pos2 = 2.18 for label, detail in male_items: add_rect(slide, 7.0, y_pos2, 5.8, 0.72, LIGHT_TEAL) add_textbox(slide, label, 7.1, y_pos2+0.02, 5.6, 0.28, 13, bold=True, color=TEAL) add_textbox(slide, detail, 7.1, y_pos2+0.3, 5.6, 0.38, 12, color=MED_GRAY) y_pos2 += 0.78 # ───────────────────────────────────────────────── # SLIDE 6: OVARIAN STIMULATION # ───────────────────────────────────────────────── slide = prs.slides.add_slide(blank_layout) add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GRAY) slide_header(slide, "Step 1: Controlled Ovarian Hyperstimulation (COH)", "Stimulating Multiple Follicle Development") # Protocol overview add_rect(slide, 0.4, 1.55, 12.5, 1.0, NAVY) add_textbox(slide, "Unlike a normal cycle (1 dominant follicle), COH stimulates 10-20 follicles simultaneously " "using exogenous gonadotropins, monitored by transvaginal ultrasound and serum estradiol.", 0.6, 1.58, 12.2, 0.95, 14, color=WHITE) # Protocol boxes protocols = [ { "name": "Long GnRH Agonist Protocol", "color": RGBColor(0x1A, 0x53, 0x76), "light": RGBColor(0xD6, 0xEA, 0xF8), "steps": [ "GnRH agonist (Day 21, prev. cycle) - pituitary downregulation", "Start gonadotropins (FSH/hMG) after 10-14 days", "Monitor: TVS + serum E2 every 2-3 days", "Continue until follicles reach 18 mm diameter", ] }, { "name": "Short GnRH Antagonist Protocol", "color": RGBColor(0x14, 0x6B, 0x3A), "light": RGBColor(0xE9, 0xF7, 0xEF), "steps": [ "Start gonadotropins from Day 2-3 of menstrual cycle", "GnRH antagonist added Day 5-6 to prevent premature LH surge", "Preferred for poor responders and PCOS patients", "Shorter, more flexible protocol", ] }, ] for i, proto in enumerate(protocols): x = 0.4 + i * 6.4 add_rect(slide, x, 2.65, 6.0, 0.5, proto["color"]) add_textbox(slide, proto["name"], x+0.1, 2.67, 5.8, 0.45, 14, bold=True, color=WHITE) add_rect(slide, x, 3.15, 6.0, 2.6, proto["light"]) tb = slide.shapes.add_textbox(Inches(x+0.15), Inches(3.2), Inches(5.7), Inches(2.5)) tf = tb.text_frame tf.word_wrap = True first2 = True for step in proto["steps"]: p = tf.paragraphs[0] if first2 else tf.add_paragraph() first2 = False p.space_before = Pt(5) r0 = p.add_run(); r0.text = " \u2022 "; r0.font.size = Pt(12) r0.font.color.rgb = proto["color"]; r0.font.name = "Calibri" r1 = p.add_run(); r1.text = step; r1.font.size = Pt(13) r1.font.color.rgb = DARK_GRAY; r1.font.name = "Calibri" # Trigger info add_rect(slide, 0.4, 5.85, 12.5, 1.2, RGBColor(0xFE, 0xF9, 0xE7)) add_rect(slide, 0.4, 5.85, 0.08, 1.2, GOLD) add_textbox(slide, "TRIGGER SHOT (hCG Administration)", 0.6, 5.87, 7.0, 0.35, 14, bold=True, color=RGBColor(0xB7, 0x59, 0x00)) add_textbox(slide, "When follicles reach ≥18 mm: hCG injection administered. Acts as surrogate LH surge. " "Oocyte retrieval scheduled 34-36 hours later (before spontaneous ovulation).", 0.6, 6.22, 12.0, 0.75, 13, color=DARK_GRAY) # ───────────────────────────────────────────────── # SLIDE 7: OOCYTE RETRIEVAL # ───────────────────────────────────────────────── slide = prs.slides.add_slide(blank_layout) add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GRAY) slide_header(slide, "Step 2: Oocyte Retrieval", "Transvaginal Ultrasound-Guided Follicle Aspiration") # Steps steps_data = [ ("01", "Patient Preparation", NAVY, LIGHT_BLUE, "IV conscious sedation or general anesthesia. Empty bladder. Lithotomy position. " "Vaginal prep with antiseptic wash. IV antibiotics may be given."), ("02", "Ultrasound Guidance", TEAL, LIGHT_TEAL, "Transvaginal ultrasound probe with needle guide inserted. Each ovarian follicle " "identified. Real-time imaging guides needle placement into follicles."), ("03", "Needle Aspiration", RGBColor(0x14,0x6B,0x3A), RGBColor(0xE9,0xF7,0xEF), "17-gauge aspiration needle passed through vaginal wall into each follicle. " "Negative pressure applied (100-150 mmHg). Follicular fluid aspirated into tubes."), ("04", "Oocyte Identification", RGBColor(0xC0,0x39,0x2B), RGBColor(0xFD,0xED,0xEC), "Follicular fluid passed to embryologist. Oocyte-cumulus complexes identified under " "microscope. Mature MII oocytes selected for fertilization. Generally 80% of mature " "oocytes cultured in vitro are fertilized."), ] y_s = 1.58 for step in steps_data: num, title, col, light, desc = step add_rect(slide, 0.4, y_s, 0.75, 1.35, col) add_textbox(slide, num, 0.4, y_s+0.3, 0.75, 0.7, 22, bold=True, color=WHITE, align=PP_ALIGN.CENTER) add_rect(slide, 1.15, y_s, 11.6, 1.35, light) add_textbox(slide, title, 1.3, y_s+0.05, 11.3, 0.38, 15, bold=True, color=col) add_textbox(slide, desc, 1.3, y_s+0.42, 11.3, 0.85, 13, color=MED_GRAY) y_s += 1.42 # ───────────────────────────────────────────────── # SLIDE 8: FERTILIZATION IN THE LAB # ───────────────────────────────────────────────── slide = prs.slides.add_slide(blank_layout) add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GRAY) slide_header(slide, "Step 3: Laboratory Fertilization", "Conventional IVF vs. ICSI") # Divider add_rect(slide, 6.47, 1.55, 0.06, 5.6, TEAL) # IVF column add_rect(slide, 0.4, 1.55, 5.95, 0.55, NAVY) add_textbox(slide, "Conventional IVF", 0.5, 1.57, 5.8, 0.5, 16, bold=True, color=WHITE, align=PP_ALIGN.CENTER) ivf_items = [ "Oocytes pre-incubated in specialized culture medium with serum complements", "Capacitated sperm added to medium containing collected oocytes", "Semen samples screened for HBsAg and HIV I & II before use", "Oocytes and sperm allowed to incubate together for fertilization", "After 12-16 hours: checked for presence of 2 pronuclei (successful fertilization)", "Fertilized egg (zygote) grown to 4-8 cell or blastocyst stage", "Best for: normal/mild male factor, unexplained infertility", ] y2 = 2.2 for item in ivf_items: add_rect(slide, 0.5, y2, 5.8, 0.6, LIGHT_BLUE if y2 % 1.2 < 0.6 else WHITE) tb2 = slide.shapes.add_textbox(Inches(0.55), Inches(y2+0.04), Inches(5.7), Inches(0.52)) tf2 = tb2.text_frame; tf2.word_wrap = True p = tf2.paragraphs[0] r0 = p.add_run(); r0.text = "\u25CF "; r0.font.color.rgb = NAVY; r0.font.size = Pt(10) r1 = p.add_run(); r1.text = item; r1.font.size = Pt(12); r1.font.color.rgb = DARK_GRAY r0.font.name = "Calibri"; r1.font.name = "Calibri" y2 += 0.63 # ICSI column add_rect(slide, 6.6, 1.55, 6.3, 0.55, TEAL) add_textbox(slide, "ICSI (Intracytoplasmic Sperm Injection)", 6.7, 1.57, 6.1, 0.5, 16, bold=True, color=WHITE, align=PP_ALIGN.CENTER) icsi_items = [ "Single sperm directly injected into cytoplasm of mature MII oocyte", "Requires only 1 motile sperm per oocyte", "Revolutionized treatment of severe male factor infertility", "Sperm may come from: ejaculate, epididymis (PESA/MESA), or testis (TESE)", "Cryopreserved testicular sperm equally effective as fresh", "Similar outcomes with testicular vs. epididymal sperm (Kalsi et al., 2010)", "Indications: severe oligospermia, azoospermia, failed conventional IVF", ] y3 = 2.2 for item in icsi_items: add_rect(slide, 6.65, y3, 6.1, 0.6, LIGHT_TEAL if y3 % 1.2 < 0.6 else WHITE) tb3 = slide.shapes.add_textbox(Inches(6.7), Inches(y3+0.04), Inches(6.0), Inches(0.52)) tf3 = tb3.text_frame; tf3.word_wrap = True p = tf3.paragraphs[0] r0 = p.add_run(); r0.text = "\u25CF "; r0.font.color.rgb = TEAL; r0.font.size = Pt(10) r1 = p.add_run(); r1.text = item; r1.font.size = Pt(12); r1.font.color.rgb = DARK_GRAY r0.font.name = "Calibri"; r1.font.name = "Calibri" y3 += 0.63 # ───────────────────────────────────────────────── # SLIDE 9: EMBRYO CULTURE & DEVELOPMENT # ───────────────────────────────────────────────── slide = prs.slides.add_slide(blank_layout) add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GRAY) slide_header(slide, "Step 4: Embryo Culture & Development", "From Zygote to Blastocyst") # Timeline of embryo development stages = [ ("Day 0", "Oocyte\nRetrieval", NAVY, "Mature MII oocyte isolated from follicular fluid"), ("Day 1", "Fertilization\nCheck", TEAL, "2 pronuclei visible = successful fertilization"), ("Day 2-3", "Cleavage\nStage", RGBColor(0x14,0x6B,0x3A), "4-8 cell embryo stage\n(Most common transfer day)"), ("Day 5-6", "Blastocyst\nStage", RGBColor(0xB7,0x59,0x00), "Expanded blastocyst\nHigher implantation rate"), ] x_s = 0.6 for i, (day, stage, col, desc) in enumerate(stages): # Circle/box for day add_rect(slide, x_s, 1.7, 2.8, 0.6, col) add_textbox(slide, day, x_s, 1.72, 2.8, 0.58, 16, bold=True, color=WHITE, align=PP_ALIGN.CENTER) add_rect(slide, x_s, 2.3, 2.8, 0.8, RGBColor(0xF0,0xF0,0xF0)) add_textbox(slide, stage, x_s+0.05, 2.32, 2.7, 0.76, 13, bold=True, color=col, align=PP_ALIGN.CENTER) add_rect(slide, x_s, 3.1, 2.8, 1.6, WHITE) add_textbox(slide, desc, x_s+0.1, 3.15, 2.6, 1.5, 12, color=MED_GRAY, align=PP_ALIGN.CENTER) # Arrow if i < 3: add_rect(slide, x_s+2.8, 2.0, 0.18, 0.3, col) x_s += 3.18 # Culture conditions box add_rect(slide, 0.4, 4.85, 12.5, 2.25, LIGHT_BLUE) add_rect(slide, 0.4, 4.85, 0.08, 2.25, NAVY) add_textbox(slide, "Embryo Culture Conditions", 0.6, 4.88, 8.0, 0.38, 14, bold=True, color=NAVY) culture_info = [ ("Temperature", "37°C (body temperature)"), ("CO2 Atmosphere", "5-7% CO2 for pH balance"), ("Culture Medium", "Specialized sequential media mimicking reproductive tract secretions"), ("Embryo Grading", "Morphological assessment (Gardner grading for blastocysts)"), ("Cryopreservation", "Excess embryos vitrified in liquid nitrogen (N2) for future transfer"), ] y_c = 5.3 for i, (label, val) in enumerate(culture_info): x_c = 0.6 if i < 3 else 6.8 y_final = y_c + (i % 3) * 0.55 if i < 3 else 5.3 + (i - 3) * 0.7 add_textbox(slide, f"\u25CF {label}: ", x_c, y_final, 2.5, 0.45, 12, bold=True, color=NAVY) add_textbox(slide, val, x_c + 2.2, y_final, 3.8, 0.45, 12, color=DARK_GRAY) # ───────────────────────────────────────────────── # SLIDE 10: EMBRYO TRANSFER # ───────────────────────────────────────────────── slide = prs.slides.add_slide(blank_layout) add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GRAY) slide_header(slide, "Step 5: Embryo Transfer (ET)", "The Final Step - Placing Embryo into Uterus") # Left - procedure add_rect(slide, 0.4, 1.55, 7.5, 5.6, WHITE) add_rect(slide, 0.4, 1.55, 7.5, 0.5, NAVY) add_textbox(slide, "Embryo Transfer Procedure", 0.5, 1.57, 7.3, 0.45, 15, bold=True, color=WHITE) et_steps = [ ("Uterine Preparation", "Progesterone supplementation (oral/vaginal/IM) started to mimic corpus luteum. Endometrial thickness >7mm on ultrasound required."), ("Catheter Insertion", "Soft transcervical catheter passed through vagina and cervical canal into uterine cavity. Performed under abdominal ultrasound guidance."), ("Embryo Loading", "1-2 embryos (depending on age/prognosis) loaded into fine catheter with small amount of culture media."), ("Transfer", "Embryo(s) gently deposited 1-2 cm from uterine fundus. Patient lies supine for several hours after procedure."), ("Luteal Phase Support", "Progesterone continued for 2 weeks. Beta-hCG serum test on Day 14 to confirm pregnancy."), ] y_et = 2.15 for title, desc in et_steps: add_rect(slide, 0.5, y_et, 7.3, 1.0, LIGHT_BLUE) add_textbox(slide, f"\u25BA {title}", 0.6, y_et+0.04, 7.1, 0.34, 13, bold=True, color=NAVY) add_textbox(slide, desc, 0.65, y_et+0.38, 7.05, 0.56, 12, color=MED_GRAY) y_et += 1.06 # Right - key facts add_rect(slide, 8.1, 1.55, 5.0, 5.6, WHITE) add_rect(slide, 8.1, 1.55, 5.0, 0.5, TEAL) add_textbox(slide, "Key Considerations", 8.2, 1.57, 4.8, 0.45, 15, bold=True, color=WHITE) facts = [ ("Number of Embryos", "Typically 1-3 embryos depending on maternal age and embryo quality"), ("Timing", "Day 3 (cleavage stage) or Day 5 (blastocyst) transfer"), ("Success Rate", ">30% delivery rate per transfer cycle (IVF delivers highest ART rates)"), ("Multiple Pregnancy Risk", "31% multiple birth rate - main complication of IVF"), ("Cryopreserved Transfer", "Frozen-thawed embryo transfer (FET) increasingly common"), ] y_f = 2.15 for label, val in facts: add_rect(slide, 8.2, y_f, 4.8, 1.02, LIGHT_TEAL) add_textbox(slide, label, 8.3, y_f+0.04, 4.6, 0.3, 13, bold=True, color=TEAL) add_textbox(slide, val, 8.3, y_f+0.38, 4.6, 0.58, 12, color=MED_GRAY) y_f += 1.08 # ───────────────────────────────────────────────── # SLIDE 11: PREIMPLANTATION GENETIC TESTING (PGT) # ───────────────────────────────────────────────── slide = prs.slides.add_slide(blank_layout) add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GRAY) slide_header(slide, "Preimplantation Genetic Testing (PGT)", "Genetic Screening of Embryos Before Transfer") add_rect(slide, 0.4, 1.55, 12.5, 0.9, NAVY) add_textbox(slide, "PGT involves biopsy of cells from the embryo (Day 5-6 trophectoderm biopsy) and genetic analysis " "before embryo transfer. This allows selection of chromosomally normal or disease-free embryos.", 0.55, 1.58, 12.2, 0.85, 14, color=WHITE) pgt_types = [ { "type": "PGT-A (Aneuploidy)", "color": NAVY, "light": LIGHT_BLUE, "desc": "Screens all chromosomes for numerical abnormalities (aneuploidy)", "indications": [ "Advanced maternal age (>35 years)", "Recurrent implantation failure", "Recurrent pregnancy loss", "Improve implantation rates", ] }, { "type": "PGT-M (Monogenic)", "color": TEAL, "light": LIGHT_TEAL, "desc": "Tests for single gene disorders in embryos", "indications": [ "Autosomal dominant diseases", "Autosomal recessive diseases", "X-linked disorders", "Known familial mutations", ] }, { "type": "PGT-SR (Structural)", "color": RGBColor(0x14,0x6B,0x3A), "light": RGBColor(0xE9,0xF7,0xEF), "desc": "Detects chromosomal rearrangements (translocations/inversions)", "indications": [ "Reciprocal translocations", "Robertsonian translocations", "Chromosomal inversions", "Reduce spontaneous abortion risk", ] }, ] for i, pgt in enumerate(pgt_types): x_p = 0.4 + i * 4.3 add_rect(slide, x_p, 2.6, 4.1, 0.55, pgt["color"]) add_textbox(slide, pgt["type"], x_p+0.1, 2.62, 3.9, 0.5, 14, bold=True, color=WHITE, align=PP_ALIGN.CENTER) add_rect(slide, x_p, 3.15, 4.1, 0.65, RGBColor(0xF0,0xF0,0xF0)) add_textbox(slide, pgt["desc"], x_p+0.1, 3.17, 3.9, 0.62, 12, color=DARK_GRAY, align=PP_ALIGN.CENTER) add_rect(slide, x_p, 3.8, 4.1, 3.0, pgt["light"]) add_textbox(slide, "Indications:", x_p+0.1, 3.85, 3.9, 0.3, 13, bold=True, color=pgt["color"]) tb_p = slide.shapes.add_textbox(Inches(x_p+0.15), Inches(4.2), Inches(3.8), Inches(2.5)) tf_p = tb_p.text_frame; tf_p.word_wrap = True first_p = True for ind in pgt["indications"]: p = tf_p.paragraphs[0] if first_p else tf_p.add_paragraph() first_p = False p.space_before = Pt(6) r0 = p.add_run(); r0.text = " \u25CF "; r0.font.size = Pt(10) r0.font.color.rgb = pgt["color"]; r0.font.name = "Calibri" r1 = p.add_run(); r1.text = ind; r1.font.size = Pt(13) r1.font.color.rgb = DARK_GRAY; r1.font.name = "Calibri" # ───────────────────────────────────────────────── # SLIDE 12: COMPLICATIONS & RISKS # ───────────────────────────────────────────────── slide = prs.slides.add_slide(blank_layout) add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GRAY) slide_header(slide, "Complications & Risks of IVF", "Known Adverse Outcomes") complications = [ { "title": "Ovarian Hyperstimulation\nSyndrome (OHSS)", "severity": "SERIOUS", "sev_color": RGBColor(0xC0,0x39,0x2B), "color": RGBColor(0xC0,0x39,0x2B), "light": RGBColor(0xFD,0xED,0xEC), "points": [ "Exaggerated response to gonadotropins", "Fluid accumulation, ovarian enlargement", "Risk: ascites, thrombosis, renal failure", "PCOS patients at highest risk", "GnRH antagonist protocol reduces risk", ] }, { "title": "Multiple Pregnancy", "severity": "COMMON", "sev_color": RGBColor(0xB7,0x59,0x00), "color": RGBColor(0xB7,0x59,0x00), "light": RGBColor(0xFE,0xF9,0xE7), "points": [ "31% multiple birth rate post-IVF", "Risk of preterm birth, low birth weight", "Managed by single embryo transfer (SET)", "Twins/triplets increase maternal risk", "Leading complication of IVF", ] }, { "title": "Birth Defects & Genetic\nAnomalies", "severity": "NOTABLE", "sev_color": RGBColor(0x1A,0x53,0x76), "color": RGBColor(0x1A,0x53,0x76), "light": RGBColor(0xD6,0xEA,0xF8), "points": [ "Slightly increased risk vs. natural conception", "ICSI has higher risk than conventional IVF", "Chromosomal changes (gene mutations) reported", "Long-term follow-up of IVF children ongoing", "Embryonal tumors - rare but reported", ] }, { "title": "Procedural & Other Risks", "severity": "MINOR", "sev_color": RGBColor(0x14,0x6B,0x3A), "color": RGBColor(0x14,0x6B,0x3A), "light": RGBColor(0xE9,0xF7,0xEF), "points": [ "Bleeding/infection at retrieval site", "Higher rate of spontaneous abortion", "Ectopic pregnancy (post-transfer)", "Emotional/psychological stress", "Financial burden of multiple cycles", ] }, ] col_c = 3.0 for i, comp in enumerate(complications): x_c = 0.35 + i * (col_c + 0.2) # Header add_rect(slide, x_c, 1.55, col_c, 0.45, comp["color"]) add_textbox(slide, comp["severity"], x_c, 1.56, col_c, 0.42, 11, bold=True, color=WHITE, align=PP_ALIGN.RIGHT) add_rect(slide, x_c, 2.0, col_c, 0.85, RGBColor(0xF0,0xF0,0xF0)) add_textbox(slide, comp["title"], x_c+0.08, 2.02, col_c-0.16, 0.82, 13, bold=True, color=comp["color"], align=PP_ALIGN.CENTER) add_rect(slide, x_c, 2.85, col_c, 4.0, comp["light"]) tb_c = slide.shapes.add_textbox(Inches(x_c+0.12), Inches(2.9), Inches(col_c-0.24), Inches(3.85)) tf_c = tb_c.text_frame; tf_c.word_wrap = True first_c = True for pt in comp["points"]: p = tf_c.paragraphs[0] if first_c else tf_c.add_paragraph() first_c = False p.space_before = Pt(6) r0 = p.add_run(); r0.text = " \u26A0 "; r0.font.size = Pt(11) r0.font.color.rgb = comp["color"]; r0.font.name = "Calibri" r1 = p.add_run(); r1.text = pt; r1.font.size = Pt(12) r1.font.color.rgb = DARK_GRAY; r1.font.name = "Calibri" # ───────────────────────────────────────────────── # SLIDE 13: SUCCESS RATES & OUTCOMES # ───────────────────────────────────────────────── slide = prs.slides.add_slide(blank_layout) add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GRAY) slide_header(slide, "Success Rates & Outcomes", "IVF Compared to Other ART Techniques") # Comparison table add_rect(slide, 0.4, 1.55, 12.5, 0.55, NAVY) add_textbox(slide, "ART Technique", 0.5, 1.57, 4.0, 0.5, 14, bold=True, color=WHITE) add_textbox(slide, "Delivery Rate / Cycle", 4.5, 1.57, 4.0, 0.5, 14, bold=True, color=WHITE) add_textbox(slide, "Multiple Birth Rate", 8.5, 1.57, 4.0, 0.5, 14, bold=True, color=WHITE) table_data = [ ("Timed Intercourse", "2-3%", "1%", LIGHT_GRAY), ("IUI alone", "5%", "1%", WHITE), ("Clomiphene alone", "5%", "10%", LIGHT_GRAY), ("Clomiphene + IUI", "8%", "10%", WHITE), ("hMG alone", "12-15%", "15%", LIGHT_GRAY), ("hMG + IUI", "15-18%", "15%", WHITE), ("In Vitro Fertilization (IVF)", "30-32%", "31%", LIGHT_TEAL), ] y_t = 2.18 for technique, delivery, multiple, bg in table_data: add_rect(slide, 0.4, y_t, 12.5, 0.52, bg) is_ivf = "IVF" in technique t_color = NAVY if is_ivf else DARK_GRAY add_textbox(slide, technique, 0.55, y_t+0.05, 3.8, 0.42, 13, bold=is_ivf, color=t_color) add_textbox(slide, delivery, 4.5, y_t+0.05, 3.8, 0.42, 13, bold=is_ivf, color=GREEN if is_ivf else DARK_GRAY, align=PP_ALIGN.CENTER) add_textbox(slide, multiple, 8.5, y_t+0.05, 3.8, 0.42, 13, bold=is_ivf, color=RGBColor(0xC0,0x39,0x2B) if is_ivf else DARK_GRAY, align=PP_ALIGN.CENTER) y_t += 0.54 # Footnote add_rect(slide, 0.4, 6.55, 12.5, 0.6, RGBColor(0xFE,0xF9,0xE7)) add_textbox(slide, "Data from SART (Society for Assisted Reproductive Technologies), 2008 National Data. " "Current success rates >30% per transfer. Rates vary by age, diagnosis, and clinic. " "Cryopreserved embryo transfers increasingly effective with modern vitrification protocols.", 0.55, 6.57, 12.2, 0.56, 11, color=MED_GRAY, italic=True) # ───────────────────────────────────────────────── # SLIDE 14: IVF STEP-BY-STEP SUMMARY # ───────────────────────────────────────────────── slide = prs.slides.add_slide(blank_layout) add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GRAY) slide_header(slide, "IVF: Step-by-Step Summary", "Complete ART Protocol Overview") steps_summary = [ ("1", "Ovarian\nStimulation", "Gonadotropins (FSH/hMG) ± GnRH agonist/antagonist for 10-14 days", NAVY), ("2", "Monitoring", "Serial TVS + serum E2 every 2-3 days until follicles ≥18 mm", TEAL), ("3", "Trigger Shot", "hCG injection 34-36 hours before planned oocyte retrieval", RGBColor(0x14,0x6B,0x3A)), ("4", "Oocyte\nRetrieval", "Transvaginal ultrasound-guided needle aspiration under sedation", RGBColor(0xB7,0x59,0x00)), ("5", "Fertilization", "Conventional IVF or ICSI in laboratory setting by embryologist", RGBColor(0x5B,0x2D,0x8E)), ("6", "Embryo\nCulture", "Embryo development to Day 3-5 in CO2 incubator with specialized media", RGBColor(0xC0,0x39,0x2B)), ("7", "Embryo\nTransfer", "1-2 embryos transferred transcervically under ultrasound guidance", RGBColor(0x1A,0x53,0x76)), ("8", "Luteal Support &\nPregnancy Test", "Progesterone supplementation + β-hCG serum test on Day 14", RGBColor(0x14,0x6B,0x3A)), ] for i, (num, title, desc, col) in enumerate(steps_summary): row = i // 4 col_n = i % 4 x_ss = 0.35 + col_n * 3.25 y_ss = 1.6 + row * 2.75 add_rect(slide, x_ss, y_ss, 3.05, 0.6, col) add_textbox(slide, f"Step {num}", x_ss+0.08, y_ss+0.04, 0.9, 0.52, 13, bold=True, color=WHITE) add_textbox(slide, title, x_ss+1.0, y_ss+0.04, 1.95, 0.52, 12, bold=True, color=WHITE) add_rect(slide, x_ss, y_ss+0.6, 3.05, 1.9, WHITE) add_rect(slide, x_ss, y_ss+0.6, 0.08, 1.9, col) add_textbox(slide, desc, x_ss+0.2, y_ss+0.7, 2.75, 1.7, 12, color=MED_GRAY) # ───────────────────────────────────────────────── # SLIDE 15: CONCLUSION & KEY TAKEAWAYS # ───────────────────────────────────────────────── slide = prs.slides.add_slide(blank_layout) add_rect(slide, 0, 0, 13.333, 7.5, NAVY) add_rect(slide, 0, 5.8, 13.333, 1.7, TEAL) add_rect(slide, 0, 1.1, 13.333, 0.06, GOLD) add_textbox(slide, "Key Takeaways", 0.5, 0.15, 12.0, 0.85, 34, bold=True, color=WHITE, align=PP_ALIGN.CENTER) takeaways = [ ("\u2714 PRIMARY INDICATION", "Tubal factor infertility (bilateral occlusion / absence) is the most common indication for IVF"), ("\u2714 4-STEP PROTOCOL", "COH \u2192 Oocyte Retrieval \u2192 Lab Fertilization (IVF/ICSI) \u2192 Embryo Transfer"), ("\u2714 ICSI ADVANTAGE", "ICSI revolutionized IVF by enabling ART for severe male factor using a single sperm"), ("\u2714 SUCCESS RATE", "IVF achieves 30-32% delivery rate per cycle - highest among all ART techniques"), ("\u2714 GENETIC TESTING", "PGT-A/M/SR allows selection of chromosomally normal embryos before transfer"), ("\u2714 MAIN COMPLICATION", "Multiple pregnancy (31%) and OHSS are the most significant adverse outcomes"), ] y_k = 1.3 for i, (label, val) in enumerate(takeaways): col_k = 0.4 if i % 2 == 0 else 6.8 y_actual = y_k + (i // 2) * 1.3 bg_k = RGBColor(0x00, 0x3D, 0x7A) if i % 2 == 0 else RGBColor(0x00, 0x45, 0x85) add_rect(slide, col_k, y_actual, 6.2, 1.15, bg_k) add_rect(slide, col_k, y_actual, 0.07, 1.15, GOLD) add_textbox(slide, label, col_k+0.15, y_actual+0.06, 5.9, 0.35, 12, bold=True, color=GOLD) add_textbox(slide, val, col_k+0.15, y_actual+0.44, 5.9, 0.65, 12, color=WHITE) add_textbox(slide, "IVF has transformed reproductive medicine since 1978, offering hope to millions of couples " "facing infertility. Continued advances in stimulation protocols, cryopreservation, and genetic " "testing continue to improve success rates and safety outcomes worldwide.", 0.5, 5.88, 12.3, 0.85, 13, color=WHITE, align=PP_ALIGN.CENTER) # Save from io import BytesIO buf = BytesIO() prs.save(buf) with open("/tmp/workspace/ivf-presentation/IVF_Presentation.pptx", "wb") as f: f.write(buf.getvalue()) print("Saved successfully!") print("Slides:", len(prs.slides)) PYEOF echo "Script written"
cd /tmp/workspace/ivf-presentation && python create_ivf_pptx.py
ls -lh /tmp/workspace/ivf-presentation/IVF_Presentation.pptx
IVF Presentation
Presentation · PPTX
| # | Slide Title | Content |
|---|---|---|
| 1 | Title Slide | IVF overview, historical milestones, 30-32% success rate |
| 2 | What is IVF? | Definition, key concepts, historical timeline |
| 3 | Indications - Part 1 | Tubal factor, male factor, ovarian/endocrine causes |
| 4 | Indications - Part 2 | Endometriosis, unexplained infertility, genetic/uterine factors |
| 5 | Patient Selection & Workup | Pre-IVF assessment - both female and male partners |
| 6 | Step 1: COH | Long GnRH agonist vs. short antagonist protocols, trigger shot |
| 7 | Step 2: Oocyte Retrieval | Preparation, ultrasound guidance, aspiration procedure |
| 8 | Step 3: Lab Fertilization | Conventional IVF vs. ICSI - side-by-side comparison |
| 9 | Step 4: Embryo Culture | Developmental stages (Day 0 to Day 5-6), culture conditions |
| 10 | Step 5: Embryo Transfer | Procedure steps, key considerations, luteal phase support |
| 11 | PGT | Preimplantation Genetic Testing - PGT-A, PGT-M, PGT-SR |
| 12 | Complications & Risks | OHSS, multiple pregnancy, birth defects, procedural risks |
| 13 | Success Rates | SART comparison table of all ART techniques |
| 14 | Step-by-Step Summary | 8-step visual protocol overview |
| 15 | Key Takeaways | Conclusion with 6 clinical pearls |