B. Cancer component under NPCDCS Cancer ncer is an important public health problem in India, with nearly 10 lakh new cases occurring every year in the country. It is estimated that there are 2.8 million cases of cancer in the country at any given point of time. With the objectives of prevention, early diagnosis and treatment, the national cancer control programme was launched in cancer wa 1975-76. In view of the magnitude of the problem and gaps in the availability of cancer treatment facilities across the country, the programme was revised in 1984-85 and subsequently in December 2004. During 2010, the programme was integrated with National Programme on Prevention and Control of Diabetes, Cardiovascular Disease and Stroke. The objectives of the programme are: a. Primary prevention of cancers by health education; b. Secondary prevention i.e. early detection and diagnosis of common cancer such as cancer of cervix, mouth, breast and tobacco related cancer by screening/self examination method; and Tertiary prevention i.e. strengthening of the existing institutions of comprehensive therapy including palliative care. The schemes under the revised programme are: 1. Regional Cancer Centre Scheme The existing regional cancer centres are being further strengthened to act as referral centres for complicated and difficult cases at the tertiary level. One time assistance of Rs. 3 crores during the plan period is provided to Regional Cancer Centres except TMH, Mumbai an cept TMH, Mumbai and IRCH (AIIMS) for strengthening and to the CNCI, Kolkata on the approved pattern of funding. 2. Oncology Wing Development Scheme This scheme had been initiated to fill up the geographic in the availability of cancer treatment facilities in t country. Central assistance is provided for purchase d gaps in the availability equipment, which include a cobalt unit besides othe equipment. A part of the grant can be used for the civil woi but the manpower is to be provided by the concerned st government/institution. The quantum of central assistances Rs. 3 crores per institution under the scheme. 3. Decentralized NGO scheme This scheme is meant for IEC activities and ea detection of cancer. The scheme is operated by the nodi agencies and the NGOs are given financial assistance ir undertaking health education and early detection activiso of cancer. 4. IEC activities at central level IEC activities at the central level are to be initiated order to give wider publicity about the Anti-To Anti-Tobace Legislation for discouraging consumption of cigarettes other tobacco related products, and for creating aware mption of among masses about the ill effects of consumption tobacco and tobacco related products. Under this sch wider publicity would also be given about the rules formulated for implementation of various provisions anti-tobacco legislation. November 7th is observed National Cancer Awareness Day in the country. Research and training Training programmes, monitoring and research will be organized at the central Following trainin ot the central level under this sche ed under the NCCD training manuals have been developedlevel: NCCP for capacity building in cancer control at distric a. Manual for health professionals b Manual for cyt for cytology Manual for palliative care d. Manual for tobacco cessation 196% is being provided for NATIONAL TOBACCO CONTROL PROGRAMME andcontrol of cancer, diabetes, CVD and stroke (47): Cancer services under national programme for prevention 3 4 Common diagnostic services, basic surgery, chemotherapy and palliative care for cancer cases is being made available at 100 district hospitals. Each district is being supported with Rs. 1.66 crores per annum for the following: - Chemotherapy drugs are provided for 100 patients at each district hospital. Day care chemotherapy facilities is being established at 100 district hospitals. Facility for laboratory investigations including mammography is being provided at 100 district hospitals and if not available, this can be outsourced at government rates. Home based palliative care is being provided for chronic, debilitating and progressive cancer patients at 100 districts. contractual manpower Support through 1 Medical Oncologist, 1 Cytopathologist, 1 Cytopathology technician, 2 Nurses for day care. 5 State Cancer Institutes will provide comprehensive cancer diagnosis, treatment and care services. SCI will be apex institution in the state for cancer treatment activities. 45 centres were to be strengthened as Tertiary Cancer Centres (TCCs) to provide comprehensive cancer care services at a cost of Rs. 6.00 crore each during 2011-12 Help me to.write a 5 mark question on answer on topic cancer programme from above copied text from k.park 3rd year mbbs book Answer should be properly arranged and highlight imp points
National Cancer Awareness Day: November 7th
| Scheme | Key Features |
|---|---|
| 1. Regional Cancer Centre (RCC) Scheme | One-time grant of Rs. 3 crores for strengthening RCCs as tertiary referral centres (excludes TMH Mumbai and IRCH AIIMS) |
| 2. Oncology Wing Development Scheme | Fills geographic gaps in cancer care; central assistance of Rs. 3 crores/institution for equipment including cobalt unit |
| 3. Decentralized NGO Scheme | IEC activities and early cancer detection; NGOs funded through nodal agencies |
| 4. IEC at Central Level | Publicity for Anti-Tobacco Legislation; awareness of ill effects of tobacco |
| 5. Research and Training | Training manuals developed: (a) Health professionals (b) Cytology (c) Palliative care (d) Tobacco cessation |
B. Cancer component under NPCDCS Cancer ncer is an important public health problem in India, with nearly 10 lakh new cases occurring every year in the country. It is estimated that there are 2.8 million cases of cancer in the country at any given point of time. With the objectives of prevention, early diagnosis and treatment, the national cancer control programme was launched in cancer wa 1975-76. In view of the magnitude of the problem and gaps in the availability of cancer treatment facilities across the country, the programme was revised in 1984-85 and subsequently in December 2004. During 2010, the programme was integrated with National Programme on Prevention and Control of Diabetes, Cardiovascular Disease and Stroke. The objectives of the programme are: a. Primary prevention of cancers by health education; b. Secondary prevention i.e. early detection and diagnosis of common cancer such as cancer of cervix, mouth, breast and tobacco related cancer by screening/self examination method; and Tertiary prevention i.e. strengthening of the existing institutions of comprehensive therapy including palliative care. The schemes under the revised programme are: 1. Regional Cancer Centre Scheme The existing regional cancer centres are being further strengthened to act as referral centres for complicated and difficult cases at the tertiary level. One time assistance of Rs. 3 crores during the plan period is provided to Regional Cancer Centres except TMH, Mumbai an cept TMH, Mumbai and IRCH (AIIMS) for strengthening and to the CNCI, Kolkata on the approved pattern of funding. 2. Oncology Wing Development Scheme This scheme had been initiated to fill up the geographic in the availability of cancer treatment facilities in t country. Central assistance is provided for purchase d gaps in the availability equipment, which include a cobalt unit besides othe equipment. A part of the grant can be used for the civil woi but the manpower is to be provided by the concerned st government/institution. The quantum of central assistances Rs. 3 crores per institution under the scheme. 3. Decentralized NGO scheme This scheme is meant for IEC activities and ea detection of cancer. The scheme is operated by the nodi agencies and the NGOs are given financial assistance ir undertaking health education and early detection activiso of cancer. 4. IEC activities at central level IEC activities at the central level are to be initiated order to give wider publicity about the Anti-To Anti-Tobace Legislation for discouraging consumption of cigarettes other tobacco related products, and for creating aware mption of among masses about the ill effects of consumption tobacco and tobacco related products. Under this sch wider publicity would also be given about the rules formulated for implementation of various provisions anti-tobacco legislation. November 7th is observed National Cancer Awareness Day in the country. Research and training Training programmes, monitoring and research will be organized at the central Following trainin ot the central level under this sche ed under the NCCD training manuals have been developedlevel: NCCP for capacity building in cancer control at distric a. Manual for health professionals b Manual for cyt for cytology Manual for palliative care d. Manual for tobacco cessation 196% is being provided for NATIONAL TOBACCO CONTROL PROGRAMME andcontrol of cancer, diabetes, CVD and stroke (47): Cancer services under national programme for prevention 3 4 Common diagnostic services, basic surgery, chemotherapy and palliative care for cancer cases is being made available at 100 district hospitals. Each district is being supported with Rs. 1.66 crores per annum for the following: - Chemotherapy drugs are provided for 100 patients at each district hospital. Day care chemotherapy facilities is being established at 100 district hospitals. Facility for laboratory investigations including mammography is being provided at 100 district hospitals and if not available, this can be outsourced at government rates. Home based palliative care is being provided for chronic, debilitating and progressive cancer patients at 100 districts. contractual manpower Support through 1 Medical Oncologist, 1 Cytopathologist, 1 Cytopathology technician, 2 Nurses for day care. 5 State Cancer Institutes will provide comprehensive cancer diagnosis, treatment and care services. SCI will be apex institution in the state for cancer treatment activities. 45 centres were to be strengthened as Tertiary Cancer Centres (TCCs) to provide comprehensive cancer care services at a cost of Rs. 6.00 crore each during 2011-12 Help me to.write a 5 mark question on answer on topic cancer programme from above copied text from k.park 3rd year mbbs book Answer should be properly arranged and highlight imp points Help me to write 5 mark answer on topic national cancer programme from above copied paragraph of community medicine from book k park mbbs 3 rd year Arrange the answer properly Highlight words or sentence Add flow chart where needed neededgive the answer from above paragraph only I have to write it in my university exams to score full marks
1975-76 1984-85 Dec 2004 2010
| | | |
NCCP Launched ──► First Revision ──► Second Revision ──► Integrated into
NPCDCS
(Three levels of prevention)
| Level | Objective |
|---|---|
| Primary Prevention | Health education to prevent cancer |
| Secondary Prevention | Early detection and diagnosis of cancers of cervix, mouth, breast, and tobacco-related cancers by screening / self-examination |
| Tertiary Prevention | Strengthening existing institutions for comprehensive therapy including palliative care |
November 7th - National Cancer Awareness Day ⭐
Services available at 100 District Hospitals
┌─────────────────────────────────────────────────────────────┐
│ SERVICES AT 100 DISTRICT HOSPITALS │
├─────────────────────────────────────────────────────────────┤
│ ✦ Common diagnostic services + basic surgery │
│ ✦ Chemotherapy drugs for 100 patients/district │
│ ✦ Day care chemotherapy facilities │
│ ✦ Lab investigations including MAMMOGRAPHY │
│ (outsourced at govt rates if unavailable) │
│ ✦ Home-based palliative care for chronic/progressive │
│ cancer patients │
└─────────────────────────────────────────────────────────────┘
NATIONAL LEVEL
│
┌──────────┴──────────┐
│ │
5 State Cancer 45 Tertiary Cancer
Institutes (SCI) Centres (TCCs)
│ │
Apex institution Comprehensive cancer
in each state care @ Rs. 6 cr each
(strengthened 2011-12)
| Fact | Value |
|---|---|
| New cancer cases/year in India | 10 lakh |
| Total cases at any time | 2.8 million |
| NCCP launched | 1975-76 |
| Integrated into NPCDCS | 2010 |
| RCC grant | Rs. 3 crores (one-time) |
| Oncology Wing grant | Rs. 3 crores/institution |
| District support per year | Rs. 1.66 crores |
| Districts covered | 100 |
| Chemo patients/district | 100 |
| State Cancer Institutes | 5 |
| Tertiary Cancer Centres | 45 |
| TCC funding | Rs. 6 crores each |
| National Cancer Awareness Day | November 7th |
Generate a PDF quick reference card of cancer programme key points
ls -la /home/daytona/workspace/ 2>/dev/null || echo "workspace not found"
mkdir -p /home/daytona/workspace/cancer-programme && python3 -c "import reportla…
~/cancer-programme/generate_card.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import cm
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
HRFlowable
)
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus import KeepTogether
OUTPUT = "/home/daytona/workspace/cancer-programme/Cancer_Programme_Quick_Reference.pdf"
# ── Colour palette ──────────────────────────────────────────────────────────
DARK_RED = colors.HexColor("#C0392B")
MED_RED = colors.HexColor("#E74C3C")
LIGHT_RED = colors.HexColor("#FADBD8")
DARK_BLUE = colors.HexColor("#1A5276")
MED_BLUE = colors.HexColor("#2980B9")
LIGHT_BLUE = colors.HexColor("#D6EAF8")
ORANGE = colors.HexColor("#D35400")
LIGHT_ORG = colors.HexColor("#FAE5D3")
GREEN = colors.HexColor("#1E8449")
LIGHT_GRN = colors.HexColor("#D5F5E3")
YELLOW_BG = colors.HexColor("#FEF9E7")
WHITE = colors.white
DARK_GRAY = colors.HexColor("#2C3E50")
doc = SimpleDocTemplate(
OUTPUT,
pagesize=A4,
leftMargin=1.5*cm, rightMargin=1.5*cm,
topMargin=1.8*cm, bottomMargin=1.8*cm,
title="National Cancer Programme – Quick Reference Card",
author="K. Park – Community Medicine"
)
W, H = A4
CONTENT_W = W - 3*cm
styles = getSampleStyleSheet()
# ── Custom paragraph styles ─────────────────────────────────────────────────
def S(name, parent="Normal", **kw):
s = ParagraphStyle(name, parent=styles[parent], **kw)
return s
sTitle = S("sTitle", fontSize=18, textColor=WHITE, alignment=TA_CENTER,
fontName="Helvetica-Bold", leading=22, spaceAfter=2)
sSubtitle = S("sSubtitle", fontSize=10, textColor=colors.HexColor("#FADBD8"),
alignment=TA_CENTER, fontName="Helvetica", leading=14)
sSectionHead = S("sSectionHead", fontSize=12, textColor=WHITE,
fontName="Helvetica-Bold", leading=15, alignment=TA_LEFT)
sBody = S("sBody", fontSize=9, textColor=DARK_GRAY, leading=13,
fontName="Helvetica", spaceAfter=2)
sBold = S("sBold", fontSize=9, textColor=DARK_GRAY, leading=13,
fontName="Helvetica-Bold")
sSmall = S("sSmall", fontSize=8, textColor=DARK_GRAY, leading=11,
fontName="Helvetica")
sCenter = S("sCenter", fontSize=9, textColor=DARK_GRAY, leading=12,
alignment=TA_CENTER, fontName="Helvetica")
sCenterB = S("sCenterB", fontSize=9, textColor=DARK_GRAY, leading=12,
alignment=TA_CENTER, fontName="Helvetica-Bold")
sAlert = S("sAlert", fontSize=10, textColor=DARK_RED,
fontName="Helvetica-Bold", alignment=TA_CENTER, leading=14)
sNumber = S("sNumber", fontSize=22, textColor=MED_RED,
fontName="Helvetica-Bold", alignment=TA_CENTER, leading=26)
sNumberLabel = S("sNumberLabel", fontSize=7.5, textColor=DARK_GRAY,
fontName="Helvetica", alignment=TA_CENTER, leading=10)
sWhite = S("sWhite", fontSize=9, textColor=WHITE, fontName="Helvetica-Bold",
leading=12, alignment=TA_CENTER)
def section_header(title, bg=DARK_RED):
data = [[Paragraph(title, sSectionHead)]]
t = Table(data, colWidths=[CONTENT_W])
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), 10),
("RIGHTPADDING", (0,0), (-1,-1), 10),
("ROUNDEDCORNERS", [4]),
]))
return t
def bullet(text, indent=0.3):
return Paragraph(f"• {text}",
ParagraphStyle("b", parent=sBody,
leftIndent=indent*cm, spaceAfter=1))
def sub_bullet(text):
return Paragraph(f"– {text}",
ParagraphStyle("sb", parent=sSmall,
leftIndent=1*cm, spaceAfter=1))
story = []
# ════════════════════════════════════════════════════════════════════════════
# TITLE BANNER
# ════════════════════════════════════════════════════════════════════════════
banner_data = [[
Paragraph("National Cancer Control Programme (NCCP)", sTitle),
],
[
Paragraph("Cancer Component under NPCDCS | Quick Reference Card | K. Park – Community Medicine", sSubtitle),
]]
banner = Table(banner_data, colWidths=[CONTENT_W])
banner.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), DARK_RED),
("TOPPADDING", (0,0), (-1,-1), 10),
("BOTTOMPADDING", (0,0), (-1,-1), 10),
("LEFTPADDING", (0,0), (-1,-1), 14),
("RIGHTPADDING", (0,0), (-1,-1), 14),
("ROUNDEDCORNERS", [6]),
]))
story.append(banner)
story.append(Spacer(1, 0.3*cm))
# ════════════════════════════════════════════════════════════════════════════
# ROW 1 – EPIDEMIOLOGY + TIMELINE (side by side)
# ════════════════════════════════════════════════════════════════════════════
# --- Epidemiology box ---
epi_inner = [
[Paragraph("<b>10 Lakh</b>", sNumber),
Paragraph("<b>2.8 Million</b>", sNumber)],
[Paragraph("New cases per year", sNumberLabel),
Paragraph("Total cases at any time", sNumberLabel)],
]
epi_table = Table(epi_inner, colWidths=[CONTENT_W*0.48/2 * 2 * 0.5,
CONTENT_W*0.48/2 * 2 * 0.5])
epi_table.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), LIGHT_RED),
("TOPPADDING", (0,0), (-1,-1), 6),
("BOTTOMPADDING", (0,0), (-1,-1), 4),
("LEFTPADDING", (0,0), (-1,-1), 4),
("RIGHTPADDING", (0,0), (-1,-1), 4),
("ALIGN", (0,0), (-1,-1), "CENTER"),
]))
epi_block = [
section_header("Epidemiology in India", DARK_RED),
Spacer(1, 0.15*cm),
epi_table,
]
# --- Timeline box ---
tl_data = [
[Paragraph("<b>1975-76</b>", sCenterB), Paragraph("NCCP Launched", sCenter)],
[Paragraph("<b>1984-85</b>", sCenterB), Paragraph("First Revision", sCenter)],
[Paragraph("<b>Dec 2004</b>", sCenterB), Paragraph("Second Revision", sCenter)],
[Paragraph("<b>2010</b>", sCenterB), Paragraph("Integrated into NPCDCS", sCenter)],
]
tl_table = Table(tl_data, colWidths=[CONTENT_W*0.45*0.38, CONTENT_W*0.45*0.62])
tl_table.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), LIGHT_BLUE),
("BACKGROUND", (0,0), (0,-1), MED_BLUE),
("TEXTCOLOR", (0,0), (0,-1), WHITE),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 6),
("RIGHTPADDING", (0,0), (-1,-1), 6),
("GRID", (0,0), (-1,-1), 0.3, colors.HexColor("#AED6F1")),
("FONTNAME", (0,0), (-1,-1), "Helvetica"),
("FONTSIZE", (0,0), (-1,-1), 8),
]))
tl_block = [
section_header("Historical Timeline", DARK_BLUE),
Spacer(1, 0.15*cm),
tl_table,
]
# Combine side by side
col_a = CONTENT_W * 0.53
col_b = CONTENT_W * 0.44
gap = CONTENT_W * 0.03
def build_nested(items):
from reportlab.platypus import KeepTogether
return KeepTogether(items)
side_data = [[build_nested(epi_block), Spacer(gap, 1), build_nested(tl_block)]]
side_table = Table(side_data, colWidths=[col_a, gap, col_b])
side_table.setStyle(TableStyle([
("VALIGN", (0,0), (-1,-1), "TOP"),
("LEFTPADDING", (0,0), (-1,-1), 0),
("RIGHTPADDING", (0,0), (-1,-1), 0),
("TOPPADDING", (0,0), (-1,-1), 0),
("BOTTOMPADDING", (0,0), (-1,-1), 0),
]))
story.append(side_table)
story.append(Spacer(1, 0.3*cm))
# ════════════════════════════════════════════════════════════════════════════
# OBJECTIVES (3-column prevention table)
# ════════════════════════════════════════════════════════════════════════════
story.append(section_header("Objectives – Three Levels of Prevention", GREEN))
story.append(Spacer(1, 0.15*cm))
obj_data = [
[Paragraph("<b>PRIMARY</b>", sCenterB),
Paragraph("<b>SECONDARY</b>", sCenterB),
Paragraph("<b>TERTIARY</b>", sCenterB)],
[Paragraph("Health education\nto prevent cancer", sCenter),
Paragraph("Early detection & diagnosis\nof cancers of:\nCervix, Mouth, Breast\n& Tobacco-related\nvia Screening / Self-exam", sCenter),
Paragraph("Strengthen institutions\nfor comprehensive\ntherapy including\nPalliative Care", sCenter)],
]
obj_table = Table(obj_data, colWidths=[CONTENT_W/3]*3)
obj_table.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), GREEN),
("TEXTCOLOR", (0,0), (-1,0), WHITE),
("BACKGROUND", (0,1), (0,1), LIGHT_GRN),
("BACKGROUND", (1,1), (1,1), colors.HexColor("#EAFAF1")),
("BACKGROUND", (2,1), (2,1), LIGHT_GRN),
("ALIGN", (0,0), (-1,-1), "CENTER"),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("TOPPADDING", (0,0), (-1,-1), 7),
("BOTTOMPADDING", (0,0), (-1,-1), 7),
("LEFTPADDING", (0,0), (-1,-1), 5),
("RIGHTPADDING", (0,0), (-1,-1), 5),
("GRID", (0,0), (-1,-1), 0.5, GREEN),
("FONTNAME", (0,1), (-1,-1), "Helvetica"),
("FONTSIZE", (0,1), (-1,-1), 8.5),
("LEADING", (0,1), (-1,-1), 12),
]))
story.append(obj_table)
story.append(Spacer(1, 0.3*cm))
# ════════════════════════════════════════════════════════════════════════════
# SCHEMES (5 schemes)
# ════════════════════════════════════════════════════════════════════════════
story.append(section_header("Schemes under the Revised Programme", ORANGE))
story.append(Spacer(1, 0.15*cm))
schemes_data = [
# header row
[Paragraph("<b>#</b>", sCenterB),
Paragraph("<b>Scheme</b>", sCenterB),
Paragraph("<b>Key Points</b>", sCenterB),
Paragraph("<b>Grant</b>", sCenterB)],
# rows
[Paragraph("1", sCenterB),
Paragraph("<b>Regional Cancer Centre (RCC) Scheme</b>", sBody),
Paragraph("RCCs strengthened as <b>tertiary referral centres</b>. Excludes TMH Mumbai & IRCH (AIIMS). CNCI Kolkata on approved pattern.", sSmall),
Paragraph("<b>Rs. 3 Cr</b>\n(one-time)", sCenter)],
[Paragraph("2", sCenterB),
Paragraph("<b>Oncology Wing Development Scheme</b>", sBody),
Paragraph("Fills <b>geographic gaps</b>. Equipment incl. <b>cobalt unit</b>. Civil work from grant; <b>manpower by state govt</b>.", sSmall),
Paragraph("<b>Rs. 3 Cr</b>\nper institution", sCenter)],
[Paragraph("3", sCenterB),
Paragraph("<b>Decentralized NGO Scheme</b>", sBody),
Paragraph("IEC activities & early detection. Operated by nodal agencies. NGOs get financial assistance.", sSmall),
Paragraph("–", sCenter)],
[Paragraph("4", sCenterB),
Paragraph("<b>IEC at Central Level</b>", sBody),
Paragraph("Anti-Tobacco Legislation publicity. Awareness of ill effects of tobacco. <b>Nov 7 = National Cancer Awareness Day</b>", sSmall),
Paragraph("–", sCenter)],
[Paragraph("5", sCenterB),
Paragraph("<b>Research & Training</b>", sBody),
Paragraph("Manuals: (a) Health Professionals (b) Cytology (c) Palliative Care (d) Tobacco Cessation", sSmall),
Paragraph("–", sCenter)],
]
schemes_table = Table(schemes_data,
colWidths=[CONTENT_W*0.05, CONTENT_W*0.27,
CONTENT_W*0.51, CONTENT_W*0.17])
schemes_table.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), ORANGE),
("TEXTCOLOR", (0,0), (-1,0), WHITE),
("BACKGROUND", (0,1), (-1,1), LIGHT_ORG),
("BACKGROUND", (0,2), (-1,2), colors.HexColor("#FEF9E7")),
("BACKGROUND", (0,3), (-1,3), LIGHT_ORG),
("BACKGROUND", (0,4), (-1,4), colors.HexColor("#FEF9E7")),
("BACKGROUND", (0,5), (-1,5), LIGHT_ORG),
("ALIGN", (0,0), (0,-1), "CENTER"),
("ALIGN", (3,0), (3,-1), "CENTER"),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 5),
("RIGHTPADDING", (0,0), (-1,-1), 5),
("GRID", (0,0), (-1,-1), 0.4, colors.HexColor("#F0B27A")),
("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
("FONTSIZE", (0,0), (-1,-1), 8.5),
]))
story.append(schemes_table)
story.append(Spacer(1, 0.3*cm))
# ════════════════════════════════════════════════════════════════════════════
# ROW 3 – DISTRICT SERVICES + KEY NUMBERS (side by side)
# ════════════════════════════════════════════════════════════════════════════
# --- District Services ---
dist_inner = [
[Paragraph("Services at <b>100 District Hospitals</b> | Support: <b>Rs. 1.66 Crores per annum</b>",
ParagraphStyle("dh", parent=sBody, textColor=DARK_BLUE, fontName="Helvetica-Bold",
fontSize=8.5))],
[bullet("Common diagnostic services, basic surgery, chemotherapy & palliative care")],
[bullet("<b>Chemotherapy drugs</b> for 100 patients per district hospital")],
[bullet("<b>Day care chemotherapy</b> facilities established")],
[bullet("<b>Lab investigations incl. mammography</b> (outsourced at govt rates if unavailable)")],
[bullet("<b>Home-based palliative care</b> for chronic/debilitating/progressive patients")],
[Paragraph("Contractual Manpower:", sBold)],
[sub_bullet("1 Medical Oncologist")],
[sub_bullet("1 Cytopathologist")],
[sub_bullet("1 Cytopathology Technician")],
[sub_bullet("2 Nurses for Day Care")],
]
dist_table = Table(dist_inner, colWidths=[CONTENT_W*0.58])
dist_table.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), LIGHT_BLUE),
("TOPPADDING", (0,0), (-1,-1), 3),
("BOTTOMPADDING", (0,0), (-1,-1), 2),
("LEFTPADDING", (0,0), (-1,-1), 6),
("RIGHTPADDING", (0,0), (-1,-1), 6),
]))
dist_block = [
section_header("Cancer Services at District Level (NPCDCS)", DARK_BLUE),
Spacer(1, 0.15*cm),
dist_table,
]
# --- Key Numbers box ---
kn_data = [
[Paragraph("<b>KEY NUMBERS</b>", sWhite)],
]
kn_header = Table(kn_data, colWidths=[CONTENT_W*0.35])
kn_header.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), DARK_RED),
("TOPPADDING", (0,0), (-1,-1), 6),
("BOTTOMPADDING", (0,0), (-1,-1), 6),
]))
kn_rows = [
("New cases/year", "10 Lakh"),
("Total cases", "2.8 Million"),
("NCCP launched", "1975-76"),
("Into NPCDCS", "2010"),
("RCC grant", "Rs. 3 Cr"),
("Oncology Wing grant", "Rs. 3 Cr"),
("District support", "Rs. 1.66 Cr/yr"),
("Districts covered", "100"),
("Chemo patients", "100/district"),
("State Cancer Inst.", "5 SCIs"),
("Tertiary Centres", "45 TCCs"),
("TCC funding", "Rs. 6 Cr each"),
("Awareness Day", "Nov 7th"),
]
kn_table_data = []
for i, (label, value) in enumerate(kn_rows):
bg = colors.HexColor("#FADBD8") if i % 2 == 0 else WHITE
kn_table_data.append([
Paragraph(label, ParagraphStyle("kl", parent=sSmall, textColor=DARK_GRAY)),
Paragraph(f"<b>{value}</b>", ParagraphStyle("kv", parent=sSmall,
textColor=DARK_RED,
fontName="Helvetica-Bold",
alignment=TA_CENTER)),
])
kn_inner = Table(kn_table_data, colWidths=[CONTENT_W*0.35*0.6, CONTENT_W*0.35*0.4])
kn_inner.setStyle(TableStyle([
("TOPPADDING", (0,0), (-1,-1), 3),
("BOTTOMPADDING", (0,0), (-1,-1), 3),
("LEFTPADDING", (0,0), (-1,-1), 5),
("RIGHTPADDING", (0,0), (-1,-1), 5),
("GRID", (0,0), (-1,-1), 0.3, colors.HexColor("#F5B7B1")),
("ROWBACKGROUNDS", (0,0), (-1,-1), [colors.HexColor("#FADBD8"), WHITE]),
]))
kn_block = [
kn_header,
kn_inner,
]
col_left = CONTENT_W * 0.60
col_right = CONTENT_W * 0.37
gap2 = CONTENT_W * 0.03
side2_data = [[build_nested(dist_block), Spacer(gap2, 1), build_nested(kn_block)]]
side2_table = Table(side2_data, colWidths=[col_left, gap2, col_right])
side2_table.setStyle(TableStyle([
("VALIGN", (0,0), (-1,-1), "TOP"),
("LEFTPADDING", (0,0), (-1,-1), 0),
("RIGHTPADDING", (0,0), (-1,-1), 0),
("TOPPADDING", (0,0), (-1,-1), 0),
("BOTTOMPADDING", (0,0), (-1,-1), 0),
]))
story.append(side2_table)
story.append(Spacer(1, 0.3*cm))
# ════════════════════════════════════════════════════════════════════════════
# INSTITUTIONAL FRAMEWORK + ALERT BOX
# ════════════════════════════════════════════════════════════════════════════
story.append(section_header("Institutional Framework", DARK_BLUE))
story.append(Spacer(1, 0.15*cm))
inst_data = [
[Paragraph("<b>5 State Cancer Institutes (SCIs)</b>", sCenterB),
Paragraph("<b>45 Tertiary Cancer Centres (TCCs)</b>", sCenterB)],
[Paragraph("Apex institution in each state\nfor comprehensive cancer\ndiagnosis, treatment & care", sCenter),
Paragraph("Provide comprehensive cancer\ncare services\nRs. 6 Crores each (2011-12)", sCenter)],
]
inst_table = Table(inst_data, colWidths=[CONTENT_W*0.5, CONTENT_W*0.5])
inst_table.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), DARK_BLUE),
("TEXTCOLOR", (0,0), (-1,0), WHITE),
("BACKGROUND", (0,1), (0,1), LIGHT_BLUE),
("BACKGROUND", (1,1), (1,1), colors.HexColor("#EBF5FB")),
("ALIGN", (0,0), (-1,-1), "CENTER"),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("TOPPADDING", (0,0), (-1,-1), 8),
("BOTTOMPADDING", (0,0), (-1,-1), 8),
("GRID", (0,0), (-1,-1), 0.5, MED_BLUE),
("FONTSIZE", (0,1), (-1,-1), 8.5),
("LEADING", (0,1), (-1,-1), 12),
]))
story.append(inst_table)
story.append(Spacer(1, 0.3*cm))
# ── ALERT / REMEMBER BOX ────────────────────────────────────────────────────
alert_data = [[
Paragraph("★ <b>REMEMBER:</b> National Cancer Awareness Day = <b>November 7th</b>"
" | NCCP launched <b>1975-76</b>"
" | Integrated into NPCDCS in <b>2010</b>", sAlert)
]]
alert_table = Table(alert_data, colWidths=[CONTENT_W])
alert_table.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), YELLOW_BG),
("TOPPADDING", (0,0), (-1,-1), 8),
("BOTTOMPADDING", (0,0), (-1,-1), 8),
("LEFTPADDING", (0,0), (-1,-1), 10),
("RIGHTPADDING", (0,0), (-1,-1), 10),
("BOX", (0,0), (-1,-1), 1.5, DARK_RED),
("ROUNDEDCORNERS", [5]),
]))
story.append(alert_table)
story.append(Spacer(1, 0.2*cm))
# ── Footer ───────────────────────────────────────────────────────────────────
story.append(HRFlowable(width=CONTENT_W, thickness=0.5, color=colors.lightgrey))
story.append(Spacer(1, 0.1*cm))
story.append(Paragraph(
"Source: K. Park – Preventive & Social Medicine (Community Medicine) | MBBS 3rd Year | NPCDCS Cancer Component",
ParagraphStyle("footer", parent=sSmall, textColor=colors.grey,
alignment=TA_CENTER, fontSize=7)
))
# ════════════════════════════════════════════════════════════════════════════
# BUILD
# ════════════════════════════════════════════════════════════════════════════
doc.build(story)
print(f"PDF saved to: {OUTPUT}")
python3 /home/daytona/workspace/cancer-programme/generate_card.py
~/cancer-programme/generate_card.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import cm
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, HRFlowable
)
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT
OUTPUT = "/home/daytona/workspace/cancer-programme/Cancer_Programme_Quick_Reference.pdf"
DARK_RED = colors.HexColor("#C0392B")
MED_RED = colors.HexColor("#E74C3C")
LIGHT_RED = colors.HexColor("#FADBD8")
DARK_BLUE = colors.HexColor("#1A5276")
MED_BLUE = colors.HexColor("#2980B9")
LIGHT_BLUE = colors.HexColor("#D6EAF8")
ORANGE = colors.HexColor("#D35400")
LIGHT_ORG = colors.HexColor("#FAE5D3")
GREEN = colors.HexColor("#1E8449")
LIGHT_GRN = colors.HexColor("#D5F5E3")
YELLOW_BG = colors.HexColor("#FEF9E7")
WHITE = colors.white
DARK_GRAY = colors.HexColor("#2C3E50")
doc = SimpleDocTemplate(
OUTPUT, pagesize=A4,
leftMargin=1.5*cm, rightMargin=1.5*cm,
topMargin=1.8*cm, bottomMargin=1.8*cm,
title="National Cancer Programme – Quick Reference Card",
)
W, H = A4
CW = W - 3*cm # content width
ss = getSampleStyleSheet()
def S(name, **kw):
return ParagraphStyle(name, parent=ss["Normal"], **kw)
sTitle = S("T", fontSize=17, textColor=WHITE, alignment=TA_CENTER,
fontName="Helvetica-Bold", leading=21)
sSub = S("Su", fontSize=9, textColor=colors.HexColor("#FADBD8"),
alignment=TA_CENTER, fontName="Helvetica", leading=12)
sSecH = S("SH", fontSize=11, textColor=WHITE, fontName="Helvetica-Bold",
leading=14, alignment=TA_LEFT)
sBody = S("B", fontSize=8.5, textColor=DARK_GRAY, leading=12, fontName="Helvetica")
sBold = S("Bd", fontSize=8.5, textColor=DARK_GRAY, leading=12, fontName="Helvetica-Bold")
sSmall = S("Sm", fontSize=8, textColor=DARK_GRAY, leading=11, fontName="Helvetica")
sC = S("C", fontSize=8.5, textColor=DARK_GRAY, leading=12,
alignment=TA_CENTER, fontName="Helvetica")
sCB = S("CB", fontSize=8.5, textColor=DARK_GRAY, leading=12,
alignment=TA_CENTER, fontName="Helvetica-Bold")
sAlert = S("Al", fontSize=9.5, textColor=DARK_RED, fontName="Helvetica-Bold",
alignment=TA_CENTER, leading=14)
sNumBig = S("NB", fontSize=20, textColor=MED_RED, fontName="Helvetica-Bold",
alignment=TA_CENTER, leading=24)
sNumLbl = S("NL", fontSize=7.5, textColor=DARK_GRAY, fontName="Helvetica",
alignment=TA_CENTER, leading=10)
sWhite = S("W", fontSize=9, textColor=WHITE, fontName="Helvetica-Bold",
alignment=TA_CENTER, leading=12)
sFooter = S("F", fontSize=7, textColor=colors.grey, alignment=TA_CENTER)
sKv = S("Kv", fontSize=8, textColor=DARK_RED, fontName="Helvetica-Bold",
alignment=TA_CENTER, leading=11)
sKl = S("Kl", fontSize=8, textColor=DARK_GRAY, leading=11, fontName="Helvetica")
def sec_hdr(txt, bg=DARK_RED):
t = Table([[Paragraph(txt, sSecH)]], colWidths=[CW])
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), 10),
("RIGHTPADDING", (0,0),(-1,-1), 10),
]))
return t
def bul(txt, ind=0.3):
return Paragraph(f"• {txt}",
ParagraphStyle("bl", parent=sBody, leftIndent=ind*cm, spaceAfter=1))
def sbul(txt):
return Paragraph(f"– {txt}",
ParagraphStyle("sb", parent=sSmall, leftIndent=0.9*cm, spaceAfter=1))
story = []
# ═══════════════════ TITLE BANNER ════════════════════════════════════════════
banner = Table([
[Paragraph("National Cancer Control Programme (NCCP)", sTitle)],
[Paragraph("Cancer Component under NPCDCS | Quick Reference Card | K. Park – Community Medicine", sSub)],
], colWidths=[CW])
banner.setStyle(TableStyle([
("BACKGROUND", (0,0),(-1,-1), DARK_RED),
("TOPPADDING", (0,0),(-1,-1), 10),
("BOTTOMPADDING", (0,0),(-1,-1), 10),
("LEFTPADDING", (0,0),(-1,-1), 14),
("RIGHTPADDING", (0,0),(-1,-1), 14),
]))
story += [banner, Spacer(1, 0.25*cm)]
# ═══════════════════ ROW 1: EPIDEMIOLOGY + TIMELINE (side by side) ═══════════
# Epi numbers
epi_nums = Table([
[Paragraph("<b>10 Lakh</b>", sNumBig), Paragraph("<b>2.8 Million</b>", sNumBig)],
[Paragraph("New cases per year", sNumLbl), Paragraph("Total cases at any time", sNumLbl)],
], colWidths=[CW*0.26, CW*0.26])
epi_nums.setStyle(TableStyle([
("BACKGROUND", (0,0),(-1,-1), LIGHT_RED),
("TOPPADDING", (0,0),(-1,-1), 5),
("BOTTOMPADDING", (0,0),(-1,-1), 4),
("LEFTPADDING", (0,0),(-1,-1), 4),
("RIGHTPADDING", (0,0),(-1,-1), 4),
("ALIGN", (0,0),(-1,-1), "CENTER"),
]))
epi_hdr = Table([[Paragraph("Epidemiology in India", sSecH)]], colWidths=[CW*0.52])
epi_hdr.setStyle(TableStyle([
("BACKGROUND", (0,0),(-1,-1), DARK_RED),
("TOPPADDING", (0,0),(-1,-1), 6),("BOTTOMPADDING",(0,0),(-1,-1),6),
("LEFTPADDING", (0,0),(-1,-1), 10),("RIGHTPADDING",(0,0),(-1,-1),10),
]))
epi_col = Table([[epi_hdr],[epi_nums]], colWidths=[CW*0.52])
epi_col.setStyle(TableStyle([
("LEFTPADDING",(0,0),(-1,-1),0),("RIGHTPADDING",(0,0),(-1,-1),0),
("TOPPADDING",(0,0),(-1,-1),0),("BOTTOMPADDING",(0,0),(-1,-1),0),
("VALIGN",(0,0),(-1,-1),"TOP"),
]))
# Timeline
tl_rows = [
[Paragraph("<b>1975-76</b>", sCB), Paragraph("NCCP Launched", sC)],
[Paragraph("<b>1984-85</b>", sCB), Paragraph("First Revision", sC)],
[Paragraph("<b>Dec 2004</b>",sCB), Paragraph("Second Revision", sC)],
[Paragraph("<b>2010</b>", sCB), Paragraph("Integrated into NPCDCS", sC)],
]
tl_inner = Table(tl_rows, colWidths=[CW*0.42*0.36, CW*0.42*0.64])
tl_inner.setStyle(TableStyle([
("BACKGROUND", (0,0),(-1,-1), LIGHT_BLUE),
("BACKGROUND", (0,0),(0,-1), MED_BLUE),
("TEXTCOLOR", (0,0),(0,-1), WHITE),
("TOPPADDING", (0,0),(-1,-1), 5),("BOTTOMPADDING",(0,0),(-1,-1),5),
("LEFTPADDING", (0,0),(-1,-1), 6),("RIGHTPADDING",(0,0),(-1,-1),6),
("GRID", (0,0),(-1,-1), 0.3, colors.HexColor("#AED6F1")),
("FONTSIZE", (0,0),(-1,-1), 8),
]))
tl_hdr = Table([[Paragraph("Historical Timeline", sSecH)]], colWidths=[CW*0.42])
tl_hdr.setStyle(TableStyle([
("BACKGROUND", (0,0),(-1,-1), DARK_BLUE),
("TOPPADDING", (0,0),(-1,-1), 6),("BOTTOMPADDING",(0,0),(-1,-1),6),
("LEFTPADDING", (0,0),(-1,-1), 10),("RIGHTPADDING",(0,0),(-1,-1),10),
]))
tl_col = Table([[tl_hdr],[tl_inner]], colWidths=[CW*0.42])
tl_col.setStyle(TableStyle([
("LEFTPADDING",(0,0),(-1,-1),0),("RIGHTPADDING",(0,0),(-1,-1),0),
("TOPPADDING",(0,0),(-1,-1),0),("BOTTOMPADDING",(0,0),(-1,-1),0),
("VALIGN",(0,0),(-1,-1),"TOP"),
]))
row1 = Table([[epi_col, Spacer(CW*0.06,1), tl_col]],
colWidths=[CW*0.52, CW*0.06, CW*0.42])
row1.setStyle(TableStyle([
("VALIGN",(0,0),(-1,-1),"TOP"),
("LEFTPADDING",(0,0),(-1,-1),0),("RIGHTPADDING",(0,0),(-1,-1),0),
("TOPPADDING",(0,0),(-1,-1),0),("BOTTOMPADDING",(0,0),(-1,-1),0),
]))
story += [row1, Spacer(1, 0.25*cm)]
# ═══════════════════ OBJECTIVES ══════════════════════════════════════════════
story.append(sec_hdr("Objectives – Three Levels of Prevention", GREEN))
story.append(Spacer(1, 0.12*cm))
obj = Table([
[Paragraph("<b>PRIMARY</b>",sCB),Paragraph("<b>SECONDARY</b>",sCB),Paragraph("<b>TERTIARY</b>",sCB)],
[Paragraph("Health education\nto prevent cancer",sC),
Paragraph("Early detection & diagnosis\nCervix | Mouth | Breast\n& Tobacco-related\n(Screening / Self-exam)",sC),
Paragraph("Strengthen institutions\nfor comprehensive therapy\nincl. Palliative Care",sC)],
], colWidths=[CW/3]*3)
obj.setStyle(TableStyle([
("BACKGROUND",(0,0),(-1,0),GREEN),("TEXTCOLOR",(0,0),(-1,0),WHITE),
("BACKGROUND",(0,1),(0,1),LIGHT_GRN),
("BACKGROUND",(1,1),(1,1),colors.HexColor("#EAFAF1")),
("BACKGROUND",(2,1),(2,1),LIGHT_GRN),
("ALIGN",(0,0),(-1,-1),"CENTER"),("VALIGN",(0,0),(-1,-1),"MIDDLE"),
("TOPPADDING",(0,0),(-1,-1),7),("BOTTOMPADDING",(0,0),(-1,-1),7),
("LEFTPADDING",(0,0),(-1,-1),5),("RIGHTPADDING",(0,0),(-1,-1),5),
("GRID",(0,0),(-1,-1),0.5,GREEN),
("FONTSIZE",(0,1),(-1,-1),8.5),("LEADING",(0,1),(-1,-1),12),
]))
story += [obj, Spacer(1, 0.25*cm)]
# ═══════════════════ SCHEMES ══════════════════════════════════════════════════
story.append(sec_hdr("Schemes under the Revised Programme", ORANGE))
story.append(Spacer(1, 0.12*cm))
sch_data = [
[Paragraph("<b>#</b>",sCB),Paragraph("<b>Scheme</b>",sCB),
Paragraph("<b>Key Points</b>",sCB),Paragraph("<b>Grant</b>",sCB)],
[Paragraph("1",sCB),Paragraph("<b>Regional Cancer Centre (RCC) Scheme</b>",sBody),
Paragraph("RCCs as <b>tertiary referral centres</b>. Excludes TMH Mumbai & IRCH AIIMS. CNCI Kolkata on approved pattern.",sSmall),
Paragraph("<b>Rs. 3 Cr</b> (one-time)",sC)],
[Paragraph("2",sCB),Paragraph("<b>Oncology Wing Development Scheme</b>",sBody),
Paragraph("Fills <b>geographic gaps</b>. Equipment incl. <b>cobalt unit</b>. Civil work from grant; manpower by state govt.",sSmall),
Paragraph("<b>Rs. 3 Cr</b> per institution",sC)],
[Paragraph("3",sCB),Paragraph("<b>Decentralized NGO Scheme</b>",sBody),
Paragraph("IEC activities & early detection. Operated by nodal agencies. NGOs get financial assistance.",sSmall),
Paragraph("–",sC)],
[Paragraph("4",sCB),Paragraph("<b>IEC at Central Level</b>",sBody),
Paragraph("Anti-Tobacco Legislation publicity. Awareness of ill-effects of tobacco. <b>Nov 7 = National Cancer Awareness Day</b>",sSmall),
Paragraph("–",sC)],
[Paragraph("5",sCB),Paragraph("<b>Research & Training</b>",sBody),
Paragraph("Manuals: (a) Health Professionals (b) Cytology (c) Palliative Care (d) Tobacco Cessation",sSmall),
Paragraph("–",sC)],
]
sch = Table(sch_data, colWidths=[CW*0.05, CW*0.27, CW*0.51, CW*0.17])
sch.setStyle(TableStyle([
("BACKGROUND",(0,0),(-1,0),ORANGE),("TEXTCOLOR",(0,0),(-1,0),WHITE),
("ROWBACKGROUNDS",(0,1),(-1,-1),[LIGHT_ORG, YELLOW_BG]),
("ALIGN",(0,0),(0,-1),"CENTER"),("ALIGN",(3,0),(3,-1),"CENTER"),
("VALIGN",(0,0),(-1,-1),"MIDDLE"),
("TOPPADDING",(0,0),(-1,-1),5),("BOTTOMPADDING",(0,0),(-1,-1),5),
("LEFTPADDING",(0,0),(-1,-1),5),("RIGHTPADDING",(0,0),(-1,-1),5),
("GRID",(0,0),(-1,-1),0.4,colors.HexColor("#F0B27A")),
("FONTSIZE",(0,0),(-1,-1),8.5),
]))
story += [sch, Spacer(1, 0.25*cm)]
# ═══════════════════ ROW 3: DISTRICT SERVICES + KEY NUMBERS ══════════════════
# District
dist_content = [
[Paragraph("Services at <b>100 District Hospitals</b> | <b>Rs. 1.66 Crores per annum</b>",
ParagraphStyle("dh", parent=sBody, textColor=DARK_BLUE, fontName="Helvetica-Bold", fontSize=8.5))],
[bul("Common diagnostic services, basic surgery, chemotherapy & palliative care")],
[bul("<b>Chemotherapy drugs</b> for 100 patients per district hospital")],
[bul("<b>Day care chemotherapy</b> facilities established")],
[bul("<b>Lab investigations incl. mammography</b> (outsourced at govt rates if unavailable)")],
[bul("<b>Home-based palliative care</b> for chronic/debilitating/progressive patients")],
[Paragraph("Contractual Manpower:", sBold)],
[sbul("1 Medical Oncologist")],
[sbul("1 Cytopathologist")],
[sbul("1 Cytopathology Technician")],
[sbul("2 Nurses for Day Care")],
]
dist_inner = Table(dist_content, colWidths=[CW*0.59])
dist_inner.setStyle(TableStyle([
("BACKGROUND",(0,0),(-1,-1),LIGHT_BLUE),
("TOPPADDING",(0,0),(-1,-1),3),("BOTTOMPADDING",(0,0),(-1,-1),2),
("LEFTPADDING",(0,0),(-1,-1),6),("RIGHTPADDING",(0,0),(-1,-1),6),
]))
dist_hdr = Table([[Paragraph("Cancer Services at District Level (NPCDCS)", sSecH)]], colWidths=[CW*0.59])
dist_hdr.setStyle(TableStyle([
("BACKGROUND",(0,0),(-1,-1),DARK_BLUE),
("TOPPADDING",(0,0),(-1,-1),6),("BOTTOMPADDING",(0,0),(-1,-1),6),
("LEFTPADDING",(0,0),(-1,-1),10),("RIGHTPADDING",(0,0),(-1,-1),10),
]))
dist_col = Table([[dist_hdr],[dist_inner]], colWidths=[CW*0.59])
dist_col.setStyle(TableStyle([
("LEFTPADDING",(0,0),(-1,-1),0),("RIGHTPADDING",(0,0),(-1,-1),0),
("TOPPADDING",(0,0),(-1,-1),0),("BOTTOMPADDING",(0,0),(-1,-1),0),
("VALIGN",(0,0),(-1,-1),"TOP"),
]))
# Key numbers
kn_pairs = [
("New cases/year","10 Lakh"),("Total cases","2.8 Million"),
("NCCP launched","1975-76"),("Integrated NPCDCS","2010"),
("RCC grant","Rs. 3 Cr"),("Oncology Wing","Rs. 3 Cr"),
("District support","Rs. 1.66 Cr/yr"),("Districts covered","100"),
("Chemo patients","100/district"),("State Cancer Inst.","5 SCIs"),
("Tertiary Centres","45 TCCs"),("TCC funding","Rs. 6 Cr each"),
("Awareness Day","Nov 7th"),
]
kn_rows2 = [[Paragraph(l, sKl), Paragraph(f"<b>{v}</b>", sKv)] for l,v in kn_pairs]
kn_inner = Table(kn_rows2, colWidths=[CW*0.35*0.58, CW*0.35*0.42])
kn_inner.setStyle(TableStyle([
("TOPPADDING",(0,0),(-1,-1),3),("BOTTOMPADDING",(0,0),(-1,-1),3),
("LEFTPADDING",(0,0),(-1,-1),5),("RIGHTPADDING",(0,0),(-1,-1),5),
("GRID",(0,0),(-1,-1),0.3,colors.HexColor("#F5B7B1")),
("ROWBACKGROUNDS",(0,0),(-1,-1),[LIGHT_RED, WHITE]),
]))
kn_hdr = Table([[Paragraph("KEY NUMBERS ★", sWhite)]], colWidths=[CW*0.35])
kn_hdr.setStyle(TableStyle([
("BACKGROUND",(0,0),(-1,-1),DARK_RED),
("TOPPADDING",(0,0),(-1,-1),6),("BOTTOMPADDING",(0,0),(-1,-1),6),
("LEFTPADDING",(0,0),(-1,-1),8),("RIGHTPADDING",(0,0),(-1,-1),8),
]))
kn_col = Table([[kn_hdr],[kn_inner]], colWidths=[CW*0.35])
kn_col.setStyle(TableStyle([
("LEFTPADDING",(0,0),(-1,-1),0),("RIGHTPADDING",(0,0),(-1,-1),0),
("TOPPADDING",(0,0),(-1,-1),0),("BOTTOMPADDING",(0,0),(-1,-1),0),
("VALIGN",(0,0),(-1,-1),"TOP"),
]))
row3 = Table([[dist_col, Spacer(CW*0.06,1), kn_col]],
colWidths=[CW*0.59, CW*0.06, CW*0.35])
row3.setStyle(TableStyle([
("VALIGN",(0,0),(-1,-1),"TOP"),
("LEFTPADDING",(0,0),(-1,-1),0),("RIGHTPADDING",(0,0),(-1,-1),0),
("TOPPADDING",(0,0),(-1,-1),0),("BOTTOMPADDING",(0,0),(-1,-1),0),
]))
story += [row3, Spacer(1, 0.25*cm)]
# ═══════════════════ INSTITUTIONAL FRAMEWORK ══════════════════════════════════
story.append(sec_hdr("Institutional Framework", DARK_BLUE))
story.append(Spacer(1, 0.12*cm))
inst = Table([
[Paragraph("<b>5 State Cancer Institutes (SCIs)</b>",sCB),
Paragraph("<b>45 Tertiary Cancer Centres (TCCs)</b>",sCB)],
[Paragraph("Apex institution in each state\nfor comprehensive cancer\ndiagnosis, treatment & care",sC),
Paragraph("Provide comprehensive cancer care\nRs. 6 Crores each (2011-12)",sC)],
], colWidths=[CW*0.5, CW*0.5])
inst.setStyle(TableStyle([
("BACKGROUND",(0,0),(-1,0),DARK_BLUE),("TEXTCOLOR",(0,0),(-1,0),WHITE),
("BACKGROUND",(0,1),(0,1),LIGHT_BLUE),
("BACKGROUND",(1,1),(1,1),colors.HexColor("#EBF5FB")),
("ALIGN",(0,0),(-1,-1),"CENTER"),("VALIGN",(0,0),(-1,-1),"MIDDLE"),
("TOPPADDING",(0,0),(-1,-1),8),("BOTTOMPADDING",(0,0),(-1,-1),8),
("GRID",(0,0),(-1,-1),0.5,MED_BLUE),
("FONTSIZE",(0,1),(-1,-1),8.5),("LEADING",(0,1),(-1,-1),12),
]))
story += [inst, Spacer(1, 0.25*cm)]
# ═══════════════════ ALERT BOX ════════════════════════════════════════════════
alert = Table([[Paragraph(
"★ <b>REMEMBER:</b> National Cancer Awareness Day = <b>November 7th</b>"
" | NCCP launched <b>1975-76</b>"
" | Integrated into NPCDCS in <b>2010</b>", sAlert)
]], colWidths=[CW])
alert.setStyle(TableStyle([
("BACKGROUND",(0,0),(-1,-1),YELLOW_BG),
("TOPPADDING",(0,0),(-1,-1),8),("BOTTOMPADDING",(0,0),(-1,-1),8),
("LEFTPADDING",(0,0),(-1,-1),10),("RIGHTPADDING",(0,0),(-1,-1),10),
("BOX",(0,0),(-1,-1),1.5,DARK_RED),
]))
story += [alert, Spacer(1, 0.2*cm)]
# ═══════════════════ FOOTER ═══════════════════════════════════════════════════
story.append(HRFlowable(width=CW, thickness=0.5, color=colors.lightgrey))
story.append(Spacer(1, 0.1*cm))
story.append(Paragraph(
"Source: K. Park – Preventive & Social Medicine (Community Medicine) | MBBS 3rd Year | NPCDCS Cancer Component",
sFooter))
doc.build(story)
print(f"PDF saved: {OUTPUT}")
~/cancer-programme/generate_card.py
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/cancer-programme/generate_card.py'
cat > /home/daytona/workspace/cancer-programme/generate_card.py << 'PYEOF' from …
python3 /home/daytona/workspace/cancer-programme/generate_card.py
Cancer Programme Quick Reference
PDF Document · PDF
| Section | Colour |
|---|---|
| Title Banner | Dark Red |
| Epidemiology (10 Lakh / 2.8 Million) | Red numbers on pink |
| Historical Timeline (1975-76 to 2010) | Blue |
| Objectives (3 prevention levels) | Green table |
| 5 Schemes with grants | Orange table |
| District Services (100 hospitals, Rs. 1.66 Cr) | Blue list |
| KEY NUMBERS quick-ref column | Red-on-pink |
| Institutional Framework (5 SCIs + 45 TCCs) | Blue |
| Remember box (Nov 7th + dates) | Yellow highlight with red border |