Can you please extract high yield points from neurology and organise in easy to remember table in order to pass MRCPI part 2 written mcq bof. Please cover entire neurology as mentioned in the attached book.

Reading File
Running Command

python3 << 'EOF' from pypdf import PdfReader reader = PdfReader("/home/daytona/workspace/attachments/0adc65fb-139f-4bec-8f49-51fd84d737a8/Dr Khaled El Magraby - Step Up to MRCP Review Notes for Part 1 & Part 2 (2015).pdf") print(f"Total pages: {len(reader.pages)}") # Search for neurology section - scan first 20 pages for TOC for i in range(min(25, len(reader.pages))): text = reader.pages[i].extract_text() if text and ('neurol' in text.lower() or 'contents' in text.lower()): print(f"\n--- PAGE {i+1} ---") print(text[:2000]) EOF

Running Command

python3 << 'EOF' from pypdf import PdfReader reader = PdfReader("/home/daytona/workspace/attachments/0adc65fb-139f-4bec-8f49-51fd84d737a8/Dr Khaled El Magraby - Step Up to MRCP Review Notes for Part 1 & Part 2 (2015).pdf") # Chapter 10 Neurology: pages 946-1053 (0-indexed: 945-1052) # The PDF page numbers may differ from book page numbers, let's find the neurology section # Book page 946 = PDF page index... let's search # First, find what PDF page contains "Chapter 10" or "Neurology" heading neuro_start = None neuro_end = None for i in range(900, 1100): text = reader.pages[i].extract_text() if text and 'chapter 10' in text.lower() and 'neurology' in text.lower(): print(f"Found Chapter 10 at PDF page {i+1}") neuro_start = i break if neuro_start: for i in range(neuro_start+1, min(neuro_start+200, len(reader.pages))): text = reader.pages[i].extract_text() if text and 'chapter 11' in text.lower() and 'psychiatry' in text.lower(): print(f"Found Chapter 11 at PDF page {i+1}") neuro_end = i break print(f"Neurology: pages {neuro_start+1} to {neuro_end}") EOF

Running Command

python3 << 'EOF' from pypdf import PdfReader reader = PdfReader("/home/daytona/workspace/attachments/0adc65fb-139f-4bec-8f49-51fd84d737a8/Dr Khaled El Magraby - Step Up to MRCP Review Notes for Part 1 & Part 2 (2015).pdf") # Extract all neurology pages (960 to 1069, 0-indexed) all_text = [] for i in range(960, 1069): text = reader.pages[i].extract_text() if text: all_text.append(f"\n=== PDF PAGE {i+1} ===\n{text}") full_neuro = "\n".join(all_text) print(f"Total characters extracted: {len(full_neuro)}") # Save to file with open("/home/daytona/workspace/neurology_raw.txt", "w", encoding="utf-8") as f: f.write(full_neuro) print("Saved to /home/daytona/workspace/neurology_raw.txt") EOF

Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Writing File

~/MRCP_Neurology_HighYield_Tables.md

# MRCP Part 2 - Neurology High-Yield Tables
### Source: Dr Khaled El Magraby - Step Up to MRCP Review Notes (Chapter 10)

---

## TABLE 1: TIA - ABCD2 Scoring System

| Criterion | Points |
|---|---|
| **A** - Age >= 60 years | 1 |
| **B** - Blood pressure >= 140/90 mmHg | 1 |
| **C** - Clinical: Unilateral weakness | 2 |
| **C** - Clinical: Speech disturbance only (no weakness) | 1 |
| **D** - Duration > 60 minutes | 2 |
| **D** - Duration 10-59 minutes | 1 |
| **D** - Diabetes | 1 |
| **TOTAL** | 7 |

**Score >= 4:** Aspirin 300mg immediately + specialist within 24 hours
**Score <= 3:** Specialist within 1 week
**Crescendo TIA (>= 2 in a week):** Treat as HIGH risk regardless of score

---

## TABLE 2: Antithrombotic Choice

| Condition | First-line Drug |
|---|---|
| TIA | Clopidogrel |
| Ischaemic stroke | Clopidogrel |
| Cannot tolerate clopidogrel | Aspirin + Dipyridamole |

---

## TABLE 3: Stroke - Vascular Territory Deficits

| Artery | Key Deficits |
|---|---|
| **Anterior Cerebral (ACA)** | Contralateral hemiparesis/sensory loss, legs > arms; Akinetic mutism |
| **Middle Cerebral (MCA)** | Contralateral hemiparesis/sensory loss, arms > legs; Contralateral homonymous hemianopia; Wernicke's aphasia; Gaze abnormalities |
| **Posterior Cerebral (PCA)** | Pure hemisensory loss; Contralateral homonymous hemianopia WITH macular sparing; Visual agnosia; Alexia |
| **Basilar/Posterior circulation** | Cerebellar ataxia, diplopia, nystagmus, dysarthria, dysphagia |
| **PICA (lateral medullary - Wallenberg)** | Ipsilateral facial sensory loss + contralateral body sensory loss; Ipsilateral Horner's; Dysphagia; Vertigo; Ataxia |
| **Lacunar (small vessel)** | Pure motor or pure sensory stroke; Ataxic hemiparesis |

---

## TABLE 4: Carotid Artery Dissection - Classic Triad

| Feature | Detail |
|---|---|
| Ipsilateral headache/neck pain | Often sudden onset, young patient |
| Ipsilateral Horner's syndrome | Ptosis + miosis (NO anhydrosis - sweat glands travel with external carotid) |
| Contralateral hemisphere signs | Hemiparesis, aphasia, homonymous hemianopia |

**Key points:**
- 30-80% develop ischaemic neurological features
- Diagnosed by contrast arteriography of neck vessels
- Stenting if ongoing ischaemia
- Migrainous stroke usually affects POSTERIOR circulation (PCA territory)

---

## TABLE 5: Neurosurgical Intervention in Acute Ischaemic Stroke

| Indication | Intervention | Timing |
|---|---|---|
| Age < 60, large MCA territory infarct | Decompressive hemicraniectomy | Within 48 hours |
| Massive cerebellar infarction / hydrocephalus / brainstem compression | Neurosurgical review | Urgent |

---

## TABLE 6: Brain Lobe Lesions - High-Yield Features

| Lobe | Key Features |
|---|---|
| **Frontal** | Expressive (Broca's) aphasia; Anosmia; Personality changes; Disinhibition; Primitive reflexes (grasp, pout, palmomental); Urinary/faecal incontinence; Perseveration; Poor executive skills; 50% of new status epilepticus = frontal lobe tumour |
| **Parietal** | Sensory inattention; Neglect; Apraxia; Astereognosis; Inferior quadrantanopia; **Gerstmann's syndrome (dominant):** Alexia + Acalculia + Agraphia + Dyslexia + Finger agnosia + Right-left disorientation |
| **Temporal** | Wernicke's (receptive) aphasia - fluent speech with neologisms; Superior quadrantanopia; Auditory agnosia; Prosopagnosia; Memory impairment |
| **Occipital** | Homonymous hemianopia (with macular sparing); Visual agnosia; Alexia without agraphia; Anton's syndrome (cortical blindness with denial) |

---

## TABLE 7: Aphasia Types

| Type | Location | Speech | Comprehension |
|---|---|---|---|
| Broca's (Expressive) | Posterior frontal, inferior frontal gyrus | Non-fluent, laboured | Intact |
| Wernicke's (Receptive) | Superior temporal gyrus | Fluent, neologisms, word substitution | Impaired |
| Global aphasia | Large MCA territory | Non-fluent | Impaired |
| Conduction aphasia | Arcuate fasciculus | Fluent, poor repetition | Intact |

---

## TABLE 8: Spastic Paraparesis - Causes

| Category | Examples |
|---|---|
| Cord compression | Trauma, tumour |
| Structural | Parasagittal meningioma, syringomyelia |
| Demyelination | Multiple sclerosis |
| Infective | Transverse myelitis (HIV), Tropical spastic paraparesis |
| Genetic | Hereditary spastic paraplegia |
| Degenerative | Osteoarthritis of cervical spine |

---

## TABLE 9: UMN vs LMN Lesion Features

| Feature | UMN | LMN |
|---|---|---|
| Tone | Increased (spastic) | Decreased (flaccid) |
| Power | Reduced | Reduced |
| Reflexes | Brisk/hyperreflexic | Absent/diminished |
| Plantars | Extensor (Babinski +ve) | Flexor |
| Wasting | Minimal | Present (+ fasciculations) |
| Facial nerve | Forehead SPARED | All facial muscles affected |

---

## TABLE 10: Cranial Nerve VII (Facial) Palsy

| Feature | UMN Lesion | LMN Lesion (Bell's Palsy) |
|---|---|---|
| Forehead | Spared | Affected |
| Taste | Intact | Altered |
| Hyperacusis | Absent | Present (30%) |
| Post-auricular pain | Absent | May precede palsy |
| Eye closure | Intact | Incomplete (risk of corneal damage) |

**Bell's Palsy Management:**
- Prednisolone 25mg BD for 10 days, started within 72 hours of onset
- Acyclovir adds no benefit
- Ramsay Hunt syndrome: vesicular rash around ear (VZV) = LMN palsy
- Facial palsy + convergent squint = PONTINE lesion (VI + VII nerve proximity)

---

## TABLE 11: Parkinson's Disease

| Feature | Details |
|---|---|
| Pathology | Dopaminergic neuron degeneration in substantia nigra |
| Genetics | Parkin gene / UCHL1 mutations |
| Classic Triad | Bradykinesia + Tremor + Rigidity |
| Tremor | Pill-rolling; rest tremor; 3-5 Hz; asymmetric |
| Rigidity | Lead pipe or Cogwheel (tremor superimposed) |
| Gait | Short shuffling steps, reduced arm swing |
| Face | Mask-like facies, hypomimia |
| Other | Micrographia, sialorrhoea, seborrhoea |
| Key point | Asymmetric = idiopathic PD; Symmetric = drug-induced Parkinsonism |

---

## TABLE 12: Parkinsonism - Drug Causes (STOP the drug first!)

| Drug Class | Examples |
|---|---|
| Antipsychotics | Haloperidol, Chlorpromazine, Risperidone |
| Antiemetics | Metoclopramide, Prochlorperazine |
| Antihypertensives | Methyldopa, Reserpine |
| Calcium channel blockers | Flunarizine, Cinnarizine |

---

## TABLE 13: Parkinson's Disease - Drug Treatment

| Drug | Mechanism | Notes |
|---|---|---|
| Levodopa + Carbidopa (Sinemet) | Dopamine precursor | Gold standard; causes dyskinesias long-term; worsens tremor |
| Dopamine agonists (Cabergoline, Ropinirole, Pramipexole) | Direct D2 agonist | First-line in younger patients; impulse control disorder side effect |
| MAO-B inhibitors (Selegiline, Rasagiline) | Inhibit dopamine breakdown | Neuroprotective? |
| COMT inhibitors (Entacapone) | Inhibit L-dopa breakdown | Used with levodopa for 'wearing off' |
| Amantadine | Increases dopamine release | Useful for dyskinesias |
| Anticholinergics (Trihexyphenidyl) | Block Ach | For tremor-predominant disease in young patients |
| Apomorphine | Dopamine agonist | Subcutaneous; for rescue therapy |

---

## TABLE 14: Parkinsonian Plus Syndromes (features differentiating from idiopathic PD)

| Syndrome | Key Distinguishing Features |
|---|---|
| **Multiple System Atrophy (MSA)** | Autonomic failure (postural hypotension, impotence, incontinence); Cerebellar signs; Poor L-dopa response |
| **Progressive Supranuclear Palsy (PSP)** | Vertical gaze palsy (downgaze first); Axial rigidity; Falls early; Dementia |
| **Corticobasal Degeneration (CBD)** | Alien limb phenomenon; Asymmetric apraxia; Cortical sensory loss |
| **Lewy Body Dementia** | Fluctuating cognition; Visual hallucinations; Parkinsonism; REM sleep disorder; Extreme sensitivity to antipsychotics |

---

## TABLE 15: Dementia - Comparison

| Type | Key Features | Investigation/Marker |
|---|---|---|
| **Alzheimer's** | Insidious onset; Memory loss first; Preserved personality early | MRI: medial temporal/hippocampal atrophy; ApoE4 gene |
| **Vascular** | Step-wise deterioration; History of stroke/TIA; CVD risk factors | MRI: multiple infarcts |
| **Lewy Body** | Fluctuating cognition + Visual hallucinations + Parkinsonism | Sensitivity to antipsychotics; DaT scan |
| **Frontotemporal (Pick's)** | Personality change first; Age 45-65; Disinhibition; Primitive reflexes | MRI: frontal atrophy |
| **Normal Pressure Hydrocephalus** | Triad: Dementia + Urinary incontinence + Gait abnormality | CT/MRI: hydrocephalus; treat with VP shunt |
| **CJD** | Rapid progressive dementia; Myoclonus; Cerebellar ataxia; Psychiatric prodrome | EEG: 1-2 Hz PSWCs (sporadic); MRI: pulvinar sign (variant); CSF: 14-3-3 protein |

---

## TABLE 16: CJD - Sporadic vs Variant

| Feature | Sporadic CJD | Variant CJD |
|---|---|---|
| Age | Late 60s | Young (20s-30s) |
| Psychiatric prodrome | Less common | Common (depression, anxiety) |
| EEG | 1-2 Hz PSWCs | Usually NORMAL |
| MRI | Non-specific | Pulvinar sign (bilateral posterior thalamic high signal) >90% |
| CSF | 14-3-3 protein | 14-3-3 protein |
| Prion protein | Brain biopsy | Tonsil biopsy |
| Duration | Median 4 months; 65% die <6 months | Longer |

---

## TABLE 17: Intracranial Haematomas

| Type | Mechanism | Classic History | CT Appearance | Key Point |
|---|---|---|---|---|
| **Extradural (EDH)** | Middle meningeal artery rupture | Head trauma + lucid interval + rapid deterioration | Biconvex (lenticular) hyperdense | Often temporal region; temporal bone fracture |
| **Subdural (SDH)** | Bridging vein rupture | Elderly/alcoholic; minor/forgotten injury; FLUCTUATING consciousness | Crescent-shaped hyperdense | Burr hole drainage |
| **Subarachnoid (SAH)** | Berry aneurysm rupture (85%) | Sudden "thunderclap" worst headache of life | Star-shaped hyperdensity in basal cisterns | CT negative in 5%; LP after 12hrs for xanthochromia |
| **Intracerebral** | Hypertension commonest | Focal signs + headache | Irregular hyperdensity within parenchyma | ECG changes: deep T-wave inversion |

---

## TABLE 18: SAH - Key Facts

| Feature | Details |
|---|---|
| Causes | Berry aneurysm 85%; AVM; Trauma; Tumour |
| Associated conditions | APKD; Ehlers-Danlos syndrome; Coarctation of aorta |
| Investigations | CT first; LP after 12 hours (xanthochromia); Cerebral angiography |
| Complications | Rebleeding (30%); Obstructive hydrocephalus; Vasospasm/cerebral ischaemia |
| Treatment | Nimodipine 60mg/4hr (reduces severity, NOT rebleeding; prevents vasospasm) |
| Posterior communicating artery aneurysm | Compresses CN III: ipsilateral painful 3rd nerve palsy; eye down and out; ptosis; dilated pupil |
| Anterior communicating artery aneurysm | Does NOT compress CN III |

---

## TABLE 19: Epilepsy - Seizure Types and First-Line Drugs

| Seizure Type | First-Line | Second-Line | Notes |
|---|---|---|---|
| **Generalised tonic-clonic** | Sodium valproate | Lamotrigine, Carbamazepine | |
| **Absence (Petit mal)** | Sodium valproate OR Ethosuximide | - | EEG: 3 Hz spike-wave; carbamazepine WORSENS it |
| **Partial (focal)** | Carbamazepine | Lamotrigine, Levetiracetam | |
| **Myoclonic** | Sodium valproate | Lamotrigine, Topiramate | Juvenile myoclonic epilepsy: chromosome 6p |
| **Infantile spasms (West syndrome)** | ACTH / Vigabatrin | - | EEG: hypsarrhythmia |

---

## TABLE 20: When to Start AED - NICE Guidelines

| Start after FIRST seizure if ANY of: |
|---|
| Neurological deficit present |
| Brain imaging shows structural abnormality |
| EEG shows unequivocal epileptic activity |
| Patient considers further seizure risk unacceptable |

**Otherwise:** start after SECOND seizure. Try monotherapy before combination.

---

## TABLE 21: Juvenile Myoclonic Epilepsy (JME)

| Feature | Detail |
|---|---|
| Most common type | Commonest idiopathic generalised epilepsy |
| Genetics | Chromosome 6 (short arm) |
| Precipitants | Alcohol, sleep deprivation, menstruation |
| Treatment | Sodium valproate, Lamotrigine, Topiramate |
| Prognosis | Good if treated; lifelong treatment needed to prevent relapse |

---

## TABLE 22: Status Epilepticus - Management Steps

| Step | Drug/Action |
|---|---|
| 0-10 min | Diazepam IV / Lorazepam IV (or rectal diazepam if no IV access) |
| 10-30 min | Phenytoin IV infusion (with cardiac monitoring) OR Fosphenytoin |
| >30 min | Phenobarbitone IV |
| Refractory | Propofol / Thiopentone / General anaesthesia |

---

## TABLE 23: Migraine

| Feature | Details |
|---|---|
| Diagnostic triad | Headache + Nausea/vomiting + Photophobia/phonophobia |
| Aura | Visual (most common): zigzag fortification spectra; scotoma; reversible |
| Acute treatment | Simple analgesia (aspirin, ibuprofen, paracetamol); Triptans (Sumatriptan); Antiemetics (metoclopramide) |
| Prophylaxis | Propranolol (first-line); Amitriptyline; Topiramate; Sodium valproate; Pizotifen |
| Contraindication | Triptans + SSRI/SNRI = serotonin syndrome risk; OCP contraindicated in migraine with aura (stroke risk) |
| Medication overuse headache | Using analgesia >10 days/month; treat by withdrawing the offending drug |

---

## TABLE 24: Headache Differentials - Quick Reference

| Type | Key Features |
|---|---|
| **Migraine** | Unilateral, throbbing, nausea, aura, lasts 4-72 hrs, family history |
| **Cluster headache** | Male; periorbital pain; lacrimation; rhinorrhoea; short attacks (15-180 min); multiple episodes/day; seasonal |
| **Tension headache** | Bilateral, band-like, non-pulsating, no nausea |
| **Raised ICP headache** | Worse lying flat, morning, coughing/bending; papilloedema |
| **SAH** | Thunderclap headache; worst ever; occipital; meningism |
| **Giant cell arteritis** | Age >50; temporal pain; jaw claudication; elevated ESR/CRP; risk of blindness |
| **Trigeminal neuralgia** | Lancinating shock-like pain; V2/V3; triggered by touch, eating, cold air |

---

## TABLE 25: Cluster Headache Management

| Phase | Treatment |
|---|---|
| Acute | 100% Oxygen; Sumatriptan SC |
| Prophylaxis | Verapamil (first-line); Lithium; Corticosteroids |

---

## TABLE 26: Trigeminal Neuralgia

| Feature | Detail |
|---|---|
| Character | Lancinating, electric-shock like, unilateral |
| Trigger | Touch, eating, cold wind, talking |
| Distribution | V2 (maxillary) and V3 (mandibular) most common; V1 rare |
| Treatment | Carbamazepine (first-line); Phenytoin; Gabapentin; Microvascular decompression |
| Red flags (alternative cause) | Age < 40, bilateral, sensory loss, optic neuritis = think MS |

---

## TABLE 27: Idiopathic Intracranial Hypertension (IIH) / Pseudotumour Cerebri

| Feature | Detail |
|---|---|
| Classic patient | Young, obese female |
| Symptoms | Headache (worse lying flat/morning/coughing); blurred vision; diplopia; pulsatile tinnitus ("whooshing") |
| Signs | Papilloedema; enlarged blind spot; 6th nerve palsy (diplopia); normal plantars |
| Investigations | Normal CT/MRI (normal ventricles); CSF opening pressure >20 cmH2O; normal CSF constituents |
| Drug causes | OCP; Steroids; Tetracycline/Doxycycline; Nitrofurantoin; Vitamin A excess |
| Treatment | Weight loss; Acetazolamide; Repeated LP / LP shunt; Optic nerve sheath decompression |
| Threatening complication | Permanent VISUAL LOSS |

---

## TABLE 28: Vertigo - Differentiation

| Condition | Duration | Key Features | Test | Treatment |
|---|---|---|---|---|
| **BPPV** | 10-20 seconds | Triggered by head position change; nausea | Positive Dix-Hallpike | Epley manoeuvre (80% success); Brandt-Daroff exercises |
| **Meniere's disease** | Minutes to hours | Recurrent vertigo + sensorineural hearing loss + tinnitus + aural fullness; unilateral | Positive Romberg | Prochlorperazine (acute); Betahistine (prophylaxis) |
| **Acute labyrinthitis/Vestibular neuritis** | Days to weeks | Follows URTI; no hearing loss (neuritis); horizontal nystagmus | - | Prochlorperazine; Steroids |
| **Acoustic neuroma** | Gradual | Unilateral sensorineural hearing loss + tinnitus; ABSENT CORNEAL REFLEX | MRI | Surgery/Radiotherapy |

---

## TABLE 29: Tinnitus - Causes

| Cause | Features |
|---|---|
| Meniere's disease | Vertigo + sensorineural hearing loss + aural fullness |
| Otosclerosis | Age 20-40; conductive deafness; normal tympanic membrane; family history; flamingo tinge (10%) |
| Acoustic neuroma | Unilateral sensorineural hearing loss; absent corneal reflex |
| Drug-induced | Aspirin, Quinine, Aminoglycosides, Loop diuretics |
| Pulsatile tinnitus | IIH, arteriovenous fistula, glomus tumour |

---

## TABLE 30: Multiple Sclerosis (MS)

| Feature | Detail |
|---|---|
| Pathology | Demyelination; white matter plaques; disseminated in time and space |
| Common pattern | Relapsing-remitting (RRMS); average time to secondary progressive = 19 years |
| Visual | Optic neuritis; optic atrophy; central scotoma; Uhthoff's phenomenon (vision worsens with heat); Internuclear ophthalmoplegia |
| Motor | Spastic weakness (legs > arms); brisk reflexes; positive plantars; patellar clonus |
| Sensory | Pins & needles; numbness; Lhermitte's sign (paraesthesia on neck flexion); trigeminal neuralgia |
| Cerebellar | Ataxia; intention tremor; dysarthria (DANISH mnemonic) |
| Other | Urinary incontinence/retention; sexual dysfunction; cognitive impairment |

---

## TABLE 31: MS - Investigations

| Investigation | Findings |
|---|---|
| MRI (brain + spinal cord) | T2 high signal periventricular white matter plaques; lesions disseminated in time and space; CT brain WILL NOT show plaques |
| CSF | Oligoclonal bands (NOT in serum = intrathecal IgG synthesis); elevated IgG |
| Visual Evoked Potentials (VEP) | Delayed conduction but well-preserved waveform |

---

## TABLE 32: MS - Treatment

| Phase | Treatment | Notes |
|---|---|---|
| Acute relapse | IV Methylprednisolone x 3-5 days | Shortens relapse duration but does NOT alter final recovery |
| Disease-modifying | Beta-interferon (reduces relapse rate by 30%) | For RRMS; not progressive MS |
| Disease-modifying | Natalizumab (anti-VLA-4) | Risk of PML (JC virus) |
| Spasticity | Baclofen, Tizanidine | |
| Bladder | Oxybutynin (hyperreflexic bladder) | |
| Depression | SSRI | |

---

## TABLE 33: Guillain-Barre Syndrome (GBS)

| Feature | Detail |
|---|---|
| Trigger | Campylobacter jejuni (commonest); EBV; CMV; Mycoplasma; post-vaccination |
| Pathology | Acute inflammatory demyelinating polyneuropathy (AIDP) - ascending |
| Presentation | Ascending symmetrical weakness starting distally; areflexia; autonomic dysfunction |
| Pain | Back pain / limb pain common early |
| Variant | Miller-Fisher syndrome: ophthalmoplegia + ataxia + areflexia (anti-GQ1b antibodies) |
| Investigations | CSF: raised protein, normal white cells (albuminocytological dissociation); NCS: reduced conduction velocity |
| Treatment | IV Immunoglobulin (IVIG) or Plasmapheresis; NOT steroids |
| Monitor | FVC (respiratory failure is life-threatening); ITU if FVC falling |

---

## TABLE 34: Nerve Conduction Studies - Axonal vs Demyelinating

| Parameter | Axonal | Demyelinating |
|---|---|---|
| Conduction velocity | NORMAL | REDUCED (<30 m/s) |
| Amplitude | REDUCED | NORMAL |
| Examples | Diabetes, B12 deficiency, vasculitis, alcohol, uraemia | GBS, CIDP, HSMN type I, paraprotein neuropathy, amiodarone |

---

## TABLE 35: Peripheral Neuropathy - Motor vs Sensory Predominance

| Predominantly MOTOR | Predominantly SENSORY |
|---|---|
| GBS | Diabetes mellitus |
| CIDP | Alcoholism |
| HSMN (Charcot-Marie-Tooth) | Vitamin B12 deficiency |
| Porphyria | Uraemia |
| Lead poisoning | Amyloidosis |
| Diphtheria | Leprosy |

---

## TABLE 36: Myasthenia Gravis (MG)

| Feature | Detail |
|---|---|
| Pathology | Autoimmune; anti-AChR antibodies (85%); anti-MUSK antibodies (rest) |
| Pattern | Fatigable weakness; worsens with use; improves with rest |
| Distribution | Ocular (ptosis, diplopia first); bulbar (dysarthria, dysphagia); proximal limb weakness |
| Thymus | Thymoma in 10-15%; thymic hyperplasia in majority; thymectomy indicated |
| Investigations | Tensilon (Edrophonium) test; Anti-AChR antibodies; CT thorax; EMG (decremental response on repetitive stimulation) |
| Treatment | Pyridostigmine (symptomatic); Prednisolone; Azathioprine; Thymectomy; IVIG/plasmapheresis for crisis |
| Myasthenic crisis | Respiratory failure; treat with IVIG/plasmapheresis |
| Cholinergic crisis | Excess ACh: SLUDGE (salivation, lacrimation, urination, defaecation, GI distress, emesis) + weakness |

---

## TABLE 37: Lambert-Eaton Myasthenic Syndrome (LEMS) vs Myasthenia Gravis

| Feature | Myasthenia Gravis | LEMS |
|---|---|---|
| Antibody | Anti-AChR | Anti-VGCC (voltage-gated calcium channel) |
| Association | Thymoma | Small cell lung cancer (60%) |
| Ocular features | Common (ptosis, diplopia) | Less prominent |
| Reflexes | Normal | Reduced but IMPROVE after exercise |
| Autonomic | Rare | Dry mouth, erectile dysfunction |
| EMG | Decremental on repetitive stimulation | INCREMENTAL on rapid repetitive stimulation |

---

## TABLE 38: Myotonic Dystrophy (Dystrophia Myotonica)

| Feature | DM1 | DM2 |
|---|---|---|
| Gene | DMPK gene, chromosome 19 | ZNF9 gene, chromosome 3 |
| Weakness | DISTAL initially | PROXIMAL initially |
| Inheritance | Autosomal Dominant | Autosomal Dominant |
| Congenital form | Yes | No |
| Shared features | Myotonia; Cataracts; Cardiac (1st degree HB/CHB/cardiomyopathy); Diabetes; Testicular atrophy; Ptosis; Frontal balding; Dysphagia; Dysarthria |

**DM1 Key Mnemonics: Distal, Diabetes, Dysarthria, Dysphagia, Dominant**
**Slow-relaxing handshake = pathognomonic of myotonic dystrophy**

---

## TABLE 39: Muscle Diseases - Comparison

| Disease | Inheritance | Weakness | Key Features |
|---|---|---|---|
| Duchenne MD | X-linked recessive | Proximal, progressive from age 3-5 | Gower's sign; pseudohypertrophy calves; Dx by age 5; wheelchair by ~12; respiratory failure; CK very high |
| Becker MD | X-linked recessive | Later onset; slower progression | Milder than Duchenne; CK high |
| Myotonic Dystrophy (DM1) | Autosomal Dominant | Distal | Myotonia; cataracts; diabetes; heart block |
| Facioscapulohumeral MD | Autosomal Dominant | Face + shoulder girdle | Bilateral facial weakness; winged scapula |
| Limb-Girdle MD | Autosomal Recessive | Proximal shoulder + pelvic girdle | Variable |
| Dermatomyositis | Acquired | Proximal | Heliotrope rash; Gottron's papules; association with malignancy |
| Polymyositis | Acquired | Proximal | No rash; anti-Jo-1 antibodies; interstitial lung disease |

---

## TABLE 40: Hereditary Sensorimotor Neuropathy (HSMN) / Charcot-Marie-Tooth

| Feature | HSMN Type I | HSMN Type II |
|---|---|---|
| Pathology | Demyelinating | Axonal |
| Gene | PMP-22 (myelin protein) | MFN2 |
| Inheritance | Autosomal Dominant | Autosomal Dominant |
| Onset | Puberty | Later |
| Features | Distal muscle wasting; pes cavus; clawed toes; foot drop | Similar but milder |
| NCV | <30 m/s (slow) | Normal (axonal) |

---

## TABLE 41: Motor Neuron Disease (MND)

| Feature | Detail |
|---|---|
| Pathology | Degeneration of upper AND lower motor neurons; spares sensation and sphincters |
| Types | ALS (commonest - mixed UMN+LMN); Progressive muscular atrophy (LMN only); Progressive bulbar palsy; Primary lateral sclerosis (UMN only) |
| Features | Fasciculations + wasting (LMN) + spasticity + brisk reflexes (UMN) = pathognomonic combination; NO sensory loss; NO eye movement disorder; NO sphincter dysfunction |
| Investigation | EMG (denervation + fasciculations); MRI (rule out structural lesion) |
| Treatment | Riluzole (glutamate antagonist; extends survival ~3 months); Multidisciplinary care; NIV for respiratory support |
| Prognosis | Bulbar onset: worst prognosis; mean survival ALS = 2-5 years |

---

## TABLE 42: Subacute Combined Degeneration of Spinal Cord (B12 Deficiency)

| Tract affected | Symptoms |
|---|---|
| Dorsal columns (FIRST) | Loss of joint position sense + vibration sense |
| Lateral corticospinal tracts | Upper motor neuron signs (spasticity, hyperreflexia, extensor plantars) |
| Spinocerebellar | Ataxia |
| Peripheral nerve | Peripheral neuropathy (sensory first) |

**Key point:** Dorsal column affected FIRST (proprioception, vibration) before distal paraesthesia

---

## TABLE 43: Conus Medullaris vs Cauda Equina Syndrome

| Feature | Conus Medullaris | Cauda Equina |
|---|---|---|
| Onset | Sudden, bilateral | Gradual, may be unilateral |
| Reflexes | Knee jerks preserved; ankle jerks affected | Both knee and ankle jerks affected |
| Motor | Symmetrical, hyperreflexic distal paresis; fasciculations possible | Areflexic flaccid paraplegia; atrophy more common |
| Sensory | Perianal area; bilateral symmetrical | Saddle area; often asymmetrical/dermatomal |
| Radicular pain | LESS severe | MORE severe |
| Sphincter | Urinary retention + atonic sphincter early | Later onset |
| Impotence | Frequent | Less marked |
| Back pain | More marked | Less marked |

---

## TABLE 44: Glasgow Coma Scale (GCS)

| Component | Score | Response |
|---|---|---|
| **Eye (E)** | 4 | Spontaneously |
| | 3 | To voice |
| | 2 | To pain |
| | 1 | None |
| **Verbal (V)** | 5 | Orientated |
| | 4 | Confused |
| | 3 | Words only |
| | 2 | Sounds only |
| | 1 | None |
| **Motor (M)** | 6 | Obeys commands |
| | 5 | Localises pain |
| | 4 | Withdraws |
| | 3 | Flexion (decorticate) |
| | 2 | Extension (decerebrate) |
| | 1 | None |

**Minimum = 3; Maximum = 15; Severe TBI = GCS <= 8 (intubate)**

---

## TABLE 45: Horner's Syndrome

| Feature | Signs |
|---|---|
| Classic triad | Ptosis (partial) + Miosis + Anhidrosis |
| Note on anhidrosis | Only present if lesion is at/below superior cervical ganglion (affects facial sweat glands via external carotid plexus) |
| Carotid dissection | Ipsilateral Horner's WITHOUT anhidrosis (sympathetics to sweat glands travel with external carotid; spared in dissection) |
| Causes | Pancoast tumour (apex lung); Carotid dissection; Syringomyelia; Brainstem stroke; Demyelination; Superior sulcus tumour |

---

## TABLE 46: Third Nerve (CN III) Palsy

| Feature | "Medical" (pupil-sparing) | "Surgical" (pupil-involved) |
|---|---|---|
| Pupil | Normal (spared) | Dilated, unreactive |
| Cause | Diabetes mellitus; Hypertension (microvascular ischaemia) | Posterior communicating artery aneurysm; Herniation |
| Pain | Usually painless | Painful (aneurysm) |
| Action | Monitor + manage risk factors | Urgent neurosurgical referral |

**Eye position in CN III palsy:** Down and out (unopposed SO + LR) + ptosis

---

## TABLE 47: Nystagmus - Localisation

| Type | Direction | Cause |
|---|---|---|
| Horizontal nystagmus | Fast phase away from lesion | Peripheral vestibular |
| Vertical nystagmus | Upbeat/downbeat | Central (brainstem/cerebellar) |
| Internuclear ophthalmoplegia (INO) | Failure of adduction on ipsilateral eye; nystagmus in contralateral abducting eye | MLF lesion (MS, vascular) |
| Pendular nystagmus | No fast/slow phase | Congenital or visual loss |

---

## TABLE 48: Neurofibromatosis

| Feature | NF1 (von Recklinghausen's) | NF2 |
|---|---|---|
| Inheritance | Autosomal Dominant | Autosomal Dominant |
| Gene | Chromosome 17 (NF1 gene) | Chromosome 22 (NF2 gene) |
| Hallmark | >= 6 cafe-au-lait spots; Lisch nodules (iris hamartomas); neurofibromas | Bilateral acoustic neuromas (VIII cranial nerve) |
| Complications | Optic glioma; scoliosis; malignant peripheral nerve sheath tumour; phaeochromocytoma; learning difficulties | Meningiomas; cataracts; spinal tumours |

---

## TABLE 49: Tuberous Sclerosis

| Feature | Detail |
|---|---|
| Inheritance | Autosomal Dominant (TSC1 chromosome 9, TSC2 chromosome 16) |
| Classic triad | Epilepsy + Learning disability + Adenoma sebaceum (facial angiofibromas) |
| Skin | Ash-leaf macules (earliest sign, use Wood's lamp); Shagreen patches; periungual fibromas |
| CNS | Cortical tubers; subependymal nodules (may calcify = "candle dripping"); giant cell astrocytoma |
| Other organs | Cardiac rhabdomyomas; renal angiomyolipomas; pulmonary lymphangioleiomyomatosis |

---

## TABLE 50: Von Hippel-Lindau Disease

| Feature | Detail |
|---|---|
| Inheritance | Autosomal Dominant; VHL gene chromosome 3p |
| CNS | Cerebellar haemangioblastoma (commonest); retinal angiomas; spinal haemangioblastoma |
| Non-CNS | Clear cell renal cell carcinoma; phaeochromocytoma; pancreatic cysts/tumours |
| Key association | Erythrocytosis (haemangioblastoma produces EPO) |

---

## TABLE 51: Sturge-Weber Syndrome

| Feature | Detail |
|---|---|
| Inheritance | Sporadic (somatic GNAQ mutation) |
| Hallmark | Port-wine stain (facial naevus flammeus) in V1 trigeminal distribution |
| CNS | Leptomeningeal angioma; cortical calcification ("tram-track" on CT); epilepsy; hemiplegia; glaucoma |
| Treatment | Anticonvulsants; laser for port-wine stain; surgery for refractory epilepsy |

---

## TABLE 52: Wernicke's Encephalopathy (Thiamine/Vit B1 Deficiency)

| Feature | Detail |
|---|---|
| Classic triad | Confusion + Ophthalmoplegia (CN VI palsy, nystagmus) + Ataxia |
| Cause | Alcohol; malnutrition; hyperemesis gravidarum; bariatric surgery |
| Treatment | IV thiamine (Pabrinex) BEFORE giving glucose |
| Progression | If untreated -> Korsakoff's syndrome (anterograde amnesia + confabulation) |
| Key point | Never give glucose without thiamine first in alcoholic patients |

---

## TABLE 53: Cervical Myelopathy / Cord Compression

| Level | Motor (LMN at level; UMN below) | Sensory | Reflex |
|---|---|---|---|
| C5 | Deltoid, biceps weakness | Lateral arm | Biceps reflex absent |
| C6 | Wrist extensors weakness | Lateral forearm, thumb | Supinator reflex absent |
| C7 | Triceps, wrist flexors | Middle finger | Triceps reflex absent |
| C8 | Small hand muscles (intrinsics) | Ring/little finger | - |
| T1 | Interossei | Medial forearm | - |

---

## TABLE 54: Brown-Sequard Syndrome (Hemisection of Cord)

| Side | Below Lesion | Features |
|---|---|---|
| IPSILATERAL | UMN weakness | Spastic paresis below lesion |
| IPSILATERAL | Dorsal column loss | Loss of proprioception + vibration |
| CONTRALATERAL | Spinothalamic loss | Loss of pain + temperature (2-3 levels below) |

---

## TABLE 55: CSF Analysis Summary

| Condition | Appearance | Pressure | WBC | Protein | Glucose | Other |
|---|---|---|---|---|---|---|
| Normal | Clear | 10-20 cmH2O | <5 lymphocytes | 0.15-0.45 g/L | 2.5-4.5 mmol/L (>60% blood glucose) | - |
| Bacterial meningitis | Turbid/purulent | Raised | Neutrophils (>1000) | Raised (>1 g/L) | Very low (<2 mmol/L) | Gram stain +ve |
| Viral meningitis | Clear | Normal/slightly raised | Lymphocytes (<500) | Mildly raised | Normal | - |
| TB meningitis | Turbid/xanthochromic | Raised | Lymphocytes | Raised | Very low | AFB; fibrin web |
| SAH | Xanthochromic | Raised | Red cells / xanthochromia after 12h | Raised | Normal | Xanthochromia (bilirubin) |
| MS | Clear | Normal | Normal | Slightly raised | Normal | Oligoclonal bands (not in serum) |
| GBS | Clear | Normal | Normal | VERY HIGH | Normal | Albuminocytological dissociation |
| CJD | Clear | Normal | Normal | Raised | Normal | 14-3-3 protein |
| IIH | Clear | >20 cmH2O | Normal | Normal | Normal | Normal cells; normal ventricles on imaging |

---

## TABLE 56: Important High-Yield MRCP Neurology Facts

| Fact | High-Yield Point |
|---|---|
| Optic neuritis + young patient | Think MS until proven otherwise |
| Internuclear ophthalmoplegia (INO) | Pathognomonic of MS in young patient; MLF lesion |
| Lhermitte's sign | Electric sensation down spine on neck flexion = MS |
| Uhthoff's phenomenon | Vision worsens after hot bath/exercise = MS |
| Thunderclap headache | SAH until proven otherwise; CT then LP after 12 hrs |
| Xanthochromia | SAH diagnosis; only appears >12 hrs after bleed |
| Nimodipine in SAH | Prevents vasospasm; does NOT reduce rebleeding |
| Extradural haematoma | Lucid interval; temporal bone fracture; biconvex on CT |
| Subdural haematoma | Fluctuating consciousness; elderly/alcoholic; crescent CT |
| Cauda equina syndrome | Bilateral leg weakness + saddle anaesthesia + sphincter dysfunction = MRI urgently; neurosurgery |
| Myasthenic crisis | FVC monitoring; IVIG/plasmapheresis; NOT steroids acutely |
| LEMS | Small cell lung cancer; improves with repetitive use (contrast with MG) |
| Normal Pressure Hydrocephalus | Wet (incontinence) + Wobbly (gait) + Wacky (dementia) |
| Miller-Fisher variant GBS | Anti-GQ1b antibody; ophthalmoplegia + ataxia + areflexia |
| Albuminocytological dissociation | GBS (high protein, normal cells in CSF) |
| Pulvinar sign on MRI | Variant CJD (bilateral posterior thalamic hyperintensity) |
| 3 Hz spike-wave on EEG | Absence seizures (petit mal) |
| Hypsarrhythmia on EEG | West syndrome (infantile spasms) |
| Carbamazepine worsens | Absence seizures and juvenile myoclonic epilepsy |
| Bell's palsy | Prednisolone within 72 hrs; acyclovir adds no benefit |
| Acute angle-closure glaucoma | Headache + halos + fixed mid-dilated pupil + red eye + nausea = emergency |
| Phenytoin toxicity | Nystagmus (first sign) -> ataxia -> diplopia -> drowsiness |
| Slow-relaxing handshake | Myotonic dystrophy (DM1) |
| Cataracts in young + ptosis + glycosuria | Myotonic dystrophy (DM1) |
| Absent corneal reflex + acoustic neuroma | CN V compressed at cerebellopontine angle |
| CN VI palsy | Raised ICP (false localising sign; longest intracranial course) |
| Pes cavus + distal wasting | HSMN (Charcot-Marie-Tooth disease) |
| Fasciculations + brisk reflexes + no sensory loss | MND (ALS) |
| 50% of new status epilepticus (no prior Hx) | Frontal lobe tumour |
| Vasospasm after SAH | Treat with Nimodipine; peak risk 4-10 days post bleed |

---

*Source: Dr Khaled El Magraby - Step Up to MRCP Review Notes, Chapter 10: Neurology (Pages 946-1053)*
*Compiled for MRCPI Part 2 Written MCQ (BOF) Revision*

MRCP Neurology HighYield Tables

MD File · MD

Here is your complete MRCP Part 2 Neurology high-yield revision resource. Here's a summary of what's covered across 56 tables:

What's Included

Stroke & Cerebrovascular

  • Tables 1-5: TIA ABCD2 scoring, antithrombotic choice, vascular territory deficits, carotid dissection triad, neurosurgical indications

Neuroanatomy & Localisation

  • Tables 6-8: Lobe lesions (frontal/parietal/temporal/occipital), aphasia types (Broca vs Wernicke), spastic paraparesis causes

Movement Disorders

  • Tables 11-14: Parkinson's features, drug-induced Parkinsonism, drug treatment options, Parkinson-plus syndromes (MSA, PSP, CBD, Lewy Body)

Dementia & Cognitive

  • Tables 15-16: Dementia comparison, CJD sporadic vs variant, pulvinar sign, 14-3-3 protein

Intracranial Haemorrhage

  • Tables 17-18: EDH vs SDH vs SAH vs intracerebral, SAH management, Nimodipine, aneurysm-CN III relationship

Epilepsy

  • Tables 19-22: Seizure types with first-line drugs, when to start AED, JME, status epilepticus ladder

Headache

  • Tables 23-26: Migraine, cluster, tension, SAH, GCA, trigeminal neuralgia - all compared

MS & Demyelination

  • Tables 30-32: MS features, investigations (oligoclonal bands, VEP, MRI), treatment

Neuromuscular

  • Tables 33-40: GBS, nerve conduction studies, MG vs LEMS, myotonic dystrophy, muscular dystrophies, HSMN/Charcot-Marie-Tooth

Spinal Cord

  • Tables 42-43: Subacute combined degeneration (B12), conus medullaris vs cauda equina

Neurocutaneous Syndromes

  • Tables 48-51: NF1, NF2, Tuberous Sclerosis, Von Hippel-Lindau, Sturge-Weber

CSF & Special Topics

  • Tables 45-56: Horner's, CN III palsy, IIH, GCS, CSF analysis across all conditions, and a "master fact sheet" of 30+ must-know MRCP exam pearls

Create a quick-reference PDF cheat sheet (2-3 pages) with the top 30 facts

Reading File
Running Command

python3 -c "from reportlab.lib.pagesizes import A4; print('reportlab ok')" && python3 -c "from reportlab.platypus import SimpleDocTemplate; print('platypus ok')"

Writing File

~/build_neuro_cheatsheet.py

from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import mm, cm
from reportlab.lib.styles import ParagraphStyle
from reportlab.platypus import (
    SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
    HRFlowable, KeepTogether
)
from reportlab.lib.enums import TA_CENTER, TA_LEFT
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont

OUTPUT = "/home/daytona/workspace/MRCP_Neurology_Top30_CheatSheet.pdf"

PAGE_W, PAGE_H = A4
MARGIN = 1.2 * cm

# ── Colour palette ──────────────────────────────────────────────────────────
DARK_BLUE   = colors.HexColor("#1a3a5c")
MED_BLUE    = colors.HexColor("#2563a8")
LIGHT_BLUE  = colors.HexColor("#dbeafe")
TEAL        = colors.HexColor("#0d6e6e")
TEAL_LIGHT  = colors.HexColor("#ccf2f2")
ORANGE      = colors.HexColor("#c05621")
ORANGE_LIGHT= colors.HexColor("#feecdc")
RED         = colors.HexColor("#9b1c1c")
RED_LIGHT   = colors.HexColor("#fde8e8")
GREEN       = colors.HexColor("#155724")
GREEN_LIGHT = colors.HexColor("#d4edda")
YELLOW      = colors.HexColor("#856404")
YELLOW_LIGHT= colors.HexColor("#fff3cd")
WHITE       = colors.white
GREY_BG     = colors.HexColor("#f1f5f9")
GREY_LINE   = colors.HexColor("#cbd5e1")
DARK_TEXT   = colors.HexColor("#1e293b")

# ── Styles ───────────────────────────────────────────────────────────────────
def S(name, **kw):
    return ParagraphStyle(name, **kw)

TITLE_S = S("title", fontSize=18, fontName="Helvetica-Bold",
            textColor=WHITE, alignment=TA_CENTER, leading=22)
SUB_S   = S("sub",   fontSize=9,  fontName="Helvetica",
            textColor=WHITE, alignment=TA_CENTER, leading=12)
SEC_S   = S("sec",   fontSize=8.5,fontName="Helvetica-Bold",
            textColor=WHITE, alignment=TA_LEFT, leading=11)
BODY_S  = S("body",  fontSize=7.5,fontName="Helvetica",
            textColor=DARK_TEXT, leading=10.5)
BOLD_S  = S("bold",  fontSize=7.5,fontName="Helvetica-Bold",
            textColor=DARK_TEXT, leading=10.5)
FOOT_S  = S("foot",  fontSize=6.5,fontName="Helvetica-Oblique",
            textColor=colors.grey, alignment=TA_CENTER)
NUM_S   = S("num",   fontSize=9,  fontName="Helvetica-Bold",
            textColor=WHITE, alignment=TA_CENTER, leading=12)
KEY_S   = S("key",   fontSize=7,  fontName="Helvetica-Bold",
            textColor=MED_BLUE, leading=10)

# ── Helper: section header banner ────────────────────────────────────────────
def sec_header(text, bg=DARK_BLUE, w=None):
    if w is None:
        w = PAGE_W - 2*MARGIN
    t = Table([[Paragraph(text, SEC_S)]], colWidths=[w])
    t.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), bg),
        ("ROUNDEDCORNERS", [4,4,4,4]),
        ("TOPPADDING",    (0,0),(-1,-1), 3),
        ("BOTTOMPADDING", (0,0),(-1,-1), 3),
        ("LEFTPADDING",   (0,0),(-1,-1), 6),
    ]))
    return t

# ── Helper: 2-col fact table ─────────────────────────────────────────────────
def fact_table(rows, col1=95*mm, col2=None, header=None, bg=LIGHT_BLUE, hdr_bg=MED_BLUE):
    usable = PAGE_W - 2*MARGIN
    col2 = col2 or (usable - col1)
    data = []
    if header:
        data.append([Paragraph(f"<b>{header[0]}</b>", S("hh", fontSize=7.5,
                    fontName="Helvetica-Bold", textColor=WHITE)),
                     Paragraph(f"<b>{header[1]}</b>", S("hh2", fontSize=7.5,
                    fontName="Helvetica-Bold", textColor=WHITE))])
    for r in rows:
        data.append([
            Paragraph(str(r[0]), BOLD_S),
            Paragraph(str(r[1]), BODY_S)
        ])
    style = [
        ("GRID",          (0,0),(-1,-1), 0.4, GREY_LINE),
        ("ROWBACKGROUNDS",(0,0),(-1,-1), [WHITE, GREY_BG]),
        ("TOPPADDING",    (0,0),(-1,-1), 2.5),
        ("BOTTOMPADDING", (0,0),(-1,-1), 2.5),
        ("LEFTPADDING",   (0,0),(-1,-1), 4),
        ("RIGHTPADDING",  (0,0),(-1,-1), 4),
        ("VALIGN",        (0,0),(-1,-1), "TOP"),
    ]
    if header:
        style += [
            ("BACKGROUND",   (0,0),(-1,0), hdr_bg),
            ("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE, GREY_BG]),
        ]
    t = Table(data, colWidths=[col1, col2])
    t.setStyle(TableStyle(style))
    return t

# ── Helper: numbered badge row ───────────────────────────────────────────────
def badge_row(n, label, detail, accent=MED_BLUE, accent_light=LIGHT_BLUE):
    badge = Table([[Paragraph(str(n), NUM_S)]], colWidths=[7*mm], rowHeights=[7*mm])
    badge.setStyle(TableStyle([
        ("BACKGROUND",    (0,0),(-1,-1), accent),
        ("ROUNDEDCORNERS",[3,3,3,3]),
        ("TOPPADDING",    (0,0),(-1,-1), 0),
        ("BOTTOMPADDING", (0,0),(-1,-1), 0),
        ("LEFTPADDING",   (0,0),(-1,-1), 0),
        ("RIGHTPADDING",  (0,0),(-1,-1), 0),
        ("ALIGN",         (0,0),(-1,-1), "CENTER"),
        ("VALIGN",        (0,0),(-1,-1), "MIDDLE"),
    ]))
    usable = PAGE_W - 2*MARGIN - 9*mm
    inner = Table(
        [[Paragraph(f"<b>{label}</b>", S("lbl", fontSize=7.5, fontName="Helvetica-Bold",
                                          textColor=accent, leading=10)),
          Paragraph(detail, BODY_S)]],
        colWidths=[52*mm, usable-52*mm]
    )
    inner.setStyle(TableStyle([
        ("BACKGROUND",    (0,0),(-1,-1), accent_light),
        ("TOPPADDING",    (0,0),(-1,-1), 2.5),
        ("BOTTOMPADDING", (0,0),(-1,-1), 2.5),
        ("LEFTPADDING",   (0,0),(-1,-1), 4),
        ("RIGHTPADDING",  (0,0),(-1,-1), 4),
        ("VALIGN",        (0,0),(-1,-1), "TOP"),
        ("LINEAFTER",     (0,0),(0,-1),  0.5, accent),
    ]))
    row = Table([[badge, inner]], colWidths=[9*mm, usable+2*mm])
    row.setStyle(TableStyle([
        ("TOPPADDING",    (0,0),(-1,-1), 1),
        ("BOTTOMPADDING", (0,0),(-1,-1), 1),
        ("LEFTPADDING",   (0,0),(-1,-1), 0),
        ("RIGHTPADDING",  (0,0),(-1,-1), 0),
        ("VALIGN",        (0,0),(-1,-1), "TOP"),
    ]))
    return row

# ════════════════════════════════════════════════════════════════════════════
#  DOCUMENT BUILD
# ════════════════════════════════════════════════════════════════════════════
doc = SimpleDocTemplate(
    OUTPUT, pagesize=A4,
    leftMargin=MARGIN, rightMargin=MARGIN,
    topMargin=MARGIN, bottomMargin=MARGIN
)

story = []
usable_w = PAGE_W - 2*MARGIN

# ── TITLE BLOCK ──────────────────────────────────────────────────────────────
title_data = [[
    Paragraph("MRCP PART 2 NEUROLOGY", TITLE_S),
    Paragraph("TOP 30 HIGH-YIELD FACTS  |  Quick-Reference Cheat Sheet", SUB_S),
    Paragraph("Source: El Magraby Step Up to MRCP Review Notes, Chapter 10", SUB_S),
]]
title_tbl = Table(title_data, colWidths=[usable_w])
title_tbl.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), 8),
    ("ROUNDEDCORNERS",[5,5,5,5]),
]))
story.append(title_tbl)
story.append(Spacer(1, 4*mm))

# ════════════════════════════════════════════════════════════════════════════
#  PAGE 1  –  FACTS 1–15  (stroke / headache / epilepsy / Parkinson's / MS)
# ════════════════════════════════════════════════════════════════════════════

# ── SECTION A: STROKE & CEREBROVASCULAR ─────────────────────────────────────
story.append(sec_header("▶  A  |  STROKE & CEREBROVASCULAR", bg=DARK_BLUE))
story.append(Spacer(1, 1.5*mm))

stroke_facts = [
    (1, "TIA ABCD² ≥ 4",
     "Aspirin 300 mg immediately + specialist assessment within <b>24 hours</b>. "
     "Score ≤ 3: specialist within 1 week. Crescendo TIA (≥ 2/week) = always HIGH risk."),
    (2, "Antiplatelet of choice",
     "<b>Clopidogrel</b> first-line for both TIA and ischaemic stroke. "
     "If intolerant: Aspirin + Dipyridamole."),
    (3, "MCA stroke vs ACA stroke",
     "<b>MCA:</b> arm > leg weakness; homonymous hemianopia; Wernicke's aphasia; gaze deviation. "
     "<b>ACA:</b> leg > arm weakness; akinetic mutism; incontinence."),
    (4, "Carotid dissection triad",
     "Ipsilateral <b>headache/neck pain</b> + ipsilateral <b>Horner's</b> (no anhidrosis—sweat glands travel "
     "with external carotid, spared) + <b>contralateral hemiparesis</b>. Diagnose: contrast arteriography."),
    (5, "Thunderclap headache",
     "<b>SAH until proven otherwise.</b> CT brain first; if negative → LP <b>after 12 hours</b> for "
     "xanthochromia (bilirubin). Posterior communicating artery aneurysm → painful CN III palsy "
     "(eye down-and-out, dilated pupil, ptosis)."),
    (6, "Nimodipine in SAH",
     "Reduces <b>vasospasm severity</b> (60 mg/4 hr). Does <b>NOT</b> reduce rebleeding. "
     "ECG changes after intracranial bleed: deep symmetrical T-wave inversion."),
    (7, "Extradural vs Subdural haematoma",
     "<b>EDH:</b> lucid interval → rapid deterioration; biconvex CT; middle meningeal artery; "
     "temporal bone fracture. "
     "<b>SDH:</b> elderly/alcoholic; FLUCTUATING consciousness; crescent CT; bridging veins; burr hole."),
]

for n, label, detail in stroke_facts:
    story.append(badge_row(n, label, detail, accent=MED_BLUE, accent_light=LIGHT_BLUE))
    story.append(Spacer(1, 1*mm))

story.append(Spacer(1, 2*mm))

# ── SECTION B: HEADACHE ──────────────────────────────────────────────────────
story.append(sec_header("▶  B  |  HEADACHE", bg=TEAL))
story.append(Spacer(1, 1.5*mm))

headache_facts = [
    (8, "Migraine with aura → OCP",
     "<b>OCP is contraindicated</b> in migraine with aura (stroke risk ↑). "
     "Acute: Triptans (Sumatriptan) + NSAID + antiemetic. "
     "Prophylaxis: <b>Propranolol</b> first-line; also Amitriptyline, Topiramate."),
    (9, "Cluster headache",
     "Male; severe periorbital pain; lacrimation; rhinorrhoea; lasts 15–180 min; occurs in clusters. "
     "Acute: <b>100% O₂ + SC Sumatriptan.</b> Prophylaxis: <b>Verapamil</b> first-line."),
    (10, "Idiopathic intracranial hypertension (IIH)",
     "Young <b>obese female</b>; headache worse lying flat; papilloedema; CN VI palsy (diplopia); "
     "normal CT ventricles; CSF opening pressure >20 cmH₂O. "
     "Drug causes: OCP, tetracycline, vitamin A, steroids, nitrofurantoin. "
     "Treat: weight loss, acetazolamide, LP shunt. Threat: permanent <b>visual loss</b>."),
]
for n, label, detail in headache_facts:
    story.append(badge_row(n, label, detail, accent=TEAL, accent_light=TEAL_LIGHT))
    story.append(Spacer(1, 1*mm))

story.append(Spacer(1, 2*mm))

# ── SECTION C: EPILEPSY ──────────────────────────────────────────────────────
story.append(sec_header("▶  C  |  EPILEPSY", bg=ORANGE))
story.append(Spacer(1, 1.5*mm))

epilepsy_data = [
    ["Seizure Type", "First-Line Drug", "Key Fact"],
    ["Generalised tonic-clonic", "Sodium valproate", "2nd line: Lamotrigine, Carbamazepine"],
    ["Absence (Petit mal)", "Sodium valproate OR Ethosuximide", "EEG: 3 Hz spike-wave. Carbamazepine WORSENS it!"],
    ["Focal/Partial", "Carbamazepine", "2nd line: Lamotrigine, Levetiracetam"],
    ["Juvenile myoclonic (JME)", "Sodium valproate", "Chromosome 6p; lifelong treatment needed"],
    ["Infantile spasms (West)", "ACTH / Vigabatrin", "EEG: hypsarrhythmia; poor prognosis"],
    ["Status epilepticus", "Lorazepam IV → Phenytoin IV → Phenobarbitone", "Propofol/GA if refractory"],
]
ep_tbl = Table(epilepsy_data, colWidths=[48*mm, 52*mm, usable_w-100*mm])
ep_tbl.setStyle(TableStyle([
    ("BACKGROUND",    (0,0),(-1,0), ORANGE),
    ("TEXTCOLOR",     (0,0),(-1,0), WHITE),
    ("FONTNAME",      (0,0),(-1,0), "Helvetica-Bold"),
    ("FONTSIZE",      (0,0),(-1,-1), 7.5),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE, ORANGE_LIGHT]),
    ("GRID",          (0,0),(-1,-1), 0.4, GREY_LINE),
    ("TOPPADDING",    (0,0),(-1,-1), 2.5),
    ("BOTTOMPADDING", (0,0),(-1,-1), 2.5),
    ("LEFTPADDING",   (0,0),(-1,-1), 4),
    ("VALIGN",        (0,0),(-1,-1), "TOP"),
]))
story.append(ep_tbl)

story.append(Spacer(1, 1.5*mm))
story.append(badge_row(
    11, "Start AED after 1st seizure if:",
    "Neurological deficit present | Structural abnormality on imaging | "
    "Unequivocal epileptiform EEG | Patient considers further seizure risk unacceptable. "
    "Otherwise start after <b>second</b> seizure.",
    accent=ORANGE, accent_light=ORANGE_LIGHT))

story.append(Spacer(1, 2*mm))

# ── SECTION D: PARKINSON'S ───────────────────────────────────────────────────
story.append(sec_header("▶  D  |  PARKINSON'S DISEASE", bg=colors.HexColor("#4a1d96")))
story.append(Spacer(1, 1.5*mm))

pd_facts = [
    (12, "Classic triad",
     "<b>Bradykinesia + Tremor (pill-rolling, 3–5 Hz, rest, asymmetric) + Rigidity (lead-pipe/cogwheel).</b> "
     "Asymmetric onset → idiopathic PD. Symmetric onset → drug-induced Parkinsonism."),
    (13, "Drug-induced Parkinsonism",
     "Antipsychotics (haloperidol, risperidone); Metoclopramide; Prochlorperazine; Methyldopa. "
     "<b>Stop the offending drug first.</b>"),
    (14, "PD treatment summary",
     "<b>Levodopa+Carbidopa</b> – gold standard, causes dyskinesias long-term. "
     "<b>Dopamine agonists</b> (ropinirole) – first-line in young patients; impulse-control disorder risk. "
     "<b>COMT inhibitors</b> (entacapone) – add for 'wearing off'. "
     "<b>Amantadine</b> – reduces dyskinesias."),
    (15, "Parkinson-plus syndromes",
     "<b>MSA:</b> autonomic failure + cerebellar signs; poor L-dopa response. "
     "<b>PSP:</b> vertical (downgaze) palsy + falls + axial rigidity. "
     "<b>Lewy Body dementia:</b> fluctuating cognition + visual hallucinations + extreme antipsychotic sensitivity. "
     "<b>CBD:</b> alien limb phenomenon + asymmetric apraxia."),
]
PURPLE      = colors.HexColor("#4a1d96")
PURPLE_LIGHT= colors.HexColor("#ede9fe")
for n, label, detail in pd_facts:
    story.append(badge_row(n, label, detail, accent=PURPLE, accent_light=PURPLE_LIGHT))
    story.append(Spacer(1, 1*mm))

# ════════════════════════════════════════════════════════════════════════════
#  PAGE 2  –  FACTS 16–30
# ════════════════════════════════════════════════════════════════════════════
story.append(Spacer(1, 3*mm))
story.append(HRFlowable(width=usable_w, thickness=0.5, color=GREY_LINE))
story.append(Spacer(1, 2*mm))

# ── SECTION E: MULTIPLE SCLEROSIS ────────────────────────────────────────────
story.append(sec_header("▶  E  |  MULTIPLE SCLEROSIS", bg=TEAL))
story.append(Spacer(1, 1.5*mm))

ms_facts = [
    (16, "MS pathognomonic signs",
     "<b>Internuclear ophthalmoplegia (INO)</b> = MLF lesion; failure of adduction + contralateral nystagmus. "
     "<b>Lhermitte's sign</b> = electric paraesthesia on neck flexion. "
     "<b>Uhthoff's phenomenon</b> = vision worsens after hot bath/exercise."),
    (17, "MS diagnosis",
     "Lesions disseminated in <b>time and space</b>. "
     "<b>MRI:</b> T2 periventricular white matter plaques (CT will NOT show them). "
     "<b>CSF:</b> oligoclonal bands (NOT in serum) + ↑ intrathecal IgG. "
     "<b>VEP:</b> delayed but preserved waveform."),
    (18, "MS treatment",
     "Acute relapse: <b>IV methylprednisolone</b> 3–5 days (shortens relapse; does NOT alter recovery). "
     "Disease-modifying: <b>Beta-interferon</b> (reduces relapse rate ~30%; only RRMS). "
     "Natalizumab (anti-VLA-4): risk of <b>PML</b> (JC virus reactivation)."),
]
for n, label, detail in ms_facts:
    story.append(badge_row(n, label, detail, accent=TEAL, accent_light=TEAL_LIGHT))
    story.append(Spacer(1, 1*mm))

story.append(Spacer(1, 2*mm))

# ── SECTION F: NEUROMUSCULAR ─────────────────────────────────────────────────
story.append(sec_header("▶  F  |  NEUROMUSCULAR DISORDERS", bg=colors.HexColor("#7c3409")))
story.append(Spacer(1, 1.5*mm))

BROWN       = colors.HexColor("#7c3409")
BROWN_LIGHT = colors.HexColor("#fef3c7")

nm_facts = [
    (19, "GBS – key facts",
     "Trigger: <b>Campylobacter jejuni</b> (commonest), EBV, CMV. "
     "Ascending symmetrical weakness + areflexia + autonomic dysfunction. "
     "<b>CSF:</b> raised protein, normal cells (albuminocytological dissociation). "
     "Treat: <b>IVIG or plasmapheresis</b> (NOT steroids). Monitor <b>FVC</b> for respiratory failure. "
     "Miller-Fisher variant: ophthalmoplegia + ataxia + areflexia (<b>anti-GQ1b Ab</b>)."),
    (20, "MG vs LEMS",
     "<b>MG:</b> anti-AChR Ab; thymoma; ocular features (ptosis, diplopia); "
     "weakness worse with use; <b>decremental</b> EMG. Treat: pyridostigmine, steroids, thymectomy. "
     "<b>LEMS:</b> anti-VGCC Ab; <b>small cell lung cancer</b>; reflexes improve after exercise; "
     "dry mouth; <b>incremental</b> EMG."),
    (21, "Myotonic dystrophy DM1",
     "<b>Slow-relaxing handshake</b> = pathognomonic. Distal weakness; frontal balding; bilateral ptosis; "
     "cataracts (loss of red reflex); cardiac (1st degree HB → CHB); diabetes; testicular atrophy. "
     "DMPK gene chromosome 19. Autosomal dominant."),
    (22, "Nerve conduction: axonal vs demyelinating",
     "<b>Axonal:</b> normal velocity, <b>reduced amplitude</b> "
     "(DM, B12 def, alcohol, uraemia, vasculitis). "
     "<b>Demyelinating:</b> <b>reduced velocity</b> (<30 m/s), normal amplitude "
     "(GBS, CIDP, HSMN I, amiodarone)."),
]
for n, label, detail in nm_facts:
    story.append(badge_row(n, label, detail, accent=BROWN, accent_light=BROWN_LIGHT))
    story.append(Spacer(1, 1*mm))

story.append(Spacer(1, 2*mm))

# ── SECTION G: DEMENTIA & COGNITIVE ──────────────────────────────────────────
story.append(sec_header("▶  G  |  DEMENTIA & COGNITIVE DISORDERS", bg=RED))
story.append(Spacer(1, 1.5*mm))

dem_facts = [
    (23, "Dementia differentiation",
     "<b>Alzheimer's:</b> insidious, memory first, hippocampal atrophy on MRI. "
     "<b>Vascular:</b> stepwise, CVD history. "
     "<b>Lewy Body:</b> fluctuating cognition + visual hallucinations + Parkinsonism; "
     "extreme antipsychotic sensitivity. "
     "<b>Frontotemporal (Pick's):</b> age 45–65; personality change first; primitive reflexes."),
    (24, "Normal Pressure Hydrocephalus (NPH)",
     "Classic <b>'Wet, Wobbly, Wacky'</b> triad: "
     "urinary incontinence + gait abnormality + dementia. "
     "Imaging: hydrocephalus with enlarged 4th ventricle. "
     "Treat: <b>ventriculo-peritoneal (VP) shunt</b>."),
    (25, "CJD – sporadic vs variant",
     "<b>Sporadic:</b> age ~60s; rapid progressive dementia + myoclonus + ataxia; "
     "EEG: 1–2 Hz periodic sharp wave complexes; CSF: <b>14-3-3 protein</b>. "
     "<b>Variant (vCJD):</b> young (20s–30s); psychiatric prodrome; EEG normal; "
     "MRI: <b>pulvinar sign</b> (bilateral posterior thalamic high signal, >90%); tonsil biopsy for prion protein."),
]
for n, label, detail in dem_facts:
    story.append(badge_row(n, label, detail, accent=RED, accent_light=RED_LIGHT))
    story.append(Spacer(1, 1*mm))

story.append(Spacer(1, 2*mm))

# ── SECTION H: NEUROANATOMY PEARLS ───────────────────────────────────────────
story.append(sec_header("▶  H  |  NEUROANATOMY & CRANIAL NERVE PEARLS", bg=colors.HexColor("#065f46")))
story.append(Spacer(1, 1.5*mm))

GREEN2       = colors.HexColor("#065f46")
GREEN2_LIGHT = colors.HexColor("#d1fae5")

anat_facts = [
    (26, "CN III palsy: surgical vs medical",
     "<b>Surgical (pupil dilated + painful):</b> posterior communicating artery aneurysm → urgent neurosurgery. "
     "<b>Medical (pupil-sparing + painless):</b> diabetes/hypertension microvascular ischaemia → manage risk factors. "
     "Eye position: down-and-out + ptosis."),
    (27, "Horner's syndrome",
     "Ptosis + Miosis + Anhidrosis. "
     "<b>Carotid dissection → NO anhidrosis</b> (sweat glands travel with external carotid, spared). "
     "Causes: Pancoast tumour, carotid dissection, syringomyelia, brainstem stroke, demyelination."),
    (28, "Wernicke's encephalopathy",
     "Classic triad: <b>Confusion + Ophthalmoplegia + Ataxia</b> (thiamine/B1 deficiency). "
     "Causes: alcohol, malnutrition, hyperemesis, bariatric surgery. "
     "<b>Give IV thiamine (Pabrinex) BEFORE glucose</b> – glucose alone can precipitate/worsen it. "
     "If untreated → Korsakoff's (anterograde amnesia + confabulation)."),
    (29, "Brown-Séquard syndrome",
     "Hemisection of cord: "
     "<b>Ipsilateral</b> UMN weakness + dorsal column loss (proprioception/vibration). "
     "<b>Contralateral</b> spinothalamic loss (pain + temperature, 2–3 levels below). "
     "Mnemonic: same-side strength & sensation loss (proprioception); "
     "opposite-side pain & temperature loss."),
    (30, "Subacute combined degeneration (B12)",
     "Dorsal columns affected <b>FIRST</b> (joint position, vibration) then lateral corticospinal tracts "
     "(UMN signs). Gives: loss of proprioception/vibration + spasticity + extensor plantars. "
     "Treat with IM hydroxocobalamin. Also: <b>pernicious anaemia</b> (anti-IF Ab) is commonest cause."),
]
for n, label, detail in anat_facts:
    story.append(badge_row(n, label, detail, accent=GREEN2, accent_light=GREEN2_LIGHT))
    story.append(Spacer(1, 1*mm))

story.append(Spacer(1, 3*mm))

# ── QUICK-FIRE BONUS BOX ─────────────────────────────────────────────────────
story.append(sec_header("⚡  INSTANT RECALL — CLASSIC EXAM TRIGGERS", bg=colors.HexColor("#92400e")))
story.append(Spacer(1, 1.5*mm))

quick_data = [
    ["Clinical scenario", "Diagnosis / Action"],
    ["Slow-relaxing handshake", "Myotonic dystrophy (DM1)"],
    ["Ptosis + loss of red reflex + glycosuria", "Myotonic dystrophy (DM1)"],
    ["Young pt + INO + optic neuritis", "Multiple sclerosis"],
    ["Vision worse after hot bath", "Uhthoff's phenomenon → MS"],
    ["3 Hz spike-wave on EEG", "Absence seizure (petit mal) — DO NOT give carbamazepine"],
    ["Hypsarrhythmia on EEG", "West syndrome (infantile spasms)"],
    ["Obese young woman + papilloedema + normal CT", "Idiopathic intracranial hypertension"],
    ["Fluctuating consciousness in elderly/alcohol", "Subdural haematoma — burr hole"],
    ["Lucid interval after head trauma", "Extradural haematoma — biconvex CT"],
    ["Ascending weakness + areflexia post-diarrhoea", "Guillain-Barré syndrome — IVIG/plasma exchange"],
    ["Small cell lung cancer + proximal weakness improves with use", "Lambert-Eaton syndrome (anti-VGCC)"],
    ["Wet + Wobbly + Wacky", "Normal pressure hydrocephalus — VP shunt"],
    ["Pulvinar sign on MRI (posterior thalamus)", "Variant CJD"],
    ["Bilateral acoustic neuromas", "Neurofibromatosis type 2 (NF2, chromosome 22)"],
    ["Ash-leaf macule + epilepsy + learning disability", "Tuberous sclerosis"],
    ["Pes cavus + distal wasting + foot drop", "HSMN / Charcot-Marie-Tooth disease"],
    ["Fasciculations + brisk reflexes + NO sensory loss", "Motor Neuron Disease (ALS)"],
    ["Gerstmann's syndrome", "Dominant parietal lobe lesion (acalculia, agraphia, finger agnosia, R-L disorientation)"],
    ["CN VI palsy with raised ICP", "False localising sign (CN VI has longest intracranial course)"],
    ["50% of new status epilepticus (no prior Hx seizures)", "Frontal lobe tumour"],
]

AMBER = colors.HexColor("#92400e")
AMBER_LIGHT = colors.HexColor("#fef3c7")

qt = Table(quick_data, colWidths=[70*mm, usable_w-70*mm])
qt.setStyle(TableStyle([
    ("BACKGROUND",    (0,0),(-1,0), AMBER),
    ("TEXTCOLOR",     (0,0),(-1,0), WHITE),
    ("FONTNAME",      (0,0),(-1,0), "Helvetica-Bold"),
    ("FONTNAME",      (0,0),(0,-1), "Helvetica-Bold"),
    ("FONTSIZE",      (0,0),(-1,-1), 7.5),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),[WHITE, AMBER_LIGHT]),
    ("GRID",          (0,0),(-1,-1), 0.4, GREY_LINE),
    ("TOPPADDING",    (0,0),(-1,-1), 2.5),
    ("BOTTOMPADDING", (0,0),(-1,-1), 2.5),
    ("LEFTPADDING",   (0,0),(-1,-1), 4),
    ("VALIGN",        (0,0),(-1,-1), "TOP"),
]))
story.append(qt)

story.append(Spacer(1, 3*mm))
story.append(HRFlowable(width=usable_w, thickness=0.5, color=GREY_LINE))
story.append(Spacer(1, 1.5*mm))
story.append(Paragraph(
    "Source: Dr Khaled El Magraby – Step Up to MRCP Review Notes, Chapter 10: Neurology (2015)  |  "
    "Compiled for MRCPI Part 2 Written MCQ (BOF) Examination",
    FOOT_S))

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

cd /home/daytona/workspace && python3 build_neuro_cheatsheet.py

Running Command

python3 -c " from pypdf import PdfReader r = PdfReader('/home/daytona/workspace/MRCP_Neurology_Top30_CheatSheet.pdf') print(f'Pages: {len(r.pages)}') import os size = os.path.getsize('/home/daytona/workspace/MRCP_Neurology_Top30_CheatSheet.pdf') print(f'File size: {size/1024:.1f} KB') "

3 pages, 15.9 KB - done. Your cheat sheet is ready:

MRCP Neurology Top30 CheatSheet

PDF Document · PDF


Here's what's packed into the 3 pages:
Page 1
  • Facts 1-7: Stroke/cerebrovascular - ABCD2 scoring, antiplatelet choice, MCA vs ACA strokes, carotid dissection triad, SAH thunderclap headache, Nimodipine, EDH vs SDH
  • Facts 8-11: Headache (migraine + OCP contraindication, cluster headache management, IIH) + Epilepsy drug table + AED start criteria
Page 2
  • Facts 12-15: Parkinson's disease (triad, drug-induced, treatment hierarchy, plus syndromes)
  • Facts 16-18: MS (INO/Lhermitte/Uhthoff, diagnosis with oligoclonal bands, treatment)
  • Facts 19-22: Neuromuscular (GBS, MG vs LEMS, Myotonic dystrophy, axonal vs demyelinating NCS)
Page 3
  • Facts 23-25: Dementia (Alzheimer's/Vascular/Lewy Body/FTD, NPH "wet wobbly wacky", CJD sporadic vs variant with pulvinar sign)
  • Facts 26-30: Neuroanatomy (CN III surgical vs medical, Horner's, Wernicke's encephalopathy, Brown-Séquard, subacute combined degeneration)
  • Bonus "Instant Recall" table: 20 classic clinical triggers with one-line answers - perfect for the last 24 hours before the exam

I wasnt able to get above MRCP neurology high yield

Running Command

ls -la /home/daytona/workspace/ && ls -la /home/daytona/workspace/MRCP_Neurology_Top30_CheatSheet.pdf 2>/dev/null || echo "PDF NOT FOUND"

Writing File

~/build_neuro_fulltables.py

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

OUTPUT = "/home/daytona/workspace/MRCP_Neurology_HighYield_Tables.pdf"

PAGE_W, PAGE_H = A4
MARGIN = 1.1 * cm
usable_w = PAGE_W - 2 * MARGIN

# ── Colours ──────────────────────────────────────────────────────────────────
DARK_BLUE    = colors.HexColor("#1a3a5c")
MED_BLUE     = colors.HexColor("#2563a8")
LIGHT_BLUE   = colors.HexColor("#dbeafe")
TEAL         = colors.HexColor("#0d6e6e")
TEAL_LIGHT   = colors.HexColor("#ccf2f2")
ORANGE       = colors.HexColor("#c05621")
ORANGE_LIGHT = colors.HexColor("#feecdc")
RED          = colors.HexColor("#9b1c1c")
RED_LIGHT    = colors.HexColor("#fde8e8")
GREEN        = colors.HexColor("#155724")
GREEN_LIGHT  = colors.HexColor("#d4edda")
PURPLE       = colors.HexColor("#4a1d96")
PURPLE_LIGHT = colors.HexColor("#ede9fe")
AMBER        = colors.HexColor("#92400e")
AMBER_LIGHT  = colors.HexColor("#fef3c7")
GREY_BG      = colors.HexColor("#f1f5f9")
GREY_LINE    = colors.HexColor("#cbd5e1")
WHITE        = colors.white
DARK_TEXT    = colors.HexColor("#1e293b")

# ── Style helpers ─────────────────────────────────────────────────────────────
def S(name, **kw):
    return ParagraphStyle(name, **kw)

TITLE_S = S("T", fontSize=17, fontName="Helvetica-Bold",
            textColor=WHITE, alignment=TA_CENTER, leading=22)
SUB_S   = S("S", fontSize=8,  fontName="Helvetica",
            textColor=WHITE, alignment=TA_CENTER, leading=11)
SEC_S   = S("SE",fontSize=8.5,fontName="Helvetica-Bold",
            textColor=WHITE, alignment=TA_LEFT, leading=12)
BODY_S  = S("B", fontSize=7,  fontName="Helvetica",
            textColor=DARK_TEXT, leading=10)
BOLD_S  = S("BO",fontSize=7,  fontName="Helvetica-Bold",
            textColor=DARK_TEXT, leading=10)
FOOT_S  = S("F", fontSize=6,  fontName="Helvetica-Oblique",
            textColor=colors.grey, alignment=TA_CENTER)

def hdr(text, bg=DARK_BLUE):
    t = Table([[Paragraph(text, SEC_S)]], colWidths=[usable_w])
    t.setStyle(TableStyle([
        ("BACKGROUND",    (0,0),(-1,-1), bg),
        ("TOPPADDING",    (0,0),(-1,-1), 3),
        ("BOTTOMPADDING", (0,0),(-1,-1), 3),
        ("LEFTPADDING",   (0,0),(-1,-1), 5),
    ]))
    return t

def make_table(data, col_widths, hdr_bg=MED_BLUE, row_colors=None):
    """Generic styled table. First row = header."""
    if row_colors is None:
        row_colors = [WHITE, GREY_BG]
    styled = []
    for i, row in enumerate(data):
        styled.append([Paragraph(str(c), BOLD_S if i == 0 else BODY_S) for c in row])
    t = Table(styled, colWidths=col_widths)
    ts = TableStyle([
        ("BACKGROUND",    (0,0),(-1,0), hdr_bg),
        ("TEXTCOLOR",     (0,0),(-1,0), WHITE),
        ("FONTNAME",      (0,0),(-1,0), "Helvetica-Bold"),
        ("ROWBACKGROUNDS",(0,1),(-1,-1), row_colors),
        ("GRID",          (0,0),(-1,-1), 0.35, GREY_LINE),
        ("TOPPADDING",    (0,0),(-1,-1), 2.5),
        ("BOTTOMPADDING", (0,0),(-1,-1), 2.5),
        ("LEFTPADDING",   (0,0),(-1,-1), 3.5),
        ("RIGHTPADDING",  (0,0),(-1,-1), 3.5),
        ("VALIGN",        (0,0),(-1,-1), "TOP"),
        ("FONTSIZE",      (0,0),(-1,-1), 7),
    ])
    t.setStyle(ts)
    return t

sp = lambda h=2: Spacer(1, h*mm)

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

# TITLE
tb = Table([[Paragraph("MRCP PART 2 — NEUROLOGY", TITLE_S)],
            [Paragraph("Complete High-Yield Tables  |  Dr Khaled El Magraby Step Up to MRCP Chapter 10", SUB_S)]],
           colWidths=[usable_w])
tb.setStyle(TableStyle([
    ("BACKGROUND",    (0,0),(-1,-1), DARK_BLUE),
    ("TOPPADDING",    (0,0),(-1,-1), 7),
    ("BOTTOMPADDING", (0,0),(-1,-1), 7),
    ("LEFTPADDING",   (0,0),(-1,-1), 6),
]))
story += [tb, sp(3)]

# ════════════════════════════════════════════════════════════════════════════
#  TABLE 1 – ABCD2
story.append(hdr("TABLE 1 — TIA: ABCD² Scoring", MED_BLUE))
story.append(sp(1))
story.append(make_table(
    [["Criterion","Points","Action"],
     ["A – Age ≥ 60 years","1",""],
     ["B – Blood pressure ≥ 140/90 mmHg","1",""],
     ["C – Unilateral weakness","2","Score ≥ 4: Aspirin 300mg immediately + specialist ≤24 hr"],
     ["C – Speech disturbance (no weakness)","1","Score ≤ 3: specialist within 1 week"],
     ["D – Duration > 60 min","2","Crescendo TIA (≥2/week): always treat as HIGH risk"],
     ["D – Duration 10–59 min","1",""],
     ["D – Diabetes","1",""],
     ["TOTAL","7","Antiplatelet: Clopidogrel 1st-line. If intolerant: Aspirin+Dipyridamole"]],
    [38*mm, 18*mm, usable_w-56*mm], hdr_bg=MED_BLUE))
story.append(sp(2))

# TABLE 2 – Stroke by territory
story.append(hdr("TABLE 2 — Stroke: Vascular Territory Deficits", MED_BLUE))
story.append(sp(1))
story.append(make_table(
    [["Artery","Key Deficits"],
     ["Anterior Cerebral (ACA)","Contralateral hemiparesis/sensory loss — legs > arms; Akinetic mutism; Incontinence"],
     ["Middle Cerebral (MCA)","Contralateral hemiparesis/sensory loss — arms > legs; Contralateral homonymous hemianopia; Wernicke's aphasia; Gaze deviation toward lesion"],
     ["Posterior Cerebral (PCA)","Pure hemisensory loss; Homonymous hemianopia WITH macular sparing; Visual agnosia; Alexia"],
     ["PICA (Wallenberg/lateral medullary)","Ipsilateral facial sensory loss + contralateral body; Ipsilateral Horner's; Dysphagia; Vertigo; Ataxia; Nystagmus"],
     ["Lacunar (small vessel)","Pure motor stroke OR pure sensory stroke OR ataxic hemiparesis"],
     ["Basilar artery","Locked-in syndrome; cranial nerve palsies; coma; cerebellar signs"]],
    [45*mm, usable_w-45*mm], hdr_bg=MED_BLUE))
story.append(sp(2))

# TABLE 3 – Carotid dissection
story.append(hdr("TABLE 3 — Carotid Artery Dissection", MED_BLUE))
story.append(sp(1))
story.append(make_table(
    [["Feature","Detail"],
     ["Triad","Ipsilateral headache/neck pain + Ipsilateral Horner's + Contralateral hemiparesis"],
     ["Horner's note","NO anhidrosis — sweat glands travel with external carotid plexus (spared)"],
     ["Ischaemic events","30–80% develop transient or completed stroke"],
     ["Diagnosis","Contrast arteriography of neck vessels"],
     ["Management","Anticoagulation/antiplatelet; stenting if ongoing ischaemia"],
     ["Key NB","Migrainous stroke typically affects POSTERIOR circulation (PCA territory)"]],
    [38*mm, usable_w-38*mm], hdr_bg=MED_BLUE))
story.append(sp(2))

# TABLE 4 – Haemorrhage
story.append(hdr("TABLE 4 — Intracranial Haemorrhage Comparison", RED))
story.append(sp(1))
story.append(make_table(
    [["Type","Mechanism","Classic History","CT Appearance","Key Points"],
     ["Extradural (EDH)","Middle meningeal artery","Head trauma → lucid interval → rapid deterioration","Biconvex (lenticular) hyperdense","Temporal bone fracture; temporal region; neurosurgical emergency"],
     ["Subdural (SDH)","Bridging veins","Elderly/alcoholic; minor/forgotten injury; FLUCTUATING consciousness","Crescent-shaped hyperdense","Burr hole drainage; initial injury often forgotten"],
     ["Subarachnoid (SAH)","Berry aneurysm 85%","Thunderclap 'worst headache ever'","Basal cistern star-shaped hyperdensity","CT -ve in 5%; LP after 12 hr for xanthochromia; Nimodipine"],
     ["Intracerebral","Hypertension commonest","Focal deficits + headache","Irregular parenchymal hyperdensity","ECG: deep symmetrical T-wave inversion"]],
    [22*mm, 30*mm, 40*mm, 32*mm, usable_w-124*mm], hdr_bg=RED))
story.append(sp(1))
story.append(make_table(
    [["SAH Key Facts","Detail"],
     ["Associated conditions","APKD, Ehlers-Danlos syndrome, Coarctation of aorta (berry aneurysm)"],
     ["Post-communicating artery aneurysm","Compresses CN III: painful eye down-and-out + ptosis + dilated pupil"],
     ["Nimodipine 60 mg/4 hr","Reduces vasospasm severity — does NOT reduce rebleeding"],
     ["Complications","Rebleeding 30%; Obstructive hydrocephalus; Vasospasm (peak day 4–10)"],
     ["LP timing","After 12 hours to allow xanthochromia (bilirubin) to develop"]],
    [52*mm, usable_w-52*mm], hdr_bg=RED))
story.append(sp(2))

# TABLE 5 – Brain lobe lesions
story.append(hdr("TABLE 5 — Brain Lobe Lesions", TEAL))
story.append(sp(1))
story.append(make_table(
    [["Lobe","Key Features"],
     ["Frontal","Expressive (Broca's) aphasia — non-fluent, laboured; Anosmia; Personality change; Disinhibition; Primitive reflexes (grasp, pout, palmomental); Urinary/faecal incontinence; Perseveration; Poor executive skills; 50% of new status epilepticus (no prior Hx) = frontal lobe tumour"],
     ["Parietal (dominant)","Gerstmann's syndrome: Acalculia + Agraphia + Alexia + Finger agnosia + Right-left disorientation; Sensory inattention; Neglect; Apraxia; Astereognosis; Inferior quadrantanopia"],
     ["Parietal (non-dominant)","Neglect; Dressing apraxia; Constructional apraxia; Anosognosia"],
     ["Temporal","Wernicke's (receptive) aphasia — fluent + neologisms + word substitution; Superior quadrantanopia; Auditory agnosia; Prosopagnosia; Memory impairment"],
     ["Occipital","Homonymous hemianopia WITH macular sparing; Visual agnosia; Alexia without agraphia; Anton's syndrome (cortical blindness with denial of blindness)"]],
    [28*mm, usable_w-28*mm], hdr_bg=TEAL))
story.append(sp(2))

# TABLE 6 – UMN vs LMN
story.append(hdr("TABLE 6 — UMN vs LMN Signs", DARK_BLUE))
story.append(sp(1))
story.append(make_table(
    [["Feature","UMN Lesion","LMN Lesion"],
     ["Tone","Increased (spastic)","Decreased (flaccid)"],
     ["Power","Reduced","Reduced"],
     ["Reflexes","Brisk/hyperreflexic","Absent/diminished"],
     ["Plantars","Extensor (Babinski +ve)","Flexor"],
     ["Wasting","Minimal/late","Present (early)"],
     ["Fasciculations","Absent","Present"],
     ["Facial nerve","Forehead SPARED (bilateral cortical supply)","All facial muscles affected including forehead"],
     ["Key NB","Facial palsy + convergent squint = PONTINE lesion (VI encircled by VII)","Bell's palsy = LMN; treat with prednisolone 25mg BD x10 days within 72 hr"]],
    [32*mm, 52*mm, usable_w-84*mm], hdr_bg=DARK_BLUE))
story.append(sp(2))

# ── PAGE 2 ────────────────────────────────────────────────────────────────────
story.append(PageBreak())

# TABLE 7 – Parkinson's
story.append(hdr("TABLE 7 — Parkinson's Disease: Features & Management", PURPLE))
story.append(sp(1))
story.append(make_table(
    [["Feature","Detail"],
     ["Pathology","Dopaminergic neuron degeneration in substantia nigra; Parkin/UCHL1 gene mutations"],
     ["Classic triad","Bradykinesia + Tremor (pill-rolling, 3–5 Hz, rest, asymmetric) + Rigidity (lead-pipe / cogwheel)"],
     ["KEY: asymmetric","Asymmetric onset = idiopathic PD. Symmetric = drug-induced Parkinsonism"],
     ["Other features","Mask-like facies; micrographia; short shuffling gait; sialorrhoea; seborrhoea; postural instability (late)"],
     ["Drug-induced causes","Antipsychotics (haloperidol, risperidone); Metoclopramide; Prochlorperazine; Methyldopa → STOP drug first"]],
    [40*mm, usable_w-40*mm], hdr_bg=PURPLE))
story.append(sp(1))
story.append(make_table(
    [["Drug","Mechanism","Key Points"],
     ["Levodopa + Carbidopa (Sinemet)","Dopamine precursor","Gold standard; long-term dyskinesias; worsens rest tremor"],
     ["Dopamine agonists (ropinirole, pramipexole)","Direct D2 agonist","First-line in younger patients; impulse-control disorder risk"],
     ["COMT inhibitors (entacapone)","Inhibit L-dopa breakdown","Add-on for 'wearing off' phenomenon"],
     ["MAO-B inhibitors (selegiline, rasagiline)","Inhibit dopamine breakdown","Possible neuroprotective effect"],
     ["Amantadine","↑ dopamine release","Useful for L-dopa-induced dyskinesias"],
     ["Apomorphine (SC)","Dopamine agonist","Rescue therapy for off periods"],
     ["Anticholinergics (trihexyphenidyl)","Block ACh","For tremor-predominant PD in young patients"]],
    [44*mm, 40*mm, usable_w-84*mm], hdr_bg=PURPLE))
story.append(sp(1))
story.append(make_table(
    [["Parkinson-Plus Syndrome","Key Distinguishing Features"],
     ["Multiple System Atrophy (MSA)","Autonomic failure (postural hypotension, impotence, incontinence) + cerebellar signs; poor L-dopa response"],
     ["Progressive Supranuclear Palsy (PSP)","Vertical gaze palsy (downgaze first) + early falls + axial rigidity; Parkinsonism + dementia"],
     ["Corticobasal Degeneration (CBD)","Alien limb phenomenon; asymmetric apraxia; cortical sensory loss"],
     ["Lewy Body Dementia (LBD)","Fluctuating cognition + visual hallucinations + Parkinsonism; EXTREME antipsychotic sensitivity; REM sleep disorder"]],
    [45*mm, usable_w-45*mm], hdr_bg=PURPLE))
story.append(sp(2))

# TABLE 8 – Dementia
story.append(hdr("TABLE 8 — Dementia: Differentiation", RED))
story.append(sp(1))
story.append(make_table(
    [["Type","Key Clinical Features","Investigation / Marker"],
     ["Alzheimer's","Insidious onset; memory loss first; personality preserved early; later: apraxia, agnosia","MRI: medial temporal/hippocampal atrophy; ApoE4 gene risk factor"],
     ["Vascular","Stepwise deterioration; history of stroke/TIA; CVD risk factors; focal signs","MRI: multiple infarcts; white matter changes"],
     ["Lewy Body (DLB)","Fluctuating cognition + visual hallucinations + Parkinsonism; REM sleep behaviour disorder","DaT scan; extreme antipsychotic sensitivity → avoid"],
     ["Frontotemporal (Pick's)","Age 45–65; personality/behaviour change FIRST; disinhibition; primitive reflexes; language decline","MRI: frontal and temporal atrophy"],
     ["Normal Pressure Hydrocephalus","Wet (incontinence) + Wobbly (gait ataxia) + Wacky (dementia)","CT/MRI: hydrocephalus; treat with VP shunt"],
     ["CJD (sporadic)","Rapid progressive dementia; myoclonus; cerebellar ataxia; age ~60s; psychiatric prodrome","EEG: 1–2 Hz PSWCs; CSF: 14-3-3 protein; definitive: brain biopsy post-mortem"],
     ["vCJD","Young (20s–30s); psychiatric/sensory prodrome; longer course","MRI: pulvinar sign (bilateral posterior thalamic high signal >90%); tonsil biopsy for prion protein; EEG usually NORMAL"]],
    [30*mm, 62*mm, usable_w-92*mm], hdr_bg=RED))
story.append(sp(2))

# TABLE 9 – MS
story.append(hdr("TABLE 9 — Multiple Sclerosis", TEAL))
story.append(sp(1))
story.append(make_table(
    [["Domain","Features"],
     ["Pathology","Demyelination; white matter plaques; lesions disseminated in time AND space"],
     ["Visual","Optic neuritis; optic atrophy; central scotoma; Uhthoff's phenomenon (vision ↓ with heat); Internuclear ophthalmoplegia (INO) — MLF lesion"],
     ["Motor","Spastic weakness (legs > arms); brisk reflexes; positive plantars; patellar clonus"],
     ["Sensory","Pins & needles; numbness; Lhermitte's sign (paraesthesia on neck flexion); trigeminal neuralgia"],
     ["Cerebellar","Ataxia; intention tremor; dysarthria (DANISH: dysdiadochokinesis, ataxia, nystagmus, intention tremor, slurred speech, heel-shin test)"],
     ["Other","Urinary incontinence/retention; sexual dysfunction; cognitive impairment; fatigue; depression"]],
    [30*mm, usable_w-30*mm], hdr_bg=TEAL))
story.append(sp(1))
story.append(make_table(
    [["Investigation","Finding — Key Points"],
     ["MRI brain + cord","T2 high signal periventricular white matter plaques; CT brain will NOT show plaques"],
     ["CSF","Oligoclonal bands (NOT in serum — intrathecal IgG synthesis); ↑ IgG; normal glucose; normal cells"],
     ["Visual Evoked Potentials (VEP)","Delayed conduction with well-preserved waveform"],
     ["Acute relapse Rx","IV Methylprednisolone 3–5 days — shortens relapse duration; does NOT alter degree of final recovery"],
     ["Disease-modifying","Beta-interferon (↓ relapse rate ~30%; RRMS only); Natalizumab (anti-VLA-4; risk of PML from JC virus)"],
     ["Symptom management","Baclofen/tizanidine (spasticity); Oxybutynin (bladder); SSRI (depression); Amantadine (fatigue)"]],
    [42*mm, usable_w-42*mm], hdr_bg=TEAL))
story.append(sp(2))

# ── PAGE 3 ────────────────────────────────────────────────────────────────────
story.append(PageBreak())

# TABLE 10 – Epilepsy
story.append(hdr("TABLE 10 — Epilepsy: Drug Treatment", ORANGE))
story.append(sp(1))
story.append(make_table(
    [["Seizure Type","First-Line","Second-Line","Key Note"],
     ["Generalised tonic-clonic","Sodium valproate","Lamotrigine, Carbamazepine","Valproate teratogenic — caution in women of childbearing age"],
     ["Absence (Petit mal)","Sodium valproate OR Ethosuximide","—","EEG: 3 Hz spike-wave; carbamazepine WORSENS absence"],
     ["Focal/Partial","Carbamazepine","Lamotrigine, Levetiracetam",""],
     ["Juvenile Myoclonic (JME)","Sodium valproate","Lamotrigine, Topiramate","Chromosome 6p; lifelong Rx needed; precipitants: alcohol, sleep deprivation, menstruation"],
     ["Infantile spasms (West syndrome)","ACTH / Vigabatrin","—","EEG: hypsarrhythmia; poor prognosis"],
     ["Status epilepticus","Lorazepam IV (or rectal diazepam) → Phenytoin IV → Phenobarbitone","GA/Propofol if refractory","Protect airway; check glucose; thiamine if alcohol suspected"]],
    [38*mm, 40*mm, 36*mm, usable_w-114*mm], hdr_bg=ORANGE))
story.append(sp(2))

# TABLE 11 – GBS + Neuromuscular
story.append(hdr("TABLE 11 — Guillain-Barré Syndrome (GBS)", MED_BLUE))
story.append(sp(1))
story.append(make_table(
    [["Feature","Detail"],
     ["Trigger","Campylobacter jejuni (commonest); EBV; CMV; Mycoplasma pneumoniae; post-vaccination"],
     ["Pathology","Acute inflammatory demyelinating polyneuropathy (AIDP); ascending symmetrical"],
     ["Presentation","Ascending symmetrical weakness starting distally; areflexia; autonomic dysfunction; back/limb pain"],
     ["Miller-Fisher variant","Ophthalmoplegia + Ataxia + Areflexia; anti-GQ1b antibodies"],
     ["CSF","Raised protein + normal white cells = ALBUMINOCYTOLOGICAL DISSOCIATION"],
     ["Nerve conduction","Reduced conduction velocity (demyelinating pattern)"],
     ["Treatment","IVIG or plasmapheresis (equally effective); NOT steroids"],
     ["Monitoring","FVC every 4–6 hr; ITU if FVC falling or <20 ml/kg; autonomic instability monitoring"]],
    [42*mm, usable_w-42*mm], hdr_bg=MED_BLUE))
story.append(sp(1))

# MG vs LEMS
story.append(make_table(
    [["Feature","Myasthenia Gravis (MG)","Lambert-Eaton (LEMS)"],
     ["Antibody","Anti-AChR (85%); anti-MUSK (rest)","Anti-VGCC (voltage-gated Ca channel)"],
     ["Association","Thymoma (10–15%); thymic hyperplasia","Small cell lung cancer (60%)"],
     ["Ocular","Ptosis + diplopia common (presenting feature)","Less prominent"],
     ["Weakness pattern","Worse with repetitive use; improves with rest","Proximal; IMPROVES briefly with repeated use"],
     ["Reflexes","Normal","Reduced but improve after exercise (post-tetanic potentiation)"],
     ["Autonomic","Rare","Dry mouth; erectile dysfunction"],
     ["EMG","Decremental response on repetitive stimulation","INCREMENTAL response on rapid repetitive stimulation"],
     ["Tensilon test","Positive (edrophonium — improves weakness transiently)","Less reliable"],
     ["Treatment","Pyridostigmine + steroids + azathioprine; thymectomy; IVIG/plasmapheresis for crisis","Treat underlying malignancy; 3,4-DAP; IVIG"]],
    [36*mm, 54*mm, usable_w-90*mm], hdr_bg=MED_BLUE))
story.append(sp(2))

# TABLE 12 – NCS
story.append(hdr("TABLE 12 — Nerve Conduction Studies: Axonal vs Demyelinating", DARK_BLUE))
story.append(sp(1))
story.append(make_table(
    [["Parameter","Axonal","Demyelinating"],
     ["Conduction velocity","NORMAL","REDUCED (<30 m/s)"],
     ["Amplitude","REDUCED","NORMAL"],
     ["Examples","Diabetes; B12 deficiency; alcohol; uraemia; vasculitis; HSMN type II","GBS; CIDP; HSMN type I; amiodarone; paraprotein neuropathy"]],
    [38*mm, 48*mm, usable_w-86*mm], hdr_bg=DARK_BLUE))
story.append(sp(1))
story.append(make_table(
    [["Predominantly MOTOR neuropathy","Predominantly SENSORY neuropathy"],
     ["GBS","Diabetes mellitus"],
     ["CIDP","Alcoholism"],
     ["HSMN (Charcot-Marie-Tooth)","Vitamin B12 deficiency"],
     ["Porphyria","Uraemia"],
     ["Lead poisoning","Amyloidosis"],
     ["Diphtheria","Leprosy"]],
    [usable_w//2, usable_w//2], hdr_bg=DARK_BLUE))
story.append(sp(2))

# TABLE 13 – Myotonic dystrophy
story.append(hdr("TABLE 13 — Myotonic Dystrophy (DM1 vs DM2)", AMBER))
story.append(sp(1))
story.append(make_table(
    [["Feature","DM1","DM2"],
     ["Gene","DMPK — chromosome 19","ZNF9 — chromosome 3"],
     ["Weakness pattern","DISTAL initially","PROXIMAL initially"],
     ["Congenital form","Yes (severe)","No"],
     ["Shared features","Myotonia (slow-relaxing handshake); cataracts (loss of red reflex); ptosis; frontal balding; dysarthria; dysphagia; cardiac (1st degree HB/CHB/cardiomyopathy); diabetes; testicular atrophy","←"],
     ["Mnemonic DM1","5 D's: Distal weakness, Diabetes, Dysarthria, Dysphagia, Dominant (AD)",""],
     ["Diagnosis","EMG + muscle biopsy",""],
     ["Key exam trigger","Slow-relaxing handshake + ptosis + cataracts + glycosuria = DM1",""]],
    [40*mm, 60*mm, usable_w-100*mm], hdr_bg=AMBER))
story.append(sp(2))

# ── PAGE 4 ────────────────────────────────────────────────────────────────────
story.append(PageBreak())

# TABLE 14 – Headache
story.append(hdr("TABLE 14 — Headache Differential Diagnosis", TEAL))
story.append(sp(1))
story.append(make_table(
    [["Type","Character","Associated Features","Treatment"],
     ["Migraine","Unilateral, throbbing, 4–72 hr","Nausea/vomiting; photophobia; phonophobia; aura (visual scotoma, fortification spectra)","Acute: Triptans + NSAID + antiemetic. Prophylaxis: Propranolol (1st-line), Amitriptyline, Topiramate. OCP CONTRAINDICATED with aura"],
     ["Cluster headache","Severe periorbital/unilateral, 15–180 min","Lacrimation; rhinorrhoea; Horner's; restlessness; seasonal; male predominance","Acute: 100% O₂ + SC Sumatriptan. Prophylaxis: Verapamil (1st-line), Lithium"],
     ["Tension","Bilateral, band-like, non-pulsating","No nausea; no photophobia; not aggravated by activity","Simple analgesia; amitriptyline for chronic"],
     ["Raised ICP","Worse lying flat, morning, coughing","Papilloedema; CN VI palsy (false localising sign); progressive","Treat cause; dexamethasone (tumour); acetazolamide (IIH)"],
     ["SAH","Thunderclap 'worst ever'; occipital","Meningism; photophobia; CN III palsy (posterior comm. aneurysm)","CT → LP after 12 hr; Nimodipine; neurosurgery"],
     ["Giant cell arteritis (GCA)","Temporal; jaw claudication; scalp tenderness; age >50","ESR/CRP ↑↑; risk of blindness (anterior ischaemic optic neuropathy)","Prednisolone immediately (don't wait for biopsy result)"],
     ["Trigeminal neuralgia","Lancinating electric-shock; V2/V3; trigger zones","No sensory loss in idiopathic (if present, consider MS or tumour)","Carbamazepine (1st-line); microvascular decompression"]],
    [28*mm, 36*mm, 44*mm, usable_w-108*mm], hdr_bg=TEAL))
story.append(sp(2))

# TABLE 15 – IIH
story.append(hdr("TABLE 15 — Idiopathic Intracranial Hypertension (IIH)", TEAL))
story.append(sp(1))
story.append(make_table(
    [["Feature","Detail"],
     ["Classic patient","Young obese female"],
     ["Symptoms","Headache worse lying flat/morning/coughing; blurred vision; diplopia; pulsatile tinnitus ('whooshing')"],
     ["Signs","Papilloedema; enlarged blind spot; CN VI palsy; normal plantars (extensor plantars suggest another diagnosis)"],
     ["Investigations","CT/MRI: normal ventricles; CSF opening pressure >20 cmH₂O; normal CSF constituents"],
     ["Drug causes","OCP; Steroids; Tetracycline/Doxycycline; Nitrofurantoin; Vitamin A excess"],
     ["Treatment","Weight loss; Acetazolamide; Repeated LP / LP shunt; Optic nerve sheath decompression"],
     ["THREAT","Permanent VISUAL LOSS — most serious complication"]],
    [42*mm, usable_w-42*mm], hdr_bg=TEAL))
story.append(sp(2))

# TABLE 16 – Vertigo
story.append(hdr("TABLE 16 — Vertigo: Differentiation", MED_BLUE))
story.append(sp(1))
story.append(make_table(
    [["Condition","Duration","Key Features","Diagnosis","Treatment"],
     ["BPPV","10–20 seconds","Triggered by head position change; no hearing loss","Dix-Hallpike manoeuvre +ve","Epley manoeuvre (~80% success); Brandt-Daroff exercises; Betahistine"],
     ["Menière's disease","Minutes to hours","Recurrent vertigo + sensorineural hearing loss + tinnitus + aural fullness; unilateral; middle-aged","Clinical (ENT assessment)","Acute: Prochlorperazine IM/buccal. Prophylaxis: Betahistine. Inform DVLA"],
     ["Vestibular neuritis","Days to weeks","Post-URTI; no hearing loss; horizontal nystagmus","Clinical","Prochlorperazine; steroids"],
     ["Acoustic neuroma","Gradual onset","Unilateral SNHL + tinnitus; ABSENT CORNEAL REFLEX (CN V at CPA)","MRI (gold standard)","Surgery or stereotactic radiotherapy"]],
    [30*mm, 18*mm, 52*mm, 28*mm, usable_w-128*mm], hdr_bg=MED_BLUE))
story.append(sp(2))

# TABLE 17 – CSF analysis
story.append(hdr("TABLE 17 — CSF Analysis Quick Reference", GREEN))
story.append(sp(1))
story.append(make_table(
    [["Condition","Appearance","Pressure","WBC","Protein","Glucose","Other"],
     ["Normal","Clear","10–20 cmH₂O","<5 lymphocytes","0.15–0.45 g/L",">60% of blood glucose",""],
     ["Bacterial meningitis","Turbid/purulent","↑↑","Neutrophils >1000","↑↑ >1 g/L","Very low <2 mmol/L","Gram stain +ve"],
     ["Viral meningitis","Clear","Normal/slightly ↑","Lymphocytes <500","Mildly ↑","Normal",""],
     ["TB meningitis","Turbid/xanthochromic","↑","Lymphocytes","↑","Very low","AFB; fibrin web"],
     ["SAH","Xanthochromic","↑","RBCs/xanthochromia after 12 hr","↑","Normal","Xanthochromia = bilirubin"],
     ["MS","Clear","Normal","Normal","Slightly ↑","Normal","Oligoclonal bands (not serum)"],
     ["GBS","Clear","Normal","Normal","VERY HIGH","Normal","Albuminocytological dissociation"],
     ["CJD","Clear","Normal","Normal","↑","Normal","14-3-3 protein"],
     ["IIH","Clear",">20 cmH₂O","Normal","Normal","Normal","Normal ventricles on imaging"]],
    [25*mm, 22*mm, 22*mm, 22*mm, 20*mm, 20*mm, usable_w-131*mm], hdr_bg=GREEN))
story.append(sp(2))

# ── PAGE 5 ────────────────────────────────────────────────────────────────────
story.append(PageBreak())

# TABLE 18 – Horner's + CN pearls
story.append(hdr("TABLE 18 — Cranial Nerve & Pupil Pearls", DARK_BLUE))
story.append(sp(1))
story.append(make_table(
    [["Sign","Features","Localisation/Cause"],
     ["Horner's syndrome","Ptosis (partial) + Miosis + Anhidrosis (anhidrosis absent if lesion above superior cervical ganglion / carotid dissection)","Pancoast tumour; carotid dissection; syringomyelia; brainstem stroke; demyelination"],
     ["CN III palsy – surgical","Painful + dilated unreactive pupil + eye down-and-out + ptosis","Posterior communicating artery aneurysm; cerebral herniation → URGENT neurosurgery"],
     ["CN III palsy – medical","Painless + pupil SPARED (macular sparing of parasympathetic fibres)","Diabetes/hypertension microvascular ischaemia → manage risk factors"],
     ["CN VI palsy","Failure of abduction; diplopia worse at distance","Raised ICP (false localising sign — longest intracranial course); MS; DM"],
     ["Internuclear ophthalmoplegia (INO)","Failure of adduction ipsilateral eye + nystagmus in contralateral abducting eye","MLF lesion — MS (young pt) or vascular (older pt)"],
     ["Bell's palsy","LMN pattern — forehead AFFECTED; post-auricular pain; altered taste; hyperacusis","HSV implicated; Rx: prednisolone 25mg BD x10 days within 72 hr; acyclovir adds no benefit; Ramsay Hunt (VZV) if vesicular rash"],
     ["Acoustic neuroma (CN VIII)","Unilateral SNHL + tinnitus + absent corneal reflex (CN V at CPA)","Cerebellopontine angle mass; bilateral = NF2 (chromosome 22)"]],
    [35*mm, 55*mm, usable_w-90*mm], hdr_bg=DARK_BLUE))
story.append(sp(2))

# TABLE 19 – Neurocutaneous
story.append(hdr("TABLE 19 — Neurocutaneous Syndromes", AMBER))
story.append(sp(1))
story.append(make_table(
    [["Syndrome","Inheritance","Hallmark Signs","Associations"],
     ["NF1 (von Recklinghausen's)","Autosomal Dominant; chromosome 17","≥6 café-au-lait spots; Lisch nodules (iris hamartomas); neurofibromas","Optic glioma; scoliosis; phaeochromocytoma; MPNST; learning difficulties"],
     ["NF2","Autosomal Dominant; chromosome 22","Bilateral acoustic neuromas (CN VIII)","Meningiomas; spinal tumours; cataracts; fewer skin lesions than NF1"],
     ["Tuberous sclerosis","Autosomal Dominant; TSC1 chr 9 / TSC2 chr 16","Adenoma sebaceum (facial angiofibromas); ash-leaf macules (earliest — Wood's lamp); shagreen patches; periungual fibromas","Epilepsy; learning disability; cortical tubers; cardiac rhabdomyomas; renal angiomyolipomas; subependymal nodules ('candle dripping' calcification on CT)"],
     ["Sturge-Weber","Sporadic (GNAQ mutation)","Port-wine stain (V1 trigeminal distribution — forehead/upper eyelid)","Leptomeningeal angioma; 'tram-track' calcification on CT; epilepsy; hemiplegia; glaucoma"],
     ["Von Hippel-Lindau","Autosomal Dominant; VHL gene chr 3p","Cerebellar haemangioblastoma (commonest); retinal angiomas","Clear cell RCC; phaeochromocytoma; pancreatic cysts; erythrocytosis (EPO from haemangioblastoma)"]],
    [28*mm, 30*mm, 50*mm, usable_w-108*mm], hdr_bg=AMBER))
story.append(sp(2))

# TABLE 20 – Spinal cord
story.append(hdr("TABLE 20 — Spinal Cord Syndromes", RED))
story.append(sp(1))
story.append(make_table(
    [["Syndrome","Ipsilateral","Contralateral","Bilateral","Cause/Notes"],
     ["Brown-Séquard (hemisection)","UMN weakness + dorsal column loss (proprioception/vibration)","Spinothalamic loss (pain/temperature; 2–3 levels below)","—","Trauma; MS; tumour"],
     ["Anterior spinal artery infarct","—","—","Loss of pain/temp below lesion; UMN weakness; PRESERVED proprioception/vibration (posterior columns spared)","Sudden onset; aortic surgery; shock"],
     ["Subacute combined degeneration (B12)","—","—","Dorsal columns FIRST (proprioception/vibration) → lateral corticospinal tracts (UMN signs); peripheral neuropathy","Pernicious anaemia (anti-IF Ab commonest); treat with IM hydroxocobalamin"],
     ["Syringomyelia","—","—","Cape distribution loss of pain/temp; preserved light touch; LMN wasting at level; UMN below","Central cord cavitation; associated with Arnold-Chiari malformation"],
     ["Conus medullaris","Knee jerks preserved; ankle jerks affected; bilateral perianal sensory loss; urinary retention early","—","Mixed UMN+LMN; fasciculations","Rare; compare with cauda equina"],
     ["Cauda equina","—","—","Flaccid areflexic paraplegia; saddle anaesthesia; asymmetric; sphincter dysfunction (later); severe radicular pain","Emergency decompression; MRI urgently"]],
    [30*mm, 38*mm, 38*mm, 45*mm, usable_w-151*mm], hdr_bg=RED))
story.append(sp(2))

# TABLE 21 – Wernicke's
story.append(hdr("TABLE 21 — Wernicke's Encephalopathy & Key Deficiency States", GREEN))
story.append(sp(1))
story.append(make_table(
    [["Deficiency","Classic Syndrome","Key Features","Treatment"],
     ["Thiamine (B1)","Wernicke's encephalopathy","Triad: Confusion + Ophthalmoplegia (CN VI palsy/nystagmus) + Ataxia. Give IV thiamine BEFORE glucose. If untreated → Korsakoff's (anterograde amnesia + confabulation)","IV Pabrinex (thiamine) BEFORE any glucose"],
     ["B12 (cobalamin)","Subacute combined degeneration","Dorsal columns first (proprioception/vibration) → UMN signs. Commonest cause: pernicious anaemia (anti-intrinsic factor Ab)","IM hydroxocobalamin"],
     ["B6 (pyridoxine)","Peripheral neuropathy","Caused by isoniazid — give pyridoxine prophylactically with TB treatment","Pyridoxine supplementation"],
     ["Niacin (B3)","Pellagra","3 D's: Dermatitis + Diarrhoea + Dementia","Nicotinamide/niacin replacement"]],
    [28*mm, 32*mm, 58*mm, usable_w-118*mm], hdr_bg=GREEN))
story.append(sp(2))

# ── PAGE 6 – MASTER EXAM FACTS ────────────────────────────────────────────────
story.append(PageBreak())

story.append(hdr("TABLE 22 — MASTER EXAM FACTS: Classic MRCP Triggers", DARK_BLUE))
story.append(sp(1))
story.append(make_table(
    [["Clinical Scenario / Trigger","Diagnosis / Action — Exam Answer"],
     ["Thunderclap 'worst ever' headache","SAH until proven otherwise — CT first, LP after 12 hr for xanthochromia"],
     ["Lucid interval after head trauma","Extradural haematoma (middle meningeal artery; biconvex CT) — urgent neurosurgery"],
     ["Fluctuating consciousness in elderly/alcoholic","Subdural haematoma (bridging veins; crescent CT) — burr hole drainage"],
     ["Young woman + optic neuritis","Multiple sclerosis — MRI, CSF oligoclonal bands, VEP"],
     ["Internuclear ophthalmoplegia (INO) in young patient","Pathognomonic of MS (MLF lesion)"],
     ["Uhthoff's phenomenon (vision worsens in hot bath)","Multiple sclerosis"],
     ["Lhermitte's sign (electric sensation on neck flexion)","Multiple sclerosis (or B12 deficiency)"],
     ["Slow-relaxing handshake + ptosis + loss of red reflex + glycosuria","Myotonic dystrophy DM1 — DMPK gene chromosome 19"],
     ["Ascending symmetrical weakness + areflexia post-diarrhoea","Guillain-Barré syndrome — IVIG or plasmapheresis; NOT steroids; monitor FVC"],
     ["Proximal weakness improving with repeated use + dry mouth","Lambert-Eaton syndrome (LEMS) — anti-VGCC — screen for small cell lung cancer"],
     ["3 Hz spike-wave on EEG","Absence seizure (petit mal) — DO NOT give carbamazepine (worsens it)"],
     ["Hypsarrhythmia on EEG","West syndrome (infantile spasms) — treat with ACTH or vigabatrin"],
     ["50% of de novo status epilepticus (no prior seizure history)","Frontal lobe tumour — CT/MRI urgently"],
     ["Obese young woman + papilloedema + normal CT ventricles","Idiopathic intracranial hypertension — CSF opening pressure, treat with acetazolamide"],
     ["Wet + Wobbly + Wacky triad","Normal pressure hydrocephalus — VP shunt"],
     ["Pulvinar sign on MRI (bilateral posterior thalamic high signal)","Variant CJD — tonsil biopsy for prion protein; EEG usually normal in vCJD"],
     ["Rapid progressive dementia + myoclonus + ataxia + EEG periodic sharp waves","Sporadic CJD — CSF 14-3-3 protein; definitive diagnosis post-mortem"],
     ["Painful CN III palsy (eye down-and-out + dilated pupil)","Posterior communicating artery aneurysm — URGENT neurosurgery"],
     ["Painless CN III palsy with pupil spared","Diabetic/hypertensive microvascular ischaemia — conservative management"],
     ["CN VI palsy + raised ICP","False localising sign — CN VI has longest intracranial course"],
     ["Bilateral acoustic neuromas","NF2 — chromosome 22; also meningiomas and cataracts"],
     ["≥6 café-au-lait spots + Lisch nodules","NF1 — chromosome 17; risk of optic glioma, phaeochromocytoma"],
     ["Ash-leaf macule + epilepsy + learning disability + cardiac rhabdomyoma","Tuberous sclerosis — TSC1/TSC2; treat epilepsy; VP shunt if hydrocephalus"],
     ["Port-wine stain in V1 distribution + epilepsy + tram-track calcification","Sturge-Weber syndrome — GNAQ mutation; anticonvulsants"],
     ["Cerebellar haemangioblastoma + renal cell carcinoma + phaeochromocytoma","Von Hippel-Lindau — VHL gene chromosome 3p; erythrocytosis from EPO production"],
     ["Pes cavus + distal muscle wasting + foot drop","HSMN / Charcot-Marie-Tooth — HSMN I (demyelinating; NCV <30 m/s); HSMN II (axonal)"],
     ["Fasciculations + brisk reflexes + NO sensory loss + NO eye movement disorder","Motor Neuron Disease (ALS) — Riluzole extends survival ~3 months; MND never spares sphincters and sensation at same time"],
     ["Confusion + ophthalmoplegia + ataxia in alcoholic patient","Wernicke's encephalopathy (B1 deficiency) — IV thiamine BEFORE glucose; never give glucose alone"],
     ["Asymmetric Parkinsonism + autonomic failure + cerebellar signs","Multiple System Atrophy (MSA) — poor L-dopa response"],
     ["Parkinsonism + vertical gaze palsy (downgaze first) + early falls","Progressive Supranuclear Palsy (PSP) — axial rigidity; Richardson's syndrome"]],
    [65*mm, usable_w-65*mm], hdr_bg=DARK_BLUE,
    row_colors=[WHITE, LIGHT_BLUE]))
story.append(sp(3))

story.append(HRFlowable(width=usable_w, thickness=0.5, color=GREY_LINE))
story.append(sp(1.5))
story.append(Paragraph(
    "Source: Dr Khaled El Magraby – Step Up to MRCP Review Notes, Chapter 10: Neurology (2015)  |  "
    "Compiled for MRCPI Part 2 Written MCQ (BOF) Examination",
    FOOT_S))

doc.build(story)
print(f"PDF written: {OUTPUT}")
Running Command

cd /home/daytona/workspace && python3 build_neuro_fulltables.py

Searching Content

"SimpleDocTemplate" in ~/build_neuro_fulltables.py

Reading File
Reading File
Reading File
Editing File

~/build_neuro_fulltables.py

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/build_neuro_fulltables.py'
Running Command

cd /home/daytona/workspace && python3 build_neuro_fulltables.py

Running Command

python3 -c " from pypdf import PdfReader import os r = PdfReader('/home/daytona/workspace/MRCP_Neurology_HighYield_Tables.pdf') print(f'Pages: {len(r.pages)}') print(f'Size: {os.path.getsize(\"/home/daytona/workspace/MRCP_Neurology_HighYield_Tables.pdf\")/1024:.1f} KB') r2 = PdfReader('/home/daytona/workspace/MRCP_Neurology_Top30_CheatSheet.pdf') print(f'Cheat sheet pages: {len(r2.pages)}') print(f'Cheat sheet size: {os.path.getsize(\"/home/daytona/workspace/MRCP_Neurology_Top30_CheatSheet.pdf\")/1024:.1f} KB') "

Both PDFs are ready. Here are your download links:

Full High-Yield Tables (10 pages, 22 tables)

MRCP Neurology HighYield Tables

PDF Document · PDF

Top 30 Quick-Reference Cheat Sheet (3 pages)

MRCP Neurology Top30 CheatSheet

PDF Document · PDF


What's in the full tables PDF (10 pages):
PageTables Covered
1TIA ABCD2; Stroke territories; Carotid dissection; Intracranial haemorrhage
2Brain lobe lesions; UMN vs LMN
3Parkinson's features + drugs + plus syndromes
4Dementia comparison; Multiple sclerosis (features + investigations + treatment)
5Epilepsy drug table; GBS; MG vs LEMS; Nerve conduction studies
6Myotonic dystrophy; Headache differentials; IIH; Vertigo
7CSF analysis across all conditions
8Cranial nerve pearls (Horner's, CN III, INO, Bell's, acoustic neuroma)
9Neurocutaneous syndromes; Spinal cord syndromes; Deficiency states
10Master exam trigger table - 30 classic MRCP scenarios with one-line answers

Can you please build pdf

Running Command

ls -la /home/daytona/workspace/ && python3 /home/daytona/workspace/build_neuro_fulltables.py && python3 /home/daytona/workspace/build_neuro_cheatsheet.py

Running Command

python3 -c " from pypdf import PdfReader; import os for f in ['MRCP_Neurology_HighYield_Tables.pdf','MRCP_Neurology_Top30_CheatSheet.pdf']: p = f'/home/daytona/workspace/{f}' r = PdfReader(p) print(f'{f}: {len(r.pages)} pages, {os.path.getsize(p)/1024:.1f} KB') "

Both PDFs are freshly built and ready. Click to download:

📄 Full High-Yield Tables — 22 tables, 10 pages (complete neurology)

MRCP Neurology HighYield Tables

PDF Document · PDF

📄 Top 30 Quick-Reference Cheat Sheet — 3 pages

MRCP Neurology Top30 CheatSheet

PDF Document · PDF


If the links still don't work, try right-clicking and selecting "Save link as". Both files are confirmed valid PDFs in the sandbox.
This is a shared conversation. Sign in to Orris to start your own chat.