1. How do we search for a research topic? How do we frame a research question/hypothesis? 2. What are the regulatory approvals required before conduct of a research? Why do we need them? 3. What are the different types of study design? What do we mean by randomisation, blinding, allocation concealment? 4. Could u clarify the terminologies like confounders, bias? How do we estimate the sample size? 5. How should data be presented in the results section? What are the common statistical tests applicable to our studies? 6. What should be the content of the discussion in a research paper? What is the standard format of writing references? Any softwares to assist? Regarding this I want the answers as they are to be discussed in the state conference and i am the panel member

Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
I now have excellent source material. Let me compile the full, conference-ready answer.

Research Methodology - State Conference Panel Discussion

Prepared for panel presentation - comprehensive coverage of all six domains

1. Searching for a Research Topic & Framing a Research Question / Hypothesis

Where to Begin

A research idea typically emerges from one of four sources:
  • Clinical observation - an unexpected finding, an unresolved problem, or a common question that lacks a definitive answer in your practice
  • Literature review - reading current journals, systematic reviews, and meta-analyses to identify knowledge gaps
  • Audit / quality data - patterns in your institution's outcome data
  • Conference presentations - topics flagged as "evidence still lacking" or "future research needed"

Conducting a Literature Search

Use structured databases:
  • PubMed / MEDLINE - the gold standard for biomedical literature (free, comprehensive)
  • EMBASE, Cochrane Library, Scopus, Web of Science - for broader searches
  • Google Scholar - good for grey literature
Search strategy tips:
  • Use MeSH (Medical Subject Headings) terms in PubMed rather than free text alone
  • Use Boolean operators: AND (narrows), OR (broadens), NOT (excludes)
  • Apply filters: date range, study type, language, age group
  • Use the "similar articles" and "cited by" features to find related work
  • Maintain a PRISMA-style log of your search process

Framing the Research Question - The PICO Framework

For any research question, define four elements: "For any clinical research question, regardless of the study design, it is useful to define the population, intervention (or exposure), control (or comparison) group, and outcome. Sometimes this is referred to by the acronym PICO." - Smith and Tanagho's General Urology, 19th Edition
ElementMeaningExample
P - PopulationWho are the subjects?Adults with type 2 diabetes
I - Intervention / ExposureWhat is being tested?Metformin therapy
C - ComparisonWhat is the comparator?Lifestyle modification alone
O - OutcomeWhat will you measure?HbA1c reduction at 6 months
A well-framed PICO question directly generates the null and alternate hypothesis.

The Hypothesis

  • Null hypothesis (H₀): States no difference or no association exists - e.g., "There is no difference in HbA1c reduction between metformin and lifestyle modification."
  • Alternate hypothesis (H₁): States the expected difference or association exists
  • One-tailed vs. two-tailed: Use two-tailed unless you have strong prior evidence about the direction of effect
  • A good hypothesis must be specific, testable, measurable, and grounded in existing evidence
Important note: Slight differences in how PICO components are defined can change the hypothesis being tested. Trials that appear to be testing the same question may in fact be testing different questions and may have different conclusions - a critical lesson for interpreting conflicting literature. (Smith and Tanagho's General Urology)

2. Regulatory Approvals Required Before Conduct of Research

The Core Approvals

1. Institutional Ethics Committee (IEC) / Institutional Review Board (IRB)
  • Every research study involving human subjects, their data, or biological material requires IEC approval
  • Governed in India by the ICMR National Ethical Guidelines for Biomedical and Health Research Involving Human Participants (2017) and CDSCO guidelines
  • The committee reviews: scientific merit, risk-benefit ratio, informed consent process, privacy safeguards, and vulnerability of the study population
2. Informed Consent
  • Mandatory for all participants (or guardians for minors/incapacitated subjects)
  • Must be in the local language, written, voluntary, and without coercion
  • Waiver of consent is only permissible for certain retrospective studies or emergency research, with specific IEC justification
3. CDSCO (Central Drugs Standard Control Organisation) Approval
  • Required specifically for drug trials, device trials, and new interventional studies
  • Works in conjunction with the Indian Drugs and Cosmetics Act
4. Clinical Trials Registry - India (CTRI)
  • Mandatory prospective registration of all clinical trials before enrollment of the first participant
  • Required by ICMR, CDSCO, and most peer-reviewed journals (ICMJE requirement)
  • URL: ctri.nic.in
5. Institutional / Hospital Administrative Approval
  • Permission from the hospital superintendent or research office for access to records, facilities, and staff support
6. Data Safety Monitoring Board (DSMB)
  • Required for larger randomized trials - an independent board that monitors interim data for safety

Why Do We Need These Approvals?

These safeguards exist for four core reasons:
  1. Protection of participants - following the legacy of the Nuremberg Code (1947), Declaration of Helsinki, and Belmont Report which established that research must minimize risk and obtain voluntary consent
  2. Scientific integrity - IEC review weeds out poorly designed studies that waste participant burden for no valid knowledge gain
  3. Legal protection - researchers and institutions are indemnified against allegations of unethical conduct
  4. Publishability - journals require IEC approval number and CTRI registration number as a condition of acceptance

3. Types of Study Design, Randomisation, Blinding, and Allocation Concealment

The Evidence Hierarchy (Pyramid)

  Meta-Analysis / Systematic Review  [Highest]
         Randomised Controlled Trial
         Cohort Studies (Prospective)
         Case-Control Studies
         Cross-Sectional Studies
         Case Series / Case Reports
         Expert Opinion / Editorials     [Lowest]

Observational Studies

DesignDirectionKey FeatureUse Case
Cross-sectionalSnapshot in timePrevalence; cheap, fastPrevalence studies, screening programs
Case-controlBackward (retrospective)Compares cases vs. controls for past exposureRare diseases, quick hypothesis generation
Cohort (prospective)ForwardFollow exposed vs. unexposed over timeIncidence, causality in common outcomes
Cohort (retrospective)Backward using recordsUses historical dataWhen follow-up is already complete in records

Interventional Studies

  • Randomised Controlled Trial (RCT): Participants randomly assigned to intervention or control. The gold standard for establishing causality
  • Non-randomised / Quasi-experimental: Pre-post designs, before-after studies without randomisation

Randomisation

Randomisation ensures that known and unknown confounders are distributed equally between study arms by chance.
Methods of randomisation:
  • Simple randomisation: Like a coin flip - works well for large samples (>200)
  • Block randomisation: Ensures equal group sizes at regular intervals - essential for small studies
  • Stratified randomisation: Randomise within subgroups (e.g., by sex, disease severity) to ensure balance on important variables
  • Cluster randomisation: Entire groups (e.g., villages, hospitals) are randomised rather than individuals - used for community interventions

Blinding (Masking)

Blinding prevents knowledge of treatment assignment from influencing outcomes, assessments, or behavior.
LevelWho is blindedPrevents
Single-blindParticipant onlyPlacebo effect, reporting bias
Double-blindParticipant + investigatorPerformance bias, detection bias
Triple-blind+ Outcome assessors or statisticiansAssessment bias
Open-labelNo blindingUsed when blinding is not feasible (surgical trials)

Allocation Concealment

This is often confused with blinding but is distinct. Allocation concealment means the investigator enrolling a participant cannot predict or know what group the next participant will be assigned to - preventing selection bias at the point of enrollment.
Common methods:
  • Sealed opaque envelopes - simple, acceptable if done properly
  • Central randomisation - a remote telephone or web-based system at an independent center (most robust)
  • Pharmacy-controlled allocation - pharmacist holds the code
Key distinction: Blinding protects against bias after enrollment; allocation concealment protects against bias at the point of enrollment.

4. Confounders, Bias, and Sample Size Estimation

Confounders

A confounder is a variable that is related to both the exposure and the outcome, and is unequally distributed between the groups being compared, thereby distorting the true association.
"If a covariate is related to both the outcome and to the exposure or risk factor being studied, and if it is unequally distributed between the groups being compared, it becomes a confounder." - Goldman-Cecil Medicine
Classic example: In a study of obesity and heart disease, age is a confounder - it is related to both obesity and heart disease. If obese subjects are older, observed differences in heart disease may be due to age rather than obesity itself.
Methods to control confounding:
  • At design stage: Randomisation, restriction (enroll only one level of confounder), matching (in case-control studies)
  • At analysis stage: Stratification (Mantel-Haenszel method), multivariable regression, propensity score matching

Bias

Bias is a systematic error that leads to a result that consistently deviates from the true value. Key types:
Selection bias - Systematic difference in who is enrolled vs. the target population
  • Example: Healthy worker effect, volunteer bias, loss to follow-up
Information / Measurement bias - Systematic error in measuring exposure or outcome
  • Recall bias: Cases (diseased) remember past exposures better than controls - common in case-control studies
  • Observer bias: Investigator's knowledge of group assignment influences assessment
  • Hawthorne effect: Subjects change behavior because they are being observed
Attrition bias - Differential loss to follow-up between study arms that affects outcomes
Publication bias - Positive studies are more likely to be published; funnel plots in meta-analyses detect this
Confounding vs. Bias: Confounding is a real phenomenon (a third variable genuinely explains the association); bias is an error in study conduct.

Sample Size Estimation

Sample size must be calculated before the study begins. An underpowered study produces false-negative results - a waste of resources and participant burden.
"Sample size estimates should be performed before any observational or interventional study." - Creasy & Resnik's Maternal-Fetal Medicine
Key parameters needed:
ParameterMeaningTypical Value
α (Type I error)Probability of a false positive0.05 (i.e., 5%)
β (Type II error)Probability of a false negative0.10 to 0.20
Power (1-β)Probability of detecting a true effect80% to 90%
Effect sizeMinimum clinically meaningful differenceFrom literature / pilot data
Baseline rate / SDPrevalence of outcome or SD of the variableFrom literature
For RCT / cohort study: Need α, β, baseline incidence, and minimum detectable relative risk For case-control study: Need α, β, prevalence of exposure in controls, and minimum detectable odds ratio
Free software tools for sample size:
  • OpenEpi (web-based, free)
  • G*Power (desktop, free)
  • EpiInfo (CDC tool, free)
  • nQuery, PASS (commercial)

5. Data Presentation in Results and Common Statistical Tests

Principles of the Results Section

  • Present findings without interpretation (interpretation belongs in the Discussion)
  • Follow the order of your Methods section
  • Report all primary and secondary outcomes, including negative results
  • Use the CONSORT flow diagram for RCTs; STROBE checklist for observational studies

Types of Variables and How to Present Them

Variable TypeExamplesSummary MeasureDisplay
Continuous normalAge, BP, weightMean ± SDBox plot, histogram
Continuous non-normalLength of stay, costMedian (IQR)Box plot
Categorical nominalSex, blood groupFrequency (%)Bar chart, pie chart
Categorical ordinalPain score, gradeMedian or frequencyBar chart
Tables: Use for exact numbers; clearly label rows/columns; footnote abbreviations Figures: Use for trends, comparisons, survival curves; include error bars Avoid: 3D pie charts, chart junk; do not repeat in text what the table already shows

Baseline Characteristics Table (Table 1)

Always present demographic and clinical characteristics stratified by study groups. Use mean ± SD or median (IQR) appropriately. Debated whether to include p-values for baseline in RCTs (CONSORT recommends against p-values for baseline comparisons in RCTs, since any differences are by chance).

Common Statistical Tests

For comparing two groups:
SituationParametric TestNon-parametric Equivalent
Continuous, 2 groupsIndependent t-testMann-Whitney U test
Continuous, pairedPaired t-testWilcoxon signed-rank test
Categorical (2x2)Chi-square testFisher's exact test (small samples)
For comparing three or more groups:
SituationParametricNon-parametric
Continuous, 3+ groupsOne-way ANOVAKruskal-Wallis test
Repeated measuresRepeated-measures ANOVAFriedman test
Multiple comparisons post-hocTukey, BonferroniDunn's test
For association and prediction:
PurposeTest
Correlation (continuous)Pearson's r (parametric), Spearman's ρ (non-parametric)
Predicting a continuous outcomeLinear regression
Predicting a binary outcomeLogistic regression
Survival / time-to-event dataKaplan-Meier curves, Log-rank test, Cox proportional hazards
Agreement between methodsBland-Altman plot, Intraclass Correlation Coefficient
Diagnostic accuracySensitivity, specificity, ROC curve, AUC
How to choose a test - the 3 questions:
  1. What type is my outcome variable? (continuous, categorical, survival)
  2. Are the groups independent or paired/matched?
  3. Is the data normally distributed? (Shapiro-Wilk test, histograms to check)
Statistical vs. Clinical Significance: A statistically significant result (p < 0.05) is not necessarily clinically meaningful. Always report confidence intervals (95% CI) and effect sizes (risk ratio, odds ratio, mean difference, NNT) alongside p-values.

6. Content of the Discussion Section, Reference Format, and Software Tools

Structure of the Discussion

A well-written discussion follows this logical flow:
1. Brief summary of key findings (1-2 sentences only, no raw numbers)
  • State what your study found in plain language, answering the research question you posed
2. Interpretation of findings
  • Explain why you think you found what you found - biological plausibility, mechanism
  • Compare with similar studies: "Our findings are consistent with..." or "In contrast to X et al., we observed..."
3. Contextualize in the existing literature
  • Compare with previously published studies - both supporting and contradicting
  • Explain discrepancies (differences in population, exposure definition, follow-up, PICO elements)
4. Strengths of the study
  • Design features (prospective, blinded, adequate power, validated instruments)
  • Generalizability
5. Limitations (essential - do not hide them)
  • Every study has limitations; address them honestly: sample size, selection bias, recall bias, short follow-up, single-center design, etc.
  • Acknowledge what your study cannot conclude
6. Clinical implications
  • What does this mean for practice? Is the finding ready to change clinical management?
7. Future research directions
  • What questions remain unanswered? What studies are needed next?
Common mistakes in Discussion:
  • Repeating numbers from Results
  • Overclaiming causality from observational data
  • Ignoring contradictory evidence
  • Omitting limitations

Standard Reference Formats

Vancouver style (most common in medical journals - BMJ, Lancet, most Indian journals):
  • References numbered sequentially in order of appearance in text
  • Format: Author(s). Title. Journal. Year;Volume(Issue):Pages.
  • Example: Sharma M, Gupta R. Outcome of laparoscopic cholecystectomy in acute cholecystitis. Indian J Surg. 2023;85(3):412-418.
APA style (used in psychological and some public health journals):
  • Author(s). (Year). Title. Journal, Volume(Issue), Pages. DOI
  • In-text citation: (Sharma & Gupta, 2023)
AMA style (American Medical Association - similar to Vancouver):
  • Superscript numbers in text, references in numbered list
ICMJE (International Committee of Medical Journal Editors) recommends Vancouver format - most Indian state conference abstracts and journals follow this.

Reference Management Software

SoftwareCostKey Feature
ZoteroFreeBrowser plugin, auto-extracts metadata, Word/Google Docs integration
MendeleyFreePDF organiser, annotation, collaboration
EndNotePaid (institutional license)Industry standard, most powerful
PapersPaidClean interface, PDF management
JabRefFreeBibTeX-based, good for LaTeX users
For the conference context: Zotero and Mendeley are recommended - both are free, have browser plugins that capture references from PubMed with one click, and insert formatted citations directly into Microsoft Word. You can switch citation styles (Vancouver to APA) with a single click.
Other useful writing aids:
  • Grammarly - grammar and writing clarity
  • Turnitin / iThenticate - plagiarism detection (most journals require <15-20% similarity)
  • EQUATOR Network (equator-network.org) - reporting guidelines (CONSORT for RCTs, STROBE for observational, PRISMA for systematic reviews, CARE for case reports)
  • Rayyan - free web tool for systematic review screening

Quick Reference Summary Card for the Conference

DomainKey Takeaway
Research questionUse PICO; identify the gap; define H₀ and H₁
Regulatory approvalsIEC approval + CTRI registration are non-negotiable
Study designChoose design to match the question; RCT for efficacy, cohort for prognosis
RandomisationProtects against unknown confounders; use block/stratified for small studies
BlindingPrevents performance and detection bias; allocation concealment prevents selection bias at enrollment
ConfoundersControl at design (randomise/match) or analysis (regression, propensity score)
Sample sizeCalculate before you start; need α, β, effect size, baseline rate
StatisticsMatch the test to the variable type and distribution
ResultsPresent without interpretation; use tables and figures appropriately
DiscussionSummary → Interpretation → Literature comparison → Strengths → Limitations → Implications
ReferencesVancouver format for most medical journals; use Zotero/Mendeley for management

Sources: Goldman-Cecil Medicine (Confounding & Statistical Approaches); Creasy & Resnik's Maternal-Fetal Medicine (Sample Size & Power); Smith and Tanagho's General Urology (PICO framework); ICMR National Ethical Guidelines 2017; ICMJE guidelines; EQUATOR Network reporting standards

Compile everything into the word document

Reading File
Running Command

ls /home/daytona/workspace/ && ls /home/daytona/skills/docx/

Running Command

mkdir -p /home/daytona/workspace/research-methodology && ls /home/daytona/worksp…

Writing File

~/research-methodology/create_doc.js

const {
  Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
  HeadingLevel, AlignmentType, BorderStyle, WidthType, ShadingType,
  VerticalAlign, PageNumber, Header, Footer, PageBreak,
  TableOfContents, UnderlineType
} = require('docx');
const fs = require('fs');

// ─── Color palette ───────────────────────────────────────────────────────────
const DARK_BLUE   = "1F3864";
const MID_BLUE    = "2E74B5";
const LIGHT_BLUE  = "D6E4F0";
const ACCENT      = "C00000";
const TABLE_HDR   = "2E74B5";
const TABLE_ALT   = "EBF3FB";
const WHITE       = "FFFFFF";
const DARK_GRAY   = "404040";
const LIGHT_GRAY  = "F5F5F5";

// ─── Helper: horizontal rule ─────────────────────────────────────────────────
function hrRule() {
  return new Paragraph({
    border: { bottom: { color: MID_BLUE, space: 1, style: BorderStyle.SINGLE, size: 12 } },
    spacing: { after: 120 },
  });
}

// ─── Helper: styled heading 1 ────────────────────────────────────────────────
function h1(text) {
  return new Paragraph({
    heading: HeadingLevel.HEADING_1,
    spacing: { before: 400, after: 120 },
    children: [new TextRun({ text, bold: true, color: DARK_BLUE, size: 28 })],
  });
}

// ─── Helper: styled heading 2 ────────────────────────────────────────────────
function h2(text) {
  return new Paragraph({
    heading: HeadingLevel.HEADING_2,
    spacing: { before: 280, after: 80 },
    children: [new TextRun({ text, bold: true, color: MID_BLUE, size: 24 })],
  });
}

// ─── Helper: styled heading 3 ────────────────────────────────────────────────
function h3(text) {
  return new Paragraph({
    heading: HeadingLevel.HEADING_3,
    spacing: { before: 200, after: 60 },
    children: [new TextRun({ text, bold: true, color: ACCENT, size: 22 })],
  });
}

// ─── Helper: normal paragraph ────────────────────────────────────────────────
function p(text, opts = {}) {
  return new Paragraph({
    spacing: { after: 100 },
    children: [new TextRun({ text, size: 20, color: DARK_GRAY, ...opts })],
  });
}

// ─── Helper: bold + normal inline ────────────────────────────────────────────
function pMix(segments) {
  return new Paragraph({
    spacing: { after: 100 },
    children: segments.map(([txt, bold]) =>
      new TextRun({ text: txt, size: 20, color: DARK_GRAY, bold: !!bold })
    ),
  });
}

// ─── Helper: bullet ──────────────────────────────────────────────────────────
function bullet(text, level = 0) {
  return new Paragraph({
    bullet: { level },
    spacing: { after: 60 },
    children: [new TextRun({ text, size: 20, color: DARK_GRAY })],
  });
}

// ─── Helper: bullet with bold prefix ─────────────────────────────────────────
function bulletBold(boldPart, rest) {
  return new Paragraph({
    bullet: { level: 0 },
    spacing: { after: 60 },
    children: [
      new TextRun({ text: boldPart, bold: true, size: 20, color: DARK_GRAY }),
      new TextRun({ text: rest, size: 20, color: DARK_GRAY }),
    ],
  });
}

// ─── Helper: numbered list ────────────────────────────────────────────────────
function numbered(text, num) {
  return new Paragraph({
    numbering: { reference: "my-numbering", level: 0 },
    spacing: { after: 60 },
    children: [new TextRun({ text, size: 20, color: DARK_GRAY })],
  });
}

// ─── Helper: shaded info box paragraph ───────────────────────────────────────
function infoBox(text) {
  return new Paragraph({
    shading: { type: ShadingType.SOLID, color: LIGHT_BLUE, fill: LIGHT_BLUE },
    spacing: { before: 80, after: 80 },
    indent: { left: 360, right: 360 },
    children: [new TextRun({ text, size: 20, color: DARK_BLUE, italics: true })],
  });
}

// ─── Helper: spacer ──────────────────────────────────────────────────────────
function spacer(pts = 120) {
  return new Paragraph({ spacing: { after: pts }, children: [new TextRun("")] });
}

// ─── Helper: page break ──────────────────────────────────────────────────────
function pageBreak() {
  return new Paragraph({ children: [new TextRun({ break: 1 })] });
}

// ─── Helper: simple table ────────────────────────────────────────────────────
function makeTable(headers, rows, colWidths) {
  const totalWidth = colWidths.reduce((a, b) => a + b, 0);
  const headerRow = new TableRow({
    tableHeader: true,
    children: headers.map((h, i) =>
      new TableCell({
        width: { size: colWidths[i], type: WidthType.DXA },
        shading: { type: ShadingType.SOLID, color: TABLE_HDR, fill: TABLE_HDR },
        verticalAlign: VerticalAlign.CENTER,
        children: [
          new Paragraph({
            alignment: AlignmentType.CENTER,
            children: [new TextRun({ text: h, bold: true, color: WHITE, size: 18 })],
          }),
        ],
      })
    ),
  });

  const dataRows = rows.map((row, ri) =>
    new TableRow({
      children: row.map((cell, ci) =>
        new TableCell({
          width: { size: colWidths[ci], type: WidthType.DXA },
          shading: ri % 2 === 0
            ? { type: ShadingType.SOLID, color: WHITE, fill: WHITE }
            : { type: ShadingType.SOLID, color: TABLE_ALT, fill: TABLE_ALT },
          children: [
            new Paragraph({
              children: [new TextRun({ text: cell, size: 18, color: DARK_GRAY })],
              spacing: { before: 40, after: 40 },
              indent: { left: 80 },
            }),
          ],
        })
      ),
    })
  );

  return new Table({
    width: { size: totalWidth, type: WidthType.DXA },
    rows: [headerRow, ...dataRows],
  });
}

// ─────────────────────────────────────────────────────────────────────────────
//  DOCUMENT CONTENT
// ─────────────────────────────────────────────────────────────────────────────

const children = [

  // ── COVER ──────────────────────────────────────────────────────────────────
  new Paragraph({
    alignment: AlignmentType.CENTER,
    spacing: { before: 1200, after: 200 },
    children: [new TextRun({ text: "RESEARCH METHODOLOGY", bold: true, size: 52, color: DARK_BLUE })],
  }),
  new Paragraph({
    alignment: AlignmentType.CENTER,
    spacing: { after: 120 },
    children: [new TextRun({ text: "A Comprehensive Panel Reference", size: 28, color: MID_BLUE, italics: true })],
  }),
  new Paragraph({
    alignment: AlignmentType.CENTER,
    spacing: { after: 120 },
    children: [new TextRun({ text: "State Conference — Panel Discussion", size: 24, color: DARK_GRAY, bold: true })],
  }),
  new Paragraph({
    alignment: AlignmentType.CENTER,
    spacing: { after: 800 },
    children: [new TextRun({ text: "July 2026", size: 22, color: DARK_GRAY })],
  }),
  hrRule(),
  new Paragraph({
    alignment: AlignmentType.CENTER,
    spacing: { before: 400, after: 200 },
    children: [new TextRun({ text: "Topics Covered", bold: true, size: 24, color: DARK_BLUE })],
  }),
  bullet("1.  Searching for a Research Topic & Framing a Research Question / Hypothesis"),
  bullet("2.  Regulatory Approvals Required Before Conduct of Research"),
  bullet("3.  Types of Study Design — Randomisation, Blinding, Allocation Concealment"),
  bullet("4.  Confounders, Bias & Sample Size Estimation"),
  bullet("5.  Data Presentation in Results & Common Statistical Tests"),
  bullet("6.  Discussion Section, Reference Format & Software Tools"),
  pageBreak(),

  // ══════════════════════════════════════════════════════════════════════
  // SECTION 1
  // ══════════════════════════════════════════════════════════════════════
  h1("1.  Searching for a Research Topic & Framing a Research Question / Hypothesis"),
  hrRule(),

  h2("1.1  Where to Begin"),
  p("A research idea typically emerges from one of four sources:"),
  bulletBold("Clinical observation – ", "an unexpected finding, an unresolved problem, or a common question that lacks a definitive answer in your practice."),
  bulletBold("Literature review – ", "reading current journals, systematic reviews, and meta-analyses to identify knowledge gaps."),
  bulletBold("Audit / quality data – ", "patterns in your institution's outcome data that raise questions about best practice."),
  bulletBold("Conference presentations – ", "topics flagged as 'evidence still lacking' or 'future research needed.'"),
  spacer(),

  h2("1.2  Conducting a Literature Search"),
  p("Use structured databases:"),
  bulletBold("PubMed / MEDLINE – ", "the gold standard for biomedical literature (free, comprehensive)."),
  bulletBold("EMBASE, Cochrane Library, Scopus, Web of Science – ", "for broader and multi-database searches."),
  bulletBold("Google Scholar – ", "useful for grey literature and citation tracking."),
  spacer(),
  h3("Search Strategy Tips"),
  bullet("Use MeSH (Medical Subject Headings) terms in PubMed rather than free text alone."),
  bullet("Use Boolean operators: AND (narrows results), OR (broadens), NOT (excludes)."),
  bullet("Apply filters: date range, study type, language, age group."),
  bullet("Use the 'similar articles' and 'cited by' features to find related work."),
  bullet("Maintain a PRISMA-style log of your search process for reproducibility."),
  spacer(),

  h2("1.3  Framing the Research Question — The PICO Framework"),
  infoBox("\"For any clinical research question, regardless of the study design, it is useful to define the population, intervention (or exposure), control (or comparison) group, and outcome. Sometimes this is referred to by the acronym PICO.\" — Smith and Tanagho's General Urology, 19th Edition"),
  spacer(),
  makeTable(
    ["Element", "Meaning", "Example"],
    [
      ["P — Population", "Who are the subjects?", "Adults with type 2 diabetes"],
      ["I — Intervention / Exposure", "What is being tested?", "Metformin therapy"],
      ["C — Comparison / Control", "What is the comparator?", "Lifestyle modification alone"],
      ["O — Outcome", "What will you measure?", "HbA1c reduction at 6 months"],
    ],
    [1800, 2400, 3000]
  ),
  spacer(),

  h2("1.4  Formulating the Hypothesis"),
  bulletBold("Null hypothesis (H\u2080): ", "States no difference or no association — e.g., 'There is no significant difference in HbA1c reduction between metformin and lifestyle modification.'"),
  bulletBold("Alternate hypothesis (H\u2081): ", "States the expected difference or association exists."),
  bulletBold("One-tailed vs. two-tailed: ", "Use two-tailed unless you have strong prior evidence about the direction of effect."),
  spacer(),
  p("A good hypothesis must be:"),
  bullet("Specific and clearly worded"),
  bullet("Testable and measurable"),
  bullet("Grounded in existing evidence"),
  bullet("Answerable within a feasible study design"),
  spacer(),
  infoBox("Important: Slight differences in how PICO components are defined can change the hypothesis being tested. Trials that appear to test the same question may actually test different questions and therefore reach different conclusions — a critical lesson when interpreting conflicting literature."),
  pageBreak(),

  // ══════════════════════════════════════════════════════════════════════
  // SECTION 2
  // ══════════════════════════════════════════════════════════════════════
  h1("2.  Regulatory Approvals Required Before Conduct of Research"),
  hrRule(),

  h2("2.1  The Core Approvals"),

  h3("1. Institutional Ethics Committee (IEC) / Institutional Review Board (IRB)"),
  bullet("Every research study involving human subjects, their data, or biological material requires IEC approval."),
  bullet("Governed in India by the ICMR National Ethical Guidelines for Biomedical and Health Research Involving Human Participants (2017) and CDSCO guidelines."),
  bullet("The committee reviews: scientific merit, risk-benefit ratio, informed consent process, privacy safeguards, and vulnerability of the study population."),

  h3("2. Informed Consent"),
  bullet("Mandatory for all participants (or legal guardians for minors / incapacitated subjects)."),
  bullet("Must be in the local language, written, voluntary, and obtained without coercion."),
  bullet("Waiver of consent is only permissible for certain retrospective studies or emergency research, with specific IEC justification."),

  h3("3. CDSCO (Central Drugs Standard Control Organisation) Approval"),
  bullet("Required specifically for drug trials, device trials, and new interventional studies."),
  bullet("Works in conjunction with the Indian Drugs and Cosmetics Act."),

  h3("4. CTRI — Clinical Trials Registry India"),
  bullet("Mandatory prospective registration of all clinical trials BEFORE enrollment of the first participant."),
  bullet("Required by ICMR, CDSCO, and most peer-reviewed journals (ICMJE requirement)."),
  bullet("Website: ctri.nic.in"),

  h3("5. Institutional / Hospital Administrative Approval"),
  bullet("Permission from the hospital superintendent or research office for access to records, facilities, and staff support."),

  h3("6. Data Safety Monitoring Board (DSMB)"),
  bullet("Required for larger randomised trials."),
  bullet("An independent board that monitors interim data for safety and can recommend early stopping of a trial."),
  spacer(),

  h2("2.2  Why Do We Need These Approvals?"),
  p("These safeguards exist for four core reasons:"),
  bulletBold("Protection of participants – ", "following the legacy of the Nuremberg Code (1947), Declaration of Helsinki, and Belmont Report, which established that research must minimise risk and obtain voluntary consent."),
  bulletBold("Scientific integrity – ", "IEC review weeds out poorly designed studies that impose participant burden without generating valid knowledge."),
  bulletBold("Legal protection – ", "researchers and institutions are indemnified against allegations of unethical conduct when approvals are in place."),
  bulletBold("Publishability – ", "journals require an IEC approval number and CTRI registration number as a condition of manuscript acceptance."),
  pageBreak(),

  // ══════════════════════════════════════════════════════════════════════
  // SECTION 3
  // ══════════════════════════════════════════════════════════════════════
  h1("3.  Types of Study Design — Randomisation, Blinding & Allocation Concealment"),
  hrRule(),

  h2("3.1  The Evidence Hierarchy"),
  makeTable(
    ["Level", "Study Type", "Strength"],
    [
      ["1 (Highest)", "Systematic Review / Meta-Analysis", "Pooled evidence from multiple RCTs"],
      ["2", "Randomised Controlled Trial (RCT)", "Gold standard for causality"],
      ["3", "Cohort Study (Prospective)", "Good for incidence and prognosis"],
      ["4", "Case-Control Study", "Good for rare diseases"],
      ["5", "Cross-Sectional Study", "Prevalence; cannot establish causality"],
      ["6", "Case Series / Case Reports", "Hypothesis generating only"],
      ["7 (Lowest)", "Expert Opinion / Editorial", "Weakest evidence"],
    ],
    [800, 2800, 3600]
  ),
  spacer(),

  h2("3.2  Observational Studies"),
  makeTable(
    ["Design", "Direction", "Key Feature", "Best Used For"],
    [
      ["Cross-sectional", "Snapshot in time", "Prevalence; cheap and fast", "Prevalence studies, screening programs"],
      ["Case-control", "Backward (retrospective)", "Compares cases vs. controls for past exposure", "Rare diseases, quick hypothesis generation"],
      ["Cohort (prospective)", "Forward", "Follow exposed vs. unexposed over time", "Incidence; establishing causality"],
      ["Cohort (retrospective)", "Backward using records", "Uses historical data", "When follow-up is already complete in records"],
    ],
    [1500, 1400, 2400, 2000]
  ),
  spacer(),

  h2("3.3  Interventional Studies"),
  bulletBold("Randomised Controlled Trial (RCT): ", "Participants randomly assigned to intervention or control. The gold standard for establishing causality and efficacy."),
  bulletBold("Non-randomised / Quasi-experimental: ", "Pre-post designs, before-after studies without true randomisation. Lower internal validity."),
  spacer(),

  h2("3.4  Randomisation"),
  p("Randomisation ensures that known AND unknown confounders are distributed equally between study arms by chance — it is the defining feature that separates an RCT from an observational study."),
  spacer(),
  makeTable(
    ["Method", "How It Works", "Best For"],
    [
      ["Simple randomisation", "Coin flip / random number generator", "Large samples (>200 participants)"],
      ["Block randomisation", "Randomise in fixed block sizes to ensure equal group sizes at intervals", "Small to medium studies"],
      ["Stratified randomisation", "Randomise within subgroups (e.g., by sex, disease severity)", "When balance on key variables is critical"],
      ["Cluster randomisation", "Entire groups (villages, hospitals) are randomised", "Community-level interventions"],
    ],
    [1800, 2800, 2400]
  ),
  spacer(),

  h2("3.5  Blinding (Masking)"),
  p("Blinding prevents knowledge of treatment assignment from influencing outcomes, assessments, or participant behavior."),
  spacer(),
  makeTable(
    ["Level", "Who is Blinded", "Bias Prevented"],
    [
      ["Single-blind", "Participant only", "Placebo effect, reporting bias"],
      ["Double-blind", "Participant + investigator", "Performance bias, detection bias"],
      ["Triple-blind", "Participant + investigator + outcome assessors/statisticians", "Assessment bias"],
      ["Open-label", "No blinding", "Used when blinding is not feasible (e.g., surgical trials)"],
    ],
    [1600, 2600, 3000]
  ),
  spacer(),

  h2("3.6  Allocation Concealment"),
  p("Allocation concealment means the investigator enrolling a participant CANNOT predict or know what group the next participant will be assigned to — preventing selection bias at the point of enrollment."),
  spacer(),
  h3("Common Methods"),
  bulletBold("Sealed opaque envelopes – ", "simple and acceptable if done properly."),
  bulletBold("Central randomisation – ", "remote telephone or web-based system at an independent centre (most robust method)."),
  bulletBold("Pharmacy-controlled allocation – ", "pharmacist holds the randomisation code."),
  spacer(),
  infoBox("Key Distinction: Blinding protects against bias AFTER enrollment. Allocation concealment protects against bias AT THE POINT OF enrollment. A study can have allocation concealment but no blinding (e.g., open-label surgery trial), and vice versa."),
  pageBreak(),

  // ══════════════════════════════════════════════════════════════════════
  // SECTION 4
  // ══════════════════════════════════════════════════════════════════════
  h1("4.  Confounders, Bias & Sample Size Estimation"),
  hrRule(),

  h2("4.1  Confounders"),
  infoBox("\"If a covariate is related to both the outcome and to the exposure or risk factor being studied, and if it is unequally distributed between the groups being compared, it becomes a confounder.\" — Goldman-Cecil Medicine"),
  spacer(),
  p("Classic example: In a study of obesity and heart disease, age is a confounder — it is related to both obesity and heart disease. If obese subjects are older, the observed difference in heart disease may be due to age rather than obesity itself."),
  spacer(),
  h3("Methods to Control Confounding"),
  p("At the design stage:"),
  bullet("Randomisation (distributes confounders by chance)"),
  bullet("Restriction (enroll only one level of the confounder, e.g., only non-smokers)"),
  bullet("Matching (in case-control studies — match controls to cases on key confounders)"),
  spacer(),
  p("At the analysis stage:"),
  bullet("Stratification (Mantel-Haenszel method)"),
  bullet("Multivariable regression (logistic, linear, Cox)"),
  bullet("Propensity score matching"),
  spacer(),

  h2("4.2  Bias"),
  p("Bias is a systematic error that leads to results that consistently deviate from the true value. Unlike random error, increasing sample size does NOT reduce bias."),
  spacer(),
  makeTable(
    ["Type of Bias", "Definition", "Common in"],
    [
      ["Selection bias", "Systematic difference in who is enrolled vs. the target population", "All study types; especially surveys"],
      ["Recall bias", "Cases remember past exposures better than controls", "Case-control studies"],
      ["Observer / detection bias", "Investigator's knowledge of group assignment influences assessment", "Unblinded studies"],
      ["Attrition bias", "Differential loss to follow-up between study arms", "RCTs, cohort studies"],
      ["Hawthorne effect", "Subjects change behaviour because they know they are being observed", "Observational studies"],
      ["Publication bias", "Positive studies more likely to be published", "Meta-analyses (detected by funnel plots)"],
    ],
    [1600, 2800, 2400]
  ),
  spacer(),
  infoBox("Confounding vs. Bias: Confounding is a real phenomenon (a third variable genuinely explains the association). Bias is an error in study conduct. Both can be minimised by good study design."),
  spacer(),

  h2("4.3  Sample Size Estimation"),
  infoBox("\"Sample size estimates should be performed before any observational or interventional study.\" — Creasy & Resnik's Maternal-Fetal Medicine, Principles and Practice"),
  spacer(),
  p("An underpowered study produces false-negative results (Type II error) — a waste of resources and participant burden."),
  spacer(),
  h3("Key Parameters Needed"),
  makeTable(
    ["Parameter", "Meaning", "Conventional Value"],
    [
      ["α (Type I error)", "Probability of a false positive", "0.05 (5%)"],
      ["β (Type II error)", "Probability of a false negative", "0.10 to 0.20"],
      ["Power (1 - β)", "Probability of detecting a true effect when it exists", "80% to 90%"],
      ["Effect size", "Minimum clinically meaningful difference", "Derived from literature or pilot data"],
      ["Baseline rate / SD", "Prevalence of outcome or SD of the variable in question", "Derived from literature or pilot data"],
    ],
    [1600, 2800, 2400]
  ),
  spacer(),
  h3("Study-Specific Requirements"),
  bulletBold("RCT / Cohort study: ", "Need α, β, baseline incidence of outcome, and minimum detectable relative risk."),
  bulletBold("Case-control study: ", "Need α, β, prevalence of exposure in controls, ratio of controls to cases, and minimum detectable odds ratio."),
  spacer(),
  h3("Free Software Tools"),
  bulletBold("OpenEpi – ", "web-based, free (www.openepi.com)"),
  bulletBold("G*Power – ", "desktop application, free; widely used for power analysis"),
  bulletBold("EpiInfo – ", "CDC tool, free; useful for epidemiological studies"),
  bulletBold("nQuery, PASS – ", "commercial tools with advanced features"),
  pageBreak(),

  // ══════════════════════════════════════════════════════════════════════
  // SECTION 5
  // ══════════════════════════════════════════════════════════════════════
  h1("5.  Data Presentation in Results & Common Statistical Tests"),
  hrRule(),

  h2("5.1  Principles of the Results Section"),
  bullet("Present findings without interpretation — interpretation belongs in the Discussion."),
  bullet("Follow the same order as your Methods section."),
  bullet("Report all primary and secondary outcomes, including negative results."),
  bullet("Use CONSORT flow diagram for RCTs; follow STROBE checklist for observational studies."),
  spacer(),

  h2("5.2  Types of Variables and How to Present Them"),
  makeTable(
    ["Variable Type", "Examples", "Summary Measure", "Best Display"],
    [
      ["Continuous (normal distribution)", "Age, BP, weight, HbA1c", "Mean ± SD", "Box plot, histogram"],
      ["Continuous (skewed distribution)", "Length of stay, cost, CRP", "Median (IQR)", "Box plot"],
      ["Categorical — nominal", "Sex, blood group, diagnosis", "Frequency (%)", "Bar chart, pie chart"],
      ["Categorical — ordinal", "Pain score, NYHA class, grade", "Median or frequency", "Bar chart"],
      ["Time-to-event / survival", "Time to relapse, death", "Median survival", "Kaplan-Meier curve"],
    ],
    [1600, 1800, 1800, 2000]
  ),
  spacer(),
  h3("Tables and Figures — Best Practices"),
  bulletBold("Tables: ", "use for exact numbers; clearly label all rows and columns; footnote all abbreviations."),
  bulletBold("Figures: ", "use for trends, comparisons, and survival curves; always include error bars (SD or 95% CI)."),
  bulletBold("Avoid: ", "3D pie charts and chart junk; do not repeat in the text what the table already shows."),
  spacer(),
  h3("Baseline Characteristics (Table 1)"),
  p("Present demographic and clinical characteristics stratified by study groups. Use mean ± SD or median (IQR) as appropriate. Note: CONSORT guidelines recommend against including p-values for baseline comparisons in RCTs, since any differences are purely by chance."),
  spacer(),

  h2("5.3  Choosing the Right Statistical Test"),
  h3("Comparing Two Groups"),
  makeTable(
    ["Situation", "Parametric Test", "Non-parametric Equivalent"],
    [
      ["Continuous outcome, 2 independent groups", "Independent samples t-test", "Mann-Whitney U test"],
      ["Continuous outcome, paired / matched groups", "Paired t-test", "Wilcoxon signed-rank test"],
      ["Categorical outcome (2×2 table)", "Chi-square test", "Fisher's exact test (for small samples, expected cell <5)"],
    ],
    [2400, 1900, 2900]
  ),
  spacer(),
  h3("Comparing Three or More Groups"),
  makeTable(
    ["Situation", "Parametric", "Non-parametric"],
    [
      ["Continuous, 3+ independent groups", "One-way ANOVA", "Kruskal-Wallis test"],
      ["Continuous, repeated measures", "Repeated-measures ANOVA", "Friedman test"],
      ["Post-hoc multiple comparisons", "Tukey's / Bonferroni correction", "Dunn's test"],
    ],
    [2400, 1900, 2900]
  ),
  spacer(),
  h3("Association and Prediction"),
  makeTable(
    ["Purpose", "Test / Method"],
    [
      ["Correlation — continuous variables", "Pearson's r (parametric) / Spearman's ρ (non-parametric)"],
      ["Predicting a continuous outcome", "Linear regression"],
      ["Predicting a binary outcome", "Logistic regression (reports Odds Ratio + 95% CI)"],
      ["Survival / time-to-event data", "Kaplan-Meier curves + Log-rank test; Cox proportional hazards"],
      ["Agreement between two measurement methods", "Bland-Altman plot; Intraclass Correlation Coefficient (ICC)"],
      ["Diagnostic accuracy", "Sensitivity, specificity, ROC curve, AUC"],
    ],
    [2800, 4400]
  ),
  spacer(),
  h3("How to Choose a Test — Three Questions"),
  bulletBold("1. ", "What type is my outcome variable? (continuous, categorical, survival/time-to-event)"),
  bulletBold("2. ", "Are the groups independent or paired / matched?"),
  bulletBold("3. ", "Is the data normally distributed? (use Shapiro-Wilk test and histogram to check)"),
  spacer(),
  infoBox("Statistical vs. Clinical Significance: A statistically significant result (p < 0.05) is not necessarily clinically meaningful. Always report 95% confidence intervals and effect sizes (risk ratio, odds ratio, mean difference, NNT) alongside p-values."),
  pageBreak(),

  // ══════════════════════════════════════════════════════════════════════
  // SECTION 6
  // ══════════════════════════════════════════════════════════════════════
  h1("6.  Discussion Section, Reference Format & Software Tools"),
  hrRule(),

  h2("6.1  Structure of the Discussion"),
  p("A well-written discussion follows this logical flow:"),
  spacer(),
  makeTable(
    ["Step", "Content", "Length / Emphasis"],
    [
      ["1. Summary of key findings", "State what your study found in plain language, answering the research question posed. No raw numbers here.", "1-2 sentences only"],
      ["2. Interpretation", "Explain WHY you found what you found — biological plausibility, mechanism.", "2-4 paragraphs"],
      ["3. Comparison with literature", "Compare with previously published studies — both supporting and contradicting. Explain discrepancies.", "Major portion"],
      ["4. Strengths", "Design features: prospective, blinded, adequate power, validated instruments, generalizability.", "Brief"],
      ["5. Limitations", "Every study has limitations. Address honestly: sample size, selection bias, recall bias, short follow-up, single-centre.", "Mandatory"],
      ["6. Clinical implications", "What does this mean for practice? Is the finding ready to change clinical management?", "1-2 paragraphs"],
      ["7. Future research", "What questions remain? What studies are needed next?", "1 paragraph"],
    ],
    [1400, 3600, 2200]
  ),
  spacer(),
  h3("Common Mistakes to Avoid"),
  bullet("Repeating numbers from the Results section verbatim."),
  bullet("Overclaiming causality from observational data."),
  bullet("Ignoring contradictory evidence in the literature."),
  bullet("Omitting or minimising the Limitations subsection."),
  spacer(),

  h2("6.2  Standard Reference Formats"),

  h3("Vancouver Style (Most Common in Medical Journals)"),
  p("Used by: BMJ, Lancet, most Indian journals, and most state conference proceedings."),
  bullet("References are numbered sequentially in order of first appearance in the text."),
  bullet("Numbers appear as superscripts or in square brackets in the text."),
  p("Format: Author(s). Title. Journal Abbreviation. Year;Volume(Issue):Pages."),
  infoBox("Example: Sharma M, Gupta R. Outcome of laparoscopic cholecystectomy in acute cholecystitis. Indian J Surg. 2023;85(3):412-418."),
  spacer(),

  h3("APA Style (Psychological and some Public Health Journals)"),
  p("Format: Author(s). (Year). Title. Journal, Volume(Issue), Pages. DOI"),
  bullet("In-text citation: (Sharma & Gupta, 2023)"),
  spacer(),

  h3("AMA Style (American Medical Association)"),
  bullet("Superscript numbers in text; references in numbered list at end."),
  bullet("Similar in structure to Vancouver."),
  spacer(),
  infoBox("ICMJE (International Committee of Medical Journal Editors) recommends Vancouver format. Most Indian state conference abstracts and medical journals follow this standard."),
  spacer(),

  h2("6.3  Reference Management Software"),
  makeTable(
    ["Software", "Cost", "Key Feature", "Best For"],
    [
      ["Zotero", "Free", "Browser plugin auto-captures metadata; Word/Google Docs integration", "Recommended for beginners"],
      ["Mendeley", "Free", "PDF organiser, annotation, collaboration features", "PDF-heavy workflows"],
      ["EndNote", "Paid (institutional license)", "Industry standard, most powerful, largest style library", "Experienced researchers"],
      ["Papers", "Paid", "Clean interface, excellent PDF management", "Mac users"],
      ["JabRef", "Free", "BibTeX-based, open source", "LaTeX writers"],
    ],
    [1200, 1000, 3000, 2000]
  ),
  spacer(),
  p("For the conference context, Zotero and Mendeley are strongly recommended — both are free, have one-click capture from PubMed, and can insert formatted citations directly into Microsoft Word. Citation style (e.g., Vancouver to APA) can be switched with a single click."),
  spacer(),

  h2("6.4  Other Useful Writing and Research Tools"),
  makeTable(
    ["Tool", "Purpose"],
    [
      ["Grammarly", "Grammar checking and writing clarity improvement"],
      ["Turnitin / iThenticate", "Plagiarism detection (most journals require <15-20% similarity)"],
      ["EQUATOR Network (equator-network.org)", "Reporting guidelines: CONSORT (RCTs), STROBE (observational), PRISMA (systematic reviews), CARE (case reports)"],
      ["Rayyan (rayyan.ai)", "Free web tool for systematic review title and abstract screening"],
      ["CTRI (ctri.nic.in)", "Clinical Trials Registry India — mandatory registration"],
      ["OpenEpi (openepi.com)", "Free sample size and power calculation"],
    ],
    [2400, 4800]
  ),
  pageBreak(),

  // ══════════════════════════════════════════════════════════════════════
  // QUICK REFERENCE SUMMARY
  // ══════════════════════════════════════════════════════════════════════
  h1("Quick Reference Summary Card"),
  hrRule(),
  makeTable(
    ["Domain", "Key Takeaway"],
    [
      ["Research question", "Use PICO framework; identify the knowledge gap; define H\u2080 and H\u2081 clearly."],
      ["Regulatory approvals", "IEC approval + CTRI registration are non-negotiable before any study begins."],
      ["Study design", "Match the design to the question; RCT for efficacy, cohort for prognosis, case-control for rare disease."],
      ["Randomisation", "Distributes known and unknown confounders equally; use block/stratified for small studies."],
      ["Blinding & allocation concealment", "Blinding: after enrollment (bias in assessment). Allocation concealment: at enrollment (selection bias)."],
      ["Confounders", "Control at design stage (randomise, match) or analysis stage (regression, propensity score)."],
      ["Sample size", "Calculate before you start; need \u03b1, \u03b2, effect size, and baseline rate."],
      ["Statistical tests", "Match the test to variable type and distribution; always report 95% CI alongside p-value."],
      ["Results presentation", "Present without interpretation; use tables for exact values, figures for trends."],
      ["Discussion", "Summary \u2192 Interpretation \u2192 Literature comparison \u2192 Strengths \u2192 Limitations \u2192 Implications \u2192 Future work."],
      ["References", "Vancouver format for most medical journals; use Zotero or Mendeley for easy management."],
    ],
    [2400, 4800]
  ),
  spacer(),
  hrRule(),
  new Paragraph({
    alignment: AlignmentType.CENTER,
    spacing: { before: 200 },
    children: [
      new TextRun({
        text: "Sources: Goldman-Cecil Medicine | Creasy & Resnik's Maternal-Fetal Medicine | Smith and Tanagho's General Urology | ICMR National Ethical Guidelines 2017 | ICMJE Guidelines | EQUATOR Network",
        size: 16,
        italics: true,
        color: "888888",
      }),
    ],
  }),
];

// ─── NUMBER DEFINITIONS ───────────────────────────────────────────────────────
const doc = new Document({
  numbering: {
    config: [
      {
        reference: "my-numbering",
        levels: [
          {
            level: 0,
            format: "decimal",
            text: "%1.",
            alignment: AlignmentType.LEFT,
            style: {
              paragraph: { indent: { left: 360, hanging: 260 } },
            },
          },
        ],
      },
    ],
  },
  styles: {
    default: {
      document: {
        run: { font: "Calibri", size: 20, color: DARK_GRAY },
        paragraph: { spacing: { line: 276 } },
      },
    },
    paragraphStyles: [
      {
        id: "Heading1",
        name: "Heading 1",
        basedOn: "Normal",
        next: "Normal",
        run: { bold: true, size: 28, color: DARK_BLUE, font: "Calibri Light" },
        paragraph: { spacing: { before: 400, after: 120 } },
      },
      {
        id: "Heading2",
        name: "Heading 2",
        basedOn: "Normal",
        next: "Normal",
        run: { bold: true, size: 24, color: MID_BLUE, font: "Calibri" },
        paragraph: { spacing: { before: 280, after: 80 } },
      },
      {
        id: "Heading3",
        name: "Heading 3",
        basedOn: "Normal",
        next: "Normal",
        run: { bold: true, size: 22, color: ACCENT, font: "Calibri" },
        paragraph: { spacing: { before: 200, after: 60 } },
      },
    ],
  },
  sections: [
    {
      properties: {
        page: {
          margin: { top: 1080, bottom: 1080, left: 1080, right: 1080 },
        },
      },
      headers: {
        default: new Header({
          children: [
            new Paragraph({
              alignment: AlignmentType.RIGHT,
              children: [
                new TextRun({ text: "Research Methodology — State Conference Panel Reference", size: 16, color: "888888", italics: true }),
              ],
              border: { bottom: { color: MID_BLUE, space: 1, style: BorderStyle.SINGLE, size: 6 } },
            }),
          ],
        }),
      },
      footers: {
        default: new Footer({
          children: [
            new Paragraph({
              alignment: AlignmentType.CENTER,
              border: { top: { color: MID_BLUE, space: 1, style: BorderStyle.SINGLE, size: 6 } },
              children: [
                new TextRun({ text: "Page ", size: 16, color: "888888" }),
                new TextRun({ children: [PageNumber.CURRENT], size: 16, color: "888888" }),
                new TextRun({ text: " of ", size: 16, color: "888888" }),
                new TextRun({ children: [PageNumber.TOTAL_PAGES], size: 16, color: "888888" }),
              ],
            }),
          ],
        }),
      },
      children,
    },
  ],
});

Packer.toBuffer(doc).then(buffer => {
  fs.writeFileSync("/home/daytona/workspace/research-methodology/Research_Methodology_State_Conference.docx", buffer);
  console.log("Document created successfully.");
});
Running Command

cd /home/daytona/workspace/research-methodology && node create_doc.js 2>&1

Running Command

python3 /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/works…

Running Command

ls -lh /home/daytona/workspace/research-methodology/ && file /home/daytona/works…

Your Word document is ready for download:

Research Methodology State Conference

Word Document · DOCX

What's inside the document:
  • Cover page with conference title and list of topics
  • 6 fully structured sections matching each of your panel questions, with:
    • Colour-coded headings (navy blue for section titles, blue for subsections, red for sub-subsections)
    • Shaded info boxes for key textbook quotes (PICO, confounding, sample size)
    • 15+ formatted tables covering study design comparison, statistical test selection, reference formats, software tools, regulatory approvals, bias types, and more
    • Bullet points with bold lead-ins for clean panel readability
  • Quick Reference Summary Card on the last page - a one-table cheat sheet covering all 6 domains, useful for the panel to glance at during discussion
  • Header (title on every page) and footer (page numbers)
The document is formatted to be directly usable for your conference panel - you can print it, share it with co-panelists, or project sections during discussion.
This is a shared conversation. Sign in to Orris to start your own chat.