~/bacteria-pdf/make_bacteria_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
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
HRFlowable, PageBreak
)
from reportlab.lib.enums import TA_CENTER, TA_LEFT
from reportlab.pdfbase.ttfonts import TTFont
from reportlab.pdfbase import pdfmetrics
import os
OUTPUT = "/home/daytona/workspace/bacteria-pdf/Bacteria_Medical_Notes_Hinglish.pdf"
doc = SimpleDocTemplate(
OUTPUT,
pagesize=A4,
rightMargin=1.8*cm,
leftMargin=1.8*cm,
topMargin=2*cm,
bottomMargin=2*cm,
)
# āā Colour palette āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
C_DARK_BLUE = colors.HexColor("#1a237e")
C_BLUE = colors.HexColor("#1565C0")
C_LIGHT_BLUE = colors.HexColor("#E3F2FD")
C_GREEN = colors.HexColor("#1B5E20")
C_LIGHT_GREEN = colors.HexColor("#E8F5E9")
C_RED = colors.HexColor("#B71C1C")
C_LIGHT_RED = colors.HexColor("#FFEBEE")
C_ORANGE = colors.HexColor("#E65100")
C_LIGHT_ORG = colors.HexColor("#FFF3E0")
C_PURPLE = colors.HexColor("#4A148C")
C_LIGHT_PUR = colors.HexColor("#F3E5F5")
C_YELLOW_BG = colors.HexColor("#FFFDE7")
C_TEAL = colors.HexColor("#004D40")
C_LIGHT_TEAL = colors.HexColor("#E0F2F1")
C_GREY_LIGHT = colors.HexColor("#F5F5F5")
C_GREY_MED = colors.HexColor("#BDBDBD")
C_WHITE = colors.white
C_BLACK = colors.HexColor("#212121")
styles = getSampleStyleSheet()
def S(name, **kw):
return ParagraphStyle(name, **kw)
# āā Custom styles āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
title_style = S("Title2",
fontSize=26, leading=32, textColor=C_WHITE,
alignment=TA_CENTER, fontName="Helvetica-Bold")
subtitle_style = S("Subtitle2",
fontSize=13, leading=18, textColor=C_LIGHT_BLUE,
alignment=TA_CENTER, fontName="Helvetica")
section_style = S("Section",
fontSize=15, leading=20, textColor=C_WHITE,
fontName="Helvetica-Bold", spaceBefore=14, spaceAfter=4)
subsection_style = S("Sub",
fontSize=12, leading=16, textColor=C_DARK_BLUE,
fontName="Helvetica-Bold", spaceBefore=10, spaceAfter=4)
body_style = S("Body2",
fontSize=9.5, leading=14, textColor=C_BLACK,
fontName="Helvetica")
bold_body = S("BoldBody",
fontSize=9.5, leading=14, textColor=C_BLACK,
fontName="Helvetica-Bold")
small_style = S("Small",
fontSize=8.5, leading=12, textColor=colors.HexColor("#555555"),
fontName="Helvetica", alignment=TA_CENTER)
tip_style = S("Tip",
fontSize=9, leading=13, textColor=C_TEAL,
fontName="Helvetica-Bold", leftIndent=6)
# āā Helper: coloured section banner āāāāāāāāāāāāāāāāāāāāāāāāāāāāā
def banner(text, bg_color, text_color=C_WHITE):
data = [[Paragraph(text, S("b", fontSize=13, leading=18,
textColor=text_color,
fontName="Helvetica-Bold",
alignment=TA_LEFT))]]
t = Table(data, colWidths=[17.4*cm])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), bg_color),
("TOPPADDING", (0,0), (-1,-1), 7),
("BOTTOMPADDING",(0,0),(-1,-1), 7),
("LEFTPADDING", (0,0), (-1,-1), 12),
("RIGHTPADDING",(0,0), (-1,-1), 8),
("ROUNDEDCORNERS", [4]),
]))
return t
# āā Helper: info box āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
def infobox(text, bg_color, text_color=C_BLACK):
data = [[Paragraph(text, S("ib", fontSize=9, leading=13,
textColor=text_color,
fontName="Helvetica",
leftIndent=4))]]
t = Table(data, colWidths=[17.4*cm])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), bg_color),
("TOPPADDING", (0,0), (-1,-1), 6),
("BOTTOMPADDING",(0,0),(-1,-1), 6),
("LEFTPADDING", (0,0), (-1,-1), 10),
("RIGHTPADDING",(0,0), (-1,-1), 8),
("BOX", (0,0),(-1,-1), 0.5, C_GREY_MED),
]))
return t
# āā Helper: data table āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
def data_table(headers, rows, col_widths, header_bg=C_BLUE, alt_bg=C_LIGHT_BLUE):
data = [headers] + rows
t = Table(data, colWidths=col_widths, repeatRows=1)
style = [
# Header row
("BACKGROUND", (0,0), (-1,0), header_bg),
("TEXTCOLOR", (0,0), (-1,0), C_WHITE),
("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
("FONTSIZE", (0,0), (-1,0), 9),
("ALIGN", (0,0), (-1,0), "CENTER"),
("TOPPADDING", (0,0), (-1,0), 6),
("BOTTOMPADDING",(0,0), (-1,0), 6),
# Body rows
("FONTNAME", (0,1), (-1,-1), "Helvetica"),
("FONTSIZE", (0,1), (-1,-1), 8.5),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("TOPPADDING", (0,1), (-1,-1), 5),
("BOTTOMPADDING",(0,1), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 6),
("RIGHTPADDING", (0,0), (-1,-1), 6),
("GRID", (0,0), (-1,-1), 0.4, C_GREY_MED),
("ROWBACKGROUNDS",(0,1),(-1,-1), [C_WHITE, alt_bg]),
("WORDWRAP", (0,0), (-1,-1), True),
]
t.setStyle(TableStyle(style))
return t
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
# BUILD CONTENT
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
story = []
# āā Cover Page āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
cover_bg = Table(
[[Paragraph("š¦ Bacteriology", title_style)],
[Spacer(1, 0.3*cm)],
[Paragraph("Complete Notes for Medical Students", subtitle_style)],
[Spacer(1, 0.2*cm)],
[Paragraph("Hinglish mein ā Gram +ve | Gram -ve | Anaerobic | Pseudomonas",
S("cv", fontSize=11, leading=16, textColor=C_LIGHT_BLUE,
alignment=TA_CENTER, fontName="Helvetica"))],
[Spacer(1, 0.5*cm)],
[Paragraph("Sources: Medical Microbiology 9e (Murray) | Robbins & Cotran | Schwartz Surgery",
S("src", fontSize=9, leading=13, textColor=colors.HexColor("#90CAF9"),
alignment=TA_CENTER, fontName="Helvetica-Oblique"))],
],
colWidths=[17.4*cm]
)
cover_bg.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), C_DARK_BLUE),
("TOPPADDING", (0,0), (-1,-1), 24),
("BOTTOMPADDING",(0,0), (-1,-1), 24),
("LEFTPADDING", (0,0), (-1,-1), 16),
("RIGHTPADDING", (0,0), (-1,-1), 16),
("BOX", (0,0), (-1,-1), 3, C_BLUE),
]))
story.append(Spacer(1, 1.5*cm))
story.append(cover_bg)
story.append(Spacer(1, 0.8*cm))
# Quick intro box
story.append(infobox(
"<b>Gram Stain kya hota hai?</b><br/>"
"Gram stain se bacteria do categories mein bante hain:<br/>"
"šµ <b>Gram Positive (+ve)</b> = Purple colour ā thick peptidoglycan cell wall hoti hai.<br/>"
"š“ <b>Gram Negative (-ve)</b> = Pink/Red colour ā thin peptidoglycan + outer membrane (LPS) hoti hai.<br/>"
"Yeh classification treatment (antibiotic choice) ke liye bahut important hai!",
C_YELLOW_BG, C_BLACK
))
story.append(Spacer(1, 0.4*cm))
# āā TABLE OF CONTENTS āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
story.append(banner("š TABLE OF CONTENTS", C_TEAL))
story.append(Spacer(1, 0.25*cm))
toc_items = [
"1. Gram Positive Cocci",
"2. Gram Positive Bacilli (Rods)",
"3. Acid-Fast Bacilli",
"4. Gram Negative Cocci",
"5. Gram Negative Bacilli ā Enterobacteriaceae",
"6. Gram Negative Bacilli ā Other Important",
"7. Pseudomonas aur Related",
"8. Anaerobic Bacteria",
"9. Atypical Bacteria (Special Group)",
"10. Quick Summary Table",
"11. Memory Tips (Mnemonics)",
]
for item in toc_items:
story.append(Paragraph(" " + item, body_style))
story.append(PageBreak())
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
# SECTION 1 ā GRAM POSITIVE COCCI
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
story.append(banner("šµ SECTION 1: GRAM POSITIVE COCCI", C_BLUE))
story.append(Spacer(1, 0.2*cm))
story.append(infobox(
"Gram +ve Cocci = Round-shaped bacteria jo <b>purple colour</b> lete hain Gram stain mein.<br/>"
"Ye bacteria clusters ya chains mein arrange hote hain.",
C_LIGHT_BLUE
))
story.append(Spacer(1, 0.25*cm))
# 1A Staphylococcus
story.append(banner("1A. Staphylococcus (Clusters mein ā angoor jaisi shape)", C_BLUE))
story.append(Spacer(1, 0.15*cm))
staph_headers = [
Paragraph("<b>Bacteria</b>", bold_body),
Paragraph("<b>Arrangement</b>", bold_body),
Paragraph("<b>Disease / Bimari</b>", bold_body),
Paragraph("<b>Key Point</b>", bold_body),
]
staph_rows = [
[Paragraph("Staphylococcus aureus", bold_body),
Paragraph("Clusters\n(angoor)", body_style),
Paragraph("Skin infection (furuncle, carbuncle, impetigo), Pneumonia, Food poisoning, Toxic Shock Syndrome, Osteomyelitis, Endocarditis, Septicemia", body_style),
Paragraph("MRSA = Methicillin-resistant (drug-resistant form) ā hospital mein common", body_style)],
[Paragraph("Staphylococcus epidermidis", bold_body),
Paragraph("Clusters", body_style),
Paragraph("Prosthetic valve endocarditis, Catheter-related bloodstream infection (nosocomial)", body_style),
Paragraph("Coagulase negative; normal skin flora hai", body_style)],
[Paragraph("Staphylococcus saprophyticus", bold_body),
Paragraph("Clusters", body_style),
Paragraph("UTI (Urinary Tract Infection) ā especially young sexually active women mein", body_style),
Paragraph("2nd most common UTI cause young women mein (E. coli ke baad)", body_style)],
]
story.append(data_table(staph_headers, staph_rows,
[3.5*cm, 2.5*cm, 6.5*cm, 4.9*cm], C_BLUE, C_LIGHT_BLUE))
story.append(Spacer(1, 0.35*cm))
# 1B Streptococcus
story.append(banner("1B. Streptococcus (Chains mein)", C_BLUE))
story.append(Spacer(1, 0.15*cm))
strep_headers = [
Paragraph("<b>Bacteria</b>", bold_body),
Paragraph("<b>Group/Type</b>", bold_body),
Paragraph("<b>Disease / Bimari</b>", bold_body),
Paragraph("<b>Key Point</b>", bold_body),
]
strep_rows = [
[Paragraph("S. pyogenes", bold_body),
Paragraph("Group A\nBeta-hemolytic", body_style),
Paragraph("Strep throat (tonsillitis), Scarlet fever, Rheumatic fever, Impetigo, Necrotizing fasciitis, Cellulitis", body_style),
Paragraph("Post-infection complications: Rheumatic fever, Glomerulonephritis", body_style)],
[Paragraph("S. agalactiae", bold_body),
Paragraph("Group B\nBeta-hemolytic", body_style),
Paragraph("Neonatal meningitis, Neonatal sepsis, Postpartum infection (maa mein)", body_style),
Paragraph("Pregnant women ko screening hoti hai (35-37 weeks)", body_style)],
[Paragraph("S. pneumoniae", bold_body),
Paragraph("Alpha-hemolytic\nDiplococci", body_style),
Paragraph("Lobar pneumonia, Bacterial meningitis, Otitis media, Sinusitis", body_style),
Paragraph("Lancet-shaped diplococci; optochin sensitive; penicillin se treat hota hai", body_style)],
[Paragraph("S. viridans group", bold_body),
Paragraph("Alpha-hemolytic", body_style),
Paragraph("Dental caries (daant ki sadhan), Subacute bacterial endocarditis (dental procedure ke baad)", body_style),
Paragraph("Dental procedure ke baad bacteremia karta hai", body_style)],
[Paragraph("S. bovis / gallolyticus", bold_body),
Paragraph("Group D", body_style),
Paragraph("Endocarditis, Bacteremia", body_style),
Paragraph("Colon cancer ke saath association!", body_style)],
]
story.append(data_table(strep_headers, strep_rows,
[3.2*cm, 2.5*cm, 6.2*cm, 5.5*cm], C_BLUE, C_LIGHT_BLUE))
story.append(Spacer(1, 0.35*cm))
# 1C Enterococcus
story.append(banner("1C. Enterococcus", C_BLUE))
story.append(Spacer(1, 0.15*cm))
ent_rows = [
[Paragraph("Enterococcus faecalis", bold_body),
Paragraph("Pairs/chains", body_style),
Paragraph("UTI, Endocarditis, Peritonitis, Wound infection", body_style),
Paragraph("Normal GI flora; hospital patients mein problem", body_style)],
[Paragraph("Enterococcus faecium", bold_body),
Paragraph("Pairs/chains", body_style),
Paragraph("UTI, Hospital-acquired infections", body_style),
Paragraph("VRE (Vancomycin-resistant) ā bahut dangerous!", body_style)],
]
story.append(data_table(staph_headers, ent_rows,
[3.5*cm, 2.5*cm, 6.5*cm, 4.9*cm], C_BLUE, C_LIGHT_BLUE))
story.append(PageBreak())
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
# SECTION 2 ā GRAM POSITIVE BACILLI
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
story.append(banner("šµ SECTION 2: GRAM POSITIVE BACILLI (Rod-shaped)", C_GREEN))
story.append(Spacer(1, 0.2*cm))
story.append(infobox(
"Gram +ve Bacilli = Rod/stick shape ke bacteria jo purple colour lete hain.<br/>"
"Kuch spore form karte hain (heat/chemical resistant) ā jaise Clostridium, Bacillus.",
C_LIGHT_GREEN
))
story.append(Spacer(1, 0.25*cm))
gpb_headers = [
Paragraph("<b>Bacteria</b>", bold_body),
Paragraph("<b>Special Feature</b>", bold_body),
Paragraph("<b>Disease / Bimari</b>", bold_body),
Paragraph("<b>Key Fact</b>", bold_body),
]
gpb_rows = [
[Paragraph("Clostridium tetani", bold_body),
Paragraph("Anaerobic\nSpore-forming", body_style),
Paragraph("TETANUS ā Jaw lock (lock jaw), Opisthotonus (body arch), Muscle spasm", body_style),
Paragraph("Toxin: Tetanospasmin ā inhibits GABA/glycine release", body_style)],
[Paragraph("Clostridium botulinum", bold_body),
Paragraph("Anaerobic\nSpore-forming", body_style),
Paragraph("BOTULISM ā Flaccid paralysis (weakness), tinned/canned food se, Infant botulism (honey se)", body_style),
Paragraph("Toxin: Botulinum toxin ā blocks ACh release at NMJ", body_style)],
[Paragraph("Clostridium perfringens", bold_body),
Paragraph("Anaerobic\nSpore-forming", body_style),
Paragraph("Gas Gangrene (wound mein gas), Food poisoning (meat se), Necrotizing enteritis", body_style),
Paragraph("Lecithinase (alpha toxin) ā cell membrane destroy karta hai", body_style)],
[Paragraph("Clostridium difficile\n(C. diff)", bold_body),
Paragraph("Anaerobic\nSpore-forming", body_style),
Paragraph("Pseudomembranous Colitis ā antibiotic lene ke baad severe diarrhea, watery/bloody stool", body_style),
Paragraph("Broad-spectrum antibiotic use ke baad hota hai; treat karo metronidazole/vancomycin se", body_style)],
[Paragraph("Bacillus anthracis", bold_body),
Paragraph("Aerobic\nSpore-forming", body_style),
Paragraph("ANTHRAX ā Cutaneous (skin par black eschar), Inhalation (wool sorter's disease), GI anthrax", body_style),
Paragraph("Bioterrorism agent; penicillin/ciprofloxacin se treat", body_style)],
[Paragraph("Bacillus cereus", bold_body),
Paragraph("Aerobic\nSpore-forming", body_style),
Paragraph("Food poisoning ā 2 types: (1) Emetic form: chawal khane ke 1-6 hr baad vomiting (2) Diarrheal form", body_style),
Paragraph("Fried rice disease bhi kehte hain!", body_style)],
[Paragraph("Listeria monocytogenes", bold_body),
Paragraph("Non-spore forming\nIntracellular", body_style),
Paragraph("Listeriosis ā Neonatal meningitis, Septicemia pregnant women mein, Stillbirth, Immunocompromised mein infection", body_style),
Paragraph("Unpasteurized cheese/deli meat se milta hai; cold temperature mein bhi grow karta hai!", body_style)],
[Paragraph("Corynebacterium diphtheriae", bold_body),
Paragraph("Club-shaped rods\nChinese letter arrangement", body_style),
Paragraph("DIPHTHERIA ā Gale mein grey-white pseudomembrane, Bull neck, Myocarditis, Neuropathy", body_style),
Paragraph("Toxin: ADP-ribosylation of EF-2 ā protein synthesis rokta hai; DTP vaccine se prevention", body_style)],
[Paragraph("Propionibacterium acnes\n(Cutibacterium acnes)", bold_body),
Paragraph("Anaerobic rod\nSkin flora", body_style),
Paragraph("Acne vulgaris (muhase), Prosthetic valve endocarditis", body_style),
Paragraph("Sebaceous glands mein free fatty acids produce karta hai ā inflammation causes karta hai", body_style)],
]
story.append(data_table(gpb_headers, gpb_rows,
[3.8*cm, 3*cm, 5.8*cm, 4.8*cm], C_GREEN, C_LIGHT_GREEN))
story.append(PageBreak())
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
# SECTION 3 ā ACID-FAST BACILLI
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
story.append(banner("š¤ SECTION 3: ACID-FAST BACILLI (AFB)", colors.HexColor("#5D4037")))
story.append(Spacer(1, 0.2*cm))
story.append(infobox(
"Acid-Fast Bacteria = Gram stain se properly stain nahi hote ā inki cell wall mein <b>mycolic acid</b> hota hai.<br/>"
"Ziehl-Neelsen stain use hota hai ā ye bacteria <b>red/pink colour</b> lete hain.<br/>"
"Ye slow-growing bacteria hain.",
colors.HexColor("#EFEBE9")
))
story.append(Spacer(1, 0.25*cm))
afb_headers = [
Paragraph("<b>Bacteria</b>", bold_body),
Paragraph("<b>Disease / Bimari</b>", bold_body),
Paragraph("<b>Key Facts</b>", bold_body),
]
afb_rows = [
[Paragraph("Mycobacterium tuberculosis", bold_body),
Paragraph("TUBERCULOSIS (TB) ā Pulmonary TB (khansi, hemoptysis), Miliary TB, TB meningitis, TB lymphadenitis (scrofula), TB spine (Pott's disease)", body_style),
Paragraph("RIPE therapy: Rifampicin, Isoniazid, Pyrazinamide, Ethambutol ā 6 months treatment. Ghanta (Mantoux) test se screen hota hai.", body_style)],
[Paragraph("Mycobacterium leprae", bold_body),
Paragraph("LEPROSY (Kushtha rog) ā Skin patches (hypopigmented), Nerve damage (loss of sensation), Claw hand, Leonine facies (lion face)", body_style),
Paragraph("2 types: Tuberculoid (strong immunity) aur Lepromatous (weak immunity). Dapsone + Rifampicin se treat.", body_style)],
[Paragraph("Mycobacterium avium complex (MAC)", bold_body),
Paragraph("Disseminated infection in HIV/AIDS patients ā Fever, weight loss, diarrhea, lymphadenopathy", body_style),
Paragraph("CD4 < 50 mein hota hai; azithromycin se prophylaxis", body_style)],
[Paragraph("Nocardia asteroides", bold_body),
Paragraph("Pulmonary Nocardiosis (cavitary pneumonia), Brain abscess, Cutaneous nocardiosis", body_style),
Paragraph("Partially acid-fast; TMP-SMX se treat; immunocompromised mein hota hai", body_style)],
]
story.append(data_table(afb_headers, afb_rows,
[4*cm, 7*cm, 6.4*cm], colors.HexColor("#5D4037"), colors.HexColor("#EFEBE9")))
story.append(PageBreak())
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
# SECTION 4 ā GRAM NEGATIVE COCCI
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
story.append(banner("š“ SECTION 4: GRAM NEGATIVE COCCI", C_RED))
story.append(Spacer(1, 0.2*cm))
story.append(infobox(
"Gram -ve Cocci = Round bacteria jo <b>pink/red colour</b> lete hain Gram stain mein.<br/>"
"Ye mainly diplococci (pairs mein) arrange hote hain. Neisseria genus sabse important hai.",
C_LIGHT_RED
))
story.append(Spacer(1, 0.25*cm))
gncocci_headers = [
Paragraph("<b>Bacteria</b>", bold_body),
Paragraph("<b>Arrangement</b>", bold_body),
Paragraph("<b>Disease / Bimari</b>", bold_body),
Paragraph("<b>Key Facts</b>", bold_body),
]
gncocci_rows = [
[Paragraph("Neisseria meningitidis\n(Meningococcus)", bold_body),
Paragraph("Diplococci\n(kidney-bean shape)", body_style),
Paragraph("Bacterial Meningitis ā sudden fever, neck stiffness, photophobia, Petechial/purpuric rash, Waterhouse-Friderichsen syndrome (adrenal hemorrhage)", body_style),
Paragraph("Polysaccharide capsule (A,B,C,W,Y types). Vaccine available. Penicillin se treat.", body_style)],
[Paragraph("Neisseria gonorrhoeae\n(Gonococcus)", bold_body),
Paragraph("Diplococci\n(inside PMN cells)", body_style),
Paragraph("GONORRHEA (STI) ā Urethritis (discharge + dysuria), Cervicitis, PID (Pelvic Inflammatory Disease), Neonatal ophthalmia neonatorum, Septic arthritis", body_style),
Paragraph("No polysaccharide capsule; No vaccine; Ceftriaxone se treat (penicillin resistant ho gaya)", body_style)],
[Paragraph("Moraxella catarrhalis", bold_body),
Paragraph("Diplococci", body_style),
Paragraph("Otitis media (kaan ka infection), Sinusitis, COPD exacerbation", body_style),
Paragraph("Beta-lactamase positive; amoxicillin-clavulanate se treat", body_style)],
]
story.append(data_table(gncocci_headers, gncocci_rows,
[3.5*cm, 2.5*cm, 6.5*cm, 4.9*cm], C_RED, C_LIGHT_RED))
story.append(PageBreak())
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
# SECTION 5 ā GN BACILLI ENTEROBACTERIACEAE
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
story.append(banner("š“ SECTION 5: GRAM NEGATIVE BACILLI ā Enterobacteriaceae Family", C_RED))
story.append(Spacer(1, 0.2*cm))
story.append(infobox(
"Enterobacteriaceae = GI tract ke common gram -ve rod bacteria.<br/>"
"Ye facultative anaerobes hain ā O2 ke saath ya bina dono mein grow karte hain.<br/>"
"LPS (lipopolysaccharide) inki outer membrane mein hota hai ā <b>endotoxin</b> se septic shock hota hai!",
C_LIGHT_RED
))
story.append(Spacer(1, 0.25*cm))
entero_headers = [
Paragraph("<b>Bacteria</b>", bold_body),
Paragraph("<b>Disease / Bimari</b>", bold_body),
Paragraph("<b>Special/Key Fact</b>", bold_body),
]
entero_rows = [
[Paragraph("Escherichia coli\n(E. coli)", bold_body),
Paragraph("UTI (sabse common cause), Neonatal meningitis (K1 capsule), Traveler's diarrhea (ETEC), Bloody diarrhea (EHEC O157:H7), HUS (Hemolytic Uremic Syndrome)", body_style),
Paragraph("Most common UTI cause. EHEC: shiga-like toxin. HUS = hemolytic anemia + thrombocytopenia + renal failure.", body_style)],
[Paragraph("Klebsiella pneumoniae", bold_body),
Paragraph("Pneumonia ā thick 'currant jelly' sputum (blood-tinged mucoid), UTI, Liver abscess (diabetics mein), Hospital-acquired infections", body_style),
Paragraph("Alcoholics aur diabetics mein zyada. Large mucoid capsule. Aminoglycosides + cephalosporins se treat.", body_style)],
[Paragraph("Salmonella typhi", bold_body),
Paragraph("TYPHOID FEVER ā High fever (step-ladder pattern), Rose spots on abdomen, Relative bradycardia, Splenomegaly, Constipation phir diarrhea", body_style),
Paragraph("Intracellular pathogen. Contaminated food/water se. Ciprofloxacin/ceftriaxone se treat. Vaccine available.", body_style)],
[Paragraph("Salmonella (non-typhi)\ne.g. S. typhimurium", bold_body),
Paragraph("Gastroenteritis ā Watery/bloody diarrhea, nausea, vomiting, 8-72 hr incubation. Septicemia in sickle cell patients.", body_style),
Paragraph("Contaminated chicken, eggs, turtles se. Self-limiting usually; antibiotics only severe cases mein.", body_style)],
[Paragraph("Shigella dysenteriae\n/ S. sonnei / S. flexneri", bold_body),
Paragraph("DYSENTERY (Pechish) ā Bloody mucoid diarrhea, tenesmus, fever, abdominal cramps. HUS (Shiga toxin producing).", body_style),
Paragraph("Highly infectious (10 organisms se ho jata hai!). Hand-to-mouth spread. TMP-SMX / ciprofloxacin.", body_style)],
[Paragraph("Proteus mirabilis", bold_body),
Paragraph("UTI, Kidney stones (struvite/staghorn calculi), Wound infection", body_style),
Paragraph("Urease producer ā urine pH alkaline karta hai ā struvite stones banta hai. Swarming motility on agar.", body_style)],
[Paragraph("Enterobacter cloacae", bold_body),
Paragraph("Hospital-acquired pneumonia, UTI, Wound infection, Bacteremia", body_style),
Paragraph("AmpC beta-lactamase ā cephalosporins resist karta hai. Carbapenems use hote hain.", body_style)],
[Paragraph("Serratia marcescens", bold_body),
Paragraph("Nosocomial pneumonia, UTI, Wound infection, Bacteremia", body_style),
Paragraph("Red pigment (prodigiosin) produce karta hai. Catheter aur respirator se spread.", body_style)],
[Paragraph("Yersinia pestis", bold_body),
Paragraph("PLAGUE ā Bubonic plague (lymph node swelling ā bubo), Septicemic plague, Pneumonic plague (person-to-person)", body_style),
Paragraph("Rat fleas se spread. Streptomycin/doxycycline se treat. Bioterrorism agent.", body_style)],
[Paragraph("Yersinia enterocolitica", bold_body),
Paragraph("Gastroenteritis, Mesenteric lymphadenitis (appendicitis jaisa pain)", body_style),
Paragraph("Cold temperature mein grow karta hai. Contaminated pork se.", body_style)],
]
story.append(data_table(entero_headers, entero_rows,
[4*cm, 7.2*cm, 6.2*cm], C_RED, C_LIGHT_RED))
story.append(PageBreak())
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
# SECTION 6 ā GN BACILLI OTHER
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
story.append(banner("š“ SECTION 6: GRAM NEGATIVE BACILLI ā Other Important Bacteria", C_ORANGE))
story.append(Spacer(1, 0.15*cm))
other_gnb_rows = [
[Paragraph("Haemophilus influenzae", bold_body),
Paragraph("Meningitis (children mein, type b), Epiglottitis, Otitis media, Pneumonia, Cellulitis", body_style),
Paragraph("Hib vaccine se type b prevent hota hai. Needs X and V factors (chocolate agar pe grow karta hai).", body_style)],
[Paragraph("Haemophilus ducreyi", bold_body),
Paragraph("CHANCROID ā Painful genital ulcer (soft chancre), painful inguinal lymphadenopathy", body_style),
Paragraph("STI; azithromycin/ceftriaxone se treat. Hard chancre = Syphilis (Treponema).", body_style)],
[Paragraph("Bordetella pertussis", bold_body),
Paragraph("WHOOPING COUGH (Kaali khansi) ā Catarrhal phase, then Paroxysmal phase (violent cough + 'whoop' sound), then Convalescent phase", body_style),
Paragraph("Toxin: Pertussis toxin (Gi inhibition ā cAMP increase). DTP vaccine. Azithromycin se treat.", body_style)],
[Paragraph("Vibrio cholerae", bold_body),
Paragraph("CHOLERA (Haizia) ā Profuse 'rice-water' diarrhea, severe dehydration, hypovolemic shock. 'El Tor' biotype", body_style),
Paragraph("Toxin: Cholera toxin (Gs activation ā massive Cl-/water secretion). ORS (oral rehydration) + doxycycline.", body_style)],
[Paragraph("Vibrio vulnificus", bold_body),
Paragraph("Wound infection (seawater se), Primary septicemia (raw oyster khane ke baad), Necrotizing fasciitis", body_style),
Paragraph("Liver disease patients mein bahut dangerous. High mortality.", body_style)],
[Paragraph("Campylobacter jejuni", bold_body),
Paragraph("Gastroenteritis (bloody diarrhea), Guillain-Barre Syndrome (GBS) trigger ā ascending paralysis", body_style),
Paragraph("Undercooked poultry (chicken) se. Most common cause of bacterial gastroenteritis worldwide.", body_style)],
[Paragraph("Helicobacter pylori", bold_body),
Paragraph("Peptic Ulcer Disease (duodenal > gastric), Chronic gastritis, Gastric adenocarcinoma, MALT lymphoma", body_style),
Paragraph("Urease producer (urea breath test). Triple therapy: PPI + clarithromycin + amoxicillin.", body_style)],
[Paragraph("Legionella pneumophila", bold_body),
Paragraph("LEGIONNAIRE'S DISEASE ā Atypical pneumonia (Pontiac fever milder form), high fever, confusion, diarrhea", body_style),
Paragraph("AC systems, hot water tanks, cooling towers se aerosol spread. Azithromycin se treat.", body_style)],
[Paragraph("Brucella spp.", bold_body),
Paragraph("BRUCELLOSIS ā Undulant fever (fluctuating), malaise, sweating, arthralgia, hepatosplenomegaly. Animal contact (cattle, goats) se.", body_style),
Paragraph("Unpasteurized milk/cheese se. Intracellular. Doxycycline + rifampicin.", body_style)],
[Paragraph("Francisella tularensis", bold_body),
Paragraph("TULAREMIA (Rabbit fever) ā Ulceroglandular (ulcer + lymph nodes), Pneumonic form", body_style),
Paragraph("Rabbit/tick contact se. Bioterrorism agent. Streptomycin se treat.", body_style)],
[Paragraph("Acinetobacter baumannii", bold_body),
Paragraph("HAP (Hospital-Acquired Pneumonia), Wound infection, Meningitis, UTI ā ICU patients mein", body_style),
Paragraph("ESKAPE pathogen. Carbapenem resistant (CRAB). Colistin last resort treatment.", body_style)],
[Paragraph("Pasteurella multocida", bold_body),
Paragraph("Wound infection (cat/dog bite ke baad), Cellulitis, Septic arthritis, Pneumonia", body_style),
Paragraph("Animal bite ke baad hota hai. Amoxicillin-clavulanate se treat.", body_style)],
]
story.append(data_table(entero_headers, other_gnb_rows,
[4*cm, 7.2*cm, 6.2*cm], C_ORANGE, C_LIGHT_ORG))
story.append(PageBreak())
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
# SECTION 7 ā PSEUDOMONAS
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
story.append(banner("š” SECTION 7: PSEUDOMONAS aur Related Bacteria", colors.HexColor("#F57F17")))
story.append(Spacer(1, 0.2*cm))
story.append(infobox(
"<b>Pseudomonas aeruginosa</b> = Gram negative, Non-fermenting bacillus.<br/>"
"Yeh naturally bahut zyada <b>antibiotic resistant</b> hota hai ā isliye hospital infections mein iska role bahut important hai.<br/>"
"Blue-green pigment (<b>pyocyanin</b>) aur fruity smell (grape-like) iska pehchaan hai.",
C_YELLOW_BG
))
story.append(Spacer(1, 0.25*cm))
pseudo_headers = [
Paragraph("<b>Bacteria</b>", bold_body),
Paragraph("<b>Characteristics</b>", bold_body),
Paragraph("<b>Disease / Bimari</b>", bold_body),
Paragraph("<b>Treatment</b>", bold_body),
]
pseudo_rows = [
[Paragraph("Pseudomonas aeruginosa", bold_body),
Paragraph("Blue-green pyocyanin pigment, fruity smell, mucoid colonies, oxidase +ve, non-lactose fermenter", body_style),
Paragraph("1. Hospital pneumonia (Ventilator-Associated Pneumonia - VAP)\n2. Burn wound infection (green pus)\n3. Cystic Fibrosis lung disease\n4. UTI (catheterized patients)\n5. Otitis externa (Swimmer's ear - paani mein swimming ke baad)\n6. Ecthyma gangrenosum (black necrotic skin lesion)\n7. Endophthalmitis (eye infection contact lens se)\n8. Bacteremia in immunocompromised", body_style),
Paragraph("Anti-pseudomonal beta-lactam (piperacillin-tazobactam, cefepime, imipenem) + aminoglycoside (tobramycin). Colistin resistant cases mein.", body_style)],
[Paragraph("Burkholderia cepacia complex", bold_body),
Paragraph("Gram -ve rod, oxidase +ve, multiple antibiotic resistance", body_style),
Paragraph("Cystic Fibrosis patients mein fatal lung infection (rapid deterioration), Chronic granulomatous disease mein", body_style),
Paragraph("TMP-SMX + meropenem. CF patients mein prognosis bahut kharab.", body_style)],
[Paragraph("Burkholderia pseudomallei", bold_body),
Paragraph("Gram -ve rod, soil-dwelling (SE Asia, Australia)", body_style),
Paragraph("MELIOIDOSIS ā Pneumonia, Septicemia, Liver/spleen abscess, Disseminated infection. Diabetics, alcoholics mein zyada.", body_style),
Paragraph("IV ceftazidime (intensive phase) phir oral TMP-SMX (eradication). Long treatment (3-6 months).", body_style)],
[Paragraph("Stenotrophomonas maltophilia", bold_body),
Paragraph("Gram -ve rod, oxidase -ve, TMP-SMX sensitive", body_style),
Paragraph("Nosocomial pneumonia, UTI, Wound infection ā immunocompromised aur ICU patients mein", body_style),
Paragraph("TMP-SMX drug of choice. Most beta-lactams aur carbapenems ko naturally resist karta hai.", body_style)],
]
story.append(data_table(pseudo_headers, pseudo_rows,
[3.5*cm, 3.5*cm, 6*cm, 4.4*cm], colors.HexColor("#F57F17"), colors.HexColor("#FFF9C4")))
story.append(PageBreak())
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
# SECTION 8 ā ANAEROBIC BACTERIA
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
story.append(banner("š SECTION 8: ANAEROBIC BACTERIA", C_PURPLE))
story.append(Spacer(1, 0.2*cm))
story.append(infobox(
"<b>Anaerobes</b> = Jo bacteria oxygen ke bina grow karte hain (oxygen se mar sakte hain).<br/>"
"Ye normal flora mein hote hain ā gut, oral cavity, genital tract mein.<br/>"
"Inke infection mein <b>foul smell</b> hoti hai aur <b>gas formation</b> hoti hai tissue mein.<br/>"
"Clue: Bite wound, abdominal surgery, dental procedure ke baad hone wala infection.",
C_LIGHT_PUR
))
story.append(Spacer(1, 0.25*cm))
ana_headers = [
Paragraph("<b>Bacteria</b>", bold_body),
Paragraph("<b>Gram Status</b>", bold_body),
Paragraph("<b>Disease / Bimari</b>", bold_body),
Paragraph("<b>Key Points</b>", bold_body),
]
ana_rows = [
[Paragraph("Bacteroides fragilis", bold_body),
Paragraph("Gram -ve rod\n(Anaerobe)", body_style),
Paragraph("Intra-abdominal abscess, Peritonitis (gut surgery ke baad), Pelvic infection, Bacteremia", body_style),
Paragraph("Most common anaerobic pathogen. Metronidazole ya piperacillin-tazobactam se treat.", body_style)],
[Paragraph("Clostridium tetani", bold_body),
Paragraph("Gram +ve rod\n(Anaerobe)", body_style),
Paragraph("TETANUS ā Spastic paralysis, Lock jaw, Risus sardonicus (sardonic smile), Opisthotonus", body_style),
Paragraph("Tetanospasmin toxin: blocks inhibitory neurotransmitters (GABA, glycine). TIG + penicillin + diazepam.", body_style)],
[Paragraph("Clostridium botulinum", bold_body),
Paragraph("Gram +ve rod\n(Anaerobe)", body_style),
Paragraph("BOTULISM ā Descending flaccid paralysis, Diplopia, Dysphagia, Dysarthria, Respiratory failure", body_style),
Paragraph("Botulinum toxin: ACh release block karta hai. Antitoxin + supportive care. Infant: honey avoid karo.", body_style)],
[Paragraph("Clostridium perfringens", bold_body),
Paragraph("Gram +ve rod\n(Anaerobe)", body_style),
Paragraph("Gas Gangrene (Myonecrosis) ā crepitus (gas in tissue), wound darkening. Food poisoning. Necrotizing enteritis.", body_style),
Paragraph("Alpha toxin (lecithinase/phospholipase C). Surgical debridement + hyperbaric O2 + penicillin G.", body_style)],
[Paragraph("Clostridium difficile\n(C. diff)", bold_body),
Paragraph("Gram +ve rod\n(Anaerobe)", body_style),
Paragraph("Pseudomembranous Colitis ā watery/bloody diarrhea, fever, abdominal pain. Hospital-acquired.", body_style),
Paragraph("Toxin A (enterotoxin) + Toxin B (cytotoxin). Antibiotic use ke baad (esp. clindamycin, fluoroquinolones). Oral vancomycin / fidaxomicin se treat.", body_style)],
[Paragraph("Peptostreptococcus\n(Finegoldia magna)", bold_body),
Paragraph("Gram +ve cocci\n(Anaerobe)", body_style),
Paragraph("Polymicrobial abscesses (mixed infection), Peritonitis, Pelvic inflammatory disease, Aspiration pneumonia", body_style),
Paragraph("Normal oral aur vaginal flora. Penicillin/metronidazole se treat.", body_style)],
[Paragraph("Fusobacterium nucleatum", bold_body),
Paragraph("Gram -ve rod\n(Anaerobe)", body_style),
Paragraph("Lemierre Syndrome (jugular vein septic thrombophlebitis), Dental infection, Aspiration pneumonia, Liver abscess", body_style),
Paragraph("Throat infection ke baad septic emboli. Metronidazole se treat. Colon cancer se association.", body_style)],
[Paragraph("Prevotella / Porphyromonas", bold_body),
Paragraph("Gram -ve rod\n(Anaerobe)", body_style),
Paragraph("Dental/periodontal infection, Aspiration pneumonia (brown/foul-smelling sputum), Orofacial abscess", body_style),
Paragraph("Normal oral flora. Clindamycin / metronidazole / amoxicillin-clavulanate.", body_style)],
[Paragraph("Actinomyces israelii", bold_body),
Paragraph("Gram +ve\nFilamentous rod", body_style),
Paragraph("ACTINOMYCOSIS ā Cervicofacial (jaw abscess, 'lumpy jaw'), Pulmonary, Abdominal. Draining sinuses with sulfur granules.", body_style),
Paragraph("Not true anaerobe ā microaerophilic. Dental extraction ke baad. Long-term penicillin (6-12 months).", body_style)],
]
story.append(data_table(ana_headers, ana_rows,
[3.5*cm, 2.5*cm, 5.8*cm, 5.6*cm], C_PURPLE, C_LIGHT_PUR))
story.append(PageBreak())
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
# SECTION 9 ā ATYPICAL BACTERIA
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
story.append(banner("āŖ SECTION 9: ATYPICAL BACTERIA (Special Group)", colors.HexColor("#37474F")))
story.append(Spacer(1, 0.2*cm))
story.append(infobox(
"<b>Atypical bacteria</b> = Jo bacteria normal Gram stain se nahi pehchane jaate aur normal antibiotics (penicillin) se treat nahi hote.<br/>"
"Cell wall ya to absent hoti hai ya unusual hoti hai. Intracellular ya obligate parasites hain kuch.",
colors.HexColor("#ECEFF1")
))
story.append(Spacer(1, 0.25*cm))
aty_headers = [
Paragraph("<b>Bacteria</b>", bold_body),
Paragraph("<b>Special Feature</b>", bold_body),
Paragraph("<b>Disease / Bimari</b>", bold_body),
Paragraph("<b>Treatment</b>", bold_body),
]
aty_rows = [
[Paragraph("Mycoplasma pneumoniae", bold_body),
Paragraph("No cell wall\n(Gram stain se nahi dikhta)", body_style),
Paragraph("Walking pneumonia (atypical pneumonia) ā mild symptoms, dry cough, headache, young adults mein zyada. Cold agglutinins +ve.", body_style),
Paragraph("Azithromycin / doxycycline\n(penicillin KAAM NAHI KARTA ā cell wall nahi hai!)", body_style)],
[Paragraph("Chlamydia trachomatis", bold_body),
Paragraph("Obligate intracellular\n2 forms: EB (infective) RB (replicating)", body_style),
Paragraph("Types D-K: STI (urethritis, PID, infertility), Neonatal ophthalmia, Pneumonia. Types A-C: Trachoma (blindness). Type L: LGV (Lymphogranuloma venereum).", body_style),
Paragraph("Doxycycline (adults)\nAzithromycin (single dose for urethritis)\nErythromycin (neonates)", body_style)],
[Paragraph("Chlamydophila pneumoniae", bold_body),
Paragraph("Obligate intracellular", body_style),
Paragraph("Atypical pneumonia (community-acquired), Pharyngitis, Sinusitis ā adults aur elderly mein", body_style),
Paragraph("Azithromycin / doxycycline / fluoroquinolones", body_style)],
[Paragraph("Rickettsia rickettsii", bold_body),
Paragraph("Obligate intracellular\nTick-borne", body_style),
Paragraph("Rocky Mountain Spotted Fever ā Fever, severe headache, centripetal rash (palms/soles se start), vasculitis", body_style),
Paragraph("Doxycycline (drug of choice). Tick bite ke baad.", body_style)],
[Paragraph("Coxiella burnetii", bold_body),
Paragraph("Obligate intracellular\nSpore-like form", body_style),
Paragraph("Q FEVER ā Atypical pneumonia, Hepatitis, Endocarditis (chronic). Animal (cattle, sheep, goats) exposure se.", body_style),
Paragraph("Doxycycline. No arthropod vector needed ā aerosol transmission.", body_style)],
[Paragraph("Treponema pallidum", bold_body),
Paragraph("Spirochete\nNot visible on Gram stain\nDark-field microscopy se", body_style),
Paragraph("SYPHILIS ā Primary: painless chancre. Secondary: maculopapular rash (palms+soles). Tertiary: gumma, aortitis, neurosyphilis.", body_style),
Paragraph("Penicillin G (drug of choice ā sabse purana antibiotic, abhi bhi kaam karta hai!)", body_style)],
[Paragraph("Borrelia burgdorferi", bold_body),
Paragraph("Spirochete\nTick-borne (Ixodes tick)", body_style),
Paragraph("LYME DISEASE ā Erythema migrans (bull's-eye rash), Arthritis, Facial palsy, Heart block. 3 stages hain.", body_style),
Paragraph("Doxycycline (early)\nCeftriaxone IV (late/neuro)", body_style)],
[Paragraph("Leptospira interrogans", bold_body),
Paragraph("Spirochete\nWater-borne", body_style),
Paragraph("LEPTOSPIROSIS ā Weil's disease: jaundice, renal failure, hemorrhage, conjunctival suffusion. Rats ke urine se contaminated paani mein.", body_style),
Paragraph("Penicillin G / doxycycline. Flood-prone areas mein common.", body_style)],
]
story.append(data_table(aty_headers, aty_rows,
[3.5*cm, 3*cm, 6.2*cm, 4.7*cm], colors.HexColor("#37474F"), colors.HexColor("#ECEFF1")))
story.append(PageBreak())
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
# SECTION 10 ā QUICK SUMMARY
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
story.append(banner("š SECTION 10: QUICK SUMMARY TABLE", C_TEAL))
story.append(Spacer(1, 0.2*cm))
sum_headers = [
Paragraph("<b>Category</b>", bold_body),
Paragraph("<b>Bacteria</b>", bold_body),
Paragraph("<b>Bimari (Disease)</b>", bold_body),
Paragraph("<b>Treatment</b>", bold_body),
]
sum_rows = [
[Paragraph("GP Cocci", bold_body), Paragraph("S. aureus", body_style),
Paragraph("Skin, pneumonia, endocarditis, food poisoning", body_style), Paragraph("Oxacillin / Vancomycin (MRSA)", body_style)],
[Paragraph("GP Cocci", bold_body), Paragraph("S. pyogenes (Gr. A)", body_style),
Paragraph("Strep throat, rheumatic fever, impetigo", body_style), Paragraph("Penicillin G / Amoxicillin", body_style)],
[Paragraph("GP Cocci", bold_body), Paragraph("S. pneumoniae", body_style),
Paragraph("Pneumonia, meningitis, otitis media", body_style), Paragraph("Penicillin / Ceftriaxone", body_style)],
[Paragraph("GP Cocci", bold_body), Paragraph("Enterococcus", body_style),
Paragraph("UTI, endocarditis", body_style), Paragraph("Ampicillin / Vancomycin", body_style)],
[Paragraph("GP Bacilli", bold_body), Paragraph("C. tetani", body_style),
Paragraph("Tetanus", body_style), Paragraph("TIG + Penicillin + Diazepam", body_style)],
[Paragraph("GP Bacilli", bold_body), Paragraph("C. botulinum", body_style),
Paragraph("Botulism (flaccid paralysis)", body_style), Paragraph("Antitoxin + Supportive", body_style)],
[Paragraph("GP Bacilli", bold_body), Paragraph("C. perfringens", body_style),
Paragraph("Gas gangrene", body_style), Paragraph("Penicillin + Debridement", body_style)],
[Paragraph("GP Bacilli", bold_body), Paragraph("C. difficile", body_style),
Paragraph("Pseudomembranous colitis", body_style), Paragraph("Oral Vancomycin / Fidaxomicin", body_style)],
[Paragraph("GP Bacilli", bold_body), Paragraph("B. anthracis", body_style),
Paragraph("Anthrax", body_style), Paragraph("Ciprofloxacin / Doxycycline", body_style)],
[Paragraph("GP Bacilli", bold_body), Paragraph("L. monocytogenes", body_style),
Paragraph("Neonatal meningitis, listeriosis", body_style), Paragraph("Ampicillin + Gentamicin", body_style)],
[Paragraph("GP Bacilli", bold_body), Paragraph("C. diphtheriae", body_style),
Paragraph("Diphtheria", body_style), Paragraph("Antitoxin + Erythromycin", body_style)],
[Paragraph("Acid-Fast", bold_body), Paragraph("M. tuberculosis", body_style),
Paragraph("Tuberculosis (TB)", body_style), Paragraph("RIPE (6 months)", body_style)],
[Paragraph("Acid-Fast", bold_body), Paragraph("M. leprae", body_style),
Paragraph("Leprosy", body_style), Paragraph("Dapsone + Rifampicin", body_style)],
[Paragraph("GN Cocci", bold_body), Paragraph("N. meningitidis", body_style),
Paragraph("Meningitis, meningococcemia", body_style), Paragraph("Penicillin G / Ceftriaxone", body_style)],
[Paragraph("GN Cocci", bold_body), Paragraph("N. gonorrhoeae", body_style),
Paragraph("Gonorrhea, PID", body_style), Paragraph("Ceftriaxone IM (dual therapy)", body_style)],
[Paragraph("GN Bacilli", bold_body), Paragraph("E. coli", body_style),
Paragraph("UTI, neonatal meningitis, diarrhea", body_style), Paragraph("TMP-SMX / Ciprofloxacin / Ceftriaxone", body_style)],
[Paragraph("GN Bacilli", bold_body), Paragraph("Klebsiella", body_style),
Paragraph("Pneumonia, UTI", body_style), Paragraph("Cephalosporins / Carbapenems", body_style)],
[Paragraph("GN Bacilli", bold_body), Paragraph("S. typhi", body_style),
Paragraph("Typhoid fever", body_style), Paragraph("Ciprofloxacin / Ceftriaxone", body_style)],
[Paragraph("GN Bacilli", bold_body), Paragraph("Shigella", body_style),
Paragraph("Dysentery (pechish)", body_style), Paragraph("Ciprofloxacin / Azithromycin", body_style)],
[Paragraph("GN Bacilli", bold_body), Paragraph("V. cholerae", body_style),
Paragraph("Cholera (rice-water diarrhea)", body_style), Paragraph("ORS + Doxycycline", body_style)],
[Paragraph("GN Bacilli", bold_body), Paragraph("H. pylori", body_style),
Paragraph("Peptic ulcer, gastric cancer", body_style), Paragraph("PPI + Clarithromycin + Amoxicillin", body_style)],
[Paragraph("GN Bacilli", bold_body), Paragraph("B. pertussis", body_style),
Paragraph("Whooping cough (kaali khansi)", body_style), Paragraph("Azithromycin / Erythromycin", body_style)],
[Paragraph("Pseudomonas", bold_body), Paragraph("P. aeruginosa", body_style),
Paragraph("Burns, VAP, cystic fibrosis, swimmer's ear", body_style), Paragraph("Pip-Tazo / Cefepime + Aminoglycoside", body_style)],
[Paragraph("Anaerobes", bold_body), Paragraph("B. fragilis", body_style),
Paragraph("Intra-abdominal abscess, peritonitis", body_style), Paragraph("Metronidazole / Pip-Tazo", body_style)],
[Paragraph("Atypical", bold_body), Paragraph("Mycoplasma pneumoniae", body_style),
Paragraph("Walking pneumonia", body_style), Paragraph("Azithromycin / Doxycycline", body_style)],
[Paragraph("Atypical", bold_body), Paragraph("C. trachomatis", body_style),
Paragraph("STI, trachoma, PID", body_style), Paragraph("Doxycycline / Azithromycin", body_style)],
[Paragraph("Atypical", bold_body), Paragraph("T. pallidum", body_style),
Paragraph("Syphilis", body_style), Paragraph("Penicillin G", body_style)],
[Paragraph("Atypical", bold_body), Paragraph("B. burgdorferi", body_style),
Paragraph("Lyme disease", body_style), Paragraph("Doxycycline / Ceftriaxone", body_style)],
]
story.append(data_table(sum_headers, sum_rows,
[2.8*cm, 4*cm, 5.8*cm, 4.8*cm], C_TEAL, C_LIGHT_TEAL))
story.append(PageBreak())
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
# SECTION 11 ā MNEMONICS
# āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
story.append(banner("š§ SECTION 11: MEMORY TIPS aur MNEMONICS", colors.HexColor("#880E4F")))
story.append(Spacer(1, 0.3*cm))
mnemonics = [
("š“ Urease Producers yaad karo ā 'PUNCH K'",
"P = Proteus\nU = Ureaplasma\nN = Nocardia\nC = Cryptococcus (fungus)\nH = H. pylori\nK = Klebsiella"),
("š“ Intracellular bacteria yaad karo ā 'Some Bacteria Rest Quietly in Cells, Little Fools'",
"S = Salmonella typhi\nB = Brucella\nR = Rickettsia\nQ = Coxiella (Q fever)\ni = (in)\nC = Chlamydia\nL = Listeria\nF = Francisella"),
("šµ Gram Positive Cocci in Clusters",
"Sirf Staphylococcus = Clusters (angoor ki tarah)\nStreptococcus = Chains (mala ki tarah)\nEnterococcus = Pairs ya short chains"),
("š¤ TB Treatment ā RIPE yaad karo",
"R = Rifampicin\nI = Isoniazid (INH)\nP = Pyrazinamide\nE = Ethambutol\nā 2 months RIPE + 4 months RI = Total 6 months"),
("ā” Toxin wale bacteria yaad karo",
"C. tetani ā Tetanospasmin (GABA block ā spasm)\nC. botulinum ā Botulinum toxin (ACh block ā flaccid)\nC. perfringens ā Alpha toxin (gas gangrene)\nC. diphtheriae ā Diphtheria toxin (EF-2 block)\nV. cholerae ā Cholera toxin (Gs ā cAMP ā)\nB. pertussis ā Pertussis toxin (Gi ā cAMP ā)\nE. coli O157 ā Shiga-like toxin (HUS)"),
("š Antibiotics that DON'T work on Pseudomonas",
"1st/2nd gen cephalosporins, azithromycin, vancomycin ā kaam NAHI karte!\nKaam karne wale: Pip-Tazo, Cefepime, Ceftazidime, Imipenem, Ciprofloxacin, Aminoglycosides"),
("š¦ Organisms that cause Meningitis ā yaad karo by age",
"Neonates (<1 month): Group B Strep, E. coli, Listeria\nInfants/Children: H. influenzae, N. meningitidis, S. pneumoniae\nAdults: N. meningitidis, S. pneumoniae\nElderly/Immunocompromised: S. pneumoniae, Listeria, gram -ve bacilli"),
("š Rice-water diarrhea = Cholera (V. cholerae)\nCurrant jelly sputum = Klebsiella pneumonia\nRice-field farmer + leptospirosis\nHoney + infant = Botulism",
"In disease clues ko yaad rakho MCQ mein bahut kaam aate hain!"),
]
for title_text, body_text in mnemonics:
story.append(Paragraph(title_text, tip_style))
story.append(infobox(body_text.replace("\n", "<br/>"), C_YELLOW_BG))
story.append(Spacer(1, 0.25*cm))
story.append(Spacer(1, 0.5*cm))
story.append(HRFlowable(width="100%", thickness=1, color=C_GREY_MED))
story.append(Spacer(1, 0.2*cm))
story.append(Paragraph(
"Sources: Medical Microbiology 9e (Murray) | Robbins & Cotran Pathologic Basis of Disease | "
"Schwartz's Principles of Surgery 11e | Henry's Clinical Diagnosis | Jawetz Medical Microbiology",
small_style))
story.append(Paragraph(
"Prepared by Orris AI ā For Educational Purposes Only",
small_style))
# āā Build āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
doc.build(story)
print(f"PDF saved: {OUTPUT}")