A52 year old male attending OPD with fever, cough breathlessness investigation shows Bordatella pertussis . Plan therapy according to disease stage and suggest care plan gor his asymptomatic 6 year nephew staying in the same house . Plan therapyA52 year old male attending OPD with fever, cough breathlessness investigation shows Bordatella pertussis . Plan therapy according to disease stage and suggest care plan gor his asymptomatic 6 year nephew staying in the same house . Plan therapy

Reading File
Finding Sources
Finding Sources
Searching PubMed

"pertussis" AND "treatment" AND "adults"

Reading File
Reading File
Finding Sources
Reading File
Reading File
Finding Sources
Finding Sources
Finding Sources
Reading File
Finding Sources
Searching the Web

Bordetella pertussis treatment adults stage-based therapy azithromycin 2024 CDC guidelines

Reading File
Reading Web Page

https://www.cdc.gov/pertussis/hcp/clinical-care/index.html

I now have comprehensive information from the textbooks and CDC guidelines. Let me compile the full clinical response.

Bordetella pertussis: Stage-Based Therapy for a 52-Year-Old Male + Care Plan for 6-Year-Old Asymptomatic Contact


Step 1 - Identify the Disease Stage

Pertussis progresses through four stages. The patient's current stage determines treatment goals:
StageDurationKey Features
Incubation7-10 daysAsymptomatic
Catarrhal1-2 weeksRhinorrhea, low-grade fever, mild cough, sneezing, malaise
Paroxysmal2-4 weeksRepetitive paroxysmal cough with inspiratory whoop, post-tussive vomiting, lymphocytosis; B. pertussis most contagious
Convalescent3-4 weeks (or longer)Diminishing paroxysms; secondary complications (pneumonia, seizures) can emerge
A 52-year-old presenting with fever, cough, and breathlessness - note that fever is absent or minimal in classic pertussis. In adults with partial immunity, the classic whoop is often absent; the presentation is an atypical persistent cough with vague symptoms. The fever and breathlessness raise concern for a co-existing complication (pneumonia is the most common adult complication). He is most likely in the catarrhal or early paroxysmal stage at the time of OPD presentation.

Step 2 - Treatment Plan for the 52-Year-Old Male

A. Antibiotic Therapy (Stage-Dependent Goals)

Per CDC guidelines and multiple textbook sources (Rosen's EM, Medical Microbiology 9e, Red Book 2021):
"Antibiotic treatment does not reduce the severity or duration of illness at any phase. The goal of antibiotic therapy is to decrease infectivity and carriage." - Rosen's Emergency Medicine
StageValue of AntibioticsRecommendation
Catarrhal (within 1-3 weeks of cough onset)High - can shorten clinical course AND reduce infectivityTreat immediately
Early ParoxysmalModerate - reduces carriage and transmission, less impact on symptomsStill treat
Late Paroxysmal / ConvalescentMinimal clinical benefit, but reduces infectivityTreat within 3 weeks of cough onset
Beyond 3 weeksNo clinical benefit; treat only if household includes infants or high-risk contactsIndividualize
First-Line (Preferred): Azithromycin
  • Adult dose: 500 mg on Day 1, then 250 mg on Days 2-5 (5-day course)
  • Alternative 3-day regimen: 500 mg/day for 3 days (equal efficacy)
  • Better tolerated than erythromycin; once-daily dosing improves adherence
Second-Line: Clarithromycin
  • 500 mg twice daily for 7 days
Third-Line: Erythromycin
  • 500 mg four times daily for 14 days (7-day course equally effective but worse GI side effects)
Alternative (macrolide-intolerant):
  • Trimethoprim-sulfamethoxazole (TMP-SMX): 160/800 mg (DS tablet) twice daily for 14 days
Important cardiac caveat for this 52-year-old male: Azithromycin can prolong the QT interval. Before prescribing, screen for: pre-existing QT prolongation, bradyarrhythmias, uncompensated heart failure, concurrent QT-prolonging drugs (Class IA or III antiarrhythmics), hypokalemia, or hypomagnesemia. If any are present, use clarithromycin or TMP-SMX instead. This is particularly relevant for a middle-aged male who may have undiagnosed cardiovascular risk. - CDC Treatment Guidelines

B. Supportive / Symptomatic Care

  • Oxygen therapy if SpO2 is low (given breathlessness as a symptom)
  • Hydration - IV if unable to maintain oral intake
  • Frequent suctioning of secretions if needed
  • Avoidance of respiratory irritants (smoke, dust, strong odors that trigger paroxysms)
  • Nutritional support if paroxysms are causing post-tussive vomiting
  • Droplet isolation - patient should wear a mask; avoid close contact for 3 weeks after cough onset OR for 5 days after starting antibiotics, whichever comes first
Adjunct therapies not recommended:
  • Corticosteroids: not proven effective in adults
  • Beta-2 agonists: no benefit on paroxysm frequency
  • Antihistamines and cough suppressants: ineffective
  • Pertussis immune globulin: no proven benefit per Rosen's EM

C. Hospitalization Criteria

Admit this 52-year-old if any of the following are present:
  • Hypoxia / pneumonia (he has breathlessness - investigate)
  • Severe paroxysms with cyanosis or syncope
  • Inability to maintain oral hydration
  • CNS complications (seizures, encephalopathy)
  • Significant cardiovascular instability

D. Investigations to Order

  • Chest X-ray: rule out pneumonia (most common adult complication)
  • CBC: lymphocytosis is characteristic of pertussis
  • Pulse oximetry / ABG if breathlessness is significant
  • ECG: mandatory before prescribing azithromycin (QT interval assessment)
  • Serum electrolytes (potassium, magnesium) before azithromycin
  • PCR nasopharyngeal swab (if not already confirmed) - gold standard diagnosis

E. Vaccination Status Review

  • If not previously given, administer Tdap (Tetanus-diphtheria-acellular pertussis) booster - recommended for all adults
  • This protects against future episodes and reduces community transmission

Step 3 - Care Plan for the 6-Year-Old Asymptomatic Nephew (Household Contact)

A. Risk Assessment

The nephew is a high-risk household contact because:
  1. He lives in the same house - continuous close droplet exposure
  2. Age 6 - while likely vaccinated (DTaP series), vaccine-induced immunity wanes; he may be in the window of reduced protection
  3. Young children, even if vaccinated, can develop pertussis and can transmit to infants or immunocompromised individuals

B. Postexposure Prophylaxis (PEP) - RECOMMENDED

Per Harriet Lane Handbook (23rd ed.), Red Book 2021, and Rosen's EM:
"Postexposure prophylaxis with an appropriate macrolide is recommended for household contacts of a pertussis case."
PEP Drug of Choice: Azithromycin
  • Child dose: 10 mg/kg on Day 1 (max 500 mg), then 5 mg/kg on Days 2-5 (max 250 mg/day)
  • Alternatively: 10 mg/kg/day for 3 days
  • AAFP guidelines confirm azithromycin as preferred agent with level A evidence (consistent meta-analysis)
Clarithromycin alternative:
  • 7.5 mg/kg twice daily (max 500 mg/dose) for 7 days
Erythromycin alternative:
  • 40-50 mg/kg/day in 4 divided doses for 14 days (max 2 g/day) - poorly tolerated
TMP-SMX alternative (for macrolide allergy - age ≥2 months):
  • 4 mg/kg TMP component twice daily for 14 days
Timing of PEP: Start as soon as possible - ideally within 21 days of the index patient's cough onset for maximum effect.

C. Vaccination Review for the Nephew

  • Verify DTaP vaccination history (recommended at 2, 4, 6, 15-18 months, and 4-6 years)
  • If incompletely vaccinated: complete the schedule immediately
  • If schedule is up to date: no additional dose required immediately
  • Per Harriet Lane: "Immunize all unimmunized or partially immunized close contacts based on the recommended schedule."

D. Monitoring the Nephew

  • Even with PEP, monitor for symptom onset for 21 days from last exposure to the index case
  • Watch for: persistent cough (>7 days), nighttime cough paroxysms, any inspiratory whoop
  • Keep him away from infants (<6 months), elderly, or immunocompromised individuals in the community during the monitoring period
  • No school exclusion required if PEP is completed and he remains asymptomatic - but follow local public health guidelines

E. Household Infection Control Measures

MeasureDetail
Isolation of index patientDroplet precautions for at least 5 days after starting antibiotics (or 3 weeks from cough onset if untreated)
Hand hygieneRegular handwashing; especially before contact with the child
Cough etiquetteIndex patient to wear surgical mask when around the nephew
Separate sleeping areaIf feasible, reduce close contact during the infectious period
NotificationNotify the child's school/pediatrician about the household exposure
Other household contactsAll unvaccinated or incompletely vaccinated household members should also receive PEP

Summary Table

52-Year-Old Male (Index Case)6-Year-Old Nephew (Close Contact)
StatusConfirmed pertussisAsymptomatic household contact
Primary drugAzithromycin 500 mg Day 1, then 250 mg Days 2-5Azithromycin 10 mg/kg Day 1, then 5 mg/kg Days 2-5
Goal of treatmentReduce infectivity and carriage; treat complicationsPostexposure prophylaxis - prevent disease
Supportive careO2, hydration, droplet isolationSymptom monitoring x21 days
VaccinationTdap booster if not givenVerify/complete DTaP series
Cardiac screeningECG before azithromycinNot required (young age, low risk)
HospitalizationIf pneumonia/hypoxia/severe paroxysmsOutpatient unless symptomatic

Sources: Rosen's Emergency Medicine (9e), Medical Microbiology 9e, Red Book 2021 (AAP), Harriet Lane Handbook 23e, CDC Pertussis Treatment Guidelines, AAFP AFP 2021

Create a printable patient discharge sheet with antibiotic adherence & warning signs for the 52-year-old

Reading File
Running Command

ls -la /tmp/workspace/ 2>/dev/null || mkdir -p /tmp/workspace && echo "created"

Running Command

mkdir -p /tmp/workspace/pertussis-discharge && python3 << 'EOF' from docx import Document from docx.shared import Pt, Inches, RGBColor from docx.enum.text import WD_ALIGN_PARAGRAPH from docx.enum.table import WD_TABLE_ALIGNMENT, WD_ALIGN_VERTICAL from docx.oxml.ns import qn from docx.oxml import OxmlElement import datetime doc = Document() # ── Page margins ────────────────────────────────────────────────────────────── from docx.shared import Inches section = doc.sections[0] section.page_width = Inches(8.27) # A4 section.page_height = Inches(11.69) section.left_margin = Inches(0.75) section.right_margin = Inches(0.75) section.top_margin = Inches(0.6) section.bottom_margin = Inches(0.6) # ── Colour palette ──────────────────────────────────────────────────────────── DARK_BLUE = RGBColor(0x00, 0x44, 0x88) MED_BLUE = RGBColor(0x00, 0x6F, 0xC2) LIGHT_BLUE = RGBColor(0xD6, 0xEA, 0xF8) RED = RGBColor(0xC0, 0x39, 0x2B) ORANGE = RGBColor(0xE6, 0x7E, 0x22) GREEN = RGBColor(0x1A, 0x7A, 0x4A) DARK_GRAY = RGBColor(0x2C, 0x3E, 0x50) LIGHT_GRAY = RGBColor(0xF2, 0xF3, 0xF4) WHITE = RGBColor(0xFF, 0xFF, 0xFF) # ── Helper utilities ────────────────────────────────────────────────────────── def set_cell_bg(cell, rgb: RGBColor): tc = cell._tc tcPr = tc.get_or_add_tcPr() shd = OxmlElement('w:shd') hex_color = f"{rgb[0]:02X}{rgb[1]:02X}{rgb[2]:02X}" shd.set(qn('w:val'), 'clear') shd.set(qn('w:color'), 'auto') shd.set(qn('w:fill'), hex_color) tcPr.append(shd) def set_cell_borders(cell, top=None, bottom=None, left=None, right=None): tc = cell._tc tcPr = tc.get_or_add_tcPr() tcBorders = OxmlElement('w:tcBorders') for side, val in [('top', top), ('bottom', bottom), ('left', left), ('right', right)]: if val: el = OxmlElement(f'w:{side}') el.set(qn('w:val'), val.get('val', 'single')) el.set(qn('w:sz'), val.get('sz', '8')) el.set(qn('w:space'), '0') el.set(qn('w:color'), val.get('color', '000000')) tcBorders.append(el) tcPr.append(tcBorders) def add_colored_run(para, text, bold=False, italic=False, size=11, color=DARK_GRAY, font_name='Arial'): run = para.add_run(text) run.bold = bold run.italic = italic run.font.size = Pt(size) run.font.color.rgb = color run.font.name = font_name return run def banner(doc, text, bg=DARK_BLUE, fg=WHITE, size=15, space_before=8, space_after=4): """Full-width colored heading band.""" tbl = doc.add_table(rows=1, cols=1) tbl.alignment = WD_TABLE_ALIGNMENT.CENTER tbl.style = 'Table Grid' cell = tbl.cell(0, 0) set_cell_bg(cell, bg) cell.width = Inches(6.77) p = cell.paragraphs[0] p.alignment = WD_ALIGN_PARAGRAPH.CENTER r = p.add_run(text) r.bold = True r.font.size = Pt(size) r.font.color.rgb = fg r.font.name = 'Arial' # remove table borders for side in ['top','bottom','left','right']: set_cell_borders(cell, **{side: {'val':'none','sz':'0','color':'FFFFFF'}}) p.paragraph_format.space_before = Pt(space_before) p.paragraph_format.space_after = Pt(space_after) doc.add_paragraph() # small gap return tbl def section_header(doc, text, color=MED_BLUE, size=12): p = doc.add_paragraph() p.paragraph_format.space_before = Pt(6) p.paragraph_format.space_after = Pt(2) r = p.add_run(f" {text}") r.bold = True r.font.size = Pt(size) r.font.color.rgb = color r.font.name = 'Arial' # underline via shading table tbl = doc.add_table(rows=1, cols=1) tbl.style = 'Table Grid' cell = tbl.cell(0,0) set_cell_bg(cell, LIGHT_BLUE) inner = cell.paragraphs[0] inner.alignment = WD_ALIGN_PARAGRAPH.LEFT rr = inner.add_run(f" {text}") rr.bold = True rr.font.size = Pt(size) rr.font.color.rgb = DARK_BLUE rr.font.name = 'Arial' for side in ['top','bottom','left','right']: set_cell_borders(cell, **{side: {'val':'none','sz':'0','color':'FFFFFF'}}) inner.paragraph_format.space_before = Pt(3) inner.paragraph_format.space_after = Pt(3) doc.add_paragraph() # ══════════════════════════════════════════════════════════════════════════════ # HEADER BLOCK # ══════════════════════════════════════════════════════════════════════════════ # Hospital name banner ht = doc.add_table(rows=1, cols=1) ht.alignment = WD_TABLE_ALIGNMENT.CENTER ht.style = 'Table Grid' hc = ht.cell(0,0) set_cell_bg(hc, DARK_BLUE) hp = hc.paragraphs[0] hp.alignment = WD_ALIGN_PARAGRAPH.CENTER hr1 = hp.add_run("PATIENT DISCHARGE INSTRUCTION SHEET") hr1.bold = True; hr1.font.size = Pt(17); hr1.font.color.rgb = WHITE; hr1.font.name = 'Arial' hp.paragraph_format.space_before = Pt(8) hp.paragraph_format.space_after = Pt(2) hp2 = hc.add_paragraph() hp2.alignment = WD_ALIGN_PARAGRAPH.CENTER hr2 = hp2.add_run("Infectious Disease / Respiratory Unit") hr2.font.size = Pt(11); hr2.font.color.rgb = RGBColor(0xAE,0xD6,0xF1); hr2.font.name = 'Arial' hp2.paragraph_format.space_before = Pt(0) hp2.paragraph_format.space_after = Pt(8) for side in ['top','bottom','left','right']: set_cell_borders(hc, **{side: {'val':'none','sz':'0','color':'FFFFFF'}}) doc.add_paragraph() # Patient details table pt_tbl = doc.add_table(rows=3, cols=4) pt_tbl.style = 'Table Grid' pt_tbl.alignment = WD_TABLE_ALIGNMENT.CENTER labels = [ ("Patient Name:", "________________________"), ("Date of Discharge:", datetime.date.today().strftime("%d %B %Y")), ("Age / Sex:", "52 Years / Male"), ("MRN / IP No:", "________________________"), ("Diagnosis:", "Bordetella pertussis (Whooping Cough)"), ("Treating Physician:", "________________________"), ] idx = 0 for row in pt_tbl.rows: row.height = Pt(22) for i in range(0, 4, 2): lbl_cell = row.cells[i] val_cell = row.cells[i+1] set_cell_bg(lbl_cell, LIGHT_BLUE) lp = lbl_cell.paragraphs[0] lp.alignment = WD_ALIGN_PARAGRAPH.LEFT lr = lp.add_run(f" {labels[idx][0]}") lr.bold = True; lr.font.size = Pt(9.5); lr.font.color.rgb = DARK_BLUE; lr.font.name = 'Arial' vp = val_cell.paragraphs[0] vp.alignment = WD_ALIGN_PARAGRAPH.LEFT vr = vp.add_run(f" {labels[idx][1]}") vr.font.size = Pt(9.5); vr.font.color.rgb = DARK_GRAY; vr.font.name = 'Arial' idx += 1 doc.add_paragraph() # ══════════════════════════════════════════════════════════════════════════════ # SECTION 1 — YOUR DIAGNOSIS # ══════════════════════════════════════════════════════════════════════════════ diag_tbl = doc.add_table(rows=1, cols=1) diag_tbl.style = 'Table Grid' dc = diag_tbl.cell(0,0) set_cell_bg(dc, MED_BLUE) dp = dc.paragraphs[0] dp.alignment = WD_ALIGN_PARAGRAPH.LEFT dr = dp.add_run(" SECTION 1 — YOUR DIAGNOSIS") dr.bold = True; dr.font.size = Pt(12); dr.font.color.rgb = WHITE; dr.font.name = 'Arial' dp.paragraph_format.space_before = Pt(4); dp.paragraph_format.space_after = Pt(4) for side in ['top','bottom','left','right']: set_cell_borders(dc, **{side: {'val':'none','sz':'0','color':'FFFFFF'}}) p_diag = doc.add_paragraph() p_diag.paragraph_format.space_before = Pt(4) p_diag.paragraph_format.space_after = Pt(2) add_colored_run(p_diag, "You have been diagnosed with ", size=10.5, color=DARK_GRAY) add_colored_run(p_diag, "PERTUSSIS (Whooping Cough)", bold=True, size=10.5, color=MED_BLUE) add_colored_run(p_diag, ", caused by the bacterium ", size=10.5, color=DARK_GRAY) add_colored_run(p_diag, "Bordetella pertussis", italic=True, size=10.5, color=DARK_GRAY) add_colored_run(p_diag, ". This is a highly contagious respiratory infection.", size=10.5, color=DARK_GRAY) bullets_diag = [ "The infection goes through stages: Catarrhal (cold-like) → Paroxysmal (severe cough) → Convalescent (recovery).", "In adults, the classic 'whoop' sound may be absent. You may have prolonged cough, breathlessness, and fatigue.", "You are INFECTIOUS to others for up to 3 weeks from cough onset, or for 5 days after starting antibiotics.", "Recovery can take 6–10 weeks. Your antibiotic shortens the infectious period and reduces spread to others.", ] for b in bullets_diag: bp = doc.add_paragraph(style='List Bullet') bp.paragraph_format.left_indent = Inches(0.3) bp.paragraph_format.space_before = Pt(1); bp.paragraph_format.space_after = Pt(1) br = bp.add_run(b) br.font.size = Pt(10); br.font.name = 'Arial'; br.font.color.rgb = DARK_GRAY doc.add_paragraph() # ══════════════════════════════════════════════════════════════════════════════ # SECTION 2 — ANTIBIOTIC SCHEDULE # ══════════════════════════════════════════════════════════════════════════════ ab_tbl = doc.add_table(rows=1, cols=1) ab_tbl.style = 'Table Grid' ac = ab_tbl.cell(0,0) set_cell_bg(ac, GREEN) ap = ac.paragraphs[0] ap.alignment = WD_ALIGN_PARAGRAPH.LEFT ar = ap.add_run(" SECTION 2 — ANTIBIOTIC SCHEDULE & ADHERENCE GUIDE") ar.bold = True; ar.font.size = Pt(12); ar.font.color.rgb = WHITE; ar.font.name = 'Arial' ap.paragraph_format.space_before = Pt(4); ap.paragraph_format.space_after = Pt(4) for side in ['top','bottom','left','right']: set_cell_borders(ac, **{side: {'val':'none','sz':'0','color':'FFFFFF'}}) # Prescribed drug table doc.add_paragraph() pt2 = doc.add_paragraph() add_colored_run(pt2, " Prescribed Antibiotic: ", bold=True, size=11, color=DARK_BLUE) add_colored_run(pt2, "AZITHROMYCIN", bold=True, size=12, color=GREEN) drug_tbl = doc.add_table(rows=7, cols=5) drug_tbl.style = 'Table Grid' drug_tbl.alignment = WD_TABLE_ALIGNMENT.CENTER col_widths = [Inches(0.5), Inches(1.1), Inches(1.2), Inches(1.8), Inches(2.17)] headers = ["Day", "Date", "Dose", "Timing", "Notes"] for i, (hdr, w) in enumerate(zip(headers, col_widths)): cell = drug_tbl.rows[0].cells[i] cell.width = w set_cell_bg(cell, DARK_BLUE) hp = cell.paragraphs[0] hp.alignment = WD_ALIGN_PARAGRAPH.CENTER hr = hp.add_run(hdr) hr.bold = True; hr.font.size = Pt(10); hr.font.color.rgb = WHITE; hr.font.name = 'Arial' rows_data = [ ("1", "________", "500 mg (2 tabs of 250 mg)", "Once daily — morning with food", "First/loading dose"), ("2", "________", "250 mg (1 tab of 250 mg)", "Once daily — morning with food", ""), ("3", "________", "250 mg (1 tab of 250 mg)", "Once daily — morning with food", ""), ("4", "________", "250 mg (1 tab of 250 mg)", "Once daily — morning with food", ""), ("5", "________", "250 mg (1 tab of 250 mg)", "Once daily — morning with food", "Complete full course"), ("Alt.", "", "Clarithromycin 500 mg", "Twice daily x 7 days (if macrolide switched)", "If azithromycin not tolerated"), ] for r_idx, row_data in enumerate(rows_data): row = drug_tbl.rows[r_idx + 1] bg = LIGHT_GRAY if r_idx % 2 == 0 else WHITE for c_idx, val in enumerate(row_data): cell = row.cells[c_idx] set_cell_bg(cell, bg) cp = cell.paragraphs[0] cp.alignment = WD_ALIGN_PARAGRAPH.CENTER if c_idx <= 1 else WD_ALIGN_PARAGRAPH.LEFT cr = cp.add_run(f" {val}") cr.font.size = Pt(9.5); cr.font.name = 'Arial' cr.font.color.rgb = RED if r_idx == 5 else DARK_GRAY cr.bold = (c_idx == 0) doc.add_paragraph() # Adherence tips box adh_tbl = doc.add_table(rows=1, cols=1) adh_tbl.style = 'Table Grid' adc = adh_tbl.cell(0,0) set_cell_bg(adc, RGBColor(0xE8, 0xF8, 0xF0)) adp_head = adc.paragraphs[0] add_colored_run(adp_head, " IMPORTANT ANTIBIOTIC RULES — Please Read Carefully:", bold=True, size=10.5, color=GREEN) adherence_points = [ "Take the FULL 5-day course even if you feel better after 1-2 days. Stopping early allows bacteria to survive.", "Take each dose at the SAME TIME every day (e.g., every morning after breakfast).", "If you miss a dose: Take it as soon as you remember. If it is almost time for your next dose, skip the missed dose — do NOT double up.", "Do NOT take antacids (e.g., Gelusil, Digene) within 2 hours of azithromycin — they can reduce absorption.", "Avoid alcohol during the antibiotic course.", "Store tablets at room temperature, away from moisture and direct sunlight.", "You remain infectious to others until you complete 5 days of antibiotics — avoid close contact with infants, elderly, and immunocompromised persons.", ] for pt_txt in adherence_points: adp = adc.add_paragraph() adp.paragraph_format.left_indent = Inches(0.2) adp.paragraph_format.space_before = Pt(1); adp.paragraph_format.space_after = Pt(1) adpr = adp.add_run(f" ✓ {pt_txt}") adpr.font.size = Pt(9.5); adpr.font.name = 'Arial'; adpr.font.color.rgb = DARK_GRAY adp_foot = adc.add_paragraph() adp_foot.paragraph_format.space_after = Pt(4) for side in ['top','bottom','left','right']: set_cell_borders(adc, **{side: {'val':'single','sz':'8','color':'1A7A4A'}}) doc.add_paragraph() # ══════════════════════════════════════════════════════════════════════════════ # SECTION 3 — WARNING SIGNS (RED FLAGS) # ══════════════════════════════════════════════════════════════════════════════ ws_tbl = doc.add_table(rows=1, cols=1) ws_tbl.style = 'Table Grid' wc = ws_tbl.cell(0,0) set_cell_bg(wc, RED) wp = wc.paragraphs[0] wp.alignment = WD_ALIGN_PARAGRAPH.LEFT wr = wp.add_run(" SECTION 3 — WARNING SIGNS: GO TO HOSPITAL IMMEDIATELY") wr.bold = True; wr.font.size = Pt(12); wr.font.color.rgb = WHITE; wr.font.name = 'Arial' wp.paragraph_format.space_before = Pt(4); wp.paragraph_format.space_after = Pt(4) for side in ['top','bottom','left','right']: set_cell_borders(wc, **{side: {'val':'none','sz':'0','color':'FFFFFF'}}) doc.add_paragraph() # Two-column warning signs warn_tbl = doc.add_table(rows=1, cols=2) warn_tbl.style = 'Table Grid' warn_tbl.alignment = WD_TABLE_ALIGNMENT.CENTER left_warnings = [ ("🚨 Severe breathlessness", "Rapid breathing, inability to complete a sentence, bluish lips or fingertips (cyanosis) — call emergency services immediately."), ("🚨 High fever (>103°F / 39.5°C)", "Fever returning or worsening after initial improvement — may indicate pneumonia or secondary bacterial infection."), ("🚨 Coughing up blood", "Any blood-stained sputum or frank hemoptysis — go to the Emergency Department immediately."), ("🚨 Chest pain", "Sharp or pressure-type chest pain, especially during or after coughing episodes."), ("🚨 Fainting / Blackouts", "Cough-induced loss of consciousness (syncope) — common in adults with pertussis; requires evaluation."), ] right_warnings = [ ("🚨 Heart palpitations / Irregular heartbeat", "Especially important if you are taking azithromycin — this drug can rarely cause an abnormal heart rhythm. Stop the drug and seek medical attention."), ("🚨 Convulsions / Seizures", "Any fits or loss of bodily control — extremely serious complication."), ("🚨 Severe vomiting", "Unable to keep down water or food after every coughing spell for >24 hours — risk of dehydration."), ("🚨 Confusion or unusual drowsiness", "New onset confusion, extreme fatigue, or difficulty staying awake — may indicate low oxygen or neurological complication."), ("🚨 Rib pain after coughing", "Fracture of ribs can occur from severe coughing — sudden sharp chest wall pain after a paroxysm."), ] for col_idx, (warnings, cell) in enumerate(zip([left_warnings, right_warnings], warn_tbl.rows[0].cells)): set_cell_bg(cell, RGBColor(0xFF, 0xF5, 0xF5)) for title, desc in warnings: hp = cell.add_paragraph() if col_idx == 0 and warnings.index((title, desc)) == 0 else cell.add_paragraph() hp.paragraph_format.space_before = Pt(3); hp.paragraph_format.space_after = Pt(1) hp.paragraph_format.left_indent = Inches(0.1) hr_title = hp.add_run(f"{title}\n") hr_title.bold = True; hr_title.font.size = Pt(10); hr_title.font.color.rgb = RED; hr_title.font.name = 'Arial' hr_desc = hp.add_run(f" {desc}") hr_desc.font.size = Pt(9); hr_desc.font.color.rgb = DARK_GRAY; hr_desc.font.name = 'Arial' cell.paragraphs[0].paragraph_format.space_before = Pt(5) for side in ['top','bottom','left','right']: set_cell_borders(cell, **{side: {'val':'single','sz':'8','color':'C0392B'}}) doc.add_paragraph() # ══════════════════════════════════════════════════════════════════════════════ # SECTION 4 — ISOLATION & HOME CARE # ══════════════════════════════════════════════════════════════════════════════ iso_tbl = doc.add_table(rows=1, cols=1) iso_tbl.style = 'Table Grid' ic = iso_tbl.cell(0,0) set_cell_bg(ic, ORANGE) icp = ic.paragraphs[0] icp.alignment = WD_ALIGN_PARAGRAPH.LEFT icr = icp.add_run(" SECTION 4 — HOME ISOLATION & SELF-CARE") icr.bold = True; icr.font.size = Pt(12); icr.font.color.rgb = WHITE; icr.font.name = 'Arial' icp.paragraph_format.space_before = Pt(4); icp.paragraph_format.space_after = Pt(4) for side in ['top','bottom','left','right']: set_cell_borders(ic, **{side: {'val':'none','sz':'0','color':'FFFFFF'}}) iso_points = [ ("Stay home for isolation:", "Do NOT go to work, public places, or crowded areas for at least 5 days after starting antibiotics."), ("Wear a surgical mask:", "Wear a mask at home, especially around children under 1 year, elderly, or pregnant women."), ("Cover coughs:", "Always cover your mouth and nose with a tissue or your elbow when coughing. Dispose of tissues immediately."), ("Hand hygiene:", "Wash hands with soap and water for at least 20 seconds after coughing, blowing nose, or touching your face."), ("Rest & sleep:", "Get adequate rest. Avoid physical exertion that can trigger coughing paroxysms."), ("Hydration:", "Drink plenty of fluids (water, clear soups, ORS if vomiting). Aim for at least 8 glasses of water daily."), ("Diet:", "Eat small, frequent meals. Large meals can trigger vomiting after coughing spells."), ("Avoid triggers:", "Avoid cigarette smoke, dust, strong perfumes, cold air — all can trigger severe coughing fits."), ("Household contacts:", "Your 6-year-old nephew and all household members should receive antibiotic prophylaxis (azithromycin). Consult your doctor."), ] iso_inner = doc.add_table(rows=len(iso_points), cols=2) iso_inner.style = 'Table Grid' iso_inner.alignment = WD_TABLE_ALIGNMENT.CENTER for r_idx, (lbl, val) in enumerate(iso_points): bg = LIGHT_GRAY if r_idx % 2 == 0 else WHITE lc = iso_inner.rows[r_idx].cells[0] vc = iso_inner.rows[r_idx].cells[1] set_cell_bg(lc, bg); set_cell_bg(vc, bg) lc.width = Inches(1.8); vc.width = Inches(4.97) lp = lc.paragraphs[0] lp.paragraph_format.left_indent = Inches(0.1) lr = lp.add_run(lbl) lr.bold = True; lr.font.size = Pt(9.5); lr.font.color.rgb = ORANGE; lr.font.name = 'Arial' vp = vc.paragraphs[0] vp.paragraph_format.left_indent = Inches(0.1) vr = vp.add_run(val) vr.font.size = Pt(9.5); vr.font.color.rgb = DARK_GRAY; vr.font.name = 'Arial' doc.add_paragraph() # ══════════════════════════════════════════════════════════════════════════════ # SECTION 5 — FOLLOW-UP PLAN # ══════════════════════════════════════════════════════════════════════════════ fu_tbl = doc.add_table(rows=1, cols=1) fu_tbl.style = 'Table Grid' fc = fu_tbl.cell(0,0) set_cell_bg(fc, MED_BLUE) fp = fc.paragraphs[0] fp.alignment = WD_ALIGN_PARAGRAPH.LEFT fr = fp.add_run(" SECTION 5 — FOLLOW-UP APPOINTMENTS") fr.bold = True; fr.font.size = Pt(12); fr.font.color.rgb = WHITE; fr.font.name = 'Arial' fp.paragraph_format.space_before = Pt(4); fp.paragraph_format.space_after = Pt(4) for side in ['top','bottom','left','right']: set_cell_borders(fc, **{side: {'val':'none','sz':'0','color':'FFFFFF'}}) fu_inner = doc.add_table(rows=5, cols=3) fu_inner.style = 'Table Grid' fu_inner.alignment = WD_TABLE_ALIGNMENT.CENTER fu_headers = ["When", "Purpose", "Date / Notes"] for i, h in enumerate(fu_headers): cell = fu_inner.rows[0].cells[i] set_cell_bg(cell, LIGHT_BLUE) hp = cell.paragraphs[0] hr = hp.add_run(f" {h}") hr.bold = True; hr.font.size = Pt(10); hr.font.color.rgb = DARK_BLUE; hr.font.name = 'Arial' fu_rows = [ ("After 5 days (Day 6)", "Review antibiotic completion; check symptom progress; chest auscultation", "Date: ___________"), ("After 3 weeks", "Assess resolution of cough; chest X-ray review if pneumonia was suspected", "Date: ___________"), ("After 6 weeks", "Final recovery assessment; Tdap booster vaccine if not yet given", "Date: ___________"), ("URGENT — Any time", "Any of the Warning Signs listed above (Section 3)", "Go to Emergency Department"), ] for r_idx, (when, purpose, notes) in enumerate(fu_rows): bg = WHITE if r_idx % 2 == 0 else LIGHT_GRAY for c_idx, val in enumerate([when, purpose, notes]): cell = fu_inner.rows[r_idx + 1].cells[c_idx] set_cell_bg(cell, RED if r_idx == 3 and c_idx == 0 else bg) cp = cell.paragraphs[0] cr = cp.add_run(f" {val}") cr.font.size = Pt(9.5); cr.font.name = 'Arial' cr.font.color.rgb = WHITE if r_idx == 3 and c_idx == 0 else DARK_GRAY cr.bold = (r_idx == 3) doc.add_paragraph() # ══════════════════════════════════════════════════════════════════════════════ # FOOTER # ══════════════════════════════════════════════════════════════════════════════ foot_tbl = doc.add_table(rows=1, cols=2) foot_tbl.style = 'Table Grid' foot_tbl.alignment = WD_TABLE_ALIGNMENT.CENTER fl = foot_tbl.rows[0].cells[0] fr2 = foot_tbl.rows[0].cells[1] set_cell_bg(fl, DARK_BLUE); set_cell_bg(fr2, DARK_BLUE) flp = fl.paragraphs[0] flp.alignment = WD_ALIGN_PARAGRAPH.LEFT flr = flp.add_run(f" Issued on: {datetime.date.today().strftime('%d %B %Y')} Reviewed by: Dr. ___________________") flr.font.size = Pt(9); flr.font.color.rgb = RGBColor(0xAE,0xD6,0xF1); flr.font.name = 'Arial' flp.paragraph_format.space_before = Pt(4); flp.paragraph_format.space_after = Pt(4) frp = fr2.paragraphs[0] frp.alignment = WD_ALIGN_PARAGRAPH.RIGHT frr = frp.add_run(" Emergency Helpline: 108 | Hospital: ____________________ ") frr.font.size = Pt(9); frr.font.color.rgb = RGBColor(0xAE,0xD6,0xF1); frr.font.name = 'Arial' frp.paragraph_format.space_before = Pt(4); frp.paragraph_format.space_after = Pt(4) for side in ['top','bottom','left','right']: set_cell_borders(fl, **{side: {'val':'none','sz':'0','color':'FFFFFF'}}) set_cell_borders(fr2, **{side: {'val':'none','sz':'0','color':'FFFFFF'}}) # ───────────────────────────────────────────────────────────────────────────── output_path = "/tmp/workspace/pertussis-discharge/Pertussis_Discharge_Sheet_52yM.docx" doc.save(output_path) print(f"Saved: {output_path}") EOF

Running Command

python3 -c " from docx import Document doc = Document('/tmp/workspace/pertussis-discharge/Pertussis_Discharge_Sheet_52yM.docx') print('Paragraphs:', len(doc.paragraphs)) print('Tables:', len(doc.tables)) for i, t in enumerate(doc.tables): print(f'Table {i}: {len(t.rows)} rows x {len(t.columns)} cols') print('File size:', __import__('os').path.getsize('/tmp/workspace/pertussis-discharge/Pertussis_Discharge_Sheet_52yM.docx'), 'bytes') "

The document is valid with all 13 tables and correct structure. Here's your printable discharge sheet:

Pertussis Discharge Sheet 52yM

Word Document · DOCX


What's inside the document (A4, print-ready):
SectionContents
HeaderHospital banner + patient details fill-in (name, MRN, date, diagnosis)
Section 1 - Your DiagnosisPlain-language explanation of pertussis stages; what to expect as a 52-year-old adult
Section 2 - Antibiotic ScheduleDay-by-day Azithromycin dose table (Day 1: 500 mg, Days 2-5: 250 mg) with date fill-in boxes; clarithromycin alternate row; 7-point adherence checklist in a green box
Section 3 - Warning SignsTwo-column red-flag table with 10 conditions requiring immediate hospital attendance - including QT/cardiac warning specific to azithromycin, cyanosis, rib fracture, fainting, and confusion
Section 4 - Home Isolation & Self-Care9-row table covering mask use, hand hygiene, diet, fluid intake, trigger avoidance, and household contact prophylaxis reminder
Section 5 - Follow-up PlanStructured visit schedule: Day 6, Week 3, Week 6, and urgent ED instruction
FooterIssue date, doctor signature line, emergency helpline (108)
Color-coded sections (blue = information, green = medication, red = emergency, orange = self-care) make it easy to scan quickly at home.
This is a shared conversation. Sign in to Orris to start your own chat.