Submit research protocol - Cross sectional study on etiology and outcome of patients with acute hepatitis

Asking for Preferences
Searching PubMed

acute hepatitis etiology outcome adults

Reading File
Reading File
Searching PubMed

acute hepatitis etiology clinical outcomes hospitalized patients

Finding Sources
Reading File
Finding Sources
Reading File
Reading File
Running Command

mkdir -p /tmp/workspace/acute-hepatitis-protocol && ls /tmp/workspace/acute-hepatitis-protocol/

Writing File

~/acute-hepatitis-protocol/build_protocol.py

from docx import Document
from docx.shared import Pt, Inches, RGBColor
from docx.enum.text import WD_ALIGN_PARAGRAPH
from docx.oxml.ns import qn
from docx.oxml import OxmlElement
import datetime

doc = Document()

# ── Page margins ──────────────────────────────────────────────────
from docx.shared import Inches
section = doc.sections[0]
section.top_margin    = Inches(1.0)
section.bottom_margin = Inches(1.0)
section.left_margin   = Inches(1.25)
section.right_margin  = Inches(1.25)

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

# ── Helper: add a numbered section heading ────────────────────────
def section_heading(doc, number, title, level=1):
    p = doc.add_heading("", level=level)
    run = p.runs[0] if p.runs else p.add_run()
    run.text = f"{number}. {title}" if level == 1 else f"{number}  {title}"
    run.font.color.rgb = RGBColor(0x00, 0x33, 0x66)
    return p

def body(doc, text, bold=False):
    p = doc.add_paragraph(text)
    p.style = doc.styles["Normal"]
    if bold:
        for run in p.runs:
            run.bold = True
    p.paragraph_format.space_after = Pt(6)
    return p

def bullet(doc, text):
    p = doc.add_paragraph(text, style="List Bullet")
    p.style.font.size = Pt(12)
    p.paragraph_format.space_after = Pt(3)
    return p

def add_table_row(table, cells, bold=False):
    row = table.add_row()
    for i, val in enumerate(cells):
        cell = row.cells[i]
        cell.text = val
        if bold:
            for run in cell.paragraphs[0].runs:
                run.bold = True
    return row

# ══════════════════════════════════════════════════════════════════
#  TITLE PAGE
# ══════════════════════════════════════════════════════════════════
doc.add_paragraph()

title = doc.add_paragraph()
title.alignment = WD_ALIGN_PARAGRAPH.CENTER
run = title.add_run("RESEARCH PROTOCOL")
run.bold = True
run.font.size = Pt(16)
run.font.color.rgb = RGBColor(0x00, 0x33, 0x66)

doc.add_paragraph()

subtitle = doc.add_paragraph()
subtitle.alignment = WD_ALIGN_PARAGRAPH.CENTER
run2 = subtitle.add_run(
    "Cross-Sectional Study on Etiology and Outcome of Patients\n"
    "with Acute Hepatitis"
)
run2.bold = True
run2.font.size = Pt(14)

doc.add_paragraph()

for label, val in [
    ("Study Type:", "Hospital-based Cross-sectional Observational Study"),
    ("Setting:", "Tertiary Care Hospital"),
    ("Target Population:", "Adults (≥18 years)"),
    ("Protocol Version:", "1.0"),
    ("Protocol Date:", datetime.date.today().strftime("%B %d, %Y")),
]:
    p = doc.add_paragraph()
    p.alignment = WD_ALIGN_PARAGRAPH.CENTER
    r1 = p.add_run(label + "  ")
    r1.bold = True
    r1.font.size = Pt(12)
    r2 = p.add_run(val)
    r2.font.size = Pt(12)

doc.add_paragraph()

affiliations = doc.add_paragraph()
affiliations.alignment = WD_ALIGN_PARAGRAPH.CENTER
r = affiliations.add_run(
    "Department of Medicine / Gastroenterology\n"
    "[Institution Name]\n"
    "[City, Country]"
)
r.font.size = Pt(12)
r.font.color.rgb = RGBColor(0x44, 0x44, 0x44)

doc.add_page_break()

# ══════════════════════════════════════════════════════════════════
#  TABLE OF CONTENTS (static)
# ══════════════════════════════════════════════════════════════════
toc_heading = doc.add_heading("Table of Contents", level=1)
toc_heading.runs[0].font.color.rgb = RGBColor(0x00, 0x33, 0x66)

toc_items = [
    ("1.", "Background and Rationale"),
    ("2.", "Literature Review"),
    ("3.", "Aims and Objectives"),
    ("4.", "Study Design and Methodology"),
    ("5.", "Study Population"),
    ("6.", "Sample Size Calculation"),
    ("7.", "Data Collection Tools and Methods"),
    ("8.", "Study Variables"),
    ("9.", "Data Management and Analysis"),
    ("10.", "Ethical Considerations"),
    ("11.", "Limitations"),
    ("12.", "Expected Outcomes and Significance"),
    ("13.", "Budget and Timeline"),
    ("14.", "References"),
    ("15.", "Annexures"),
]
for num, item in toc_items:
    p = doc.add_paragraph()
    p.paragraph_format.space_after = Pt(4)
    r1 = p.add_run(f"{num}  {item}")
    r1.font.size = Pt(12)

doc.add_page_break()

# ══════════════════════════════════════════════════════════════════
#  SECTION 1: BACKGROUND AND RATIONALE
# ══════════════════════════════════════════════════════════════════
section_heading(doc, "1", "Background and Rationale")

body(doc,
     "Acute hepatitis refers to the sudden onset of hepatic inflammation, clinically characterized "
     "by elevated serum aminotransferases (ALT/AST), constitutional symptoms (fever, malaise, "
     "anorexia, nausea, vomiting), and in many cases jaundice. The etiology of acute hepatitis is "
     "diverse and includes viral infections (hepatitis A, B, C, D, and E viruses), drug-induced "
     "liver injury (DILI), alcoholic hepatitis, autoimmune hepatitis, ischemic hepatitis, and in a "
     "proportion of cases, indeterminate cause.")

body(doc,
     "Globally, viral hepatitis remains the most common cause of acute hepatitis. Hepatitis A and E "
     "are transmitted by the fecal-oral route and are responsible for epidemic outbreaks, particularly "
     "in regions with poor sanitation. Hepatitis B and C are blood-borne and can present as acute "
     "illness with a risk of progression to chronic liver disease, cirrhosis, and hepatocellular "
     "carcinoma. In adults with intact immune systems, only 2-5% of acute hepatitis B infections "
     "progress to chronicity, while the remainder resolve spontaneously. Acute liver failure (ALF) "
     "complicates approximately 1% of acute hepatitis B cases and carries a spontaneous survival "
     "rate of only ~20% without transplantation.")

body(doc,
     "Non-viral causes are increasingly recognized. Drug-induced liver injury accounts for nearly "
     "50% of acute liver failure cases in Western populations, with acetaminophen toxicity being the "
     "leading single agent. Alcoholic hepatitis, autoimmune hepatitis, and ischemic hepatitis "
     "collectively represent important and potentially under-diagnosed categories.")

body(doc,
     "In tertiary care settings, admitted patients often present late, with significant hepatic "
     "derangement and complications. Understanding the local etiological spectrum and clinical "
     "outcomes of acute hepatitis is essential for planning preventive strategies, guiding rational "
     "use of diagnostics, and optimizing clinical management protocols. There is limited "
     "institution-specific data from many regions, necessitating this study.")

# ══════════════════════════════════════════════════════════════════
#  SECTION 2: LITERATURE REVIEW
# ══════════════════════════════════════════════════════════════════
section_heading(doc, "2", "Literature Review")

body(doc,
     "A number of observational studies have documented the etiological profile of acute hepatitis "
     "in hospitalized patients. In Asia and Africa, viral hepatitis (particularly hepatitis A, B, "
     "and E) constitutes the majority of cases, while in Western countries, DILI, alcoholic "
     "hepatitis, and autoimmune causes predominate. In India and South Asian countries, hepatitis E "
     "is a significant cause of epidemic acute hepatitis in adults, especially pregnant women, and "
     "carries a case fatality rate of up to 20-25% in pregnancy.")

body(doc,
     "The ACG Clinical Guideline on Alcohol-Associated Liver Disease (2024) recommends structured "
     "evaluation for alcoholic etiology in all patients with acute hepatitis and an alcohol history. "
     "The diagnostic workup for acute hepatitis B has been refined, with IgM anti-HBc emerging as "
     "a key marker when HBsAg has been rapidly cleared (Sleisenger & Fordtran's, 11th ed.). "
     "Lamivudine and entecavir have been studied for acute hepatitis B, with a 2023 meta-analysis "
     "(PMID: 38005918) evaluating their role in preventing progression to ALF.")

body(doc,
     "Acute liver failure as an outcome of acute hepatitis is associated with high mortality. A 2024 "
     "review (PMID: 39033039) outlined that management of ALF includes intensive care, treatment of "
     "underlying etiology, and liver transplantation evaluation. Prognostic models such as King's "
     "College Criteria and MELD score guide transplant decisions.")

body(doc,
     "Despite this global literature, institution-specific cross-sectional data from tertiary care "
     "centers in resource-limited settings remain sparse. Such data are necessary to tailor "
     "diagnostic algorithms, vaccination programs, and therapeutic protocols to local disease burden.")

# ══════════════════════════════════════════════════════════════════
#  SECTION 3: AIMS AND OBJECTIVES
# ══════════════════════════════════════════════════════════════════
section_heading(doc, "3", "Aims and Objectives")

p = doc.add_paragraph()
r = p.add_run("3.1  Aim")
r.bold = True
r.font.size = Pt(12)

body(doc,
     "To study the etiological spectrum and clinical outcomes of patients admitted with acute "
     "hepatitis at a tertiary care hospital.")

p2 = doc.add_paragraph()
r2 = p2.add_run("3.2  Primary Objectives")
r2.bold = True
r2.font.size = Pt(12)

for obj in [
    "To determine the frequency and distribution of various etiologies of acute hepatitis in "
    "adult patients admitted to a tertiary care hospital.",
    "To assess the clinical outcomes of acute hepatitis including recovery, progression to acute "
    "liver failure, need for ICU care, and in-hospital mortality.",
]:
    bullet(doc, obj)

p3 = doc.add_paragraph()
r3 = p3.add_run("3.3  Secondary Objectives")
r3.bold = True
r3.font.size = Pt(12)

for obj in [
    "To describe the clinical, biochemical, and serological profile of patients with acute hepatitis.",
    "To identify factors associated with poor outcomes (ALF, prolonged hospitalization, death).",
    "To compare clinical and biochemical parameters across different etiological groups.",
    "To document the proportion of patients requiring specific interventions (e.g., N-acetyl cysteine, antivirals, plasmapheresis, liver transplantation referral).",
    "To estimate the in-hospital case fatality rate for each etiological category.",
]:
    bullet(doc, obj)

# ══════════════════════════════════════════════════════════════════
#  SECTION 4: STUDY DESIGN AND METHODOLOGY
# ══════════════════════════════════════════════════════════════════
section_heading(doc, "4", "Study Design and Methodology")

body(doc, "Study Design:  Hospital-based cross-sectional observational study.", bold=False)
body(doc, "Study Site:    Department of Medicine and/or Gastroenterology, [Tertiary Care Hospital Name].")
body(doc, "Study Duration: 18 months (including recruitment, data collection, and analysis).")
body(doc, "Data Collection Period: 12 months of active patient enrollment.")

# ══════════════════════════════════════════════════════════════════
#  SECTION 5: STUDY POPULATION
# ══════════════════════════════════════════════════════════════════
section_heading(doc, "5", "Study Population")

p = doc.add_paragraph()
r = p.add_run("5.1  Inclusion Criteria")
r.bold = True; r.font.size = Pt(12)

for crit in [
    "Adults aged ≥18 years.",
    "Admitted to the tertiary care hospital with a clinical diagnosis of acute hepatitis.",
    "Presence of acute elevation of serum ALT or AST >3x upper limit of normal (ULN) of "
    "recent onset (<26 weeks).",
    "At least one of: jaundice (serum bilirubin >2 mg/dL), symptoms of acute hepatitis (nausea, "
    "vomiting, right upper quadrant pain, fatigue, dark urine, pale stools), or clinical signs "
    "of acute liver injury.",
    "Willingness to provide written informed consent.",
]:
    bullet(doc, crit)

p2 = doc.add_paragraph()
r2 = p2.add_run("5.2  Exclusion Criteria")
r2.bold = True; r2.font.size = Pt(12)

for crit in [
    "Patients with established chronic liver disease (cirrhosis, chronic hepatitis B or C on "
    "treatment, non-alcoholic steatohepatitis with cirrhosis).",
    "Patients with hepatic involvement secondary to systemic malignancy (metastatic liver disease).",
    "Post-liver transplant patients.",
    "Pregnant women (to be analyzed separately in a sub-study if numbers permit).",
    "Patients who refuse consent.",
    "Incomplete data (patients discharged/transferred before baseline workup is complete).",
]:
    bullet(doc, crit)

# ══════════════════════════════════════════════════════════════════
#  SECTION 6: SAMPLE SIZE
# ══════════════════════════════════════════════════════════════════
section_heading(doc, "6", "Sample Size Calculation")

body(doc,
     "Sample size has been calculated using the formula for estimating a proportion "
     "with desired precision:")

# Formula as plain text
p = doc.add_paragraph()
p.alignment = WD_ALIGN_PARAGRAPH.CENTER
p.add_run("n = Z²  x  P(1-P) / d²").font.size = Pt(12)

body(doc,
     "Where:\n"
     "  Z = 1.96 (for 95% confidence interval)\n"
     "  P = 0.50 (assumed prevalence of viral etiology, taken as 50% for maximum sample size)\n"
     "  d = 0.10 (acceptable margin of error, 10%)\n\n"
     "  n = (1.96)² x 0.50 x 0.50 / (0.10)² = 96.04 ≈ 97\n\n"
     "Adding 10% for non-response/incomplete data: n ≈ 107\n\n"
     "Minimum sample size: 100 patients. "
     "All consecutive eligible patients admitted during the study period will be enrolled "
     "(convenience sampling) until the minimum sample size is achieved.")

# ══════════════════════════════════════════════════════════════════
#  SECTION 7: DATA COLLECTION TOOLS AND METHODS
# ══════════════════════════════════════════════════════════════════
section_heading(doc, "7", "Data Collection Tools and Methods")

body(doc,
     "A structured, pre-tested Case Record Form (CRF) will be used to collect data. "
     "Data will be collected by trained medical officers/residents from: (a) clinical interview "
     "and examination at admission, (b) patient/attendant history, and (c) review of medical "
     "records and laboratory/imaging reports during hospitalization. The CRF is attached as "
     "Annexure I.")

p = doc.add_paragraph()
r = p.add_run("7.1  Diagnostic Workup Protocol (Standard of Care)")
r.bold = True; r.font.size = Pt(12)

body(doc, "All enrolled patients will undergo the following as part of routine clinical management:")

# Table of investigations
doc.add_paragraph("Table 1: Standard Diagnostic Investigations").runs[0].bold = True

tbl = doc.add_table(rows=1, cols=2)
tbl.style = "Table Grid"
hdr = tbl.rows[0].cells
hdr[0].text = "Category"
hdr[1].text = "Investigations"
for cell in hdr:
    for run in cell.paragraphs[0].runs:
        run.bold = True

rows_data = [
    ("Basic Blood Tests",
     "CBC with differential, Blood group and Rh typing, Peripheral blood smear, "
     "Prothrombin time (PT/INR), Serum electrolytes, Renal function tests (BUN, creatinine), "
     "Random blood glucose, Complete urine analysis"),
    ("Liver Function Tests",
     "Serum bilirubin (total, direct, indirect), ALT (SGPT), AST (SGOT), "
     "Alkaline phosphatase (ALP), Gamma-glutamyl transferase (GGT), "
     "Serum albumin, Total protein"),
    ("Viral Serology",
     "IgM anti-HAV (Hepatitis A), HBsAg, IgM anti-HBc (Hepatitis B), "
     "Anti-HCV (Hepatitis C) with HCV RNA if reactive, "
     "IgM anti-HEV (Hepatitis E), Anti-HDV (if HBsAg positive)"),
    ("Autoimmune Panel",
     "Anti-nuclear antibody (ANA), Anti-smooth muscle antibody (ASMA), "
     "Anti-liver kidney microsomal antibody (anti-LKM1), "
     "Serum immunoglobulins (IgG), "
     "Anti-mitochondrial antibody (AMA) if cholestatic pattern"),
    ("Metabolic/Toxicological",
     "Serum ceruloplasmin and 24-hour urine copper (if age <45 years to exclude Wilson disease), "
     "Serum acetaminophen level (if DILI suspected), "
     "Alcohol history and CAGE questionnaire, "
     "Detailed drug history (prescription, OTC, herbal/traditional)"),
    ("Imaging",
     "Ultrasound abdomen (hepatobiliary system), "
     "CT abdomen/MRI (if USG inconclusive or complications suspected)"),
    ("Additional (as clinically indicated)",
     "Liver biopsy (in selected cases of uncertain diagnosis), "
     "EEG/neuro-imaging (if hepatic encephalopathy), "
     "Echocardiography (if ischemic hepatitis suspected)"),
]

for cat, inv in rows_data:
    row = tbl.add_row()
    row.cells[0].text = cat
    row.cells[1].text = inv

doc.add_paragraph()

# ══════════════════════════════════════════════════════════════════
#  SECTION 8: STUDY VARIABLES
# ══════════════════════════════════════════════════════════════════
section_heading(doc, "8", "Study Variables")

p = doc.add_paragraph()
r = p.add_run("8.1  Exposure/Independent Variables")
r.bold = True; r.font.size = Pt(12)

for v in [
    "Socio-demographic: Age, sex, residence, occupation, socioeconomic status",
    "Epidemiological: History of travel, contact with jaundiced patient, contaminated water/food exposure, "
    "blood transfusion, IV drug use, sexual history, vaccination history (HAV, HBV)",
    "Clinical: Duration of symptoms, presenting complaints, vital signs, body weight, BMI, "
    "presence of jaundice, hepatomegaly, splenomegaly, ascites, encephalopathy grade (West Haven criteria), "
    "signs of bleeding",
    "Biochemical: LFT parameters, CBC, INR, renal function at admission",
    "Etiological category: Viral (A/B/C/D/E), DILI, Alcoholic, Autoimmune, Ischemic, Indeterminate",
]:
    bullet(doc, v)

p2 = doc.add_paragraph()
r2 = p2.add_run("8.2  Outcome/Dependent Variables")
r2.bold = True; r2.font.size = Pt(12)

for v in [
    "Primary outcome: Etiological diagnosis (categorical)",
    "Secondary outcomes:",
    "   - In-hospital mortality (yes/no)",
    "   - Development of acute liver failure (yes/no): Per AASLD criteria: "
    "INR ≥1.5 + any degree of encephalopathy in absence of pre-existing liver disease",
    "   - Development of complications: Hepatic encephalopathy, AKI, coagulopathy, GI bleed, infections",
    "   - Requirement for ICU admission (yes/no)",
    "   - Length of hospital stay (days)",
    "   - Liver transplantation referral/listing (yes/no)",
    "   - Discharge status: Recovered, LAMA, Referred, Died",
]:
    bullet(doc, v)

# ══════════════════════════════════════════════════════════════════
#  SECTION 9: DATA MANAGEMENT AND STATISTICAL ANALYSIS
# ══════════════════════════════════════════════════════════════════
section_heading(doc, "9", "Data Management and Statistical Analysis")

body(doc,
     "Data will be entered into a password-protected Microsoft Excel database and analyzed using "
     "SPSS version 26.0 (or equivalent). Data will be double-entered and validated for accuracy. "
     "Identifying information will be de-linked from the analysis dataset.")

p = doc.add_paragraph()
r = p.add_run("9.1  Descriptive Analysis")
r.bold = True; r.font.size = Pt(12)

for v in [
    "Continuous variables: Expressed as mean ± SD (normally distributed) or "
    "median with interquartile range (non-normally distributed). Distribution assessed by "
    "Shapiro-Wilk test.",
    "Categorical variables: Expressed as frequencies and percentages.",
    "Etiological distribution will be presented as pie charts and bar graphs.",
]:
    bullet(doc, v)

p2 = doc.add_paragraph()
r2 = p2.add_run("9.2  Analytical Statistics")
r2.bold = True; r2.font.size = Pt(12)

for v in [
    "Chi-square test or Fisher's exact test for comparison of categorical variables between groups.",
    "Independent t-test or Mann-Whitney U test for comparison of continuous variables between two groups.",
    "Kruskal-Wallis test or one-way ANOVA for comparison across multiple etiological groups.",
    "Binary logistic regression to identify predictors of poor outcome (ALF, mortality). "
    "Variables with p<0.2 on univariate analysis will be entered into the multivariate model.",
    "Statistical significance will be defined as p < 0.05 (two-tailed).",
]:
    bullet(doc, v)

# ══════════════════════════════════════════════════════════════════
#  SECTION 10: ETHICAL CONSIDERATIONS
# ══════════════════════════════════════════════════════════════════
section_heading(doc, "10", "Ethical Considerations")

body(doc,
     "The study will be conducted in accordance with the Declaration of Helsinki (2013 revision) "
     "and the ICMR National Ethical Guidelines for Biomedical and Health Research Involving Human "
     "Participants (2017). Institutional Ethics Committee (IEC) approval will be obtained prior "
     "to commencement of data collection.")

for item in [
    "Informed Consent: Written informed consent will be obtained from each patient or their "
    "legally authorized representative in the local language. A participant information sheet "
    "will be provided. Participation is entirely voluntary and refusal will not affect standard care.",
    "Confidentiality: Patient data will be coded. Names and identifying information will not "
    "appear in any publications or presentations. Data will be stored in locked cabinets or "
    "password-protected digital files accessible only to the research team.",
    "Risk to Participants: This is an observational study. No additional interventions beyond "
    "standard clinical care will be performed. Blood samples used for the study will be drawn "
    "as part of routine clinical investigations, with no additional venepuncture solely for "
    "research purposes wherever feasible.",
    "Benefit: While there is no direct individual benefit, findings will contribute to "
    "institutional knowledge and potentially improve future patient care.",
    "Data Sharing: De-identified data may be shared with the scientific community subject to "
    "IEC permission and institutional policies.",
]:
    bullet(doc, item)

# ══════════════════════════════════════════════════════════════════
#  SECTION 11: LIMITATIONS
# ══════════════════════════════════════════════════════════════════
section_heading(doc, "11", "Limitations")

for lim in [
    "Cross-sectional design captures a single time point; causal relationships cannot be inferred.",
    "Single-center study limits generalizability to the broader population.",
    "Selection bias: Only hospitalized patients are included; mild/self-limiting cases managed "
    "in outpatient settings are not captured.",
    "Indeterminate etiology may remain in a proportion of cases despite thorough workup, "
    "particularly for seronegative hepatitis.",
    "Recall bias in history-taking, especially for drug and alcohol exposure.",
    "Lack of long-term follow-up data (e.g., chronicity of hepatitis B/C after discharge).",
]:
    bullet(doc, lim)

# ══════════════════════════════════════════════════════════════════
#  SECTION 12: EXPECTED OUTCOMES AND SIGNIFICANCE
# ══════════════════════════════════════════════════════════════════
section_heading(doc, "12", "Expected Outcomes and Significance")

body(doc,
     "This study is expected to provide institution-specific, up-to-date data on the etiological "
     "spectrum of acute hepatitis. Key deliverables include:")

for out in [
    "A frequency map of viral vs. non-viral etiologies in adult hospitalized patients.",
    "Clinical and biochemical predictors of acute liver failure and in-hospital mortality.",
    "Baseline data to support grant applications for larger multi-center studies.",
    "Identification of gaps in vaccination coverage (HAV, HBV) among adult inpatients.",
    "Recommendations for a locally-adapted diagnostic algorithm for acute hepatitis workup.",
    "Potential to inform institutional hepatitis prevention and treatment protocols.",
]:
    bullet(doc, out)

# ══════════════════════════════════════════════════════════════════
#  SECTION 13: BUDGET AND TIMELINE
# ══════════════════════════════════════════════════════════════════
section_heading(doc, "13", "Budget and Timeline")

p = doc.add_paragraph()
r = p.add_run("13.1  Proposed Timeline")
r.bold = True; r.font.size = Pt(12)

tbl2 = doc.add_table(rows=1, cols=3)
tbl2.style = "Table Grid"
h2 = tbl2.rows[0].cells
h2[0].text = "Phase"
h2[1].text = "Activity"
h2[2].text = "Duration"
for cell in h2:
    for run in cell.paragraphs[0].runs:
        run.bold = True

timeline = [
    ("Phase 1", "IEC approval, CRF finalization, staff training, pilot testing", "Months 1-2"),
    ("Phase 2", "Patient enrollment and data collection", "Months 3-14"),
    ("Phase 3", "Data cleaning, entry, and statistical analysis", "Months 15-16"),
    ("Phase 4", "Report writing, manuscript preparation, dissemination", "Months 17-18"),
]
for ph, act, dur in timeline:
    row = tbl2.add_row()
    row.cells[0].text = ph
    row.cells[1].text = act
    row.cells[2].text = dur

doc.add_paragraph()

p2 = doc.add_paragraph()
r2 = p2.add_run("13.2  Estimated Budget")
r2.bold = True; r2.font.size = Pt(12)

tbl3 = doc.add_table(rows=1, cols=3)
tbl3.style = "Table Grid"
h3 = tbl3.rows[0].cells
h3[0].text = "Item"
h3[1].text = "Details"
h3[2].text = "Estimated Cost (INR)"
for cell in h3:
    for run in cell.paragraphs[0].runs:
        run.bold = True

budget_items = [
    ("Stationery and printing", "CRF forms, consent forms, data sheets", "5,000"),
    ("Laboratory costs", "Additional serological tests not covered under routine care "
     "(autoimmune panel, ceruloplasmin, etc.)", "50,000"),
    ("Statistical software", "SPSS license or equivalent (if not institutionally available)", "10,000"),
    ("Dissemination", "Publication charges, conference registration", "20,000"),
    ("Contingency (10%)", "", "8,500"),
    ("TOTAL", "", "~93,500"),
]
for item, det, cost in budget_items:
    row = tbl3.add_row()
    row.cells[0].text = item
    row.cells[1].text = det
    row.cells[2].text = cost

doc.add_paragraph()

# ══════════════════════════════════════════════════════════════════
#  SECTION 14: REFERENCES
# ══════════════════════════════════════════════════════════════════
section_heading(doc, "14", "References")

refs = [
    "1. Yamada's Textbook of Gastroenterology, 7th ed. Chapter 86: Acute Hepatitis. "
       "Wiley-Blackwell, 2019.",
    "2. Sleisenger MH, Fordtran JS. Gastrointestinal and Liver Disease, 11th ed. "
       "Elsevier, 2021. Chapters on Acute Hepatitis A, B, C, D, E.",
    "3. Robbins and Cotran Pathologic Basis of Disease, 10th ed. Kumar V, Abbas AK, "
       "Aster JC. Elsevier, 2021.",
    "4. Jophlin LL, Singal AK, Bataller R, et al. ACG Clinical Guideline: "
       "Alcohol-Associated Liver Disease. Am J Gastroenterol. 2024;119(1):27-54. "
       "PMID: 38174913.",
    "5. Henriquez-Camacho C, Hijas-Gomez AI, Risco Risco C. Lamivudine and Entecavir "
       "for Acute Hepatitis B: A Systematic Review and Meta-Analysis. Viruses. "
       "2023;15(11):2233. PMID: 38005918.",
    "6. Martinez-Martinez LM, Rosales-Sotomayor G, Jasso-Baltazar EA. Acute liver "
       "failure: Management update and prognosis. Rev Gastroenterol Mex (Engl Ed). "
       "2024;89(3):416-431. PMID: 39033039.",
    "7. Tan CK, Ho D, Wang LM. Drug-induced autoimmune hepatitis: A minireview. "
       "World J Gastroenterol. 2022;28(24):2705-2716. PMID: 35979160.",
    "8. Pinto RM, Perez-Rodriguez FJ, Costafreda MI. Pathogenicity and virulence of "
       "hepatitis A virus. Virulence. 2021;12(1):1000-1019. PMID: 33843464.",
    "9. ICMR. National Ethical Guidelines for Biomedical and Health Research Involving "
       "Human Participants. New Delhi: ICMR; 2017.",
    "10. World Medical Association. Declaration of Helsinki: Ethical Principles for "
        "Medical Research Involving Human Subjects. JAMA. 2013;310(20):2191-2194.",
]
for ref in refs:
    p = doc.add_paragraph(ref)
    p.paragraph_format.space_after = Pt(4)
    p.paragraph_format.left_indent = Inches(0.25)

# ══════════════════════════════════════════════════════════════════
#  SECTION 15: ANNEXURES
# ══════════════════════════════════════════════════════════════════
doc.add_page_break()
section_heading(doc, "15", "Annexures")

p = doc.add_paragraph()
r = p.add_run("Annexure I: Case Record Form (CRF)")
r.bold = True; r.underline = True; r.font.size = Pt(13)

# CRF
crf_sections = {
    "A. Patient Identification (De-identified)": [
        ("Study ID", "____________"),
        ("Date of Enrollment", "____________"),
        ("Date of Admission", "____________"),
        ("Age (years)", "____________"),
        ("Sex", "Male / Female / Other"),
        ("Address: Urban / Rural", "____________"),
        ("Occupation", "____________"),
    ],
    "B. Clinical History": [
        ("Chief Complaints (with duration)", "____________"),
        ("Fever", "Yes / No   Duration: ___"),
        ("Nausea / Vomiting", "Yes / No"),
        ("Abdominal pain (RUQ)", "Yes / No"),
        ("Jaundice", "Yes / No   Duration: ___ days"),
        ("Dark urine", "Yes / No"),
        ("Pale stools", "Yes / No"),
        ("Altered sensorium", "Yes / No"),
        ("Bleeding (site)", "Yes / No   Site: ___"),
        ("Alcohol use", "Yes / No   Units/week: ___ Duration: ___ years"),
        ("Drug history (name, dose, duration)", "____________"),
        ("Herbal/traditional medicine use", "Yes / No   Details: ___"),
        ("Prior jaundice episodes", "Yes / No"),
        ("History of blood transfusion", "Yes / No   Date: ___"),
        ("IV drug use", "Yes / No"),
        ("Travel history (recent)", "Yes / No"),
        ("Contact with jaundiced person", "Yes / No"),
        ("Vaccination: HAV", "Yes / No / Unknown"),
        ("Vaccination: HBV", "Yes / No / Unknown"),
    ],
    "C. Clinical Examination at Admission": [
        ("Pulse (bpm)", "____________"),
        ("BP (mmHg)", "____________"),
        ("Temperature (°F)", "____________"),
        ("Respiratory rate (/min)", "____________"),
        ("GCS / Hepatic Encephalopathy Grade (0-IV)", "____________"),
        ("Icterus", "Yes / No   Grade: ___"),
        ("Hepatomegaly", "Yes / No   Span: ___ cm"),
        ("Splenomegaly", "Yes / No"),
        ("Ascites", "Absent / Mild / Moderate / Massive"),
        ("Pedal edema", "Yes / No"),
        ("Asterixis (flapping tremor)", "Yes / No"),
        ("Features of chronic liver disease (spider nevi, etc.)", "Yes / No"),
    ],
    "D. Laboratory Investigations at Admission": [
        ("Hemoglobin (g/dL)", "____________"),
        ("TLC (/cumm)", "____________"),
        ("Platelet count (/cumm)", "____________"),
        ("Serum bilirubin Total / Direct (mg/dL)", "____________"),
        ("ALT/SGPT (U/L)", "____________"),
        ("AST/SGOT (U/L)", "____________"),
        ("Alkaline phosphatase (U/L)", "____________"),
        ("GGT (U/L)", "____________"),
        ("Serum albumin (g/dL)", "____________"),
        ("Total protein (g/dL)", "____________"),
        ("PT (seconds) / INR", "____________"),
        ("Serum creatinine (mg/dL)", "____________"),
        ("Serum sodium (mEq/L)", "____________"),
        ("Blood glucose (mg/dL)", "____________"),
    ],
    "E. Etiological Workup": [
        ("IgM anti-HAV", "+ve / -ve / Not done"),
        ("HBsAg", "+ve / -ve / Not done"),
        ("IgM anti-HBc", "+ve / -ve / Not done"),
        ("HBeAg", "+ve / -ve / Not done"),
        ("HBV DNA (IU/mL, if done)", "____________"),
        ("Anti-HCV", "+ve / -ve / Not done"),
        ("HCV RNA (IU/mL, if done)", "____________"),
        ("Anti-HDV (if HBsAg +ve)", "+ve / -ve / Not done"),
        ("IgM anti-HEV", "+ve / -ve / Not done"),
        ("ANA", "+ve / -ve / Not done"),
        ("ASMA", "+ve / -ve / Not done"),
        ("Anti-LKM1", "+ve / -ve / Not done"),
        ("Serum IgG (g/dL)", "____________"),
        ("AMA", "+ve / -ve / Not done"),
        ("Serum ceruloplasmin (mg/dL)", "____________"),
        ("24-hr urine copper (mcg/24hr)", "____________"),
        ("Serum acetaminophen level", "____________"),
        ("Final Etiological Diagnosis", "HAV / HBV / HCV / HDV / HEV / DILI / Alcoholic / "
         "Autoimmune / Ischemic / Wilson / Indeterminate / Other"),
    ],
    "F. Imaging": [
        ("USG Abdomen findings", "____________"),
        ("CT/MRI Abdomen (if done)", "____________"),
    ],
    "G. Complications and Outcomes": [
        ("Acute Liver Failure (INR≥1.5 + encephalopathy)", "Yes / No"),
        ("Hepatic Encephalopathy (grade)", "Grade: 0 / I / II / III / IV"),
        ("Acute Kidney Injury (AKIN criteria)", "Yes / No   Stage: ___"),
        ("Coagulopathy (INR >1.5)", "Yes / No"),
        ("GI bleed", "Yes / No"),
        ("Infection (specify)", "Yes / No   Type: ___"),
        ("ICU admission required", "Yes / No   Duration: ___ days"),
        ("Liver transplant referral", "Yes / No"),
        ("Total hospital stay (days)", "____________"),
        ("Discharge outcome", "Recovered / Improved / LAMA / Referred / Died"),
        ("Cause of death (if applicable)", "____________"),
    ],
}

for sec_title, fields in crf_sections.items():
    p = doc.add_paragraph()
    r = p.add_run(sec_title)
    r.bold = True; r.font.size = Pt(12)
    r.font.color.rgb = RGBColor(0x00, 0x33, 0x66)

    for field, response in fields:
        p2 = doc.add_paragraph()
        r1 = p2.add_run(f"{field}:  ")
        r1.bold = True; r1.font.size = Pt(11)
        p2.add_run(response).font.size = Pt(11)
        p2.paragraph_format.space_after = Pt(2)
        p2.paragraph_format.left_indent = Inches(0.25)

# Consent form notice
doc.add_paragraph()
p = doc.add_paragraph()
r = p.add_run("Annexure II: Participant Information Sheet and Informed Consent Form")
r.bold = True; r.underline = True; r.font.size = Pt(13)

body(doc,
     "[To be prepared in English and local language as per Institutional Ethics Committee requirements. "
     "Should include: study title, purpose, procedures, risks, benefits, confidentiality assurance, "
     "voluntary participation statement, contact details of Principal Investigator and IEC.]")

# Investigator signatures block
doc.add_paragraph()
p = doc.add_paragraph()
r = p.add_run("Investigators")
r.bold = True; r.font.size = Pt(13)

for role in [
    "Principal Investigator:  ________________________________  Date: ____________",
    "Co-Investigator(s):      ________________________________  Date: ____________",
    "HOD / Guide:             ________________________________  Date: ____________",
    "IEC Approval Number:     ________________________________  Date: ____________",
]:
    doc.add_paragraph(role).paragraph_format.space_after = Pt(8)

# ── Save ──────────────────────────────────────────────────────────
out_path = "/tmp/workspace/acute-hepatitis-protocol/Research_Protocol_Acute_Hepatitis.docx"
doc.save(out_path)
print(f"Saved: {out_path}")
Running Command

python3 /tmp/workspace/acute-hepatitis-protocol/build_protocol.py

Running Command

python3 -c " from docx import Document doc = Document('/tmp/workspace/acute-hepatitis-protocol/Research_Protocol_Acute_Hepatitis.docx') headings = [p.text for p in doc.paragraphs if p.style.name.startswith('Heading')] print('Headings found:', len(headings)) for h in headings: print(' -', h) print('Total paragraphs:', len(doc.paragraphs)) import os print('File size:', os.path.getsize('/tmp/workspace/acute-hepatitis-protocol/Research_Protocol_Acute_Hepatitis.docx'), 'bytes') "

Your research protocol is ready. Download it here:

Research Protocol Acute Hepatitis

Word Document · DOCX


Protocol Summary

Title: Cross-Sectional Study on Etiology and Outcome of Patients with Acute Hepatitis Design: Hospital-based cross-sectional observational study Setting: Tertiary care hospital | Adults ≥18 years Duration: 18 months total | Minimum sample: 100 patients

What the protocol contains (15 sections, 250 paragraphs, fully formatted):

SectionContent
1. Background & RationaleEpidemiology of acute hepatitis, viral vs. non-viral causes, gaps in local data
2. Literature ReviewKey references including ACG 2024 Guideline on Alcoholic Liver Disease, Henriquez-Camacho et al. 2023 meta-analysis on acute HBV, and Martinez-Martinez et al. 2024 ALF review
3. Aims & Objectives1 primary aim, 2 primary objectives, 5 secondary objectives
4. Study DesignCross-sectional observational; 12 months enrollment
5. PopulationDetailed inclusion/exclusion criteria
6. Sample Sizen = 100 calculated at 95% CI, p=0.50, d=0.10 with 10% attrition
7. Data CollectionStructured CRF + 7-category investigation table (serology, autoimmune, metabolic, imaging)
8. Study VariablesIndependent (demographics, clinical, biochemical, etiological) and dependent (outcomes)
9. Statistical AnalysisDescriptive + Chi-square/Fisher's/logistic regression; SPSS v26
10. EthicsDeclaration of Helsinki, ICMR 2017 guidelines; informed consent, confidentiality
11. Limitations6 limitations clearly stated
12. Expected Outcomes6 anticipated deliverables
13. Budget & TimelinePhase-wise 18-month Gantt; estimated budget ~INR 93,500
14. References10 numbered references (textbooks + PubMed-cited guidelines)
15. AnnexuresFull CRF (Sections A-G, 60+ fields) + Consent form template

To customize before submission:
  • Replace [Institution Name], [City, Country], and [HOD/Guide name] placeholders
  • Add your IEC approval number once received
  • Adjust the budget currency/values to your institution's requirements
  • Pregnant women are flagged as a potential sub-study given their elevated hepatitis E risk (CFR up to 25%)
This is a shared conversation. Sign in to Orris to start your own chat.