Rationale behind not using any other anti pyretics ither than paractemol in dengue fever

Reading File
Searching the Web

antipyretics contraindicated dengue fever rationale NSAIDs aspirin

Finding Sources
Finding Sources
Searching PubMed

dengue fever antipyretics NSAIDs contraindication paracetamol

Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
I now have thorough, authoritative textbook evidence from multiple sources. Here is the complete answer:

Why Only Paracetamol (Acetaminophen) is Used as an Antipyretic in Dengue Fever

The rationale is grounded in dengue's unique pathophysiology. The disease creates a dangerous combination of thrombocytopenia, increased vascular permeability, and hemorrhagic tendency - making the adverse effects of NSAIDs and aspirin potentially fatal.

Pathophysiology of Dengue That Makes NSAIDs Dangerous

Dengue fever characteristically causes:
  1. Thrombocytopenia - platelet counts can fall below 100,000/mm³ in ~50% of patients. The dengue virus suppresses platelet production in the bone marrow AND triggers immune-mediated platelet destruction (cross-reactive antibodies targeting platelet antigens). This results in a hemorrhagic tendency even at baseline.
  2. Increased vascular permeability - plasma leakage causes hemoconcentration, pleural effusion, and ascites. In dengue hemorrhagic fever (DHF) and dengue shock syndrome (DSS), this is life-threatening.
  3. Coagulation abnormalities - disseminated intravascular coagulation (DIC) can develop in severe cases.
  4. Gastric mucosal vulnerability - the inflammatory state makes the gastric mucosa more susceptible to damage.

Why Each Drug Class is Contraindicated

1. Aspirin (Acetylsalicylic Acid / ASA)

Mechanism of harmConsequence in dengue
Irreversibly inhibits COX-1 in platelets, blocking thromboxane A2 synthesisPlatelet aggregation is permanently impaired for the platelet's lifespan (~7-10 days) - catastrophic in already thrombocytopenic patient
Gastric mucosal irritation (direct + prostaglandin inhibition)Peptic ulceration and GI hemorrhage
Anticoagulant effect at higher dosesProlongs bleeding time
In children: inhibits mitochondrial beta-oxidationReye's Syndrome - acute liver failure + encephalopathy
Park's Textbook explicitly states: "Massive bleeding may occur without prolonged shock in instances when acetylsalicylic acid (aspirin), ibuprofen or corticosteroids have been taken."

2. Ibuprofen and Other NSAIDs

Mechanism of harmConsequence in dengue
Reversibly inhibit COX-1 in plateletsImpaired platelet aggregation and clot formation
Inhibit prostaglandin-mediated gastroprotection (PGE2, PGI2)Gastritis, ulceration, and gastrointestinal bleeding
Can cause acute kidney injuryWorsens already-vulnerable renal function in severe dengue (dengue AKI is reported in up to 13% of cases)
Anti-platelet effect compounds the thrombocytopeniaDramatically elevated bleeding risk
The Red Book (AAP, 2021) states: "Patients should stay well hydrated and avoid use of aspirin, salicylate-containing drugs, and other NSAIDs to minimize potential for bleeding."
Goldman-Cecil Medicine confirms: NSAIDs like ibuprofen and aspirin "can potentiate the risk for bleeding."

3. Metamizole (Dipyrone)

  • Also has platelet-inhibiting properties.
  • Risk of agranulocytosis adds another layer of danger in a patient already immunologically stressed.
  • Not recommended in dengue for these reasons.

4. Corticosteroids

  • Also contraindicated - Park's specifically notes that corticosteroids (like dexamethasone) are associated with massive bleeding, and WHO trials showed corticosteroids are not beneficial in dengue management.

Why Paracetamol is Safe

Paracetamol works primarily via central mechanisms (inhibiting COX in the CNS/hypothalamus) and has no significant antiplatelet activity and no direct gastric mucosal toxicity at therapeutic doses. It effectively reduces fever without interfering with the hemostatic system.
Key guidelines:
  • Give paracetamol at standard doses; interval should not be less than 6 hours
  • Keep temperature below 39°C
  • Tepid sponging is a useful adjunct
Caution: Even paracetamol should not be overdosed. Dengue can cause hepatitis (LFTs typically 3x normal), and excessive paracetamol adds hepatotoxic risk. Doses should be kept at the lower end in patients with liver involvement.

Summary Table

DrugPlatelet EffectGI RiskOther RiskUse in Dengue
ParacetamolNoneMinimalHepatotoxic if overdosedRECOMMENDED
AspirinIrreversible anti-plateletHighReye's syndrome (children)CONTRAINDICATED
IbuprofenReversible anti-plateletHighRenal impairmentCONTRAINDICATED
DiclofenacAnti-plateletHigh-CONTRAINDICATED
Corticosteroids-ModerateMassive bleeding riskCONTRAINDICATED

Sources:
  • Park's Textbook of Preventive and Social Medicine - Management of Dengue Fever section
  • Goldman-Cecil Medicine - Treatment, Prevention and Prognosis of Dengue
  • Red Book 2021 (AAP) - Dengue treatment guidelines
  • Brenner and Rector's The Kidney - Dengue Viral Infection chapter
  • WHO Dengue Guidelines

Create a clinical reference PDF for dengue management guidelines

Reading File
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Finding Sources
Reading File
Running Command

mkdir -p /tmp/workspace/dengue-pdf && ls /tmp/workspace/dengue-pdf/

Writing File

~/dengue-pdf/build_dengue_pdf.py

"""
Dengue Fever Clinical Reference PDF Generator
Using ReportLab
"""

from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import cm, mm
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_JUSTIFY
from reportlab.platypus import (
    SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
    HRFlowable, KeepTogether, PageBreak
)
from reportlab.platypus.flowables import BalancedColumns
from reportlab.graphics.shapes import Drawing, Rect, String, Line, Circle
from reportlab.graphics import renderPDF
from reportlab.pdfgen import canvas
from reportlab.platypus import BaseDocTemplate, Frame, PageTemplate
import datetime

# ─── Colour palette ────────────────────────────────────────────────────────────
TEAL      = colors.HexColor('#006D6D')
DARK_TEAL = colors.HexColor('#004B4B')
RED       = colors.HexColor('#C0392B')
ORANGE    = colors.HexColor('#E67E22')
YELLOW    = colors.HexColor('#F1C40F')
GREEN     = colors.HexColor('#1E8449')
LIGHT_TEAL= colors.HexColor('#E0F4F4')
LIGHT_RED = colors.HexColor('#FADBD8')
LIGHT_ORANGE = colors.HexColor('#FDEBD0')
LIGHT_GREEN  = colors.HexColor('#D5F5E3')
LIGHT_YELLOW = colors.HexColor('#FEF9E7')
GRAY      = colors.HexColor('#555555')
LGRAY     = colors.HexColor('#EEEEEE')
WHITE     = colors.white
BLACK     = colors.black
TABLE_HEADER = colors.HexColor('#004B4B')

# ─── Page layout ───────────────────────────────────────────────────────────────
PAGE_W, PAGE_H = A4
MARGIN = 1.5 * cm

def header_footer(canvas_obj, doc):
    canvas_obj.saveState()
    # Header bar
    canvas_obj.setFillColor(DARK_TEAL)
    canvas_obj.rect(0, PAGE_H - 1.1*cm, PAGE_W, 1.1*cm, fill=1, stroke=0)
    canvas_obj.setFillColor(WHITE)
    canvas_obj.setFont("Helvetica-Bold", 9)
    canvas_obj.drawString(MARGIN, PAGE_H - 0.75*cm, "DENGUE FEVER  |  Clinical Management Reference")
    canvas_obj.setFont("Helvetica", 8)
    canvas_obj.drawRightString(PAGE_W - MARGIN, PAGE_H - 0.75*cm, "Based on WHO 2009 Guidelines & Major Textbooks")

    # Footer bar
    canvas_obj.setFillColor(DARK_TEAL)
    canvas_obj.rect(0, 0, PAGE_W, 0.9*cm, fill=1, stroke=0)
    canvas_obj.setFillColor(WHITE)
    canvas_obj.setFont("Helvetica", 7.5)
    canvas_obj.drawString(MARGIN, 0.28*cm, f"For clinical use. Sources: Park's, Goldman-Cecil, Red Book 2021, Harrison's, Rosen's EM  |  Generated {datetime.date.today().strftime('%B %Y')}")
    canvas_obj.drawRightString(PAGE_W - MARGIN, 0.28*cm, f"Page {doc.page}")
    canvas_obj.restoreState()

def build_pdf(output_path):
    doc = SimpleDocTemplate(
        output_path,
        pagesize=A4,
        leftMargin=MARGIN, rightMargin=MARGIN,
        topMargin=1.5*cm, bottomMargin=1.4*cm,
        title="Dengue Fever Clinical Management Reference",
        author="Orris Clinical Reference",
        subject="Dengue Fever Management"
    )

    styles = getSampleStyleSheet()

    # ── Custom styles ──
    def S(name, **kw):
        base = kw.pop('parent', 'Normal')
        return ParagraphStyle(name, parent=styles[base], **kw)

    H1 = S('H1', fontSize=18, textColor=WHITE, fontName='Helvetica-Bold',
            spaceAfter=4, spaceBefore=0, leading=22)
    H2 = S('H2', fontSize=11, textColor=WHITE, fontName='Helvetica-Bold',
            spaceAfter=2, spaceBefore=0, leading=14)
    H3 = S('H3', fontSize=10, textColor=DARK_TEAL, fontName='Helvetica-Bold',
            spaceAfter=3, spaceBefore=6, leading=13)
    BODY = S('BODY', fontSize=8.5, textColor=BLACK, leading=12,
             spaceAfter=3, spaceBefore=1)
    BODY_SM = S('BODY_SM', fontSize=8, textColor=BLACK, leading=11,
                spaceAfter=2, spaceBefore=1)
    BULLET = S('BULLET', fontSize=8.5, textColor=BLACK, leading=12,
               leftIndent=10, bulletIndent=0, spaceAfter=1)
    CAPTION = S('CAPTION', fontSize=7.5, textColor=GRAY, fontName='Helvetica-Oblique',
                spaceAfter=2, alignment=TA_CENTER)
    WARN = S('WARN', fontSize=8.5, textColor=RED, fontName='Helvetica-Bold',
             leading=12, spaceAfter=2)
    CENTER = S('CENTER', fontSize=9, textColor=BLACK, leading=12,
               alignment=TA_CENTER)
    TH = S('TH', fontSize=8, textColor=WHITE, fontName='Helvetica-Bold',
           leading=11, alignment=TA_CENTER)
    TD = S('TD', fontSize=8, textColor=BLACK, leading=11)
    TD_SM = S('TD_SM', fontSize=7.5, textColor=BLACK, leading=10)

    story = []

    # ══════════════════════════════════════════════════════════════════
    # TITLE BLOCK
    # ══════════════════════════════════════════════════════════════════
    def title_block():
        d = Drawing(PAGE_W - 2*MARGIN, 3.5*cm)
        d.add(Rect(0, 0, PAGE_W - 2*MARGIN, 3.5*cm,
                   fillColor=TEAL, strokeColor=None))
        d.add(Rect(0, 0, PAGE_W - 2*MARGIN, 0.35*cm,
                   fillColor=ORANGE, strokeColor=None))
        d.add(String(10, 55, "DENGUE FEVER",
                     fontName='Helvetica-Bold', fontSize=26, fillColor=WHITE))
        d.add(String(10, 32, "CLINICAL MANAGEMENT REFERENCE GUIDE",
                     fontName='Helvetica-Bold', fontSize=11, fillColor=LIGHT_TEAL))
        d.add(String(10, 14, "WHO 2009 Classification  ·  Outpatient & Inpatient Protocols  ·  Drug Safety  ·  Red Flags",
                     fontName='Helvetica', fontSize=8.5, fillColor=WHITE))
        return d

    story.append(title_block())
    story.append(Spacer(1, 0.3*cm))

    # ══════════════════════════════════════════════════════════════════
    # SECTION HELPER
    # ══════════════════════════════════════════════════════════════════
    def section_header(text, color=TEAL):
        d = Drawing(PAGE_W - 2*MARGIN, 0.7*cm)
        d.add(Rect(0, 0, PAGE_W - 2*MARGIN, 0.7*cm, fillColor=color, strokeColor=None))
        d.add(String(6, 10, text.upper(),
                     fontName='Helvetica-Bold', fontSize=10, fillColor=WHITE))
        return d

    def subsection(text):
        d = Drawing(PAGE_W - 2*MARGIN, 0.55*cm)
        d.add(Rect(0, 0, 0.25*cm, 0.55*cm, fillColor=ORANGE, strokeColor=None))
        d.add(String(10, 8, text,
                     fontName='Helvetica-Bold', fontSize=9.5, fillColor=DARK_TEAL))
        return d

    def info_box(content_list, bg=LIGHT_TEAL, border=TEAL, width=None):
        w = width or (PAGE_W - 2*MARGIN)
        table_data = [[Paragraph(c, BODY_SM)] for c in content_list]
        t = Table(table_data, colWidths=[w - 0.4*cm])
        t.setStyle(TableStyle([
            ('BACKGROUND', (0,0), (-1,-1), bg),
            ('BOX', (0,0), (-1,-1), 1, border),
            ('LEFTPADDING', (0,0), (-1,-1), 8),
            ('RIGHTPADDING', (0,0), (-1,-1), 8),
            ('TOPPADDING', (0,0), (-1,-1), 5),
            ('BOTTOMPADDING', (0,0), (-1,-1), 5),
            ('ROWBACKGROUNDS', (0,0), (-1,-1), [bg]),
        ]))
        return t

    def warning_box(title, items):
        rows = [[Paragraph(f"<font color='white'><b> ⚠  {title}</b></font>", BODY_SM)]]
        for item in items:
            rows.append([Paragraph(f"• {item}", BODY_SM)])
        t = Table(rows, colWidths=[PAGE_W - 2*MARGIN - 0.3*cm])
        t.setStyle(TableStyle([
            ('BACKGROUND', (0,0), (0,0), RED),
            ('BACKGROUND', (0,1), (-1,-1), LIGHT_RED),
            ('BOX', (0,0), (-1,-1), 1.2, RED),
            ('LEFTPADDING', (0,0), (-1,-1), 8),
            ('RIGHTPADDING', (0,0), (-1,-1), 8),
            ('TOPPADDING', (0,0), (-1,-1), 4),
            ('BOTTOMPADDING', (0,0), (-1,-1), 4),
        ]))
        return t

    # ══════════════════════════════════════════════════════════════════
    # 1. QUICK OVERVIEW
    # ══════════════════════════════════════════════════════════════════
    story.append(section_header("1.  Disease Overview & Epidemiology"))
    story.append(Spacer(1, 0.15*cm))

    overview_data = [
        [Paragraph("<b>Pathogen</b>", TD), Paragraph("Dengue virus (DENV 1–4), Flaviviridae family. 4 serotypes – each confers lifelong homotypic immunity but cross-protection wanes after 1–3 yrs.", TD)],
        [Paragraph("<b>Vector</b>", TD), Paragraph("Aedes aegypti (primary), A. albopictus, A. polynesiensis. Day-biting mosquitoes.", TD)],
        [Paragraph("<b>Incubation</b>", TD), Paragraph("3–14 days (typically 4–7 days)", TD)],
        [Paragraph("<b>Viremia</b>", TD), Paragraph("Detectable 24–48 hrs before fever; persists ~5–6 days", TD)],
        [Paragraph("<b>Transmission</b>", TD), Paragraph("Mainly mosquito bite. Rare: vertical (~20%), blood/organ donation, needlestick", TD)],
        [Paragraph("<b>Mortality</b>", TD), Paragraph("Severe dengue: 5–10% without tx → <1% with appropriate supportive care", TD)],
    ]
    ov_t = Table(overview_data, colWidths=[3.2*cm, PAGE_W - 2*MARGIN - 3.5*cm])
    ov_t.setStyle(TableStyle([
        ('ROWBACKGROUNDS', (0,0), (-1,-1), [LIGHT_TEAL, WHITE]),
        ('BOX', (0,0), (-1,-1), 0.5, TEAL),
        ('INNERGRID', (0,0), (-1,-1), 0.3, colors.HexColor('#AACCCC')),
        ('VALIGN', (0,0), (-1,-1), 'TOP'),
        ('LEFTPADDING', (0,0), (-1,-1), 6),
        ('RIGHTPADDING', (0,0), (-1,-1), 6),
        ('TOPPADDING', (0,0), (-1,-1), 4),
        ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ]))
    story.append(ov_t)
    story.append(Spacer(1, 0.3*cm))

    # ══════════════════════════════════════════════════════════════════
    # 2. WHO CLASSIFICATION
    # ══════════════════════════════════════════════════════════════════
    story.append(section_header("2.  WHO 2009 Classification of Dengue Severity"))
    story.append(Spacer(1, 0.15*cm))

    class_data = [
        # Header
        [Paragraph("Category", TH), Paragraph("Clinical Criteria", TH), Paragraph("Lab Findings", TH), Paragraph("Action", TH)],
        # DF
        [Paragraph("<b>Dengue WITHOUT\nWarning Signs</b>", TD),
         Paragraph("Fever (2–7 days) + 2 of:\n• Nausea/vomiting\n• Rash\n• Aches & pains\n• Leukopenia\n• Positive tourniquet test", TD_SM),
         Paragraph("WBC ≤5,000/mm³\nPlatelets <150,000/mm³\nHct mildly elevated", TD_SM),
         Paragraph("Outpatient\nOral fluids\nParacetamol\nDaily monitoring", TD_SM)],
        # Dengue with WS
        [Paragraph("<b>Dengue WITH\nWarning Signs</b>\n⚠", TD),
         Paragraph("Above + ANY of:\n• Abdominal pain/tenderness\n• Persistent vomiting\n• Clinical fluid accumulation (ascites, pleural effusion)\n• Mucosal bleeding\n• Lethargy / restlessness\n• Liver enlargement >2 cm\n• Rapid rise in Hct + rapid fall in platelets", TD_SM),
         Paragraph("Platelets rapidly falling\nHct rising ≥20%\nRapid leukopenia", TD_SM),
         Paragraph("Hospitalize\nIV access\nStrict monitoring\nIV fluids if needed", TD_SM)],
        # Severe
        [Paragraph("<b>Severe Dengue</b>\n🔴", TD),
         Paragraph("Dengue + ANY ONE of:\n• Severe plasma leakage → shock (DSS)\n• Fluid accumulation + respiratory distress\n• Severe bleeding (clinician-evaluated)\n• Severe organ failure", TD_SM),
         Paragraph("AST/ALT ≥1000 IU/L\nImpaired consciousness\nHct drop + shock\nProlonged shock", TD_SM),
         Paragraph("ICU admission\nAggressive IV fluids\nO₂ therapy\nBlood products if indicated", TD_SM)],
    ]

    col_w = PAGE_W - 2*MARGIN
    class_t = Table(class_data, colWidths=[3.2*cm, 6.5*cm, 3.5*cm, 3.5*cm])
    class_t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,0), TABLE_HEADER),
        ('TEXTCOLOR', (0,0), (-1,0), WHITE),
        ('BACKGROUND', (0,1), (-1,1), LIGHT_GREEN),
        ('BACKGROUND', (0,2), (-1,2), LIGHT_ORANGE),
        ('BACKGROUND', (0,3), (-1,3), LIGHT_RED),
        ('BOX', (0,0), (-1,-1), 1, DARK_TEAL),
        ('INNERGRID', (0,0), (-1,-1), 0.4, colors.HexColor('#BBBBBB')),
        ('VALIGN', (0,0), (-1,-1), 'TOP'),
        ('ALIGN', (0,0), (-1,0), 'CENTER'),
        ('LEFTPADDING', (0,0), (-1,-1), 5),
        ('RIGHTPADDING', (0,0), (-1,-1), 5),
        ('TOPPADDING', (0,0), (-1,-1), 4),
        ('BOTTOMPADDING', (0,0), (-1,-1), 4),
        ('FONTNAME', (0,1), (0,-1), 'Helvetica-Bold'),
        ('FONTSIZE', (0,1), (0,-1), 8),
    ]))
    story.append(class_t)
    story.append(Spacer(1, 0.2*cm))

    # Tourniquet test note
    story.append(info_box([
        "<b>Tourniquet Test:</b> Inflate BP cuff to midpoint between systolic & diastolic for 5 minutes. "
        "<b>Positive</b> = ≥10 petechiae per 2.5×2.5 cm area. DHF usually gives definite positive with ≥20 petechiae."
    ]))
    story.append(Spacer(1, 0.3*cm))

    # ══════════════════════════════════════════════════════════════════
    # 3. PHASES OF DENGUE
    # ══════════════════════════════════════════════════════════════════
    story.append(section_header("3.  Three Clinical Phases of Dengue"))
    story.append(Spacer(1, 0.15*cm))

    phases_data = [
        [Paragraph("<b>PHASE 1\nFebrile</b>\nDays 1–3", TH),
         Paragraph("<b>PHASE 2\nCritical</b>\nDays 3–7", TH),
         Paragraph("<b>PHASE 3\nRecovery</b>\nDays 7–10", TH)],
        [Paragraph(
            "• Abrupt high fever (39–40°C)\n"
            "• Headache, retro-orbital pain\n"
            "• Myalgia, arthralgia ('breakbone fever')\n"
            "• Flushed face, conjunctival injection\n"
            "• Maculopapular rash\n"
            "• Positive tourniquet test\n"
            "• Leukopenia begins\n"
            "• Mild thrombocytopenia", TD_SM),
         Paragraph(
            "• Defervescence (T° ↓ to 37.5–38°C)\n"
            "• Critical period: 24–48 hours\n"
            "• Capillary permeability ↑ → plasma leakage\n"
            "• Hct rising + platelets rapidly falling\n"
            "• <b>Warning signs may appear</b>\n"
            "• Risk of shock (DSS)\n"
            "• Pleural effusion, ascites\n"
            "• DIC in severe cases", TD_SM),
         Paragraph(
            "• Gradual reabsorption of plasma\n"
            "• Haemodynamic stabilization\n"
            "• Diuresis\n"
            "• Bradycardia\n"
            "• Rash may itch\n"
            "• Platelet count recovers\n"
            "• Watch for fluid overload\n"
            "  (dilutional Hct drop, pulmonary oedema)", TD_SM)],
    ]
    phases_t = Table(phases_data, colWidths=[5.5*cm, 5.5*cm, 5.7*cm])
    phases_t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (0,0), GREEN),
        ('BACKGROUND', (1,0), (1,0), RED),
        ('BACKGROUND', (2,0), (2,0), TEAL),
        ('BACKGROUND', (0,1), (0,1), LIGHT_GREEN),
        ('BACKGROUND', (1,1), (1,1), LIGHT_RED),
        ('BACKGROUND', (2,1), (2,1), LIGHT_TEAL),
        ('BOX', (0,0), (-1,-1), 1, DARK_TEAL),
        ('INNERGRID', (0,0), (-1,-1), 0.4, colors.HexColor('#CCCCCC')),
        ('VALIGN', (0,0), (-1,-1), 'TOP'),
        ('ALIGN', (0,0), (-1,0), 'CENTER'),
        ('LEFTPADDING', (0,0), (-1,-1), 6),
        ('RIGHTPADDING', (0,0), (-1,-1), 6),
        ('TOPPADDING', (0,0), (-1,-1), 5),
        ('BOTTOMPADDING', (0,0), (-1,-1), 5),
    ]))
    story.append(phases_t)
    story.append(Spacer(1, 0.3*cm))

    # ══════════════════════════════════════════════════════════════════
    # 4. WARNING SIGNS (RED FLAGS)
    # ══════════════════════════════════════════════════════════════════
    story.append(section_header("4.  Warning Signs — ADMIT IMMEDIATELY", color=RED))
    story.append(Spacer(1, 0.15*cm))

    warn_items = [
        "Abdominal pain or tenderness (severe)",
        "Persistent vomiting (unable to maintain oral intake)",
        "Clinical fluid accumulation — ascites, pleural effusion",
        "Mucosal bleeding — epistaxis, gum bleed, haematemesis, melaena",
        "Lethargy, restlessness, or altered sensorium",
        "Liver enlargement > 2 cm below costal margin",
        "Rapid rise in haematocrit with rapid fall in platelet count",
        "Cold, clammy extremities — delayed capillary refill",
        "Oliguria — no urine >4–6 hours",
        "Subnormal temperature (shock may be present)",
    ]
    story.append(warning_box("DENGUE WARNING SIGNS — Hospitalise Without Delay", warn_items))
    story.append(Spacer(1, 0.2*cm))

    # Shock criteria box
    shock_data = [
        [Paragraph("<b>Dengue Shock Syndrome (DSS)</b>", TD),
         Paragraph("<b>Pulse pressure ≤ 20 mmHg</b> in children (or signs of poor capillary perfusion: cold extremities, delayed CRT, rapid pulse).\nIn adults: hypotension is often a LATE sign — do not wait for it.", TD_SM)],
    ]
    shock_t = Table(shock_data, colWidths=[4.5*cm, PAGE_W - 2*MARGIN - 4.8*cm])
    shock_t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,-1), LIGHT_ORANGE),
        ('BOX', (0,0), (-1,-1), 1.5, ORANGE),
        ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
        ('LEFTPADDING', (0,0), (-1,-1), 7),
        ('RIGHTPADDING', (0,0), (-1,-1), 7),
        ('TOPPADDING', (0,0), (-1,-1), 6),
        ('BOTTOMPADDING', (0,0), (-1,-1), 6),
    ]))
    story.append(shock_t)
    story.append(Spacer(1, 0.3*cm))

    # ══════════════════════════════════════════════════════════════════
    # PAGE BREAK
    # ══════════════════════════════════════════════════════════════════
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════
    # 5. MANAGEMENT BY CATEGORY
    # ══════════════════════════════════════════════════════════════════
    story.append(section_header("5.  Management Protocols by Severity"))
    story.append(Spacer(1, 0.2*cm))

    # ── 5A. Outpatient
    story.append(subsection("5A  Dengue Without Warning Signs — Outpatient Management"))
    story.append(Spacer(1, 0.1*cm))

    op_data = [
        [Paragraph("<b>Criterion</b>", TH), Paragraph("<b>Action</b>", TH)],
        [Paragraph("Hydration", TD), Paragraph("Oral rehydration: ORS, fruit juice, coconut water, electrolyte-containing fluids. Adequate oral fluids reduce hospitalization rate.", TD_SM)],
        [Paragraph("Fever", TD), Paragraph("<b>Paracetamol</b> (acetaminophen) — dose not < every 6 hours. Keep temperature <39°C. Tepid sponging as adjunct.", TD_SM)],
        [Paragraph("Analgesics\nCONTRAINDICATED", TD), Paragraph("<b>DO NOT USE:</b> Aspirin (ASA), Ibuprofen, Diclofenac, Naproxen, or any NSAID — risk of gastric bleeding + platelet inhibition. ASA also risks Reye's syndrome in children.", TD_SM)],
        [Paragraph("Monitoring\n(Daily)", TD), Paragraph("Temperature, fluid intake/output, urine output (q4–6h), warning signs, Hct, platelet count, WBC", TD_SM)],
        [Paragraph("Return criteria", TD), Paragraph("No clinical improvement, abdominal pain, persistent vomiting, cold extremities, lethargy/restlessness, any bleeding, oliguria (>4–6 h no urine), deterioration at defervescence", TD_SM)],
    ]
    op_t = Table(op_data, colWidths=[3.2*cm, PAGE_W - 2*MARGIN - 3.5*cm])
    op_t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,0), TABLE_HEADER),
        ('ROWBACKGROUNDS', (0,1), (-1,-1), [LIGHT_GREEN, WHITE]),
        ('BOX', (0,0), (-1,-1), 0.8, TEAL),
        ('INNERGRID', (0,0), (-1,-1), 0.3, colors.HexColor('#BBBBBB')),
        ('VALIGN', (0,0), (-1,-1), 'TOP'),
        ('ALIGN', (0,0), (-1,0), 'CENTER'),
        ('LEFTPADDING', (0,0), (-1,-1), 6),
        ('TOPPADDING', (0,0), (-1,-1), 4),
        ('BOTTOMPADDING', (0,0), (-1,-1), 4),
        ('BACKGROUND', (0,3), (-1,3), LIGHT_RED),
    ]))
    story.append(op_t)
    story.append(Spacer(1, 0.3*cm))

    # ── 5B. DHF Febrile Phase / With Warning Signs
    story.append(subsection("5B  Dengue With Warning Signs / DHF Febrile Phase — Inpatient"))
    story.append(Spacer(1, 0.1*cm))

    ip_data = [
        [Paragraph("<b>Intervention</b>", TH), Paragraph("<b>Details</b>", TH)],
        [Paragraph("Admission & IV Access", TD), Paragraph("Admit, establish IV access, baseline investigations (FBC, Hct, LFTs, renal function)", TD_SM)],
        [Paragraph("Fluid Therapy", TD), Paragraph(
            "• Oral fluids if tolerated + IV if vomiting/refusing\n"
            "• Isotonic crystalloid (Normal Saline or Ringer's Lactate) — start at 5–7 mL/kg/hr\n"
            "• <b>Serial Hct is the guide</b> — rising Hct indicates plasma leakage; need for IV fluids\n"
            "• Measure Hct daily from Day 3 until afebrile ×2 days", TD_SM)],
        [Paragraph("Antipyretic", TD), Paragraph("Paracetamol only — target temp <39°C", TD_SM)],
        [Paragraph("Monitoring", TD), Paragraph("Vital signs q1–4h; urine output q4h; Hct q4–6h; daily FBC; watch pulse pressure", TD_SM)],
        [Paragraph("Transition to shock", TD), Paragraph("If BP ↓, urine output ↓, or other shock signs → escalate to DHF Grade III/IV protocol immediately", TD_SM)],
    ]
    ip_t = Table(ip_data, colWidths=[3.2*cm, PAGE_W - 2*MARGIN - 3.5*cm])
    ip_t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,0), TABLE_HEADER),
        ('ROWBACKGROUNDS', (0,1), (-1,-1), [LIGHT_ORANGE, WHITE]),
        ('BOX', (0,0), (-1,-1), 0.8, TEAL),
        ('INNERGRID', (0,0), (-1,-1), 0.3, colors.HexColor('#BBBBBB')),
        ('VALIGN', (0,0), (-1,-1), 'TOP'),
        ('ALIGN', (0,0), (-1,0), 'CENTER'),
        ('LEFTPADDING', (0,0), (-1,-1), 6),
        ('TOPPADDING', (0,0), (-1,-1), 4),
        ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ]))
    story.append(ip_t)
    story.append(Spacer(1, 0.3*cm))

    # ── 5C. Severe / DSS
    story.append(subsection("5C  Severe Dengue / DSS (DHF Grade III & IV) — ICU Protocol"))
    story.append(Spacer(1, 0.1*cm))

    sev_data = [
        [Paragraph("<b>Step</b>", TH), Paragraph("<b>Action</b>", TH)],
        [Paragraph("1. Immediate\nAssessment", TD), Paragraph("Hct, platelet count, BP, pulse pressure, urine output, acid-base status upon admission", TD_SM)],
        [Paragraph("2. IV Fluid\nResuscitation", TD), Paragraph(
            "• Start crystalloid (NS or RL) rapidly\n"
            "• If after ~1000 mL IV crystalloid Hct still high → switch to <b>colloid</b> (Dextran 40 or Haemacel)\n"
            "• If Hct declining → suspect internal bleeding\n"
            "• In shock: fresh whole blood <b>10–20 mL/kg/hr</b> as routine precaution", TD_SM)],
        [Paragraph("3. Oxygen", TD), Paragraph("Give O₂ to ALL patients in shock. Maintain SpO₂ ≥95%", TD_SM)],
        [Paragraph("4. Blood\nTransfusion\nIndications", TD), Paragraph(
            "• Overt blood loss ≥10% of total blood volume\n"
            "• Refractory shock + declining Hct\n"
            "• Dose: 10 mL/kg body weight at a time; check coagulogram\n"
            "• Use packed cells if fluid overload is present", TD_SM)],
        [Paragraph("5. DIC\nManagement", TD), Paragraph("FFP for coagulopathy. Platelet transfusion only for severe thrombocytopenia + active bleeding (not prophylactically).", TD_SM)],
        [Paragraph("6. Monitoring", TD), Paragraph("Vital signs q30 min; urine output hourly; Hct q2h; electrolytes; renal & liver function; blood glucose", TD_SM)],
        [Paragraph("7. Avoid", TD), Paragraph("<b>No steroids</b> (not beneficial; may worsen bleeding). <b>No NSAIDs.</b> Restrict unnecessary IV fluids in recovery phase.", TD_SM)],
    ]
    sev_t = Table(sev_data, colWidths=[3.2*cm, PAGE_W - 2*MARGIN - 3.5*cm])
    sev_t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,0), RED),
        ('ROWBACKGROUNDS', (0,1), (-1,-1), [LIGHT_RED, WHITE]),
        ('BOX', (0,0), (-1,-1), 0.8, RED),
        ('INNERGRID', (0,0), (-1,-1), 0.3, colors.HexColor('#BBBBBB')),
        ('VALIGN', (0,0), (-1,-1), 'TOP'),
        ('ALIGN', (0,0), (-1,0), 'CENTER'),
        ('LEFTPADDING', (0,0), (-1,-1), 6),
        ('TOPPADDING', (0,0), (-1,-1), 4),
        ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ]))
    story.append(sev_t)
    story.append(Spacer(1, 0.3*cm))

    # ══════════════════════════════════════════════════════════════════
    # PAGE BREAK
    # ══════════════════════════════════════════════════════════════════
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════
    # 6. DRUG SAFETY
    # ══════════════════════════════════════════════════════════════════
    story.append(section_header("6.  Drug Safety in Dengue — Antipyretics & Analgesics"))
    story.append(Spacer(1, 0.15*cm))

    drug_data = [
        [Paragraph("Drug", TH), Paragraph("Status", TH), Paragraph("Mechanism of Harm", TH), Paragraph("Specific Risk in Dengue", TH)],
        [Paragraph("<b>Paracetamol\n(Acetaminophen)</b>", TD),
         Paragraph("<font color='green'><b>✔ RECOMMENDED</b></font>", TD),
         Paragraph("Central COX inhibition in hypothalamus; no platelet effect", TD_SM),
         Paragraph("Safe at standard doses. <b>Caution:</b> dengue causes hepatitis — do not exceed standard dose. Interval ≥6 hrs.", TD_SM)],
        [Paragraph("<b>Aspirin (ASA)</b>", TD),
         Paragraph("<font color='red'><b>✘ CONTRAINDICATED</b></font>", TD),
         Paragraph("Irreversibly inhibits COX-1 → blocks TXA₂ → permanent platelet dysfunction for platelet lifespan (7–10 days)", TD_SM),
         Paragraph("• Fatal bleeding risk (already thrombocytopenic)\n• GI ulceration & haemorrhage\n• Massive bleeding without shock\n• <b>Reye's Syndrome in children</b>", TD_SM)],
        [Paragraph("<b>Ibuprofen</b>\n(& NSAIDs)", TD),
         Paragraph("<font color='red'><b>✘ CONTRAINDICATED</b></font>", TD),
         Paragraph("Reversibly inhibits COX-1 & COX-2 → impairs platelet aggregation + gastric mucosal protection ↓", TD_SM),
         Paragraph("• Platelet inhibition + thrombocytopenia = severe bleeding\n• Gastric ulcer & haemorrhage\n• Acute kidney injury (dengue AKI in up to 13%)\n• Worsens plasma leakage", TD_SM)],
        [Paragraph("<b>Diclofenac /\nNaproxen /\nMefenamic Acid</b>", TD),
         Paragraph("<font color='red'><b>✘ CONTRAINDICATED</b></font>", TD),
         Paragraph("Same class as ibuprofen — same COX inhibition mechanism", TD_SM),
         Paragraph("Same risks: bleeding, GI hemorrhage, renal impairment", TD_SM)],
        [Paragraph("<b>Corticosteroids\n(Dexamethasone,\nPrednisolone)</b>", TD),
         Paragraph("<font color='red'><b>✘ NOT RECOMMENDED</b></font>", TD),
         Paragraph("No proven benefit in RCTs. May suppress adrenal axis.", TD_SM),
         Paragraph("Massive bleeding without shock has been reported. WHO trials showed no clinical benefit.", TD_SM)],
        [Paragraph("<b>Metamizole\n(Dipyrone)</b>", TD),
         Paragraph("<font color='orange'><b>⚠ AVOID</b></font>", TD),
         Paragraph("Anti-platelet properties + risk of agranulocytosis", TD_SM),
         Paragraph("Not recommended in the setting of thrombocytopenia and hemorrhagic tendency", TD_SM)],
    ]
    drug_t = Table(drug_data, colWidths=[3.0*cm, 2.8*cm, 5.0*cm, 5.9*cm])
    drug_t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,0), TABLE_HEADER),
        ('BACKGROUND', (0,1), (-1,1), LIGHT_GREEN),
        ('BACKGROUND', (0,2), (-1,2), LIGHT_RED),
        ('BACKGROUND', (0,3), (-1,3), LIGHT_RED),
        ('BACKGROUND', (0,4), (-1,4), LIGHT_RED),
        ('BACKGROUND', (0,5), (-1,5), LIGHT_RED),
        ('BACKGROUND', (0,6), (-1,6), LIGHT_ORANGE),
        ('BOX', (0,0), (-1,-1), 0.8, TEAL),
        ('INNERGRID', (0,0), (-1,-1), 0.3, colors.HexColor('#BBBBBB')),
        ('VALIGN', (0,0), (-1,-1), 'TOP'),
        ('ALIGN', (0,0), (-1,0), 'CENTER'),
        ('LEFTPADDING', (0,0), (-1,-1), 5),
        ('RIGHTPADDING', (0,0), (-1,-1), 5),
        ('TOPPADDING', (0,0), (-1,-1), 4),
        ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ]))
    story.append(drug_t)
    story.append(Spacer(1, 0.2*cm))

    story.append(info_box([
        "<b>Key Pathophysiological Reason:</b> Dengue causes <b>thrombocytopenia</b> (platelet count may fall to "
        "&lt;20,000/mm³), <b>increased vascular permeability</b>, and <b>coagulation abnormalities</b>. "
        "NSAIDs and aspirin further inhibit platelet function and damage the gastric mucosa — converting a manageable "
        "thrombocytopenic state into potentially <b>life-threatening haemorrhage</b>."
    ]))
    story.append(Spacer(1, 0.3*cm))

    # ══════════════════════════════════════════════════════════════════
    # 7. LABORATORY MONITORING
    # ══════════════════════════════════════════════════════════════════
    story.append(section_header("7.  Laboratory Investigations & Monitoring"))
    story.append(Spacer(1, 0.15*cm))

    lab_data = [
        [Paragraph("<b>Investigation</b>", TH), Paragraph("<b>Significance</b>", TH), Paragraph("<b>Frequency</b>", TH)],
        [Paragraph("FBC (CBC)\nHaematocrit", TD_SM), Paragraph("Rising Hct (>20% above baseline) = plasma leakage. Declining Hct in shock = internal bleeding", TD_SM), Paragraph("Daily from Day 3; q4–6h if admitted", TD_SM)],
        [Paragraph("Platelet Count", TD_SM), Paragraph("Rapid decline (especially <100,000) during critical phase indicates progression", TD_SM), Paragraph("Daily; q4–6h if critical", TD_SM)],
        [Paragraph("WBC", TD_SM), Paragraph("Leukopenia typical. Rising WBC during critical phase may indicate severe bleeding", TD_SM), Paragraph("Daily", TD_SM)],
        [Paragraph("LFTs (AST/ALT)", TD_SM), Paragraph("Dengue hepatitis common (~3× ULN). AST/ALT ≥1000 = severe dengue criterion", TD_SM), Paragraph("Baseline; repeat if worsening", TD_SM)],
        [Paragraph("Urea / Creatinine", TD_SM), Paragraph("AKI in up to 13% of severe cases; multifactorial (haemodynamic, haemolysis, rhabdomyolysis)", TD_SM), Paragraph("Baseline; daily in severe cases", TD_SM)],
        [Paragraph("Serology / PCR\nNS1 Antigen", TD_SM), Paragraph("RT-PCR or NS1 Ag: Days 1–10. IgM ELISA: from Day 3–5 (99% positive by Day 10). Combined NS1+IgM: ≥90% sensitivity", TD_SM), Paragraph("Once on admission", TD_SM)],
        [Paragraph("Coagulation\n(PT, aPTT)", TD_SM), Paragraph("Coagulopathy in severe dengue; mandatory before any invasive procedure", TD_SM), Paragraph("If bleeding/shock", TD_SM)],
        [Paragraph("CXR / Ultrasound", TD_SM), Paragraph("Pleural effusion (right-sided), ascites, gall bladder oedema (precedes plasma leakage)", TD_SM), Paragraph("If fluid accumulation suspected", TD_SM)],
    ]
    lab_t = Table(lab_data, colWidths=[3.5*cm, 9.0*cm, 4.2*cm])
    lab_t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,0), TABLE_HEADER),
        ('ROWBACKGROUNDS', (0,1), (-1,-1), [LIGHT_TEAL, WHITE]),
        ('BOX', (0,0), (-1,-1), 0.8, TEAL),
        ('INNERGRID', (0,0), (-1,-1), 0.3, colors.HexColor('#AACCCC')),
        ('VALIGN', (0,0), (-1,-1), 'TOP'),
        ('ALIGN', (0,0), (-1,0), 'CENTER'),
        ('LEFTPADDING', (0,0), (-1,-1), 5),
        ('TOPPADDING', (0,0), (-1,-1), 4),
        ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ]))
    story.append(lab_t)
    story.append(Spacer(1, 0.3*cm))

    # ══════════════════════════════════════════════════════════════════
    # PAGE BREAK
    # ══════════════════════════════════════════════════════════════════
    story.append(PageBreak())

    # ══════════════════════════════════════════════════════════════════
    # 8. COMPLICATIONS
    # ══════════════════════════════════════════════════════════════════
    story.append(section_header("8.  Complications of Dengue"))
    story.append(Spacer(1, 0.15*cm))

    comp_data = [
        [Paragraph("<b>System</b>", TH), Paragraph("<b>Complication</b>", TH), Paragraph("<b>Notes</b>", TH)],
        [Paragraph("Haematological", TD_SM), Paragraph("Thrombocytopenia, DIC, massive haemorrhage", TD_SM), Paragraph("Most common cause of death is profound shock + DIC", TD_SM)],
        [Paragraph("Cardiovascular", TD_SM), Paragraph("Dengue shock syndrome (DSS), myocarditis, bradycardia", TD_SM), Paragraph("Narrow pulse pressure is early shock indicator", TD_SM)],
        [Paragraph("Hepatic", TD_SM), Paragraph("Dengue hepatitis, acute liver failure", TD_SM), Paragraph("AST/ALT ≥1000 = severe dengue; avoid hepatotoxic drugs", TD_SM)],
        [Paragraph("Renal", TD_SM), Paragraph("Acute kidney injury (AKI)", TD_SM), Paragraph("Up to 13% of severe cases; mortality reported ~64% in AKI with dengue", TD_SM)],
        [Paragraph("Neurological", TD_SM), Paragraph("Encephalitis, encephalopathy, ADEM, meningitis", TD_SM), Paragraph("Unusual manifestations; can occur without severe plasma leakage", TD_SM)],
        [Paragraph("Respiratory", TD_SM), Paragraph("Pleural effusion, pulmonary oedema (fluid overload)", TD_SM), Paragraph("Risk especially in recovery phase — avoid fluid overload", TD_SM)],
        [Paragraph("Other", TD_SM), Paragraph("Pancreatitis, haemophagocytic lymphohistiocytosis, cardiomyopathy", TD_SM), Paragraph("Rare but recognised", TD_SM)],
    ]
    comp_t = Table(comp_data, colWidths=[3.5*cm, 5.5*cm, 7.7*cm])
    comp_t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,0), TABLE_HEADER),
        ('ROWBACKGROUNDS', (0,1), (-1,-1), [LIGHT_RED, WHITE]),
        ('BOX', (0,0), (-1,-1), 0.8, RED),
        ('INNERGRID', (0,0), (-1,-1), 0.3, colors.HexColor('#BBBBBB')),
        ('VALIGN', (0,0), (-1,-1), 'TOP'),
        ('ALIGN', (0,0), (-1,0), 'CENTER'),
        ('LEFTPADDING', (0,0), (-1,-1), 5),
        ('TOPPADDING', (0,0), (-1,-1), 4),
        ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ]))
    story.append(comp_t)
    story.append(Spacer(1, 0.3*cm))

    # ══════════════════════════════════════════════════════════════════
    # 9. SPECIAL POPULATIONS
    # ══════════════════════════════════════════════════════════════════
    story.append(section_header("9.  Special Populations & Considerations"))
    story.append(Spacer(1, 0.15*cm))

    sp_data = [
        [Paragraph("<b>Population</b>", TH), Paragraph("<b>Key Considerations</b>", TH)],
        [Paragraph("<b>Children</b>", TD_SM),
         Paragraph("• Febrile convulsions may occur in infants (fever can reach 40–41°C)\n"
                   "• Higher risk of Reye's syndrome with aspirin — strictly avoid\n"
                   "• Shock criteria: pulse pressure ≤20 mmHg is primary indicator", TD_SM)],
        [Paragraph("<b>Pregnancy</b>", TD_SM),
         Paragraph("• Vertical transmission ~20% (higher if maternal dengue near delivery)\n"
                   "• Risk of maternal haemorrhage, preterm labour, fetal distress\n"
                   "• Paracetamol only for fever. Close monitoring mandatory.", TD_SM)],
        [Paragraph("<b>Liver Disease</b>", TD_SM),
         Paragraph("• Dengue hepatitis is common — use lowest effective paracetamol dose\n"
                   "• Watch for acute-on-chronic liver failure in pre-existing liver disease", TD_SM)],
        [Paragraph("<b>Diabetes</b>", TD_SM),
         Paragraph("• Caution with glucose-containing ORS — may worsen hyperglycaemia\n"
                   "• Physiological stress of dengue can destabilise glucose control", TD_SM)],
        [Paragraph("<b>Secondary\nInfection</b>", TD_SM),
         Paragraph("• Second dengue infection with different serotype → higher risk of severe dengue\n"
                   "• Antibody-dependent enhancement (ADE) mechanism", TD_SM)],
    ]
    sp_t = Table(sp_data, colWidths=[3.0*cm, PAGE_W - 2*MARGIN - 3.3*cm])
    sp_t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,0), TABLE_HEADER),
        ('ROWBACKGROUNDS', (0,1), (-1,-1), [LIGHT_TEAL, WHITE]),
        ('BOX', (0,0), (-1,-1), 0.8, TEAL),
        ('INNERGRID', (0,0), (-1,-1), 0.3, colors.HexColor('#AACCCC')),
        ('VALIGN', (0,0), (-1,-1), 'TOP'),
        ('ALIGN', (0,0), (-1,0), 'CENTER'),
        ('LEFTPADDING', (0,0), (-1,-1), 6),
        ('TOPPADDING', (0,0), (-1,-1), 4),
        ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ]))
    story.append(sp_t)
    story.append(Spacer(1, 0.3*cm))

    # ══════════════════════════════════════════════════════════════════
    # 10. DIAGNOSIS QUICK REFERENCE
    # ══════════════════════════════════════════════════════════════════
    story.append(section_header("10.  Rapid Diagnostic Reference"))
    story.append(Spacer(1, 0.15*cm))

    diag_data = [
        [Paragraph("<b>Test</b>", TH), Paragraph("<b>Window</b>", TH), Paragraph("<b>Sensitivity</b>", TH), Paragraph("<b>Notes</b>", TH)],
        [Paragraph("RT-PCR (DENV RNA)", TD_SM), Paragraph("Day 1 – Day 7–10", TD_SM), Paragraph("High (gold standard early)", TD_SM), Paragraph("Specific; also detects serotype", TD_SM)],
        [Paragraph("NS1 Antigen\n(ELISA / RDT)", TD_SM), Paragraph("Day 1 – Day 9", TD_SM), Paragraph("~90% combined with IgM", TD_SM), Paragraph("Useful in first 5 days; serotype-dependent sensitivity", TD_SM)],
        [Paragraph("IgM ELISA", TD_SM), Paragraph("Day 3–5 onwards\n(99% by Day 10)", TD_SM), Paragraph("High after Day 5", TD_SM), Paragraph("May cross-react with Zika, other flaviviruses; IgM persists 2–3 months", TD_SM)],
        [Paragraph("IgG", TD_SM), Paragraph("Secondary infection; elevated for life", TD_SM), Paragraph("Indicative of past infection", TD_SM), Paragraph("4× IgG rise (acute→conv.) = recent infection", TD_SM)],
        [Paragraph("Plaque Reduction\nNeutralization (PRNT)", TD_SM), Paragraph("Convalescent", TD_SM), Paragraph("High specificity", TD_SM), Paragraph("Verifies positive IgM; research/reference labs", TD_SM)],
    ]
    diag_t = Table(diag_data, colWidths=[3.5*cm, 3.5*cm, 3.5*cm, 6.2*cm])
    diag_t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,0), TABLE_HEADER),
        ('ROWBACKGROUNDS', (0,1), (-1,-1), [LIGHT_TEAL, WHITE]),
        ('BOX', (0,0), (-1,-1), 0.8, TEAL),
        ('INNERGRID', (0,0), (-1,-1), 0.3, colors.HexColor('#AACCCC')),
        ('VALIGN', (0,0), (-1,-1), 'TOP'),
        ('ALIGN', (0,0), (-1,0), 'CENTER'),
        ('LEFTPADDING', (0,0), (-1,-1), 5),
        ('TOPPADDING', (0,0), (-1,-1), 4),
        ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ]))
    story.append(diag_t)
    story.append(Spacer(1, 0.3*cm))

    # ══════════════════════════════════════════════════════════════════
    # 11. VACCINATION
    # ══════════════════════════════════════════════════════════════════
    story.append(section_header("11.  Prevention & Vaccination"))
    story.append(Spacer(1, 0.15*cm))

    vax_items = [
        "<b>Dengvaxia (CYD-TDV):</b> Recombinant live attenuated tetravalent vaccine. 3-dose schedule at 0, 6, 12 months. "
        "Approved for ages 9–45 years in endemic areas. ~80% efficacy in children ages 4–16 against infection; "
        "~90% protection against hospitalisation. <b>Note:</b> Only for seropositive individuals — may increase risk in "
        "seronegative recipients.",
        "<b>Wolbachia mosquito programme:</b> Infecting A. aegypti with Wolbachia pipientis reduces dengue transmission by ~75% in endemic areas.",
        "<b>Vector control:</b> Eliminate standing water, use insecticide-treated nets, protective clothing, DEET repellents.",
        "<b>Surveillance:</b> Early notification to public health authorities in endemic settings.",
    ]
    story.append(info_box(vax_items, bg=LIGHT_TEAL, border=TEAL))
    story.append(Spacer(1, 0.3*cm))

    # ══════════════════════════════════════════════════════════════════
    # 12. QUICK CLINICAL SUMMARY BOX
    # ══════════════════════════════════════════════════════════════════
    story.append(section_header("12.  At-a-Glance Clinical Summary", color=DARK_TEAL))
    story.append(Spacer(1, 0.15*cm))

    sum_left = [
        [Paragraph("<b>DO</b>", TH)],
        [Paragraph("✔ Give paracetamol (≥6 hr interval, standard dose)", TD_SM)],
        [Paragraph("✔ Encourage oral fluids (ORS, fruit juice)", TD_SM)],
        [Paragraph("✔ Monitor Hct + platelets from Day 3 daily", TD_SM)],
        [Paragraph("✔ Tepid sponging for fever", TD_SM)],
        [Paragraph("✔ Admit if warning signs present", TD_SM)],
        [Paragraph("✔ Serial Hct guides IV fluid therapy", TD_SM)],
        [Paragraph("✔ Give O₂ in shock", TD_SM)],
        [Paragraph("✔ Use crystalloid first; colloid if Hct persists high", TD_SM)],
    ]
    sum_right = [
        [Paragraph("<b>DO NOT</b>", TH)],
        [Paragraph("✘ NO aspirin / NSAIDs (ibuprofen, diclofenac, etc.)", TD_SM)],
        [Paragraph("✘ NO steroids (not beneficial; may cause massive bleeding)", TD_SM)],
        [Paragraph("✘ NO prophylactic platelet transfusion", TD_SM)],
        [Paragraph("✘ NO metamizole / dipyrone", TD_SM)],
        [Paragraph("✘ Avoid excess IV fluids in recovery phase", TD_SM)],
        [Paragraph("✘ Do not miss narrowing pulse pressure (early shock)", TD_SM)],
        [Paragraph("✘ Do not reassure if temp drops without improvement", TD_SM)],
        [Paragraph("✘ Do not overdose paracetamol (hepatitis risk)", TD_SM)],
    ]

    t_do = Table(sum_left, colWidths=[8.0*cm])
    t_do.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,0), GREEN),
        ('BACKGROUND', (0,1), (-1,-1), LIGHT_GREEN),
        ('BOX', (0,0), (-1,-1), 1, GREEN),
        ('INNERGRID', (0,0), (-1,-1), 0.3, colors.HexColor('#BBDDBB')),
        ('LEFTPADDING', (0,0), (-1,-1), 7),
        ('TOPPADDING', (0,0), (-1,-1), 3),
        ('BOTTOMPADDING', (0,0), (-1,-1), 3),
        ('ALIGN', (0,0), (-1,0), 'CENTER'),
    ]))
    t_dont = Table(sum_right, colWidths=[8.3*cm])
    t_dont.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,0), RED),
        ('BACKGROUND', (0,1), (-1,-1), LIGHT_RED),
        ('BOX', (0,0), (-1,-1), 1, RED),
        ('INNERGRID', (0,0), (-1,-1), 0.3, colors.HexColor('#DDBBBB')),
        ('LEFTPADDING', (0,0), (-1,-1), 7),
        ('TOPPADDING', (0,0), (-1,-1), 3),
        ('BOTTOMPADDING', (0,0), (-1,-1), 3),
        ('ALIGN', (0,0), (-1,0), 'CENTER'),
    ]))

    summary_outer = Table([[t_do, Spacer(0.3*cm, 1), t_dont]],
                           colWidths=[8.0*cm, 0.3*cm, 8.3*cm])
    summary_outer.setStyle(TableStyle([
        ('VALIGN', (0,0), (-1,-1), 'TOP'),
        ('LEFTPADDING', (0,0), (-1,-1), 0),
        ('RIGHTPADDING', (0,0), (-1,-1), 0),
    ]))
    story.append(summary_outer)
    story.append(Spacer(1, 0.25*cm))

    # ── References footer
    story.append(HRFlowable(width="100%", thickness=0.5, color=TEAL))
    story.append(Spacer(1, 0.1*cm))
    refs = Paragraph(
        "<b>References:</b> Park's Textbook of Preventive &amp; Social Medicine (25th ed.) | "
        "Goldman-Cecil Medicine, International Edition | Red Book 2021 (AAP) | "
        "Harrison's Principles of Internal Medicine 22E (2025) | Rosen's Emergency Medicine | "
        "WHO Dengue Guidelines 2009 (revised) | Andrews' Diseases of the Skin",
        ParagraphStyle('refs', fontSize=7, textColor=GRAY, leading=10)
    )
    story.append(refs)

    # ── Build ──
    doc.build(story, onFirstPage=header_footer, onLaterPages=header_footer)
    print(f"PDF saved to: {output_path}")


if __name__ == "__main__":
    build_pdf("/tmp/workspace/dengue-pdf/Dengue_Clinical_Reference.pdf")
Running Command

cd /tmp/workspace/dengue-pdf && python build_dengue_pdf.py 2>&1

Running Command

ls -lh /tmp/workspace/dengue-pdf/Dengue_Clinical_Reference.pdf

Running Command

python3 -c "from pypdf import PdfReader; r = PdfReader('/tmp/workspace/dengue-pdf/Dengue_Clinical_Reference.pdf'); print(f'Pages: {len(r.pages)}'); print(f'Title: {r.metadata.title}')"

Your clinical reference PDF is ready:

Dengue Clinical Reference

PDF Document · PDF


What's inside (6 pages, A4, print-ready):
SectionContent
1. Disease OverviewPathogen, vector, incubation, viremia window, transmission, mortality
2. WHO 2009 Classification3-tier table: Without Warning Signs / With Warning Signs / Severe Dengue — criteria, labs, actions
3. Three Clinical PhasesFebrile → Critical → Recovery phase details in colour-coded layout
4. Warning SignsRed-flag box listing all 10 WHO warning signs + DSS pulse pressure criteria
5. Management ProtocolsOutpatient (5A), Inpatient with warning signs (5B), ICU/DSS (5C) — step-by-step
6. Drug SafetyFull table: Paracetamol (recommended) vs Aspirin/NSAIDs/Steroids/Metamizole (contraindicated) with mechanisms
7. Lab MonitoringWhich tests, their significance, and frequency
8. ComplicationsBy organ system
9. Special PopulationsChildren, pregnancy, liver disease, diabetes, secondary infection
10. DiagnosticsRT-PCR, NS1, IgM/IgG windows and sensitivities
11. PreventionDengvaxia vaccine, Wolbachia programme, vector control
12. At-a-Glance SummaryDO / DO NOT two-column quick reference
Content is sourced from Park's Textbook, Goldman-Cecil Medicine, Red Book 2021 (AAP), Harrison's 22E, and WHO 2009 dengue guidelines.
This is a shared conversation. Sign in to Orris to start your own chat.