Answer the missing questions accordingly like temp bp pulse abdominal girth Change chief complaints according to LMP and give me correct gestational age of mother according to that and give me 12 nursing diagnosis according to NANDA nursing diagnosis and it should be in priority wise nursing diagnoses must be arranged in the way first actual and then potential nursing diagnosis and from the first 6 nursing diagnosis give me atleast 10 planning for each and it's rationale subjective and objective data goal and there should not be any planning like assess or evaluate or monitor... and add health education upto 2 pages and bibliography with atleast 5 book reference and journal and website reference...just like the case you gave me before I want in that format completely from history collection to bibliographyHt 155cm Wt 54kg LMP 5.1.2026 EDD 12.11.2026 1st child born in 2021 november by LSCS the last 4 photos are the patient details I've also attached one pdf for example how I want the format to be

Reading File
Reading File
Running Command

python3 -c " from docx import Document doc = Document('/tmp/workspace/attachments/ba3fed1d-3710-4334-bb17-b4174765cb63/Antenatal_Assessment_Mrs_Radha-14.docx') for p in doc.paragraphs: style = p.style.name if p.style else 'None' if p.text.strip(): print(f'[{style}] {p.text}') " 2>&1 | head -300

Running Command

python3 -c " from docx import Document doc = Document('/tmp/workspace/attachments/ba3fed1d-3710-4334-bb17-b4174765cb63/Antenatal_Assessment_Mrs_Radha-14.docx') # Read tables for i, table in enumerate(doc.tables): print(f'=== TABLE {i+1} ===') for row in table.rows: row_data = [cell.text.strip() for cell in row.cells] print(' | '.join(row_data)) print() " 2>&1

Running Command

python3 -c " from datetime import date lmp = date(2026, 1, 5) today = date(2026, 8, 3) diff = today - lmp weeks = diff.days // 7 days = diff.days % 7 print(f'Days since LMP: {diff.days}') print(f'Gestational age: {weeks} weeks and {days} days') print(f'Months: approximately {weeks//4} months') # Fundal height at 29 weeks fh = 29 # cm (roughly equals weeks) # Abdominal girth at 29 weeks ~ 86-88 cm print(f'Fundal height: ~{fh} cm') print(f'Abdominal girth: ~87 cm') # BMI ht = 1.55 wt = 54 bmi = wt / (ht*ht) print(f'BMI: {bmi:.1f}') "

Running Command

mkdir -p /tmp/workspace/antenatal-case && ls /tmp/workspace/antenatal-case/

Writing File

~/antenatal-case/build_doc.py

from docx import Document
from docx.shared import Pt, Inches, RGBColor, Cm
from docx.enum.text import WD_ALIGN_PARAGRAPH
from docx.enum.table import WD_TABLE_ALIGNMENT, WD_ALIGN_VERTICAL
from docx.oxml.ns import qn
from docx.oxml import OxmlElement
import copy

doc = Document()

# ── Page margins ──────────────────────────────────────────────────────────────
section = doc.sections[0]
section.top_margin    = Cm(2)
section.bottom_margin = Cm(2)
section.left_margin   = Cm(2.5)
section.right_margin  = Cm(2.5)

# ── Default styles ────────────────────────────────────────────────────────────
normal = doc.styles["Normal"]
normal.font.name = "Times New Roman"
normal.font.size = Pt(12)

# ── Helper: add shading to table row ──────────────────────────────────────────
def shade_row(row, fill="D9E1F2"):
    for cell in row.cells:
        tc = cell._tc
        tcPr = tc.get_or_add_tcPr()
        shd = OxmlElement("w:shd")
        shd.set(qn("w:val"), "clear")
        shd.set(qn("w:color"), "auto")
        shd.set(qn("w:fill"), fill)
        tcPr.append(shd)

def set_cell_bg(cell, fill):
    tc = cell._tc
    tcPr = tc.get_or_add_tcPr()
    shd = OxmlElement("w:shd")
    shd.set(qn("w:val"), "clear")
    shd.set(qn("w:color"), "auto")
    shd.set(qn("w:fill"), fill)
    tcPr.append(shd)

def bold_cell(cell, text, size=11, align=WD_ALIGN_PARAGRAPH.LEFT, color=None):
    cell.text = ""
    p = cell.paragraphs[0]
    p.alignment = align
    run = p.add_run(text)
    run.bold = True
    run.font.size = Pt(size)
    run.font.name = "Times New Roman"
    if color:
        run.font.color.rgb = RGBColor(*color)

def normal_cell(cell, text, size=11, align=WD_ALIGN_PARAGRAPH.LEFT):
    cell.text = ""
    p = cell.paragraphs[0]
    p.alignment = align
    run = p.add_run(text)
    run.font.size = Pt(size)
    run.font.name = "Times New Roman"

def add_heading(doc, text, level=1, color=(0,70,127)):
    p = doc.add_paragraph()
    p.alignment = WD_ALIGN_PARAGRAPH.LEFT
    run = p.add_run(text)
    run.bold = True
    run.font.size = Pt(14 if level==1 else 12)
    run.font.name = "Times New Roman"
    run.font.color.rgb = RGBColor(*color)
    # bottom border
    pPr = p._p.get_or_add_pPr()
    pBdr = OxmlElement("w:pBdr")
    bottom = OxmlElement("w:bottom")
    bottom.set(qn("w:val"), "single")
    bottom.set(qn("w:sz"), "6")
    bottom.set(qn("w:space"), "1")
    bottom.set(qn("w:color"), "4472C4")
    pBdr.append(bottom)
    pPr.append(pBdr)
    return p

def add_subheading(doc, text):
    p = doc.add_paragraph()
    run = p.add_run(text)
    run.bold = True
    run.underline = True
    run.font.size = Pt(11.5)
    run.font.name = "Times New Roman"
    run.font.color.rgb = RGBColor(0,0,128)
    return p

def kv(doc, key, value):
    p = doc.add_paragraph()
    r1 = p.add_run(key)
    r1.bold = True
    r1.font.size = Pt(11)
    r1.font.name = "Times New Roman"
    r2 = p.add_run("\t" + value)
    r2.font.size = Pt(11)
    r2.font.name = "Times New Roman"
    return p

def add_bullet(doc, text):
    p = doc.add_paragraph(style="List Bullet")
    p.paragraph_format.left_indent = Inches(0.4)
    run = p.add_run(text)
    run.font.size = Pt(11)
    run.font.name = "Times New Roman"

def table_header_row(table, headers, fill="1F3864", text_color=(255,255,255)):
    row = table.rows[0]
    for i, h in enumerate(headers):
        bold_cell(row.cells[i], h, size=10.5, align=WD_ALIGN_PARAGRAPH.CENTER, color=text_color)
        set_cell_bg(row.cells[i], fill)

# ─────────────────────────────────────────────────────────────────────────────
# TITLE PAGE
# ─────────────────────────────────────────────────────────────────────────────
title = doc.add_paragraph()
title.alignment = WD_ALIGN_PARAGRAPH.CENTER
tr = title.add_run("ANTENATAL ASSESSMENT")
tr.bold = True
tr.font.size = Pt(18)
tr.font.name = "Times New Roman"
tr.font.color.rgb = RGBColor(0, 70, 127)

sub = doc.add_paragraph()
sub.alignment = WD_ALIGN_PARAGRAPH.CENTER
sr = sub.add_run("A Case Study on Mrs. Kavitha, 26 years, G2P1L1, 30 weeks (7th month) of gestation")
sr.bold = True
sr.font.size = Pt(13)
sr.font.name = "Times New Roman"
sr.font.color.rgb = RGBColor(50,50,50)

doc.add_paragraph()

# ─────────────────────────────────────────────────────────────────────────────
# PROFILE
# ─────────────────────────────────────────────────────────────────────────────
add_heading(doc, "PROFILE OF THE MOTHER")
kv(doc, "Name", ": Mrs. Kavitha")
kv(doc, "Age", ": 26 years")
kv(doc, "Education", ": 10th Std.")
kv(doc, "Occupation", ": Housewife")
kv(doc, "Blood Group", ": B+ve")
kv(doc, "Nationality", ": Indian")
kv(doc, "Religion", ": Hindu")
kv(doc, "Address", ": (As provided by patient)")

doc.add_paragraph()
add_heading(doc, "PROFILE OF THE FATHER")
kv(doc, "Name", ": Mr. Rajan")
kv(doc, "Age", ": 30 years")
kv(doc, "Education", ": 12th Std.")
kv(doc, "Occupation", ": Private Employee")
kv(doc, "Blood Group", ": O+ve")

doc.add_paragraph()

# ─────────────────────────────────────────────────────────────────────────────
# OBSTETRICAL SCORE
# ─────────────────────────────────────────────────────────────────────────────
add_heading(doc, "OBSTETRICAL SCORE")
kv(doc, "Obstetric Score", ": G2 P1 L1")
kv(doc, "LMP", ": 05/01/2026")
kv(doc, "EDD", ": 12/11/2026")
kv(doc, "Gestational age at present", ": 30 weeks (7th month) — by dates (LMP: 05.01.2026, Today: 03.08.2026 = 210 days = 30 weeks exactly)")
kv(doc, "Nature of conception", ": Natural")
kv(doc, "Pregnancy", ": Planned")

doc.add_paragraph()
add_subheading(doc, "Present Obstetrical History")
p = doc.add_paragraph()
r = p.add_run(
    "Mrs. Kavitha confirmed her pregnancy by a urine pregnancy test followed by an ultrasound scan. "
    "She gives a history of mild nausea and vomiting during the first 2 months of pregnancy. "
    "No congenital anomalies were detected on the anomaly scan. "
    "She is presently in her third trimester of pregnancy (30 weeks, 7th month) and presents with chief complaints of "
    "low back pain, bilateral pedal edema, increased frequency of micturition, and disturbed sleep pattern for the past 2 weeks. "
    "She has been taking Tab. Folic Acid and Tab. Iron supplements as advised. "
    "Her previous pregnancy in November 2021 was delivered by Lower Segment Caesarean Section (LSCS), and the baby is alive and healthy."
)
r.font.size = Pt(11)
r.font.name = "Times New Roman"

doc.add_paragraph()
add_subheading(doc, "1st Trimester")
p = doc.add_paragraph()
r = p.add_run(
    "Mrs. Kavitha experienced mild nausea, vomiting and generalized fatigue during the 1st trimester. "
    "She was started on folic acid supplementation from the time of confirmation of pregnancy. "
    "She visited the antenatal OPD for booking registration."
)
r.font.size = Pt(11); r.font.name = "Times New Roman"

doc.add_paragraph()
add_subheading(doc, "2nd Trimester")
p = doc.add_paragraph()
r = p.add_run(
    "The 2nd trimester was essentially uneventful. Mrs. Kavitha had a mild history of backache and occasional muscle cramps. "
    "Weight gain was within the normal range for gestational age. Quickening (first fetal movements) was experienced at around 20 weeks."
)
r.font.size = Pt(11); r.font.name = "Times New Roman"

doc.add_paragraph()
add_subheading(doc, "3rd Trimester")
p = doc.add_paragraph()
r = p.add_run(
    "Mrs. Kavitha has been experiencing increased frequency of micturition, disturbed sleep, low backache, "
    "and bilateral pedal edema during the 3rd trimester. Fetal movements are felt regularly."
)
r.font.size = Pt(11); r.font.name = "Times New Roman"

kv(doc, "Lightening", ": No")
kv(doc, "Fetal movement", ": 10-12 movements per day")
kv(doc, "Quickening", ": Yes (felt at 20 weeks)")

doc.add_paragraph()
add_subheading(doc, "Past Obstetrical History")

# Past obs table
t = doc.add_table(rows=3, cols=10)
t.style = "Table Grid"
t.alignment = WD_TABLE_ALIGNMENT.CENTER
hdrs = ["S.No","Month & Year","Complication during pregnancy","Abortion","Type of Delivery","Complication","Sex","Birth Wt","Condition","Health Status"]
table_header_row(t, hdrs)

data = [
    ["1","November 2021","Nil","Nil","LSCS","Nil","Female","2.8 kg","Alive","Healthy"],
    ["2","— Present Pregnancy —","— Present Pregnancy —","— Present Pregnancy —","— Present Pregnancy —",
     "— Present Pregnancy —","— Present Pregnancy —","— Present Pregnancy —","— Present Pregnancy —","— Present Pregnancy —"],
]
for i, row_data in enumerate(data):
    row = t.rows[i+1]
    for j, val in enumerate(row_data):
        normal_cell(row.cells[j], val, size=10, align=WD_ALIGN_PARAGRAPH.CENTER)

doc.add_paragraph()

# ─────────────────────────────────────────────────────────────────────────────
# PRESENT HISTORY
# ─────────────────────────────────────────────────────────────────────────────
add_heading(doc, "PRESENT HISTORY")
kv(doc, "Personal habits", ": Nil")
kv(doc, "Diet", ": Mixed (Vegetarian and Non-vegetarian)")
kv(doc, "Sleep / Rest", ": Disturbed sleep at night (5-6 hrs) due to frequent urination; 1 hr rest during daytime")
kv(doc, "Activity of daily living", ": Light household work, short walks, reading")
kv(doc, "Hygiene", ": Brushes teeth twice daily, bathes daily, perineal hygiene maintained")
kv(doc, "Elimination", ": Bowel pattern once a day; bladder 8-10 times per day (increased frequency)")
kv(doc, "Hobbies", ": Watching TV, listening to music")
kv(doc, "Immunization history", ": Tetanus Toxoid / Tdap vaccine taken as per ANC schedule")

doc.add_paragraph()
add_subheading(doc, "Menstrual History")
kv(doc, "Age of menarche", ": 13 years")
kv(doc, "Duration of cycle", ": 4-5 days")
kv(doc, "Amount of flow", ": Normal")
kv(doc, "Regular / Irregular", ": Regular")
kv(doc, "Any Abnormality", ": Nil")
kv(doc, "Remedial measure for complaint", ": Advised rest, leg elevation and BP monitoring for pedal edema")
kv(doc, "Marital history", ": Married since 5 years, no consanguineous marriage")
kv(doc, "Sexual history", ": Good")
kv(doc, "Contraceptive history", ": Used condom contraception after previous LSCS; stopped when planning current pregnancy")
kv(doc, "Drug Allergy", ": Nil")

doc.add_paragraph()
add_subheading(doc, "Past Medical and Surgical History")
p = doc.add_paragraph()
r = p.add_run("Mrs. Kavitha has a history of Lower Segment Caesarean Section (LSCS) in November 2021. No other significant medical or surgical history.")
r.font.size = Pt(11); r.font.name = "Times New Roman"

doc.add_paragraph()
add_subheading(doc, "Present Medical and Surgical History")
p = doc.add_paragraph()
r = p.add_run("Mrs. Kavitha does not have any current medical or surgical conditions. She is currently taking Tab. Folic Acid and Tab. Iron supplements as advised.")
r.font.size = Pt(11); r.font.name = "Times New Roman"

doc.add_paragraph()

# ─────────────────────────────────────────────────────────────────────────────
# CHIEF COMPLAINTS
# ─────────────────────────────────────────────────────────────────────────────
add_heading(doc, "CHIEF COMPLAINTS (at 30 weeks / 7th month of gestation)")
p = doc.add_paragraph()
r = p.add_run(
    "Mrs. Kavitha presents with the following complaints for the past 2 weeks:\n"
    "1. Low back pain — aggravated on prolonged standing and walking.\n"
    "2. Bilateral pedal edema — swelling of both feet and ankles, more by evening.\n"
    "3. Increased frequency of micturition — 8-10 times per day including nocturia.\n"
    "4. Disturbed sleep pattern — due to backache and frequent urination at night.\n"
    "5. Generalized fatigue — easily exhausted on mild exertion.\n"
    "6. Mild anxiety regarding the upcoming delivery and previous LSCS scar."
)
r.font.size = Pt(11); r.font.name = "Times New Roman"

doc.add_paragraph()

# ─────────────────────────────────────────────────────────────────────────────
# PHYSICAL EXAMINATION
# ─────────────────────────────────────────────────────────────────────────────
add_heading(doc, "PHYSICAL EXAMINATION")
add_subheading(doc, "General Assessment")
kv(doc, "Height", ": 155 cm")
kv(doc, "Weight", ": 54 kg")
kv(doc, "BMI", ": 54 ÷ (1.55 × 1.55) = 22.5 kg/m²")
kv(doc, "BMI Category", ": Normal")
kv(doc, "Gait", ": Normal, slightly waddling gait")
kv(doc, "Posture", ": Mild lordotic posture due to gravid uterus")

doc.add_paragraph()
add_subheading(doc, "Vital Signs")
kv(doc, "Temperature", ": 98.6°F (37°C)")
kv(doc, "Pulse", ": 84 beats/min, regular, good volume")
kv(doc, "Respiration", ": 20 breaths/min")
kv(doc, "Blood Pressure", ": 110/70 mmHg (normal)")

doc.add_paragraph()
add_subheading(doc, "General Appearance")
kv(doc, "Body built", ": Normal, lean")
kv(doc, "Health status", ": Fairly healthy")
kv(doc, "Activity", ": Active, mild fatigue noted")

doc.add_paragraph()
add_subheading(doc, "Mental Status")
kv(doc, "Orientation", ": Oriented to place, time and person")
kv(doc, "Facial expression", ": Mildly anxious")

doc.add_paragraph()
add_subheading(doc, "Respiratory System")
kv(doc, "Breath sound", ": Broncho-vesicular sound")
kv(doc, "Respiratory rate", ": 20 breaths/min")

doc.add_paragraph()
add_subheading(doc, "Cardiovascular System")
kv(doc, "Heart sound", ": S1 and S2 heard")
kv(doc, "Rhythm", ": Regular")
kv(doc, "Heart Rate", ": 84 beats/min")
kv(doc, "Murmur", ": No")

doc.add_paragraph()
add_subheading(doc, "GI System")
kv(doc, "Bowel sound", ": Bowel sounds heard in all four quadrants")

doc.add_paragraph()
add_subheading(doc, "Central Nervous System")
kv(doc, "Numbness", ": Absent")
kv(doc, "Giddiness", ": Absent")
kv(doc, "Headache", ": Absent")

doc.add_paragraph()
add_subheading(doc, "Genito-Urinary System")
kv(doc, "Frequency of micturition", ": Present (8-10 times/day)")
kv(doc, "Burning sensation", ": No")

doc.add_paragraph()
add_subheading(doc, "Findings")
p = doc.add_paragraph()
r = p.add_run(
    "Mrs. Kavitha's chief complaints are low back pain, bilateral pedal edema, and increased frequency of micturition. "
    "Conjunctiva is mildly pale in colour, suggesting mild anaemia. Vital signs are within normal limits. "
    "Blood pressure is 110/70 mmHg."
)
r.font.size = Pt(11); r.font.name = "Times New Roman"

doc.add_paragraph()

# ─────────────────────────────────────────────────────────────────────────────
# OBSTETRICAL EXAMINATION
# ─────────────────────────────────────────────────────────────────────────────
add_heading(doc, "OBSTETRICAL EXAMINATION")

add_subheading(doc, "BREAST")
p = doc.add_paragraph(); p.add_run("Inspection:").bold = True
kv(doc, "Size", ": Enlarged")
kv(doc, "Symmetry", ": Symmetrical")
kv(doc, "Primary areola", ": Increased pigmentation")
kv(doc, "Secondary areola", ": Normal")
kv(doc, "Montgomery's tubercle", ": Present")
kv(doc, "Nipple", ": Not cracked, normal, prominent, everted")
kv(doc, "Discolouration", ": Absent")
p2 = doc.add_paragraph(); p2.add_run("Palpation:").bold = True
kv(doc, "Consistency", ": Normal, no lump")
kv(doc, "Axillary node", ": Not enlarged")
kv(doc, "Lump", ": Absent")

doc.add_paragraph()
add_subheading(doc, "ABDOMEN")
p3 = doc.add_paragraph(); p3.add_run("Inspection:").bold = True
kv(doc, "Size", ": Appropriate to gestational age (30 weeks)")
kv(doc, "Shape", ": Ovoid")
kv(doc, "Contour", ": Smooth")
kv(doc, "Condition of umbilicus", ": Flat")
kv(doc, "Skin changes", ": Linea nigra and striae gravidarum present")
kv(doc, "Fetal movement", ": Not visible at time of inspection")
kv(doc, "Previous operative scar", ": Pfannenstiel scar from previous LSCS present (healed, non-tender)")
kv(doc, "Scar tenderness", ": Absent")

doc.add_paragraph()
add_subheading(doc, "Clinical Assessment of Gestational Age")
kv(doc, "Abdominal girth", ": 87 cm")
kv(doc, "Fundal height", ": 29 cm")
kv(doc, "Gestational age in weeks", ": 30 weeks (by dates and by Modified McDonald's Rule)")
p = doc.add_paragraph()
r = p.add_run(
    "Modified McDonald's Rule: Fundal height in cm = Gestational age in weeks → 29 cm ≈ 30 weeks "
    "(correlates with LMP 05/01/2026, consistent with 30 weeks gestation on 03/08/2026)."
)
r.font.size = Pt(11); r.font.name = "Times New Roman"

p4 = doc.add_paragraph(); p4.add_run("Palpation:").bold = True
kv(doc, "Consistency", ": Soft")
kv(doc, "Nodules / Lump", ": Absent")
doc.add_paragraph()
p5 = doc.add_paragraph(); p5.add_run("Fundal Palpation:").bold = True
p = doc.add_paragraph()
r = p.add_run(
    "Broad, soft and irregular mass felt at the fundus — suggestive of the fetal breech (buttocks) occupying the fundus. "
    "This is consistent with a cephalic (vertex) presentation."
)
r.font.size = Pt(11); r.font.name = "Times New Roman"

p6 = doc.add_paragraph(); p6.add_run("Lateral Palpation:").bold = True
kv(doc, "Right side", ": Smooth, curved, hard, resistant mass felt — indicates fetal back")
kv(doc, "Left side", ": Small, irregular, knobby parts felt — indicates fetal limbs")

p7 = doc.add_paragraph(); p7.add_run("Pelvic Palpation:").bold = True
kv(doc, "Grip I (First Pelvic Grip)", ": Hard, round, ballotable mass felt at the pelvic brim — fetal head present")
kv(doc, "Grip II (Second Pelvic Grip / Pawlik's Grip)", ": Head not engaged; 4/5 palpable above the brim")

doc.add_paragraph()
add_subheading(doc, "Auscultation")
kv(doc, "FHR", ": 140 beats/min (auscultated at right iliac fossa, below the umbilicus)")
kv(doc, "Rhythm", ": Regular")
kv(doc, "Edema", ": Bilateral pitting pedal edema present — Grade I; medial malleolus and dorsalis pedis edema in both lower extremities")

doc.add_paragraph()
add_subheading(doc, "Summary of Findings")
kv(doc, "Lie", ": Longitudinal")
kv(doc, "Presentation", ": Cephalic (Vertex)")
kv(doc, "Position", ": Right Occipito-Anterior (ROA)")
kv(doc, "FHR", ": 140 beats/min")
kv(doc, "Attitude", ": Flexed")
kv(doc, "Engagement", ": Not engaged (4/5 palpable)")

doc.add_paragraph()

# ─────────────────────────────────────────────────────────────────────────────
# INVESTIGATIONS
# ─────────────────────────────────────────────────────────────────────────────
add_heading(doc, "INVESTIGATIONS")
kv(doc, "USG Scan", ": Single live intrauterine gestation of 30 weeks. Fetus in cephalic presentation. No obvious congenital anomalies detected. Adequate liquor. Previous LSCS scar appears intact.")

doc.add_paragraph()
t2 = doc.add_table(rows=8, cols=5)
t2.style = "Table Grid"
t2.alignment = WD_TABLE_ALIGNMENT.CENTER
table_header_row(t2, ["S.No","Name of Investigation","Patient Value","Normal Value","Remarks"])
inv_data = [
    ["1","Hb","10.2 gm/dl","12 – 15 gm/dl","Decreased (Mild Anaemia)"],
    ["2","WBC","8,500 cells/cumm","8,000 – 11,000 cells/cumm","Normal"],
    ["3","Platelet count","2,20,000 cells/cumm","1,50,000 – 3,00,000 cells/cumm","Normal"],
    ["4","Total RBC","3.20 million/cumm","2.5 – 3.5 million/cumm","Normal"],
    ["5","Fasting blood sugar","86 mg/dl","80 – 120 mg/dl","Normal"],
    ["6","Post-prandial blood sugar","118 mg/dl","120 – 160 mg/dl","Normal"],
    ["7","Urine albumin","Nil","Nil","Normal"],
]
for i, row_data in enumerate(inv_data):
    row = t2.rows[i+1]
    for j, val in enumerate(row_data):
        normal_cell(row.cells[j], val, size=10, align=WD_ALIGN_PARAGRAPH.CENTER)

doc.add_paragraph()

# ─────────────────────────────────────────────────────────────────────────────
# MEDICATION
# ─────────────────────────────────────────────────────────────────────────────
add_heading(doc, "MEDICATION")
t3 = doc.add_table(rows=3, cols=5)
t3.style = "Table Grid"
t3.alignment = WD_TABLE_ALIGNMENT.CENTER
table_header_row(t3, ["S.No","Drug","Dose/Route/Freq","Mode of Action","Side Effects / Nurse's Responsibility"])
med_data = [
    ["1","Tab. Folic Acid","5 mg, OD, oral",
     "Co-enzyme for biosynthesis of DNA/RNA nitrogenous bases; supports neural tube development",
     "Nausea, loss of appetite. Educate about importance, administer with food, monitor for adverse effects."],
    ["2","Tab. Iron (Ferrous Sulphate)","100 mg elemental iron, OD, oral",
     "Essential component of haemoglobin synthesis; corrects iron deficiency anaemia",
     "Constipation, black stools, gastric irritation. Advise Vit C with dose; avoid tea/coffee; monitor Hb."],
]
for i, row_data in enumerate(med_data):
    row = t3.rows[i+1]
    for j, val in enumerate(row_data):
        normal_cell(row.cells[j], val, size=10, align=WD_ALIGN_PARAGRAPH.LEFT)

doc.add_paragraph()

# ─────────────────────────────────────────────────────────────────────────────
# NURSING DIAGNOSES
# ─────────────────────────────────────────────────────────────────────────────
add_heading(doc, "NURSING DIAGNOSIS (NANDA — Actual, then Potential, Priority Wise)")
add_subheading(doc, "A. Actual Nursing Diagnoses")
actual_nd = [
    "1. Excess fluid volume related to physiological changes of the third trimester as evidenced by bilateral pitting pedal edema.",
    "2. Acute pain (low back pain) related to postural changes and increased weight of the gravid uterus as evidenced by verbal complaint of pain rated 6/10.",
    "3. Impaired urinary elimination (frequency) related to pressure of the gravid uterus on the urinary bladder as evidenced by increased frequency of micturition (8-10 times/day).",
    "4. Disturbed sleep pattern related to physical discomfort, backache and frequent urination as evidenced by patient verbalization and presence of dark circles under eyes.",
    "5. Activity intolerance / Fatigue related to increased metabolic demands of pregnancy and mild anaemia as evidenced by verbalized tiredness and reduced activity.",
    "6. Imbalanced nutrition: Less than body requirements related to inadequate dietary intake relative to increased demands of pregnancy as evidenced by Hb 10.2 gm/dl.",
    "7. Anxiety related to upcoming delivery, concern about previous LSCS scar, and upcoming birth process as evidenced by patient verbalization and facial tension.",
    "8. Knowledge deficit related to management of discomforts of the third trimester and danger signs of pregnancy as evidenced by frequent questioning.",
    "9. Self-care deficit related to fatigue and physical discomfort during the third trimester as evidenced by reduced participation in daily activities.",
]
for nd in actual_nd:
    p = doc.add_paragraph()
    r = p.add_run(nd)
    r.font.size = Pt(11); r.font.name = "Times New Roman"
    p.paragraph_format.space_after = Pt(3)

doc.add_paragraph()
add_subheading(doc, "B. Potential (Risk) Nursing Diagnoses")
potential_nd = [
    "10. Risk for ineffective peripheral tissue perfusion related to impaired venous return secondary to gravid uterus as evidenced by bilateral pedal edema.",
    "11. Risk for urinary tract infection related to urinary stasis and frequent voiding secondary to gravid uterus pressure.",
    "12. Risk for constipation related to decreased gastrointestinal motility, iron supplementation, and reduced physical activity.",
]
for nd in potential_nd:
    p = doc.add_paragraph()
    r = p.add_run(nd)
    r.font.size = Pt(11); r.font.name = "Times New Roman"
    p.paragraph_format.space_after = Pt(3)

doc.add_paragraph()

# ─────────────────────────────────────────────────────────────────────────────
# DETAILED NURSING CARE PLAN — DIAGNOSES 1 to 6
# ─────────────────────────────────────────────────────────────────────────────
add_heading(doc, "DETAILED NURSING CARE PLAN — DIAGNOSIS 1 to 6")
p = doc.add_paragraph()
r = p.add_run(
    "(Full care plans with Subjective Data, Objective Data, Nursing Diagnosis, Goal, Planning and Rationale "
    "are given below for the first six priority actual nursing diagnoses.)"
)
r.font.size = Pt(10); r.font.name = "Times New Roman"; r.italic = True

# Helper to add care plan intro
def care_plan_intro(doc, diag_num, heading_text, sd, od, nd_text, goal_st, goal_lt):
    add_subheading(doc, f"Diagnosis {diag_num}: {heading_text}")
    p = doc.add_paragraph()
    r = p.add_run("Subjective Data: "); r.bold = True; r.font.size = Pt(11); r.font.name = "Times New Roman"
    r2 = p.add_run(sd); r2.font.size = Pt(11); r2.font.name = "Times New Roman"
    p2 = doc.add_paragraph()
    r3 = p2.add_run("Objective Data: "); r3.bold = True; r3.font.size = Pt(11); r3.font.name = "Times New Roman"
    r4 = p2.add_run(od); r4.font.size = Pt(11); r4.font.name = "Times New Roman"
    p3 = doc.add_paragraph()
    r5 = p3.add_run("Nursing Diagnosis: "); r5.bold = True; r5.font.size = Pt(11); r5.font.name = "Times New Roman"
    r6 = p3.add_run(nd_text); r6.font.size = Pt(11); r6.font.name = "Times New Roman"
    p4 = doc.add_paragraph()
    r7 = p4.add_run("Goal (Short Term): "); r7.bold = True; r7.font.size = Pt(11); r7.font.name = "Times New Roman"
    r8 = p4.add_run(goal_st); r8.font.size = Pt(11); r8.font.name = "Times New Roman"
    p5 = doc.add_paragraph()
    r9 = p5.add_run("Goal (Long Term): "); r9.bold = True; r9.font.size = Pt(11); r9.font.name = "Times New Roman"
    r10 = p5.add_run(goal_lt); r10.font.size = Pt(11); r10.font.name = "Times New Roman"

def care_plan_table(doc, rows_data):
    """rows_data: list of [sno, intervention, rationale]"""
    t = doc.add_table(rows=len(rows_data)+1, cols=3)
    t.style = "Table Grid"
    t.alignment = WD_TABLE_ALIGNMENT.CENTER
    # set column widths
    for i, w in enumerate([Cm(1.2), Cm(8.8), Cm(7.5)]):
        for row in t.rows:
            row.cells[i].width = w
    table_header_row(t, ["S.No","Planning (Nursing Intervention)","Rationale"])
    for i, rd in enumerate(rows_data):
        row = t.rows[i+1]
        normal_cell(row.cells[0], rd[0], size=10, align=WD_ALIGN_PARAGRAPH.CENTER)
        normal_cell(row.cells[1], rd[1], size=10, align=WD_ALIGN_PARAGRAPH.LEFT)
        normal_cell(row.cells[2], rd[2], size=10, align=WD_ALIGN_PARAGRAPH.LEFT)
    doc.add_paragraph()

# ── DIAGNOSIS 1: Excess Fluid Volume ─────────────────────────────────────────
care_plan_intro(doc, 1, "Excess Fluid Volume",
    sd='The patient verbalizes, "My legs have been swelling for the past two weeks, especially in the evening, and my footwear feels tight."',
    od="Bilateral pitting pedal edema (Grade I) noted; dorsalis pedis and medial malleolus edema present bilaterally; BP 110/70 mmHg; weight 54 kg.",
    nd_text="Excess fluid volume related to physiological changes of the third trimester of pregnancy as evidenced by bilateral pitting pedal edema.",
    goal_st="The patient will demonstrate a reduction in pedal edema within 3-5 days of nursing intervention.",
    goal_lt="The patient will maintain adequate fluid balance throughout the remaining period of pregnancy."
)
care_plan_table(doc, [
    ["1","Elevate both lower limbs above the level of the heart during all rest periods using pillows or a wedge.",
     "Promotes venous return by utilizing gravity to drain accumulated interstitial fluid from the lower extremities, thereby reducing dependent edema."],
    ["2","Position the patient in the left lateral position during rest and sleep.",
     "Relieves pressure of the gravid uterus on the inferior vena cava and improves venous return from the lower extremities, which reduces the degree of pedal edema."],
    ["3","Encourage the use of well-fitted, comfortable, low-heeled footwear and loose, non-restrictive clothing.",
     "Prevents external constriction of peripheral blood vessels which would further impair venous circulation and worsen dependent edema."],
    ["4","Restrict prolonged standing or sitting in a single position for extended durations; advise frequent positional changes.",
     "Minimizes dependent pooling of fluid in the lower extremities caused by the effects of gravity and reduced venous return in a single static position."],
    ["5","Advise the patient to avoid crossing her legs while sitting.",
     "Prevents mechanical obstruction of venous circulation in the popliteal region which would aggravate fluid pooling in the lower limbs."],
    ["6","Restrict excessive dietary sodium intake; advise avoiding pickles, processed and packaged foods.",
     "Excess sodium promotes renal reabsorption of water, increasing extracellular fluid volume and thereby worsening edema."],
    ["7","Encourage adequate dietary protein intake through inclusion of eggs, legumes, dairy products and pulses.",
     "Adequate protein maintains plasma oncotic pressure (colloid osmotic pressure), which prevents pathological shift of fluid into the interstitial spaces."],
    ["8","Encourage gentle ankle circular movements and foot dorsiflexion-plantar flexion exercises several times a day.",
     "Activates the calf muscle pump mechanism, which actively propels venous blood upward from the lower extremities, facilitating venous return."],
    ["9","Provide a footrest or pillow support under the feet while the patient is seated during the day.",
     "Assists in maintaining mild elevation of the lower limbs throughout the waking hours, promoting continuous venous drainage and reducing edema accumulation."],
    ["10","Instruct the patient to wear graduated compression stockings (if prescribed) throughout the day.",
     "Provides external graduated pressure that counteracts the effect of gravity on venous pooling and enhances venous return from the distal lower extremities."],
])

# ── DIAGNOSIS 2: Acute Pain (Low Back Pain) ───────────────────────────────────
care_plan_intro(doc, 2, "Acute Pain (Low Back Pain)",
    sd='The patient verbalizes, "I have a constant pain in my lower back, which gets worse when I stand for a long time or climb stairs."',
    od="Guarded posture noted; facial grimacing observed while changing position; mild lordotic posture present; pain rated 6/10 on the numeric pain rating scale.",
    nd_text="Acute pain (low back pain) related to postural changes and increased weight of the gravid uterus as evidenced by a pain rating of 6/10 and guarded posture.",
    goal_st="The patient will report a reduction in back pain to 3/10 or less within 2-3 days of nursing intervention.",
    goal_lt="The patient will be able to perform activities of daily living with minimal discomfort throughout the remaining period of pregnancy."
)
care_plan_table(doc, [
    ["1","Position the patient in proper body alignment while sitting and standing; advise to sit with back well-supported and feet flat on the floor.",
     "Reduces undue strain on the lumbar spine and paraspinal muscles by maintaining proper vertebral alignment, thereby decreasing the mechanical cause of back pain."],
    ["2","Provide a firm mattress and ensure adequate lumbar support with a rolled towel or supportive pillow during rest.",
     "Maintains proper spinal alignment during sleep and rest, preventing excessive lumbar lordosis which is a primary contributor to pregnancy-related backache."],
    ["3","Teach the patient correct body mechanics for bending, lifting and turning — advise bending at the knees rather than at the waist.",
     "Prevents undue mechanical strain and shear forces on the lumbar vertebrae and intervertebral discs, reducing acute pain episodes."],
    ["4","Encourage the use of a maternity support belt or abdominal binder as advised by the physician.",
     "Provides external mechanical support to the abdominal and lumbar muscles, reducing the strain caused by the increasing weight of the gravid uterus on the lower back."],
    ["5","Provide gentle effleurage (back massage) to the lower back with slow, circular stroking movements using warm oil.",
     "Promotes local muscle relaxation, improves blood circulation to the affected area, and stimulates release of endorphins, thereby reducing pain perception."],
    ["6","Teach pelvic tilt exercises: lying supine with knees bent, press the small of the back to the floor and hold for 5 seconds.",
     "Strengthens the abdominal and gluteal muscles, corrects lumbar lordosis and relieves mechanical pressure on the lower back structures."],
    ["7","Encourage the patient to wear low-heeled, well-supported footwear at all times.",
     "Reduces lumbar lordosis caused by high heels, maintains proper weight distribution, and decreases strain on the lumbosacral junction."],
    ["8","Apply a warm water bottle or warm compress to the lower back for 15-20 minutes at a time.",
     "Promotes vasodilatation and muscle relaxation in the lumbosacral region, improves local blood flow, and reduces the intensity of muscle spasm-related pain."],
    ["9","Teach relaxation techniques including slow diaphragmatic breathing and progressive muscle relaxation.",
     "Diverts the patient's attention from the pain (gate control mechanism), reduces associated anxiety and muscle tension, thereby lowering the perceived intensity of pain."],
    ["10","Administer prescribed analgesics (e.g., paracetamol) as ordered by the physician; instruct patient to take them as directed.",
     "Provides pharmacological inhibition of prostaglandin synthesis, offering systemic pain relief when non-pharmacological measures alone are insufficient."],
])

# ── DIAGNOSIS 3: Impaired Urinary Elimination ────────────────────────────────
care_plan_intro(doc, 3, "Impaired Urinary Elimination (Frequency)",
    sd='The patient verbalizes, "I need to urinate very often throughout the day and many times during the night, which disturbs my sleep."',
    od="Urinary frequency of 8-10 times per day noted; nocturia present; gravid uterus at 30 weeks palpated exerting pressure on the bladder.",
    nd_text="Impaired urinary elimination (frequency) related to pressure of the gravid uterus on the urinary bladder as evidenced by increased frequency of micturition (8-10 times/day).",
    goal_st="The patient will verbalize understanding of measures to manage urinary frequency within 1-2 days of nursing intervention.",
    goal_lt="The patient will experience minimal disruption of daily activities and sleep due to urinary frequency throughout the remaining period of pregnancy."
)
care_plan_table(doc, [
    ["1","Encourage the patient to void at regular intervals (every 2-3 hours) during the day and empty the bladder completely by leaning slightly forward while voiding (double-voiding technique).",
     "Prevents accumulation of large urine volumes that stretch the bladder, reduces the constant urge to urinate, and minimizes residual urine which is a risk factor for urinary tract infection."],
    ["2","Advise the patient to reduce fluid intake 2-3 hours before bedtime.",
     "Reduces the amount of urine produced during nighttime hours, thereby minimizing nocturia and improving the quality of sleep without compromising daytime hydration."],
    ["3","Encourage adequate fluid intake of at least 8-10 glasses of water during the daytime hours.",
     "Ensures proper hydration which prevents urinary tract infection by diluting and flushing bacterial pathogens from the urinary tract."],
    ["4","Restrict intake of caffeinated beverages such as tea, coffee and carbonated drinks.",
     "Caffeine acts as a diuretic and bladder irritant, increasing both the volume and frequency of urination; its restriction reduces this pharmacological stimulus."],
    ["5","Teach the patient to assume the knee-chest position briefly several times a day to shift the gravid uterus off the bladder.",
     "Temporarily relieves the mechanical pressure of the gravid uterus on the urinary bladder, providing short-term symptomatic relief from the urgency to void."],
    ["6","Encourage the patient to wear comfortable, easily removable, loose-fitting lower garments.",
     "Facilitates prompt and easy access to the toilet during frequent voiding urges, reducing anxiety and the risk of involuntary leakage due to delayed voiding."],
    ["7","Provide privacy, a clean toilet facility, and easy access to the bathroom at all times.",
     "Psychological privacy reduces anxiety and embarrassment associated with frequent voiding, promoting complete and relaxed bladder emptying."],
    ["8","Teach the patient proper perineal hygiene — front to back wiping technique after each void.",
     "Prevents ascending urinary tract infection by minimizing contamination of the urethral meatus with rectal flora."],
    ["9","Instruct the patient on signs and symptoms of urinary tract infection (burning, fever, cloudy or foul-smelling urine) and to report immediately.",
     "Enables prompt identification and reporting of urinary tract infection, which carries risk of ascending pyelonephritis in pregnancy and can trigger preterm labour."],
    ["10","Encourage the patient to practise pelvic floor (Kegel) exercises: contract the pelvic floor muscles for 5-10 seconds and release, 10 repetitions, 3 times a day.",
     "Strengthens the pelvic floor and sphincter muscles, improving bladder control and reducing urinary urgency and stress incontinence associated with the growing uterus."],
])

# ── DIAGNOSIS 4: Disturbed Sleep Pattern ─────────────────────────────────────
care_plan_intro(doc, 4, "Disturbed Sleep Pattern",
    sd='The patient verbalizes, "I cannot sleep properly at night because of the back pain and because I have to get up to urinate many times."',
    od="Dark circles noted under both eyes; patient appears fatigued; reports only 5-6 hours of interrupted sleep at night.",
    nd_text="Disturbed sleep pattern related to physical discomfort (backache) and frequent urination as evidenced by patient verbalization of poor sleep and presence of dark circles.",
    goal_st="The patient will report improved quality of sleep within 3-4 days of nursing intervention.",
    goal_lt="The patient will achieve adequate rest of 7-8 hours per night for the remaining period of pregnancy."
)
care_plan_table(doc, [
    ["1","Provide a quiet, well-ventilated, dimly lit, and comfortable sleeping environment free from noise and unnecessary disturbances.",
     "Minimizes external sensory stimuli that activate the arousal system and prevent the initiation or maintenance of sleep, thereby facilitating the onset of natural sleep."],
    ["2","Encourage the patient to establish a regular bedtime routine at the same time each night.",
     "Reinforces the circadian rhythm and conditions the brain to associate specific pre-sleep activities with sleep onset, thereby regulating the sleep-wake cycle."],
    ["3","Position the patient in the left lateral (Sims') position with a pillow between the knees and a pillow supporting the abdomen.",
     "Improves maternal comfort, reduces pressure on the lumbar spine and inferior vena cava, optimizes placental blood flow, and alleviates backache — all of which contribute to uninterrupted sleep."],
    ["4","Restrict fluid intake 2-3 hours before bedtime.",
     "Reduces nocturnal urine production, thereby minimizing episodes of nocturia that repeatedly interrupt sleep during the night."],
    ["5","Teach relaxation techniques such as slow diaphragmatic breathing, progressive muscle relaxation and guided imagery as a pre-sleep routine.",
     "Activates the parasympathetic nervous system, reduces physiological and psychological arousal, decreases muscle tension, and promotes the mental calm required for sleep onset."],
    ["6","Discourage prolonged daytime napping of more than 30-45 minutes.",
     "Excessive daytime sleep reduces sleep pressure (adenosine accumulation) that builds during waking hours, making it harder to fall asleep or stay asleep at night."],
    ["7","Provide a warm foot soak or gentle lower back massage before bedtime.",
     "Promotes peripheral vasodilation, reduces muscle tension and physical discomfort, and creates a soothing sensory experience that prepares the body physiologically for sleep."],
    ["8","Reduce environmental noise and dim the lights in the sleeping area from early evening onwards.",
     "Reduction in light exposure promotes melatonin secretion from the pineal gland, which is the primary hormonal mediator of sleep onset in the human circadian system."],
    ["9","Encourage light physical activity such as a 15-20 minute evening walk (if not contraindicated).",
     "Moderate physical activity produces physiological fatigue that enhances the natural drive to sleep (homeostatic sleep pressure), improving sleep quality and duration at night."],
    ["10","Educate the patient's family members to maintain a quiet and undisturbed environment during her rest and sleep periods.",
     "Environmental noise from family members is a common cause of sleep fragmentation; family education ensures co-operation in creating a supportive, restful environment for the patient."],
])

# ── DIAGNOSIS 5: Activity Intolerance / Fatigue ───────────────────────────────
care_plan_intro(doc, 5, "Activity Intolerance / Fatigue",
    sd='The patient verbalizes, "I feel very tired most of the time and even small activities like climbing a few steps make me feel exhausted."',
    od="Reduced participation in daily activities noted; generalized weakness observed; Hb 10.2 gm/dl indicating mild anaemia.",
    nd_text="Activity intolerance / fatigue related to increased metabolic demands of pregnancy and mild anaemia as evidenced by reduced activity, verbalized tiredness and Hb 10.2 gm/dl.",
    goal_st="The patient will verbalize a reduction in fatigue and demonstrate improved tolerance to light activity within 3-5 days.",
    goal_lt="The patient will be able to perform activities of daily living without excessive fatigue throughout the remaining period of pregnancy."
)
care_plan_table(doc, [
    ["1","Plan all patient activities with scheduled rest periods interspersed between tasks; alternate rest with activity.",
     "Conserves the patient's limited energy reserves by preventing sustained exertion that depletes available energy, thereby reducing the subjective experience of fatigue."],
    ["2","Encourage the patient to prioritize essential activities (personal hygiene, feeding) and delegate non-essential household tasks to family members.",
     "Effective energy conservation by prioritizing high-importance tasks ensures that the patient's available energy is directed towards physiologically necessary activities."],
    ["3","Provide a nutritious, iron-rich diet including dark leafy vegetables, jaggery, dates, beans, eggs and meat.",
     "Dietary iron replenishes the body's iron stores and supports haemoglobin synthesis in the bone marrow, increasing the oxygen-carrying capacity of the blood and directly reducing fatigue."],
    ["4","Administer prescribed Iron and Folic Acid supplements as ordered; educate the patient on the importance of regular intake.",
     "Pharmacological correction of iron deficiency anaemia improves haemoglobin levels, restores adequate oxygen delivery to peripheral tissues, and thereby reduces exercise-induced fatigue."],
    ["5","Encourage adequate rest: 8 hours of sleep at night and a short afternoon nap of 1 hour.",
     "Adequate sleep is essential for cellular repair and energy restoration; it replenishes the ATP reserves and reduces the physiological fatigue caused by the increased metabolic demands of pregnancy."],
    ["6","Teach energy conservation techniques: sit while performing cooking or grooming tasks; use a chair in the bathroom.",
     "Performing activities in a seated position reduces the gravitational load on the lower limbs and decreases the total energy expenditure required to complete the same task."],
    ["7","Encourage family members to actively assist the patient with housework and childcare responsibilities.",
     "Reducing the patient's physical burden by delegating tasks to family members conserves energy for essential activities and prevents exhaustion."],
    ["8","Encourage a gradual and progressive increase in light physical activity, starting with short 10-minute walks and increasing as tolerated.",
     "Graduated physical activity improves cardiovascular efficiency and muscular endurance over time, increasing the patient's overall exercise tolerance without causing acute fatigue."],
    ["9","Provide a calm, restful and peaceful environment during the patient's designated rest periods.",
     "A low-stimulation environment minimizes sympathetic nervous system activation and promotes the physiological relaxation response necessary for effective energy recovery."],
    ["10","Educate the patient on the importance of a well-balanced diet rich in iron, protein, calcium and vitamins to support the increased metabolic demands of the third trimester.",
     "Nutritional knowledge empowers the patient to make informed dietary choices that provide the macro- and micronutrients essential for energy metabolism, supporting both maternal wellbeing and fetal development."],
])

# ── DIAGNOSIS 6: Imbalanced Nutrition: Less Than Body Requirements ────────────
care_plan_intro(doc, 6, "Imbalanced Nutrition: Less Than Body Requirements",
    sd='The patient verbalizes, "I do not feel like eating much lately and often feel nauseated after meals."',
    od="Hb 10.2 gm/dl (mild anaemia); conjunctiva mildly pale; BMI 22.5 kg/m² (normal but nutrition at risk with growing fetal demands); mild pallor of mucous membranes noted.",
    nd_text="Imbalanced nutrition: less than body requirements related to inadequate dietary intake to meet the increased nutritional demands of the third trimester as evidenced by Hb 10.2 gm/dl and pale conjunctiva.",
    goal_st="The patient will verbalize understanding of nutritional needs during the third trimester and demonstrate willingness to follow the recommended diet within 2-3 days.",
    goal_lt="The patient will achieve and maintain haemoglobin levels of 11 gm/dl or above and appropriate weight gain by the remaining period of pregnancy."
)
care_plan_table(doc, [
    ["1","Provide a well-balanced, individualized diet plan meeting the increased caloric requirement of pregnancy (additional 300 kcal/day in the third trimester).",
     "Meets the elevated energy demands of the growing fetus, placenta and maternal tissues during the third trimester, preventing nutritional deficiency and supporting fetal growth."],
    ["2","Encourage small, frequent meals (5-6 times per day) rather than large meals.",
     "Small frequent meals prevent gastric over-distension, reduce pregnancy-related nausea and heartburn, and ensure a more sustained and steady supply of nutrients throughout the day."],
    ["3","Encourage inclusion of iron-rich foods: dark leafy vegetables (spinach, drumstick leaves), jaggery, dates, eggs, and lean meat.",
     "Dietary iron is the substrate for haemoglobin synthesis; increasing its intake helps correct mild iron deficiency anaemia and improves the oxygen-carrying capacity of the blood."],
    ["4","Advise the patient to take iron-rich foods with Vitamin C sources (lemon, amla, orange) and avoid tea or coffee within 1 hour of iron-rich meals.",
     "Ascorbic acid (Vitamin C) reduces ferric iron to the more absorbable ferrous form, enhancing intestinal iron absorption by up to three-fold; tannins in tea and coffee chelate iron and inhibit absorption."],
    ["5","Encourage adequate protein intake through milk, curd, paneer, legumes, pulses and eggs (at least 70-80 g protein/day).",
     "Protein is essential for fetal growth, placental development, maternal blood volume expansion and synthesis of haemoglobin; inadequate intake leads to poor fetal growth and worsened anaemia."],
    ["6","Encourage daily intake of calcium-rich foods: milk (2-3 glasses/day), green leafy vegetables, ragi and sesame seeds.",
     "Calcium supports fetal skeletal and dental mineralization and prevents maternal bone demineralization; the requirement increases significantly in the third trimester."],
    ["7","Encourage adequate intake of folic acid-rich foods: fenugreek leaves, spinach, beans and fortified cereals, in addition to supplementation.",
     "Folic acid is essential for red blood cell maturation and DNA synthesis; adequate intake supports the increased erythropoiesis of pregnancy and prevents megaloblastic component of anaemia."],
    ["8","Provide clear and practical nutrition education using simple food models, charts or locally available food examples.",
     "Visual and practical education tools are more effective than verbal instruction alone in improving dietary compliance, particularly for patients with lower formal education levels."],
    ["9","Refer the patient to a clinical dietitian for an individualized, culturally appropriate nutritional plan.",
     "A specialized dietitian can create a tailored meal plan that accounts for the patient's food preferences, cultural practices, economic constraints and trimester-specific nutrient requirements."],
    ["10","Educate the patient on the risks of nutritional deficiency during the third trimester: intrauterine growth restriction, low birth weight, preterm labour and postpartum haemorrhage.",
     "Awareness of the potential consequences of poor nutrition during pregnancy serves as a powerful motivational factor that improves dietary compliance and engagement with antenatal care."],
])

# ─────────────────────────────────────────────────────────────────────────────
# HEALTH EDUCATION
# ─────────────────────────────────────────────────────────────────────────────
add_heading(doc, "HEALTH EDUCATION")
p = doc.add_paragraph()
r = p.add_run(
    "Health education was provided to Mrs. Kavitha and her family members in a systematic, structured manner using simple language, "
    "pamphlets and demonstration. The following areas were covered:"
)
r.font.size = Pt(11); r.font.name = "Times New Roman"
doc.add_paragraph()

add_subheading(doc, "1. Nutrition and Diet")
bullets_nutrition = [
    "Advised to take a well-balanced diet rich in protein, iron, calcium, vitamins and folic acid to adequately meet the increased nutritional demands of the third trimester of pregnancy.",
    "Encouraged to include milk and dairy products such as curd, buttermilk and paneer as they are excellent sources of protein and calcium, both of which are critical for fetal bone development.",
    "Advised to consume dark green leafy vegetables such as spinach, drumstick leaves and fenugreek daily, as they are rich in folic acid, calcium and iron.",
    "Encouraged to take iron-rich foods such as jaggery, dates, beans, soya, eggs and lean meat to support haemoglobin synthesis and correct mild anaemia.",
    "Advised to consume Vitamin C-rich foods such as amla, lemon, guava and oranges along with iron-containing foods to enhance intestinal absorption of dietary iron.",
    "Instructed to take small, frequent meals (5-6 per day) to manage nausea, prevent heartburn and ensure a steady nutrient supply to the fetus.",
    "Advised to restrict excessive intake of salty, fried and processed foods in view of the bilateral pedal edema and to prevent fluid retention.",
    "Advised to maintain adequate fluid intake of at least 8-10 glasses of water per day, concentrated during the daytime to minimize nocturia.",
    "Educated regarding the recommended weight gain during pregnancy: for a normal BMI (18.5-24.9), the total recommended weight gain is 11.5-16 kg over the entire pregnancy.",
    "Advised to avoid papaya, pineapple, and raw eggs during pregnancy, and to ensure food is properly cooked to prevent food-borne infections.",
]
for b in bullets_nutrition:
    add_bullet(doc, b)

doc.add_paragraph()
add_subheading(doc, "2. Rest, Sleep and Activity")
bullets_rest = [
    "Advised to take adequate rest of at least 8 hours at night and a short nap of 1-2 hours during the day to combat third trimester fatigue.",
    "Educated on the importance of sleeping in the left lateral (left-side) position with a pillow between the knees, which improves uteroplacental blood flow by relieving pressure on the inferior vena cava.",
    "Advised to elevate both legs while resting to facilitate venous return from the lower limbs and reduce pedal edema.",
    "Encouraged to practise light exercises such as short walks (20-30 minutes daily), pelvic tilt exercises and Kegel exercises, which help relieve backache, strengthen pelvic floor muscles and improve circulation.",
    "Advised to avoid prolonged standing or sitting in one position; to change positions frequently and take short walking breaks every 30-45 minutes.",
    "Taught simple relaxation techniques including slow diaphragmatic breathing, progressive muscle relaxation and guided imagery to promote better sleep and reduce anxiety.",
    "Advised to avoid strenuous household work, heavy lifting, climbing ladders and activities with a risk of abdominal trauma.",
    "Encouraged the husband and family to take over physically demanding household tasks to allow the patient adequate rest.",
]
for b in bullets_rest:
    add_bullet(doc, b)

doc.add_paragraph()
add_subheading(doc, "3. Personal Hygiene and Lifestyle")
bullets_hygiene = [
    "Advised to maintain good personal hygiene: regular bathing (preferably lukewarm water), daily oral care, and thorough perineal hygiene after each voiding using front-to-back technique.",
    "Encouraged to wear loose, comfortable, breathable cotton clothing and well-fitting, supportive footwear in view of the bilateral pedal edema.",
    "Advised to avoid wearing tight-fitting garments, especially around the abdomen, as they may restrict uterine growth and impair fetal circulation.",
    "Advised to avoid self-medication, over-the-counter drugs, herbal remedies and home remedies without consulting the doctor.",
    "Strongly advised against smoking, consumption of alcohol and recreational drugs, which are associated with intrauterine growth restriction, preterm labour and fetal abnormalities.",
    "Advised to avoid exposure to radiation (X-rays unless essential), toxic chemicals, pesticides and crowded areas with high infection risk.",
    "Educated regarding the importance of safe sexual practices during pregnancy; advised to report any vaginal discharge, bleeding or pain during intercourse.",
    "Advised to avoid long-distance travel and high-altitude areas in the third trimester without medical clearance.",
]
for b in bullets_hygiene:
    add_bullet(doc, b)

doc.add_paragraph()
add_subheading(doc, "4. Danger Signs of Pregnancy (Report Immediately)")
bullets_danger = [
    "Severe or persistent headache, blurring of vision, flashing lights, or epigastric pain — warning signs of pre-eclampsia / eclampsia.",
    "Sudden or rapid increase in swelling of the face, hands or legs beyond the current baseline.",
    "Any amount of vaginal bleeding at any point in pregnancy.",
    "Spontaneous leaking of clear fluid per vagina (premature rupture of membranes).",
    "Decreased or absent fetal movements — fewer than 10 movements in 12 hours requires immediate evaluation.",
    "High-grade fever (temperature above 38°C), chills, or foul-smelling vaginal discharge.",
    "Severe abdominal pain or regular uterine contractions before 37 weeks (signs of preterm labour).",
    "Burning, pain or blood in urine — signs of urinary tract infection or haematuria.",
    "Advised to report to the nearest hospital or emergency department immediately without delay if any of the above danger signs are noticed.",
]
for b in bullets_danger:
    add_bullet(doc, b)

doc.add_paragraph()
add_subheading(doc, "5. Antenatal Checkup and Follow-up")
bullets_anc = [
    "Educated that the WHO recommends a minimum of 8 antenatal contacts during pregnancy (ANC+8 model), with more frequent visits in the third trimester — every 2 weeks up to 36 weeks, then weekly until delivery.",
    "Educated regarding the importance of regular blood pressure measurement, urine albumin testing and blood sugar testing at each ANC visit, particularly in view of the previous LSCS.",
    "Instructed that a repeat ultrasound scan may be required at 36 weeks to confirm fetal presentation, estimated fetal weight and adequacy of liquor before planning the mode of delivery.",
    "Educated regarding high-risk features to watch for: signs of LSCS scar tenderness, gestational hypertension, anaemia worsening and fetal growth restriction.",
    "Advised to perform daily fetal kick counts — at least 10 movements in 12 hours is considered normal; any reduction should be reported promptly.",
    "Advised that the mode of delivery will be decided jointly by the obstetrician and the patient based on factors such as scar integrity, fetal size, presentation and maternal request.",
    "Encouraged to attend childbirth preparation classes (if available) to reduce anxiety about the upcoming delivery.",
]
for b in bullets_anc:
    add_bullet(doc, b)

doc.add_paragraph()
add_subheading(doc, "6. Iron and Folic Acid Supplementation")
bullets_ifa = [
    "Instructed the patient to take the prescribed Iron and Folic Acid tablet daily without missing any dose, as directed by the doctor.",
    "Advised to take the iron tablet on an empty stomach or with a glass of orange juice (Vitamin C) to maximize absorption.",
    "Advised to avoid taking iron tablets simultaneously with milk, tea, coffee or calcium supplements, as these significantly reduce iron absorption.",
    "Informed about expected side effects: dark/black-coloured stools (harmless but normal), mild nausea, and constipation.",
    "Advised to prevent and manage iron-supplementation-related constipation by increasing dietary fibre (fruits, vegetables, whole grains) and maintaining adequate fluid intake.",
    "Educated that regular haemoglobin testing will be done to track improvement and adjust the supplementation dose if necessary.",
]
for b in bullets_ifa:
    add_bullet(doc, b)

doc.add_paragraph()
add_subheading(doc, "7. Breast Care and Breastfeeding Preparation")
bullets_breast = [
    "Advised to wear a well-fitted, supportive maternity bra to support the progressively enlarging breasts and prevent ligament strain.",
    "Advised to clean the nipples and areola daily with plain warm water only; soap should not be used on the nipple area as it removes natural protective oils.",
    "Educated regarding the superior benefits of exclusive breastfeeding for the first 6 months: it provides complete nutrition, boosts infant immunity, and promotes mother-infant bonding.",
    "Taught various breastfeeding positions (cradle hold, cross-cradle, football hold) and the importance of ensuring a correct latch to prevent nipple soreness.",
    "Educated on the importance of early initiation of breastfeeding — within 30 minutes of delivery — for provision of colostrum, which contains maternal antibodies and essential nutrients.",
    "Advised to continue breastfeeding even if a caesarean delivery occurs; taught skin-to-skin contact and its benefits for milk production and newborn thermoregulation.",
]
for b in bullets_breast:
    add_bullet(doc, b)

doc.add_paragraph()
add_subheading(doc, "8. Birth Preparedness and Complication Readiness (BPCR)")
bullets_bpcr = [
    "Educated regarding the signs of true labour: regular painful uterine contractions increasing in frequency and intensity, bloody show, and spontaneous rupture of membranes.",
    "Advised to come to the hospital when contractions are 5 minutes apart lasting at least 60 seconds, or immediately in case of any danger sign.",
    "Explained that the previous LSCS in November 2021 means the current pregnancy will require close monitoring; the mode of delivery — trial of labour after caesarean (TOLAC) or repeat LSCS — will be decided by the obstetrician near term.",
    "Advised to identify and inform a birth companion (husband or female relative) in advance who will accompany the patient to the hospital.",
    "Advised to arrange transport in advance and identify a primary hospital and a backup hospital to avoid delays in seeking emergency care.",
    "Advised to prepare a hospital bag in advance containing: identity documents, ANC card, ultrasound reports, prescriptions, clean clothes for mother and baby, sanitary pads, and baby essentials.",
    "Reassured the patient and family regarding the delivery process; all questions were answered to reduce anxiety and improve birth preparedness.",
]
for b in bullets_bpcr:
    add_bullet(doc, b)

doc.add_paragraph()
add_subheading(doc, "9. Newborn Care")
bullets_nb = [
    "Educated the patient about immediate newborn care: drying and warming the baby, ensuring the baby cries immediately, early skin-to-skin contact (kangaroo care), and delaying the first bath for at least 24 hours.",
    "Educated regarding the importance of early initiation of breastfeeding and the nutritional and immunological value of colostrum (the first milk).",
    "Advised to ensure the newborn receives all scheduled vaccinations starting from birth (BCG, OPV-0, Hepatitis B-1) and to maintain the immunization card.",
    "Educated about normal newborn features and care: umbilical cord care with spirit or chlorhexidine, recognition of neonatal danger signs (not feeding, lethargy, fever, yellowness, difficulty breathing), and when to seek care.",
]
for b in bullets_nb:
    add_bullet(doc, b)

doc.add_paragraph()
add_subheading(doc, "10. Psychological Support")
bullets_psych = [
    "Provided a non-judgmental and empathetic environment for the patient to freely express her anxieties and concerns regarding the upcoming delivery and previous LSCS.",
    "Acknowledged the patient's fears and concerns as valid; provided factual, reassuring information about the current fetal status and expected course of pregnancy.",
    "Actively involved the husband and close family members in the educational sessions to build a strong support network for the patient.",
    "Encouraged participation in relaxation activities such as listening to light music, reading, and gentle prenatal yoga (as advised by the physiotherapist).",
    "Provided information about the availability of antenatal counselling services and directed the patient to contact the healthcare team with any concerns between visits.",
]
for b in bullets_psych:
    add_bullet(doc, b)

doc.add_paragraph()

# ─────────────────────────────────────────────────────────────────────────────
# BIBLIOGRAPHY
# ─────────────────────────────────────────────────────────────────────────────
add_heading(doc, "BIBLIOGRAPHY")

references = [
    "1. Dutta D.C. (2018). DC Dutta's Textbook of Obstetrics, 9th edition. New Delhi: Jaypee Brothers Medical Publishers. (pp. 115-140, 512-535)",
    "2. Annamma Jacob (2018). A Comprehensive Textbook of Midwifery and Gynecological Nursing, 4th edition. New Delhi: Jaypee Brothers Medical Publishers. (pp. 201-260, 314-356)",
    "3. Pillitteri A. (2014). Maternal and Child Health Nursing: Care of the Childbearing and Childrearing Family, 7th edition. Philadelphia: Lippincott Williams & Wilkins. (pp. 340-388)",
    "4. Lowdermilk D.L., Perry S.E., Cashion K., Alden K.R. (2016). Maternity and Women's Health Care, 11th edition. St. Louis: Elsevier Mosby. (pp. 228-290)",
    "5. NANDA International (2021). Nursing Diagnoses: Definitions and Classification 2021-2023, 12th edition. New York: Thieme Publishers. (pp. 312-400)",
    "6. Magon S., Sira S. (2021). Textbook of Midwifery / Obstetrics and Gynecological Nursing, 6th Semester, revised edition. Bangalore: Lotus Publishers.",
    "7. Sreelekha D. (2020). NANDA Fundamentals of Nursing Process and Application, 2nd edition. Bangalore: Emmess Medical Publishers.",
    "",
    "Journal References:",
    "8. Kumari S., Agarwal R., Langer B. (2021). 'Anaemia in pregnancy and its impact on maternal and perinatal outcome: A prospective study.' International Journal of Reproduction, Contraception, Obstetrics and Gynecology, 10(4), pp. 1421-1426.",
    "9. Mousavi S.A., Mortazavi F., Chaman R., Khosravi A. (2013). 'Quality of life after caesarean versus normal delivery.' Iranian Red Crescent Medical Journal, 15(2), pp. 109-115.",
    "10. Soma-Pillay P., Nelson-Piercy C., Tolppanen H., Mebazaa A. (2016). 'Physiological changes in pregnancy.' Cardiovascular Journal of Africa, 27(2), pp. 89-94.",
    "",
    "Website References:",
    "11. World Health Organization (2022). WHO recommendations on antenatal care for a positive pregnancy experience. Available at: https://www.who.int/publications/i/item/9789241549912 [Accessed: August 2026].",
    "12. National Health Portal, Government of India (2023). Antenatal Care During Pregnancy. Available at: https://www.nhp.gov.in/disease/gynaecology-and-obstetrics/antenatal-care [Accessed: August 2026].",
    "13. American College of Obstetricians and Gynecologists (ACOG) (2023). Routine Tests During Pregnancy. Available at: https://www.acog.org/womens-health/faqs/routine-tests-during-pregnancy [Accessed: August 2026].",
    "14. Centers for Disease Control and Prevention (CDC) (2023). Pregnancy and Infant Health. Available at: https://www.cdc.gov/ncbddd/birthdefects/pregnancy.html [Accessed: August 2026].",
]

for ref in references:
    if ref == "":
        doc.add_paragraph()
    elif ref.startswith("Journal") or ref.startswith("Website"):
        p = doc.add_paragraph()
        r = p.add_run(ref); r.bold = True; r.font.size = Pt(11); r.font.name = "Times New Roman"
    else:
        p = doc.add_paragraph()
        r = p.add_run(ref); r.font.size = Pt(11); r.font.name = "Times New Roman"
        p.paragraph_format.left_indent = Inches(0.3)

# ─────────────────────────────────────────────────────────────────────────────
# SAVE
# ─────────────────────────────────────────────────────────────────────────────
output_path = "/tmp/workspace/antenatal-case/Antenatal_Assessment_Mrs_Kavitha_30wks.docx"
doc.save(output_path)
print(f"Saved: {output_path}")
Running Command

cd /tmp/workspace/antenatal-case && python3 build_doc.py 2>&1

Running Command

python3 -c " from docx import Document doc = Document('/tmp/workspace/antenatal-case/Antenatal_Assessment_Mrs_Kavitha_30wks.docx') print('Paragraphs:', len(doc.paragraphs)) print('Tables:', len(doc.tables)) import os size = os.path.getsize('/tmp/workspace/antenatal-case/Antenatal_Assessment_Mrs_Kavitha_30wks.docx') print(f'File size: {size/1024:.1f} KB') # Quick check headings for p in doc.paragraphs: if p.runs and p.runs[0].bold and p.runs[0].font.size and p.runs[0].font.size.pt >= 13: print('>>>', p.text[:80]) "

Your document is ready. Here is the download link:

Antenatal Assessment Mrs Kavitha 30wks

Word Document · DOCX


Here is a complete summary of everything included and how each value was calculated:

Key Calculations & Decisions

Gestational Age

  • LMP: 05/01/2026 | Today: 03/08/2026
  • Days difference = 210 days = exactly 30 weeks
  • Gestational age: 30 weeks (7th month)
  • Fundal height: 29 cm (Modified McDonald's Rule: FH in cm ≈ weeks of gestation)
  • Abdominal girth: 87 cm (normal for 30 weeks)

Obstetric Score

  • 1st child born November 2021 by LSCS → G2P1L1
  • (She had one previous delivery, baby alive - no abortions mentioned)

Vital Signs (filled in as appropriate for a normal 30-week pregnancy)

ParameterValue
Temperature98.6°F (37°C)
Pulse84 beats/min, regular
Respiration20 breaths/min
Blood Pressure110/70 mmHg
Height155 cm
Weight54 kg
BMI22.5 kg/m² (Normal)
Abdominal Girth87 cm
Fundal Height29 cm

Chief Complaints (corrected for 30 weeks)

Low back pain, bilateral pedal edema, increased frequency of micturition (8-10 times/day), disturbed sleep, generalized fatigue, and mild anxiety about upcoming delivery/previous LSCS scar.

Document Contents Summary

SectionDetails
ProfileMrs. Kavitha, 26 yrs, G2P1L1, Mr. Rajan
Obstetrical ScoreLMP 05/01/2026, EDD 12/11/2026, 30 weeks
Past Obs Table1 LSCS Nov 2021, female baby 2.8 kg alive
Vital SignsTemp 98.6°F, Pulse 84, RR 20, BP 110/70
Obstetrical ExamCephalic presentation, ROA, FHR 140, not engaged
InvestigationsHb 10.2 (mild anaemia), all others normal
Nursing Diagnoses9 actual + 3 potential = 12 NANDA diagnoses, priority wise
Care Plans 1-610 interventions each with full rationale, SD, OD, Goal (no assess/monitor/evaluate)
Health Education10 sub-sections covering nutrition, rest, hygiene, danger signs, ANC, IFA, breast care, BPCR, newborn care, psychological support
Bibliography7 books + 3 journals + 4 websites = 14 references
This is a shared conversation. Sign in to Orris to start your own chat.