You are an expert Nursing Education Content Designer and Academic Document Developer specializing in GNM (General Nursing and Midwifery) education. I am a Nursing Lecturer preparing practical records, fieldwork formats, and academic documents for GNM students. I will provide: 1. The official GNM syllabus (subject, objectives, units, and practical requirements). 2. A sample format from B.Sc. Nursing (for reference only). Your task is to create professional, student-friendly, fillable DOCX templates strictly according to the GNM syllabus requirements. ## Core Instructions ### 1. Use the GNM Syllabus as the Primary Source - Follow only the objectives, practical requirements, and activities mentioned in the provided GNM syllabus. - Do not add sections that are not relevant to GNM. - Create only the formats, records, and documents that are genuinely required for GNM students. ### 2. Use the B.Sc. Nursing Format Only as a Reference - Use the B.Sc. Nursing sample only to understand structure, organization, presentation style, and formatting. - Replace all references to "B.Sc. Nursing" with "GNM (General Nursing and Midwifery)" wherever applicable. - Remove any university names, logos, regulations, or institution-specific information from the reference document unless explicitly instructed. - Adapt the content to suit GNM requirements and learning objectives. ### 3. Generate Appropriate GNM Formats Examples may include (depending on the syllabus): - Family Health Study - Family Profile - Community Survey - Home Visit Record - Case Study Format - Observation Visit Report - Health Education Record - Procedure Records - Clinical Experience Records - Field Visit Reports - Assessment Formats - Any other syllabus-required practical documents ### 4. Professional DOCX Layout Requirements Create the document in a clean, professional, and printable DOCX format with: #### Cover Page Include: - College Name: _______________________ - Department: General Nursing and Midwifery (GNM) - Subject Name: _______________________ - Title of Record/Format: _______________________ - Student Name: _______________________ - Class/Year: _______________________ - Roll Number: _______________________ - Academic Year: _______________________ - Clinical Area/Community Area (if applicable): _______________________ - Instructor/Teacher Signature: _______________________ - Principal Signature: _______________________ Do not include any university name unless specifically requested. ### 5. Typography and Design Standards Use: - Professional academic typography - Clear heading hierarchy (Title 1, Title 2, Title 3) - Bold and properly aligned section headings - Consistent spacing and margins - Tables with fillable blank spaces - Easy-to-read layouts - Student-friendly language - Simple, logical organization - Black-and-white printer-friendly formatting - A4 page size standards ### 6. Educational Requirements The format must be: - Easy for GNM students to understand - Easy to fill during practical work and field visits - Academically appropriate - Professionally structured - Aligned with nursing education standards - Suitable for printing and record submission ### 7. Output Requirements For every document: 1. Provide the final content in a DOCX-ready structure. 2. Clearly indicate cover page content. 3. Create properly formatted tables and fillable sections. 4. Maintain consistency throughout the document. 5. Ensure all sections directly support the GNM syllabus objectives. I will provide: (A) The GNM syllabus. (B) The B.Sc. Nursing sample format. Use the syllabus as the primary authority and the B.Sc. document only as a structural reference to create a professional GNM-specific fillable DOCX template.
cd /home/daytona/workspace/attachments/4c631085-a2d9-4dd6-b706-1dfc795ce8e0 && l…
cd /home/daytona/workspace/attachments/4c631085-a2d9-4dd6-b706-1dfc795ce8e0 && p…
cd /home/daytona/workspace/attachments/4c631085-a2d9-4dd6-b706-1dfc795ce8e0 && p…
grep -n "Community Health\|Family Study\|Home Visit\|Community Survey\|Health Ed…
mkdir -p /home/daytona/workspace/gnm-templates && ls /home/daytona/workspace/gnm…
~/gnm-templates/create_gnm_family_care_study.js
const {
Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
AlignmentType, HeadingLevel, BorderStyle, WidthType, VerticalAlign,
PageNumber, PageBreak, Header, Footer, ShadingType, TableLayoutType,
LevelFormat, UnderlineType
} = require('docx');
const fs = require('fs');
// ─── COLOUR / STYLE TOKENS ───────────────────────────────────────────────────
const HEADER_SHADING = { type: ShadingType.SOLID, color: "1F4E79", fill: "1F4E79" };
const SECTION_SHADING = { type: ShadingType.SOLID, color: "2E74B5", fill: "2E74B5" };
const SUBSECTION_SHADING = { type: ShadingType.SOLID, color: "BDD7EE", fill: "BDD7EE" };
const ALT_ROW_SHADING = { type: ShadingType.SOLID, color: "DEEAF1", fill: "DEEAF1" };
const WHITE_SHADING = { type: ShadingType.CLEAR, color: "FFFFFF", fill: "FFFFFF" };
// ─── BORDER HELPERS ──────────────────────────────────────────────────────────
const THIN_BORDER = { style: BorderStyle.SINGLE, size: 6, color: "2E74B5" };
const THICK_BORDER = { style: BorderStyle.SINGLE, size: 12, color: "1F4E79" };
const NO_BORDER = { style: BorderStyle.NONE, size: 0, color: "FFFFFF" };
function allBorders(b) {
return { top: b, bottom: b, left: b, right: b, insideHorizontal: b, insideVertical: b };
}
// ─── CELL HELPERS ────────────────────────────────────────────────────────────
function headerCell(text, colspan = 1, rowspan = 1) {
return new TableCell({
columnSpan: colspan,
rowSpan: rowspan,
shading: HEADER_SHADING,
verticalAlign: VerticalAlign.CENTER,
margins: { top: 80, bottom: 80, left: 120, right: 120 },
borders: allBorders(THIN_BORDER),
children: [new Paragraph({
alignment: AlignmentType.CENTER,
children: [new TextRun({ text, bold: true, color: "FFFFFF", size: 22, font: "Arial" })]
})]
});
}
function sectionHeaderCell(text, colspan = 1) {
return new TableCell({
columnSpan: colspan,
shading: SECTION_SHADING,
verticalAlign: VerticalAlign.CENTER,
margins: { top: 80, bottom: 80, left: 120, right: 120 },
borders: allBorders(THIN_BORDER),
children: [new Paragraph({
alignment: AlignmentType.CENTER,
children: [new TextRun({ text, bold: true, color: "FFFFFF", size: 22, font: "Arial" })]
})]
});
}
function subHeaderCell(text, colspan = 1) {
return new TableCell({
columnSpan: colspan,
shading: SUBSECTION_SHADING,
verticalAlign: VerticalAlign.CENTER,
margins: { top: 60, bottom: 60, left: 100, right: 100 },
borders: allBorders(THIN_BORDER),
children: [new Paragraph({
alignment: AlignmentType.LEFT,
children: [new TextRun({ text, bold: true, color: "1F4E79", size: 20, font: "Arial" })]
})]
});
}
function labelCell(text, width = 2000) {
return new TableCell({
width: { size: width, type: WidthType.DXA },
shading: ALT_ROW_SHADING,
verticalAlign: VerticalAlign.CENTER,
margins: { top: 60, bottom: 60, left: 100, right: 60 },
borders: allBorders(THIN_BORDER),
children: [new Paragraph({
children: [new TextRun({ text, bold: true, size: 20, font: "Arial", color: "1F4E79" })]
})]
});
}
function valueCell(text = "", colspan = 1, height = null) {
return new TableCell({
columnSpan: colspan,
verticalAlign: VerticalAlign.CENTER,
margins: { top: 60, bottom: 60, left: 100, right: 100 },
borders: allBorders(THIN_BORDER),
children: [new Paragraph({
children: [new TextRun({ text, size: 20, font: "Arial" })]
})]
});
}
function writingCell(hint = "", colspan = 1, lines = 3) {
const children = [new Paragraph({
children: [new TextRun({ text: hint, size: 18, font: "Arial", color: "808080", italics: true })]
})];
for (let i = 0; i < lines; i++) {
children.push(new Paragraph({ children: [new TextRun({ text: "", size: 20, font: "Arial" })] }));
}
return new TableCell({
columnSpan: colspan,
margins: { top: 80, bottom: 80, left: 120, right: 120 },
borders: allBorders(THIN_BORDER),
children
});
}
function hintPara(text) {
return new Paragraph({
spacing: { before: 40, after: 40 },
children: [new TextRun({ text: ` ${text}`, size: 18, italics: true, color: "808080", font: "Arial" })]
});
}
// ─── PAGE BREAK ──────────────────────────────────────────────────────────────
function pageBreak() {
return new Paragraph({ children: [new PageBreak()] });
}
// ─── SECTION HEADING ─────────────────────────────────────────────────────────
function sectionHeading(number, title) {
return new Paragraph({
spacing: { before: 200, after: 100 },
children: [
new TextRun({ text: `${number}. ${title}`, bold: true, size: 26, font: "Arial", color: "1F4E79",
underline: { type: UnderlineType.SINGLE, color: "1F4E79" } })
]
});
}
// ─── CHECKBOX ROW ─────────────────────────────────────────────────────────────
function checkboxLine(items, note = "") {
const children = [];
items.forEach((item, i) => {
children.push(new TextRun({ text: "[ ] ", size: 20, font: "Arial" }));
children.push(new TextRun({ text: item + (i < items.length - 1 ? " " : ""), size: 20, font: "Arial" }));
});
if (note) {
children.push(new TextRun({ text: ` (${note})`, size: 18, italics: true, color: "808080", font: "Arial" }));
}
return new Paragraph({ spacing: { before: 60, after: 40 }, children });
}
// ─── BLANK LINE FIELD ─────────────────────────────────────────────────────────
function fieldLine(label, width = 60) {
return new Paragraph({
spacing: { before: 80, after: 40 },
children: [
new TextRun({ text: label + ": ", bold: true, size: 20, font: "Arial" }),
new TextRun({ text: "_".repeat(width), size: 20, font: "Arial" })
]
});
}
// ─────────────────────────────────────────────────────────────────────────────
// COVER PAGE
// ─────────────────────────────────────────────────────────────────────────────
function buildCoverPage() {
return [
new Paragraph({ spacing: { before: 400 }, alignment: AlignmentType.CENTER,
children: [new TextRun({ text: "", size: 24 })] }),
new Paragraph({ alignment: AlignmentType.CENTER, spacing: { before: 200, after: 100 },
children: [new TextRun({ text: "COLLEGE OF NURSING", bold: true, size: 36, font: "Arial", color: "1F4E79",
underline: { type: UnderlineType.SINGLE, color: "1F4E79" } })] }),
new Paragraph({ alignment: AlignmentType.CENTER, spacing: { before: 60, after: 300 },
children: [new TextRun({ text: "_____________________________", size: 28, font: "Arial", color: "2E74B5" })] }),
new Paragraph({ alignment: AlignmentType.CENTER, spacing: { before: 100, after: 80 },
children: [new TextRun({ text: "Department of General Nursing and Midwifery (GNM)", bold: true,
size: 28, font: "Arial", color: "1F4E79" })] }),
new Paragraph({ alignment: AlignmentType.CENTER, spacing: { before: 60, after: 300 },
children: [new TextRun({ text: "Community Health Nursing — Practical Record", bold: false,
size: 24, font: "Arial", color: "595959" })] }),
// Big title box
new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
borders: allBorders(THICK_BORDER),
rows: [
new TableRow({
children: [new TableCell({
shading: HEADER_SHADING,
margins: { top: 200, bottom: 200, left: 200, right: 200 },
borders: allBorders(THICK_BORDER),
children: [
new Paragraph({ alignment: AlignmentType.CENTER, spacing: { before: 80, after: 40 },
children: [new TextRun({ text: "FAMILY CARE STUDY", bold: true, size: 44,
font: "Arial", color: "FFFFFF" })] }),
new Paragraph({ alignment: AlignmentType.CENTER, spacing: { before: 0, after: 80 },
children: [new TextRun({ text: "Community Health Nursing — Urban & Rural Field Practice",
size: 22, font: "Arial", color: "BDD7EE" })] }),
]
})]
})
]
}),
new Paragraph({ spacing: { before: 300, after: 100 } }),
// Student details table
new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
borders: allBorders(THIN_BORDER),
rows: [
new TableRow({ children: [
new TableCell({ columnSpan: 4, shading: SECTION_SHADING, margins: { top: 80, bottom: 80, left: 120, right: 120 },
borders: allBorders(THIN_BORDER),
children: [new Paragraph({ alignment: AlignmentType.CENTER,
children: [new TextRun({ text: "STUDENT DETAILS", bold: true, size: 24, color: "FFFFFF", font: "Arial" })] })] })
]}),
new TableRow({ children: [
labelCell("College Name", 2500), valueCell("", 1, null),
labelCell("Department", 2200), valueCell("General Nursing and Midwifery (GNM)")
]}),
new TableRow({ children: [
labelCell("Student Name", 2500), valueCell(""),
labelCell("Roll Number", 2200), valueCell("")
]}),
new TableRow({ children: [
labelCell("Class / Year", 2500), valueCell(""),
labelCell("Academic Year", 2200), valueCell("")
]}),
new TableRow({ children: [
labelCell("Community Area", 2500), valueCell(""),
labelCell("Urban / Rural", 2200), valueCell("[ ] Urban [ ] Rural")
]}),
new TableRow({ children: [
labelCell("Date of Submission", 2500), valueCell(""),
labelCell("Guide / Supervisor", 2200), valueCell("")
]}),
new TableRow({ children: [
labelCell("Instructor Signature", 2500), valueCell(""),
labelCell("Principal Signature", 2200), valueCell("")
]}),
]
}),
new Paragraph({ spacing: { before: 300 } }),
// INC notice
new Paragraph({ alignment: AlignmentType.CENTER, spacing: { before: 60, after: 60 },
children: [new TextRun({ text: "As per Indian Nursing Council (INC) GNM Revised Syllabus 2015",
size: 18, italics: true, color: "808080", font: "Arial" })] }),
pageBreak()
];
}
// ─────────────────────────────────────────────────────────────────────────────
// SECTION I — FAMILY PROFILE
// ─────────────────────────────────────────────────────────────────────────────
function buildSection1() {
return [
sectionHeading("I", "FAMILY PROFILE"),
new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
borders: allBorders(THIN_BORDER),
rows: [
new TableRow({ children: [sectionHeaderCell("FAMILY PROFILE", 4)] }),
new TableRow({ children: [labelCell("Head of the Family"), valueCell(""), labelCell("Address"), valueCell("")] }),
new TableRow({ children: [labelCell("Name"), valueCell(""), labelCell("Nearest Health Facility"), valueCell("")] }),
new TableRow({ children: [labelCell("Marital Status"), valueCell(""), labelCell("Religion / Caste"), valueCell("")] }),
new TableRow({ children: [labelCell("Occupation"), valueCell(""), labelCell("Monthly Income"), valueCell("")] }),
]
}),
new Paragraph({ spacing: { before: 120, after: 60 },
children: [new TextRun({ text: "Type of Family:", bold: true, size: 20, font: "Arial" })] }),
checkboxLine(["Nuclear", "Joint", "Extended", "Single Parent"],
"Tick the type that applies"),
new Paragraph({ spacing: { before: 100, after: 60 },
children: [new TextRun({ text: "Nearest Health Facilities Available:", bold: true, size: 20, font: "Arial" })] }),
checkboxLine(["Government Hospital", "Private Hospital", "PHC", "Sub-Centre (SC)", "FRU", "ASHA Worker"],
"FRU = First Referral Unit; tick all applicable"),
new Paragraph({ spacing: { before: 80 } })
];
}
// ─────────────────────────────────────────────────────────────────────────────
// SECTION II — FAMILY COMPOSITION
// ─────────────────────────────────────────────────────────────────────────────
function buildSection2() {
const headers = ["S.No", "Name of Family Member", "Age", "Sex", "Relationship with Head", "Educational Status", "Marital Status", "Occupation", "Health Status"];
const widths = [400, 1400, 450, 450, 1200, 1100, 900, 900, 900];
const headerRow = new TableRow({
tableHeader: true,
children: headers.map((h, i) => new TableCell({
width: { size: widths[i], type: WidthType.DXA },
shading: SECTION_SHADING,
verticalAlign: VerticalAlign.CENTER,
margins: { top: 60, bottom: 60, left: 80, right: 80 },
borders: allBorders(THIN_BORDER),
children: [new Paragraph({ alignment: AlignmentType.CENTER,
children: [new TextRun({ text: h, bold: true, color: "FFFFFF", size: 18, font: "Arial" })] })]
}))
});
const dataRows = [];
for (let i = 1; i <= 8; i++) {
const shade = i % 2 === 0 ? ALT_ROW_SHADING : WHITE_SHADING;
dataRows.push(new TableRow({
children: headers.map((_, j) => new TableCell({
shading: shade,
margins: { top: 60, bottom: 60, left: 80, right: 80 },
borders: allBorders(THIN_BORDER),
children: [new Paragraph({ alignment: AlignmentType.CENTER,
children: [new TextRun({ text: j === 0 ? String(i) : "", size: 19, font: "Arial" })] })]
}))
}));
}
return [
sectionHeading("II", "FAMILY COMPOSITION"),
new Table({ width: { size: 100, type: WidthType.PERCENTAGE }, borders: allBorders(THIN_BORDER),
rows: [headerRow, ...dataRows] }),
hintPara("Mark HIGH RISK members with '*' (in blue pen) | Mark FAMILY WELFARE beneficiaries with '#' (in red pen)"),
new Paragraph({ spacing: { before: 100, after: 60 },
children: [new TextRun({ text: "Categories of Beneficiaries (mark applicable):", bold: true, size: 20, font: "Arial" })] }),
checkboxLine(["Antenatal (AN)", "Postnatal (PN)", "Under Five", "Infant", "School Child", "Adolescent", "Elderly", "Chronic Disease"]),
new Paragraph({ spacing: { before: 80 } })
];
}
// ─────────────────────────────────────────────────────────────────────────────
// SECTION III — THREE-GENERATION GENOGRAM
// ─────────────────────────────────────────────────────────────────────────────
function buildSection3() {
return [
sectionHeading("III", "THREE GENERATIONS FAMILY TREE (GENOGRAM)"),
new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
borders: allBorders(THIN_BORDER),
rows: [
new TableRow({ children: [sectionHeaderCell("THREE GENERATIONS FAMILY TREE / GENOGRAM", 1)] }),
new TableRow({ children: [new TableCell({
margins: { top: 120, bottom: 120, left: 200, right: 200 },
borders: allBorders(THIN_BORDER),
children: [
new Paragraph({ spacing: { before: 60, after: 60 }, children: [
new TextRun({ text: "Draw the three-generation family tree below.", size: 20, font: "Arial", italics: true, color: "808080" })
]}),
new Paragraph({ spacing: { before: 20, after: 20 }, children: [
new TextRun({ text: "Generation 1 (Grandparents) — at the top | Generation 2 (Parents) — in the middle | Generation 3 (Children) — at the bottom",
size: 18, italics: true, color: "808080", font: "Arial" })
]}),
new Paragraph({ spacing: { before: 30, after: 10 }, children: [
new TextRun({ text: "Symbols: □ = Male O = Female → = Index Person / Client X inside = Deceased = = Married // = Separated",
size: 18, italics: true, color: "808080", font: "Arial" })
]}),
...Array(14).fill(0).map(() => new Paragraph({
spacing: { before: 0, after: 0 },
children: [new TextRun({ text: "", size: 20 })]
}))
]
})] })
]
}),
new Paragraph({ spacing: { before: 80 } })
];
}
// ─────────────────────────────────────────────────────────────────────────────
// SECTION IV & V — INTRODUCTION & REASON FOR SELECTION
// ─────────────────────────────────────────────────────────────────────────────
function buildSection4and5() {
function writingSection(title, hint, lines) {
return new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
borders: allBorders(THIN_BORDER),
rows: [
new TableRow({ children: [sectionHeaderCell(title)] }),
new TableRow({ children: [new TableCell({
margins: { top: 80, bottom: 80, left: 120, right: 120 },
borders: allBorders(THIN_BORDER),
children: [
new Paragraph({ children: [new TextRun({ text: hint, size: 18, italics: true, color: "808080", font: "Arial" })] }),
...Array(lines).fill(0).map(() => new Paragraph({ spacing: { before: 80, after: 80 },
children: [new TextRun({ text: "", size: 20, font: "Arial" })] }))
]
})] })
]
});
}
return [
sectionHeading("IV", "INTRODUCTION OF THE FAMILY CARE STUDY"),
writingSection("IV. INTRODUCTION",
"(Write a brief introduction about the family, the area, and the reason this study was undertaken.)", 5),
new Paragraph({ spacing: { before: 120 } }),
sectionHeading("V", "REASON FOR SELECTION"),
writingSection("V. REASON FOR SELECTION",
"(State the specific reason why this particular family was selected — health priority, vulnerability, community need, etc.)", 4),
new Paragraph({ spacing: { before: 80 } })
];
}
// ─────────────────────────────────────────────────────────────────────────────
// SECTION VI — AREA BACKGROUND
// ─────────────────────────────────────────────────────────────────────────────
function buildSection6() {
function writingBox(hint, lines = 4) {
return new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
borders: allBorders(THIN_BORDER),
rows: [new TableRow({ children: [new TableCell({
margins: { top: 80, bottom: 80, left: 120, right: 120 },
borders: allBorders(THIN_BORDER),
children: [
new Paragraph({ children: [new TextRun({ text: hint, size: 18, italics: true, color: "808080", font: "Arial" })] }),
...Array(lines).fill(0).map(() => new Paragraph({ spacing: { before: 80, after: 80 },
children: [new TextRun({ text: "", size: 20, font: "Arial" })] }))
]
})] })]
});
}
return [
sectionHeading("VI", "AREA BACKGROUND"),
new Paragraph({ spacing: { before: 80, after: 40 },
children: [new TextRun({ text: "Facilities Available in the Area:", bold: true, size: 20, font: "Arial" })] }),
checkboxLine(["School", "PHC", "Sub-Centre", "Hospital", "Temple / Mosque / Church", "Anganwadi"]),
checkboxLine(["Post Office", "Market", "Transportation", "Water Supply", "Electricity", "Panchayat Office"]),
fieldLine("Name of Influential Person in the Area"),
new Paragraph({ spacing: { before: 100, after: 40 },
children: [new TextRun({ text: "Social Background and Present Status:", bold: true, size: 20, font: "Arial" })] }),
writingBox("(Describe social history, caste composition, literacy rate, economic conditions of the area.)", 4),
new Paragraph({ spacing: { before: 80, after: 40 },
children: [new TextRun({ text: "Administrative Setup:", bold: true, size: 20, font: "Arial" })] }),
writingBox("(Mention the Gram Panchayat / Ward, Taluk, District, PHC under which the area falls.)", 3),
new Paragraph({ spacing: { before: 80, after: 40 },
children: [new TextRun({ text: "Description of the Area / Living Environment:", bold: true, size: 20, font: "Arial" })] }),
writingBox("(Describe surroundings, neighbourhood, physical environment, type of land, proximity to roads, etc.)", 4),
new Paragraph({ spacing: { before: 80 } })
];
}
// ─────────────────────────────────────────────────────────────────────────────
// SECTIONS VII, VIII, IX — MAPS
// ─────────────────────────────────────────────────────────────────────────────
function buildMapSection(num, title, hint) {
return [
sectionHeading(num, title),
new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
borders: allBorders(THIN_BORDER),
rows: [
new TableRow({ children: [new TableCell({
margins: { top: 120, bottom: 120, left: 200, right: 200 },
borders: allBorders(THIN_BORDER),
children: [
new Paragraph({ alignment: AlignmentType.CENTER,
children: [new TextRun({ text: hint, size: 18, italics: true, color: "808080", font: "Arial" })] }),
...Array(16).fill(0).map(() => new Paragraph({
spacing: { before: 0, after: 0 },
children: [new TextRun({ text: "", size: 20, font: "Arial" })] }))
]
})] })
]
}),
new Paragraph({ spacing: { before: 80 } })
];
}
// ─────────────────────────────────────────────────────────────────────────────
// SECTION X — SOCIAL DEMOGRAPHIC DATA
// ─────────────────────────────────────────────────────────────────────────────
function buildSection10() {
return [
sectionHeading("X", "SOCIAL DEMOGRAPHIC DATA"),
new Paragraph({ spacing: { before: 80, after: 40 },
children: [new TextRun({ text: "Type of House:", bold: true, size: 20, font: "Arial" })] }),
checkboxLine(["Pucca", "Semi-Pucca", "Katcha", "Hut", "Thatched"], "Pucca = concrete/brick; Katcha = mud"),
new Paragraph({ spacing: { before: 80, after: 40 },
children: [new TextRun({ text: "Toilet Facilities:", bold: true, size: 20, font: "Arial" })] }),
checkboxLine(["Sanitary (WC / Western Style)", "Indian Style", "Open Defecation / No Toilet"]),
new Paragraph({ spacing: { before: 80, after: 40 },
children: [new TextRun({ text: "Source of Drinking Water:", bold: true, size: 20, font: "Arial" })] }),
checkboxLine(["Tap Water (Piped)", "Open Well", "Bore Well / Hand Pump", "River / Pond", "Tanker Water"]),
new Paragraph({ spacing: { before: 80, after: 40 },
children: [new TextRun({ text: "Disposal of Household Waste:", bold: true, size: 20, font: "Arial" })] }),
checkboxLine(["Dustbin / Municipal Collection", "Burning", "Burial", "Manure Pit / Compost", "Open Dumping"]),
new Paragraph({ spacing: { before: 80, after: 40 },
children: [new TextRun({ text: "Ventilation:", bold: true, size: 20, font: "Arial" })] }),
checkboxLine(["Adequate", "Inadequate"], "Adequate = windows/cross-ventilation present"),
new Paragraph({ spacing: { before: 80, after: 40 },
children: [new TextRun({ text: "Lighting:", bold: true, size: 20, font: "Arial" })] }),
checkboxLine(["Adequate", "Inadequate"], "Adequate = sufficient natural + artificial light in all rooms"),
new Paragraph({ spacing: { before: 60, after: 40 },
children: [
new TextRun({ text: "Electricity: ", bold: true, size: 20, font: "Arial" }),
new TextRun({ text: "[ ] Yes [ ] No ", size: 20, font: "Arial" }),
new TextRun({ text: "Number of Rooms: ", bold: true, size: 20, font: "Arial" }),
new TextRun({ text: "[ ] 1 [ ] 2 [ ] 3 [ ] 4 [ ] 5 or more", size: 20, font: "Arial" })
]}),
new Paragraph({ spacing: { before: 80 } })
];
}
// ─────────────────────────────────────────────────────────────────────────────
// SECTION XI — HISTORY COLLECTION
// ─────────────────────────────────────────────────────────────────────────────
function buildSection11() {
function writeBox(label, hint, lines = 4) {
return [
new Paragraph({ spacing: { before: 100, after: 40 },
children: [new TextRun({ text: label + ":", bold: true, size: 20, font: "Arial", color: "1F4E79" })] }),
new Table({
width: { size: 100, type: WidthType.PERCENTAGE }, borders: allBorders(THIN_BORDER),
rows: [new TableRow({ children: [new TableCell({
margins: { top: 80, bottom: 80, left: 120, right: 120 }, borders: allBorders(THIN_BORDER),
children: [
new Paragraph({ children: [new TextRun({ text: hint, size: 18, italics: true, color: "808080", font: "Arial" })] }),
...Array(lines).fill(0).map(() => new Paragraph({ spacing: { before: 80, after: 80 },
children: [new TextRun({ text: "", size: 20, font: "Arial" })] }))
]
})] })]
})
];
}
return [
sectionHeading("XI", "HISTORY COLLECTION"),
new Paragraph({ spacing: { before: 80, after: 40 },
children: [new TextRun({ text: "Factors Influencing Health Condition:", bold: true, size: 20, font: "Arial" })] }),
checkboxLine(["Food / Nutrition", "Housing", "Water Supply", "Sanitation", "Recreation", "Occupation Hazard"]),
new Paragraph({ spacing: { before: 60, after: 40 },
children: [new TextRun({ text: "Social Factors:", bold: true, size: 20, font: "Arial" })] }),
checkboxLine(["Economic Status", "Education Level", "Marriage", "Family Background", "Caste / Religion"]),
new Paragraph({ spacing: { before: 60, after: 40 },
children: [
new TextRun({ text: "Investigation Status: ", bold: true, size: 20, font: "Arial" }),
new TextRun({ text: "[ ] Done [ ] To be Done [ ] Not Required", size: 20, font: "Arial" })
]}),
...writeBox("Family History", "(Any hereditary or chronic diseases in the family — diabetes, hypertension, TB, cancer, epilepsy, etc.)", 4),
...writeBox("Past Health History", "(Previous illnesses, surgeries, hospitalisations, or accidents of family members.)", 4),
...writeBox("Social and Personal History", "(Habits — smoking, alcohol, dietary practices, occupation hazards, social activities, recreational habits.)", 4),
...writeBox("Present Health Status of All Family Members", "(Current health condition of each member — well / ill / under treatment. Mention member and status.)", 4),
...writeBox("Present Complaints of the Beneficiary / Priority Member", "(Chief complaint, onset, duration, associated symptoms — as stated by the client.)", 4),
...writeBox("Presentation of Problem — Medical and Social", "(Describe the problem from both the medical perspective and the social/environmental perspective.)", 4),
new Paragraph({ spacing: { before: 80 } })
];
}
// ─────────────────────────────────────────────────────────────────────────────
// SECTION XII — NUTRITIONAL STATUS
// ─────────────────────────────────────────────────────────────────────────────
function buildSection12() {
const nutHeaders = ["Family Member", "Age/Sex", "Weight (kg)", "Height (cm)", "BMI", "Hb (g/dl)", "Nutritional Status"];
const nutWidths = [1800, 800, 900, 900, 700, 800, 1800];
const nutMembers = ["Children (0–5 years)", "School-age Child", "Adolescent", "Adult Male", "Adult Female", "Pregnant Woman", "Lactating Mother", "Elderly"];
const nutHeaderRow = new TableRow({
tableHeader: true,
children: nutHeaders.map((h, i) => new TableCell({
width: { size: nutWidths[i], type: WidthType.DXA },
shading: SECTION_SHADING, verticalAlign: VerticalAlign.CENTER,
margins: { top: 60, bottom: 60, left: 80, right: 80 }, borders: allBorders(THIN_BORDER),
children: [new Paragraph({ alignment: AlignmentType.CENTER,
children: [new TextRun({ text: h, bold: true, color: "FFFFFF", size: 18, font: "Arial" })] })]
}))
});
const nutRows = nutMembers.map((m, i) => new TableRow({
children: nutHeaders.map((_, j) => new TableCell({
shading: i % 2 === 0 ? WHITE_SHADING : ALT_ROW_SHADING,
margins: { top: 60, bottom: 60, left: 80, right: 80 }, borders: allBorders(THIN_BORDER),
children: [new Paragraph({ alignment: AlignmentType.CENTER,
children: [new TextRun({ text: j === 0 ? m : "", size: 19, font: "Arial" })] })]
}))
}));
const dietHeaders = ["Sl.No", "Food Items Consumed", "Quantity", "Kcal", "CHO (g)", "Protein (g)", "Fat (g)"];
const dietHeaderRow = new TableRow({
tableHeader: true,
children: dietHeaders.map(h => new TableCell({
shading: SECTION_SHADING, verticalAlign: VerticalAlign.CENTER,
margins: { top: 60, bottom: 60, left: 80, right: 80 }, borders: allBorders(THIN_BORDER),
children: [new Paragraph({ alignment: AlignmentType.CENTER,
children: [new TextRun({ text: h, bold: true, color: "FFFFFF", size: 18, font: "Arial" })] })]
}))
});
const dietDataRows = [];
for (let i = 1; i <= 6; i++) {
dietDataRows.push(new TableRow({
children: dietHeaders.map((_, j) => new TableCell({
shading: i % 2 === 0 ? ALT_ROW_SHADING : WHITE_SHADING,
margins: { top: 60, bottom: 60, left: 80, right: 80 }, borders: allBorders(THIN_BORDER),
children: [new Paragraph({ alignment: AlignmentType.CENTER,
children: [new TextRun({ text: j === 0 ? String(i) : "", size: 19, font: "Arial" })] })]
}))
}));
}
dietDataRows.push(new TableRow({
children: dietHeaders.map((_, j) => new TableCell({
shading: SUBSECTION_SHADING, margins: { top: 60, bottom: 60, left: 80, right: 80 }, borders: allBorders(THIN_BORDER),
children: [new Paragraph({ alignment: AlignmentType.CENTER,
children: [new TextRun({ text: j === 0 ? "TOTAL" : "", bold: true, size: 20, font: "Arial", color: "1F4E79" })] })]
}))
}));
return [
sectionHeading("XII", "NUTRITIONAL STATUS AND PHYSICAL ASSESSMENT"),
new Paragraph({ spacing: { before: 80, after: 40 },
children: [new TextRun({ text: "Food Habit:", bold: true, size: 20, font: "Arial" })] }),
checkboxLine(["Vegetarian", "Non-Vegetarian", "Eggetarian / Mixed"]),
new Paragraph({ spacing: { before: 60, after: 40 },
children: [new TextRun({ text: "Feeding Practice (for children):", bold: true, size: 20, font: "Arial" })] }),
checkboxLine(["Breast Feeding", "Artificial / Formula Feeding", "Mixed Feeding", "Weaning Foods (Complementary)"],
"Applicable for children under 2 years"),
new Paragraph({ spacing: { before: 100, after: 60 },
children: [new TextRun({ text: "Nutritional and Physical Assessment Table:", bold: true, size: 20, font: "Arial" })] }),
new Table({ width: { size: 100, type: WidthType.PERCENTAGE }, borders: allBorders(THIN_BORDER),
rows: [nutHeaderRow, ...nutRows] }),
hintPara("BMI = Weight (kg) ÷ Height (m)² | Normal BMI: 18.5–24.9 | Normal Hb: Female >12 g/dl, Male >13 g/dl"),
new Paragraph({ spacing: { before: 100, after: 60 },
children: [new TextRun({ text: "24-Hour Dietary Recall:", bold: true, size: 20, font: "Arial" })] }),
new Table({ width: { size: 100, type: WidthType.PERCENTAGE }, borders: allBorders(THIN_BORDER),
rows: [dietHeaderRow, ...dietDataRows] }),
new Paragraph({ spacing: { before: 80, after: 40 },
children: [
new TextRun({ text: "Calorie Intake: ", bold: true, size: 20, font: "Arial" }),
new TextRun({ text: "[ ] Poor [ ] Adequate [ ] High ", size: 20, font: "Arial" }),
new TextRun({ text: "Protein Intake: ", bold: true, size: 20, font: "Arial" }),
new TextRun({ text: "[ ] Poor [ ] Adequate [ ] High", size: 20, font: "Arial" })
]}),
new Paragraph({ spacing: { before: 80 } })
];
}
// ─────────────────────────────────────────────────────────────────────────────
// SECTION XIII — RELEVANT TO CASE (Female in Reproductive Age)
// ─────────────────────────────────────────────────────────────────────────────
function buildSection13() {
const rows13 = [
["Age at Marriage", ""],
["Age at Menarche", ""],
["Last Menstrual Period (LMP)", ""],
["Expected Date of Delivery (EDD)", ""],
["Menstrual History", "[ ] Regular [ ] Irregular [ ] Scanty [ ] Heavy Days: ________"],
["Current Pregnancy Status", "[ ] Pregnant [ ] Not Pregnant [ ] Post-Menopausal"],
["Antenatal / Postnatal Care", "[ ] Receiving ANC [ ] Receiving PNC [ ] Not Applicable"],
];
return [
sectionHeading("XIII", "RELEVANT TO THE CASE (Female in Reproductive Age)"),
hintPara("Fill this section only if the beneficiary / priority member is a female of reproductive age (15–49 years)."),
new Table({
width: { size: 100, type: WidthType.PERCENTAGE }, borders: allBorders(THIN_BORDER),
rows: [
new TableRow({ children: [sectionHeaderCell("REPRODUCTIVE HEALTH ASSESSMENT", 2)] }),
new TableRow({ children: [subHeaderCell("Assessment Item"), subHeaderCell("Details / Findings")] }),
...rows13.map(([label, val], i) => new TableRow({
children: [
new TableCell({
width: { size: 3000, type: WidthType.DXA },
shading: i % 2 === 0 ? ALT_ROW_SHADING : WHITE_SHADING,
margins: { top: 60, bottom: 60, left: 100, right: 60 }, borders: allBorders(THIN_BORDER),
children: [new Paragraph({ children: [new TextRun({ text: label, bold: true, size: 20, font: "Arial" })] })]
}),
new TableCell({
shading: i % 2 === 0 ? ALT_ROW_SHADING : WHITE_SHADING,
margins: { top: 60, bottom: 60, left: 100, right: 100 }, borders: allBorders(THIN_BORDER),
children: [new Paragraph({ children: [new TextRun({ text: val, size: 20, font: "Arial" })] })]
})
]
}))
]
}),
new Paragraph({ spacing: { before: 80 } })
];
}
// ─────────────────────────────────────────────────────────────────────────────
// SECTION XIV — OBSTETRICAL HISTORY
// ─────────────────────────────────────────────────────────────────────────────
function buildSection14() {
const obsHeaders = ["S.No", "Year", "Type of Delivery", "Birth Outcome", "Baby Weight", "Complications"];
const obsHeaderRow = new TableRow({
tableHeader: true,
children: obsHeaders.map(h => new TableCell({
shading: SECTION_SHADING, verticalAlign: VerticalAlign.CENTER,
margins: { top: 60, bottom: 60, left: 80, right: 80 }, borders: allBorders(THIN_BORDER),
children: [new Paragraph({ alignment: AlignmentType.CENTER,
children: [new TextRun({ text: h, bold: true, color: "FFFFFF", size: 18, font: "Arial" })] })]
}))
});
const obsRows = [];
for (let i = 1; i <= 4; i++) {
obsRows.push(new TableRow({
children: obsHeaders.map((_, j) => new TableCell({
shading: i % 2 === 0 ? ALT_ROW_SHADING : WHITE_SHADING,
margins: { top: 60, bottom: 60, left: 80, right: 80 }, borders: allBorders(THIN_BORDER),
children: [new Paragraph({ alignment: AlignmentType.CENTER,
children: [new TextRun({ text: j === 0 ? String(i) : "", size: 19, font: "Arial" })] })]
}))
}));
}
return [
sectionHeading("XIV", "OBSTETRICAL HISTORY"),
hintPara("Fill this section only if applicable. Leave blank if not relevant to the study family."),
new Table({ width: { size: 100, type: WidthType.PERCENTAGE }, borders: allBorders(THIN_BORDER),
rows: [obsHeaderRow, ...obsRows] }),
new Paragraph({ spacing: { before: 100, after: 40 },
children: [new TextRun({ text: "Immunization Status (Mother / Child):", bold: true, size: 20, font: "Arial" })] }),
checkboxLine(["BCG", "OPV 0,1,2,3", "Pentavalent", "Measles / MR / MMR", "TT / Td", "Vitamin A", "Hepatitis B", "All Complete", "Defaulter"]),
new Paragraph({ spacing: { before: 80, after: 40 },
children: [new TextRun({ text: "Family Planning / Welfare Methods — Temporary:", bold: true, size: 20, font: "Arial" })] }),
checkboxLine(["Oral Contraceptive Pills (OCP)", "IUCD / IUD", "Condom", "Injectable", "None"]),
new Paragraph({ spacing: { before: 60, after: 40 },
children: [new TextRun({ text: "Family Planning / Welfare Methods — Permanent:", bold: true, size: 20, font: "Arial" })] }),
checkboxLine(["Tubectomy", "Laparoscopy", "Vasectomy", "None"]),
new Paragraph({ spacing: { before: 80 } })
];
}
// ─────────────────────────────────────────────────────────────────────────────
// DISEASE CONDITION — CLINICAL ASSESSMENT
// ─────────────────────────────────────────────────────────────────────────────
function buildDiseaseSection() {
function writeBox(label, hint, lines = 4) {
return [
new Paragraph({ spacing: { before: 100, after: 40 },
children: [new TextRun({ text: label + ":", bold: true, size: 20, font: "Arial", color: "1F4E79" })] }),
new Table({
width: { size: 100, type: WidthType.PERCENTAGE }, borders: allBorders(THIN_BORDER),
rows: [new TableRow({ children: [new TableCell({
margins: { top: 80, bottom: 80, left: 120, right: 120 }, borders: allBorders(THIN_BORDER),
children: [
new Paragraph({ children: [new TextRun({ text: hint, size: 18, italics: true, color: "808080", font: "Arial" })] }),
...Array(lines).fill(0).map(() => new Paragraph({ spacing: { before: 80, after: 80 },
children: [new TextRun({ text: "", size: 20, font: "Arial" })] }))
]
})] })]
})
];
}
const compHeaders = ["Book Picture (As per Textbook)", "Patient Picture (As Observed)", "Remarks"];
const invHeaders = ["Investigation (Standard / Book)", "Patient Findings / Reports", "Remarks"];
function compTable(headers) {
const hRow = new TableRow({ tableHeader: true,
children: headers.map(h => new TableCell({
shading: SECTION_SHADING, verticalAlign: VerticalAlign.CENTER,
margins: { top: 60, bottom: 60, left: 80, right: 80 }, borders: allBorders(THIN_BORDER),
children: [new Paragraph({ alignment: AlignmentType.CENTER,
children: [new TextRun({ text: h, bold: true, color: "FFFFFF", size: 18, font: "Arial" })] })]
}))
});
const rows = [];
for (let i = 0; i < 4; i++) {
rows.push(new TableRow({ children: headers.map(() => new TableCell({
shading: i % 2 === 0 ? WHITE_SHADING : ALT_ROW_SHADING,
margins: { top: 80, bottom: 80, left: 80, right: 80 }, borders: allBorders(THIN_BORDER),
children: [new Paragraph({ children: [new TextRun({ text: "", size: 20, font: "Arial" })] })]
})) }));
}
return new Table({ width: { size: 100, type: WidthType.PERCENTAGE }, borders: allBorders(THIN_BORDER),
rows: [hRow, ...rows] });
}
return [
new Paragraph({ spacing: { before: 200, after: 100 },
children: [new TextRun({ text: "DISEASE CONDITION — CLINICAL ASSESSMENT", bold: true, size: 28,
font: "Arial", color: "1F4E79", underline: { type: UnderlineType.SINGLE, color: "1F4E79" } })] }),
...writeBox("Disease Condition (if any)", "(Name of the disease / health condition identified in the priority family member.)", 2),
...writeBox("Definition", "(Write the definition of the identified disease as per the nursing/medical textbook.)", 3),
...writeBox("Causes / Etiology", "(List the causes and risk factors of the disease — predisposing, precipitating, perpetuating.)", 4),
...writeBox("Pathophysiology", "(Briefly describe the mechanism of disease development — use a flowchart if helpful.)", 5),
...writeBox("Clinical Manifestations / Signs and Symptoms", "(List both subjective symptoms reported by the patient and objective signs observed.)", 4),
new Paragraph({ spacing: { before: 100, after: 60 },
children: [new TextRun({ text: "Clinical Manifestations — Comparison (Book vs Patient):", bold: true, size: 20, font: "Arial" })] }),
compTable(compHeaders),
new Paragraph({ spacing: { before: 100, after: 60 },
children: [new TextRun({ text: "Investigations:", bold: true, size: 20, font: "Arial" })] }),
compTable(invHeaders),
new Paragraph({ spacing: { before: 100, after: 40 },
children: [new TextRun({ text: "Management / Treatment Given:", bold: true, size: 20, font: "Arial" })] }),
new Table({
width: { size: 100, type: WidthType.PERCENTAGE }, borders: allBorders(THIN_BORDER),
rows: [new TableRow({ children: [new TableCell({
margins: { top: 80, bottom: 80, left: 120, right: 120 }, borders: allBorders(THIN_BORDER),
children: [...Array(3).fill(0).map(() => new Paragraph({ spacing: { before: 80, after: 80 },
children: [new TextRun({ text: "", size: 20, font: "Arial" })] }))]
})] })]
}),
new Paragraph({ spacing: { before: 60, after: 40 },
children: [new TextRun({ text: "Where Treatment is Received:", bold: true, size: 20, font: "Arial" })] }),
checkboxLine(["PHC", "CHC", "Government Hospital", "Private Hospital", "ASHA / ANM", "Self-Medication", "No Treatment"]),
new Paragraph({ spacing: { before: 80 } })
];
}
// ─────────────────────────────────────────────────────────────────────────────
// SECTION XV — NEEDS AND PROBLEMS
// ─────────────────────────────────────────────────────────────────────────────
function buildSection15() {
const npHeaders = ["Sl.No", "Need / Problem Identified", "Priority (High / Medium / Low)", "Remarks"];
const npWidths = [500, 4000, 2000, 1700];
const npHeaderRow = new TableRow({ tableHeader: true, children: npHeaders.map((h, i) =>
new TableCell({ width: { size: npWidths[i], type: WidthType.DXA }, shading: SECTION_SHADING,
verticalAlign: VerticalAlign.CENTER, margins: { top: 60, bottom: 60, left: 80, right: 80 }, borders: allBorders(THIN_BORDER),
children: [new Paragraph({ alignment: AlignmentType.CENTER, children: [new TextRun({ text: h, bold: true, color: "FFFFFF", size: 18, font: "Arial" })] })]
}))
});
const npRows = [];
for (let i = 1; i <= 5; i++) {
npRows.push(new TableRow({ children: npHeaders.map((_, j) =>
new TableCell({ shading: i % 2 === 0 ? ALT_ROW_SHADING : WHITE_SHADING,
margins: { top: 80, bottom: 80, left: 80, right: 80 }, borders: allBorders(THIN_BORDER),
children: [new Paragraph({ alignment: AlignmentType.CENTER, children: [new TextRun({ text: j === 0 ? String(i) : "", size: 19, font: "Arial" })] })]
}))
}));
}
return [
sectionHeading("XV", "NEEDS AND PROBLEMS IDENTIFIED"),
new Table({ width: { size: 100, type: WidthType.PERCENTAGE }, borders: allBorders(THIN_BORDER),
rows: [npHeaderRow, ...npRows] }),
new Paragraph({ spacing: { before: 80 } })
];
}
// ─────────────────────────────────────────────────────────────────────────────
// SECTION XVI — SHORT & LONG TERM GOALS
// ─────────────────────────────────────────────────────────────────────────────
function buildSection16() {
return [
sectionHeading("XVI", "SHORT TERM AND LONG TERM GOALS"),
new Table({
width: { size: 100, type: WidthType.PERCENTAGE }, borders: allBorders(THIN_BORDER),
rows: [
new TableRow({ children: [sectionHeaderCell("Short Term Goals (to be achieved within 1 week)"), sectionHeaderCell("Long Term Goals (to be achieved within 1 month or more)")] }),
new TableRow({ children: [
new TableCell({ margins: { top: 80, bottom: 80, left: 120, right: 120 }, borders: allBorders(THIN_BORDER),
children: [...Array(5).fill(0).map(() => new Paragraph({ spacing: { before: 80, after: 80 }, children: [new TextRun({ text: "", size: 20, font: "Arial" })] }))] }),
new TableCell({ margins: { top: 80, bottom: 80, left: 120, right: 120 }, borders: allBorders(THIN_BORDER),
children: [...Array(5).fill(0).map(() => new Paragraph({ spacing: { before: 80, after: 80 }, children: [new TextRun({ text: "", size: 20, font: "Arial" })] }))] })
]}),
]
}),
new Paragraph({ spacing: { before: 80 } })
];
}
// ─────────────────────────────────────────────────────────────────────────────
// SECTION XVII — NURSING DIAGNOSIS
// ─────────────────────────────────────────────────────────────────────────────
function buildSection17() {
const ndHeaders = ["Sl.No", "Nursing Diagnosis (PES Format)", "Rationale / Scientific Basis"];
const ndWidths = [500, 5500, 2700];
const ndHeaderRow = new TableRow({ tableHeader: true, children: ndHeaders.map((h, i) =>
new TableCell({ width: { size: ndWidths[i], type: WidthType.DXA }, shading: SECTION_SHADING,
verticalAlign: VerticalAlign.CENTER, margins: { top: 60, bottom: 60, left: 80, right: 80 }, borders: allBorders(THIN_BORDER),
children: [new Paragraph({ alignment: AlignmentType.CENTER, children: [new TextRun({ text: h, bold: true, color: "FFFFFF", size: 18, font: "Arial" })] })]
}))
});
const ndRows = [];
for (let i = 1; i <= 5; i++) {
ndRows.push(new TableRow({ children: ndHeaders.map((_, j) =>
new TableCell({ shading: i % 2 === 0 ? ALT_ROW_SHADING : WHITE_SHADING,
margins: { top: 100, bottom: 100, left: 80, right: 80 }, borders: allBorders(THIN_BORDER),
children: [new Paragraph({ alignment: j === 0 ? AlignmentType.CENTER : AlignmentType.LEFT,
children: [new TextRun({ text: j === 0 ? String(i) : "", size: 19, font: "Arial" })] })]
}))
}));
}
return [
sectionHeading("XVII", "LIST OF NURSING DIAGNOSES"),
hintPara("PES Format = Problem (P) + Etiology / Related to (E) + Signs and Symptoms / As evidenced by (S)"),
new Table({ width: { size: 100, type: WidthType.PERCENTAGE }, borders: allBorders(THIN_BORDER),
rows: [ndHeaderRow, ...ndRows] }),
new Paragraph({ spacing: { before: 80 } })
];
}
// ─────────────────────────────────────────────────────────────────────────────
// SECTION XVIII — NURSING CARE PLAN
// ─────────────────────────────────────────────────────────────────────────────
function buildSection18() {
const ncpHeaders = ["Sl.No", "Nursing Diagnosis", "Goal / Expected Outcome", "Nursing Interventions", "Scientific Rationale", "Evaluation"];
const ncpWidths = [400, 1600, 1400, 1800, 1500, 1100];
const ncpHeaderRow = new TableRow({ tableHeader: true, children: ncpHeaders.map((h, i) =>
new TableCell({ width: { size: ncpWidths[i], type: WidthType.DXA }, shading: SECTION_SHADING,
verticalAlign: VerticalAlign.CENTER, margins: { top: 60, bottom: 60, left: 60, right: 60 }, borders: allBorders(THIN_BORDER),
children: [new Paragraph({ alignment: AlignmentType.CENTER, children: [new TextRun({ text: h, bold: true, color: "FFFFFF", size: 17, font: "Arial" })] })]
}))
});
const ncpRows = [];
for (let i = 1; i <= 3; i++) {
ncpRows.push(new TableRow({ children: ncpHeaders.map((_, j) =>
new TableCell({ shading: i % 2 === 0 ? ALT_ROW_SHADING : WHITE_SHADING,
margins: { top: 100, bottom: 100, left: 60, right: 60 }, borders: allBorders(THIN_BORDER),
children: [...Array(4).fill(0).map(() => new Paragraph({ spacing: { before: 60, after: 60 },
children: [new TextRun({ text: j === 0 ? (i === 1 ? String(i) : "") : "", size: 19, font: "Arial" })] }))]
}))
}));
}
return [
sectionHeading("XVIII", "NURSING CARE PLAN"),
new Table({ width: { size: 100, type: WidthType.PERCENTAGE }, borders: allBorders(THIN_BORDER),
rows: [ncpHeaderRow, ...ncpRows] }),
new Paragraph({ spacing: { before: 80 } })
];
}
// ─────────────────────────────────────────────────────────────────────────────
// SECTION XIX — LEVELS OF PREVENTION
// ─────────────────────────────────────────────────────────────────────────────
function buildSection19() {
const prevRows = [
["Individual Level", "", "", "", "", ""],
["Family Level", "", "", "", "", ""],
["Community Level", "", "", "", "", ""],
];
const prevHeaders = [
"Level", "Primary — Health Promotion", "Primary — Specific Protection",
"Secondary — Early Diagnosis & Treatment", "Tertiary — Disability Limitation", "Tertiary — Rehabilitation"
];
const headerRow = new TableRow({ tableHeader: true, children: prevHeaders.map(h =>
new TableCell({ shading: SECTION_SHADING, verticalAlign: VerticalAlign.CENTER,
margins: { top: 60, bottom: 60, left: 60, right: 60 }, borders: allBorders(THIN_BORDER),
children: [new Paragraph({ alignment: AlignmentType.CENTER, children: [new TextRun({ text: h, bold: true, color: "FFFFFF", size: 17, font: "Arial" })] })]
}))
});
const dataRows = prevRows.map(([label], i) => new TableRow({ children: prevHeaders.map((_, j) =>
new TableCell({ shading: i % 2 === 0 ? ALT_ROW_SHADING : WHITE_SHADING,
margins: { top: 100, bottom: 100, left: 60, right: 60 }, borders: allBorders(THIN_BORDER),
children: [new Paragraph({ children: [new TextRun({ text: j === 0 ? label : "", bold: j === 0, size: 19, font: "Arial" })] })]
}))
}));
return [
sectionHeading("XIX", "MANAGEMENT AT VARIOUS LEVELS (Levels of Prevention)"),
hintPara("Primary: Health Promotion + Specific Protection | Secondary: Early Diagnosis & Treatment | Tertiary: Disability Limitation + Rehabilitation"),
new Table({ width: { size: 100, type: WidthType.PERCENTAGE }, borders: allBorders(THIN_BORDER),
rows: [headerRow, ...dataRows] }),
new Paragraph({ spacing: { before: 80 } })
];
}
// ─────────────────────────────────────────────────────────────────────────────
// SECTION XX — HEALTH EDUCATION
// ─────────────────────────────────────────────────────────────────────────────
function buildSection20() {
return [
sectionHeading("XX", "HEALTH EDUCATION"),
new Paragraph({ spacing: { before: 80, after: 40 },
children: [new TextRun({ text: "Topics Covered:", bold: true, size: 20, font: "Arial" })] }),
checkboxLine(["Personal Hygiene", "Hand Washing (6-step method)", "Safe Drinking Water", "Nutrition & Balanced Diet"]),
checkboxLine(["Immunization Schedule", "Family Planning", "ANC / PNC Care", "Child Care & Growth Monitoring"]),
checkboxLine(["Sanitation & Waste Disposal", "Disease Prevention", "First Aid", "Home Remedies"]),
new Paragraph({ spacing: { before: 80, after: 40 },
children: [new TextRun({ text: "Method Used:", bold: true, size: 20, font: "Arial" })] }),
checkboxLine(["Individual Counselling", "Group Discussion / Health Talk", "Demonstration", "Pamphlets / IEC Materials", "Audio-Visual Aids"]),
new Paragraph({ spacing: { before: 80, after: 40 },
children: [new TextRun({ text: "Health Education Content Provided:", bold: true, size: 20, font: "Arial" })] }),
new Table({
width: { size: 100, type: WidthType.PERCENTAGE }, borders: allBorders(THIN_BORDER),
rows: [new TableRow({ children: [new TableCell({
margins: { top: 80, bottom: 80, left: 120, right: 120 }, borders: allBorders(THIN_BORDER),
children: [
new Paragraph({ children: [new TextRun({ text: "(Describe in brief the health education given to the family — topics, key points, materials used.)",
size: 18, italics: true, color: "808080", font: "Arial" })] }),
...Array(5).fill(0).map(() => new Paragraph({ spacing: { before: 80, after: 80 },
children: [new TextRun({ text: "", size: 20, font: "Arial" })] }))
]
})] })]
}),
new Paragraph({ spacing: { before: 80, after: 40 },
children: [new TextRun({ text: "Response / Understanding of the Family:", bold: true, size: 20, font: "Arial" })] }),
new Table({
width: { size: 100, type: WidthType.PERCENTAGE }, borders: allBorders(THIN_BORDER),
rows: [new TableRow({ children: [new TableCell({
margins: { top: 80, bottom: 80, left: 120, right: 120 }, borders: allBorders(THIN_BORDER),
children: [...Array(3).fill(0).map(() => new Paragraph({ spacing: { before: 80, after: 80 },
children: [new TextRun({ text: "", size: 20, font: "Arial" })] }))]
})] })]
}),
new Paragraph({ spacing: { before: 80 } })
];
}
// ─────────────────────────────────────────────────────────────────────────────
// SECTION XXI — HOME VISIT PLAN
// ─────────────────────────────────────────────────────────────────────────────
function buildSection21() {
const hvHeaders = ["Visit No.", "Date", "Services Provided / Activities Done", "Student Signature", "Remarks"];
const hvWidths = [600, 1000, 4200, 1400, 1000];
const hvHeaderRow = new TableRow({ tableHeader: true, children: hvHeaders.map((h, i) =>
new TableCell({ width: { size: hvWidths[i], type: WidthType.DXA }, shading: SECTION_SHADING,
verticalAlign: VerticalAlign.CENTER, margins: { top: 60, bottom: 60, left: 60, right: 60 }, borders: allBorders(THIN_BORDER),
children: [new Paragraph({ alignment: AlignmentType.CENTER, children: [new TextRun({ text: h, bold: true, color: "FFFFFF", size: 18, font: "Arial" })] })]
}))
});
const hvRows = [];
for (let i = 1; i <= 5; i++) {
hvRows.push(new TableRow({ children: hvHeaders.map((_, j) =>
new TableCell({ shading: i % 2 === 0 ? ALT_ROW_SHADING : WHITE_SHADING,
margins: { top: 80, bottom: 80, left: 60, right: 60 }, borders: allBorders(THIN_BORDER),
children: [new Paragraph({ alignment: AlignmentType.CENTER, children: [new TextRun({ text: j === 0 ? String(i) : "", size: 19, font: "Arial" })] })]
}))
}));
}
return [
sectionHeading("XXI", "HOME VISIT PLAN (Date-wise Record)"),
new Table({ width: { size: 100, type: WidthType.PERCENTAGE }, borders: allBorders(THIN_BORDER),
rows: [hvHeaderRow, ...hvRows] }),
new Paragraph({ spacing: { before: 80 } })
];
}
// ─────────────────────────────────────────────────────────────────────────────
// SECTIONS XXII, XXIII — FOLLOW UP & SUMMARY
// ─────────────────────────────────────────────────────────────────────────────
function buildSection22and23() {
function writeBox(label, hint, lines) {
return [
sectionHeading(label.split(".")[0], label.split(". ")[1] || label),
new Table({
width: { size: 100, type: WidthType.PERCENTAGE }, borders: allBorders(THIN_BORDER),
rows: [new TableRow({ children: [new TableCell({
margins: { top: 80, bottom: 80, left: 120, right: 120 }, borders: allBorders(THIN_BORDER),
children: [
new Paragraph({ children: [new TextRun({ text: hint, size: 18, italics: true, color: "808080", font: "Arial" })] }),
...Array(lines).fill(0).map(() => new Paragraph({ spacing: { before: 80, after: 80 },
children: [new TextRun({ text: "", size: 20, font: "Arial" })] }))
]
})] })]
}),
new Paragraph({ spacing: { before: 80 } })
];
}
return [
...writeBox("XXII. Follow Up", "(Record all follow-up visits — date, what was assessed, what changes were found, any new problems noted.)", 6),
...writeBox("XXIII. Summary and Conclusion",
"(Write a comprehensive summary: family health status, care provided, goals achieved, response to health education, referrals made, and your overall learning from this study.)", 8),
];
}
// ─────────────────────────────────────────────────────────────────────────────
// SIGNATURE PAGE
// ─────────────────────────────────────────────────────────────────────────────
function buildSignaturePage() {
return [
new Paragraph({ spacing: { before: 200, after: 100 },
children: [new TextRun({ text: "SIGNATURES", bold: true, size: 26, font: "Arial", color: "1F4E79",
underline: { type: UnderlineType.SINGLE, color: "1F4E79" } })] }),
new Table({
width: { size: 100, type: WidthType.PERCENTAGE }, borders: allBorders(THIN_BORDER),
rows: [
new TableRow({ children: [
sectionHeaderCell("Student"),
sectionHeaderCell("Clinical Guide / Supervisor"),
sectionHeaderCell("Head of Department / Principal")
]}),
new TableRow({ children: [
new TableCell({ margins: { top: 200, bottom: 200, left: 120, right: 120 }, borders: allBorders(THIN_BORDER),
children: [
new Paragraph({ spacing: { before: 60, after: 180 }, children: [new TextRun({ text: "Name: ________________________", size: 20, font: "Arial" })] }),
new Paragraph({ spacing: { before: 60, after: 60 }, children: [new TextRun({ text: "Date: ________________________", size: 20, font: "Arial" })] }),
new Paragraph({ spacing: { before: 60, after: 60 }, children: [new TextRun({ text: "Roll No: ______________________", size: 20, font: "Arial" })] }),
new Paragraph({ spacing: { before: 60, after: 40 }, children: [new TextRun({ text: "Signature:", size: 20, font: "Arial" })] }),
...Array(3).fill(0).map(() => new Paragraph({ spacing: { before: 60, after: 60 }, children: [new TextRun({ text: "", size: 20, font: "Arial" })] }))
]
}),
new TableCell({ margins: { top: 200, bottom: 200, left: 120, right: 120 }, borders: allBorders(THIN_BORDER),
children: [
new Paragraph({ spacing: { before: 60, after: 180 }, children: [new TextRun({ text: "Name: ________________________", size: 20, font: "Arial" })] }),
new Paragraph({ spacing: { before: 60, after: 60 }, children: [new TextRun({ text: "Date: ________________________", size: 20, font: "Arial" })] }),
new Paragraph({ spacing: { before: 60, after: 60 }, children: [new TextRun({ text: "Designation: _________________", size: 20, font: "Arial" })] }),
new Paragraph({ spacing: { before: 60, after: 40 }, children: [new TextRun({ text: "Signature:", size: 20, font: "Arial" })] }),
...Array(3).fill(0).map(() => new Paragraph({ spacing: { before: 60, after: 60 }, children: [new TextRun({ text: "", size: 20, font: "Arial" })] }))
]
}),
new TableCell({ margins: { top: 200, bottom: 200, left: 120, right: 120 }, borders: allBorders(THIN_BORDER),
children: [
new Paragraph({ spacing: { before: 60, after: 180 }, children: [new TextRun({ text: "Name: ________________________", size: 20, font: "Arial" })] }),
new Paragraph({ spacing: { before: 60, after: 60 }, children: [new TextRun({ text: "Date: ________________________", size: 20, font: "Arial" })] }),
new Paragraph({ spacing: { before: 60, after: 60 }, children: [new TextRun({ text: "College Seal:", size: 20, font: "Arial" })] }),
new Paragraph({ spacing: { before: 60, after: 40 }, children: [new TextRun({ text: "Signature:", size: 20, font: "Arial" })] }),
...Array(3).fill(0).map(() => new Paragraph({ spacing: { before: 60, after: 60 }, children: [new TextRun({ text: "", size: 20, font: "Arial" })] }))
]
}),
]})
]
}),
new Paragraph({ spacing: { before: 200, after: 80 }, alignment: AlignmentType.CENTER,
children: [new TextRun({ text: "— End of Family Care Study —", bold: true, size: 22, font: "Arial", color: "808080", italics: true })] }),
new Paragraph({ alignment: AlignmentType.CENTER, spacing: { before: 20, after: 20 },
children: [new TextRun({ text: "GNM Community Health Nursing Practical Record | As per INC Revised Syllabus 2015",
size: 18, italics: true, color: "808080", font: "Arial" })] }),
];
}
// ─────────────────────────────────────────────────────────────────────────────
// ASSEMBLE DOCUMENT
// ─────────────────────────────────────────────────────────────────────────────
const allChildren = [
...buildCoverPage(),
...buildSection1(),
...buildSection2(),
pageBreak(),
...buildSection3(),
...buildSection4and5(),
...buildSection6(),
pageBreak(),
...buildMapSection("VII", "ROUTE MAP", "(Draw the route map from the Sub-Centre / Health Centre to the family's home. Include landmarks, roads, and direction indicators.)"),
...buildMapSection("VIII", "AREA MAP", "(Draw the map of the community area. Mark houses, roads, water sources, health facilities, schools, anganwadi, etc.)"),
...buildMapSection("IX", "FLOOR MAP / HOUSE PLAN", "(Draw the floor plan / layout of the family's home. Indicate rooms, kitchen, toilet/bathroom, entry, ventilation openings, etc.)"),
pageBreak(),
...buildSection10(),
...buildSection11(),
pageBreak(),
...buildSection12(),
...buildSection13(),
...buildSection14(),
pageBreak(),
...buildDiseaseSection(),
pageBreak(),
...buildSection15(),
...buildSection16(),
...buildSection17(),
pageBreak(),
...buildSection18(),
...buildSection19(),
pageBreak(),
...buildSection20(),
...buildSection21(),
...buildSection22and23(),
pageBreak(),
...buildSignaturePage(),
];
const doc = new Document({
styles: {
default: {
document: { run: { font: "Arial", size: 20, color: "000000" } }
},
paragraphStyles: [
{ id: "Heading1", name: "Heading 1", basedOn: "Normal", next: "Normal", quickFormat: true,
run: { size: 36, bold: true, font: "Arial", color: "1F4E79" },
paragraph: { spacing: { before: 240, after: 160 }, outlineLevel: 0 } },
{ id: "Heading2", name: "Heading 2", basedOn: "Normal", next: "Normal", quickFormat: true,
run: { size: 28, bold: true, font: "Arial", color: "2E74B5" },
paragraph: { spacing: { before: 180, after: 120 }, outlineLevel: 1 } },
]
},
sections: [{
properties: {
page: {
size: { width: 11906, height: 16838 },
margin: { top: 720, bottom: 720, left: 900, right: 900 }
}
},
headers: {
default: new Header({
children: [
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 0, after: 60 },
border: { bottom: { style: BorderStyle.SINGLE, size: 6, color: "2E74B5" } },
children: [
new TextRun({ text: "GNM — COMMUNITY HEALTH NURSING PRACTICAL RECORD | Family Care Study", size: 16, font: "Arial", color: "595959" })
]
})
]
})
},
footers: {
default: new Footer({
children: [
new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: 60, after: 0 },
border: { top: { style: BorderStyle.SINGLE, size: 6, color: "2E74B5" } },
children: [
new TextRun({ text: "General Nursing and Midwifery (GNM) | As per INC Revised Syllabus 2015 Page: ", size: 16, font: "Arial", color: "595959" }),
new TextRun({ children: [PageNumber.CURRENT], size: 16, font: "Arial", color: "595959" }),
new TextRun({ text: " of ", size: 16, font: "Arial", color: "595959" }),
new TextRun({ children: [PageNumber.TOTAL_PAGES], size: 16, font: "Arial", color: "595959" }),
]
})
]
})
},
children: allChildren
}]
});
Packer.toBuffer(doc).then(buffer => {
const outPath = "/home/daytona/workspace/gnm-templates/GNM_Family_Care_Study_Template.docx";
fs.writeFileSync(outPath, buffer);
console.log("SUCCESS: " + outPath);
}).catch(err => {
console.error("ERROR:", err.message);
process.exit(1);
});
cd /home/daytona/workspace/gnm-templates && node create_gnm_family_care_study.js…
python3 /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/works…
# Validate by unpacking the docx and checking document.xml is parseable cd /tmp …
GNM Family Care Study Template
Word Document · DOCX
| Section | Content |
|---|---|
| I | Family Profile (head, address, type of family, nearby health facilities) |
| II | Family Composition table (8 members, high-risk and family welfare markers) |
| III | Three-Generation Genogram (large drawing box with symbol key) |
| IV | Introduction of the Family Care Study |
| V | Reason for Selection |
| VI | Area Background (facilities, social background, administrative setup, description) |
| VII | Route Map (large drawing box) |
| VIII | Area Map (large drawing box) |
| IX | Floor Map / House Plan (large drawing box) |
| X | Social Demographic Data (house type, toilet, water, waste, ventilation, electricity) |
| XI | History Collection (family history, past history, social history, present status, chief complaint) |
| XII | Nutritional Status + 24-Hour Dietary Recall tables |
| XIII | Reproductive Health Assessment (female in reproductive age) |
| XIV | Obstetrical History + Immunization + Family Planning |
| Disease | Clinical Assessment (definition, etiology, pathophysiology, signs/symptoms, book-vs-patient comparison, investigations) |
| XV | Needs and Problems Identified (priority table) |
| XVI | Short Term and Long Term Goals (side-by-side table) |
| XVII | List of Nursing Diagnoses (PES format) |
| XVIII | Nursing Care Plan (diagnosis / goal / interventions / rationale / evaluation) |
| XIX | Management at Various Levels (3-level prevention table) |
| XX | Health Education (topics, methods, content, family response) |
| XXI | Home Visit Plan (5-visit date-wise record) |
| XXII | Follow-Up Record |
| XXIII | Summary and Conclusion |
| Signatures | Student / Clinical Guide / HoD-Principal (with name, date, seal, signature lines) |
[ ] notation for easy pen-markingdownload gnm family care study
GNM Family Care Study Template
Word Document · DOCX
its not downloading
ls -lh /home/daytona/workspace/gnm-templates/ && file /home/daytona/workspace/gn…
GNM Family Care Study Template
Word Document · DOCX