Brachial plexus for 10 marks

Reading File
Finding Sources
Searching the Web

brachial plexus anatomy roots trunks divisions cords branches 10 marks

Reading File
Reading File
Reading File
Reading File
Finding Sources
Reading File
Reading File
Loading Image
Loading Image
I now have all the information needed for a comprehensive 10-mark answer. Here it is:

Brachial Plexus

Definition and Formation

The brachial plexus is a somatic nerve plexus formed by the anterior rami (roots) of spinal nerves C5, C6, C7, C8, and T1. It originates in the neck, passes laterally and inferiorly over the first rib, and enters the axilla. It is responsible for the entire motor and sensory innervation of the upper limb (except the trapezius and the skin of the axilla).
The roots receive gray rami communicantes from the sympathetic trunk, which carry postganglionic sympathetic fibers to the periphery.

Anatomy - Components (Mnemonic: R-T-D-C-B = "Real Texans Drink Cold Beer")

Brachial Plexus - Components in neck and axilla (Gray's Anatomy for Students)
Brachial Plexus schematic - roots, trunks, divisions, cords and terminal branches (Gray's Anatomy for Students)

1. Roots

The five anterior rami (C5-T1) emerge between the anterior and middle scalene muscles in the posterior triangle of the neck. The roots and trunks lie superior and posterior to the subclavian artery.

2. Trunks (3)

TrunkFormation
Superior (Upper)Union of C5 + C6
MiddleContinuation of C7 alone
Inferior (Lower)Union of C8 + T1
The inferior trunk lies on rib I, posterior to the subclavian artery. The middle and superior trunks are more superiorly placed.

3. Divisions (6)

Each trunk splits into an anterior division and a posterior division as the plexus crosses the clavicle. No peripheral nerves arise from the divisions directly.
  • Anterior divisions supply flexor (anterior) compartments
  • Posterior divisions supply extensor (posterior) compartments

4. Cords (3)

The cords are named by their relationship to the second part of the axillary artery:
CordFormationSpinal levels
Lateral cordAnterior divisions of superior + middle trunksC5, C6, C7
Medial cordAnterior division of inferior trunk aloneC8, T1
Posterior cordAll three posterior divisionsC5-T1

5. Branches (Terminal and Collateral)

From Roots:

NerveRootSupplies
Dorsal scapular nerveC5Rhomboid major, rhomboid minor
Long thoracic nerveC5, C6, C7Serratus anterior
Contribution to phrenic nerveC5Diaphragm

From Trunks:

NerveOriginSupplies
Suprascapular nerveSuperior trunk (C5, C6)Supraspinatus, infraspinatus
Nerve to subclaviusSuperior trunk (C5, C6)Subclavius

From Lateral Cord:

NerveSupplies
Lateral pectoral nervePectoralis major (clavicular head)
Musculocutaneous nerve (C5-C7)Biceps, brachialis, coracobrachialis; sensory - lateral forearm
Lateral root of median nerve(forms median nerve with medial root)

From Medial Cord:

NerveSupplies
Medial pectoral nervePectoralis major and minor
Medial cutaneous nerve of armMedial arm skin
Medial cutaneous nerve of forearmMedial forearm skin
Ulnar nerve (C8, T1)Intrinsic hand muscles, medial 1.5 fingers
Medial root of median nerve(forms median nerve with lateral root)

From Posterior Cord:

NerveSupplies
Upper subscapular nerveSubscapularis (upper part)
Thoracodorsal nerveLatissimus dorsi
Lower subscapular nerveSubscapularis (lower part) + teres major
Axillary nerve (C5, C6)Deltoid, teres minor; sensory - regimental badge area
Radial nerve (C5-T1)Entire posterior compartment of arm and forearm
Mnemonic for terminal branches: "My Aunty Rubs More Unction" = Musculocutaneous, Axillary, Radial, Median, Ulnar

Applied Anatomy - Injuries

1. Erb-Duchenne Palsy (Upper Brachial Plexus Lesion)

  • Roots involved: C5, C6 (at Erb's point - junction of C5+C6)
  • Mechanism: Forcible widening of angle between neck and shoulder - motorcycle accidents (adult), difficult labor/shoulder dystocia (neonate)
  • Muscles paralyzed: Deltoid, biceps, brachialis, brachioradialis, supinator
  • Deformity: Limb hangs - internally rotated at shoulder, extended at elbow, pronated forearm = "Policeman taking a tip" / "Waiter's tip" position
  • Sensory loss: Outer arm and upper lateral forearm
  • Prognosis: Best - most common type

2. Klumpke's Palsy (Lower Brachial Plexus Lesion)

  • Roots involved: C8, T1 (T1 more commonly)
  • Mechanism: Forceful hyperabduction of the arm - person grabbing overhead support to break a fall, breech delivery with arms above head
  • Muscles paralyzed: All intrinsic muscles of the hand (small muscles - interossei, lumbricals, thenar, hypothenar)
  • Deformity: Claw hand (combined median + ulnar palsy features)
  • Sensory loss: Medial forearm, hand, and medial 1.5 fingers
  • Associated: Horner's syndrome (ptosis, miosis/pupillary constriction, enophthalmos, anhidrosis of ipsilateral face) - due to damage to T1 root where it carries sympathetic fibers to the cervical sympathetic chain
  • Prognosis: Poor

3. Complete Brachial Plexus Palsy

  • Rare; seen in severe accidents involving all roots
  • Complete paralysis and anesthesia of the entire upper limb (except the upper arm - C3, C4, T2 territory)
  • Long thoracic nerve (serratus anterior) or dorsal scapular nerve (rhomboids) may occasionally be spared

Summary Table

ComponentElementsLocation
RootsC5, C6, C7, C8, T1Between scalene muscles, posterior triangle
TrunksSuperior, Middle, InferiorPosterior triangle / over rib 1
DivisionsAnt + Post (x3 = 6 total)Behind clavicle
CordsLateral, Medial, PosteriorAxilla, around axillary artery
BranchesTerminal + CollateralAxilla and beyond

Sources: Gray's Anatomy for Students (p. 858-865); S Das Manual of Clinical Surgery, 13th Ed (p. 140)

Cteste a pdf on brachial plexus

Reading File
Running Command

ls -la /home/daytona/workspace/ 2>/dev/null || echo "workspace empty or not foun…

Running Command

mkdir -p /home/daytona/workspace/brachial-plexus-pdf

Writing File

~/brachial-plexus-pdf/generate_pdf.py

from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm, mm
from reportlab.platypus import (
    SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
    HRFlowable, KeepTogether
)
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY
from reportlab.platypus import PageBreak
import urllib.request
from reportlab.platypus import Image as RLImage
import io

OUTPUT = "/home/daytona/workspace/brachial-plexus-pdf/Brachial_Plexus.pdf"

# ── Colour palette ──────────────────────────────────────────────────────────
DARK_BLUE   = colors.HexColor("#1a3a5c")
MID_BLUE    = colors.HexColor("#2e6da4")
LIGHT_BLUE  = colors.HexColor("#d6e8f7")
ACCENT      = colors.HexColor("#e8f4fd")
RED         = colors.HexColor("#c0392b")
GREEN       = colors.HexColor("#1e7a4b")
ORANGE      = colors.HexColor("#e67e22")
LIGHT_GREY  = colors.HexColor("#f5f5f5")
MID_GREY    = colors.HexColor("#cccccc")
WHITE       = colors.white
BLACK       = colors.HexColor("#1a1a1a")

# ── Document ────────────────────────────────────────────────────────────────
doc = SimpleDocTemplate(
    OUTPUT, pagesize=A4,
    leftMargin=1.8*cm, rightMargin=1.8*cm,
    topMargin=2*cm, bottomMargin=2*cm,
    title="Brachial Plexus", author="Medical Notes"
)

W, H = A4
PAGE_W = W - 3.6*cm   # usable width

# ── Styles ───────────────────────────────────────────────────────────────────
base = getSampleStyleSheet()

def make(name, parent="Normal", **kw):
    return ParagraphStyle(name, parent=base[parent], **kw)

title_style = make("DocTitle",
    fontSize=26, textColor=WHITE, alignment=TA_CENTER,
    leading=32, spaceAfter=4, fontName="Helvetica-Bold")

subtitle_style = make("DocSub",
    fontSize=11, textColor=colors.HexColor("#d6e8f7"),
    alignment=TA_CENTER, leading=14, spaceAfter=2, fontName="Helvetica")

h1 = make("H1",
    fontSize=14, textColor=WHITE, fontName="Helvetica-Bold",
    leading=18, spaceBefore=10, spaceAfter=4)

h2 = make("H2",
    fontSize=12, textColor=DARK_BLUE, fontName="Helvetica-Bold",
    leading=16, spaceBefore=8, spaceAfter=3)

h3 = make("H3",
    fontSize=10.5, textColor=MID_BLUE, fontName="Helvetica-Bold",
    leading=14, spaceBefore=6, spaceAfter=2)

body = make("Body",
    fontSize=10, textColor=BLACK, fontName="Helvetica",
    leading=15, spaceBefore=2, spaceAfter=2, alignment=TA_JUSTIFY)

bullet = make("Bullet",
    fontSize=10, textColor=BLACK, fontName="Helvetica",
    leading=14, spaceBefore=1, spaceAfter=1,
    leftIndent=16, bulletIndent=6)

mnemonic = make("Mnemonic",
    fontSize=10.5, textColor=GREEN, fontName="Helvetica-Bold",
    leading=15, spaceBefore=2, spaceAfter=2,
    leftIndent=10)

highlight = make("Highlight",
    fontSize=10, textColor=colors.HexColor("#7b3200"), fontName="Helvetica-Bold",
    leading=14, spaceBefore=2, spaceAfter=2,
    leftIndent=10)

caption = make("Caption",
    fontSize=8, textColor=colors.HexColor("#555555"), fontName="Helvetica-Oblique",
    alignment=TA_CENTER, leading=11, spaceBefore=2, spaceAfter=6)

# ── Helper functions ─────────────────────────────────────────────────────────
def section_header(title, color=DARK_BLUE):
    """Coloured section header bar."""
    tbl = Table([[Paragraph(title, h1)]], colWidths=[PAGE_W])
    tbl.setStyle(TableStyle([
        ("BACKGROUND", (0,0), (-1,-1), color),
        ("ROWBACKGROUNDS", (0,0), (-1,-1), [color]),
        ("TOPPADDING",    (0,0), (-1,-1), 7),
        ("BOTTOMPADDING", (0,0), (-1,-1), 7),
        ("LEFTPADDING",   (0,0), (-1,-1), 10),
        ("RIGHTPADDING",  (0,0), (-1,-1), 10),
        ("ROUNDEDCORNERS", [4]),
    ]))
    return tbl

def info_box(text, bg=ACCENT, border=MID_BLUE):
    p = Paragraph(text, body)
    tbl = Table([[p]], colWidths=[PAGE_W])
    tbl.setStyle(TableStyle([
        ("BACKGROUND",    (0,0), (-1,-1), bg),
        ("BOX",           (0,0), (-1,-1), 1.2, border),
        ("TOPPADDING",    (0,0), (-1,-1), 8),
        ("BOTTOMPADDING", (0,0), (-1,-1), 8),
        ("LEFTPADDING",   (0,0), (-1,-1), 12),
        ("RIGHTPADDING",  (0,0), (-1,-1), 12),
    ]))
    return tbl

def striped_table(data, col_widths, header_bg=DARK_BLUE, stripe=LIGHT_BLUE):
    tbl = Table(data, colWidths=col_widths, repeatRows=1)
    n = len(data)
    style = [
        ("BACKGROUND",    (0,0), (-1,0),  header_bg),
        ("TEXTCOLOR",     (0,0), (-1,0),  WHITE),
        ("FONTNAME",      (0,0), (-1,0),  "Helvetica-Bold"),
        ("FONTSIZE",      (0,0), (-1,0),  9.5),
        ("ALIGN",         (0,0), (-1,-1), "LEFT"),
        ("FONTNAME",      (0,1), (-1,-1), "Helvetica"),
        ("FONTSIZE",      (0,1), (-1,-1), 9),
        ("TOPPADDING",    (0,0), (-1,-1), 5),
        ("BOTTOMPADDING", (0,0), (-1,-1), 5),
        ("LEFTPADDING",   (0,0), (-1,-1), 7),
        ("GRID",          (0,0), (-1,-1), 0.4, MID_GREY),
        ("VALIGN",        (0,0), (-1,-1), "MIDDLE"),
    ]
    for i in range(1, n):
        bg = stripe if i % 2 == 0 else WHITE
        style.append(("BACKGROUND", (0,i), (-1,i), bg))
    tbl.setStyle(TableStyle(style))
    return tbl

def fetch_image_flowable(url, width, height):
    try:
        req = urllib.request.Request(url, headers={"User-Agent": "Mozilla/5.0"})
        data = urllib.request.urlopen(req, timeout=15).read()
        img = RLImage(io.BytesIO(data), width=width, height=height)
        return img
    except Exception as e:
        return Paragraph(f"[Image could not be loaded: {e}]", caption)

# ── Content builder ──────────────────────────────────────────────────────────
story = []

# ── Cover banner ─────────────────────────────────────────────────────────────
cover_data = [[
    Paragraph("BRACHIAL PLEXUS", title_style),
    Paragraph("Complete Anatomy, Branches & Clinical Correlations", subtitle_style),
    Paragraph("Gray's Anatomy for Students | S Das Manual of Clinical Surgery", subtitle_style),
]]
cover_tbl = Table(cover_data, colWidths=[PAGE_W])
cover_tbl.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,-1), DARK_BLUE),
    ("TOPPADDING",    (0,0), (-1,-1), 22),
    ("BOTTOMPADDING", (0,0), (-1,-1), 22),
    ("LEFTPADDING",   (0,0), (-1,-1), 20),
    ("RIGHTPADDING",  (0,0), (-1,-1), 20),
    ("ROUNDEDCORNERS", [6]),
]))
story.append(cover_tbl)
story.append(Spacer(1, 14))

# ── 1. Introduction ───────────────────────────────────────────────────────────
story.append(section_header("1.  Definition and Formation"))
story.append(Spacer(1, 6))
story.append(Paragraph(
    "The <b>brachial plexus</b> is a somatic nerve plexus formed by the anterior rami (roots) of "
    "spinal nerves <b>C5, C6, C7, C8, and T1</b>. It originates in the neck, passes laterally and "
    "inferiorly over the first rib, and enters the axilla.",
    body))
story.append(Paragraph(
    "It is responsible for <b>all motor and sensory innervation of the upper limb</b>, except for "
    "the trapezius (spinal accessory nerve) and the skin over the axilla (supraclavicular nerve, C3-C4).",
    body))
story.append(Paragraph(
    "The roots receive <b>gray rami communicantes</b> from the sympathetic trunk, carrying "
    "postganglionic sympathetic fibres to the periphery.", body))
story.append(Spacer(1, 8))

# ── Mnemonic ──────────────────────────────────────────────────────────────────
story.append(info_box(
    "🔑  <b>Mnemonic – Components (R-T-D-C-B):</b>  "
    "<i>\"Real Texans Drink Cold Beer\"</i>  →  Roots · Trunks · Divisions · Cords · Branches",
    bg=colors.HexColor("#eaf7ea"), border=GREEN))
story.append(Spacer(1, 10))

# ── 2. Components ─────────────────────────────────────────────────────────────
story.append(section_header("2.  Components of the Brachial Plexus"))
story.append(Spacer(1, 6))

# Diagram image
story.append(Paragraph(
    "Fig. 2.1 – Components in the neck and axilla (Gray's Anatomy for Students)", caption))
story.append(fetch_image_flowable(
    "https://cdn.orris.care/cdss_images/42e3982ca738d0e6877cc67f524d1fbfcf9d635fdfed6e0372f6519623416ef7.png",
    PAGE_W * 0.85, 9*cm))
story.append(Spacer(1, 4))

story.append(fetch_image_flowable(
    "https://cdn.orris.care/cdss_images/2d1e124866bcf5ef44fe04881ee3568b0ed579f0f211fa7c979d830bd74fde4d.png",
    PAGE_W * 0.92, 12*cm))
story.append(Paragraph(
    "Fig. 2.2 – Schematic: Roots → Trunks → Divisions → Cords → Terminal branches "
    "(Gray's Anatomy for Students)", caption))
story.append(Spacer(1, 8))

# ── 2a. Roots ────────────────────────────────────────────────────────────────
story.append(h2_para := Paragraph("2a.  Roots", h2))
story.append(Paragraph(
    "The five anterior rami (C5–T1) emerge between the <b>anterior and middle scalene muscles</b> "
    "in the posterior triangle of the neck. The roots and trunks lie superior and posterior to the "
    "subclavian artery.", body))
story.append(Spacer(1, 6))

# ── 2b. Trunks ───────────────────────────────────────────────────────────────
story.append(Paragraph("2b.  Trunks (3 total)", h2))
trunks_data = [
    [Paragraph("<b>Trunk</b>", body), Paragraph("<b>Formed by</b>", body), Paragraph("<b>Position</b>", body)],
    [Paragraph("Superior (Upper)", body), Paragraph("C5 + C6", body),
     Paragraph("Above subclavian artery", body)],
    [Paragraph("Middle", body), Paragraph("C7 alone", body),
     Paragraph("Above subclavian artery", body)],
    [Paragraph("Inferior (Lower)", body), Paragraph("C8 + T1", body),
     Paragraph("On rib I, posterior to subclavian artery", body)],
]
story.append(striped_table(trunks_data, [PAGE_W*0.28, PAGE_W*0.27, PAGE_W*0.45]))
story.append(Spacer(1, 8))

# ── 2c. Divisions ────────────────────────────────────────────────────────────
story.append(Paragraph("2c.  Divisions (6 total)", h2))
story.append(Paragraph(
    "Each of the three trunks splits into an <b>anterior</b> and a <b>posterior division</b> "
    "as the plexus crosses the clavicle. <b>No peripheral nerves arise directly from the divisions.</b>",
    body))
story.append(Paragraph("• Anterior divisions → supply <b>flexor (anterior) compartments</b>", bullet))
story.append(Paragraph("• Posterior divisions → supply <b>extensor (posterior) compartments</b>", bullet))
story.append(Spacer(1, 8))

# ── 2d. Cords ────────────────────────────────────────────────────────────────
story.append(Paragraph("2d.  Cords (3 total)", h2))
story.append(Paragraph(
    "Named by their relation to the <b>second part of the axillary artery</b>:", body))
cords_data = [
    [Paragraph("<b>Cord</b>", body), Paragraph("<b>Formation</b>", body),
     Paragraph("<b>Spinal Levels</b>", body), Paragraph("<b>Position</b>", body)],
    [Paragraph("Lateral cord", body),
     Paragraph("Ant. div. of Superior + Middle trunks", body),
     Paragraph("C5, C6, C7", body), Paragraph("Lateral to axillary artery", body)],
    [Paragraph("Medial cord", body),
     Paragraph("Ant. div. of Inferior trunk", body),
     Paragraph("C8, T1", body), Paragraph("Medial to axillary artery", body)],
    [Paragraph("Posterior cord", body),
     Paragraph("All three posterior divisions", body),
     Paragraph("C5 – T1", body), Paragraph("Posterior to axillary artery", body)],
]
story.append(striped_table(cords_data,
    [PAGE_W*0.18, PAGE_W*0.38, PAGE_W*0.19, PAGE_W*0.25]))
story.append(Spacer(1, 10))

# ── 3. Branches ──────────────────────────────────────────────────────────────
story.append(section_header("3.  Branches of the Brachial Plexus"))
story.append(Spacer(1, 6))
story.append(info_box(
    "🔑  <b>Mnemonic – 5 Terminal Branches:</b>  "
    "<i>\"My Aunty Rubs More Unction\"</i>  →  "
    "<b>M</b>usculocutaneous · <b>A</b>xillary · <b>R</b>adial · <b>M</b>edian · <b>U</b>lnar",
    bg=colors.HexColor("#eaf7ea"), border=GREEN))
story.append(Spacer(1, 8))

# From Roots
story.append(Paragraph("3a.  From Roots", h2))
root_branches = [
    [Paragraph("<b>Nerve</b>", body), Paragraph("<b>Root</b>", body), Paragraph("<b>Supplies</b>", body)],
    [Paragraph("Dorsal scapular nerve", body), Paragraph("C5", body),
     Paragraph("Rhomboid major &amp; minor, levator scapulae", body)],
    [Paragraph("Long thoracic nerve", body), Paragraph("C5, C6, C7", body),
     Paragraph("Serratus anterior (injury → medial winging of scapula)", body)],
    [Paragraph("Contribution to phrenic nerve", body), Paragraph("C5", body),
     Paragraph("Diaphragm (partial)", body)],
]
story.append(striped_table(root_branches, [PAGE_W*0.33, PAGE_W*0.17, PAGE_W*0.50]))
story.append(Spacer(1, 8))

# From Trunks
story.append(Paragraph("3b.  From Trunks", h2))
trunk_branches = [
    [Paragraph("<b>Nerve</b>", body), Paragraph("<b>Origin</b>", body), Paragraph("<b>Supplies</b>", body)],
    [Paragraph("Suprascapular nerve", body), Paragraph("Superior trunk (C5, C6)", body),
     Paragraph("Supraspinatus, infraspinatus", body)],
    [Paragraph("Nerve to subclavius", body), Paragraph("Superior trunk (C5, C6)", body),
     Paragraph("Subclavius", body)],
]
story.append(striped_table(trunk_branches, [PAGE_W*0.33, PAGE_W*0.30, PAGE_W*0.37]))
story.append(Spacer(1, 8))

# From Lateral Cord
story.append(Paragraph("3c.  From Lateral Cord (C5–C7)", h2))
lat_branches = [
    [Paragraph("<b>Nerve</b>", body), Paragraph("<b>Supplies</b>", body)],
    [Paragraph("Lateral pectoral nerve", body),
     Paragraph("Pectoralis major (clavicular head)", body)],
    [Paragraph("Musculocutaneous nerve (C5–C7)", body),
     Paragraph("Biceps, brachialis, coracobrachialis; sensory – lateral forearm", body)],
    [Paragraph("Lateral root of median nerve", body),
     Paragraph("Unites with medial root to form the median nerve", body)],
]
story.append(striped_table(lat_branches, [PAGE_W*0.38, PAGE_W*0.62]))
story.append(Spacer(1, 8))

# From Medial Cord
story.append(Paragraph("3d.  From Medial Cord (C8, T1)", h2))
med_branches = [
    [Paragraph("<b>Nerve</b>", body), Paragraph("<b>Supplies</b>", body)],
    [Paragraph("Medial pectoral nerve", body),
     Paragraph("Pectoralis major and minor", body)],
    [Paragraph("Medial cutaneous nerve of arm", body),
     Paragraph("Skin – medial arm", body)],
    [Paragraph("Medial cutaneous nerve of forearm", body),
     Paragraph("Skin – medial forearm", body)],
    [Paragraph("Ulnar nerve (C8, T1)", body),
     Paragraph("Intrinsic hand muscles, medial 1½ fingers sensation", body)],
    [Paragraph("Medial root of median nerve", body),
     Paragraph("Unites with lateral root to form the median nerve", body)],
]
story.append(striped_table(med_branches, [PAGE_W*0.38, PAGE_W*0.62]))
story.append(Spacer(1, 8))

# From Posterior Cord
story.append(Paragraph("3e.  From Posterior Cord (C5–T1)", h2))
post_branches = [
    [Paragraph("<b>Nerve</b>", body), Paragraph("<b>Supplies</b>", body)],
    [Paragraph("Upper subscapular nerve", body), Paragraph("Subscapularis (upper part)", body)],
    [Paragraph("Thoracodorsal nerve (C6–C8)", body), Paragraph("Latissimus dorsi", body)],
    [Paragraph("Lower subscapular nerve", body), Paragraph("Subscapularis (lower), teres major", body)],
    [Paragraph("Axillary nerve (C5, C6)", body),
     Paragraph("Deltoid, teres minor; sensory – 'regimental badge' area", body)],
    [Paragraph("Radial nerve (C5–T1)", body),
     Paragraph("All posterior compartments of arm and forearm; sensory – posterior limb", body)],
]
story.append(striped_table(post_branches, [PAGE_W*0.38, PAGE_W*0.62]))
story.append(Spacer(1, 10))

# ── 4. Applied Anatomy ────────────────────────────────────────────────────────
story.append(PageBreak())
story.append(section_header("4.  Applied Anatomy – Brachial Plexus Injuries", color=RED))
story.append(Spacer(1, 6))

# Overview
story.append(info_box(
    "<b>Two patterns of injury:</b><br/>"
    "• <b>Upper lesion (Erb-Duchenne palsy)</b> – C5, C6 roots<br/>"
    "• <b>Lower lesion (Klumpke's palsy)</b> – C8, T1 roots<br/>"
    "• <b>Complete lesion</b> – all roots (rare, severe trauma only)",
    bg=colors.HexColor("#fdf3f3"), border=RED))
story.append(Spacer(1, 10))

# Erb-Duchenne
story.append(KeepTogether([
    Paragraph("4a.  Erb-Duchenne Palsy (Upper Brachial Plexus Lesion)", h2),
    striped_table([
        [Paragraph("<b>Feature</b>", body), Paragraph("<b>Detail</b>", body)],
        [Paragraph("Roots injured", body), Paragraph("C5, C6 (at Erb's point – junction of C5+C6 in posterior triangle)", body)],
        [Paragraph("Mechanism", body),
         Paragraph("Forcible widening of angle between neck and shoulder – motorcycle accident (adult); "
                   "shoulder dystocia in difficult labour (neonate)", body)],
        [Paragraph("Muscles affected", body),
         Paragraph("Deltoid, biceps, brachialis, brachioradialis, supinator", body)],
        [Paragraph("Deformity", body),
         Paragraph("<b>\"Policeman's tip\" / \"Waiter's tip\"</b> – adducted &amp; internally rotated "
                   "shoulder, extended elbow, pronated forearm", body)],
        [Paragraph("Sensory loss", body), Paragraph("Outer arm and upper lateral forearm (C5, C6 dermatomes)", body)],
        [Paragraph("Prognosis", body),
         Paragraph("<b>Best prognosis</b> – most common type", body)],
    ], [PAGE_W*0.25, PAGE_W*0.75]),
]))
story.append(Spacer(1, 10))

# Klumpke
story.append(KeepTogether([
    Paragraph("4b.  Klumpke's Palsy (Lower Brachial Plexus Lesion)", h2),
    striped_table([
        [Paragraph("<b>Feature</b>", body), Paragraph("<b>Detail</b>", body)],
        [Paragraph("Roots injured", body), Paragraph("C8, T1 (T1 most commonly involved)", body)],
        [Paragraph("Mechanism", body),
         Paragraph("Forceful hyperabduction of shoulder – grabbing overhead support to break a fall; "
                   "breech delivery with arms above head", body)],
        [Paragraph("Muscles affected", body),
         Paragraph("All intrinsic muscles of the hand (interossei, lumbricals, thenar, hypothenar) "
                   "→ combined median + ulnar palsy features", body)],
        [Paragraph("Deformity", body),
         Paragraph("<b>Claw hand</b> (main en griffe)", body)],
        [Paragraph("Sensory loss", body),
         Paragraph("Medial forearm, entire hand, medial 1½ fingers", body)],
        [Paragraph("Horner's syndrome", body),
         Paragraph("<b>Ptosis · Miosis · Enophthalmos · Anhidrosis</b> (ipsilateral face) – "
                   "due to T1 root damage disrupting cervical sympathetic fibres", body)],
        [Paragraph("Prognosis", body),
         Paragraph("<b>Poor prognosis</b>", body)],
    ], [PAGE_W*0.25, PAGE_W*0.75]),
]))
story.append(Spacer(1, 10))

# Complete lesion
story.append(Paragraph("4c.  Complete Brachial Plexus Palsy", h2))
story.append(Paragraph(
    "Rare; occurs only in severe accidents involving all roots (C5–T1). "
    "Results in <b>complete paralysis and anaesthesia of the entire upper limb</b>, "
    "except the upper arm (supplied by C3, C4, T2). "
    "Long thoracic nerve (serratus anterior) or dorsal scapular nerve (rhomboids) may occasionally be spared.",
    body))
story.append(Spacer(1, 10))

# ── 5. Summary Table ──────────────────────────────────────────────────────────
story.append(section_header("5.  Summary Table", color=MID_BLUE))
story.append(Spacer(1, 6))
summary = [
    [Paragraph("<b>Component</b>", body), Paragraph("<b>Elements</b>", body),
     Paragraph("<b>Location</b>", body), Paragraph("<b>Branches given off</b>", body)],
    [Paragraph("Roots", body), Paragraph("C5, C6, C7, C8, T1", body),
     Paragraph("Between scalene muscles; posterior triangle", body),
     Paragraph("Dorsal scapular, long thoracic, phrenic contribution", body)],
    [Paragraph("Trunks", body), Paragraph("Superior, Middle, Inferior", body),
     Paragraph("Posterior triangle / over rib I", body),
     Paragraph("Suprascapular nerve, nerve to subclavius", body)],
    [Paragraph("Divisions", body), Paragraph("Ant + Post × 3 = 6", body),
     Paragraph("Behind clavicle", body), Paragraph("None", body)],
    [Paragraph("Cords", body), Paragraph("Lateral, Medial, Posterior", body),
     Paragraph("Axilla (around axillary artery)", body),
     Paragraph("All major terminal nerves", body)],
    [Paragraph("Terminal Branches", body),
     Paragraph("Musculocutaneous, Axillary, Radial, Median, Ulnar", body),
     Paragraph("Axilla and beyond", body), Paragraph("Entire upper limb innervation", body)],
]
story.append(striped_table(summary, [PAGE_W*0.18, PAGE_W*0.22, PAGE_W*0.28, PAGE_W*0.32]))
story.append(Spacer(1, 10))

# ── 6. Mnemonics ─────────────────────────────────────────────────────────────
story.append(section_header("6.  Key Mnemonics", color=GREEN))
story.append(Spacer(1, 6))
mnemonics = [
    ("Components (R-T-D-C-B)", '"Real Texans Drink Cold Beer"'),
    ("Terminal branches (M-A-R-M-U)", '"My Aunty Rubs More Unction"'),
    ("Lateral cord branches", '"Lateral cord: Lateral pectoral, Musculocutaneous, Lateral root of Median"'),
    ("Posterior cord branches", '"STARR" – Subscapular (upper), Thoracodorsal, Axillary, (lower subscapular), Radial"'),
    ("Trunks", '"C5+C6 = Superior | C7 = Middle | C8+T1 = Inferior"'),
]
for title_m, text_m in mnemonics:
    story.append(Paragraph(f"<b>{title_m}:</b>  {text_m}", mnemonic))
story.append(Spacer(1, 10))

# ── Footer note ───────────────────────────────────────────────────────────────
story.append(HRFlowable(width=PAGE_W, thickness=0.5, color=MID_GREY))
story.append(Spacer(1, 4))
story.append(Paragraph(
    "<i>Sources: Gray's Anatomy for Students (p. 858–865) · "
    "S Das Manual of Clinical Surgery, 13th Ed (p. 140) · "
    "Figures from Gray's Anatomy for Students via Orris Medical Library</i>",
    caption))

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

cd /home/daytona/workspace/brachial-plexus-pdf && python generate_pdf.py 2>&1

Running Command

ls -lh /home/daytona/workspace/brachial-plexus-pdf/

Your PDF is ready! Here's the download link:

Brachial Plexus

PDF Document · PDF


The PDF includes:
  1. Coloured cover banner with title and source citation
  2. Definition & Formation - with sympathetic connections explained
  3. Full components section with both Gray's Anatomy diagrams embedded (roots in neck, full schematic)
  4. Trunks, Divisions, Cords - each as a colour-coded striped table
  5. All branches organised by origin (roots, trunks, lateral cord, medial cord, posterior cord) - complete with spinal levels and muscles supplied
  6. Applied anatomy - Erb-Duchenne palsy, Klumpke's palsy, and complete lesion - each in a detailed feature table with mechanism, deformity, sensory loss, and prognosis
  7. Summary table - one-page overview of all 5 components
  8. Key mnemonics section at the end
This is a shared conversation. Sign in to Orris to start your own chat.