Aurangabad, Graham of health care delivery in India. Aurangabad, not Aurangabad. Organogram.
organogram health care delivery system India structure levels


State Health Minister
↓
State Health Secretary
↓
Director of Health Services (DHS)
↓
┌───┴───────────────────────┐
Deputy DHS Deputy DHS
(Medical Care) (Public Health)
↓ ↓
Divisional Health Divisional Officers
Officers
↓
District Health Officer (DHO) / Civil Surgeon
| Level | Facility | Population Served |
|---|---|---|
| District | District Hospital | 1,00,000 - several lakhs |
| Sub-District/Taluk | Sub-District Hospital / CHC | 80,000 - 1,20,000 |
| Block | Community Health Centre (CHC) | 80,000 - 1,20,000 |
| Rural | Primary Health Centre (PHC) | 20,000 - 30,000 |
| Village | Sub-Health Centre (SHC) | 3,000 - 5,000 |
| Grassroots | ASHA / Anganwadi Worker | ~1,000 population |
District Collector / DM
↓
District Health Officer (DHO) / Chief Medical Officer (CMO)
↓
Block Medical Officer (BMO)
↓
Medical Officer In-Charge (PHC)
↓
Health Assistant (Male + Female)
↓
ANM (Auxiliary Nurse Midwife) / MPW (Multi-Purpose Worker)
↓
ASHA (Accredited Social Health Activist)
| Level | Type | Facility |
|---|---|---|
| Primary | First contact, preventive + basic curative | Sub-Centre, PHC |
| Secondary | Referral care, specialist services | CHC, District Hospital |
| Tertiary | Super-specialist, teaching hospitals | Medical College Hospitals, AIIMS |
MoHFW (Central)
↓
State Health Department
↓
District Health Office
↓
Community Health Centre (CHC) - Block level
↓
Primary Health Centre (PHC) - Rural level
↓
Sub-Health Centre - Village level
↓
ASHA / Anganwadi - Grassroots
Make pdf
mkdir -p /tmp/workspace/healthcare-india && ls /tmp/workspace/healthcare-india/
~/healthcare-india/generate_pdf.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm, mm
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
HRFlowable, KeepTogether
)
from reportlab.lib.enums import TA_CENTER, TA_LEFT
from reportlab.graphics.shapes import Drawing, Rect, String, Line, Arrow
from reportlab.graphics import renderPDF
from reportlab.platypus.flowables import Flowable
OUTPUT = "/tmp/workspace/healthcare-india/Organogram_Healthcare_India.pdf"
doc = SimpleDocTemplate(
OUTPUT,
pagesize=A4,
topMargin=1.8*cm,
bottomMargin=1.8*cm,
leftMargin=2*cm,
rightMargin=2*cm,
)
W, H = A4
styles = getSampleStyleSheet()
# --- Custom Styles ---
title_style = ParagraphStyle(
"Title", parent=styles["Title"],
fontSize=18, textColor=colors.HexColor("#1a3a5c"),
spaceAfter=4, spaceBefore=0, alignment=TA_CENTER,
fontName="Helvetica-Bold"
)
subtitle_style = ParagraphStyle(
"Subtitle", parent=styles["Normal"],
fontSize=11, textColor=colors.HexColor("#2e6da4"),
spaceAfter=10, alignment=TA_CENTER, fontName="Helvetica-Oblique"
)
section_style = ParagraphStyle(
"Section", parent=styles["Normal"],
fontSize=13, textColor=colors.white,
fontName="Helvetica-Bold", alignment=TA_CENTER,
spaceAfter=0, spaceBefore=0
)
body_style = ParagraphStyle(
"Body", parent=styles["Normal"],
fontSize=9.5, textColor=colors.HexColor("#222222"),
spaceAfter=4, leading=14
)
small_style = ParagraphStyle(
"Small", parent=styles["Normal"],
fontSize=8.5, textColor=colors.HexColor("#333333"),
spaceAfter=2, leading=12
)
note_style = ParagraphStyle(
"Note", parent=styles["Normal"],
fontSize=8, textColor=colors.HexColor("#555555"),
spaceAfter=4, leading=12, fontName="Helvetica-Oblique"
)
# -----------------------------------------------------------------------
# Helper: section header banner
# -----------------------------------------------------------------------
def section_banner(text, bg=colors.HexColor("#1a3a5c")):
data = [[Paragraph(text, section_style)]]
t = Table(data, colWidths=[doc.width])
t.setStyle(TableStyle([
("BACKGROUND", (0, 0), (-1, -1), bg),
("TOPPADDING", (0, 0), (-1, -1), 6),
("BOTTOMPADDING", (0, 0), (-1, -1), 6),
("LEFTPADDING", (0, 0), (-1, -1), 8),
("RIGHTPADDING", (0, 0), (-1, -1), 8),
]))
return t
# -----------------------------------------------------------------------
# Helper: org-chart box row (label, arrow-down implied)
# -----------------------------------------------------------------------
BOX_COLORS = {
"central": colors.HexColor("#2e6da4"),
"state": colors.HexColor("#217a3c"),
"district": colors.HexColor("#b05a00"),
"field": colors.HexColor("#7b3fa0"),
"grey": colors.HexColor("#5a6a7a"),
}
def org_box(text, level="central", width=None, small=False):
bg = BOX_COLORS.get(level, colors.HexColor("#2e6da4"))
fs = 8 if small else 9.5
st = ParagraphStyle("ob", fontName="Helvetica-Bold", fontSize=fs,
textColor=colors.white, alignment=TA_CENTER, leading=13)
w = width or doc.width * 0.55
data = [[Paragraph(text, st)]]
t = Table(data, colWidths=[w])
t.setStyle(TableStyle([
("BACKGROUND", (0, 0), (-1, -1), bg),
("TOPPADDING", (0, 0), (-1, -1), 5),
("BOTTOMPADDING", (0, 0), (-1, -1), 5),
("LEFTPADDING", (0, 0), (-1, -1), 6),
("RIGHTPADDING", (0, 0), (-1, -1), 6),
("ROUNDEDCORNERS", (0, 0), (-1, -1), [4, 4, 4, 4]),
]))
return t
def arrow_down():
return Paragraph("<para alignment='center'><font size='12' color='#555555'>▼</font></para>", styles["Normal"])
def centered(flowable):
"""Wrap a flowable in a 1-cell centered table."""
w = getattr(flowable, '_width', None) or doc.width * 0.55
data = [[flowable]]
t = Table(data, colWidths=[doc.width])
t.setStyle(TableStyle([
("ALIGN", (0, 0), (-1, -1), "CENTER"),
("VALIGN", (0, 0), (-1, -1), "MIDDLE"),
("TOPPADDING", (0, 0), (-1, -1), 0),
("BOTTOMPADDING", (0, 0), (-1, -1), 0),
]))
return t
# -----------------------------------------------------------------------
# Build story
# -----------------------------------------------------------------------
story = []
# --- Title ---
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph("Organogram of Health Care Delivery in India", title_style))
story.append(Paragraph("Administrative Structure from Central to Grassroots Level", subtitle_style))
story.append(HRFlowable(width="100%", thickness=2, color=colors.HexColor("#2e6da4")))
story.append(Spacer(1, 0.4*cm))
# -----------------------------------------------------------------------
# SECTION 1: OVERVIEW
# -----------------------------------------------------------------------
story.append(section_banner("OVERVIEW"))
story.append(Spacer(1, 0.3*cm))
overview_text = (
"India's health care delivery system is organized under the <b>Ministry of Health and Family Welfare (MoHFW)</b> "
"at the national level. The Constitution places health primarily as a <b>State subject</b>, so each state manages "
"its own services. The central government is responsible for policy, planning, guiding, assisting, evaluating, "
"and coordinating state health ministries. The system operates through a <b>three-tier structure</b>: "
"<b>Central → State → District/Peripheral</b>, with frontline delivery reaching down to the village level."
)
story.append(Paragraph(overview_text, body_style))
story.append(Spacer(1, 0.4*cm))
# -----------------------------------------------------------------------
# SECTION 2: CENTRAL LEVEL
# -----------------------------------------------------------------------
story.append(section_banner("TIER 1 — CENTRAL LEVEL", bg=BOX_COLORS["central"]))
story.append(Spacer(1, 0.3*cm))
# Central org-chart
central_rows = [
["Ministry of Health and Family Welfare (MoHFW)", "central"],
["▼", None],
["Three Main Arms", "grey"],
]
# Three-column table for the three arms
arm_style = ParagraphStyle("arm", fontName="Helvetica-Bold", fontSize=8.5,
textColor=colors.white, alignment=TA_CENTER, leading=12)
arm_bg = BOX_COLORS["central"]
arm_data = [[
Paragraph("A. Union Ministry of\nHealth & FW", arm_style),
Paragraph("B. Central Council of\nHealth & FW", arm_style),
Paragraph("C. Directorate General\nof Health Services (DGHS)", arm_style),
]]
arm_w = doc.width / 3 - 3*mm
arms_table = Table(arm_data, colWidths=[arm_w, arm_w, arm_w], spaceBefore=0)
arms_table.setStyle(TableStyle([
("BACKGROUND", (0, 0), (0, 0), BOX_COLORS["central"]),
("BACKGROUND", (1, 0), (1, 0), colors.HexColor("#1a5c8a"]),
("BACKGROUND", (2, 0), (2, 0), colors.HexColor("#0d3d6b"]),
("TOPPADDING", (0, 0), (-1, -1), 7),
("BOTTOMPADDING", (0, 0), (-1, -1), 7),
("LEFTPADDING", (0, 0), (-1, -1), 4),
("RIGHTPADDING", (0, 0), (-1, -1), 4),
("COLPADDING", (0, 0), (-1, -1), 4),
("GRID", (0, 0), (-1, -1), 1, colors.white),
("VALIGN", (0, 0), (-1, -1), "MIDDLE"),
]))
story.append(centered(org_box("Ministry of Health and Family Welfare (MoHFW)", "central", width=doc.width*0.7)))
story.append(Spacer(1, 1*mm))
story.append(arrow_down())
story.append(Spacer(1, 1*mm))
story.append(arms_table)
story.append(Spacer(1, 0.3*cm))
# Sub-breakdown
sub_central = [
["A: Union Ministry", "Dept of Health\nSecy → Jt Secy → Dy Secy → Admin Staff",
"Dept of FW\nCommr/Directors → Jt Director → Dy Director → Admin Staff"],
["B: Central Council", "Chaired by Union Health Minister;\nincludes Health Ministers of all States;\nsets national health policy", ""],
["C: DGHS", "Additional DGHS\n ↓\nDeputy DGHS (Medical Care & Hospitals)\n → Nursing Advisor → Dy Nursing Advisor",
"Deputy DGHS (Public Health)\nDeputy DGHS (General Administration)"],
]
hdr_s = ParagraphStyle("hdr", fontName="Helvetica-Bold", fontSize=8, textColor=colors.white, leading=11)
cell_s = ParagraphStyle("cell", fontName="Helvetica", fontSize=8, textColor=colors.HexColor("#111"), leading=11)
sub_data = [
[Paragraph("<b>Component</b>", hdr_s), Paragraph("<b>Structure (Left/Main)</b>", hdr_s), Paragraph("<b>Structure (Right/Additional)</b>", hdr_s)],
]
for row in sub_central:
sub_data.append([Paragraph(row[0], cell_s), Paragraph(row[1], cell_s), Paragraph(row[2], cell_s)])
sub_table = Table(sub_data, colWidths=[3.5*cm, 7.5*cm, 5.5*cm])
sub_table.setStyle(TableStyle([
("BACKGROUND", (0, 0), (-1, 0), BOX_COLORS["central"]),
("BACKGROUND", (0, 1), (0, -1), colors.HexColor("#d6e4f0")),
("BACKGROUND", (1, 1), (-1, -1), colors.HexColor("#eef5fb")),
("GRID", (0, 0), (-1, -1), 0.5, colors.HexColor("#aaaaaa")),
("TOPPADDING", (0, 0), (-1, -1), 5),
("BOTTOMPADDING", (0, 0), (-1, -1), 5),
("LEFTPADDING", (0, 0), (-1, -1), 5),
("RIGHTPADDING", (0, 0), (-1, -1), 5),
("VALIGN", (0, 0), (-1, -1), "TOP"),
("SPAN", (1, 2), (2, 2)), # Central Council spans 2 cols
]))
story.append(sub_table)
story.append(Spacer(1, 0.5*cm))
# -----------------------------------------------------------------------
# SECTION 3: STATE LEVEL
# -----------------------------------------------------------------------
story.append(section_banner("TIER 2 — STATE LEVEL", bg=BOX_COLORS["state"]))
story.append(Spacer(1, 0.3*cm))
state_para = (
"Each state manages its own health services independently. The typical state-level organogram is:"
)
story.append(Paragraph(state_para, body_style))
story.append(Spacer(1, 0.2*cm))
state_chain = [
"State Health Minister",
"State Health Secretary",
"Director of Health Services (DHS)",
"Deputy DHS — Medical Care | Deputy DHS — Public Health",
"Divisional Health Officers",
"District Health Officer (DHO) / Civil Surgeon",
]
for i, box in enumerate(state_chain):
story.append(centered(org_box(box, "state", width=doc.width * 0.72)))
if i < len(state_chain) - 1:
story.append(arrow_down())
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph("Each state also mirrors a <b>State Council of Health</b>, analogous to the Central Council.", note_style))
story.append(Spacer(1, 0.5*cm))
# -----------------------------------------------------------------------
# SECTION 4: DISTRICT & PERIPHERAL LEVEL
# -----------------------------------------------------------------------
story.append(section_banner("TIER 3 — DISTRICT & PERIPHERAL LEVEL", bg=BOX_COLORS["district"]))
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph(
"The district is the basic administrative unit. Health care is delivered through a cascading "
"sub-tier system from district hospital down to the grassroots ASHA worker:",
body_style
))
story.append(Spacer(1, 0.2*cm))
district_chain = [
("District Collector / District Magistrate (DM)", "district"),
("District Health Officer (DHO) / Chief Medical Officer (CMO)", "district"),
("Block Medical Officer (BMO)", "district"),
("Medical Officer In-Charge — Primary Health Centre (PHC)", "district"),
("Health Assistant (Male + Female) / LHV", "district"),
("ANM (Auxiliary Nurse Midwife) / MPW (Multi-Purpose Worker)", "field"),
("ASHA (Accredited Social Health Activist) / Anganwadi Worker", "field"),
]
for i, (box, lev) in enumerate(district_chain):
story.append(centered(org_box(box, lev, width=doc.width * 0.75)))
if i < len(district_chain) - 1:
story.append(arrow_down())
story.append(Spacer(1, 0.5*cm))
# -----------------------------------------------------------------------
# SECTION 5: LEVELS OF CARE TABLE
# -----------------------------------------------------------------------
story.append(section_banner("LEVELS OF HEALTH CARE — FACILITIES & POPULATION NORMS", bg=colors.HexColor("#4a4a7a"]))
story.append(Spacer(1, 0.3*cm))
th = ParagraphStyle("th", fontName="Helvetica-Bold", fontSize=8.5, textColor=colors.white, leading=12, alignment=TA_CENTER)
tc = ParagraphStyle("tc", fontName="Helvetica", fontSize=8.5, textColor=colors.HexColor("#111"), leading=12)
levels_data = [
[Paragraph("Level", th), Paragraph("Type of Care", th), Paragraph("Facility", th), Paragraph("Population Served", th)],
[Paragraph("Primary", tc), Paragraph("First contact\nPreventive + basic curative", tc),
Paragraph("Sub-Health Centre (SHC)\nPrimary Health Centre (PHC)", tc),
Paragraph("SHC: 3,000–5,000\nPHC: 20,000–30,000", tc)],
[Paragraph("Secondary", tc), Paragraph("Referral care\nSpecialist services", tc),
Paragraph("Community Health Centre (CHC)\nSub-District / District Hospital", tc),
Paragraph("CHC: 80,000–1,20,000\nDistrict Hospital: 1 lakh+", tc)],
[Paragraph("Tertiary", tc), Paragraph("Super-specialist\nTeaching & research", tc),
Paragraph("Medical College Hospitals\nAIIMS & apex institutions", tc),
Paragraph("Regional / National", tc)],
]
levels_table = Table(levels_data, colWidths=[2.5*cm, 4.5*cm, 6*cm, 3.5*cm])
levels_table.setStyle(TableStyle([
("BACKGROUND", (0, 0), (-1, 0), colors.HexColor("#4a4a7a")),
("BACKGROUND", (0, 1), (-1, 1), colors.HexColor("#e8f4e8")),
("BACKGROUND", (0, 2), (-1, 2), colors.HexColor("#fff3e0")),
("BACKGROUND", (0, 3), (-1, 3), colors.HexColor("#fce4ec")),
("GRID", (0, 0), (-1, -1), 0.5, colors.HexColor("#aaaaaa")),
("TOPPADDING", (0, 0), (-1, -1), 5),
("BOTTOMPADDING", (0, 0), (-1, -1), 5),
("LEFTPADDING", (0, 0), (-1, -1), 5),
("RIGHTPADDING", (0, 0), (-1, -1), 5),
("VALIGN", (0, 0), (-1, -1), "MIDDLE"),
("ALIGN", (0, 0), (-1, 0), "CENTER"),
]))
story.append(levels_table)
story.append(Spacer(1, 0.5*cm))
# -----------------------------------------------------------------------
# SECTION 6: KEY PROGRAMS
# -----------------------------------------------------------------------
story.append(section_banner("KEY NATIONAL PROGRAMS OVERLAYING THE STRUCTURE", bg=colors.HexColor("#5a6a7a")))
story.append(Spacer(1, 0.3*cm))
programs = [
("<b>NHM</b> — National Health Mission", "Coordinates NRHM (rural) and NUHM (urban) health services across all tiers."),
("<b>AB PM-JAY</b> — Ayushman Bharat Pradhan Mantri Jan Arogya Yojana", "Health insurance scheme providing free secondary/tertiary hospitalization via Ayushman cards."),
("<b>CGHS</b> — Central Government Health Scheme", "Covers central government employees and pensioners for comprehensive care."),
("<b>AYUSH</b>", "Parallel system integrating Ayurveda, Yoga, Unani, Siddha, and Homeopathy into the public network."),
("<b>ASHA Programme</b>", "Community health workers serving ~1,000 population each; first link between community and the formal health system."),
]
prog_data = []
for prog, desc in programs:
prog_data.append([Paragraph(prog, ParagraphStyle("pb", fontName="Helvetica-Bold", fontSize=8.5, textColor=colors.HexColor("#1a3a5c"), leading=12)),
Paragraph(desc, small_style)])
prog_table = Table(prog_data, colWidths=[5.5*cm, 11*cm])
prog_table.setStyle(TableStyle([
("BACKGROUND", (0, 0), (0, -1), colors.HexColor("#e8eef5")),
("BACKGROUND", (1, 0), (1, -1), colors.HexColor("#f7f9fc")),
("GRID", (0, 0), (-1, -1), 0.5, colors.HexColor("#cccccc")),
("TOPPADDING", (0, 0), (-1, -1), 5),
("BOTTOMPADDING", (0, 0), (-1, -1), 5),
("LEFTPADDING", (0, 0), (-1, -1), 6),
("RIGHTPADDING", (0, 0), (-1, -1), 6),
("VALIGN", (0, 0), (-1, -1), "TOP"),
("ROWBACKGROUNDS", (0, 0), (-1, -1), [colors.HexColor("#e8eef5"), colors.HexColor("#f0f4f9")]),
]))
story.append(prog_table)
story.append(Spacer(1, 0.5*cm))
# -----------------------------------------------------------------------
# SECTION 7: Summary flow
# -----------------------------------------------------------------------
story.append(section_banner("SUMMARY FLOW — CENTRAL TO GRASSROOTS", bg=colors.HexColor("#2e6da4")))
story.append(Spacer(1, 0.3*cm))
flow_items = [
("MoHFW — Central Government", "central"),
("State Health Department", "state"),
("District Health Office (DHO/CMO)", "district"),
("Community Health Centre (CHC) — Block Level", "district"),
("Primary Health Centre (PHC) — Rural Level", "district"),
("Sub-Health Centre — Village Level", "field"),
("ASHA / Anganwadi Worker — Grassroots", "field"),
]
for i, (label, lev) in enumerate(flow_items):
story.append(centered(org_box(label, lev, width=doc.width * 0.65, small=True)))
if i < len(flow_items) - 1:
story.append(arrow_down())
story.append(Spacer(1, 0.5*cm))
story.append(HRFlowable(width="100%", thickness=1, color=colors.HexColor("#aaaaaa")))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(
"Sources: Ministry of Health and Family Welfare (MoHFW), Government of India | "
"National Health Mission (NHM) Framework | Commonwealth Fund India Health Profile 2024 | "
"Wikipedia — Healthcare in India",
note_style
))
# -----------------------------------------------------------------------
# Build
# -----------------------------------------------------------------------
doc.build(story)
print(f"PDF created: {OUTPUT}")
cd /tmp/workspace/healthcare-india && python generate_pdf.py 2>&1
~/healthcare-india/generate_pdf.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/healthcare-india/generate_pdf.py'
cd /tmp/workspace/healthcare-india && python generate_pdf.py 2>&1
~/healthcare-india/generate_pdf.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm, mm
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, HRFlowable
)
from reportlab.lib.enums import TA_CENTER, TA_LEFT
OUTPUT = "/tmp/workspace/healthcare-india/Organogram_Healthcare_India.pdf"
doc = SimpleDocTemplate(
OUTPUT,
pagesize=A4,
topMargin=1.8*cm, bottomMargin=1.8*cm,
leftMargin=2*cm, rightMargin=2*cm,
)
W, H = A4
styles = getSampleStyleSheet()
# ---- Styles ----
title_style = ParagraphStyle("MyTitle",
fontSize=17, textColor=colors.HexColor("#1a3a5c"),
spaceAfter=4, spaceBefore=0, alignment=TA_CENTER, fontName="Helvetica-Bold")
subtitle_style = ParagraphStyle("MySub",
fontSize=10, textColor=colors.HexColor("#2e6da4"),
spaceAfter=10, alignment=TA_CENTER, fontName="Helvetica-Oblique")
body_style = ParagraphStyle("MyBody",
fontSize=9, textColor=colors.HexColor("#222222"),
spaceAfter=4, leading=14)
small_style = ParagraphStyle("MySmall",
fontSize=8.5, textColor=colors.HexColor("#333333"),
spaceAfter=2, leading=12)
note_style = ParagraphStyle("MyNote",
fontSize=7.5, textColor=colors.HexColor("#666666"),
spaceAfter=4, leading=11, fontName="Helvetica-Oblique")
box_bold = ParagraphStyle("BoxBold",
fontName="Helvetica-Bold", fontSize=9, textColor=colors.white,
alignment=TA_CENTER, leading=13)
box_small = ParagraphStyle("BoxSmall",
fontName="Helvetica-Bold", fontSize=8, textColor=colors.white,
alignment=TA_CENTER, leading=12)
hdr_style = ParagraphStyle("Hdr",
fontName="Helvetica-Bold", fontSize=8.5, textColor=colors.white,
leading=12, alignment=TA_CENTER)
cell_style = ParagraphStyle("Cell",
fontName="Helvetica", fontSize=8, textColor=colors.HexColor("#111111"),
leading=11)
# ---- Color palette ----
C_CENTRAL = colors.HexColor("#2e6da4")
C_STATE = colors.HexColor("#217a3c")
C_DISTRICT = colors.HexColor("#b05a00")
C_FIELD = colors.HexColor("#7b3fa0")
C_GREY = colors.HexColor("#5a6a7a")
C_DARK = colors.HexColor("#1a3a5c")
C_PURPLE = colors.HexColor("#4a4a7a")
COLOR_MAP = {
"central": C_CENTRAL,
"state": C_STATE,
"district": C_DISTRICT,
"field": C_FIELD,
"grey": C_GREY,
}
# ---- Helpers ----
def section_banner(text, bg=C_DARK):
st = ParagraphStyle("SB", fontName="Helvetica-Bold", fontSize=11,
textColor=colors.white, alignment=TA_CENTER, leading=14)
data = [[Paragraph(text, st)]]
t = Table(data, colWidths=[doc.width])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), bg),
("TOPPADDING", (0,0), (-1,-1), 6),
("BOTTOMPADDING", (0,0), (-1,-1), 6),
("LEFTPADDING", (0,0), (-1,-1), 8),
("RIGHTPADDING", (0,0), (-1,-1), 8),
]))
return t
def org_box(text, level="central", width=None, small=False):
bg = COLOR_MAP.get(level, C_CENTRAL)
st = box_small if small else box_bold
w = width if width else doc.width * 0.60
t = Table([[Paragraph(text, st)]], colWidths=[w])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), bg),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 6),
("RIGHTPADDING", (0,0), (-1,-1), 6),
]))
return t
def centered_box(box_flowable):
"""Centre a fixed-width box inside a full-width table row."""
t = Table([[box_flowable]], colWidths=[doc.width])
t.setStyle(TableStyle([
("ALIGN", (0,0), (-1,-1), "CENTER"),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("TOPPADDING", (0,0), (-1,-1), 0),
("BOTTOMPADDING", (0,0), (-1,-1), 0),
]))
return t
def arrow():
return Paragraph(
"<para alignment='center'><font size='11' color='#666666'>▼</font></para>",
styles["Normal"]
)
# -----------------------------------------------------------------------
# Story
# -----------------------------------------------------------------------
story = []
# Title
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph("Organogram of Health Care Delivery in India", title_style))
story.append(Paragraph("Administrative Structure — Central to Grassroots Level", subtitle_style))
story.append(HRFlowable(width="100%", thickness=2, color=C_CENTRAL))
story.append(Spacer(1, 0.4*cm))
# ---- OVERVIEW ----
story.append(section_banner("OVERVIEW"))
story.append(Spacer(1, 0.25*cm))
story.append(Paragraph(
"India's health care delivery system is organised under the <b>Ministry of Health and Family Welfare (MoHFW)</b> "
"at the national level. Health is a <b>State subject</b> under the Constitution, so each state manages its own services "
"independently. The central government handles policy, planning, guiding, evaluating, and coordination. "
"The system operates through a <b>three-tier structure</b>: <b>Central → State → District/Peripheral</b>, "
"with frontline delivery reaching down to the village level through ASHAs and Anganwadi workers.",
body_style
))
story.append(Spacer(1, 0.4*cm))
# ---- TIER 1: CENTRAL ----
story.append(section_banner("TIER 1 — CENTRAL LEVEL", bg=C_CENTRAL))
story.append(Spacer(1, 0.25*cm))
story.append(centered_box(org_box("Ministry of Health and Family Welfare (MoHFW)", "central", width=doc.width*0.72)))
story.append(arrow())
# Three arms side by side
a1 = ParagraphStyle("A1", fontName="Helvetica-Bold", fontSize=8, textColor=colors.white,
alignment=TA_CENTER, leading=12)
aw = doc.width / 3 - 3*mm
arms = Table(
[[
Paragraph("A. Union Ministry of\nHealth & Family Welfare", a1),
Paragraph("B. Central Council of\nHealth & Family Welfare", a1),
Paragraph("C. Directorate General of\nHealth Services (DGHS)", a1),
]],
colWidths=[aw, aw, aw]
)
arms.setStyle(TableStyle([
("BACKGROUND", (0,0), (0,0), C_CENTRAL),
("BACKGROUND", (1,0), (1,0), colors.HexColor("#1a5c8a")),
("BACKGROUND", (2,0), (2,0), colors.HexColor("#0d3d6b")),
("TOPPADDING", (0,0), (-1,-1), 7),
("BOTTOMPADDING", (0,0), (-1,-1), 7),
("LEFTPADDING", (0,0), (-1,-1), 4),
("RIGHTPADDING", (0,0), (-1,-1), 4),
("GRID", (0,0), (-1,-1), 1, colors.white),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
]))
story.append(arms)
story.append(Spacer(1, 0.3*cm))
# Sub-detail table
sub_data = [
[Paragraph("Component", hdr_style),
Paragraph("Left Arm / Main Chain", hdr_style),
Paragraph("Right Arm / Additional", hdr_style)],
[Paragraph("A: Union Ministry", cell_style),
Paragraph("Dept of Health\nSecy → Jt Secy → Dy Secy → Admin Staff", cell_style),
Paragraph("Dept of Family Welfare\nCommr/Directors → Jt Director → Dy Director → Admin Staff", cell_style)],
[Paragraph("B: Central Council", cell_style),
Paragraph("Chaired by Union Health Minister; includes Health Ministers of all States; sets national health policy and priorities", cell_style),
Paragraph("—", cell_style)],
[Paragraph("C: DGHS", cell_style),
Paragraph("Additional DGHS\n ↓ Deputy DGHS (Medical Care & Hospitals)\n ↓ Nursing Advisor → Dy Nursing Advisor", cell_style),
Paragraph("Deputy DGHS (Public Health)\nDeputy DGHS (General Administration)", cell_style)],
]
# Need to define hdr_style before use — already defined above
sub_t = Table(sub_data, colWidths=[3.2*cm, 7.8*cm, 5.5*cm])
sub_t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), C_CENTRAL),
("BACKGROUND", (0,1), (0,-1), colors.HexColor("#d6e4f0")),
("BACKGROUND", (1,1), (-1,-1), colors.HexColor("#eef5fb")),
("GRID", (0,0), (-1,-1), 0.5, colors.HexColor("#aaaaaa")),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 5),
("RIGHTPADDING", (0,0), (-1,-1), 5),
("VALIGN", (0,0), (-1,-1), "TOP"),
("SPAN", (1,2), (2,2)),
]))
story.append(sub_t)
story.append(Spacer(1, 0.5*cm))
# ---- TIER 2: STATE ----
story.append(section_banner("TIER 2 — STATE LEVEL", bg=C_STATE))
story.append(Spacer(1, 0.25*cm))
story.append(Paragraph(
"Each state manages its own health services independently. The typical state-level organogram:",
body_style
))
story.append(Spacer(1, 0.15*cm))
state_boxes = [
"State Health Minister",
"State Health Secretary",
"Director of Health Services (DHS)",
"Deputy DHS (Medical Care) | Deputy DHS (Public Health)",
"Divisional Health Officers",
"District Health Officer (DHO) / Civil Surgeon",
]
for i, label in enumerate(state_boxes):
story.append(centered_box(org_box(label, "state", width=doc.width * 0.72)))
if i < len(state_boxes) - 1:
story.append(arrow())
story.append(Spacer(1, 0.15*cm))
story.append(Paragraph(
"Each state also has a <b>State Council of Health</b>, analogous to the Central Council of Health.",
note_style
))
story.append(Spacer(1, 0.5*cm))
# ---- TIER 3: DISTRICT & PERIPHERAL ----
story.append(section_banner("TIER 3 — DISTRICT & PERIPHERAL LEVEL", bg=C_DISTRICT))
story.append(Spacer(1, 0.25*cm))
story.append(Paragraph(
"The district is the basic administrative unit. Health care cascades from district hospital down to the grassroots ASHA worker:",
body_style
))
story.append(Spacer(1, 0.15*cm))
district_boxes = [
("District Collector / District Magistrate (DM)", "district"),
("District Health Officer (DHO) / Chief Medical Officer (CMO)", "district"),
("Block Medical Officer (BMO)", "district"),
("Medical Officer In-Charge — Primary Health Centre (PHC)", "district"),
("Health Assistant (Male + Female) / LHV", "district"),
("ANM (Auxiliary Nurse Midwife) / MPW (Multi-Purpose Worker)", "field"),
("ASHA (Accredited Social Health Activist) / Anganwadi Worker", "field"),
]
for i, (label, lev) in enumerate(district_boxes):
story.append(centered_box(org_box(label, lev, width=doc.width * 0.75)))
if i < len(district_boxes) - 1:
story.append(arrow())
story.append(Spacer(1, 0.5*cm))
# ---- LEVELS OF CARE TABLE ----
story.append(section_banner("LEVELS OF HEALTH CARE — FACILITIES & POPULATION NORMS", bg=C_PURPLE))
story.append(Spacer(1, 0.25*cm))
levels_data = [
[Paragraph("Level", hdr_style),
Paragraph("Type of Care", hdr_style),
Paragraph("Facility", hdr_style),
Paragraph("Population Served", hdr_style)],
[Paragraph("Primary", cell_style),
Paragraph("First contact; preventive + basic curative", cell_style),
Paragraph("Sub-Health Centre (SHC)\nPrimary Health Centre (PHC)", cell_style),
Paragraph("SHC: 3,000–5,000\nPHC: 20,000–30,000", cell_style)],
[Paragraph("Secondary", cell_style),
Paragraph("Referral care; specialist services", cell_style),
Paragraph("Community Health Centre (CHC)\nSub-District / District Hospital", cell_style),
Paragraph("CHC: 80,000–1,20,000\nDH: 1 lakh+", cell_style)],
[Paragraph("Tertiary", cell_style),
Paragraph("Super-specialist; teaching and research", cell_style),
Paragraph("Medical College Hospitals\nAIIMS and apex institutions", cell_style),
Paragraph("Regional / National", cell_style)],
]
lev_t = Table(levels_data, colWidths=[2.5*cm, 4.5*cm, 5.5*cm, 4*cm])
lev_t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), C_PURPLE),
("BACKGROUND", (0,1), (-1,1), colors.HexColor("#e8f4e8")),
("BACKGROUND", (0,2), (-1,2), colors.HexColor("#fff3e0")),
("BACKGROUND", (0,3), (-1,3), colors.HexColor("#fce4ec")),
("GRID", (0,0), (-1,-1), 0.5, colors.HexColor("#aaaaaa")),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 5),
("RIGHTPADDING", (0,0), (-1,-1), 5),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
]))
story.append(lev_t)
story.append(Spacer(1, 0.5*cm))
# ---- KEY PROGRAMS ----
story.append(section_banner("KEY NATIONAL PROGRAMS OVERLAYING THE STRUCTURE", bg=C_GREY))
story.append(Spacer(1, 0.25*cm))
prog_hdr = ParagraphStyle("PH", fontName="Helvetica-Bold", fontSize=8.5,
textColor=colors.HexColor("#1a3a5c"), leading=12)
programs = [
("NHM — National Health Mission",
"Coordinates NRHM (rural) and NUHM (urban) health services across all tiers."),
("AB PM-JAY — Ayushman Bharat",
"Health insurance providing free secondary/tertiary hospitalisation; beneficiaries use Ayushman cards at empanelled hospitals."),
("CGHS — Central Govt Health Scheme",
"Covers central government employees and pensioners for comprehensive health care."),
("AYUSH",
"Parallel system integrating Ayurveda, Yoga, Unani, Siddha, and Homeopathy into the public health network."),
("ASHA Programme",
"Community health workers serving ~1,000 population each; first link between community and the formal health system."),
]
prog_data = [
[Paragraph(p, prog_hdr), Paragraph(d, small_style)]
for p, d in programs
]
prog_t = Table(prog_data, colWidths=[5.5*cm, 11*cm])
prog_t.setStyle(TableStyle([
("BACKGROUND", (0,0), (0,-1), colors.HexColor("#e0eaf4")),
("BACKGROUND", (1,0), (1,-1), colors.HexColor("#f5f8fc")),
("GRID", (0,0), (-1,-1), 0.5, colors.HexColor("#cccccc")),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 6),
("RIGHTPADDING", (0,0), (-1,-1), 6),
("VALIGN", (0,0), (-1,-1), "TOP"),
("ROWBACKGROUNDS", (0,0), (-1,-1),
[colors.HexColor("#e0eaf4"), colors.HexColor("#edf3fa")]),
]))
story.append(prog_t)
story.append(Spacer(1, 0.5*cm))
# ---- SUMMARY FLOW ----
story.append(section_banner("SUMMARY FLOW — CENTRAL TO GRASSROOTS", bg=C_CENTRAL))
story.append(Spacer(1, 0.25*cm))
flow_items = [
("MoHFW — Central Government", "central"),
("State Health Department", "state"),
("District Health Office (DHO / CMO)", "district"),
("Community Health Centre (CHC) — Block Level", "district"),
("Primary Health Centre (PHC) — Rural Level", "district"),
("Sub-Health Centre — Village Level", "field"),
("ASHA / Anganwadi Worker — Grassroots", "field"),
]
for i, (label, lev) in enumerate(flow_items):
story.append(centered_box(org_box(label, lev, width=doc.width * 0.65, small=True)))
if i < len(flow_items) - 1:
story.append(arrow())
story.append(Spacer(1, 0.4*cm))
story.append(HRFlowable(width="100%", thickness=1, color=colors.HexColor("#aaaaaa")))
story.append(Spacer(1, 0.15*cm))
story.append(Paragraph(
"Sources: Ministry of Health and Family Welfare (MoHFW), Govt of India | "
"National Health Mission (NHM) Framework | Commonwealth Fund India Health Profile | "
"Wikipedia — Healthcare in India",
note_style
))
# ---- Build ----
doc.build(story)
print(f"PDF created: {OUTPUT}")
cat > /tmp/workspace/healthcare-india/generate_pdf.py << 'PYEOF' from reportlab.lib.pagesizes import A4 from reportlab.lib import colors from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle from reportlab.lib.units import cm, mm from reportlab.platypus import ( SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, HRFlowable ) from reportlab.lib.enums import TA_CENTER OUTPUT = "/tmp/workspace/healthcare-india/Organogram_Healthcare_India.pdf" doc = SimpleDocTemplate(OUTPUT, pagesize=A4, topMargin=1.8*cm, bottomMargin=1.8*cm, leftMargin=2*cm, rightMargin=2*cm) styles = getSampleStyleSheet() title_style = ParagraphStyle("MyTitle", fontSize=17, textColor=colors.HexColor("#1a3a5c"), spaceAfter=4, alignment=TA_CENTER, fontName="Helvetica-Bold") subtitle_style = ParagraphStyle("MySub", fontSize=10, textColor=colors.HexColor("#2e6da4"), spaceAfter=10, alignment=TA_CENTER, fontName="Helvetica-Oblique") body_style = ParagraphStyle("MyBody", fontSize=9, textColor=colors.HexColor("#222222"), spaceAfter=4, leading=14) small_style = ParagraphStyle("MySmall", fontSize=8.5, textColor=colors.HexColor("#333333"), spaceAfter=2, leading=12) note_style = ParagraphStyle("MyNote", fontSize=7.5, textColor=colors.HexColor("#666666"), spaceAfter=4, leading=11, fontName="Helvetica-Oblique") hdr_style = ParagraphStyle("Hdr", fontName="Helvetica-Bold", fontSize=8.5, textColor=colors.white, leading=12, alignment=TA_CENTER) cell_style = ParagraphStyle("Cell", fontName="Helvetica", fontSize=8, textColor=colors.HexColor("#111111"), leading=11) box_bold = ParagraphStyle("BoxBold", fontName="Helvetica-Bold", fontSize=9, textColor=colors.white, alignment=TA_CENTER, leading=13) box_small = ParagraphStyle("BoxSmall", fontName="Helvetica-Bold", fontSize=8, textColor=colors.white, alignment=TA_CENTER, leading=12) C_CENTRAL = colors.HexColor("#2e6da4") C_STATE = colors.HexColor("#217a3c") C_DISTRICT = colors.HexColor("#b05a00") C_FIELD = colors.HexColor("#7b3fa0") C_GREY = colors.HexColor("#5a6a7a") C_DARK = colors.HexColor("#1a3a5c") C_PURPLE = colors.HexColor("#4a4a7a") COLOR_MAP = {"central": C_CENTRAL, "state": C_STATE, "district": C_DISTRICT, "field": C_FIELD, "grey": C_GREY} def section_banner(text, bg=None): if bg is None: bg = C_DARK st = ParagraphStyle("SB", fontName="Helvetica-Bold", fontSize=11, textColor=colors.white, alignment=TA_CENTER, leading=14) t = Table([[Paragraph(text, st)]], colWidths=[doc.width]) t.setStyle(TableStyle([ ("BACKGROUND", (0,0),(-1,-1), bg), ("TOPPADDING", (0,0),(-1,-1), 6), ("BOTTOMPADDING", (0,0),(-1,-1), 6), ("LEFTPADDING", (0,0),(-1,-1), 8), ("RIGHTPADDING", (0,0),(-1,-1), 8), ])) return t def org_box(text, level="central", width=None, small=False): bg = COLOR_MAP.get(level, C_CENTRAL) st = box_small if small else box_bold w = width if width else doc.width * 0.60 t = Table([[Paragraph(text, st)]], colWidths=[w]) t.setStyle(TableStyle([ ("BACKGROUND", (0,0),(-1,-1), bg), ("TOPPADDING", (0,0),(-1,-1), 5), ("BOTTOMPADDING", (0,0),(-1,-1), 5), ("LEFTPADDING", (0,0),(-1,-1), 6), ("RIGHTPADDING", (0,0),(-1,-1), 6), ])) return t def centred(b): t = Table([[b]], colWidths=[doc.width]) t.setStyle(TableStyle([ ("ALIGN", (0,0),(-1,-1), "CENTER"), ("VALIGN", (0,0),(-1,-1), "MIDDLE"), ("TOPPADDING", (0,0),(-1,-1), 0), ("BOTTOMPADDING", (0,0),(-1,-1), 0), ])) return t def arrow(): return Paragraph( "<para alignment='center'><font size='11' color='#666666'>▼</font></para>", styles["Normal"]) story = [] # Title story.append(Spacer(1, 0.3*cm)) story.append(Paragraph("Organogram of Health Care Delivery in India", title_style)) story.append(Paragraph("Administrative Structure — Central to Grassroots Level", subtitle_style)) story.append(HRFlowable(width="100%", thickness=2, color=C_CENTRAL)) story.append(Spacer(1, 0.4*cm)) # Overview story.append(section_banner("OVERVIEW")) story.append(Spacer(1, 0.25*cm)) story.append(Paragraph( "India's health care delivery system is organised under the <b>Ministry of Health and Family Welfare (MoHFW)</b> " "at the national level. Health is a <b>State subject</b> under the Constitution, so each state manages its own services. " "The central government handles policy, planning, guiding, evaluating, and coordination. " "The system has a <b>three-tier structure: Central → State → District/Peripheral</b>, " "with frontline delivery reaching down to the village through ASHAs and Anganwadi workers.", body_style)) story.append(Spacer(1, 0.4*cm)) # Tier 1 story.append(section_banner("TIER 1 — CENTRAL LEVEL", bg=C_CENTRAL)) story.append(Spacer(1, 0.25*cm)) story.append(centred(org_box("Ministry of Health and Family Welfare (MoHFW)", "central", width=doc.width*0.72))) story.append(arrow()) aw = doc.width / 3 - 3*mm a1 = ParagraphStyle("A1", fontName="Helvetica-Bold", fontSize=8, textColor=colors.white, alignment=TA_CENTER, leading=12) arms = Table([[ Paragraph("A. Union Ministry of\nHealth & Family Welfare", a1), Paragraph("B. Central Council of\nHealth & Family Welfare", a1), Paragraph("C. Directorate General of\nHealth Services (DGHS)", a1), ]], colWidths=[aw, aw, aw]) arms.setStyle(TableStyle([ ("BACKGROUND", (0,0),(0,0), C_CENTRAL), ("BACKGROUND", (1,0),(1,0), colors.HexColor("#1a5c8a")), ("BACKGROUND", (2,0),(2,0), colors.HexColor("#0d3d6b")), ("TOPPADDING", (0,0),(-1,-1), 7), ("BOTTOMPADDING", (0,0),(-1,-1), 7), ("LEFTPADDING", (0,0),(-1,-1), 4), ("RIGHTPADDING", (0,0),(-1,-1), 4), ("GRID", (0,0),(-1,-1), 1, colors.white), ("VALIGN", (0,0),(-1,-1), "MIDDLE"), ])) story.append(arms) story.append(Spacer(1, 0.3*cm)) sub_data = [ [Paragraph("Component", hdr_style), Paragraph("Left / Main Chain", hdr_style), Paragraph("Right / Additional", hdr_style)], [Paragraph("A: Union Ministry", cell_style), Paragraph("Dept of Health:\nSecy → Jt Secy → Dy Secy → Admin Staff", cell_style), Paragraph("Dept of Family Welfare:\nCommr/Directors → Jt Director → Dy Director → Admin Staff", cell_style)], [Paragraph("B: Central Council", cell_style), Paragraph("Chaired by Union Health Minister; includes Health Ministers of all States; sets national health policy", cell_style), Paragraph("—", cell_style)], [Paragraph("C: DGHS", cell_style), Paragraph("Additional DGHS\n > Dy DGHS (Medical Care & Hospitals)\n > Nursing Advisor > Dy Nursing Advisor", cell_style), Paragraph("Dy DGHS (Public Health)\nDy DGHS (General Administration)", cell_style)], ] sub_t = Table(sub_data, colWidths=[3.2*cm, 7.8*cm, 5.5*cm]) sub_t.setStyle(TableStyle([ ("BACKGROUND", (0,0),(-1,0), C_CENTRAL), ("BACKGROUND", (0,1),(0,-1), colors.HexColor("#d6e4f0")), ("BACKGROUND", (1,1),(-1,-1), colors.HexColor("#eef5fb")), ("GRID", (0,0),(-1,-1), 0.5, colors.HexColor("#aaaaaa")), ("TOPPADDING", (0,0),(-1,-1), 5), ("BOTTOMPADDING", (0,0),(-1,-1), 5), ("LEFTPADDING", (0,0),(-1,-1), 5), ("RIGHTPADDING", (0,0),(-1,-1), 5), ("VALIGN", (0,0),(-1,-1), "TOP"), ("SPAN", (1,2),(2,2)), ])) story.append(sub_t) story.append(Spacer(1, 0.5*cm)) # Tier 2 story.append(section_banner("TIER 2 — STATE LEVEL", bg=C_STATE)) story.append(Spacer(1, 0.25*cm)) story.append(Paragraph("Each state manages its own health services independently. Typical state-level organogram:", body_style)) story.append(Spacer(1, 0.15*cm)) state_boxes = [ "State Health Minister", "State Health Secretary", "Director of Health Services (DHS)", "Deputy DHS (Medical Care) | Deputy DHS (Public Health)", "Divisional Health Officers", "District Health Officer (DHO) / Civil Surgeon", ] for i, label in enumerate(state_boxes): story.append(centred(org_box(label, "state", width=doc.width * 0.72))) if i < len(state_boxes) - 1: story.append(arrow()) story.append(Spacer(1, 0.15*cm)) story.append(Paragraph( "Each state also has a <b>State Council of Health</b>, analogous to the Central Council of Health.", note_style)) story.append(Spacer(1, 0.5*cm)) # Tier 3 story.append(section_banner("TIER 3 — DISTRICT & PERIPHERAL LEVEL", bg=C_DISTRICT)) story.append(Spacer(1, 0.25*cm)) story.append(Paragraph( "The district is the basic administrative unit. Health care cascades from the district hospital down to the grassroots ASHA worker:", body_style)) story.append(Spacer(1, 0.15*cm)) district_boxes = [ ("District Collector / District Magistrate (DM)", "district"), ("District Health Officer (DHO) / Chief Medical Officer (CMO)", "district"), ("Block Medical Officer (BMO)", "district"), ("Medical Officer In-Charge — Primary Health Centre (PHC)", "district"), ("Health Assistant (Male + Female) / LHV", "district"), ("ANM (Auxiliary Nurse Midwife) / MPW (Multi-Purpose Worker)", "field"), ("ASHA (Accredited Social Health Activist) / Anganwadi Worker", "field"), ] for i, (label, lev) in enumerate(district_boxes): story.append(centred(org_box(label, lev, width=doc.width * 0.75))) if i < len(district_boxes) - 1: story.append(arrow()) story.append(Spacer(1, 0.5*cm)) # Levels of care table story.append(section_banner("LEVELS OF HEALTH CARE — FACILITIES & POPULATION NORMS", bg=C_PURPLE)) story.append(Spacer(1, 0.25*cm)) levels_data = [ [Paragraph("Level", hdr_style), Paragraph("Type of Care", hdr_style), Paragraph("Facility", hdr_style), Paragraph("Population Served", hdr_style)], [Paragraph("Primary", cell_style), Paragraph("First contact; preventive + basic curative", cell_style), Paragraph("Sub-Health Centre (SHC)\nPrimary Health Centre (PHC)", cell_style), Paragraph("SHC: 3,000-5,000\nPHC: 20,000-30,000", cell_style)], [Paragraph("Secondary", cell_style), Paragraph("Referral care; specialist services", cell_style), Paragraph("Community Health Centre (CHC)\nSub-District / District Hospital", cell_style), Paragraph("CHC: 80,000-1,20,000\nDH: 1 lakh+", cell_style)], [Paragraph("Tertiary", cell_style), Paragraph("Super-specialist; teaching and research", cell_style), Paragraph("Medical College Hospitals\nAIIMS and apex institutions", cell_style), Paragraph("Regional / National", cell_style)], ] lev_t = Table(levels_data, colWidths=[2.5*cm, 4.5*cm, 5.5*cm, 4*cm]) lev_t.setStyle(TableStyle([ ("BACKGROUND", (0,0),(-1,0), C_PURPLE), ("BACKGROUND", (0,1),(-1,1), colors.HexColor("#e8f4e8")), ("BACKGROUND", (0,2),(-1,2), colors.HexColor("#fff3e0")), ("BACKGROUND", (0,3),(-1,3), colors.HexColor("#fce4ec")), ("GRID", (0,0),(-1,-1), 0.5, colors.HexColor("#aaaaaa")), ("TOPPADDING", (0,0),(-1,-1), 5), ("BOTTOMPADDING", (0,0),(-1,-1), 5), ("LEFTPADDING", (0,0),(-1,-1), 5), ("RIGHTPADDING", (0,0),(-1,-1), 5), ("VALIGN", (0,0),(-1,-1), "MIDDLE"), ])) story.append(lev_t) story.append(Spacer(1, 0.5*cm)) # Key programs story.append(section_banner("KEY NATIONAL PROGRAMS OVERLAYING THE STRUCTURE", bg=C_GREY)) story.append(Spacer(1, 0.25*cm)) prog_hdr2 = ParagraphStyle("PH", fontName="Helvetica-Bold", fontSize=8.5, textColor=colors.HexColor("#1a3a5c"), leading=12) programs = [ ("NHM — National Health Mission", "Coordinates NRHM (rural) and NUHM (urban) health services across all tiers."), ("AB PM-JAY — Ayushman Bharat", "Health insurance providing free secondary/tertiary hospitalisation; beneficiaries use Ayushman cards at empanelled hospitals."), ("CGHS — Central Govt Health Scheme", "Covers central government employees and pensioners for comprehensive health care."), ("AYUSH", "Parallel system integrating Ayurveda, Yoga, Unani, Siddha, and Homeopathy into the public health network."), ("ASHA Programme", "Community health workers serving ~1,000 population each; first link between community and the formal health system."), ] prog_data = [[Paragraph(p, prog_hdr2), Paragraph(d, small_style)] for p, d in programs] prog_t = Table(prog_data, colWidths=[5.5*cm, 11*cm]) prog_t.setStyle(TableStyle([ ("BACKGROUND", (0,0),(0,-1), colors.HexColor("#e0eaf4")), ("BACKGROUND", (1,0),(1,-1), colors.HexColor("#f5f8fc")), ("GRID", (0,0),(-1,-1), 0.5, colors.HexColor("#cccccc")), ("TOPPADDING", (0,0),(-1,-1), 5), ("BOTTOMPADDING", (0,0),(-1,-1), 5), ("LEFTPADDING", (0,0),(-1,-1), 6), ("RIGHTPADDING", (0,0),(-1,-1), 6), ("VALIGN", (0,0),(-1,-1), "TOP"), ("ROWBACKGROUNDS", (0,0),(-1,-1), [colors.HexColor("#e0eaf4"), colors.HexColor("#edf3fa")]), ])) story.append(prog_t) story.append(Spacer(1, 0.5*cm)) # Summary flow story.append(section_banner("SUMMARY FLOW — CENTRAL TO GRASSROOTS", bg=C_CENTRAL)) story.append(Spacer(1, 0.25*cm)) flow_items = [ ("MoHFW — Central Government", "central"), ("State Health Department", "state"), ("District Health Office (DHO / CMO)", "district"), ("Community Health Centre (CHC) — Block Level", "district"), ("Primary Health Centre (PHC) — Rural Level", "district"), ("Sub-Health Centre — Village Level", "field"), ("ASHA / Anganwadi Worker — Grassroots", "field"), ] for i, (label, lev) in enumerate(flow_items): story.append(centred(org_box(label, lev, width=doc.width * 0.65, small=True))) if i < len(flow_items) - 1: story.append(arrow()) story.append(Spacer(1, 0.4*cm)) story.append(HRFlowable(width="100%", thickness=1, color=colors.HexColor("#aaaaaa"))) story.append(Spacer(1, 0.15*cm)) story.append(Paragraph( "Sources: Ministry of Health and Family Welfare (MoHFW), Govt of India | " "National Health Mission (NHM) Framework | Commonwealth Fund India Health Profile | " "Wikipedia — Healthcare in India", note_style)) doc.build(story) print(f"PDF created: {OUTPUT}") PYEOF echo "Script written successfully"
cd /tmp/workspace/healthcare-india && python generate_pdf.py 2>&1
Organogram Healthcare India
PDF Document · PDF