Take history from me
Take history of it from me in option styles
| Parameter | Detail |
|---|---|
| Duration | 4-7 days |
| Onset | Gradual, appeared over several days |
| Character | Grouped vesicular papules on erythematous base |
| Site | Thigh / hip region (unilateral, localized) |
| Spread | Localized - confined to one area |
| Associated sensation | Itching only |
| Systemic symptoms | Fever, headache, and malaise |
| Trigger | Contact with plants or animals |
Recommendation: This warrants prompt clinical evaluation. The systemic symptoms (fever, headache, malaise) alongside a vesicular rash are a red flag combination requiring urgent assessment to rule out serious infections.
The rashes are on the back
| Parameter | Detail |
|---|---|
| Site | Right side of the back only |
| Duration | 4-7 days |
| Onset | Gradual over several days |
| Prodrome | Itching preceded the rash appearance |
| Systemic prodrome | Fever, headache, malaise |
| Character | Grouped vesicles on erythematous base (seen in image) |
| Spread | Unilateral - does NOT cross the midline |
| Sensation | Itching only (no burning or pain currently) |
| Trigger | Contact with plants / animals; contact with stray/wild animals |
| Feature | This Patient |
|---|---|
| Prior varicella infection | โ Yes - chickenpox in childhood |
| Unilateral distribution | โ Right side only |
| Does not cross midline | โ Confined to one side |
| Dermatomal grouped vesicles | โ Seen on image |
| Prodromal symptoms | โ Itching before rash + fever/headache/malaise |
Note: Zoster in a patient under 20 with no immunosuppression is uncommon but does occur - it warrants checking for an underlying immune deficiency (e.g. undiagnosed HIV, hematological malignancy) even if none is currently known.
Find latest clinical guidelines for treating herpes zoster
"herpes zoster"[MeSH Terms] AND "treatment"[MeSH Terms]
herpes zoster clinical guidelines 2024 2025 treatment antiviral
"herpes zoster" AND "antiviral" AND "postherpetic neuralgia"
https://pijnnagordelroos.nl/wp-content/uploads/2025/10/19052โฆ
Start within 72 hours of rash onset for maximum benefit. This is the single most important factor.
| Patient Group | Preferred Regimen | Alternative |
|---|---|---|
| Normal host, age < 50 | Valacyclovir 1g orally 3x/day x 7 days | Famciclovir 500mg orally 3x/day x 7 days |
| Normal host, age โฅ 50 | Valacyclovir 1g orally 3x/day x 7 days | Famciclovir 500mg orally 3x/day x 7 days |
| Any age, cranial nerve involvement | Valacyclovir 1g orally 3x/day x 7 days | IV Acyclovir if severe |
| Mild immunocompromise / HIV | Valacyclovir 1g orally 3x/day x 7-10 days | Famciclovir 500mg 3x/day x 7-10 days |
| Severe immunocompromise | IV Acyclovir 10 mg/kg every 8h x 7-10 days | - |
| Renal impairment | Brivudine (oral) OR dose-adjusted IV Acyclovir | - |
Valacyclovir and Famciclovir are preferred over Acyclovir due to better oral bioavailability, higher blood levels, and more convenient 3x/day dosing (vs. Acyclovir's 5x/day). - Fitzpatrick's Dermatology
A 2023 network meta-analysis (PMID: 37535772) confirmed Valacyclovir and Famciclovir are superior to Acyclovir for pain reduction in immunocompetent patients.
| Pain Type | Treatment |
|---|---|
| Mild acute pain | Paracetamol / NSAIDs |
| Moderate-severe acute pain | Opioids (tramadol, oxycodone) short-term |
| Neuropathic component | Gabapentin or Pregabalin |
| Topical (localized pain) | Lidocaine patches, capsaicin cream |
| Post-Herpetic Neuralgia (PHN) | Tricyclic antidepressants (amitriptyline), Gabapentinoids, SNRIs |
Bottom line for this patient: Oral Valacyclovir 1g 3x/day for 7 days should be started as soon as possible (ideally within 72 hours of rash onset), combined with adequate analgesia. Evaluate for underlying immunodeficiency given the atypical young age presentation.
Generate a patient education handout on herpes zoster care and PHN prevention
mkdir -p /home/daytona/workspace/herpes-zoster-handout && ls /home/daytona/workspace/herpes-zoster-handout
~/herpes-zoster-handout/generate_handout.js
const {
Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
HeadingLevel, AlignmentType, BorderStyle, WidthType, ShadingType,
VerticalAlign, PageNumber, Header, Footer, ImageRun
} = require('docx');
const fs = require('fs');
// โโ colour palette โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
const BRAND_BLUE = "1A5276"; // dark header blue
const ACCENT_TEAL = "148F77"; // section heading teal
const WARN_RED = "C0392B"; // warning boxes
const LIGHT_BLUE = "D6EAF8"; // shaded rows / call-out bg
const LIGHT_GREEN = "D5F5E3"; // positive tip boxes
const LIGHT_RED = "FADBD8"; // warning box bg
const LIGHT_GREY = "F2F3F4"; // alternating table rows
const WHITE = "FFFFFF";
// โโ helpers โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
const bold = (text, size = 22, color = "000000") =>
new TextRun({ text, bold: true, size, color, font: "Calibri" });
const normal = (text, size = 20, color = "2C3E50") =>
new TextRun({ text, size, color, font: "Calibri" });
const para = (children, spacing = 120, align = AlignmentType.LEFT) =>
new Paragraph({ children, alignment: align, spacing: { after: spacing } });
const heading1 = (text) =>
new Paragraph({
children: [new TextRun({ text, bold: true, size: 28, color: WHITE, font: "Calibri" })],
alignment: AlignmentType.CENTER,
spacing: { before: 0, after: 0 },
shading: { type: ShadingType.SOLID, color: BRAND_BLUE, fill: BRAND_BLUE }
});
const sectionHeading = (text) =>
new Paragraph({
children: [new TextRun({ text: ` ${text}`, bold: true, size: 24, color: WHITE, font: "Calibri" })],
alignment: AlignmentType.LEFT,
spacing: { before: 200, after: 80 },
shading: { type: ShadingType.SOLID, color: ACCENT_TEAL, fill: ACCENT_TEAL }
});
const subHeading = (text) =>
new Paragraph({
children: [new TextRun({ text, bold: true, size: 22, color: BRAND_BLUE, font: "Calibri" })],
spacing: { before: 160, after: 60 }
});
const bullet = (text, bold_prefix = "") =>
new Paragraph({
children: [
...(bold_prefix ? [new TextRun({ text: bold_prefix + " ", bold: true, size: 20, font: "Calibri" })] : []),
new TextRun({ text, size: 20, color: "2C3E50", font: "Calibri" })
],
bullet: { level: 0 },
spacing: { after: 60 }
});
const calloutBox = (label, text, bgColor, labelColor = WHITE) =>
new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
borders: {
top: { style: BorderStyle.SINGLE, size: 6, color: labelColor === WHITE ? WARN_RED : ACCENT_TEAL },
bottom: { style: BorderStyle.SINGLE, size: 6, color: labelColor === WHITE ? WARN_RED : ACCENT_TEAL },
left: { style: BorderStyle.SINGLE, size: 6, color: labelColor === WHITE ? WARN_RED : ACCENT_TEAL },
right: { style: BorderStyle.SINGLE, size: 6, color: labelColor === WHITE ? WARN_RED : ACCENT_TEAL },
},
rows: [
new TableRow({
children: [
new TableCell({
children: [
new Paragraph({
children: [new TextRun({ text: label, bold: true, size: 20, color: WHITE, font: "Calibri" })],
shading: { type: ShadingType.SOLID, color: bgColor, fill: bgColor },
spacing: { before: 60, after: 60 },
indent: { left: 120 }
}),
new Paragraph({
children: [new TextRun({ text, size: 20, color: "2C3E50", font: "Calibri" })],
spacing: { before: 80, after: 80 },
indent: { left: 120 }
})
],
shading: { type: ShadingType.SOLID, color: bgColor === WARN_RED ? LIGHT_RED : LIGHT_GREEN, fill: bgColor === WARN_RED ? LIGHT_RED : LIGHT_GREEN },
margins: { top: 80, bottom: 80, left: 80, right: 80 }
})
]
})
],
margins: { top: 80, bottom: 80 }
});
const spacer = (space = 100) =>
new Paragraph({ children: [new TextRun(" ")], spacing: { after: space } });
// โโ two-column info table โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
const infoTable = (rows) =>
new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
borders: {
insideH: { style: BorderStyle.SINGLE, size: 2, color: "BDC3C7" },
insideV: { style: BorderStyle.SINGLE, size: 2, color: "BDC3C7" },
top: { style: BorderStyle.SINGLE, size: 4, color: ACCENT_TEAL },
bottom: { style: BorderStyle.SINGLE, size: 4, color: ACCENT_TEAL },
left: { style: BorderStyle.SINGLE, size: 4, color: ACCENT_TEAL },
right: { style: BorderStyle.SINGLE, size: 4, color: ACCENT_TEAL },
},
rows: rows.map(([label, value], i) =>
new TableRow({
children: [
new TableCell({
children: [new Paragraph({
children: [new TextRun({ text: label, bold: true, size: 20, font: "Calibri", color: BRAND_BLUE })],
spacing: { before: 60, after: 60 }, indent: { left: 80 }
})],
width: { size: 35, type: WidthType.PERCENTAGE },
shading: { type: ShadingType.SOLID, color: i % 2 === 0 ? LIGHT_BLUE : WHITE, fill: i % 2 === 0 ? LIGHT_BLUE : WHITE },
verticalAlign: VerticalAlign.CENTER
}),
new TableCell({
children: [new Paragraph({
children: [new TextRun({ text: value, size: 20, font: "Calibri", color: "2C3E50" })],
spacing: { before: 60, after: 60 }, indent: { left: 80 }
})],
width: { size: 65, type: WidthType.PERCENTAGE },
shading: { type: ShadingType.SOLID, color: i % 2 === 0 ? LIGHT_BLUE : WHITE, fill: i % 2 === 0 ? LIGHT_BLUE : WHITE },
verticalAlign: VerticalAlign.CENTER
})
]
})
)
});
// โโ medication table โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
const medTable = (headers, rows) =>
new Table({
width: { size: 100, type: WidthType.PERCENTAGE },
borders: {
insideH: { style: BorderStyle.SINGLE, size: 2, color: "BDC3C7" },
insideV: { style: BorderStyle.SINGLE, size: 2, color: "BDC3C7" },
top: { style: BorderStyle.SINGLE, size: 4, color: BRAND_BLUE },
bottom: { style: BorderStyle.SINGLE, size: 4, color: BRAND_BLUE },
left: { style: BorderStyle.SINGLE, size: 4, color: BRAND_BLUE },
right: { style: BorderStyle.SINGLE, size: 4, color: BRAND_BLUE },
},
rows: [
new TableRow({
tableHeader: true,
children: headers.map(h =>
new TableCell({
children: [new Paragraph({
children: [new TextRun({ text: h, bold: true, size: 20, font: "Calibri", color: WHITE })],
alignment: AlignmentType.CENTER, spacing: { before: 60, after: 60 }
})],
shading: { type: ShadingType.SOLID, color: BRAND_BLUE, fill: BRAND_BLUE },
verticalAlign: VerticalAlign.CENTER
})
)
}),
...rows.map((cols, i) =>
new TableRow({
children: cols.map(c =>
new TableCell({
children: [new Paragraph({
children: [new TextRun({ text: c, size: 19, font: "Calibri", color: "2C3E50" })],
spacing: { before: 60, after: 60 }, indent: { left: 80 }
})],
shading: { type: ShadingType.SOLID, color: i % 2 === 0 ? LIGHT_GREY : WHITE, fill: i % 2 === 0 ? LIGHT_GREY : WHITE },
verticalAlign: VerticalAlign.CENTER
})
)
})
)
]
});
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
// DOCUMENT CONTENT
// โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
const doc = new Document({
styles: {
default: {
document: {
run: { font: "Calibri", size: 20 }
}
}
},
sections: [{
properties: {
page: {
margin: { top: 720, bottom: 720, left: 900, right: 900 }
}
},
headers: {
default: new Header({
children: [
new Paragraph({
children: [
new TextRun({ text: "PATIENT EDUCATION HANDOUT | Herpes Zoster (Shingles) Care & PHN Prevention", size: 16, color: "7F8C8D", font: "Calibri" }),
new TextRun({ text: " | Issued: June 2026", size: 16, color: "7F8C8D", font: "Calibri" })
],
alignment: AlignmentType.RIGHT,
border: { bottom: { style: BorderStyle.SINGLE, size: 4, color: "BDC3C7" } },
spacing: { after: 80 }
})
]
})
},
footers: {
default: new Footer({
children: [
new Paragraph({
children: [
new TextRun({ text: "This handout is for educational purposes only and does not replace professional medical advice. Always follow your doctor's instructions. | Page ", size: 16, color: "7F8C8D", font: "Calibri" }),
new TextRun({ children: [PageNumber.CURRENT], size: 16, color: "7F8C8D", font: "Calibri" })
],
alignment: AlignmentType.CENTER,
border: { top: { style: BorderStyle.SINGLE, size: 4, color: "BDC3C7" } },
spacing: { before: 80 }
})
]
})
},
children: [
// โโ TITLE BLOCK โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
heading1("HERPES ZOSTER (SHINGLES)"),
new Paragraph({
children: [new TextRun({ text: "Patient Care Guide & Post-Herpetic Neuralgia (PHN) Prevention", bold: true, size: 24, color: BRAND_BLUE, font: "Calibri" })],
alignment: AlignmentType.CENTER,
spacing: { before: 100, after: 60 },
shading: { type: ShadingType.SOLID, color: LIGHT_BLUE, fill: LIGHT_BLUE }
}),
new Paragraph({
children: [new TextRun({ text: "For patients and caregivers | Based on 2025 International Clinical Guidelines", size: 18, color: "7F8C8D", font: "Calibri" })],
alignment: AlignmentType.CENTER,
spacing: { before: 0, after: 200 }
}),
// โโ SECTION 1: WHAT IS SHINGLES โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
sectionHeading("1. What Is Shingles (Herpes Zoster)?"),
spacer(60),
para([normal("Shingles is a painful skin rash caused by the varicella-zoster virus (VZV) - the same virus that causes chickenpox. After you recover from chickenpox, the virus stays dormant (sleeping) in your nerve cells. Years later, it can reactivate and travel along a nerve to your skin, causing shingles.")]),
infoTable([
["Cause", "Varicella-Zoster Virus (VZV) - reactivation of the chickenpox virus"],
["Who can get it","Anyone who has had chickenpox, at any age"],
["Is it contagious?", "You cannot spread shingles directly, but the fluid in the blisters CAN spread chickenpox to people who have never had it"],
["Duration", "Rash typically heals in 2-4 weeks; pain may last longer"],
["Most common in","Adults over 50, and people with a weakened immune system"]
]),
spacer(100),
// โโ SECTION 2: RECOGNISING SHINGLES โโโโโโโโโโโโโโโโโโโโโโโโโ
sectionHeading("2. Recognising the Symptoms"),
spacer(60),
subHeading("Stage 1 - Before the Rash (Prodrome, 1-5 days before):"),
bullet("Burning, tingling, or itching on one side of the body"),
bullet("Sensitivity to touch in a specific skin area"),
bullet("Headache, fever, and feeling generally unwell"),
bullet("Fatigue and muscle aches"),
spacer(60),
subHeading("Stage 2 - The Rash Appears:"),
bullet("Red, blotchy skin followed by clusters of fluid-filled blisters"),
bullet("Rash appears on ONE side of the body only (usually in a band or stripe)"),
bullet("Common locations: chest, back, abdomen, face, or around one eye"),
bullet("Blisters break open, ooze, then crust over in 7-10 days"),
spacer(100),
// โโ SECTION 3: ANTIVIRAL MEDICATIONS โโโโโโโโโโโโโโโโโโโโโโโโ
sectionHeading("3. Your Antiviral Medication"),
spacer(60),
para([bold("Why it matters: ", 20, WARN_RED), normal("Antiviral medicines do NOT cure shingles, but they significantly reduce severity, shorten the rash duration, and - most importantly - lower your risk of developing long-term nerve pain (PHN).")]),
spacer(80),
calloutBox(
"CRITICAL - Start within 72 hours!",
"Antiviral treatment works best when started within 72 hours (3 days) of the rash first appearing. Do not delay - contact your doctor immediately.",
WARN_RED
),
spacer(120),
subHeading("Common Antiviral Medications:"),
medTable(
["Medication", "Usual Dose", "Duration", "Notes"],
[
["Valacyclovir (preferred)", "1000 mg, 3 times a day", "7 days", "Preferred: fewer daily doses, better absorption"],
["Famciclovir (preferred)", "500 mg, 3 times a day", "7 days", "Preferred: convenient dosing, high effectiveness"],
["Acyclovir", "800 mg, 5 times a day", "7 days", "Older option, more doses per day required"],
]
),
spacer(80),
para([bold("Important: ", 20, BRAND_BLUE), normal("Always take the full course prescribed. Do not stop early even if you feel better.")]),
spacer(100),
// โโ SECTION 4: SKIN CARE AT HOME โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
sectionHeading("4. Skin Care at Home"),
spacer(60),
subHeading("DO:"),
bullet("Keep the rash area clean and dry"),
bullet("Apply cool, damp compresses to soothe itching and help dry blisters"),
bullet("Use calamine lotion or baking soda paste for itch relief"),
bullet("Cover the rash loosely with a clean, non-stick dressing"),
bullet("Wear loose, soft, cotton clothing to reduce friction on the skin"),
bullet("Wash hands thoroughly before and after touching the rash"),
spacer(80),
subHeading("DO NOT:"),
bullet("Do NOT scratch or pick at the blisters (risk of scarring and infection)"),
bullet("Do NOT use topical steroid creams on the rash"),
bullet("Do NOT use occlusive or heavy ointments on active lesions"),
bullet("Do NOT apply topical antiviral creams (they do NOT work for shingles)"),
bullet("Do NOT share towels, clothing, or bedding while blisters are active"),
spacer(100),
// โโ SECTION 5: PAIN MANAGEMENT โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
sectionHeading("5. Managing Your Pain"),
spacer(60),
para([normal("Pain is the most distressing symptom of shingles. Good pain control also reduces the risk of developing long-term pain (PHN). Do not ignore or 'push through' your pain - tell your doctor.")]),
spacer(80),
medTable(
["Pain Level", "Options", "Examples"],
[
["Mild pain", "Simple painkillers", "Paracetamol (Panadol), Ibuprofen"],
["Moderate pain","Stronger painkillers + nerve agents","Tramadol, Codeine; Gabapentin, Pregabalin"],
["Severe pain", "Specialist management", "Short-term opioids under doctor supervision"],
["Nerve/burning","Neuropathic pain agents", "Amitriptyline, Gabapentin, Pregabalin"],
["Topical", "Localised cream/patch", "Lidocaine patches, Capsaicin cream"],
]
),
spacer(80),
calloutBox(
"TIP - Do not wait for pain to become severe",
"Take your pain medication regularly as prescribed, not just when the pain becomes unbearable. Consistent pain control is more effective and may help prevent PHN.",
ACCENT_TEAL
),
spacer(100),
// โโ SECTION 6: PHN PREVENTION โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
sectionHeading("6. Preventing Post-Herpetic Neuralgia (PHN)"),
spacer(60),
para([bold("What is PHN? ", 20, WARN_RED), normal("Post-Herpetic Neuralgia (PHN) is persistent nerve pain that continues for more than 90 days after the shingles rash appears. It can last months to years and significantly affects quality of life.")]),
spacer(60),
subHeading("Who is at higher risk of PHN?"),
bullet("Age over 50 years (risk increases with age)"),
bullet("Severe pain during the acute shingles episode"),
bullet("Large or widespread rash"),
bullet("Delayed or no antiviral treatment"),
bullet("Weakened immune system"),
spacer(80),
subHeading("How to Reduce Your Risk of PHN:"),
medTable(
["Strategy", "How It Helps"],
[
["Start antivirals within 72 hours", "Most effective single action - reduces nerve damage from the virus"],
["Control acute pain aggressively", "Uncontrolled pain may sensitise nerves, making PHN more likely"],
["Complete the full antiviral course", "Ensures the virus is fully suppressed"],
["Get vaccinated (future prevention)", "Shingrix vaccine reduces risk of shingles and PHN by ~97%"],
["Maintain good general health", "A stronger immune system reduces severity and complication risk"],
["Reduce stress", "Stress is a known trigger for viral reactivation"],
]
),
spacer(100),
// โโ SECTION 7: ISOLATION & INFECTION CONTROL โโโโโโโโโโโโโโโโโ
sectionHeading("7. Protecting Others Around You"),
spacer(60),
calloutBox(
"IMPORTANT - Who to avoid while blisters are active",
"Keep away from: pregnant women who haven't had chickenpox, newborn babies, people with weakened immune systems (e.g. chemotherapy patients), and anyone who hasn't had chickenpox or the chickenpox vaccine. You are infectious until all blisters have fully crusted over.",
WARN_RED
),
spacer(80),
bullet("Stay home from work/school if your rash cannot be fully covered"),
bullet("Avoid crowded public places while blisters are weeping"),
bullet("Do not touch your rash and then touch other people or surfaces"),
bullet("Cover all blisters with a clean, non-stick dressing when in contact with others"),
spacer(100),
// โโ SECTION 8: WHEN TO SEEK URGENT HELP โโโโโโโโโโโโโโโโโโโโโ
sectionHeading("8. When to Seek Urgent Medical Attention"),
spacer(60),
calloutBox(
"Go to Emergency or call your doctor IMMEDIATELY if you have:",
"โข Rash or blisters near or on your EYE (can cause vision loss)\nโข Rash on your ear, face, or forehead with ear pain or hearing changes\nโข Weakness or paralysis in any part of your body\nโข Severe headache, stiff neck, confusion, or sensitivity to light\nโข High fever that is not coming down\nโข Rash spreading to both sides of the body\nโข Signs of skin infection: increasing redness, warmth, swelling, or pus",
WARN_RED
),
spacer(100),
// โโ SECTION 9: PREVENTION - VACCINATION โโโโโโโโโโโโโโโโโโโโโ
sectionHeading("9. Prevention - The Shingrix Vaccine"),
spacer(60),
para([normal("The best way to prevent shingles and PHN is vaccination. Even if you have already had shingles, you can still be vaccinated to reduce the risk of it happening again.")]),
spacer(60),
infoTable([
["Vaccine Name", "Shingrix (Recombinant Zoster Vaccine, RZV)"],
["Doses", "2 doses, given 2-6 months apart"],
["Effectiveness", "~97% effective against shingles; ~91% against PHN"],
["Who should get it", "Adults aged 50 and over; immunocompromised adults aged 18+"],
["Even after shingles?","Yes - talk to your doctor about the right time (usually after recovery)"],
["Live vaccine (Zostavax)","No longer available in Australia - deregistered December 2024"],
]),
spacer(100),
// โโ SECTION 10: RECOVERY TIMELINE โโโโโโโโโโโโโโโโโโโโโโโโโโโ
sectionHeading("10. What to Expect - Recovery Timeline"),
spacer(60),
medTable(
["Timeframe", "What Typically Happens"],
[
["Days 1-5", "Redness, blistering, and peak pain. Antivirals and pain relief most critical now."],
["Days 5-10", "Blisters begin to dry and crust over. Pain may continue."],
["Weeks 2-4", "Crusts fall off. Skin may remain red or discoloured. Pain should start improving."],
["After 4 weeks","Most people fully recover. A minority develop PHN (prolonged nerve pain)."],
["If PHN occurs","Pain persists beyond 90 days. Requires specific nerve pain treatments."],
]
),
spacer(100),
// โโ SECTION 11: SELF-CARE TIPS โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
sectionHeading("11. General Self-Care Tips"),
spacer(60),
bullet("Rest as much as your body needs - fatigue is normal during shingles"),
bullet("Eat a healthy, balanced diet to support your immune system"),
bullet("Stay hydrated - drink 6-8 glasses of water daily"),
bullet("Avoid alcohol while taking antiviral medications"),
bullet("Do not drive if pain or medications affect your concentration"),
bullet("Wear sunscreen on healed skin - it may be more sensitive to sunlight for several months"),
bullet("Consider keeping a pain diary to share with your doctor at follow-up visits"),
spacer(100),
// โโ SECTION 12: FOLLOW-UP โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
sectionHeading("12. Follow-Up & When to Return to Your Doctor"),
spacer(60),
bullet("Return if rash is not improving after 7-10 days of antiviral treatment"),
bullet("Return if pain is worsening or not controlled with prescribed medications"),
bullet("Schedule a follow-up 4 weeks after the rash to check for PHN"),
bullet("Discuss shingles vaccination once fully recovered"),
bullet("Report any new neurological symptoms: weakness, numbness, vision or hearing changes"),
spacer(120),
// โโ FOOTER CALLOUT โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
new Paragraph({
children: [new TextRun({ text: "Questions? Contact your healthcare provider. Do not adjust medications without medical advice.", bold: true, size: 19, color: WHITE, font: "Calibri" })],
alignment: AlignmentType.CENTER,
shading: { type: ShadingType.SOLID, color: BRAND_BLUE, fill: BRAND_BLUE },
spacing: { before: 100, after: 80 },
indent: { left: 120, right: 120 }
}),
] // end children
}]
});
// Write file
Packer.toBuffer(doc).then(buffer => {
fs.writeFileSync("/home/daytona/workspace/herpes-zoster-handout/Herpes_Zoster_Patient_Handout.docx", buffer);
console.log("SUCCESS: Handout written.");
}).catch(err => {
console.error("ERROR:", err);
process.exit(1);
});
cd /home/daytona/workspace/herpes-zoster-handout && node generate_handout.js
python /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/workspace/herpes-zoster-handout/Herpes_Zoster_Patient_Handout.docx
python3 -c " import zipfile, os path = '/home/daytona/workspace/herpes-zoster-handout/Herpes_Zoster_Patient_Handout.docx' size = os.path.getsize(path) print(f'File size: {size} bytes') with zipfile.ZipFile(path) as z: names = z.namelist() print('Contents:', names[:10]) # Check document.xml is readable with z.open('word/document.xml') as f: content = f.read() print(f'document.xml size: {len(content)} bytes') print('Valid XML structure:', b'<w:document' in content) "
Herpes Zoster Patient Handout
Word Document ยท DOCX
| Section | Content |
|---|---|
| 1 | What is Shingles - overview table |
| 2 | Recognising symptoms (prodrome + rash stages) |
| 3 | Antiviral medications with dosing table (Valacyclovir, Famciclovir, Acyclovir) - includes the 72-hour warning callout |
| 4 | Skin care at home - Do's and Don'ts |
| 5 | Pain management by severity level |
| 6 | PHN prevention strategies - risk factors + prevention table |
| 7 | Infection control - who to avoid |
| 8 | Red flag symptoms requiring urgent care |
| 9 | Shingrix vaccine information |
| 10 | Recovery timeline |
| 11 | General self-care tips |
| 12 | Follow-up schedule |
What can I use for itching and burning
herpes zoster shingles itching burning relief treatment options 2024 2025
| Option | How to Use | Notes |
|---|---|---|
| Calamine lotion | Apply to rash with cotton ball, let dry | Best first-line - soothes, cools, dries blisters |
| Cool compresses | Damp cloth, 15-20 min at a time, several times/day | Keeps rash clean + relieves itch simultaneously |
| Colloidal oatmeal bath | Add to cool (not hot) bathwater, soak 15-20 min | Very soothing for widespread itching |
| Baking soda paste | Mix with water, apply to rash, rinse off | Cheap, effective itch relief |
| Loose cotton clothing | Wear at all times over the rash area | Reduces friction-triggered itch |
Avoid hot water - heat worsens itch and inflammation.
| Symptom | Best Option |
|---|---|
| Itching (daytime) | Calamine lotion + cool compresses |
| Itching (nighttime, disrupting sleep) | Oral antihistamine (chlorphenamine/hydroxyzine) |
| Burning / nerve pain | Gabapentin or Pregabalin (oral) |
| Localised burning (post-blister) | Lidocaine 5% patch |
| Ongoing PHN burning | Amitriptyline + Lidocaine patch + Capsaicin |
What about cetrizine dihydrocholride syrup
cetirizine dihydrochloride shingles herpes zoster pruritus itch dosing
Per Fitzpatrick's Dermatology: "Cetirizine, a selective H1-blocker, is more effective than general antihistamines such as diphenhydramine" for pruritus management.
| Age | Dose | Frequency | Max per day |
|---|---|---|---|
| 6 months - 2 years | 2.5 mg (2.5 mL) | Once daily | 5 mg/day |
| 2 - 5 years | 2.5 mg (2.5 mL) | Once or twice daily | 5 mg/day |
| 6 - 11 years | 5 mg (5 mL) | Once daily | 10 mg/day |
| 12 years and above / Adults | 5-10 mg (5-10 mL) | Once daily | 10 mg/day |
| Over 65 years | 5 mg (5 mL) | Once daily | 5 mg/day |
| Cetirizine | |
|---|---|
| Reduces itching | Yes - good effect |
| Helps burning nerve pain | No - antihistamines don't treat neuropathic pain |
| Sedating | Minimally (better for daytime use) |
| Requires prescription | No - available OTC |
| Safe to combine with antivirals | Yes - no interaction with Acyclovir/Valacyclovir |
What about levocetirazine dicholride
levocetirizine dihydrochloride pruritus itch skin dosing vs cetirizine
| Feature | Cetirizine 10mg | Levocetirizine 5mg |
|---|---|---|
| Equivalent dose | 10 mg | 5 mg |
| H1 receptor binding | Good | Stronger (2x affinity) |
| Onset of action | ~1 hour | ~1 hour |
| Duration | 24 hours | 24 hours (up to 28 hours) |
| Sedation | Mild | Slightly less |
| Histamine wheal inhibition | Similar | Comparable at half-dose |
| Efficacy for pruritus | Good | Equal or slightly better |
| Cost | Cheaper (generic available) | Slightly more expensive |
Clinical studies show 2.5 mg levocetirizine inhibits histamine-induced skin reactions comparably to 5 mg cetirizine - demonstrating its superior potency per mg. (PMC3048603)
| Age | Dose | Timing | Max/day |
|---|---|---|---|
| 6 months - 5 years | 1.25 mg (2.5 mL) | Once daily, evening | 1.25 mg |
| 6 - 11 years | 2.5 mg (5 mL) | Once daily, evening | 2.5 mg |
| 12 years and above / Adults | 5 mg (10 mL) | Once daily, evening | 5 mg |
| Elderly (>65 years) | 2.5 mg (5 mL) | Once daily, evening | 2.5-5 mg |
Recommended in the evening because even though it's minimally sedating, any mild drowsiness is better tolerated at night - and it still provides 24-hour coverage.
| Creatinine Clearance | Dose |
|---|---|
| > 80 mL/min (normal) | 5 mg once daily |
| 50-80 mL/min | 2.5 mg once daily |
| 30-50 mL/min | 2.5 mg every other day |
| < 30 mL/min | Avoid use |
Give me treatment chart for cough
cough treatment guidelines 2024 2025 acute subacute chronic management algorithm
mkdir -p /home/daytona/workspace/cough-chart && ls /home/daytona/workspace/cough-chart
~/cough-chart/generate_cough_chart.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import mm, cm
from reportlab.platypus import (SimpleDocTemplate, Table, TableStyle, Paragraph,
Spacer, HRFlowable)
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus import KeepTogether
import os
OUT = "/home/daytona/workspace/cough-chart/Cough_Treatment_Chart.pdf"
# โโ Colour palette โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
C_NAVY = colors.HexColor("#1A3A5C")
C_TEAL = colors.HexColor("#148F77")
C_ACUTE = colors.HexColor("#1A6B9A") # blue
C_SUBACUTE = colors.HexColor("#7D3C98") # purple
C_CHRONIC = colors.HexColor("#C0392B") # red
C_WARN = colors.HexColor("#E74C3C")
C_LIGHT_BLU = colors.HexColor("#D6EAF8")
C_LIGHT_PUR = colors.HexColor("#E8DAEF")
C_LIGHT_RED = colors.HexColor("#FADBD8")
C_LIGHT_GRN = colors.HexColor("#D5F5E3")
C_LIGHT_YEL = colors.HexColor("#FEF9E7")
C_GREY_BG = colors.HexColor("#F2F3F4")
C_MID_GREY = colors.HexColor("#BDC3C7")
C_DARK_TXT = colors.HexColor("#2C3E50")
C_WHITE = colors.white
doc = SimpleDocTemplate(
OUT,
pagesize=A4,
leftMargin=15*mm, rightMargin=15*mm,
topMargin=15*mm, bottomMargin=15*mm,
title="Cough Treatment Chart",
author="Orris Clinical Reference"
)
W = A4[0] - 30*mm # usable width
styles = getSampleStyleSheet()
def sty(name, parent="Normal", **kw):
s = ParagraphStyle(name, parent=styles[parent], **kw)
return s
S_title = sty("title", fontSize=20, textColor=C_WHITE, alignment=TA_CENTER, fontName="Helvetica-Bold", leading=26)
S_subtitle = sty("subtitle", fontSize=10, textColor=C_WHITE, alignment=TA_CENTER, fontName="Helvetica", leading=14)
S_sec_hd = sty("sec_hd", fontSize=11, textColor=C_WHITE, alignment=TA_LEFT, fontName="Helvetica-Bold", leading=14)
S_body = sty("body", fontSize=8, textColor=C_DARK_TXT,alignment=TA_LEFT, fontName="Helvetica", leading=11)
S_body_bold = sty("body_bold", fontSize=8, textColor=C_DARK_TXT,alignment=TA_LEFT, fontName="Helvetica-Bold", leading=11)
S_small = sty("small", fontSize=7, textColor=C_DARK_TXT,alignment=TA_LEFT, fontName="Helvetica", leading=10)
S_small_bold = sty("small_bold", fontSize=7, textColor=C_DARK_TXT,alignment=TA_LEFT, fontName="Helvetica-Bold", leading=10)
S_warn = sty("warn", fontSize=7.5,textColor=C_WARN, alignment=TA_LEFT, fontName="Helvetica-Bold", leading=11)
S_colhd = sty("colhd", fontSize=8, textColor=C_WHITE, alignment=TA_CENTER, fontName="Helvetica-Bold", leading=11)
S_center = sty("center", fontSize=7.5,textColor=C_DARK_TXT,alignment=TA_CENTER, fontName="Helvetica", leading=10)
S_footer = sty("footer", fontSize=6.5,textColor=colors.grey,alignment=TA_CENTER,fontName="Helvetica", leading=9)
def bp(text, style=S_body): return Paragraph(text, style)
def bb(text): return Paragraph(text, S_body_bold)
def bs(text): return Paragraph(text, S_small)
def bsb(text): return Paragraph(text, S_small_bold)
def bc(text): return Paragraph(text, S_center)
def bullet_list(items, style=S_small):
return [Paragraph(f"โข {i}", style) for i in items]
def section_header(text, bg_color):
t = Table([[Paragraph(text, S_sec_hd)]], colWidths=[W])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), bg_color),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 8),
("RIGHTPADDING", (0,0), (-1,-1), 8),
("ROUNDEDCORNERS", [3]),
]))
return t
story = []
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# TITLE BLOCK
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
title_data = [[
Paragraph("COUGH TREATMENT CHART", S_title),
Paragraph("Acute ยท Subacute ยท Chronic | Based on Goldman-Cecil Medicine, Harrison's (2025), Tintinalli's Emergency Medicine & Murray/Nadel's Respiratory Medicine", S_subtitle)
]]
# stack them vertically
title_tbl = Table([
[Paragraph("COUGH TREATMENT CHART", S_title)],
[Paragraph("Acute ยท Subacute ยท Chronic | Goldman-Cecil Medicine, Harrison's 2025, Tintinalli's & Murray/Nadel's Respiratory Medicine", S_subtitle)]
], colWidths=[W])
title_tbl.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), C_NAVY),
("TOPPADDING", (0,0), (-1,-1), 6),
("BOTTOMPADDING", (0,0), (-1,-1), 6),
("LEFTPADDING", (0,0), (-1,-1), 10),
("RIGHTPADDING", (0,0), (-1,-1), 10),
]))
story.append(title_tbl)
story.append(Spacer(1, 4*mm))
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# OVERVIEW: DEFINITIONS
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
story.append(section_header(" 1. DEFINITIONS & CLASSIFICATION", C_NAVY))
story.append(Spacer(1, 2*mm))
def_data = [
[Paragraph("TYPE", S_colhd), Paragraph("DURATION", S_colhd), Paragraph("COMMON CAUSES", S_colhd), Paragraph("RED FLAGS", S_colhd)],
[
bp("ACUTE", S_body_bold),
bp("< 3 weeks"),
[bs("โข Common cold / URTI"), bs("โข Acute sinusitis"), bs("โข Allergic rhinitis"), bs("โข Pertussis"), bs("โข COPD exacerbation"), bs("โข Environmental irritant")],
[bs("โข Haemoptysis"), bs("โข Fever + purulent sputum"), bs("โข Chest pain / dyspnoea"), bs("โข Suspected PE / HF")]
],
[
bp("SUBACUTE", S_body_bold),
bp("3 โ 8 weeks"),
[bs("โข Post-infectious / post-viral"), bs("โข Pertussis"), bs("โข Residual airway inflammation"), bs("โข Early asthma"), bs("โข Residual sinusitis")],
[bs("โข Persistent fever"), bs("โข Worsening dyspnoea"), bs("โข Weight loss"), bs("โข No improvement at 4 wks")]
],
[
bp("CHRONIC", S_body_bold),
bp("> 8 weeks"),
[bs("โข Upper Airway Cough Syndrome (UACS/postnasal drip)"),
bs("โข Asthma / cough-variant asthma"),
bs("โข GERD"), bs("โข ACE inhibitor use"),
bs("โข Chronic bronchitis / smoking"),
bs("โข Eosinophilic bronchitis"),
bs("โข Bronchiectasis")],
[bs("โข Haemoptysis"), bs("โข Weight loss >5 kg"), bs("โข Hoarseness"), bs("โข Dysphagia"), bs("โข Abnormal CXR"), bs("โข Age >40 + smoker")]
],
]
col_w = [W*0.12, W*0.12, W*0.43, W*0.33]
def_tbl = Table(def_data, colWidths=col_w, repeatRows=1)
def_tbl.setStyle(TableStyle([
# Header row
("BACKGROUND", (0,0), (-1,0), C_NAVY),
("TEXTCOLOR", (0,0), (-1,0), C_WHITE),
# Row colours
("BACKGROUND", (0,1), (-1,1), C_LIGHT_BLU),
("BACKGROUND", (0,2), (-1,2), C_LIGHT_PUR),
("BACKGROUND", (0,3), (-1,3), C_LIGHT_RED),
# Borders
("GRID", (0,0), (-1,-1), 0.5, C_MID_GREY),
("BOX", (0,0), (-1,-1), 1, C_NAVY),
# Padding
("TOPPADDING", (0,0), (-1,-1), 4),
("BOTTOMPADDING", (0,0), (-1,-1), 4),
("LEFTPADDING", (0,0), (-1,-1), 5),
("RIGHTPADDING", (0,0), (-1,-1), 5),
("VALIGN", (0,0), (-1,-1), "TOP"),
]))
story.append(def_tbl)
story.append(Spacer(1, 4*mm))
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# SECTION 2 - ACUTE COUGH TREATMENT
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
story.append(section_header(" 2. ACUTE COUGH TREATMENT (< 3 weeks)", C_ACUTE))
story.append(Spacer(1, 2*mm))
acute_data = [
[Paragraph("CAUSE", S_colhd), Paragraph("FIRST-LINE TREATMENT", S_colhd), Paragraph("SECOND-LINE / ADJUNCTS", S_colhd), Paragraph("NOTES", S_colhd)],
[
bp("Common Cold (URTI)"),
[bs("โข Symptomatic only"), bs("โข Paracetamol / Ibuprofen"), bs("โข Saline nasal irrigation"), bs("โข Honey + warm fluids (adults)")],
[bs("โข Nasal decongestants (short-term)"), bs("โข 1st-gen antihistamine if rhinorrhoea"), bs("โข Steam inhalation")],
bs("Antibiotics NOT indicated. Evidence for OTC antitussives is weak.")
],
[
bp("Acute Bacterial Sinusitis"),
[bs("โข Amoxicillin 500mg TDS x 5-7 days"), bs("โข Intranasal corticosteroid"), bs("โข Saline irrigation")],
[bs("โข Amoxicillin-clavulanate if severe"), bs("โข Decongestant nasal spray โค3 days")],
bs("Diagnose only if symptoms >10 days or severe. Most sinusitis is viral.")
],
[
bp("Allergic Rhinitis"),
[bs("โข Non-sedating antihistamine (cetirizine 10mg OD / loratadine 10mg OD)"), bs("โข Intranasal corticosteroid spray")],
[bs("โข Levocetirizine 5mg OD"), bs("โข Montelukast if asthma co-exists"), bs("โข Allergen avoidance")],
bs("Treat underlying allergy to resolve cough.")
],
[
bp("Pertussis (Whooping Cough)"),
[bs("โข Azithromycin 500mg Day 1, 250mg Days 2-5"), bs("โข OR Clarithromycin 500mg BD x 7 days")],
[bs("โข Erythromycin (alt if macrolide intolerant)"), bs("โข Cough suppressants - limited benefit")],
bs("Antibiotics reduce transmission, not duration if >3 weeks. Notify public health.")
],
[
bp("COPD Exacerbation"),
[bs("โข Short-acting bronchodilator (SABA + SAMA)"), bs("โข Prednisolone 40mg x 5 days"), bs("โข Antibiotics if purulent sputum")],
[bs("โข Azithromycin 500mg OD x 3 days"), bs("โข Oxygen therapy if SpO2 <88%"), bs("โข Consider NIV if severe")],
bs("Antibiotic choice: amoxicillin, doxycycline, or clarithromycin.")
],
[
bp("Pneumonia"),
[bs("โข Amoxicillin 500mg TDS x 5 days (community)"), bs("โข Doxycycline 200mg Day 1 then 100mg OD")],
[bs("โข Levofloxacin 500mg OD if severe"), bs("โข Consider hospital admission (CURB-65 โฅ2)"), bs("โข Antipyretics, hydration")],
bs("CURB-65 score guides admission. CXR mandatory.")
],
[
bp("Environmental / Irritant"),
[bs("โข Remove / avoid irritant source"), bs("โข Saline nasal wash"), bs("โข Humidify environment")],
[bs("โข Short-term antitussive if distressing")],
bs("Occupational exposure: refer to occupational health.")
],
]
a_col_w = [W*0.17, W*0.30, W*0.30, W*0.23]
acute_tbl = Table(acute_data, colWidths=a_col_w, repeatRows=1)
acute_tbl.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), C_ACUTE),
("TEXTCOLOR", (0,0), (-1,0), C_WHITE),
("ROWBACKGROUNDS",(0,1), (-1,-1), [C_WHITE, C_LIGHT_BLU]),
("GRID", (0,0), (-1,-1), 0.4, C_MID_GREY),
("BOX", (0,0), (-1,-1), 1, C_ACUTE),
("TOPPADDING", (0,0), (-1,-1), 4),
("BOTTOMPADDING", (0,0), (-1,-1), 4),
("LEFTPADDING", (0,0), (-1,-1), 5),
("RIGHTPADDING", (0,0), (-1,-1), 5),
("VALIGN", (0,0), (-1,-1), "TOP"),
]))
story.append(acute_tbl)
story.append(Spacer(1, 4*mm))
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# SECTION 3 - SUBACUTE COUGH
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
story.append(section_header(" 3. SUBACUTE COUGH TREATMENT (3 โ 8 weeks)", C_SUBACUTE))
story.append(Spacer(1, 2*mm))
sub_data = [
[Paragraph("CAUSE", S_colhd), Paragraph("TREATMENT", S_colhd), Paragraph("ADDITIONAL MEASURES", S_colhd)],
[
bp("Post-Infectious / Post-Viral Cough"),
[bs("โข Reassurance - usually self-limiting"), bs("โข Inhaled ipratropium bromide"), bs("โข Short course intranasal corticosteroid"), bs("โข 1st-gen antihistamine/decongestant for UACS")],
[bs("โข Avoid triggers (cold air, smoke)"), bs("โข Honey + warm fluids"), bs("โข If bronchospasm: salbutamol inhaler"), bs("โข Re-evaluate at 8 weeks if persists")]
],
[
bp("Pertussis (late presentation)"),
[bs("โข Macrolide antibiotic (reduces transmission)"), bs("โข Azithromycin or clarithromycin"), bs("โข Cough suppressants (limited benefit)")],
[bs("โข Notify public health authority"), bs("โข Vaccinate close contacts"), bs("โข Salbutamol if bronchospasm component")]
],
[
bp("Residual Asthma / Airway Hyperreactivity"),
[bs("โข Inhaled salbutamol (SABA) PRN"), bs("โข If persistent: trial inhaled corticosteroid (ICS)"), bs("โข Budesonide 200mcg BD or Beclomethasone 100mcg BD")],
[bs("โข Confirm diagnosis with spirometry"), bs("โข Methacholine challenge if spirometry normal"), bs("โข Add LABA if inadequate ICS response")]
],
[
bp("Residual / Subacute Sinusitis"),
[bs("โข Intranasal corticosteroid (fluticasone 50mcg/nostril BD)"), bs("โข Saline nasal irrigation BD"), bs("โข Antihistamine if allergic component")],
[bs("โข CT sinuses if no improvement"), bs("โข ENT referral if refractory"), bs("โข Avoid prolonged decongestant use")]
],
]
s_col_w = [W*0.20, W*0.42, W*0.38]
sub_tbl = Table(sub_data, colWidths=s_col_w, repeatRows=1)
sub_tbl.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), C_SUBACUTE),
("TEXTCOLOR", (0,0), (-1,0), C_WHITE),
("ROWBACKGROUNDS",(0,1), (-1,-1), [C_WHITE, C_LIGHT_PUR]),
("GRID", (0,0), (-1,-1), 0.4, C_MID_GREY),
("BOX", (0,0), (-1,-1), 1, C_SUBACUTE),
("TOPPADDING", (0,0), (-1,-1), 4),
("BOTTOMPADDING", (0,0), (-1,-1), 4),
("LEFTPADDING", (0,0), (-1,-1), 5),
("RIGHTPADDING", (0,0), (-1,-1), 5),
("VALIGN", (0,0), (-1,-1), "TOP"),
]))
story.append(sub_tbl)
story.append(Spacer(1, 4*mm))
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# SECTION 4 - CHRONIC COUGH
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
story.append(section_header(" 4. CHRONIC COUGH TREATMENT (> 8 weeks)", C_CHRONIC))
story.append(Spacer(1, 2*mm))
chr_data = [
[Paragraph("CAUSE", S_colhd), Paragraph("FIRST-LINE TREATMENT", S_colhd), Paragraph("SECOND-LINE", S_colhd), Paragraph("NOTES", S_colhd)],
[
bp("Upper Airway Cough Syndrome (UACS / Postnasal Drip)"),
[bs("โข 1st-gen antihistamine + decongestant"), bs(" (chlorphenamine + pseudoephedrine)"), bs("โข Intranasal corticosteroid spray")],
[bs("โข Ipratropium nasal spray"), bs("โข Saline irrigation"), bs("โข Treat underlying cause (allergy, sinusitis)")],
bs("Most common cause of chronic cough. Treat empirically before further tests.")
],
[
bp("Asthma / Cough-Variant Asthma"),
[bs("โข Inhaled corticosteroid (ICS)"), bs(" Beclomethasone 100-200mcg BD"), bs("โข SABA (salbutamol) PRN")],
[bs("โข Add LABA (salmeterol/formoterol)"), bs("โข Montelukast as add-on"), bs("โข Escalate per GINA 2025 steps")],
bs("Confirm with spirometry ยฑ methacholine challenge. Nocturnal worsening is typical.")
],
[
bp("GERD (Gastro-oesophageal Reflux)"),
[bs("โข Lifestyle modifications:"), bs(" - Elevate head of bed"), bs(" - Avoid late meals, alcohol, caffeine"), bs(" - Weight loss if overweight"), bs("โข Proton Pump Inhibitor (omeprazole 20-40mg OD)")],
[bs("โข H2 blocker (ranitidine/famotidine)"), bs("โข Prokinetic agent (metoclopramide)"), bs("โข pH monitoring / gastroscopy if refractory")],
bs("Trial PPI for 8 weeks. Cough may take weeks to resolve after reflux is controlled.")
],
[
bp("ACE Inhibitor-Induced Cough"),
[bs("โข STOP the ACE inhibitor"), bs("โข Switch to ARB (losartan, valsartan)"), bs("โข Cough resolves in 1-4 weeks")],
[bs("โข May take up to 3 months to fully resolve"), bs("โข No specific antitussive needed")],
bs("Affects 5-10% of ACE inhibitor users. ARBs cause significantly less cough (~35% rate of ACE-inhibitor cough).")
],
[
bp("Chronic Bronchitis / Smoking"),
[bs("โข Smoking cessation (most important)"), bs("โข Short-acting bronchodilator (SABA/SAMA)"), bs("โข Pulmonary rehabilitation")],
[bs("โข LAMA (tiotropium) if COPD confirmed"), bs("โข ICS + LABA if FEV1 <60%"), bs("โข Mucolytics (carbocisteine, NAC)")],
bs("Morning productive cough is hallmark. Confirm COPD with spirometry. Follow GOLD 2025 guidelines.")
],
[
bp("Eosinophilic Bronchitis"),
[bs("โข Inhaled corticosteroid"), bs(" Budesonide 400mcg BD or"), bs(" Fluticasone 250mcg BD")],
[bs("โข Oral prednisolone short course if severe"), bs("โข Identify and avoid causative allergen")],
bs("Normal spirometry but eosinophilia on sputum. Responds well to ICS. Diagnose with sputum cytology.")
],
[
bp("Bronchiectasis"),
[bs("โข Airway clearance techniques (physiotherapy)"), bs("โข Antibiotics during exacerbations"), bs("โข Mucolytics (hypertonic saline, DNase)")],
[bs("โข Macrolide prophylaxis (azithromycin 250mg x3/wk)"), bs("โข Bronchodilators for airflow obstruction"), bs("โข Treat underlying cause (CF, PCD, immunodeficiency)")],
bs("CT chest confirms diagnosis. Long-term management requires specialist input.")
],
[
bp("Chronic Cough Hypersensitivity Syndrome (Refractory)"),
[bs("โข Speech therapy / cough suppression techniques"), bs("โข Low-dose opioids (codeine, morphine)"), bs("โข Gabapentin 100-300mg TDS")],
[bs("โข P2X3 antagonists (gefapixant - where available)"), bs("โข Amitriptyline 10-25mg nocte"), bs("โข Multidisciplinary cough clinic referral")],
bs("Diagnosis of exclusion. Neurally-mediated hypersensitivity. Emerging role for P2X3 antagonists per 2025 guidelines.")
],
]
c_col_w = [W*0.19, W*0.29, W*0.26, W*0.26]
chr_tbl = Table(chr_data, colWidths=c_col_w, repeatRows=1)
chr_tbl.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), C_CHRONIC),
("TEXTCOLOR", (0,0), (-1,0), C_WHITE),
("ROWBACKGROUNDS",(0,1), (-1,-1), [C_WHITE, C_LIGHT_RED]),
("GRID", (0,0), (-1,-1), 0.4, C_MID_GREY),
("BOX", (0,0), (-1,-1), 1, C_CHRONIC),
("TOPPADDING", (0,0), (-1,-1), 4),
("BOTTOMPADDING", (0,0), (-1,-1), 4),
("LEFTPADDING", (0,0), (-1,-1), 5),
("RIGHTPADDING", (0,0), (-1,-1), 5),
("VALIGN", (0,0), (-1,-1), "TOP"),
]))
story.append(chr_tbl)
story.append(Spacer(1, 4*mm))
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# SECTION 5 - SYMPTOMATIC ANTITUSSIVES
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
story.append(section_header(" 5. SYMPTOMATIC / ANTITUSSIVE AGENTS", C_TEAL))
story.append(Spacer(1, 2*mm))
ant_data = [
[Paragraph("AGENT", S_colhd), Paragraph("CLASS", S_colhd), Paragraph("DOSE (ADULT)", S_colhd), Paragraph("INDICATION", S_colhd), Paragraph("NOTES", S_colhd)],
[bp("Dextromethorphan"), bs("Central antitussive"), bs("15-30mg every 6-8h"), bs("Acute non-productive cough"), bs("OTC. Do not use with MAOIs.")],
[bp("Codeine"), bs("Opioid antitussive"), bs("15-30mg every 4-6h"), bs("Moderate non-productive cough"), bs("Controlled drug. Avoid in children <12y. Habit-forming.")],
[bp("Pholcodine"), bs("Opioid antitussive"), bs("5-10mg every 6-8h"), bs("Dry irritating cough"), bs("Less constipating than codeine.")],
[bp("Guaifenesin"), bs("Expectorant"), bs("200-400mg every 4h"), bs("Productive cough - loosen mucus"), bs("Adequate hydration essential. OTC.")],
[bp("Carbocisteine"), bs("Mucolytic"), bs("750mg TDS initially\nthen 500mg TDS"), bs("Chronic productive cough, COPD, bronchiectasis"), bs("Reduces exacerbations. Avoid in active peptic ulcer.")],
[bp("N-Acetylcysteine (NAC)"), bs("Mucolytic"), bs("200mg TDS or 600mg OD"), bs("Chronic bronchitis, mucus hypersecretion"), bs("Also antioxidant. Well tolerated.")],
[bp("Gabapentin"), bs("Neuropathic agent"), bs("100-300mg TDS"), bs("Chronic/refractory cough, cough hypersensitivity"), bs("Titrate slowly. Causes dizziness/somnolence.")],
[bp("Honey"), bs("Non-pharmacological"), bs("10mL at bedtime"), bs("Acute cough in adults and children >1y"), bs("Evidence-based, especially in children. Not under 1y (botulism risk).")],
]
t_col_w = [W*0.17, W*0.15, W*0.18, W*0.25, W*0.25]
ant_tbl = Table(ant_data, colWidths=t_col_w, repeatRows=1)
ant_tbl.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), C_TEAL),
("TEXTCOLOR", (0,0), (-1,0), C_WHITE),
("ROWBACKGROUNDS",(0,1), (-1,-1), [C_WHITE, C_LIGHT_GRN]),
("GRID", (0,0), (-1,-1), 0.4, C_MID_GREY),
("BOX", (0,0), (-1,-1), 1, C_TEAL),
("TOPPADDING", (0,0), (-1,-1), 4),
("BOTTOMPADDING", (0,0), (-1,-1), 4),
("LEFTPADDING", (0,0), (-1,-1), 5),
("RIGHTPADDING", (0,0), (-1,-1), 5),
("VALIGN", (0,0), (-1,-1), "TOP"),
]))
story.append(ant_tbl)
story.append(Spacer(1, 4*mm))
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# SECTION 6 - DIAGNOSTIC WORKUP / SEQUENTIAL APPROACH
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
story.append(section_header(" 6. SEQUENTIAL DIAGNOSTIC & MANAGEMENT APPROACH (Chronic Cough)", C_NAVY))
story.append(Spacer(1, 2*mm))
steps = [
("Step 1", "Chest X-Ray", "Mandatory for all chronic cough. Abnormal CXR requires further investigation (CT, bronchoscopy, sputum culture)."),
("Step 2", "Smoking & Drug Review", "Stop smoking. Discontinue ACE inhibitors and ARBs. Reassess after 4 weeks."),
("Step 3", "Treat for UACS empirically", "Oral 1st-gen antihistamine + decongestant ยฑ intranasal corticosteroid. If cough improves, continue and consider sinus imaging."),
("Step 4", "Evaluate for Asthma", "Spirometry (inc. flow-volume loop for vocal cord dysfunction). Trial inhaled bronchodilator + ICS if obstructive pattern or methacholine-positive."),
("Step 5", "Treat for GERD", "Trial PPI (omeprazole 20-40mg OD) + lifestyle changes for 8 weeks. 24h pH monitoring if no response."),
("Step 6", "Eosinophilic Bronchitis", "Sputum cytology for eosinophils. Trial ICS if positive (>3% eosinophils)."),
("Step 7", "Specialist Referral", "If cough unexplained after all above steps: refer to respiratory medicine. Consider: CT chest/HRCT, bronchoscopy, FENO, oesophageal manometry, speech therapy."),
("Step 8", "Refractory / Hypersensitivity","If no organic cause: diagnosis of chronic cough hypersensitivity syndrome. Consider gabapentin, low-dose opioids, speech therapy, or P2X3 antagonists."),
]
step_data = [[Paragraph("STEP", S_colhd), Paragraph("ACTION", S_colhd), Paragraph("DETAIL", S_colhd)]]
for num, action, detail in steps:
step_data.append([bsb(num), bsb(action), bs(detail)])
st_col_w = [W*0.08, W*0.22, W*0.70]
step_tbl = Table(step_data, colWidths=st_col_w, repeatRows=1)
step_tbl.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), C_NAVY),
("TEXTCOLOR", (0,0), (-1,0), C_WHITE),
("ROWBACKGROUNDS",(0,1), (-1,-1), [C_WHITE, C_GREY_BG]),
("GRID", (0,0), (-1,-1), 0.4, C_MID_GREY),
("BOX", (0,0), (-1,-1), 1, C_NAVY),
("TOPPADDING", (0,0), (-1,-1), 4),
("BOTTOMPADDING", (0,0), (-1,-1), 4),
("LEFTPADDING", (0,0), (-1,-1), 5),
("RIGHTPADDING", (0,0), (-1,-1), 5),
("VALIGN", (0,0), (-1,-1), "TOP"),
("ALIGN", (0,0), (0,-1), "CENTER"),
]))
story.append(step_tbl)
story.append(Spacer(1, 4*mm))
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# SECTION 7 - RED FLAGS / WHEN TO REFER
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
story.append(section_header(" 7. RED FLAGS - URGENT INVESTIGATION / REFERRAL", C_WARN))
story.append(Spacer(1, 2*mm))
warn_data = [
[Paragraph("RED FLAG SIGN", S_colhd), Paragraph("POSSIBLE SERIOUS CAUSE", S_colhd), Paragraph("ACTION", S_colhd)],
[bs("Haemoptysis (coughing blood)"), bs("Lung cancer, TB, bronchiectasis, PE"), bs("Urgent CXR + CT chest + bronchoscopy referral")],
[bs("Weight loss >5 kg, night sweats"), bs("Malignancy, TB, lymphoma"), bs("CXR, sputum AFB, CT chest, haematology")],
[bs("Dysphagia or hoarseness"), bs("Lung/oesophageal cancer, laryngeal pathology"), bs("ENT + gastroenterology referral")],
[bs("Progressive dyspnoea"), bs("Heart failure, COPD, interstitial lung disease, PE"), bs("BNP, spirometry, echo, CTPA if PE suspected")],
[bs("Fever + purulent sputum + consolidation"), bs("Pneumonia, lung abscess, empyema"), bs("CXR, sputum culture, antibiotics, consider admission")],
[bs("Cough in smoker >40y, new or changed"), bs("Lung cancer"), bs("Urgent CXR; CT chest if CXR normal but suspicion high")],
[bs("Stridor (high-pitched inspiratory noise)"), bs("Upper airway obstruction, foreign body, epiglottitis"), bs("EMERGENCY - secure airway, ENT/anaesthetics urgently")],
[bs("Clubbing + chronic cough"), bs("Lung cancer, bronchiectasis, IPF"), bs("CT HRCT, pulmonary function tests, specialist referral")],
]
w_col_w = [W*0.28, W*0.35, W*0.37]
warn_tbl = Table(warn_data, colWidths=w_col_w, repeatRows=1)
warn_tbl.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,0), C_WARN),
("TEXTCOLOR", (0,0), (-1,0), C_WHITE),
("ROWBACKGROUNDS",(0,1), (-1,-1), [C_WHITE, C_LIGHT_RED]),
("GRID", (0,0), (-1,-1), 0.4, C_MID_GREY),
("BOX", (0,0), (-1,-1), 1, C_WARN),
("TOPPADDING", (0,0), (-1,-1), 4),
("BOTTOMPADDING", (0,0), (-1,-1), 4),
("LEFTPADDING", (0,0), (-1,-1), 5),
("RIGHTPADDING", (0,0), (-1,-1), 5),
("VALIGN", (0,0), (-1,-1), "TOP"),
]))
story.append(warn_tbl)
story.append(Spacer(1, 4*mm))
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# FOOTER
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
story.append(HRFlowable(width=W, thickness=0.5, color=C_MID_GREY))
story.append(Spacer(1, 2*mm))
story.append(Paragraph(
"Sources: Goldman-Cecil Medicine (International Ed.) | Harrison's Principles of Internal Medicine 22E (2025) | "
"Tintinalli's Emergency Medicine | Murray & Nadel's Textbook of Respiratory Medicine | "
"2025 Chronic Cough Guidelines Review (Medicine Journal) | GOLD 2025 | GINA 2025 | "
"Prepared by Orris Clinical Reference | June 2026 | For educational use only - not a substitute for clinical judgment.",
S_footer
))
doc.build(story)
print(f"SUCCESS: PDF saved to {OUT}")
print(f"File size: {os.path.getsize(OUT):,} bytes")
cd /home/daytona/workspace/cough-chart && python3 generate_cough_chart.py
Cough Treatment Chart
PDF Document ยท PDF
| Section | Content |
|---|---|
| 1. Definitions | Duration criteria, causes, and red flags for acute/subacute/chronic cough |
| 2. Acute Cough | Treatment by cause - common cold, sinusitis, allergic rhinitis, pertussis, COPD, pneumonia, environmental |
| 3. Subacute Cough | Post-infectious cough, pertussis, asthma, sinusitis management |
| 4. Chronic Cough | UACS, asthma, GERD, ACE inhibitor cough, chronic bronchitis, eosinophilic bronchitis, bronchiectasis, refractory hypersensitivity syndrome |
| 5. Antitussive Agents | Drug table - dextromethorphan, codeine, guaifenesin, carbocisteine, gabapentin, honey - with doses |
| 6. Sequential Approach | 8-step diagnostic/management algorithm for chronic cough (Goldman-Cecil protocol) |
| 7. Red Flags | Urgent signs requiring investigation - haemoptysis, weight loss, stridor, new cough in smokers, hoarseness |