I want to give consent and assent forms for data collection for my thesis to parents and students.can you make a printable forms of them so that I can print
cd /home/daytona/workspace && pandoc --track-changes=all "/home/daytona/workspace/attachments/241321bf-7bb0-46a8-9021-8585e4429209/irc doc file-precocious puberty.docx" -o /home/daytona/workspace/irc_doc_content.md 2>&1 && echo "Done"
ls -la /home/daytona/workspace/ && ls /home/daytona/skills/docx/scripts/office/ 2>/dev/null || echo "no scripts dir"
mkdir -p /home/daytona/workspace/consent-forms && ls /home/daytona/workspace/consent-forms
~/consent-forms/generate_forms.js
const {
Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
AlignmentType, HeadingLevel, BorderStyle, WidthType, VerticalAlign,
PageBreak, UnderlineType, ShadingType
} = require('docx');
const fs = require('fs');
// ─── helpers ────────────────────────────────────────────────────────────────
function bold(text, size = 22) {
return new TextRun({ text, bold: true, size });
}
function normal(text, size = 22) {
return new TextRun({ text, size });
}
function italic(text, size = 20) {
return new TextRun({ text, italics: true, size });
}
function blankLine(space = 160) {
return new Paragraph({ spacing: { before: 0, after: space }, children: [] });
}
function centered(children, spaceBefore = 0, spaceAfter = 120) {
return new Paragraph({
alignment: AlignmentType.CENTER,
spacing: { before: spaceBefore, after: spaceAfter },
children
});
}
function para(children, spaceBefore = 80, spaceAfter = 80) {
return new Paragraph({
spacing: { before: spaceBefore, after: spaceAfter },
children
});
}
function signatureLine(label, width = 4500) {
return new Paragraph({
spacing: { before: 180, after: 60 },
children: [
new TextRun({ text: label + ': ', bold: true, size: 22 }),
new TextRun({ text: '_'.repeat(38), size: 22 })
]
});
}
function twoColRow(left, right) {
return new TableRow({
children: [
new TableCell({
width: { size: 50, type: WidthType.PERCENTAGE },
borders: { top: { style: BorderStyle.NONE }, bottom: { style: BorderStyle.NONE },
left: { style: BorderStyle.NONE }, right: { style: BorderStyle.NONE } },
children: [new Paragraph({ children: [new TextRun({ text: left, size: 22 })] })]
}),
new TableCell({
width: { size: 50, type: WidthType.PERCENTAGE },
borders: { top: { style: BorderStyle.NONE }, bottom: { style: BorderStyle.NONE },
left: { style: BorderStyle.NONE }, right: { style: BorderStyle.NONE } },
children: [new Paragraph({ children: [new TextRun({ text: right, size: 22 })] })]
})
]
});
}
function borderlessTable(rows) {
return new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
borders: {
top: { style: BorderStyle.NONE, size: 0 },
bottom: { style: BorderStyle.NONE, size: 0 },
left: { style: BorderStyle.NONE, size: 0 },
right: { style: BorderStyle.NONE, size: 0 },
insideH: { style: BorderStyle.NONE, size: 0 },
insideV: { style: BorderStyle.NONE, size: 0 }
},
rows
});
}
function sectionHeader(text) {
return new Paragraph({
spacing: { before: 200, after: 80 },
children: [new TextRun({ text, bold: true, underline: { type: UnderlineType.SINGLE }, size: 24 })]
});
}
function checkbox(text) {
return new Paragraph({
spacing: { before: 60, after: 60 },
indent: { left: 360 },
children: [new TextRun({ text: '\u25A1 ' + text, size: 22 })]
});
}
function numberedItem(num, text) {
return new Paragraph({
spacing: { before: 80, after: 80 },
children: [new TextRun({ text: num + '. ' + text, size: 22 })]
});
}
// ─── PARENTAL CONSENT FORM ─────────────────────────────────────────────────
const consentChildren = [
// Institution header
centered([bold('GOVERNMENT MEDICAL COLLEGE, MANJERI', 26)], 0, 60),
centered([bold('Department of Community Medicine', 22)], 0, 60),
centered([italic('Malappuram District, Kerala, India', 20)], 0, 200),
// Form title box (simulated with bold centered text)
centered([bold('INFORMED CONSENT FORM FOR PARENTS / GUARDIANS', 26)], 0, 80),
centered([italic('(To be completed by the parent or guardian of the participating child)', 20)], 0, 200),
// Study info box header
sectionHeader('Study Information'),
para([
bold('Study Title: '),
normal('"Prevalence of Precocious Puberty Among School Girls in Manjeri and Anakkayam, Malappuram District, Kerala"')
]),
para([bold('Principal Investigator: '), normal('_________________________________')]),
para([bold('Institution: '), normal('Government Medical College, Manjeri, Kerala')]),
para([bold('Department: '), normal('Community Medicine')]),
para([bold('Contact Number: '), normal('_________________________________')]),
blankLine(120),
// Dear parent
sectionHeader('Dear Parent / Guardian,'),
para([normal(
'We respectfully invite your daughter to participate in a research study being conducted as part of a thesis requirement at Government Medical College, Manjeri. This form provides important information about the study. Please read it carefully before deciding whether to allow your daughter to participate. Participation is completely voluntary.'
)]),
blankLine(80),
sectionHeader('Purpose of the Study'),
para([normal(
'This study aims to estimate how common early puberty (precocious puberty) is among school girls aged 10-15 years in Manjeri and Anakkayam areas of Malappuram district. Early puberty is defined as the onset of puberty signs before age 8. The study will also help identify related factors such as diet, lifestyle, body weight, and family history.'
)]),
blankLine(80),
sectionHeader('What Will Happen if Your Daughter Participates?'),
para([normal('If you give your permission, the following will be done:')]),
checkbox('A structured questionnaire will be administered to your daughter to gather information about her health, diet, lifestyle habits, and general well-being.'),
checkbox('A brief, non-invasive physical examination will be done by a trained female researcher to note puberty indicators (breast development, pubic hair) following standard Tanner staging criteria.'),
checkbox('Height and weight will be measured to calculate Body Mass Index (BMI).'),
checkbox('No blood tests, injections, or invasive procedures will be performed.'),
checkbox('The entire process will take approximately 20-30 minutes.'),
blankLine(80),
sectionHeader('Risks and Discomforts'),
para([normal(
'There are no significant physical risks associated with this study. The physical examination is brief and will be conducted with full privacy by a trained female examiner. Some questions may be of a personal nature; your daughter may choose not to answer any question she is uncomfortable with.'
)]),
blankLine(80),
sectionHeader('Benefits'),
para([normal(
'There are no direct benefits to your daughter. However, the findings of this study may help improve understanding of early puberty in this region and contribute to better adolescent health services and policies.'
)]),
blankLine(80),
sectionHeader('Confidentiality'),
para([normal(
'All information collected will be kept strictly confidential. Your daughter\'s name will not appear in any report or publication. Data will be stored securely and accessed only by the research team. Results will be presented as group statistics only.'
)]),
blankLine(80),
sectionHeader('Voluntariness'),
para([normal(
'Participation is entirely voluntary. You are free to withdraw your daughter from the study at any time without any penalty or effect on her academic standing or health services.'
)]),
blankLine(80),
sectionHeader('Contact for Questions'),
para([normal('If you have any questions or concerns, please contact:')]),
para([bold('Principal Investigator: '), normal('_________________________________ Ph: _________________')]),
para([bold('Institutional Ethics Committee: '), normal('Government Medical College, Manjeri')]),
blankLine(160),
// Consent declaration
sectionHeader('Consent Declaration'),
para([normal(
'I have read and understood the above information (or it has been read and explained to me in a language I understand). I have had the opportunity to ask questions and my questions have been answered satisfactorily. I voluntarily agree to allow my daughter to participate in this study.'
)]),
blankLine(160),
// Signature table
borderlessTable([
twoColRow(
'Name of Parent / Guardian: _______________________',
'Relationship to Child: ___________________________'
),
twoColRow('', ''),
twoColRow(
'Signature / Left Thumb Impression: _______________',
'Date: ____________________________________________'
),
twoColRow('', ''),
twoColRow(
'Name of Child: ___________________________________',
'Age of Child: _____________________________________'
),
twoColRow('', ''),
twoColRow(
'School Name: ____________________________________',
'Class / Grade: ____________________________________'
),
twoColRow('', ''),
twoColRow(
'Witness Name: ___________________________________',
'Witness Signature: ________________________________'
)
]),
blankLine(160),
para([italic('(To be filled by Researcher)', 18)]),
para([bold('Researcher Name: '), normal('_________________________________')]),
para([bold('Researcher Signature: '), normal('___________________________ Date: _______________')]),
];
// ─── PAGE BREAK ────────────────────────────────────────────────────────────
consentChildren.push(new Paragraph({ children: [new PageBreak()] }));
// ─── STUDENT ASSENT FORM ─────────────────────────────────────────────────
const assentChildren = [
centered([bold('GOVERNMENT MEDICAL COLLEGE, MANJERI', 26)], 0, 60),
centered([bold('Department of Community Medicine', 22)], 0, 60),
centered([italic('Malappuram District, Kerala, India', 20)], 0, 200),
centered([bold('STUDENT ASSENT FORM', 28)], 0, 80),
centered([italic('(For Girls Aged 10-15 Years)', 20)], 0, 80),
centered([italic('Please read this carefully. Ask your teacher or researcher if anything is unclear.', 20)], 0, 200),
sectionHeader('Study Information'),
para([bold('Study Title: '), normal('"Prevalence of Precocious Puberty Among School Girls"')]),
para([bold('Researcher: '), normal('_________________________________')]),
para([bold('Institution: '), normal('Government Medical College, Manjeri, Kerala')]),
blankLine(120),
sectionHeader('Hello!'),
para([normal(
'We are doctors and researchers from the Government Medical College, Manjeri. We are doing a study to understand how girls\' bodies grow and develop. We want to learn about the health and lifestyle of girls like you. We are asking if you would like to be part of our study.'
)]),
para([normal(
'This form explains what we will do. You can ask us any questions. It is okay to say no - it will not affect your studies or your school life at all.'
)]),
blankLine(80),
sectionHeader('What Is the Study About?'),
para([normal(
'We are studying puberty - the changes that happen in a girl\'s body as she grows up. We want to know how many girls in this area start these changes early, and what might cause it. This will help doctors plan better health programmes for girls your age.'
)]),
blankLine(80),
sectionHeader('What Will You Be Asked to Do?'),
checkbox('Answer some questions about your health, food habits, physical activity, and daily routine. (about 20 minutes)'),
checkbox('A trained female doctor will check some things about your body\'s development in a private room. It is quick, simple, and will not hurt.'),
checkbox('Your height and weight will be measured.'),
checkbox('No needles, blood tests, or medicines will be given.'),
blankLine(80),
sectionHeader('Is It Safe?'),
para([normal(
'Yes. Nothing will hurt you. The examination is gentle and private. Only female researchers will be present. You can stop at any time, and you do not have to answer any question you do not feel comfortable with.'
)]),
blankLine(80),
sectionHeader('Will Anyone Know What You Said?'),
para([normal(
'No. Your name will not be used in any report. Everything you share will be kept private. Only the research team will see your information, and it will never be shared with your school, teachers, or parents in a way that identifies you.'
)]),
blankLine(80),
sectionHeader('Do You Have to Join?'),
para([normal(
'No. Taking part is your choice. If you say no, nothing will change at school. If you join and later change your mind, that is also okay - just tell the researcher and you can stop at any time.'
)]),
blankLine(80),
sectionHeader('Questions?'),
para([normal('If you have any questions now or later, you can ask your researcher or contact:')]),
para([bold('Researcher Name: '), normal('_________________________________')]),
para([bold('Contact Number: '), normal('_________________________________')]),
blankLine(160),
// Assent declaration
sectionHeader('Assent Declaration'),
para([normal(
'I have listened to / read the above information. My questions have been answered. I understand what the study is about and what I will be asked to do. I agree to take part in this study.'
)]),
blankLine(200),
borderlessTable([
twoColRow(
'Name of Student: ________________________________',
'Age: _____________________________________________'
),
twoColRow('', ''),
twoColRow(
'Class / Grade: __________________________________',
'School Name: _____________________________________'
),
twoColRow('', ''),
twoColRow(
'Student Signature / Initials: ____________________',
'Date: ____________________________________________'
)
]),
blankLine(200),
para([italic('(To be filled by Researcher)', 18)]),
para([bold('Researcher Name: '), normal('_________________________________')]),
para([bold('Researcher Signature: '), normal('___________________________ Date: _______________')]),
blankLine(80),
centered([italic('Thank you for your time and participation!', 20)], 0, 0),
];
// ─── Combine into one document ──────────────────────────────────────────────
const allChildren = [...consentChildren, ...assentChildren];
const doc = new Document({
styles: {
default: {
document: { run: { font: 'Arial', size: 22 } }
}
},
sections: [{
properties: {
page: {
size: { width: 11906, height: 16838 }, // A4
margin: { top: 1134, right: 1134, bottom: 1134, left: 1134 } // ~2cm margins
}
},
children: allChildren
}]
});
Packer.toBuffer(doc).then(buffer => {
fs.writeFileSync('/home/daytona/workspace/consent-forms/Consent_Assent_Forms_Precocious_Puberty.docx', buffer);
console.log('Done - file written.');
});
cd /home/daytona/workspace/consent-forms && node generate_forms.js 2>&1
python /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/workspace/consent-forms/Consent_Assent_Forms_Precocious_Puberty.docx 2>&1
# Validate by unpacking and checking structure cd /tmp && rm -rf docx_check && mkdir docx_check cp /home/daytona/workspace/consent-forms/Consent_Assent_Forms_Precocious_Puberty.docx /tmp/docx_check/ cd /tmp/docx_check && unzip -q Consent_Assent_Forms_Precocious_Puberty.docx && echo "Unzipped OK" ls word/ && wc -l word/document.xml
# document.xml reported 0 lines but let's check with wc -c wc -c /tmp/docx_check/word/document.xml # Also check file size of final docx ls -lh /home/daytona/workspace/consent-forms/Consent_Assent_Forms_Precocious_Puberty.docx
pandoc /home/daytona/workspace/consent-forms/Consent_Assent_Forms_Precocious_Puberty.docx -t plain 2>&1 | head -80
Consent Assent Forms Precocious Puberty
Word Document · DOCX
Not able to open the download file
ls -lh /home/daytona/workspace/consent-forms/
python /home/daytona/skills/docx/scripts/office/soffice.py --headless --convert-to pdf /home/daytona/workspace/consent-forms/Consent_Assent_Forms_Precocious_Puberty.docx --outdir /home/daytona/workspace/consent-forms/ 2>&1
# Try converting to /tmp first, then copy python /home/daytona/skills/docx/scripts/office/soffice.py --headless --convert-to pdf /home/daytona/workspace/consent-forms/Consent_Assent_Forms_Precocious_Puberty.docx --outdir /tmp/ 2>&1 ls -lh /tmp/Consent_Assent_Forms_Precocious_Puberty.pdf 2>&1
cp /tmp/Consent_Assent_Forms_Precocious_Puberty.pdf /home/daytona/workspace/consent-forms/Consent_Assent_Forms_Precocious_Puberty.pdf && ls -lh /home/daytona/workspace/consent-forms/
Consent Assent Forms Precocious Puberty
PDF Document · PDF
Consent Assent Forms Precocious Puberty
Word Document · DOCX