Give classification, mechanism of action pathophysiology uses adr of asthma in advance pharmacology subject Mpharm Pharmacology sem 2 in PDF format
mkdir -p /home/daytona/workspace/asthma-pharmacology && ls /home/daytona/workspa…
~/asthma-pharmacology/generate_pdf.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm, mm
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
HRFlowable, PageBreak, KeepTogether
)
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus import ListFlowable, ListItem
OUTPUT = "/home/daytona/workspace/asthma-pharmacology/Asthma_Advanced_Pharmacology_MPharm.pdf"
doc = SimpleDocTemplate(
OUTPUT,
pagesize=A4,
rightMargin=2*cm, leftMargin=2*cm,
topMargin=2.5*cm, bottomMargin=2.5*cm,
title="Asthma – Advanced Pharmacology | M.Pharm Sem 2",
author="Orris Medical AI",
subject="Anti-Asthmatic Drugs – Classification, Mechanism, Pathophysiology, Uses & ADR"
)
styles = getSampleStyleSheet()
# Custom styles
cover_title = ParagraphStyle('CoverTitle', parent=styles['Title'],
fontSize=26, textColor=colors.HexColor('#0A2647'), spaceAfter=8,
fontName='Helvetica-Bold', alignment=TA_CENTER)
cover_sub = ParagraphStyle('CoverSub', parent=styles['Normal'],
fontSize=13, textColor=colors.HexColor('#144272'), spaceAfter=6,
fontName='Helvetica-BoldOblique', alignment=TA_CENTER)
cover_info = ParagraphStyle('CoverInfo', parent=styles['Normal'],
fontSize=11, textColor=colors.HexColor('#2C74B3'), spaceAfter=4,
fontName='Helvetica', alignment=TA_CENTER)
h1 = ParagraphStyle('H1', parent=styles['Heading1'],
fontSize=16, textColor=colors.white, spaceAfter=4, spaceBefore=14,
fontName='Helvetica-Bold', backColor=colors.HexColor('#0A2647'),
borderPad=6, leftIndent=-10, rightIndent=-10, alignment=TA_LEFT)
h2 = ParagraphStyle('H2', parent=styles['Heading2'],
fontSize=13, textColor=colors.HexColor('#0A2647'), spaceAfter=4, spaceBefore=10,
fontName='Helvetica-Bold', borderColor=colors.HexColor('#2C74B3'),
borderWidth=0, leftIndent=0)
h3 = ParagraphStyle('H3', parent=styles['Heading3'],
fontSize=11, textColor=colors.HexColor('#144272'), spaceAfter=3, spaceBefore=7,
fontName='Helvetica-BoldOblique')
body = ParagraphStyle('Body', parent=styles['Normal'],
fontSize=10, textColor=colors.HexColor('#1a1a1a'), spaceAfter=5,
fontName='Helvetica', leading=15, alignment=TA_JUSTIFY)
bullet = ParagraphStyle('Bullet', parent=styles['Normal'],
fontSize=10, textColor=colors.HexColor('#1a1a1a'), spaceAfter=3,
fontName='Helvetica', leading=14, leftIndent=15, bulletIndent=5)
bold_label = ParagraphStyle('BoldLabel', parent=styles['Normal'],
fontSize=10, textColor=colors.HexColor('#0A2647'), spaceAfter=2,
fontName='Helvetica-Bold', leading=14)
note = ParagraphStyle('Note', parent=styles['Normal'],
fontSize=9, textColor=colors.HexColor('#555555'), spaceAfter=3,
fontName='Helvetica-Oblique', leading=13, leftIndent=10)
def h1_para(text):
return Paragraph(f" {text}", h1)
def h2_para(text):
return [HRFlowable(width='100%', thickness=2, color=colors.HexColor('#2C74B3'), spaceAfter=2),
Paragraph(text, h2)]
def h3_para(text):
return Paragraph(text, h3)
def bp(text):
return Paragraph(f"• {text}", bullet)
def body_p(text):
return Paragraph(text, body)
def sp(n=6):
return Spacer(1, n)
story = []
# ─── COVER PAGE ─────────────────────────────────────────────────────────────
story.append(Spacer(1, 3*cm))
story.append(Paragraph("ADVANCED PHARMACOLOGY", cover_sub))
story.append(Spacer(1, 0.4*cm))
story.append(Paragraph("ASTHMA", cover_title))
story.append(Spacer(1, 0.3*cm))
# coloured box
box_data = [[Paragraph(
"<font color='white'><b>Classification | Pathophysiology | Mechanism of Action<br/>"
"Therapeutic Uses | Adverse Drug Reactions</b></font>",
ParagraphStyle('box', parent=styles['Normal'], fontSize=12,
alignment=TA_CENTER, leading=20))]]
box_table = Table(box_data, colWidths=[15*cm])
box_table.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), colors.HexColor('#144272')),
('INNERGRID', (0,0), (-1,-1), 0.5, colors.white),
('BOX', (0,0), (-1,-1), 1, colors.HexColor('#0A2647')),
('TOPPADDING', (0,0), (-1,-1), 14),
('BOTTOMPADDING', (0,0), (-1,-1), 14),
('LEFTPADDING', (0,0), (-1,-1), 18),
('RIGHTPADDING', (0,0), (-1,-1), 18),
('ALIGN', (0,0), (-1,-1), 'CENTER'),
('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(box_table)
story.append(Spacer(1, 1.5*cm))
story.append(Paragraph("M.Pharm Pharmacology", cover_info))
story.append(Paragraph("Semester II | Advanced Pharmacology", cover_info))
story.append(Spacer(1, 0.5*cm))
story.append(Paragraph("Compiled from: Katzung's Basic & Clinical Pharmacology (16e) •<br/>"
"Murray & Nadel's Textbook of Respiratory Medicine •<br/>"
"Lippincott Illustrated Reviews: Pharmacology •<br/>"
"Goldman-Cecil Medicine • Morgan & Mikhail's Clinical Anaesthesiology",
ParagraphStyle('ref', parent=styles['Normal'], fontSize=9,
textColor=colors.HexColor('#666666'), alignment=TA_CENTER, leading=14)))
story.append(Spacer(1, 2*cm))
story.append(Paragraph("Prepared by Orris Medical AI | July 2026",
ParagraphStyle('footer', parent=styles['Normal'], fontSize=9,
textColor=colors.HexColor('#aaaaaa'), alignment=TA_CENTER)))
story.append(PageBreak())
# ─── SECTION 1: DEFINITION & OVERVIEW ───────────────────────────────────────
story.append(h1_para("1. DEFINITION & OVERVIEW OF ASTHMA"))
story.append(sp(8))
story.append(body_p(
"Asthma is a chronic inflammatory disorder of the airways characterised by variable and "
"recurring symptoms, airflow obstruction, bronchial hyperresponsiveness, and an underlying "
"inflammation. The airway obstruction is often reversible, either spontaneously or with "
"treatment. Although bronchospasm is a component of the reversible airway obstruction, "
"current clinical guidelines emphasise the <b>inflammatory pathophysiology</b> of asthma "
"(NHLBI/GINA 2023). The clinician must treat and prevent the inflammation that leads to "
"bronchoconstriction rather than merely treating the bronchoconstriction itself."
))
story.append(sp())
story.append(body_p(
"The terms <i>extrinsic (allergic) asthma</i> (attacks related to environmental exposures) and "
"<i>intrinsic (idiosyncratic) asthma</i> (attacks without obvious provocation) were used historically, "
"but these classifications are imperfect because many patients show features of both forms. "
"Modern classification focuses on phenotypes, endotypes, and severity-based step therapy."
))
story.append(sp(12))
# ─── SECTION 2: CLASSIFICATION ───────────────────────────────────────────────
story.append(h1_para("2. CLASSIFICATION OF ASTHMA"))
story.append(sp(8))
story.extend(h2_para("2.1 Traditional Classification"))
story.append(sp(4))
trad_data = [
[Paragraph("<b>Type</b>", bold_label), Paragraph("<b>Features</b>", bold_label)],
[Paragraph("Extrinsic (Allergic/Atopic)", body),
Paragraph("Triggered by allergens (pollen, dust mites, animal dander). Elevated IgE. "
"Positive skin prick test. Onset in childhood. Th2-driven eosinophilic inflammation.", body)],
[Paragraph("Intrinsic (Non-allergic/Non-atopic)", body),
Paragraph("No identifiable allergen. Normal IgE. Adult onset. Triggered by infections, "
"cold air, exercise, stress, aspirin/NSAIDs.", body)],
[Paragraph("Mixed Type", body),
Paragraph("Features of both extrinsic and intrinsic asthma. Most common in clinical practice.", body)],
[Paragraph("Occupational Asthma", body),
Paragraph("Caused by workplace sensitizers (isocyanates, flour, latex). IgE-dependent or "
"IgE-independent mechanisms. Reversible on removal from exposure.", body)],
[Paragraph("Exercise-Induced Bronchoconstriction (EIB)", body),
Paragraph("Triggered by physical exertion; evaporative heat/water loss from airways. "
"Post-exercise onset. Often a component of allergic asthma.", body)],
[Paragraph("Aspirin-Exacerbated Respiratory Disease (AERD)", body),
Paragraph("COX-1 inhibition shifts arachidonic acid to lipoxygenase pathway → excess "
"cysteinyl leukotrienes. Triad: asthma, nasal polyps, aspirin sensitivity.", body)],
]
trad_table = Table(trad_data, colWidths=[5*cm, 10.5*cm])
trad_table.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#2C74B3')),
('TEXTCOLOR', (0,0), (-1,0), colors.white),
('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#EBF5FB'), colors.white]),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#AABCCC')),
('TOPPADDING', (0,0), (-1,-1), 6),
('BOTTOMPADDING', (0,0), (-1,-1), 6),
('LEFTPADDING', (0,0), (-1,-1), 8),
('VALIGN', (0,0), (-1,-1), 'TOP'),
]))
story.append(trad_table)
story.append(sp(10))
story.extend(h2_para("2.2 GINA Severity-Based Classification (Step Therapy)"))
story.append(sp(4))
gina_data = [
[Paragraph("<b>GINA Severity</b>", bold_label), Paragraph("<b>Definition</b>", bold_label),
Paragraph("<b>Step</b>", bold_label)],
[Paragraph("Mild Asthma", body), Paragraph("Well-controlled with Step 1 or Step 2 treatment", body),
Paragraph("Step 1–2", body)],
[Paragraph("Moderate Asthma", body), Paragraph("Well-controlled with Step 3 treatment", body),
Paragraph("Step 3", body)],
[Paragraph("Severe Asthma", body),
Paragraph("Requires Step 4 or Step 5 to prevent being uncontrolled, or remains uncontrolled despite this therapy", body),
Paragraph("Step 4–5", body)],
]
gina_table = Table(gina_data, colWidths=[4*cm, 8.5*cm, 3*cm])
gina_table.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#144272')),
('TEXTCOLOR', (0,0), (-1,0), colors.white),
('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#EBF5FB'), colors.white]),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#AABCCC')),
('TOPPADDING', (0,0), (-1,-1), 6),
('BOTTOMPADDING', (0,0), (-1,-1), 6),
('LEFTPADDING', (0,0), (-1,-1), 8),
('VALIGN', (0,0), (-1,-1), 'TOP'),
]))
story.append(gina_table)
story.append(sp(6))
story.append(Paragraph(
"GINA Symptom Control Assessment: Well-controlled = 0 of 4 criteria; Partly controlled = 1–2; "
"Uncontrolled = 3–4. Criteria: daytime symptoms >2×/week, night waking, reliever use >2×/week, "
"any activity limitation.", note))
story.append(sp(10))
story.extend(h2_para("2.3 Phenotype & Endotype Classification (Modern)"))
story.append(sp(4))
story.append(body_p(
"Modern asthma management classifies patients by <b>T2-high</b> vs <b>T2-low</b> endotypes:"
))
story.append(bp("<b>T2-high (Type 2 inflammation):</b> IL-4, IL-5, IL-13-driven eosinophilic inflammation. "
"Subtypes: early-onset allergic, aspirin-sensitive, late-onset eosinophilic, "
"exercise-induced, exacerbation-prone asthma. Responds to ICS, anti-IL-5 biologics, omalizumab."))
story.append(bp("<b>T2-low:</b> Obesity-related late-onset asthma, paucigranulocytic asthma (minimal inflammation), "
"neutrophilic asthma (smoking-related). Poor ICS responders. May respond to tiotropium and macrolides."))
story.append(sp(6))
# Biomarker table
bm_data = [
[Paragraph("<b>Biomarker</b>", bold_label), Paragraph("<b>Phenotype</b>", bold_label),
Paragraph("<b>Predicts Response To</b>", bold_label)],
[Paragraph("Exhaled NO >50 ppb", body), Paragraph("T2-high", body), Paragraph("Inhaled corticosteroids (ICS)", body)],
[Paragraph("Sputum eosinophils >3%", body), Paragraph("T2-high", body), Paragraph("ICS", body)],
[Paragraph("Blood eosinophils >300/µL", body), Paragraph("T2-high", body), Paragraph("Anti-IL-5 (mepolizumab, reslizumab)", body)],
[Paragraph("Total IgE >30 IU/mL", body), Paragraph("Allergic/T2", body), Paragraph("Omalizumab", body)],
[Paragraph("Low FeNO + low eosinophils", body), Paragraph("T2-low", body), Paragraph("Tiotropium, macrolides", body)],
]
bm_table = Table(bm_data, colWidths=[4.5*cm, 3.5*cm, 7.5*cm])
bm_table.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#0A2647')),
('TEXTCOLOR', (0,0), (-1,0), colors.white),
('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#EBF5FB'), colors.white]),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#AABCCC')),
('TOPPADDING', (0,0), (-1,-1), 5),
('BOTTOMPADDING', (0,0), (-1,-1), 5),
('LEFTPADDING', (0,0), (-1,-1), 7),
('VALIGN', (0,0), (-1,-1), 'TOP'),
]))
story.append(bm_table)
story.append(PageBreak())
# ─── SECTION 3: PATHOPHYSIOLOGY ──────────────────────────────────────────────
story.append(h1_para("3. PATHOPHYSIOLOGY OF ASTHMA"))
story.append(sp(8))
story.extend(h2_para("3.1 Trigger Phase (Sensitisation)"))
story.append(sp(4))
story.append(body_p(
"Inhaled allergens are processed by <b>antigen-presenting cells (APCs/dendritic cells)</b> and "
"presented to naïve T-helper cells (Th0). In atopic individuals, the immune response is skewed "
"toward <b>Th2 differentiation</b>, driven by cytokines IL-4 and IL-13. Th2 cells promote B-cell "
"class switching to produce <b>IgE antibodies</b>, which bind to high-affinity Fc epsilon RI (FceRI) "
"receptors on mast cells and basophils."
))
story.append(sp())
story.extend(h2_para("3.2 Early-Phase Reaction (Immediate Hypersensitivity, 0–60 min)"))
story.append(sp(4))
story.append(body_p(
"On re-exposure, allergen cross-links IgE on mast cell surface → <b>mast cell degranulation</b>. "
"The following mediators are released:"
))
story.append(bp("<b>Histamine:</b> Bronchoconstriction, mucosal oedema, increased secretions"))
story.append(bp("<b>Leukotrienes LTC4, LTD4, LTE4</b> (slow-reacting substances of anaphylaxis – SRS-A): "
"Potent bronchospasm, mucus hypersecretion, eosinophil chemotaxis"))
story.append(bp("<b>Prostaglandin D2 (PGD2):</b> Bronchoconstriction, vasodilation"))
story.append(bp("<b>Thromboxane A2:</b> Bronchoconstriction"))
story.append(bp("<b>Bradykinin:</b> Cough, bronchoconstriction, vasodilation"))
story.append(bp("<b>Platelet-activating factor (PAF):</b> Bronchoconstriction, eosinophil recruitment"))
story.append(bp("<b>Tryptase, chymase:</b> Structural remodelling"))
story.append(sp(6))
story.append(body_p(
"Reflex vagal (parasympathetic) activation via airway afferents also contributes: stimulation → "
"↑ intracellular cGMP → smooth muscle contraction. Diurnal variation in airway resistance "
"(peak resistance ~6 AM) reflects autonomic tone."
))
story.append(sp())
story.extend(h2_para("3.3 Late-Phase Reaction (4–12 hours after exposure)"))
story.append(sp(4))
story.append(body_p(
"Cytokines released during the early phase recruit <b>eosinophils, neutrophils, T-lymphocytes, "
"and basophils</b> to the airway mucosa. Key late-phase mediators:"
))
story.append(bp("<b>IL-5:</b> Eosinophil differentiation, activation, and survival"))
story.append(bp("<b>IL-4 and IL-13:</b> Goblet cell metaplasia, mucus hypersecretion, IgE class switching"))
story.append(bp("<b>Eosinophil cationic protein (ECP) and major basic protein (MBP):</b> Epithelial damage, "
"airway hyperresponsiveness (AHR)"))
story.append(bp("<b>Eotaxin:</b> Eosinophil chemotaxis to airways"))
story.append(sp())
story.extend(h2_para("3.4 Airway Hyperresponsiveness (AHR)"))
story.append(sp(4))
story.append(body_p(
"Persistent inflammation leads to non-specific AHR – exaggerated bronchoconstriction to "
"stimuli that are harmless in normal individuals (cold air, exercise, irritants, methacholine). "
"Mechanisms: sensitised nociceptors, subepithelial nerve proliferation, smooth muscle hypertrophy."
))
story.append(sp())
story.extend(h2_para("3.5 Airway Remodelling (Chronic Asthma)"))
story.append(sp(4))
story.append(body_p(
"Sustained inflammation triggers structural changes leading to partially irreversible airflow obstruction:"
))
story.append(bp("Subepithelial fibrosis (collagen deposition under basement membrane)"))
story.append(bp("Goblet cell hyperplasia and mucus gland hypertrophy → mucus plugging"))
story.append(bp("Airway smooth muscle hypertrophy and hyperplasia"))
story.append(bp("Angiogenesis and increased vascular permeability"))
story.append(bp("Loss of cilia and epithelial integrity"))
story.append(sp())
story.extend(h2_para("3.6 Pulmonary Consequences During an Acute Attack"))
story.append(sp(4))
story.append(body_p(
"Bronchoconstriction, mucosal oedema, and secretions increase resistance at all airway levels. "
"TLC, RV, and FRC all increase (RV and FRC may increase by >400% and >100%, respectively). "
"Expiratory flow rates are reduced throughout a forced exhalation. V/Q mismatch leads to "
"<b>hypoxaemia</b>. Tachypnoea causes <b>hypocapnia</b> initially. A normal or elevated PaCO2 "
"during an acute attack is a danger sign indicating impending <b>respiratory failure</b>."
))
story.append(sp(8))
# Summary box
summ_data = [[Paragraph(
"<font color='white'><b>Pathophysiology Summary:</b> Allergen → IgE-mediated mast cell "
"degranulation → early phase (histamine, leukotrienes, PGD2) → immediate bronchoconstriction "
"→ late phase (eosinophils, Th2 cytokines IL-4/5/13) → sustained airway inflammation & AHR "
"→ chronic remodelling.</font>",
ParagraphStyle('summ', parent=styles['Normal'], fontSize=9.5,
alignment=TA_LEFT, leading=16, leftIndent=8))]]
summ_table = Table(summ_data, colWidths=[15.5*cm])
summ_table.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), colors.HexColor('#144272')),
('BOX', (0,0), (-1,-1), 1, colors.HexColor('#0A2647')),
('TOPPADDING', (0,0), (-1,-1), 10),
('BOTTOMPADDING', (0,0), (-1,-1), 10),
('LEFTPADDING', (0,0), (-1,-1), 12),
]))
story.append(summ_table)
story.append(PageBreak())
# ─── SECTION 4: CLASSIFICATION OF ANTI-ASTHMATIC DRUGS ──────────────────────
story.append(h1_para("4. CLASSIFICATION OF ANTI-ASTHMATIC DRUGS"))
story.append(sp(8))
story.append(body_p(
"Anti-asthmatic drugs are broadly divided into <b>Relievers (Bronchodilators)</b> for acute "
"symptoms and <b>Controllers (Anti-inflammatory / Preventers)</b> for long-term management."
))
story.append(sp(6))
drug_class_data = [
[Paragraph("<b>Class</b>", bold_label), Paragraph("<b>Examples</b>", bold_label),
Paragraph("<b>Role</b>", bold_label)],
# BRONCHODILATORS
[Paragraph("β2-Adrenoceptor Agonists\n(SABAs – Short-acting)", body),
Paragraph("Salbutamol (Albuterol), Terbutaline, Levalbuterol", body),
Paragraph("Reliever – acute bronchospasm", body)],
[Paragraph("β2-Adrenoceptor Agonists\n(LABAs – Long-acting)", body),
Paragraph("Salmeterol, Formoterol, Indacaterol", body),
Paragraph("Controller – add-on to ICS", body)],
[Paragraph("Methylxanthines", body),
Paragraph("Theophylline, Aminophylline, Doxofylline", body),
Paragraph("Reliever/Controller – oral bronchodilator", body)],
[Paragraph("Anticholinergics (SAMA)", body),
Paragraph("Ipratropium bromide", body),
Paragraph("Reliever – add-on in acute asthma", body)],
[Paragraph("Anticholinergics (LAMA)", body),
Paragraph("Tiotropium, Glycopyrrolate", body),
Paragraph("Controller – severe asthma add-on", body)],
# ANTI-INFLAMMATORY / CONTROLLERS
[Paragraph("Inhaled Corticosteroids (ICS)", body),
Paragraph("Beclomethasone, Budesonide, Fluticasone, Mometasone, Ciclesonide", body),
Paragraph("Controller – first-line preventer", body)],
[Paragraph("Systemic Corticosteroids", body),
Paragraph("Prednisolone, Hydrocortisone, Dexamethasone", body),
Paragraph("Acute severe / Status asthmaticus", body)],
[Paragraph("Leukotriene Modifiers\n(5-LOX inhibitor)", body),
Paragraph("Zileuton", body),
Paragraph("Controller – alternative/add-on", body)],
[Paragraph("Leukotriene Receptor Antagonists\n(LTRAs)", body),
Paragraph("Montelukast, Zafirlukast", body),
Paragraph("Controller – mild persistent asthma", body)],
[Paragraph("Mast Cell Stabilisers", body),
Paragraph("Sodium Cromoglicate (Cromolyn), Nedocromil", body),
Paragraph("Preventive – mainly in children", body)],
# BIOLOGICS
[Paragraph("Anti-IgE Biologic", body),
Paragraph("Omalizumab", body),
Paragraph("Severe allergic asthma (Step 5)", body)],
[Paragraph("Anti-IL-5 Biologics", body),
Paragraph("Mepolizumab, Reslizumab, Benralizumab", body),
Paragraph("Severe eosinophilic asthma (Step 5)", body)],
[Paragraph("Anti-IL-4/13 Biologic", body),
Paragraph("Dupilumab", body),
Paragraph("Moderate-severe T2-high asthma", body)],
[Paragraph("Anti-TSLP Biologic", body),
Paragraph("Tezepelumab", body),
Paragraph("Severe uncontrolled asthma", body)],
]
drug_table = Table(drug_class_data, colWidths=[5*cm, 6.5*cm, 4*cm])
drug_table.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#0A2647')),
('TEXTCOLOR', (0,0), (-1,0), colors.white),
('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#EBF5FB'), colors.white]),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#AABCCC')),
('TOPPADDING', (0,0), (-1,-1), 5),
('BOTTOMPADDING', (0,0), (-1,-1), 5),
('LEFTPADDING', (0,0), (-1,-1), 7),
('VALIGN', (0,0), (-1,-1), 'TOP'),
# section headers
('BACKGROUND', (0,1), (-1,5), colors.HexColor('#E8F4FC')),
('BACKGROUND', (0,6), (-1,9), colors.HexColor('#FEF9E7')),
('BACKGROUND', (0,10), (-1,10), colors.HexColor('#E8F4FC')),
('BACKGROUND', (0,11), (-1,14), colors.HexColor('#EAF7EA')),
]))
story.append(drug_table)
story.append(PageBreak())
# ─── SECTION 5: MECHANISM OF ACTION ──────────────────────────────────────────
story.append(h1_para("5. MECHANISM OF ACTION"))
story.append(sp(8))
# 5.1 β2 Agonists
story.extend(h2_para("5.1 β2-Adrenoceptor Agonists (SABAs and LABAs)"))
story.append(sp(4))
story.append(body_p(
"<b>Mechanism:</b> Selective stimulation of β2-adrenoceptors on bronchial smooth muscle → "
"activation of adenylate cyclase → ↑ intracellular cAMP → activation of protein kinase A (PKA) → "
"phosphorylation of myosin light chain kinase (MLCK) → smooth muscle relaxation (bronchodilation). "
"cAMP also inhibits mast cell mediator release and reduces microvascular leakage."
))
story.append(sp(3))
moa_beta_data = [
[Paragraph("<b>Agent</b>", bold_label), Paragraph("<b>Selectivity</b>", bold_label),
Paragraph("<b>Onset</b>", bold_label), Paragraph("<b>Duration</b>", bold_label),
Paragraph("<b>Route</b>", bold_label)],
[Paragraph("Salbutamol (Albuterol)", body), Paragraph("β2-selective", body),
Paragraph("5–15 min", body), Paragraph("4–6 h", body), Paragraph("Inhaled/IV/oral", body)],
[Paragraph("Levalbuterol", body), Paragraph("β2-selective (R-isomer)", body),
Paragraph("~5 min", body), Paragraph("6–8 h", body), Paragraph("Inhaled", body)],
[Paragraph("Terbutaline", body), Paragraph("β2-selective", body),
Paragraph("5–30 min", body), Paragraph("4–6 h", body), Paragraph("Inhaled/SC/oral", body)],
[Paragraph("Salmeterol", body), Paragraph("β2-selective LABA", body),
Paragraph("30–60 min", body), Paragraph("12 h", body), Paragraph("Inhaled", body)],
[Paragraph("Formoterol", body), Paragraph("β2-selective LABA", body),
Paragraph("1–3 min", body), Paragraph("12 h", body), Paragraph("Inhaled", body)],
[Paragraph("Indacaterol", body), Paragraph("β2-selective ultra-LABA", body),
Paragraph("5 min", body), Paragraph("24 h", body), Paragraph("Inhaled", body)],
]
beta_table = Table(moa_beta_data, colWidths=[4*cm, 3.5*cm, 2.2*cm, 2.3*cm, 3.5*cm])
beta_table.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#2C74B3')),
('TEXTCOLOR', (0,0), (-1,0), colors.white),
('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#EBF5FB'), colors.white]),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#AABCCC')),
('TOPPADDING', (0,0), (-1,-1), 5),
('BOTTOMPADDING', (0,0), (-1,-1), 5),
('LEFTPADDING', (0,0), (-1,-1), 6),
('VALIGN', (0,0), (-1,-1), 'TOP'),
]))
story.append(beta_table)
story.append(Paragraph(
"Note: LABAs should NEVER be used as monotherapy in asthma – always combined with ICS due to "
"risk of fatal exacerbations (FDA Black Box Warning).", note))
story.append(sp(10))
# 5.2 Methylxanthines
story.extend(h2_para("5.2 Methylxanthines (Theophylline, Aminophylline)"))
story.append(sp(4))
story.append(body_p(
"<b>Mechanism (multiple mechanisms):</b>"
))
story.append(bp("<b>Phosphodiesterase (PDE) inhibition:</b> Inhibits PDE III and IV → prevents degradation "
"of cAMP and cGMP → bronchial smooth muscle relaxation. At therapeutic concentrations this "
"is the primary mechanism."))
story.append(bp("<b>Adenosine receptor antagonism:</b> Blocks A1 and A2 receptors → prevents adenosine-mediated "
"bronchoconstriction and mast cell degranulation."))
story.append(bp("<b>Anti-inflammatory effects (low dose):</b> Activates histone deacetylase 2 (HDAC2) → "
"suppression of inflammatory gene transcription. This occurs at sub-bronchodilator "
"concentrations (~5–10 mg/L)."))
story.append(bp("<b>Enhanced mucociliary clearance</b> and stimulation of diaphragmatic contractility."))
story.append(sp(4))
story.append(body_p(
"<b>Theophylline:</b> Narrow therapeutic window (therapeutic plasma concentration: 5–15 µg/mL; "
"previously 10–20 µg/mL). Metabolised by CYP1A2 (numerous drug interactions). "
"<b>Aminophylline</b> = theophylline + ethylenediamine; 80% theophylline by weight; given IV."
))
story.append(sp(10))
# 5.3 Anticholinergics
story.extend(h2_para("5.3 Anticholinergics (Ipratropium, Tiotropium)"))
story.append(sp(4))
story.append(body_p(
"<b>Mechanism:</b> Competitive antagonism at muscarinic (M1 and M3) receptors in bronchial "
"smooth muscle and submucosal glands → blockade of vagally mediated bronchoconstriction → "
"↓ intracellular cGMP → smooth muscle relaxation and ↓ mucus secretion."
))
story.append(bp("<b>Ipratropium (SAMA):</b> Non-selective antimuscarinic; onset 15–30 min; "
"duration 4–6 h. Add-on reliever in acute severe asthma."))
story.append(bp("<b>Tiotropium (LAMA):</b> Selective M3 receptor dissociation; duration ~24 h; "
"once-daily inhaled. Approved as add-on for uncontrolled moderate-severe asthma "
"(Step 4–5 GINA)."))
story.append(sp(10))
# 5.4 ICS
story.extend(h2_para("5.4 Inhaled Corticosteroids (ICS)"))
story.append(sp(4))
story.append(body_p(
"<b>Mechanism:</b> Lipophilic steroids diffuse into cells → bind cytoplasmic glucocorticoid "
"receptor (GR) → GR-drug complex translocates to nucleus → binds glucocorticoid response "
"elements (GREs) on DNA → <b>transactivation</b> of anti-inflammatory genes "
"(annexin-1/lipocortin-1, IL-10, IκBα) and <b>transrepression</b> of pro-inflammatory genes "
"(NF-κB, AP-1) → reduction in Th2 cytokines (IL-4, IL-5, IL-13), eosinophil survival, "
"mast cell mediator release, mucus production, and vascular permeability."
))
story.append(sp(3))
story.append(body_p(
"ICS also increase β2-receptor expression (upregulation), enhancing SABA responsiveness. "
"They are the most effective long-term controllers of asthma. Examples: <b>Beclomethasone, "
"Budesonide, Fluticasone propionate/furoate, Mometasone, Ciclesonide</b>."
))
story.append(sp(10))
# 5.5 Leukotriene modifiers
story.extend(h2_para("5.5 Leukotriene Pathway Modifiers"))
story.append(sp(4))
story.append(body_p(
"Leukotrienes arise from arachidonic acid via the <b>5-lipoxygenase (5-LOX)</b> pathway. "
"LTB4 is a neutrophil chemoattractant; LTC4, LTD4, LTE4 (cysteinyl leukotrienes / SRS-A) cause "
"bronchoconstriction, mucus secretion, mucosal oedema, and AHR."
))
story.append(bp("<b>Zileuton:</b> Inhibits 5-lipoxygenase enzyme → prevents leukotriene synthesis "
"(both LTB4 and cysteinyl LTs). Oral. Onset rapid. Hepatotoxic – monitor LFTs."))
story.append(bp("<b>Montelukast, Zafirlukast:</b> CysLT1 receptor antagonists → competitively block "
"LTD4 at its receptor on smooth muscle and secretory cells → bronchodilation, "
"↓ mucosal oedema and mucus secretion. Oral. Especially useful in aspirin-sensitive "
"asthma, allergic rhinitis comorbidity, EIB, paediatric asthma."))
story.append(sp(10))
# 5.6 Mast cell stabilisers
story.extend(h2_para("5.6 Mast Cell Stabilisers (Cromolyn, Nedocromil)"))
story.append(sp(4))
story.append(body_p(
"<b>Mechanism:</b> Inhibit degranulation of mast cells → prevent release of histamine, "
"leukotrienes, and other inflammatory mediators. No direct bronchodilator action. Inhibit both "
"antigen-induced and exercise-induced bronchoconstriction. Also reduce neuronal sensitisation "
"(nedocromil blocks irritant receptors). Used prophylactically before allergen exposure or exercise. "
"Largely supplanted by ICS in modern practice."
))
story.append(sp(10))
# 5.7 Biologics
story.extend(h2_para("5.7 Biologic Therapies (Targeted/Monoclonal Antibodies)"))
story.append(sp(4))
bio_data = [
[Paragraph("<b>Drug</b>", bold_label), Paragraph("<b>Target</b>", bold_label),
Paragraph("<b>Mechanism</b>", bold_label), Paragraph("<b>Indication</b>", bold_label)],
[Paragraph("Omalizumab", body), Paragraph("IgE (FcεRIα)", body),
Paragraph("Binds free IgE → prevents IgE binding to mast cells/basophils → blocks allergic cascade", body),
Paragraph("Severe persistent allergic asthma; IgE 30–1500 IU/mL", body)],
[Paragraph("Mepolizumab\nReslizumab", body), Paragraph("IL-5", body),
Paragraph("Anti-IL-5 antibody → inhibits eosinophil differentiation, maturation, recruitment, and survival", body),
Paragraph("Severe eosinophilic asthma; blood eos ≥300/µL", body)],
[Paragraph("Benralizumab", body), Paragraph("IL-5Rα", body),
Paragraph("Binds IL-5 receptor on eosinophils/basophils → ADCC-mediated eosinophil depletion", body),
Paragraph("Severe eosinophilic asthma; rapid eosinophil depletion", body)],
[Paragraph("Dupilumab", body), Paragraph("IL-4Rα\n(IL-4 & IL-13)", body),
Paragraph("Blocks shared IL-4/IL-13 receptor subunit → ↓ Th2 inflammation, IgE, mucus, AHR", body),
Paragraph("Moderate-severe T2-high asthma ± atopic dermatitis/CRSwNP", body)],
[Paragraph("Tezepelumab", body), Paragraph("TSLP", body),
Paragraph("Anti-TSLP antibody → blocks epithelial alarm signal → ↓ Th2, Th1, Th17, eosinophils, IgE", body),
Paragraph("Severe uncontrolled asthma (T2-high and T2-low)", body)],
]
bio_table = Table(bio_data, colWidths=[2.8*cm, 2.2*cm, 6*cm, 4.5*cm])
bio_table.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#0A2647')),
('TEXTCOLOR', (0,0), (-1,0), colors.white),
('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#EBF5FB'), colors.white]),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#AABCCC')),
('TOPPADDING', (0,0), (-1,-1), 5),
('BOTTOMPADDING', (0,0), (-1,-1), 5),
('LEFTPADDING', (0,0), (-1,-1), 6),
('VALIGN', (0,0), (-1,-1), 'TOP'),
]))
story.append(bio_table)
story.append(PageBreak())
# ─── SECTION 6: THERAPEUTIC USES ─────────────────────────────────────────────
story.append(h1_para("6. THERAPEUTIC USES"))
story.append(sp(8))
story.extend(h2_para("6.1 Stepwise Pharmacotherapy (GINA 2023 Steps 1–5)"))
story.append(sp(4))
step_data = [
[Paragraph("<b>GINA Step</b>", bold_label), Paragraph("<b>Severity</b>", bold_label),
Paragraph("<b>Preferred Controller</b>", bold_label), Paragraph("<b>Preferred Reliever</b>", bold_label)],
[Paragraph("Step 1", body), Paragraph("Intermittent/Mild", body),
Paragraph("No daily controller (or low-dose ICS)", body),
Paragraph("SABA (salbutamol) PRN", body)],
[Paragraph("Step 2", body), Paragraph("Mild Persistent", body),
Paragraph("Low-dose ICS (or LTRA)", body),
Paragraph("SABA PRN", body)],
[Paragraph("Step 3", body), Paragraph("Moderate", body),
Paragraph("Low-dose ICS + LABA (or medium-dose ICS)", body),
Paragraph("SABA PRN", body)],
[Paragraph("Step 4", body), Paragraph("Severe", body),
Paragraph("Medium/High-dose ICS + LABA; consider tiotropium add-on", body),
Paragraph("SABA PRN", body)],
[Paragraph("Step 5", body), Paragraph("Very Severe", body),
Paragraph("High-dose ICS + LABA + biologic (omalizumab/anti-IL-5/dupilumab/tezepelumab); "
"±oral corticosteroids", body),
Paragraph("SABA PRN", body)],
]
step_table = Table(step_data, colWidths=[2.2*cm, 3*cm, 6.3*cm, 4*cm])
step_table.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#144272')),
('TEXTCOLOR', (0,0), (-1,0), colors.white),
('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#EBF5FB'), colors.white]),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#AABCCC')),
('TOPPADDING', (0,0), (-1,-1), 6),
('BOTTOMPADDING', (0,0), (-1,-1), 6),
('LEFTPADDING', (0,0), (-1,-1), 7),
('VALIGN', (0,0), (-1,-1), 'TOP'),
]))
story.append(step_table)
story.append(sp(10))
story.extend(h2_para("6.2 Status Asthmaticus / Acute Severe Asthma"))
story.append(sp(4))
story.append(bp("Oxygen (target SpO2 94–98%)"))
story.append(bp("Nebulised salbutamol (2.5–5 mg every 20 min) or continuous nebulisation"))
story.append(bp("Ipratropium bromide (0.5 mg q 20 min × 3 doses; improves FEV1 by ~25%)"))
story.append(bp("IV/oral systemic corticosteroids (prednisolone 40–50 mg/day × 5–7 days)"))
story.append(bp("IV aminophylline (if inadequate response; loading dose 5 mg/kg over 20–30 min)"))
story.append(bp("IV magnesium sulphate (1.2–2 g IV over 20 min) – bronchodilation via Ca2+ channel blockade"))
story.append(bp("Heliox (helium-oxygen mixture) – reduces airway resistance"))
story.append(bp("Intubation and mechanical ventilation if PaCO2 rises or consciousness decreases"))
story.append(sp(10))
story.extend(h2_para("6.3 Special Uses of Individual Drug Classes"))
story.append(sp(4))
story.append(bp("<b>LTRAs (Montelukast):</b> Aspirin-exacerbated respiratory disease (AERD), exercise-induced bronchoconstriction, "
"allergic rhinitis comorbidity, paediatric asthma (approved >12 months)"))
story.append(bp("<b>Theophylline:</b> Low-income settings where inhaled therapy is not affordable; "
"severe refractory asthma at low doses for anti-inflammatory effect; apnoea of prematurity"))
story.append(bp("<b>Magnesium sulphate:</b> Acute severe asthma not responding to initial bronchodilators"))
story.append(bp("<b>Omalizumab:</b> Severe persistent IgE-mediated allergic asthma; chronic idiopathic urticaria"))
story.append(bp("<b>Anti-IL-5 biologics:</b> Severe eosinophilic asthma with recurrent exacerbations despite "
"high-dose ICS/LABA; eosinophilic granulomatosis with polyangiitis (mepolizumab)"))
story.append(bp("<b>Dupilumab:</b> Asthma + atopic dermatitis + chronic rhinosinusitis with nasal polyps (triple indication)"))
story.append(bp("<b>Tezepelumab:</b> Broadest biologic – effective across all inflammatory phenotypes including T2-low"))
story.append(PageBreak())
# ─── SECTION 7: ADVERSE DRUG REACTIONS ───────────────────────────────────────
story.append(h1_para("7. ADVERSE DRUG REACTIONS (ADR)"))
story.append(sp(8))
adr_data = [
[Paragraph("<b>Drug Class / Agent</b>", bold_label), Paragraph("<b>Adverse Effects</b>", bold_label),
Paragraph("<b>Notes</b>", bold_label)],
# β2 agonists
[Paragraph("β2-Agonists\n(SABAs/LABAs)", body),
Paragraph("• Tremor (skeletal muscle β2 stimulation)\n"
"• Tachycardia, palpitations (β1 spillover)\n"
"• Hypokalaemia (K+ into cells via Na+/K+ ATPase)\n"
"• Prolonged QTc interval\n"
"• Hyperglycaemia\n"
"• Paradoxical bronchospasm (rare)\n"
"• Tolerance to bronchodilator effect with overuse", body),
Paragraph("LABAs alone → increased risk of asthma-related death "
"(FDA Black Box Warning). Always combine with ICS.", body)],
# Theophylline
[Paragraph("Theophylline /\nAminophylline", body),
Paragraph("Mild: Nausea, vomiting, diarrhoea, headache, insomnia, anxiety\n"
"Moderate (>20 µg/mL): Tachycardia, arrhythmias, hypertension\n"
"Severe (>40 µg/mL): Seizures, ventricular fibrillation, death", body),
Paragraph("Narrow therapeutic index (5–15 µg/mL). "
"Toxicity precipitated by: erythromycin, fluoroquinolones, cimetidine, "
"allopurinol (↑ levels); smoking, rifampicin (↓ levels).", body)],
# Anticholinergics
[Paragraph("Ipratropium /\nTiotropium", body),
Paragraph("• Dry mouth (most common)\n"
"• Urinary retention (especially in BPH)\n"
"• Constipation\n"
"• Blurred vision (angle-closure glaucoma risk – avoid nebuliser mist in eyes)\n"
"• Metallic taste (ipratropium)\n"
"• Paradoxical bronchospasm (rare)", body),
Paragraph("Minimal systemic absorption via inhalation; fewer systemic anticholinergic "
"effects than atropine.", body)],
# ICS
[Paragraph("Inhaled\nCorticosteroids", body),
Paragraph("Local:\n"
"• Oropharyngeal candidiasis (use spacer, rinse mouth)\n"
"• Dysphonia/hoarseness\n"
"• Reflex cough and throat irritation\n\n"
"Systemic (dose-dependent, more with high doses):\n"
"• HPA axis suppression\n"
"• Growth retardation in children\n"
"• Osteoporosis (↓ bone density)\n"
"• Cataract and glaucoma\n"
"• Skin thinning, bruising", body),
Paragraph("Ciclesonide is a prodrug activated in lung; lowest systemic bioavailability. "
"Systemic effects minimal at low-medium doses.", body)],
# Systemic steroids
[Paragraph("Systemic\nCorticosteroids", body),
Paragraph("• Cushing syndrome (moon face, buffalo hump, truncal obesity)\n"
"• HPA axis suppression (do NOT abruptly withdraw)\n"
"• Hyperglycaemia / steroid diabetes\n"
"• Hypertension, Na+ and fluid retention\n"
"• Peptic ulceration (combined with NSAIDs – very high risk)\n"
"• Osteoporosis and vertebral fractures\n"
"• Immune suppression, opportunistic infections\n"
"• Psychiatric effects (euphoria, depression, psychosis)\n"
"• Myopathy, cataracts", body),
Paragraph("Reserve for acute severe / status asthmaticus or refractory asthma. "
"Minimise chronic use; use lowest effective dose.", body)],
# LTRAs
[Paragraph("Montelukast /\nZafirlukast", body),
Paragraph("• Headache\n"
"• GI disturbances (nausea, abdominal pain)\n"
"• Elevated liver enzymes (zafirlukast; rare hepatotoxicity)\n"
"• Neuropsychiatric effects: depression, suicidal ideation, aggression "
"(FDA Black Box Warning for montelukast, 2020)\n"
"• Drug interaction: zafirlukast inhibits CYP2C9 (↑ warfarin levels)", body),
Paragraph("Montelukast BBW: assess risk-benefit before prescribing, especially for mild disease.", body)],
# Zileuton
[Paragraph("Zileuton", body),
Paragraph("• Hepatotoxicity (elevated transaminases) – monitor LFTs monthly × 3 months, "
"then periodically\n"
"• Drug interactions: inhibits CYP1A2 → ↑ theophylline, warfarin levels\n"
"• Neuropsychiatric effects (similar to montelukast)", body),
Paragraph("Contraindicated in hepatic impairment.", body)],
# Mast cell stabilisers
[Paragraph("Cromolyn /\nNedocromil", body),
Paragraph("• Very safe – minimal systemic absorption\n"
"• Cough, throat irritation on inhalation\n"
"• Unpleasant taste (nedocromil)\n"
"• Rarely: bronchoconstriction, rash", body),
Paragraph("Considered among the safest anti-asthmatics. Rarely used now.", body)],
# Biologics
[Paragraph("Omalizumab", body),
Paragraph("• Injection site reactions (pain, redness, swelling)\n"
"• Anaphylaxis (0.1–0.2% – observe patient 30 min post-injection)\n"
"• Viral upper respiratory infections\n"
"• Headache, fatigue\n"
"• Possible ↑ risk of malignancy (theoretical; not confirmed in RCTs)", body),
Paragraph("Patients should carry epinephrine auto-injector. "
"Adrenaline must be available during administration.", body)],
[Paragraph("Anti-IL-5\n(Mepolizumab,\nReslizumab,\nBenralizumab)", body),
Paragraph("• Injection site reactions or infusion reactions\n"
"• Headache, back pain, fatigue\n"
"• Nasopharyngitis\n"
"• Increased herpes zoster reactivation risk\n"
"• Anaphylaxis (rare)\n"
"• Do NOT use to treat acute asthma attacks", body),
Paragraph("Generally well-tolerated. Eosinophil count falls rapidly with benralizumab "
"(ADCC-mediated depletion).", body)],
[Paragraph("Dupilumab", body),
Paragraph("• Injection site reactions\n"
"• Conjunctivitis (common – up to 10%; mechanism unclear)\n"
"• Transient eosinophilia (especially at initiation)\n"
"• Arthralgia, headache\n"
"• Nasopharyngitis", body),
Paragraph("Dupilumab-associated conjunctivitis managed with topical ophthalmic antihistamines "
"or tacrolimus drops.", body)],
]
adr_table = Table(adr_data, colWidths=[3.2*cm, 8.3*cm, 4*cm])
adr_table.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#0A2647')),
('TEXTCOLOR', (0,0), (-1,0), colors.white),
('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#EBF5FB'), colors.white]),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#AABCCC')),
('TOPPADDING', (0,0), (-1,-1), 6),
('BOTTOMPADDING', (0,0), (-1,-1), 6),
('LEFTPADDING', (0,0), (-1,-1), 7),
('VALIGN', (0,0), (-1,-1), 'TOP'),
]))
story.append(adr_table)
story.append(PageBreak())
# ─── SECTION 8: QUICK REFERENCE / MNEMONICS ──────────────────────────────────
story.append(h1_para("8. QUICK REFERENCE & EXAM TIPS"))
story.append(sp(8))
story.extend(h2_para("8.1 Mechanism Quick-Reference Table"))
story.append(sp(4))
qr_data = [
[Paragraph("<b>Drug</b>", bold_label), Paragraph("<b>Receptor/Target</b>", bold_label),
Paragraph("<b>2nd Messenger</b>", bold_label), Paragraph("<b>Effect</b>", bold_label)],
[Paragraph("β2-Agonists", body), Paragraph("β2-Adrenoceptor (Gs)", body),
Paragraph("↑ cAMP", body), Paragraph("Bronchodilation", body)],
[Paragraph("Theophylline", body), Paragraph("PDE III/IV + Adenosine-R", body),
Paragraph("↑ cAMP/cGMP", body), Paragraph("Bronchodilation + Anti-inflammatory", body)],
[Paragraph("Ipratropium", body), Paragraph("M1/M3 antagonism", body),
Paragraph("↓ cGMP", body), Paragraph("Bronchodilation", body)],
[Paragraph("ICS", body), Paragraph("Glucocorticoid Receptor (GR)", body),
Paragraph("GRE/NF-κB", body), Paragraph("Anti-inflammatory", body)],
[Paragraph("Montelukast", body), Paragraph("CysLT1 receptor antagonism", body),
Paragraph("–", body), Paragraph("↓ Bronchoconstriction + Inflammation", body)],
[Paragraph("Zileuton", body), Paragraph("5-LOX enzyme inhibition", body),
Paragraph("↓ LTs (all)", body), Paragraph("↓ Leukotriene synthesis", body)],
[Paragraph("Cromolyn", body), Paragraph("Mast cell membrane stabilisation", body),
Paragraph("↓ Ca2+ influx", body), Paragraph("Prevents mediator release", body)],
[Paragraph("Omalizumab", body), Paragraph("Free IgE neutralisation", body),
Paragraph("–", body), Paragraph("Prevents IgE-mast cell binding", body)],
]
qr_table = Table(qr_data, colWidths=[3.5*cm, 4.5*cm, 3*cm, 4.5*cm])
qr_table.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#144272')),
('TEXTCOLOR', (0,0), (-1,0), colors.white),
('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#EBF5FB'), colors.white]),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#AABCCC')),
('TOPPADDING', (0,0), (-1,-1), 5),
('BOTTOMPADDING', (0,0), (-1,-1), 5),
('LEFTPADDING', (0,0), (-1,-1), 7),
('VALIGN', (0,0), (-1,-1), 'TOP'),
]))
story.append(qr_table)
story.append(sp(10))
story.extend(h2_para("8.2 Key Points to Remember for M.Pharm Exams"))
story.append(sp(4))
story.append(bp("<b>LABA monotherapy is CONTRAINDICATED in asthma</b> – always combine with ICS "
"(unlike COPD where LABAs may be used alone)."))
story.append(bp("<b>Theophylline toxicity</b> mimics a sympathomimetic overdose: tachycardia, seizures. "
"Treat with IV diazepam (seizures), lidocaine (arrhythmias), activated charcoal."))
story.append(bp("<b>Ipratropium has a slower onset than salbutamol</b> but the combination (Combivent) "
"produces additive bronchodilation."))
story.append(bp("<b>Cromolyn/Nedocromil have NO bronchodilator action</b> – purely prophylactic; "
"ineffective once bronchoconstriction is established."))
story.append(bp("<b>Montelukast – neuropsychiatric Black Box Warning (2020)</b>: depression, suicidal "
"ideation, aggression, sleep disturbance. Reserve for patients who significantly prefer "
"oral therapy."))
story.append(bp("<b>Ciclesonide</b> is a prodrug; activated by esterases in the lung → low systemic "
"bioavailability; fewer local side effects."))
story.append(bp("<b>Dupilumab-conjunctivitis</b> is paradoxical – blocking IL-4/IL-13 (which protect "
"goblet cells in the eye) may be the mechanism."))
story.append(bp("<b>Magnesium sulphate</b> acts by blocking Ca2+ channels in airway smooth muscle → "
"bronchodilation. Used IV in severe acute asthma."))
story.append(bp("<b>Tezepelumab</b> is unique as it targets TSLP (epithelial alarmin) upstream – "
"effective in both T2-high and T2-low asthma phenotypes."))
story.append(sp(10))
story.extend(h2_para("8.3 Contraindications Summary"))
story.append(sp(4))
ci_data = [
[Paragraph("<b>Drug</b>", bold_label), Paragraph("<b>Key Contraindications / Cautions</b>", bold_label)],
[Paragraph("β2-Agonists", body), Paragraph("Hypertrophic obstructive cardiomyopathy; severe tachyarrhythmia; "
"caution in thyrotoxicosis and hypokalemia", body)],
[Paragraph("Theophylline", body), Paragraph("Active peptic ulcer; seizure disorder; severe hepatic impairment; "
"caution with QT-prolonging drugs", body)],
[Paragraph("Anticholinergics", body), Paragraph("Angle-closure glaucoma (if nebuliser mist contacts eye); "
"urinary retention/BPH (relative)", body)],
[Paragraph("Systemic steroids", body), Paragraph("Active systemic fungal infection; live vaccines; "
"caution in diabetes, osteoporosis, GI ulcers", body)],
[Paragraph("Zileuton", body), Paragraph("Active liver disease; ALT >3x ULN", body)],
[Paragraph("Omalizumab", body), Paragraph("Hypersensitivity to omalizumab; not for acute asthma attacks; "
"IgE <30 or >1500 IU/mL (inadequate response)", body)],
]
ci_table = Table(ci_data, colWidths=[4*cm, 11.5*cm])
ci_table.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,0), colors.HexColor('#2C74B3')),
('TEXTCOLOR', (0,0), (-1,0), colors.white),
('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#FEF9E7'), colors.white]),
('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#AABCCC')),
('TOPPADDING', (0,0), (-1,-1), 5),
('BOTTOMPADDING', (0,0), (-1,-1), 5),
('LEFTPADDING', (0,0), (-1,-1), 7),
('VALIGN', (0,0), (-1,-1), 'TOP'),
]))
story.append(ci_table)
story.append(PageBreak())
# ─── REFERENCES ──────────────────────────────────────────────────────────────
story.append(h1_para("9. REFERENCES"))
story.append(sp(8))
refs = [
"Katzung BG, Masters SB, Trevor AJ. <i>Basic and Clinical Pharmacology</i>, 16th edition. McGraw-Hill, 2023. (Chapter 20: Drugs Used in Asthma)",
"Murray JF, Nadel JA. <i>Murray & Nadel's Textbook of Respiratory Medicine</i>, 7th edition. Elsevier, 2022. (Chapter 62: Asthma)",
"Brunton LL, Hilal-Dandan R, Knollmann BC. <i>Goodman & Gilman's The Pharmacological Basis of Therapeutics</i>, 14th edition. McGraw-Hill, 2023.",
"Golan DE et al. <i>Lippincott Illustrated Reviews: Pharmacology</i>, 8th edition. Wolters Kluwer, 2023.",
"Goldman L, Schafer AI. <i>Goldman-Cecil Medicine</i>, 27th edition. Elsevier, 2024.",
"Global Initiative for Asthma (GINA). <i>Global Strategy for Asthma Management and Prevention</i>. GINA, 2023. www.ginasthma.org",
"Morgan GE, Mikhail MS. <i>Clinical Anesthesiology</i>, 7th edition. McGraw-Hill, 2022.",
"US FDA Drug Safety Communication: Boxed Warning for montelukast (Singulair), March 2020.",
]
for i, r in enumerate(refs, 1):
story.append(Paragraph(f"{i}. {r}", ParagraphStyle('ref_list', parent=styles['Normal'],
fontSize=9.5, textColor=colors.HexColor('#333333'), spaceAfter=5,
fontName='Helvetica', leading=14, leftIndent=15, firstLineIndent=-15)))
story.append(sp(15))
story.append(HRFlowable(width='100%', thickness=1, color=colors.HexColor('#2C74B3')))
story.append(sp(6))
story.append(Paragraph(
"This document is compiled for academic purposes for M.Pharm Pharmacology Semester II students. "
"All drug information should be verified against current prescribing guidelines before clinical use.",
ParagraphStyle('disclaimer', parent=styles['Normal'], fontSize=8.5,
textColor=colors.HexColor('#777777'), alignment=TA_CENTER, leading=13)))
# Build PDF
doc.build(story)
print(f"PDF generated: {OUTPUT}")
cd /home/daytona/workspace/asthma-pharmacology && python generate_pdf.py 2>&1
ls -lh /home/daytona/workspace/asthma-pharmacology/Asthma_Advanced_Pharmacology_…
Asthma Advanced Pharmacology MPharm
PDF Document · PDF