Based on your ICU Question Bank PDF, here are the most important exam-oriented questions in a simple format. These are the topics that are most likely to be asked in mid-term and university exams. ⭐ Important 1-Mark Questions 1. Define Healthcare-Associated Infection (HAI). 2. What is hand hygiene? 3. Define aseptic technique. 4. Define sterilization. 5. Define disinfection. 6. What is PPE? 7. Define needlestick injury. 8. What is PEP? 9. What is antibiotic stewardship? 10. Define antibiotic resistance. 11. What is ESBL? 12. Define MDR. 13. What is enteral nutrition? 14. What is parenteral nutrition? 15. What is TPN? 16. Define hypovolemia. 17. Define dehydration. 18. What is hyperkalemia? 19. What is hyponatremia? 20. Define crystalloid and colloid fluids. --- ⭐ Important 2.5-Mark Questions (Short Notes) 1. WHO Five Moments of Hand Hygiene. 2. WHO 6 Steps of Handwashing. 3. Sterilization vs Disinfection. 4. Chain of Infection. 5. Universal (Standard) Precautions. 6. Biomedical Waste Color Coding. 7. Needlestick Injury Management. 8. Rational Antibiotic Use. 9. Empirical vs Definitive Antibiotic Therapy. 10. Enteral Nutrition vs Parenteral Nutrition. 11. Nutritional Assessment. 12. Refeeding Syndrome. 13. NG Tube Care. 14. Methods of Checking NG Tube Placement. 15. Fluid Balance Chart. 16. Monitoring During IV Fluid Therapy. 17. Sodium and Potassium Imbalance. --- ⭐ Important 5-Mark Questions (Long Answers) Unit 3: Infection Prevention & Antibiotic Stewardship 1. Principles of Infection Prevention and Control (IPC) in ICU. 2. Prevention of Healthcare-Associated Infections (HAIs). 3. Standard and Transmission-Based Precautions. 4. Sterilization and Disinfection Methods used in ICU. 5. Prevention and Management of Needlestick Injury. 6. Post-Exposure Prophylaxis (PEP) for HIV. 7. Principles of Antibiotic Stewardship. 8. Causes and Prevention of Antibiotic Resistance. 9. Role of Culture and Sensitivity Test in Antibiotic Selection. Unit 4: Nutrition & Fluid Management 10. Methods of Nutritional Support in Critically Ill Patients. 11. Enteral Nutrition vs Parenteral Nutrition. 12. TPN: Indications, Advantages and Complications. 13. Enteral Feeding Procedure. 14. Complications and Prevention of Tube Feeding. 15. Principles of Fluid Management in ICU. 16. Crystalloids vs Colloids. 17. Assessment and Management of Dehydration and Hypovolemia. 18. Electrolyte Imbalance and Management.

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

mkdir -p /home/daytona/workspace/icu-question-bank && ls /home/daytona/workspace…

Give me answer

Writing File

~/icu-question-bank/generate_pdf.py

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

OUTPUT = "/home/daytona/workspace/icu-question-bank/ICU_Exam_Answer_Key.pdf"

doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=A4,
    leftMargin=18*mm, rightMargin=18*mm,
    topMargin=20*mm, bottomMargin=20*mm,
    title="ICU Question Bank – Complete Answer Key",
    author="Orris AI"
)

# ── Styles ──────────────────────────────────────────────────────────────
styles = getSampleStyleSheet()

DARK_BLUE   = colors.HexColor("#1a3c6e")
MED_BLUE    = colors.HexColor("#2563a8")
LIGHT_BLUE  = colors.HexColor("#dbeafe")
GOLD        = colors.HexColor("#b45309")
LIGHT_GOLD  = colors.HexColor("#fef3c7")
GREEN_DARK  = colors.HexColor("#166534")
GREEN_LIGHT = colors.HexColor("#dcfce7")
RED_DARK    = colors.HexColor("#991b1b")
RED_LIGHT   = colors.HexColor("#fee2e2")
GREY_BG     = colors.HexColor("#f1f5f9")
WHITE       = colors.white

title_style = ParagraphStyle("DocTitle",
    fontName="Helvetica-Bold", fontSize=22, textColor=WHITE,
    alignment=TA_CENTER, spaceAfter=4, leading=28)

subtitle_style = ParagraphStyle("DocSubtitle",
    fontName="Helvetica", fontSize=12, textColor=colors.HexColor("#bfdbfe"),
    alignment=TA_CENTER, spaceAfter=2)

unit_style = ParagraphStyle("Unit",
    fontName="Helvetica-Bold", fontSize=14, textColor=WHITE,
    alignment=TA_CENTER, spaceAfter=0, leading=20)

section_style = ParagraphStyle("Section",
    fontName="Helvetica-Bold", fontSize=13, textColor=DARK_BLUE,
    spaceBefore=10, spaceAfter=4, borderPad=4)

q_style = ParagraphStyle("Question",
    fontName="Helvetica-Bold", fontSize=10, textColor=DARK_BLUE,
    spaceBefore=6, spaceAfter=2, leftIndent=0)

a_style = ParagraphStyle("Answer",
    fontName="Helvetica", fontSize=9.5, textColor=colors.HexColor("#1e293b"),
    spaceAfter=4, leftIndent=10, leading=14, alignment=TA_JUSTIFY)

bullet_style = ParagraphStyle("Bullet",
    fontName="Helvetica", fontSize=9.5, textColor=colors.HexColor("#1e293b"),
    spaceAfter=2, leftIndent=20, leading=14, bulletIndent=10)

bold_inline = ParagraphStyle("BoldInline",
    fontName="Helvetica-Bold", fontSize=9.5, textColor=colors.HexColor("#1e293b"),
    spaceAfter=2, leftIndent=10, leading=14)

note_style = ParagraphStyle("Note",
    fontName="Helvetica-Oblique", fontSize=8.5, textColor=GOLD,
    spaceAfter=4, leftIndent=10)

story = []

# ════════════════════════════════════════════════════════════════════════
# COVER BANNER
# ════════════════════════════════════════════════════════════════════════
def cover_banner(story):
    data = [[Paragraph("ICU NURSING – COMPLETE EXAM ANSWER KEY", title_style)],
            [Paragraph("Units 3 & 4 | Infection Prevention, Antibiotic Stewardship, Nutrition & Fluid Management", subtitle_style)],
            [Paragraph("1-Mark | 2.5-Mark | 5-Mark  ·  Mid-Term & University Exam Ready", subtitle_style)]]
    t = Table(data, colWidths=[174*mm])
    t.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), DARK_BLUE),
        ("TOPPADDING",    (0,0), (-1,-1), 10),
        ("BOTTOMPADDING", (0,0), (-1,-1), 10),
        ("LEFTPADDING",   (0,0), (-1,-1), 8),
        ("RIGHTPADDING",  (0,0), (-1,-1), 8),
        ("ROUNDEDCORNERS", [6]),
    ]))
    story.append(t)
    story.append(Spacer(1, 10*mm))

cover_banner(story)

# ════════════════════════════════════════════════════════════════════════
# Helper utilities
# ════════════════════════════════════════════════════════════════════════
def unit_banner(text, bg=DARK_BLUE):
    data = [[Paragraph(text, unit_style)]]
    t = Table(data, colWidths=[174*mm])
    t.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), bg),
        ("TOPPADDING",    (0,0), (-1,-1), 8),
        ("BOTTOMPADDING", (0,0), (-1,-1), 8),
        ("ROUNDEDCORNERS", [4]),
    ]))
    return t

def section_banner(text, bg=MED_BLUE):
    data = [[Paragraph(f"<font color='white'><b>{text}</b></font>",
                       ParagraphStyle("sb", fontName="Helvetica-Bold", fontSize=11,
                                      textColor=WHITE, alignment=TA_LEFT, leading=16))]]
    t = Table(data, colWidths=[174*mm])
    t.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), bg),
        ("TOPPADDING",    (0,0), (-1,-1), 6),
        ("BOTTOMPADDING", (0,0), (-1,-1), 6),
        ("LEFTPADDING",   (0,0), (-1,-1), 8),
        ("ROUNDEDCORNERS", [3]),
    ]))
    return t

def q_box(num, question, answer_paras, bg=LIGHT_BLUE):
    """Render a Q&A block inside a shaded table."""
    inner = []
    inner.append(Paragraph(f"Q{num}. {question}", q_style))
    for p in answer_paras:
        inner.append(p)
    data = [[inner]]
    t = Table([[inner]], colWidths=[170*mm])
    t.setStyle(TableStyle([
        ("BACKGROUND",    (0,0), (-1,-1), bg),
        ("TOPPADDING",    (0,0), (-1,-1), 6),
        ("BOTTOMPADDING", (0,0), (-1,-1), 6),
        ("LEFTPADDING",   (0,0), (-1,-1), 8),
        ("RIGHTPADDING",  (0,0), (-1,-1), 8),
        ("BOX",           (0,0), (-1,-1), 0.5, MED_BLUE),
        ("ROUNDEDCORNERS", [4]),
    ]))
    return t

def A(text):
    return Paragraph(f"<b>Ans:</b> {text}", a_style)

def B(text):
    return Paragraph(f"• {text}", bullet_style)

def BH(bold_part, rest=""):
    return Paragraph(f"<b>{bold_part}</b> {rest}", bullet_style)

def SP():
    return Spacer(1, 3*mm)

# ════════════════════════════════════════════════════════════════════════
# SECTION 1 – 1-MARK QUESTIONS
# ════════════════════════════════════════════════════════════════════════
story.append(unit_banner("⭐  SECTION 1 — 1-MARK QUESTIONS  (Definitions)"))
story.append(Spacer(1, 5*mm))

one_mark_qs = [
    (1, "Define Healthcare-Associated Infection (HAI).",
     [A("A Healthcare-Associated Infection (HAI) is an infection acquired by a patient during the process of receiving healthcare in a hospital or other healthcare facility, which was not present or incubating at the time of admission. Also called nosocomial infection. Common examples: CAUTI, CLABSI, VAP, SSI.")]),

    (2, "What is hand hygiene?",
     [A("Hand hygiene refers to any action of hand cleansing — either by handwashing with soap and water for ≥20 seconds, or by applying an alcohol-based hand rub (ABHR) — to remove or kill microorganisms and prevent their transmission.")]),

    (3, "Define aseptic technique.",
     [A("Aseptic technique is a set of practices used during clinical procedures to prevent the introduction of pathogenic microorganisms into a susceptible site (wound, IV line, sterile body cavity), thereby preventing infection. It involves use of sterile equipment, sterile gloves, a clean field, and a non-touch approach.")]),

    (4, "Define sterilization.",
     [A("Sterilization is the complete destruction or removal of ALL microorganisms — including bacterial spores — from an object or surface. Methods include autoclaving (steam under pressure, 121°C/15 min), dry heat (160°C/2 hr), ETO gas, and gamma radiation.")]),

    (5, "Define disinfection.",
     [A("Disinfection is the elimination of most pathogenic microorganisms (but NOT necessarily bacterial spores) from inanimate objects or surfaces. It is achieved using chemical agents (e.g., glutaraldehyde, hypochlorite, isopropyl alcohol). Levels: high, intermediate, and low-level disinfection.")]),

    (6, "What is PPE?",
     [A("Personal Protective Equipment (PPE) refers to protective gear worn by healthcare workers to create a barrier between themselves and infectious material. Includes gloves, surgical mask / N95 respirator, gown/apron, goggles/face shield, and shoe covers. Used according to transmission-based precaution type.")]),

    (7, "Define needlestick injury.",
     [A("A needlestick injury (NSI) is an accidental puncture of the skin by a needle or other sharp instrument (lancet, scalpel, broken glass) that has been in contact with blood or body fluids, potentially exposing the healthcare worker to bloodborne pathogens such as HIV, HBV, and HCV.")]),

    (8, "What is PEP?",
     [A("Post-Exposure Prophylaxis (PEP) is the short-term use of antiretroviral medications (or hepatitis B immunoglobulin/vaccine) taken after a potential exposure to HIV (or HBV) to prevent infection. For HIV, PEP must be started within 72 hours and continued for 28 days. Preferred regimen: TDF + FTC + RAL (or DTG).")]),

    (9, "What is antibiotic stewardship?",
     [A("Antibiotic stewardship is a coordinated program/strategy that promotes the appropriate use of antibiotics — right drug, right dose, right duration, right route — to improve patient outcomes, reduce antibiotic resistance, and minimize adverse effects including C. difficile infection.")]),

    (10, "Define antibiotic resistance.",
     [A("Antibiotic resistance is the ability of bacteria (or other microorganisms) to withstand the effects of an antibiotic that previously inhibited or killed them. Mechanisms include enzyme production (beta-lactamase), altered target sites, efflux pumps, and reduced permeability. It renders standard treatments ineffective.")]),

    (11, "What is ESBL?",
     [A("Extended-Spectrum Beta-Lactamase (ESBL) is an enzyme produced by certain gram-negative bacteria (e.g., Klebsiella pneumoniae, E. coli) that breaks down beta-lactam antibiotics including penicillins, cephalosporins, and aztreonam. ESBL-producing organisms are resistant to most beta-lactams; treatment of choice is carbapenems.")]),

    (12, "Define MDR.",
     [A("Multi-Drug Resistant (MDR) refers to a microorganism that is resistant to ≥1 agent in ≥3 or more antibiotic categories. Examples: MRSA, MDR-TB, MDR Pseudomonas. In ICU, MDR organisms are major causes of treatment failure and increased mortality.")]),

    (13, "What is enteral nutrition?",
     [A("Enteral nutrition (EN) is the delivery of liquid nutrients directly into the gastrointestinal tract (stomach or small intestine) via a feeding tube (nasogastric, orogastric, PEG, or jejunostomy tube) when the patient is unable to eat orally but has a functional gut.")]),

    (14, "What is parenteral nutrition?",
     [A("Parenteral nutrition (PN) is the intravenous delivery of nutrients (glucose, amino acids, lipids, vitamins, electrolytes, trace elements) directly into the bloodstream, bypassing the GI tract. Used when enteral feeding is not possible or contraindicated.")]),

    (15, "What is TPN?",
     [A("Total Parenteral Nutrition (TPN) is the IV administration of ALL of a patient's nutritional requirements — carbohydrates, proteins, fats, vitamins, electrolytes, and minerals — through a central venous catheter, completely bypassing the GI tract. Given when oral/enteral feeding is entirely contraindicated or not tolerated.")]),

    (16, "Define hypovolemia.",
     [A("Hypovolemia is a decrease in the circulating blood volume (intravascular volume depletion), most commonly due to hemorrhage, severe dehydration, burns, or fluid shifts. It leads to reduced cardiac output, hypotension, tachycardia, and impaired tissue perfusion.")]),

    (17, "Define dehydration.",
     [A("Dehydration is a deficit of total body water resulting from inadequate intake or excessive fluid loss (vomiting, diarrhea, fever, excessive sweating). It can be isotonic, hypotonic, or hypertonic. Clinically manifested by dry mucous membranes, decreased skin turgor, oliguria, and concentrated urine.")]),

    (18, "What is hyperkalemia?",
     [A("Hyperkalemia is an elevated serum potassium level >5.5 mEq/L. Common causes in ICU: renal failure, metabolic acidosis, cell lysis (rhabdomyolysis, hemolysis), excess K+ supplementation, or ACE inhibitors. Can cause fatal cardiac arrhythmias (peaked T waves, wide QRS, VF). Treatment: calcium gluconate, insulin + dextrose, sodium bicarbonate, kayexalate, dialysis.")]),

    (19, "What is hyponatremia?",
     [A("Hyponatremia is serum sodium <135 mEq/L. Causes: SIADH, heart failure, cirrhosis, hypothyroidism, excessive water intake. Symptoms: nausea, headache, confusion, seizures, coma (if severe/acute). Treatment: fluid restriction, hypertonic saline (in severe cases), treat underlying cause. Correct slowly to avoid osmotic demyelination syndrome.")]),

    (20, "Define crystalloid and colloid fluids.",
     [A("<b>Crystalloids:</b> IV solutions containing small dissolved molecules (electrolytes ± glucose) that freely cross capillary membranes. Examples: Normal saline (0.9% NaCl), Lactated Ringer's, 5% Dextrose. Used for volume replacement and electrolyte correction."),
      A("<b>Colloids:</b> IV solutions containing large molecules (proteins or starches) that remain in the intravascular space longer by exerting oncotic pressure. Examples: Human albumin, Dextran, Gelatin, Hydroxyethyl starch (HES). Used for plasma volume expansion.")]),
]

for num, question, ans_paras in one_mark_qs:
    bg = LIGHT_BLUE if num % 2 == 0 else GREEN_LIGHT
    story.append(q_box(num, question, ans_paras, bg=bg))
    story.append(SP())

story.append(PageBreak())

# ════════════════════════════════════════════════════════════════════════
# SECTION 2 – 2.5-MARK QUESTIONS
# ════════════════════════════════════════════════════════════════════════
story.append(unit_banner("⭐  SECTION 2 — 2.5-MARK QUESTIONS  (Short Notes)", bg=colors.HexColor("#166534")))
story.append(Spacer(1, 5*mm))

# Q1 – WHO 5 Moments
story.append(section_banner("Q1. WHO Five Moments of Hand Hygiene"))
story.append(Spacer(1,2*mm))
story.append(A("According to the WHO, hand hygiene must be performed at 5 specific moments during patient care:"))
data_5m = [
    ["Moment", "When", "Why"],
    ["1. Before patient contact", "Before touching a patient", "Protect patient from harmful germs on HCW's hands"],
    ["2. Before aseptic procedure", "Before any aseptic/clean procedure", "Protect patient from germs including from their own body"],
    ["3. After body fluid exposure", "After risk of exposure to body fluids", "Protect HCW from patient's germs"],
    ["4. After patient contact", "After touching patient", "Protect HCW and healthcare environment"],
    ["5. After touching patient surroundings", "After touching any object in patient zone", "Protect HCW and healthcare environment"],
]
t = Table(data_5m, colWidths=[40*mm, 60*mm, 70*mm])
t.setStyle(TableStyle([
    ("BACKGROUND",   (0,0), (-1,0), DARK_BLUE),
    ("TEXTCOLOR",    (0,0), (-1,0), WHITE),
    ("FONTNAME",     (0,0), (-1,0), "Helvetica-Bold"),
    ("FONTSIZE",     (0,0), (-1,-1), 8.5),
    ("ROWBACKGROUNDS", (0,1), (-1,-1), [GREY_BG, WHITE]),
    ("GRID",         (0,0), (-1,-1), 0.4, colors.HexColor("#cbd5e1")),
    ("VALIGN",       (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING",   (0,0), (-1,-1), 4),
    ("BOTTOMPADDING",(0,0), (-1,-1), 4),
    ("LEFTPADDING",  (0,0), (-1,-1), 6),
]))
story.append(t)
story.append(SP())

# Q2 – WHO 6 Steps
story.append(section_banner("Q2. WHO 6 Steps of Handwashing"))
story.append(A("Duration: 40–60 seconds with soap and water (20–30 sec with ABHR). Steps:"))
for s in [
    "Step 1 – Wet hands; apply soap. Palm to palm.",
    "Step 2 – Right palm over left dorsum (fingers interlaced); repeat.",
    "Step 3 – Palm to palm with fingers interlaced.",
    "Step 4 – Backs of fingers to opposing palms (fingers interlocked).",
    "Step 5 – Rotational rubbing of right thumb clasped in left palm; repeat.",
    "Step 6 – Rotational rubbing with clasped fingers of right hand in left palm; repeat. Rinse and dry with single-use towel.",
]:
    story.append(B(s))
story.append(SP())

# Q3 – Sterilization vs Disinfection
story.append(section_banner("Q3. Sterilization vs Disinfection"))
data_sd = [
    ["Feature", "Sterilization", "Disinfection"],
    ["Definition", "Destroys ALL microorganisms including spores", "Destroys most pathogens; spores may survive"],
    ["Spores", "Eliminated", "Not necessarily eliminated"],
    ["Methods", "Autoclaving, dry heat, ETO gas, gamma radiation", "Chemical agents (glutaraldehyde, bleach, alcohol)"],
    ["Use", "Surgical instruments, implants, IV fluids", "Surfaces, endoscopes, non-critical items"],
    ["Levels", "Single level (complete)", "High / Intermediate / Low level"],
    ["Example items", "Scalpels, needles, catheters", "Stethoscopes, BP cuffs, countertops"],
]
t = Table(data_sd, colWidths=[35*mm, 67*mm, 68*mm])
t.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,0), MED_BLUE),
    ("TEXTCOLOR",     (0,0), (-1,0), WHITE),
    ("FONTNAME",      (0,0), (-1,0), "Helvetica-Bold"),
    ("FONTSIZE",      (0,0), (-1,-1), 8.5),
    ("ROWBACKGROUNDS",(0,1), (-1,-1), [LIGHT_BLUE, WHITE]),
    ("GRID",          (0,0), (-1,-1), 0.4, colors.HexColor("#cbd5e1")),
    ("VALIGN",        (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING",    (0,0), (-1,-1), 4),
    ("BOTTOMPADDING", (0,0), (-1,-1), 4),
    ("LEFTPADDING",   (0,0), (-1,-1), 5),
]))
story.append(t)
story.append(SP())

# Q4 – Chain of Infection
story.append(section_banner("Q4. Chain of Infection"))
story.append(A("The Chain of Infection describes the 6 sequential links necessary for infection to occur. Breaking any one link prevents infection:"))
chain_items = [
    ("1. Infectious Agent", "The pathogen — bacteria, virus, fungus, parasite"),
    ("2. Reservoir", "Where the pathogen lives/multiplies — patient, staff, environment, equipment"),
    ("3. Portal of Exit", "How it leaves — respiratory secretions, blood, urine, feces, wound drainage"),
    ("4. Mode of Transmission", "Contact (direct/indirect), droplet, airborne, vehicle, vector"),
    ("5. Portal of Entry", "Broken skin, mucous membranes, respiratory/GI/GU tract, IV sites"),
    ("6. Susceptible Host", "Immunocompromised, elderly, post-surgical, malnourished patients"),
]
for link, desc in chain_items:
    story.append(BH(link + ":", desc))
story.append(Paragraph("<b>Nursing Implication:</b> IPC measures (hand hygiene, PPE, isolation, sterilization) are designed to break this chain.", note_style))
story.append(SP())

# Q5 – Standard Precautions
story.append(section_banner("Q5. Universal / Standard Precautions"))
story.append(A("Standard Precautions are the minimum level of infection prevention applied to ALL patients regardless of diagnosis. They treat blood, all body fluids, non-intact skin, and mucous membranes as potentially infectious. Components include:"))
for item in [
    "Hand hygiene — before and after every patient contact",
    "PPE — gloves, mask, gown, eye protection based on anticipated exposure",
    "Safe injection practices — one needle, one syringe, one patient",
    "Safe handling of sharps — proper disposal in puncture-resistant containers",
    "Respiratory hygiene / cough etiquette — masks for coughing patients",
    "Environmental cleaning and disinfection of patient care equipment",
    "Safe handling of soiled linen — bag at site, no shaking",
    "Waste management — segregation per biomedical waste rules",
]:
    story.append(B(item))
story.append(SP())

# Q6 – BMW Color Coding
story.append(section_banner("Q6. Biomedical Waste Color Coding"))
data_bmw = [
    ["Colour", "Container/Bag", "Waste Type", "Disposal"],
    ["YELLOW", "Bag / Container", "Human anatomical waste, animal body parts, blood-soaked items, chemical waste, expired medicines", "Incineration / Deep burial"],
    ["RED", "Bag / Container", "Contaminated waste (non-sharp): IV tubing, catheters, gloves, syringes (without needle)", "Autoclaving → shredding → landfill"],
    ["WHITE (Translucent)", "Puncture-proof container", "Sharps: needles, scalpels, blades, glass slides", "Autoclaving/chemical treatment → mutilation → landfill"],
    ["BLUE", "Cardboard box with blue marking", "Glassware, metallic implants, discarded medicines", "Disinfection → broken/crushed → landfill"],
]
t = Table(data_bmw, colWidths=[28*mm, 38*mm, 65*mm, 39*mm])
t.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,0), DARK_BLUE),
    ("TEXTCOLOR",     (0,0), (-1,0), WHITE),
    ("FONTNAME",      (0,0), (-1,0), "Helvetica-Bold"),
    ("BACKGROUND",    (0,1), (0,1), colors.HexColor("#fef08a")),
    ("BACKGROUND",    (0,2), (0,2), colors.HexColor("#fca5a5")),
    ("BACKGROUND",    (0,3), (0,3), colors.HexColor("#e2e8f0")),
    ("BACKGROUND",    (0,4), (0,4), colors.HexColor("#bfdbfe")),
    ("FONTSIZE",      (0,0), (-1,-1), 8),
    ("GRID",          (0,0), (-1,-1), 0.4, colors.HexColor("#94a3b8")),
    ("VALIGN",        (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING",    (0,0), (-1,-1), 4),
    ("BOTTOMPADDING", (0,0), (-1,-1), 4),
    ("LEFTPADDING",   (0,0), (-1,-1), 5),
]))
story.append(t)
story.append(SP())

# Q7 – NSI Management
story.append(section_banner("Q7. Needlestick Injury Management"))
story.append(A("Immediate first aid and follow-up steps after a needlestick or sharps injury:"))
for item in [
    "IMMEDIATELY: Do NOT suck the wound. Allow it to bleed freely.",
    "Wash wound thoroughly with soap and running water for ≥5 minutes.",
    "Apply antiseptic (povidone-iodine or 70% alcohol) — do not apply caustic agents.",
    "For eye/mouth splash: flush with large amounts of water or saline.",
    "REPORT to occupational health / infection control officer immediately.",
    "Document: time, nature of injury, source patient details, type of fluid/needle.",
    "Assess risk: type of needle (hollow > solid), depth, gloves worn, source patient HIV/HBV/HCV status.",
    "Baseline blood tests: HIV, HBsAg, HCV Ab of exposed HCW and source patient.",
    "PEP for HIV: Start within 72 hours (ideally <2 hours). Duration: 28 days.",
    "HBV: If HCW not vaccinated → give HBIG + HBV vaccine within 24 hours.",
    "Follow-up testing at 6 weeks, 3 months, 6 months.",
]:
    story.append(B(item))
story.append(SP())

# Q8 – Rational Antibiotic Use
story.append(section_banner("Q8. Rational Antibiotic Use"))
story.append(A("Rational antibiotic use means prescribing the right antibiotic, at the right dose, via the right route, for the right duration, to the right patient, based on evidence:"))
for item in [
    "Send cultures BEFORE starting antibiotics whenever possible.",
    "Choose narrow-spectrum over broad-spectrum unless critically ill.",
    "De-escalate therapy once culture and sensitivity (C&S) results are available.",
    "IV to oral (PO) switch as soon as patient is clinically stable.",
    "Avoid antibiotics for viral infections (common cold, flu).",
    "Follow local antibiogram and hospital formulary guidelines.",
    "Duration: shortest effective course — prevents resistance and side effects.",
    "Regular audit and feedback of antibiotic prescribing patterns.",
    "Multidisciplinary team approach: physician, pharmacist, microbiologist, nurse.",
]:
    story.append(B(item))
story.append(SP())

# Q9 – Empirical vs Definitive
story.append(section_banner("Q9. Empirical vs Definitive Antibiotic Therapy"))
data_ab = [
    ["Feature", "Empirical Therapy", "Definitive Therapy"],
    ["Definition", "Antibiotic started before culture results based on clinical judgment", "Antibiotic adjusted/chosen based on C&S test results"],
    ["Timing", "Immediately at diagnosis", "After 48–72 hours (culture results available)"],
    ["Spectrum", "Broad-spectrum", "Narrow-spectrum (targeted)"],
    ["Goal", "Rapid infection control to prevent deterioration", "Eliminate specific pathogen, minimize resistance"],
    ["Examples", "Pip-Tazo, Meropenem for sepsis", "Amoxicillin for MSSA based on culture"],
    ["Risk", "Overuse → resistance", "Delayed if cultures not sent or results delayed"],
]
t = Table(data_ab, colWidths=[35*mm, 67*mm, 68*mm])
t.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,0), MED_BLUE),
    ("TEXTCOLOR",     (0,0), (-1,0), WHITE),
    ("FONTNAME",      (0,0), (-1,0), "Helvetica-Bold"),
    ("FONTSIZE",      (0,0), (-1,-1), 8.5),
    ("ROWBACKGROUNDS",(0,1), (-1,-1), [LIGHT_BLUE, WHITE]),
    ("GRID",          (0,0), (-1,-1), 0.4, colors.HexColor("#cbd5e1")),
    ("VALIGN",        (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING",    (0,0), (-1,-1), 4),
    ("BOTTOMPADDING", (0,0), (-1,-1), 4),
    ("LEFTPADDING",   (0,0), (-1,-1), 5),
]))
story.append(t)
story.append(SP())

# Q10 – EN vs PN
story.append(section_banner("Q10. Enteral Nutrition vs Parenteral Nutrition"))
data_enp = [
    ["Feature", "Enteral Nutrition (EN)", "Parenteral Nutrition (PN)"],
    ["Route", "GI tract (NG, OG, PEG, J-tube)", "Intravenous (central or peripheral)"],
    ["Indication", "Functional GI tract, unable to eat orally", "Non-functional GI tract, ileus, obstruction, short bowel"],
    ["Cost", "Less expensive", "More expensive"],
    ["Infection risk", "Lower", "Higher (CLABSI risk)"],
    ["Gut integrity", "Maintains gut mucosal integrity", "Gut atrophy (villous atrophy) with prolonged use"],
    ["Complications", "Aspiration, tube displacement, diarrhea, refeeding syndrome", "Hyperglycemia, CLABSI, liver dysfunction, refeeding syndrome"],
    ["Preferred?", "Yes — always prefer if gut is functional ('If the gut works, use it')", "Only when EN is contraindicated or insufficient"],
]
t = Table(data_enp, colWidths=[35*mm, 65*mm, 70*mm])
t.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,0), colors.HexColor("#166534")),
    ("TEXTCOLOR",     (0,0), (-1,0), WHITE),
    ("FONTNAME",      (0,0), (-1,0), "Helvetica-Bold"),
    ("FONTSIZE",      (0,0), (-1,-1), 8.5),
    ("ROWBACKGROUNDS",(0,1), (-1,-1), [GREEN_LIGHT, WHITE]),
    ("GRID",          (0,0), (-1,-1), 0.4, colors.HexColor("#cbd5e1")),
    ("VALIGN",        (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING",    (0,0), (-1,-1), 4),
    ("BOTTOMPADDING", (0,0), (-1,-1), 4),
    ("LEFTPADDING",   (0,0), (-1,-1), 5),
]))
story.append(t)
story.append(SP())

# Q11 – Nutritional Assessment
story.append(section_banner("Q11. Nutritional Assessment"))
story.append(A("Nutritional assessment in ICU involves a structured evaluation to identify malnutrition risk and plan support:"))
for item in [
    "Anthropometric measurements: weight, height, BMI, mid-arm circumference, skinfold thickness.",
    "Biochemical parameters: serum albumin (<3.5 g/dL = malnutrition), prealbumin, transferrin, total protein, blood glucose, electrolytes, HbA1c.",
    "Clinical assessment: muscle wasting, edema, skin/hair/nail changes, wound healing.",
    "Dietary history: 24-hr recall, food frequency questionnaire.",
    "Screening tools: MUST (Malnutrition Universal Screening Tool), NRS-2002 (Nutritional Risk Screening) — NRS-2002 preferred in ICU.",
    "Functional assessment: hand grip strength, 6-min walk test.",
    "Indirect calorimetry (gold standard in ICU): measures actual energy expenditure via VO2 and VCO2.",
]:
    story.append(B(item))
story.append(SP())

# Q12 – Refeeding Syndrome
story.append(section_banner("Q12. Refeeding Syndrome"))
story.append(A("<b>Definition:</b> A potentially life-threatening metabolic disturbance occurring when nutrition is reintroduced too rapidly after prolonged starvation (>5 days), anorexia nervosa, or chronic malnutrition."))
story.append(Paragraph("<b>Pathophysiology:</b> Rapid glucose administration → insulin surge → intracellular shift of phosphate, potassium, magnesium → severe hypophosphatemia (hallmark), hypokalemia, hypomagnesemia, thiamine deficiency.", bullet_style))
story.append(Paragraph("<b>Clinical features:</b> Cardiac arrhythmias, heart failure, respiratory failure, seizures, confusion, muscle weakness, rhabdomyolysis, hemolytic anemia.", bullet_style))
story.append(Paragraph("<b>Prevention:</b>", bullet_style))
for item in [
    "Identify high-risk patients (BMI <16, minimal intake >10 days, low baseline electrolytes).",
    "Start feeding at 10 kcal/kg/day; increase slowly over 4–7 days.",
    "Supplement thiamine (100–300 mg IV) before starting feeds.",
    "Monitor and correct phosphate, potassium, magnesium daily.",
    "Restrict sodium; monitor fluid balance closely.",
]:
    story.append(B(item))
story.append(SP())

# Q13 – NG Tube Care
story.append(section_banner("Q13. NG Tube Care"))
for item in [
    "Confirm placement before EVERY feed (X-ray = gold standard; pH <5.5 of aspirate; auscultation less reliable).",
    "Mark the tube at insertion point with marker pen; check external length each shift.",
    "Secure tube firmly with hypoallergenic tape; change tape daily or when loose.",
    "Flush with 30 mL water before and after each feed and after medications.",
    "Keep head of bed elevated 30–45° during and for 1 hour after feeds (prevents aspiration).",
    "Check gastric residual volume (GRV) every 4 hours: hold feed if GRV >200–500 mL (as per protocol).",
    "Provide nasal and oral care every 2–4 hours; lubricate nostrils.",
    "Rotate nostril used during replacement; change tube as per hospital policy (PVC: 7–10 days; silicone/polyurethane: 30 days).",
    "Document: tube length, aspirate pH, GRV, feed volume, tolerance.",
]:
    story.append(B(item))
story.append(SP())

# Q14 – NG Tube Placement Verification
story.append(section_banner("Q14. Methods of Checking NG Tube Placement"))
data_ng = [
    ["Method", "Details", "Reliability"],
    ["Chest X-ray", "Tube tip seen below diaphragm in gastric shadow", "Gold Standard — most accurate"],
    ["pH testing of aspirate", "pH ≤5.5 indicates gastric placement", "Highly reliable; simple bedside test"],
    ["Capnography/CO2 detector", "CO2 detected = tracheal, not gastric placement", "Useful to rule out tracheal placement"],
    ["Whoosh test (auscultation)", "Air injected → auscultate epigastrium", "Unreliable — NOT recommended as sole method"],
    ["Measuring tube length", "External marking checked against insertion length", "Quick check only; not confirmatory"],
]
t = Table(data_ng, colWidths=[40*mm, 85*mm, 45*mm])
t.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,0), DARK_BLUE),
    ("TEXTCOLOR",     (0,0), (-1,0), WHITE),
    ("FONTNAME",      (0,0), (-1,0), "Helvetica-Bold"),
    ("FONTSIZE",      (0,0), (-1,-1), 8.5),
    ("ROWBACKGROUNDS",(0,1), (-1,-1), [GREY_BG, WHITE]),
    ("GRID",          (0,0), (-1,-1), 0.4, colors.HexColor("#cbd5e1")),
    ("VALIGN",        (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING",    (0,0), (-1,-1), 4),
    ("BOTTOMPADDING", (0,0), (-1,-1), 4),
    ("LEFTPADDING",   (0,0), (-1,-1), 5),
]))
story.append(t)
story.append(SP())

# Q15 – Fluid Balance Chart
story.append(section_banner("Q15. Fluid Balance Chart"))
story.append(A("A fluid balance chart is a nursing record that documents all fluid intake and output over a 24-hour period to assess a patient's hydration status."))
story.append(Paragraph("<b>Intake (record all):</b>", bullet_style))
for i in ["IV fluids (type, rate, volume)", "Oral fluids / enteral feeds", "Blood and blood products", "Drugs in fluid diluents"]:
    story.append(B(i))
story.append(Paragraph("<b>Output (record all):</b>", bullet_style))
for o in ["Urine output (normal: 0.5–1 mL/kg/hr in ICU)", "NG aspirate, vomit", "Wound drainage, surgical drains", "Stool (estimate if liquid)", "Insensible losses (400–600 mL/day; more with fever: +10% per 1°C)"]:
    story.append(B(o))
story.append(Paragraph("<b>Fluid balance = Total Intake − Total Output</b>. Positive balance = fluid overload risk. Negative balance = dehydration risk.", note_style))
story.append(SP())

# Q16 – Monitoring during IV fluid therapy
story.append(section_banner("Q16. Monitoring During IV Fluid Therapy"))
for item in [
    "Vital signs: BP, HR, RR, SpO2, temperature — hourly in unstable patients.",
    "Urine output: hourly via catheter; target ≥0.5 mL/kg/hr.",
    "Fluid balance: 4-hourly or 8-hourly running total; 24-hour balance.",
    "Serum electrolytes (Na+, K+, Cl-, HCO3-) — especially with large volumes.",
    "Signs of fluid overload: edema (peripheral/pulmonary), raised JVP, crackles on auscultation, S3 gallop.",
    "Signs of under-hydration: poor skin turgor, dry mucosa, concentrated urine (SG >1.020), falling CVP.",
    "CVP monitoring (normal: 5–10 cmH2O) — guides volume replacement.",
    "Blood glucose monitoring: especially with dextrose-containing fluids.",
    "IV site inspection: check for phlebitis, infiltration, occlusion every 2–4 hours.",
    "Weight monitoring: daily weight in ICU (1 kg ≈ 1 L fluid).",
]:
    story.append(B(item))
story.append(SP())

# Q17 – Sodium and Potassium Imbalance
story.append(section_banner("Q17. Sodium and Potassium Imbalance"))
story.append(Paragraph("<b>SODIUM IMBALANCES</b>", bold_inline))
data_na = [
    ["", "Hyponatremia (Na+ <135)", "Hypernatremia (Na+ >145)"],
    ["Causes", "SIADH, CHF, cirrhosis, polydipsia, diuretics", "Dehydration, DI, excess Na+ intake, fever"],
    ["Symptoms", "Nausea, headache, confusion, seizures, coma", "Thirst, dry mucosa, confusion, seizures, coma"],
    ["Treatment", "Fluid restriction; hypertonic saline in severe cases; treat cause", "Free water replacement; treat cause; correct slowly"],
]
t = Table(data_na, colWidths=[30*mm, 70*mm, 70*mm])
t.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,0), MED_BLUE),
    ("TEXTCOLOR",     (0,0), (-1,0), WHITE),
    ("FONTNAME",      (0,0), (-1,0), "Helvetica-Bold"),
    ("FONTSIZE",      (0,0), (-1,-1), 8.5),
    ("ROWBACKGROUNDS",(0,1), (-1,-1), [LIGHT_BLUE, WHITE]),
    ("GRID",          (0,0), (-1,-1), 0.4, colors.HexColor("#cbd5e1")),
    ("VALIGN",        (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING",    (0,0), (-1,-1), 3),
    ("BOTTOMPADDING", (0,0), (-1,-1), 3),
    ("LEFTPADDING",   (0,0), (-1,-1), 5),
]))
story.append(t)
story.append(Spacer(1, 4))
story.append(Paragraph("<b>POTASSIUM IMBALANCES</b>", bold_inline))
data_k = [
    ["", "Hypokalemia (K+ <3.5)", "Hyperkalemia (K+ >5.5)"],
    ["Causes", "Diarrhea, vomiting, diuretics, alkalosis, insulin", "Renal failure, acidosis, cell lysis, K+-sparing diuretics, ACEi"],
    ["Symptoms", "Muscle weakness, cramps, constipation, arrhythmias (U waves, flat T)", "Weakness, paresthesia, fatal arrhythmias (peaked T, wide QRS, VF)"],
    ["Treatment", "Oral/IV KCl; slow IV infusion (max 20 mEq/hr via central line); monitor ECG", "Calcium gluconate (cardiac protection), Insulin+Dextrose, NaHCO3, kayexalate, dialysis"],
]
t = Table(data_k, colWidths=[30*mm, 70*mm, 70*mm])
t.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,0), GOLD),
    ("TEXTCOLOR",     (0,0), (-1,0), WHITE),
    ("FONTNAME",      (0,0), (-1,0), "Helvetica-Bold"),
    ("FONTSIZE",      (0,0), (-1,-1), 8.5),
    ("ROWBACKGROUNDS",(0,1), (-1,-1), [LIGHT_GOLD, WHITE]),
    ("GRID",          (0,0), (-1,-1), 0.4, colors.HexColor("#cbd5e1")),
    ("VALIGN",        (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING",    (0,0), (-1,-1), 3),
    ("BOTTOMPADDING", (0,0), (-1,-1), 3),
    ("LEFTPADDING",   (0,0), (-1,-1), 5),
]))
story.append(t)
story.append(SP())

story.append(PageBreak())

# ════════════════════════════════════════════════════════════════════════
# SECTION 3 – 5-MARK QUESTIONS
# ════════════════════════════════════════════════════════════════════════
story.append(unit_banner("⭐  SECTION 3 — 5-MARK QUESTIONS  (Long Answers)", bg=colors.HexColor("#7c2d12")))
story.append(Spacer(1, 5*mm))
story.append(Paragraph("<i>Unit 3 — Infection Prevention &amp; Antibiotic Stewardship</i>",
    ParagraphStyle("unit_label", fontName="Helvetica-BoldOblique", fontSize=11, textColor=RED_DARK, spaceBefore=0, spaceAfter=6)))

# 5M Q1 – IPC Principles
story.append(section_banner("Q1. Principles of Infection Prevention and Control (IPC) in ICU", bg=RED_DARK))
story.append(A("IPC in the ICU is essential because critically ill patients are highly susceptible to infections. The core principles are:"))
principles = [
    ("1. Standard Precautions", "Applied to ALL patients regardless of diagnosis. Treat every patient's blood and body fluids as potentially infectious. Includes hand hygiene, PPE, safe sharp disposal, respiratory hygiene, and environmental cleaning."),
    ("2. Hand Hygiene", "The single most effective IPC measure. Follow WHO 5 Moments and 6 Steps. Use ABHR for routine care; soap and water when hands are visibly soiled or after C. difficile contact."),
    ("3. Transmission-Based Precautions", "Added precautions for known/suspected infections:\n• Contact precautions: MRSA, VRE, C. diff — gloves + gown\n• Droplet precautions: influenza, pertussis — surgical mask\n• Airborne precautions: TB, measles, chickenpox — N95 + negative pressure room"),
    ("4. Use of PPE", "Appropriate selection and correct donning/doffing of gloves, mask, gown, goggles. Failure to correctly doff PPE is a major cause of self-contamination."),
    ("5. Environmental Cleaning & Disinfection", "Regular cleaning of patient surfaces (bed rails, call bells, monitors) with approved disinfectants. Terminal cleaning after patient discharge. Focus on high-touch areas."),
    ("6. Sterilization of Equipment", "All critical (invasive) items must be sterilized. Semi-critical items require high-level disinfection. Non-critical items: low-level disinfection."),
    ("7. Waste Management", "Proper segregation per biomedical waste guidelines. Sharp disposal in puncture-proof containers. Color-coded bags for different waste categories."),
    ("8. Surveillance", "Ongoing monitoring of infection rates (VAP, CAUTI, CLABSI, SSI). Identify outbreaks early. Report to infection control committee."),
    ("9. Isolation Policy", "Patients with MDR organisms or highly contagious infections in dedicated isolation rooms with appropriate signage and PPE precautions."),
    ("10. Staff Education & Training", "Regular training on hand hygiene, PPE use, aseptic technique. Occupational health surveillance including immunization (HBV, influenza) and post-exposure management."),
]
for title, content in principles:
    story.append(Paragraph(f"<b>{title}:</b> {content}", bullet_style))
story.append(SP())

# 5M Q2 – HAI Prevention
story.append(section_banner("Q2. Prevention of Healthcare-Associated Infections (HAIs)", bg=RED_DARK))
story.append(A("HAIs are the most common complications of hospital care. Key prevention bundles:"))
story.append(Paragraph("<b>VAP (Ventilator-Associated Pneumonia) Bundle:</b>", bold_inline))
for i in ["HOB 30–45°", "Daily sedation vacation + spontaneous breathing trial", "Oral care with chlorhexidine 0.12% q4–6h", "DVT prophylaxis", "Peptic ulcer prophylaxis", "Use of subglottic suction ETT"]:
    story.append(B(i))
story.append(Paragraph("<b>CAUTI (Catheter-Associated UTI) Bundle:</b>", bold_inline))
for i in ["Avoid unnecessary catheterization", "Aseptic insertion technique", "Maintain closed drainage system", "Secure catheter to prevent movement", "Daily review and early removal"]:
    story.append(B(i))
story.append(Paragraph("<b>CLABSI (Central Line Blood Stream Infection) Bundle:</b>", bold_inline))
for i in ["Hand hygiene before insertion", "Maximal sterile barrier precautions", "Chlorhexidine skin antisepsis", "Subclavian vein preferred over femoral", "Daily review of line necessity; remove when no longer needed"]:
    story.append(B(i))
story.append(Paragraph("<b>SSI (Surgical Site Infection) Prevention:</b>", bold_inline))
for i in ["Pre-op antibiotic prophylaxis within 60 min of incision", "Normothermia, normoglycemia", "Appropriate hair removal (clippers, not razors)", "Aseptic surgical technique, sterile drapes"]:
    story.append(B(i))
story.append(SP())

# 5M Q3 – Standard + Transmission Precautions
story.append(section_banner("Q3. Standard and Transmission-Based Precautions", bg=RED_DARK))
story.append(A("These are the two tiers of precautions recommended by CDC and WHO for all healthcare settings:"))
story.append(Paragraph("<b>TIER 1 — Standard Precautions</b> (applied to ALL patients):", bold_inline))
for i in ["Hand hygiene (WHO 5 moments)", "PPE based on exposure risk", "Safe injection practices", "Respiratory hygiene", "Safe sharps handling", "Sterile equipment and environment"]:
    story.append(B(i))
story.append(Paragraph("<b>TIER 2 — Transmission-Based Precautions</b> (added for specific infections):", bold_inline))
data_tbp = [
    ["Type", "Disease Examples", "PPE Required", "Room"],
    ["Contact", "MRSA, VRE, C. diff, wound infections, scabies", "Gloves + gown (on room entry)", "Single room preferred"],
    ["Droplet", "Influenza, COVID-19, pertussis, meningitis, mumps", "Surgical mask within 1 m", "Single room; door may be open"],
    ["Airborne", "TB, measles, varicella, disseminated zoster", "N95 respirator; eye protection", "Negative pressure isolation room; door CLOSED"],
]
t = Table(data_tbp, colWidths=[28*mm, 60*mm, 50*mm, 32*mm])
t.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,0), RED_DARK),
    ("TEXTCOLOR",     (0,0), (-1,0), WHITE),
    ("FONTNAME",      (0,0), (-1,0), "Helvetica-Bold"),
    ("FONTSIZE",      (0,0), (-1,-1), 8.5),
    ("ROWBACKGROUNDS",(0,1), (-1,-1), [RED_LIGHT, WHITE]),
    ("GRID",          (0,0), (-1,-1), 0.4, colors.HexColor("#cbd5e1")),
    ("VALIGN",        (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING",    (0,0), (-1,-1), 4),
    ("BOTTOMPADDING", (0,0), (-1,-1), 4),
    ("LEFTPADDING",   (0,0), (-1,-1), 5),
]))
story.append(t)
story.append(SP())

# 5M Q4 – Sterilization & Disinfection Methods
story.append(section_banner("Q4. Sterilization and Disinfection Methods in ICU", bg=RED_DARK))
story.append(Paragraph("<b>STERILIZATION METHODS:</b>", bold_inline))
data_ster = [
    ["Method", "Temperature / Agent", "Time", "Use"],
    ["Autoclaving (moist heat)", "121°C, 15 psi", "15–20 min", "Metal instruments, linens, dressings, glassware"],
    ["Dry heat (hot air oven)", "160°C", "2 hours", "Glassware, oils, powders (moisture-sensitive items)"],
    ["Ethylene Oxide (ETO) gas", "37–55°C", "4–12 hours", "Heat/moisture-sensitive items: cameras, plastics, electronics"],
    ["Gamma/E-beam radiation", "Industrial use", "Variable", "Disposable items: syringes, catheters, sutures"],
    ["Plasma (H2O2)", "50–55°C", "75 min", "Delicate endoscopes and instruments"],
]
t = Table(data_ster, colWidths=[42*mm, 36*mm, 24*mm, 68*mm])
t.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,0), DARK_BLUE),
    ("TEXTCOLOR",     (0,0), (-1,0), WHITE),
    ("FONTNAME",      (0,0), (-1,0), "Helvetica-Bold"),
    ("FONTSIZE",      (0,0), (-1,-1), 8.5),
    ("ROWBACKGROUNDS",(0,1), (-1,-1), [LIGHT_BLUE, WHITE]),
    ("GRID",          (0,0), (-1,-1), 0.4, colors.HexColor("#cbd5e1")),
    ("VALIGN",        (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING",    (0,0), (-1,-1), 4),
    ("BOTTOMPADDING", (0,0), (-1,-1), 4),
    ("LEFTPADDING",   (0,0), (-1,-1), 5),
]))
story.append(t)
story.append(Spacer(1,4))
story.append(Paragraph("<b>DISINFECTION — Spaulding Classification:</b>", bold_inline))
data_dis = [
    ["Level", "Items (Spaulding)", "Agents Used"],
    ["High-level disinfection", "Semi-critical items (endoscopes, respiratory therapy equipment)", "Glutaraldehyde 2%, ortho-phthalaldehyde (OPA), hydrogen peroxide 6%"],
    ["Intermediate-level", "Semi-critical items (thermometers, laryngoscopes)", "70% isopropyl/ethyl alcohol, iodophors, phenolics"],
    ["Low-level disinfection", "Non-critical items (BP cuffs, stethoscopes, bed rails)", "Quaternary ammonium compounds, dilute bleach"],
]
t = Table(data_dis, colWidths=[42*mm, 68*mm, 60*mm])
t.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,0), MED_BLUE),
    ("TEXTCOLOR",     (0,0), (-1,0), WHITE),
    ("FONTNAME",      (0,0), (-1,0), "Helvetica-Bold"),
    ("FONTSIZE",      (0,0), (-1,-1), 8.5),
    ("ROWBACKGROUNDS",(0,1), (-1,-1), [LIGHT_BLUE, WHITE]),
    ("GRID",          (0,0), (-1,-1), 0.4, colors.HexColor("#cbd5e1")),
    ("VALIGN",        (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING",    (0,0), (-1,-1), 4),
    ("BOTTOMPADDING", (0,0), (-1,-1), 4),
    ("LEFTPADDING",   (0,0), (-1,-1), 5),
]))
story.append(t)
story.append(SP())

# 5M Q5 – NSI Prevention & Management
story.append(section_banner("Q5. Prevention and Management of Needlestick Injury (NSI)", bg=RED_DARK))
story.append(Paragraph("<b>PREVENTION:</b>", bold_inline))
for i in [
    "Never recap needles after use (most NSIs occur during recapping).",
    "Use safety-engineered devices (retractable needles, needleless IV systems).",
    "Dispose sharps immediately in puncture-resistant sharps containers at point of use.",
    "Never overfill sharps containers (fill only to 3/4 capacity).",
    "Wear appropriate PPE (gloves, gown) when handling sharps.",
    "Proper training on safe injection technique.",
    "HBV vaccination for all healthcare workers.",
    "Adequate lighting during procedures; avoid rushing.",
]:
    story.append(B(i))
story.append(Paragraph("<b>MANAGEMENT (step-by-step):</b>", bold_inline))
for i in [
    "Step 1: First aid — bleed freely, wash with soap & water ≥5 min, apply antiseptic.",
    "Step 2: Report immediately to occupational health/infection control.",
    "Step 3: Document — time, device, depth, body part, source patient.",
    "Step 4: Assess source patient for HIV, HBsAg, HCV Ab (with consent).",
    "Step 5: Baseline serology of HCW — HIV, HBsAg, HCV Ab.",
    "Step 6: HIV PEP within 72 hours (preferably <2 hours) × 28 days.",
    "Step 7: HBV — if unvaccinated: HBIG + vaccine within 24 hrs.",
    "Step 8: Follow-up at 6 weeks, 3 months, 6 months.",
]:
    story.append(B(i))
story.append(SP())

# 5M Q6 – PEP for HIV
story.append(section_banner("Q6. Post-Exposure Prophylaxis (PEP) for HIV", bg=RED_DARK))
story.append(A("PEP is the use of antiretroviral drugs after a potential HIV exposure to prevent infection. Key principles:"))
story.append(Paragraph("<b>Indications:</b> Needlestick injury, mucous membrane/eye splash with HIV+ source; sexual assault; unprotected sex with HIV+ partner.", bullet_style))
story.append(Paragraph("<b>Time window:</b> Must start within 72 hours. Earlier = more effective (ideally within 2 hours). NOT effective if started after 72 hours.", bullet_style))
story.append(Paragraph("<b>Duration:</b> 28 days (full course; do NOT stop early).", bullet_style))
story.append(Paragraph("<b>Preferred regimen (WHO/NACO):</b>", bullet_style))
for r in [
    "TDF (Tenofovir) 300 mg + FTC (Emtricitabine) 200 mg + RAL (Raltegravir) 400 mg BD, OR",
    "TDF 300 mg + 3TC (Lamivudine) 300 mg + DTG (Dolutegravir) 50 mg OD",
]:
    story.append(B(r))
story.append(Paragraph("<b>Monitoring during PEP:</b>", bullet_style))
for m in ["Adherence counseling — stress importance of completing 28-day course.", "Side effects: nausea, headache, fatigue — can be managed symptomatically.", "Baseline and repeat HIV test at 6 weeks, 3 months, 6 months.", "Renal function test (TDF monitoring), blood glucose.", "HIV antibody test at 4 weeks (4th generation test)."]:
    story.append(B(m))
story.append(Paragraph("<b>Note:</b> Patient should use condoms and avoid blood/organ donation during and 3 months post-PEP. Pregnancy test in women before starting.", note_style))
story.append(SP())

# 5M Q7 – Antibiotic Stewardship
story.append(section_banner("Q7. Principles of Antibiotic Stewardship", bg=RED_DARK))
story.append(A("Antibiotic Stewardship Programs (ASPs) are organized, systematic efforts to optimize antibiotic use with the goals of improving patient outcomes, reducing resistance, and minimizing adverse events. Core principles:"))
for p in [
    ("Right Drug", "Choose based on most likely organism, local antibiogram, culture results. Prefer narrow-spectrum."),
    ("Right Dose", "Adequate therapeutic dose to achieve MIC. Under-dosing promotes resistance. Dose-adjust for renal/hepatic impairment."),
    ("Right Duration", "Shortest effective course. Most infections respond in 5–7 days. Prolonged therapy increases resistance and C. diff risk."),
    ("Right Route", "IV to oral switch as soon as patient is stable and GI tract is functional."),
    ("De-escalation", "Review antibiotics at 48–72 hrs once C&S results available; switch to narrower spectrum."),
    ("Culture before antibiotics", "Blood cultures x2, urine, wound swab, BAL sent before first dose whenever possible."),
    ("Antimicrobial cycling / mixing", "Rotate antibiotic classes to reduce selective pressure in ICU."),
    ("Education", "Regular training of prescribers on rational antibiotic use."),
    ("Audit & Feedback", "Monitor antibiotic use (DDD — defined daily dose), resistance patterns, C. diff rates; feedback to clinicians."),
    ("Multidisciplinary team", "Infectious disease physician, clinical pharmacist, microbiologist, infection control nurse."),
]:
    story.append(BH(p[0] + ":", p[1]))
story.append(SP())

# 5M Q8 – Antibiotic Resistance
story.append(section_banner("Q8. Causes and Prevention of Antibiotic Resistance", bg=RED_DARK))
story.append(Paragraph("<b>CAUSES:</b>", bold_inline))
for c in [
    "Overuse and misuse of antibiotics (unnecessary prescriptions for viral infections, self-medication).",
    "Incomplete courses of treatment — surviving bacteria develop resistance.",
    "Sub-therapeutic dosing — insufficient drug levels allow selection of resistant mutants.",
    "Agricultural/veterinary overuse — antibiotics in livestock → resistance genes enter food chain.",
    "Poor IPC — spread of resistant organisms in hospitals (MRSA, MDR-TB, CRE, ESBL).",
    "Horizontal gene transfer — bacteria share resistance genes via plasmids.",
    "Inadequate diagnostic facilities — empirical prescribing without culture.",
]:
    story.append(B(c))
story.append(Paragraph("<b>PREVENTION:</b>", bold_inline))
for p in [
    "Prescribe antibiotics only when indicated; send cultures first.",
    "Follow ASP guidelines; de-escalate based on culture.",
    "Ensure patient compliance with full course.",
    "Strict IPC measures to prevent spread of resistant organisms.",
    "Isolate MDR patients; contact precautions.",
    "Surveillance of resistance patterns — local antibiogram.",
    "Educate public: no self-medication, complete courses.",
    "Develop new antibiotics and alternative treatments (phage therapy, bacteriocins).",
    "Regulate antibiotic use in agriculture.",
]:
    story.append(B(p))
story.append(SP())

# 5M Q9 – Culture & Sensitivity
story.append(section_banner("Q9. Role of Culture and Sensitivity Test in Antibiotic Selection", bg=RED_DARK))
story.append(A("Culture and Sensitivity (C&S) testing identifies the causative organism and determines which antibiotics can effectively treat it. Critical in ICU for targeted therapy."))
story.append(Paragraph("<b>Steps in C&S testing:</b>", bold_inline))
for s in [
    "Collect appropriate sample before antibiotic administration: blood, urine, sputum, wound swab, BAL, CSF.",
    "Transport to microbiology lab within 1–2 hours; use appropriate culture media.",
    "Culture: aerobic and anaerobic incubation (blood culture bottles); 24–72 hours for growth.",
    "Gram stain: immediate preliminary guidance on gram-positive vs gram-negative organisms.",
    "Sensitivity (Kirby-Bauer disc diffusion / MIC): determines antibiotic susceptibility pattern.",
    "Results reported as S (Sensitive), I (Intermediate), R (Resistant).",
    "MIC (Minimum Inhibitory Concentration): lowest antibiotic concentration that inhibits growth.",
]:
    story.append(B(s))
story.append(Paragraph("<b>Clinical application:</b>", bold_inline))
for a in [
    "Start empirical broad-spectrum antibiotics in sepsis immediately after cultures.",
    "At 48–72 hrs: review culture results → de-escalate to narrow-spectrum targeted therapy.",
    "Avoids unnecessary broad-spectrum use → reduces resistance and C. diff risk.",
    "Guides antibiotic dose: high MIC → higher dose may be needed.",
]:
    story.append(B(a))
story.append(SP())

story.append(PageBreak())

# UNIT 4 – 5 mark questions
story.append(Paragraph("<i>Unit 4 — Nutrition &amp; Fluid Management</i>",
    ParagraphStyle("unit_label2", fontName="Helvetica-BoldOblique", fontSize=11, textColor=GREEN_DARK, spaceBefore=0, spaceAfter=6)))

# 5M Q10 – Nutritional Support Methods
story.append(section_banner("Q10. Methods of Nutritional Support in Critically Ill Patients", bg=GREEN_DARK))
story.append(A("Adequate nutrition in the ICU reduces complications, supports immunity, promotes wound healing, and decreases ventilator dependence. Methods:"))
story.append(Paragraph("<b>1. Oral Feeding:</b>", bold_inline))
story.append(Paragraph("Preferred if patient is awake, alert, and able to swallow safely. Enriched diet with protein supplements.", a_style))
story.append(Paragraph("<b>2. Enteral Nutrition (EN):</b>", bold_inline))
for e in [
    "Indicated when oral feeding is not possible but GI tract is functional.",
    "Routes: Nasogastric (NG), Orogastric (OG), Nasojejunal (NJ), PEG (Percutaneous Endoscopic Gastrostomy), PEJ.",
    "Bolus feeding vs. continuous infusion (continuous preferred in ICU — better tolerance).",
    "Start early EN within 24–48 hours of ICU admission (early EN improves outcomes).",
    "Standard polymeric formulas; disease-specific formulas for renal/hepatic/diabetic patients.",
]:
    story.append(B(e))
story.append(Paragraph("<b>3. Parenteral Nutrition (PN):</b>", bold_inline))
for p in [
    "When EN is contraindicated (ileus, obstruction, high-output fistula, bowel ischemia).",
    "Total PN (TPN) via central line; Peripheral PN via peripheral IV (limited — max 3 days).",
    "Start PN if patient unable to tolerate EN by day 3–7 (ESPEN/ASPEN guidelines).",
]:
    story.append(B(p))
story.append(Paragraph("<b>4. Supplemental PN:</b>", bold_inline))
story.append(Paragraph("PN added to supplement EN when EN alone cannot meet nutritional goals.", a_style))
story.append(Paragraph("<b>Caloric targets in ICU:</b> 25–30 kcal/kg/day; Protein: 1.2–2 g/kg/day. In acute phase: permissive underfeeding (15–20 kcal/kg/day) to avoid overfeeding harms.", note_style))
story.append(SP())

# 5M Q11 – EN vs PN (detailed)
story.append(section_banner("Q11. Enteral Nutrition vs Parenteral Nutrition", bg=GREEN_DARK))
data_envpn = [
    ["Feature", "Enteral Nutrition", "Parenteral Nutrition"],
    ["Route", "GI tract — NG/OG/PEG/NJ tube", "Intravenous — central or peripheral"],
    ["Prerequisite", "Functioning GI tract", "Non-functional or inaccessible GI tract"],
    ["Gut integrity", "Maintains mucosal barrier, prevents bacterial translocation", "Gut atrophy, villous shortening with prolonged use"],
    ["Immune function", "Preserves GALT (gut-associated lymphoid tissue)", "Immune function less well maintained"],
    ["Cost", "Inexpensive (Rs. 200–800/day)", "Expensive (Rs. 1,500–5,000+/day)"],
    ["Infection risk", "Low (aspiration pneumonia is a risk)", "High (CLABSI risk with central line)"],
    ["Metabolic complications", "Diarrhea, constipation, aspiration, high GRV", "Hyperglycemia, hyperlipidemia, liver dysfunction"],
    ["Refeeding syndrome", "Can occur", "More likely with aggressive PN"],
    ["Timing", "Within 24–48 hrs of ICU admission", "Day 3–7 if EN not tolerated"],
    ["Golden rule", "\"If the gut works — USE IT\"", "Last resort when EN is contraindicated"],
]
t = Table(data_envpn, colWidths=[40*mm, 65*mm, 65*mm])
t.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,0), GREEN_DARK),
    ("TEXTCOLOR",     (0,0), (-1,0), WHITE),
    ("FONTNAME",      (0,0), (-1,0), "Helvetica-Bold"),
    ("FONTSIZE",      (0,0), (-1,-1), 8.5),
    ("ROWBACKGROUNDS",(0,1), (-1,-1), [GREEN_LIGHT, WHITE]),
    ("GRID",          (0,0), (-1,-1), 0.4, colors.HexColor("#cbd5e1")),
    ("VALIGN",        (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING",    (0,0), (-1,-1), 4),
    ("BOTTOMPADDING", (0,0), (-1,-1), 4),
    ("LEFTPADDING",   (0,0), (-1,-1), 5),
]))
story.append(t)
story.append(SP())

# 5M Q12 – TPN
story.append(section_banner("Q12. TPN: Indications, Advantages and Complications", bg=GREEN_DARK))
story.append(Paragraph("<b>INDICATIONS for TPN:</b>", bold_inline))
for i in [
    "Non-functional GI tract: ileus, bowel obstruction, intestinal ischemia.",
    "Short bowel syndrome (insufficient absorptive surface).",
    "High-output enterocutaneous fistula (EN increases fistula output).",
    "Severe malabsorption (Crohn's, radiation enteritis).",
    "Post-op bowel surgery when EN cannot be started within 7 days.",
    "Inability to tolerate or meet nutritional needs via EN.",
]:
    story.append(B(i))
story.append(Paragraph("<b>COMPOSITION of TPN ('All-in-one' bag):</b>", bold_inline))
for c in ["Carbohydrates: 50–60% of calories (50% dextrose solution)", "Proteins: 15–20% (amino acid solutions: 8.5–15%)", "Fats: 30% (lipid emulsion: 10–20% intralipid)", "Electrolytes: Na+, K+, Ca2+, Mg2+, Phosphate", "Vitamins: water-soluble and fat-soluble", "Trace elements: Zn, Cu, Cr, Mn, Se", "Water: sufficient volume for fluid balance"]:
    story.append(B(c))
story.append(Paragraph("<b>ADVANTAGES:</b>", bold_inline))
for a in ["Delivers 100% nutritional requirements IV.", "No GI tract needed.", "Precise caloric control.", "Can be tailored to patient needs (renal, hepatic failure)."]:
    story.append(B(a))
story.append(Paragraph("<b>COMPLICATIONS:</b>", bold_inline))
data_tpnc = [
    ["Category", "Complications"],
    ["Infectious", "CLABSI (most serious) — fever, rigors, positive blood culture"],
    ["Metabolic", "Hyperglycemia (most common), refeeding syndrome, hyperlipidemia, electrolyte imbalances"],
    ["GI/Hepatic", "Hepatic steatosis, cholestasis, acalculous cholecystitis (gut rest → bile stasis)"],
    ["Mechanical", "Pneumothorax, hemothorax (central line insertion), air embolism, catheter occlusion"],
    ["Nutritional", "Deficiency of trace elements, essential fatty acids if not added"],
]
t = Table(data_tpnc, colWidths=[35*mm, 135*mm])
t.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,0), GREEN_DARK),
    ("TEXTCOLOR",     (0,0), (-1,0), WHITE),
    ("FONTNAME",      (0,0), (-1,0), "Helvetica-Bold"),
    ("FONTSIZE",      (0,0), (-1,-1), 8.5),
    ("ROWBACKGROUNDS",(0,1), (-1,-1), [GREEN_LIGHT, WHITE]),
    ("GRID",          (0,0), (-1,-1), 0.4, colors.HexColor("#cbd5e1")),
    ("VALIGN",        (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING",    (0,0), (-1,-1), 4),
    ("BOTTOMPADDING", (0,0), (-1,-1), 4),
    ("LEFTPADDING",   (0,0), (-1,-1), 5),
]))
story.append(t)
story.append(SP())

# 5M Q13 – Enteral Feeding Procedure
story.append(section_banner("Q13. Enteral Feeding Procedure", bg=GREEN_DARK))
story.append(Paragraph("<b>Equipment:</b> NG tube (10–14 Fr), 50 mL syringe, lubricant, pH strips, stethoscope, feed formula, pump/bag set.", a_style))
story.append(Paragraph("<b>Procedure:</b>", bold_inline))
for s in [
    "1. Wash hands; don PPE. Explain procedure to patient/family.",
    "2. Position patient: HOB at 30–45°; semi-Fowler's position.",
    "3. Measure tube length: nose → earlobe → xiphoid (NEX measurement).",
    "4. Lubricate tube tip with water-soluble gel.",
    "5. Insert tube through nostril; advance while patient swallows (sips of water if able).",
    "6. Advance to measured length; check placement:\n   a. Aspirate gastric contents → test pH (≤5.5 = gastric)\n   b. Chest X-ray for confirmation (gold standard)\n   c. Auscultate epigastrium while injecting air (less reliable alone)",
    "7. Secure tube with tape; mark external length.",
    "8. Prime the feed set; check expiry, formula, patient ID.",
    "9. Start feed: begin slowly (25 mL/hr); increase rate as tolerated.",
    "10. Flush with 30 mL water before and after feeds, and after medications.",
    "11. Monitor: GRV every 4 hrs, tolerance (nausea, distension, diarrhea), tube position.",
    "12. Document: insertion depth, pH, GRV, rate, volume, tolerance.",
]:
    story.append(B(s))
story.append(SP())

# 5M Q14 – Complications of Tube Feeding
story.append(section_banner("Q14. Complications and Prevention of Tube Feeding", bg=GREEN_DARK))
data_comp = [
    ["Complication", "Cause", "Prevention / Management"],
    ["Aspiration pneumonia", "Tube displacement, high GRV, flat position", "HOB 30–45°, verify placement, check GRV 4-hourly, prokinetics"],
    ["Diarrhea", "Hyperosmolar formula, rapid infusion, antibiotic-associated, C. diff", "Continuous slow infusion, isotonic formula, probiotics, C. diff treatment"],
    ["Constipation", "Low fiber, inadequate fluid, immobility", "Fiber-containing formula, adequate free water, laxatives, mobilization"],
    ["Tube blockage", "Formula residue, medications not flushed", "Flush 30 mL water before/after, crush meds, warm water flush"],
    ["Tube displacement", "Coughing, vomiting, poor securing", "Tape securely, check marking, confirm placement before feeds"],
    ["Refeeding syndrome", "Rapid nutrition start after starvation", "Start low (10 kcal/kg/day), correct electrolytes, thiamine first"],
    ["Hyperglycemia", "Concentrated carbohydrate formula", "Monitor BG, use diabetic formula, insulin infusion if needed"],
    ["Abdominal distension / nausea", "High GRV, gastroparesis", "Hold feed if GRV >200–500 mL, prokinetics (metoclopramide)"],
    ["Nasal/pharyngeal irritation", "Tube friction, prolonged use", "Regular nasal care, lubrication, use soft silicone tubes"],
]
t = Table(data_comp, colWidths=[40*mm, 55*mm, 75*mm])
t.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,0), GREEN_DARK),
    ("TEXTCOLOR",     (0,0), (-1,0), WHITE),
    ("FONTNAME",      (0,0), (-1,0), "Helvetica-Bold"),
    ("FONTSIZE",      (0,0), (-1,-1), 8),
    ("ROWBACKGROUNDS",(0,1), (-1,-1), [GREEN_LIGHT, WHITE]),
    ("GRID",          (0,0), (-1,-1), 0.4, colors.HexColor("#cbd5e1")),
    ("VALIGN",        (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING",    (0,0), (-1,-1), 3),
    ("BOTTOMPADDING", (0,0), (-1,-1), 3),
    ("LEFTPADDING",   (0,0), (-1,-1), 5),
]))
story.append(t)
story.append(SP())

# 5M Q15 – Fluid Management Principles
story.append(section_banner("Q15. Principles of Fluid Management in ICU", bg=colors.HexColor("#1e40af")))
story.append(A("Fluid management in the ICU aims to maintain adequate tissue perfusion while avoiding both under- and over-resuscitation. Key principles:"))
for p in [
    ("Assessment before fluid", "Assess volume status first: BP, HR, urine output, skin turgor, mucous membranes, CVP, capillary refill, lactate."),
    ("Goal of fluid therapy", "Maintain MAP ≥65 mmHg, urine output ≥0.5 mL/kg/hr, CRT <2 sec, lactate normalization in sepsis."),
    ("Fluid responsiveness", "Give a fluid challenge (250–500 mL crystalloid over 15–30 min) and reassess. Passive leg raising test predicts fluid responsiveness without risk."),
    ("Conservative strategy", "Once patient stabilized, use conservative fluid strategy — avoid excessive fluid overload (associated with ARDS, ileus, AKI, prolonged ventilation)."),
    ("Crystalloids first", "Normal saline or Lactated Ringer's are first-line for volume replacement. Balanced solutions (LR, Plasmalyte) preferred to reduce hyperchloremic acidosis."),
    ("Colloids when indicated", "Albumin in hypoalbuminemia/sepsis; HES avoided in sepsis/AKI due to risk of renal injury."),
    ("Fluid balance monitoring", "Strict hourly fluid balance chart; daily weight; CVP; renal function."),
    ("Electrolyte correction", "Correct Na+, K+, Mg2+, PO4 deficits as part of fluid therapy."),
    ("De-resuscitation (late phase)", "Once acute phase over, actively de-resuscitate (diuresis) to avoid fluid overload complications."),
    ("Individualized approach", "Tailor fluids to each patient: cardiac, renal, hepatic patients need very careful fluid management."),
]:
    story.append(BH(p[0] + ":", p[1]))
story.append(SP())

# 5M Q16 – Crystalloids vs Colloids
story.append(section_banner("Q16. Crystalloids vs Colloids", bg=colors.HexColor("#1e40af")))
data_cc = [
    ["Feature", "Crystalloids", "Colloids"],
    ["Definition", "Small dissolved molecules: electrolytes ± glucose; freely cross capillary membranes", "Large molecules (proteins/starches); stay in intravascular compartment due to oncotic effect"],
    ["Examples", "0.9% NaCl, Lactated Ringer's, 5% Dextrose, Plasmalyte, Hartmann's", "Human Albumin 4–20%, Dextran, Gelatin (Haemaccel), HES (Voluven)"],
    ["Volume expansion", "Only 25% remains intravascular at 1 hr (rest distributes to interstitium)", "80–100% stays intravascular — better volume expansion per mL given"],
    ["Duration of effect", "30–60 min (short)", "4–8 hours (longer)"],
    ["Cost", "Cheap", "Expensive"],
    ["Side effects", "Edema (interstitial), hyperchloremic acidosis (with NS), dilutional hyponatremia", "Anaphylaxis, coagulopathy, pruritus (dextran); AKI (HES in sepsis/AKI)"],
    ["Use", "1st line for resuscitation, maintenance, drug administration, hypovolemia", "Hypoalbuminemia, after large-volume crystalloid, plasma expansion in burns"],
    ["Current evidence", "SAFE trial: Albumin = saline in most ICU patients. HES avoided in sepsis (CHEST, 6S trials — increased renal failure and mortality).", "Albumin preferred colloid in sepsis (ALBIOS, SAFE)"],
]
t = Table(data_cc, colWidths=[38*mm, 65*mm, 67*mm])
t.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,0), colors.HexColor("#1e40af")),
    ("TEXTCOLOR",     (0,0), (-1,0), WHITE),
    ("FONTNAME",      (0,0), (-1,0), "Helvetica-Bold"),
    ("FONTSIZE",      (0,0), (-1,-1), 8.5),
    ("ROWBACKGROUNDS",(0,1), (-1,-1), [LIGHT_BLUE, WHITE]),
    ("GRID",          (0,0), (-1,-1), 0.4, colors.HexColor("#cbd5e1")),
    ("VALIGN",        (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING",    (0,0), (-1,-1), 4),
    ("BOTTOMPADDING", (0,0), (-1,-1), 4),
    ("LEFTPADDING",   (0,0), (-1,-1), 5),
]))
story.append(t)
story.append(SP())

# 5M Q17 – Dehydration & Hypovolemia
story.append(section_banner("Q17. Assessment and Management of Dehydration and Hypovolemia", bg=colors.HexColor("#1e40af")))
story.append(Paragraph("<b>DEHYDRATION — Clinical Assessment:</b>", bold_inline))
data_deh = [
    ["Grade", "% Body Weight Loss", "Signs & Symptoms"],
    ["Mild", "3–5%", "Thirst, dry mouth, slight oliguria, urine SG >1.020"],
    ["Moderate", "6–9%", "Sunken eyes, poor skin turgor, tachycardia, orthostatic hypotension, oliguria"],
    ["Severe", "≥10%", "Extreme thirst, sunken fontanelle (infant), no urine, hypotension, cold clammy skin, altered consciousness"],
]
t = Table(data_deh, colWidths=[25*mm, 40*mm, 105*mm])
t.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,0), colors.HexColor("#1e40af")),
    ("TEXTCOLOR",     (0,0), (-1,0), WHITE),
    ("FONTNAME",      (0,0), (-1,0), "Helvetica-Bold"),
    ("FONTSIZE",      (0,0), (-1,-1), 8.5),
    ("ROWBACKGROUNDS",(0,1), (-1,-1), [LIGHT_BLUE, WHITE]),
    ("GRID",          (0,0), (-1,-1), 0.4, colors.HexColor("#cbd5e1")),
    ("VALIGN",        (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING",    (0,0), (-1,-1), 4),
    ("BOTTOMPADDING", (0,0), (-1,-1), 4),
    ("LEFTPADDING",   (0,0), (-1,-1), 5),
]))
story.append(t)
story.append(Spacer(1,4))
story.append(Paragraph("<b>HYPOVOLEMIA — Clinical Assessment:</b>", bold_inline))
for i in [
    "Hypotension (SBP <90 or MAP <65 mmHg), tachycardia (HR >100 bpm).",
    "Reduced urine output (<0.5 mL/kg/hr), concentrated urine.",
    "Cool extremities, delayed CRT (>2 sec), weak/thready pulse.",
    "Reduced CVP (<5 cmH2O), low JVP.",
    "Elevated lactate (>2 mmol/L) = tissue hypoperfusion.",
    "Hypotension on standing (orthostasis) = early sign.",
]:
    story.append(B(i))
story.append(Paragraph("<b>MANAGEMENT:</b>", bold_inline))
for m in [
    "Mild dehydration: oral rehydration (ORS — Na 75 mEq/L, glucose 75 mmol/L, K+ 20 mEq/L).",
    "Moderate-severe dehydration: IV fluids — Normal Saline or Lactated Ringer's.",
    "Hypovolemia/shock: Fluid bolus 250–500 mL IV over 15–30 min; reassess after each bolus.",
    "Hemorrhagic shock: 1:1:1 ratio (PRBC: FFP: platelets) — damage control resuscitation.",
    "Septic shock: Early goal-directed therapy — 30 mL/kg crystalloid within 3 hrs (Surviving Sepsis Campaign).",
    "Vasopressors (norepinephrine) if fluid-unresponsive: target MAP ≥65 mmHg.",
    "Monitor hourly UO, BP, HR, CVP, lactate clearance.",
    "Treat underlying cause: control bleeding, treat infection, anti-emetics/anti-diarrheals.",
]:
    story.append(B(m))
story.append(SP())

# 5M Q18 – Electrolyte Imbalance
story.append(section_banner("Q18. Electrolyte Imbalance and Management", bg=colors.HexColor("#1e40af")))
data_elec = [
    ["Electrolyte", "Imbalance", "Common Causes (ICU)", "Key Signs", "Management"],
    ["Sodium\n(Na+ 135–145)", "Hyponatremia\n(<135)", "SIADH, CHF, cirrhosis, polydipsia, diuretics", "Nausea, headache, confusion, seizures", "Fluid restriction; 3% NaCl in severe (<120); correct ≤8 mEq/24h to prevent ODS"],
    ["", "Hypernatremia\n(>145)", "Dehydration, DI, fever, excess Na+", "Thirst, restlessness, confusion, seizures", "Free water replacement (PO or 5% D/W IV); correct slowly"],
    ["Potassium\n(K+ 3.5–5.5)", "Hypokalemia\n(<3.5)", "Diarrhea, diuretics, alkalosis, insulin", "Weakness, cramps, arrhythmia (U waves)", "KCl oral or IV (max 20 mEq/hr centrally); ECG monitoring"],
    ["", "Hyperkalemia\n(>5.5)", "Renal failure, acidosis, ACEi, hemolysis", "Peaked T, wide QRS, VF", "CaGluc, insulin+D50, NaHCO3, kayexalate, dialysis"],
    ["Calcium\n(Ca2+ 8.5–10.5)", "Hypocalcemia\n(<8.5)", "Hypoparathyroidism, pancreatitis, citrate (massive transfusion)", "Tetany, Chvostek/Trousseau, QT prolonged", "Ca gluconate 10% IV (slow); oral Ca + Vit D for chronic"],
    ["Magnesium\n(Mg2+ 1.7–2.2)", "Hypomagnesemia\n(<1.7)", "Diarrhea, diuretics, malnutrition, alcoholism", "Tremors, arrhythmias, muscle weakness, refractory hypoK", "MgSO4 2g IV over 15 min; then oral Mg"],
    ["Phosphate\n(PO4 2.5–4.5)", "Hypophosphatemia\n(<2.5)", "Refeeding syndrome, DKA treatment, antacids, malnutrition", "Muscle weakness, resp failure, hemolysis, seizures", "IV phosphate replacement; correct slowly; refeeding protocol"],
]
t = Table(data_elec, colWidths=[28*mm, 25*mm, 38*mm, 33*mm, 46*mm])
t.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,0), colors.HexColor("#1e40af")),
    ("TEXTCOLOR",     (0,0), (-1,0), WHITE),
    ("FONTNAME",      (0,0), (-1,0), "Helvetica-Bold"),
    ("FONTSIZE",      (0,0), (-1,-1), 7.5),
    ("ROWBACKGROUNDS",(0,1), (-1,-1), [LIGHT_BLUE, WHITE]),
    ("GRID",          (0,0), (-1,-1), 0.4, colors.HexColor("#cbd5e1")),
    ("VALIGN",        (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING",    (0,0), (-1,-1), 3),
    ("BOTTOMPADDING", (0,0), (-1,-1), 3),
    ("LEFTPADDING",   (0,0), (-1,-1), 4),
]))
story.append(t)
story.append(SP())

# ── Footer note ─────────────────────────────────────────────────────────
story.append(HRFlowable(width="100%", thickness=1, color=DARK_BLUE))
story.append(Spacer(1, 4))
story.append(Paragraph(
    "ICU Nursing Exam Answer Key | Units 3 & 4 | Prepared by Orris AI | For Academic Use Only",
    ParagraphStyle("footer", fontName="Helvetica-Oblique", fontSize=8, textColor=colors.HexColor("#64748b"), alignment=TA_CENTER)
))

# ── Build ────────────────────────────────────────────────────────────────
doc.build(story)
print(f"PDF successfully created: {OUTPUT}")
!

Failed to create session: unauthorized: authentication failed: Bearer token is invalid

We encountered an error while processing your request. Please try again or reach out to us for help.

This is a shared conversation. Sign in to Orris to start your own chat.