Make pdf of season wise diaese of paediatrics and management through antibiotics. With dosage /kg/day
mkdir -p /home/daytona/workspace/pediatric-seasonal-diseases && ls /home/daytona…
~/pediatric-seasonal-diseases/generate_pdf.py
#!/usr/bin/env python3
"""
Pediatric Seasonal Diseases & Antibiotic Management PDF Generator
Sources: Harriet Lane Handbook 23rd Ed, Red Book 2021
"""
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, PageBreak, KeepTogether
)
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus import BaseDocTemplate, Frame, PageTemplate
from reportlab.lib.colors import HexColor
from datetime import datetime
# ── Color palette ──────────────────────────────────────────────
DARK_BLUE = HexColor("#1a3a5c")
MED_BLUE = HexColor("#2563a8")
LIGHT_BLUE = HexColor("#dbeafe")
SPRING_GRN = HexColor("#166534")
SPRING_BG = HexColor("#dcfce7")
SUMMER_ORG = HexColor("#9a3412")
SUMMER_BG = HexColor("#ffedd5")
AUTUMN_BRN = HexColor("#78350f")
AUTUMN_BG = HexColor("#fef3c7")
WINTER_PURP = HexColor("#4c1d95")
WINTER_BG = HexColor("#ede9fe")
TABLE_HDR = HexColor("#1e3a5f")
TABLE_ALT = HexColor("#f0f4ff")
WHITE = colors.white
BLACK = colors.black
GRAY = HexColor("#6b7280")
LIGHT_GRAY = HexColor("#f3f4f6")
RED_WARN = HexColor("#dc2626")
TEAL = HexColor("#0f766e")
TEAL_BG = HexColor("#ccfbf1")
OUTPUT = "/home/daytona/workspace/pediatric-seasonal-diseases/Pediatric_Seasonal_Diseases_Antibiotic_Management.pdf"
# ── Document setup ──────────────────────────────────────────────
doc = SimpleDocTemplate(
OUTPUT,
pagesize=A4,
leftMargin=1.8*cm, rightMargin=1.8*cm,
topMargin=2.2*cm, bottomMargin=2.2*cm,
title="Pediatric Seasonal Diseases & Antibiotic Management",
author="Orris Medical AI"
)
styles = getSampleStyleSheet()
W = A4[0] - 3.6*cm # usable width
# ── Custom styles ───────────────────────────────────────────────
def S(name, **kw):
return ParagraphStyle(name, **kw)
sTitle = S("sTitle", fontName="Helvetica-Bold", fontSize=22, textColor=WHITE,
alignment=TA_CENTER, spaceAfter=4)
sSubtitle = S("sSubtitle", fontName="Helvetica", fontSize=11, textColor=LIGHT_BLUE,
alignment=TA_CENTER, spaceAfter=2)
sAuthor = S("sAuthor", fontName="Helvetica-Oblique", fontSize=9, textColor=LIGHT_BLUE,
alignment=TA_CENTER, spaceAfter=2)
sH1 = S("sH1", fontName="Helvetica-Bold", fontSize=15, textColor=WHITE,
alignment=TA_LEFT, spaceAfter=4, spaceBefore=2, leftIndent=6)
sH2 = S("sH2", fontName="Helvetica-Bold", fontSize=12, textColor=DARK_BLUE,
alignment=TA_LEFT, spaceAfter=3, spaceBefore=8)
sH3 = S("sH3", fontName="Helvetica-Bold", fontSize=10.5, textColor=MED_BLUE,
alignment=TA_LEFT, spaceAfter=2, spaceBefore=5)
sBody = S("sBody", fontName="Helvetica", fontSize=9, leading=14, textColor=BLACK,
alignment=TA_JUSTIFY, spaceAfter=3)
sBullet = S("sBullet", fontName="Helvetica", fontSize=9, leading=13, textColor=BLACK,
leftIndent=14, firstLineIndent=-8, spaceAfter=2)
sNote = S("sNote", fontName="Helvetica-Oblique", fontSize=8, textColor=GRAY,
alignment=TA_LEFT, spaceAfter=2, leftIndent=4)
sWarn = S("sWarn", fontName="Helvetica-Bold", fontSize=8, textColor=RED_WARN,
alignment=TA_LEFT, spaceAfter=2)
sTblHdr = S("sTblHdr", fontName="Helvetica-Bold", fontSize=8.5, textColor=WHITE,
alignment=TA_CENTER)
sTblCell = S("sTblCell", fontName="Helvetica", fontSize=8, textColor=BLACK,
alignment=TA_LEFT, leading=11)
sTblCellC = S("sTblCellC", fontName="Helvetica", fontSize=8, textColor=BLACK,
alignment=TA_CENTER, leading=11)
sTblBold = S("sTblBold", fontName="Helvetica-Bold", fontSize=8, textColor=BLACK,
alignment=TA_LEFT, leading=11)
sSeason = S("sSeason", fontName="Helvetica-Bold", fontSize=11, textColor=WHITE,
alignment=TA_LEFT, spaceAfter=0, spaceBefore=0, leftIndent=4)
sFooter = S("sFooter", fontName="Helvetica", fontSize=7.5, textColor=GRAY,
alignment=TA_CENTER)
# ── Helper: colored section banner ─────────────────────────────
def season_banner(text, bg_color, icon=""):
full = f"{icon} {text}" if icon else text
return Table(
[[Paragraph(full, sH1)]],
colWidths=[W],
style=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), 10),
("ROUNDEDCORNERS", [6, 6, 6, 6]),
])
)
def disease_header(name, bg):
return Table(
[[Paragraph(name, sSeason)]],
colWidths=[W],
style=TableStyle([
("BACKGROUND", (0,0), (-1,-1), bg),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 8),
("ROUNDEDCORNERS", [4, 4, 4, 4]),
])
)
def abx_table(headers, rows, col_widths):
data = [[Paragraph(h, sTblHdr) for h in headers]]
for i, row in enumerate(rows):
styled = []
for j, cell in enumerate(row):
if j == 0:
styled.append(Paragraph(cell, sTblBold))
else:
styled.append(Paragraph(cell, sTblCellC if j > 0 else sTblCell))
data.append(styled)
ts = TableStyle([
("BACKGROUND", (0,0), (-1,0), TABLE_HDR),
("GRID", (0,0), (-1,-1), 0.4, HexColor("#d1d5db")),
("TOPPADDING", (0,0), (-1,-1), 4),
("BOTTOMPADDING", (0,0), (-1,-1), 4),
("LEFTPADDING", (0,0), (-1,-1), 5),
("RIGHTPADDING", (0,0), (-1,-1), 5),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("ROWBACKGROUNDS", (0,1), (-1,-1), [WHITE, TABLE_ALT]),
])
return Table(data, colWidths=col_widths, style=ts, repeatRows=1)
def info_box(lines, bg=TEAL_BG, border=TEAL):
content = "\n".join(lines)
return Table(
[[Paragraph(content, sNote)]],
colWidths=[W],
style=TableStyle([
("BACKGROUND", (0,0), (-1,-1), bg),
("LINEAFTER", (0,0), (0,-1), 3, border),
("LEFTPADDING", (0,0), (-1,-1), 10),
("TOPPADDING", (0,0), (-1,-1), 6),
("BOTTOMPADDING",(0,0), (-1,-1), 6),
])
)
# ══════════════════════════════════════════════════════════════════
# CONTENT
# ══════════════════════════════════════════════════════════════════
story = []
# ─── COVER ────────────────────────────────────────────────────────
cover = Table(
[
[Paragraph("PAEDIATRIC SEASONAL DISEASES", sTitle)],
[Paragraph("Antibiotic Management with Dosage (mg/kg/day)", sSubtitle)],
[Spacer(1, 6)],
[Paragraph(
"Based on: Harriet Lane Handbook (23rd Ed.) | Red Book 2021 (AAP) | WHO Paediatric Guidelines",
sAuthor)],
[Paragraph(f"Generated: {datetime.now().strftime('%B %d, %Y')}", sAuthor)],
],
colWidths=[W],
style=TableStyle([
("BACKGROUND", (0,0), (-1,-1), DARK_BLUE),
("TOPPADDING", (0,0), (-1,-1), 16),
("BOTTOMPADDING",(0,0), (-1,-1), 16),
("LEFTPADDING", (0,0), (-1,-1), 20),
("ROUNDEDCORNERS", [8,8,8,8]),
])
)
story.append(cover)
story.append(Spacer(1, 0.4*cm))
# Disclaimer
story.append(info_box([
"DISCLAIMER: This document is intended for educational and reference purposes only. "
"Always verify doses against current formularies and adjust for individual patient factors "
"(renal/hepatic function, age, weight, allergies). Antibiotic stewardship principles apply."
], bg=HexColor("#fef9c3"), border=HexColor("#ca8a04")))
story.append(Spacer(1, 0.3*cm))
# ─── INTRODUCTION ─────────────────────────────────────────────────
story.append(Paragraph("Overview of Paediatric Seasonal Diseases", sH2))
story.append(Paragraph(
"Children are particularly vulnerable to seasonal infections due to immature immune systems, "
"close contact in schools, and exposure to environmental pathogens. "
"Certain bacterial and viral infections follow predictable seasonal patterns, which helps clinicians "
"anticipate diagnoses and prepare empiric antibiotic protocols. This reference covers the four "
"seasonal disease groups with specific antibiotic choices and weight-based dosing for paediatric patients.",
sBody))
story.append(Spacer(1, 0.2*cm))
# Quick reference legend
legend_data = [
[Paragraph("SEASON", sTblHdr), Paragraph("COLOR CODE", sTblHdr), Paragraph("PREDOMINANT INFECTIONS", sTblHdr), Paragraph("KEY PATHOGENS", sTblHdr)],
[Paragraph("SPRING", sTblCellC), Paragraph("Green", sTblCellC),
Paragraph("Strep throat, Allergic rhinitis with sinusitis, Lyme disease", sTblCell),
Paragraph("S. pyogenes, S. pneumoniae, Borrelia burgdorferi", sTblCell)],
[Paragraph("SUMMER", sTblCellC), Paragraph("Orange", sTblCellC),
Paragraph("Diarrhoeal diseases, UTIs, Mosquito-borne, Impetigo", sTblCell),
Paragraph("E. coli, Salmonella, Shigella, S. aureus, S. pyogenes", sTblCell)],
[Paragraph("AUTUMN", sTblCellC), Paragraph("Amber", sTblCellC),
Paragraph("Pertussis, Viral URTI + secondary bacterial, Typhoid", sTblCell),
Paragraph("B. pertussis, S. pneumoniae, H. influenzae, Salmonella Typhi", sTblCell)],
[Paragraph("WINTER", sTblCellC), Paragraph("Purple", sTblCellC),
Paragraph("Pneumonia, Otitis media, Meningitis, Influenza + secondary bacterial", sTblCell),
Paragraph("S. pneumoniae, H. influenzae, N. meningitidis, S. aureus", sTblCell)],
]
leg_ts = TableStyle([
("BACKGROUND", (0,0), (-1,0), TABLE_HDR),
("GRID", (0,0), (-1,-1), 0.4, HexColor("#d1d5db")),
("TOPPADDING", (0,0), (-1,-1), 4),
("BOTTOMPADDING", (0,0), (-1,-1), 4),
("LEFTPADDING", (0,0), (-1,-1), 5),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("BACKGROUND", (0,1), (0,1), SPRING_BG),
("BACKGROUND", (0,2), (0,2), SUMMER_BG),
("BACKGROUND", (0,3), (0,3), AUTUMN_BG),
("BACKGROUND", (0,4), (0,4), WINTER_BG),
("ROWBACKGROUNDS", (1,1), (-1,-1), [WHITE, WHITE]),
])
story.append(Table(legend_data, colWidths=[1.8*cm, 1.6*cm, 7.2*cm, 5.4*cm], style=leg_ts))
story.append(PageBreak())
# ══════════════════════════════════════════════════════════════════
# SPRING
# ══════════════════════════════════════════════════════════════════
story.append(season_banner("SPRING SEASON (March – May)", SPRING_GRN, "🌱"))
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph(
"Spring is characterised by rising temperatures and increased outdoor activity. "
"Streptococcal pharyngitis peaks in school-age children. Tick activity increases, raising Lyme disease risk. "
"Pollen-driven rhinitis predisposes to bacterial sinusitis.",
sBody))
story.append(Spacer(1, 0.2*cm))
# 1. Streptococcal Pharyngitis
story.append(disease_header("1. Streptococcal Pharyngitis (Strep Throat)", SPRING_BG))
story.append(Spacer(1, 0.1*cm))
story.append(Paragraph("<b>Pathogen:</b> Group A Streptococcus (Streptococcus pyogenes)", sBody))
story.append(Paragraph(
"<b>Clinical features:</b> Sudden-onset sore throat, fever >38.5°C, tonsillar exudate, tender anterior cervical lymphadenopathy, absence of cough (Centor/McIsaac criteria).",
sBody))
spring_pharyngitis = [
["Antibiotic", "Dose (mg/kg/day)", "Frequency", "Duration", "Route", "Notes"],
["Amoxicillin\n(1st line)", "50 mg/kg/day\n(max 500 mg/dose)", "BID or TID", "10 days", "PO", "Preferred; low cost; narrow spectrum"],
["Penicillin V\n(1st line)", "25–50 mg/kg/day\n(max 500 mg BID)", "BID–TID", "10 days", "PO", "GOld standard for GAS pharyngitis"],
["Benzathine\nPenicillin G", "<27 kg: 600,000 U\n≥27 kg: 1.2 M U", "Single dose", "Once", "IM", "For non-compliance risk"],
["Azithromycin\n(PCN allergy)", "12 mg/kg/day\n(max 500 mg/day)", "Once daily", "5 days", "PO", "If PCN-allergic; note rising resistance"],
["Clarithromycin\n(PCN allergy)", "15 mg/kg/day\n(max 500 mg/day)", "BID", "10 days", "PO", "Alternative macrolide"],
["Clindamycin\n(PCN allergy)", "20–30 mg/kg/day\n(max 600 mg/dose)", "TID", "10 days", "PO", "For recurrent or macrolide-resistant GAS"],
["Cephalexin\n(PCN allergy)", "25–50 mg/kg/day\n(max 500 mg/dose)", "BID–QID", "10 days", "PO", "If mild PCN allergy (non-anaphylactic)"],
]
story.append(abx_table(
spring_pharyngitis[0], spring_pharyngitis[1:],
[2.5*cm, 3.2*cm, 1.9*cm, 1.6*cm, 1.2*cm, 5.6*cm]
))
story.append(Paragraph(
"⚠ Do NOT use amoxicillin if infectious mononucleosis is suspected (rash risk). "
"Throat swab or rapid antigen test should confirm GAS before prescribing.",
sWarn))
story.append(Spacer(1, 0.3*cm))
# 2. Acute Bacterial Sinusitis
story.append(disease_header("2. Acute Bacterial Rhinosinusitis (ABRS)", SPRING_BG))
story.append(Spacer(1, 0.1*cm))
story.append(Paragraph("<b>Pathogens:</b> S. pneumoniae (30%), H. influenzae (20–30%), M. catarrhalis (10–20%)", sBody))
story.append(Paragraph(
"<b>Clinical criteria:</b> Persistent URI symptoms >10 days without improvement, OR worsening after initial improvement, OR severe onset (fever >39°C + purulent discharge ≥3 days).",
sBody))
spring_sinusitis = [
["Antibiotic", "Dose (mg/kg/day)", "Frequency", "Duration", "Route", "Notes"],
["Amoxicillin-\nClavulanate\n(1st line)", "40–45 mg/kg/day\n(amoxicillin component;\nmax 90 mg/kg/day in\nhigh-resistance areas)", "BID", "10–14 days", "PO", "Drug of choice per AAP/IDSA guidelines"],
["Amoxicillin\n(mild, low-risk)", "45–90 mg/kg/day\n(max 3 g/day)", "BID–TID", "10–14 days", "PO", "High dose for resistant pneumococcus risk"],
["Cefdinir\n(PCN allergy)", "14 mg/kg/day\n(max 600 mg/day)", "OD or BID", "10 days", "PO", "Non-anaphylactic PCN allergy"],
["Cefpodoxime\n(PCN allergy)", "10 mg/kg/day\n(max 400 mg/day)", "BID", "10 days", "PO", "Good oral bioavailability"],
["Levofloxacin\n(severe/allergy)", "10–20 mg/kg/day\n(max 500–750 mg/day)", "OD", "10–14 days", "PO/IV", "Age ≥5 yr; reserve for severe cases"],
["Clindamycin +\nCefixime", "Clinda: 30–40 mg/kg/day\nCefixime: 8 mg/kg/day", "TID / OD", "10–14 days", "PO", "For beta-lactam–allergic patients"],
]
story.append(abx_table(
spring_sinusitis[0], spring_sinusitis[1:],
[2.4*cm, 3.3*cm, 1.8*cm, 1.8*cm, 1.2*cm, 5.5*cm]
))
story.append(Spacer(1, 0.3*cm))
# 3. Lyme Disease
story.append(disease_header("3. Lyme Disease (Early/Localised)", SPRING_BG))
story.append(Spacer(1, 0.1*cm))
story.append(Paragraph("<b>Pathogen:</b> Borrelia burgdorferi (Ixodes tick bite)", sBody))
story.append(Paragraph(
"<b>Clinical features:</b> Erythema migrans (bull's-eye rash ≥5 cm), flu-like illness, arthralgia. Early disseminated: facial palsy, carditis, multiple EM lesions.",
sBody))
spring_lyme = [
["Antibiotic", "Dose (mg/kg/day)", "Frequency", "Duration", "Route", "Notes"],
["Doxycycline\n(≥8 yr, 1st line)", "4.4 mg/kg/day\n(max 100 mg BID;\n200 mg/day)", "BID", "14–21 days", "PO", "Avoid in <8 yr; drug of choice ≥8 yr"],
["Amoxicillin\n(<8 yr, 1st line)", "50 mg/kg/day\n(max 500 mg TID;\n1.5 g/day)", "TID", "14–21 days", "PO", "Preferred <8 yr; also in pregnant women"],
["Cefuroxime axetil\n(alternative)", "30 mg/kg/day\n(max 500 mg BID;\n1 g/day)", "BID", "14–21 days", "PO", "For PCN-allergic or doxy-intolerant"],
["Ceftriaxone\n(disseminated/\ncarditis/neuro)", "75–100 mg/kg/day\n(max 2 g/day)", "OD", "14–28 days", "IV", "Neuroborreliosis, meningitis, 3rd-degree AV block"],
["Penicillin G\n(neuro, alt.)", "200,000–400,000 U/kg/day\n(max 18–24 million U/day)", "Q4h", "14–28 days", "IV", "Alternative for neurological Lyme"],
]
story.append(abx_table(
spring_lyme[0], spring_lyme[1:],
[2.4*cm, 3.2*cm, 1.8*cm, 1.9*cm, 1.2*cm, 5.5*cm]
))
story.append(Spacer(1, 0.3*cm))
# 4. Impetigo (spring/early summer)
story.append(disease_header("4. Impetigo (Spring/Early Summer)", SPRING_BG))
story.append(Spacer(1, 0.1*cm))
story.append(Paragraph("<b>Pathogens:</b> S. aureus (most common), Group A Streptococcus", sBody))
spring_impetigo = [
["Antibiotic", "Dose (mg/kg/day)", "Frequency", "Duration", "Route", "Notes"],
["Mupirocin 2%\ncream/ointment", "Apply TID", "TID topically", "5–7 days", "Topical", "1st line for localised impetigo"],
["Retapamulin 1%\nointment", "Apply BID", "BID topically", "5 days", "Topical", "≥9 months; MRSA inactive"],
["Cephalexin\n(non-MRSA)", "25–50 mg/kg/day\n(max 500 mg QID)", "QID", "7 days", "PO", "For extensive non-MRSA impetigo"],
["Dicloxacillin\n(non-MRSA)", "25–50 mg/kg/day\n(max 500 mg QID)", "QID", "7 days", "PO", "MSSA-active penicillinase-resistant PCN"],
["Clindamycin\n(MRSA risk)", "30–40 mg/kg/day\n(max 450 mg TID)", "TID", "7 days", "PO", "When MRSA community prevalence is high"],
["TMP-SMX\n(MRSA risk)", "8–10 mg/kg/day\n(TMP component;\nmax 160 mg BID)", "BID", "7 days", "PO", "Community-acquired MRSA; avoid <2 months"],
]
story.append(abx_table(
spring_impetigo[0], spring_impetigo[1:],
[2.4*cm, 3.2*cm, 1.8*cm, 1.8*cm, 1.2*cm, 5.6*cm]
))
story.append(PageBreak())
# ══════════════════════════════════════════════════════════════════
# SUMMER
# ══════════════════════════════════════════════════════════════════
story.append(season_banner("SUMMER SEASON (June – August)", SUMMER_ORG, "☀"))
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph(
"Summer heat promotes bacterial proliferation in food and water. Enteric infections (diarrhoea, dysentery, typhoid) peak sharply. "
"Urinary tract infections increase with dehydration. Skin infections flourish. Mosquito-borne diseases peak in tropical regions.",
sBody))
story.append(Spacer(1, 0.2*cm))
# 1. Acute Diarrhoea / Dysentery
story.append(disease_header("1. Acute Diarrhoea / Bacillary Dysentery", SUMMER_BG))
story.append(Spacer(1, 0.1*cm))
story.append(Paragraph(
"<b>Pathogens:</b> Shigella spp., E. coli (ETEC, EPEC), Salmonella non-typhi, Campylobacter jejuni, Vibrio cholerae",
sBody))
story.append(Paragraph(
"<b>Note:</b> Most acute watery diarrhoea is viral and does NOT require antibiotics. Antibiotics are indicated for dysentery (blood in stool), cholera, immunocompromised, or severe/systemic infection.",
sNote))
summer_diarr = [
["Pathogen", "Antibiotic", "Dose (mg/kg/day)", "Frequency", "Duration", "Route"],
["Shigella\n(dysentery)", "Azithromycin\n(1st line)", "12 mg/kg day 1,\nthen 6 mg/kg days 2–5\n(max 500 mg day 1)", "OD", "5 days", "PO"],
["Shigella", "Ciprofloxacin\n(alt.)", "20–30 mg/kg/day\n(max 500 mg BID)", "BID", "3 days", "PO"],
["Shigella", "Ceftriaxone\n(severe)", "50 mg/kg/day\n(max 2 g/day)", "OD", "5 days", "IV/IM"],
["Salmonella\n(severe/systemic)", "Ceftriaxone\n(1st line)", "50–100 mg/kg/day\n(max 2 g/day)", "OD", "7–14 days", "IV"],
["Salmonella", "Azithromycin\n(oral)", "20 mg/kg/day\n(max 1 g/day)", "OD", "7 days", "PO"],
["Campylobacter", "Azithromycin\n(1st line)", "10 mg/kg/day\n(max 500 mg/day)", "OD", "3–5 days", "PO"],
["Cholera\n(V. cholerae)", "Azithromycin\n(1st line, all ages)", "20 mg/kg single dose\n(max 1 g)", "Single dose", "Once", "PO"],
["Cholera\n(≥8 yr)", "Doxycycline\n(alt.)", "4.4 mg/kg single dose\n(max 300 mg)", "Single dose", "Once", "PO"],
["E. coli (ETEC)\nTraveller's diarr.", "Azithromycin", "10 mg/kg/day\n(max 500 mg)", "OD", "3 days", "PO"],
]
story.append(abx_table(
summer_diarr[0], summer_diarr[1:],
[2.2*cm, 2.4*cm, 3.4*cm, 1.7*cm, 1.7*cm, 1.6*cm]
))
story.append(Paragraph(
"⚠ Avoid antibiotics in EHEC/STEC O157:H7 – may increase HUS risk. Oral rehydration therapy (ORT) is the cornerstone of treatment.",
sWarn))
story.append(Spacer(1, 0.3*cm))
# 2. Typhoid Fever
story.append(disease_header("2. Typhoid Fever (Enteric Fever)", SUMMER_BG))
story.append(Spacer(1, 0.1*cm))
story.append(Paragraph("<b>Pathogen:</b> Salmonella Typhi, S. Paratyphi A/B", sBody))
story.append(Paragraph(
"<b>Clinical features:</b> Step-ladder fever, relative bradycardia, coated tongue, rose spots, hepatosplenomegaly, constipation early then diarrhoea late.",
sBody))
summer_typhoid = [
["Antibiotic", "Dose (mg/kg/day)", "Frequency", "Duration", "Route", "Notes"],
["Azithromycin\n(uncomplicated,\n1st line)", "20 mg/kg/day\n(max 1 g/day)", "OD", "5–7 days", "PO", "Drug of choice for uncomplicated typhoid in children; excellent oral bioavailability"],
["Ceftriaxone\n(complicated,\n1st line)", "60–75 mg/kg/day\n(max 2 g/day)", "OD", "10–14 days", "IV", "Severe/complicated typhoid; intestinal perforation; persistent vomiting"],
["Cefixime\n(oral step-down)", "15–20 mg/kg/day\n(max 400 mg/day)", "BID", "10–14 days", "PO", "Oral switch after IV ceftriaxone; MDR Salmonella Typhi"],
["Ciprofloxacin\n(if susceptible)", "20–30 mg/kg/day\n(max 1 g/day)", "BID", "7–14 days", "PO/IV", "Only if susceptibility confirmed; widespread fluoroquinolone resistance"],
["Chloramphenicol\n(susceptible strains)", "75–100 mg/kg/day\n(max 3 g/day)", "QID", "14 days", "PO/IV", "Older drug; use where susceptible and azithromycin unavailable"],
]
story.append(abx_table(
summer_typhoid[0], summer_typhoid[1:],
[2.4*cm, 3.0*cm, 1.8*cm, 1.8*cm, 1.2*cm, 5.8*cm]
))
story.append(Spacer(1, 0.3*cm))
# 3. Urinary Tract Infection
story.append(disease_header("3. Urinary Tract Infection (UTI)", SUMMER_BG))
story.append(Spacer(1, 0.1*cm))
story.append(Paragraph(
"<b>Pathogens:</b> E. coli (80%), Klebsiella pneumoniae, Enterococcus spp., S. saprophyticus (adolescent girls)",
sBody))
summer_uti = [
["Antibiotic", "Dose (mg/kg/day)", "Frequency", "Duration", "Route", "Notes"],
["TMP-SMX\n(uncomplicated,\nif susceptible)", "6–12 mg TMP/kg/day\n(max 160 mg TMP BID)", "BID", "3–7 days cystitis\n7–10 days pyelonephritis", "PO", "Check local resistance; avoid <2 months"],
["Nitrofurantoin\n(cystitis only)", "5–7 mg/kg/day\n(max 100 mg QID)", "QID\n(macrocrystals BID)", "5–7 days", "PO", "Cystitis only; NOT for pyelonephritis; avoid <1 month"],
["Cefixime\n(1st line oral)", "8 mg/kg/day\n(max 400 mg/day)", "OD", "10–14 days", "PO", "Good for pyelonephritis; oral; broad coverage"],
["Cephalexin", "25–50 mg/kg/day\n(max 500 mg QID)", "QID", "7–10 days", "PO", "Uncomplicated UTI; gram-positive coverage"],
["Ceftriaxone\n(pyelonephritis/\nsepsis)", "50–75 mg/kg/day\n(max 2 g/day)", "OD", "10–14 days", "IV/IM", "Febrile UTI, suspected urosepsis, vomiting"],
["Amoxicillin-\nclavulanate", "40 mg/kg/day\n(max 875 mg BID)", "BID–TID", "7–10 days", "PO", "If susceptibility confirmed; broader coverage"],
["Gentamicin\n(IV, severe)", "7.5 mg/kg/day\n(max 240 mg/day)", "OD", "Until afebrile\nthen PO switch", "IV", "Once-daily dosing; monitor levels; pyelonephritis"],
]
story.append(abx_table(
summer_uti[0], summer_uti[1:],
[2.4*cm, 3.2*cm, 2.0*cm, 2.2*cm, 1.2*cm, 5.0*cm]
))
story.append(Spacer(1, 0.3*cm))
# 4. Cellulitis / Skin & Soft Tissue
story.append(disease_header("4. Cellulitis / Skin & Soft Tissue Infections (SSTIs)", SUMMER_BG))
story.append(Spacer(1, 0.1*cm))
story.append(Paragraph("<b>Pathogens:</b> S. aureus (including MRSA), Group A Streptococcus", sBody))
summer_ssti = [
["Antibiotic", "Dose (mg/kg/day)", "Frequency", "Duration", "Route", "Notes"],
["Cephalexin\n(non-purulent,\nno MRSA risk)", "25–50 mg/kg/day\n(max 500 mg QID)", "QID", "5–7 days", "PO", "1st line for non-purulent cellulitis; MSSA/GAS"],
["Clindamycin\n(MRSA risk)", "30–40 mg/kg/day\n(max 450 mg TID)", "TID", "5–7 days", "PO", "CA-MRSA coverage; check D-zone test for inducible resistance"],
["TMP-SMX\n(purulent/MRSA)", "8–10 mg TMP/kg/day\n(max 160 mg BID)", "BID", "5–7 days", "PO", "Purulent infections; CA-MRSA; NOT for non-purulent cellulitis"],
["Amoxicillin-\nclavulanate\n(bite wounds)", "45 mg/kg/day\n(max 875 mg BID)", "BID", "3–5 days prophylaxis;\n7–10 days treatment", "PO", "Dog/cat bites; Pasteurella, Eikenella; also covers anaerobes"],
["Cefazolin\n(IV, moderate)", "100 mg/kg/day\n(max 6 g/day)", "TID", "5–7 days", "IV", "Moderate cellulitis requiring hospitalisation; MSSA"],
["Vancomycin\n(MRSA, severe)", "40–60 mg/kg/day\n(max 2–3 g/day;\ntarget AUC/MIC)", "Q6h (Q8h neonates)", "7–14 days", "IV", "Severe MRSA SSTIs; monitor trough/AUC; adjust per renal function"],
]
story.append(abx_table(
summer_ssti[0], summer_ssti[1:],
[2.4*cm, 3.2*cm, 2.0*cm, 2.2*cm, 1.2*cm, 5.0*cm]
))
story.append(PageBreak())
# ══════════════════════════════════════════════════════════════════
# AUTUMN
# ══════════════════════════════════════════════════════════════════
story.append(season_banner("AUTUMN SEASON (September – November)", AUTUMN_BRN, "🍂"))
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph(
"Autumn marks the return to school and the onset of respiratory infection season. Pertussis and influenza begin circulating. "
"Diphtheria, typhoid, and enteric fevers remain prevalent in endemic regions. Viral URTIs with secondary bacterial superinfection are common.",
sBody))
story.append(Spacer(1, 0.2*cm))
# 1. Pertussis
story.append(disease_header("1. Pertussis (Whooping Cough)", AUTUMN_BG))
story.append(Spacer(1, 0.1*cm))
story.append(Paragraph("<b>Pathogen:</b> Bordetella pertussis", sBody))
story.append(Paragraph(
"<b>Stages:</b> Catarrhal (1–2 wk, most infectious) → Paroxysmal (2–6 wk, characteristic 'whoop' + post-tussive vomiting) → Convalescent (weeks).",
sBody))
autumn_pertussis = [
["Antibiotic", "Dose (mg/kg/day)", "Frequency", "Duration", "Route", "Notes"],
["Azithromycin\n(1st line, all ages)", "<6 months: 10 mg/kg/day\n≥6 months: 10 mg/kg day 1\nthen 5 mg/kg days 2–5\n(max 500 mg/day)", "OD", "5 days", "PO", "Drug of choice; preferred <1 month due to erythromycin-IHPS risk"],
["Clarithromycin\n(≥1 month)", "15 mg/kg/day\n(max 1 g/day)", "BID", "7 days", "PO", "Alternative 1st line for >1 month; avoid in <1 month"],
["Erythromycin\n(alt., ≥1 month)", "40–50 mg/kg/day\n(max 2 g/day)", "QID", "14 days", "PO", "Older agent; effective but more GI side effects; IHPS risk in newborns"],
["TMP-SMX\n(macrolide intolerant\n≥2 months)", "8 mg TMP/kg/day\n(max 320 mg TMP/day)", "BID", "14 days", "PO", "Alternative if macrolide not tolerated; avoid <2 months"],
]
story.append(abx_table(
autumn_pertussis[0], autumn_pertussis[1:],
[2.4*cm, 3.6*cm, 1.6*cm, 1.6*cm, 1.2*cm, 5.6*cm]
))
story.append(Paragraph(
"⚠ Post-exposure prophylaxis: Same regimen as treatment; give to all household contacts and close contacts regardless of immunisation status.",
sWarn))
story.append(Spacer(1, 0.3*cm))
# 2. Community-Acquired Pneumonia (early)
story.append(disease_header("2. Community-Acquired Pneumonia (CAP)", AUTUMN_BG))
story.append(Spacer(1, 0.1*cm))
story.append(Paragraph(
"<b>Pathogens by age:</b> Neonates: GBS, gram-negatives. 1–3 months: S. pneumoniae, RSV. "
"Pre-school: Viral (RSV, rhinovirus), S. pneumoniae. School-age: S. pneumoniae, M. pneumoniae, C. pneumoniae. Adolescents: M. pneumoniae (most common).",
sBody))
autumn_cap = [
["Age/Type", "Antibiotic", "Dose (mg/kg/day)", "Frequency", "Duration", "Route"],
["Neonates\n(<28 days)", "Ampicillin +\nGentamicin", "Amp: 150–200 mg/kg/day\nGent: 4–5 mg/kg/day", "Q6h / OD", "10–14 days", "IV"],
["1–3 months\n(afebrile)", "Azithromycin", "10 mg/kg day 1\nthen 5 mg/kg/day", "OD", "5 days", "PO", ],
["Pre-school\n(typical CAP)", "Amoxicillin\n(1st line)", "80–90 mg/kg/day\n(max 3 g/day)", "BID–TID", "5–7 days", "PO"],
["Pre-school\n(hospitalised)", "Ampicillin\n(IV)", "150–200 mg/kg/day\n(max 8 g/day)", "Q6h", "5–7 days", "IV"],
["School-age\n(atypical)", "Azithromycin", "10 mg/kg day 1\nthen 5 mg/kg days 2–5\n(max 500 mg/day)", "OD", "5 days", "PO"],
["School-age\n(typical)", "Amoxicillin\n(1st line)", "80–90 mg/kg/day\n(max 3 g/day)", "TID", "5–7 days", "PO"],
["Severe CAP\n(ICU)", "Ceftriaxone +\nAzithromycin", "Ceftriaxone: 100 mg/kg/day\nAzithro: 10 mg/kg/day\n(max 2 g + 500 mg)", "OD / OD", "7–10 days", "IV + PO/IV"],
["MRSA\nsuspected", "Vancomycin +\nCeftriaxone", "Vanc: 60 mg/kg/day\nCeftriaxone: 100 mg/kg/day", "Q6h / OD", "10–14 days", "IV"],
]
story.append(abx_table(
["Age/Type", "Antibiotic", "Dose (mg/kg/day)", "Frequency", "Duration", "Route"],
autumn_cap[1:],
[2.2*cm, 2.6*cm, 3.4*cm, 1.7*cm, 1.8*cm, 1.3*cm]
))
story.append(Spacer(1, 0.3*cm))
# 3. Acute Otitis Media
story.append(disease_header("3. Acute Otitis Media (AOM)", AUTUMN_BG))
story.append(Spacer(1, 0.1*cm))
story.append(Paragraph(
"<b>Pathogens:</b> S. pneumoniae (35%), H. influenzae (25%), M. catarrhalis (15%), mixed bacterial (10%)",
sBody))
autumn_aom = [
["Antibiotic", "Dose (mg/kg/day)", "Frequency", "Duration", "Route", "Notes"],
["Amoxicillin\n(1st line)", "80–90 mg/kg/day\n(max 3 g/day)", "BID–TID", "<2 yr: 10 days\n≥2 yr mild: 5–7 days", "PO", "High-dose for resistant S. pneumoniae; confirmed AOM required"],
["Amoxicillin-\nClavulanate\n(treatment failure)", "80–90 mg/kg/day\n(amox component;\nmax 3 g/day)", "BID", "10 days", "PO", "After 48–72 hr failure of amoxicillin; H. influenzae beta-lactamase"],
["Ceftriaxone\n(vomiting/severe)", "50 mg/kg/day\n(max 1 g)", "OD × 1–3 days", "1–3 doses", "IM/IV", "Unable to take oral medications; 3-dose for treatment failures"],
["Cefdinir\n(PCN allergy)", "14 mg/kg/day\n(max 600 mg/day)", "OD–BID", "5–10 days", "PO", "Non-anaphylactic PCN allergy; good palatability"],
["Cefuroxime\n(PCN allergy)", "30 mg/kg/day\n(max 1 g/day)", "BID", "10 days", "PO", "Non-anaphylactic PCN allergy"],
["Azithromycin\n(anaphylactic\nPCN allergy)", "10 mg/kg day 1\nthen 5 mg/kg days 2–5", "OD", "5 days", "PO", "Only if PCN anaphylaxis; inferior efficacy; rising pneumococcal resistance"],
["Clindamycin\n(S. pneumoniae,\nresistant)", "30–40 mg/kg/day\n(max 900 mg/day)", "TID", "10 days", "PO", "Penicillin-resistant pneumococcus without H. flu component"],
]
story.append(abx_table(
autumn_aom[0], autumn_aom[1:],
[2.4*cm, 3.0*cm, 1.8*cm, 2.2*cm, 1.2*cm, 5.4*cm]
))
story.append(PageBreak())
# ══════════════════════════════════════════════════════════════════
# WINTER
# ══════════════════════════════════════════════════════════════════
story.append(season_banner("WINTER SEASON (December – February)", WINTER_PURP, "❄"))
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph(
"Winter is the peak season for respiratory infections. Influenza-related secondary bacterial pneumonia is a major cause of mortality. "
"Meningococcal disease peaks in winter-spring. Bacterial meningitis, epiglottitis, and deep neck infections require prompt treatment.",
sBody))
story.append(Spacer(1, 0.2*cm))
# 1. Bacterial Meningitis
story.append(disease_header("1. Bacterial Meningitis", WINTER_BG))
story.append(Spacer(1, 0.1*cm))
story.append(Paragraph(
"<b>Pathogens by age:</b> Neonates: GBS, E. coli, L. monocytogenes. "
"1–3 months: GBS, S. pneumoniae, H. influenzae. "
">3 months–adult: S. pneumoniae, N. meningitidis, H. influenzae type b (unvaccinated).",
sBody))
winter_mening = [
["Age/Pathogen", "Antibiotic", "Dose (mg/kg/day)", "Frequency", "Duration", "Route"],
["Neonates <7 days\n(empiric)", "Ampicillin +\nGentamicin or\nCefotaxime", "Amp: 200 mg/kg/day\nGent: 5 mg/kg/day\nCefotax: 100 mg/kg/day", "Q8–12h /\nOD / Q12h", "14–21 days\n(longer for GBS)", "IV"],
["Neonates 7–28 days\n(empiric)", "Ampicillin +\nCefotaxime", "Amp: 300 mg/kg/day\nCefotax: 150 mg/kg/day", "Q6h / Q8h", "14–21 days", "IV"],
["1–3 months\n(empiric)", "Ampicillin +\nCeftriaxone", "Amp: 300 mg/kg/day\nCeftriaxone: 100 mg/kg/day\n(max 4 g/day)", "Q6h / OD-BID", "10–21 days", "IV"],
[">3 months\nS. pneumoniae", "Ceftriaxone +\nVancomycin\n(empiric)", "Ceftriaxone: 100 mg/kg/day\nVanc: 60 mg/kg/day\n(max 4 g + 4 g/day)", "OD-BID / Q6h", "10–14 days", "IV"],
[">3 months\nN. meningitidis", "Ceftriaxone\nor Penicillin G\n(if susceptible)", "Ceftriaxone: 100 mg/kg/day\nPCN G: 300,000 U/kg/day\n(max 4 g/day; 24 M U/day)", "OD-BID / Q4–6h", "5–7 days", "IV"],
["L. monocytogenes\n(add to empiric)", "Ampicillin +\nGentamicin", "Amp: 300 mg/kg/day\nGent: 7.5 mg/kg/day", "Q6h / OD-Q8h", "21 days", "IV"],
]
story.append(abx_table(
["Age/Pathogen", "Antibiotic", "Dose (mg/kg/day)", "Frequency", "Duration", "Route"],
winter_mening[1:],
[2.4*cm, 2.4*cm, 3.6*cm, 1.8*cm, 1.9*cm, 1.4*cm]
))
story.append(Paragraph(
"⚠ Dexamethasone 0.15 mg/kg/dose Q6h × 4 days (max 10 mg/dose) — give 15–20 min BEFORE or with first antibiotic dose. "
"Reduces neurological sequelae in H. influenzae and pneumococcal meningitis.",
sWarn))
story.append(Spacer(1, 0.3*cm))
# 2. Epiglottitis
story.append(disease_header("2. Acute Epiglottitis", WINTER_BG))
story.append(Spacer(1, 0.1*cm))
story.append(Paragraph(
"<b>Pathogen:</b> H. influenzae type b (primarily), S. pyogenes, S. pneumoniae, S. aureus",
sBody))
story.append(Paragraph(
"<b>EMERGENCY:</b> 4Ds — Dysphagia, Dysphonia (muffled/hot potato voice), Drooling, Distress. Do NOT examine throat in ER. Secure airway first.",
sNote))
winter_epiglot = [
["Antibiotic", "Dose (mg/kg/day)", "Frequency", "Duration", "Route", "Notes"],
["Ceftriaxone\n(1st line)", "100 mg/kg/day\n(max 4 g/day)", "OD–BID", "7–10 days\n(IV then PO switch)", "IV", "Drug of choice; covers H. influenzae + S. pneumoniae"],
["Cefotaxime\n(alternative)", "150–200 mg/kg/day\n(max 8–12 g/day)", "Q6–8h", "7–10 days", "IV", "Alternative IV 3rd-gen cephalosporin"],
["Ampicillin-\nSulbactam", "150–200 mg ampicillin\ncomponent/kg/day\n(max 8 g/day)", "Q6h", "7–10 days", "IV", "Covers beta-lactamase-producing H. influenzae + S. aureus"],
["Add: Vancomycin\n(if MRSA risk)", "60 mg/kg/day\n(max 3–4 g/day;\nAUC-guided)", "Q6h", "With IV course", "IV", "Add if MRSA suspected; ICU setting"],
]
story.append(abx_table(
winter_epiglot[0], winter_epiglot[1:],
[2.4*cm, 3.2*cm, 1.8*cm, 2.2*cm, 1.2*cm, 5.2*cm]
))
story.append(Spacer(1, 0.3*cm))
# 3. Influenza + Secondary Bacterial Pneumonia
story.append(disease_header("3. Influenza + Secondary Bacterial Pneumonia", WINTER_BG))
story.append(Spacer(1, 0.1*cm))
story.append(Paragraph(
"<b>Post-influenza pathogens:</b> S. aureus (including MRSA) >> S. pneumoniae > H. influenzae > Group A Streptococcus. "
"Rapid deterioration after initial influenza improvement is a red flag.",
sBody))
winter_flu_bact = [
["Antibiotic", "Dose (mg/kg/day)", "Frequency", "Duration", "Route", "Notes"],
["Ceftriaxone +\nAzithromycin\n(empiric)", "Ceftriaxone: 100 mg/kg/day\nAzithromycin: 10 mg/kg/day\n(max 2 g + 500 mg)", "OD + OD", "7–10 days", "IV + PO", "Covers S. pneumoniae, H. flu, atypicals; start empirically"],
["Vancomycin +\nCeftriaxone\n(MRSA risk)", "Vanc: 60 mg/kg/day\nCeftriaxone: 100 mg/kg/day\n(max 4 g + 2 g/day)", "Q6h + OD", "10–14 days", "IV", "Post-influenza MRSA pneumonia; necrosis/empyema"],
["Clindamycin\n(toxin suppression)", "40 mg/kg/day\n(max 2.7 g/day)", "TID–QID", "7–10 days", "IV/PO", "Add to beta-lactam for toxin-mediated S. aureus (TSS, necrotising)"],
["Linezolid\n(MRSA, severe)", "10 mg/kg/dose\n(<12 yr: Q8h;\n≥12 yr: Q12h;\nmax 600 mg/dose)", "Q8–12h", "10–14 days", "IV/PO", "MRSA; also suppresses toxin production; comparable to vancomycin"],
]
story.append(abx_table(
winter_flu_bact[0], winter_flu_bact[1:],
[2.4*cm, 3.4*cm, 1.8*cm, 1.8*cm, 1.2*cm, 5.4*cm]
))
story.append(Spacer(1, 0.3*cm))
# 4. Septic Arthritis / Osteomyelitis
story.append(disease_header("4. Septic Arthritis / Acute Haematogenous Osteomyelitis", WINTER_BG))
story.append(Spacer(1, 0.1*cm))
story.append(Paragraph(
"<b>Pathogens:</b> S. aureus (most common all ages), GBS + gram-negatives (neonates), K. kingae (toddlers 6 months–4 years), S. pneumoniae (young children).",
sBody))
winter_bone = [
["Antibiotic", "Dose (mg/kg/day)", "Frequency", "Duration", "Route", "Notes"],
["Nafcillin/\nOxacillin\n(MSSA)", "150–200 mg/kg/day\n(max 9–12 g/day)", "Q4–6h", "IV 3–7 days then\nPO 3–4 wk total", "IV→PO", "Anti-staphylococcal; MSSA confirmed; watch for hepatotoxicity"],
["Cefazolin\n(MSSA, IV)", "100–150 mg/kg/day\n(max 6 g/day)", "Q8h", "Until PO switch\n(5–7 days IV)", "IV", "Alternative IV MSSA; better tolerated than nafcillin"],
["Clindamycin\n(PO step-down\nor MRSA if D-neg)", "30–40 mg/kg/day\n(max 1.8 g/day)", "TID–QID", "3–4 weeks total", "PO", "Excellent bone penetration; D-zone test required for inducible MRSA resistance"],
["Cephalexin\n(PO step-down,\nMSSA)", "100 mg/kg/day\n(max 4 g/day)", "QID", "3–4 weeks total", "PO", "Oral continuation after IV response; reliable for MSSA"],
["TMP-SMX\n(MRSA, oral)", "10–12 mg TMP/kg/day\n(max 320 mg TMP/day)", "BID", "3–4 weeks total", "PO", "CA-MRSA oral option; good bone penetration"],
["Vancomycin\n(MRSA, IV)", "60 mg/kg/day\n(max 4 g/day;\nAUC-targeted)", "Q6h", "Until PO switch\nor MRSA cleared", "IV", "Severe MRSA; target AUC/MIC 400–600; monitor renal function"],
]
story.append(abx_table(
winter_bone[0], winter_bone[1:],
[2.4*cm, 3.0*cm, 1.8*cm, 2.4*cm, 1.2*cm, 5.2*cm]
))
story.append(PageBreak())
# ══════════════════════════════════════════════════════════════════
# SPECIAL NOTES & QUICK REFERENCE
# ══════════════════════════════════════════════════════════════════
story.append(Paragraph("Special Populations & Antibiotic Adjustments", sH2))
story.append(HRFlowable(width=W, thickness=1.5, color=MED_BLUE, spaceAfter=8))
# Neonatal doses summary
story.append(Paragraph("Neonatal Antibiotic Summary (0–28 days)", sH3))
neo_data = [
[Paragraph("Antibiotic", sTblHdr), Paragraph("Weight / Age", sTblHdr), Paragraph("Dose", sTblHdr), Paragraph("Frequency", sTblHdr), Paragraph("Route", sTblHdr)],
[Paragraph("Ampicillin (sepsis)", sTblBold), Paragraph("<7 days, any weight", sTblCellC), Paragraph("150–200 mg/kg/day", sTblCellC), Paragraph("Q8–12h", sTblCellC), Paragraph("IV", sTblCellC)],
[Paragraph("Ampicillin (sepsis)", sTblBold), Paragraph("≥7 days", sTblCellC), Paragraph("200–300 mg/kg/day", sTblCellC), Paragraph("Q6–8h", sTblCellC), Paragraph("IV", sTblCellC)],
[Paragraph("Gentamicin", sTblBold), Paragraph("Premature <30 wk", sTblCellC), Paragraph("5 mg/kg/dose", sTblCellC), Paragraph("Q48h", sTblCellC), Paragraph("IV/IM", sTblCellC)],
[Paragraph("Gentamicin", sTblBold), Paragraph("30–34 wk GA", sTblCellC), Paragraph("5 mg/kg/dose", sTblCellC), Paragraph("Q36h", sTblCellC), Paragraph("IV/IM", sTblCellC)],
[Paragraph("Gentamicin", sTblBold), Paragraph("≥35 wk/term", sTblCellC), Paragraph("5 mg/kg/dose", sTblCellC), Paragraph("Q24h", sTblCellC), Paragraph("IV/IM", sTblCellC)],
[Paragraph("Cefotaxime", sTblBold), Paragraph("<7 days", sTblCellC), Paragraph("100 mg/kg/day", sTblCellC), Paragraph("Q12h", sTblCellC), Paragraph("IV/IM", sTblCellC)],
[Paragraph("Cefotaxime", sTblBold), Paragraph("7–28 days", sTblCellC), Paragraph("150–200 mg/kg/day", sTblCellC), Paragraph("Q8h", sTblCellC), Paragraph("IV/IM", sTblCellC)],
[Paragraph("Vancomycin", sTblBold), Paragraph("<28 days (AUC-guided)", sTblCellC), Paragraph("10–15 mg/kg/dose", sTblCellC), Paragraph("Q8–24h\n(by age/weight)", sTblCellC), Paragraph("IV", sTblCellC)],
[Paragraph("Penicillin G", sTblBold), Paragraph("<7 days, <2 kg", sTblCellC), Paragraph("100,000 U/kg/day", sTblCellC), Paragraph("Q12h", sTblCellC), Paragraph("IV", sTblCellC)],
[Paragraph("Penicillin G", sTblBold), Paragraph(">7 days, >2 kg", sTblCellC), Paragraph("250,000 U/kg/day", sTblCellC), Paragraph("Q6h", sTblCellC), Paragraph("IV", sTblCellC)],
]
neo_ts = TableStyle([
("BACKGROUND", (0,0), (-1,0), TABLE_HDR),
("GRID", (0,0), (-1,-1), 0.4, HexColor("#d1d5db")),
("TOPPADDING", (0,0), (-1,-1), 4),
("BOTTOMPADDING", (0,0), (-1,-1), 4),
("LEFTPADDING", (0,0), (-1,-1), 5),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("ROWBACKGROUNDS", (0,1), (-1,-1), [WHITE, TABLE_ALT]),
])
story.append(Table(neo_data, colWidths=[3.8*cm, 3.2*cm, 3.2*cm, 2.4*cm, 1.4*cm], style=neo_ts))
story.append(Spacer(1, 0.3*cm))
# Renal impairment note
story.append(info_box([
"RENAL IMPAIRMENT: Aminoglycosides (gentamicin), vancomycin, and beta-lactams require dose/interval adjustment in renal impairment. "
"Calculate eGFR using Schwartz formula. Consult pharmacy for individualised dosing.",
"HEPATIC IMPAIRMENT: Chloramphenicol, clindamycin, and metronidazole require reduction in severe hepatic disease.",
"PENICILLIN ALLERGY: If only mild (urticaria, rash): use cephalosporins (cross-reactivity ~1–2%). If severe (anaphylaxis): use azithromycin, clindamycin, or fluoroquinolones (age-appropriate)."
]))
story.append(Spacer(1, 0.3*cm))
# Antibiotic stewardship
story.append(Paragraph("Antibiotic Stewardship Principles", sH3))
steward = [
["Principle", "Application"],
["Right Drug", "Base choice on local antibiogram and likely pathogen; send cultures before starting antibiotics"],
["Right Dose", "Use weight-based dosing (mg/kg/day); avoid under-dosing which risks treatment failure and resistance"],
["Right Duration", "Shortest effective course; most URTIs 5–7 days; deep infections 4–6 weeks; meningitis per protocol"],
["Right Route", "Oral preferred when bioavailability is adequate and patient tolerates; IV-to-PO switch early"],
["De-escalation", "Narrow spectrum once culture and sensitivity results available; stop if no bacterial infection confirmed"],
["Avoid Antibiotics", "Viral URTIs, bronchiolitis, most sore throats without GAS confirmation, uncomplicated viral diarrhoea"],
]
stew_ts = TableStyle([
("BACKGROUND", (0,0), (-1,0), TEAL),
("TEXTCOLOR", (0,0), (-1,0), WHITE),
("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
("FONTSIZE", (0,0), (-1,-1), 8.5),
("GRID", (0,0), (-1,-1), 0.4, HexColor("#d1d5db")),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 6),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("ROWBACKGROUNDS", (0,1), (-1,-1), [WHITE, TEAL_BG]),
("FONTNAME", (0,1), (0,-1), "Helvetica-Bold"),
])
story.append(Table(steward, colWidths=[3.5*cm, 12.5*cm], style=stew_ts))
story.append(Spacer(1, 0.4*cm))
# ── REFERENCES ─────────────────────────────────────────────────────
story.append(HRFlowable(width=W, thickness=1, color=GRAY, spaceAfter=5))
story.append(Paragraph("References & Sources", sH3))
refs = [
"1. Robertson J, Shilkofski N (Eds). The Harriet Lane Handbook, 23rd Ed. Johns Hopkins Hospital; Elsevier 2021. ISBN 9780323876988",
"2. American Academy of Pediatrics (AAP). Red Book: 2021-2024 Report of the Committee on Infectious Diseases, 32nd Ed. ISBN 9781610025218",
"3. Bradley JS et al. IDSA Clinical Practice Guidelines for the Management of CAP in Infants and Children. Clin Infect Dis. 2011;53(7):e25-e76",
"4. Lieberthal AS et al. AAP Guideline for Diagnosis and Management of Acute Otitis Media. Pediatrics. 2013;131(3):e964-e999",
"5. WHO. Pocket Book of Hospital Care for Children, 2nd Ed. WHO Press, Geneva, 2013",
"6. Kimberlin DW, Brady MT, et al. Red Book 2021 — Antimicrobial Agents and Related Therapy tables",
"7. IDSA Lyme Disease Guidelines: Wormser GP et al. Clin Infect Dis. 2006;43(9):1089-1134 (updated 2020)",
]
for r in refs:
story.append(Paragraph(f"• {r}", sNote))
story.append(Spacer(1, 0.3*cm))
story.append(Paragraph(
f"Document generated by Orris Medical AI | For educational use only | {datetime.now().strftime('%B %d, %Y')} | "
"Always verify with current local guidelines and individual patient assessment.",
sFooter))
# ── BUILD ──────────────────────────────────────────────────────────
doc.build(story)
print(f"PDF created: {OUTPUT}")