Dengue thyo 6 ipd ma 6 to ky tab inj apva kya combination sathe ketla time mate rutin banavi aapo
dengue fever IPD inpatient treatment protocol IV fluids paracetamol injection schedule WHO 2024
| Group | Condition | Treatment |
|---|---|---|
| Group A | Warning signs nathi, oral fluid le chhe | Ghar |
| Group B | Hospital admit - warning signs hova/na hova | IPD - Oral + IV |
| Group C | Shock, severe bleeding, organ failure | Emergency ICU |
| Injection | Dose | Frequency | Duration | Note |
|---|---|---|---|---|
| Inj. Paracetamol (Perfalgan) | 1g IV (Adult) / 15mg/kg (Child) | Har 6 kak (if oral nahi le shakto) | Jyare sudhi fever > 38.5Β°C | First choice for fever |
| Inj. Pantoprazole | 40 mg IV | Din ma 1 vaaro (subah khali pet) | 6 din | Gastric protection |
| Inj. Ondansetron | 4-8 mg IV | Har 8 kak (prn - vomiting ma) | Jyare sudhi vomiting | Anti-emetic |
| Inj. Vitamin C (optional) | 500mg-1g IV | Din ma 1 vaaro | 5-6 din | Antioxidant, vas permeability ghataade |
| Tablet | Dose | Frequency | Note |
|---|---|---|---|
| Tab. Paracetamol 500mg | 1-2 tab | Har 6 kak | NSAIDs (Aspirin, Ibuprofen) BILKUL NAHI |
| Tab. Pantoprazole 40mg | 1 tab | Subah khali pet | Gastric cover |
| Tab. Domperidone / Ondansetron | As needed | Vomiting mate | prn |
| ORS / Oral fluids | 2-3 L/day | Continuously | Critical - dehydration avoid karo |
| Time | Fluid | Rate |
|---|---|---|
| 0-2 kak | NS (0.9% NaCl) ya Ringer's Lactate | 5-7 mL/kg/hour |
| 2-6 kak | NS / RL | 3-5 mL/kg/hour |
| 6-12 kak | NS / RL | 2-3 mL/kg/hour |
| 12-48 kak | Oral fluid bane to wapas |
Adult approximate: Shu 60 kg patient mate ~
- 1st 2 hr: 300-420 mL/hr
- Pachhi 2-4 hr: 180-300 mL/hr
- Pachhi 2-3 mL/kg/hr jyare sudhi oral na le
| Condition | Action |
|---|---|
| Platelets > 20,000 - no bleeding | NAHI aapva (just monitor) |
| Platelets 10,000-20,000 - no bleeding | Consider only in high-risk |
| Platelets < 10,000 | Aapva vichar karo |
| Active bleeding (any level) | Tatkal transfuse karo |
Routine platelet transfusion dengue ma recommended nathi - WHO guidelines
DENGUE IPD ORDER SHEET
======================
Day 1-6:
INJECTIONS:
1. Inj. Paracetamol 1g IV in 100 mL NS (drip) - 6-6 kaak (fever >38.5Β°C)
OR Tab. Paracetamol 500mg x 2 - 6-6 kaak (jyare oral tolerate thay)
2. Inj. Pantoprazole 40mg IV - OD (subah) before food
3. Inj. Ondansetron 4mg IV - TDS prn (vomiting ma)
IV FLUIDS:
- Inj. Ringer's Lactate / NS 500mL
Day 3-6 (critical phase): 7 mL/kg/hr β 5 β 3 β 2 mL/kg/hr
(Hematocrit monitor karo - har 4-6 kak)
MONITORING (har 4-6 kak):
- BP, Pulse, Temperature, Urine output
- Daily CBC (platelets + HCT)
- Hematocrit rise > 20% = fluid badhaavo
STRICTLY AVOID:
β Aspirin / Ibuprofen / Diclofenac
β Antibiotics (viral chhe - jaroor nahi)
β Steroids (routine use nahi)
β IV fluids excess (fluid overload dangerous)
| Test | Frequency |
|---|---|
| CBC (Platelet + WBC + HCT) | Din ma 1-2 vaaro |
| BP + Pulse + Temperature | Har 4-6 kak |
| Urine output | 8-kak ma 1 vaaro |
| Fluid balance (input/output) | Daily |
| Liver function (if severe) | Day 1 + 3 |
Create a printable dengue IPD order template (PDF) for your hospital
ls -la /home/daytona/workspace/ 2>/dev/null || echo "workspace empty or not found"
mkdir -p /home/daytona/workspace/dengue-ipd && python3 -c "from reportlab.lib.pagesizes import A4; print('reportlab ok')" && echo "ready"
~/dengue-ipd/generate_pdf.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import mm, cm
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.platypus import (SimpleDocTemplate, Paragraph, Spacer, Table,
TableStyle, HRFlowable, KeepTogether)
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_RIGHT
from reportlab.platypus import Flowable
import os
OUTPUT = "/home/daytona/workspace/dengue-ipd/Dengue_IPD_Order_Template.pdf"
# ββ Colours ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
RED = colors.HexColor("#C0392B")
DARKRED = colors.HexColor("#922B21")
ORANGE = colors.HexColor("#E67E22")
YELLOW = colors.HexColor("#F9E79F")
LIGHTYEL = colors.HexColor("#FEF9E7")
BLUE = colors.HexColor("#1A5276")
LIGHTBLUE = colors.HexColor("#D6EAF8")
GREEN = colors.HexColor("#1E8449")
LIGHTGRN = colors.HexColor("#D5F5E3")
GREY = colors.HexColor("#F2F3F4")
MIDGREY = colors.HexColor("#BDC3C7")
WHITE = colors.white
BLACK = colors.black
doc = SimpleDocTemplate(
OUTPUT,
pagesize=A4,
topMargin=10*mm, bottomMargin=10*mm,
leftMargin=12*mm, rightMargin=12*mm,
title="Dengue IPD Order Template",
)
W = A4[0] - 24*mm # usable width
styles = getSampleStyleSheet()
def style(name, **kw):
s = ParagraphStyle(name, **kw)
return s
hdr_title = style("HdrTitle", fontSize=16, fontName="Helvetica-Bold",
textColor=WHITE, alignment=TA_CENTER, spaceAfter=0)
hdr_sub = style("HdrSub", fontSize=9, fontName="Helvetica",
textColor=WHITE, alignment=TA_CENTER, spaceAfter=0)
sec_hdr = style("SecHdr", fontSize=9, fontName="Helvetica-Bold",
textColor=WHITE, alignment=TA_LEFT, spaceAfter=0)
normal = style("Norm", fontSize=8, fontName="Helvetica",
textColor=BLACK, leading=11)
bold = style("Bold", fontSize=8, fontName="Helvetica-Bold",
textColor=BLACK, leading=11)
red_bold = style("RedBold", fontSize=8, fontName="Helvetica-Bold",
textColor=RED, leading=11)
small = style("Small", fontSize=7, fontName="Helvetica",
textColor=colors.HexColor("#555555"), leading=10)
small_b = style("SmallB", fontSize=7, fontName="Helvetica-Bold",
textColor=BLACK, leading=10)
center_n = style("CenN", fontSize=8, fontName="Helvetica",
alignment=TA_CENTER, leading=11)
center_b = style("CenB", fontSize=8, fontName="Helvetica-Bold",
alignment=TA_CENTER, leading=11)
warn = style("Warn", fontSize=8, fontName="Helvetica-Bold",
textColor=RED, alignment=TA_CENTER)
# ββ Helper: section-header row βββββββββββββββββββββββββββββββββββββββββββββββββ
def sec_row(text, bg=BLUE, cols=1):
cell = Paragraph(text, sec_hdr)
t = Table([[cell]], colWidths=[W])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), bg),
("TOPPADDING", (0,0), (-1,-1), 3),
("BOTTOMPADDING",(0,0),(-1,-1), 3),
("LEFTPADDING", (0,0), (-1,-1), 6),
]))
return t
def spacer(h=3):
return Spacer(1, h*mm)
def checkbox(label, indent=0):
pad = "\u00a0" * indent
return Paragraph(f"{pad}\u25a1\u00a0 {label}", normal)
def line_field(label, w_label, w_field):
"""Returns a 2-col table: label | underline box"""
t = Table([[Paragraph(label, bold), ""]], colWidths=[w_label, w_field])
t.setStyle(TableStyle([
("LINEBELOW", (1,0),(1,0), 0.5, MIDGREY),
("BOTTOMPADDING",(0,0),(-1,-1),2),
("TOPPADDING", (0,0),(-1,-1),2),
]))
return t
story = []
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# HEADER
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
header_data = [[
Paragraph("π₯ DENGUE FEVER β IPD ORDER SHEET", hdr_title),
Paragraph("Based on WHO Dengue Management Guidelines 2024", hdr_sub),
]]
# Stack vertically
hdr_table = Table([
[Paragraph("π₯ DENGUE FEVER β IPD ORDER SHEET", hdr_title)],
[Paragraph("Based on WHO Dengue Management Guidelines | Revised 2024", hdr_sub)],
], colWidths=[W])
hdr_table.setStyle(TableStyle([
("BACKGROUND", (0,0),(-1,-1), DARKRED),
("TOPPADDING", (0,0),(-1,-1), 6),
("BOTTOMPADDING",(0,0),(-1,-1), 6),
("LEFTPADDING", (0,0),(-1,-1), 8),
("RIGHTPADDING",(0,0),(-1,-1), 8),
("ROUNDEDCORNERS", [4]),
]))
story.append(hdr_table)
story.append(spacer(3))
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# PATIENT INFO
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
story.append(sec_row(" PATIENT INFORMATION", bg=BLUE))
pi_data = [
[Paragraph("Patient Name:", bold), "", Paragraph("IP No.:", bold), "",
Paragraph("Date of Admission:", bold), ""],
[Paragraph("Age:", bold), "", Paragraph("Sex:", bold), "",
Paragraph("Weight (kg):", bold), ""],
[Paragraph("Ward / Bed No.:", bold), "", Paragraph("Consultant:", bold), "",
Paragraph("Date of Fever Onset:", bold), ""],
]
pi_col = [W*0.13, W*0.2, W*0.08, W*0.12, W*0.17, W*0.3]
pi_table = Table(pi_data, colWidths=pi_col)
pi_table.setStyle(TableStyle([
("BACKGROUND", (0,0),(-1,-1), GREY),
("LINEBELOW", (1,0),(1,-1), 0.5, MIDGREY),
("LINEBELOW", (3,0),(3,-1), 0.5, MIDGREY),
("LINEBELOW", (5,0),(5,-1), 0.5, MIDGREY),
("TOPPADDING", (0,0),(-1,-1), 4),
("BOTTOMPADDING",(0,0),(-1,-1), 4),
("LEFTPADDING", (0,0),(-1,-1), 4),
]))
story.append(pi_table)
story.append(spacer(2))
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# DENGUE CLASSIFICATION
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
story.append(sec_row(" DENGUE CLASSIFICATION (tick one)", bg=ORANGE))
cls_data = [
[
Paragraph("\u25a1 GROUP A β Dengue without warning signs\n(Manage at home / OPD)", normal),
Paragraph("\u25a1 GROUP B β Dengue with / without warning signs\n(Hospital admission)", normal),
Paragraph("\u25a1 GROUP C β Severe Dengue\n(ICU / Emergency management)", normal),
]
]
cls_table = Table(cls_data, colWidths=[W/3]*3)
cls_table.setStyle(TableStyle([
("BACKGROUND", (0,0),(0,-1), LIGHTGRN),
("BACKGROUND", (1,0),(1,-1), LIGHTBLUE),
("BACKGROUND", (2,0),(2,-1), YELLOW),
("BOX", (0,0),(-1,-1), 0.5, MIDGREY),
("INNERGRID", (0,0),(-1,-1), 0.5, MIDGREY),
("TOPPADDING", (0,0),(-1,-1), 5),
("BOTTOMPADDING",(0,0),(-1,-1), 5),
("LEFTPADDING", (0,0),(-1,-1), 6),
]))
story.append(cls_table)
story.append(spacer(2))
# Warning signs checklist
story.append(sec_row(" WARNING SIGNS β Check all that apply", bg=colors.HexColor("#7D6608")))
ws_data = [
[checkbox("Abdominal pain / tenderness"),
checkbox("Persistent vomiting ( >3 episodes / 24 hrs)"),
checkbox("Clinical fluid accumulation (ascites / pleural effusion)")],
[checkbox("Mucosal bleed (gums / nose)"),
checkbox("Lethargy / restlessness"),
checkbox("Liver enlargement > 2 cm")],
[checkbox("Rapid BP drop / narrow pulse pressure"),
checkbox("Rising HCT + rapid platelet fall"),
checkbox("Reduced urine output < 0.5 mL/kg/hr")],
]
ws_table = Table(ws_data, colWidths=[W/3]*3)
ws_table.setStyle(TableStyle([
("BACKGROUND", (0,0),(-1,-1), YELLOW),
("TOPPADDING", (0,0),(-1,-1), 3),
("BOTTOMPADDING",(0,0),(-1,-1), 3),
("LEFTPADDING", (0,0),(-1,-1), 4),
]))
story.append(ws_table)
story.append(spacer(2))
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# INVESTIGATIONS
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
story.append(sec_row(" INVESTIGATIONS", bg=BLUE))
inv_data = [
[Paragraph("Test", bold), Paragraph("Day 1", center_b), Paragraph("Day 2", center_b),
Paragraph("Day 3", center_b), Paragraph("Day 4", center_b),
Paragraph("Day 5", center_b), Paragraph("Day 6", center_b)],
[Paragraph("CBC (Platelet, WBC, HCT)", normal),"","","","","",""],
[Paragraph("NS1 Antigen (Day 1β5)", normal),"","","","","",""],
[Paragraph("Dengue IgM / IgG", normal),"","","","","",""],
[Paragraph("Liver Function Test (LFT)", normal),"","","","","",""],
[Paragraph("Serum Electrolytes", normal),"","","","","",""],
[Paragraph("Blood Urea / Creatinine", normal),"","","","","",""],
[Paragraph("Blood Sugar (RBS)", normal),"","","","","",""],
[Paragraph("Urine Routine & Microscopy", normal),"","","","","",""],
[Paragraph("Chest X-Ray (if effusion suspected)", normal),"","","","","",""],
[Paragraph("USG Abdomen (if ascites/hepatomegaly)", normal),"","","","","",""],
]
inv_col = [W*0.38, W*0.1, W*0.1, W*0.1, W*0.1, W*0.1, W*0.1]
inv_table = Table(inv_data, colWidths=inv_col, rowHeights=[14]*len(inv_data))
inv_style = TableStyle([
("BACKGROUND", (0,0),(-1,0), BLUE),
("TEXTCOLOR", (0,0),(-1,0), WHITE),
("FONTNAME", (0,0),(-1,0), "Helvetica-Bold"),
("FONTSIZE", (0,0),(-1,-1), 7.5),
("ALIGN", (1,0),(-1,-1), "CENTER"),
("VALIGN", (0,0),(-1,-1), "MIDDLE"),
("GRID", (0,0),(-1,-1), 0.4, MIDGREY),
("ROWBACKGROUNDS", (0,1),(-1,-1), [WHITE, GREY]),
("TOPPADDING", (0,0),(-1,-1), 2),
("BOTTOMPADDING",(0,0),(-1,-1), 2),
("LEFTPADDING", (0,0),(-1,-1), 4),
])
inv_table.setStyle(inv_style)
story.append(inv_table)
story.append(spacer(2))
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# MEDICATIONS
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
story.append(sec_row(" MEDICATIONS (β = ordered | cross out if not required)", bg=GREEN))
# Sub-header: Antipyretic
med_hdr1 = Table([[Paragraph(" ANTIPYRETIC / ANALGESIC", style("mh", fontSize=7.5,
fontName="Helvetica-Bold", textColor=WHITE))]],
colWidths=[W])
med_hdr1.setStyle(TableStyle([("BACKGROUND",(0,0),(-1,-1), colors.HexColor("#1A5276")),
("TOPPADDING",(0,0),(-1,-1),2),("BOTTOMPADDING",(0,0),(-1,-1),2),
("LEFTPADDING",(0,0),(-1,-1),6)]))
story.append(med_hdr1)
med_cols = [W*0.04, W*0.29, W*0.14, W*0.12, W*0.13, W*0.28]
med_hdr_row = [Paragraph("", center_b),
Paragraph("Drug", center_b), Paragraph("Dose", center_b),
Paragraph("Route", center_b), Paragraph("Frequency", center_b),
Paragraph("Special Instructions", center_b)]
def med_row(drug, dose, route, freq, note, bg=WHITE):
return [Paragraph("\u25a1", center_n),
Paragraph(drug, normal), Paragraph(dose, center_n),
Paragraph(route, center_n), Paragraph(freq, center_n),
Paragraph(note, small)]
meds_antipyretic = [
med_hdr_row,
med_row("Tab. Paracetamol 500 mg", "500 mg β 1 g", "Oral", "Q6H (prn fever)", "Max 4 g/day | Give if temp >38.5Β°C", GREY),
med_row("Inj. Paracetamol (Perfalgan) 1 g", "1 g in 100 mL NS", "IV drip", "Q6H (prn)", "If oral not tolerated | over 15 min"),
med_row("Inj. Pantoprazole 40 mg", "40 mg", "IV", "OD (morning)", "Before food | Gastric protection", GREY),
med_row("Tab. Pantoprazole 40 mg", "40 mg", "Oral", "OD", "Switch when oral tolerated"),
]
m1 = Table(meds_antipyretic, colWidths=med_cols, rowHeights=[14]*len(meds_antipyretic))
m1.setStyle(TableStyle([
("BACKGROUND",(0,0),(-1,0), LIGHTBLUE),
("FONTNAME", (0,0),(-1,0), "Helvetica-Bold"),
("FONTSIZE", (0,0),(-1,-1), 7.5),
("ALIGN", (0,0),(-1,-1), "CENTER"),
("ALIGN", (1,0),(1,-1), "LEFT"),
("ALIGN", (5,0),(5,-1), "LEFT"),
("VALIGN", (0,0),(-1,-1), "MIDDLE"),
("GRID", (0,0),(-1,-1), 0.4, MIDGREY),
("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE,GREY]),
("LEFTPADDING",(1,0),(1,-1), 4),
("LEFTPADDING",(5,0),(5,-1), 4),
("TOPPADDING", (0,0),(-1,-1),2),("BOTTOMPADDING",(0,0),(-1,-1),2),
]))
story.append(m1)
# Anti-emetic
med_hdr2 = Table([[Paragraph(" ANTI-EMETIC", style("mh2", fontSize=7.5,
fontName="Helvetica-Bold", textColor=WHITE))]],
colWidths=[W])
med_hdr2.setStyle(TableStyle([("BACKGROUND",(0,0),(-1,-1), colors.HexColor("#145A32")),
("TOPPADDING",(0,0),(-1,-1),2),("BOTTOMPADDING",(0,0),(-1,-1),2),
("LEFTPADDING",(0,0),(-1,-1),6)]))
story.append(med_hdr2)
meds_antiemetic = [
med_row("Inj. Ondansetron 4 mg", "4β8 mg", "IV slow", "Q8H (prn vomiting)", "Over 2β5 min | Children: 0.1 mg/kg", GREY),
med_row("Tab. Domperidone 10 mg", "10 mg", "Oral", "TDS (before meals)", "Switch when oral tolerated"),
]
m2 = Table(meds_antiemetic, colWidths=med_cols, rowHeights=[14]*len(meds_antiemetic))
m2.setStyle(TableStyle([
("FONTSIZE",(0,0),(-1,-1),7.5),
("ALIGN", (0,0),(-1,-1),"CENTER"),
("ALIGN", (1,0),(1,-1),"LEFT"),
("ALIGN", (5,0),(5,-1),"LEFT"),
("VALIGN", (0,0),(-1,-1),"MIDDLE"),
("GRID", (0,0),(-1,-1),0.4,MIDGREY),
("ROWBACKGROUNDS",(0,0),(-1,-1),[WHITE,GREY]),
("LEFTPADDING",(1,0),(1,-1),4),
("LEFTPADDING",(5,0),(5,-1),4),
("TOPPADDING",(0,0),(-1,-1),2),("BOTTOMPADDING",(0,0),(-1,-1),2),
]))
story.append(m2)
# Optional add-ons
med_hdr3 = Table([[Paragraph(" SUPPORTIVE / OPTIONAL", style("mh3", fontSize=7.5,
fontName="Helvetica-Bold", textColor=WHITE))]],
colWidths=[W])
med_hdr3.setStyle(TableStyle([("BACKGROUND",(0,0),(-1,-1), colors.HexColor("#4A235A")),
("TOPPADDING",(0,0),(-1,-1),2),("BOTTOMPADDING",(0,0),(-1,-1),2),
("LEFTPADDING",(0,0),(-1,-1),6)]))
story.append(med_hdr3)
meds_supp = [
med_row("Inj. Vitamin C (Ascorbic Acid)", "500 mgβ1 g", "IV", "OD", "In 100 mL NS over 30 min | Optional", GREY),
med_row("Tab. Vitamin C 500 mg", "500 mg", "Oral", "OD", "Alternative to IV Vit C"),
med_row("Inj. Calcium Gluconate 10%", "10 mL", "IV slow","BD (if cramps)", "Dilute in 50 mL NS | For muscle cramps", GREY),
med_row("Inj. Furosemide 40 mg", "40 mg", "IV", "Prn", "ONLY if fluid overload β not routine"),
]
m3 = Table(meds_supp, colWidths=med_cols, rowHeights=[14]*len(meds_supp))
m3.setStyle(TableStyle([
("FONTSIZE",(0,0),(-1,-1),7.5),
("ALIGN", (0,0),(-1,-1),"CENTER"),
("ALIGN", (1,0),(1,-1),"LEFT"),
("ALIGN", (5,0),(5,-1),"LEFT"),
("VALIGN", (0,0),(-1,-1),"MIDDLE"),
("GRID", (0,0),(-1,-1),0.4,MIDGREY),
("ROWBACKGROUNDS",(0,0),(-1,-1),[WHITE,GREY]),
("LEFTPADDING",(1,0),(1,-1),4),
("LEFTPADDING",(5,0),(5,-1),4),
("TOPPADDING",(0,0),(-1,-1),2),("BOTTOMPADDING",(0,0),(-1,-1),2),
]))
story.append(m3)
story.append(spacer(2))
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# IV FLUID PROTOCOL (2-column layout)
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
story.append(sec_row(" IV FLUID PROTOCOL (Critical Phase: Day 3β6)", bg=colors.HexColor("#1A5276")))
fl_left_data = [
[Paragraph("GROUP B β Without Warning Signs", style("flhd", fontSize=7.5,
fontName="Helvetica-Bold", textColor=WHITE, alignment=TA_CENTER))],
[Paragraph("Oral fluids preferred. IV only if vomiting:", normal)],
[Paragraph("β’ NS 0.9% or Ringer's Lactate", normal)],
[Paragraph("β’ Maintenance rate: 1.5β2 mL/kg/hr", normal)],
[Paragraph("β’ Monitor HCT every 6β8 hrs", normal)],
[Paragraph("β’ Switch to oral when tolerated", normal)],
[Paragraph("IV Fluid selection:", small_b)],
[Paragraph("β 0.9% Normal Saline (NS) β Ringer's Lactate (RL)", small)],
]
fl_right_data = [
[Paragraph("GROUP B β With Warning Signs", style("flhd2", fontSize=7.5,
fontName="Helvetica-Bold", textColor=WHITE, alignment=TA_CENTER))],
[Paragraph("Isotonic crystalloid (NS / RL):", normal)],
[Paragraph("β’ 0β2 hrs: 5β7 mL/kg/hr", normal)],
[Paragraph("β’ 2β6 hrs: 3β5 mL/kg/hr", normal)],
[Paragraph("β’ 6β12 hrs: 2β3 mL/kg/hr", normal)],
[Paragraph("β’ Check HCT before & after each phase", normal)],
[Paragraph("β’ If HCT rising >10% β increase rate", small)],
[Paragraph("β’ If HCT falling + clinical improvement β taper", small)],
]
fl_left = Table(fl_left_data, colWidths=[(W/2)-4])
fl_right = Table(fl_right_data, colWidths=[(W/2)-4])
for t, bg in [(fl_left, LIGHTGRN), (fl_right, LIGHTBLUE)]:
t.setStyle(TableStyle([
("BACKGROUND",(0,0),(-1,0), GREEN if t is fl_left else BLUE),
("TEXTCOLOR", (0,0),(-1,0), WHITE),
("BACKGROUND",(0,1),(-1,-1), bg),
("TOPPADDING", (0,0),(-1,-1),3),
("BOTTOMPADDING",(0,0),(-1,-1),3),
("LEFTPADDING",(0,0),(-1,-1),5),
("BOX",(0,0),(-1,-1),0.5,MIDGREY),
("FONTSIZE",(0,0),(-1,-1),7.5),
]))
fl_outer = Table([[fl_left, fl_right]], colWidths=[(W/2)-2, (W/2)-2],
hAlign='CENTER')
fl_outer.setStyle(TableStyle([
("LEFTPADDING",(0,0),(-1,-1),0), ("RIGHTPADDING",(0,0),(-1,-1),0),
("TOPPADDING",(0,0),(-1,-1),0), ("BOTTOMPADDING",(0,0),(-1,-1),0),
("ALIGN",(0,0),(-1,-1),"LEFT"),
]))
story.append(fl_outer)
story.append(spacer(2))
# Shock / Group C box
story.append(sec_row(" GROUP C β SEVERE DENGUE / SHOCK (Compensated & Uncompensated)", bg=RED))
gc_data = [
[Paragraph("Compensated Shock (narrow pulse pressure β€20 mmHg / cold extremities):", bold),
Paragraph("Uncompensated Shock (hypotension):", bold)],
[Paragraph("β’ 1st bolus: NS/RL 10 mL/kg IV over 15β30 min β reassess\n"
"β’ Improvement β reduce to 5β7 mL/kg/hr β 3β5 β 2β3 over 6β12 hrs\n"
"β’ No improvement β 2nd bolus 10 mL/kg IV β reassess\n"
"β’ HCT rising + no improvement β consider colloid (Dextran 40)", normal),
Paragraph("β’ 1st bolus: NS/RL 20 mL/kg IV over 15β30 min β reassess\n"
"β’ Repeat up to 3 boluses (20 mL/kg each) if persistent shock\n"
"β’ Check HCT: if falling β consider blood transfusion (fresh whole blood / PRBC)\n"
"β’ HCT stable/rising β colloid (Dextran 40) 10 mL/kg/hr", normal)],
]
gc_t = Table(gc_data, colWidths=[W/2, W/2])
gc_t.setStyle(TableStyle([
("BACKGROUND",(0,0),(-1,0), YELLOW),
("FONTNAME", (0,0),(-1,0), "Helvetica-Bold"),
("BACKGROUND",(0,1),(-1,1), colors.HexColor("#FDEDEC")),
("GRID", (0,0),(-1,-1), 0.4, MIDGREY),
("FONTSIZE", (0,0),(-1,-1), 7.5),
("TOPPADDING",(0,0),(-1,-1), 3),("BOTTOMPADDING",(0,0),(-1,-1),3),
("LEFTPADDING",(0,0),(-1,-1),4),
("VALIGN", (0,0),(-1,-1),"TOP"),
]))
story.append(gc_t)
story.append(spacer(2))
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# PLATELET TRANSFUSION
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
story.append(sec_row(" PLATELET TRANSFUSION GUIDELINES (WHO 2024)", bg=colors.HexColor("#7B241C")))
plt_data = [
[Paragraph("Platelet Count", bold), Paragraph("Clinical Condition", bold),
Paragraph("Action", bold), Paragraph("Ordered (β)", center_b)],
[Paragraph("> 50,000 /Β΅L", normal), Paragraph("No bleeding", normal),
Paragraph("No transfusion β monitor", normal), ""],
[Paragraph("20,000β50,000 /Β΅L", normal), Paragraph("No active bleeding", normal),
Paragraph("Usually not required β clinical judgment", normal), ""],
[Paragraph("10,000β20,000 /Β΅L", normal), Paragraph("No bleeding, stable", normal),
Paragraph("Consider if rapid fall or high-risk procedure", normal), ""],
[Paragraph("< 10,000 /Β΅L", normal), Paragraph("Any", normal),
Paragraph("Transfuse β 1 unit/10 kg body weight", style("act", fontSize=8,
fontName="Helvetica-Bold", textColor=RED)), ""],
[Paragraph("Any count", normal), Paragraph("ACTIVE BLEEDING (mucosal / visceral)", normal),
Paragraph("TRANSFUSE IMMEDIATELY", style("act2", fontSize=8,
fontName="Helvetica-Bold", textColor=RED)), ""],
]
plt_col = [W*0.2, W*0.3, W*0.4, W*0.1]
plt_t = Table(plt_data, colWidths=plt_col, rowHeights=[14]*len(plt_data))
plt_t.setStyle(TableStyle([
("BACKGROUND",(0,0),(-1,0), colors.HexColor("#7B241C")),
("TEXTCOLOR", (0,0),(-1,0), WHITE),
("BACKGROUND",(0,-1),(-1,-1), colors.HexColor("#FDEDEC")),
("GRID", (0,0),(-1,-1), 0.4, MIDGREY),
("FONTSIZE", (0,0),(-1,-1), 7.5),
("ROWBACKGROUNDS",(0,1),(-1,-2),[WHITE,GREY]),
("ALIGN", (3,0),(3,-1), "CENTER"),
("VALIGN", (0,0),(-1,-1),"MIDDLE"),
("TOPPADDING",(0,0),(-1,-1),2),("BOTTOMPADDING",(0,0),(-1,-1),2),
("LEFTPADDING",(0,0),(-1,-1),4),
]))
story.append(plt_t)
story.append(spacer(2))
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# VITAL SIGNS / MONITORING CHART
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
story.append(sec_row(" MONITORING SCHEDULE", bg=BLUE))
mon_data = [
[Paragraph("Parameter", bold)] + [Paragraph(t, center_b) for t in
["6 AM","10 AM","2 PM","6 PM","10 PM","2 AM", "Comments"]],
[Paragraph("Temperature (Β°C)", normal)]+[""]*7,
[Paragraph("Pulse Rate (/min)", normal)]+[""]*7,
[Paragraph("Blood Pressure (mmHg)", normal)]+[""]*7,
[Paragraph("Respiratory Rate (/min)", normal)]+[""]*7,
[Paragraph("SpOβ (%)", normal)]+[""]*7,
[Paragraph("Urine Output (mL)", normal)]+[""]*7,
[Paragraph("IV Fluid Input (mL)", normal)]+[""]*7,
[Paragraph("Platelet Count", normal)]+[""]*7,
[Paragraph("Hematocrit (%)", normal)]+[""]*7,
[Paragraph("Nurse Initials", normal)]+[""]*7,
]
mon_cols = [W*0.25] + [W*0.09]*6 + [W*0.21]
mon_t = Table(mon_data, colWidths=mon_cols, rowHeights=[13]*len(mon_data))
mon_t.setStyle(TableStyle([
("BACKGROUND",(0,0),(-1,0), BLUE),
("TEXTCOLOR", (0,0),(-1,0), WHITE),
("FONTSIZE", (0,0),(-1,-1), 7.5),
("ALIGN", (1,0),(-1,-1),"CENTER"),
("VALIGN", (0,0),(-1,-1),"MIDDLE"),
("GRID", (0,0),(-1,-1), 0.4, MIDGREY),
("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE,GREY]),
("LEFTPADDING",(0,0),(-1,-1),4),
("TOPPADDING",(0,0),(-1,-1),1),("BOTTOMPADDING",(0,0),(-1,-1),1),
]))
story.append(mon_t)
story.append(spacer(2))
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# STRICTLY AVOID BOX
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
avoid_data = [
[Paragraph("β STRICTLY AVOID IN DENGUE", warn)],
[Paragraph(
"β Aspirin / Ibuprofen / Diclofenac / Naproxen (NSAIDs) "
"β Intramuscular (IM) injections (bleeding risk) "
"β Antibiotics (unless secondary bacterial infection confirmed) "
"β Routine steroids "
"β Excess IV fluids (causes pulmonary oedema / fluid overload)",
style("avoid", fontSize=7.5, fontName="Helvetica", textColor=RED, alignment=TA_CENTER)
)],
]
avoid_t = Table(avoid_data, colWidths=[W])
avoid_t.setStyle(TableStyle([
("BACKGROUND",(0,0),(-1,-1), YELLOW),
("BOX",(0,0),(-1,-1),1.5,RED),
("TOPPADDING",(0,0),(-1,-1),4),("BOTTOMPADDING",(0,0),(-1,-1),4),
("LEFTPADDING",(0,0),(-1,-1),6),
]))
story.append(avoid_t)
story.append(spacer(2))
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# DISCHARGE CRITERIA + SIGNATURES
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
dc_data = [
[Paragraph("DISCHARGE CRITERIA (all must be met)", style("dchd", fontSize=8,
fontName="Helvetica-Bold", textColor=BLUE)),
Paragraph("DOCTOR'S SIGNATURE", style("dchd2", fontSize=8,
fontName="Helvetica-Bold", textColor=BLUE))],
[Paragraph(
"\u25a1 Afebrile for at least 24β48 hrs (without antipyretics)\n"
"\u25a1 Clinical improvement (no vomiting, tolerating oral fluids)\n"
"\u25a1 Platelet count trending up and > 50,000/Β΅L\n"
"\u25a1 Stable HCT, no active bleeding\n"
"\u25a1 Good urine output (> 0.5 mL/kg/hr)\n"
"\u25a1 No warning signs for 48 hrs post-defervescence",
normal),
Paragraph(
"Consultant: _________________________\n\n"
"Date: ________ Time: ________\n\n"
"Resident / JR: ______________________\n\n"
"Nurse in charge: ____________________",
normal)],
]
dc_t = Table(dc_data, colWidths=[W*0.55, W*0.45])
dc_t.setStyle(TableStyle([
("BACKGROUND",(0,0),(-1,0), LIGHTBLUE),
("FONTNAME", (0,0),(-1,0), "Helvetica-Bold"),
("BACKGROUND",(0,1),(-1,1), GREY),
("GRID", (0,0),(-1,-1), 0.5, MIDGREY),
("FONTSIZE", (0,0),(-1,-1), 7.5),
("VALIGN", (0,0),(-1,-1), "TOP"),
("TOPPADDING",(0,0),(-1,-1),4),("BOTTOMPADDING",(0,0),(-1,-1),4),
("LEFTPADDING",(0,0),(-1,-1),6),
]))
story.append(dc_t)
story.append(spacer(2))
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# FOOTER
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
footer = Table([[
Paragraph("This template is based on WHO Dengue Management Guidelines (2024) & Indian NVBDCP Protocol. "
"Doses must be adjusted for paediatric patients (weight-based). "
"Clinical judgment takes precedence over this template.",
style("ft", fontSize=6.5, fontName="Helvetica-Oblique",
textColor=colors.HexColor("#666666"), alignment=TA_CENTER)),
]], colWidths=[W])
footer.setStyle(TableStyle([
("TOPPADDING",(0,0),(-1,-1),3),("BOTTOMPADDING",(0,0),(-1,-1),3),
("LINEABOVE",(0,0),(-1,0),0.5,MIDGREY),
]))
story.append(footer)
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# BUILD
# ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
doc.build(story)
print(f"PDF created: {OUTPUT}")
cd /home/daytona/workspace/dengue-ipd && python3 generate_pdf.py 2>&1
ls -lh /home/daytona/workspace/dengue-ipd/Dengue_IPD_Order_Template.pdf
Dengue IPD Order Template
PDF Document Β· PDF
| Section | Contents |
|---|---|
| Patient Info | Name, IP No., Age, Sex, Weight, Ward, Consultant, Fever onset date |
| Dengue Classification | Group A / B / C checkbox with colour coding |
| Warning Signs Checklist | 9 key danger signs to tick off |
| Investigations Chart | Day 1-6 grid for CBC, NS1, LFT, electrolytes, urine, X-ray, USG |
| Medications Table | Inj. Paracetamol, Pantoprazole, Ondansetron, Vitamin C with dose/route/frequency |
| IV Fluid Protocol | Group B (with/without warning signs) + Group C shock algorithms |
| Platelet Transfusion Guide | Count thresholds with action columns |
| Monitoring Chart | 6-hourly vitals, urine output, IV input, HCT, platelet - nurse initials |
| AVOID Box | Red-bordered warning for NSAIDs, IM injections, antibiotics |
| Discharge Criteria | 6-point checklist + signature area |