Premature ovarian insufficiency
"premature ovarian insufficiency"[MeSH Terms]
"premature ovarian insufficiency" AND management
PMID: 39647506
| Category | Examples |
|---|---|
| Sex chromosome disorders | Turner syndrome (45,X) - most common; 47,XXX; XO/XY mosaicism |
| Single gene mutations | FMR1 premutation (most clinically significant), FOXL2, BMP15, NR5A1, FSHR, INHA, AIRE |
| Iatrogenic | Chemotherapy (especially alkylating agents - cyclophosphamide), pelvic radiation, surgical damage to ovarian blood supply |
| Autoimmune | Lymphocytic oophoritis; autoimmune polyglandular syndrome type 1 (with Addison disease + hypoparathyroidism); associated thyroiditis (most common) |
| Infections | Mumps oophoritis (rare) |
| Metabolic | Galactosemia (even with early dietary restriction) |
| Genetic syndromes | Perrault syndrome (POI + sensorineural hearing loss - autosomal recessive) |
| Idiopathic | 30-90% of cases |
| Criterion | Detail |
|---|---|
| Age | < 40 years |
| Amenorrhea | ≥ 4 months |
| FSH | Elevated (menopausal range, >25 IU/L) on two occasions at least 4 months apart |
| System | Risk |
|---|---|
| Bone | Osteoporosis - accelerated bone loss begins immediately; vertebral, hip, and wrist fractures |
| Cardiovascular | Increased risk of CVD and stroke (atherosclerosis accelerated by hypoestrogenism) |
| Neurological/Cognitive | Increased dementia risk, mood disorders |
| Sexual function | Dyspareunia, decreased libido |
| Fertility | Severely reduced but not zero - 5-10% of women still conceive spontaneously; ~80% of those result in a healthy birth |
| Quality of life | Significant psychological impact; depression is common |
Create a patient summary document on POI diagnosis and hormone therapy options
mkdir -p /home/daytona/workspace/poi-patient-summary && ls /home/daytona/workspace/poi-patient-summary
~/poi-patient-summary/create_poi_doc.js
const {
Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
HeadingLevel, AlignmentType, BorderStyle, WidthType, ShadingType,
VerticalAlign, PageNumber, Header, Footer, ImageRun, ExternalHyperlink,
UnderlineType
} = require('docx');
const fs = require('fs');
// ── Colour palette ──────────────────────────────────────────────────
const TEAL = "005F73";
const TEAL_LIGHT = "94D2BD";
const CREAM = "F8F4EC";
const RUST = "AE2012";
const SLATE = "3D405B";
const WHITE = "FFFFFF";
const LIGHT_GRAY = "F0F0F0";
// ── Helper: horizontal rule ─────────────────────────────────────────
function hr() {
return new Paragraph({
border: { bottom: { color: TEAL_LIGHT, space: 1, size: 6, style: BorderStyle.SINGLE } },
spacing: { after: 100 },
});
}
// ── Helper: section heading (Heading 1 style) ───────────────────────
function sectionHeading(text) {
return new Paragraph({
children: [new TextRun({ text, bold: true, color: WHITE, size: 26 })],
heading: HeadingLevel.HEADING_1,
shading: { type: ShadingType.SOLID, color: TEAL, fill: TEAL },
spacing: { before: 240, after: 120 },
indent: { left: 120, right: 120 },
});
}
// ── Helper: sub-heading ─────────────────────────────────────────────
function subHeading(text) {
return new Paragraph({
children: [new TextRun({ text, bold: true, color: TEAL, size: 24 })],
heading: HeadingLevel.HEADING_2,
spacing: { before: 200, after: 80 },
border: { bottom: { color: TEAL_LIGHT, space: 1, size: 4, style: BorderStyle.SINGLE } },
});
}
// ── Helper: body paragraph ──────────────────────────────────────────
function body(text, options = {}) {
return new Paragraph({
children: [new TextRun({ text, size: 22, color: SLATE, ...options })],
spacing: { after: 120, line: 276 },
});
}
// ── Helper: bullet ──────────────────────────────────────────────────
function bullet(text, level = 0) {
return new Paragraph({
children: [new TextRun({ text, size: 22, color: SLATE })],
bullet: { level },
spacing: { after: 80, line: 260 },
indent: { left: 360 + level * 360 },
});
}
// ── Helper: info box (shaded) ───────────────────────────────────────
function infoBox(lines, bgColor = CREAM) {
const children = lines.map((line, i) =>
new Paragraph({
children: [new TextRun({ text: line, size: 21, color: SLATE, bold: i === 0 })],
spacing: { after: 60 },
indent: { left: 160, right: 160 },
})
);
// Wrap in a 1-cell table for the shading box
return new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
borders: {
top: { style: BorderStyle.SINGLE, color: TEAL_LIGHT, size: 4 },
bottom: { style: BorderStyle.SINGLE, color: TEAL_LIGHT, size: 4 },
left: { style: BorderStyle.SINGLE, color: TEAL_LIGHT, size: 4 },
right: { style: BorderStyle.SINGLE, color: TEAL_LIGHT, size: 4 },
insideH: { style: BorderStyle.NONE },
insideV: { style: BorderStyle.NONE },
},
rows: [
new TableRow({
children: [
new TableCell({
shading: { type: ShadingType.SOLID, color: bgColor, fill: bgColor },
margins: { top: 100, bottom: 100, left: 120, right: 120 },
children,
}),
],
}),
],
});
}
// ── Helper: two-column table (key/value) ───────────────────────────
function kvTable(rows) {
return new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
borders: {
top: { style: BorderStyle.SINGLE, color: TEAL_LIGHT, size: 4 },
bottom: { style: BorderStyle.SINGLE, color: TEAL_LIGHT, size: 4 },
left: { style: BorderStyle.SINGLE, color: TEAL_LIGHT, size: 4 },
right: { style: BorderStyle.SINGLE, color: TEAL_LIGHT, size: 4 },
insideH: { style: BorderStyle.SINGLE, color: TEAL_LIGHT, size: 2 },
insideV: { style: BorderStyle.SINGLE, color: TEAL_LIGHT, size: 2 },
},
rows: rows.map((r, i) =>
new TableRow({
children: [
new TableCell({
width: { size: 38, type: WidthType.PERCENTAGE },
shading: { type: ShadingType.SOLID, color: i % 2 === 0 ? LIGHT_GRAY : WHITE, fill: i % 2 === 0 ? LIGHT_GRAY : WHITE },
margins: { top: 80, bottom: 80, left: 120, right: 80 },
children: [new Paragraph({ children: [new TextRun({ text: r[0], bold: true, size: 21, color: TEAL })] })],
}),
new TableCell({
width: { size: 62, type: WidthType.PERCENTAGE },
shading: { type: ShadingType.SOLID, color: i % 2 === 0 ? LIGHT_GRAY : WHITE, fill: i % 2 === 0 ? LIGHT_GRAY : WHITE },
margins: { top: 80, bottom: 80, left: 80, right: 120 },
children: [new Paragraph({ children: [new TextRun({ text: r[1], size: 21, color: SLATE })] })],
}),
],
})
),
});
}
// ── Helper: header row for table ───────────────────────────────────
function headerRow(cols) {
return new TableRow({
tableHeader: true,
children: cols.map(c =>
new TableCell({
shading: { type: ShadingType.SOLID, color: TEAL, fill: TEAL },
margins: { top: 80, bottom: 80, left: 120, right: 120 },
children: [new Paragraph({ children: [new TextRun({ text: c, bold: true, color: WHITE, size: 21 })] })],
})
),
});
}
// ── Helper: data row ────────────────────────────────────────────────
function dataRow(cols, shade) {
return new TableRow({
children: cols.map(c =>
new TableCell({
shading: { type: ShadingType.SOLID, color: shade ? LIGHT_GRAY : WHITE, fill: shade ? LIGHT_GRAY : WHITE },
margins: { top: 80, bottom: 80, left: 120, right: 120 },
children: [new Paragraph({ children: [new TextRun({ text: c, size: 21, color: SLATE })] })],
})
),
});
}
// ── Helper: spacer ──────────────────────────────────────────────────
function spacer(pts = 160) {
return new Paragraph({ text: "", spacing: { after: pts } });
}
// ───────────────────────────────────────────────────────────────────
// DOCUMENT
// ───────────────────────────────────────────────────────────────────
const doc = new Document({
title: "Premature Ovarian Insufficiency - Patient Summary",
description: "Patient-focused guide on POI diagnosis and hormone therapy options",
creator: "Orris Medical",
styles: {
default: {
document: {
run: { font: "Calibri", size: 22, color: SLATE },
},
},
},
sections: [
{
properties: {
page: {
margin: { top: 900, bottom: 900, left: 1100, right: 1100 },
},
},
headers: {
default: new Header({
children: [
new Paragraph({
children: [
new TextRun({ text: "PATIENT INFORMATION GUIDE | Premature Ovarian Insufficiency (POI)", size: 18, color: TEAL, bold: true }),
],
alignment: AlignmentType.RIGHT,
border: { bottom: { style: BorderStyle.SINGLE, color: TEAL_LIGHT, size: 4 } },
spacing: { after: 60 },
}),
],
}),
},
footers: {
default: new Footer({
children: [
new Paragraph({
children: [
new TextRun({ text: "This document is for informational purposes only and does not replace professional medical advice. | Page ", size: 16, color: "888888" }),
new TextRun({ children: [PageNumber.CURRENT], size: 16, color: "888888" }),
new TextRun({ text: " of ", size: 16, color: "888888" }),
new TextRun({ children: [PageNumber.TOTAL_PAGES], size: 16, color: "888888" }),
],
alignment: AlignmentType.CENTER,
border: { top: { style: BorderStyle.SINGLE, color: TEAL_LIGHT, size: 4 } },
spacing: { before: 60 },
}),
],
}),
},
children: [
// ── TITLE BLOCK ──────────────────────────────────────────────
new Paragraph({
children: [new TextRun({ text: "Premature Ovarian Insufficiency", bold: true, size: 52, color: TEAL })],
alignment: AlignmentType.CENTER,
spacing: { before: 240, after: 80 },
}),
new Paragraph({
children: [new TextRun({ text: "A Patient Guide to Diagnosis and Hormone Therapy Options", size: 28, color: SLATE, italics: true })],
alignment: AlignmentType.CENTER,
spacing: { after: 60 },
}),
new Paragraph({
children: [new TextRun({ text: "Updated June 2026 | Based on ESHRE/ASRM 2024 Guidelines", size: 18, color: "888888" })],
alignment: AlignmentType.CENTER,
spacing: { after: 320 },
}),
// ── WHAT IS POI ──────────────────────────────────────────────
sectionHeading("1. What Is Premature Ovarian Insufficiency?"),
spacer(80),
body("Premature Ovarian Insufficiency (POI) occurs when the ovaries stop working normally before the age of 40. This means the ovaries no longer produce enough oestrogen and may not regularly release eggs. It is sometimes called premature ovarian failure or premature menopause, but the term 'insufficiency' is preferred because ovarian activity can sometimes return on its own."),
spacer(60),
infoBox([
"Key Facts at a Glance",
"• Affects approximately 1–3.5% of women under 40",
"• Ovarian function can wax and wane — about 1 in 4 women see some return of activity after diagnosis",
"• 5–10% of women with POI can still conceive naturally",
"• POI is not the same as early menopause due to normal ageing — it requires specific evaluation and management",
]),
spacer(120),
body("POI is different from simply having irregular periods. Once diagnosed, it has important implications for your long-term bone and heart health, fertility, and overall wellbeing."),
spacer(160),
// ── SYMPTOMS ────────────────────────────────────────────────
sectionHeading("2. Symptoms You May Experience"),
spacer(80),
body("Symptoms vary from person to person. Some women notice them gradually; others notice them suddenly. Common symptoms include:"),
spacer(60),
kvTable([
["Menstrual changes", "Irregular, infrequent, or absent periods (amenorrhoea)"],
["Hot flushes & night sweats", "Occur in more than 75% of women with POI"],
["Vaginal dryness", "Caused by low oestrogen; can cause discomfort during sex"],
["Mood changes", "Irritability, anxiety, depression, emotional lability"],
["Sleep disturbance", "Often related to night sweats"],
["Brain fog", "Difficulty concentrating or with memory"],
["Low libido", "Reduced sex drive due to hormonal changes"],
["Fertility difficulties", "Reduced ability to conceive with own eggs"],
]),
spacer(80),
body("If you have not yet been through puberty when POI begins (e.g., due to a genetic cause or cancer treatment), secondary sexual characteristics such as breast development may not occur without hormone treatment."),
spacer(160),
// ── HOW IS IT DIAGNOSED ─────────────────────────────────────
sectionHeading("3. How Is POI Diagnosed?"),
spacer(80),
body("Your doctor will take a careful history, examine you, and arrange blood tests. The diagnosis requires all three of the following:"),
spacer(60),
new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
borders: {
top: { style: BorderStyle.SINGLE, color: TEAL_LIGHT, size: 4 },
bottom: { style: BorderStyle.SINGLE, color: TEAL_LIGHT, size: 4 },
left: { style: BorderStyle.SINGLE, color: TEAL_LIGHT, size: 4 },
right: { style: BorderStyle.SINGLE, color: TEAL_LIGHT, size: 4 },
insideH: { style: BorderStyle.SINGLE, color: TEAL_LIGHT, size: 2 },
insideV: { style: BorderStyle.NONE },
},
rows: [
headerRow(["Criterion", "Detail"]),
dataRow(["Age", "Under 40 years"], false),
dataRow(["Absent or irregular periods", "Amenorrhoea for 4 or more months"], true),
dataRow(["FSH blood test", "Follicle-stimulating hormone (FSH) elevated into the menopausal range (>25 IU/L) — the 2024 ESHRE guideline requires only one confirmed result, with AMH testing if uncertain"], false),
],
}),
spacer(80),
subHeading("Additional tests your doctor may arrange:"),
bullet("Karyotype (chromosome analysis) — to check for Turner syndrome or other chromosomal conditions"),
bullet("FMR1 gene test — to look for the fragile X premutation, which is linked to POI in up to 1 in 4 carriers"),
bullet("Adrenal antibodies — to screen for autoimmune Addison disease (affects ~4% of POI patients)"),
bullet("Thyroid antibodies and TSH — thyroid problems are the most common associated autoimmune condition"),
bullet("Anti-Müllerian hormone (AMH) — gives information about remaining ovarian reserve"),
bullet("DEXA bone density scan — establishes a baseline for bone health monitoring"),
spacer(80),
infoBox([
"Important: Psychological Support",
"A diagnosis of POI can be emotionally overwhelming, especially regarding fertility. Depression is common. Please ask your healthcare team about counselling, peer support groups, and mental health resources. Connecting with other women living with POI can make a significant difference.",
], "EFF7F6"),
spacer(160),
// ── CAUSES ──────────────────────────────────────────────────
sectionHeading("4. What Causes POI?"),
spacer(80),
body("In most women (30–90%), no single cause is found, which can be frustrating. However, known causes include:"),
spacer(60),
new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
borders: {
top: { style: BorderStyle.SINGLE, color: TEAL_LIGHT, size: 4 },
bottom: { style: BorderStyle.SINGLE, color: TEAL_LIGHT, size: 4 },
left: { style: BorderStyle.SINGLE, color: TEAL_LIGHT, size: 4 },
right: { style: BorderStyle.SINGLE, color: TEAL_LIGHT, size: 4 },
insideH: { style: BorderStyle.SINGLE, color: TEAL_LIGHT, size: 2 },
insideV: { style: BorderStyle.NONE },
},
rows: [
headerRow(["Cause", "Examples"]),
dataRow(["Chromosomal", "Turner syndrome (45,X), 47,XXX, mosaic karyotypes"], false),
dataRow(["Genetic (single gene)", "FMR1 premutation (fragile X carrier), FOXL2, BMP15, NR5A1 mutations"], true),
dataRow(["Autoimmune", "Lymphocytic oophoritis; associated with thyroiditis, Addison disease, type 1 diabetes"], false),
dataRow(["Iatrogenic (treatment-related)", "Chemotherapy (especially alkylating agents), pelvic radiation, ovarian surgery"], true),
dataRow(["Metabolic/Other", "Galactosaemia, Perrault syndrome (+ hearing loss)"], false),
dataRow(["Idiopathic", "No identifiable cause found — most common category"], true),
],
}),
spacer(160),
// ── LONG-TERM HEALTH ────────────────────────────────────────
sectionHeading("5. Long-Term Health Considerations"),
spacer(80),
body("Because oestrogen plays a protective role in many body systems, having low oestrogen from a young age increases certain health risks. This is why hormone therapy is so important."),
spacer(80),
kvTable([
["Bone health (osteoporosis)", "Low oestrogen accelerates bone loss, increasing fracture risk at the hip, spine, and wrist. DEXA scans and hormone therapy are used to monitor and protect bone density."],
["Heart & blood vessels (cardiovascular health)", "Oestrogen protects artery walls. Women with POI have a higher risk of heart disease and stroke compared to women who reach menopause at the normal age."],
["Brain & cognitive health", "There is evidence of increased risk of memory difficulties and mood disorders. Hormone therapy may be protective."],
["Sexual health", "Vaginal dryness, reduced libido, and painful sex are common and very treatable."],
["Fertility", "Pregnancy with own eggs is possible (5–10% chance) but uncertain. Egg/embryo donation is the most reliable option for those who wish to have children."],
]),
spacer(160),
// ── HORMONE THERAPY ─────────────────────────────────────────
sectionHeading("6. Hormone Therapy (HT) — The Most Important Treatment"),
spacer(80),
body("Hormone therapy replaces the oestrogen your ovaries are no longer making. It is strongly recommended for all women with POI (unless there is a specific medical reason not to use it), and should be continued at least until the average age of natural menopause (around 51 years)."),
spacer(60),
infoBox([
"Why is hormone therapy different in POI compared to menopausal HRT?",
"In older women using HRT after natural menopause, the risks and benefits are carefully weighed. In POI, hormone therapy is simply replacing what should naturally be there. The evidence shows that HT in POI reduces — rather than increases — the risks of bone loss, heart disease, and cognitive decline.",
]),
spacer(120),
subHeading("Types of Hormone Therapy"),
spacer(60),
new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
borders: {
top: { style: BorderStyle.SINGLE, color: TEAL_LIGHT, size: 4 },
bottom: { style: BorderStyle.SINGLE, color: TEAL_LIGHT, size: 4 },
left: { style: BorderStyle.SINGLE, color: TEAL_LIGHT, size: 4 },
right: { style: BorderStyle.SINGLE, color: TEAL_LIGHT, size: 4 },
insideH: { style: BorderStyle.SINGLE, color: TEAL_LIGHT, size: 2 },
insideV: { style: BorderStyle.SINGLE, color: TEAL_LIGHT, size: 2 },
},
rows: [
headerRow(["Hormone", "Route / Form", "Notes"]),
dataRow(["Oestrogen", "Skin patches (transdermal)", "Preferred route — avoids first-pass liver effect, most physiological"], false),
dataRow(["Oestrogen", "Oestrogen gel or spray", "Applied to skin daily; flexible dosing"], true),
dataRow(["Oestrogen", "Implants", "Inserted under the skin; long-acting"], false),
dataRow(["Oestrogen", "Combined oral contraceptive pill", "An option, especially for younger women; provides contraception; may be less cardioprotective than dedicated HRT"], true),
dataRow(["Oestrogen", "Oral tablets", "Convenient but slightly higher clot risk than transdermal routes"], false),
dataRow(["Progestogen", "Added for all women with a uterus", "Protects the womb lining (endometrium) from overstimulation; given cyclically or continuously"], true),
dataRow(["Testosterone", "Gel or cream (low-dose)", "Recommended by 2024 ESHRE guideline for women with low libido that does not respond to oestrogen alone"], false),
],
}),
spacer(80),
subHeading("Oestrogen Dose in POI"),
body("Women with POI typically need higher oestrogen doses than older women using HRT for menopausal symptoms. Doses should aim to maintain oestrogen levels in the physiological range for a woman of reproductive age. Your doctor will adjust the dose based on your symptoms and blood tests."),
spacer(80),
subHeading("Does HT prevent pregnancy?"),
body("No. Women with POI can occasionally ovulate spontaneously. Hormone therapy is not a reliable contraceptive. If you wish to avoid pregnancy, discuss contraception options with your doctor."),
spacer(80),
subHeading("Local (vaginal) oestrogen"),
body("In addition to systemic HT, low-dose vaginal oestrogen (cream, ring, or pessary) can be used for vaginal dryness and discomfort. It acts locally with minimal systemic absorption and is safe even for women who cannot take systemic hormones."),
spacer(80),
subHeading("Non-hormonal options"),
body("For women who cannot take hormone therapy (e.g., certain hormone-sensitive cancers), non-hormonal options include:"),
bullet("Vaginal moisturisers and lubricants — for vaginal dryness"),
bullet("Cognitive behavioural therapy (CBT) — for hot flushes and mood symptoms"),
bullet("SSRIs/SNRIs (e.g., venlafaxine) — for vasomotor symptoms"),
bullet("Clonidine — for hot flushes"),
bullet("Lifestyle measures: regular weight-bearing exercise, calcium and vitamin D supplementation, avoiding smoking"),
spacer(160),
// ── FERTILITY ────────────────────────────────────────────────
sectionHeading("7. Fertility and Family Planning"),
spacer(80),
body("A diagnosis of POI is devastating news for women who wish to have children. It is important to know that it does not mean conception is completely impossible, but the options are limited."),
spacer(60),
kvTable([
["Spontaneous pregnancy", "Occurs in 5–10% of women with POI. Ovarian function can return unpredictably. Optimising general health and maintaining hormone levels with HT supports this possibility."],
["Egg (oocyte) donation", "The most reliable assisted reproduction option. A donor's eggs are fertilised with sperm and the embryo is transferred to your womb. Success rates are comparable to standard IVF."],
["Embryo donation", "An embryo created by other donors is transferred; an option if both egg and sperm donation are required."],
["Fertility preservation", "If you are about to undergo chemotherapy or radiation, ask urgently about egg or embryo freezing BEFORE treatment begins."],
["Adoption / fostering", "A valid and deeply meaningful path to parenthood that some women choose."],
]),
spacer(80),
infoBox([
"Turner Syndrome & Pregnancy: Special Consideration",
"Women with Turner syndrome considering pregnancy via donor egg must be carefully assessed for cardiovascular risk. There is a significantly increased risk of aortic complications during pregnancy. Specialist cardiology review is essential before proceeding.",
], "FFF3E0"),
spacer(160),
// ── MONITORING ──────────────────────────────────────────────
sectionHeading("8. Monitoring and Follow-Up"),
spacer(80),
body("Women with POI need regular follow-up with a healthcare professional experienced in managing the condition. Typical monitoring includes:"),
spacer(60),
bullet("Annual review of symptoms and hormone therapy — dose adjustments as needed"),
bullet("DEXA scan — bone density check every 2–5 years"),
bullet("Blood pressure and cardiovascular risk monitoring"),
bullet("Thyroid function tests (especially if autoimmune POI)"),
bullet("Adrenal function monitoring (if adrenal antibodies positive)"),
bullet("Mental health and quality of life review"),
bullet("FSH and oestradiol levels to guide HT dosing"),
spacer(80),
body("If you have a confirmed FMR1 premutation, genetic counselling is important — both for your own health and to discuss implications for family members and offspring (risk of fragile X syndrome in male children)."),
spacer(160),
// ── QUESTIONS TO ASK ─────────────────────────────────────────
sectionHeading("9. Questions to Ask Your Doctor"),
spacer(80),
body("Use this checklist at your next appointment:"),
spacer(60),
bullet("What is the most likely cause of my POI?"),
bullet("Do I need genetic testing, including the FMR1 premutation test?"),
bullet("Should I be tested for adrenal and thyroid autoimmunity?"),
bullet("Which hormone therapy route is best for me, and what dose do I need?"),
bullet("Do I need progestogen, and what form is best for me?"),
bullet("Can I use the combined oral contraceptive pill instead of dedicated HRT?"),
bullet("What are my options for having children?"),
bullet("Should I have a DEXA scan now?"),
bullet("What are the warning signs I should watch for?"),
bullet("How often should I be reviewed and by whom?"),
bullet("Can you refer me to a specialist POI clinic or support group?"),
spacer(160),
// ── SUPPORT & RESOURCES ─────────────────────────────────────
sectionHeading("10. Support and Resources"),
spacer(80),
body("You are not alone. Connecting with others who have POI and accessing reliable information is important for your wellbeing:"),
spacer(60),
kvTable([
["Daisy Network (UK)", "www.daisynetwork.org — dedicated charity for women with POI"],
["ESHRE POI Guideline 2024", "Full clinical guideline at www.eshre.eu — comprehensive evidence-based recommendations"],
["International Menopause Society", "www.imsociety.org — patient resources on POI and HRT"],
["British Menopause Society", "www.thebms.org.uk — fact sheets and clinician finder"],
["Fragile X Society", "www.fragilex.org.uk — for women with FMR1 premutation"],
]),
spacer(80),
infoBox([
"Remember",
"POI is a serious but manageable condition. With the right hormone therapy, monitoring, and support, most women with POI can maintain excellent quality of life, protect their long-term health, and make informed choices about their fertility.",
], CREAM),
spacer(160),
// ── GLOSSARY ────────────────────────────────────────────────
sectionHeading("11. Glossary of Terms"),
spacer(80),
kvTable([
["Amenorrhoea", "Absence of menstrual periods"],
["AMH (Anti-Müllerian hormone)", "A blood test reflecting the number of remaining eggs in the ovaries"],
["DEXA scan", "A low-dose X-ray scan to measure bone density"],
["FSH (Follicle-stimulating hormone)", "A hormone from the pituitary gland that stimulates the ovaries; elevated in POI because the ovaries are not responding"],
["FMR1 premutation", "An intermediate expansion of the FMR1 gene associated with POI and risk of fragile X syndrome in offspring"],
["Iatrogenic", "Caused by medical treatment (e.g., chemotherapy-induced POI)"],
["Oophoritis", "Inflammation of the ovaries, often autoimmune"],
["Osteoporosis", "Thinning of the bones, increasing fracture risk"],
["POI", "Premature Ovarian Insufficiency"],
["Progestogen", "A hormone that protects the womb lining when oestrogen is given as HT"],
["Transdermal", "Delivered through the skin (e.g., patches or gel)"],
["Turner syndrome", "A chromosomal condition (45,X) in which one X chromosome is absent, often associated with POI"],
]),
spacer(200),
hr(),
new Paragraph({
children: [
new TextRun({ text: "This summary is based on: Berek & Novak's Gynecology (2020), Goldman-Cecil Medicine, and the ESHRE/ASRM Evidence-Based Guideline on POI (Panay et al., Climacteric, 2024). It is intended for patient education only and does not replace personalised medical advice.", size: 18, color: "888888", italics: true }),
],
alignment: AlignmentType.CENTER,
spacing: { before: 80, after: 80 },
}),
],
},
],
});
Packer.toBuffer(doc).then(buffer => {
fs.writeFileSync("/home/daytona/workspace/poi-patient-summary/POI_Patient_Summary.docx", buffer);
console.log("Document created successfully.");
});
cd /home/daytona/workspace/poi-patient-summary && node create_poi_doc.js 2>&1
python /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/workspace/poi-patient-summary/POI_Patient_Summary.docx 2>&1
cd /home/daytona/workspace/poi-patient-summary && python3 -c " import zipfile, os path = 'POI_Patient_Summary.docx' size = os.path.getsize(path) print(f'File size: {size} bytes ({size/1024:.1f} KB)') with zipfile.ZipFile(path) as z: names = z.namelist() print('Contents:', names[:10]) # Check document.xml is valid XML import xml.etree.ElementTree as ET xml = z.read('word/document.xml') ET.fromstring(xml) print('document.xml parses OK') "
POI Patient Summary
Word Document · DOCX