Factors associated with the rising incidence of Caesarean section deliveries at Garissa Provincial General Hospital, Kenya. I want a research on this and also previous one according to the topic

Reading File
Searching PubMed

caesarean section incidence factors Kenya hospital

Searching the Web

factors rising caesarean section Garissa Provincial General Hospital Kenya

Searching PubMed

caesarean section indications rising rates sub-Saharan Africa

Reading Article

PMID: 32641057

Reading Article

PMID: 30322584

Reading Web Page

https://panafrican-med-journal.com/content/series/28/1/7/ful…

Finding Sources
Reading Article

PMID: 11684214

Searching PubMed

caesarean section determinants previous scar fetal distress East Africa

Finding Sources
Searching PubMed

caesarean section rates trends Africa factors associated

Reading Article

PMID: 40190504

Finding Sources
Reading Article

PMID: 32345146

Reading Article

PMID: 35578320

Searching the Web

caesarean section rates Kenya KDHS demographic health survey trends 2022

Now I have comprehensive data to compile a thorough research overview. Let me synthesize all findings.

Factors Associated with the Rising Incidence of Caesarean Section Deliveries at Garissa Provincial General Hospital (GPGH), Kenya

Overview & Context

Garissa Provincial General Hospital (GPGH) is the sole Level 5 referral hospital serving the three counties of north-eastern Kenya (Garissa, Wajir, Mandera) and neighboring counties. It operates in a predominantly arid, pastoralist Muslim region where more than 70% of residents live below the poverty line and where home deliveries historically dominated. As facility-based delivery rates have climbed — driven in part by partner support (notably DANIDA), staff expansion, and increased specialist presence — the absolute number and proportion of caesarean section (CS) deliveries have risen correspondingly.
According to the 2022 Kenya Demographic and Health Survey (KDHS), 17% of all live births in Kenya are now delivered by CS — up sharply from about 5% two decades earlier. Facility delivery nationally reached 88% in 2022 (up from 41% in 2003). In north-eastern Kenya, counties like Mandera (50% home births), Wajir (46%), and Garissa still lag in facility utilization, yet GPGH itself, as the apex referral facility for a vast catchment, handles the most complex obstetric cases.

1. Obstetric / Clinical Indications (Most Proximate Drivers)

These are the direct medical reasons driving the CS decision at GPGH and comparable East African hospitals:

a) Previous Caesarean Scar

The single most powerful predictor of CS across every African hospital studied. In a large Kenyan teaching hospital analysis (van der Spek et al., 2020, PMID 32641057), repeat CS was near-universal at 99% — meaning almost every woman with a prior scar delivered surgically again, driving the accumulating stock of CS deliveries. Primary CS thus has a cascade effect on all subsequent pregnancies.

b) Cephalopelvic Disproportion (CPD) / Obstructed Labour

CPD and prolonged/obstructed labour are the leading primary indications across sub-Saharan Africa. The systematic review by Dumont et al. (2001, Lancet, PMID 11684214) — the only published systematic review of CS rates for maternal indication in sub-Saharan Africa — identified protracted labour and CPD as the most common reasons for CS in West and East African hospital populations. This is directly applicable to GPGH, where young, nulliparous, undernourished women from pastoral communities often present late in obstructed labour after attempting home delivery.

c) Fetal Distress

Intrapartum fetal heart rate abnormalities prompting emergency CS. In the 20-year East African retrospective from Tanzania (PMID 40190504), the three top CS indications were CPD, previous scar, and fetal distress — consistent with GPGH's likely case mix given its role as the terminal referral for complicated labour.

d) Malpresentation (Breech, Transverse Lie)

Malpresentation is a major indication, particularly relevant in high-parity, grand-multiparous Somali/Oromo women in the GPGH catchment, where late ANC registration may mean malpresentation is detected only at onset of labour.

e) Antepartum Haemorrhage (Placenta Praevia, Abruptio Placentae)

Dumont et al.'s systematic review placed abruptio placentae and placenta praevia among the six principal maternal indications for CS in sub-Saharan Africa. These obstetric emergencies mandate immediate CS.

f) Pre-eclampsia / Eclampsia

Eclampsia is a consistent indication. In the MOMA survey population across West Africa, eclampsia featured among the six top indications. GPGH, with its referral burden, receives eclamptic women from a wide area.

g) Multiple Pregnancy

Kibe et al. (2022, PMID 35578320) — analyzing two decades of Rwanda DHS data — found multiple gestation independently associated with CS after adjustment for other factors.

2. Sociodemographic Factors

a) Referral Status & Catchment Burden

GPGH is the only Level 5 hospital in northern Kenya, receiving referrals from Level 2–4 facilities across a vast, sparsely populated region. Cases reaching GPGH are inherently higher-risk (prolonged labour, failed trial of labour, antepartum haemorrhage) — automatically elevating CS rates above what community-level rates would suggest.

b) Delayed Presentation

Pastoral nomadism (57.1% semi-pastoralism in Garissa District) and distances to the facility mean many women present in advanced or obstructed labour. Late arrival limits the window for successful vaginal delivery and increases emergency CS rates.

c) Maternal Age & Parity

Both extremes carry risk: adolescent patients with CPD, and grand-multiparous women (common in this high-fertility community) with malpresentation or uterine hypotonia. Arunda et al. (2020, PMID 32345146) found that among facility-delivered births in Kenya, grand multiparity was not protective against CS when obstetric risk factors were present.

d) Education & Wealth

The KDHS 2022 documents a stark gradient: CS rate of 34% among women with more than secondary education vs. 3% among uneducated women nationally. In Garissa County — one of Kenya's most educationally deprived — population-level CS rates remain lower than the national average, but within GPGH (as a referral hospital), the medical case-mix dominates rather than socioeconomic elective demand.

e) ANC Utilization

Paradoxically, higher ANC attendance is associated with increased CS in some East African studies (including Kibe et al. 2022 for Rwanda), likely because high-risk pregnancies are identified and followed up. Conversely, women presenting to GPGH without ANC (common in nomadic populations) tend to arrive with undiagnosed complications — also driving emergency CS.

3. Health System & Institutional Factors

a) Expanding Facility Capacity

DANIDA-funded infrastructure expansion and government specialist deployment at GPGH increased surgical capacity. As noted in JKUAT research on GPGH (Dabar, 2019), hospital expansion and improved equipment directly drove increased facility utilization — more deliveries overall, and more CS among complicated cases.

b) Rising Facility Delivery Rate

WHO data show that globally, 66.5% of the increase in CS deliveries is attributable to more births occurring in health facilities, not to higher CS rates within facilities (Boerma et al., 2018, Lancet, PMID 30322584). As women previously delivering at home migrate to GPGH, the hospital's CS denominator increases.

c) Availability of Surgical Teams

Greater availability of obstetricians and anaesthetic officers at GPGH — compared to peripheral facilities — means that surgical capability exists where it previously did not. The threshold for CS may lower when skilled staff are present and theatre is available.

d) Lack of Clear Guidelines / Audit Culture

Van der Spek et al. (2020, Kenya) found that 43% of primary CS had no documented clinical indication in hospital records, and over-use was measurable even at the primary CS level. Without robust CS audit and second-opinion protocols, institutional CS rates drift upward over time.

e) Financial Incentives

In Kenyan private and semi-private settings, CS generates higher facility revenue than vaginal delivery. While GPGH is a public hospital, this dynamic has documented effects on overall national CS rates (Boerma et al., 2018; Arunda et al., 2020).

4. Patient-Level Demand & Cultural Factors

a) Growing Acceptance of Hospital Delivery

Historically, Somali cultural and religious norms favoured traditional birth attendants (TBAs). As community attitudes shift — through health education and improved facility quality — more women choose or are referred to GPGH, including cases that would previously have delivered without documentation.

b) Perceived Safety of CS

In urban Kenyan settings, employment was associated with CS delivery at Mama Lucy Kibaki Hospital, Nairobi (Juma et al., 2017, Pan African Medical Journal), possibly reflecting perception that CS is a safer or more "modern" option. Though less relevant in rural Garissa, this trend may emerge as education and wealth levels rise.

5. Global & Regional Trends as Background

YearGlobal CS RateEast/Central Africa
1990~7%~3–5%
2000~12%~4–6%
2015~21%~10–12%
2022~23–25%increasing
(Sources: WHO 2021; Boerma et al., Lancet 2018)
WHO's 2021 statement notes that global CS rates have tripled since 1990 and are projected to reach 28% by 2030. Sub-Saharan African rates are the lowest globally but rising fastest in percentage terms, driven by urbanization, facility expansion, and shifting patterns of obstetric risk.

6. Summary Table of Key Factors at GPGH

CategoryFactorDirection of Effect
ObstetricPrevious CS scar↑↑ (strongest driver)
ObstetricCPD / obstructed labour↑↑
ObstetricFetal distress
ObstetricMalpresentation
ObstetricAPH / placenta praevia
ObstetricEclampsia
SystemSole regional referral hospital↑ (high-risk case concentration)
SystemFacility infrastructure expansion
SystemRising facility delivery rates
SystemAbsent CS audit
DemographicDelayed presentation, long distances
DemographicYoung primigravidae / adolescents
SocioeconomicLow ANC uptake in nomadic women↑ (undetected complications)

Key References (Peer-Reviewed)

  1. Dumont A et al. (2001). Caesarean section rate for maternal indication in sub-Saharan Africa: a systematic review. Lancet. PMID 11684214 — Six main indications: protracted labour, abruptio placentae, previous CS, eclampsia, placenta praevia, malpresentation.
  2. Boerma T et al. (2018). Global epidemiology of use of and disparities in caesarean sections. Lancet. PMID 30322584 — Global CS doubled 2000–2015; 66.5% of increase driven by facility delivery rise.
  3. van der Spek L et al. (2020). Socioeconomic differences in caesarean section — are they explained by medical need? Int J Equity Health. PMID 32641057 — Kenyan hospital: repeat CS 99%, 43% primary CS undocumented; previous scar & unnecessary primary CS drive rates.
  4. Arunda MO et al. (2020). Cesarean delivery and associated socioeconomic factors and neonatal survival in Kenya and Tanzania. Glob Health Action. PMID 32345146 — Wealth, insurance, education, and urban residence independently associated with CS in Kenya.
  5. Kibe PM et al. (2022). Prevalence and factors associated with caesarean section in Rwanda (DHS 2000–2019-20). BMC Pregnancy Childbirth. PMID 35578320 — CS rose from 2.2% to 15.6% over 20 years; multiple pregnancy, high socioeconomic status, ≥4 ANC visits as independent predictors.
  6. Rapaport S et al. (2024). Caesarean sections among East African refugees and host population: 20-year retrospective, Tanzania. Afr Health Sci. PMID 40190504 — CPD, previous scar, fetal distress: top three indications across 8,461 CS in an East African humanitarian setting demographically similar to GPGH.
  7. Juma S et al. (2017). Factors associated with caesarean sections at Mama Lucy Kibaki Hospital, Nairobi, Kenya. Pan African Medical Journal. — Employment and low birth weight associated with CS in urban Kenya.
  8. Kenya NDHS 2022 (DHS Program) — 17% national CS rate; gradient by education (3% no education → 34% post-secondary); facility births 88%.

Recommendations for GPGH (Evidence-Based)

  • CS audit committee: Regular case review to identify and reduce non-indicated primary CS, consistent with van der Spek et al. findings.
  • Trial of labour after caesarean (TOLAC) protocols: Safely reduce repeat CS burden where appropriate.
  • Strengthen ANC outreach in nomadic communities: Earlier detection of malpresentation, multiple gestation, and CPD risk allows planned intervention and reduces emergency CS.
  • Safe obstetric drill training: Improving management of prolonged labour and fetal distress at peripheral facilities reduces the late-referral CS rate.
  • Data collection: GPGH should maintain prospective CS indications registers to generate locally specific evidence, as no published studies specific to Garissa County CS factors currently exist in peer-reviewed literature.

I want a document of this reasearch proposal to submit

Asking for Preferences
Please provide the name(s) of the principal investigator and any co-investigators you'd like on the proposal cover page.

D/CM/24017/862

Asking for Preferences
Please go ahead and type your full name below.

ABDINASIR ALI

Reading File
Running Command

ls -la /home/daytona/workspace/ 2>/dev/null && mkdir -p /home/daytona/workspace/…

Writing File

~/garissa-cs-proposal/build_proposal.py

#!/usr/bin/env python3
"""
Research Proposal PDF generator using ReportLab
Title: Factors Associated with the Rising Incidence of Caesarean Section Deliveries
       at Garissa Provincial General Hospital, Kenya
Author: ABDINASIR ALI | Reg: D/CM/24017/862
"""

from reportlab.lib.pagesizes import A4
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm
from reportlab.lib import colors
from reportlab.platypus import (
    SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
    HRFlowable, PageBreak, ListFlowable, ListItem, KeepTogether
)
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.pdfbase import pdfmetrics

OUTPUT = "/home/daytona/workspace/garissa-cs-proposal/CS_Research_Proposal_Garissa.pdf"

# ── Colour palette ──────────────────────────────────────────────────────────
DARK_BLUE  = colors.HexColor("#003366")
MID_BLUE   = colors.HexColor("#005599")
LIGHT_BLUE = colors.HexColor("#cce0f5")
GOLD       = colors.HexColor("#c8a400")
WHITE      = colors.white
GREY       = colors.HexColor("#555555")
LIGHT_GREY = colors.HexColor("#f4f4f4")

# ── Document setup ───────────────────────────────────────────────────────────
doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=A4,
    leftMargin=3*cm, rightMargin=2.5*cm,
    topMargin=2.5*cm, bottomMargin=2.5*cm,
    title="Research Proposal – Caesarean Section at Garissa PGH",
    author="Abdinasir Ali",
    subject="Factors Associated with Rising CS Incidence at Garissa PGH, Kenya",
)

styles = getSampleStyleSheet()

# ── Custom paragraph styles ──────────────────────────────────────────────────
def make_style(name, parent="Normal", **kw):
    s = ParagraphStyle(name, parent=styles[parent], **kw)
    return s

title_style = make_style("ProposalTitle", "Normal",
    fontSize=18, leading=24, textColor=DARK_BLUE,
    alignment=TA_CENTER, spaceAfter=6, fontName="Helvetica-Bold")

subtitle_style = make_style("ProposalSubtitle", "Normal",
    fontSize=13, leading=18, textColor=MID_BLUE,
    alignment=TA_CENTER, spaceAfter=4, fontName="Helvetica-Bold")

meta_style = make_style("Meta", "Normal",
    fontSize=10, leading=14, textColor=GREY,
    alignment=TA_CENTER, spaceAfter=3, fontName="Helvetica")

h1_style = make_style("H1", "Normal",
    fontSize=13, leading=18, textColor=WHITE,
    spaceBefore=14, spaceAfter=6,
    fontName="Helvetica-Bold", leftIndent=0)

h2_style = make_style("H2", "Normal",
    fontSize=11, leading=15, textColor=DARK_BLUE,
    spaceBefore=10, spaceAfter=4,
    fontName="Helvetica-Bold")

h3_style = make_style("H3", "Normal",
    fontSize=10, leading=14, textColor=MID_BLUE,
    spaceBefore=8, spaceAfter=3,
    fontName="Helvetica-BoldOblique")

body_style = make_style("Body", "Normal",
    fontSize=10, leading=15, textColor=colors.black,
    alignment=TA_JUSTIFY, spaceAfter=6, fontName="Helvetica")

bullet_style = make_style("Bullet", "Normal",
    fontSize=10, leading=14, textColor=colors.black,
    leftIndent=16, spaceAfter=3, fontName="Helvetica")

caption_style = make_style("Caption", "Normal",
    fontSize=8.5, leading=12, textColor=GREY,
    alignment=TA_CENTER, spaceAfter=4, fontName="Helvetica-Oblique")

ref_style = make_style("Ref", "Normal",
    fontSize=9, leading=13, textColor=colors.black,
    leftIndent=14, firstLineIndent=-14, spaceAfter=4, fontName="Helvetica")

story = []

# ═══════════════════════════════════════════════════════════════════════════════
# COVER PAGE
# ═══════════════════════════════════════════════════════════════════════════════
def cover_banner():
    data = [["RESEARCH PROPOSAL"]]
    t = Table(data, colWidths=[15.5*cm])
    t.setStyle(TableStyle([
        ("BACKGROUND",   (0,0), (-1,-1), DARK_BLUE),
        ("TEXTCOLOR",    (0,0), (-1,-1), WHITE),
        ("FONTNAME",     (0,0), (-1,-1), "Helvetica-Bold"),
        ("FONTSIZE",     (0,0), (-1,-1), 14),
        ("ALIGN",        (0,0), (-1,-1), "CENTER"),
        ("TOPPADDING",   (0,0), (-1,-1), 10),
        ("BOTTOMPADDING",(0,0), (-1,-1), 10),
    ]))
    return t

story.append(cover_banner())
story.append(Spacer(1, 0.5*cm))

story.append(Paragraph(
    "Factors Associated with the Rising Incidence of<br/>Caesarean Section Deliveries at<br/>"
    "Garissa Provincial General Hospital, Kenya",
    title_style))

story.append(Spacer(1, 0.4*cm))
story.append(HRFlowable(width="100%", thickness=2, color=GOLD, spaceAfter=10))

story.append(Paragraph("Submitted by", meta_style))
story.append(Paragraph("<b>ABDINASIR ALI</b>", subtitle_style))
story.append(Paragraph("Registration No.: D/CM/24017/862", meta_style))
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph("Study Site:", meta_style))
story.append(Paragraph("Garissa Provincial General Hospital, Garissa County, Kenya", meta_style))
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph("Date of Submission: May 2026", meta_style))
story.append(Spacer(1, 0.5*cm))
story.append(HRFlowable(width="100%", thickness=1, color=LIGHT_BLUE, spaceAfter=6))

# Declaration box
decl_data = [[
    Paragraph(
        "<b>Declaration:</b> This research proposal is submitted in partial fulfilment of the requirements for the "
        "award of the Diploma in Clinical Medicine. The work presented herein is original and has not been submitted "
        "to any other institution.",
        make_style("Decl","Normal",fontSize=9,leading=13,textColor=GREY,fontName="Helvetica-Oblique"))
]]
decl_table = Table(decl_data, colWidths=[15.5*cm])
decl_table.setStyle(TableStyle([
    ("BACKGROUND",   (0,0),(-1,-1), LIGHT_GREY),
    ("BOX",          (0,0),(-1,-1), 0.5, GREY),
    ("LEFTPADDING",  (0,0),(-1,-1), 10),
    ("RIGHTPADDING", (0,0),(-1,-1), 10),
    ("TOPPADDING",   (0,0),(-1,-1), 8),
    ("BOTTOMPADDING",(0,0),(-1,-1), 8),
]))
story.append(decl_table)
story.append(PageBreak())

# ═══════════════════════════════════════════════════════════════════════════════
# HELPER: section heading with coloured background bar
# ═══════════════════════════════════════════════════════════════════════════════
def section_heading(text, num=""):
    label = f"{num}. {text}" if num else text
    data = [[Paragraph(label, h1_style)]]
    t = Table(data, colWidths=[15.5*cm])
    t.setStyle(TableStyle([
        ("BACKGROUND",   (0,0),(-1,-1), DARK_BLUE),
        ("LEFTPADDING",  (0,0),(-1,-1), 10),
        ("RIGHTPADDING", (0,0),(-1,-1), 10),
        ("TOPPADDING",   (0,0),(-1,-1), 5),
        ("BOTTOMPADDING",(0,0),(-1,-1), 5),
    ]))
    return t

def sub_heading(text):
    return Paragraph(text, h2_style)

def sub_sub_heading(text):
    return Paragraph(text, h3_style)

def body(text):
    return Paragraph(text, body_style)

def bullet(items):
    entries = [ListItem(Paragraph(i, bullet_style), leftIndent=20, bulletColor=MID_BLUE) for i in items]
    return ListFlowable(entries, bulletType="bullet", leftIndent=10, spaceAfter=4)

def spacer(h=0.3):
    return Spacer(1, h*cm)

# ═══════════════════════════════════════════════════════════════════════════════
# TABLE OF CONTENTS (static)
# ═══════════════════════════════════════════════════════════════════════════════
story.append(section_heading("TABLE OF CONTENTS"))
story.append(spacer(0.4))
toc_items = [
    ("1", "Introduction & Background"),
    ("2", "Problem Statement"),
    ("3", "Justification / Rationale"),
    ("4", "Research Questions"),
    ("5", "Objectives"),
    ("6", "Literature Review"),
    ("7", "Research Methodology"),
    ("8", "Ethical Considerations"),
    ("9", "Work Plan / Gantt Chart"),
    ("10", "Budget Estimate"),
    ("11", "References"),
]
toc_data = [[Paragraph(f"<b>{n}</b>", body_style), Paragraph(t, body_style), Paragraph("", body_style)] for n,t in toc_items]
toc_table = Table(toc_data, colWidths=[1.2*cm, 11.5*cm, 2.8*cm])
toc_table.setStyle(TableStyle([
    ("VALIGN",       (0,0),(-1,-1), "MIDDLE"),
    ("LINEBELOW",    (0,0),(-1,-1), 0.3, LIGHT_BLUE),
    ("TOPPADDING",   (0,0),(-1,-1), 4),
    ("BOTTOMPADDING",(0,0),(-1,-1), 4),
]))
story.append(toc_table)
story.append(PageBreak())

# ═══════════════════════════════════════════════════════════════════════════════
# SECTION 1 – INTRODUCTION & BACKGROUND
# ═══════════════════════════════════════════════════════════════════════════════
story.append(section_heading("INTRODUCTION AND BACKGROUND", "1"))
story.append(spacer())
story.append(body(
    "Caesarean section (CS) is a life-saving surgical procedure used to deliver a baby through incisions "
    "in the abdominal wall and uterus when vaginal delivery poses unacceptable risks to the mother or "
    "foetus. Since the World Health Organization (WHO) set the recommended CS rate at 10–15% in 1985, "
    "the global incidence has continued to rise well beyond this threshold. By 2015, an estimated 29.7 million "
    "births worldwide — representing 21.1% of all deliveries — occurred by CS, nearly double the 16.0 million "
    "(12.1%) recorded in 2000 (Boerma et al., 2018)."
))
story.append(body(
    "In sub-Saharan Africa (SSA), CS rates have historically been among the lowest globally, predominantly "
    "reflecting under-use in resource-limited settings. However, a systematic review by Dumont et al. (2001) "
    "identified six principal maternal indications driving CS in West and East Africa: protracted labour, "
    "abruptio placentae, previous CS scar, eclampsia, placenta praevia, and malpresentation. As facility-based "
    "delivery rates in the region climb — from as low as 41% in 2003 to 88% nationally in Kenya by 2022 "
    "(KDHS 2022) — CS rates have risen correspondingly."
))
story.append(body(
    "Kenya's 2022 Demographic and Health Survey (KDHS) reports a national CS rate of 17% of all live births, "
    "with pronounced socioeconomic gradients: 34% among women with more than secondary education versus only "
    "3% among uneducated women. In north-eastern Kenya, home-birth rates remain the highest in the country "
    "(Mandera: 50%, Wajir: 46%), yet Garissa Provincial General Hospital (GPGH) — the sole Level 5 referral "
    "facility in the region — receives the most complex obstetric referrals from the three northern counties "
    "and neighboring areas."
))
story.append(body(
    "GPGH serves a predominantly Somali and Oromo Muslim pastoral community, where over 70% of residents live "
    "below the poverty line and where traditional birth attendants (TBAs) have historically dominated childbirth "
    "care. Recent infrastructure expansion (including DANIDA-funded construction and government specialist "
    "deployment) has significantly increased the hospital's surgical capacity and overall delivery volumes, "
    "creating the conditions for a measurable rise in CS rates that warrants formal investigation."
))
story.append(PageBreak())

# ═══════════════════════════════════════════════════════════════════════════════
# SECTION 2 – PROBLEM STATEMENT
# ═══════════════════════════════════════════════════════════════════════════════
story.append(section_heading("PROBLEM STATEMENT", "2"))
story.append(spacer())
story.append(body(
    "Caesarean section rates at Garissa Provincial General Hospital have been rising, yet no published "
    "peer-reviewed study has systematically identified and quantified the specific clinical, demographic, "
    "and health-system factors driving this increase at this institution. Without locally generated evidence, "
    "hospital administrators, clinical teams, and policymakers lack the data needed to distinguish medically "
    "necessary CS from potentially avoidable procedures, to allocate theatre resources efficiently, or to "
    "design targeted interventions."
))
story.append(body(
    "The consequences of unexamined rising CS rates are multi-dimensional: (i) increased short-term maternal "
    "morbidity (haemorrhage, surgical site infection, anaesthetic complications); (ii) accumulating 'previous-scar' "
    "burden that perpetuates repeat CS in future pregnancies; (iii) strain on limited theatre and blood-bank "
    "resources in an already resource-constrained facility; and (iv) ethical questions around informed consent "
    "and unnecessary surgery. A hospital-based study at GPGH is therefore urgently needed."
))

# ═══════════════════════════════════════════════════════════════════════════════
# SECTION 3 – JUSTIFICATION
# ═══════════════════════════════════════════════════════════════════════════════
story.append(section_heading("JUSTIFICATION / RATIONALE", "3"))
story.append(spacer())
story.append(body(
    "This study is justified on the following grounds:"
))
story.append(bullet([
    "<b>Evidence gap:</b> No peer-reviewed study on CS rates and their determinants has been conducted "
    "specifically at GPGH or in Garissa County, leaving a critical gap in Kenya's obstetric evidence base.",
    "<b>Referral-hospital burden:</b> As the only Level 5 facility in northern Kenya, GPGH concentrates "
    "high-risk obstetric cases that would not appear in population-level surveys, making a facility-based "
    "study methodologically necessary.",
    "<b>Policy relevance:</b> Findings will directly inform GPGH's CS audit committee, clinical protocols, "
    "and north-eastern Kenya's county health management teams.",
    "<b>Resource stewardship:</b> Understanding avoidable versus indicated CS will guide rational use of "
    "theatre time, blood products, and skilled anaesthetic personnel.",
    "<b>Maternal safety:</b> Identifying primary CS over-use creates the evidence base for trial of labour "
    "after caesarean (TOLAC) programmes and birth companion models shown to reduce CS rates.",
]))
story.append(PageBreak())

# ═══════════════════════════════════════════════════════════════════════════════
# SECTION 4 – RESEARCH QUESTIONS
# ═══════════════════════════════════════════════════════════════════════════════
story.append(section_heading("RESEARCH QUESTIONS", "4"))
story.append(spacer())
story.append(bullet([
    "What is the current incidence of CS deliveries at Garissa Provincial General Hospital?",
    "What are the documented clinical indications for CS at GPGH, and what proportion of primary CS "
    "has no documented medical indication?",
    "What sociodemographic characteristics (age, parity, education, residence, ANC attendance) are "
    "independently associated with CS delivery at GPGH?",
    "What health-system factors (referral status, time of admission, surgical team availability) are "
    "associated with the CS decision at GPGH?",
    "What is the trend in CS rates at GPGH over the past five years (2020–2024)?",
]))

# ═══════════════════════════════════════════════════════════════════════════════
# SECTION 5 – OBJECTIVES
# ═══════════════════════════════════════════════════════════════════════════════
story.append(section_heading("OBJECTIVES", "5"))
story.append(spacer())
story.append(sub_heading("5.1 Broad / General Objective"))
story.append(body(
    "To determine the factors associated with the rising incidence of caesarean section deliveries "
    "at Garissa Provincial General Hospital, Kenya."
))
story.append(sub_heading("5.2 Specific Objectives"))
story.append(bullet([
    "To determine the incidence and five-year trend of CS deliveries at GPGH (2020–2024).",
    "To identify the clinical indications documented for CS at GPGH and to determine the proportion "
    "of primary CS with no recorded medical indication.",
    "To assess the association between sociodemographic factors (maternal age, parity, education level, "
    "residence, ANC visits) and CS delivery at GPGH.",
    "To evaluate the role of health-system factors (referral status, hour of delivery, availability of "
    "specialist staff) in the decision to perform CS at GPGH.",
    "To compare CS rates stratified by parity, gestational age, and referral status.",
]))
story.append(PageBreak())

# ═══════════════════════════════════════════════════════════════════════════════
# SECTION 6 – LITERATURE REVIEW
# ═══════════════════════════════════════════════════════════════════════════════
story.append(section_heading("LITERATURE REVIEW", "6"))
story.append(spacer())
story.append(sub_heading("6.1 Global Trends in Caesarean Section"))
story.append(body(
    "The global CS rate has tripled from approximately 7% in 1990 to over 21% in 2015, representing "
    "29.7 million births annually (Boerma et al., 2018). The WHO (2021) projects this will reach "
    "28–30% by 2030 if current trends continue. The highest rates are in Latin America and the Caribbean "
    "(44.3%) and the lowest in West and Central Africa (4.1%). Globally, the rising proportion of "
    "facility-based deliveries accounts for 66.5% of the absolute increase in CS numbers, while "
    "increased CS use within facilities accounts for the remaining 33.5%."
))
story.append(sub_heading("6.2 CS Rates and Drivers in Sub-Saharan Africa"))
story.append(body(
    "Dumont et al.'s (2001) landmark systematic review across sub-Saharan Africa identified that "
    "three-quarters of all CS were performed for maternal indications. The six leading indications "
    "were: (1) protracted/obstructed labour, (2) abruptio placentae, (3) previous CS scar, "
    "(4) eclampsia, (5) placenta praevia, and (6) malpresentation. The authors estimated an optimal "
    "CS rate of 3.6–6.5% (median 5.4%) for West African populations — significantly above the "
    "observed 1.3%, indicating systemic under-use of life-saving CS in low-resource settings."
))
story.append(body(
    "A 20-year retrospective study in western Tanzania (Rapaport et al., 2024) of 8,461 CS procedures "
    "in an East African humanitarian setting found cephalopelvic disproportion (CPD), previous scar, "
    "and fetal distress as the top three indications — directly applicable to GPGH's case mix given "
    "comparable demographics, late-presentation patterns, and referral burdens."
))
story.append(sub_heading("6.3 Kenyan Evidence"))
story.append(body(
    "A Kenyan teaching-hospital analysis (van der Spek et al., 2020) of 12,209 deliveries found that "
    "43% of primary CS had no documented clinical indication in hospital records, and repeat CS was "
    "near-universal (99%). Socioeconomic differences in CS rates were largely explained by unnecessary "
    "primary CS and universal repeat CS after prior surgery. The authors recommended prevention of "
    "unnecessary primary CS and promotion of safe trial of labour."
))
story.append(body(
    "Arunda et al. (2020), analysing KDHS data for Kenya and Tanzania, found higher odds of CS among "
    "women from the richest households (aOR 1.4), those with health insurance (aOR 1.6), those with "
    "higher education (aOR 1.6), and managers/professionals (aOR 1.7), compared to their respective "
    "reference groups. However, CS was also associated with higher neonatal mortality overall — "
    "significance that disappeared after controlling for fetal risk factors and ANC visits, suggesting "
    "that medical complexity rather than the CS itself drove mortality."
))
story.append(body(
    "At Mama Lucy Kibaki Hospital, Nairobi (Juma et al., 2017), a case-control study found employment "
    "status and low birth weight as the two independent predictors of CS, reflecting urban patterns of "
    "demand-side CS use less likely to apply at GPGH."
))
story.append(sub_heading("6.4 Context of Garissa County"))
story.append(body(
    "GPGH is the sole Level 5 hospital in northern Kenya, serving Garissa, Wajir, and Mandera counties "
    "and acting as a teaching facility for clinical staff. Research on facility utilization at GPGH "
    "(Dabar, 2019) identified ANC attendance, hospital cleanliness, equipment availability, and "
    "proximity as determinants of delivery service utilization. The nomadic and semi-pastoralist "
    "lifestyle of the population (57% semi-pastoralism, 32% full nomadism), Islamic cultural norms, "
    "and poverty contribute to delayed presentations that increase emergency CS risk. No published study "
    "has directly examined CS incidence or its determinants at this institution."
))
story.append(PageBreak())

# ═══════════════════════════════════════════════════════════════════════════════
# SECTION 7 – METHODOLOGY
# ═══════════════════════════════════════════════════════════════════════════════
story.append(section_heading("RESEARCH METHODOLOGY", "7"))
story.append(spacer())

story.append(sub_heading("7.1 Study Design"))
story.append(body(
    "A hospital-based, retrospective cross-sectional study with an analytical component (case-control "
    "nested within the cross-section). Retrospective review of all delivery records from January 2020 "
    "to December 2024 will be undertaken, supplemented by prospective interviews of consenting mothers "
    "delivered at GPGH during the data-collection period."
))

story.append(sub_heading("7.2 Study Site"))
story.append(body(
    "Garissa Provincial General Hospital (Level 5), Garissa County, north-eastern Kenya. The hospital "
    "serves an estimated catchment population of over 1.5 million across Garissa, Wajir, and Mandera "
    "counties and several neighbouring counties."
))

story.append(sub_heading("7.3 Study Population"))
story.append(body(
    "<b>Target population:</b> All women who delivered at GPGH between January 2020 and December 2024. "
    "<b>Accessible population:</b> Women whose delivery records are available in the GPGH maternity register, "
    "theatre logbooks, and hospital information system."
))

story.append(sub_heading("7.4 Eligibility Criteria"))
story.append(sub_sub_heading("Inclusion Criteria"))
story.append(bullet([
    "All deliveries (vaginal and CS) recorded in GPGH maternity register, January 2020 – December 2024.",
    "Singleton and multiple pregnancies.",
    "Gestational age ≥ 28 weeks.",
    "Complete documentation of mode of delivery and at least one sociodemographic variable.",
]))
story.append(sub_sub_heading("Exclusion Criteria"))
story.append(bullet([
    "Records with incomplete or missing data on mode of delivery.",
    "Deliveries resulting in early pregnancy loss (< 28 weeks) not involving a CS.",
    "Women who delivered outside GPGH and were admitted post-partum.",
]))

story.append(sub_heading("7.5 Sample Size Determination"))
story.append(body(
    "Using the formula for estimating a proportion from a finite population (Cochran, 1977), with "
    "an assumed CS proportion of 25% (p = 0.25), margin of error of 5% (e = 0.05), and 95% confidence "
    "level (Z = 1.96):"
))
story.append(body(
    "<b>n₀ = Z² × p(1−p) / e² = (1.96)² × 0.25 × 0.75 / (0.05)² ≈ 288</b>"
))
story.append(body(
    "With a design effect of 1.5 for the retrospective component and 10% non-response allowance, "
    "the minimum sample is approximately <b>480 delivery records</b> for the cross-sectional analysis. "
    "For the retrospective trend analysis, all records from 2020–2024 will be included (estimated "
    "3,500–5,000 deliveries per year based on available facility data)."
))

story.append(sub_heading("7.6 Sampling Method"))
story.append(body(
    "For the cross-sectional/trend analysis: <b>census</b> of all eligible delivery records for "
    "2020–2024. For the prospective interview component: <b>systematic random sampling</b> — every "
    "3rd consenting mother admitted to the postnatal ward during the data-collection period."
))

story.append(sub_heading("7.7 Data Collection"))
story.append(sub_sub_heading("7.7.1 Secondary Data (Retrospective)"))
story.append(bullet([
    "Maternity register: mode of delivery, indication for CS, gestational age, parity, birth outcome.",
    "Theatre logbooks: time of CS, type (elective vs. emergency), primary vs. repeat CS.",
    "Hospital information system / patient files: maternal age, education, residence, ANC attendance.",
]))
story.append(sub_sub_heading("7.7.2 Primary Data (Prospective Interviews)"))
story.append(body(
    "A structured, interviewer-administered questionnaire will be developed in English and translated "
    "to Somali and Swahili. Variables collected will include: sociodemographic profile, obstetric history, "
    "ANC utilisation, referral status, maternal perceptions of CS, and birth preparedness."
))

story.append(sub_heading("7.8 Variables"))
data = [
    ["Variable Type", "Variables"],
    ["Dependent", "Mode of delivery (CS vs. vaginal)"],
    ["Independent – Obstetric", "Parity, gestational age, previous CS scar, presentation, fetal distress, APH, eclampsia, multiple gestation"],
    ["Independent – Sociodemographic", "Maternal age, education level, occupation, marital status, residence (urban/rural/nomadic), ANC visits"],
    ["Independent – Health-system", "Referral status (self vs. referred), day/hour of admission, surgeon availability, emergency vs. elective"],
]
var_table = Table(data, colWidths=[4.5*cm, 11*cm])
var_table.setStyle(TableStyle([
    ("BACKGROUND",   (0,0),(-1,0), DARK_BLUE),
    ("TEXTCOLOR",    (0,0),(-1,0), WHITE),
    ("FONTNAME",     (0,0),(-1,0), "Helvetica-Bold"),
    ("FONTNAME",     (0,1),(-1,-1), "Helvetica"),
    ("FONTSIZE",     (0,0),(-1,-1), 9),
    ("ROWBACKGROUNDS",(0,1),(-1,-1), [LIGHT_GREY, WHITE]),
    ("GRID",         (0,0),(-1,-1), 0.4, colors.grey),
    ("VALIGN",       (0,0),(-1,-1), "MIDDLE"),
    ("TOPPADDING",   (0,0),(-1,-1), 5),
    ("BOTTOMPADDING",(0,0),(-1,-1), 5),
    ("LEFTPADDING",  (0,0),(-1,-1), 6),
]))
story.append(spacer(0.2))
story.append(var_table)
story.append(spacer())

story.append(sub_heading("7.9 Data Management and Analysis"))
story.append(body(
    "Data will be entered into <b>SPSS version 25.0</b> (IBM Corp.) and verified by double-entry. "
    "Descriptive statistics (frequencies, proportions, means ± SD) will summarise the sample. "
    "The five-year CS trend will be tested using the <b>Cochran-Armitage test for trend</b>. "
    "Bivariate analysis (chi-square / Fisher's exact test for categorical variables; independent "
    "t-test or Mann-Whitney U for continuous variables) will identify candidate variables (p < 0.20) "
    "for multivariable logistic regression. A backward stepwise <b>binary logistic regression</b> model "
    "will determine independent predictors of CS (outcome: CS = 1, vaginal = 0), reporting adjusted "
    "odds ratios (aOR) with 95% confidence intervals. Statistical significance will be set at p < 0.05."
))
story.append(PageBreak())

# ═══════════════════════════════════════════════════════════════════════════════
# SECTION 8 – ETHICAL CONSIDERATIONS
# ═══════════════════════════════════════════════════════════════════════════════
story.append(section_heading("ETHICAL CONSIDERATIONS", "8"))
story.append(spacer())
story.append(bullet([
    "<b>Ethical approval:</b> Approval will be sought from the relevant Institutional Review Board (IRB) "
    "and from the Garissa County Health Department before data collection commences.",
    "<b>Informed consent:</b> Written informed consent will be obtained from all participants in the "
    "prospective interview component. Consent forms will be available in English, Swahili, and Somali.",
    "<b>Confidentiality:</b> All records and questionnaires will be anonymised using unique numeric "
    "identifiers. Personal identifiers will be stored separately under lock and key, accessible only "
    "to the principal investigator.",
    "<b>Voluntary participation:</b> Participation in the interview component is entirely voluntary; "
    "refusal or withdrawal will not affect the quality of care received.",
    "<b>Retrospective records:</b> Review of existing hospital records constitutes secondary use of "
    "routine clinical data and will be conducted with hospital management permission in compliance "
    "with data protection standards.",
    "<b>Risk minimisation:</b> This is a non-interventional, observational study. No experimental "
    "procedures will be performed on participants.",
    "<b>Benefit:</b> Findings will directly benefit future patients at GPGH by informing evidence-based "
    "clinical guidelines and CS reduction strategies.",
]))

# ═══════════════════════════════════════════════════════════════════════════════
# SECTION 9 – WORK PLAN
# ═══════════════════════════════════════════════════════════════════════════════
story.append(section_heading("WORK PLAN / GANTT CHART", "9"))
story.append(spacer())
story.append(body("Proposed timeline for study activities (12-month plan):"))
story.append(spacer(0.2))

months = ["M1", "M2", "M3", "M4", "M5", "M6", "M7", "M8", "M9", "M10", "M11", "M12"]
activities = [
    ("1", "Proposal writing & ethical approval", [1,1,1,0,0,0,0,0,0,0,0,0]),
    ("2", "Tool development & pretesting",         [0,0,1,1,0,0,0,0,0,0,0,0]),
    ("3", "Retrospective data extraction",          [0,0,0,1,1,1,0,0,0,0,0,0]),
    ("4", "Prospective data collection (interviews)",[0,0,0,0,1,1,1,0,0,0,0,0]),
    ("5", "Data entry & cleaning",                  [0,0,0,0,0,1,1,1,0,0,0,0]),
    ("6", "Data analysis",                          [0,0,0,0,0,0,0,1,1,0,0,0]),
    ("7", "Report writing",                         [0,0,0,0,0,0,0,0,1,1,0,0]),
    ("8", "Dissemination & submission",             [0,0,0,0,0,0,0,0,0,0,1,1]),
]

ACTIVE_COL = colors.HexColor("#005599")
INACTIVE_COL = colors.HexColor("#e8f0f8")

gantt_header = [["#", "Activity"] + months]
gantt_rows = []
for no, act, sched in activities:
    row_cells = []
    for active in sched:
        cell_para = Paragraph("■" if active else "", make_style(
            f"gantt_{no}_{active}", "Normal",
            fontSize=9, alignment=TA_CENTER,
            textColor=WHITE if active else INACTIVE_COL))
        row_cells.append(cell_para)
    gantt_rows.append([
        Paragraph(no, make_style("gcno","Normal",fontSize=8,alignment=TA_CENTER)),
        Paragraph(act, make_style("gcact","Normal",fontSize=8)),
    ] + row_cells)

all_gantt = gantt_header + [[
    Paragraph(str(r[0].text if hasattr(r[0],'text') else r[0]), make_style("gch","Normal",
        fontSize=8,textColor=WHITE,fontName="Helvetica-Bold",alignment=TA_CENTER))
    if i < 2 else
    Paragraph(r[2+j] if isinstance(r[2+j],str) else "", make_style("gchm","Normal",
        fontSize=8,textColor=WHITE,fontName="Helvetica-Bold",alignment=TA_CENTER))
    for i,(j,r) in enumerate([(0,row)] if False else [(0,0)])]
    for row in []]

# Build gantt table properly
gantt_header_row = [
    Paragraph("#", make_style("gh1","Normal",fontSize=8,textColor=WHITE,fontName="Helvetica-Bold",alignment=TA_CENTER)),
    Paragraph("Activity", make_style("gh2","Normal",fontSize=8,textColor=WHITE,fontName="Helvetica-Bold")),
] + [Paragraph(m, make_style(f"ghm{m}","Normal",fontSize=7,textColor=WHITE,fontName="Helvetica-Bold",alignment=TA_CENTER)) for m in months]

all_rows = [gantt_header_row]
for no, act, sched in activities:
    row = [
        Paragraph(no, make_style(f"gr{no}","Normal",fontSize=8,alignment=TA_CENTER)),
        Paragraph(act, make_style(f"ga{no}","Normal",fontSize=8)),
    ]
    for active in sched:
        row.append(Paragraph("", make_style(f"gc{no}{active}","Normal",fontSize=8)))
    all_rows.append(row)

col_widths = [0.6*cm, 5.2*cm] + [0.72*cm]*12
gantt_table = Table(all_rows, colWidths=col_widths)
gantt_style = [
    ("BACKGROUND",   (0,0),(-1,0), DARK_BLUE),
    ("TEXTCOLOR",    (0,0),(-1,0), WHITE),
    ("FONTSIZE",     (0,0),(-1,-1), 8),
    ("GRID",         (0,0),(-1,-1), 0.3, colors.lightgrey),
    ("ROWBACKGROUNDS",(0,1),(-1,-1), [LIGHT_GREY, WHITE]),
    ("TOPPADDING",   (0,0),(-1,-1), 3),
    ("BOTTOMPADDING",(0,0),(-1,-1), 3),
    ("LEFTPADDING",  (0,0),(-1,-1), 3),
    ("RIGHTPADDING", (0,0),(-1,-1), 3),
    ("VALIGN",       (0,0),(-1,-1), "MIDDLE"),
]
# Colour active cells
for row_i, (no, act, sched) in enumerate(activities, start=1):
    for col_i, active in enumerate(sched):
        if active:
            gantt_style.append(("BACKGROUND", (2+col_i, row_i), (2+col_i, row_i), ACTIVE_COL))

gantt_table.setStyle(TableStyle(gantt_style))
story.append(gantt_table)
story.append(PageBreak())

# ═══════════════════════════════════════════════════════════════════════════════
# SECTION 10 – BUDGET
# ═══════════════════════════════════════════════════════════════════════════════
story.append(section_heading("BUDGET ESTIMATE", "10"))
story.append(spacer())
story.append(body("Proposed budget in Kenya Shillings (KES):"))
story.append(spacer(0.2))

budget_data = [
    ["Item", "Unit", "Qty", "Unit Cost (KES)", "Total (KES)"],
    ["Stationery (registers, pens, folders)", "Set", "5", "500", "2,500"],
    ["Printing of data collection tools", "Pages", "500", "5", "2,500"],
    ["Pilot study / pretesting", "Day", "2", "2,000", "4,000"],
    ["Research assistant allowance", "Month", "3", "10,000", "30,000"],
    ["Transport (data collection & follow-up)", "Trip", "20", "500", "10,000"],
    ["Data entry & analysis (SPSS licence)", "Month", "2", "5,000", "10,000"],
    ["Report printing & binding", "Copy", "10", "500", "5,000"],
    ["Dissemination (presentation materials)", "Lump sum", "1", "5,000", "5,000"],
    ["Contingency (10%)", "", "", "", "6,900"],
    ["TOTAL", "", "", "", "75,900"],
]
col_w = [6.0*cm, 2.5*cm, 1.2*cm, 3.0*cm, 2.8*cm]
budget_table = Table(budget_data, colWidths=col_w)
budget_table.setStyle(TableStyle([
    ("BACKGROUND",   (0,0),(-1,0), DARK_BLUE),
    ("TEXTCOLOR",    (0,0),(-1,0), WHITE),
    ("FONTNAME",     (0,0),(-1,0), "Helvetica-Bold"),
    ("FONTNAME",     (0,-1),(-1,-1), "Helvetica-Bold"),
    ("BACKGROUND",   (0,-1),(-1,-1), LIGHT_BLUE),
    ("GRID",         (0,0),(-1,-1), 0.4, colors.grey),
    ("ROWBACKGROUNDS",(0,1),(-1,-2), [LIGHT_GREY, WHITE]),
    ("FONTSIZE",     (0,0),(-1,-1), 9),
    ("ALIGN",        (2,0),(-1,-1), "RIGHT"),
    ("TOPPADDING",   (0,0),(-1,-1), 5),
    ("BOTTOMPADDING",(0,0),(-1,-1), 5),
    ("LEFTPADDING",  (0,0),(-1,-1), 6),
]))
story.append(budget_table)
story.append(PageBreak())

# ═══════════════════════════════════════════════════════════════════════════════
# SECTION 11 – REFERENCES
# ═══════════════════════════════════════════════════════════════════════════════
story.append(section_heading("REFERENCES", "11"))
story.append(spacer())

refs = [
    "Arunda, M. O., Agardh, A., & Asamoah, B. O. (2020). Cesarean delivery and associated socioeconomic "
    "factors and neonatal survival outcome in Kenya and Tanzania: analysis of national survey data. "
    "<i>Global Health Action, 13</i>(1), 1748403. https://doi.org/10.1080/16549716.2020.1748403 "
    "[PMID: 32345146]",

    "Boerma, T., Ronsmans, C., Melesse, D. Y., Barros, A. J. D., Barros, F. C., Juan, L., … Temmerman, M. "
    "(2018). Global epidemiology of use of and disparities in caesarean sections. "
    "<i>The Lancet, 392</i>(10155), 1341–1348. https://doi.org/10.1016/S0140-6736(18)31928-7 "
    "[PMID: 30322584]",

    "Dabar, M. (2019). <i>Factors affecting utilization of hospital delivery services at Garissa Provincial "
    "General Hospital</i> (MSc Public Health dissertation). Jomo Kenyatta University of Agriculture and "
    "Technology, Kenya. Retrieved from http://ir.jkuat.ac.ke/handle/123456789/5280",

    "Dumont, A., de Bernis, L., Bouvier-Colle, M. H., & Bréart, G. (2001). Caesarean section rate for "
    "maternal indication in sub-Saharan Africa: a systematic review. "
    "<i>The Lancet, 358</i>(9290), 1328–1333. https://doi.org/10.1016/S0140-6736(01)06414-5 "
    "[PMID: 11684214]",

    "Juma, S., Nyambati, V., Karama, M., Githuku, J., & Gura, Z. (2017). Factors associated with "
    "caesarean sections among mothers delivering at Mama Lucy Kibaki Hospital, Nairobi, Kenya between "
    "January and March 2015: a case-control study. "
    "<i>Pan African Medical Journal, 28</i>(Suppl 1), 7. "
    "https://doi.org/10.11604/pamj.supp.2017.28.1.9290",

    "Kenya National Bureau of Statistics. (2023). <i>2022 Kenya Demographic and Health Survey: Key "
    "Indicators Report</i>. Nairobi: KNBS / DHS Program. "
    "Retrieved from https://dhsprogram.com/pubs/pdf/SR277/SR277.pdf",

    "Kibe, P. M., Mbuthia, G. W., Shikuku, D. N., Akoth, C., Oguta, J. O., & Ng'ang'a, L. (2022). "
    "Prevalence and factors associated with caesarean section in Rwanda: a trend analysis of Rwanda "
    "demographic and health survey 2000 to 2019–20. "
    "<i>BMC Pregnancy and Childbirth, 22</i>(1), 424. "
    "https://doi.org/10.1186/s12884-022-04679-y [PMID: 35578320]",

    "Rapaport, S., Ngude, H., Chen, C. C. G., Abbas, M., Lekey, A., & Winch, P. J. (2024). Caesarean "
    "sections among East African refugees and their host population: a 20-year retrospective study in "
    "western Tanzania. <i>African Health Sciences, 24</i>(4). "
    "https://doi.org/10.4314/ahs.v24i4.27 [PMID: 40190504]",

    "Sandall, J., Tribe, R. M., Avery, L., et al. (2018). Short-term and long-term effects of caesarean "
    "section on the health of women and children. "
    "<i>The Lancet, 392</i>(10155), 1349–1357. https://doi.org/10.1016/S0140-6736(18)31930-5 "
    "[PMID: 30322585]",

    "van der Spek, L., Sanglier, S., Mabeya, H. M., van den Akker, T., Mertens, P. L. J. M., & "
    "Houweling, T. A. J. (2020). Socioeconomic differences in caesarean section — are they explained "
    "by medical need? An analysis of patient record data of a large Kenyan hospital. "
    "<i>International Journal for Equity in Health, 19</i>(1), 118. "
    "https://doi.org/10.1186/s12939-020-01215-2 [PMID: 32641057]",

    "World Health Organization. (2021, June 16). <i>Caesarean section rates continue to rise, amid "
    "growing inequalities in access</i>. WHO News. "
    "Retrieved from https://www.who.int/news/item/16-06-2021-caesarean-section-rates-continue-to-rise-"
    "amid-growing-inequalities-in-access",
]

for i, ref in enumerate(refs, 1):
    story.append(Paragraph(f"{i}.&nbsp;&nbsp;{ref}", ref_style))
    story.append(spacer(0.15))

# ═══════════════════════════════════════════════════════════════════════════════
# PAGE NUMBERS via onFirstPage / onLaterPages
# ═══════════════════════════════════════════════════════════════════════════════
def add_page_number(canvas, doc):
    canvas.saveState()
    # Footer bar
    canvas.setFillColor(DARK_BLUE)
    canvas.rect(2.5*cm, 1.5*cm, 16*cm, 0.5*cm, fill=1, stroke=0)
    canvas.setFont("Helvetica", 8)
    canvas.setFillColor(WHITE)
    canvas.drawString(3*cm, 1.68*cm, "ABDINASIR ALI | Reg: D/CM/24017/862")
    canvas.drawRightString(18.5*cm, 1.68*cm, f"Page {doc.page}")
    canvas.restoreState()

# ─── Build PDF ───────────────────────────────────────────────────────────────
doc.build(story, onFirstPage=add_page_number, onLaterPages=add_page_number)
print(f"PDF generated: {OUTPUT}")
Your credits are exhausted. Your daily credits reset tomorrow, or you can purchase a top-up for more.
This is a shared conversation. Sign in to Orris to start your own chat.