Put proforma at first and remove all the things inclusion table Just put inclusion yes or no Then below to it Handed ness score just mention properly that based on handedness criteria just included or not no table such and then next page make participant information sheet Now properly prepare my doc with borders also
cd /home/daytona/workspace/attachments/cb08d520-6519-4b7a-bb88-e1dd8d2357ea && pandoc "sample collection.docx" -o /home/daytona/workspace/sample_collection.md --track-changes=all 2>&1 && cat -n /home/daytona/workspace/sample_collection.md
wc -l /home/daytona/workspace/sample_collection.md
/home/daytona/skills/docx
ls /home/daytona/skills/docx/scripts/
mkdir -p /home/daytona/workspace/sample-collection && ls /home/daytona/workspace/sample-collection/
~/sample-collection/build.js
const {
Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
AlignmentType, HeadingLevel, BorderStyle, WidthType, VerticalAlign,
PageBreak, ShadingType, LevelFormat, UnderlineType
} = require('docx');
const fs = require('fs');
// ─── Helpers ────────────────────────────────────────────────────────────────
const FONT = "Arial";
const PAGE_BORDER = {
style: BorderStyle.SINGLE,
size: 12,
color: "000000",
space: 24
};
// Page border applied to all sections via pageborders property
const pageBorderProps = {
pageBorders: {
offsetFrom: "PAGE",
display: "allPages",
top: PAGE_BORDER,
bottom: PAGE_BORDER,
left: PAGE_BORDER,
right: PAGE_BORDER
}
};
function bold(text, size = 22) {
return new TextRun({ text, bold: true, font: FONT, size });
}
function normal(text, size = 22) {
return new TextRun({ text, font: FONT, size });
}
function para(children, align = AlignmentType.LEFT, spBefore = 80, spAfter = 80) {
return new Paragraph({ alignment: align, spacing: { before: spBefore, after: spAfter }, children });
}
function heading(text, level = HeadingLevel.HEADING_2) {
return new Paragraph({
heading: level,
spacing: { before: 160, after: 80 },
children: [new TextRun({ text, bold: true, font: FONT, size: level === HeadingLevel.HEADING_1 ? 28 : 24 })]
});
}
function blank() {
return new Paragraph({ children: [new TextRun({ text: "", font: FONT, size: 22 })] });
}
function line(label, width = 40) {
const underscores = "_".repeat(width);
return para([bold(label + " "), normal(underscores)]);
}
function cellText(text, bold2 = false, size2 = 20) {
return new Paragraph({
spacing: { before: 40, after: 40 },
children: [new TextRun({ text, bold: bold2, font: FONT, size: size2 })]
});
}
function thinBorder() {
return { style: BorderStyle.SINGLE, size: 6, color: "000000" };
}
function cell(content, width, shadeBg = false, colSpan = 1) {
return new TableCell({
columnSpan: colSpan,
width: { size: width, type: WidthType.DXA },
shading: shadeBg ? { fill: "D9D9D9", type: ShadingType.CLEAR } : undefined,
borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() },
verticalAlign: VerticalAlign.CENTER,
children: Array.isArray(content) ? content : [cellText(content, false, 20)]
});
}
function headerCell(text, width, colSpan = 1) {
return new TableCell({
columnSpan: colSpan,
width: { size: width, type: WidthType.DXA },
shading: { fill: "D9D9D9", type: ShadingType.CLEAR },
borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() },
verticalAlign: VerticalAlign.CENTER,
children: [cellText(text, true, 20)]
});
}
function pageBreakPara() {
return new Paragraph({ children: [new PageBreak()] });
}
// ─── SECTION 1: PROFORMA (Data Collection Sheet) ─────────────────────────────
// Title block
const proformaTitle = [
para([bold("RL JALAPPA COLLEGE OF PHYSIOTHERAPY", 26)], AlignmentType.CENTER, 120, 60),
para([bold("Sri Devaraj Urs Academy of Higher Education & Research, Kolar", 22)], AlignmentType.CENTER, 0, 60),
blank(),
para([bold("PROFORMA / DATA COLLECTION SHEET", 26)], AlignmentType.CENTER, 80, 40),
para([bold("Interhemispheric Connection \u2013 Behavioural Assessment", 22)], AlignmentType.CENTER, 0, 120),
];
// A. Demographic Details
const demoTable = new Table({
width: { size: 9026, type: WidthType.DXA },
rows: [
// Header
new TableRow({ children: [headerCell("A. DEMOGRAPHIC DETAILS", 9026, 2)] }),
new TableRow({
children: [
new TableCell({ width: { size: 4513, type: WidthType.DXA }, borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() }, children: [cellText("1. Name of Child: ______________________________", false, 20)] }),
new TableCell({ width: { size: 4513, type: WidthType.DXA }, borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() }, children: [cellText("2. Age: _______________________", false, 20)] }),
]
}),
new TableRow({
children: [
new TableCell({ width: { size: 4513, type: WidthType.DXA }, borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() }, children: [cellText("3. Date of Birth: _____________________________", false, 20)] }),
new TableCell({ width: { size: 4513, type: WidthType.DXA }, borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() }, children: [cellText("4. Gender: M / F / Other", false, 20)] }),
]
}),
new TableRow({
children: [
new TableCell({ width: { size: 4513, type: WidthType.DXA }, borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() }, children: [cellText("5. Grade / Class: ____________________________", false, 20)] }),
new TableCell({ width: { size: 4513, type: WidthType.DXA }, borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() }, children: [cellText("6. School Name: ______________________________", false, 20)] }),
]
}),
new TableRow({
children: [
new TableCell({ width: { size: 4513, type: WidthType.DXA }, borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() }, children: [cellText("7. Date of Assessment: ________________________", false, 20)] }),
new TableCell({ width: { size: 4513, type: WidthType.DXA }, borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() }, children: [cellText("8. Parent Phone No.: _________________________", false, 20)] }),
]
}),
new TableRow({
children: [
new TableCell({ columnSpan: 2, width: { size: 9026, type: WidthType.DXA }, borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() }, children: [cellText("9. Address: _______________________________________________________________________________", false, 20)] }),
]
}),
]
});
// B. Eligibility Check — simplified (no table, just Yes/No)
const eligibilityBlock = [
blank(),
para([bold("B. ELIGIBILITY CHECK", 22)], AlignmentType.LEFT, 100, 60),
para([
normal("Inclusion: ", 22),
bold("Yes / No", 22)
], AlignmentType.LEFT, 60, 80),
para([bold("ELIGIBLE FOR STUDY: Yes / No", 22)], AlignmentType.LEFT, 60, 100),
];
// C. Handedness Assessment — simplified (no table)
const handednessBlock = [
para([bold("C. HANDEDNESS ASSESSMENT (Edinburgh Handedness Inventory)", 22)], AlignmentType.LEFT, 100, 60),
para([
normal("Based on the Edinburgh Handedness Inventory criteria, the participant is: ", 22),
bold("Included / Not Included", 22),
normal(" in this study.", 22)
], AlignmentType.LEFT, 60, 60),
para([
normal("(LQ score \u2265 +21 = Right-handed \u2192 Included | LQ \u2264 \u221220 to +20 = Mixed \u2192 Excluded | LQ \u2264 \u221221 = Left-handed \u2192 Included as per study criteria)", 18)
], AlignmentType.LEFT, 20, 100),
];
// D. Task I — Tactile Intermanual Transfer
const taskIHeader = [
para([bold("D. TASK I \u2013 TACTILE INTERMANUAL TRANSFER", 22)], AlignmentType.LEFT, 100, 40),
para([normal("(Eyes closed / blindfolded. No visual input allowed throughout.)", 20)], AlignmentType.LEFT, 0, 60),
];
const taskITable = new Table({
width: { size: 9026, type: WidthType.DXA },
rows: [
new TableRow({
children: [
headerCell("Object", 1505),
headerCell("RH Intra-manual", 1880),
headerCell("LH Intra-manual", 1880),
headerCell("Inter-manual (R\u2192L)", 1880),
headerCell("Inter-manual (L\u2192R)", 1881),
]
}),
...["Key","Coin","Scissors","Comb","Pen","Rubber","Button","Clip","Spoon","Ring"].map(obj =>
new TableRow({
children: [
new TableCell({ width: { size: 1505, type: WidthType.DXA }, borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() }, children: [cellText(obj, false, 20)] }),
new TableCell({ width: { size: 1880, type: WidthType.DXA }, borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() }, children: [cellText("", false, 20)] }),
new TableCell({ width: { size: 1880, type: WidthType.DXA }, borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() }, children: [cellText("", false, 20)] }),
new TableCell({ width: { size: 1880, type: WidthType.DXA }, borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() }, children: [cellText("", false, 20)] }),
new TableCell({ width: { size: 1881, type: WidthType.DXA }, borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() }, children: [cellText("", false, 20)] }),
]
})
)
]
});
const taskICalc = [
blank(),
para([bold("Calculations:", 22)], AlignmentType.LEFT, 60, 40),
];
const taskICalcTable = new Table({
width: { size: 9026, type: WidthType.DXA },
rows: [
new TableRow({ children: [
new TableCell({ width: { size: 4513, type: WidthType.DXA }, borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() }, children: [cellText("RH Intra-manual Accuracy %", true, 20)] }),
new TableCell({ width: { size: 4513, type: WidthType.DXA }, borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() }, children: [cellText("( _____ \u00f7 10) \u00d7 100 = _____", false, 20)] }),
]}),
new TableRow({ children: [
new TableCell({ width: { size: 4513, type: WidthType.DXA }, borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() }, children: [cellText("LH Intra-manual Accuracy %", true, 20)] }),
new TableCell({ width: { size: 4513, type: WidthType.DXA }, borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() }, children: [cellText("( _____ \u00f7 10) \u00d7 100 = _____", false, 20)] }),
]}),
new TableRow({ children: [
new TableCell({ width: { size: 4513, type: WidthType.DXA }, borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() }, children: [cellText("Inter-manual Transfer Accuracy %", true, 20)] }),
new TableCell({ width: { size: 4513, type: WidthType.DXA }, borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() }, children: [cellText("( _____ \u00f7 total) \u00d7 100 = _____", false, 20)] }),
]}),
new TableRow({ children: [
new TableCell({ width: { size: 4513, type: WidthType.DXA }, borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() }, children: [cellText("Transfer Index (TI) = (IMT correct \u00f7 IMA correct) \u00d7 100", true, 20)] }),
new TableCell({ width: { size: 4513, type: WidthType.DXA }, borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() }, children: [cellText("TI = _____", false, 20)] }),
]}),
]
});
const taskIInterpTable = new Table({
width: { size: 9026, type: WidthType.DXA },
rows: [
new TableRow({ children: [headerCell("Transfer Index", 4513), headerCell("Interpretation", 4513)] }),
new TableRow({ children: [cell("\u2265 80%", 4513), cell("Normal transfer", 4513)] }),
new TableRow({ children: [cell("60\u201379%", 4513), cell("Mild reduction", 4513)] }),
new TableRow({ children: [cell("40\u201359%", 4513), cell("Moderate impairment", 4513)] }),
new TableRow({ children: [cell("< 40%", 4513), cell("Severe \u2013 disconnection syndrome", 4513)] }),
]
});
const taskIEnd = [
blank(),
para([bold("Task I Interpretation: "), normal("______________________________________________")]),
blank(),
];
// E. Task II — Bimanual Tapping
const taskIIHeader = [
para([bold("E. TASK II \u2013 BIMANUAL TAPPING", 22), normal(" (Metronome: 60 BPM, Duration: 30 seconds)", 22)], AlignmentType.LEFT, 100, 40),
para([bold("Condition 1 \u2013 In-Phase (Synchronous) Tapping:", 22)], AlignmentType.LEFT, 60, 40),
];
const taskIITable1 = new Table({
width: { size: 9026, type: WidthType.DXA },
rows: [
new TableRow({ children: [
new TableCell({ width: { size: 4513, type: WidthType.DXA }, borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() }, children: [cellText("Number of simultaneous taps", false, 20)] }),
new TableCell({ width: { size: 4513, type: WidthType.DXA }, borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() }, children: [cellText("", false, 20)] }),
]}),
new TableRow({ children: [
new TableCell({ width: { size: 4513, type: WidthType.DXA }, borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() }, children: [cellText("Total beats (30 sec)", false, 20)] }),
new TableCell({ width: { size: 4513, type: WidthType.DXA }, borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() }, children: [cellText("30", false, 20)] }),
]}),
new TableRow({ children: [
new TableCell({ width: { size: 4513, type: WidthType.DXA }, borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() }, children: [cellText("In-Phase Accuracy %", false, 20)] }),
new TableCell({ width: { size: 4513, type: WidthType.DXA }, borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() }, children: [cellText("( _____ \u00f7 30) \u00d7 100 = _____", false, 20)] }),
]}),
]
});
const taskIIBlock2 = [
blank(),
para([bold("Condition 2 \u2013 Anti-Phase (Alternating) Tapping:", 22)], AlignmentType.LEFT, 60, 40),
];
const taskIITable2 = new Table({
width: { size: 9026, type: WidthType.DXA },
rows: [
new TableRow({ children: [
new TableCell({ width: { size: 4513, type: WidthType.DXA }, borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() }, children: [cellText("Number of correct alternate taps", false, 20)] }),
new TableCell({ width: { size: 4513, type: WidthType.DXA }, borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() }, children: [cellText("", false, 20)] }),
]}),
new TableRow({ children: [
new TableCell({ width: { size: 4513, type: WidthType.DXA }, borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() }, children: [cellText("Anti-Phase Accuracy %", false, 20)] }),
new TableCell({ width: { size: 4513, type: WidthType.DXA }, borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() }, children: [cellText("( _____ \u00f7 30) \u00d7 100 = _____", false, 20)] }),
]}),
]
});
const taskIIGap = [
blank(),
para([bold("Gap Score = In-Phase % \u2212 Anti-Phase % = _______", 22)]),
];
const taskIIInterpTable = new Table({
width: { size: 9026, type: WidthType.DXA },
rows: [
new TableRow({ children: [headerCell("Gap Score", 4513), headerCell("Interpretation", 4513)] }),
new TableRow({ children: [cell("< 15%", 4513), cell("Good bimanual independence", 4513)] }),
new TableRow({ children: [cell("15\u201330%", 4513), cell("Moderate coordination difficulty", 4513)] }),
new TableRow({ children: [cell("> 30%", 4513), cell("Significant anti-coordination deficit", 4513)] }),
]
});
const taskIIEnd = [
blank(),
para([bold("Task II Interpretation: "), normal("______________________________________________")]),
blank(),
];
// F. Task III — Bimanual Coordination
const taskIIIHeader = [
para([bold("F. TASK III \u2013 BIMANUAL COORDINATION", 22)], AlignmentType.LEFT, 100, 40),
para([bold("Condition 1 \u2013 Simultaneous Different Movements (Circle + Vertical Line, 30 sec):", 22)], AlignmentType.LEFT, 60, 40),
];
const taskIIITable1 = new Table({
width: { size: 9026, type: WidthType.DXA },
rows: [
new TableRow({ children: [headerCell("Score", 2255), headerCell("Observation", 6771)] }),
new TableRow({ children: [cell("2", 2255), cell("Both movements maintained independence throughout", 6771)] }),
new TableRow({ children: [cell("1", 2255), cell("Minor breakdown observed", 6771)] }),
new TableRow({ children: [cell("0", 2255), cell("Complete assimilation \u2013 one hand mirrors the other", 6771)] }),
]
});
const taskIIIBlock2 = [
blank(),
para([bold("Score Obtained: "), normal("0 / 1 / 2")]),
blank(),
para([bold("Condition 2 \u2013 Alternate Grip & Release (Pegboard, 30 sec):", 22)], AlignmentType.LEFT, 60, 40),
para([bold("Correct simultaneous placements in 30 sec: "), normal("___________________________")]),
para([bold("Bimanual Coordination Score: "), normal("( _____ \u00f7 30) = _____")]),
blank(),
para([bold("Condition 3 \u2013 Rhythmic Bimanual Asymmetric Movement (R: 2 taps/beat; L: 1 tap/beat, 60 BPM, 30 sec):", 22)], AlignmentType.LEFT, 60, 40),
para([bold("Breakdown frequency: "), normal("___________________________")]),
];
const taskIIITable3 = new Table({
width: { size: 9026, type: WidthType.DXA },
rows: [
new TableRow({ children: [headerCell("Score", 2255), headerCell("Interpretation", 6771)] }),
new TableRow({ children: [cell("\u2265 80%", 2255), cell("Good bimanual coordination \u2013 intact callosal function", 6771)] }),
new TableRow({ children: [cell("60\u201379%", 2255), cell("Mild difficulty \u2013 mild interhemispheric delay", 6771)] }),
new TableRow({ children: [cell("40\u201359%", 2255), cell("Moderate difficulty \u2013 possible callosal immaturity", 6771)] }),
new TableRow({ children: [cell("< 40%", 2255), cell("Significant difficulty \u2013 poor bimanual independence", 6771)] }),
]
});
const taskIIIEnd = [
blank(),
para([bold("Task III Overall Interpretation: "), normal("___________________________________")]),
blank(),
];
// Overall Summary Table
const summaryHeader = [
para([bold("OVERALL SUMMARY", 24)], AlignmentType.CENTER, 120, 60),
];
const summaryTable = new Table({
width: { size: 9026, type: WidthType.DXA },
rows: [
new TableRow({ children: [headerCell("Task", 3008), headerCell("Score / Index", 3009), headerCell("Interpretation", 3009)] }),
new TableRow({ children: [cell("Task I \u2013 Transfer Index", 3008), cell("", 3009), cell("", 3009)] }),
new TableRow({ children: [cell("Task II \u2013 Gap Score", 3008), cell("", 3009), cell("", 3009)] }),
new TableRow({ children: [cell("Task III \u2013 Bimanual Coordination", 3008), cell("", 3009), cell("", 3009)] }),
]
});
const summaryFooter = [
blank(),
para([bold("Examiner\u2019s Name: "), normal("_______________________________ "), bold("Signature: "), normal("_______________________________")]),
blank(),
];
// ─── SECTION 2: PARTICIPANT INFORMATION SHEET (on new page) ──────────────────
const pisTitle = [
pageBreakPara(),
// Annexure box header
new Table({
width: { size: 9026, type: WidthType.DXA },
rows: [
new TableRow({ children: [
new TableCell({
width: { size: 9026, type: WidthType.DXA },
borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() },
children: [
new Paragraph({ alignment: AlignmentType.CENTER, spacing: { before: 60, after: 20 }, children: [bold("ANNEXURE \u2013 1", 24)] }),
new Paragraph({ alignment: AlignmentType.CENTER, spacing: { before: 20, after: 20 }, children: [bold("PARTICIPANT INFORMATION SHEET", 24)] }),
new Paragraph({ alignment: AlignmentType.CENTER, spacing: { before: 20, after: 60 }, children: [normal("(English)", 22)] }),
]
})
]])
]
}),
blank(),
// Study title box
new Table({
width: { size: 9026, type: WidthType.DXA },
rows: [
new TableRow({ children: [
new TableCell({
width: { size: 9026, type: WidthType.DXA },
borders: { top: thinBorder(), bottom: thinBorder(), left: thinBorder(), right: thinBorder() },
children: [
new Paragraph({ alignment: AlignmentType.LEFT, spacing: { before: 60, after: 20 }, children: [bold("Study Title:", 22)] }),
new Paragraph({ alignment: AlignmentType.LEFT, spacing: { before: 20, after: 60 }, children: [new TextRun({ text: "\u201cBehavioural Assessment of Interhemispheric Connection in School-Aged Children Using Task-Based Measures \u2013 An Observational Study\u201d", bold: true, italics: true, font: FONT, size: 22 })] }),
]
})
]])
]
}),
blank(),
];
const pisBody = [
para([bold("Introduction", 22)], AlignmentType.LEFT, 80, 40),
para([normal("This document provides all necessary information about the study and what participation involves. Your child has been identified as a potential participant because they fall within the eligible age group. Please read it carefully before giving your consent. You are welcome to ask any questions before deciding.", 22)]),
blank(),
para([bold("Purpose of the Study", 22)], AlignmentType.LEFT, 80, 40),
para([normal("The purpose of this study is to evaluate the Interhemispheric connection in children \u2013 that is, to assess how effectively the left and right sides of the brain communicate and work together.", 22)]),
blank(),
para([bold("Why Has My Child Been Invited?", 22)], AlignmentType.LEFT, 80, 40),
para([normal("Your child is being invited because they are a healthy child who meets the inclusion criteria for this research. Participation will help in assessing interhemispheric connection through observational behavioural tasks.", 22)]),
blank(),
para([bold("What Will My Child Have to Do?", 22)], AlignmentType.LEFT, 80, 40),
para([normal("If you agree to participate, your child will be asked to perform simple observational activities such as bimanual tapping and tactile tasks. These tasks are:", 22)]),
new Paragraph({ numbering: { reference: "bullets", level: 0 }, spacing: { before: 40, after: 20 }, children: [normal("Non-invasive and painless")] }),
new Paragraph({ numbering: { reference: "bullets", level: 0 }, spacing: { before: 20, after: 20 }, children: [normal("Involve only simple hand/finger movements")] }),
new Paragraph({ numbering: { reference: "bullets", level: 0 }, spacing: { before: 20, after: 20 }, children: [normal("Conducted in a quiet room")] }),
new Paragraph({ numbering: { reference: "bullets", level: 0 }, spacing: { before: 20, after: 40 }, children: [normal("Will take approximately 20\u201330 minutes")] }),
blank(),
para([bold("Voluntary Participation", 22)], AlignmentType.LEFT, 80, 40),
para([normal("Participation is entirely voluntary. You are free to decline or withdraw at any time without any penalty or consequence.", 22)]),
blank(),
para([bold("Risks and Discomfort", 22)], AlignmentType.LEFT, 80, 40),
para([normal("There are no anticipated physical, psychological, or social risks associated with participation in this study.", 22)]),
blank(),
para([bold("Benefits", 22)], AlignmentType.LEFT, 80, 40),
new Paragraph({ numbering: { reference: "bullets", level: 0 }, spacing: { before: 40, after: 20 }, children: [normal("Results will help better understand brain connectivity in children")] }),
new Paragraph({ numbering: { reference: "bullets", level: 0 }, spacing: { before: 20, after: 20 }, children: [normal("May help in early identification of neurological difficulties in the future")] }),
new Paragraph({ numbering: { reference: "bullets", level: 0 }, spacing: { before: 20, after: 40 }, children: [normal("Findings may guide better treatment and rehabilitation for children with neurological conditions")] }),
blank(),
para([bold("Confidentiality", 22)], AlignmentType.LEFT, 80, 40),
new Paragraph({ numbering: { reference: "bullets", level: 0 }, spacing: { before: 40, after: 20 }, children: [normal("All information collected will be kept strictly confidential")] }),
new Paragraph({ numbering: { reference: "bullets", level: 0 }, spacing: { before: 20, after: 20 }, children: [normal("Your child\u2019s name will not be used in any report or publication")] }),
new Paragraph({ numbering: { reference: "bullets", level: 0 }, spacing: { before: 20, after: 20 }, children: [normal("Data will be stored securely and accessed only by the research team")] }),
new Paragraph({ numbering: { reference: "bullets", level: 0 }, spacing: { before: 20, after: 40 }, children: [normal("Results will be used for research purposes only")] }),
blank(),
para([bold("Compensation", 22)], AlignmentType.LEFT, 80, 40),
para([normal("There is no financial compensation for participation.", 22)]),
blank(),
para([bold("Ethical Approval", 22)], AlignmentType.LEFT, 80, 40),
para([normal("This study has been approved by the Institutional Ethics Committee of Sri Devaraj Urs Academy of Higher Education and Research (SDUAHER), Kolar.", 22)]),
blank(),
para([bold("Contact for Queries", 22)], AlignmentType.LEFT, 80, 40),
para([bold("Principal Investigator: Ms. Poojitha N G", 22)]),
para([normal("Undergraduate Student, RL Jalappa College of Physiotherapy, SDUAHER, Kolar", 22)]),
para([normal("Mobile: 9108295141 | Email: poojagowda178@gmail.com", 22)]),
blank(),
para([bold("Co-Investigator: Mr. Pavankumar B N", 22)]),
para([normal("Lecturer, RL Jalappa College of Physiotherapy, SDUAHER, Kolar", 22)]),
para([normal("Mobile: 8073193089", 22)]),
];
// ─── Assemble Document ────────────────────────────────────────────────────────
const doc = new Document({
numbering: {
config: [
{
reference: "bullets",
levels: [{
level: 0, format: LevelFormat.BULLET, text: "\u2022", alignment: AlignmentType.LEFT,
style: { paragraph: { indent: { left: 720, hanging: 360 } } }
}]
}
]
},
styles: {
default: { document: { run: { font: FONT, size: 22 } } },
paragraphStyles: [
{
id: "Heading1", name: "Heading 1", basedOn: "Normal", next: "Normal", quickFormat: true,
run: { size: 28, bold: true, font: FONT, color: "000000" },
paragraph: { spacing: { before: 200, after: 100 } }
},
{
id: "Heading2", name: "Heading 2", basedOn: "Normal", next: "Normal", quickFormat: true,
run: { size: 24, bold: true, font: FONT, color: "000000" },
paragraph: { spacing: { before: 160, after: 80 } }
},
]
},
sections: [
{
properties: {
page: {
borders: {
pageBorderTop: PAGE_BORDER,
pageBorderBottom: PAGE_BORDER,
pageBorderLeft: PAGE_BORDER,
pageBorderRight: PAGE_BORDER,
}
}
},
children: [
// PROFORMA section
...proformaTitle,
demoTable,
...eligibilityBlock,
...handednessBlock,
...taskIHeader,
taskITable,
...taskICalc,
taskICalcTable,
blank(),
taskIInterpTable,
...taskIEnd,
...taskIIHeader,
taskIITable1,
...taskIIBlock2,
taskIITable2,
...taskIIGap,
taskIIInterpTable,
...taskIIEnd,
...taskIIIHeader,
taskIIITable1,
...taskIIIBlock2,
taskIIITable3,
...taskIIIEnd,
...summaryHeader,
summaryTable,
...summaryFooter,
// PIS section
...pisTitle,
...pisBody,
]
}
]
});
Packer.toBuffer(doc).then(buffer => {
fs.writeFileSync("/home/daytona/workspace/sample-collection/sample_collection_revised.docx", buffer);
console.log("Done!");
}).catch(err => { console.error(err); process.exit(1); });
cd /home/daytona/workspace/sample-collection && node build.js 2>&1