Difference between fibroid polyp and adenomyosis Detailed pdf
adenomyosis AND uterine polyps
ACOG adenomyosis uterine polyps fibroids patient information diagnosis treatment
diagram adenomyosis versus submucosal fibroid endometrial polyp uterus ultrasound
~/
Quick answer
| Feature | Fibroid polyp, usually submucosal fibroid | Adenomyosis |
|---|---|---|
| What it is | A benign smooth-muscle tumor, usually a discrete lump. | Endometrial-type glands and stroma growing within the uterine muscle wall. |
| Where it occurs | Usually just beneath the uterine lining and bulges into the uterine cavity. It may be pedunculated, meaning attached by a stalk. | Diffusely or focally within the myometrium, the muscle layer of the uterus. |
| Appearance of uterus | May be normal-sized or irregularly enlarged, depending on number and size of fibroids. | Often diffusely enlarged, rounded, and tender. |
| Typical bleeding pattern | Heavy menstrual bleeding; bleeding between periods can occur, especially when it protrudes into the cavity. | Heavy and often prolonged periods, sometimes irregular bleeding. |
| Pain pattern | May cause cramps and pressure, but pain is often less prominent unless the fibroid is degenerating or prolapsing. | Classically causes progressively painful periods, chronic pelvic pain, and pain during intercourse. |
| Effect on fertility | A fibroid that distorts the uterine cavity can reduce implantation and contribute to infertility or miscarriage. | May be associated with subfertility and adverse pregnancy outcomes, though the degree of effect varies. |
| Ultrasound/MRI | A well-defined, round or oval mass. A submucosal fibroid distorts the endometrial cavity. | Heterogeneous myometrium, asymmetric wall thickening, myometrial cysts, and an indistinct junction between lining and muscle. MRI can clarify uncertain cases. |
| Hysteroscopy | Often directly visible within the uterine cavity and may be removed during hysteroscopy. | Usually not visible as a cavity lesion because it lies within the uterine wall. |
| Biopsy | If it is a cavity lesion, tissue can be sampled or removed for histopathology. | An endometrial biopsy does not reliably diagnose adenomyosis because the abnormal tissue is in the muscle wall. |
| Common treatment if symptoms need treatment | Medicines for bleeding, hysteroscopic removal for cavity-distorting lesions, myomectomy, uterine artery embolization in selected patients, or hysterectomy if definitive treatment is needed. | NSAIDs for pain, hormonal treatment especially a levonorgestrel-releasing IUD or other progestin-based options, and hysterectomy as definitive treatment when symptoms are severe and fertility is no longer desired. |
| Feature | Endometrial polyp | Adenomyosis |
|---|---|---|
| Tissue of origin | Endometrium, the uterine lining | Myometrium, the uterine muscle |
| Structure | Localized soft growth, often with a stalk | Diffuse or focal change in muscle wall |
| Main symptoms | Spotting, bleeding between periods, bleeding after sex, heavy or irregular bleeding | Heavy, prolonged, and painful periods; pelvic pain |
| Best confirmation | Saline sonography or hysteroscopy, with tissue examination after removal | Transvaginal ultrasound or MRI; histology after hysterectomy is the definite diagnosis |
| Usual procedure | Hysteroscopic polypectomy | Medical management first; hysterectomy is definitive if symptoms remain severe |
| Cancer concern | Most are benign, but removal and pathology are commonly advised in postmenopausal bleeding or if risk factors are present | Adenomyosis itself is benign and is not usually treated as a precancerous lesion |
Create a detailed PDF comparing fibroid polyps and adenomyosis
adenomyosis AND diagnosis
adenomyosis uterine fibroids endometrial polyps diagnosis treatment patient guidance
https://www.acog.org/womens-health/faqs/heavy-menstrual-blee…
~/
Quick answer
| Feature | Fibroid polyp, usually a submucosal fibroid | Adenomyosis |
|---|---|---|
| Nature | A localized benign tumor of uterine smooth muscle | Endometrial glands and supporting tissue located within the uterine muscle |
| Main site | Beneath the uterine lining, projecting into the cavity | Within the uterine wall, called the myometrium |
| Pattern | Usually a discrete, defined lump | Often diffuse, though it can be focal |
| Uterine cavity | May be distorted by the mass | Usually no discrete cavity mass |
| Uterus | Can be irregularly enlarged | Often uniformly enlarged, soft, and tender |
| Test | Fibroid polyp / submucosal fibroid | Adenomyosis |
|---|---|---|
| Transvaginal ultrasound | Often shows a well-defined mass and cavity distortion | May show a heterogeneous muscle wall, asymmetric thickening, small myometrial cysts, and poor definition of the junctional zone |
| Saline-infusion sonography | Especially useful to show whether a lesion projects into the cavity | Less useful for confirming diffuse disease in the muscle wall |
| Hysteroscopy | Can directly show and treat a cavity fibroid or an endometrial polyp | Often appears normal if adenomyosis does not involve the cavity |
| MRI | Clarifies size, position, and type of fibroid | Useful when ultrasound is uncertain; can show junctional-zone thickening and myometrial cystic or hemorrhagic foci |
| Biopsy | A lesion removed from the cavity can be examined in the laboratory | A routine endometrial biopsy does not reliably diagnose adenomyosis because the abnormal tissue is in the muscle wall |
| Issue | Submucosal fibroid | Adenomyosis |
|---|---|---|
| Effect on conception | More likely to interfere if it distorts the cavity | May be associated with subfertility, but the effect varies |
| Effect on miscarriage | Can increase risk when cavity distortion is significant | May be associated with miscarriage and obstetric complications, though individual risk varies |
| Fertility-preserving procedure | Hysteroscopic myomectomy is often possible for a cavity lesion | Medical symptom control or selected uterine-preserving approaches may be considered |
Create a pdf with diagrams
~/
ACOG heavy menstrual bleeding adenomyosis fibroids polyps diagnosis management
mkdir -p "/tmp/workspace/fibroid-polyp-adenomyosis-pdf/src" "/tmp/workspace/fibroid-polyp-adenomyosis-pdf/output" && python - <<'PY' 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, PageBreak, KeepTogether from reportlab.pdfbase.pdfmetrics import stringWidth from reportlab.graphics.shapes import Drawing, Path, Circle, Ellipse, String, Rect, Line from reportlab.graphics import renderPDF from reportlab.lib.colors import HexColor from reportlab.pdfbase.ttfonts import TTFont from reportlab.pdfbase import pdfmetrics from reportlab.pdfgen import canvas from reportlab.platypus.flowables import Flowable from pathlib import Path out=Path('/tmp/workspace/fibroid-polyp-adenomyosis-pdf/output/Fibroid_Polyp_vs_Adenomyosis.pdf') NAVY=HexColor('#173F5F'); TEAL=HexColor('#167D8D'); ROSE=HexColor('#C85A71'); GOLD=HexColor('#E5A53B'); PALE=HexColor('#EAF4F5'); LAV=HexColor('#F7EFF2'); TEXT=HexColor('#263238'); GREY=HexColor('#5B6870') styles=getSampleStyleSheet() styles.add(ParagraphStyle(name='TitleX', parent=styles['Title'], fontName='Helvetica-Bold', fontSize=25, leading=30, textColor=NAVY, alignment=TA_CENTER, spaceAfter=10)) styles.add(ParagraphStyle(name='SubX', parent=styles['Normal'], fontName='Helvetica', fontSize=11, leading=15, textColor=GREY, alignment=TA_CENTER)) styles.add(ParagraphStyle(name='H1X', parent=styles['Heading1'], fontName='Helvetica-Bold', fontSize=17, leading=21, textColor=NAVY, spaceBefore=8, spaceAfter=8)) styles.add(ParagraphStyle(name='H2X', parent=styles['Heading2'], fontName='Helvetica-Bold', fontSize=12.5, leading=16, textColor=TEAL, spaceBefore=7, spaceAfter=4)) styles.add(ParagraphStyle(name='BodyX', parent=styles['BodyText'], fontName='Helvetica', fontSize=9.4, leading=13, textColor=TEXT, spaceAfter=5)) styles.add(ParagraphStyle(name='SmallX', parent=styles['BodyText'], fontName='Helvetica', fontSize=7.7, leading=10, textColor=GREY)) styles.add(ParagraphStyle(name='CalloutX', parent=styles['BodyText'], fontName='Helvetica-Bold', fontSize=10, leading=14, textColor=NAVY, leftIndent=8, rightIndent=8)) def P(t, style='BodyX'): return Paragraph(t, styles[style]) def uterus_diagram(kind): d=Drawing(470,255) # title inside drawing d.add(String(235,238, {'normal':'Normal uterus','fibroid':'Submucosal fibroid','adenomyosis':'Adenomyosis'}[kind], textAnchor='middle', fontName='Helvetica-Bold', fontSize=14, fillColor=NAVY)) # uterus silhouette: outer pear / approximate p=Path(); p.moveTo(155,185); p.curveTo(124,166,112,129,128,89); p.curveTo(143,51,177,26,235,23); p.curveTo(293,26,327,51,342,89); p.curveTo(358,129,346,166,315,185); p.curveTo(287,202,263,210,235,212); p.curveTo(207,210,183,202,155,185); p.close() d.add(p); d._code.append('') # Fill overlay via duplicate shape p2=Path(); p2.moveTo(155,185); p2.curveTo(124,166,112,129,128,89); p2.curveTo(143,51,177,26,235,23); p2.curveTo(293,26,327,51,342,89); p2.curveTo(358,129,346,166,315,185); p2.curveTo(287,202,263,210,235,212); p2.curveTo(207,210,183,202,155,185); p2.close(); p2.fillColor=HexColor('#F7D9DF'); p2.strokeColor=ROSE; p2.strokeWidth=2 d.add(p2) # cavity c=Path(); c.moveTo(235,174); c.curveTo(211,152,196,125,203,94); c.curveTo(211,74,224,63,235,54); c.curveTo(246,63,259,74,267,94); c.curveTo(274,125,259,152,235,174); c.close(); c.fillColor=HexColor('#FFFDF8'); c.strokeColor=HexColor('#8D5F69'); c.strokeWidth=1.4; d.add(c) # tubes for side in [-1,1]: d.add(Line(150 if side==-1 else 320,170,100 if side==-1 else 370,198,strokeColor=ROSE,strokeWidth=3)) d.add(Circle(92 if side==-1 else 378,202,9,fillColor=HexColor('#F7D9DF'),strokeColor=ROSE)) if kind=='fibroid': d.add(Circle(235,104,31,fillColor=GOLD,strokeColor=HexColor('#A66F13'),strokeWidth=1.5)) d.add(Line(266,109,390,122,strokeColor=GOLD,strokeWidth=1.5)); d.add(String(396,118,'Defined muscle mass',fontName='Helvetica',fontSize=9,fillColor=TEXT)) d.add(Line(235,73,235,55,strokeColor=GOLD,strokeWidth=1.5)); d.add(String(240,67,'Bulges into cavity',fontName='Helvetica',fontSize=9,fillColor=TEXT)) elif kind=='adenomyosis': # dots scattered through posterior muscle wall for x,y in [(279,151),(298,137),(305,114),(287,96),(309,83),(271,72),(316,155),(276,127),(294,62)]: d.add(Circle(x,y,4,fillColor=TEAL,strokeColor=TEAL)) d.add(Line(305,119,405,125,strokeColor=TEAL,strokeWidth=1.5)); d.add(String(410,121,'Tissue within muscle',fontName='Helvetica',fontSize=9,fillColor=TEXT)) d.add(Line(273,72,392,63,strokeColor=TEAL,strokeWidth=1.5)); d.add(String(397,59,'Diffuse / ill-defined',fontName='Helvetica',fontSize=9,fillColor=TEXT)) else: d.add(String(235,5,'Simplified educational cross-section, not an imaging diagnosis',textAnchor='middle',fontName='Helvetica-Oblique',fontSize=7.5,fillColor=GREY)) return d def panel(title, text, color=PALE): t=Table([[P('<b>'+title+'</b><br/>'+text,'BodyX')]], colWidths=[16.8*cm]) t.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),color),('BOX',(0,0),(-1,-1),0.5,HexColor('#C8D9DC')),('LEFTPADDING',(0,0),(-1,-1),9),('RIGHTPADDING',(0,0),(-1,-1),9),('TOPPADDING',(0,0),(-1,-1),7),('BOTTOMPADDING',(0,0),(-1,-1),7)])) return t def footer(canv,doc): canv.saveState(); canv.setStrokeColor(HexColor('#C6D9DD')); canv.line(1.6*cm,1.35*cm,19.4*cm,1.35*cm) canv.setFont('Helvetica',7.5);canv.setFillColor(GREY);canv.drawString(1.6*cm,0.9*cm,'Educational guide - not a substitute for a clinical consultation') canv.drawRightString(19.4*cm,0.9*cm,f'Page {doc.page}') canv.restoreState() doc=SimpleDocTemplate(str(out),pagesize=A4,rightMargin=1.6*cm,leftMargin=1.6*cm,topMargin=1.45*cm,bottomMargin=1.7*cm) story=[] # cover story += [Spacer(1,1.1*cm), P('Fibroid Polyp<br/>vs Adenomyosis','TitleX'), P('A visual guide to what they are, how symptoms differ, diagnosis, and treatment choices','SubX'), Spacer(1,0.55*cm)] cover=Table([[uterus_diagram('fibroid'),uterus_diagram('adenomyosis')]],colWidths=[8.4*cm,8.4*cm]) cover.setStyle(TableStyle([('VALIGN',(0,0),(-1,-1),'TOP'),('LEFTPADDING',(0,0),(-1,-1),0),('RIGHTPADDING',(0,0),(-1,-1),0)])); story += [cover,Spacer(1,.25*cm)] story += [panel('First, clarify the phrase “fibroid polyp”','This is not a formal medical diagnosis. It commonly refers to a <b>submucosal fibroid</b> that projects into the uterine cavity, sometimes on a stalk. It may also be used loosely for an <b>endometrial polyp</b>, which is a separate lining-based growth. This guide focuses on submucosal fibroid versus adenomyosis, with a short polyp note on page 4.',LAV),Spacer(1,.4*cm)] story += [P('<b>At a glance</b>','H2X'), P('<b>Submucosal fibroid:</b> a defined benign smooth-muscle lump that can distort the cavity.<br/><b>Adenomyosis:</b> endometrial-type tissue embedded within the uterine muscle, often producing diffuse enlargement and painful periods.','BodyX'), Spacer(1,.5*cm), P('Contents','H2X'), P('1. Anatomy and terminology<br/>2. Symptoms and clinical clues<br/>3. Tests and imaging<br/>4. Treatment and fertility considerations<br/>5. Red flags and questions for your clinician<br/>6. Sources','BodyX'), PageBreak()] # p2 story += [P('1. Anatomy and terminology','H1X'),P('The key difference is <b>location and pattern</b>. Both are benign uterine conditions and both can cause abnormal uterine bleeding. They can also coexist.','BodyX'),Spacer(1,.1*cm)] compdata=[[P('<b>Feature</b>','BodyX'),P('<b>Submucosal fibroid</b>','BodyX'),P('<b>Adenomyosis</b>','BodyX')], [P('<b>Origin</b>','BodyX'),P('Smooth muscle of the uterus, also called a leiomyoma.','BodyX'),P('Endometrial glands and stroma within the myometrium.','BodyX')], [P('<b>Pattern</b>','BodyX'),P('Usually a localized, well-defined mass.','BodyX'),P('Usually diffuse or ill-defined. A focal adenomyoma can occur.','BodyX')], [P('<b>Where it grows</b>','BodyX'),P('Under the lining and toward the uterine cavity.','BodyX'),P('Inside the uterine muscle wall.','BodyX')], [P('<b>Effect on cavity</b>','BodyX'),P('May protrude into or distort the cavity.','BodyX'),P('Usually does not create a discrete cavity mass.','BodyX')], [P('<b>Uterine feel</b>','BodyX'),P('May be normal or irregularly enlarged.','BodyX'),P('Often diffusely enlarged, soft, and tender around menses.','BodyX')]] t=Table(compdata,colWidths=[3.0*cm,6.85*cm,6.85*cm],repeatRows=1);t.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,0),NAVY),('TEXTCOLOR',(0,0),(-1,0),colors.white),('BACKGROUND',(0,1),(0,-1),PALE),('GRID',(0,0),(-1,-1),0.35,HexColor('#B7C9CD')),('VALIGN',(0,0),(-1,-1),'TOP'),('LEFTPADDING',(0,0),(-1,-1),6),('RIGHTPADDING',(0,0),(-1,-1),6),('TOPPADDING',(0,0),(-1,-1),5),('BOTTOMPADDING',(0,0),(-1,-1),5)]));story += [t,Spacer(1,.35*cm),P('Visual comparison','H2X'),Table([[uterus_diagram('fibroid'),uterus_diagram('adenomyosis')]],colWidths=[8.4*cm,8.4*cm]),panel('Why the distinction matters','A cavity-distorting fibroid can often be removed hysteroscopically. Adenomyosis is within the muscle wall, so treatment usually focuses first on controlling bleeding and pain with medication or hormonal options.',PALE),PageBreak()] #p3 story += [P('2. Symptoms and clinical clues','H1X'),P('Symptoms overlap. The bleeding pattern, pain pattern, pelvic examination, ultrasound findings, age, and pregnancy plans help a gynecologist decide what is most likely.','BodyX')] sym=[[P('<b>Finding</b>','BodyX'),P('<b>More suggestive of submucosal fibroid</b>','BodyX'),P('<b>More suggestive of adenomyosis</b>','BodyX')], [P('<b>Bleeding</b>','BodyX'),P('Heavy or prolonged periods; sometimes bleeding between periods. Small cavity lesions may cause substantial bleeding.','BodyX'),P('Heavy, prolonged periods or irregular bleeding.','BodyX')], [P('<b>Pain</b>','BodyX'),P('Cramping and pelvic pressure may occur; pain is variable.','BodyX'),P('Painful periods that may worsen over time, chronic pelvic pain, or pain during intercourse.','BodyX')], [P('<b>Fertility</b>','BodyX'),P('A lesion that distorts the cavity can interfere with implantation and may be relevant in infertility or recurrent miscarriage.','BodyX'),P('May be associated with subfertility and pregnancy complications, but the individual effect varies.','BodyX')], [P('<b>Examination</b>','BodyX'),P('May show an enlarged or irregular uterus.','BodyX'),P('Often a uniformly enlarged and tender uterus.','BodyX')]] t=Table(sym,colWidths=[2.6*cm,7.1*cm,7.0*cm],repeatRows=1);t.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,0),TEAL),('TEXTCOLOR',(0,0),(-1,0),colors.white),('BACKGROUND',(0,1),(0,-1),PALE),('GRID',(0,0),(-1,-1),0.35,HexColor('#B7C9CD')),('VALIGN',(0,0),(-1,-1),'TOP'),('LEFTPADDING',(0,0),(-1,-1),6),('RIGHTPADDING',(0,0),(-1,-1),6),('TOPPADDING',(0,0),(-1,-1),5),('BOTTOMPADDING',(0,0),(-1,-1),5)]));story += [t,Spacer(1,.35*cm),P('3. How clinicians investigate','H1X')] diag=[['1','History and examination','Bleeding pattern, pain, anemia symptoms, medications, pregnancy possibility, and reproductive goals.'],['2','Pregnancy test and blood tests when indicated','A complete blood count and iron assessment may be used when bleeding is heavy or anemia is suspected.'],['3','Transvaginal ultrasound','Usually first-line. It can identify fibroids, assess the cavity, and look for features of adenomyosis.'],['4','Saline-infusion ultrasound or hysteroscopy','Helps define a focal lesion inside the uterine cavity. Hysteroscopy can also remove some cavity fibroids or polyps.'],['5','MRI in selected cases','Can help when ultrasound is unclear, especially if adenomyosis is suspected or multiple conditions coexist.']] rows=[] for n,h,b in diag: rows.append([P('<b>'+n+'</b>','BodyX'),P('<b>'+h+'</b><br/>'+b,'BodyX')]) t=Table(rows,colWidths=[1.1*cm,15.6*cm]);t.setStyle(TableStyle([('BACKGROUND',(0,0),(0,-1),GOLD),('GRID',(0,0),(-1,-1),0.35,HexColor('#D3C6AE')),('VALIGN',(0,0),(-1,-1),'TOP'),('LEFTPADDING',(0,0),(-1,-1),7),('RIGHTPADDING',(0,0),(-1,-1),7),('TOPPADDING',(0,0),(-1,-1),6),('BOTTOMPADDING',(0,0),(-1,-1),6)]));story += [t,Spacer(1,.28*cm),panel('A biopsy does not usually confirm adenomyosis','An endometrial biopsy samples the lining, while adenomyosis is located in the uterine muscle. Biopsy may still be used to investigate abnormal bleeding or exclude other conditions when appropriate.',LAV),PageBreak()] #p4 story += [P('4. Treatment and fertility considerations','H1X'),P('Treatment is individualized. It depends on bleeding severity, pain, anemia, lesion size and location, age, other health conditions, and whether pregnancy is desired now or later.','BodyX')] tr=[[P('<b>Goal</b>','BodyX'),P('<b>Submucosal fibroid</b>','BodyX'),P('<b>Adenomyosis</b>','BodyX')], [P('<b>Ease pain / reduce bleeding</b>','BodyX'),P('NSAIDs, tranexamic acid when appropriate, and hormonal options may reduce symptoms.','BodyX'),P('NSAIDs and hormonal menstrual suppression are commonly used. Progestin-based methods, including a levonorgestrel IUD, may help selected patients.','BodyX')], [P('<b>Preserve uterus / fertility</b>','BodyX'),P('Hysteroscopic myomectomy can remove a suitable cavity lesion while preserving the uterus.','BodyX'),P('Options require specialist discussion because disease lies in the muscle. Medical therapy may control symptoms but does not remove it.','BodyX')], [P('<b>Procedures</b>','BodyX'),P('Myomectomy; other approaches depend on size and position. Uterine artery embolization is an option for some people but needs fertility counseling.','BodyX'),P('Selected uterine-preserving procedures or uterine artery embolization may be considered in individual cases.','BodyX')], [P('<b>Definitive treatment</b>','BodyX'),P('Hysterectomy if symptoms are severe and childbearing is complete.','BodyX'),P('Hysterectomy is definitive when medical or conservative treatment fails and future pregnancy is not desired.','BodyX')]] t=Table(tr,colWidths=[2.8*cm,6.9*cm,7.0*cm],repeatRows=1);t.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,0),NAVY),('TEXTCOLOR',(0,0),(-1,0),colors.white),('BACKGROUND',(0,1),(0,-1),PALE),('GRID',(0,0),(-1,-1),0.35,HexColor('#B7C9CD')),('VALIGN',(0,0),(-1,-1),'TOP'),('LEFTPADDING',(0,0),(-1,-1),6),('RIGHTPADDING',(0,0),(-1,-1),6),('TOPPADDING',(0,0),(-1,-1),5),('BOTTOMPADDING',(0,0),(-1,-1),5)]));story += [t,Spacer(1,.28*cm),P('If the ultrasound says “endometrial polyp”','H2X'),P('An <b>endometrial polyp</b> is different from a fibroid and adenomyosis. It is a localized growth from the uterine lining. It can cause spotting, irregular bleeding, heavy periods, or postmenopausal bleeding. Hysteroscopic polypectomy removes the lesion and allows laboratory examination of the tissue.','BodyX'),panel('Important','Postmenopausal bleeding should always be assessed promptly. Most polyps are benign, but tissue assessment may be needed depending on symptoms and risk factors.',LAV),PageBreak()] #p5 story += [P('5. When to seek care and what to ask','H1X'),P('Seek urgent care if bleeding soaks at least one pad or tampon per hour for several hours, or if there is fainting, severe dizziness, shortness of breath, chest pain, severe new pelvic pain, fever, or possible pregnancy with pain or bleeding. Heavy menstrual bleeding can cause iron-deficiency anemia.','BodyX')] questions=['Is the finding definitely a submucosal fibroid, an endometrial polyp, adenomyosis, or more than one condition?','Does it distort the uterine cavity?','Could this explain my bleeding, pain, anemia, or fertility concerns?','Do I need saline-infusion ultrasound, MRI, hysteroscopy, or an endometrial biopsy?','Which treatment best fits my symptom severity and pregnancy plans?','What are the risks, recovery time, and chance of needing further treatment?'] story += [P('Useful questions for your clinician','H2X')] for q in questions: story.append(P('• '+q,'BodyX')) story += [Spacer(1,.15*cm),P('Key takeaways','H2X'),panel('Localized mass versus muscle-wall disease','A submucosal fibroid is a defined muscle mass that can project into the uterine cavity. Adenomyosis is tissue within the muscle wall and commonly causes painful, heavy periods. Both can occur together, so an imaging report and a gynecologic assessment should be interpreted in context.',PALE),Spacer(1,.35*cm),P('Sources and further reading','H2X'),P('Berek & Novak’s Gynecology: Diagnosis and management of adenomyosis, pp. 580-581.<br/>Sabiston Textbook of Surgery: Adenomyosis, p. 2796.<br/>Grainger & Allison’s Diagnostic Radiology: Endometrial polyp imaging, pp. 896-897.<br/>American College of Obstetricians and Gynecologists: Abnormal uterine bleeding and heavy menstrual bleeding patient guidance.<br/>Mayo Clinic: Adenomyosis diagnosis and treatment.','SmallX'),Spacer(1,.35*cm),P('This guide is for education. It does not diagnose a specific scan finding or replace care from a qualified clinician.','SmallX')] doc.build(story,onFirstPage=footer,onLaterPages=footer) print(out) PY python - <<'PY' from pypdf import PdfReader p='/tmp/workspace/fibroid-polyp-adenomyosis-pdf/output/Fibroid_Polyp_vs_Adenomyosis.pdf' r=PdfReader(p) print('pages',len(r.pages),'size',__import__('os').path.getsize(p)) for i,pge in enumerate(r.pages): text=pge.extract_text() or '' print(i+1,len(text),text[:50].replace('\n',' | ')) PY
~/fibroid-polyp-adenomyosis-pdf/src/create_pdf.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.colors import HexColor
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER
from reportlab.lib.units import cm
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, PageBreak
from reportlab.graphics.shapes import Drawing, Path as GPath, Circle, String, Line
from pathlib import Path
ROOT=Path('/tmp/workspace/fibroid-polyp-adenomyosis-pdf')
OUT=ROOT/'output'/'Fibroid_Polyp_vs_Adenomyosis.pdf'
NAVY=HexColor('#173F5F'); TEAL=HexColor('#167D8D'); ROSE=HexColor('#C85A71'); GOLD=HexColor('#E5A53B'); PALE=HexColor('#EAF4F5'); LAV=HexColor('#F7EFF2'); TEXT=HexColor('#263238'); GREY=HexColor('#5B6870')
S=getSampleStyleSheet()
S.add(ParagraphStyle(name='TitleX', parent=S['Title'], fontName='Helvetica-Bold',fontSize=25,leading=30,textColor=NAVY,alignment=TA_CENTER,spaceAfter=10))
S.add(ParagraphStyle(name='SubX', parent=S['Normal'],fontName='Helvetica',fontSize=11,leading=15,textColor=GREY,alignment=TA_CENTER))
S.add(ParagraphStyle(name='H1X',parent=S['Heading1'],fontName='Helvetica-Bold',fontSize=17,leading=21,textColor=NAVY,spaceBefore=8,spaceAfter=8))
S.add(ParagraphStyle(name='H2X',parent=S['Heading2'],fontName='Helvetica-Bold',fontSize=12.5,leading=16,textColor=TEAL,spaceBefore=7,spaceAfter=4))
S.add(ParagraphStyle(name='BodyX',parent=S['BodyText'],fontName='Helvetica',fontSize=9.3,leading=12.8,textColor=TEXT,spaceAfter=5))
S.add(ParagraphStyle(name='SmallX',parent=S['BodyText'],fontName='Helvetica',fontSize=7.7,leading=10,textColor=GREY))
def P(x,style='BodyX'): return Paragraph(x,S[style])
def uterus(kind):
d=Drawing(400,235); title={'normal':'Normal uterus','fibroid':'Submucosal fibroid','adenomyosis':'Adenomyosis'}[kind]
d.add(String(200,218,title,textAnchor='middle',fontName='Helvetica-Bold',fontSize=13,fillColor=NAVY))
p=GPath(); p.moveTo(126,170);p.curveTo(100,148,98,112,117,76);p.curveTo(137,38,167,22,200,20);p.curveTo(233,22,263,38,283,76);p.curveTo(302,112,300,148,274,170);p.curveTo(247,194,153,194,126,170);p.close();p.fillColor=HexColor('#F7D9DF');p.strokeColor=ROSE;p.strokeWidth=2;d.add(p)
c=GPath();c.moveTo(200,164);c.curveTo(180,143,170,116,177,91);c.curveTo(183,70,192,60,200,52);c.curveTo(208,60,217,70,223,91);c.curveTo(230,116,220,143,200,164);c.close();c.fillColor=HexColor('#FFFDF8');c.strokeColor=HexColor('#8D5F69');c.strokeWidth=1.2;d.add(c)
for a,b,cx in [(126,87,73),(274,313,327)]: d.add(Line(a,166,b,190,strokeColor=ROSE,strokeWidth=2.5));d.add(Circle(cx,193,8,fillColor=HexColor('#F7D9DF'),strokeColor=ROSE))
if kind=='fibroid':
d.add(Circle(200,104,27,fillColor=GOLD,strokeColor=HexColor('#A66F13'),strokeWidth=1.3));d.add(Line(226,106,335,120,strokeColor=GOLD,strokeWidth=1.4));d.add(String(339,116,'Defined mass',fontName='Helvetica',fontSize=8.2,fillColor=TEXT));d.add(String(200,8,'Projects toward the cavity',textAnchor='middle',fontName='Helvetica-Oblique',fontSize=7.6,fillColor=GREY))
elif kind=='adenomyosis':
for x,y in [(246,142),(261,127),(265,108),(252,91),(272,82),(242,73),(274,150),(247,118),(263,61)]: d.add(Circle(x,y,3.5,fillColor=TEAL,strokeColor=TEAL))
d.add(Line(265,109,350,120,strokeColor=TEAL,strokeWidth=1.4));d.add(String(354,116,'Within muscle',fontName='Helvetica',fontSize=8.2,fillColor=TEXT));d.add(String(200,8,'Diffuse / ill-defined changes',textAnchor='middle',fontName='Helvetica-Oblique',fontSize=7.6,fillColor=GREY))
return d
def panel(title,text,bg=PALE):
t=Table([[P('<b>'+title+'</b><br/>'+text)]],colWidths=[16.8*cm]);t.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,-1),bg),('BOX',(0,0),(-1,-1),.5,HexColor('#C8D9DC')),('LEFTPADDING',(0,0),(-1,-1),9),('RIGHTPADDING',(0,0),(-1,-1),9),('TOPPADDING',(0,0),(-1,-1),7),('BOTTOMPADDING',(0,0),(-1,-1),7)]));return t
def table(rows,widths,head=NAVY):
t=Table(rows,colWidths=widths,repeatRows=1);t.setStyle(TableStyle([('BACKGROUND',(0,0),(-1,0),head),('TEXTCOLOR',(0,0),(-1,0),colors.white),('BACKGROUND',(0,1),(0,-1),PALE),('GRID',(0,0),(-1,-1),.35,HexColor('#B7C9CD')),('VALIGN',(0,0),(-1,-1),'TOP'),('LEFTPADDING',(0,0),(-1,-1),6),('RIGHTPADDING',(0,0),(-1,-1),6),('TOPPADDING',(0,0),(-1,-1),5),('BOTTOMPADDING',(0,0),(-1,-1),5)]));return t
def foot(canv,doc):
canv.saveState();canv.setStrokeColor(HexColor('#C6D9DD'));canv.line(1.6*cm,1.35*cm,19.4*cm,1.35*cm);canv.setFont('Helvetica',7.5);canv.setFillColor(GREY);canv.drawString(1.6*cm,.9*cm,'Educational guide - not a substitute for a clinical consultation');canv.drawRightString(19.4*cm,.9*cm,'Page %s'%doc.page);canv.restoreState()
story=[Spacer(1,1*cm),P('Fibroid Polyp<br/>vs Adenomyosis','TitleX'),P('A visual guide to what they are, how symptoms differ, diagnosis, and treatment choices','SubX'),Spacer(1,.45*cm),Table([[uterus('fibroid'),uterus('adenomyosis')]],colWidths=[8.4*cm,8.4*cm]),Spacer(1,.15*cm),panel('First, clarify the term “fibroid polyp”','This is not a formal diagnosis. It commonly describes a <b>submucosal fibroid</b> projecting into the uterine cavity, sometimes on a stalk. It may also be used loosely for an <b>endometrial polyp</b>, which is a different lining-based growth.',LAV),Spacer(1,.25*cm),P('<b>At a glance:</b> A submucosal fibroid is a defined benign smooth-muscle lump that can distort the cavity. Adenomyosis is endometrial-type tissue embedded within the uterine muscle, often causing painful and heavy periods.'),PageBreak()]
story += [P('1. Anatomy and terminology','H1X'),P('The central difference is <b>location and pattern</b>. Both are benign uterine conditions and both may cause abnormal uterine bleeding. They may coexist.'),table([[P('<b>Feature</b>'),P('<b>Submucosal fibroid</b>'),P('<b>Adenomyosis</b>')],[P('<b>Origin</b>'),P('Smooth muscle of the uterus, also called a leiomyoma.'),P('Endometrial glands and stroma within the myometrium.')],[P('<b>Pattern</b>'),P('Usually localized and well-defined.'),P('Usually diffuse or ill-defined; a focal adenomyoma can occur.')],[P('<b>Where it grows</b>'),P('Under the lining and toward the uterine cavity.'),P('Inside the uterine muscle wall.')],[P('<b>Effect on cavity</b>'),P('May protrude into or distort the cavity.'),P('Usually no discrete cavity mass.')],[P('<b>Uterine feel</b>'),P('May be normal or irregularly enlarged.'),P('Often diffusely enlarged, soft, and tender around menses.')]],[3*cm,6.85*cm,6.85*cm]),Spacer(1,.25*cm),P('Visual comparison','H2X'),Table([[uterus('fibroid'),uterus('adenomyosis')]],colWidths=[8.4*cm,8.4*cm]),panel('Why the distinction matters','A cavity-distorting fibroid can often be removed hysteroscopically. Adenomyosis lies within the muscle wall, so treatment commonly begins with symptom control using medication or hormonal options.'),PageBreak()]
story += [P('2. Symptoms and clinical clues','H1X'),P('Symptoms overlap. The bleeding and pain pattern, examination, ultrasound findings, age, and reproductive goals help guide assessment.'),table([[P('<b>Finding</b>'),P('<b>More suggestive of submucosal fibroid</b>'),P('<b>More suggestive of adenomyosis</b>')],[P('<b>Bleeding</b>'),P('Heavy or prolonged periods; sometimes bleeding between periods. Small cavity lesions can cause substantial bleeding.'),P('Heavy, prolonged periods or irregular bleeding.')],[P('<b>Pain</b>'),P('Cramping and pressure may occur, but pain is variable.'),P('Painful periods that may worsen over time, chronic pelvic pain, or pain during intercourse.')],[P('<b>Fertility</b>'),P('Cavity distortion can interfere with implantation and may matter in infertility or recurrent miscarriage.'),P('May be associated with subfertility and pregnancy complications, though individual effect varies.')],[P('<b>Examination</b>'),P('May show enlarged or irregular uterus.'),P('Often uniformly enlarged and tender uterus.')]],[2.6*cm,7.1*cm,7*cm],TEAL),Spacer(1,.2*cm),P('3. Tests and imaging','H1X'),P('<b>Transvaginal ultrasound</b> is usually first-line. It can identify fibroids, assess cavity distortion, and detect features that support adenomyosis. A saline-infusion ultrasound or hysteroscopy can better define a lesion inside the cavity. MRI is useful in selected unclear cases.'),panel('Biopsy note','An endometrial biopsy samples the lining. It does not reliably diagnose adenomyosis because adenomyosis is located in the uterine muscle. Biopsy may still be needed to investigate abnormal bleeding or rule out other disease.',LAV),PageBreak()]
story += [P('4. Treatment and fertility considerations','H1X'),P('Treatment is individualized according to symptom severity, anemia, lesion size and location, age, other medical conditions, and whether pregnancy is desired.'),table([[P('<b>Goal</b>'),P('<b>Submucosal fibroid</b>'),P('<b>Adenomyosis</b>')],[P('<b>Ease pain / bleeding</b>'),P('NSAIDs, tranexamic acid when appropriate, and hormonal options can reduce symptoms.'),P('NSAIDs and hormonal menstrual suppression are commonly used. Progestin-based options, including a levonorgestrel IUD, may help selected patients.')],[P('<b>Preserve uterus</b>'),P('Hysteroscopic myomectomy can remove a suitable cavity lesion while preserving the uterus.'),P('Options need specialist discussion because disease lies in the muscle. Medical therapy can control symptoms but does not remove it.')],[P('<b>Procedures</b>'),P('Myomectomy and selected other approaches. Uterine artery embolization may be considered with fertility counseling.'),P('Selected uterine-preserving procedures or uterine artery embolization may be considered individually.')],[P('<b>Definitive treatment</b>'),P('Hysterectomy if symptoms are severe and childbearing is complete.'),P('Hysterectomy is definitive if conservative management fails and future pregnancy is not desired.')]],[2.8*cm,6.9*cm,7*cm]),Spacer(1,.18*cm),P('If the report says “endometrial polyp”','H2X'),P('An <b>endometrial polyp</b> is different from both a fibroid and adenomyosis. It is a localized growth from the uterine lining and may cause spotting, irregular bleeding, heavy periods, or postmenopausal bleeding. Hysteroscopic polypectomy removes it and enables tissue examination.'),panel('Important','Postmenopausal bleeding needs prompt assessment. Most polyps are benign, but tissue assessment may be needed depending on symptoms and risk factors.',LAV),PageBreak()]
story += [P('5. When to seek care and what to ask','H1X'),P('Seek urgent care for bleeding that soaks one or more pads or tampons per hour for several hours, fainting, severe dizziness, breathlessness, chest pain, severe new pelvic pain, fever, or possible pregnancy with pain or bleeding. Heavy menstrual bleeding can lead to iron-deficiency anemia.'),P('Useful questions for your clinician','H2X')]
for q in ['Is this a submucosal fibroid, an endometrial polyp, adenomyosis, or more than one condition?','Does the lesion distort my uterine cavity?','Could this explain my bleeding, pain, anemia, or fertility concerns?','Do I need saline-infusion ultrasound, MRI, hysteroscopy, or an endometrial biopsy?','Which treatment fits my current symptoms and future pregnancy plans?','What are the recovery time and chance of needing further treatment?']: story.append(P('• '+q))
story += [P('Key takeaways','H2X'),panel('Localized mass versus muscle-wall disease','A submucosal fibroid is a defined muscle mass that can project into the cavity. Adenomyosis is tissue within the muscle wall and commonly causes painful, heavy periods. Both can occur together, so scan results need to be interpreted alongside symptoms and an examination.'),Spacer(1,.2*cm),P('Sources','H2X'),P('Berek & Novak’s Gynecology, Diagnosis and Management of Adenomyosis, pp. 580-581. Sabiston Textbook of Surgery, Adenomyosis, p. 2796. Grainger & Allison’s Diagnostic Radiology, Endometrial Polyp Imaging, pp. 896-897. American College of Obstetricians and Gynecologists, Abnormal Uterine Bleeding and Heavy Menstrual Bleeding patient guidance. Mayo Clinic, Adenomyosis Diagnosis and Treatment.','SmallX'),P('This guide is educational and cannot diagnose a specific scan finding. Discuss personal symptoms and management options with a qualified gynecologist.','SmallX')]
SimpleDocTemplate(str(OUT),pagesize=A4,rightMargin=1.6*cm,leftMargin=1.6*cm,topMargin=1.45*cm,bottomMargin=1.7*cm).build(story,onFirstPage=foot,onLaterPages=foot)
print(OUT)
python "/tmp/workspace/fibroid-polyp-adenomyosis-pdf/src/create_pdf.py" && python - <<'PY' from pypdf import PdfReader from pathlib import Path p=Path('/tmp/workspace/fibroid-polyp-adenomyosis-pdf/output/Fibroid_Polyp_vs_Adenomyosis.pdf') r=PdfReader(str(p)) print(f'EXISTS={p.exists()} SIZE={p.stat().st_size} PAGES={len(r.pages)}') for n,page in enumerate(r.pages,1): text=page.extract_text() or '' print(n, len(text), text[:70].replace('\n',' | ')) PY
~/fibroid-polyp-adenomyosis-pdf/src/create_pdf.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/fibroid-polyp-adenomyosis-pdf/src/create_pdf.py'
python "/tmp/workspace/fibroid-polyp-adenomyosis-pdf/src/create_pdf.py" && python - <<'PY' from pypdf import PdfReader from pathlib import Path p=Path('/tmp/workspace/fibroid-polyp-adenomyosis-pdf/output/Fibroid_Polyp_vs_Adenomyosis.pdf') r=PdfReader(str(p)) print(f'EXISTS={p.exists()} SIZE={p.stat().st_size} PAGES={len(r.pages)}') for n,page in enumerate(r.pages,1): text=page.extract_text() or '' print(n, len(text), text[:90].replace('\n',' | ')) PY
~/fibroid-polyp-adenomyosis-pdf/src/create_pdf.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/fibroid-polyp-adenomyosis-pdf/src/create_pdf.py'
python "/tmp/workspace/fibroid-polyp-adenomyosis-pdf/src/create_pdf.py" && python - <<'PY' from pypdf import PdfReader from pathlib import Path p=Path('/tmp/workspace/fibroid-polyp-adenomyosis-pdf/output/Fibroid_Polyp_vs_Adenomyosis.pdf') r=PdfReader(str(p)) print(f'EXISTS={p.exists()} SIZE={p.stat().st_size} PAGES={len(r.pages)}') for n,page in enumerate(r.pages,1): text=page.extract_text() or '' print(n, len(text), text[:90].replace('\n',' | ')) PY
Fibroid Polyp vs Adenomyosis
PDF Document · PDF