Make me an ppt on prenatal biochemical examination, biochemical test of pregnant women Which should include Aim Period of pregnancy Which biochemical substance will be checked Comment on result ADD PHOTOS WHERE NEEDED This all topics within 10 ppt slides With introduction slide of topic prenatal biochemical examination Created by - GAJERA JAY AMRUTBHAI BATCH - LA4-212(1)
prenatal screening biochemical
ACOG prenatal genetic screening serum biochemical screening first trimester second trimester patient guidance
~/
first trimester combined prenatal screening ultrasound nuchal translucency diagram maternal serum PAPP-A free beta hCG
quad screen maternal serum AFP hCG unconjugated estriol inhibin A diagram prenatal screening
Educational realistic clinical photograph of a pregnant woman at a prenatal clinic having a blood sample collected by a nurse, non-identifiable adult patient, safe professional setting, no text
https://www.acog.org/womens-health/faqs/prenatal-genetic-scr…
Educational realistic ultrasound examination in a prenatal clinic, sonographer performing first trimester fetal ultrasound, monitor showing a small fetus, non-identifiable adult patient, professional medical photograph, no text
mkdir -p "/tmp/workspace/prenatal-biochemical-examination/src" "/tmp/workspace/prenatal-biochemical-examination/output" "/tmp/workspace/prenatal-biochemical-examination/assets" && python /tmp/skills/shared/scripts/fetch_images.py "https://cdn.orris.care/image-gen/7ba9f667417342038a997afef980b9f8.png" "https://cdn.orris.care/image-gen/7884ce5a6ab246a68accbaadc0d9d92f.png" > "/tmp/workspace/prenatal-biochemical-examination/assets/fetched_images.json"
python -c "import json,base64; from pathlib import Path; d=json.load(open('/tmp/workspace/prenatal-biochemical-examination/assets/fetched_images.json')); [Path('/tmp/workspace/prenatal-biochemical-examination/assets/img%d.png'%i).write_bytes(base64.b64decode(x['base64'].split(',',1)[1])) for i,x in enumerate(d) if x.get('base64')]" && printf "assets prepared"
Make me an ppt on prenatal biochemical examination, biochemical test of pregnant women Which should include Aim Period of pregnancy Which biochemical substance will be checked Comment on result ADD PHOTOS WHERE NEEDED This all topics within 10 ppt slides With introduction slide of topic prenatal biochemical examination Created by - GAJERA JAY AMRUTBHAI BATCH - LA4-212(1)
~/
prenatal screening biochemical
ACOG prenatal genetic screening tests first trimester PAPP-A hCG quad test AFP estriol inhibin A
Which section should receive the most detailed treatment in the final 10-slide PPT?
~/prenatal-biochemical-examination
ACOG prenatal genetic screening test first trimester PAPP-A free beta hCG quad screen result interpretation
python - <<'PY' from pathlib import Path p=Path('/tmp/workspace/prenatal-biochemical-examination/src/create_ppt.py') print(p.exists()) PY
python - <<'PY' from pathlib import Path p=Path('/tmp/workspace/prenatal-biochemical-examination/src/create_ppt.py') p.write_text(r'''from pptx import Presentation from pptx.util import Inches, Pt from pptx.enum.text import PP_ALIGN, MSO_ANCHOR from pptx.enum.shapes import MSO_SHAPE from pptx.dml.color import RGBColor from pptx.enum.dml import MSO_THEME_COLOR from pptx.enum.text import MSO_AUTO_SIZE from pathlib import Path ROOT=Path('/tmp/workspace/prenatal-biochemical-examination') OUT=ROOT/'output'/'Prenatal_Biochemical_Examination_GAJERA_JAY_AMRUTBHAI.pptx' IMG_BLOOD=ROOT/'assets'/'img0.png' IMG_US=ROOT/'assets'/'img1.png' prs=Presentation(); prs.slide_width=Inches(13.333); prs.slide_height=Inches(7.5) blank=prs.slide_layouts[6] # palette NAVY=RGBColor(20,51,79); TEAL=RGBColor(19,128,137); AQUA=RGBColor(218,242,241) CREAM=RGBColor(248,250,249); INK=RGBColor(35,48,58); MUTED=RGBColor(92,108,118) ORANGE=RGBColor(235,143,73); RED=RGBColor(183,65,65); GREEN=RGBColor(45,130,91); WHITE=RGBColor(255,255,255); GREY=RGBColor(224,231,233) def rect(sl,x,y,w,h,fill, radius=False, line=None): s=sl.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE if radius else MSO_SHAPE.RECTANGLE, Inches(x), Inches(y), Inches(w), Inches(h)) s.fill.solid(); s.fill.fore_color.rgb=fill s.line.color.rgb = line if line else fill if radius: s.adjustments[0]=0.12 return s def text(sl,txt,x,y,w,h,size=18,color=INK,bold=False,align=None,font='Aptos',valign=None): box=sl.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h)) tf=box.text_frame; tf.clear(); tf.word_wrap=True tf.margin_left=Inches(.03); tf.margin_right=Inches(.03); tf.margin_top=Inches(.02); tf.margin_bottom=Inches(.02) p=tf.paragraphs[0]; p.text=txt p.font.name=font; p.font.size=Pt(size); p.font.bold=bold; p.font.color.rgb=color if align: p.alignment=align if valign: tf.vertical_anchor=valign return box def title(sl,heading,kicker=None): rect(sl,0,0,13.333,.18,TEAL) if kicker: text(sl,kicker.upper(),.65,.38,10,.25,10,TEAL,True) text(sl,heading,.65,.67,12,.6,27,NAVY,True) def footer(sl,num): rect(sl,.65,7.08,12.03,.012,GREY) text(sl,'Prenatal Biochemical Examination',.65,7.15,4,.18,9,MUTED) text(sl,str(num).zfill(2),12.1,7.12,.55,.2,9,TEAL,True,PP_ALIGN.RIGHT) def bullet(sl,items,x,y,w,fs=16,color=INK,space=8): box=sl.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(5.7)) tf=box.text_frame; tf.clear(); tf.word_wrap=True tf.margin_left=Inches(.08); tf.margin_right=Inches(.03) 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(fs); p.font.color.rgb=color; p.space_after=Pt(space); p.bullet=True return box def image_crop(sl,path,x,y,w,h): # fit image cover using crop from PIL import Image im=Image.open(path); iw,ih=im.size; ar=iw/ih; target=w/h pic=sl.shapes.add_picture(str(path), Inches(x), Inches(y), width=Inches(w), height=Inches(h)) if ar>target: pic.crop_left=pic.crop_right=(1-target/ar)/2 else: pic.crop_top=pic.crop_bottom=(1-ar/target)/2 return pic def card(sl,x,y,w,h,hd,body,accent=TEAL): rect(sl,x,y,w,h,WHITE,True,GREY); rect(sl,x,y,.09,h,accent,False) text(sl,hd,x+.28,y+.24,w-.5,.28,15,NAVY,True) text(sl,body,x+.28,y+.67,w-.5,h-.82,12.5,INK) # 1 title s=prs.slides.add_slide(blank); rect(s,0,0,13.333,7.5,NAVY) rect(s,0,0,13.333,.18,TEAL); rect(s,.7,.78,.11,4.8,ORANGE) text(s,'PRENATAL\nBIOCHEMICAL\nEXAMINATION',1.05,1.05,6.2,2.25,31,WHITE,True) text(s,'Maternal serum screening during pregnancy',1.08,3.68,5.6,.35,17,RGBColor(208,232,234)) text(s,'Created by • GAJERA JAY AMRUTBHAI\nBatch • LA4-212(1)',1.08,5.35,4.8,.55,15,WHITE,True) image_crop(s,IMG_BLOOD,7.6,.45,5.1,6.6); rect(s,7.6,.45,5.1,6.6,RGBColor(0,0,0)) # fix overlay transparency impossible, keep image visible after add? overlay made opaque. remove last shape fill transparency s.shapes._spTree.remove(s.shapes[-1]._element) text(s,'10-slide academic presentation',8.05,6.55,3.6,.25,10,WHITE,True) # 2 intro s=prs.slides.add_slide(blank); rect(s,0,0,13.333,7.5,CREAM); title(s,'Introduction','What is prenatal biochemical examination') image_crop(s,IMG_BLOOD,.65,1.55,4.2,4.85) card(s,5.35,1.55,6.95,1.18,'Definition','Maternal blood tests that measure pregnancy-related biochemical markers and estimate the chance of selected fetal conditions.') card(s,5.35,2.95,3.28,1.55,'What it can screen for','• Common aneuploidies\n• Open neural-tube defects\n• Some placental risks',ORANGE) card(s,9.02,2.95,3.28,1.55,'What it cannot do','It does not establish a diagnosis. Results must be interpreted with clinical details and imaging.',RED) text(s,'Sample type: maternal venous blood | Interpretation is adjusted for gestational age and other factors.',5.35,5.25,6.7,.45,14,TEAL,True) footer(s,2) # 3 Aim s=prs.slides.add_slide(blank); rect(s,0,0,13.333,7.5,CREAM); title(s,'Aim of biochemical screening','Purpose') for i,(n,hd,body,c) in enumerate([('01','Estimate risk','Identify pregnancies with increased chance of trisomy 21, trisomy 18, trisomy 13 or open neural-tube defect.',TEAL),('02','Guide care','Select patients who may benefit from targeted ultrasound, genetic counselling, cfDNA screening or diagnostic testing.',ORANGE),('03','Support informed choice','Provide risk information early enough for discussion of options and appropriate follow-up.',GREEN)]): x=.75+i*4.15; rect(s,x,1.75,3.6,3.65,WHITE,True,GREY); rect(s,x,1.75,3.6,.12,c); text(s,n,x+.28,2.12,1,.35,26,c,True); text(s,hd,x+.28,2.75,2.95,.35,18,NAVY,True); text(s,body,x+.28,3.35,2.95,1.45,14,INK) text(s,'Key point: screening estimates probability. It is not a diagnostic test.',1.3,6.02,10.8,.35,18,NAVY,True,PP_ALIGN.CENTER) footer(s,3) # 4 timing s=prs.slides.add_slide(blank); rect(s,0,0,13.333,7.5,CREAM); title(s,'Period of pregnancy','When to test') # timeline rect(s,1.0,3.35,11.2,.16,NAVY,True); for x,w,c,hd,sub in [(1.25,2.55,TEAL,'10-13+6 weeks','First trimester'),(4.35,2.25,ORANGE,'15-22 weeks','Quad test'),(7.25,3.25,GREEN,'18-22 weeks','Anatomy ultrasound')]: rect(s,x,2.25,w,.75,c,True); text(s,hd,x+.12,2.42,w-.2,.2,15,WHITE,True,PP_ALIGN.CENTER); text(s,sub,x+.12,2.7,w-.2,.18,10,WHITE,False,PP_ALIGN.CENTER); rect(s,x+w/2-.06,3.13,.12,.62,c,True) text(s,'First trimester combined screen',1.25,4.12,2.55,.35,14,NAVY,True,PP_ALIGN.CENTER); text(s,'PAPP-A + free β-hCG + NT ultrasound',1.1,4.52,2.85,.55,13,INK,False,PP_ALIGN.CENTER) text(s,'Second trimester serum screening',4.35,4.12,2.25,.35,14,NAVY,True,PP_ALIGN.CENTER); text(s,'AFP + hCG + uE3 + inhibin A',4.15,4.52,2.65,.55,13,INK,False,PP_ALIGN.CENTER) text(s,'Structural assessment',7.25,4.12,3.25,.35,14,NAVY,True,PP_ALIGN.CENTER); text(s,'Brain, spine, heart, abdomen and limbs',7.2,4.52,3.35,.4,13,INK,False,PP_ALIGN.CENTER) text(s,'Exact accepted gestational-age windows may differ slightly by laboratory and national protocol.',1.25,5.85,10.8,.3,13,MUTED,False,PP_ALIGN.CENTER) footer(s,4) # 5 First trim s=prs.slides.add_slide(blank); rect(s,0,0,13.333,7.5,CREAM); title(s,'First-trimester combined screening','10 to 13+6 weeks') image_crop(s,IMG_US,.65,1.52,4.05,4.9) card(s,5.15,1.52,3.1,1.5,'PAPP-A','Pregnancy-associated plasma protein A. A placental protein measured in maternal serum.',TEAL) card(s,8.55,1.52,3.1,1.5,'Free β-hCG','Free beta subunit of human chorionic gonadotropin, measured in maternal serum.',ORANGE) card(s,5.15,3.35,6.5,1.7,'Nuchal translucency (NT)','Ultrasound measurement of fluid space at the fetal neck. The biochemical results are interpreted together with NT and maternal factors.',GREEN) text(s,'Outputs: an adjusted risk estimate for fetal aneuploidy, not a yes/no diagnosis.',5.15,5.55,6.6,.42,15,NAVY,True) footer(s,5) # 6 First comments s=prs.slides.add_slide(blank); rect(s,0,0,13.333,7.5,CREAM); title(s,'First-trimester result comments','Typical patterns') headers=['Condition','PAPP-A','Free β-hCG','NT / comment'] rows=[['Trisomy 21\n(Down syndrome)','↓','↑','NT may be ↑. Pattern increases risk, but does not confirm disease.'],['Trisomy 18 or 13','↓','↓','NT may be ↑. Increased-risk result requires counselling and follow-up.'],['Increased NT','May vary','May vary','Associated with increased risk of aneuploidy and some structural/genetic conditions.']] x0=.7; widths=[2.7,1.7,1.8,5.5]; y=1.6 for i,h in enumerate(headers): rect(s,x0+sum(widths[:i]),y,widths[i],.55,NAVY); text(s,h,x0+sum(widths[:i])+.12,y+.14,widths[i]-.2,.2,14,WHITE,True,PP_ALIGN.CENTER) for r,row in enumerate(rows): yy=y+.58+r*1.28 for i,val in enumerate(row): fill=WHITE if r%2==0 else RGBColor(239,246,246); rect(s,x0+sum(widths[:i]),yy,widths[i],1.22,fill,False,GREY) col=RED if val in ['↓','↑'] else INK text(s,val,x0+sum(widths[:i])+.14,yy+.18,widths[i]-.25,.8,15 if i else 14,col,True if val in ['↓','↑'] else False,PP_ALIGN.CENTER if i in [1,2] else None) text(s,'↓ lower than expected | ↑ higher than expected | Patterns depend on laboratory-adjusted multiples of the median (MoM).',.85,5.88,11.45,.35,13,MUTED,False,PP_ALIGN.CENTER) footer(s,6) # 7 Quad s=prs.slides.add_slide(blank); rect(s,0,0,13.333,7.5,CREAM); title(s,'Second-trimester quadruple test','15 to 22 weeks') text(s,'Four maternal serum substances are measured and combined with clinical information.',.75,1.42,11.6,.32,15,MUTED) items=[('AFP','Alpha-fetoprotein','Fetal protein; useful for open neural-tube defect risk.',TEAL),('hCG','Human chorionic gonadotropin','Placental hormone.',ORANGE),('uE3','Unconjugated estriol','Placental-fetal steroid hormone.',GREEN),('Inhibin A','Dimeric inhibin-A','Placental glycoprotein.',NAVY)] for i,(abbr,full,desc,c) in enumerate(items): x=.75+(i%2)*6.1; y=2.0+(i//2)*1.85 rect(s,x,y,5.55,1.45,WHITE,True,GREY); rect(s,x,y,1.2,1.45,c,True); text(s,abbr,x+.12,y+.48,.95,.35,18,WHITE,True,PP_ALIGN.CENTER); text(s,full,x+1.48,y+.28,3.75,.26,16,NAVY,True); text(s,desc,x+1.48,y+.75,3.72,.45,12.5,INK) text(s,'The quad test screens for trisomy 21, trisomy 18 and open neural-tube defects.',.85,6.25,11.5,.3,16,NAVY,True,PP_ALIGN.CENTER) footer(s,7) # 8 Quad comment s=prs.slides.add_slide(blank); rect(s,0,0,13.333,7.5,CREAM); title(s,'Quad test: comments on results','Typical serum patterns') headers=['Condition','AFP','uE3','hCG','Inhibin A','Comment'] widths=[2.45,1.15,1.15,1.15,1.45,4.15]; x0=.58; y=1.48 for i,h in enumerate(headers): rect(s,x0+sum(widths[:i]),y,widths[i],.56,NAVY); text(s,h,x0+sum(widths[:i])+.05,y+.15,widths[i]-.1,.2,12.5,WHITE,True,PP_ALIGN.CENTER) rows=[['Trisomy 21','↓','↓','↑','↑','Pattern raises screening risk for Down syndrome.'],['Trisomy 18','↓','↓','↓','↔ / ↓','Pattern raises screening risk for trisomy 18.'],['Open neural-tube defect','↑','-','-','-','Raised AFP may occur; confirm dating and evaluate with ultrasound.']] for r,row in enumerate(rows): yy=y+.58+r*1.22 for i,val in enumerate(row): rect(s,x0+sum(widths[:i]),yy,widths[i],1.16,WHITE if r%2==0 else RGBColor(239,246,246),False,GREY) col=RED if val in ['↓','↑'] else INK text(s,val,x0+sum(widths[:i])+.08,yy+.24,widths[i]-.16,.58,14,col,True if val in ['↓','↑'] else False,PP_ALIGN.CENTER if i in [1,2,3,4] else None) text(s,'Abnormal markers can also reflect inaccurate pregnancy dating, multiple gestation, placental variation or other causes.',.8,5.8,11.6,.35,13,MUTED,False,PP_ALIGN.CENTER) footer(s,8) # 9 interpretations/followup s=prs.slides.add_slide(blank); rect(s,0,0,13.333,7.5,CREAM); title(s,'How to act on a result','Screening, not diagnosis') steps=[('1','Screen negative','Risk is lower, not zero. Continue routine antenatal care and scheduled anatomy ultrasound.',GREEN),('2','Screen positive','Explain that this is an increased-risk result. Review gestational age, ultrasound and patient preferences.',ORANGE),('3','Offer follow-up','Genetic counselling, detailed ultrasound, cell-free DNA screening, or diagnostic testing such as CVS/amniocentesis when appropriate.',TEAL)] for i,(n,hd,b,c) in enumerate(steps): y=1.55+i*1.55; rect(s,.85,y,11.6,1.18,WHITE,True,GREY); rect(s,.85,y,1.0,1.18,c,True); text(s,n,1.15,y+.33,.4,.35,22,WHITE,True,PP_ALIGN.CENTER); text(s,hd,2.1,y+.22,2.3,.28,16,NAVY,True); text(s,b,4.35,y+.2,7.6,.55,13.2,INK) text(s,'Do not perform multiple independent serum screening methods simultaneously, because risk estimates can become misleading.',1.05,6.36,11.1,.38,14,RED,True,PP_ALIGN.CENTER) footer(s,9) #10 summary s=prs.slides.add_slide(blank); rect(s,0,0,13.333,7.5,NAVY); rect(s,0,0,13.333,.18,TEAL) text(s,'TAKE-HOME MESSAGE',.78,.55,5,.3,12,RGBColor(153,218,219),True) text(s,'Prenatal biochemical screening\nhelps estimate fetal risk.',.78,1.05,7.2,1.1,28,WHITE,True) for i,(h,b) in enumerate([('Timing','First trimester: PAPP-A + free β-hCG, commonly with NT ultrasound.\nSecond trimester: AFP + hCG + uE3 + inhibin A.'),('Interpretation','Characteristic patterns may increase risk for aneuploidy or open neural-tube defect.'),('Action','Results need counselling and appropriate confirmatory pathway. A screening test is not diagnostic.')]): y=2.62+i*1.02; rect(s,.8,y,10.5,.82,RGBColor(33,73,102),True); text(s,h,1.05,y+.19,1.5,.22,14,RGBColor(155,229,226),True); text(s,b,2.65,y+.14,8.25,.48,12.2,WHITE) text(s,'Created by • GAJERA JAY AMRUTBHAI | Batch • LA4-212(1)',.82,6.55,10.5,.25,13,WHITE,True) text(s,'References: ACOG Prenatal Genetic Screening Tests (2026); Thompson & Thompson Genetics and Genomics in Medicine, 9th ed.; Textbook of Family Medicine, 9th ed.',.82,6.95,11.8,.22,8.5,RGBColor(194,212,219)) prs.save(OUT) print(OUT) ''') PY python "/tmp/workspace/prenatal-biochemical-examination/src/create_ppt.py"
python - <<'PY' from pptx import Presentation p='/tmp/workspace/prenatal-biochemical-examination/output/Prenatal_Biochemical_Examination_GAJERA_JAY_AMRUTBHAI.pptx' prs=Presentation(p) print('slides',len(prs.slides)) for i,s in enumerate(prs.slides,1): t=' | '.join(sh.text.replace('\n',' / ') for sh in s.shapes if getattr(sh,'has_text_frame',False) and sh.text.strip()) print(i, t[:220]) PY
~/prenatal-biochemical-examination/output
Create a matching PDF handout
~/prenatal-biochemical-examination
~/prenatal-biochemical-examination/output
~/prenatal-biochemical-examination/assets
prenatal biochemical screening
site:acog.org prenatal genetic screening first trimester PAPP-A hCG quad test 15 22 weeks
python - <<'PY' from pathlib import Path p=Path('/tmp/workspace/prenatal-biochemical-examination/src/create_handout.py') p.write_text(r'''from reportlab.lib.pagesizes import A4 from reportlab.lib import colors from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.enums import TA_CENTER, TA_LEFT from reportlab.lib.units import cm from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, Image, PageBreak, KeepTogether from reportlab.pdfbase.ttfonts import TTFont from reportlab.pdfbase import pdfmetrics from reportlab.lib.utils import ImageReader from pathlib import Path ROOT=Path('/tmp/workspace/prenatal-biochemical-examination') OUT=ROOT/'output'/'Prenatal_Biochemical_Examination_Handout_GAJERA_JAY_AMRUTBHAI.pdf' IMG1=ROOT/'assets'/'img0.png'; IMG2=ROOT/'assets'/'img1.png' NAVY=colors.HexColor('#14334F'); TEAL=colors.HexColor('#138089'); ORANGE=colors.HexColor('#EB8F49'); GREEN=colors.HexColor('#2D825B'); RED=colors.HexColor('#B74141'); PALE=colors.HexColor('#F8FAF9'); LIGHT=colors.HexColor('#EAF4F3'); GRID=colors.HexColor('#D5E0E1'); INK=colors.HexColor('#23303A'); MUTED=colors.HexColor('#5C6C76') styles=getSampleStyleSheet() styles.add(ParagraphStyle(name='CoverTitle', parent=styles['Title'], fontName='Helvetica-Bold', fontSize=28, leading=33, textColor=colors.white, alignment=TA_LEFT, spaceAfter=9)) styles.add(ParagraphStyle(name='CoverSub', parent=styles['Normal'], fontName='Helvetica', fontSize=13, leading=17, textColor=colors.HexColor('#D8F2F1'))) styles.add(ParagraphStyle(name='H1x', parent=styles['Heading1'], fontName='Helvetica-Bold', fontSize=19, leading=23, textColor=NAVY, spaceBefore=5, spaceAfter=8)) styles.add(ParagraphStyle(name='H2x', parent=styles['Heading2'], fontName='Helvetica-Bold', fontSize=13, leading=16, textColor=TEAL, spaceBefore=7, spaceAfter=4)) styles.add(ParagraphStyle(name='Bodyx', parent=styles['BodyText'], fontName='Helvetica', fontSize=10.2, leading=14, textColor=INK, spaceAfter=5)) styles.add(ParagraphStyle(name='Smallx', parent=styles['BodyText'], fontName='Helvetica', fontSize=8.2, leading=10.5, textColor=MUTED)) styles.add(ParagraphStyle(name='Callout', parent=styles['BodyText'], fontName='Helvetica-Bold', fontSize=10.2, leading=14, textColor=NAVY, alignment=TA_CENTER)) styles.add(ParagraphStyle(name='Tablex', parent=styles['BodyText'], fontName='Helvetica', fontSize=8.8, leading=11.2, textColor=INK)) styles.add(ParagraphStyle(name='TableHead', parent=styles['BodyText'], fontName='Helvetica-Bold', fontSize=9, leading=11, textColor=colors.white, alignment=TA_CENTER)) def P(t, style='Bodyx'): return Paragraph(t, styles[style]) def footer(canvas, doc): canvas.saveState(); w,h=A4 canvas.setStrokeColor(GRID); canvas.setLineWidth(.5); canvas.line(1.55*cm,1.3*cm,w-1.55*cm,1.3*cm) canvas.setFont('Helvetica',8); canvas.setFillColor(MUTED); canvas.drawString(1.55*cm,.93*cm,'Prenatal Biochemical Examination | GAJERA JAY AMRUTBHAI | LA4-212(1)') canvas.drawRightString(w-1.55*cm,.93*cm,f'Page {doc.page}') canvas.restoreState() doc=SimpleDocTemplate(str(OUT),pagesize=A4,rightMargin=1.55*cm,leftMargin=1.55*cm,topMargin=1.35*cm,bottomMargin=1.65*cm) story=[] # Cover cover=[ [P('PRENATAL<br/>BIOCHEMICAL<br/>EXAMINATION','CoverTitle'), Image(str(IMG1), width=6.0*cm, height=7.0*cm)] ] t=Table(cover, colWidths=[10.1*cm,6.0*cm], rowHeights=[7.2*cm]); t.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),NAVY),('VALIGN',(0,0),(-1,-1),'MIDDLE'),('LEFTPADDING',(0,0),(0,0),.65*cm),('RIGHTPADDING',(1,0),(1,0),0),('TOPPADDING',(0,0),(-1,-1),0),('BOTTOMPADDING',(0,0),(-1,-1),0)])); story.append(t) story += [Spacer(1,.25*cm), P('Maternal serum screening during pregnancy','CoverSub'), Spacer(1,.45*cm), P('<b>Created by:</b> GAJERA JAY AMRUTBHAI<br/><b>Batch:</b> LA4-212(1)','Bodyx'), Spacer(1,.45*cm)] call=Table([[P('This handout summarizes the aim, timing, biochemical substances and interpretation of common prenatal serum screening tests.','Callout')]],colWidths=[17.0*cm]); call.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),LIGHT),('BOX',(0,0),(-1,-1),.7,TEAL),('TOPPADDING',(0,0),(-1,-1),9),('BOTTOMPADDING',(0,0),(-1,-1),9)])); story.append(call); story.append(PageBreak()) story += [P('1. Introduction and aim','H1x'), P('Prenatal biochemical examination refers to maternal blood testing for pregnancy-related biochemical markers. Values are adjusted for gestational age and combined with maternal factors, and sometimes ultrasound findings, to estimate the chance of selected fetal conditions. The result is a <b>risk estimate</b>, not a diagnosis.','Bodyx'), P('Aims','H2x')] aims=[[P('<b>Estimate risk</b><br/>Identify pregnancies with increased chance of common fetal aneuploidies and open neural-tube defects.','Tablex'),P('<b>Guide follow-up</b><br/>Help decide whether counselling, detailed ultrasound, cfDNA screening or diagnostic testing should be offered.','Tablex'),P('<b>Support choice</b><br/>Provide timely information so that the pregnant person can make an informed decision.','Tablex')]] t=Table(aims,colWidths=[5.66*cm]*3);t.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),PALE),('BOX',(0,0),(-1,-1),.6,GRID),('INNERGRID',(0,0),(-1,-1),.6,GRID),('VALIGN',(0,0),(-1,-1),'TOP'),('TOPPADDING',(0,0),(-1,-1),9),('BOTTOMPADDING',(0,0),(-1,-1),9),('LEFTPADDING',(0,0),(-1,-1),8),('RIGHTPADDING',(0,0),(-1,-1),8)]));story.append(t) story += [Spacer(1,.3*cm),P('2. Period of pregnancy and test windows','H1x')] timing=[ [P('Period','TableHead'),P('Usual timing','TableHead'),P('Approach','TableHead'),P('Main purpose','TableHead')], [P('First trimester','Tablex'),P('10 to 13+6 weeks','Tablex'),P('PAPP-A + free β-hCG, commonly combined with nuchal translucency (NT) ultrasound','Tablex'),P('Aneuploidy risk estimation','Tablex')], [P('Second trimester','Tablex'),P('15 to 22 weeks','Tablex'),P('Quad test: AFP + hCG + uE3 + inhibin A','Tablex'),P('Trisomy 21, trisomy 18, open neural-tube defect risk','Tablex')], [P('Anatomy ultrasound','Tablex'),P('18 to 22 weeks','Tablex'),P('Detailed structural assessment','Tablex'),P('Brain, spine, heart, abdomen and limbs','Tablex')]] t=Table(timing,colWidths=[3.0*cm,3.0*cm,6.0*cm,5.0*cm]);t.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,0),NAVY),('GRID',(0,0),(-1,-1),.55,GRID),('VALIGN',(0,0),(-1,-1),'MIDDLE'),('BACKGROUND',(0,1),(-1,-1),colors.white),('ROWBACKGROUNDS',(0,1),(-1,-1),[colors.white,PALE]),('TOPPADDING',(0,0),(-1,-1),6),('BOTTOMPADDING',(0,0),(-1,-1),6),('LEFTPADDING',(0,0),(-1,-1),5),('RIGHTPADDING',(0,0),(-1,-1),5)]));story.append(t) story += [Spacer(1,.35*cm),P('3. First-trimester combined screening','H1x')] row=[[Image(str(IMG2),width=5.3*cm,height=3.7*cm),P('<b>Biochemical substances checked</b><br/><br/><b>PAPP-A</b> (pregnancy-associated plasma protein A): a placental protein in maternal serum.<br/><br/><b>Free β-hCG</b> (free beta subunit of human chorionic gonadotropin): a pregnancy hormone measured in maternal serum.<br/><br/><b>Also combined with:</b> NT ultrasound measurement and maternal factors such as age.','Bodyx')]] t=Table(row,colWidths=[5.6*cm,11.4*cm]);t.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),PALE),('BOX',(0,0),(-1,-1),.6,GRID),('VALIGN',(0,0),(-1,-1),'MIDDLE'),('TOPPADDING',(0,0),(-1,-1),5),('BOTTOMPADDING',(0,0),(-1,-1),5),('LEFTPADDING',(0,0),(-1,-1),5),('RIGHTPADDING',(0,0),(-1,-1),7)]));story.append(t) story += [Spacer(1,.22*cm),P('Comments on typical patterns','H2x')] first=[ [P('Condition','TableHead'),P('PAPP-A','TableHead'),P('Free β-hCG','TableHead'),P('Comment','TableHead')], [P('Trisomy 21 (Down syndrome)','Tablex'),P('↓','Tablex'),P('↑','Tablex'),P('This combination may increase calculated risk. An increased-risk result does not confirm disease.','Tablex')], [P('Trisomy 18 or 13','Tablex'),P('↓','Tablex'),P('↓','Tablex'),P('May increase calculated risk; NT can also be increased. Discuss follow-up options.','Tablex')], [P('Increased NT','Tablex'),P('May vary','Tablex'),P('May vary','Tablex'),P('Associated with increased risk of aneuploidy and some structural or genetic conditions.','Tablex')]] t=Table(first,colWidths=[4.0*cm,2.3*cm,2.7*cm,8.0*cm]);t.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,0),NAVY),('GRID',(0,0),(-1,-1),.55,GRID),('VALIGN',(0,0),(-1,-1),'MIDDLE'),('ALIGN',(1,1),(2,-1),'CENTER'),('ROWBACKGROUNDS',(0,1),(-1,-1),[colors.white,PALE]),('TOPPADDING',(0,0),(-1,-1),5),('BOTTOMPADDING',(0,0),(-1,-1),5),('LEFTPADDING',(0,0),(-1,-1),5),('RIGHTPADDING',(0,0),(-1,-1),5)]));story.append(t) story.append(PageBreak()) story += [P('4. Second-trimester quadruple test','H1x'),P('The quad test is a maternal serum screening test generally performed between 15 and 22 weeks of pregnancy. It measures four biochemical substances.','Bodyx')] quad=[[P('<b>AFP</b><br/>Alpha-fetoprotein<br/><font size="8">Fetal protein. Raised values can be associated with open neural-tube defects.</font>','Tablex'),P('<b>hCG</b><br/>Human chorionic gonadotropin<br/><font size="8">Placental hormone.</font>','Tablex'),P('<b>uE3</b><br/>Unconjugated estriol<br/><font size="8">Placental-fetal steroid hormone.</font>','Tablex'),P('<b>Inhibin A</b><br/>Dimeric inhibin-A<br/><font size="8">Placental glycoprotein.</font>','Tablex')]] t=Table(quad,colWidths=[4.25*cm]*4);t.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),LIGHT),('BOX',(0,0),(-1,-1),.65,TEAL),('INNERGRID',(0,0),(-1,-1),.55,GRID),('TOPPADDING',(0,0),(-1,-1),9),('BOTTOMPADDING',(0,0),(-1,-1),9),('LEFTPADDING',(0,0),(-1,-1),8),('RIGHTPADDING',(0,0),(-1,-1),8)]));story.append(t) story += [Spacer(1,.3*cm),P('Comments on typical quad-test result patterns','H2x')] qtab=[[P('Condition','TableHead'),P('AFP','TableHead'),P('uE3','TableHead'),P('hCG','TableHead'),P('Inhibin A','TableHead'),P('Comment on result','TableHead')],[P('Trisomy 21','Tablex'),P('↓','Tablex'),P('↓','Tablex'),P('↑','Tablex'),P('↑','Tablex'),P('This pattern increases screening risk for Down syndrome. It is not diagnostic.','Tablex')],[P('Trisomy 18','Tablex'),P('↓','Tablex'),P('↓','Tablex'),P('↓','Tablex'),P('↔ / ↓','Tablex'),P('This pattern increases screening risk for trisomy 18.','Tablex')],[P('Open neural-tube defect','Tablex'),P('↑','Tablex'),P('—','Tablex'),P('—','Tablex'),P('—','Tablex'),P('Raised AFP may occur. Confirm dating and evaluate with targeted ultrasound.','Tablex')]] t=Table(qtab,colWidths=[3.3*cm,1.5*cm,1.5*cm,1.5*cm,2.0*cm,7.2*cm]);t.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,0),NAVY),('GRID',(0,0),(-1,-1),.55,GRID),('VALIGN',(0,0),(-1,-1),'MIDDLE'),('ALIGN',(1,1),(4,-1),'CENTER'),('ROWBACKGROUNDS',(0,1),(-1,-1),[colors.white,PALE]),('TOPPADDING',(0,0),(-1,-1),6),('BOTTOMPADDING',(0,0),(-1,-1),6),('LEFTPADDING',(0,0),(-1,-1),5),('RIGHTPADDING',(0,0),(-1,-1),5)]));story.append(t) story += [Spacer(1,.25*cm),P('<b>Important:</b> Marker levels can be affected by incorrect pregnancy dating, multiple pregnancy, placental variation and other clinical factors. Laboratories commonly report marker values as multiples of the median (MoM), adjusted for relevant factors.','Bodyx')] story += [Spacer(1,.25*cm),P('5. Interpreting and acting on results','H1x')] follow=[[P('<b>Screen-negative result</b><br/>Means lower estimated risk, not zero risk. Continue routine antenatal care and scheduled ultrasound.','Tablex'),P('<b>Screen-positive result</b><br/>Means increased estimated risk, not that the fetus is confirmed to have the condition. Provide understandable, non-directive counselling.','Tablex'),P('<b>Possible follow-up</b><br/>Detailed ultrasound, cell-free DNA screening, genetic counselling, and diagnostic testing such as CVS or amniocentesis where appropriate.','Tablex')]] t=Table(follow,colWidths=[5.66*cm]*3);t.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),PALE),('BOX',(0,0),(-1,-1),.6,GRID),('INNERGRID',(0,0),(-1,-1),.55,GRID),('VALIGN',(0,0),(-1,-1),'TOP'),('TOPPADDING',(0,0),(-1,-1),8),('BOTTOMPADDING',(0,0),(-1,-1),8),('LEFTPADDING',(0,0),(-1,-1),8),('RIGHTPADDING',(0,0),(-1,-1),8)]));story.append(t) story += [Spacer(1,.35*cm),P('Key take-home points','H2x')] for x in ['Prenatal serum tests are <b>screening</b> tools, not confirmatory diagnostic tests.','First-trimester screening commonly measures <b>PAPP-A and free β-hCG</b>, with NT ultrasound.','Second-trimester quad screening measures <b>AFP, hCG, uE3 and inhibin A</b>.','Results should be discussed with an obstetric clinician or genetic counsellor in the context of gestational age, ultrasound findings and personal preferences.']: story.append(P('• '+x,'Bodyx')) story += [Spacer(1,.22*cm),P('References','H2x'),P('American College of Obstetricians and Gynecologists. <i>Prenatal Genetic Screening Tests</i>. Updated 2026. | Thompson & Thompson. <i>Genetics and Genomics in Medicine</i>, 9th ed. | Textbook of Family Medicine, 9th ed., section: Prenatal Screening and Diagnostic Testing.','Smallx')] doc.build(story,onFirstPage=footer,onLaterPages=footer) print(OUT) ''') PY python "/tmp/workspace/prenatal-biochemical-examination/src/create_handout.py"
python - <<'PY' from pypdf import PdfReader p='/tmp/workspace/prenatal-biochemical-examination/output/Prenatal_Biochemical_Examination_Handout_GAJERA_JAY_AMRUTBHAI.pdf' r=PdfReader(p) print('pages',len(r.pages)) for i,pg in enumerate(r.pages,1): t=pg.extract_text() or '' print(i, len(t), t[:180].replace('\n',' | ')) PY
~/prenatal-biochemical-examination/output
Prenatal Biochemical Examination Handout GAJERA JAY AMRUTBHAI
PDF Document · PDF