Isoimmunization in pregnancy
pregnancy alloimmunization
ACOG prevention Rh D alloimmunization pregnancy practice advisory
https://pubmed.ncbi.nlm.nih.gov/28742673/
| Time/event | Typical approach |
|---|---|
| First prenatal visit | Antibody screen |
| 28 weeks | Repeat antibody screen, then Rh immune globulin (RhIG) 300 micrograms if anti-D is absent |
| Sensitizing event | Give RhIG when indicated, ideally within 72 hours |
| Delivery of RhD-positive infant | Give RhIG within 72 hours and assess fetomaternal hemorrhage to determine whether extra dosing is needed |
Can you make ppt of this text. With appropriate text size and colour with photos
~/
Rh isoimmunization pregnancy fetal anemia hydrops ultrasound middle cerebral artery Doppler intrauterine transfusion
Rh alloimmunization pregnancy fetal anemia middle cerebral artery Doppler intrauterine transfusion image
mkdir -p "/tmp/workspace/isoimmunization-ppt/src" "/tmp/workspace/isoimmunization-ppt/assets" "/tmp/workspace/isoimmunization-ppt/output" && python /tmp/skills/shared/scripts/fetch_images.py "https://images-glowm.cms.ama.uk.com/img/Obstetrics-V18-C23-01.jpg?1575563" "https://www.rarediseaseadvisor.com/wp-content/uploads/sites/25/2024/01/MCA-Doppler.jpg" "https://www.researchgate.net/publication/271607760/figure/fig8/AS:269870835171334@1441353629562/High-Doppler-imaging-of-the-middle-cerebral-artery-peak-systolic-velocity-685-in.png"
python /tmp/skills/shared/scripts/fetch_images.py "https://images-glowm.cms.ama.uk.com/img/Obstetrics-V18-C23-01.jpg?1575563" > "/tmp/workspace/isoimmunization-ppt/assets/images.json" && python -c "import json,base64; d=json.load(open('/tmp/workspace/isoimmunization-ppt/assets/images.json')); open('/tmp/workspace/isoimmunization-ppt/assets/mca_doppler.jpg','wb').write(base64.b64decode(d[0]['base64'].split(',',1)[1])); print('saved')"
python - <<'PY' from PIL import Image im=Image.open('/tmp/workspace/isoimmunization-ppt/assets/mca_doppler.jpg') print(im.size) PY
medical educational illustration of maternal red cell alloimmunization in pregnancy, showing maternal antibodies crossing the placenta to fetal red blood cells and causing fetal anemia, no labels
python /tmp/skills/shared/scripts/fetch_images.py "https://cdn.orris.care/image-gen/e66bd3febacf495195e9fdcdf38ce0ca.png" > "/tmp/workspace/isoimmunization-ppt/assets/generated.json" && python -c "import json,base64; d=json.load(open('/tmp/workspace/isoimmunization-ppt/assets/generated.json')); open('/tmp/workspace/isoimmunization-ppt/assets/alloimmunization_mechanism.png','wb').write(base64.b64decode(d[0]['base64'].split(',',1)[1])); print('saved')"
python - <<'PY' from PIL import Image for p in ['/tmp/workspace/isoimmunization-ppt/assets/alloimmunization_mechanism.png','/tmp/workspace/isoimmunization-ppt/assets/mca_doppler.jpg']: im=Image.open(p); print(p, im.size) PY
python - <<'PY' from pathlib import Path p=Path('/tmp/workspace/isoimmunization-ppt/src/create_deck.py') p.write_text(r''' from pptx import Presentation from pptx.util import Inches, Pt from pptx.dml.color import RGBColor from pptx.enum.shapes import MSO_SHAPE from pptx.enum.text import PP_ALIGN, MSO_ANCHOR from pptx.enum.dml import MSO_THEME_COLOR from pptx.enum.shapes import MSO_CONNECTOR from PIL import Image OUT='/tmp/workspace/isoimmunization-ppt/output/Isoimmunization_in_Pregnancy.pptx' AS='/tmp/workspace/isoimmunization-ppt/assets' MECH=f'{AS}/alloimmunization_mechanism.png' DOP=f'{AS}/mca_doppler.jpg' prs=Presentation(); prs.slide_width=Inches(13.333); prs.slide_height=Inches(7.5) blank=prs.slide_layouts[6] NAVY=RGBColor(14,44,73); BLUE=RGBColor(31,112,166); TEAL=RGBColor(20,148,150); MINT=RGBColor(227,246,243) INK=RGBColor(29,43,57); SLATE=RGBColor(86,104,120); BG=RGBColor(248,250,252); RED=RGBColor(199,64,76); GOLD=RGBColor(233,170,67); WHITE=RGBColor(255,255,255); PALE=RGBColor(239,246,251) def rect(s,x,y,w,h,color, radius=False, line=None): sh=s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE if radius else MSO_SHAPE.RECTANGLE, Inches(x), Inches(y), Inches(w), Inches(h)) sh.fill.solid(); sh.fill.fore_color.rgb=color sh.line.color.rgb=line if line else color if radius: sh.adjustments[0]=0.10 return sh def text(s,txt,x,y,w,h,size=20,color=INK,bold=False,align=PP_ALIGN.LEFT, font='Aptos', valign=MSO_ANCHOR.TOP): tb=s.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h)); tf=tb.text_frame tf.clear(); tf.word_wrap=True; tf.margin_left=0; tf.margin_right=0; tf.margin_top=0; tf.margin_bottom=0; tf.vertical_anchor=valign p=tf.paragraphs[0]; p.alignment=align r=p.add_run(); r.text=txt; r.font.name=font; r.font.size=Pt(size); r.font.bold=bold; r.font.color.rgb=color return tb def bullets(s,items,x,y,w,h,size=19,color=INK,accent=TEAL, spacing=9): tb=s.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h)); tf=tb.text_frame tf.clear(); tf.word_wrap=True; tf.margin_left=0.05; tf.margin_right=0; tf.margin_top=0; tf.margin_bottom=0 for i,item in enumerate(items): p=tf.paragraphs[0] if i==0 else tf.add_paragraph(); p.text=item; p.level=0 p.font.name='Aptos'; p.font.size=Pt(size); p.font.color.rgb=color; p.space_after=Pt(spacing); p.bullet=True return tb def title(s,kicker,heading,sub=None,n=1): rect(s,0,0,13.333,7.5,BG) rect(s,0,0,0.16,7.5,TEAL) text(s,kicker.upper(),0.55,0.38,6.3,0.28,11,TEAL,True) text(s,heading,0.55,0.72,11.8,0.57,29,NAVY,True) if sub: text(s,sub,0.57,1.32,11.5,0.34,14,SLATE) text(s,str(n).zfill(2),12.2,0.4,0.55,0.27,11,SLATE,True,PP_ALIGN.RIGHT) def add_pic(s,path,x,y,w,h): # crop fill im=Image.open(path); iw,ih=im.size; target=w/h ratio=iw/ih if ratio>target: crop=(ratio-target)/ratio/2; s.shapes.add_picture(path, Inches(x), Inches(y), width=Inches(w), height=Inches(h), crop_left=crop,crop_right=crop) else: crop=(1-ratio/target)/2; s.shapes.add_picture(path, Inches(x), Inches(y), width=Inches(w), height=Inches(h), crop_top=crop,crop_bottom=crop) def pill(s,t,x,y,w,color=TEAL): rect(s,x,y,w,0.37,color,True); text(s,t,x,y+0.07,w,0.18,11,WHITE,True,PP_ALIGN.CENTER) def footer(s,source='Educational summary | Clinical decisions require local protocol and maternal-fetal medicine input'): rect(s,0.55,7.08,12.25,0.015,RGBColor(211,221,230)); text(s,source,0.57,7.17,11.8,0.18,9,SLATE) # 1 s=prs.slides.add_slide(blank); rect(s,0,0,13.333,7.5,NAVY); rect(s,0,0,0.18,7.5,TEAL) text(s,'OBSTETRICS | FETAL MEDICINE',0.72,0.7,5.5,0.28,13,RGBColor(125,220,212),True) text(s,'Isoimmunization\nin Pregnancy',0.7,1.35,6.5,1.6,36,WHITE,True) text(s,'Recognition, surveillance, prevention and fetal treatment',0.73,3.2,5.9,0.35,17,RGBColor(213,230,241)) pill(s,'RED-CELL ALLOIMMUNIZATION',0.72,4.05,2.45,TEAL) add_pic(s,MECH,7.15,0.55,5.62,5.95) text(s,'Maternal IgG antibodies can cross the placenta and cause hemolytic disease of the fetus and newborn (HDFN).',0.72,5.1,5.6,0.72,17,WHITE) text(s,'Prepared for teaching use',0.72,6.9,3.5,0.2,10,RGBColor(163,190,211)) #2 s=prs.slides.add_slide(blank); title(s,'Core concept','What is isoimmunization?', 'Also called red-cell alloimmunization',2) rect(s,0.62,1.92,5.85,4.25,WHITE,True,RGBColor(220,229,237)); text(s,'Definition',0.95,2.25,2.5,0.35,20,NAVY,True) bullets(s,['A pregnant person develops IgG antibodies against fetal red-cell antigens absent from the maternal circulation.','The fetus may inherit the antigen from the father.','Maternal IgG crosses the placenta and can cause fetal and neonatal hemolysis.'],0.95,2.82,5.1,2.7,18) add_pic(s,MECH,7.0,1.92,5.65,3.25); text(s,'CLASSIC EXAMPLE',7.05,5.5,2,0.2,11,TEAL,True); text(s,'RhD-negative mother with an RhD-positive fetus',7.05,5.8,5.2,0.45,22,NAVY,True) footer(s) #3 s=prs.slides.add_slide(blank); title(s,'Pathophysiology','How HDFN develops',None,3) steps=[('1','Fetomaternal hemorrhage','Fetal red cells enter maternal blood.'),('2','Maternal sensitization','Maternal immune system forms IgG antibody.'),('3','Placental transfer','IgG crosses placenta in a subsequent at-risk pregnancy.'),('4','Fetal anemia','Hemolysis may lead to hydrops, stillbirth, or neonatal jaundice.')] for i,(num,h,b) in enumerate(steps): x=0.62+i*3.1 rect(s,x,2.05,2.62,3.65,WHITE,True,RGBColor(220,229,237)); rect(s,x+0.2,2.25,0.48,0.48,TEAL,True); text(s,num,x+0.2,2.34,0.48,0.16,13,WHITE,True,PP_ALIGN.CENTER) text(s,h,x+0.22,3.05,2.15,0.65,18,NAVY,True); text(s,b,x+0.22,3.92,2.1,1.0,15,SLATE) if i<3: text(s,'›',x+2.7,3.55,0.35,0.5,30,TEAL,True,PP_ALIGN.CENTER) text(s,'Important antibodies: anti-D, anti-c, and anti-K (Kell).',0.65,6.22,11.8,0.3,17,RED,True); footer(s) #4 s=prs.slides.add_slide(blank); title(s,'Risk recognition','When can sensitization occur?',None,4) left=['Delivery or miscarriage','Ectopic pregnancy or abortion','Antepartum bleeding / abruption','Abdominal trauma'] right=['Amniocentesis or CVS','External cephalic version','Fetal death','Prior incompatible blood transfusion'] for col,items,x in [('A',left,0.75),('B',right,6.85)]: for i,it in enumerate(items): y=1.95+i*1.05; rect(s,x,y,5.5,0.76,WHITE,True,RGBColor(220,229,237)); rect(s,x+0.18,y+0.17,0.42,0.42,RED if i<2 else GOLD,True); text(s,'+',x+0.18,y+0.23,0.42,0.15,14,WHITE,True,PP_ALIGN.CENTER); text(s,it,x+0.8,y+0.22,4.3,0.26,19,INK,True) text(s,'Principle: Any event that disrupts the fetoplacental barrier may require RhIG in an unsensitized RhD-negative patient.',0.77,6.25,11.6,0.52,17,NAVY,True); footer(s) #5 s=prs.slides.add_slide(blank); title(s,'Screening','First prenatal visit: test early',None,5) rect(s,0.72,1.9,4.0,3.95,PALE,True); text(s,'1',1.0,2.22,0.6,0.45,32,TEAL,True); text(s,'ABO and RhD group',1.0,2.95,3.2,0.35,21,NAVY,True); text(s,'Identify RhD-negative status.',1.0,3.52,3.15,0.45,16,SLATE) rect(s,4.95,1.9,4.0,3.95,MINT,True); text(s,'2',5.23,2.22,0.6,0.45,32,TEAL,True); text(s,'Antibody screen',5.23,2.95,3.2,0.35,21,NAVY,True); text(s,'Indirect antiglobulin test (indirect Coombs).',5.23,3.52,3.1,0.6,16,SLATE) rect(s,9.18,1.9,3.4,3.95,RGBColor(255,246,232),True); text(s,'3',9.46,2.22,0.6,0.45,32,GOLD,True); text(s,'If positive',9.46,2.95,2.5,0.35,21,NAVY,True); text(s,'Identify antibody, assess clinical significance, and obtain a titer.',9.46,3.52,2.5,1.1,16,SLATE) text(s,'Use the same laboratory for serial titers when possible.',0.75,6.25,11.5,0.3,18,RED,True); footer(s) #6 s=prs.slides.add_slide(blank); title(s,'Sensitized pregnancy','Risk assessment and fetal surveillance',None,6) rect(s,0.68,1.78,6.0,4.92,WHITE,True,RGBColor(220,229,237)); text(s,'Maternal assessment',1.0,2.08,4.5,0.3,21,NAVY,True) bullets(s,['Identify the antibody and measure the titer.','Assess paternal antigen status/zygosity when useful.','Consider fetal antigen genotyping, including cell-free fetal DNA where available.','Past history of a severely affected fetus/newborn raises risk.'],1.0,2.66,5.2,3.2,18) rect(s,7.08,1.78,5.5,4.92,MINT,True); text(s,'When fetal risk is significant',7.4,2.08,4.5,0.3,21,NAVY,True) add_pic(s,DOP,7.44,2.67,2.65,2.0); text(s,'Serial MCA peak systolic velocity (MCA-PSV) Doppler is the preferred noninvasive screen for fetal anemia.',10.3,2.75,1.95,1.9,16,INK,True) text(s,'MCA-PSV >1.5 MoM suggests moderate or severe fetal anemia.',7.42,5.25,4.65,0.57,17,RED,True); footer(s) #7 s=prs.slides.add_slide(blank); title(s,'Treatment','Management of fetal anemia',None,7) rect(s,0.73,1.85,11.9,0.95,NAVY,True); text(s,'Refer early to maternal-fetal medicine / fetal therapy center',1.05,2.15,11.2,0.3,22,WHITE,True,PP_ALIGN.CENTER) for i,(h,b,c) in enumerate([('Confirm severity','Specialist assessment, often cordocentesis if indicated.',BLUE),('Correct anemia','Intrauterine transfusion with compatible antigen-negative red cells.',RED),('Plan birth','Repeat transfusions as needed; time delivery with neonatal team.',TEAL)]): x=0.85+i*4.05; rect(s,x,3.35,3.58,2.35,WHITE,True,RGBColor(220,229,237)); rect(s,x+0.23,3.62,0.52,0.52,c,True); text(s,str(i+1),x+0.23,3.76,0.52,0.16,14,WHITE,True,PP_ALIGN.CENTER); text(s,h,x+0.23,4.36,2.9,0.3,19,NAVY,True); text(s,b,x+0.23,4.88,2.95,0.55,15,SLATE) text(s,'At birth: assess hemoglobin, bilirubin, blood group and direct antiglobulin test; treat jaundice/anemia as required.',0.78,6.25,11.7,0.36,16,SLATE); footer(s) #8 s=prs.slides.add_slide(blank); title(s,'Prevention','Rh immune globulin (RhIG) pathway',None,8) text(s,'For RhD-negative, non-sensitized patients',0.75,1.55,6.2,0.3,18,TEAL,True) items=[('Booking','Antibody screen'),('28 weeks','Repeat screen then RhIG 300 micrograms if anti-D absent'),('Sensitizing event','RhIG, ideally within 72 hours when indicated'),('After birth','RhIG within 72 hours if infant is RhD-positive; quantify large FMH for extra dosing')] for i,(a,b) in enumerate(items): y=2.05+i*1.03; rect(s,0.78,y,11.85,0.72,WHITE,True,RGBColor(220,229,237)); rect(s,1.0,y+0.11,1.85,0.49,TEAL if i!=2 else GOLD,True); text(s,a,1.05,y+0.24,1.75,0.17,13,WHITE,True,PP_ALIGN.CENTER); text(s,b,3.15,y+0.19,8.8,0.27,17,INK,True) text(s,'RhIG prevents sensitization. It does not treat established alloimmunization.',0.82,6.37,11.4,0.34,18,RED,True); footer(s) #9 s=prs.slides.add_slide(blank); title(s,'Take-home points','Five messages to remember',None,9) points=[('Screen every pregnancy','ABO/RhD typing plus antibody screen at booking.'),('Know the high-risk antibodies','Anti-D, anti-c and anti-K can cause severe HDFN.'),('Do not use RhIG after sensitization','It is prophylaxis only for unsensitized RhD-negative patients.'),('Use MCA Doppler','MCA-PSV detects fetal anemia noninvasively.'),('Escalate early','Refer at-risk pregnancies to maternal-fetal medicine.')] for i,(h,b) in enumerate(points): y=1.65+i*0.92; rect(s,0.75,y,11.85,0.68,WHITE,True,RGBColor(220,229,237)); rect(s,0.96,y+0.11,0.46,0.46,TEAL,True); text(s,'✓',0.96,y+0.20,0.46,0.17,14,WHITE,True,PP_ALIGN.CENTER); text(s,h,1.7,y+0.13,3.2,0.25,17,NAVY,True); text(s,b,4.7,y+0.13,7.15,0.3,16,SLATE) text(s,'Sources: Creasy & Resnik’s Maternal-Fetal Medicine, red-cell alloimmunization chapter; ACOG Practice Bulletin 181 (2017).',0.78,6.62,11.7,0.25,10,SLATE); footer(s,'For education only - use local transfusion and obstetric guidelines for patient care.') prs.save(OUT) print(OUT) ''') PY python "/tmp/workspace/isoimmunization-ppt/src/create_deck.py" python - <<'PY' from pptx import Presentation p='/tmp/workspace/isoimmunization-ppt/output/Isoimmunization_in_Pregnancy.pptx' prs=Presentation(p) print('slides',len(prs.slides), 'size',__import__('os').path.getsize(p)) for i,s in enumerate(prs.slides,1): print(i,len(s.shapes)) PY
~/isoimmunization-ppt/src/create_deck.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/isoimmunization-ppt/src/create_deck.py'
python "/tmp/workspace/isoimmunization-ppt/src/create_deck.py" && python - <<'PY' from pptx import Presentation import os p='/tmp/workspace/isoimmunization-ppt/output/Isoimmunization_in_Pregnancy.pptx' prs=Presentation(p) print('slides',len(prs.slides),'bytes',os.path.getsize(p)) for i,s in enumerate(prs.slides,1): print(i, len(s.shapes)) PY
~/isoimmunization-ppt/src/create_deck.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/isoimmunization-ppt/src/create_deck.py'
python "/tmp/workspace/isoimmunization-ppt/src/create_deck.py" && python - <<'PY' from pptx import Presentation import os p='/tmp/workspace/isoimmunization-ppt/output/Isoimmunization_in_Pregnancy.pptx' prs=Presentation(p) print('slides',len(prs.slides),'bytes',os.path.getsize(p)) for i,s in enumerate(prs.slides,1): texts=[sh.text for sh in s.shapes if hasattr(sh,'text_frame') and sh.text.strip()] print(i, len(s.shapes), len(texts)) PY
python - <<'PY' from pptx import Presentation from pathlib import Path p=Path('/tmp/workspace/isoimmunization-ppt/output/Isoimmunization_in_Pregnancy.pptx') prs=Presentation(p) assert len(prs.slides)==9 for i,slide in enumerate(prs.slides,1): for shape in slide.shapes: assert shape.left >= 0 and shape.top >= 0, (i,'negative position') assert shape.left+shape.width <= prs.slide_width+1000, (i,'out of bounds x') assert shape.top+shape.height <= prs.slide_height+1000, (i,'out of bounds y') print(f'Validated {len(prs.slides)} slides; file is {p.stat().st_size:,} bytes.') PY
Isoimmunization in Pregnancy
Presentation · PPTX
It is not downloadable please make it soo
~/
~/isoimmunization-ppt/output
cp "/tmp/workspace/isoimmunization-ppt/output/Isoimmunization_in_Pregnancy.pptx" "/tmp/workspace/Isoimmunization_in_Pregnancy.pptx" && python - <<'PY' from pathlib import Path p=Path('/tmp/workspace/Isoimmunization_in_Pregnancy.pptx') print(p.exists(), p.stat().st_size) PY
Isoimmunization in Pregnancy
Presentation · PPTX
Make ppt with all the text content
~/
~/isoimmunization-ppt
python - <<'PY' from pathlib import Path p=Path('/tmp/workspace/isoimmunization-ppt/src/create_detailed_deck.py') p.write_text(r''' from pptx import Presentation from pptx.util import Inches, Pt from pptx.dml.color import RGBColor from pptx.enum.shapes import MSO_SHAPE from pptx.enum.text import PP_ALIGN, MSO_ANCHOR from PIL import Image from pathlib import Path OUT='/tmp/workspace/isoimmunization-ppt/output/Isoimmunization_in_Pregnancy_Detailed.pptx' AS='/tmp/workspace/isoimmunization-ppt/assets'; MECH=f'{AS}/alloimmunization_mechanism.png'; DOP=f'{AS}/mca_doppler.jpg' prs=Presentation(); prs.slide_width=Inches(13.333); prs.slide_height=Inches(7.5); blank=prs.slide_layouts[6] NAVY=RGBColor(13,44,73); TEAL=RGBColor(20,148,150); BLUE=RGBColor(31,112,166); BG=RGBColor(248,250,252); INK=RGBColor(29,43,57); SLATE=RGBColor(83,100,118); WHITE=RGBColor(255,255,255); MINT=RGBColor(226,246,243); PALE=RGBColor(239,246,251); GOLD=RGBColor(231,167,62); RED=RGBColor(194,61,74); LINE=RGBColor(218,228,235) def box(s,x,y,w,h,c,r=False,line=None): sh=s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE if r else MSO_SHAPE.RECTANGLE,Inches(x),Inches(y),Inches(w),Inches(h)); sh.fill.solid(); sh.fill.fore_color.rgb=c; sh.line.color.rgb=line or c if r: sh.adjustments[0]=.1 return sh def txt(s,t,x,y,w,h,sz=18,c=INK,b=False,a=PP_ALIGN.LEFT): tb=s.shapes.add_textbox(Inches(x),Inches(y),Inches(w),Inches(h)); tf=tb.text_frame; tf.clear(); tf.word_wrap=True; tf.margin_left=tf.margin_right=tf.margin_top=tf.margin_bottom=0 p=tf.paragraphs[0]; p.alignment=a; r=p.add_run(); r.text=t; r.font.name='Aptos'; r.font.size=Pt(sz); r.font.bold=b; r.font.color.rgb=c; return tb def bullets(s,items,x,y,w,h,sz=16): tb=s.shapes.add_textbox(Inches(x),Inches(y),Inches(w),Inches(h)); tf=tb.text_frame; tf.clear(); tf.word_wrap=True; tf.margin_left=Inches(.05); tf.margin_right=0; tf.margin_top=0; tf.margin_bottom=0 for i,t in enumerate(items): p=tf.paragraphs[0] if i==0 else tf.add_paragraph(); p.text=t; p.bullet=True; p.font.name='Aptos'; p.font.size=Pt(sz); p.font.color.rgb=INK; p.space_after=Pt(7) return tb def pic(s,path,x,y,w,h): im=Image.open(path); ratio=im.width/im.height; tr=w/h; p=s.shapes.add_picture(path,Inches(x),Inches(y),width=Inches(w),height=Inches(h)) if ratio>tr: p.crop_left=p.crop_right=(ratio-tr)/ratio/2 else: p.crop_top=p.crop_bottom=(1-ratio/tr)/2 def head(s,k,h,n,sub=''): box(s,0,0,13.333,7.5,BG); box(s,0,0,.16,7.5,TEAL); txt(s,k.upper(),.55,.35,6,.22,11,TEAL,True); txt(s,h,.55,.68,11.8,.5,28,NAVY,True); txt(s,str(n).zfill(2),12.15,.39,.6,.2,11,SLATE,True,PP_ALIGN.RIGHT) if sub: txt(s,sub,.56,1.26,11.4,.28,14,SLATE) def foot(s,source='Educational summary | Adapt management to local obstetric and transfusion protocols'): box(s,.55,7.08,12.2,.012,LINE); txt(s,source,.56,7.16,11.8,.15,9,SLATE) def card(s,x,y,w,h,title,body,accent=TEAL): box(s,x,y,w,h,WHITE,True,LINE); box(s,x,y,.1,h,accent); txt(s,title,x+.25,y+.23,w-.4,.28,18,NAVY,True); bullets(s,body,x+.22,y+.7,w-.45,h-.85,15) # 1 s=prs.slides.add_slide(blank); box(s,0,0,13.333,7.5,NAVY); box(s,0,0,.18,7.5,TEAL); txt(s,'OBSTETRICS | FETAL MEDICINE',.7,.7,5,.25,13,RGBColor(123,220,211),True); txt(s,'Isoimmunization\nin Pregnancy',.7,1.35,6.3,1.5,36,WHITE,True); txt(s,'Complete teaching presentation: recognition, prevention, surveillance and treatment',.72,3.18,5.7,.4,17,RGBColor(214,231,241)); pic(s,MECH,7.1,.5,5.7,6.05); txt(s,'Red-cell alloimmunization and hemolytic disease of the fetus and newborn (HDFN)',.72,5.2,5.8,.6,17,WHITE); txt(s,'Prepared for teaching use',.72,6.9,3,.2,10,RGBColor(160,190,211)) #2 s=prs.slides.add_slide(blank); head(s,'Definition','What is isoimmunization?',2,'Also called red-cell alloimmunization') card(s,.7,1.8,5.8,4.65,'Definition',['A pregnant person forms IgG antibodies against fetal red-cell antigens inherited from the father but absent in the mother.','Maternal IgG crosses the placenta and can cause hemolytic disease of the fetus and newborn (HDFN).'],TEAL) card(s,6.82,1.8,5.8,4.65,'Main examples',['Classic: RhD-negative mother carrying an RhD-positive fetus, resulting in anti-D antibody.','Important non-D antibodies: anti-c (Rh system) and anti-Kell (anti-K).','ABO incompatibility is common but generally less severe.'],BLUE); foot(s) #3 s=prs.slides.add_slide(blank); head(s,'Mechanism','How sensitization and fetal disease occur',3) pic(s,MECH,.68,1.72,5.45,3.2); card(s,6.55,1.72,5.95,4.55,'Sequence',['Fetal red cells enter the maternal circulation.','The mother becomes immunized and produces IgG antibodies.','In a later antigen-positive pregnancy, IgG crosses the placenta.','Fetal red cells are destroyed, causing anemia.','Progression: high-output cardiac failure, hydrops fetalis, stillbirth, or neonatal jaundice and kernicterus.'],RED); txt(s,'Sensitization may occur during pregnancy, but the largest fetomaternal hemorrhages are commonly around labor and delivery.',.7,5.55,11.6,.45,16,NAVY,True); foot(s) #4 s=prs.slides.add_slide(blank); head(s,'Causes','Events associated with fetomaternal hemorrhage',4) card(s,.7,1.75,5.85,4.85,'Pregnancy-related events',['Delivery','Miscarriage, ectopic pregnancy, abortion, or molar pregnancy','Antepartum bleeding or placental abruption','Abdominal trauma','Fetal death'],RED) card(s,6.78,1.75,5.85,4.85,'Procedures and other causes',['Amniocentesis, chorionic-villus sampling, or cordocentesis','External cephalic version','Prior incompatible red-cell transfusion','Any event that breaches the fetoplacental barrier can create risk.'],GOLD); foot(s) #5 s=prs.slides.add_slide(blank); head(s,'Screening','Initial antenatal assessment',5) for i,(h,b,c) in enumerate([('1. Blood group','ABO and RhD typing at the first prenatal visit.',TEAL),('2. Antibody screen','Indirect antiglobulin test, also called the indirect Coombs test.',BLUE),('3. Positive screen','Identify the antibody, determine clinical significance, and obtain a titer.',GOLD)]): x=.75+i*4.1; box(s,x,2,3.7,3.5,WHITE,True,LINE); box(s,x+.25,2.28,.5,.5,c,True); txt(s,str(i+1),x+.25,2.39,.5,.16,14,WHITE,True,PP_ALIGN.CENTER); txt(s,h,x+.28,3.08,3.05,.45,20,NAVY,True); txt(s,b,x+.28,3.75,3.0,1.0,16,SLATE) txt(s,'If an antibody is found: consider paternal antigen status/zygosity and fetal antigen testing, including cell-free fetal DNA where available.',.78,6.05,11.7,.5,17,NAVY,True); foot(s) #6 s=prs.slides.add_slide(blank); head(s,'Antibody titers','Interpreting a sensitized pregnancy',6) card(s,.72,1.72,5.7,4.9,'Titer principles',['Measure serially in the same laboratory when possible.','A critical titer is linked with significant risk of fetal hydrops and prompts fetal surveillance.','Common threshold: 1:16 for anti-D and many other antibodies.','A previous severely affected fetus/newborn requires early specialist surveillance rather than relying on titers alone.'],TEAL) card(s,6.82,1.72,5.7,4.9,'Anti-Kell is different',['Anti-Kell can produce severe fetal anemia at relatively low titers.','It causes hemolysis and may suppress fetal erythropoiesis.','Titers correlate less reliably with disease severity.','A critical titer around 1:4 is often used to begin surveillance.'],RED); foot(s,'Thresholds vary by laboratory and local maternal-fetal medicine protocol.') #7 s=prs.slides.add_slide(blank); head(s,'Surveillance','Detecting fetal anemia',7) card(s,.72,1.76,5.65,4.85,'Who needs surveillance?',['Fetus is antigen-positive or antigen status is unknown with significant maternal antibody risk.','Critical titer reached or previous affected pregnancy.','Specialist fetal-medicine follow-up is required.'],TEAL) box(s,6.78,1.76,5.8,4.85,MINT,True); txt(s,'MCA-PSV Doppler',7.05,2.05,4,.3,21,NAVY,True); pic(s,DOP,7.05,2.63,2.75,2.05); txt(s,'Serial middle cerebral artery peak systolic velocity Doppler is the preferred noninvasive screen for fetal anemia.',10.1,2.7,2.1,1.35,15,INK,True); txt(s,'MCA-PSV >1.5 multiples of the median suggests moderate or severe fetal anemia.',7.05,5.18,4.9,.48,17,RED,True); foot(s,'MCA Doppler has largely replaced amniotic-fluid bilirubin measurement for this purpose.') #8 s=prs.slides.add_slide(blank); head(s,'Treatment','Management of established fetal anemia',8) card(s,.72,1.7,3.8,4.85,'Confirm',['Urgent evaluation at a fetal therapy center.','Cordocentesis may be used to confirm anemia when indicated.'],BLUE) card(s,4.78,1.7,3.8,4.85,'Correct',['Intrauterine transfusion of compatible, antigen-negative packed red cells.','Serial transfusions may be needed until delivery is safer.'],RED) card(s,8.84,1.7,3.8,4.85,'Deliver and support',['Delivery is timed using severity, fetal status, transfusion history and neonatal support.','Neonatal care: assess cord blood group/Rh, direct antiglobulin test, hemoglobin and bilirubin.','Treat with phototherapy, transfusion, or exchange transfusion as required.'],TEAL); foot(s) #9 s=prs.slides.add_slide(blank); head(s,'Prevention','Rh immune globulin (RhIG)',9) card(s,.7,1.72,5.85,4.8,'Routine prophylaxis',['For RhD-negative, non-sensitized patients.','First prenatal visit: antibody screen.','At 28 weeks: repeat antibody screen, then RhIG 300 micrograms if anti-D is absent.','RhIG prevents sensitization but does not treat established sensitization.'],TEAL) card(s,6.78,1.72,5.85,4.8,'After a sensitizing event',['Administer RhIG when indicated, ideally within 72 hours.','At delivery: give RhIG within 72 hours if the infant is RhD-positive.','Assess fetomaternal hemorrhage to determine whether extra RhIG is needed.'],GOLD); foot(s) #10 s=prs.slides.add_slide(blank); head(s,'RhIG dosing','Key practical details',10) card(s,.7,1.73,5.85,4.8,'Standard and early doses',['A 300-microgram dose covers approximately 30 mL of fetal whole blood in maternal circulation.','A 50-microgram dose has historically been used through 12 weeks because fetal blood volume is small.','Local availability and contemporary early-pregnancy guidance differ.'],TEAL) card(s,6.78,1.73,5.85,4.8,'Postpartum fetomaternal hemorrhage testing',['Screen after delivery, often with rosette test.','If positive, quantify with Kleihauer-Betke stain or flow cytometry.','Use the result to calculate additional RhIG dosing.'],BLUE); foot(s) #11 s=prs.slides.add_slide(blank); head(s,'Early pregnancy','Loss, abortion, and ectopic pregnancy',11) box(s,.7,1.75,11.9,4.85,WHITE,True,LINE); txt(s,'Important update',1.02,2.12,4,.35,22,NAVY,True); bullets(s,['Guidance on Rh testing and RhIG after pregnancy loss or abortion before 12 weeks has evolved and can vary by setting.','Recent ACOG guidance advises against routine Rh testing and RhIG in many cases of abortion or pregnancy loss at less than 12 weeks.','Clinical circumstances may differ: later gestation, surgical procedures, substantial bleeding, ectopic pregnancy, and local transfusion-service protocols require individualized decisions.','Follow the applicable obstetric and transfusion protocol.'],1.02,2.78,10.8,3.05,18); txt(s,'RhIG should never delay urgent care for bleeding, ectopic pregnancy, or hemodynamic instability.',1.02,5.95,10.5,.3,17,RED,True); foot(s) #12 s=prs.slides.add_slide(blank); head(s,'High-yield distinctions','Common exam and clinical points',12) pts=[('RhIG is prophylaxis only','Use it for RhD-negative, non-sensitized patients.'),('Passive vs immune anti-D','A positive anti-D screen after recent RhIG can represent passive antibody, not true sensitization.'),('Anti-Kell deserves caution','Severe anemia can occur at low titers.'),('Fetal genotype matters','If fetus lacks target antigen, unnecessary surveillance may be avoided.'),('Prior severe disease changes care','Begin early maternal-fetal medicine surveillance rather than relying on titer alone.')] for i,(a,b) in enumerate(pts): y=1.63+i*.93; box(s,.75,y,11.85,.68,WHITE,True,LINE); box(s,.97,y+.12,.45,.44,TEAL,True); txt(s,'✓',.97,y+.2,.45,.15,13,WHITE,True,PP_ALIGN.CENTER); txt(s,a,1.68,y+.13,3.4,.25,17,NAVY,True); txt(s,b,5.05,y+.13,6.7,.3,16,SLATE) foot(s) #13 s=prs.slides.add_slide(blank); head(s,'Summary','Take-home message',13) box(s,.75,1.75,11.8,3.7,NAVY,True); txt(s,'Prevent sensitization. Identify at-risk fetuses. Detect anemia early. Refer promptly.',1.1,2.15,11.0,.65,28,WHITE,True,PP_ALIGN.CENTER); txt(s,'1. Screen every pregnancy.\n2. Give RhIG appropriately to an unsensitized RhD-negative patient.\n3. For a sensitized at-risk pregnancy, use specialist surveillance with MCA-PSV Doppler.\n4. Treat severe fetal anemia with fetal-therapy expertise and intrauterine transfusion when needed.',1.35,3.15,10.5,1.65,20,RGBColor(219,235,244),False,PP_ALIGN.CENTER) txt(s,'Key sources',.78,5.85,2,.25,15,TEAL,True); txt(s,'Creasy & Resnik’s Maternal-Fetal Medicine: Principles and Practice, red-cell alloimmunization chapter. ACOG Practice Bulletin No. 181: Prevention of Rh D Alloimmunization (2017).',.78,6.2,11.5,.38,13,SLATE); foot(s,'Educational presentation. Clinical management must be individualized by obstetric and fetal-medicine teams.') prs.save(OUT); print(OUT) ''') PY python "/tmp/workspace/isoimmunization-ppt/src/create_detailed_deck.py" cp "/tmp/workspace/isoimmunization-ppt/output/Isoimmunization_in_Pregnancy_Detailed.pptx" "/tmp/workspace/Isoimmunization_in_Pregnancy_Detailed.pptx" python - <<'PY' from pptx import Presentation from pathlib import Path p=Path('/tmp/workspace/Isoimmunization_in_Pregnancy_Detailed.pptx'); q=Presentation(p); assert len(q.slides)==13 for i,s in enumerate(q.slides,1): for sh in s.shapes: assert sh.left>=0 and sh.top>=0 and sh.left+sh.width<=q.slide_width+1000 and sh.top+sh.height<=q.slide_height+1000 print('Validated slides:',len(q.slides),'bytes:',p.stat().st_size) PY
Isoimmunization in Pregnancy Detailed
Presentation · PPTX