red flags and differential diagnosis of back pain, short dondensed presentation for family medicine posting year 3 by 2 students

Reading File
Finding Sources
Finding Sources
Finding Sources
Now let me read the most relevant sections in parallel:
Reading File
Reading File
Reading File
Excellent — rich content. Let me now get the Family Medicine textbook's specific red flags table and differential, plus the Goldman-Cecil flowchart image:
Reading File
Reading File
Reading File
I now have comprehensive content. Let me also fetch the evaluation flowchart image:
Loading Image
Finding Sources
I have all the material needed. Now I'll compile a concise, well-structured presentation for Year 3 Family Medicine students.

Back Pain: Red Flags & Differential Diagnosis

Family Medicine Year 3 Presentation


1. Overview

Back pain is one of the most common presentations in primary care. Only ~15% of patients have a specific identifiable cause — the primary task is efficiently ruling out dangerous conditions before managing the majority as mechanical pain.
A practical framework categorises patients into three groups:
  1. Nonspecific (mechanical) back pain — most common (~85%)
  2. Radicular pain — nerve root involvement
  3. Red flag–associated symptoms — serious underlying pathology
"Clinicians find red flag clues useful as simple ways to reassure themselves and their patients that a common symptom such as back pain does not have a sinister cause." — Harrison's Principles of Internal Medicine 22E

2. Evaluation Approach

Start every consultation by asking: Are red flags present?
Evaluation flowchart for acute and subacute back pain
Goldman-Cecil Medicine — Evaluation of Acute & Subacute Neck and Low Back Pain
  • No red flags → Conservative management; imaging NOT indicated before 6 weeks
  • Red flags present → Urgent MRI or specialist referral

3. Red Flags — By Serious Condition

🔴 Cauda Equina Syndrome (SURGICAL EMERGENCY)

FeatureDetail
Bilateral leg weaknessMajor motor deficit: knee extension, ankle, foot dorsiflexion
Urinary dysfunctionRetention (painless) or incontinence
Faecal incontinenceLoss of sensation of rectal fullness
Saddle anaesthesiaPerianal/perineal sensory loss — pathognomonic
Anal sphincter laxityUnexpected on exam
Requires same-day emergency MRI and neurosurgical referral.

🔴 Spinal Fracture

  • Sudden severe central spinal pain relieved by lying down
  • History of major trauma (RTC, fall from height)
  • Minor trauma or lifting in osteoporosis or steroid use
  • Structural deformity or step deformity on palpation
  • Point tenderness over vertebral body

🔴 Malignancy (Primary or Metastatic)

  • Age >50 years
  • Gradual onset of worsening pain
  • Unremitting pain present at rest/supine and at night (disturbs sleep)
  • Pain aggravated by Valsalva (coughing, sneezing, straining at stool)
  • Thoracic back pain (unusual distribution)
  • Localised spinal tenderness
  • Unexplained weight loss
  • No improvement after 4–6 weeks of conservative therapy
  • History of cancer — especially breast, lung, GI, prostate, renal, thyroid (all metastasise to spine)

🔴 Spinal Infection (Discitis, Vertebral Osteomyelitis, Epidural Abscess)

  • Fever
  • History of TB or recent UTI
  • Diabetes mellitus
  • IV drug use
  • HIV / immunosuppression / immunocompromise
  • Recent spinal surgery

🔴 Other High-Risk Red Flags (Goldman-Cecil Table 369-3)

FlagConcern
History of traumaFracture
Unexplained weight lossMalignancy
Unexplained feverInfection
ImmunosuppressionInfection/malignancy
Prolonged corticosteroid useOsteoporotic fracture
Age <20 yearsBack pain in a child = red flag for serious spinal pathology
Significant/progressive neurological deficitCord or cauda equina compromise
Myelopathy signsCervical/thoracic cord compression
Duration >6–12 weeks unresponsive to treatmentPathological cause
Uncontrollable painMalignancy or infection
"Back pain in a child is a red flag for serious spinal pathology." — Bailey & Love's Surgery 28E

4. Differential Diagnosis of Back Pain

Organised by Category

CategoryDiagnoses
Mechanical / TraumaticMuscle strain / ligament sprain, disc herniation, vertebral fracture, facet joint arthritis, spondylolysis, spondylolisthesis
DegenerativeDegenerative disc disease, spondylosis, spinal stenosis (neurogenic claudication), degenerative facet joint disease
Inflammatory / ImmuneAnkylosing spondylitis / axial spondyloarthritis, reactive arthritis, psoriatic arthritis, Guillain-Barré syndrome
InfectiousDiscitis, vertebral osteomyelitis, spinal epidural abscess, TB spine (Pott's disease), UTI/pyelonephritis
NeoplasticMetastatic spine disease, primary spinal tumours (extradural, intradural-extramedullary, intramedullary), multiple myeloma
VascularAortic aneurysm (AAA) ⚠️, aortic dissection ⚠️, spinal AVM, spinal epidural haematoma
Referred / Non-spinalRenal colic (urolithiasis), pyelonephritis, pancreatitis, peptic ulcer, endometriosis, ovarian pathology, testicular/prostatic carcinoma, retroperitoneal pathology, angina/MI, pulmonary embolism
Psychological / FunctionalChronic primary low back pain, central sensitisation, somatisation
Key point: AAA classically presents as severe, tearing back/flank pain in an older patient — do not miss this vascular emergency.

5. Clinical Clues at a Glance

ClueThink of
Young athlete, pain with extension, relieved by restSpondylolysis
Young man, morning stiffness, improves with activityAnkylosing spondylitis
Pain radiating below knee + SLR positiveDisc herniation / radiculopathy
Bilateral leg pain on walking, relieved by leaning forwardSpinal stenosis (neurogenic claudication)
Older patient, progressive pain, weight lossMalignancy
Fever + localised tenderness + IVDUEpidural abscess / osteomyelitis
Saddle anaesthesia + urinary retentionCauda equina — EMERGENCY
Colicky flank–groin–testicular radiation, haematuriaRenal colic
Pulsatile abdominal mass, shockAAA — EMERGENCY

6. Key Examination Tests

TestUse
Straight leg raise (SLR)Sensitivity 85–91% for disc herniation causing sciatica
Crossed SLRSpecificity 86–90% — highly specific for disc extrusion
Reverse SLR (femoral stretch)Upper lumbar (L2–L4) radiculopathy
Percussion of spinous processesFracture, infection, tumour
Saddle sensation + anal toneCauda equina screening
Abdominal palpationAAA, organomegaly, masses

7. When to Image

ScenarioAction
No red flags, <6 weeksNo imaging — reassure, conservative treatment
No red flags, >6 weeks, not improvingConsider MRI
Any red flagUrgent MRI (preferred — no radiation)
Suspected fracture without MRICT spine
AAA suspectedImmediate ultrasound / CT
Cauda equinaEmergency MRI same day
Radiographs require 40–60% bone destruction before detecting infection or tumour — not adequate for ruling out serious pathology. — Bailey & Love's Surgery 28E

8. Summary Memory Aid — RED FLAGS Mnemonic

LetterFlag
RRecent onset in age <20 or >50
EEvening/night pain (unremitting, wakes patient)
DDeficit — progressive neurological deficit
FFever / systemic illness / weight loss
LLevels — thoracic location (unusual)
AAnterior cancers — history of cancer
GGoing to toilet problems — bladder/bowel dysfunction
SSteroids / immunosuppression; saddle anaesthesia

Sources: Textbook of Family Medicine 9e (Rakel); Goldman-Cecil Medicine (Table 369-3); Bailey & Love's Short Practice of Surgery 28E (Tables 37.5, 37.6); Neuroanatomy through Clinical Cases 3E (Table 8.2); Harrison's Principles of Internal Medicine 22E (2025)

Less than 10 mins presentation,easy to understand undergraduate level for mbbs

Here's the trimmed-down, under-10-minute version — simple language, high-yield, easy to present:

Back Pain: Red Flags & Differential Diagnosis

Family Medicine | MBBS Year 3 | ~8 min presentation


Who Presents with Back Pain?

  • Extremely common — one of the top reasons patients visit a GP
  • 85% is mechanical (muscle strain, disc, posture) — benign, self-limiting
  • 15% has a serious cause — your job is to not miss this 15%
The clinical task = screen for red flags first, then manage the rest

The 3-Category Framework

Back Pain
    │
    ├── 1. Nonspecific / Mechanical   ← most common, treat conservatively
    ├── 2. Radicular (nerve root)     ← sciatica, disc herniation
    └── 3. RED FLAG conditions        ← serious, must rule out first

RED FLAGS — The 4 Dangerous Causes

Think: "CIFS" → Cancer · Infection · Fracture · Spinal cord/Cauda equina

🔴 1. Cancer (Metastatic Spine)

Red FlagMemory Hook
Age > 50
History of cancerbreast, lung, prostate, renal, thyroid → spine
Pain at rest / night pain (wakes from sleep)"Sinister pain never rests"
Unexplained weight loss
No improvement after 4–6 weeks

🔴 2. Infection (Osteomyelitis / Epidural Abscess / Discitis)

Red FlagMemory Hook
Fever
IV drug use
Diabetes / immunosuppression
Recent spine surgery or UTI
TB historyespecially in endemic areas

🔴 3. Fracture

Red FlagMemory Hook
Trauma (RTC, fall from height)
Osteoporosis + minor lift/twist"fragility fracture"
Steroid useweakens bone
Sudden severe central pain, relieved lying flat
Step deformity on palpation

🔴 4. Cauda Equina Syndrome — ⚠️ SURGICAL EMERGENCY

Miss this = permanent paralysis / incontinence
Red Flag
Saddle anaesthesia (numbness around anus/perineum)
Urinary retention or incontinence
Faecal incontinence
Bilateral leg weakness
Reduced anal tone on PR exam
Action: Same-day emergency MRI + neurosurgical referral

Quick Red Flag Summary Table

FlagSuspect
Age <20 or >50Cancer / developmental
Night pain / rest painCancer
Weight loss + back painCancer
Fever + back painInfection
IVDU / immunocompromisedInfection
Trauma + back painFracture
Saddle numbness + bladder/bowelCauda equina EMERGENCY
Progressive neuro deficitCord/cauda equina compromise
Back pain in a childAlways investigate — red flag by default

Differential Diagnosis — Simplified

CategoryExamples
MechanicalMuscle strain, disc herniation, spondylosis, spondylolisthesis
InflammatoryAnkylosing spondylitis, psoriatic arthritis
InfectiousOsteomyelitis, epidural abscess, TB spine
NeoplasticMetastases, myeloma, primary spinal tumours
VascularAAA ⚠️, aortic dissection ⚠️
Referred painRenal colic, pyelonephritis, pancreatitis, ectopic pregnancy, MI

Clinical clue shortcuts:

  • Young man + morning stiffness + improves with exercise → Ankylosing spondylitis
  • Pain radiating below knee + positive SLR → Disc herniation / Sciatica
  • Leg pain on walking + relieved by leaning forward → Spinal stenosis
  • Colicky flank pain → groin → testis + haematuria → Renal colic (referred)
  • Pulsatile abdominal mass + tearing back pain → AAA — call surgeon NOW

When to Image?

SituationDo This
No red flags, <6 weeksNo imaging — reassure, physio, NSAIDs
No red flags, >6 weeks, not improvingMRI spine
Any red flag presentUrgent MRI
Cauda equina suspectedEmergency MRI same day
X-rays miss early cancer and infection (need 40–60% bone destruction first) — MRI is the investigation of choice

Evaluation Flowchart

Back pain evaluation flowchart

Take-Home Messages (Say These in Your Conclusion)

  1. Most back pain is mechanical — reassure and treat conservatively
  2. Always screen for red flags — CIFS: Cancer, Infection, Fracture, cauda equina Syndrome
  3. Cauda equina = emergency — saddle anaesthesia + bladder/bowel = call surgeon today
  4. Night pain + weight loss + age >50 = cancer until proven otherwise
  5. No imaging before 6 weeks unless red flags are present
  6. Don't forget referred pain — kidney, aorta, pancreas can all present as back pain

Total speaking time: ~7–8 minutesSplit between 2 students: Student 1 covers Red Flags (slides 1–5) · Student 2 covers Differentials + Imaging + Take-home (slides 6–end)

Resources

Here are all the sources used for this presentation:

References

Textbooks

  1. Rakel, R.E. & Rakel, D.P.Textbook of Family Medicine, 9th Edition. Elsevier Saunders.
    • Chapter 31: Chronic Low Back Pain — Diagnostic approach, red flag classification, imaging guidelines
  2. Goldman, L. & Schafer, A.I.Goldman-Cecil Medicine, International Edition (2 Vol. Set). Elsevier.
    • Table 369-3: Red Flags in the Evaluation of Spine Pain
    • Evaluation flowchart for acute and subacute neck and low back pain
  3. Williams, N.S., O'Connell, P.R. & McCaskie, A.W.Bailey and Love's Short Practice of Surgery, 28th Edition. CRC Press/Taylor & Francis.
    • Table 37.5: Red flags — serious conditions causing low back pain
    • Table 37.6: Non-spinal (referred) causes of low back pain
    • Summary box 44.17 & 44.18: Red flag symptoms and signs for spinal pathology
  4. Blumenfeld, H.Neuroanatomy through Clinical Cases, 3rd Edition. Sinauer/Oxford University Press.
    • Table 8.2: Differential Diagnosis of Back Pain (organised by pathological category)
  5. Kasper, D.L. et al.Harrison's Principles of Internal Medicine, 22nd Edition (2025). McGraw-Hill Medical.
    • Differential diagnosis of mechanical vs. pathological back pain; red flag clues in clinical context

Guidelines Referenced (within textbook content)

  • American College of Physicians (ACP) / American Pain Society — Joint 2007 guideline on low back pain: three-category classification framework (nonspecific, radicular, red flag)
  • NICE (UK National Institute for Health and Care Excellence) — Guidelines on chronic low back pain management (2009): evidence base for physiotherapy, manual therapy, and conservative care

For Further Reading

  • Chou R, et al. Diagnosis and treatment of low back pain: a joint clinical practice guideline from the ACP and APS. Ann Intern Med. 2007;147(7):478–491.
  • NICE guideline NG59: Low back pain and sciatica in over 16s. Updated 2020. nice.org.uk/guidance/ng59

Help me understand this topic from a to z

Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Finding Sources
Reading File
Reading File
Reading File
Finding Sources
Reading File
Reading File
Here is your complete A–Z guide on back pain, built from multiple major textbooks. Read this once and you'll understand the whole topic deeply.

Back Pain: A to Z — Complete MBBS Guide


A — ANATOMY (What Can Hurt?)

The spine is not one simple structure — multiple components can be pain generators:
Vertebral body
    │
Intervertebral disc ← nucleus pulposus (gel centre) + annulus fibrosus (tough ring)
    │
Facet joints (posterior)
    │
Ligaments (anterior/posterior longitudinal, ligamentum flavum, interspinous)
    │
Paraspinal muscles & fascia
    │
Nerve roots (exit through neural foramina at each level)
    │
Spinal cord (ends at L1 in adults → becomes cauda equina below)
Key anatomy facts:
  • The spinal cord ends at L1 in adults. Below L1 = cauda equina (a bundle of nerve roots, like a horse's tail)
  • L4–5 and L5–S1 are the most common levels for disc herniation (>90% of lumbar herniations)
  • The L5 nerve root is the most commonly affected
  • Lumbar lordosis (normal concavity) is 40–60° — loss of lordosis = muscle spasm

B — BASIC CLASSIFICATION (The 3 Buckets)

Every back pain patient fits into one of three categories. This is your clinical starting point:
BucketWhat it meansHow common
1. Nonspecific / MechanicalNo identifiable structural cause~85%
2. RadicularNerve root involvement (sciatica)~10%
3. Red Flag / SeriousCancer, infection, fracture, cauda equina~5%
Your job: rule out Bucket 3, identify Bucket 2, manage Bucket 1.

C — CAUSES (Full Differential)

By Category:

CategorySpecific Diagnoses
MechanicalMuscle strain, ligament sprain, disc herniation, facet joint pain, spondylolysis, spondylolisthesis
DegenerativeDegenerative disc disease, spondylosis (spinal osteoarthritis), spinal stenosis
InflammatoryAnkylosing spondylitis, psoriatic arthritis, reactive arthritis
InfectiousVertebral osteomyelitis, discitis, epidural abscess, TB spine (Pott's disease)
NeoplasticSpinal metastases, multiple myeloma, primary spinal tumours
VascularAAA, aortic dissection, spinal AVM, epidural haematoma
Referred / VisceralRenal colic, pyelonephritis, pancreatitis, peptic ulcer, AAA, ovarian pathology, ectopic pregnancy, prostatitis, MI/PE
NeurologicalCauda equina syndrome, myelopathy, Guillain-Barré syndrome
Functional / PsychosocialCentral sensitisation, somatisation, depression-associated pain

D — DISC HERNIATION (Understand the Mechanism)

This is the single most important specific cause to understand:

How it happens:

Ageing → loss of water content in disc nucleus
           ↓
Annulus fibrosus thins and tears
           ↓
Nucleus pulposus herniates (usually POSTEROLATERAL)
           ↓
Compresses and inflames adjacent nerve root
           ↓
RADICULOPATHY (pain + numbness + weakness in dermatomal pattern)

Types of disc pathology:

  • Bulge — disc bulges but annulus intact
  • Protrusion — nucleus pushes out, annulus partially torn
  • Extrusion — nucleus through annulus, contained by posterior longitudinal ligament
  • Sequestration — disc material free in spinal canal (most severe)

Natural history:

Good news: most disc herniations improve spontaneously as inflammation subsides and the disc material shrinks over time. Only a minority require surgery.

E — EXAMINATION (Step-by-Step)

1. Inspect (Look)

  • From behind: scoliosis? muscle wasting? skin lesions?
  • From the side: normal lumbar lordosis present? Reduced = muscle spasm
  • Hairy tuft / dimple at sacrum = possible spina bifida

2. Palpate (Feel)

  • Midline spinous process tenderness → fracture, infection, tumour (percussion is also useful)
  • Paraspinal muscle tenderness / spasm → mechanical pain
  • Step-off deformity → spondylolisthesis

3. Move

MovementNormal RangeClinical Note
Flexion40–60°Pain = discogenic
Extension20–35°Pain = facet joint / spondylolysis
Lateral bending~20–30° each side
Rotation3–18°

4. Special Tests

Straight Leg Raise (SLR) / Lasègue's test:
  • Patient supine → raise leg with knee extended
  • Positive = pain radiating DOWN the leg (not just back) between 30–70°
  • Add ankle dorsiflexion to increase sciatic tension (bow-stringing sign)
  • Sensitivity: 85–91% for disc herniation
  • Tests L4, L5, S1 nerve roots
Crossed SLR:
  • Raise the UNAFFECTED leg → pain in the SYMPTOMATIC leg
  • Specificity 86–90% — highly specific for disc extrusion
Femoral Stretch Test (Reverse SLR):
  • Patient prone → flex knee with hip extended
  • Pain in anterior thigh = L2, L3, L4 nerve root irritation
Cauda Equina Screen (ALWAYS check):
  • Perianal / saddle sensation (pinprick)
  • Anal tone (digital rectal exam if suspected)
  • Ask about urinary retention vs. incontinence
  • Measure post-void residual (PVR >100 mL = denervated bladder)

F — FEATURES THAT DISTINGUISH CAUSES (Clinical Clues)

Pain PatternLikely Cause
Unilateral, worsened by movement, relieved by rest, no neurological symptomsMechanical / muscle strain
Radiates below the knee, dermatomal, worsened by Valsalva/sitting, relieved lyingDisc herniation / radiculopathy
Bilateral leg pain walking, relieved leaning forward (shopping cart sign)Spinal stenosis
Young man, morning stiffness >1 hour, improves with exercise, not restAnkylosing spondylitis
Athlete, pain with back extension, not flexionSpondylolysis (pars stress fracture)
Age >50, progressive, night pain, weight lossMalignancy
Fever + back pain + point tenderness + IVDU or DMOsteomyelitis / epidural abscess
Sudden tearing back pain + hypotension + pulsatile abdominal massRuptured AAA — EMERGENCY
Colicky flank pain → groin → testis + haematuriaRenal colic
Saddle numbness + urinary retention/incontinenceCauda equina — EMERGENCY
Back pain in a CHILDAlways red flag — investigate

G — GRADING NEUROLOGICAL DEFICIT (Nerve Root Table)

The three most clinically important levels:
Nerve RootDisc LevelMotor LossSensory LossReflex Lost
L4L3–4Knee extension (quadriceps)Medial shinKnee jerk (patellar) ↓
L5L4–5 (most common)Foot/big toe dorsiflexionDorsum of foot, lateral shinNo reliable reflex
S1L5–S1Plantarflexion, toe walkingLateral foot, soleAnkle jerk ↓
Muscles have multi-root innervation, so strength may be preserved despite significant root involvement — sensory and reflex changes are often more reliable.

H — HISTORY (What to Ask)

SOCRATES + targeted red flag screen:
Basic pain history:
  • Site, Onset, Character, Radiation, Associations, Time course, Exacerbating/relieving, Severity
Always ask specifically:
  • Does pain wake you at night? (malignancy)
  • Pain at rest / supine? (malignancy)
  • Weight loss? Fever? (malignancy / infection)
  • Any bowel or bladder changes? (cauda equina — ask about retention, not just incontinence)
  • Saddle numbness? (cauda equina)
  • Any history of cancer? (metastasis)
  • IV drug use? DM? Immunosuppression? (infection)
  • Trauma? Steroid use? Osteoporosis? (fracture)
Character clues:
  • Mechanical pain: unilateral, worsened by movement, relieved by rest
  • Radicular pain: below knee, dermatomal, electrical/shooting, worse with Valsalva
  • Discogenic: worse with flexion/sitting
  • Facet/spondylolysis: worse with extension
  • Inflammatory: morning stiffness >1hr, improves with activity, worse at rest
  • Stenosis: bilateral, worse with walking/extension, relieved by sitting/bending

I — INVESTIGATIONS

When to investigate:

Do NOT image in the first 6 weeks if no red flags are present. MRI often shows incidental findings (disc disease in 25% of asymptomatic people under 60, 33% over 60) that mislead management.

Investigation ladder:

TestWhen to useKey points
Bloods (FBC, ESR, CRP, Ca²⁺, PSA, LFTs)Suspected infection, malignancy, inflammatory diseaseESR/CRP raised in infection and malignancy
X-ray spineTrauma, scoliosis assessmentCannot detect early infection or tumour — needs 40–60% bone destruction. Equivalent to 300 chest X-rays (CT lumbar)
MRI spineInvestigation of choice for soft tissue, nerve roots, cord, discs>90% sensitivity and specificity for malignancy, infection, epidural compression. Use WITH contrast if abscess/mets suspected
CT spineTrauma (bone detail), MRI contraindicated, post-surgical anatomyBetter than MRI for fractures and bony anatomy
Bone scanMulti-level metastatic surveyUseful when MRI unavailable or full skeletal survey needed
Urine dipstick/cultureUTI or pyelonephritis as referred causeSimple, first-line
CT Abdomen/PelvisAAA suspectedUSS first if stable, CT if unstable or high suspicion

J — JOINT INFLAMMATORY CAUSES (Spondyloarthropathies)

Ankylosing spondylitis / Axial Spondyloarthritis (axSpA):
  • Young men (onset <40 years)
  • Insidious onset of chronic low back pain
  • Morning stiffness >1 hour, improves with exercise, NOT with rest
  • Night pain with improvement on getting up
  • Bilateral sacroiliitis on imaging (hallmark)
  • HLA-B27 positive in ~90%
  • MRI sacroiliac joints: osteitis (bone marrow oedema) — earliest sign
  • axSpA accounts for only 4–5% of chronic back pain — mechanical is still far more common

K — KEY EMERGENCIES (Do Not Miss)

EmergencyKey FeatureImmediate Action
Cauda Equina SyndromeSaddle anaesthesia + urinary retention + bilateral leg weaknessSame-day emergency MRI → neurosurgery
Ruptured/Expanding AAATearing back/flank pain + hypotension + pulsatile massUrgent vascular surgery — do NOT delay for imaging if unstable
Aortic DissectionTearing pain radiating to back + unequal BP in arms + aortic regurgitation murmurCT aortography immediately
Spinal Epidural AbscessFever + back pain + progressive neurological deficitEmergency MRI with contrast → neurosurgery + IV antibiotics
MyelopathySpastic gait, bilateral UMN signs (hyperreflexia, Babinski), bilateral sensory levelUrgent MRI spine

L — LOWER MOTOR NEURON vs UPPER MOTOR NEURON (Cord vs. Cauda)

Understanding this is crucial for localisation:
FeatureCauda Equina (LMN)Cord / Myelopathy (UMN)
LevelBelow L1Above L1 (conus/cord)
ToneDecreased (flaccid)Increased (spastic)
ReflexesDecreased / absentIncreased / brisk
PlantarFlexorExtensor (Babinski +)
BladderOverflow incontinence / retentionUrgency / urge incontinence
SensationSaddle distributionSensory LEVEL (below a horizontal line)

M — MANAGEMENT

Acute Mechanical Back Pain (the majority):

  1. Reassure — 90% resolve within 6–12 weeks
  2. Stay active — bed rest is harmful and delays recovery
  3. Analgesia:
    • 1st line: Paracetamol + NSAIDs (e.g., ibuprofen/diclofenac)
    • Add: Muscle relaxants (e.g., diazepam short-course) for muscle spasm
    • Avoid: long-term opioids — risk of dependence with little added benefit
  4. Physiotherapy — core strengthening, stretching
  5. No imaging before 6 weeks

Radiculopathy / Sciatica:

  • Same as above + Gabapentin/Pregabalin for neuropathic pain
  • Epidural steroid injection if no improvement
  • Surgery only if: progressive neurological deficit, failed conservative treatment >6–12 weeks, or large disc extrusion

Chronic Low Back Pain:

  • Multimodal approach — physical + psychological + pharmacological
  • Exercise therapy (aerobic + specific strengthening)
  • CBT (Cognitive Behavioural Therapy) — addresses psychological component of central sensitisation
  • Avoid MRI early (causes over-medicalisation and more surgery without better outcomes per Family Medicine textbook)
  • NICE guidelines: offer physiotherapy, manual therapy, or acupuncture

Red Flag Conditions:

CauseManagement
MalignancyOncology referral, MRI, radiotherapy/chemotherapy/surgical decompression
InfectionIV antibiotics, bed rest, possible surgical drainage
Fracture (stable)Analgesia, orthopaedic review, consider vertebroplasty/kyphoplasty
Cauda equinaEmergency surgical decompression

N — NEUROGENIC vs. VASCULAR CLAUDICATION (Classic OSCE Question)

FeatureNeurogenic Claudication (Spinal stenosis)Vascular Claudication (Peripheral arterial disease)
Pain onsetAfter walkingAfter walking
ReliefSitting or bending forward (increases canal space)Standing still
Position effectBetter leaning on shopping cartNo positional effect
PulsesNormalReduced / absent
SLRUsually negativeNegative
SkinNormalPale, hairless, cool

O — OSTEOPOROSIS AND FRACTURE

  • Silent disease until fracture occurs
  • Fragility fracture = fracture from trivial force (e.g., coughing, bending, minor lift)
  • Risk factors: Female sex, post-menopausal, corticosteroid use, low BMI, smoking, alcohol, family history
  • Vertebral compression fracture = sudden central back pain, relieved lying flat
  • Diagnosis: DEXA scan for BMI (T-score ≤ −2.5 = osteoporosis)
  • Management: Analgesia, bisphosphonates, vitamin D + calcium supplementation, vertebroplasty/kyphoplasty for ongoing pain

P — PAIN PHYSIOLOGY (Why Back Pain Becomes Chronic)

Understanding this helps explain why back pain is hard to treat:
Acute pain
    ↓
Peripheral nociceptors (disc, facet, muscle, ligament)
    ↓
Dorsal root ganglion → dorsal horn (spinal cord)
    ↓
Thalamus → Limbic system → Cortex (pain perception + emotional colouring)
    ↓
In chronic pain:
  Neuron hyperexcitability
  Changes in gene expression
  Signal amplification
  Central sensitisation
  ↓
Pain persists even without ongoing tissue damage
Modifiable risk factors for back pain:
  • Obesity
  • Smoking / nicotine dependence
  • Alcohol excess
  • Depression and anxiety
  • Sedentary lifestyle

Q — QUICK DIAGNOSTIC ALGORITHM

Patient with Back Pain
         │
         ▼
    RED FLAGS?
    ─────────────────────────────────
    YES                           NO
     │                             │
     ▼                             ▼
Urgent MRI               Mechanical / Radicular?
± bloods ± specialist          │
referral                        ├── Radicular (leg pain below knee,
                                │   +SLR, dermatomal)
                                │       → Treat: NSAIDs + gabapentin
                                │         Image if >6 wks no improvement
                                │
                                └── Non-specific mechanical
                                        → Reassure, NSAIDs, physio
                                          No imaging < 6 weeks

R — RED FLAGS RECALL (the CIFS mnemonic)

CIFS
CancerInfectionFractureSpinal cord / Cauda equina
Age >50, weight loss, night pain, Hx cancerFever, IVDU, DM, immunocompromisedTrauma, osteoporosis, steroidsSaddle anaesthesia, bladder/bowel dysfunction

S — SPINAL STENOSIS (Important in Elderly)

  • Acquired narrowing of the spinal canal (or foramina)
  • Causes: thickened ligamentum flavum, disc bulge, osteophytes, spondylolisthesis
  • Classic patient: elderly, bilateral leg pain/weakness/paraesthesia on walking
  • Neurogenic claudication — relieved by sitting/leaning forward
  • MRI confirms diagnosis
  • Management: conservative initially, epidural steroids, surgical decompression if refractory

T — TB SPINE (Pott's Disease)

Important in endemic areas (South Asia, Africa):
  • Haematogenous spread from pulmonary TB to vertebral body (usually lower thoracic/upper lumbar)
  • Anterior vertebral body destruction → kyphotic deformity (Gibbus)
  • Cold abscess may track down psoas muscle → psoas abscess (flank swelling)
  • May present as back pain + weakness + constitutional symptoms (fever, weight loss, night sweats)
  • Diagnosis: MRI spine + biopsy + Xpert MTB/RIF
  • Management: Anti-TB therapy ×6–12 months, surgical decompression if neurological deficit

U — UPPER LUMBAR & THORACIC PAIN (Don't Forget)

  • Thoracic back pain = red flag — mechanical thoracic pain is uncommon
  • Think: aortic aneurysm, MI, pulmonary embolism, malignancy
  • Upper lumbar (L1–3) radiculopathy: pain radiates to groin or anterior thigh, not the posterior leg
  • No specific tendon reflex for L1–3; hip flexion power (iliopsoas) is the motor marker

V — VISCERAL / REFERRED PAIN (Non-Spinal Back Pain)

The back is a common site of referred pain from abdominal and pelvic organs:
OrganConditionClue
KidneyRenal colicColicky, flank → groin → scrotum/labia, haematuria
KidneyPyelonephritisFever + CVA tenderness + dysuria
PancreasPancreatitis, pancreatic cancerEpigastric pain radiating to back, worse lying, relieved leaning forward
AortaAAA / dissectionTearing, pulsatile mass, hypotension
Uterus/OvaryEndometriosis, ovarian torsion, ectopicCyclical pain or acute onset in women
ProstateProstatitis, prostate cancerUrinary symptoms, tender PR
BowelPeptic ulcer, cholecystitisAccompanying GI symptoms
Lung/PleuraPneumonia, mesotheliomaPleuritic chest pain + back pain

W — WHEN TO REFER

SituationRefer to
Cauda equina symptomsNeurosurgery — SAME DAY
Progressive neurological deficitNeurology / Neurosurgery — URGENT
Suspected malignancyOncology — within 2 weeks
Suspected spinal infectionInfectious disease / Neurosurgery
Ankylosing spondylitisRheumatology
Spinal stenosis refractory to conservative RxOrthopaedic / Neurosurgery
Mechanical back pain, failed 6 weeks RxPhysiotherapy ± pain clinic

X — X-RAYS: What They Show and Miss

X-ray can showX-ray CANNOT show
Vertebral alignment / spondylolisthesisEarly infection (needs 40–60% bone loss)
Fracture (some)Soft tissue: discs, nerves, cord
Scoliosis (whole spine standing film)Early tumour
Osteophytes / disc space narrowingNerve root compression
Osteoporosis (advanced)Early osteoporosis
Bottom line: X-ray is almost never the right first choice. MRI is.

Y — YELLOW FLAGS (Psychosocial Risk Factors for Chronicity)

Just as red flags indicate serious pathology, yellow flags indicate risk of chronic disability:
Yellow Flag
Belief that pain = serious damage
Avoidance of activity / fear of movement
Passive coping (waiting for pain to go away)
Depression or anxiety
Poor job satisfaction or workplace conflict
Previous prolonged sick leave
Social isolation
Identifying yellow flags early and addressing them with CBT / biopsychosocial management prevents acute back pain from becoming chronic.

Z — ZERO IN ON THE DIAGNOSIS (Summary Approach)

Step 1: HISTORY — SOCRATES + red flag screen
Step 2: EXAMINE — Look / Feel / Move / Neuro / Special tests
Step 3: CLASSIFY — Mechanical? Radicular? Red Flag?
Step 4: INVESTIGATE — Bloods only if red flags; MRI if needed
Step 5: MANAGE — Reassure + analgesia + physio (most patients)
                  Urgent referral if red flag
Step 6: FOLLOW UP — Review at 6 weeks; re-assess if not improving

Master Summary Table

ConceptKey Fact
Most common typeNonspecific mechanical (~85%)
Most common disc levelL4–5 and L5–S1
Most common nerve rootL5
SLR testsL4, L5, S1 roots
Femoral stretch testsL2, L3, L4 roots
Imaging thresholdNo imaging < 6 weeks without red flags
Investigation of choiceMRI spine
Cauda equina reflexAnkle jerk (S1), knee jerk (L4)
Emergency that must not be missedCauda equina syndrome → same-day MRI
Vascular emergencyAAA / aortic dissection
Child with back painAlways investigate
Thoracic back painAlways red flag
Chronic pain mechanismCentral sensitisation
Psychosocial flagsYellow flags → CBT approach

Sources: Rosen's Emergency Medicine 9e · Bailey & Love's Surgery 28e · Textbook of Family Medicine 9e · Goldman-Cecil Medicine · Harrison's Principles 22E (2025) · Miller's Review of Orthopaedics 9e · Bradley & Daroff's NeurologyYour credits are exhausted. Your daily credits reset tomorrow, or you can purchase a top-up for more.

From differential diagnosis to the end, do my slides with prpper images, 16 by 9, take home messages not needed, i need investigation and management, if too redundant isokay

Reading File
Reading File
Reading File
Searching Images

back pain differential diagnosis table spinal causes

Searching Images

MRI lumbar spine disc herniation nerve root compression

Searching Images

spinal stenosis neurogenic claudication imaging

Searching Images

straight leg raise test sciatica examination

Searching Images

cauda equina syndrome saddle anaesthesia bladder

Searching Images

ankylosing spondylitis sacroiliitis bamboo spine xray

Searching Images

vertebral osteomyelitis discitis MRI spine infection

Good — I have excellent images. Now let me build the presentation:
Running Command

mkdir -p /home/daytona/workspace/back-pain-pptx && ls /home/daytona/workspace/back-pain-pptx

Running Command

node /home/daytona/skills/shared/scripts/fetch_images.js \ "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_a84ad3fc973fae2a0f6d6f1b295bd04c1df17fc48ca6d8eb48063e909d934d0d.jpg" \ "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_ffb7c41945260763bde7a72f6d5bce0590d167abd7b8c1fc6951d1f4dc53646b.jpg" \ "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_bffd6cdd6d026826a2da9cd6a754df6f6f830798a14f3991b0903cbcc79af5b7.jpg" \ "https://cdn.orris.care/cdss_images/BAILY_1760540610530_0096e21e-9b89-407c-b5c3-e8a325e2fe0e.png" \ "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_7425b51cfdb9992868700cd089803aa4497f8a9888b9ad2d7965359f30e89061.jpg" \ "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_921ac2afb3e00e23b0fd5aae4d22c925d2fa7189c79a4356cb38b97e47e8e6a2.jpg" \ "https://cdn.orris.care/cdss_images/8ccce8a09ffc10d0499ab5567e64e10f3caa336cf44f7c3f037b610a89783417.png" \ 2>/dev/null | node -e "const d=require('fs').readFileSync('/dev/stdin','utf8'); const arr=JSON.parse(d); arr.forEach((x,i)=>{ if(x.base64) require('fs').writeFileSync('/home/daytona/workspace/back-pain-pptx/img'+i+'.txt', x.base64); console.log(i, x.error||'ok', x.base64?x.base64.substring(0,40):'FAIL'); });"

All 7 images downloaded. Now building the full presentation:
Writing File

~/back-pain-pptx/build.js

const pptxgen = require("pptxgenjs");
const fs = require("fs");

const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Back Pain: Differential Diagnosis, Investigations & Management";

// Load images
const img = {};
for (let i = 0; i <= 6; i++) {
  const p = `/home/daytona/workspace/back-pain-pptx/img${i}.txt`;
  if (fs.existsSync(p)) img[i] = fs.readFileSync(p, "utf8");
}

// Color palette — deep navy + white + crimson accent + teal highlights
const NAV = "0D1B2A";   // deep navy (dominant bg)
const NAV2 = "1A2E45";  // slightly lighter navy for cards
const WHT = "FFFFFF";
const CRM = "C0392B";   // crimson / red accent
const TEA = "1ABC9C";   // teal highlight
const GLD = "F1C40F";   // gold accent
const LGR = "BDC3C7";   // light grey
const DGR = "2C3E50";   // dark blue-grey

// Helper: slide background
function bg(slide) {
  slide.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: NAV }, line: { color: NAV } });
}

// Helper: header bar with title
function header(slide, title, sub) {
  slide.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 1.0, fill: { color: CRM }, line: { color: CRM } });
  slide.addShape(pres.shapes.RECTANGLE, { x: 0, y: 1.0, w: 10, h: 0.05, fill: { color: TEA }, line: { color: TEA } });
  slide.addText(title, { x: 0.3, y: 0.05, w: 9.4, h: 0.7, fontSize: 26, bold: true, color: WHT, fontFace: "Calibri", valign: "middle", margin: 0 });
  if (sub) slide.addText(sub, { x: 0.3, y: 0.72, w: 9.4, h: 0.32, fontSize: 12, color: "FFCCCC", fontFace: "Calibri", valign: "middle", margin: 0 });
}

// Helper: section label
function sectionBadge(slide, text, x, y, w, color) {
  slide.addShape(pres.shapes.ROUNDED_RECTANGLE, { x, y, w, h: 0.32, fill: { color: color || TEA }, line: { color: color || TEA }, rectRadius: 0.05 });
  slide.addText(text, { x, y, w, h: 0.32, fontSize: 9, bold: true, color: WHT, align: "center", valign: "middle", fontFace: "Calibri", margin: 0 });
}

// Helper: card
function card(slide, x, y, w, h, fillColor) {
  slide.addShape(pres.shapes.ROUNDED_RECTANGLE, { x, y, w, h, fill: { color: fillColor || NAV2 }, line: { color: "2980B9", width: 0.5 }, rectRadius: 0.08, shadow: { type: "outer", color: "000000", blur: 4, offset: 2, angle: 135, opacity: 0.25 } });
}

// ─────────────────────────────────────────────
// SLIDE 1 — TITLE SLIDE
// ─────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s);
  // full-width accent bar
  s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 0.12, h: 5.625, fill: { color: CRM }, line: { color: CRM } });
  s.addShape(pres.shapes.RECTANGLE, { x: 0.12, y: 0, w: 0.06, h: 5.625, fill: { color: TEA }, line: { color: TEA } });

  s.addText("BACK PAIN", { x: 0.5, y: 0.7, w: 9, h: 1.1, fontSize: 52, bold: true, color: WHT, fontFace: "Calibri", margin: 0 });
  s.addText("Differential Diagnosis · Investigations · Management", { x: 0.5, y: 1.85, w: 9, h: 0.55, fontSize: 20, color: TEA, fontFace: "Calibri", margin: 0 });
  s.addShape(pres.shapes.RECTANGLE, { x: 0.5, y: 2.5, w: 5, h: 0.04, fill: { color: CRM }, line: { color: CRM } });
  s.addText("Family Medicine | MBBS Year 3", { x: 0.5, y: 2.65, w: 9, h: 0.4, fontSize: 15, color: LGR, fontFace: "Calibri", margin: 0 });
  s.addText("Student Presentation — ~8 minutes", { x: 0.5, y: 3.1, w: 9, h: 0.35, fontSize: 13, color: "7F8C8D", fontFace: "Calibri", margin: 0 });

  // Spine silhouette icon using circles
  s.addShape(pres.shapes.OVAL, { x: 8.1, y: 0.8, w: 1.4, h: 1.4, fill: { color: NAV2 }, line: { color: CRM, width: 2 } });
  s.addText("⚕", { x: 8.1, y: 0.85, w: 1.4, h: 1.3, fontSize: 44, color: CRM, align: "center", valign: "middle", margin: 0 });
}

// ─────────────────────────────────────────────
// SLIDE 2 — FRAMEWORK (3 BUCKETS)
// ─────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s);
  header(s, "THE CLINICAL FRAMEWORK", "Start every back pain consultation with this");

  // 3 bucket cards
  const buckets = [
    { label: "~85%", title: "NONSPECIFIC\nMECHANICAL", sub: "Muscle strain, disc, posture\nNo red flags\nSelf-limiting", color: "27AE60" },
    { label: "~10%", title: "RADICULAR\n(SCIATICA)", sub: "Nerve root irritation\nLeg pain below knee\nDermatomal pattern", color: "E67E22" },
    { label: "~5%", title: "RED FLAG\nCONDITION", sub: "Cancer · Infection\nFracture · Cauda Equina\nRequires urgent workup", color: CRM },
  ];
  const xs = [0.25, 3.55, 6.85];
  buckets.forEach((b, i) => {
    card(s, xs[i], 1.2, 3.1, 3.8, NAV2);
    s.addShape(pres.shapes.OVAL, { x: xs[i] + 0.9, y: 1.35, w: 1.3, h: 0.55, fill: { color: b.color }, line: { color: b.color } });
    s.addText(b.label, { x: xs[i] + 0.9, y: 1.35, w: 1.3, h: 0.55, fontSize: 16, bold: true, color: WHT, align: "center", valign: "middle", fontFace: "Calibri", margin: 0 });
    s.addText(b.title, { x: xs[i] + 0.1, y: 2.0, w: 2.9, h: 0.75, fontSize: 14, bold: true, color: WHT, align: "center", fontFace: "Calibri", margin: 0 });
    s.addShape(pres.shapes.RECTANGLE, { x: xs[i] + 0.6, y: 2.75, w: 1.9, h: 0.03, fill: { color: b.color }, line: { color: b.color } });
    s.addText(b.sub, { x: xs[i] + 0.1, y: 2.85, w: 2.9, h: 1.0, fontSize: 11, color: LGR, align: "center", fontFace: "Calibri", margin: 0 });
  });

  s.addText("Your primary task: RULE OUT Bucket 3 first, then manage the rest", { x: 0.3, y: 5.1, w: 9.4, h: 0.38, fontSize: 13, bold: true, color: GLD, align: "center", fontFace: "Calibri", margin: 0 });
}

// ─────────────────────────────────────────────
// SLIDE 3 — DIFFERENTIAL DIAGNOSIS TABLE
// ─────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s);
  header(s, "DIFFERENTIAL DIAGNOSIS", "Organised by category");

  const rows = [
    ["MECHANICAL", "Muscle strain · Ligament sprain · Disc herniation · Facet joint pain · Spondylolysis · Spondylolisthesis", "27AE60"],
    ["DEGENERATIVE", "Degenerative disc disease · Spondylosis · Spinal stenosis (neurogenic claudication)", "2ECC71"],
    ["INFLAMMATORY", "Ankylosing spondylitis · Psoriatic arthritis · Reactive arthritis", "E67E22"],
    ["INFECTIOUS", "Vertebral osteomyelitis · Discitis · Epidural abscess · TB spine (Pott's disease)", CRM],
    ["NEOPLASTIC", "Spinal metastases · Multiple myeloma · Primary spinal tumours · Leukaemia/Lymphoma", "9B59B6"],
    ["VASCULAR", "AAA · Aortic dissection · Spinal epidural haematoma · Spinal AVM", "E74C3C"],
    ["REFERRED / VISCERAL", "Renal colic · Pyelonephritis · Pancreatitis · Ovarian/testicular · Ectopic pregnancy · MI · PE", "3498DB"],
  ];

  rows.forEach((r, i) => {
    const y = 1.15 + i * 0.6;
    s.addShape(pres.shapes.RECTANGLE, { x: 0.15, y, w: 2.1, h: 0.5, fill: { color: r[2] }, line: { color: r[2] } });
    s.addText(r[0], { x: 0.15, y, w: 2.1, h: 0.5, fontSize: 9.5, bold: true, color: WHT, align: "center", valign: "middle", fontFace: "Calibri", margin: 0 });
    s.addShape(pres.shapes.RECTANGLE, { x: 2.3, y, w: 7.5, h: 0.5, fill: { color: NAV2 }, line: { color: r[2], width: 0.8 } });
    s.addText(r[1], { x: 2.35, y, w: 7.4, h: 0.5, fontSize: 10.5, color: WHT, valign: "middle", fontFace: "Calibri", margin: 0 });
  });
}

// ─────────────────────────────────────────────
// SLIDE 4 — CLINICAL CLUES
// ─────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s);
  header(s, "CLINICAL CLUES AT A GLANCE", "Pain pattern → likely cause");

  const clues = [
    ["Movement ↑ pain, rest relieves, no neurology", "Mechanical / Muscle strain", "27AE60"],
    ["Leg pain below knee, dermatomal, worse with Valsalva", "Disc herniation / Sciatica", "E67E22"],
    ["Bilateral leg pain walking, shopping cart sign", "Spinal stenosis", "3498DB"],
    ["Young man, morning stiffness >1hr, improves with exercise", "Ankylosing spondylitis", "E67E22"],
    ["Age >50, night pain, weight loss", "Malignancy ⚠", CRM],
    ["Fever + back pain + IVDU/DM/immunocompromised", "Osteomyelitis / Epidural abscess ⚠", CRM],
    ["Saddle numbness + urinary retention", "Cauda Equina — EMERGENCY 🚨", "8E44AD"],
    ["Colicky flank → groin + haematuria", "Renal colic (referred)", "3498DB"],
    ["Tearing back pain + pulsatile mass + hypotension", "Ruptured AAA — EMERGENCY 🚨", "8E44AD"],
    ["Back pain in a CHILD", "Always red flag — investigate", CRM],
  ];

  clues.forEach((c, i) => {
    const col = i < 5 ? 0 : 1;
    const row = i < 5 ? i : i - 5;
    const x = col === 0 ? 0.15 : 5.1;
    const y = 1.15 + row * 0.82;
    s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x, y, w: 4.8, h: 0.72, fill: { color: NAV2 }, line: { color: c[2], width: 1 }, rectRadius: 0.06 });
    s.addShape(pres.shapes.RECTANGLE, { x, y, w: 0.08, h: 0.72, fill: { color: c[2] }, line: { color: c[2] } });
    s.addText(c[0], { x: x + 0.15, y: y + 0.03, w: 4.6, h: 0.32, fontSize: 9.5, color: LGR, fontFace: "Calibri", margin: 0 });
    s.addText("→ " + c[1], { x: x + 0.15, y: y + 0.35, w: 4.6, h: 0.3, fontSize: 10, bold: true, color: WHT, fontFace: "Calibri", margin: 0 });
  });
}

// ─────────────────────────────────────────────
// SLIDE 5 — DISC HERNIATION + MRI IMAGE
// ─────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s);
  header(s, "DISC HERNIATION & RADICULOPATHY", "Most important specific cause to understand");

  // Left content
  const steps = [
    "Ageing → loss of nucleus water content",
    "Annulus fibrosus thins and tears",
    "Nucleus pulposus herniates — usually posterolateral",
    "Compresses and inflames adjacent nerve root",
    "→ RADICULOPATHY (pain + numbness + weakness)",
  ];
  const stepColors = [TEA, TEA, TEA, CRM, GLD];
  steps.forEach((st, i) => {
    const y = 1.25 + i * 0.6;
    s.addShape(pres.shapes.OVAL, { x: 0.2, y: y + 0.05, w: 0.4, h: 0.4, fill: { color: stepColors[i] }, line: { color: stepColors[i] } });
    s.addText(`${i + 1}`, { x: 0.2, y: y + 0.05, w: 0.4, h: 0.4, fontSize: 11, bold: true, color: WHT, align: "center", valign: "middle", fontFace: "Calibri", margin: 0 });
    s.addText(st, { x: 0.7, y, w: 4.8, h: 0.55, fontSize: 12, color: i >= 3 ? GLD : WHT, fontFace: "Calibri", valign: "middle", bold: i >= 3, margin: 0 });
  });

  // Nerve root table
  s.addShape(pres.shapes.RECTANGLE, { x: 0.2, y: 4.25, w: 5.1, h: 0.25, fill: { color: CRM }, line: { color: CRM } });
  s.addText("Nerve Root Map", { x: 0.2, y: 4.25, w: 5.1, h: 0.25, fontSize: 10, bold: true, color: WHT, align: "center", valign: "middle", fontFace: "Calibri", margin: 0 });
  const nrRows = [
    ["L4", "Knee extension", "Medial shin", "Knee jerk ↓"],
    ["L5 (most common)", "Foot dorsiflexion", "Dorsum foot", "No reliable reflex"],
    ["S1", "Plantarflexion", "Lateral foot/sole", "Ankle jerk ↓"],
  ];
  const nrW = [0.9, 1.4, 1.3, 1.5];
  const nrX = [0.2, 1.1, 2.5, 3.8];
  nrRows.forEach((row, ri) => {
    const y = 4.5 + ri * 0.35;
    const bg2 = ri % 2 === 0 ? NAV2 : "152638";
    s.addShape(pres.shapes.RECTANGLE, { x: 0.2, y, w: 5.1, h: 0.33, fill: { color: bg2 }, line: { color: bg2 } });
    row.forEach((cell, ci) => {
      s.addText(cell, { x: nrX[ci], y, w: nrW[ci], h: 0.33, fontSize: 9, color: ci === 0 ? GLD : WHT, bold: ci === 0, fontFace: "Calibri", valign: "middle", margin: 3 });
    });
  });

  // Right: MRI image
  if (img[0]) {
    s.addImage({ data: img[0], x: 5.55, y: 1.2, w: 4.2, h: 4.1 });
    s.addShape(pres.shapes.RECTANGLE, { x: 5.55, y: 5.1, w: 4.2, h: 0.2, fill: { color: DGR }, line: { color: DGR } });
    s.addText("MRI axial — L4/5 disc herniation compressing right L5 nerve root", { x: 5.55, y: 5.1, w: 4.2, h: 0.22, fontSize: 7.5, color: LGR, italic: true, align: "center", fontFace: "Calibri", margin: 0 });
  }
}

// ─────────────────────────────────────────────
// SLIDE 6 — SPINAL STENOSIS
// ─────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s);
  header(s, "SPINAL STENOSIS", "Neurogenic claudication — common in the elderly");

  // Left content
  s.addText("What happens:", { x: 0.2, y: 1.15, w: 5.1, h: 0.35, fontSize: 13, bold: true, color: TEA, fontFace: "Calibri", margin: 0 });
  const causes = ["Thickened ligamentum flavum", "Facet joint hypertrophy + osteophytes", "Disc bulging centrally", "→ Narrows spinal canal / neural foramina", "→ Compresses cauda equina nerve roots"];
  causes.forEach((c, i) => {
    s.addText((i < 3 ? "• " : "") + c, { x: 0.3, y: 1.55 + i * 0.38, w: 5.1, h: 0.35, fontSize: 11.5, color: i >= 3 ? GLD : WHT, bold: i >= 3, fontFace: "Calibri", margin: 0 });
  });

  s.addText("Neurogenic Claudication", { x: 0.2, y: 3.55, w: 5.1, h: 0.35, fontSize: 13, bold: true, color: CRM, fontFace: "Calibri", margin: 0 });
  const claudRows = [
    ["Worse with", "Walking, standing, back extension"],
    ["Better with", "Sitting, bending forward (shopping cart sign)"],
    ["Pulses", "Normal (unlike vascular claudication)"],
    ["Imaging", "MRI shows canal narrowing"],
  ];
  claudRows.forEach((row, i) => {
    const y = 3.95 + i * 0.38;
    s.addShape(pres.shapes.RECTANGLE, { x: 0.2, y, w: 1.3, h: 0.33, fill: { color: CRM }, line: { color: CRM } });
    s.addText(row[0], { x: 0.2, y, w: 1.3, h: 0.33, fontSize: 10, bold: true, color: WHT, align: "center", valign: "middle", fontFace: "Calibri", margin: 0 });
    s.addShape(pres.shapes.RECTANGLE, { x: 1.55, y, w: 3.75, h: 0.33, fill: { color: NAV2 }, line: { color: NAV2 } });
    s.addText(row[1], { x: 1.6, y, w: 3.7, h: 0.33, fontSize: 10.5, color: WHT, valign: "middle", fontFace: "Calibri", margin: 0 });
  });

  // Right: MRI image
  if (img[1]) {
    s.addImage({ data: img[1], x: 5.55, y: 1.2, w: 4.2, h: 3.8 });
    s.addText("MRI — central canal stenosis (A=normal, B=stenosis with ligamentum flavum thickening)", { x: 5.55, y: 5.05, w: 4.2, h: 0.32, fontSize: 7.5, color: LGR, italic: true, align: "center", fontFace: "Calibri", margin: 0 });
  }
}

// ─────────────────────────────────────────────
// SLIDE 7 — ANKYLOSING SPONDYLITIS
// ─────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s);
  header(s, "ANKYLOSING SPONDYLITIS", "Inflammatory back pain — axial spondyloarthritis");

  // Content left
  const features = [
    ["Patient", "Young male, onset <40 years"],
    ["Onset", "Insidious, gradual over months"],
    ["Pain", "Lower back, buttocks, sacroiliac joints"],
    ["Morning stiffness", ">1 hour — hallmark feature"],
    ["Improves with", "Exercise, movement — NOT rest"],
    ["Night pain", "Wakes patient, improves on getting up"],
    ["HLA-B27", "Positive in ~90%"],
    ["Hallmark imaging", "Bilateral sacroiliitis → bamboo spine"],
  ];
  features.forEach((f, i) => {
    const y = 1.2 + i * 0.51;
    s.addShape(pres.shapes.RECTANGLE, { x: 0.2, y, w: 2.2, h: 0.43, fill: { color: "E67E22" }, line: { color: "E67E22" } });
    s.addText(f[0], { x: 0.2, y, w: 2.2, h: 0.43, fontSize: 10, bold: true, color: WHT, align: "center", valign: "middle", fontFace: "Calibri", margin: 0 });
    s.addShape(pres.shapes.RECTANGLE, { x: 2.45, y, w: 3.05, h: 0.43, fill: { color: NAV2 }, line: { color: NAV2 } });
    s.addText(f[1], { x: 2.5, y, w: 3.0, h: 0.43, fontSize: 10.5, color: WHT, valign: "middle", fontFace: "Calibri", margin: 0 });
  });

  // Right: AS/bamboo spine image
  if (img[4]) {
    s.addImage({ data: img[4], x: 5.7, y: 1.2, w: 4.1, h: 4.0 });
    s.addText("X-ray: Bamboo spine (syndesmophytes) + bilateral sacroiliitis", { x: 5.7, y: 5.2, w: 4.1, h: 0.25, fontSize: 7.5, color: LGR, italic: true, align: "center", fontFace: "Calibri", margin: 0 });
  }
}

// ─────────────────────────────────────────────
// SLIDE 8 — SPINAL INFECTION
// ─────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s);
  header(s, "SPINAL INFECTION", "Osteomyelitis · Discitis · Epidural Abscess");

  // Left: risk factors + features
  s.addText("Risk Factors", { x: 0.2, y: 1.15, w: 4.8, h: 0.35, fontSize: 13, bold: true, color: CRM, fontFace: "Calibri", margin: 0 });
  const risks = ["IV drug use (IVDU)", "Diabetes mellitus", "Immunosuppression / HIV", "Recent spinal surgery / UTI", "TB history (endemic areas)"];
  risks.forEach((r, i) => {
    s.addShape(pres.shapes.OVAL, { x: 0.2, y: 1.55 + i * 0.38, w: 0.22, h: 0.22, fill: { color: CRM }, line: { color: CRM } });
    s.addText(r, { x: 0.5, y: 1.52 + i * 0.38, w: 4.5, h: 0.3, fontSize: 11, color: WHT, fontFace: "Calibri", margin: 0 });
  });

  s.addText("Clinical Features", { x: 0.2, y: 3.55, w: 4.8, h: 0.35, fontSize: 13, bold: true, color: GLD, fontFace: "Calibri", margin: 0 });
  const feats = ["Fever + severe, localised back pain", "Point tenderness over spinous process", "Progressive neurological deficit (late)", "↑ ESR, ↑ CRP, ↑ WBC"];
  feats.forEach((f, i) => {
    s.addShape(pres.shapes.OVAL, { x: 0.2, y: 3.95 + i * 0.38, w: 0.22, h: 0.22, fill: { color: GLD }, line: { color: GLD } });
    s.addText(f, { x: 0.5, y: 3.92 + i * 0.38, w: 4.5, h: 0.3, fontSize: 11, color: WHT, fontFace: "Calibri", margin: 0 });
  });

  // Right: MRI infection image
  if (img[5]) {
    s.addImage({ data: img[5], x: 5.4, y: 1.2, w: 4.4, h: 4.1 });
    s.addText("MRI — Discitis-osteomyelitis L2/3 with endplate destruction + psoas involvement", { x: 5.4, y: 5.3, w: 4.4, h: 0.28, fontSize: 7.5, color: LGR, italic: true, align: "center", fontFace: "Calibri", margin: 0 });
  }
}

// ─────────────────────────────────────────────
// SLIDE 9 — CAUDA EQUINA SYNDROME
// ─────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s);
  // Red urgency header
  s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 0, w: 10, h: 1.0, fill: { color: "8E0000" }, line: { color: "8E0000" } });
  s.addShape(pres.shapes.RECTANGLE, { x: 0, y: 1.0, w: 10, h: 0.05, fill: { color: GLD }, line: { color: GLD } });
  s.addText("⚠  CAUDA EQUINA SYNDROME — SURGICAL EMERGENCY", { x: 0.2, y: 0.08, w: 9.6, h: 0.85, fontSize: 22, bold: true, color: WHT, fontFace: "Calibri", valign: "middle", margin: 0 });

  // Left: Features
  s.addText("Features — ALL must be screened for:", { x: 0.2, y: 1.15, w: 4.9, h: 0.38, fontSize: 12, bold: true, color: GLD, fontFace: "Calibri", margin: 0 });
  const cesFeats = [
    ["SADDLE ANAESTHESIA", "Numbness around anus, perineum, genitals — pathognomonic"],
    ["URINARY RETENTION", "Painless — patient cannot feel a full bladder"],
    ["URINARY INCONTINENCE", "Or altered urinary sensation"],
    ["FAECAL INCONTINENCE", "Loss of rectal fullness sensation"],
    ["BILATERAL LEG WEAKNESS", "Major motor deficit: hip flexors, knee, foot"],
    ["REDUCED ANAL TONE", "On digital rectal examination"],
  ];
  cesFeats.forEach((f, i) => {
    const y = 1.6 + i * 0.56;
    s.addShape(pres.shapes.RECTANGLE, { x: 0.2, y, w: 2.0, h: 0.48, fill: { color: "8E0000" }, line: { color: "8E0000" } });
    s.addText(f[0], { x: 0.2, y, w: 2.0, h: 0.48, fontSize: 8.5, bold: true, color: WHT, align: "center", valign: "middle", fontFace: "Calibri", margin: 0 });
    s.addShape(pres.shapes.RECTANGLE, { x: 2.25, y, w: 2.8, h: 0.48, fill: { color: NAV2 }, line: { color: NAV2 } });
    s.addText(f[1], { x: 2.3, y, w: 2.75, h: 0.48, fontSize: 10, color: LGR, valign: "middle", fontFace: "Calibri", margin: 0 });
  });

  // Action box
  s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 0.2, y: 5.0, w: 5.1, h: 0.42, fill: { color: "8E0000" }, line: { color: GLD, width: 2 }, rectRadius: 0.06 });
  s.addText("ACTION: Same-day EMERGENCY MRI → Neurosurgical referral", { x: 0.2, y: 5.0, w: 5.1, h: 0.42, fontSize: 11, bold: true, color: GLD, align: "center", valign: "middle", fontFace: "Calibri", margin: 0 });

  // Right: CES classification table image
  if (img[3]) {
    s.addImage({ data: img[3], x: 5.45, y: 1.15, w: 4.4, h: 3.5 });
    s.addText("CES Classification — Bailey & Love's Surgery 28E", { x: 5.45, y: 4.7, w: 4.4, h: 0.25, fontSize: 7.5, color: LGR, italic: true, align: "center", fontFace: "Calibri", margin: 0 });
  }
}

// ─────────────────────────────────────────────
// SLIDE 10 — EXAMINATION
// ─────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s);
  header(s, "EXAMINATION OF THE BACK", "Look · Feel · Move · Special Tests");

  // 4 quadrant layout
  const quads = [
    {
      title: "LOOK", color: TEA,
      items: ["Scoliosis / kyphosis / lordosis loss", "Paraspinal muscle wasting or spasm", "Skin: hairy tuft/dimple = spina bifida", "Haematoma, bruising (trauma)"]
    },
    {
      title: "FEEL", color: "E67E22",
      items: ["Spinous process percussion tenderness", "  → fracture / infection / tumour", "Paraspinal muscle spasm", "Step-off deformity → spondylolisthesis"]
    },
    {
      title: "MOVE", color: "3498DB",
      items: ["Flexion 40–60° (pain = discogenic)", "Extension 20–35° (pain = facet/spondylolysis)", "Lateral bending, rotation", "Schober's test for ankylosing spondylitis"]
    },
    {
      title: "SPECIAL TESTS", color: CRM,
      items: ["SLR (Lasègue): 30–70° leg pain → L4/5/S1", "Crossed SLR: specific for disc extrusion", "Femoral stretch: L2/3/4 radiculopathy", "Saddle sensation + anal tone (CES screen)"]
    }
  ];
  const qx = [0.15, 5.1, 0.15, 5.1];
  const qy = [1.15, 1.15, 3.45, 3.45];
  quads.forEach((q, i) => {
    card(s, qx[i], qy[i], 4.7, 2.0, NAV2);
    s.addShape(pres.shapes.RECTANGLE, { x: qx[i], y: qy[i], w: 4.7, h: 0.38, fill: { color: q.color }, line: { color: q.color } });
    s.addText(q.title, { x: qx[i], y: qy[i], w: 4.7, h: 0.38, fontSize: 13, bold: true, color: WHT, align: "center", valign: "middle", fontFace: "Calibri", margin: 0 });
    q.items.forEach((item, j) => {
      s.addText("• " + item, { x: qx[i] + 0.15, y: qy[i] + 0.45 + j * 0.37, w: 4.4, h: 0.35, fontSize: 10, color: WHT, fontFace: "Calibri", margin: 0 });
    });
  });
}

// ─────────────────────────────────────────────
// SLIDE 11 — SLR TEST + image
// ─────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s);
  header(s, "STRAIGHT LEG RAISE (SLR) TEST", "Lasègue's sign — the key test for radiculopathy");

  // Steps
  const steps = [
    "Patient lies SUPINE on examination table",
    "Examiner raises leg with knee FULLY EXTENDED",
    "Positive: pain radiates DOWN the leg (not just back) between 30°–70°",
    "Add ankle dorsiflexion → increases sciatic tension (confirms result)",
    "Tests L4, L5, S1 nerve roots",
  ];
  const sColors = [TEA, TEA, CRM, GLD, "3498DB"];
  steps.forEach((st, i) => {
    const y = 1.2 + i * 0.64;
    s.addShape(pres.shapes.OVAL, { x: 0.2, y: y + 0.1, w: 0.38, h: 0.38, fill: { color: sColors[i] }, line: { color: sColors[i] } });
    s.addText(`${i + 1}`, { x: 0.2, y: y + 0.1, w: 0.38, h: 0.38, fontSize: 11, bold: true, color: WHT, align: "center", valign: "middle", fontFace: "Calibri", margin: 0 });
    s.addText(st, { x: 0.7, y, w: 4.8, h: 0.58, fontSize: 11.5, color: i >= 2 ? GLD : WHT, bold: i >= 2, fontFace: "Calibri", valign: "middle", margin: 0 });
  });

  // Stats box
  s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 0.2, y: 4.55, w: 4.9, h: 0.75, fill: { color: NAV2 }, line: { color: TEA, width: 1.5 }, rectRadius: 0.08 });
  s.addText([
    { text: "Sensitivity: ", options: { color: LGR } },
    { text: "85–91%  ", options: { color: GLD, bold: true } },
    { text: "  Specificity: ", options: { color: LGR } },
    { text: "26–52%", options: { color: GLD, bold: true } },
  ], { x: 0.2, y: 4.55, w: 4.9, h: 0.4, fontSize: 12, fontFace: "Calibri", align: "center", valign: "middle", margin: 0 });
  s.addText("Crossed SLR — sensitivity 23–34%, specificity 86–90% (specific for extrusion)", { x: 0.2, y: 4.95, w: 4.9, h: 0.32, fontSize: 9.5, color: LGR, italic: true, align: "center", fontFace: "Calibri", margin: 0 });

  // Right: SLR image
  if (img[2]) {
    s.addImage({ data: img[2], x: 5.4, y: 1.2, w: 4.4, h: 4.1 });
    s.addText("Clinical illustration — Straight Leg Raise (Lasègue's test)", { x: 5.4, y: 5.3, w: 4.4, h: 0.25, fontSize: 7.5, color: LGR, italic: true, align: "center", fontFace: "Calibri", margin: 0 });
  }
}

// ─────────────────────────────────────────────
// SLIDE 12 — INVESTIGATIONS
// ─────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s);
  header(s, "INVESTIGATIONS", "When to investigate and what to order");

  // Imaging rule banner
  s.addShape(pres.shapes.ROUNDED_RECTANGLE, { x: 0.2, y: 1.1, w: 9.6, h: 0.5, fill: { color: "1A5276" }, line: { color: TEA, width: 1.5 }, rectRadius: 0.06 });
  s.addText("⚠  DO NOT IMAGE in first 6 weeks if NO red flags — 1 in 4 asymptomatic adults have MRI disc findings (false positives lead to harm)", { x: 0.25, y: 1.1, w: 9.5, h: 0.5, fontSize: 10.5, bold: true, color: GLD, align: "center", valign: "middle", fontFace: "Calibri", margin: 0 });

  const invRows = [
    ["BLOODS\n(FBC, ESR, CRP,\nCa²⁺, PSA, LFTs)", "Suspected infection or malignancy\nor inflammatory disease", "↑ ESR/CRP in infection & malignancy;\nPSA for prostate; Ca²⁺ for mets", "27AE60"],
    ["X-RAY SPINE", "Trauma (alignment), scoliosis,\nosteoporotic fracture", "Cannot detect early infection/tumour —\nneeds 40–60% bone destruction first", "E67E22"],
    ["MRI SPINE ✅\n(Investigation of choice)", "Any red flag present;\n>6 wks no improvement;\nSuspected cord/cauda equina", "Sensitivity & specificity >90% for\nmalignancy, infection, epidural lesions;\nUse with contrast for abscess/mets", CRM],
    ["CT SPINE", "Trauma (best for bone detail);\nMRI contraindicated", "Radiation = 300 chest X-rays;\nnot first-line", "9B59B6"],
    ["USS / CT ABDOMEN", "Suspected AAA", "Urgent USS if stable;\nCT angiogram if urgent", "3498DB"],
    ["URINE DIPSTICK/\nCULTURE", "Suspected pyelonephritis\nor renal colic", "Simple, fast, first-line for\nreferred causes", TEA],
  ];

  invRows.forEach((row, i) => {
    const y = 1.7 + i * 0.61;
    s.addShape(pres.shapes.RECTANGLE, { x: 0.15, y, w: 1.85, h: 0.53, fill: { color: row[3] }, line: { color: row[3] } });
    s.addText(row[0], { x: 0.15, y, w: 1.85, h: 0.53, fontSize: 8.5, bold: true, color: WHT, align: "center", valign: "middle", fontFace: "Calibri", margin: 0 });
    s.addShape(pres.shapes.RECTANGLE, { x: 2.05, y, w: 3.6, h: 0.53, fill: { color: NAV2 }, line: { color: row[3], width: 0.5 } });
    s.addText(row[1], { x: 2.1, y, w: 3.55, h: 0.53, fontSize: 9.5, color: WHT, valign: "middle", fontFace: "Calibri", margin: 0 });
    s.addShape(pres.shapes.RECTANGLE, { x: 5.7, y, w: 4.1, h: 0.53, fill: { color: "152638" }, line: { color: row[3], width: 0.5 } });
    s.addText(row[2], { x: 5.75, y, w: 4.0, h: 0.53, fontSize: 9.5, color: LGR, valign: "middle", fontFace: "Calibri", italic: true, margin: 0 });
  });
}

// ─────────────────────────────────────────────
// SLIDE 13 — EVALUATION ALGORITHM (with flowchart image)
// ─────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s);
  header(s, "EVALUATION ALGORITHM", "Goldman-Cecil Medicine — acute & subacute back pain");

  if (img[6]) {
    s.addImage({ data: img[6], x: 0.5, y: 1.1, w: 9.0, h: 4.3 });
  }
  s.addText("If red flags detected → urgent MRI ± specialist referral. No red flags → treat conservatively; image if not improved at 6 weeks", { x: 0.3, y: 5.2, w: 9.4, h: 0.28, fontSize: 9.5, color: LGR, italic: true, align: "center", fontFace: "Calibri", margin: 0 });
}

// ─────────────────────────────────────────────
// SLIDE 14 — MANAGEMENT: MECHANICAL BACK PAIN
// ─────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s);
  header(s, "MANAGEMENT — MECHANICAL BACK PAIN", "The majority of patients — treat conservatively");

  const steps = [
    { num: "1", title: "REASSURE", body: "90% resolve in 6–12 weeks\nBack pain = rarely serious\nAvoid over-investigation and labelling", color: "27AE60" },
    { num: "2", title: "STAY ACTIVE", body: "Bed rest is HARMFUL and delays recovery\nEncourage normal activity as tolerated\nAerobic exercise + core strengthening", color: TEA },
    { num: "3", title: "ANALGESIA", body: "1st line: Paracetamol + NSAIDs (ibuprofen/diclofenac)\nAdd: Short-course muscle relaxant (spasm)\nAvoid: Long-term opioids (dependency risk)", color: "E67E22" },
    { num: "4", title: "PHYSIOTHERAPY", body: "Manual therapy, stretching, posture correction\nNICE guideline recommends as 1st-line\nAcupuncture: some evidence for chronic pain", color: "3498DB" },
    { num: "5", title: "REVIEW AT 6 WEEKS", body: "If not improving → MRI and re-assess\nScreen for yellow flags (psychosocial)\nCBT if central sensitisation suspected", color: "9B59B6" },
  ];

  steps.forEach((st, i) => {
    const col = i < 3 ? 0 : (i === 3 ? 0 : 1);
    const x = [0.2, 5.15, 0.2, 5.15, 2.65][i];
    const y = [1.15, 1.15, 3.15, 3.15, 1.15][i];
    const w = i === 4 ? 4.7 : 4.7;
    const h = 1.8;
    card(s, x, y, w, h, NAV2);
    s.addShape(pres.shapes.RECTANGLE, { x, y, w, h: 0.38, fill: { color: st.color }, line: { color: st.color } });
    s.addText(`${st.num}. ${st.title}`, { x: x, y, w, h: 0.38, fontSize: 12, bold: true, color: WHT, align: "center", valign: "middle", fontFace: "Calibri", margin: 0 });
    s.addText(st.body, { x: x + 0.15, y: y + 0.45, w: w - 0.25, h: 1.25, fontSize: 10, color: WHT, fontFace: "Calibri", margin: 0 });
  });

  // Bottom note
  s.addShape(pres.shapes.RECTANGLE, { x: 0.2, y: 5.1, w: 9.6, h: 0.35, fill: { color: "1A5276" }, line: { color: "1A5276" } });
  s.addText("Radiculopathy (sciatica): add Gabapentin/Pregabalin for neuropathic pain  •  Epidural steroid injection if no improvement  •  Surgery only if progressive deficit", { x: 0.25, y: 5.1, w: 9.5, h: 0.35, fontSize: 9.5, color: LGR, align: "center", valign: "middle", fontFace: "Calibri", margin: 0 });
}

// ─────────────────────────────────────────────
// SLIDE 15 — MANAGEMENT: SPECIFIC RED FLAG CONDITIONS
// ─────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s);
  header(s, "MANAGEMENT — RED FLAG CONDITIONS", "Specific urgency and treatment for each cause");

  const conditions = [
    { title: "CAUDA EQUINA", action: "Emergency MRI same day → neurosurgery → surgical decompression within hours", urgency: "EMERGENCY", color: "8E0000" },
    { title: "MALIGNANCY", action: "Oncology referral (2-week cancer pathway) · MRI with contrast · Radiotherapy / chemotherapy / surgical decompression", urgency: "URGENT", color: "9B59B6" },
    { title: "SPINAL INFECTION", action: "Urgent MRI + blood cultures + FBC/CRP/ESR · IV antibiotics (after cultures) · Neurosurgical referral if abscess or neuro deficit", urgency: "URGENT", color: CRM },
    { title: "VERTEBRAL FRACTURE (stable)", action: "Analgesia · Orthopaedic review · Osteoporosis treatment · Consider vertebroplasty/kyphoplasty for ongoing pain", urgency: "SEMI-URGENT", color: "E67E22" },
    { title: "RUPTURED AAA", action: "Do NOT delay for imaging if unstable · Urgent vascular surgery · IV access + resuscitation · CT aortogram if stable", urgency: "LIFE-THREATENING", color: "8E0000" },
    { title: "ANKYLOSING SPONDYLITIS", action: "Rheumatology referral · NSAIDs (1st line) · DMARDs (sulfasalazine) · Biologics (TNF inhibitors, IL-17 inhibitors) if refractory · Physio", urgency: "PLANNED", color: "E67E22" },
  ];

  conditions.forEach((c, i) => {
    const y = 1.15 + i * 0.72;
    s.addShape(pres.shapes.RECTANGLE, { x: 0.15, y, w: 0.8, h: 0.62, fill: { color: c.color }, line: { color: c.color } });
    s.addText(c.urgency, { x: 0.15, y, w: 0.8, h: 0.62, fontSize: 7, bold: true, color: WHT, align: "center", valign: "middle", fontFace: "Calibri", margin: 0 });
    s.addShape(pres.shapes.RECTANGLE, { x: 1.0, y, w: 2.3, h: 0.62, fill: { color: c.color }, line: { color: c.color } });
    s.addText(c.title, { x: 1.0, y, w: 2.3, h: 0.62, fontSize: 11, bold: true, color: WHT, align: "center", valign: "middle", fontFace: "Calibri", margin: 0 });
    s.addShape(pres.shapes.RECTANGLE, { x: 3.35, y, w: 6.45, h: 0.62, fill: { color: NAV2 }, line: { color: c.color, width: 0.8 } });
    s.addText(c.action, { x: 3.4, y, w: 6.35, h: 0.62, fontSize: 10, color: WHT, valign: "middle", fontFace: "Calibri", margin: 0 });
  });

  s.addShape(pres.shapes.RECTANGLE, { x: 0.15, y: 5.25, w: 9.7, h: 0.22, fill: { color: NAV2 }, line: { color: NAV2 } });
  s.addText("Chronic LBP: Multimodal — exercise + CBT (cognitive behavioural therapy) + analgesia + address yellow flags (psychosocial)", { x: 0.2, y: 5.25, w: 9.6, h: 0.22, fontSize: 9, color: LGR, align: "center", fontFace: "Calibri", margin: 0 });
}

// ─────────────────────────────────────────────
// SLIDE 16 — WHEN TO REFER
// ─────────────────────────────────────────────
{
  const s = pres.addSlide();
  bg(s);
  header(s, "WHEN & WHERE TO REFER", "Matching the patient to the right team");

  const refs = [
    { who: "Neurosurgery", when: "Cauda equina symptoms\nProgressive neurological deficit", urgent: "SAME DAY", color: "8E0000" },
    { who: "Vascular Surgery", when: "Suspected ruptured AAA\nAortic dissection", urgent: "IMMEDIATE", color: "8E0000" },
    { who: "Oncology", when: "Suspected malignancy\n(weight loss + night pain + age >50)", urgent: "2-WEEK PATHWAY", color: "9B59B6" },
    { who: "Infectious Disease /\nNeurosurgery", when: "Spinal infection (abscess, osteomyelitis)\nEspecially if neurological deficit", urgent: "URGENT", color: CRM },
    { who: "Rheumatology", when: "Ankylosing spondylitis\nInflammatory back pain", urgent: "PLANNED", color: "E67E22" },
    { who: "Orthopaedics /\nNeurosurgery", when: "Spinal stenosis refractory to conservative Rx\nDisc herniation > 6–12 weeks, failing Rx", urgent: "PLANNED", color: "3498DB" },
    { who: "Physiotherapy\n± Pain Clinic", when: "Mechanical back pain failing 6 weeks Rx\nChronic LBP — multimodal needed", urgent: "ROUTINE", color: "27AE60" },
  ];

  const cols = [0, 0, 0, 1, 1, 1, 1];
  const xPos = [0.2, 0.2, 0.2, 5.1, 5.1, 5.1, 5.1];
  let leftRow = 0, rightRow = 0;
  refs.forEach((r, i) => {
    const col = cols[i];
    const row = col === 0 ? leftRow++ : rightRow++;
    const x = xPos[i];
    const y = 1.15 + row * 1.38;
    const h = 1.28;
    card(s, x, y, 4.75, h, NAV2);
    s.addShape(pres.shapes.RECTANGLE, { x, y, w: 4.75, h: 0.3, fill: { color: r.color }, line: { color: r.color } });
    s.addText(r.who + "  |  " + r.urgent, { x, y, w: 4.75, h: 0.3, fontSize: 10, bold: true, color: WHT, align: "center", valign: "middle", fontFace: "Calibri", margin: 0 });
    s.addText(r.when, { x: x + 0.15, y: y + 0.36, w: 4.45, h: 0.88, fontSize: 10.5, color: WHT, fontFace: "Calibri", margin: 0 });
  });
}

// ─────────────────────────────────────────────
// Write file
// ─────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/back-pain-pptx/BackPain_FamilyMedicine.pptx" })
  .then(() => console.log("✅ DONE: BackPain_FamilyMedicine.pptx"))
  .catch(e => { console.error("ERROR:", e); process.exit(1); });
Your credits are exhausted. Your daily credits reset tomorrow, or you can purchase a top-up for more.

2 visual 16 by 9 differential diagnosis slide, 1 visual 16 by 9 clinical approach to evaluate back pain ranging from history taking, physical examination, 1 visual slide on both investigation and management (medical and surgical) remove anything redundant, my family medicine lecturer is quite strict

Reading File
Searching Images

lumbar spine anatomy disc herniation vertebral cross section diagram

Searching Images

aortic aneurysm renal colic referred back pain visceral

Searching Images

spine physical examination straight leg raise FABER test clinical

Searching Images

back pain management algorithm conservative treatment NSAIDs physiotherapy

Searching Images

spinal surgery discectomy laminectomy operative back pain

Good images found. Now fetch them all in parallel:
Running Command

mkdir -p /home/daytona/workspace/back-pain-v2 && node /home/daytona/skills/shared/scripts/fetch_images.js \ "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_a31562881717ab6940fb5469407fa7debf857636919ed59f8ac7fe33af0debb1.jpg" \ "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_a84ad3fc973fae2a0f6d6f1b295bd04c1df17fc48ca6d8eb48063e909d934d0d.jpg" \ "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_7425b51cfdb9992868700cd089803aa4497f8a9888b9ad2d7965359f30e89061.jpg" \ "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_921ac2afb3e00e23b0fd5aae4d22c925d2fa7189c79a4356cb38b97e47e8e6a2.jpg" \ "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_bffd6cdd6d026826a2da9cd6a754df6f6f830798a14f3991b0903cbcc79af5b7.jpg" \ "https://cdn.orris.care/cdss_images/8ccce8a09ffc10d0499ab5567e64e10f3caa336cf44f7c3f037b610a89783417.png" \ "https://cdn.orris.care/cdss_images/BAILY_1760540610530_0096e21e-9b89-407c-b5c3-e8a325e2fe0e.png" \ 2>/dev/null | node -e " const d=require('fs').readFileSync('/dev/stdin','utf8'); const arr=JSON.parse(d); arr.forEach((x,i)=>{ if(x.base64) require('fs').writeFileSync('/home/daytona/workspace/back-pain-v2/img'+i+'.txt', x.base64); console.log(i, x.error||'ok', (x.base64||'').substring(0,30)||'FAIL'); });"

Your credits are exhausted. Your daily credits reset tomorrow, or you can purchase a top-up for more.

Those differential diagnosis, what is the script i can use to talk short sweet simple

Your credits are exhausted. Your daily credits reset tomorrow, or you can purchase a top-up for more.

Could you give me script for differential diagnosis

Here's your speaking script for the differential diagnosis section — short, confident, easy to say out loud.

Speaking Script: Differential Diagnosis of Back Pain


[Slide intro — say this first]
"When a patient walks in with back pain, our job isn't just to treat the pain — it's to figure out what's causing it. Back pain has a wide differential, so we organise it into categories to make it manageable."

[Category 1 — Mechanical]
"The most common category — and this accounts for about 85% of all back pain — is mechanical. This includes muscle strain, ligament sprain, disc herniation, and facet joint arthritis. The key feature here is that pain is related to movement and usually improves with rest."

[Category 2 — Degenerative]
"Closely related is degenerative disease — think spondylosis, degenerative disc disease, and spinal stenosis. These tend to develop gradually with age. Spinal stenosis in particular gives us the classic picture of leg pain that's worse walking and better leaning forward — we call this neurogenic claudication."

[Category 3 — Inflammatory]
"Then we have inflammatory causes — the most important being ankylosing spondylitis. The clue here is a young man, with morning stiffness lasting more than an hour, that actually improves with exercise — not rest. That pattern is the opposite of mechanical pain, and it's what makes it stand out."

[Category 4 — Infectious]
"Infection is a red flag category. Vertebral osteomyelitis, discitis, and epidural abscess are the main ones. Think of it when the patient has fever, IV drug use, diabetes, or is immunocompromised. TB spine — Pott's disease — is also important, especially in our local context."

[Category 5 — Neoplastic]
"Neoplastic causes — spinal metastases, multiple myeloma, primary tumours. The warning signs are age over 50, a known history of cancer, pain that doesn't go away at rest, and unexplained weight loss. The most common primary cancers that spread to the spine are breast, lung, prostate, renal, and thyroid."

[Category 6 — Vascular]
"Vascular — and this is critical. A ruptured abdominal aortic aneurysm can present as sudden severe back pain with hypotension and a pulsatile abdominal mass. This is a life-threatening emergency. Aortic dissection also presents with tearing back pain. These patients do not reach the GP — they need a surgeon immediately."

[Category 7 — Referred / Visceral]
"Finally — and this one is easy to miss — referred pain from visceral organs. The back is a common site for referred pain from the kidneys, pancreas, and pelvic organs. Renal colic classically radiates from flank to groin with haematuria. Pancreatitis causes epigastric pain that radiates to the back and is relieved by leaning forward. Pyelonephritis gives fever plus costovertebral angle tenderness. We must always ask about associated symptoms to catch these."

[Closing line for the slide]
"So to summarise the differential — we think in seven boxes: mechanical, degenerative, inflammatory, infectious, neoplastic, vascular, and referred. Most patients fall in the first two. Our job is to make sure we don't miss the last five."

Total speaking time: ~2.5 minutes
Tip for delivery: Slow down on the red flag categories — infectious, neoplastic, vascular. That's where your lecturer will be listening most carefully.
This is a shared conversation. Sign in to Orris to start your own chat.