Write me a shrot notes for the following topics from anil k tripathi book of general medicine for bds gujarat university for 3 year exams about 7-8 marks Male concise to the point precise ans to the topics are Epilepsy Meningitis Headache Facial pain TN Facial nerve palsy Migraine In pdf form

Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Running Command

mkdir -p /tmp/workspace/bds-notes && ls /tmp/workspace/

Writing File

~/bds-notes/generate_notes.py

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

OUTPUT = "/tmp/workspace/bds-notes/BDS_General_Medicine_Short_Notes.pdf"

doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=A4,
    leftMargin=20*mm, rightMargin=20*mm,
    topMargin=20*mm, bottomMargin=20*mm
)

# ─── Colour palette ───────────────────────────────────────────────
NAVY   = colors.HexColor("#1a2a4a")
BLUE   = colors.HexColor("#1565C0")
LBLUE  = colors.HexColor("#E3F2FD")
GREEN  = colors.HexColor("#1B5E20")
LGREEN = colors.HexColor("#E8F5E9")
ORANGE = colors.HexColor("#E65100")
LGREY  = colors.HexColor("#F5F5F5")
WHITE  = colors.white
DARK   = colors.HexColor("#212121")

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

cover_title = ParagraphStyle("CoverTitle",
    fontName="Helvetica-Bold", fontSize=26, textColor=WHITE,
    spaceAfter=6, spaceBefore=4, alignment=TA_CENTER, leading=32)

cover_sub = ParagraphStyle("CoverSub",
    fontName="Helvetica", fontSize=13, textColor=LBLUE,
    spaceAfter=4, alignment=TA_CENTER)

cover_info = ParagraphStyle("CoverInfo",
    fontName="Helvetica-Oblique", fontSize=11, textColor=WHITE,
    spaceAfter=3, alignment=TA_CENTER)

topic_title = ParagraphStyle("TopicTitle",
    fontName="Helvetica-Bold", fontSize=15, textColor=WHITE,
    spaceAfter=2, spaceBefore=2, alignment=TA_LEFT, leading=20)

section_head = ParagraphStyle("SectionHead",
    fontName="Helvetica-Bold", fontSize=11, textColor=BLUE,
    spaceAfter=2, spaceBefore=6, leading=14)

body = ParagraphStyle("Body",
    fontName="Helvetica", fontSize=9.5, textColor=DARK,
    spaceAfter=3, spaceBefore=2, leading=14, alignment=TA_JUSTIFY)

bullet = ParagraphStyle("Bullet",
    fontName="Helvetica", fontSize=9.5, textColor=DARK,
    spaceAfter=2, spaceBefore=1, leading=13,
    leftIndent=12, bulletIndent=4)

bold_bullet = ParagraphStyle("BoldBullet",
    fontName="Helvetica-Bold", fontSize=9.5, textColor=DARK,
    spaceAfter=2, spaceBefore=1, leading=13,
    leftIndent=12, bulletIndent=4)

keybox_style = ParagraphStyle("KeyBox",
    fontName="Helvetica-BoldOblique", fontSize=9, textColor=GREEN,
    spaceAfter=2, spaceBefore=2, leading=13, leftIndent=6)

note_style = ParagraphStyle("Note",
    fontName="Helvetica-Oblique", fontSize=8.5, textColor=ORANGE,
    spaceAfter=2, spaceBefore=2, leading=12)

# ─── Helper functions ─────────────────────────────────────────────

def topic_header(title, marks="7-8 marks"):
    table = Table([[Paragraph(title, topic_title),
                    Paragraph(marks, ParagraphStyle("marks",
                        fontName="Helvetica-Bold", fontSize=10,
                        textColor=LBLUE, alignment=1, leading=14))]],
                  colWidths=["80%","20%"])
    table.setStyle(TableStyle([
        ("BACKGROUND", (0,0),(-1,-1), NAVY),
        ("ROUNDEDCORNERS", (0,0),(-1,-1), 6),
        ("TOPPADDING",    (0,0),(-1,-1), 7),
        ("BOTTOMPADDING", (0,0),(-1,-1), 7),
        ("LEFTPADDING",   (0,0),(-1,-1), 10),
        ("RIGHTPADDING",  (0,0),(-1,-1), 8),
    ]))
    return table

def section(text):
    return Paragraph(text, section_head)

def b(text):
    return Paragraph(f"• {text}", bullet)

def bb(text):
    return Paragraph(f"• {text}", bold_bullet)

def keybox(text):
    data = [[Paragraph(f"★  {text}", keybox_style)]]
    t = Table(data, colWidths=["100%"])
    t.setStyle(TableStyle([
        ("BACKGROUND", (0,0),(-1,-1), LGREEN),
        ("BOX", (0,0),(-1,-1), 0.8, GREEN),
        ("LEFTPADDING", (0,0),(-1,-1), 8),
        ("RIGHTPADDING", (0,0),(-1,-1), 8),
        ("TOPPADDING", (0,0),(-1,-1), 4),
        ("BOTTOMPADDING", (0,0),(-1,-1), 4),
    ]))
    return t

def note(text):
    data = [[Paragraph(f"⚠  {text}", note_style)]]
    t = Table(data, colWidths=["100%"])
    t.setStyle(TableStyle([
        ("BACKGROUND", (0,0),(-1,-1), colors.HexColor("#FFF3E0")),
        ("BOX", (0,0),(-1,-1), 0.8, ORANGE),
        ("LEFTPADDING", (0,0),(-1,-1), 8),
        ("RIGHTPADDING", (0,0),(-1,-1), 8),
        ("TOPPADDING", (0,0),(-1,-1), 4),
        ("BOTTOMPADDING", (0,0),(-1,-1), 4),
    ]))
    return t

def sp(n=4):
    return Spacer(1, n*mm)

def hr():
    return HRFlowable(width="100%", thickness=0.5, color=colors.HexColor("#BDBDBD"), spaceAfter=3)

# ─── Two-column table helper ─────────────────────────────────────
def two_col_table(rows, header=None):
    data = []
    if header:
        data.append([Paragraph(f"<b>{header[0]}</b>", ParagraphStyle("th",
                        fontName="Helvetica-Bold", fontSize=9, textColor=WHITE, leading=12)),
                     Paragraph(f"<b>{header[1]}</b>", ParagraphStyle("th",
                        fontName="Helvetica-Bold", fontSize=9, textColor=WHITE, leading=12))])
    for r in rows:
        data.append([Paragraph(str(r[0]), ParagraphStyle("td",
                         fontName="Helvetica-Bold", fontSize=9, textColor=BLUE, leading=12)),
                     Paragraph(str(r[1]), ParagraphStyle("td2",
                         fontName="Helvetica", fontSize=9, textColor=DARK, leading=12))])
    t = Table(data, colWidths=["35%","65%"])
    style_cmds = [
        ("GRID", (0,0),(-1,-1), 0.5, colors.HexColor("#BDBDBD")),
        ("TOPPADDING", (0,0),(-1,-1), 4),
        ("BOTTOMPADDING", (0,0),(-1,-1), 4),
        ("LEFTPADDING", (0,0),(-1,-1), 6),
        ("RIGHTPADDING", (0,0),(-1,-1), 6),
        ("ROWBACKGROUNDS", (0,0),(-1,-1), [LGREY, WHITE]),
    ]
    if header:
        style_cmds += [
            ("BACKGROUND", (0,0),(-1,0), BLUE),
            ("ROWBACKGROUNDS", (0,1),(-1,-1), [LGREY, WHITE]),
        ]
    t.setStyle(TableStyle(style_cmds))
    return t

# ═══════════════════════════════════════════════════════════════════
# CONTENT
# ═══════════════════════════════════════════════════════════════════
story = []

# ── COVER PAGE ─────────────────────────────────────────────────────
cover_bg = Table([[""]], colWidths=["100%"], rowHeights=[60*mm])
cover_bg.setStyle(TableStyle([
    ("BACKGROUND", (0,0),(-1,-1), NAVY),
    ("TOPPADDING", (0,0),(-1,-1), 0),
    ("BOTTOMPADDING", (0,0),(-1,-1), 0),
]))
story.append(cover_bg)
story.append(sp(2))

header_data = [[
    Paragraph("GENERAL MEDICINE", ParagraphStyle("ch", fontName="Helvetica-Bold",
        fontSize=24, textColor=WHITE, alignment=TA_CENTER, leading=28)),
]]
ht = Table(header_data, colWidths=["100%"])
ht.setStyle(TableStyle([
    ("BACKGROUND", (0,0),(-1,-1), NAVY),
    ("TOPPADDING", (0,0),(-1,-1), 20),
    ("BOTTOMPADDING", (0,0),(-1,-1), 6),
    ("LEFTPADDING", (0,0),(-1,-1), 10),
]))
story.append(ht)

sub_data = [[Paragraph("SHORT NOTES FOR BDS 3rd YEAR", ParagraphStyle("cs", fontName="Helvetica-BoldOblique",
    fontSize=14, textColor=LBLUE, alignment=TA_CENTER, leading=18))]]
st = Table(sub_data, colWidths=["100%"])
st.setStyle(TableStyle([
    ("BACKGROUND", (0,0),(-1,-1), NAVY),
    ("TOPPADDING", (0,0),(-1,-1), 4),
    ("BOTTOMPADDING", (0,0),(-1,-1), 4),
]))
story.append(st)

univ_data = [[Paragraph("Gujarat University | Based on Anil K. Tripathi – General Medicine for BDS",
    ParagraphStyle("cu", fontName="Helvetica-Oblique", fontSize=11,
    textColor=colors.HexColor("#90CAF9"), alignment=TA_CENTER, leading=16))]]
ut = Table(univ_data, colWidths=["100%"])
ut.setStyle(TableStyle([
    ("BACKGROUND", (0,0),(-1,-1), NAVY),
    ("TOPPADDING", (0,0),(-1,-1), 4),
    ("BOTTOMPADDING", (0,0),(-1,-1), 20),
]))
story.append(ut)
story.append(sp(4))

# Topics index box
idx_rows = [
    ["1.", "Epilepsy"],
    ["2.", "Meningitis"],
    ["3.", "Headache"],
    ["4.", "Facial Pain"],
    ["5.", "Trigeminal Neuralgia (TN)"],
    ["6.", "Facial Nerve Palsy (Bell's Palsy)"],
    ["7.", "Migraine"],
]
idx_style = ParagraphStyle("idx", fontName="Helvetica", fontSize=11, textColor=DARK, leading=16)
idx_num   = ParagraphStyle("idxn", fontName="Helvetica-Bold", fontSize=11, textColor=BLUE, leading=16)
idx_data = [[Paragraph(r[0], idx_num), Paragraph(r[1], idx_style)] for r in idx_rows]
idx_table = Table(idx_data, colWidths=["8%","92%"])
idx_table.setStyle(TableStyle([
    ("ROWBACKGROUNDS", (0,0),(-1,-1), [LBLUE, WHITE]),
    ("TOPPADDING", (0,0),(-1,-1), 5),
    ("BOTTOMPADDING", (0,0),(-1,-1), 5),
    ("LEFTPADDING", (0,0),(-1,-1), 10),
    ("RIGHTPADDING", (0,0),(-1,-1), 10),
    ("BOX", (0,0),(-1,-1), 1, BLUE),
]))
story.append(idx_table)
story.append(sp(4))
disclaimer = Paragraph(
    "Each topic is designed for 7–8 marks answers. Concise, high-yield, exam-focused.",
    ParagraphStyle("disc", fontName="Helvetica-Oblique", fontSize=9.5,
    textColor=colors.HexColor("#546E7A"), alignment=TA_CENTER))
story.append(disclaimer)
story.append(PageBreak())

# ═══════════════════════════════════════════════════════════════════
# TOPIC 1 – EPILEPSY
# ═══════════════════════════════════════════════════════════════════
story.append(topic_header("1. EPILEPSY"))
story.append(sp(2))

story.append(section("Definition"))
story.append(Paragraph(
    "Epilepsy is a chronic neurological disorder characterized by recurrent, unprovoked seizures "
    "due to abnormal, excessive, or synchronous neuronal activity in the brain. A seizure is a "
    "transient occurrence of signs and/or symptoms due to abnormal excessive or synchronous "
    "neuronal activity in the brain.",
    body))

story.append(section("Classification of Seizures (ILAE 2017)"))
story.append(two_col_table([
    ["Focal (Partial)", "Originate in one hemisphere; may be focal aware (simple partial) or focal impaired awareness (complex partial)"],
    ["Focal to bilateral tonic-clonic", "Formerly 'secondarily generalized'; focal onset spreads to both hemispheres"],
    ["Generalized – Motor", "Tonic-clonic, tonic, clonic, myoclonic, atonic (drop attacks)"],
    ["Generalized – Non-motor", "Absence (typical/atypical) – blank stare <15 sec, 3 Hz spike-wave on EEG"],
    ["Unknown onset", "Cannot be classified as focal or generalized"],
], header=["Type", "Features"]))
story.append(sp(2))

story.append(section("Etiology"))
story.append(b("Idiopathic (genetic) – primary generalized epilepsy, juvenile myoclonic epilepsy"))
story.append(b("Symptomatic – brain tumour, trauma, stroke, meningitis, encephalitis, hippocampal sclerosis"))
story.append(b("Cryptogenic – presumed symptomatic but no identifiable cause"))
story.append(b("Metabolic – hyponatraemia, hypoglycaemia, hypocalcaemia, uraemia"))

story.append(section("Clinical Features"))
story.append(b("Prodrome/aura → ictal phase → post-ictal phase (confusion, Todd's paralysis)"))
story.append(b("Grand mal (GTC): sudden loss of consciousness, tonic phase (sustained contraction) → clonic phase (rhythmic jerks), tongue bite, incontinence"))
story.append(b("Absence: brief (< 15 sec) blank stare, no post-ictal confusion, 3 Hz spike-wave EEG"))
story.append(b("Focal aware: motor, sensory, autonomic or psychic symptoms with preserved consciousness"))
story.append(b("Focal impaired awareness: automatisms, altered consciousness, post-ictal confusion"))
story.append(b("Status epilepticus: seizure > 30 min or repeated seizures without recovery of consciousness"))

story.append(section("Investigations"))
story.append(b("EEG: MOST important – epileptiform discharges (spikes/sharp waves); 90% of epileptics show abnormalities"))
story.append(b("MRI brain: structural lesions (tumour, AVM, hippocampal sclerosis)"))
story.append(b("CT brain: acute setting, calcification, haemorrhage"))
story.append(b("Blood: glucose, electrolytes, calcium, renal/liver function, CBC"))
story.append(b("Lumbar puncture: if meningitis/encephalitis suspected"))

story.append(section("Treatment"))
story.append(two_col_table([
    ["Generalised tonic-clonic", "Sodium valproate (1st line), Lamotrigine, Levetiracetam"],
    ["Absence", "Ethosuximide, Sodium valproate"],
    ["Focal seizures", "Carbamazepine (1st line), Oxcarbazepine, Lamotrigine"],
    ["Juvenile myoclonic", "Sodium valproate, Levetiracetam"],
    ["Status epilepticus", "IV Lorazepam → IV Phenytoin → IV Phenobarbitone → Anaesthesia"],
], header=["Seizure Type", "Drug of Choice"]))
story.append(sp(1))
story.append(keybox("Dental relevance: Avoid seizure triggers (stress, sleep deprivation, flashing lights). Gingival hyperplasia is a common side effect of phenytoin."))
story.append(sp(2))
story.append(hr())

# ═══════════════════════════════════════════════════════════════════
# TOPIC 2 – MENINGITIS
# ═══════════════════════════════════════════════════════════════════
story.append(sp(2))
story.append(topic_header("2. MENINGITIS"))
story.append(sp(2))

story.append(section("Definition"))
story.append(Paragraph(
    "Meningitis is inflammation of the meninges (pia mater, arachnoid mater, dura mater) "
    "associated with pleocytosis (increased WBC) in the CSF. It may be bacterial, viral, fungal, or aseptic.",
    body))

story.append(section("Etiology"))
story.append(two_col_table([
    ["Community-acquired bacterial", "Streptococcus pneumoniae (most common adult), Neisseria meningitidis (young adults)"],
    ["Neonates", "Group B Streptococcus, E. coli, Listeria monocytogenes"],
    ["Elderly / Immunocompromised", "Listeria monocytogenes, S. pneumoniae"],
    ["Viral (Aseptic)", "Enteroviruses (most common), HSV-2, Mumps, HIV"],
    ["Chronic / Fungal", "Cryptococcus neoformans (in HIV), M. tuberculosis"],
    ["Post-otitis/sinusitis", "Anaerobes, S. pneumoniae"],
], header=["Type", "Organisms"]))
story.append(sp(2))

story.append(section("Clinical Features – Classic Triad"))
story.append(b("Fever, Severe headache, Neck stiffness (nuchal rigidity)"))
story.append(b("Photophobia and phonophobia"))
story.append(b("Nausea and vomiting"))
story.append(b("Altered consciousness / confusion (encephalopathy suggests meningoencephalitis)"))
story.append(b("Petechial/purpuric rash – meningococcal meningitis (medical emergency)"))
story.append(sp(1))
story.append(two_col_table([
    ["Kernig's sign", "Unable to extend knee when hip is flexed to 90° (meningeal irritation)"],
    ["Brudzinski's sign", "Passive neck flexion causes involuntary hip & knee flexion"],
    ["Jolt accentuation", "Worsening of headache on rapid horizontal head rotation"],
    ["Papilloedema", "Raised ICP – warrants CT before LP"],
], header=["Sign", "Description"]))
story.append(sp(2))

story.append(section("Investigations"))
story.append(b("Lumbar puncture (LP): MOST important – measure opening pressure, send for cell count, protein, glucose, Gram stain, culture, PCR"))
story.append(b("CT brain BEFORE LP if: focal neuro signs, papilloedema, GCS < 13, new seizure, or immunocompromised"))
story.append(two_col_table([
    ["Bacterial", "Turbid CSF; ↑↑ neutrophils; ↑ protein; ↓ glucose (<50% serum)"],
    ["Viral", "Clear CSF; ↑ lymphocytes; mildly ↑ protein; normal glucose"],
    ["TB", "Clear/xanthochromic; ↑ lymphocytes; ↑↑ protein; ↓↓ glucose; Ziehl-Neelsen stain"],
    ["Fungal", "India ink stain; CrAg antigen in HIV patients"],
], header=["Type", "CSF Findings"]))
story.append(sp(2))

story.append(section("Treatment"))
story.append(b("Bacterial: IV Ceftriaxone 2g BD (empirical) + IV Dexamethasone (to reduce inflammation & hearing loss)"))
story.append(b("Add IV Ampicillin if Listeria suspected (elderly, immunocompromised, neonates)"))
story.append(b("Viral: Supportive; IV Acyclovir if HSV encephalitis suspected (reduces mortality from >70% to ~20%)"))
story.append(b("TB: 4-drug ATT (HRZE for 2 months then HR for 4–7 months) + steroids"))
story.append(b("Fungal (Cryptococcal): IV Amphotericin B + Flucytosine, then Fluconazole"))
story.append(keybox("Do NOT delay antibiotics while awaiting CT/LP – give empirical antibiotics first if LP is delayed."))
story.append(sp(2))
story.append(hr())

# ═══════════════════════════════════════════════════════════════════
# TOPIC 3 – HEADACHE
# ═══════════════════════════════════════════════════════════════════
story.append(sp(2))
story.append(topic_header("3. HEADACHE"))
story.append(sp(2))

story.append(section("Definition & Classification"))
story.append(Paragraph(
    "Headache (cephalalgia) is pain arising from the head or upper neck. It is one of the "
    "most common presenting symptoms. Classified into primary (no underlying cause) and "
    "secondary (due to another condition).",
    body))

story.append(two_col_table([
    ["Primary", "Migraine, Tension-type headache (TTH), Cluster headache"],
    ["Secondary", "Meningitis, SAH, hypertensive urgency, tumour, sinusitis, temporal arteritis"],
], header=["Type", "Examples"]))
story.append(sp(2))

story.append(section("Tension-Type Headache (Most Common)"))
story.append(b("Bilateral, pressing/tightening ('band-like') quality, mild-moderate intensity"))
story.append(b("No nausea/vomiting; no aggravation with activity"))
story.append(b("Duration: 30 min to 7 days"))
story.append(b("Treatment: Simple analgesics (paracetamol, NSAIDs), amitriptyline for prophylaxis"))

story.append(section("Cluster Headache"))
story.append(b("Severe, unilateral orbital/periorbital pain – 'suicide headache'"))
story.append(b("Duration: 15–180 min; occurs in clusters (1–8/day)"))
story.append(b("Autonomic features: ipsilateral lacrimation, rhinorrhoea, ptosis, miosis, conjunctival injection"))
story.append(b("Treatment: 100% O2 inhalation; Sumatriptan SC; Verapamil for prophylaxis"))

story.append(section("Red Flags (Secondary Headache – SNOOP mnemonic)"))
story.append(b("Systemic illness / fever / HIV"))
story.append(b("Neurological deficit (focal signs, altered consciousness)"))
story.append(b("Onset sudden / 'thunderclap' (SAH until proved otherwise)"))
story.append(b("Older age (>50) – temporal arteritis, malignancy"))
story.append(b("Papilloedema / postural variation / progressive worsening"))
story.append(note("'Worst headache of life' + neck stiffness = SAH/meningitis → immediate CT + LP"))

story.append(section("Headache in Dental Context"))
story.append(b("Sinus headache: dull aching over maxillary / frontal sinuses, worse on bending forward"))
story.append(b("TMJ / referred orofacial pain: pain over temporal region with jaw involvement"))
story.append(b("Post-dental procedure headache: usually tension-type; rare – post-LP headache (worse upright, relieved lying flat)"))
story.append(sp(2))
story.append(hr())

# ═══════════════════════════════════════════════════════════════════
# TOPIC 4 – FACIAL PAIN
# ═══════════════════════════════════════════════════════════════════
story.append(sp(2))
story.append(topic_header("4. FACIAL PAIN"))
story.append(sp(2))

story.append(section("Definition & Classification"))
story.append(Paragraph(
    "Facial pain refers to pain felt in the face. It may originate from dental, sinus, vascular, "
    "neurological, or musculoskeletal causes. A thorough history and examination are essential to "
    "distinguish neurogenic from non-neurogenic causes.",
    body))

story.append(two_col_table([
    ["Neurogenic", "Trigeminal neuralgia, Post-herpetic neuralgia, Glossopharyngeal neuralgia"],
    ["Dental / Oral", "Dental caries, Pulpitis, Periodontitis, Dry socket, Cracked tooth"],
    ["Sinus (Rhinogenic)", "Acute sinusitis – dull, aching, worse on bending, associated nasal symptoms"],
    ["Vascular", "Migraine, Cluster headache, Temporal (Giant Cell) arteritis"],
    ["Musculoskeletal", "TMJ dysfunction, Masticatory myofascial pain, Cervical spine disease"],
    ["Atypical/Psychogenic", "Persistent idiopathic facial pain (PIFP) – continuous, poorly localised"],
], header=["Category", "Examples"]))
story.append(sp(2))

story.append(section("Key Points of Facial Pain Assessment"))
story.append(b("Site and radiation – unilateral or bilateral, dermatomal or diffuse"))
story.append(b("Character – sharp/stabbing (TN), burning (post-herpetic), throbbing (vascular), dull/aching (sinus/dental)"))
story.append(b("Triggers – touch, chewing, hot/cold (TN, dental); spontaneous (PIFP)"))
story.append(b("Duration – seconds (TN), hours (migraine), constant (atypical)"))
story.append(b("Associated features – sensory loss (secondary TN), vesicles (herpes zoster), lacrimation (cluster)"))

story.append(section("Temporal (Giant Cell) Arteritis"))
story.append(b("Age >50, tender nodular temporal artery, jaw claudication"))
story.append(b("Risk of blindness (ophthalmic artery occlusion) if untreated"))
story.append(b("ESR >50, CRP elevated; Temporal artery biopsy confirmatory"))
story.append(b("Treatment: High-dose prednisolone URGENTLY; do not wait for biopsy"))
story.append(note("Post-herpetic neuralgia: burning pain in V1 (ophthalmic) division after Herpes Zoster reactivation – treat with Amitriptyline / Gabapentin"))
story.append(sp(2))
story.append(hr())

# ═══════════════════════════════════════════════════════════════════
# TOPIC 5 – TRIGEMINAL NEURALGIA
# ═══════════════════════════════════════════════════════════════════
story.append(PageBreak())
story.append(topic_header("5. TRIGEMINAL NEURALGIA (TN)"))
story.append(sp(2))

story.append(section("Definition"))
story.append(Paragraph(
    "Trigeminal neuralgia (tic douloureux) is a paroxysmal, severe, unilateral facial pain "
    "in the distribution of one or more branches of the trigeminal nerve (CN V), "
    "often triggered by light tactile stimulation of a trigger zone.",
    body))

story.append(section("Classification"))
story.append(b("<b>Classical TN:</b> Neurovascular compression of trigeminal root (most common – superior cerebellar artery) → focal demyelination at root entry zone"))
story.append(b("<b>Secondary TN:</b> Multiple sclerosis, posterior fossa tumour (meningioma, schwannoma), brainstem infarct"))
story.append(b("<b>Idiopathic TN:</b> No structural cause identified"))

story.append(section("Clinical Features"))
story.append(b("Severe, unilateral, electric shock-like / lancinating / stabbing pain"))
story.append(b("Lasts seconds to 2 min; may recur in rapid succession"))
story.append(b("Divisions most commonly affected: V2 (maxillary) and V3 (mandibular); V1 alone is rare"))
story.append(b("Trigger zone: nasolabial fold, cheek, gum, lips – triggered by touch, chewing, talking, toothbrushing, cold breeze"))
story.append(b("NO objective sensory loss in classical TN (sensory deficit → suspect secondary cause)"))
story.append(b("Residual dull ache may follow after repeated attacks; weight loss and depression from severe attacks"))
story.append(b("Onset: >40 years; slightly more common in women; exacerbating-remitting course"))

story.append(section("Investigations"))
story.append(b("MRI brain (with gadolinium): to rule out secondary causes; may show neurovascular contact"))
story.append(b("MRA: identify compressing vessel"))
story.append(b("Blink reflex / EMG: normal in classical TN"))
story.append(b("Blood: CBC, LFT, electrolytes before starting carbamazepine"))

story.append(section("Treatment"))
story.append(Paragraph("<b>Medical (First-line):</b>", section_head))
story.append(b("Carbamazepine 600–1200 mg/day – sodium channel blocker; highly effective; monitor CBC, LFT, Na"))
story.append(b("Oxcarbazepine – better tolerated but risk of hyponatraemia"))
story.append(b("Second-line: Gabapentin, Pregabalin, Phenytoin, Baclofen, Lamotrigine"))
story.append(b("IV Fosphenytoin for acute severe attack"))
story.append(Paragraph("<b>Surgical (if refractory to medical therapy):</b>", section_head))
story.append(b("Microvascular decompression (MVD) – gold standard; excellent long-term results"))
story.append(b("Percutaneous radiofrequency thermocoagulation of gasserian ganglion"))
story.append(b("Gamma Knife radiosurgery – stereotactic"))
story.append(b("Peripheral alcohol nerve block – temporary (6–18 months), for elderly"))
story.append(keybox("Dental relevance: TN mimics dental pain (toothache). Unnecessary extractions must be avoided. Trigger zones overlap with gum/teeth. Diagnosis is clinical."))
story.append(sp(2))
story.append(hr())

# ═══════════════════════════════════════════════════════════════════
# TOPIC 6 – FACIAL NERVE PALSY (BELL'S PALSY)
# ═══════════════════════════════════════════════════════════════════
story.append(sp(2))
story.append(topic_header("6. FACIAL NERVE PALSY / BELL'S PALSY"))
story.append(sp(2))

story.append(section("Definition"))
story.append(Paragraph(
    "Facial nerve palsy is weakness or paralysis of the muscles of facial expression due to "
    "dysfunction of CN VII. Bell's palsy is the most common cause – idiopathic, acute, "
    "self-limited lower motor neuron (LMN) facial palsy, likely due to HSV or VZV "
    "reactivation in the geniculate ganglion.",
    body))

story.append(section("UMN vs LMN Facial Palsy – Key Distinction"))
story.append(two_col_table([
    ["Forehead sparing", "Forehead involved (cannot wrinkle forehead or close eye)"],
    ["Upper face spared due to bilateral cortical supply", "Entire ipsilateral face affected"],
    ["Cause: Contralateral cortical stroke / tumour", "Cause: Bell's palsy, Ramsay Hunt, otitis media, trauma"],
], header=["UMN (Central) Palsy", "LMN (Peripheral) Palsy"]))
story.append(sp(2))

story.append(section("Bell's Palsy – Clinical Features"))
story.append(b("Acute/subacute onset unilateral facial weakness – drooping of corner of mouth, inability to close eye"))
story.append(b("Flattened nasolabial fold, widened palpebral fissure on affected side"))
story.append(b("Retroauricular pain (60%) – often precedes weakness"))
story.append(b("Impaired lacrimation (60%), taste changes (30–50%), hyperacusis (15–30%)"))
story.append(b("85% recover spontaneously within 3 weeks"))
story.append(b("Complications: Corneal exposure keratitis, synkinesis (mass movement), 'crocodile tears' (aberrant regeneration)"))

story.append(section("Ramsay Hunt Syndrome"))
story.append(b("VZV reactivation in geniculate ganglion"))
story.append(b("Facial palsy + vesicular rash in ear (herpes zoster oticus) ± sensorineural hearing loss, vertigo"))
story.append(b("Worse prognosis than Bell's palsy; requires early treatment"))

story.append(section("Causes of Facial Nerve Palsy"))
story.append(b("Idiopathic: Bell's palsy"))
story.append(b("Infective: Ramsay Hunt (VZV), Lyme disease, otitis media (acute), HIV"))
story.append(b("Neoplastic: Parotid tumour, cholesteatoma, acoustic neuroma, skull base tumours"))
story.append(b("Trauma: Temporal bone fracture, iatrogenic (parotid surgery, dental injection)"))
story.append(b("Systemic: Sarcoidosis, Guillain-Barré syndrome"))

story.append(section("Investigations"))
story.append(b("Diagnosis is clinical – no test confirms Bell's palsy"))
story.append(b("MRI with gadolinium: enhancement of geniculate ganglion in Bell's palsy"))
story.append(b("EMG/nerve conduction studies: fibrillation at 10–14 days → poor prognosis"))
story.append(b("If Ramsay Hunt: VZV PCR in vesicle fluid / rising VZV serology"))
story.append(b("Rule out Lyme disease, sarcoidosis in atypical / bilateral cases"))

story.append(section("Treatment"))
story.append(b("Prednisolone 1 mg/kg/day for 10 days (start within 72 hours) – improves recovery"))
story.append(b("Antiviral (Acyclovir / Valacyclovir): added benefit when combined with steroids; used in Ramsay Hunt"))
story.append(b("Eye care: Artificial tears, lubricant eye drops, taping eye shut at night (prevent corneal damage)"))
story.append(b("Physiotherapy: Facial exercises to improve muscle tone"))
story.append(b("Surgical decompression: rarely indicated; for progressive complete palsy"))
story.append(keybox("Dental relevance: Parotid surgery / inferior alveolar nerve blocks can cause iatrogenic facial nerve injury. Oro-facial paralysis impairs swallowing, mastication, and oral hygiene."))
story.append(sp(2))
story.append(hr())

# ═══════════════════════════════════════════════════════════════════
# TOPIC 7 – MIGRAINE
# ═══════════════════════════════════════════════════════════════════
story.append(PageBreak())
story.append(topic_header("7. MIGRAINE"))
story.append(sp(2))

story.append(section("Definition"))
story.append(Paragraph(
    "Migraine is a primary headache disorder characterised by recurrent, typically unilateral, "
    "throbbing headaches of moderate-severe intensity, lasting 4–72 hours, associated with nausea, "
    "vomiting, photophobia, and phonophobia. May be preceded by an aura.",
    body))

story.append(section("Types"))
story.append(b("<b>Migraine without aura (common migraine):</b> Most common; headache without preceding focal neurological symptoms"))
story.append(b("<b>Migraine with aura (classic migraine):</b> Preceded by reversible focal neurological symptoms (aura) – visual (most common), sensory, or motor"))
story.append(b("<b>Chronic migraine:</b> ≥15 headache days/month for >3 months, with ≥8 migraine days/month"))

story.append(section("IHS Diagnostic Criteria (ICHD-3)"))
story.append(Paragraph(
    "Repeated attacks lasting <b>4–72 hours</b> in patients with normal physical examination, with "
    "<b>≥2 of:</b> unilateral pain, throbbing quality, moderate/severe intensity, aggravation by routine activity; "
    "<b>PLUS ≥1 of:</b> nausea/vomiting, photophobia and phonophobia.",
    body))

story.append(section("Aura Features"))
story.append(b("Visual: Fortification spectra (zigzag lines), scintillating scotoma, visual field defects"))
story.append(b("Sensory: Pins and needles / numbness spreading over minutes (positive then negative)"))
story.append(b("Speech: Dysphasia"))
story.append(b("Duration: Each symptom lasts 5–60 minutes; headache follows within 60 min"))

story.append(section("Pathophysiology"))
story.append(b("Cortical spreading depression (CSD) – wave of neuronal depolarisation → aura"))
story.append(b("Trigeminovascular activation: meningeal vessel pain signals via trigeminal ganglion → trigeminocervical complex → thalamus → cortex"))
story.append(b("CGRP (Calcitonin Gene-Related Peptide) is the key neurotransmitter in migraine pain pathway"))
story.append(b("Serotonin (5-HT) deficiency plays a role; triptans are 5-HT1B/1D agonists"))

story.append(section("Triggers"))
story.append(b("Stress, hormonal (menstruation, OCP), sleep change, hunger, alcohol (red wine), strong smell, weather change, bright lights"))

story.append(section("Treatment"))
story.append(Paragraph("<b>Acute (Abortive) Treatment:</b>", section_head))
story.append(two_col_table([
    ["Mild attack", "Paracetamol, NSAIDs (Ibuprofen, Naproxen), Aspirin + Caffeine + Paracetamol combination"],
    ["Moderate attack", "Triptans (Sumatriptan oral/SC/nasal) – 5-HT1B/1D agonists; most effective; give early"],
    ["Severe / vomiting", "IV/IM Metoclopramide + IV NSAIDs or IV Paracetamol; SC Sumatriptan"],
    ["Newer agents", "Gepants (CGRP receptor antagonists) e.g. Rimegepant; Ditans (5-HT1F agonists) e.g. Lasmiditan"],
    ["Anti-emetics", "Metoclopramide, Domperidone – also aid analgesic absorption"],
], header=["Severity", "Treatment"]))
story.append(sp(2))

story.append(Paragraph("<b>Prophylactic Treatment</b> (if ≥4 attacks/month or disabling attacks):", section_head))
story.append(b("Beta-blockers: Propranolol, Metoprolol (1st line)"))
story.append(b("Antidepressants: Amitriptyline (low dose)"))
story.append(b("Anticonvulsants: Sodium valproate, Topiramate"))
story.append(b("Calcium channel blockers: Flunarizine"))
story.append(b("Anti-CGRP monoclonal antibodies: Erenumab, Fremanezumab (for chronic migraine)"))

story.append(section("Non-Pharmacological Management"))
story.append(b("Regular sleep, regular meals, avoid known triggers, limit caffeine, stress management"))
story.append(b("MIDAS questionnaire to assess disability and guide treatment"))
story.append(keybox("Dental relevance: Migraine can mimic dental pain. Bruxism and TMJ disorders may trigger or worsen migraine. Dental procedures under stress can precipitate attacks."))

story.append(sp(4))
story.append(HRFlowable(width="100%", thickness=1.5, color=NAVY))
story.append(sp(2))

footer_text = Paragraph(
    "These short notes are based on standard general medicine texts (Anil K. Tripathi – "
    "General Medicine for BDS) and authoritative neurology references. "
    "For Gujarat University BDS 3rd Year Examinations. 2025–26.",
    ParagraphStyle("footer", fontName="Helvetica-Oblique", fontSize=8,
    textColor=colors.HexColor("#757575"), alignment=TA_CENTER, leading=12))
story.append(footer_text)

# ─── BUILD ────────────────────────────────────────────────────────
doc.build(story)
print(f"PDF generated: {OUTPUT}")
Running Command

cd /tmp/workspace/bds-notes && python generate_notes.py 2>&1

Running Command

ls -lh /tmp/workspace/bds-notes/BDS_General_Medicine_Short_Notes.pdf

Your PDF is ready! Download it here:

BDS General Medicine Short Notes

PDF Document · PDF


Here's what's inside, topic by topic:

1. Epilepsy
  • Definition, ILAE 2017 seizure classification table (focal / generalized / unknown onset)
  • Etiology (idiopathic, symptomatic, metabolic)
  • Clinical features: GTC, absence, focal aware/impaired, status epilepticus
  • Investigations: EEG (most important), MRI, blood tests
  • Drug-of-choice table per seizure type; status epilepticus ladder
  • Dental note: phenytoin gingival hyperplasia
2. Meningitis
  • Definition, etiology table by age group (pneumococcus, meningococcus, Listeria, viral, TB, fungal)
  • Classic triad + clinical signs (Kernig's, Brudzinski's)
  • CSF findings table (bacterial vs viral vs TB vs fungal)
  • Treatment: Ceftriaxone + Dexamethasone; Acyclovir for HSV; ATT for TB
3. Headache
  • Primary vs secondary classification
  • Tension headache, cluster headache features and treatment
  • Red flags (SNOOP mnemonic) with thunderclap/SAH warning
  • Dental context: sinus headache, TMJ, post-LP headache
4. Facial Pain
  • Full differential table (neurogenic, dental, sinus, vascular, musculoskeletal, atypical)
  • Assessment guide: site, character, triggers, duration
  • Temporal arteritis: jaw claudication, ESR, urgent prednisolone
  • Post-herpetic neuralgia note
5. Trigeminal Neuralgia (TN)
  • Classification: classical / secondary / idiopathic
  • Clinical features: V2/V3 distribution, trigger zones, no sensory loss in classical TN
  • Investigations: MRI brain
  • Treatment: Carbamazepine (1st line) → surgical options (MVD, radiofrequency, Gamma Knife, alcohol block)
  • Dental relevance: TN mimics toothache - avoid unnecessary extractions
6. Facial Nerve Palsy / Bell's Palsy
  • UMN vs LMN distinction table (forehead sparing = UMN)
  • Bell's palsy features, Ramsay Hunt syndrome
  • Causes table (infective, neoplastic, traumatic, systemic)
  • Treatment: Prednisolone within 72 hrs + antivirals; eye care critical
7. Migraine
  • IHS diagnostic criteria (ICHD-3)
  • Aura types, pathophysiology (CSD, trigeminovascular, CGRP)
  • Triggers list
  • Acute treatment table (NSAIDs → triptans → gepants/ditans)
  • Prophylaxis: propranolol, amitriptyline, valproate, anti-CGRP mAbs
  • Dental link: bruxism/TMJ can trigger migraine

Can you give me more detailed notes with including about subtypes information more of all the topics

Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
This is a shared conversation. Sign in to Orris to start your own chat.