Hi
Am working as mbbs intern
Yes i want all
"Patient with chest pain, BP 90/60, diaphoresis - what do I do?"
"Dose of metformin in a newly diagnosed T2DM patient"
"Explain the mechanism of ACE inhibitors"
"Steps for IV cannulation / pleural tap / lumbar puncture"
"DDx for a young patient with painless jaundice"
"What labs to order for suspected sepsis?"
If patuentvcame with sore throat
| Cause | Frequency | Clue |
|---|---|---|
| Rhinovirus / Coronavirus | ~25% | Common cold symptoms, runny nose, cough |
| Adenovirus | 5% | Fever, conjunctivitis, pharyngitis |
| Group A beta-hemolytic Strep (GABHS) | 5-15% adults, 20-30% children | Exudate, no cough, fever |
| EBV (Mono) | 1-6% young adults | Posterior cervical LN, splenomegaly |
| Influenza A/B | 2% | Myalgia, fever, headache |
| HSV | 4% | Ulcers/vesicles |
| HIV (acute) | Rare | High-risk history |
| Score | GAS Probability | Action |
|---|---|---|
| 0 | 2% | No test, no antibiotic |
| 1 | 3% | No test, no antibiotic |
| 2 | 8% | Do rapid strep test |
| 3 | 19% | Do rapid strep test |
| 4 | 41% | Treat empirically OR rapid test |
In children - always confirm with test even if criteria met, as Centor is less specific in kids.
⚠️ Must complete 7-10 days even if symptoms resolve earlier - shorter courses are less effective for strep!
| Suppurative | Nonsuppurative |
|---|---|
| Peritonsillar abscess | Acute Rheumatic Fever |
| Retropharyngeal abscess | Post-streptococcal glomerulonephritis |
| Otitis media | Scarlet fever |
| Sinusitis |
This is why we treat confirmed strep - to prevent rheumatic fever (especially important in India where prevalence is higher).
Create a quick reference guide on pharyngitis for my internship
What format do you want the quick reference guide in?
ls /home/daytona/workspace/ 2>/dev/null || echo "workspace empty or missing"
mkdir -p /home/daytona/workspace/pharyngitis-guide
~/pharyngitis-guide/create_guide.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import cm
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.platypus import (SimpleDocTemplate, Paragraph, Spacer, Table,
TableStyle, HRFlowable, KeepTogether)
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus import Flowable
# ── Color palette ──────────────────────────────────────────────────
DARK_BLUE = colors.HexColor("#1a3a5c")
MED_BLUE = colors.HexColor("#2563a8")
LIGHT_BLUE = colors.HexColor("#dbeafe")
ORANGE = colors.HexColor("#ea580c")
ORANGE_LIGHT= colors.HexColor("#fff7ed")
GREEN = colors.HexColor("#166534")
GREEN_LIGHT = colors.HexColor("#dcfce7")
RED = colors.HexColor("#991b1b")
RED_LIGHT = colors.HexColor("#fee2e2")
YELLOW = colors.HexColor("#854d0e")
YELLOW_LIGHT= colors.HexColor("#fef9c3")
GREY_BG = colors.HexColor("#f1f5f9")
GREY_LINE = colors.HexColor("#cbd5e1")
WHITE = colors.white
BLACK = colors.HexColor("#1e293b")
# ── Styles ─────────────────────────────────────────────────────────
styles = getSampleStyleSheet()
def make_style(name, parent='Normal', **kw):
s = ParagraphStyle(name, parent=styles[parent], **kw)
return s
title_style = make_style('DocTitle', fontSize=22, textColor=WHITE,
fontName='Helvetica-Bold', alignment=TA_CENTER,
spaceAfter=4)
subtitle_style = make_style('DocSub', fontSize=11, textColor=colors.HexColor("#bfdbfe"),
fontName='Helvetica', alignment=TA_CENTER, spaceAfter=2)
badge_style = make_style('Badge', fontSize=9, textColor=WHITE,
fontName='Helvetica-Bold', alignment=TA_CENTER)
section_head = make_style('SecHead', fontSize=12, textColor=WHITE,
fontName='Helvetica-Bold', alignment=TA_LEFT,
spaceBefore=2, spaceAfter=2)
body = make_style('Body', fontSize=9, textColor=BLACK,
fontName='Helvetica', leading=14, spaceAfter=2)
body_bold = make_style('BodyBold', fontSize=9, textColor=BLACK,
fontName='Helvetica-Bold', leading=14)
small = make_style('Small', fontSize=8, textColor=colors.HexColor("#475569"),
fontName='Helvetica', leading=11)
small_bold = make_style('SmallBold', fontSize=8, textColor=BLACK,
fontName='Helvetica-Bold', leading=11)
footnote = make_style('Footnote', fontSize=7.5, textColor=colors.HexColor("#64748b"),
fontName='Helvetica-Oblique', alignment=TA_CENTER, leading=11)
red_alert = make_style('RedAlert', fontSize=9, textColor=RED,
fontName='Helvetica-Bold', leading=14)
# ── Helper: coloured section header row ───────────────────────────
def section_table(text, bg=MED_BLUE, emoji=""):
label = f"{emoji} {text}" if emoji else text
t = Table([[Paragraph(label, section_head)]], colWidths=[17.6*cm])
t.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), bg),
('ROUNDEDCORNERS', [4,4,4,4]),
('TOPPADDING', (0,0), (-1,-1), 6),
('BOTTOMPADDING', (0,0), (-1,-1), 6),
('LEFTPADDING', (0,0), (-1,-1), 10),
]))
return t
def coloured_box(content_rows, bg=LIGHT_BLUE, col_widths=None):
"""Wrap a list of [cell, cell] rows in a coloured box table."""
if col_widths is None:
col_widths = [17.6*cm]
t = Table(content_rows, colWidths=col_widths)
t.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), bg),
('TOPPADDING', (0,0), (-1,-1), 4),
('BOTTOMPADDING', (0,0), (-1,-1), 4),
('LEFTPADDING', (0,0), (-1,-1), 8),
('RIGHTPADDING', (0,0), (-1,-1), 8),
('GRID', (0,0), (-1,-1), 0.3, GREY_LINE),
]))
return t
# ── Document setup ─────────────────────────────────────────────────
output_path = "/home/daytona/workspace/pharyngitis-guide/Pharyngitis_Quick_Reference.pdf"
doc = SimpleDocTemplate(
output_path,
pagesize=A4,
leftMargin=1.2*cm, rightMargin=1.2*cm,
topMargin=1.0*cm, bottomMargin=1.2*cm,
title="Pharyngitis Quick Reference Guide",
author="Orris Medical"
)
story = []
# ══════════════════════════════════════════════════════════════════
# HEADER BANNER
# ══════════════════════════════════════════════════════════════════
header_data = [[
Paragraph("PHARYNGITIS", title_style),
],[
Paragraph("Quick Reference Guide for MBBS Interns | ENT / General OPD", subtitle_style),
],[
Paragraph("Sources: Harrison's Principles 22E · Symptom to Diagnosis 4E · Scott-Brown's ORL · Textbook of Family Medicine 9E", footnote),
]]
header_table = Table(header_data, colWidths=[17.6*cm])
header_table.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), DARK_BLUE),
('TOPPADDING', (0,0), (-1,-1), 8),
('BOTTOMPADDING', (0,0), (-1,-1), 8),
('LEFTPADDING', (0,0), (-1,-1), 12),
('ROUNDEDCORNERS', [6,6,6,6]),
]))
story.append(header_table)
story.append(Spacer(1, 0.3*cm))
# ══════════════════════════════════════════════════════════════════
# SECTION 1 — DEFINITION + EPIDEMIOLOGY
# ══════════════════════════════════════════════════════════════════
story.append(section_table("1. DEFINITION & EPIDEMIOLOGY", bg=MED_BLUE))
story.append(Spacer(1, 0.15*cm))
epi_data = [
[Paragraph("<b>Pharyngitis</b>", small_bold),
Paragraph("Inflammation of the pharynx and/or tonsils. One of the most common OPD presentations.", small)],
[Paragraph("<b>Viral (most common)</b>", small_bold),
Paragraph("Rhinovirus & coronavirus account for ~25% of all sore throats", small)],
[Paragraph("<b>GABHS (bacterial)</b>", small_bold),
Paragraph("5–15% in adults | 20–30% in children — most common bacterial cause", small)],
[Paragraph("<b>Peak season</b>", small_bold),
Paragraph("Winter and early spring", small)],
[Paragraph("<b>High-risk groups</b>", small_bold),
Paragraph("Children 5–15 yrs, healthcare workers, teachers, parents of young children", small)],
]
t = Table(epi_data, colWidths=[4*cm, 13.6*cm])
t.setStyle(TableStyle([
('BACKGROUND', (0,0), (0,-1), LIGHT_BLUE),
('BACKGROUND', (1,0), (1,-1), WHITE),
('ROWBACKGROUNDS', (1,0), (1,-1), [WHITE, GREY_BG]),
('TOPPADDING', (0,0), (-1,-1), 5),
('BOTTOMPADDING', (0,0), (-1,-1), 5),
('LEFTPADDING', (0,0), (-1,-1), 7),
('GRID', (0,0), (-1,-1), 0.3, GREY_LINE),
('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(t)
story.append(Spacer(1, 0.25*cm))
# ══════════════════════════════════════════════════════════════════
# SECTION 2 — DIFFERENTIAL DIAGNOSIS TABLE
# ══════════════════════════════════════════════════════════════════
story.append(section_table("2. DIFFERENTIAL DIAGNOSIS", bg=MED_BLUE))
story.append(Spacer(1, 0.15*cm))
ddx_header = [
Paragraph("<b>Pathogen</b>", small_bold),
Paragraph("<b>Type</b>", small_bold),
Paragraph("<b>Freq.</b>", small_bold),
Paragraph("<b>Key Clinical Features</b>", small_bold),
]
ddx_rows = [
[Paragraph("Rhinovirus / Coronavirus", small), Paragraph("Viral", small), Paragraph("~25%", small), Paragraph("Common cold, runny nose, mild throat pain, NO fever", small)],
[Paragraph("Adenovirus", small), Paragraph("Viral", small), Paragraph("5%", small), Paragraph("Pharyngo-conjunctival fever: sore throat + conjunctivitis + fever", small)],
[Paragraph("Influenza A/B", small), Paragraph("Viral", small), Paragraph("2%", small), Paragraph("High fever, myalgia, headache, non-exudative pharyngitis", small)],
[Paragraph("HSV 1/2", small), Paragraph("Viral", small), Paragraph("4%", small), Paragraph("Vesicles/ulcers on pharynx or lips, stomatitis", small)],
[Paragraph("EBV (Mono)", small), Paragraph("Viral", small), Paragraph("1–6%", small), Paragraph("Exudate + posterior cervical LAP + splenomegaly; young adults", small)],
[Paragraph("HIV (acute)", small), Paragraph("Viral", small), Paragraph("Rare", small), Paragraph("Mono-like illness; high-risk history; fever, rash, LAP", small)],
[Paragraph("GABHS (Strep A)", small), Paragraph("Bacterial", small), Paragraph("5–30%", small), Paragraph("Exudate, fever, NO cough, tender ant. cervical LN — USE CENTOR", small)],
[Paragraph("Fusobacterium", small), Paragraph("Bacterial", small), Paragraph("Uncommon", small), Paragraph("Unilateral severe sore throat; risk of Lemierre syndrome", small)],
[Paragraph("N. gonorrhoeae", small), Paragraph("Bacterial", small), Paragraph("~1%", small), Paragraph("STI history, often asymptomatic or exudative pharyngitis", small)],
[Paragraph("C. diphtheriae", small), Paragraph("Bacterial", small), Paragraph("Rare", small), Paragraph("Grey pseudomembrane, bull neck, unvaccinated patient", small)],
]
ddx_table_data = [ddx_header] + ddx_rows
ddx_col_w = [4.0*cm, 2.0*cm, 1.8*cm, 9.8*cm]
ddx_t = Table(ddx_table_data, colWidths=ddx_col_w)
ddx_t.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), DARK_BLUE),
('TEXTCOLOR', (0,0), (-1,0), WHITE),
('ROWBACKGROUNDS', (0,1), (-1,-1), [WHITE, GREY_BG]),
('TOPPADDING', (0,0), (-1,-1), 4),
('BOTTOMPADDING', (0,0), (-1,-1), 4),
('LEFTPADDING', (0,0), (-1,-1), 6),
('GRID', (0,0), (-1,-1), 0.3, GREY_LINE),
('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
# Highlight GABHS row (index 7)
('BACKGROUND', (0,7), (-1,7), colors.HexColor("#fef3c7")),
]))
story.append(ddx_t)
story.append(Spacer(1, 0.1*cm))
story.append(Paragraph("★ Non-infectious causes: GERD, postnasal drip, allergies, smoking, acute thyroiditis, neoplasm (consider if chronic/recurrent)", small))
story.append(Spacer(1, 0.25*cm))
# ══════════════════════════════════════════════════════════════════
# SECTION 3 — CENTOR SCORE (2 columns)
# ══════════════════════════════════════════════════════════════════
story.append(section_table("3. CENTOR SCORE (Identifies likely GABHS in Adults)", bg=colors.HexColor("#d97706")))
story.append(Spacer(1, 0.15*cm))
# Left: criteria | Right: score table
centor_criteria = Table([
[Paragraph("<b>Score 1 point for each criterion:</b>", small_bold)],
[Paragraph("1. History of <b>fever</b>", small)],
[Paragraph("2. <b>Absence of cough</b>", small)],
[Paragraph("3. Tender <b>anterior cervical lymphadenopathy</b>", small)],
[Paragraph("4. <b>Tonsillar exudate</b> or swelling", small)],
[Paragraph(" ", small)],
[Paragraph("<i>In children: always confirm with rapid test\nregardless of score (Centor less specific).</i>", small)],
], colWidths=[8.4*cm])
centor_criteria.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), YELLOW_LIGHT),
('TOPPADDING', (0,0), (-1,-1), 4),
('BOTTOMPADDING', (0,0), (-1,-1), 3),
('LEFTPADDING', (0,0), (-1,-1), 8),
('GRID', (0,0), (-1,-1), 0, WHITE),
]))
score_data = [
[Paragraph("<b>Score</b>", small_bold), Paragraph("<b>GAS Prob.</b>", small_bold), Paragraph("<b>Action</b>", small_bold)],
[Paragraph("0", small), Paragraph("2%", small), Paragraph("No test, no antibiotic", small)],
[Paragraph("1", small), Paragraph("3%", small), Paragraph("No test, no antibiotic", small)],
[Paragraph("2", small), Paragraph("8%", small), Paragraph("Rapid strep test", small)],
[Paragraph("3", small), Paragraph("19%", small), Paragraph("Rapid strep test", small)],
[Paragraph("4", small), Paragraph("41%", small), Paragraph("<b>Treat empirically OR rapid test</b>", small)],
]
score_t = Table(score_data, colWidths=[1.6*cm, 2.4*cm, 5.0*cm])
score_t.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor("#92400e")),
('TEXTCOLOR', (0,0), (-1,0), WHITE),
('ROWBACKGROUNDS', (0,1), (-1,-1), [WHITE, GREY_BG]),
('BACKGROUND', (0,5), (-1,5), colors.HexColor("#fde68a")),
('TOPPADDING', (0,0), (-1,-1), 4),
('BOTTOMPADDING', (0,0), (-1,-1), 4),
('LEFTPADDING', (0,0), (-1,-1), 6),
('GRID', (0,0), (-1,-1), 0.3, GREY_LINE),
('ALIGN', (0,0), (1,-1), 'CENTER'),
('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
centor_combined = Table([[centor_criteria, score_t]], colWidths=[8.6*cm, 9.0*cm])
centor_combined.setStyle(TableStyle([
('VALIGN', (0,0), (-1,-1), 'TOP'),
('TOPPADDING', (0,0), (-1,-1), 0),
('LEFTPADDING', (0,0), (-1,-1), 0),
('RIGHTPADDING', (0,0), (-1,-1), 0),
]))
story.append(centor_combined)
story.append(Spacer(1, 0.25*cm))
# ══════════════════════════════════════════════════════════════════
# SECTION 4 — INVESTIGATIONS
# ══════════════════════════════════════════════════════════════════
story.append(section_table("4. INVESTIGATIONS", bg=colors.HexColor("#0f766e")))
story.append(Spacer(1, 0.15*cm))
inv_data = [
[Paragraph("<b>Test</b>", small_bold), Paragraph("<b>Details</b>", small_bold), Paragraph("<b>When to order</b>", small_bold)],
[Paragraph("Rapid Strep Antigen", small),
Paragraph("Sensitivity ~80%, Specificity ~95%. Results in minutes.", small),
Paragraph("Centor score 2–4", small)],
[Paragraph("Throat Culture", small),
Paragraph("Sensitivity 85–90%. Takes 24–48 hrs. Not routine in adults.", small),
Paragraph("Children, treatment failure", small)],
[Paragraph("CBC + Peripheral Smear", small),
Paragraph("Atypical lymphocytes >10% → EBV mono", small),
Paragraph("Suspect mono (young adult + posterior LAP)", small)],
[Paragraph("Monospot Test", small),
Paragraph("Rapid heterophile antibody test for EBV", small),
Paragraph("Suspect mono", small)],
[Paragraph("Throat swab for culture", small),
Paragraph("GC culture on Thayer-Martin medium", small),
Paragraph("STI risk / gonorrheal pharyngitis", small)],
[Paragraph("HIV test", small),
Paragraph("4th gen Ag/Ab combo test", small),
Paragraph("High risk history, mono-like illness", small)],
]
inv_t = Table(inv_data, colWidths=[4.0*cm, 8.0*cm, 5.6*cm])
inv_t.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor("#134e4a")),
('TEXTCOLOR', (0,0), (-1,0), WHITE),
('ROWBACKGROUNDS', (0,1), (-1,-1), [WHITE, GREEN_LIGHT]),
('TOPPADDING', (0,0), (-1,-1), 4),
('BOTTOMPADDING', (0,0), (-1,-1), 4),
('LEFTPADDING', (0,0), (-1,-1), 6),
('GRID', (0,0), (-1,-1), 0.3, GREY_LINE),
('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(inv_t)
story.append(Spacer(1, 0.25*cm))
# ══════════════════════════════════════════════════════════════════
# SECTION 5 — TREATMENT (2 cols: symptomatic | antibiotics)
# ══════════════════════════════════════════════════════════════════
story.append(section_table("5. TREATMENT", bg=colors.HexColor("#7c3aed")))
story.append(Spacer(1, 0.15*cm))
sym_box = Table([
[Paragraph("<b>Symptomatic (ALL pharyngitis)</b>", small_bold)],
[Paragraph("• Paracetamol 500 mg–1 g PO q6h PRN", small)],
[Paragraph("• NSAIDs (Ibuprofen 400 mg TDS with food)", small)],
[Paragraph("• Warm saline gargles 3–4× daily", small)],
[Paragraph("• Soft diet, warm fluids, honey in tea", small)],
[Paragraph("• Humidification", small)],
[Paragraph("<i>Note: Glucocorticoids NOT recommended routinely.\nMay reduce pain at 24 h but risk of sepsis, GI bleed,\nVTE within 30 days.</i>", small)],
], colWidths=[8.4*cm])
sym_box.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), colors.HexColor("#f5f3ff")),
('TOPPADDING', (0,0), (-1,-1), 4),
('BOTTOMPADDING', (0,0), (-1,-1), 3),
('LEFTPADDING', (0,0), (-1,-1), 8),
]))
abx_box = Table([
[Paragraph("<b>Antibiotics — ONLY for confirmed/likely GABHS</b>", small_bold)],
[Paragraph("<b>1st line:</b> Penicillin V 500 mg PO BD–TDS × 10 days", small)],
[Paragraph("<b>Children:</b> Amoxicillin 50 mg/kg/day (palatable syrup)", small)],
[Paragraph("<b>Mild PCN allergy:</b> Cephalexin or Cefadroxil × 10 days", small)],
[Paragraph("<b>Severe PCN allergy:</b> Erythromycin / Clarithromycin / Clindamycin", small)],
[Paragraph(" ", small)],
[Paragraph("⚠ Complete full 7–10 day course even if symptoms\nresolve earlier. Shorter courses are less effective.", red_alert)],
], colWidths=[9.0*cm])
abx_box.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), colors.HexColor("#fdf4ff")),
('TOPPADDING', (0,0), (-1,-1), 4),
('BOTTOMPADDING', (0,0), (-1,-1), 3),
('LEFTPADDING', (0,0), (-1,-1), 8),
]))
tx_combined = Table([[sym_box, abx_box]], colWidths=[8.6*cm, 9.0*cm])
tx_combined.setStyle(TableStyle([
('VALIGN', (0,0), (-1,-1), 'TOP'),
('TOPPADDING', (0,0), (-1,-1), 0),
('LEFTPADDING', (0,0), (-1,-1), 0),
('RIGHTPADDING', (0,0), (-1,-1), 0),
('GRID', (0,0), (-1,-1), 0.3, GREY_LINE),
]))
story.append(tx_combined)
story.append(Spacer(1, 0.25*cm))
# ══════════════════════════════════════════════════════════════════
# SECTION 6 — RED FLAGS + COMPLICATIONS (2 cols)
# ══════════════════════════════════════════════════════════════════
story.append(section_table("6. RED FLAGS & COMPLICATIONS", bg=colors.HexColor("#be123c")))
story.append(Spacer(1, 0.15*cm))
red_flags_box = Table([
[Paragraph("<b>🚨 Red Flags — Refer/Act Immediately</b>", small_bold)],
[Paragraph("• Stridor or respiratory distress", small)],
[Paragraph("• Drooling / inability to swallow (Epiglottitis / PTA)", small)],
[Paragraph("• 'Hot potato' muffled voice → Peritonsillar Abscess", small)],
[Paragraph("• Neck swelling beyond lymphadenopathy", small)],
[Paragraph("• Shaking chills / rigors (bacteraemia)", small)],
[Paragraph("• Symptoms not improving after 5 days", small)],
[Paragraph("• Unilateral tonsillar enlargement (malignancy?)", small)],
[Paragraph("• Trismus (difficulty opening mouth)", small)],
], colWidths=[8.4*cm])
red_flags_box.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), RED_LIGHT),
('TOPPADDING', (0,0), (-1,-1), 4),
('BOTTOMPADDING', (0,0), (-1,-1), 3),
('LEFTPADDING', (0,0), (-1,-1), 8),
]))
comp_box = Table([
[Paragraph("<b>Complications of Strep Pharyngitis</b>", small_bold)],
[Paragraph("<b>Suppurative:</b>", small_bold)],
[Paragraph("• Peritonsillar abscess (Quinsy)", small)],
[Paragraph("• Retropharyngeal abscess", small)],
[Paragraph("• Otitis media", small)],
[Paragraph("• Sinusitis", small)],
[Paragraph("<b>Non-suppurative:</b>", small_bold)],
[Paragraph("• Acute Rheumatic Fever (ARF) → treat to PREVENT", small)],
[Paragraph("• Post-streptococcal GN", small)],
[Paragraph("• Scarlet fever", small)],
], colWidths=[9.0*cm])
comp_box.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), colors.HexColor("#fff1f2")),
('TOPPADDING', (0,0), (-1,-1), 4),
('BOTTOMPADDING', (0,0), (-1,-1), 3),
('LEFTPADDING', (0,0), (-1,-1), 8),
]))
rf_combined = Table([[red_flags_box, comp_box]], colWidths=[8.6*cm, 9.0*cm])
rf_combined.setStyle(TableStyle([
('VALIGN', (0,0), (-1,-1), 'TOP'),
('TOPPADDING', (0,0), (-1,-1), 0),
('LEFTPADDING', (0,0), (-1,-1), 0),
('RIGHTPADDING', (0,0), (-1,-1), 0),
('GRID', (0,0), (-1,-1), 0.3, GREY_LINE),
]))
story.append(rf_combined)
story.append(Spacer(1, 0.25*cm))
# ══════════════════════════════════════════════════════════════════
# SECTION 7 — SPECIAL SCENARIOS
# ══════════════════════════════════════════════════════════════════
story.append(section_table("7. SPECIAL SCENARIOS", bg=colors.HexColor("#0369a1")))
story.append(Spacer(1, 0.15*cm))
sp_data = [
[Paragraph("<b>Scenario</b>", small_bold), Paragraph("<b>Key Clues</b>", small_bold), Paragraph("<b>Action</b>", small_bold)],
[Paragraph("Infectious Mono (EBV)", small),
Paragraph("Young adult, posterior cervical LAP, splenomegaly, petechiae on palate, atypical lymphocytes", small),
Paragraph("Monospot + CBC. No amoxicillin (causes rash). No contact sports (spleen rupture risk).", small)],
[Paragraph("Peritonsillar Abscess", small),
Paragraph("Unilateral bulge, uvula deviation, muffled 'hot potato' voice, trismus", small),
Paragraph("ENT referral for I&D. IV antibiotics. Admit.", small)],
[Paragraph("Diphtheria", small),
Paragraph("Grey pseudomembrane, bull neck, unvaccinated / incomplete vaccines, sweet-smelling breath", small),
Paragraph("Antitoxin + Penicillin/Erythromycin. Isolate. Notify.", small)],
[Paragraph("Gonococcal", small),
Paragraph("STI history, mild or no symptoms, exudative pharyngitis", small),
Paragraph("Throat swab GC culture. Ceftriaxone 500 mg IM single dose.", small)],
[Paragraph("History of ARF", small),
Paragraph("Any pharyngitis in a patient with prior ARF", small),
Paragraph("Lower threshold to treat empirically for GABHS. Long-term penicillin prophylaxis.", small)],
]
sp_t = Table(sp_data, colWidths=[3.8*cm, 7.0*cm, 6.8*cm])
sp_t.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor("#075985")),
('TEXTCOLOR', (0,0), (-1,0), WHITE),
('ROWBACKGROUNDS', (0,1), (-1,-1), [WHITE, LIGHT_BLUE]),
('TOPPADDING', (0,0), (-1,-1), 4),
('BOTTOMPADDING', (0,0), (-1,-1), 4),
('LEFTPADDING', (0,0), (-1,-1), 6),
('GRID', (0,0), (-1,-1), 0.3, GREY_LINE),
('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(sp_t)
story.append(Spacer(1, 0.25*cm))
# ══════════════════════════════════════════════════════════════════
# FOOTER
# ══════════════════════════════════════════════════════════════════
story.append(HRFlowable(width="100%", thickness=0.5, color=GREY_LINE))
story.append(Spacer(1, 0.1*cm))
story.append(Paragraph(
"References: Harrison's Principles of Internal Medicine 22E (2025) · Symptom to Diagnosis 4E · "
"Scott-Brown's ORL Head & Neck Surgery · Textbook of Family Medicine 9E | "
"Compiled by Orris AI · July 2026 | For educational use only — always apply clinical judgment.",
footnote
))
# ── Build ──────────────────────────────────────────────────────────
doc.build(story)
print(f"PDF created: {output_path}")
cd /home/daytona/workspace/pharyngitis-guide && python create_guide.py 2>&1
ls -lh /home/daytona/workspace/pharyngitis-guide/
Pharyngitis Quick Reference
PDF Document · PDF
Create a guide for another common OPD complaint (fever, cough, abdomen pain, jaundice)
Which complaint should I create the guide for?
~/pharyngitis-guide/abdominal_pain_guide.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import cm
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.platypus import (SimpleDocTemplate, Paragraph, Spacer, Table,
TableStyle, HRFlowable)
from reportlab.lib.enums import TA_CENTER, TA_LEFT
# ── Color palette ──────────────────────────────────────────────────
DARK_TEAL = colors.HexColor("#0f4c5c")
MED_TEAL = colors.HexColor("#0e7490")
LIGHT_TEAL = colors.HexColor("#cffafe")
ORANGE = colors.HexColor("#c2410c")
ORANGE_LIGHT= colors.HexColor("#fff7ed")
GREEN = colors.HexColor("#166534")
GREEN_LIGHT = colors.HexColor("#dcfce7")
RED = colors.HexColor("#991b1b")
RED_LIGHT = colors.HexColor("#fee2e2")
PURPLE = colors.HexColor("#6d28d9")
PURPLE_LIGHT= colors.HexColor("#ede9fe")
YELLOW = colors.HexColor("#92400e")
YELLOW_LIGHT= colors.HexColor("#fef3c7")
GREY_BG = colors.HexColor("#f1f5f9")
GREY_LINE = colors.HexColor("#cbd5e1")
WHITE = colors.white
BLACK = colors.HexColor("#1e293b")
DARK_BLUE = colors.HexColor("#1e3a5f")
MED_BLUE = colors.HexColor("#2563a8")
LIGHT_BLUE = colors.HexColor("#dbeafe")
# ── Styles ─────────────────────────────────────────────────────────
styles = getSampleStyleSheet()
def ms(name, parent='Normal', **kw):
return ParagraphStyle(name, parent=styles[parent], **kw)
title_s = ms('T', fontSize=22, textColor=WHITE, fontName='Helvetica-Bold', alignment=TA_CENTER, spaceAfter=3)
subtitle_s= ms('S', fontSize=10, textColor=colors.HexColor("#a5f3fc"), fontName='Helvetica', alignment=TA_CENTER)
sec_s = ms('H', fontSize=11, textColor=WHITE, fontName='Helvetica-Bold', alignment=TA_LEFT, spaceBefore=1, spaceAfter=1)
body = ms('B', fontSize=8.5, textColor=BLACK, fontName='Helvetica', leading=13)
body_b = ms('BB', fontSize=8.5, textColor=BLACK, fontName='Helvetica-Bold', leading=13)
small = ms('Sm', fontSize=8, textColor=BLACK, fontName='Helvetica', leading=12)
small_b = ms('SmB', fontSize=8, textColor=BLACK, fontName='Helvetica-Bold', leading=12)
red_s = ms('R', fontSize=8, textColor=RED, fontName='Helvetica-Bold', leading=12)
foot_s = ms('F', fontSize=7, textColor=colors.HexColor("#64748b"), fontName='Helvetica-Oblique', alignment=TA_CENTER, leading=10)
def sec_hdr(text, bg=MED_TEAL):
t = Table([[Paragraph(text, sec_s)]], colWidths=[17.6*cm])
t.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), bg),
('TOPPADDING', (0,0), (-1,-1), 5),
('BOTTOMPADDING', (0,0), (-1,-1), 5),
('LEFTPADDING', (0,0), (-1,-1), 9),
]))
return t
# ── Document ───────────────────────────────────────────────────────
out = "/home/daytona/workspace/pharyngitis-guide/AbdominalPain_Quick_Reference.pdf"
doc = SimpleDocTemplate(out, pagesize=A4,
leftMargin=1.2*cm, rightMargin=1.2*cm,
topMargin=1.0*cm, bottomMargin=1.2*cm,
title="Abdominal Pain Quick Reference Guide")
story = []
# ── HEADER ─────────────────────────────────────────────────────────
hdr = Table([
[Paragraph("ABDOMINAL PAIN", title_s)],
[Paragraph("Quick Reference Guide for MBBS Interns | General OPD / Emergency", subtitle_s)],
[Paragraph("Sources: Yamada's Gastroenterology 7E · Harrison's 22E · Rosen's Emergency Medicine · Bailey & Love 28E · Textbook of Family Medicine 9E", foot_s)],
], colWidths=[17.6*cm])
hdr.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), DARK_TEAL),
('TOPPADDING', (0,0), (-1,-1), 7),
('BOTTOMPADDING', (0,0), (-1,-1), 7),
('LEFTPADDING', (0,0), (-1,-1), 10),
]))
story.append(hdr)
story.append(Spacer(1, 0.25*cm))
# ══════════════════════════════════════════════════════════════════
# 1. HISTORY — SOCRATES
# ══════════════════════════════════════════════════════════════════
story.append(sec_hdr("1. HISTORY — USE SOCRATES + KEY QUESTIONS", bg=DARK_TEAL))
story.append(Spacer(1, 0.12*cm))
soc_data = [
[Paragraph("<b>S</b>ite", small_b), Paragraph("Where exactly? Point with one finger. Quadrant / diffuse?", small),
Paragraph("<b>A</b>ssociated Sx", small_b), Paragraph("N/V, fever, jaundice, change in bowel/urinary habits, menstrual hx", small)],
[Paragraph("<b>O</b>nset", small_b), Paragraph("Sudden (perforation/torsion/AAA) vs gradual (IBD/PUD/cancer)", small),
Paragraph("<b>R</b>elieving", small_b), Paragraph("Food (PUD improves/worsens), posture, defecation (IBS), antacids", small)],
[Paragraph("<b>C</b>haracter", small_b), Paragraph("Colicky = hollow viscus; Burning = PUD; Tearing = AAA; Dull/aching = solid organ", small),
Paragraph("<b>T</b>iming", small_b), Paragraph("Constant vs intermittent; post-meal (mesenteric ischaemia); nocturnal waking (PUD)", small)],
[Paragraph("<b>R</b>adiation", small_b), Paragraph("Shoulder tip (diaphragm/liver/spleen); Back (pancreatitis/AAA); Groin (ureteric colic)", small),
Paragraph("<b>S</b>everity", small_b), Paragraph("Score 0–10. Severity ≠ seriousness (peritonitis may be deceptively mild in elderly)", small)],
[Paragraph("<b>E</b>xacerbating", small_b), Paragraph("Movement (peritonitis); eating (mesenteric ischaemia/PUD); inspiration (cholecystitis)", small),
Paragraph("<b>Key extras</b>", small_b), Paragraph("Last menstrual period (women); recent travel; medications (NSAIDs, steroids, antibiotics)", small)],
]
soc_t = Table(soc_data, colWidths=[2.4*cm, 6.4*cm, 2.6*cm, 6.2*cm])
soc_t.setStyle(TableStyle([
('ROWBACKGROUNDS', (0,0), (-1,-1), [WHITE, GREY_BG]),
('BACKGROUND', (0,0), (0,-1), LIGHT_TEAL),
('BACKGROUND', (2,0), (2,-1), LIGHT_TEAL),
('TOPPADDING', (0,0), (-1,-1), 4),
('BOTTOMPADDING', (0,0), (-1,-1), 4),
('LEFTPADDING', (0,0), (-1,-1), 5),
('GRID', (0,0), (-1,-1), 0.3, GREY_LINE),
('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(soc_t)
story.append(Spacer(1, 0.2*cm))
# ══════════════════════════════════════════════════════════════════
# 2. DDx BY QUADRANT
# ══════════════════════════════════════════════════════════════════
story.append(sec_hdr("2. DIFFERENTIAL DIAGNOSIS BY QUADRANT / REGION", bg=MED_TEAL))
story.append(Spacer(1, 0.12*cm))
ddx_header = [
Paragraph("<b>Region</b>", small_b),
Paragraph("<b>Common Causes</b>", small_b),
Paragraph("<b>Don't Miss</b>", small_b),
]
ddx_rows = [
[Paragraph("RUQ", small_b),
Paragraph("Acute cholecystitis, cholelithiasis, hepatitis (A/B/E), PUD, GERD, right lower lobe pneumonia, liver abscess, Fitz-Hugh-Curtis syndrome", small),
Paragraph("Inferior wall MI, ruptured liver abscess, cholangitis (Charcot's triad)", small)],
[Paragraph("LUQ", small_b),
Paragraph("Gastritis, PUD (gastric ulcer), splenic pathology (splenomegaly, infarct), pancreatitis tail, left lower lobe pneumonia", small),
Paragraph("Splenic rupture (trauma/mono), aortic dissection", small)],
[Paragraph("Epigastric", small_b),
Paragraph("PUD, GERD, gastritis, pancreatitis, early appendicitis, MI (inferior wall)", small),
Paragraph("Leaking AAA, perforated peptic ulcer, acute MI — ECG mandatory!", small)],
[Paragraph("RLQ", small_b),
Paragraph("Acute appendicitis, Meckel's diverticulitis, Crohn's disease (terminal ileum), mesenteric lymphadenitis, ectopic pregnancy (female), ovarian cyst/torsion (female), renal/ureteral calculi", small),
Paragraph("Ectopic pregnancy (must exclude in all females of reproductive age), appendicitis in retrocecal position", small)],
[Paragraph("LLQ", small_b),
Paragraph("Diverticulitis (sigmoid), constipation, IBS, IBD (ulcerative colitis), renal/ureteral calculi, ectopic pregnancy, ovarian cyst/torsion", small),
Paragraph("Sigmoid volvulus, perforated diverticulitis", small)],
[Paragraph("Central / Periumbilical", small_b),
Paragraph("Early appendicitis (migrates to RLQ), small bowel obstruction, mesenteric ischaemia, aortic aneurysm, IBD", small),
Paragraph("Mesenteric ischaemia (pain out of proportion to findings), AAA", small)],
[Paragraph("Hypogastric / Suprapubic", small_b),
Paragraph("UTI/cystitis, PID, ectopic pregnancy, ovarian pathology, constipation, urinary retention, IBS", small),
Paragraph("Ectopic pregnancy, ovarian torsion, urinary retention in elderly males", small)],
[Paragraph("Diffuse / Generalised", small_b),
Paragraph("Peritonitis (any cause), gastroenteritis, IBD, bowel obstruction, DKA, constipation, IBS", small),
Paragraph("Perforated viscus, mesenteric ischaemia, ruptured AAA, DKA", small)],
]
ddx_data = [ddx_header] + ddx_rows
ddx_t = Table(ddx_data, colWidths=[2.8*cm, 8.4*cm, 6.4*cm])
ddx_t.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), DARK_TEAL),
('TEXTCOLOR', (0,0), (-1,0), WHITE),
('ROWBACKGROUNDS', (0,1), (-1,-1), [WHITE, GREY_BG]),
('BACKGROUND', (2,1), (2,-1), RED_LIGHT),
('TOPPADDING', (0,0), (-1,-1), 4),
('BOTTOMPADDING', (0,0), (-1,-1), 4),
('LEFTPADDING', (0,0), (-1,-1), 5),
('GRID', (0,0), (-1,-1), 0.3, GREY_LINE),
('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(ddx_t)
story.append(Spacer(1, 0.2*cm))
# ══════════════════════════════════════════════════════════════════
# 3. CLINICAL SIGNS TABLE
# ══════════════════════════════════════════════════════════════════
story.append(sec_hdr("3. KEY CLINICAL SIGNS & WHAT THEY MEAN", bg=colors.HexColor("#1d4ed8")))
story.append(Spacer(1, 0.12*cm))
signs_data = [
[Paragraph("<b>Sign</b>", small_b), Paragraph("<b>How to Elicit</b>", small_b), Paragraph("<b>Positive if...</b>", small_b), Paragraph("<b>Suggests</b>", small_b)],
[Paragraph("Murphy's Sign", small), Paragraph("Deep palpation RUQ + ask patient to inspire deeply", small), Paragraph("Pain arrests inspiration", small), Paragraph("Acute cholecystitis (Sens 65%, Spec 87%)", small)],
[Paragraph("Rovsing's Sign", small), Paragraph("Press/release LLQ", small), Paragraph("Pain felt in RLQ", small), Paragraph("Appendicitis (indirect rebound)", small)],
[Paragraph("Psoas Sign", small), Paragraph("Patient lifts right thigh vs resistance (supine)", small), Paragraph("RLQ pain increases", small), Paragraph("Retrocecal appendicitis, psoas abscess", small)],
[Paragraph("Obturator Sign", small), Paragraph("Flex R hip+knee 90°, rotate internally/externally", small), Paragraph("Pain reproduced", small), Paragraph("Appendicitis, PID, pelvic abscess", small)],
[Paragraph("Guarding / Rigidity", small), Paragraph("Gentle palpation; assess muscle tone during respiration", small), Paragraph("Board-like abdomen", small), Paragraph("Peritonitis (involuntary > voluntary)", small)],
[Paragraph("CVAT", small), Paragraph("Firm fist percussion over costovertebral angle", small), Paragraph("Tenderness elicited", small), Paragraph("Pyelonephritis, renal calculus", small)],
[Paragraph("Cullen's / Grey Turner's", small), Paragraph("Periumbilical (Cullen) or flank (Grey Turner) discolouration", small), Paragraph("Bruising visible", small), Paragraph("Retroperitoneal bleed, severe pancreatitis", small)],
]
signs_t = Table(signs_data, colWidths=[3.2*cm, 5.0*cm, 4.0*cm, 5.4*cm])
signs_t.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor("#1e3a8a")),
('TEXTCOLOR', (0,0), (-1,0), WHITE),
('ROWBACKGROUNDS', (0,1), (-1,-1), [WHITE, LIGHT_BLUE]),
('TOPPADDING', (0,0), (-1,-1), 4),
('BOTTOMPADDING', (0,0), (-1,-1), 4),
('LEFTPADDING', (0,0), (-1,-1), 5),
('GRID', (0,0), (-1,-1), 0.3, GREY_LINE),
('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(signs_t)
story.append(Spacer(1, 0.2*cm))
# ══════════════════════════════════════════════════════════════════
# 4. INVESTIGATIONS + 5. RED FLAGS side by side
# ══════════════════════════════════════════════════════════════════
story.append(sec_hdr("4. INVESTIGATIONS 5. RED FLAGS", bg=colors.HexColor("#6d28d9")))
story.append(Spacer(1, 0.12*cm))
inv_box = Table([
[Paragraph("<b>Basic workup (most patients)</b>", small_b)],
[Paragraph("• CBC — WBC↑ (infection/inflammation), Hb↓ (bleed/perforation)", small)],
[Paragraph("• CRP / ESR — infection, IBD, abscess", small)],
[Paragraph("• LFTs — hepatitis, biliary, pancreatitis (AST/ALT)", small)],
[Paragraph("• Serum amylase/lipase — pancreatitis (lipase more specific)", small)],
[Paragraph("• RFTs + electrolytes — renal colic, obstruction", small)],
[Paragraph("• Urine routine / microscopy — UTI, renal calculi, DKA", small)],
[Paragraph("• Urine β-hCG — all females of reproductive age (MANDATORY)", small_b)],
[Paragraph(" ", small)],
[Paragraph("<b>Targeted investigations</b>", small_b)],
[Paragraph("• USG abdomen — biliary, liver, kidney, gynaecological, AAA", small)],
[Paragraph("• CECT abdomen/pelvis — appendicitis, pancreatitis, malignancy", small)],
[Paragraph("• ECG — mandatory in all epigastric pain (rule out MI)", small_b)],
[Paragraph("• Stool exam — dysentery, parasite, occult blood", small)],
[Paragraph("• Blood culture — if febrile (suspect sepsis/peritonitis)", small)],
], colWidths=[8.4*cm])
inv_box.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), PURPLE_LIGHT),
('TOPPADDING', (0,0), (-1,-1), 3),
('BOTTOMPADDING', (0,0), (-1,-1), 3),
('LEFTPADDING', (0,0), (-1,-1), 7),
]))
rf_box = Table([
[Paragraph("<b>🚨 Red Flags — Urgent / Surgical Referral</b>", red_s)],
[Paragraph("• Sudden onset severe pain (perforation, AAA, torsion)", small)],
[Paragraph("• Hemodynamic instability — BP↓, HR↑, sweating", small)],
[Paragraph("• Peritonism — guarding, rigidity, rebound tenderness", small)],
[Paragraph("• Positive pregnancy test + pain (ectopic pregnancy)", small)],
[Paragraph("• Abdominal distension + absolute constipation (obstruction)", small)],
[Paragraph("• Pulsatile abdominal mass (AAA)", small)],
[Paragraph("• Fever >38.5°C + RLQ pain + Rovsing/Psoas/Obturator +ve (appendicitis)", small)],
[Paragraph("• Jaundice + fever + RUQ pain = Charcot's triad → Cholangitis", small)],
[Paragraph("• Pain out of proportion to physical findings → mesenteric ischaemia", small)],
[Paragraph("• Blood PR (fresh or melena) → GI bleed", small)],
[Paragraph("• Age >60 with new-onset abdominal pain — always take seriously", small)],
[Paragraph(" ", small)],
[Paragraph("<b>Populations requiring extra caution:</b>", small_b)],
[Paragraph("Elderly | Pregnant | Immunocompromised | Post-bariatric surgery | Known vascular disease", small)],
], colWidths=[9.0*cm])
rf_box.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), RED_LIGHT),
('TOPPADDING', (0,0), (-1,-1), 3),
('BOTTOMPADDING', (0,0), (-1,-1), 3),
('LEFTPADDING', (0,0), (-1,-1), 7),
]))
inv_rf = Table([[inv_box, rf_box]], colWidths=[8.6*cm, 9.0*cm])
inv_rf.setStyle(TableStyle([
('VALIGN', (0,0), (-1,-1), 'TOP'),
('LEFTPADDING', (0,0), (-1,-1), 0),
('RIGHTPADDING', (0,0), (-1,-1), 0),
('TOPPADDING', (0,0), (-1,-1), 0),
('GRID', (0,0), (-1,-1), 0.3, GREY_LINE),
]))
story.append(inv_rf)
story.append(Spacer(1, 0.2*cm))
# ══════════════════════════════════════════════════════════════════
# 6. COMMON CONDITIONS AT A GLANCE
# ══════════════════════════════════════════════════════════════════
story.append(sec_hdr("6. COMMON CONDITIONS — QUICK RECOGNITION & INITIAL MANAGEMENT", bg=colors.HexColor("#065f46")))
story.append(Spacer(1, 0.12*cm))
cond_data = [
[Paragraph("<b>Condition</b>", small_b), Paragraph("<b>Classic Presentation</b>", small_b), Paragraph("<b>Key Test</b>", small_b), Paragraph("<b>Initial Management</b>", small_b)],
[Paragraph("Acute Appendicitis", small),
Paragraph("Periumbilical pain → RLQ, N/V, low-grade fever, RLQ tenderness, Rovsing +ve", small),
Paragraph("USG / CECT abdomen; WBC↑", small),
Paragraph("NBM, IV fluids, analgesia, surgical referral", small)],
[Paragraph("Acute Cholecystitis", small),
Paragraph("RUQ colicky pain post-fatty meal, N/V, Murphy's sign +ve, fever", small),
Paragraph("USG abdomen (gallstones + wall thickening)", small),
Paragraph("NBM, analgesia, IV fluids, antibiotics, surgical consult", small)],
[Paragraph("Acute Pancreatitis", small),
Paragraph("Severe epigastric pain radiating to back, N/V, relieved by leaning forward; H/O alcohol or gallstones", small),
Paragraph("Serum lipase >3× ULN; CECT for severity (Balthazar score)", small),
Paragraph("NBM, aggressive IV fluids, analgesia, monitor vitals. No food until pain-free.", small)],
[Paragraph("Peptic Ulcer / Perforation", small),
Paragraph("Epigastric burning; H/O NSAIDs/H.pylori; Perforation: sudden board-like rigidity", small),
Paragraph("Erect CXR (free air under diaphragm); OGD", small),
Paragraph("Perforation: emergency surgery. PUD: PPI, H.pylori eradication (Triple therapy)", small)],
[Paragraph("Intestinal Obstruction", small),
Paragraph("Colicky central pain, distension, absolute constipation, bilious vomiting, visible peristalsis", small),
Paragraph("Plain X-ray abdomen erect + supine (air-fluid levels, dilated loops)", small),
Paragraph("NGT suction, IV fluids, NBM, Foley catheter, surgical referral", small)],
[Paragraph("Renal / Ureteric Colic", small),
Paragraph("Severe loin-to-groin colicky pain, hematuria, restlessness (can't sit still), N/V", small),
Paragraph("Urine microscopy; NCCT KUB (best); USG", small),
Paragraph("Diclofenac 75 mg IM or IV, adequate hydration, sieve urine, urology referral if stone >5 mm", small)],
[Paragraph("Ectopic Pregnancy", small),
Paragraph("Amenorrhoea + LLQ/RLQ pain + vaginal bleeding; haemodynamic instability possible", small),
Paragraph("Urine/serum β-hCG; Transvaginal USG", small),
Paragraph("EMERGENCY — IV access, fluid resuscitation, O2, urgent gynae referral / OT", small)],
[Paragraph("PID / Salpingitis", small),
Paragraph("Young female; bilateral lower abdominal pain, cervical motion tenderness, vaginal discharge, fever", small),
Paragraph("Pelvic exam, HVS, HCG (rule out ectopic)", small),
Paragraph("Doxycycline + Metronidazole ± Ceftriaxone; outpatient if mild", small)],
[Paragraph("Acute Gastroenteritis", small),
Paragraph("N/V + diarrhoea ± cramping, often diffuse tenderness, fever, recent food hx", small),
Paragraph("Stool exam, culture; CBC if severe", small),
Paragraph("Oral/IV rehydration; antibiotics only if bacterial (Ciprofloxacin for severe shigella/salmonella)", small)],
]
cond_t = Table(cond_data, colWidths=[3.0*cm, 5.5*cm, 3.8*cm, 5.3*cm])
cond_t.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor("#014737")),
('TEXTCOLOR', (0,0), (-1,0), WHITE),
('ROWBACKGROUNDS', (0,1), (-1,-1), [WHITE, GREEN_LIGHT]),
('TOPPADDING', (0,0), (-1,-1), 4),
('BOTTOMPADDING', (0,0), (-1,-1), 4),
('LEFTPADDING', (0,0), (-1,-1), 5),
('GRID', (0,0), (-1,-1), 0.3, GREY_LINE),
('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
# Highlight ectopic row (index 7) as high danger
('BACKGROUND', (0,7), (-1,7), colors.HexColor("#fde68a")),
]))
story.append(cond_t)
story.append(Spacer(1, 0.2*cm))
# ══════════════════════════════════════════════════════════════════
# 7. ANALGESIA NOTE + BOTTOM TIPS
# ══════════════════════════════════════════════════════════════════
story.append(sec_hdr("7. ANALGESIA & PRACTICAL TIPS", bg=colors.HexColor("#b45309")))
story.append(Spacer(1, 0.12*cm))
tips_data = [
[Paragraph("<b>On analgesia:</b> Studies confirm that giving analgesics does NOT mask diagnosis or increase diagnostic errors. Do not withhold pain relief while evaluating. Use IV morphine 0.1 mg/kg titrated or IV paracetamol.", small),
Paragraph("<b>On referral:</b> Immediate surgical referral if: peritonism, haemodynamic instability, suspected perforation, obstruction, ectopic pregnancy, or any patient where diagnosis is unclear after initial assessment.", small)],
[Paragraph("<b>Nonspecific Abdominal Pain (NSAP):</b> ~40% of acute abdominal pain admissions. Diagnosis of exclusion. Active observation with serial examinations is acceptable. Early laparoscopy improves diagnosis rate but not clinical outcomes.", small),
Paragraph("<b>Elderly caution:</b> Reduced peritoneal reaction — examination findings underestimate severity. Higher threshold for admission. Common causes missed: mesenteric ischaemia, aortic aneurysm, acute MI (atypical presentation).", small)],
]
tips_t = Table(tips_data, colWidths=[8.6*cm, 9.0*cm])
tips_t.setStyle(TableStyle([
('ROWBACKGROUNDS', (0,0), (-1,-1), [YELLOW_LIGHT, colors.HexColor("#fff7ed")]),
('TOPPADDING', (0,0), (-1,-1), 5),
('BOTTOMPADDING', (0,0), (-1,-1), 5),
('LEFTPADDING', (0,0), (-1,-1), 7),
('GRID', (0,0), (-1,-1), 0.3, GREY_LINE),
('VALIGN', (0,0), (-1,-1), 'TOP'),
]))
story.append(tips_t)
story.append(Spacer(1, 0.15*cm))
# ── FOOTER ─────────────────────────────────────────────────────────
story.append(HRFlowable(width="100%", thickness=0.5, color=GREY_LINE))
story.append(Spacer(1, 0.08*cm))
story.append(Paragraph(
"References: Yamada's Textbook of Gastroenterology 7E · Harrison's Principles of Internal Medicine 22E (2025) · "
"Rosen's Emergency Medicine · Bailey & Love's Short Practice of Surgery 28E · Textbook of Family Medicine 9E | "
"Compiled by Orris AI · July 2026 | For educational use only — always apply clinical judgment.",
foot_s
))
doc.build(story)
print(f"PDF created: {out}")
cd /home/daytona/workspace/pharyngitis-guide && python abdominal_pain_guide.py 2>&1
ls -lh /home/daytona/workspace/pharyngitis-guide/
AbdominalPain Quick Reference
PDF Document · PDF
Cough
~/pharyngitis-guide/cough_guide.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import cm
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.platypus import (SimpleDocTemplate, Paragraph, Spacer, Table,
TableStyle, HRFlowable)
from reportlab.lib.enums import TA_CENTER, TA_LEFT
# ── Palette ──────────────────────────────────────────────────────
DARK_GREEN = colors.HexColor("#14532d")
MED_GREEN = colors.HexColor("#16a34a")
LIGHT_GREEN = colors.HexColor("#dcfce7")
TEAL_DARK = colors.HexColor("#0f4c5c")
TEAL = colors.HexColor("#0e7490")
TEAL_LIGHT = colors.HexColor("#cffafe")
BLUE_DARK = colors.HexColor("#1e3a8a")
BLUE = colors.HexColor("#2563eb")
BLUE_LIGHT = colors.HexColor("#dbeafe")
ORANGE_DARK = colors.HexColor("#9a3412")
ORANGE = colors.HexColor("#c2410c")
ORANGE_LIGHT = colors.HexColor("#fff7ed")
RED = colors.HexColor("#991b1b")
RED_LIGHT = colors.HexColor("#fee2e2")
PURPLE_DARK = colors.HexColor("#4c1d95")
PURPLE = colors.HexColor("#7c3aed")
PURPLE_LIGHT = colors.HexColor("#ede9fe")
YELLOW_DARK = colors.HexColor("#78350f")
YELLOW_LIGHT = colors.HexColor("#fef3c7")
GREY_BG = colors.HexColor("#f1f5f9")
GREY_LINE = colors.HexColor("#cbd5e1")
WHITE = colors.white
BLACK = colors.HexColor("#1e293b")
styles = getSampleStyleSheet()
def ms(name, **kw):
return ParagraphStyle(name, parent=styles['Normal'], **kw)
title_s = ms('T', fontSize=22, textColor=WHITE, fontName='Helvetica-Bold', alignment=TA_CENTER, spaceAfter=3)
sub_s = ms('S', fontSize=10, textColor=colors.HexColor("#bbf7d0"), fontName='Helvetica', alignment=TA_CENTER)
sec_s = ms('H', fontSize=11, textColor=WHITE, fontName='Helvetica-Bold', alignment=TA_LEFT, spaceBefore=1, spaceAfter=1)
small = ms('Sm', fontSize=8, textColor=BLACK, fontName='Helvetica', leading=12)
small_b = ms('SmB', fontSize=8, textColor=BLACK, fontName='Helvetica-Bold', leading=12)
red_s = ms('R', fontSize=8, textColor=RED, fontName='Helvetica-Bold', leading=12)
orange_s = ms('O', fontSize=8, textColor=ORANGE, fontName='Helvetica-Bold', leading=12)
foot_s = ms('F', fontSize=7, textColor=colors.HexColor("#64748b"), fontName='Helvetica-Oblique', alignment=TA_CENTER, leading=10)
def shdr(text, bg=TEAL_DARK):
t = Table([[Paragraph(text, sec_s)]], colWidths=[17.6*cm])
t.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), bg),
('TOPPADDING', (0,0), (-1,-1), 5),
('BOTTOMPADDING', (0,0), (-1,-1), 5),
('LEFTPADDING', (0,0), (-1,-1), 9),
]))
return t
out = "/home/daytona/workspace/pharyngitis-guide/Cough_Quick_Reference.pdf"
doc = SimpleDocTemplate(out, pagesize=A4,
leftMargin=1.2*cm, rightMargin=1.2*cm,
topMargin=1.0*cm, bottomMargin=1.2*cm,
title="Cough Quick Reference Guide")
story = []
# ── HEADER ────────────────────────────────────────────────────────
hdr = Table([
[Paragraph("COUGH", title_s)],
[Paragraph("Quick Reference Guide for MBBS Interns | General OPD / Respiratory Clinic", sub_s)],
[Paragraph("Sources: Murray & Nadel's Respiratory Medicine 7E · Textbook of Family Medicine 9E · Harrison's 22E · Rosen's Emergency Medicine", foot_s)],
], colWidths=[17.6*cm])
hdr.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), DARK_GREEN),
('TOPPADDING', (0,0), (-1,-1), 7),
('BOTTOMPADDING', (0,0), (-1,-1), 7),
('LEFTPADDING', (0,0), (-1,-1), 10),
]))
story.append(hdr)
story.append(Spacer(1, 0.22*cm))
# ══════════════════════════════════════════════════════════════════
# 1. CLASSIFICATION BY DURATION
# ══════════════════════════════════════════════════════════════════
story.append(shdr("1. CLASSIFY FIRST — DURATION OF COUGH", bg=DARK_GREEN))
story.append(Spacer(1, 0.12*cm))
dur_data = [
[Paragraph("<b>Type</b>", small_b), Paragraph("<b>Duration</b>", small_b), Paragraph("<b>Most Common Causes</b>", small_b), Paragraph("<b>Key Action</b>", small_b)],
[Paragraph("ACUTE", small_b),
Paragraph("<3 weeks", small),
Paragraph("Viral URTI (most common), acute bronchitis, sinusitis, pneumonia, exacerbation of asthma/COPD, foreign body (children)", small),
Paragraph("Treat conservatively. No antibiotics unless bacterial infection confirmed. CXR if fever, hemoptysis, or SOB.", small)],
[Paragraph("SUBACUTE", small_b),
Paragraph("3–8 weeks", small),
Paragraph("Post-infectious cough (most common), pertussis (Bordetella), UACS/postnasal drip, asthma exacerbation", small),
Paragraph("Consider pertussis especially if whooping + post-tussive vomiting. Macrolide if pertussis confirmed.", small)],
[Paragraph("CHRONIC", small_b),
Paragraph(">8 weeks", small),
Paragraph("Non-smoker: Postnasal drip, Asthma, GERD, ACE inhibitor (PAGA mnemonic). Smoker: Add chronic bronchitis, lung cancer, bronchiectasis, TB", small),
Paragraph("CXR mandatory. Spirometry. Trial of empiric therapy. ACE inhibitor? Switch to ARB.", small)],
]
dur_t = Table(dur_data, colWidths=[2.2*cm, 2.0*cm, 7.4*cm, 6.0*cm])
dur_t.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), DARK_GREEN),
('TEXTCOLOR', (0,0), (-1,0), WHITE),
('ROWBACKGROUNDS', (0,1), (-1,-1), [WHITE, LIGHT_GREEN]),
('TOPPADDING', (0,0), (-1,-1), 5),
('BOTTOMPADDING', (0,0), (-1,-1), 5),
('LEFTPADDING', (0,0), (-1,-1), 5),
('GRID', (0,0), (-1,-1), 0.3, GREY_LINE),
('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
('BACKGROUND', (0,3), (1,3), colors.HexColor("#fde68a")),
]))
story.append(dur_t)
story.append(Spacer(1, 0.2*cm))
# ══════════════════════════════════════════════════════════════════
# 2. HISTORY — KEY QUESTIONS
# ══════════════════════════════════════════════════════════════════
story.append(shdr("2. HISTORY — KEY QUESTIONS TO ASK", bg=TEAL_DARK))
story.append(Spacer(1, 0.12*cm))
hx_data = [
[Paragraph("<b>Question</b>", small_b), Paragraph("<b>What it suggests</b>", small_b),
Paragraph("<b>Question</b>", small_b), Paragraph("<b>What it suggests</b>", small_b)],
[Paragraph("Productive or dry?", small),
Paragraph("<b>Dry:</b> Asthma, GERD, ACE inhibitor, IPF, viral | <b>Productive:</b> Infection, bronchiectasis, TB, lung abscess", small),
Paragraph("Nocturnal cough?", small),
Paragraph("Asthma (classic!), GERD, postnasal drip, heart failure", small)],
[Paragraph("Sputum colour?", small),
Paragraph("<b>Clear/white:</b> Viral, asthma | <b>Yellow/green:</b> Bacterial | <b>Rusty:</b> Pneumococcal pneumonia | <b>Pink frothy:</b> Pulmonary oedema", small),
Paragraph("Post-tussive vomiting?", small),
Paragraph("Pertussis (whooping cough) — especially with paroxysmal nature", small)],
[Paragraph("Haemoptysis?", small),
Paragraph("TB, bronchiectasis, lung carcinoma, pulmonary embolism, mitral stenosis — NEVER ignore!", small),
Paragraph("Wheezing / SOB?", small),
Paragraph("Asthma, COPD, bronchitis, cardiac failure (cardiac asthma)", small)],
[Paragraph("Heartburn / regurgitation?", small),
Paragraph("GERD-related cough — often no GI symptoms despite GERD being the cause", small),
Paragraph("Smoking history?", small),
Paragraph("Chronic bronchitis, lung cancer, COPD. Pack-year history essential.", small)],
[Paragraph("ACE inhibitor use?", small),
Paragraph("Dry persistent cough — up to 15% of patients on ACEi. Switch to ARB.", small),
Paragraph("TB contacts / travel?", small),
Paragraph("TB — ask about weight loss, night sweats, fever. Mandatory in India.", small)],
[Paragraph("Occupation / exposure?", small),
Paragraph("Coal/grain dust → pneumoconiosis; birds → hypersensitivity pneumonitis; asbestos → mesothelioma", small),
Paragraph("Child with sudden onset?", small),
Paragraph("Foreign body aspiration until proven otherwise", small)],
]
hx_t = Table(hx_data, colWidths=[3.0*cm, 5.8*cm, 3.0*cm, 5.8*cm])
hx_t.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), TEAL_DARK),
('TEXTCOLOR', (0,0), (-1,0), WHITE),
('ROWBACKGROUNDS', (0,1), (-1,-1), [WHITE, TEAL_LIGHT]),
('TOPPADDING', (0,0), (-1,-1), 4),
('BOTTOMPADDING', (0,0), (-1,-1), 4),
('LEFTPADDING', (0,0), (-1,-1), 5),
('GRID', (0,0), (-1,-1), 0.3, GREY_LINE),
('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(hx_t)
story.append(Spacer(1, 0.2*cm))
# ══════════════════════════════════════════════════════════════════
# 3. COMMON CAUSES WITH RECOGNITION + MANAGEMENT
# ══════════════════════════════════════════════════════════════════
story.append(shdr("3. COMMON CAUSES — RECOGNITION & MANAGEMENT", bg=BLUE_DARK))
story.append(Spacer(1, 0.12*cm))
cond_data = [
[Paragraph("<b>Condition</b>", small_b), Paragraph("<b>Classic Clues</b>", small_b), Paragraph("<b>Test</b>", small_b), Paragraph("<b>Management</b>", small_b)],
[Paragraph("Viral URTI / Acute Bronchitis", small),
Paragraph("Acute cough, runny nose, sore throat, no fever >38°C, self-limiting <3 weeks", small),
Paragraph("Clinical diagnosis. No investigations needed routinely.", small),
Paragraph("Supportive: fluids, honey, steam inhalation. No antibiotics. Paracetamol for fever.", small)],
[Paragraph("Pneumonia", small),
Paragraph("Fever, productive cough, tachypnoea, pleuritic chest pain, dullness on percussion, bronchial breath sounds", small),
Paragraph("CXR (consolidation); CBC (WBC↑); sputum culture; SpO2", small),
Paragraph("CAP: Amoxicillin 500 mg TDS × 5–7 days (outpatient). Severe/atypical: Add Azithromycin/Doxycycline. Admit if CURB-65 ≥2.", small)],
[Paragraph("Asthma / Cough-variant Asthma", small),
Paragraph("Nocturnal dry cough ± wheeze, breathlessness, reversible with bronchodilator; episodic; triggered by cold, exercise, allergens", small),
Paragraph("Spirometry (FEV1/FVC <0.7, reversible); Peak flow variability >20%; CXR (hyperinflation)", small),
Paragraph("Inhaled SABA (Salbutamol) for acute. Add ICS (Beclomethasone) for persistent. Trial of oral prednisolone if diagnosis unclear.", small)],
[Paragraph("Postnasal Drip (UACS)", small),
Paragraph("Sensation of drip at back of throat, throat clearing, cobblestoning of pharynx, often no nasal symptoms", small),
Paragraph("Clinical. CT sinuses if recurrent sinusitis.", small),
Paragraph("Nasal topical steroid (Fluticasone spray) + antihistamine. Ipratropium nasal spray for excessive secretions. Antibiotics if bacterial sinusitis.", small)],
[Paragraph("GERD", small),
Paragraph("Chronic dry cough worsened by lying down, post-meal; heartburn may be absent! Responds to PPI trial.", small),
Paragraph("Clinical + PPI trial. OGD if refractory.", small),
Paragraph("PPI (Omeprazole 20–40 mg OD) × 8 weeks. Elevate head of bed, avoid triggers (spicy food, coffee, alcohol, late meals).", small)],
[Paragraph("ACE Inhibitor Cough", small),
Paragraph("Persistent dry tickly cough starting weeks–months after ACEi initiation; no other symptoms", small),
Paragraph("Clinical. Drug history.", small),
Paragraph("Stop ACE inhibitor. Switch to ARB (Losartan). Cough resolves in 1–4 weeks.", small)],
[Paragraph("Tuberculosis (TB)", small),
Paragraph("Chronic productive cough >3 weeks, haemoptysis, evening fever, night sweats, weight loss, TB contact", small),
Paragraph("Sputum AFB × 3 (or CBNAAT/Xpert MTB), CXR (upper lobe involvement, cavitation)", small),
Paragraph("Refer to DOTS centre. RHEZ (Rifampicin, INH, Ethambutol, Pyrazinamide) × 2 months then RH × 4 months.", small)],
[Paragraph("COPD (exacerbation)", small),
Paragraph("Smoker, chronic productive cough + increased sputum volume/purulence, worsening dyspnoea", small),
Paragraph("Spirometry (FEV1/FVC <0.7, not fully reversible); CXR; ABG if severe", small),
Paragraph("SABD (Salbutamol + Ipratropium), systemic steroids (Prednisolone 30–40 mg × 5 days), antibiotics if purulent sputum (Amoxicillin/Doxycycline).", small)],
[Paragraph("Bronchiectasis", small),
Paragraph("Chronic copious mucopurulent/foul-smelling sputum, daily cough, recurrent chest infections, finger clubbing possible", small),
Paragraph("HRCT chest (gold standard: dilated thick-walled bronchi)", small),
Paragraph("Postural drainage/chest physiotherapy. Antibiotics for exacerbations. Inhaled LABA + ICS. Treat underlying cause.", small)],
[Paragraph("Lung Cancer", small),
Paragraph("Smoker >40 yrs, new or changed cough, haemoptysis, weight loss, hoarseness (recurrent laryngeal nerve), clubbing", small),
Paragraph("CXR → CT chest (mass lesion). Bronchoscopy + biopsy.", small),
Paragraph("Urgent oncology/pulmonology referral. Staging required before treatment.", small)],
]
cond_t = Table(cond_data, colWidths=[3.0*cm, 5.0*cm, 3.8*cm, 5.8*cm])
cond_t.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), BLUE_DARK),
('TEXTCOLOR', (0,0), (-1,0), WHITE),
('ROWBACKGROUNDS', (0,1), (-1,-1), [WHITE, BLUE_LIGHT]),
('TOPPADDING', (0,0), (-1,-1), 4),
('BOTTOMPADDING', (0,0), (-1,-1), 4),
('LEFTPADDING', (0,0), (-1,-1), 5),
('GRID', (0,0), (-1,-1), 0.3, GREY_LINE),
('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
# Highlight TB row (index 7) - important in India
('BACKGROUND', (0,7), (-1,7), colors.HexColor("#fde68a")),
# Highlight lung cancer row (index 10)
('BACKGROUND', (0,10), (-1,10), RED_LIGHT),
]))
story.append(cond_t)
story.append(Spacer(1, 0.2*cm))
# ══════════════════════════════════════════════════════════════════
# 4. INVESTIGATIONS + 5. RED FLAGS (side by side)
# ══════════════════════════════════════════════════════════════════
story.append(shdr("4. INVESTIGATIONS 5. RED FLAGS", bg=PURPLE_DARK))
story.append(Spacer(1, 0.12*cm))
inv_box = Table([
[Paragraph("<b>All patients with cough >3 weeks:</b>", small_b)],
[Paragraph("• CXR PA view — MOST valuable single test", small_b)],
[Paragraph("• CBC — eosinophilia (asthma), WBC↑ (infection), anaemia (malignancy)", small)],
[Paragraph("• SpO2 — assess respiratory compromise", small)],
[Paragraph(" ", small)],
[Paragraph("<b>Targeted by suspected cause:</b>", small_b)],
[Paragraph("• Sputum AFB × 3 / CBNAAT — if TB suspected (>3 wks cough in India)", small)],
[Paragraph("• Spirometry — if asthma/COPD suspected (reversibility test)", small)],
[Paragraph("• HRCT chest — bronchiectasis (dilated bronchi), ILD, malignancy", small)],
[Paragraph("• CT sinuses — recurrent sinusitis/UACS", small)],
[Paragraph("• OGD / 24h pH study — refractory GERD-related cough", small)],
[Paragraph("• Sputum cytology — if malignancy suspected", small)],
[Paragraph("• Bronchoscopy — haemoptysis, suspected malignancy, FB aspiration", small)],
[Paragraph("• Mantoux/IGRA (Quantiferon) — TB latent/active workup", small)],
[Paragraph(" ", small)],
[Paragraph("<b>Empiric trials (if CXR normal, non-smoker):</b>", small_b)],
[Paragraph("Stop ACEi → Wait 4 weeks | PPI trial × 8 wks | Nasal steroid × 4 wks | ICS trial × 6 wks", small)],
], colWidths=[8.4*cm])
inv_box.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), PURPLE_LIGHT),
('TOPPADDING', (0,0), (-1,-1), 3),
('BOTTOMPADDING', (0,0), (-1,-1), 3),
('LEFTPADDING', (0,0), (-1,-1), 7),
]))
rf_box = Table([
[Paragraph("<b>🚨 Red Flags — Urgent Evaluation / Refer</b>", red_s)],
[Paragraph("• Haemoptysis — never ignore (TB, cancer, PE)", small)],
[Paragraph("• Weight loss + night sweats + chronic cough → TB / malignancy", small)],
[Paragraph("• Stridor — upper airway obstruction (epiglottitis, foreign body, tumour)", small)],
[Paragraph("• SpO2 <94% on air — respiratory failure", small)],
[Paragraph("• Respiratory rate >30/min — severe pneumonia / sepsis", small)],
[Paragraph("• Pleuritic chest pain + SOB — PE, pneumonia, pneumothorax", small)],
[Paragraph("• Hoarse voice + cough → recurrent laryngeal nerve palsy (lung cancer)", small)],
[Paragraph("• Clubbing + chronic cough → bronchiectasis, IPF, malignancy", small)],
[Paragraph("• Cough + superior vena cava syndrome (face/arm oedema, JVP↑)", small)],
[Paragraph("• Sudden onset severe dyspnoea + cough — pneumothorax, massive PE", small)],
[Paragraph("• Child: sudden onset cough after playing with small objects → FB aspiration", small)],
[Paragraph(" ", small)],
[Paragraph("<b>CURB-65 (Admit if score ≥2):</b>", small_b)],
[Paragraph("C=Confusion | U=Urea >7 mmol/L | R=RR ≥30 | B=BP<90/60 | 65=Age≥65", small)],
[Paragraph("Score 0–1: Home | Score 2: Hospital | Score 3–5: ICU consider", small)],
], colWidths=[9.0*cm])
rf_box.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), RED_LIGHT),
('TOPPADDING', (0,0), (-1,-1), 3),
('BOTTOMPADDING', (0,0), (-1,-1), 3),
('LEFTPADDING', (0,0), (-1,-1), 7),
]))
combined = Table([[inv_box, rf_box]], colWidths=[8.6*cm, 9.0*cm])
combined.setStyle(TableStyle([
('VALIGN', (0,0), (-1,-1), 'TOP'),
('LEFTPADDING', (0,0), (-1,-1), 0),
('RIGHTPADDING', (0,0), (-1,-1), 0),
('TOPPADDING', (0,0), (-1,-1), 0),
('GRID', (0,0), (-1,-1), 0.3, GREY_LINE),
]))
story.append(combined)
story.append(Spacer(1, 0.2*cm))
# ══════════════════════════════════════════════════════════════════
# 6. CHRONIC COUGH MNEMONIC + SPECIAL NOTES
# ══════════════════════════════════════════════════════════════════
story.append(shdr("6. CHRONIC COUGH MNEMONIC + SPECIAL CLINICAL NOTES", bg=colors.HexColor("#b45309")))
story.append(Spacer(1, 0.12*cm))
memo_box = Table([
[Paragraph("<b>PAGA — Top 4 Causes of Chronic Cough (Non-smoker)</b>", small_b)],
[Paragraph("<b>P</b> — Postnasal drip / Upper Airway Cough Syndrome (UACS) → most common", small)],
[Paragraph("<b>A</b> — Asthma (including cough-variant asthma) → nocturnal, reversible", small)],
[Paragraph("<b>G</b> — GERD → dry cough, no GI symptoms in 40%; PPI trial diagnostic", small)],
[Paragraph("<b>A</b> — ACE inhibitor → dry tickly cough, 10–15% of users; stops when drug stopped", small)],
[Paragraph(" ", small)],
[Paragraph("<b>In Smokers, add:</b> Chronic bronchitis | Lung carcinoma | Bronchiectasis | TB", small_b)],
], colWidths=[8.4*cm])
memo_box.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), YELLOW_LIGHT),
('TOPPADDING', (0,0), (-1,-1), 4),
('BOTTOMPADDING', (0,0), (-1,-1), 4),
('LEFTPADDING', (0,0), (-1,-1), 8),
]))
notes_box = Table([
[Paragraph("<b>Practical Tips for OPD</b>", small_b)],
[Paragraph("• <b>Cough-variant asthma:</b> Cough is the ONLY symptom in up to 57% of asthmatics. No wheeze needed for diagnosis.", small)],
[Paragraph("• <b>GERD cough:</b> May be completely silent — no heartburn or regurgitation. Diagnose by PPI trial response.", small)],
[Paragraph("• <b>Pertussis in adults:</b> Whooping sound or post-tussive vomiting + paroxysmal cough + 3–8 week duration = suspect pertussis. Treat with Azithromycin 500 mg OD × 3 days.", small)],
[Paragraph("• <b>TB in India:</b> Any cough >2–3 weeks needs sputum AFB / CBNAAT. Do not delay testing. Free DOTS treatment available.", small)],
[Paragraph("• <b>IPF:</b> Chronic dry cough + progressive dyspnoea + Velcro crackles at bases = suspect IPF. HRCT is diagnostic. Refer pulmonology.", small)],
[Paragraph("• <b>Foreign body (children):</b> Sudden onset choking + cough after playing = FB until proven otherwise. Urgent bronchoscopy.", small)],
], colWidths=[9.0*cm])
notes_box.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), LIGHT_GREEN),
('TOPPADDING', (0,0), (-1,-1), 4),
('BOTTOMPADDING', (0,0), (-1,-1), 4),
('LEFTPADDING', (0,0), (-1,-1), 8),
]))
tips = Table([[memo_box, notes_box]], colWidths=[8.6*cm, 9.0*cm])
tips.setStyle(TableStyle([
('VALIGN', (0,0), (-1,-1), 'TOP'),
('LEFTPADDING', (0,0), (-1,-1), 0),
('RIGHTPADDING', (0,0), (-1,-1), 0),
('TOPPADDING', (0,0), (-1,-1), 0),
('GRID', (0,0), (-1,-1), 0.3, GREY_LINE),
]))
story.append(tips)
story.append(Spacer(1, 0.15*cm))
# ── FOOTER ────────────────────────────────────────────────────────
story.append(HRFlowable(width="100%", thickness=0.5, color=GREY_LINE))
story.append(Spacer(1, 0.08*cm))
story.append(Paragraph(
"References: Murray & Nadel's Textbook of Respiratory Medicine 7E · Textbook of Family Medicine 9E · "
"Harrison's Principles of Internal Medicine 22E (2025) · Rosen's Emergency Medicine | "
"Compiled by Orris AI · July 2026 | For educational use only — always apply clinical judgment.",
foot_s
))
doc.build(story)
print(f"PDF created: {out}")
cd /home/daytona/workspace/pharyngitis-guide && python cough_guide.py 2>&1
ls -lh /home/daytona/workspace/pharyngitis-guide/
Cough Quick Reference
PDF Document · PDF
I have completed hiv pep prophylaxis for 28 days
| Time Point | Test | Why |
|---|---|---|
| At completion (now - Day 28) | HIV Ag/Ab combo (4th gen) | Baseline at end of PEP |
| 6 weeks post-exposure | HIV Ag/Ab combo (4th gen) | Early detection window |
| 3 months post-exposure | HIV Ag/Ab combo (4th gen) | Standard follow-up |
| 4–6 months post-exposure | HIV Ag/Ab combo (4th gen) | Final conclusive test |
Testing negative at 6 months after a single exposure with a completed 28-day PEP course = effectively ruled out. - Goldman-Cecil Medicine, International Ed.
Will it give protection for extra days
| Situation | What happens |
|---|---|
| Original exposure (28 days ago) | PEP has covered this. Follow-up testing still needed. |
| New exposure while on PEP | PEP may or may not have covered it - depends on timing |
| New exposure after stopping PEP | Not protected at all. Full risk. |
| PEP | PrEP | |
|---|---|---|
| Timing | After exposure | Before/during ongoing risk |
| Duration | 28 days only | Ongoing (daily) |
| Protection | Covers single exposure event | Continuous protection |
| When to use | Emergency, one-off | Recurring risk situation |
PEP covers only the exposure it was prescribed for. It gives zero residual protection once stopped. Any new exposure after stopping requires a fresh assessment within 72 hours.
I haven taken hiv prophylaxis for,3 days after exposure. Within 72 hours
Which situation applies to you?
When did you stop taking the PEP?
| Time since exposure | Can PEP help? |
|---|---|
| 0–72 hours | Yes - PEP should be started |
| 72 hours to ~7 days | Borderline - specialist decision needed |
| >7–10 days | PEP is generally NOT effective - HIV replication is likely already established |
| Test | When |
|---|---|
| HIV RNA PCR | Now (immediately) |
| HIV Ag/Ab combo (4th gen) | 6 weeks from exposure |
| HIV Ag/Ab combo | 3 months from exposure |
| Final HIV Ag/Ab combo | 6 months from exposure |
You must see a doctor today. Not tomorrow. Today. The window for intervention has passed, but early HIV diagnosis - if infection occurred - is life-changing. Modern HIV treatment (ART) started early means a person can live a completely normal, healthy life.
If i started again pep course,is it okay
Exposure → HIV enters body → virus starts replicating locally (days 1–3)
→ spreads to regional lymph nodes (days 3–5)
→ systemic viraemia / enters bloodstream (days 5–10)
→ viral reservoir established (days 10–14+)
| Risk | Explanation |
|---|---|
| Drug resistance | Taking subtherapeutic or incomplete ART can cause HIV to develop resistance to first-line drugs, making future treatment harder |
| False reassurance | You may feel "covered" and delay proper testing and care |
| Missing early treatment window | Early HIV diagnosis + proper ART initiation gives the best long-term outcome — restarting PEP on your own delays this |
| Drug toxicity | Antiretrovirals have real side effects — taking them without proper indication and monitoring is harmful |
Do not restart PEP on your own. It will not prevent infection at this stage and may cause drug resistance. Get an HIV RNA PCR test today and see a doctor immediately.
I only missed 3 days
When did you miss those 3 days?
| Test | When |
|---|---|
| HIV Ag/Ab combo (4th gen) | 6 weeks from exposure date |
| HIV Ag/Ab combo | 3 months from exposure date |
| Final HIV Ag/Ab combo | 4–6 months from exposure date |
You took 25 of 28 days correctly, started on time, and only missed the final 3 days. Your PEP course is considered substantially complete. The risk from those 3 missed end-doses is very low. Complete follow-up testing as scheduled and you can be reassured.
I completed first course
Which describes your situation accurately?
When did you stop the second PEP course?
| Details | |
|---|---|
| First exposure | Completed full 28-day PEP course ✅ |
| Second exposure | New separate exposure occurred |
| Second PEP course | Started within 72 hours ✅ |
| Problem | Stopped after only 3 days, now 3 days have passed without taking it |
| Time since second exposure | ~6 days total |
| Reason for stopping | Solution |
|---|---|
| Nausea | Take with food, ask for antiemetic (Ondansetron/Domperidone) |
| Fatigue | Expected, improves after week 1 |
| Forgot doses | Set phone alarms for same time every day |
| Felt it was unnecessary | It is necessary - complete it |
| Test | Timeline (from second exposure) |
|---|---|
| HIV Ag/Ab combo | 6 weeks |
| HIV Ag/Ab combo | 3 months |
| Final HIV Ag/Ab | 6 months |
Resume your second PEP course today - do not wait. See your doctor immediately to confirm the plan. A 3-day gap is not ideal but resuming now is far better than stopping completely. Complete all 28 days without further interruption.
Can i take pulmo clear tablet alongwith pep prophylaxis
Pulmo Clear tablet ingredients composition India
| Pulmoclear Component | Interaction with PEP drugs | Assessment |
|---|---|---|
| Acetylcysteine (NAC) | No significant interactions with TDF, FTC, Dolutegravir, or Raltegravir | ✅ Safe |
| Acebrophylline | Acebrophylline is a xanthine derivative - no documented interaction with standard PEP antiretrovirals | ✅ Generally safe |
Yes, Pulmoclear (Acebrophylline + Acetylcysteine) is generally safe to take alongside standard PEP regimens. No clinically significant interactions with TDF, Emtricitabine, Dolutegravir, or Raltegravir are documented.
Can i drink alcohol along with
| Effect | Why alcohol is harmful during PEP |
|---|---|
| Adherence | Alcohol makes you forget doses — the single biggest cause of PEP failure |
| Nausea | Alcohol worsens PEP-related nausea significantly |
| Liver stress | ARVs already stress the liver — alcohol multiplies this |
| Kidney stress | TDF + alcohol = increased renal toxicity risk |
| Drug levels | Alcohol alters metabolism, making drug levels unpredictable |
| Immune system | Alcohol suppresses immunity — the opposite of what you need right now |
Bottom line: No alcohol at all during PEP. It risks treatment failure through missed doses, harms your liver and kidneys, and interacts with every drug in your regimen. The 28-day course is short — avoid alcohol completely until it is finished.
What should i do to maintain liver during treatment
Normal ALT/AST: up to 40 U/L. If >3× upper limit of normal on PEP → report to your doctor — drug may need to be changed.
| Food | Why it helps |
|---|---|
| Green leafy vegetables (spinach, methi, broccoli) | Antioxidants, folate — support liver detox pathways |
| Fruits (amla, papaya, watermelon, citrus) | Vitamin C — powerful antioxidant, supports glutathione |
| Turmeric (haldi) | Curcumin has hepatoprotective and anti-inflammatory properties |
| Garlic | Activates liver enzymes, contains allicin (antioxidant) |
| Beetroot | Betaine reduces oxidative stress on liver |
| Nuts and seeds (walnuts, flaxseed) | Omega-3, Vitamin E — reduce liver inflammation |
| Oats, whole grains | Reduce fat load on liver |
| Adequate water (2.5–3 L/day) | Essential — TDF is nephrotoxic and dehydration worsens toxicity |
| Food/Substance | Why |
|---|---|
| Alcohol | Direct hepatotoxin — as discussed above |
| Fatty / fried foods | Increases fat accumulation in liver (drug-induced steatosis) |
| Paracetamol >2 g/day | Combined with ARV hepatotoxicity = significant risk |
| Herbal supplements (St. John's Wort especially) | St. John's Wort reduces Dolutegravir/Raltegravir levels by 50%+ — never take with PEP |
| Raw/undercooked shellfish | Hepatitis A/E risk — avoid during this period |
| Excess sugar / processed foods | Worsens metabolic liver load |
| Supplement | Benefit | Dose |
|---|---|---|
| Silymarin (Milk Thistle / Liv-52) | Hepatoprotective — reduces ARV-induced liver enzyme elevation | Silymarin 140 mg TDS or Liv-52 2 tabs BD |
| N-Acetylcysteine (NAC) | You are already getting this in Pulmoclear! Replenishes glutathione — liver's main antioxidant | Already covered |
| Vitamin E (natural) | Antioxidant, reduces hepatic oxidative stress | 400 IU/day |
| Vitamin C | Antioxidant, supports glutathione synthesis | 500 mg/day |
| B-complex | B vitamins support liver metabolism, commonly depleted by ARVs | 1 tablet daily |
Note: Liv-52 / Silymarin has no known interaction with standard PEP drugs and is widely used alongside ARV therapy in India.
| Habit | Impact |
|---|---|
| Sleep 7–8 hours | Liver regenerates during sleep — most repair happens between 11 PM–3 AM |
| Moderate exercise | Reduces fatty liver risk, improves metabolism |
| Avoid unnecessary medications | Every extra drug the liver has to process adds to the load |
| No smoking | Oxidative stress from smoking competes with liver's antioxidant capacity |
| Stress management | Cortisol elevation impairs liver function |
Morning: PEP tablet with food + B-complex + Vitamin C
Glass of warm water with turmeric
Midday: Plenty of water, fruit, light balanced meal
Evening: Pulmoclear (Acebrophylline/NAC) — 1 hour after PEP
Liv-52 / Silymarin if prescribed
Night: Light dinner, no fried food
Sleep by 11 PM
Your NAC in Pulmoclear is already giving your liver antioxidant support. Add Liv-52, eat clean, stay hydrated, avoid alcohol and paracetamol overuse, and get LFTs checked at end of course. Your liver will handle PEP well with these measures.
Can i smoke cigarettes
| Concern | Alcohol | Cigarettes |
|---|---|---|
| Direct PEP drug interaction | ✅ Yes — significant | ❌ No significant interaction |
| Liver harm | ✅ Direct hepatotoxin | ⚠️ Indirect — enzyme induction |
| Immune suppression | ✅ Yes | ✅ Yes |
| Oxidative stress | ✅ Yes | ✅ Yes — depletes glutathione |
| Counteracts Pulmoclear | Partially | ✅ Directly |
| Verdict | Completely avoid | Strongly avoid |
No direct PEP drug interaction with cigarettes — but smoking suppresses your immune system, depletes the antioxidants you are trying to build up, worsens your respiratory symptoms, and adds liver stress. The 28-day course is short. If there was ever a good time to quit or at minimum cut down significantly — this is it.
During sexuak intercourse,i wear condom
| Used correctly and consistently | HIV transmission risk reduction |
|---|---|
| Male latex condom | ~85–98% reduction |
| Condom + PEP (if still on course) | Extremely high protection |
| Condom alone (after completing PEP, before final test) | Good but not 100% |
Condom use is the right thing to do and you must continue it throughout the testing window period (up to 6 months post-exposure). Combined with PEP, it gives very strong protection. Make sure technique is correct — most failures are due to incorrect use, not the condom itself.
I have doubt
If my pennis touch her vaginal during intercourse and she doesn't release fluid
| Factor | Assessment |
|---|---|
| External skin-to-skin contact only | Very low risk |
| No vaginal fluid contact | Significantly reduces risk |
| Her HIV status unknown | Risk depends on this |
| No penetration | Lower risk than penetrative sex |
| With condom | Risk reduced further |
| Act (without condom, HIV+ partner) | Estimated risk per exposure |
|---|---|
| Receptive anal intercourse | ~1.4% (highest) |
| Insertive anal intercourse | ~0.11% |
| Receptive vaginal intercourse | ~0.08% |
| Insertive vaginal intercourse | ~0.04% |
| External genital contact only | Very low — <0.01% |
| Oral sex | Extremely low |
| Touching/skin contact, no fluid | Effectively zero |
External penile-vaginal contact with no visible fluid exchange carries very low to negligible HIV transmission risk. The main risk in vaginal intercourse comes from mucosal exposure to vaginal secretions and semen during penetration.
New chapter
I have exam excit osce tomorrow
Which subject is your OSCE in? · How can I help you prepare?
First ,injection
Z-track technique — pull skin 2–3 cm laterally before injecting, release after withdrawing. Prevents drug tracking into subcutaneous tissue.
| Feature | IM | SC | ID | IV |
|---|---|---|---|---|
| Angle | 90° | 45°/90° | 5–15° | 15–30° |
| Needle size | 21–23G | 25–27G | 26–27G | 18–22G |
| Skin technique | Stretch / Z-track | Pinch | Stretch | Anchor below |
| Aspirate? | Yes | No (heparin/insulin) | No | Check flashback |
| Volume | Up to 5 ml | Max 1.5 ml | 0.1 ml | Variable |
| Sign of correct technique | None | None | Wheal/bleb | Flashback |
Catheterisation
| Patient | Size |
|---|---|
| Adult male | 14 Fr (standard) |
| Adult female | 12–14 Fr |
| Child | 6–10 Fr |
| Haematuria / clots | 18–22 Fr (3-way catheter) |
| Step | Female |
|---|---|
| Position | Supine, knees flexed apart (frog-leg position) |
| Cleaning | Labia majora → minora → urethral meatus, top to bottom, one stroke each |
| Catheter length | Insert only 5–7 cm (shorter urethra) |
| Lignocaine gel | Apply to catheter tip only (smaller volume) |
| Landmarks | Locate urethral meatus correctly — between clitoris (above) and vaginal opening (below) |
| Common error | Accidentally inserting into vagina — leave it in as a landmark, use new catheter |
| Detail | |
|---|---|
| Volume | 10 ml sterile water (not saline — crystallises in valve) |
| If patient feels pain on inflation | Balloon may be in urethra — deflate immediately, advance further |
| Never inflate before urine flows | Urethral rupture risk |
| Always advance to bifurcation first | Prevents inflation in urethra |
| Complication | Cause / Note |
|---|---|
| Paraphimosis | Foreskin not replaced after procedure — tight ring, vascular compromise |
| UTI / CAUTI | Most common complication overall — aseptic technique prevents this |
| Urethral trauma | Forced insertion, balloon inflated in urethra |
| False passage | Repeated forceful attempts in stricture |
| Haematuria | Mucosal trauma |
| Bypassing | Catheter too small or blocked |
| Bladder spasm | Common post-catheter — antispasmodics (oxybutynin) |
Foley cathere
Tip (drainage holes)
|
BALLOON (inflated inside bladder)
|
Catheter shaft
|
Y-junction (bifurcation)
/ \
Drainage Balloon
port port
(to bag) (10 ml water)
| Type | Lumens | Use |
|---|---|---|
| 2-way Foley | 2 | Standard drainage |
| 3-way Foley | 3 | Continuous bladder irrigation (haematuria, post-TURP) |
| Coude tip | 2 | Enlarged prostate, urethral stricture (curved tip) |
| Silicone Foley | 2 | Long-term use (>4 weeks), latex allergy |
| Latex Foley | 2 | Short-term use |
| Material | Duration | Note |
|---|---|---|
| Latex | Short-term (<2 weeks) | Cheap, flexible |
| Latex + silicone coated | Medium (2–4 weeks) | Reduces encrustation |
| 100% Silicone | Long-term (>4 weeks) | Preferred for long-term, latex allergy |
| Hydrogel coated | Long-term | Most biocompatible, least infection risk |
1 French = 0.33 mm diameter
| Patient | Size | Colour code |
|---|---|---|
| Adult male (standard) | 14 Fr | Green |
| Adult female (standard) | 12–14 Fr | Green |
| Haematuria / clots | 18–22 Fr (3-way) | — |
| Child | 6–10 Fr | — |
| Post-urological surgery | As per surgeon | — |
Rule: Use the smallest size that drains adequately — larger sizes cause more urethral trauma and bypassing
| Situation | Volume |
|---|---|
| Standard adult | 10 ml sterile water |
| Paediatric | 3–5 ml |
| Post-TURP (haemostasis) | 30–50 ml (traction catheter) |
| Never use | Saline (crystallises in valve), air (burst risk) |
| Care point | Details |
|---|---|
| Meatal hygiene | Clean with soap and water twice daily |
| Bag position | Always below bladder level — gravity drainage |
| Bag never on floor | Infection risk |
| Closed system | Never disconnect bag unnecessarily |
| Change frequency | Latex: every 2 weeks | Silicone: every 4–6 weeks |
| Fluid intake | Encourage 2–3 L/day — flushes bladder, prevents blockage |
| Avoid kinking | Secure to inner thigh — prevents traction and kinking |
| Problem | Cause | Action |
|---|---|---|
| No urine draining | Blocked, kinked, misplaced | Check for kinks → bladder washout → reposition → change catheter |
| Bypassing (leaking around catheter) | Catheter too small, bladder spasm, blockage | Check size, treat spasm (oxybutynin), clear blockage |
| Balloon won't deflate | Valve blocked | Try different syringe, cut inflation port as last resort, urology referral |
| Haematuria | Trauma, UTI, underlying pathology | Check cause, increase fluids, 3-way if heavy |
| CAUTI | Break in aseptic technique | Urine C&S, appropriate antibiotics, consider removal |
| Paraphimosis | Foreskin not replaced after insertion | Immediate manual reduction, ice, urology if fails |
| Point | Detail |
|---|---|
| Advance to bifurcation | Before inflating balloon |
| Balloon volume | 10 ml sterile water |
| Confirm position | Urine flow + gentle traction |
| Replace foreskin | Always — paraphimosis prevention |
| Bag position | Below bladder, never on floor |
| First void after removal | Within 6–8 hours |
| Long-term material | Silicone, not latex |
| Largest size for clots | 3-way 18–22 Fr |
"Foley = self-retaining 2-way catheter with 10 ml balloon, inserted to bifurcation, confirmed by urine flow, secured by gentle traction, bag always below bladder, foreskin always replaced."
Ryle tube
| Category | Examples |
|---|---|
| Feeding | Unconscious patient, dysphagia, facial trauma, neurological disease |
| Gastric decompression | Bowel obstruction, post-surgery, paralytic ileus |
| Drug administration | When oral route not possible |
| Gastric lavage | Poisoning/overdose |
| Gastric aspiration | Diagnosis (bile, blood), pre-surgery |
| Gastric analysis | Acid secretion studies |
| Absolute | Relative |
|---|---|
| Basal skull fracture (risk of intracranial placement) | Coagulation disorders |
| Severe maxillofacial trauma | Oesophageal varices |
| Oesophageal obstruction / perforation | Recent oesophageal surgery |
| Choanal atresia | Uncooperative patient |
⚠️ Basal skull fracture = absolute contraindication — OSCE favourite. Signs: raccoon eyes, Battle's sign, CSF rhinorrhoea/otorrhoea, haemotympanum. Use oral gastric tube (OGT) instead.
| Patient | Size |
|---|---|
| Adult | 14–16 Fr |
| Child | 8–12 Fr |
| Neonate | 5–6 Fr |
| Gastric lavage (adult) | 36–40 Fr (large bore Ewald tube) |
N = Nose tip
E = Earlobe
X = Xiphisternum
Typical length in adults: 45–55 cm (mark with tape before insertion)
⚠️ CXR is the GOLD STANDARD for confirmation before feeding — mandatory in unconscious patients
| Method | Reliability | When to use |
|---|---|---|
| pH of aspirate ≤5.5 | ✅ Good | Routine, preferred bedside method |
| CXR | ✅✅ Gold standard | Unconscious, before first feed, any doubt |
| Auscultation (whoosh test) | ⚠️ Unreliable alone | OSCE demo only — not sufficient alone in practice |
| Submerge in water | ❌ Unreliable | Outdated — do not use |
| CO2 detector | ✅ Good | Confirms tracheal vs oesophageal placement |
Examiner key point: "Whoosh test alone is NOT sufficient to confirm position before feeding."
| pH | Interpretation |
|---|---|
| ≤5.5 | Gastric — safe to feed |
| 5.5–6.0 | Borderline — confirm with CXR |
| >6.0 | Respiratory or oesophageal — do NOT feed, reposition |
| Unable to aspirate | Reposition tube, try again |
| Complication | Details |
|---|---|
| Pulmonary aspiration | Tube in bronchus — most dangerous. Always confirm position. |
| Intracranial placement | In basal skull fracture — always check for contraindications first |
| Oesophageal perforation | Forced insertion |
| Epistaxis | Nasal mucosal trauma |
| Sinusitis | Long-term NGT — change nostril |
| Pressure necrosis | Nostril — secure correctly, avoid tension |
| Aspiration pneumonia | If feeding without confirming position |
| Tube coiling in pharynx | Visible on CXR — reinsert |
| Point | Detail |
|---|---|
| Head position during feeding | 30–45° elevated — reduces aspiration |
| Check residual volume before each feed | >200–250 ml → hold feed, reassess |
| Flush before and after each feed | 20–30 ml water — prevents blockage |
| Change tube | Every 2–4 weeks (latex), 4–6 weeks (polyurethane) |
| Alternate nostrils | On each change |
Aspirate → pH ≤5.5. If doubt → CXR. Never feed on auscultation alone.
Basal skull fracture.
Stop immediately. Withdraw tube. Allow patient to recover. Check position before proceeding.
Flex neck forward, advance with each ventilator cycle or manually flex neck. Confirm with CXR before any feeding.
"Nose → Ear → Xiphoid = Length. pH ≤5.5 = Safe. CXR = Gold Standard. Skull fracture = Stop."
| Ryle's Tube | Foley Catheter | |
|---|---|---|
| Route | Nasal → Stomach | Urethra → Bladder |
| Confirm position | pH paper / CXR | Urine flow + traction |
| Secure with | Tape to nose | Balloon 10 ml water |
| Key complication | Pulmonary aspiration | Paraphimosis / CAUTI |
| Key contraindication | Basal skull fracture | Urethral injury |
Cpr
I have exam