Inj solumedrol can give in malaria patient

Reading File
Searching PubMed

corticosteroids methylprednisolone malaria

Finding Sources
Reading Article

PMID: 10796562

Finding Sources
Reading Article

PMID: 38720494

Finding Sources
Finding Sources
Searching the Web

solumedrol methylprednisolone malaria contraindicated WHO guidelines

Reading File
Reading File
Reading File
I now have comprehensive information. Here is the full, evidence-based answer:

Inj. Solu-Medrol (Methylprednisolone) in Malaria - Detailed Answer

Bottom Line: Generally CONTRAINDICATED, especially in cerebral malaria

Cerebral malaria is a specific, labeled contraindication for methylprednisolone (Solu-Medrol). Drug reference sources (Healio drug profile) list cerebral malaria explicitly among contraindications for the drug.

Why Corticosteroids Are Harmful in Malaria

  1. Immunosuppression worsens infection - Malaria requires an intact immune response. Steroids suppress both innate and adaptive immunity, allowing unchecked parasite replication.
  2. Cerebral malaria specifically - The cerebral edema in malaria is largely mediated by parasitized red cells sequestering in cerebral vasculature and by cytokine-driven inflammation. Steroids do NOT address this mechanism the same way they help in bacterial meningitis. RCT evidence showed:
    • No mortality benefit
    • More gastrointestinal bleeding
    • More seizures
    • Prolonged coma duration
  3. Risk of secondary bacterial sepsis - Severe malaria patients already have impaired immunity. Steroid-induced immunosuppression increases the risk of superimposed bacterial infections.

Evidence from Cochrane Review (PMID: 10796562)

The key systematic review - Steroids for treating cerebral malaria (Prasad & Garner, Cochrane 2000) - evaluated two RCTs (143 patients total). Key findings:
  • No benefit in survival (30 deaths evenly split between steroid and control groups)
  • More complications in steroid group: significantly more GI bleeding and seizures
  • Conclusion: "No evidence of benefit from steroids in this condition"
This evidence led to global guidelines (WHO) explicitly recommending against corticosteroid use in cerebral malaria.

Exception: Malaria-Associated ARDS

A recent Indian RCT (Tiwari et al., 2023, PMID: 38720494) specifically studied pulse methylprednisolone for malaria-associated ARDS. Results:
  • No significant difference in mortality, PaO2/FiO2 ratio, SOFA score, lung injury score, ICU stay, or mechanical ventilation duration
  • Pulse MPS showed no clear benefit for malaria-associated ARDS either
  • Authors cautioned that continued use may worsen outcomes

Summary Table

Clinical ScenarioCan Solu-Medrol Be Given?
Uncomplicated malariaNo - no indication, risks outweigh benefits
Cerebral malariaContraindicated - worsens coma, increases seizures and GI bleed
Malaria + ARDSNot recommended - no proven benefit per RCT evidence
Malaria + severe allergic reaction to antimalarialMay be considered cautiously for the allergy itself, not for malaria
Malaria + co-existing autoimmune diseaseUse only if absolutely necessary for the autoimmune condition, with careful antimalarial cover

What to Use Instead

Per Tintinalli's Emergency Medicine:
  • Severe/cerebral malaria: IV artesunate (first line), or IV quinine/quinidine
  • Supportive care: oxygen, IV glucose (for hypoglycemia), IV fluids, blood transfusion for severe anemia, seizure management with benzodiazepines, antipyretics
  • Parenteral antibiotics if bacterial co-infection cannot be excluded
Do not substitute or add corticosteroids thinking they will help with cerebral edema or inflammation - the evidence is clear they harm rather than help.

Create a malaria management protocol summary document

Asking for Preferences
Reading File
Finding Sources
Finding Sources
Finding Sources
Reading File
Finding Sources
Running Command

mkdir -p /tmp/workspace/malaria-protocol && ls /tmp/workspace/malaria-protocol/

Writing File

~/malaria-protocol/build_pdf.py

from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import cm
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus import (
    SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
    HRFlowable, KeepTogether, PageBreak
)
from reportlab.platypus.flowables import BalancedColumns

OUTPUT = "/tmp/workspace/malaria-protocol/Malaria_Management_Protocol.pdf"

# ── Colour palette ──────────────────────────────────────────────────────────
DARK_RED   = colors.HexColor("#8B0000")
MED_RED    = colors.HexColor("#C0392B")
LIGHT_RED  = colors.HexColor("#FADBD8")
DARK_BLUE  = colors.HexColor("#1A3557")
MED_BLUE   = colors.HexColor("#2E86C1")
LIGHT_BLUE = colors.HexColor("#D6EAF8")
ORANGE     = colors.HexColor("#E67E22")
LIGHT_ORANGE = colors.HexColor("#FDEBD0")
GREEN      = colors.HexColor("#1E8449")
LIGHT_GREEN= colors.HexColor("#D5F5E3")
YELLOW_BG  = colors.HexColor("#FDFBE4")
GRAY_BG    = colors.HexColor("#F2F3F4")
GRAY_LINE  = colors.HexColor("#BDC3C7")
WHITE      = colors.white
BLACK      = colors.black

# ── Styles ───────────────────────────────────────────────────────────────────
base = getSampleStyleSheet()

def S(name, **kw):
    return ParagraphStyle(name, **kw)

H_COVER = S("HCover", fontName="Helvetica-Bold", fontSize=26,
            textColor=WHITE, alignment=TA_CENTER, spaceAfter=6)
SUB_COVER = S("SubCover", fontName="Helvetica", fontSize=13,
              textColor=colors.HexColor("#D6EAF8"), alignment=TA_CENTER, spaceAfter=4)
DATE_COVER = S("DateCover", fontName="Helvetica", fontSize=10,
               textColor=colors.HexColor("#AEB6BF"), alignment=TA_CENTER)

SECTION = S("Section", fontName="Helvetica-Bold", fontSize=13,
            textColor=WHITE, alignment=TA_LEFT,
            leftIndent=0, spaceAfter=2, spaceBefore=12)
SUBSEC  = S("SubSec", fontName="Helvetica-Bold", fontSize=11,
            textColor=DARK_BLUE, spaceBefore=8, spaceAfter=3)
BODY    = S("Body", fontName="Helvetica", fontSize=9.5,
            leading=14, spaceAfter=3, alignment=TA_JUSTIFY)
BULLET  = S("Bullet", fontName="Helvetica", fontSize=9.5,
            leading=14, leftIndent=14, spaceAfter=2,
            bulletIndent=4, bulletText="\u2022")
BOLD_BODY = S("BoldBody", fontName="Helvetica-Bold", fontSize=9.5,
              leading=14, spaceAfter=2)
SMALL   = S("Small", fontName="Helvetica", fontSize=8.5,
            textColor=colors.HexColor("#5D6D7E"), leading=12, spaceAfter=2)
WARNING = S("Warning", fontName="Helvetica-Bold", fontSize=9.5,
            textColor=MED_RED, leading=14, spaceAfter=2)
TH      = S("TH", fontName="Helvetica-Bold", fontSize=8.5,
            textColor=WHITE, alignment=TA_CENTER)
TD      = S("TD", fontName="Helvetica", fontSize=8.5,
            textColor=BLACK, leading=12)
TD_BOLD = S("TDBold", fontName="Helvetica-Bold", fontSize=8.5,
            textColor=BLACK, leading=12)
FOOTER  = S("Footer", fontName="Helvetica", fontSize=7.5,
            textColor=GRAY_LINE, alignment=TA_CENTER)

# ── Helper: coloured section header ─────────────────────────────────────────
def section_header(text, bg=DARK_BLUE):
    data = [[Paragraph(text, SECTION)]]
    t = Table(data, colWidths=[17.5*cm])
    t.setStyle(TableStyle([
        ("BACKGROUND", (0,0),(-1,-1), bg),
        ("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(text):
    data = [[Paragraph(text, WARNING)]]
    t = Table(data, colWidths=[17.5*cm])
    t.setStyle(TableStyle([
        ("BACKGROUND", (0,0),(-1,-1), LIGHT_RED),
        ("LEFTPADDING",  (0,0),(-1,-1), 10),
        ("RIGHTPADDING", (0,0),(-1,-1), 10),
        ("TOPPADDING",   (0,0),(-1,-1), 6),
        ("BOTTOMPADDING",(0,0),(-1,-1), 6),
        ("BOX", (0,0),(-1,-1), 1.2, MED_RED),
    ]))
    return t

def info_box(text, bg=LIGHT_BLUE, border=MED_BLUE):
    data = [[Paragraph(text, BODY)]]
    t = Table(data, colWidths=[17.5*cm])
    t.setStyle(TableStyle([
        ("BACKGROUND", (0,0),(-1,-1), bg),
        ("LEFTPADDING",  (0,0),(-1,-1), 10),
        ("RIGHTPADDING", (0,0),(-1,-1), 10),
        ("TOPPADDING",   (0,0),(-1,-1), 6),
        ("BOTTOMPADDING",(0,0),(-1,-1), 6),
        ("BOX", (0,0),(-1,-1), 1, border),
    ]))
    return t

def sp(n=6): return Spacer(1, n)
def hr(): return HRFlowable(width="100%", thickness=0.5, color=GRAY_LINE, spaceAfter=4)

# ── Cover Page ───────────────────────────────────────────────────────────────
def cover_page():
    elems = []
    cover_data = [[
        Paragraph("MALARIA", H_COVER),
        Paragraph("Management Protocol", SUB_COVER),
        Paragraph("For General Practitioners & Ward Physicians", SUB_COVER),
        Paragraph("Based on WHO Guidelines | Tintinalli's Emergency Medicine | Harrison's Internal Medicine 22e", DATE_COVER),
        sp(4),
        Paragraph("August 2026", DATE_COVER),
    ]]
    # Build cover as a single-cell table with dark background
    cells = [
        [Paragraph("MALARIA", H_COVER)],
        [Paragraph("Management Protocol", SUB_COVER)],
        [Paragraph("For General Practitioners & Ward Physicians", S("X1", parent=SUB_COVER, fontSize=11))],
        [sp(8)],
        [Paragraph("Based on: WHO Guidelines | Tintinalli's Emergency Medicine | Harrison's Principles 22e", DATE_COVER)],
        [Paragraph("August 2026  \u2022  Orris Clinical Reference", DATE_COVER)],
    ]
    cover_t = Table(cells, colWidths=[17.5*cm])
    cover_t.setStyle(TableStyle([
        ("BACKGROUND", (0,0),(-1,-1), DARK_BLUE),
        ("TOPPADDING",  (0,0),(-1,-1), 14),
        ("BOTTOMPADDING",(0,0),(-1,-1), 14),
        ("LEFTPADDING", (0,0),(-1,-1), 20),
        ("RIGHTPADDING",(0,0),(-1,-1), 20),
    ]))
    elems.append(Spacer(1, 3*cm))
    elems.append(cover_t)
    elems.append(sp(20))
    # Quick-reference box
    qr_items = [
        ["P. falciparum", "Medical emergency in non-immune host  \u2022  5-30% fatal if untreated at severe stage"],
        ["P. vivax/ovale", "Usually non-fatal but requires primaquine for radical cure (hypnozoites)"],
        ["P. malariae", "Chronic course, no hypnozoites, no primaquine needed"],
        ["P. knowlesi", "Zoonotic, rapid replication, can be severe"],
    ]
    data = [[Paragraph("Species", TH), Paragraph("Key Point", TH)]] + \
           [[Paragraph(r[0], TD_BOLD), Paragraph(r[1], TD)] for r in qr_items]
    t = Table(data, colWidths=[4*cm, 13.5*cm])
    t.setStyle(TableStyle([
        ("BACKGROUND", (0,0),(-1,0), DARK_BLUE),
        ("ROWBACKGROUNDS",(0,1),(-1,-1),[GRAY_BG, WHITE]),
        ("GRID",(0,0),(-1,-1),0.5,GRAY_LINE),
        ("TOPPADDING",(0,0),(-1,-1),5),
        ("BOTTOMPADDING",(0,0),(-1,-1),5),
        ("LEFTPADDING",(0,0),(-1,-1),7),
    ]))
    elems.append(t)
    elems.append(PageBreak())
    return elems

# ── Section 1: Diagnosis ─────────────────────────────────────────────────────
def section_diagnosis():
    e = []
    e.append(section_header("1.  DIAGNOSIS"))
    e.append(sp(6))

    e.append(Paragraph("Clinical Features", SUBSEC))
    e.append(Paragraph(
        "<b>Suspect malaria</b> in any patient with unexplained fever who has travelled to or lives in a malarious area.",
        BODY))
    sx = [
        "Prodrome: malaise, myalgia, headache, chills",
        "High-grade fever, nausea, orthostatic dizziness, extreme weakness",
        "Classic paroxysms (chills \u2192 fever \u2192 diaphoresis) – may be absent in P. falciparum or partially treated cases",
        "Splenomegaly, abdominal tenderness, hepatomegaly",
        "<b>Red flags suggesting severity:</b> altered consciousness, seizures, extreme weakness (unable to sit), jaundice, dark urine, bleeding, respiratory distress",
    ]
    for s in sx:
        e.append(Paragraph(s, BULLET))

    e.append(sp(6))
    e.append(Paragraph("Diagnostic Investigations", SUBSEC))

    dx_data = [
        [Paragraph("Test", TH), Paragraph("Details", TH), Paragraph("Priority", TH)],
        [Paragraph("Thick & Thin Blood Smear", TD_BOLD),
         Paragraph("Gold standard. Identifies species and parasite density. Repeat every 12-24h if initial smear negative but clinical suspicion high.", TD),
         Paragraph("FIRST LINE", S("G", parent=TD_BOLD, textColor=GREEN))],
        [Paragraph("Rapid Diagnostic Test (RDT)", TD_BOLD),
         Paragraph("Detects P. falciparum HRP-2 antigen. Fast (15 min). Confirm with smear. May remain positive for weeks after treatment.", TD),
         Paragraph("Adjunct / field use", TD)],
        [Paragraph("FBC", TD_BOLD),
         Paragraph("Anaemia (normocytic), thrombocytopenia, leukocytosis unusual (leukocytosis suggests bacterial co-infection)", TD),
         Paragraph("Routine", TD)],
        [Paragraph("RFT, LFT, Blood glucose", TD_BOLD),
         Paragraph("Assess organ function; hypoglycaemia common especially with quinine use", TD),
         Paragraph("Routine (mandatory in severe)", TD)],
        [Paragraph("Blood cultures", TD_BOLD),
         Paragraph("Obtain before antibiotics if bacterial co-infection cannot be excluded", TD),
         Paragraph("Severe disease", TD)],
        [Paragraph("Lumbar Puncture", TD_BOLD),
         Paragraph("Exclude meningitis/encephalitis in cerebral malaria. CSF usually normal in malaria.", TD),
         Paragraph("Cerebral malaria", TD)],
    ]
    dt = Table(dx_data, colWidths=[4.2*cm, 10*cm, 3.3*cm])
    dt.setStyle(TableStyle([
        ("BACKGROUND",(0,0),(-1,0),DARK_BLUE),
        ("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE,GRAY_BG]),
        ("GRID",(0,0),(-1,-1),0.5,GRAY_LINE),
        ("VALIGN",(0,0),(-1,-1),"TOP"),
        ("TOPPADDING",(0,0),(-1,-1),5),
        ("BOTTOMPADDING",(0,0),(-1,-1),5),
        ("LEFTPADDING",(0,0),(-1,-1),6),
    ]))
    e.append(dt)
    e.append(sp(8))
    e.append(info_box(
        "<b>Important:</b> Do NOT delay treatment while awaiting laboratory confirmation in an unstable patient with a clinical history suggesting malaria. "
        "Start artesunate empirically if P. falciparum cannot be excluded.",
        bg=LIGHT_ORANGE, border=ORANGE))
    return e

# ── Section 2: Classification ────────────────────────────────────────────────
def section_classification():
    e = []
    e.append(sp(10))
    e.append(section_header("2.  SEVERITY CLASSIFICATION (WHO Criteria)", bg=MED_RED))
    e.append(sp(6))

    e.append(Paragraph("<b>Severe/Complicated Malaria</b> - ANY one of the following:", SUBSEC))
    criteria = [
        ("Cerebral malaria", "GCS <11 / Blantyre <3, coma, seizures not due to other cause"),
        ("Severe anaemia", "Hb <7 g/dL (adults), <5 g/dL (children) with parasitaemia"),
        ("Hypoglycaemia", "Blood glucose <2.2 mmol/L (<40 mg/dL)"),
        ("Acute Kidney Injury", "Creatinine >265 µmol/L (>3 mg/dL) or urine <400 mL/24h in adults"),
        ("Pulmonary Oedema / ARDS", "Confirmed on CXR or oxygen saturation <92% on room air"),
        ("Circulatory Collapse / Shock", "SBP <80 mmHg with cold extremities"),
        ("Abnormal Bleeding / DIC", "Significant haemorrhage, petechiae, DIC"),
        ("Jaundice + parasitaemia", "Bilirubin >50 µmol/L (>3 mg/dL) with parasitaemia"),
        ("Hyperparasitaemia", ">5% parasitized red cells (non-immune adults: >2%)"),
        ("Prostration", "Inability to sit/stand unaided"),
        ("Repeated seizures", "\u22652 seizures in 24 hours"),
    ]
    crit_data = [[Paragraph("Criterion", TH), Paragraph("Definition / Threshold", TH)]] + \
                [[Paragraph(c[0], TD_BOLD), Paragraph(c[1], TD)] for c in criteria]
    ct = Table(crit_data, colWidths=[5*cm, 12.5*cm])
    ct.setStyle(TableStyle([
        ("BACKGROUND",(0,0),(-1,0), MED_RED),
        ("ROWBACKGROUNDS",(0,1),(-1,-1),[LIGHT_RED, WHITE]),
        ("GRID",(0,0),(-1,-1),0.5,GRAY_LINE),
        ("VALIGN",(0,0),(-1,-1),"TOP"),
        ("TOPPADDING",(0,0),(-1,-1),5),
        ("BOTTOMPADDING",(0,0),(-1,-1),5),
        ("LEFTPADDING",(0,0),(-1,-1),6),
    ]))
    e.append(ct)
    return e

# ── Section 3: Treatment ─────────────────────────────────────────────────────
def section_treatment():
    e = []
    e.append(sp(10))
    e.append(section_header("3.  ANTIMALARIAL TREATMENT"))
    e.append(sp(6))

    # 3a Uncomplicated
    e.append(Paragraph("3A  Uncomplicated Malaria", SUBSEC))

    tx_unc = [
        [Paragraph("Regimen", TH), Paragraph("Drug(s) / Dose", TH), Paragraph("Notes", TH)],
        [Paragraph("ACT\n(First line)", TD_BOLD),
         Paragraph("Artemether-lumefantrine (Coartem)\n"
                   "Adult: 4 tabs at 0, 8, 24, 36, 48, 60 h\n"
                   "OR Artesunate-amodiaquine / AS-mefloquine\n"
                   "(per local/national guidelines)", TD),
         Paragraph("Take with fatty food. Avoid in 1st trimester (relative).", TD)],
        [Paragraph("Chloroquine-sensitive P. vivax/ovale/malariae", TD_BOLD),
         Paragraph("Chloroquine 25 mg base/kg over 3 days\n(600 mg base day 1, 300 mg day 2, 300 mg day 3)", TD),
         Paragraph("Check regional resistance patterns.", TD)],
        [Paragraph("Radical cure\n(P. vivax / P. ovale)", TD_BOLD),
         Paragraph("Primaquine 30 mg base/day x 14 days\n(0.5 mg/kg/day in children)", TD),
         Paragraph("CHECK G6PD first. Contraindicated in pregnancy. Alt: chloroquine 300 mg weekly x 6 months.", TD)],
    ]
    tuc = Table(tx_unc, colWidths=[4*cm, 8.5*cm, 5*cm])
    tuc.setStyle(TableStyle([
        ("BACKGROUND",(0,0),(-1,0), DARK_BLUE),
        ("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE,GRAY_BG]),
        ("GRID",(0,0),(-1,-1),0.5,GRAY_LINE),
        ("VALIGN",(0,0),(-1,-1),"TOP"),
        ("TOPPADDING",(0,0),(-1,-1),5),
        ("BOTTOMPADDING",(0,0),(-1,-1),5),
        ("LEFTPADDING",(0,0),(-1,-1),6),
    ]))
    e.append(tuc)
    e.append(sp(8))

    # 3b Severe
    e.append(Paragraph("3B  Severe / Complicated Malaria  \u2014  ADMIT to HDU/ICU", SUBSEC))
    e.append(warning_box(
        "\u26A0  SEVERE MALARIA = MEDICAL EMERGENCY  \u2014  Start parenteral therapy IMMEDIATELY. "
        "Do NOT wait for lab results if clinical suspicion is high."))
    e.append(sp(6))

    tx_sev = [
        [Paragraph("Drug", TH), Paragraph("Route / Dose", TH), Paragraph("Notes", TH)],
        [Paragraph("IV Artesunate\n(PREFERRED)", TD_BOLD),
         Paragraph("2.4 mg/kg IV at 0, 12, 24 h, then once daily\n(In US: contact CDC Malaria Hotline: 770-488-7788)", TD),
         Paragraph("Fastest parasite clearance. Safest profile. Switch to oral ACT as soon as tolerating PO.", TD)],
        [Paragraph("IV Quinine\n(if artesunate unavailable)", TD_BOLD),
         Paragraph("Loading dose: 20 mg salt/kg in 5% dextrose over 4h\nMaintenance: 10 mg salt/kg every 8h\n(Max 1800 mg/day)", TD),
         Paragraph("ECG monitoring mandatory. Risk of hypoglycaemia - monitor blood glucose every 4h. Add doxycycline 100 mg BD PO once tolerating.", TD)],
        [Paragraph("IM Artesunate / IM Artemether\n(if IV not immediately available)", TD_BOLD),
         Paragraph("Artesunate: 2.4 mg/kg IM\nOR Artemether: 3.2 mg/kg IM loading, then 1.6 mg/kg daily", TD),
         Paragraph("Use as bridge while establishing IV access.", TD)],
    ]
    tsev = Table(tx_sev, colWidths=[4*cm, 8*cm, 5.5*cm])
    tsev.setStyle(TableStyle([
        ("BACKGROUND",(0,0),(-1,0), MED_RED),
        ("ROWBACKGROUNDS",(0,1),(-1,-1),[LIGHT_RED, WHITE]),
        ("GRID",(0,0),(-1,-1),0.5,GRAY_LINE),
        ("VALIGN",(0,0),(-1,-1),"TOP"),
        ("TOPPADDING",(0,0),(-1,-1),5),
        ("BOTTOMPADDING",(0,0),(-1,-1),5),
        ("LEFTPADDING",(0,0),(-1,-1),6),
    ]))
    e.append(tsev)
    e.append(sp(6))

    # Step-down note
    e.append(info_box(
        "<b>Step-down:</b> Continue parenteral therapy for at least 24h, then switch to a full course "
        "of oral ACT (or oral quinine + doxycycline) as soon as the patient tolerates oral medication. "
        "Maximum parenteral course: 7 days.",
        bg=LIGHT_GREEN, border=GREEN))
    return e

# ── Section 4: Supportive Care ───────────────────────────────────────────────
def section_supportive():
    e = []
    e.append(sp(10))
    e.append(section_header("4.  SUPPORTIVE CARE IN SEVERE MALARIA"))
    e.append(sp(6))

    supp = [
        ("Fever / Hyperpyrexia", "Paracetamol 15 mg/kg/dose q6h. Tepid sponging. Avoid aspirin (bleeding risk)."),
        ("Hypoglycaemia", "50 mL of 50% dextrose IV bolus, then continuous 5-10% dextrose infusion. Monitor glucose every 4h (more frequently if on quinine/quinidine)."),
        ("Severe Anaemia", "Packed red cell transfusion if Hb <7 g/dL (adults) or <5 g/dL (children); give furosemide to prevent fluid overload."),
        ("Seizures", "IV benzodiazepine (diazepam 0.15 mg/kg or lorazepam 0.1 mg/kg). Maintain airway. Phenobarbitone prophylaxis only in specialist setting."),
        ("Fluid Management", "Cautious IV fluids - avoid overhydration (risk of pulmonary oedema). In shock: cautious bolus with reassessment."),
        ("Raised ICP (Cerebral malaria)", "Head-up 30 degrees. Avoid hypotonic fluids. Intubation if GCS <8 or respiratory failure. Mannitol if confirmed raised ICP."),
        ("ARDS", "Lung-protective ventilation (low tidal volume). Prone positioning if refractory hypoxaemia."),
        ("Renal Failure", "Haemofiltration/haemodialysis if AKI unresponsive to optimisation. Adjust antimalarial doses cautiously."),
        ("Bacterial Co-infection", "Empirical broad-spectrum antibiotics (e.g. IV ceftriaxone) if bacterial sepsis cannot be excluded."),
    ]
    s_data = [[Paragraph("Complication", TH), Paragraph("Management", TH)]] + \
             [[Paragraph(s[0], TD_BOLD), Paragraph(s[1], TD)] for s in supp]
    st = Table(s_data, colWidths=[4.5*cm, 13*cm])
    st.setStyle(TableStyle([
        ("BACKGROUND",(0,0),(-1,0), DARK_BLUE),
        ("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE, GRAY_BG]),
        ("GRID",(0,0),(-1,-1),0.5,GRAY_LINE),
        ("VALIGN",(0,0),(-1,-1),"TOP"),
        ("TOPPADDING",(0,0),(-1,-1),5),
        ("BOTTOMPADDING",(0,0),(-1,-1),5),
        ("LEFTPADDING",(0,0),(-1,-1),6),
    ]))
    e.append(st)
    return e

# ── Section 5: Contraindications ────────────────────────────────────────────
def section_contraindications():
    e = []
    e.append(sp(10))
    e.append(section_header("5.  DRUGS CONTRAINDICATED / TO AVOID IN MALARIA", bg=MED_RED))
    e.append(sp(6))

    ci_data = [
        [Paragraph("Drug / Class", TH), Paragraph("Reason for Avoidance", TH), Paragraph("Evidence", TH)],
        [Paragraph("Corticosteroids\n(e.g. Solu-Medrol / methylprednisolone, dexamethasone)", TD_BOLD),
         Paragraph("CONTRAINDICATED in cerebral malaria. Worsens outcome: prolongs coma, increases seizures and GI bleeding. "
                   "Suppress host immunity, allowing unchecked parasitaemia. No evidence of benefit in ARDS due to malaria either.", TD),
         Paragraph("Cochrane SR (Prasad & Garner, 2000, PMID 10796562)\nRCT for ARDS (Tiwari et al., 2023, PMID 38720494)", S("Ev", parent=SMALL))],
        [Paragraph("Aspirin / NSAIDs", TD_BOLD),
         Paragraph("Increase bleeding risk (thrombocytopaenia already present). Use paracetamol for fever instead.", TD),
         Paragraph("WHO guidelines", S("Ev", parent=SMALL))],
        [Paragraph("Primaquine in G6PD deficiency", TD_BOLD),
         Paragraph("Can cause severe haemolysis. Always check G6PD status before prescribing for radical cure.", TD),
         Paragraph("Pharmacology", S("Ev", parent=SMALL))],
        [Paragraph("Mefloquine in seizure disorder / neuropsychiatric disease", TD_BOLD),
         Paragraph("Lowers seizure threshold; causes acute confusional states. Avoid in epilepsy and active psychiatric illness.", TD),
         Paragraph("Drug labelling", S("Ev", parent=SMALL))],
        [Paragraph("Quinine / Quinidine in cardiac disease", TD_BOLD),
         Paragraph("Risk of QTc prolongation, hypotension, dysrhythmias. Contraindicated in significant cardiac conduction disease.", TD),
         Paragraph("Tintinalli's EM", S("Ev", parent=SMALL))],
        [Paragraph("Chloroquine in porphyria / psoriasis", TD_BOLD),
         Paragraph("Can precipitate acute porphyric attack or severe psoriatic flare.", TD),
         Paragraph("Drug labelling", S("Ev", parent=SMALL))],
        [Paragraph("Doxycycline in pregnancy / <8 years", TD_BOLD),
         Paragraph("Dental staining and bone growth abnormalities in foetus/child.", TD),
         Paragraph("WHO guidelines", S("Ev", parent=SMALL))],
    ]
    ci_t = Table(ci_data, colWidths=[5*cm, 8.5*cm, 4*cm])
    ci_t.setStyle(TableStyle([
        ("BACKGROUND",(0,0),(-1,0), MED_RED),
        ("ROWBACKGROUNDS",(0,1),(-1,-1),[LIGHT_RED, WHITE]),
        ("GRID",(0,0),(-1,-1),0.5,GRAY_LINE),
        ("VALIGN",(0,0),(-1,-1),"TOP"),
        ("TOPPADDING",(0,0),(-1,-1),5),
        ("BOTTOMPADDING",(0,0),(-1,-1),5),
        ("LEFTPADDING",(0,0),(-1,-1),6),
    ]))
    e.append(ci_t)
    return e

# ── Section 6: Special Populations ──────────────────────────────────────────
def section_special():
    e = []
    e.append(sp(10))
    e.append(section_header("6.  SPECIAL POPULATIONS"))
    e.append(sp(6))

    spc = [
        ("Pregnancy",
         "Higher risk of severe disease. Quinine + clindamycin is safest for uncomplicated P. falciparum in 1st trimester. "
         "ACT (artemether-lumefantrine) can be used from 2nd trimester onward. IV artesunate preferred for severe malaria at any stage. "
         "Avoid: primaquine, tetracyclines, mefloquine (relative). Risk of hypoglycaemia higher with quinine due to hyperinsulinaemia."),
        ("Children",
         "Weight-based dosing. Use ACT (artemether-lumefantrine) for uncomplicated disease. IV artesunate for severe disease. "
         "Avoid tetracyclines <8 years. Correct severe anaemia promptly. Seizures common - have IV diazepam ready. "
         "Nutritional support important."),
        ("Non-immune travellers",
         "P. falciparum is always an emergency. Any parasitaemia is significant. Low threshold for hospitalisation. "
         "Rapid progression to severe disease possible within 24-48h."),
        ("G6PD-deficient patients",
         "Avoid primaquine and dapsone (haemolytic risk). Use supervised slow-dose primaquine 0.75 mg base/kg weekly x 8 weeks only after specialist review."),
        ("HIV co-infection",
         "Risk of drug interactions (especially with artemether-lumefantrine and lopinavir-based ART). Discuss with specialist. "
         "Lower CD4 = higher risk of treatment failure."),
        ("Renal impairment",
         "Artesunate dose reduction not required. Quinine: reduce to every 12h after 48h in severe renal failure. "
         "Avoid aminoglycosides."),
    ]
    sp_data = [[Paragraph("Population", TH), Paragraph("Key Considerations", TH)]] + \
              [[Paragraph(s[0], TD_BOLD), Paragraph(s[1], TD)] for s in spc]
    sp_t = Table(sp_data, colWidths=[4.2*cm, 13.3*cm])
    sp_t.setStyle(TableStyle([
        ("BACKGROUND",(0,0),(-1,0), DARK_BLUE),
        ("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE, GRAY_BG]),
        ("GRID",(0,0),(-1,-1),0.5,GRAY_LINE),
        ("VALIGN",(0,0),(-1,-1),"TOP"),
        ("TOPPADDING",(0,0),(-1,-1),5),
        ("BOTTOMPADDING",(0,0),(-1,-1),5),
        ("LEFTPADDING",(0,0),(-1,-1),6),
    ]))
    e.append(sp_t)
    return e

# ── Section 7: Monitoring & Discharge ───────────────────────────────────────
def section_monitoring():
    e = []
    e.append(sp(10))
    e.append(section_header("7.  MONITORING & DISCHARGE CRITERIA"))
    e.append(sp(6))

    mon_data = [
        [Paragraph("Parameter", TH), Paragraph("Frequency", TH)],
        [Paragraph("Blood smear / Parasite count", TD), Paragraph("Every 12-24h until negative; daily thereafter for 3 days", TD)],
        [Paragraph("Blood glucose", TD), Paragraph("Every 4h (every 2h if on quinine; pregnant; diabetic)", TD)],
        [Paragraph("GCS / Neurological status", TD), Paragraph("Hourly in cerebral malaria", TD)],
        [Paragraph("Temperature", TD), Paragraph("Every 4h", TD)],
        [Paragraph("Fluid balance / Urine output", TD), Paragraph("Hourly in severe disease (target >0.5 mL/kg/h)", TD)],
        [Paragraph("FBC, RFT, LFT", TD), Paragraph("Daily in severe disease", TD)],
        [Paragraph("ECG (if on quinine/quinidine)", TD), Paragraph("Baseline, then at 12h and with any cardiac symptoms", TD)],
    ]
    m_t = Table(mon_data, colWidths=[8*cm, 9.5*cm])
    m_t.setStyle(TableStyle([
        ("BACKGROUND",(0,0),(-1,0), DARK_BLUE),
        ("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE, GRAY_BG]),
        ("GRID",(0,0),(-1,-1),0.5,GRAY_LINE),
        ("VALIGN",(0,0),(-1,-1),"TOP"),
        ("TOPPADDING",(0,0),(-1,-1),5),
        ("BOTTOMPADDING",(0,0),(-1,-1),5),
        ("LEFTPADDING",(0,0),(-1,-1),6),
    ]))
    e.append(m_t)

    e.append(sp(8))
    e.append(Paragraph("Discharge Criteria (Uncomplicated Malaria)", SUBSEC))
    dc = [
        "Completed full course of antimalarial treatment (or confirmed taking remainder at home)",
        "Afebrile for >24h and clinically well",
        "Able to tolerate oral medication",
        "Adequate follow-up arranged (repeat smear at Day 3, 7, 28 to detect treatment failure)",
        "Educated about completing treatment and returning if symptoms recur",
    ]
    for d in dc:
        e.append(Paragraph(d, BULLET))
    return e

# ── Section 8: Chemoprophylaxis ──────────────────────────────────────────────
def section_prophylaxis():
    e = []
    e.append(sp(10))
    e.append(section_header("8.  CHEMOPROPHYLAXIS (for Travellers)", bg=GREEN))
    e.append(sp(6))

    px_data = [
        [Paragraph("Drug", TH), Paragraph("Regimen", TH), Paragraph("Start / Stop", TH), Paragraph("Notes", TH)],
        [Paragraph("Atovaquone-Proguanil (Malarone)", TD_BOLD),
         Paragraph("1 adult tab daily", TD),
         Paragraph("1-2 days before; 7 days after", TD),
         Paragraph("Well tolerated. Take with food. No radical cure needed for P. vivax.", TD)],
        [Paragraph("Mefloquine", TD_BOLD),
         Paragraph("250 mg (base) once weekly", TD),
         Paragraph("2-3 weeks before; 4 weeks after", TD),
         Paragraph("Avoid in psychiatric illness, seizures, cardiac conduction disease.", TD)],
        [Paragraph("Doxycycline", TD_BOLD),
         Paragraph("100 mg daily", TD),
         Paragraph("1-2 days before; 4 weeks after", TD),
         Paragraph("Photosensitivity. Avoid pregnancy, <8 years.", TD)],
        [Paragraph("Chloroquine\n(resistant areas: NOT effective)", TD_BOLD),
         Paragraph("500 mg salt once weekly", TD),
         Paragraph("1 week before; 4 weeks after", TD),
         Paragraph("Effective only where chloroquine-sensitive strains persist (limited areas).", TD)],
    ]
    px_t = Table(px_data, colWidths=[4*cm, 4*cm, 4*cm, 5.5*cm])
    px_t.setStyle(TableStyle([
        ("BACKGROUND",(0,0),(-1,0), GREEN),
        ("ROWBACKGROUNDS",(0,1),(-1,-1),[LIGHT_GREEN, WHITE]),
        ("GRID",(0,0),(-1,-1),0.5,GRAY_LINE),
        ("VALIGN",(0,0),(-1,-1),"TOP"),
        ("TOPPADDING",(0,0),(-1,-1),5),
        ("BOTTOMPADDING",(0,0),(-1,-1),5),
        ("LEFTPADDING",(0,0),(-1,-1),6),
    ]))
    e.append(px_t)
    return e

# ── Footer / References ──────────────────────────────────────────────────────
def section_references():
    e = []
    e.append(sp(12))
    e.append(hr())
    e.append(Paragraph("<b>References &amp; Sources</b>", SUBSEC))
    refs = [
        "1. WHO. Guidelines for the Treatment of Malaria, 3rd Edition, 2015 (updated 2023).",
        "2. Tintinalli JE et al. Tintinalli's Emergency Medicine: A Comprehensive Study Guide, 9th ed. Chapter 159: Malaria.",
        "3. Kasper DL et al. Harrison's Principles of Internal Medicine, 22nd Edition, 2025. Chapter on Malaria.",
        "4. Prasad K, Garner P. Steroids for treating cerebral malaria. Cochrane Database Syst Rev. 2000. PMID: 10796562.",
        "5. Tiwari S et al. Efficacy of Pulse Methylprednisolone in Treatment of ARDS due to Malaria. J Assoc Physicians India. 2023. PMID: 38720494.",
        "6. Healio Drug Reference. Solu-Medrol (methylprednisolone sodium succinate) - Contraindications. 2024.",
    ]
    for r in refs:
        e.append(Paragraph(r, SMALL))
    e.append(sp(6))
    e.append(Paragraph(
        "This protocol is a clinical reference summary for general practitioners and ward physicians. "
        "Always follow current national/institutional guidelines and consult a specialist for complex cases. "
        "Generated by Orris \u2022 August 2026",
        S("Disc", parent=SMALL, textColor=colors.HexColor("#808B96"), alignment=TA_CENTER)))
    return e

# ── Page numbering ───────────────────────────────────────────────────────────
def add_page_num(canvas, doc):
    canvas.saveState()
    canvas.setFont("Helvetica", 7.5)
    canvas.setFillColor(GRAY_LINE)
    canvas.drawCentredString(A4[0]/2, 1.2*cm,
        f"Malaria Management Protocol  |  Page {doc.page}  |  Orris Clinical Reference  |  August 2026")
    canvas.restoreState()

# ── Assemble ──────────────────────────────────────────────────────────────────
def build():
    doc = SimpleDocTemplate(
        OUTPUT, pagesize=A4,
        leftMargin=1.8*cm, rightMargin=1.8*cm,
        topMargin=1.8*cm, bottomMargin=2*cm,
        title="Malaria Management Protocol",
        author="Orris Clinical Reference",
        subject="Malaria diagnosis, treatment, supportive care – GP/Ward physicians",
    )
    story = []
    story += cover_page()
    story += section_diagnosis()
    story += section_classification()
    story += section_treatment()
    story += section_supportive()
    story += section_contraindications()
    story += section_special()
    story += section_monitoring()
    story += section_prophylaxis()
    story += section_references()

    doc.build(story, onFirstPage=add_page_num, onLaterPages=add_page_num)
    print(f"PDF saved to {OUTPUT}")

build()
Running Command

cd /tmp/workspace/malaria-protocol && python build_pdf.py 2>&1

Running Command

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

Your Malaria Management Protocol PDF is ready - 6 pages, formatted for GP/ward use:

Malaria Management Protocol

PDF Document · PDF


What's included in the document:
SectionContent
Cover PageSpecies quick-reference table
1. DiagnosisClinical features, blood smear, RDT, investigations table
2. Severity ClassificationFull WHO criteria for severe/complicated malaria
3. TreatmentUncomplicated (ACT/chloroquine/primaquine) + Severe (IV artesunate preferred, quinine backup) with dosing
4. Supportive CareComplication-by-complication management (seizures, hypoglycaemia, anaemia, ARDS, AKI, raised ICP)
5. ContraindicationsHighlighted in red - corticosteroids (Solu-Medrol), aspirin/NSAIDs, quinine in cardiac disease, etc. with evidence
6. Special PopulationsPregnancy, children, non-immune travellers, G6PD deficiency, HIV, renal impairment
7. Monitoring & DischargeMonitoring frequency table + discharge criteria
8. ChemoprophylaxisAtovaquone-proguanil, mefloquine, doxycycline, chloroquine with start/stop timing
ReferencesWHO guidelines, Tintinalli's, Harrison's 22e, Cochrane evidence
This is a shared conversation. Sign in to Orris to start your own chat.