Amenorrhea

Reading File
Finding Sources
Searching PubMed

amenorrhea diagnosis management

Reading File
Reading File
Reading File
Reading File
Reading File
Finding Sources
Reading File
Reading File
Reading File
Reading File
Loading Image
Reading File
I now have comprehensive material to write a complete, well-organized response on amenorrhea. Let me compile the full answer.

Amenorrhea

Definition

Primary amenorrhea is defined as:
  • Absence of menses by age 13 with no secondary sexual characteristics (no breast development), OR
  • Absence of menses by age 15 in the presence of normal secondary sexual development.
Secondary amenorrhea is cessation of menses for 3 months in a woman who previously had regular cycles, or 6 months in a woman with irregular cycles.

Physiology

Normal menstruation depends on an intact hypothalamic-pituitary-ovarian-uterine axis. The hypothalamus secretes GnRH in a pulsatile fashion, which stimulates pituitary secretion of FSH and LH. These stimulate ovarian folliculogenesis and steroidogenesis. Estradiol and progesterone drive endometrial growth and shedding, and provide negative feedback to the hypothalamus and pituitary. Disruption at any level produces amenorrhea.
Role of the hypothalamic-pituitary-gonadal axis in amenorrhea

Classification and Etiology

Amenorrhea is best approached by categorizing it anatomically.

1. Outflow Tract / Uterine Causes

ConditionTypeNotes
Imperforate hymenPrimaryCyclic pain + hematocolpos
Transverse vaginal septumPrimarySimilar to hymen
Congenital vaginal atresiaPrimary
Mullerian agenesis (MRKH syndrome)PrimaryNormal 46,XX; uterus/vagina absent; ovaries normal; caused by WNT4 mutations
Androgen Insensitivity Syndrome (AIS)Primary46,XY; female external genitalia; absent/sparse pubic/axillary hair; testes present; accounts for ~10% of primary amenorrhea
Asherman syndromeSecondaryPost-traumatic intrauterine synechiae; curettage accounts for >90%; TB endemic cause
Cervical stenosisSecondaryPost-procedure

2. Ovarian Causes (Hypergonadotropic Hypogonadism)

ConditionTypeNotes
Turner syndrome (45,X)PrimaryMost common; streak ovaries; stigmata: short stature, webbed neck, shield chest, cubitus valgus, short 4th metacarpal
Other gonadal dysgenesis (46,XX, 46,XY)PrimaryElevated FSH/LH
Mosaic karyotypesPrimary/SecondaryOccasional estrogen, rare ovulation possible
Primary ovarian insufficiency (POI)SecondaryFSH >25-40 mIU/mL x2 samples; idiopathic, autoimmune, chemo, radiation
PCOSPrimary or SecondaryHyperandrogenism, oligo-anovulation
Ovarian tumorSecondaryRare
Resistant ovary syndromePrimary/Secondary

3. Pituitary Causes (Hypogonadotropic Hypogonadism)

ConditionTypeNotes
HyperprolactinemiaSecondaryProlactinoma most common; also drugs
Sheehan syndromeSecondaryPostpartum pituitary necrosis
Lymphocytic hypophysitisSecondary
Acquired hypopituitarismSecondaryTrauma, tumor, irradiation
Cushing diseaseSecondary

4. Hypothalamic Causes (Hypogonadotropic Hypogonadism)

ConditionTypeNotes
Functional hypothalamic amenorrhea (FHA)SecondaryCaloric restriction, excess exercise, psychological stress; increased CRH suppresses GnRH
Kallmann syndromePrimaryIHH + anosmia; ~50% genetic cause; 3x more common in males
Isolated hypogonadotropic hypogonadismPrimaryNo anosmia; ~50% of patients have some breast development
Tumor/infiltrative diseaseEitherCraniopharyngioma, sarcoid, histiocytosis

5. Other Endocrine / Systemic Causes

CauseMechanism
HypothyroidismElevated TSH → elevated TRH → elevated prolactin → anovulation
HyperthyroidismAltered sex hormone binding globulin, disrupted feedback
Adrenal: Cushing, CAH, virilizing tumorAndrogen excess → disrupted HPO axis
Late-onset CAH (21-hydroxylase deficiency)Excess androgens
Eating disorders (anorexia nervosa)Combined nutritional, stress, weight-loss mechanism

6. Iatrogenic Causes

DrugMechanism
Antipsychotics (haloperidol, risperidone, clozapine)Dopamine blockade → hyperprolactinemia
Tricyclic antidepressants / MAOIsIncreased prolactin
Antihypertensives (methyldopa, reserpine, Ca-channel blockers)Dopamine depletion → prolactin elevation
Chemotherapy (busulfan, chlorambucil)Ovarian toxicity
OCP / progestational agentsHormonal suppression
Marijuana, digitalisEstrogenic activity

Evaluation

Step 1 - Establish the Type and Do a Pregnancy Test

A urine/serum beta-hCG must be performed first in all reproductive-age women - pregnancy is the most common cause of secondary amenorrhea.

Step 2 - Physical Examination

  • Presence or absence of secondary sexual characteristics (breast development, pubic/axillary hair) - key to categorizing primary amenorrhea
  • Pelvic anatomy - normal vs. abnormal (outflow tract defects, imperforate hymen)
  • Signs of hyperandrogenism (acne, hirsutism, clitoromegaly)
  • Signs of Turner syndrome, or other syndromic features
  • Galactorrhea (suggests hyperprolactinemia)

Step 3 - Initial Laboratory Work-Up (in patient with normal anatomy and normal secondary sexual characteristics)

  1. Serum TSH - exclude thyroid disorders
  2. Serum prolactin - obtain fasting, no recent breast stimulation, in follicular phase if cycles exist
  3. Serum FSH (with estradiol) - key test to distinguish ovarian from central cause
  4. Consider vaginal ultrasound for antral follicle count (PCOS vs. POI)
  5. If prolactin elevated or hypothalamic amenorrhea suspected: MRI of sella/hypothalamus

Step 4 - Interpret FSH

FSH LevelInterpretationLikely Causes
High (>25-40 mIU/mL on 2 samples)Hypergonadotropic hypogonadismPOI, Turner, gonadal dysgenesis
Normal/LowHypogonadotropic or eugonadotropicFHA, pituitary tumor/disease, PCOS, hypothalamic lesion
Normal + hyperandrogenismEugonadotropicPCOS, CAH, androgen-secreting tumor

Step 5 - Additional Tests Based on Findings

  • If POI confirmed: FMR1 premutation, karyotype, 21-hydroxylase antibody
  • If PCOS suspected: Total testosterone, SHBG, 17-hydroxyprogesterone (to exclude CAH)
  • If PCOS confirmed: Fasting glucose, lipid profile
  • AMH: Low in POI, high in PCOS; undetectable years before final menses in POI
  • Karyotype: Perform in primary amenorrhea with gonadal failure (~30% have abnormal karyotype); consider in all POI regardless of age
  • DEXA scan: For suspected long-term hypoestrogenism (bone density)
Evaluation algorithm for amenorrhea - Harrison's Principles

Treatment

Outflow Tract Obstruction

  • Imperforate hymen or vaginal septum: surgical correction - must be done promptly to prevent endometriosis from retrograde flow
  • Mullerian agenesis: Vaginal dilation (first-line); surgical creation of neovagina if needed; ovaries are normal so surrogacy/uterine transplant can enable pregnancy
  • AIS: Gonadectomy (after pubertal development to allow breast development and growth spurt) + estrogen replacement + possible vaginal dilation
  • Asherman syndrome: Hysteroscopic lysis of adhesions + post-op estrogen to stimulate re-epithelialization

Ovarian Insufficiency / Hypergonadotropic Hypogonadism

  • Hormone replacement therapy (HRT): Estrogen + progesterone to restore estrogen levels, protect bone (prevent osteoporosis), and provide cycle control
  • Fertility: Oocyte donation is the most effective option; spontaneous pregnancy can rarely occur in POI
  • Y-chromosome containing gonadal material: Gonadectomy to prevent gonadoblastoma

Functional Hypothalamic Amenorrhea

  • Address the underlying cause: nutritional rehabilitation (weight gain), reduce exercise intensity, stress management, cognitive behavioral therapy (CBT)
  • Estrogen replacement / OCP for bone protection while addressing root cause
  • Pulsatile GnRH or gonadotropins if fertility is desired and lifestyle modifications insufficient

Hyperprolactinemia

  • Dopamine agonists (cabergoline, bromocriptine) - first-line for prolactinoma and hyperprolactinemia-induced amenorrhea
  • Surgery for resistant macroprolactinomas

PCOS

  • Combined OCPs for cycle regulation and hyperandrogenism control
  • Metformin for insulin resistance/metabolic features
  • Ovulation induction (letrozole, clomiphene, or gonadotropins) for fertility

Hypothyroidism / Hyperthyroidism

  • Thyroid hormone replacement or anti-thyroid therapy - menses typically resume with euthyroid state

Key Clinical Points

  • Absent menses may indicate a systemic medical condition with implications beyond fertility - always establish a cause.
  • When gonadal failure accompanies primary amenorrhea, karyotypic abnormality is present in ~30% of cases.
  • The most important diagnostic elements are: physical exam for secondary sexual characteristics and anatomy, beta-hCG, prolactin, TSH, and FSH.
  • The progestogen challenge test has poor sensitivity and specificity and is no longer routinely recommended to assess estrogen status.
  • Long-term hypoestrogenism from any cause increases fracture risk - bone mineral density assessment (DEXA) should be considered.
  • Functional hypothalamic amenorrhea is a diagnosis of exclusion after ruling out organic causes.

Sources: Harrison's Principles of Internal Medicine 22E, p. 3176-3178; Berek & Novak's Gynecology, pp. 1855-1890; Tietz Textbook of Laboratory Medicine 7th Ed., pp. 2353-2490; Goldman-Cecil Medicine, p. 1677

Abnormal Uterine Bleeding in short Refer DC Datta

Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
I have enough material for a concise, well-structured answer. Note: DC Datta's textbook is not available in the library, but I'll present content aligned with the standard teaching in DC Datta's style (definitions, patterns, PALM-COEIN classification, evaluation, management) and flag this clearly.

Abnormal Uterine Bleeding (AUB)

Note: DC Datta's Textbook of Gynecology is not in this library's collection. The following is based on Goldman-Cecil Medicine, Berek & Novak's Gynecology, and Rosen's Emergency Medicine - the content closely aligns with DC Datta's standard teaching on this topic.

Definition

AUB is any bleeding from the uterine corpus that is abnormal in regularity, frequency, duration, or volume and that occurs in the absence of pregnancy.
Normal menstrual parameters (for reference):
ParameterNormal Range
Frequency24-38 days
Duration4-8 days
Volume5-80 mL per cycle

Terminology (FIGO 2011)

Old terms like DUB (Dysfunctional Uterine Bleeding), menorrhagia, metrorrhagia have been replaced by descriptive terms:
TermMeaning
Heavy Menstrual Bleeding (HMB)Excessive volume interfering with quality of life
Intermenstrual Bleeding (IMB)Bleeding between regular cycles
Irregular Menstrual BleedingUnpredictable timing
Prolonged Menstrual BleedingDuration >8 days

PALM-COEIN Classification (FIGO)

The standard classification divides causes into structural (PALM) and non-structural (COEIN):

PALM - Structural Causes

CauseKey Features
PPolyp (AUB-P)Endometrial/endocervical; IMB, postcoital bleeding
AAdenomyosis (AUB-A)Endometrial glands in myometrium; HMB + dysmenorrhea; bulky tender uterus
LLeiomyoma (AUB-L)Submucosal (AUB-LSM) causes most bleeding; other types (AUB-LO) less so
MMalignancy & Hyperplasia (AUB-M)Endometrial carcinoma/atypical hyperplasia; must exclude in all postmenopausal AUB

COEIN - Non-Structural Causes

CauseKey Features
CCoagulopathy (AUB-C)vWD, ITP, anticoagulant use; heavy flow since menarche
OOvulatory Dysfunction (AUB-O)Most common - anovulation from PCOS, thyroid, hyperprolactinemia, perimenopause, adolescence
EEndometrial (AUB-E)Primary endometrial disorder; abnormal local hemostasis
IIatrogenic (AUB-I)Hormonal contraceptives, anticoagulants, antipsychotics
NNot yet classified (AUB-N)Rare/poorly defined entities

Epidemiology

  • AUB affects 10-30% of women of reproductive age
  • ~20% is postmenarchal (adolescent) - due to HPO axis immaturity → anovulation
  • ~50% is perimenopausal - incipient ovarian failure
  • ~75% of cases have no organic cause - i.e., anovulatory/dysfunctional bleeding

Pathophysiology of Anovulatory Bleeding

In anovulation, unopposed estrogen continuously stimulates the endometrium without the stabilizing effect of progesterone:
  • Endometrium proliferates and thickens irregularly
  • Unsynchronized shedding → irregular, unpredictable, often heavy bleeding
  • Estrogen withdrawal bleeding (when estrogen drops)
  • Estrogen breakthrough bleeding (from continuously high estrogen)

Evaluation / Diagnosis

History

  • Pattern, duration, quantity of bleeding; clots; flooding
  • LMP, sexual history, contraceptive use
  • Symptoms of thyroid disease, PCOS, coagulopathy
  • Drug history (anticoagulants, OCP, antipsychotics)

Examination

  • General: pallor, signs of anaemia, thyroid enlargement, hirsutism
  • Pelvic: uterine size, tenderness, adnexal masses; speculum for cervical/vaginal cause
  • Exclude pregnancy first (beta-hCG)

Investigations

TestPurpose
Beta-hCGExclude pregnancy (first step always)
CBC + plateletsAnaemia; thrombocytopenia
Coagulation profile (PT, aPTT, vWF)Exclude coagulopathy
TSHThyroid dysfunction
Fasting glucosePCOS-related insulin resistance
Prolactin, FSH, LHAnovulatory causes
Testosterone, DHEA-SHyperandrogenism
Transvaginal ultrasound (TVUS)Polyps, fibroids, endometrial thickness
Endometrial biopsy / D&CWomen >35 years, risk factors for endometrial cancer, or failed medical treatment
HysteroscopyGold standard to visualize endometrial cavity; directed biopsy
SIS (Saline Infusion Sonography)Better detection of intracavitary lesions
Endometrial sampling is mandatory in women >35 years or those with prolonged anovulatory bleeding, due to risk of endometrial carcinoma.

Management

Acute / Emergency (Haemodynamically Unstable)

  • IV fluids, blood transfusion if needed
  • IV conjugated estrogen 25 mg every 4-6 hours (until bleeding stops)
  • Intrauterine Foley tamponade (26Fr, 30 mL saline) as temporizing measure
  • Surgical: urgent D&C, uterine artery embolization (UAE), endometrial ablation, or hysterectomy

Medical (Outpatient / Subacute)

Hormonal:
DrugDose / RouteNotes
Combined OCP1 tablet every 6 hours x 5-7 days (acute); then cyclicFirst-line for anovulatory AUB; bleeding stops within 24 hours
Progestins (MPA, norethindrone)MPA 5-10 mg x 10 days; norethindrone 5 mg TDS x 7 daysFor women with estrogen contraindications
Levonorgestrel IUD (Mirena)IntrauterineExcellent for HMB long-term; reduces flow by >90%
GnRH agonistsMonthly injectionFibroid-related AUB; pre-operative use
Relugolix / ElagolixOral GnRH antagonistsFor fibroid/adenomyosis-related bleeding
Non-Hormonal:
DrugDoseMechanism
Tranexamic acid1.3 g PO TDS x 5 days OR 10 mg/kg IVAntifibrinolytic; reduces HMB by ~50%
NSAIDs (mefenamic acid, ibuprofen)Start before mensesReduces prostaglandins; modest effect on flow
DesmopressinFor vWD-related AUB

Surgical

ProcedureIndication
D&C (dilatation & curettage)Diagnostic + acute control; not long-term solution alone
Hysteroscopic polypectomy/myomectomyStructural causes (polyps, submucosal fibroids)
Endometrial ablationPersistent AUB with completed family; not 100% effective
UAESymptomatic fibroids; preserve uterus
MyomectomyFibroids; fertility desired
HysterectomyRefractory/recurrent AUB; family complete; malignancy

Special Age Groups

Age GroupCommonest CauseApproach
AdolescentAnovulation (HPO axis immaturity)Exclude coagulopathy; OCP/progestins
Reproductive agePCOS, polyp, fibroid, pregnancy complicationPALM-COEIN workup
PerimenopausalAnovulation (incipient ovarian failure)Exclude endometrial pathology; hormonal
PostmenopausalEndometrial atrophy (most common); carcinomaEndometrial biopsy mandatory

Sources: Goldman-Cecil Medicine International Edition; Rosen's Emergency Medicine 9e; Berek & Novak's Gynecology. DC Datta's Textbook of Gynecology was not available in the library - content presented follows the same standard framework.

Generate a quick reference PDF for PALM-COEIN classification

Reading File
Running Command

ls /home/daytona/workspace/ 2>/dev/null || mkdir -p /home/daytona/workspace

Running Command

mkdir -p /home/daytona/workspace/palm-coein && python3 -c "from reportlab.lib.pa…

Writing File

~/palm-coein/generate_pdf.py

from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import mm, cm
from reportlab.platypus import (
    SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
    HRFlowable, KeepTogether
)
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus import FrameBreak

OUTPUT = "/home/daytona/workspace/palm-coein/PALM_COEIN_Quick_Reference.pdf"

# ── Colour palette ────────────────────────────────────────────────────────────
DARK_BLUE   = colors.HexColor("#1a3c5e")
PALM_COLOR  = colors.HexColor("#c0392b")   # red for PALM
COEIN_COLOR = colors.HexColor("#1a6b3e")   # green for COEIN
LIGHT_RED   = colors.HexColor("#fdecea")
LIGHT_GREEN = colors.HexColor("#e8f5e9")
LIGHT_BLUE  = colors.HexColor("#e8f0fe")
GOLD        = colors.HexColor("#d4a017")
GREY_BG     = colors.HexColor("#f4f6f9")
MID_GREY    = colors.HexColor("#7f8c8d")
WHITE       = colors.white
BLACK       = colors.HexColor("#1c1c1c")

doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=A4,
    rightMargin=15*mm, leftMargin=15*mm,
    topMargin=15*mm,   bottomMargin=15*mm,
    title="PALM-COEIN Classification – Quick Reference",
    author="Orris Medical Reference"
)

W, H = A4
COL = W - 30*mm   # usable width

styles = getSampleStyleSheet()

def style(name, **kw):
    return ParagraphStyle(name, **kw)

# ── Custom styles ─────────────────────────────────────────────────────────────
TITLE_S = style("Title_S", fontSize=22, textColor=WHITE,
                fontName="Helvetica-Bold", alignment=TA_CENTER,
                leading=28, spaceAfter=2)
SUB_S   = style("Sub_S",   fontSize=11, textColor=colors.HexColor("#cfe2ff"),
                fontName="Helvetica", alignment=TA_CENTER, leading=14)
FOOT_S  = style("Foot_S",  fontSize=7.5, textColor=MID_GREY,
                fontName="Helvetica-Oblique", alignment=TA_CENTER)

SEC_HDR = style("SecHdr",  fontSize=13, textColor=WHITE,
                fontName="Helvetica-Bold", alignment=TA_CENTER,
                leading=16)
CELL_HDR= style("CellHdr", fontSize=9.5, textColor=WHITE,
                fontName="Helvetica-Bold", alignment=TA_CENTER, leading=12)
CELL_TXT= style("CellTxt", fontSize=8.5, textColor=BLACK,
                fontName="Helvetica", leading=11, alignment=TA_LEFT)
CELL_KEY= style("CellKey", fontSize=9, textColor=BLACK,
                fontName="Helvetica-Bold", leading=12, alignment=TA_LEFT)
BODY_S  = style("Body_S",  fontSize=8.5, textColor=BLACK,
                fontName="Helvetica", leading=12, alignment=TA_JUSTIFY)
BOLD_S  = style("Bold_S",  fontSize=8.5, textColor=BLACK,
                fontName="Helvetica-Bold", leading=12)
NOTE_S  = style("Note_S",  fontSize=8, textColor=MID_GREY,
                fontName="Helvetica-Oblique", leading=11)
PILL_S  = style("Pill_S",  fontSize=9, textColor=WHITE,
                fontName="Helvetica-Bold", alignment=TA_CENTER, leading=11)

story = []

# ══════════════════════════════════════════════════════════════════════════════
# HEADER BANNER
# ══════════════════════════════════════════════════════════════════════════════
header_data = [[
    Paragraph("<b>PALM-COEIN</b>", TITLE_S),
]]
header_table = Table(header_data, colWidths=[COL])
header_table.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,-1), DARK_BLUE),
    ("TOPPADDING",    (0,0), (-1,-1), 12),
    ("BOTTOMPADDING", (0,0), (-1,-1), 4),
    ("LEFTPADDING",   (0,0), (-1,-1), 10),
    ("RIGHTPADDING",  (0,0), (-1,-1), 10),
    ("ROUNDEDCORNERS",(0,0), (-1,-1), [6,6,0,0]),
]))
story.append(header_table)

sub_data = [[
    Paragraph("Classification of Abnormal Uterine Bleeding (AUB) — FIGO 2011", SUB_S),
]]
sub_table = Table(sub_data, colWidths=[COL])
sub_table.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,-1), colors.HexColor("#2c5282")),
    ("TOPPADDING",    (0,0), (-1,-1), 6),
    ("BOTTOMPADDING", (0,0), (-1,-1), 8),
    ("LEFTPADDING",   (0,0), (-1,-1), 10),
    ("ROUNDEDCORNERS",(0,0), (-1,-1), [0,0,6,6]),
]))
story.append(sub_table)
story.append(Spacer(1, 8))

# ── Definition box ─────────────────────────────────────────────────────────
def_data = [[
    Paragraph(
        "<b>AUB</b> = Any uterine bleeding that is abnormal in <b>regularity, frequency, "
        "duration, or volume</b> in the absence of pregnancy.",
        BODY_S)
]]
def_table = Table(def_data, colWidths=[COL])
def_table.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,-1), LIGHT_BLUE),
    ("BOX",           (0,0), (-1,-1), 0.8, DARK_BLUE),
    ("TOPPADDING",    (0,0), (-1,-1), 7),
    ("BOTTOMPADDING", (0,0), (-1,-1), 7),
    ("LEFTPADDING",   (0,0), (-1,-1), 10),
    ("RIGHTPADDING",  (0,0), (-1,-1), 10),
    ("ROUNDEDCORNERS",(0,0), (-1,-1), [4,4,4,4]),
]))
story.append(def_table)
story.append(Spacer(1, 10))

# ══════════════════════════════════════════════════════════════════════════════
# PALM — STRUCTURAL CAUSES
# ══════════════════════════════════════════════════════════════════════════════
palm_hdr = Table([[Paragraph("PALM   —   Structural Causes", SEC_HDR)]], colWidths=[COL])
palm_hdr.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,-1), PALM_COLOR),
    ("TOPPADDING",    (0,0), (-1,-1), 8),
    ("BOTTOMPADDING", (0,0), (-1,-1), 8),
    ("ROUNDEDCORNERS",(0,0), (-1,-1), [6,6,0,0]),
]))
story.append(palm_hdr)

palm_col_w = [12*mm, 28*mm, 35*mm, 50*mm, COL - 12*mm - 28*mm - 35*mm - 50*mm]

palm_rows = [
    # header
    [
        Paragraph("Code", CELL_HDR),
        Paragraph("Category", CELL_HDR),
        Paragraph("Pathology", CELL_HDR),
        Paragraph("Clinical Features", CELL_HDR),
        Paragraph("Investigation", CELL_HDR),
    ],
    # P
    [
        Paragraph("<b>P</b>", style("PL", fontSize=16, textColor=PALM_COLOR,
                  fontName="Helvetica-Bold", alignment=TA_CENTER, leading=18)),
        Paragraph("<b>Polyp</b>\n(AUB-P)", CELL_KEY),
        Paragraph("Endometrial or endocervical epithelial overgrowth", CELL_TXT),
        Paragraph("• Intermenstrual bleeding (IMB)\n• Postcoital bleeding\n• Variable flow", CELL_TXT),
        Paragraph("TVUS / SIS\nHysteroscopy", CELL_TXT),
    ],
    # A
    [
        Paragraph("<b>A</b>", style("AL", fontSize=16, textColor=PALM_COLOR,
                  fontName="Helvetica-Bold", alignment=TA_CENTER, leading=18)),
        Paragraph("<b>Adenomyosis</b>\n(AUB-A)", CELL_KEY),
        Paragraph("Endometrial glands + stroma within myometrium", CELL_TXT),
        Paragraph("• Heavy menstrual bleeding (HMB)\n• Dysmenorrhea\n• Bulky, tender uterus", CELL_TXT),
        Paragraph("TVUS / MRI", CELL_TXT),
    ],
    # L
    [
        Paragraph("<b>L</b>", style("LL", fontSize=16, textColor=PALM_COLOR,
                  fontName="Helvetica-Bold", alignment=TA_CENTER, leading=18)),
        Paragraph("<b>Leiomyoma</b>\n(AUB-L)\n\nSubmucosal → AUB-LSM\nOther → AUB-LO", CELL_KEY),
        Paragraph("Benign smooth muscle tumour; submucosal type most likely to cause AUB", CELL_TXT),
        Paragraph("• HMB, prolonged bleeding\n• Pelvic pressure/bulk\n• Irregular uterus on exam", CELL_TXT),
        Paragraph("TVUS / SIS\nMRI for mapping", CELL_TXT),
    ],
    # M
    [
        Paragraph("<b>M</b>", style("ML", fontSize=16, textColor=PALM_COLOR,
                  fontName="Helvetica-Bold", alignment=TA_CENTER, leading=18)),
        Paragraph("<b>Malignancy &\nHyperplasia</b>\n(AUB-M)", CELL_KEY),
        Paragraph("Endometrial carcinoma; atypical hyperplasia; cervical/other malignancy", CELL_TXT),
        Paragraph("• Postmenopausal bleeding\n• Irregular, painless bleeding\n• Risk: obesity, nulliparity, unopposed estrogen", CELL_TXT),
        Paragraph("Endometrial biopsy\nD&C\nHysteroscopy\nMRI staging", CELL_TXT),
    ],
]

palm_table = Table(palm_rows, colWidths=palm_col_w, repeatRows=1)
palm_table.setStyle(TableStyle([
    # header row
    ("BACKGROUND",    (0,0), (-1,0), colors.HexColor("#8b1a10")),
    ("TEXTCOLOR",     (0,0), (-1,0), WHITE),
    ("FONTNAME",      (0,0), (-1,0), "Helvetica-Bold"),
    ("FONTSIZE",      (0,0), (-1,0), 9),
    # alternating rows
    ("BACKGROUND",    (0,1), (-1,1), LIGHT_RED),
    ("BACKGROUND",    (0,2), (-1,2), WHITE),
    ("BACKGROUND",    (0,3), (-1,3), LIGHT_RED),
    ("BACKGROUND",    (0,4), (-1,4), WHITE),
    # grid
    ("GRID",          (0,0), (-1,-1), 0.4, colors.HexColor("#e0b0b0")),
    ("BOX",           (0,0), (-1,-1), 0.8, PALM_COLOR),
    # padding
    ("TOPPADDING",    (0,0), (-1,-1), 5),
    ("BOTTOMPADDING", (0,0), (-1,-1), 5),
    ("LEFTPADDING",   (0,0), (-1,-1), 5),
    ("RIGHTPADDING",  (0,0), (-1,-1), 5),
    ("VALIGN",        (0,0), (-1,-1), "MIDDLE"),
    ("ALIGN",         (0,0), (0,-1), "CENTER"),
    ("ROUNDEDCORNERS",(0,0), (-1,-1), [0,0,6,6]),
]))
story.append(palm_table)
story.append(Spacer(1, 10))

# ══════════════════════════════════════════════════════════════════════════════
# COEIN — NON-STRUCTURAL CAUSES
# ══════════════════════════════════════════════════════════════════════════════
coein_hdr = Table([[Paragraph("COEIN   —   Non-Structural Causes", SEC_HDR)]], colWidths=[COL])
coein_hdr.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,-1), COEIN_COLOR),
    ("TOPPADDING",    (0,0), (-1,-1), 8),
    ("BOTTOMPADDING", (0,0), (-1,-1), 8),
    ("ROUNDEDCORNERS",(0,0), (-1,-1), [6,6,0,0]),
]))
story.append(coein_hdr)

coein_col_w = [12*mm, 30*mm, 38*mm, 48*mm, COL - 12*mm - 30*mm - 38*mm - 48*mm]

coein_rows = [
    [
        Paragraph("Code", CELL_HDR),
        Paragraph("Category", CELL_HDR),
        Paragraph("Mechanism", CELL_HDR),
        Paragraph("Clinical Features", CELL_HDR),
        Paragraph("Key Tests", CELL_HDR),
    ],
    # C
    [
        Paragraph("<b>C</b>", style("CL", fontSize=16, textColor=COEIN_COLOR,
                  fontName="Helvetica-Bold", alignment=TA_CENTER, leading=18)),
        Paragraph("<b>Coagulopathy</b>\n(AUB-C)", CELL_KEY),
        Paragraph("vWD, ITP, anticoagulant therapy, liver disease", CELL_TXT),
        Paragraph("• HMB since menarche\n• Easy bruising, prolonged bleeding\n• Family history of bleeding", CELL_TXT),
        Paragraph("PT, aPTT\nvWF antigen\nPlatelet count", CELL_TXT),
    ],
    # O
    [
        Paragraph("<b>O</b>", style("OL", fontSize=16, textColor=COEIN_COLOR,
                  fontName="Helvetica-Bold", alignment=TA_CENTER, leading=18)),
        Paragraph("<b>Ovulatory\nDysfunction</b>\n(AUB-O)", CELL_KEY),
        Paragraph("Anovulation → unopposed estrogen\nCauses: PCOS, thyroid, hyperprolactinemia, perimenopause, adolescence", CELL_TXT),
        Paragraph("• Irregular, unpredictable bleeding\n• May be heavy or light\n• Intermenstrual bleeding", CELL_TXT),
        Paragraph("TSH, Prolactin\nFSH, LH\nTestosterone\nTVUS", CELL_TXT),
    ],
    # E
    [
        Paragraph("<b>E</b>", style("EL", fontSize=16, textColor=COEIN_COLOR,
                  fontName="Helvetica-Bold", alignment=TA_CENTER, leading=18)),
        Paragraph("<b>Endometrial</b>\n(AUB-E)", CELL_KEY),
        Paragraph("Primary endometrial disorder; abnormal local haemostasis (↓ vasoconstrictors, ↑ fibrinolysis)", CELL_TXT),
        Paragraph("• Regular cycles but HMB\n• No structural cause found\n• Normal ovulation", CELL_TXT),
        Paragraph("Endometrial biopsy\nHysteroscopy\n(diagnosis of exclusion)", CELL_TXT),
    ],
    # I
    [
        Paragraph("<b>I</b>", style("IL", fontSize=16, textColor=COEIN_COLOR,
                  fontName="Helvetica-Bold", alignment=TA_CENTER, leading=18)),
        Paragraph("<b>Iatrogenic</b>\n(AUB-I)", CELL_KEY),
        Paragraph("Hormonal contraceptives, IUDs, anticoagulants, antipsychotics (→ hyperprolactinemia)", CELL_TXT),
        Paragraph("• Breakthrough bleeding on OCP\n• Irregular bleeding on progestin-only\n• Drug history positive", CELL_TXT),
        Paragraph("Drug history\nProlactin if on antipsychotics", CELL_TXT),
    ],
    # N
    [
        Paragraph("<b>N</b>", style("NL", fontSize=16, textColor=COEIN_COLOR,
                  fontName="Helvetica-Bold", alignment=TA_CENTER, leading=18)),
        Paragraph("<b>Not Yet\nClassified</b>\n(AUB-N)", CELL_KEY),
        Paragraph("Rare / poorly defined entities not fitting other categories", CELL_TXT),
        Paragraph("• Arteriovenous malformations\n• Myometrial hypertrophy\n• Endometritis (rare)", CELL_TXT),
        Paragraph("Case-dependent\nspecialist workup", CELL_TXT),
    ],
]

coein_table = Table(coein_rows, colWidths=coein_col_w, repeatRows=1)
coein_table.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,0), colors.HexColor("#145232")),
    ("TEXTCOLOR",     (0,0), (-1,0), WHITE),
    ("FONTNAME",      (0,0), (-1,0), "Helvetica-Bold"),
    ("FONTSIZE",      (0,0), (-1,0), 9),
    ("BACKGROUND",    (0,1), (-1,1), LIGHT_GREEN),
    ("BACKGROUND",    (0,2), (-1,2), WHITE),
    ("BACKGROUND",    (0,3), (-1,3), LIGHT_GREEN),
    ("BACKGROUND",    (0,4), (-1,4), WHITE),
    ("BACKGROUND",    (0,5), (-1,5), LIGHT_GREEN),
    ("GRID",          (0,0), (-1,-1), 0.4, colors.HexColor("#a8d5b5")),
    ("BOX",           (0,0), (-1,-1), 0.8, COEIN_COLOR),
    ("TOPPADDING",    (0,0), (-1,-1), 5),
    ("BOTTOMPADDING", (0,0), (-1,-1), 5),
    ("LEFTPADDING",   (0,0), (-1,-1), 5),
    ("RIGHTPADDING",  (0,0), (-1,-1), 5),
    ("VALIGN",        (0,0), (-1,-1), "MIDDLE"),
    ("ALIGN",         (0,0), (0,-1), "CENTER"),
    ("ROUNDEDCORNERS",(0,0), (-1,-1), [0,0,6,6]),
]))
story.append(coein_table)
story.append(Spacer(1, 10))

# ══════════════════════════════════════════════════════════════════════════════
# NORMAL MENSTRUAL PARAMETERS + MANAGEMENT OVERVIEW  (side by side)
# ══════════════════════════════════════════════════════════════════════════════
half = (COL - 6*mm) / 2

# --- Normal Parameters ---
norm_title = Table([[Paragraph("Normal Menstrual Parameters", style("NT",
    fontSize=9.5, textColor=WHITE, fontName="Helvetica-Bold",
    alignment=TA_CENTER, leading=12))]],
    colWidths=[half])
norm_title.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,-1), DARK_BLUE),
    ("TOPPADDING",    (0,0), (-1,-1), 5),
    ("BOTTOMPADDING", (0,0), (-1,-1), 5),
    ("ROUNDEDCORNERS",(0,0), (-1,-1), [4,4,0,0]),
]))

norm_rows = [
    [Paragraph("<b>Parameter</b>", CELL_HDR), Paragraph("<b>Normal Range</b>", CELL_HDR)],
    [Paragraph("Frequency", CELL_TXT),    Paragraph("Every 24–38 days", CELL_TXT)],
    [Paragraph("Duration",  CELL_TXT),    Paragraph("4–8 days", CELL_TXT)],
    [Paragraph("Volume",    CELL_TXT),    Paragraph("5–80 mL per cycle", CELL_TXT)],
    [Paragraph("Regularity",CELL_TXT),    Paragraph("Variation ≤7-9 days cycle-to-cycle", CELL_TXT)],
]
norm_table = Table(norm_rows, colWidths=[half*0.5, half*0.5])
norm_table.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,0), colors.HexColor("#34495e")),
    ("TEXTCOLOR",     (0,0), (-1,0), WHITE),
    ("BACKGROUND",    (0,1), (-1,1), GREY_BG),
    ("BACKGROUND",    (0,2), (-1,2), WHITE),
    ("BACKGROUND",    (0,3), (-1,3), GREY_BG),
    ("BACKGROUND",    (0,4), (-1,4), WHITE),
    ("GRID",          (0,0), (-1,-1), 0.4, colors.HexColor("#bdc3c7")),
    ("BOX",           (0,0), (-1,-1), 0.8, DARK_BLUE),
    ("TOPPADDING",    (0,0), (-1,-1), 4),
    ("BOTTOMPADDING", (0,0), (-1,-1), 4),
    ("LEFTPADDING",   (0,0), (-1,-1), 5),
    ("ROUNDEDCORNERS",(0,0), (-1,-1), [0,0,4,4]),
]))

# --- Management Summary ---
mgmt_title = Table([[Paragraph("Management Overview", style("MT",
    fontSize=9.5, textColor=WHITE, fontName="Helvetica-Bold",
    alignment=TA_CENTER, leading=12))]],
    colWidths=[half])
mgmt_title.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,-1), colors.HexColor("#6b2d8b")),
    ("TOPPADDING",    (0,0), (-1,-1), 5),
    ("BOTTOMPADDING", (0,0), (-1,-1), 5),
    ("ROUNDEDCORNERS",(0,0), (-1,-1), [4,4,0,0]),
]))

mgmt_rows = [
    [Paragraph("<b>Situation</b>", CELL_HDR), Paragraph("<b>First-line Treatment</b>", CELL_HDR)],
    [Paragraph("Acute / haemodynamic instability", CELL_TXT),
     Paragraph("IV conj. estrogen 25 mg q4-6h; D&C; UAE", CELL_TXT)],
    [Paragraph("Anovulatory (stable)", CELL_TXT),
     Paragraph("Combined OCP 1 tab q6h × 5–7 days, then cyclic", CELL_TXT)],
    [Paragraph("HMB (non-structural)", CELL_TXT),
     Paragraph("Tranexamic acid 1.3 g TDS × 5 days; LNG-IUD", CELL_TXT)],
    [Paragraph("Structural cause (fibroid/polyp)", CELL_TXT),
     Paragraph("Hysteroscopic resection; myomectomy; UAE", CELL_TXT)],
    [Paragraph("Postmenopausal AUB", CELL_TXT),
     Paragraph("Endometrial biopsy FIRST; treat cause", CELL_TXT)],
    [Paragraph("Refractory / family complete", CELL_TXT),
     Paragraph("Endometrial ablation; hysterectomy", CELL_TXT)],
]
mgmt_table = Table(mgmt_rows, colWidths=[half*0.52, half*0.48])
mgmt_table.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,0), colors.HexColor("#4a1a6b")),
    ("TEXTCOLOR",     (0,0), (-1,0), WHITE),
    ("BACKGROUND",    (0,1), (-1,1), colors.HexColor("#f3e8ff")),
    ("BACKGROUND",    (0,2), (-1,2), WHITE),
    ("BACKGROUND",    (0,3), (-1,3), colors.HexColor("#f3e8ff")),
    ("BACKGROUND",    (0,4), (-1,4), WHITE),
    ("BACKGROUND",    (0,5), (-1,5), colors.HexColor("#f3e8ff")),
    ("BACKGROUND",    (0,6), (-1,6), WHITE),
    ("GRID",          (0,0), (-1,-1), 0.4, colors.HexColor("#d8b4fe")),
    ("BOX",           (0,0), (-1,-1), 0.8, colors.HexColor("#6b2d8b")),
    ("TOPPADDING",    (0,0), (-1,-1), 4),
    ("BOTTOMPADDING", (0,0), (-1,-1), 4),
    ("LEFTPADDING",   (0,0), (-1,-1), 5),
    ("ROUNDEDCORNERS",(0,0), (-1,-1), [0,0,4,4]),
]))

# combine left/right
norm_block  = [norm_title,  norm_table]
mgmt_block  = [mgmt_title,  mgmt_table]

from reportlab.platypus import BalancedColumns
side_data = [[norm_title, Spacer(6,1), mgmt_title],
             [norm_table, Spacer(6,1), mgmt_table]]
side_table = Table(
    [[norm_title, Spacer(6,1), mgmt_title],
     [norm_table, Spacer(6,1), mgmt_table]],
    colWidths=[half, 6, half]
)
side_table.setStyle(TableStyle([
    ("VALIGN",  (0,0), (-1,-1), "TOP"),
    ("LEFTPADDING",  (0,0), (-1,-1), 0),
    ("RIGHTPADDING", (0,0), (-1,-1), 0),
    ("TOPPADDING",   (0,0), (-1,-1), 0),
    ("BOTTOMPADDING",(0,0), (-1,-1), 0),
]))
story.append(side_table)
story.append(Spacer(1, 8))

# ══════════════════════════════════════════════════════════════════════════════
# INVESTIGATION ALGORITHM BOX
# ══════════════════════════════════════════════════════════════════════════════
inv_title = Table([[Paragraph("Step-wise Investigation Algorithm", style("IT",
    fontSize=9.5, textColor=WHITE, fontName="Helvetica-Bold",
    alignment=TA_CENTER, leading=12))]],
    colWidths=[COL])
inv_title.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,-1), colors.HexColor("#b7600c")),
    ("TOPPADDING",    (0,0), (-1,-1), 5),
    ("BOTTOMPADDING", (0,0), (-1,-1), 5),
    ("ROUNDEDCORNERS",(0,0), (-1,-1), [4,4,0,0]),
]))
story.append(inv_title)

steps = [
    ["1", "Beta-hCG",          "Exclude pregnancy — always the FIRST step"],
    ["2", "CBC + Platelets",    "Assess anaemia; detect thrombocytopenia"],
    ["3", "TSH",               "Thyroid dysfunction → anovulation"],
    ["4", "Prolactin",         "Hyperprolactinemia → anovulation"],
    ["5", "Coagulation (PT, aPTT, vWF)", "Exclude coagulopathy (esp. adolescents)"],
    ["6", "FSH, LH, Testosterone", "Evaluate HPO axis; hyperandrogenism (PCOS)"],
    ["7", "TVUS / SIS",        "Structural causes — polyps, fibroids, endometrial thickness"],
    ["8", "Endometrial biopsy", "Women >35 y, prolonged anovulation, risk factors for Ca"],
    ["9", "Hysteroscopy",      "Gold standard for intracavitary pathology; directed biopsy"],
]
step_rows = [[Paragraph("<b>#</b>", CELL_HDR), Paragraph("<b>Test</b>", CELL_HDR), Paragraph("<b>Purpose</b>", CELL_HDR)]]
for s in steps:
    step_rows.append([
        Paragraph(f"<b>{s[0]}</b>", style("SN", fontSize=11, textColor=colors.HexColor("#b7600c"),
            fontName="Helvetica-Bold", alignment=TA_CENTER, leading=14)),
        Paragraph(s[1], CELL_KEY),
        Paragraph(s[2], CELL_TXT),
    ])

step_table = Table(step_rows, colWidths=[10*mm, 55*mm, COL - 65*mm])
step_table.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,0), colors.HexColor("#7c3a05")),
    ("TEXTCOLOR",     (0,0), (-1,0), WHITE),
    *[("BACKGROUND",  (0,i), (-1,i), GREY_BG if i%2==1 else WHITE) for i in range(1, 10)],
    ("GRID",          (0,0), (-1,-1), 0.4, colors.HexColor("#e0c9b0")),
    ("BOX",           (0,0), (-1,-1), 0.8, colors.HexColor("#b7600c")),
    ("TOPPADDING",    (0,0), (-1,-1), 4),
    ("BOTTOMPADDING", (0,0), (-1,-1), 4),
    ("LEFTPADDING",   (0,0), (-1,-1), 5),
    ("VALIGN",        (0,0), (-1,-1), "MIDDLE"),
    ("ALIGN",         (0,0), (0,-1), "CENTER"),
    ("ROUNDEDCORNERS",(0,0), (-1,-1), [0,0,4,4]),
]))
story.append(step_table)
story.append(Spacer(1, 6))

# ── Footer ─────────────────────────────────────────────────────────────────
HRFlowable(width=COL, thickness=0.5, color=MID_GREY)
story.append(HRFlowable(width=COL, thickness=0.5, color=MID_GREY))
story.append(Spacer(1, 3))
story.append(Paragraph(
    "FIGO 2011 Classification  •  Sources: Goldman-Cecil Medicine · Berek &amp; Novak's Gynecology · Rosen's Emergency Medicine  •  For educational use only",
    FOOT_S))

# ══════════════════════════════════════════════════════════════════════════════
# BUILD
# ══════════════════════════════════════════════════════════════════════════════
doc.build(story)
print(f"PDF saved: {OUTPUT}")
Running Command

cd /home/daytona/workspace/palm-coein && python3 generate_pdf.py 2>&1

Running Command

ls -lh /home/daytona/workspace/palm-coein/PALM_COEIN_Quick_Reference.pdf

Your PALM-COEIN Quick Reference PDF is ready:

PALM COEIN Quick Reference

PDF Document · PDF


What's inside (single A4 page):
SectionContents
HeaderTitle + AUB definition box
PALM (red)P-A-L-M table with pathology, clinical features, investigations
COEIN (green)C-O-E-I-N table with mechanism, features, key tests
Side-by-sideNormal menstrual parameters + Management overview
Algorithm9-step investigation sequence
FooterFIGO 2011 source credit
This is a shared conversation. Sign in to Orris to start your own chat.