Provid me the table were the level wise spinal cord injury for example from C1 to T12 which structure organ will be affected more pls provide the table along with also explain the types of Spinal cord injury

Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Reading File
Finding Sources
Reading File
Reading File
Finding Sources
Finding Sources
Reading File
Reading File
I now have sufficient information to construct a detailed, well-sourced response. Let me compile everything.

Spinal Cord Injury: Level-Wise Effects & Types


Part 1 - Types of Spinal Cord Injury

A. Complete vs. Incomplete (ASIA Impairment Scale)

The American Spinal Injury Association (ASIA) Impairment Scale is the standard classification tool. The level of injury is defined as the lowest spinal cord segment with intact motor and sensory function.
ASIA GradeDescription
A - CompleteNo sensory or motor function preserved below the level of injury (including sacral segments S4-S5)
B - Sensory IncompleteSensation present below the neurological level, but no motor function preserved below the level
C - Motor IncompleteMotor function present below the level; more than half of key muscles grade <3/5
D - Motor IncompleteMotor function present below the level; at least half of key muscles grade ≥3/5 (functional)
E - NormalSensory and motor function normal (may still have reflex changes)
Source: Bailey and Love's Short Practice of Surgery 28th Ed., p.413; Bradley and Daroff's Neurology in Clinical Practice

B. Incomplete Spinal Cord Syndromes

Approximately 90% of incomplete injuries fall into one of three classic syndromes:

1. Central Cord Syndrome (Most Common)

  • Mechanism: Hyperextension injury - the cord is squeezed between the anterior vertebral body and inward-buckling ligamentum flavum. Common in elderly with pre-existing cervical stenosis.
  • Deficits: Bilateral motor weakness - upper limbs > lower limbs, distal > proximal. Variable sensory loss and bladder dysfunction (urinary retention common).
  • Mnemonic: MUD - Motor > Sensory, Upper > Lower, Distal > Proximal
  • Prognosis: In patients <50 years: >80% regain bladder continence, ~90% return to walking. In patients >50 years: only ~30% regain bladder function and ~50% regain ambulation.

2. Brown-Séquard Syndrome (Best Prognosis)

  • Mechanism: Hemisection (half) of the spinal cord, usually from penetrating trauma, but also seen with tumors, epidural hematomas, vascular malformations, and radiation.
  • Deficits (classic pattern):
    • Ipsilateral: Motor loss (corticospinal tract), proprioception, vibration loss (dorsal columns)
    • Contralateral: Pain and temperature loss (lateral spinothalamic tract, 1-2 levels below lesion)
  • Prognosis: Best of all incomplete syndromes - 80-90% regain bowel/bladder function, 75% regain ambulation, 70% become ADL-independent.

3. Anterior Cord Syndrome (Worst Prognosis)

  • Mechanism: Damage to anterior 2/3 of cord - from hyperflexion, bone fragment/disc herniation, or anterior spinal artery occlusion (often after aortic surgery or hypotension).
  • Deficits: Loss of motor function, pain, and light touch below the lesion. Posterior column functions are preserved (proprioception, vibration, deep pressure).
  • Prognosis: Worst of the three - only partial motor recovery expected.
SyndromeMechanismMotorPain/TempProprioception/VibrationPrognosis
Central CordHyperextensionBilateral - arms > legsVariable lossOften preservedModerate - age dependent
Brown-SéquardHemisectionIpsilateral lossContralateral lossIpsilateral lossBest (~90% recover)
Anterior CordAnterior artery / flexionBilateral lossBilateral lossPreservedWorst
Source: ROSEN's Emergency Medicine; Goldman-Cecil Medicine; Bradley and Daroff's Neurology in Clinical Practice

4. Posterior Cord Syndrome (Rare)

  • Selective damage to the dorsal columns.
  • Deficits: Loss of proprioception and vibration only; motor and pain/temperature sensation intact.
  • Very rare in isolation.

5. Conus Medullaris Syndrome

  • Injury at L1 vertebral level (where the spinal cord terminates).
  • Mixed UMN + LMN signs - flaccid lower limb weakness, saddle anesthesia, areflexia, bladder/bowel/sexual dysfunction.
  • Detrusor areflexia and flaccid anal sphincter on exam.

6. Cauda Equina Syndrome

  • Injury below the conus (below L1) - pure lower motor neuron lesion affecting the lumbar/sacral nerve roots.
  • Deficits: Lower limb weakness, areflexia, decreased tone, variable sensory loss, severe bladder/bowel/sexual dysfunction.
  • Carries significant central neuropathic pain in at least 1/3 of patients.
Source: Bradley and Daroff's Neurology in Clinical Practice, p.485

Part 2 - Level-Wise Spinal Cord Injury: Structures and Functions Affected

The following table covers C1 through T12 (the most clinically relevant range for complete injury consequences):

Cervical Levels (C1-C8)

LevelKey Muscles InnervatedFunctions Lost/AffectedRespiratory ImpactBladder/BowelOther Key Effects
C1-C2None (intrinsic neck muscles only)Quadriplegia - ALL four limbs; ALL trunk; ALL belowTotal respiratory paralysis - requires permanent mechanical ventilation (phrenic nerve not functional)Complete loss - urinary retention, bowel areflexiaComplete loss of sensation from head down (may spare face via CN V); cannot speak without ventilator; life-threatening autonomic instability
C3Neck muscles partiallyQuadriplegia - all four limbs and trunkRequires ventilatory support - phrenic nerve (C3-C4-C5) compromised; may retain some neck muscle breathingComplete neurogenic bladder/bowelExtremely high level; needs full-time attendant care; total dependence
C4Diaphragm partially (phrenic nerve C3-C4-C5)Quadriplegia - all four limbsBorderline ventilatory function - diaphragm partially functional; may wean off ventilator with effortComplete neurogenic bladder/bowelShoulder shrug possible (trapezius via CN XI); power wheelchair with chin control; total ADL dependence
C5Deltoid, biceps (elbow flexion)Quadriplegia - hands, forearms, lower limbs; no gripIndependent breathing - diaphragm fully functional (phrenic nerve intact)Neurogenic bladder, bowel program neededCan feed self with devices (balanced forearm orthosis); can operate power-assisted wheelchair with hand control; shoulder abduction and elbow flexion present
C6Wrist extensors, radial wrist extensionParalysis of hands and lower limbs; no finger flexionIntactNeurogenic bladder - can self-catheterize with trainingTenodesis function (passive finger closure via wrist extension); upper limb dressing, manual wheelchair propulsion, sliding board transfers feasible
C7Triceps (elbow extension), wrist flexorsParalysis below C7; weak hand functionIntactNeurogenic bladder - self-catheterizationMost ADLs from wheelchair feasible; can use suppositories for bowel program; triceps give better push-up ability
C8Long finger flexors, intrinsic hand musclesParalysis below C8; finger grip possibleIntactNeurogenic bladder/bowelMost ADLs independent from wheelchair; long finger flexion permits most daily tasks

Thoracic Levels (T1-T12)

LevelKey Muscles/StructuresFunctions Lost/AffectedRespiratory ImpactBladder/BowelOther Key Effects
T1Intrinsic hand muscles (thenar, hypothenar, interossei)Paraplegia - both lower limbs + trunk below T1; weak hand intrinsicsIntact (intercostals above T1 intact)Neurogenic bladder/bowelFull upper limb function; independent manual wheelchair; Horner syndrome possible if T1 sympathetics disrupted
T2-T6Upper intercostal muscles, upper trunkParaplegia - lower limbs + lower trunk; reduced intercostal functionReduced respiratory reserve (upper intercostals affected); coughing weakenedNeurogenic bladder, constipationSympathetic outflow to heart at T1-T4 - lesions at T3 or above = neurogenic shock (bradycardia + hypotension + peripheral vasodilation); autonomic dysreflexia risk
T4Mid-chest intercostalsParaplegia below nipple line (T4 dermatome landmark = nipple)Reduced but functionalNeurogenic bladder/bowelT4 is nipple line landmark; cardiac sympathetics compromised above T4
T6Mid-thoracic intercostals, upper abdominalsParaplegia below T6Moderately reducedNeurogenic bladder/bowelAbove T6 = risk of autonomic dysreflexia (life-threatening hypertensive crisis triggered by noxious stimuli below lesion); splanchnic sympathetic disruption affects BP control
T7-T9Lower intercostals, partial abdominalsParaplegia - lower limbs + lower trunk; upper abdominals intactNear-normalNeurogenic bladder/bowelPartial truncal stability; ambulatory with KAFO (knee-ankle-foot orthosis) and crutches possible for some
T10Abdominals (full), lower intercostalsParaplegia - legs and lower trunk below T10; full abdominal control intactNormalNeurogenic bladder/bowelT10 dermatome = umbilicus (clinical landmark); good trunk stability; better cough/expiratory strength; wheelchair independent
T11-T12Lower abdominals, iliopsoas partiallyParaplegia - lower limb weakness; hip flexors partially preservedNormalNeurogenic bladder/bowel (but improving toward conus level)Lumbar orthosis may allow some household ambulation; better functional outcomes than upper thoracic

Part 3 - Summary of Critical Functional Levels

Injury LevelFunctional CategoryFunctional Prognosis
C1-C3High tetraplegic (quadriplegic)Ventilator dependent; full-time attendant care; power wheelchair (head/chin/breath control)
C4TetraplegicPossibly ventilator-free; power wheelchair; total ADL dependence
C5TetraplegicVentilator-free; self-feeding with aids; power-assist wheelchair
C6TetraplegicTenodesis hand function; manual wheelchair; partial ADL independence
C7-C8TetraplegicNear-full upper limb function; manual wheelchair; ADL independent
T1-T6ParaplegicFull upper limb function; manual wheelchair; risk of autonomic dysreflexia if ≥T6
T7-T12ParaplegicManual wheelchair; some potential for assisted/functional ambulation with orthoses

Key Clinical Points

  • Spinal shock: Immediately after SCI, all motor, sensory, and reflex function is lost below the injury (including bulbocavernosus reflex). This is temporary and resolves over days to weeks.
  • Neurogenic shock: If lesion is at T3 or above, sympathetic cardiac tone is lost → bradycardia + hypotension + peripheral vasodilation (the classic triad).
  • Autonomic dysreflexia: Life-threatening hypertension in injuries at T6 and above, triggered by any noxious stimulus below the lesion (e.g., bladder distension, pressure sore).
  • Bladder: Complete injuries almost never recover normal bladder/bowel function; ~15% of incomplete injuries do recover.
  • Burning hands sign: A complaint of "burning hands" in trauma should raise strong suspicion for cervical spinal cord injury.
Sources: Goldman-Cecil Medicine, International Edition; Bradley and Daroff's Neurology in Clinical Practice; ROSEN's Emergency Medicine; Gray's Anatomy for Students; Bailey and Love's Short Practice of Surgery 28th Ed.

Create a summary PDF with this level-wise table for quick clinical reference

Reading File
Reading File
Running Command

ls -la /home/daytona/workspace/ 2>/dev/null || mkdir -p /home/daytona/workspace && ls -la /home/daytona/workspace/

Running Command

mkdir -p /home/daytona/workspace/sci-reference

Writing File

~/sci-reference/build_sci_pdf.py

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

OUTPUT = "/home/daytona/workspace/sci-reference/SCI_Clinical_Reference.pdf"

# ── Colour palette ──────────────────────────────────────────────────────────
C_DARK_BLUE   = colors.HexColor("#0D2B55")
C_MED_BLUE    = colors.HexColor("#1A5276")
C_LIGHT_BLUE  = colors.HexColor("#D6EAF8")
C_RED         = colors.HexColor("#C0392B")
C_ORANGE      = colors.HexColor("#E67E22")
C_AMBER       = colors.HexColor("#F9E79F")
C_GREEN       = colors.HexColor("#1E8449")
C_LIGHT_GREEN = colors.HexColor("#D5F5E3")
C_YELLOW_HDR  = colors.HexColor("#FFF3CD")
C_GREY_ROW    = colors.HexColor("#F2F3F4")
C_WHITE       = colors.white
C_BLACK       = colors.black

# ── Document ─────────────────────────────────────────────────────────────────
doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=landscape(A4),
    leftMargin=1.2*cm, rightMargin=1.2*cm,
    topMargin=1.5*cm, bottomMargin=1.5*cm,
    title="Spinal Cord Injury – Level-wise Clinical Reference",
    author="Orris Medical Reference"
)

styles = getSampleStyleSheet()

# Custom styles
def S(name, **kw):
    return ParagraphStyle(name, **kw)

title_style = S("Title2", fontSize=18, textColor=C_WHITE,
                fontName="Helvetica-Bold", alignment=TA_CENTER, leading=22)
sub_style   = S("Sub",    fontSize=10, textColor=C_LIGHT_BLUE,
                fontName="Helvetica", alignment=TA_CENTER, leading=13)
h1_style    = S("H1",     fontSize=13, textColor=C_DARK_BLUE,
                fontName="Helvetica-Bold", spaceBefore=10, spaceAfter=4)
h2_style    = S("H2",     fontSize=10, textColor=C_MED_BLUE,
                fontName="Helvetica-Bold", spaceBefore=6, spaceAfter=3)
body_style  = S("Body2",  fontSize=8.5, textColor=C_BLACK,
                fontName="Helvetica", leading=11)
note_style  = S("Note",   fontSize=7.5, textColor=colors.HexColor("#555555"),
                fontName="Helvetica-Oblique", leading=10)
small_bold  = S("SmBold", fontSize=8, textColor=C_BLACK,
                fontName="Helvetica-Bold", leading=10)
cell_style  = S("Cell",   fontSize=7.5, textColor=C_BLACK,
                fontName="Helvetica", leading=10)
cell_bold   = S("CellB",  fontSize=7.5, textColor=C_BLACK,
                fontName="Helvetica-Bold", leading=10)
cell_red    = S("CellR",  fontSize=7.5, textColor=C_RED,
                fontName="Helvetica-Bold", leading=10)
cell_green  = S("CellG",  fontSize=7.5, textColor=C_GREEN,
                fontName="Helvetica-Bold", leading=10)
hdr_style   = S("TblHdr", fontSize=8, textColor=C_WHITE,
                fontName="Helvetica-Bold", alignment=TA_CENTER, leading=10)

def P(text, style=cell_style): return Paragraph(text, style)
def PB(text): return Paragraph(text, cell_bold)
def PR(text): return Paragraph(text, cell_red)
def PG(text): return Paragraph(text, cell_green)
def PH(text): return Paragraph(text, hdr_style)
def PBody(text): return Paragraph(text, body_style)

story = []

# ═══════════════════════════════════════════════════════════════════════════
# PAGE 1 – COVER BANNER + ASIA TABLE + SYNDROMES TABLE
# ═══════════════════════════════════════════════════════════════════════════

# -- Cover banner -----------------------------------------------------------
banner_data = [[Paragraph("SPINAL CORD INJURY", title_style)],
               [Paragraph("Level-wise Clinical Reference Card  •  ASIA Classification  •  Incomplete Syndromes", sub_style)]]
banner_tbl = Table(banner_data, colWidths=[26.6*cm])
banner_tbl.setStyle(TableStyle([
    ("BACKGROUND",  (0,0), (-1,-1), C_DARK_BLUE),
    ("TOPPADDING",  (0,0), (-1,-1), 10),
    ("BOTTOMPADDING",(0,0),(-1,-1), 10),
    ("ROUNDEDCORNERS",[6]),
]))
story.append(banner_tbl)
story.append(Spacer(1, 8))

# ── Two side-by-side boxes: ASIA + Key Definitions ─────────────────────────

# ASIA Impairment Scale
asia_header = [PH("Grade"), PH("Description"), PH("Clinical Meaning")]
asia_rows = [
    [PR("A – Complete"),       P("No motor or sensory function below injury level"),          PR("Total paralysis & anaesthesia below lesion")],
    [PB("B – Sens. Incompl."), P("Sensation present below level; NO motor function"),          P("Feels, cannot move below")],
    [PB("C – Motor Incompl."), P("Motor present below level; >half key muscles grade <3/5"),   P("Weak, non-functional movement")],
    [PG("D – Motor Incompl."), P("Motor present below level; ≥half key muscles grade ≥3/5"),   PG("Functional motor preserved")],
    [PG("E – Normal"),         P("Normal sensory and motor function"),                          PG("May still have reflex changes")],
]
asia_tbl = Table([asia_header]+asia_rows, colWidths=[3.0*cm, 7.5*cm, 5.5*cm])
asia_tbl.setStyle(TableStyle([
    ("BACKGROUND",   (0,0), (-1,0),  C_MED_BLUE),
    ("BACKGROUND",   (0,1), (-1,1),  C_GREY_ROW),
    ("BACKGROUND",   (0,2), (-1,2),  C_WHITE),
    ("BACKGROUND",   (0,3), (-1,3),  C_GREY_ROW),
    ("BACKGROUND",   (0,4), (-1,4),  C_LIGHT_GREEN),
    ("BACKGROUND",   (0,5), (-1,5),  C_LIGHT_GREEN),
    ("BOX",          (0,0), (-1,-1), 0.5, C_MED_BLUE),
    ("INNERGRID",    (0,0), (-1,-1), 0.3, colors.HexColor("#AAAAAA")),
    ("VALIGN",       (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING",   (0,0), (-1,-1), 4),
    ("BOTTOMPADDING",(0,0), (-1,-1), 4),
    ("LEFTPADDING",  (0,0), (-1,-1), 5),
]))

# Incomplete syndromes summary
syn_header = [PH("Syndrome"), PH("Mechanism"), PH("Motor Loss"), PH("Sensory Loss"), PH("Prognosis")]
syn_rows = [
    [PB("Central Cord"),   P("Hyperextension;\ncervical stenosis"),     P("Arms > Legs\nDistal > Proximal"),   P("Variable pain/temp;\nproprio. spared"),  PG("Moderate\n<50 yrs: 90% walk")],
    [PB("Brown-Séquard"),  P("Hemisection;\npenetrating trauma"),        P("Ipsilateral\nbelow lesion"),       P("Contralateral pain/temp\nIpsilateral proprio."), PG("BEST\n80-90% recover")],
    [PB("Anterior Cord"),  P("Ant. spinal art.\nHyperflexion / disc"),   P("Bilateral\nbelow lesion"),         P("Pain/touch lost\nProprio. INTACT"),      PR("WORST\nPartial recovery")],
    [PB("Posterior Cord"), P("Rare; dorsal column\ndamage"),             P("Intact"),                         PR("Proprio. & vibration\nlost only"),       P("Good motor\noutcome")],
    [PB("Conus Medullaris"),P("L1 level injury"),                        P("Flaccid lower\nlimb weakness"),   P("Saddle anaesthesia"),                    P("Mixed UMN+LMN\nsigns")],
    [PB("Cauda Equina"),   P("Below L1\n(nerve roots)"),                 P("Flaccid, areflexic\nlower limbs"), P("Variable lower\nlimb + perineum"),       P("Pure LMN;\nbladder/bowel affected")],
]
syn_tbl = Table([syn_header]+syn_rows, colWidths=[2.8*cm, 3.2*cm, 3.5*cm, 3.8*cm, 3.3*cm])
syn_tbl.setStyle(TableStyle([
    ("BACKGROUND",   (0,0), (-1,0),  C_DARK_BLUE),
    ("ROWBACKGROUNDS",(0,1),(-1,-1), [C_GREY_ROW, C_WHITE]),
    ("BOX",          (0,0), (-1,-1), 0.5, C_DARK_BLUE),
    ("INNERGRID",    (0,0), (-1,-1), 0.3, colors.HexColor("#AAAAAA")),
    ("VALIGN",       (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING",   (0,0), (-1,-1), 4),
    ("BOTTOMPADDING",(0,0), (-1,-1), 4),
    ("LEFTPADDING",  (0,0), (-1,-1), 4),
]))

# Place the two tables side by side
outer = Table(
    [[Paragraph("ASIA Impairment Scale", h2_style), Spacer(0.3*cm, 1), Paragraph("Incomplete Spinal Cord Syndromes", h2_style)],
     [asia_tbl, Spacer(0.4*cm, 1), syn_tbl]],
    colWidths=[16.2*cm, 0.4*cm, 16.2*cm] if False else None
)
# Use a simpler two-column approach
side_by_side = Table([[asia_tbl, syn_tbl]], colWidths=[16.2*cm, 16.4*cm])
side_by_side.setStyle(TableStyle([
    ("VALIGN",      (0,0),(-1,-1),"TOP"),
    ("LEFTPADDING", (0,0),(-1,-1),0),
    ("RIGHTPADDING",(0,0),(-1,-1),4),
]))

story.append(Paragraph("ASIA Impairment Scale &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Incomplete Spinal Cord Syndromes", h2_style))
story.append(side_by_side)
story.append(Spacer(1, 6))
story.append(Paragraph("Sources: Bailey & Love's Surgery 28e • ROSEN's Emergency Medicine • Goldman-Cecil Medicine • Bradley & Daroff's Neurology in Clinical Practice • Gray's Anatomy for Students", note_style))

story.append(PageBreak())

# ═══════════════════════════════════════════════════════════════════════════
# PAGE 2 – CERVICAL LEVEL TABLE (C1–C8)
# ═══════════════════════════════════════════════════════════════════════════

story.append(Table([[Paragraph("CERVICAL SPINAL CORD INJURY  (C1 – C8)", title_style)]],
    colWidths=[26.6*cm]))
story[-1].setStyle(TableStyle([
    ("BACKGROUND",(0,0),(-1,-1),C_MED_BLUE),
    ("TOPPADDING",(0,0),(-1,-1),7),("BOTTOMPADDING",(0,0),(-1,-1),7),
]))
story.append(Spacer(1, 6))

cerv_hdr = [PH("Level"), PH("Key Muscles\nInnervated"), PH("Respiratory\nStatus"),
            PH("Bladder /\nBowel"), PH("Motor Function\nLost"), PH("Autonomic /\nOther Effects"), PH("Functional\nOutcome")]

cerv_data = [
    [PR("C1–C2"), P("Intrinsic neck\nmuscles only"),
     PR("APNOEIC\nVentilator forever"),
     PR("Complete\nneurogenic\nbladder & bowel"),
     PR("Quadriplegia\nALL four limbs;\nALL trunk"),
     PR("Life-threatening\nautonomic instability;\ncomplete sensory loss"),
     PR("Full-time care;\npower chair\n(head/chin/breath)")],

    [PR("C3"), P("Neck muscles\n(partial)"),
     PR("Requires\nventilatory\nsupport"),
     PR("Complete\nneurogenic"),
     PR("Quadriplegia;\nno shoulder\nmovement"),
     P("Phrenic nerve\ncompromised\n(C3-4-5)"),
     PR("Full-time care;\npower wheelchair")],

    [P("C4"), P("Diaphragm\n(partial) via\nphrenic nerve"),
     P("Borderline;\nmay wean\noff vent."),
     PR("Neurogenic\nbladder/bowel"),
     P("Quadriplegia;\nshoulder shrug\n(trapezius via XI)"),
     P("Shoulder shrug\npossible (CN XI);\nno elbow/wrist"),
     P("Power wheelchair\nwith chin control;\ntotal ADL depend.")],

    [P("C5"), P("Deltoid, biceps\n(elbow flexion)"),
     PG("Independent\nbreathing"),
     P("Neurogenic\nbladder/bowel"),
     P("Hands, forearms,\nlower limbs;\nno grip"),
     P("Can self-feed\nwith forearm\northosis & splints"),
     P("Power-assist\nwheelchair;\npartial self-care")],

    [PG("C6"), P("Wrist extensors;\nradial wrist\nextension"),
     PG("Normal"),
     P("Neurogenic;\nself-catheter-\nisation feasible"),
     P("Paralysis of hands\n& lower limbs;\nno finger flex."),
     PG("Tenodesis grip\n(passive finger\nclosure)"),
     PG("Manual wheelchair;\nupper limb dressing;\nsliding transfers")],

    [PG("C7"), P("Triceps (elbow\nextension);\nwrist flexors"),
     PG("Normal"),
     P("Neurogenic;\ncan use\nsuppositories"),
     P("Weak hand\nintrinsics;\nlower limb paresis"),
     PG("Better push-up\nability;\ntriceps intact"),
     PG("Most ADLs from\nwheelchair;\nbowel program")],

    [PG("C8"), P("Long finger\nflexors;\nhand intrinsics"),
     PG("Normal"),
     P("Neurogenic;\ncan perform self-\ncatheterisation"),
     P("Lower limb\nparaplegia;\nsome hand weakness"),
     PG("Grip present;\nalmost full\nUL function"),
     PG("Nearly full ADL\nindependence\nfrom wheelchair")],
]

cerv_tbl = Table([cerv_hdr]+cerv_data,
    colWidths=[1.6*cm, 3.5*cm, 3.2*cm, 3.2*cm, 3.8*cm, 4.3*cm, 4.0*cm],
    repeatRows=1)
cerv_tbl.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,0),  C_MED_BLUE),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),  [C_GREY_ROW, C_WHITE]),
    ("BACKGROUND",    (0,1), (-1,3),  colors.HexColor("#FDECEA")),  # C1-C4 danger tint
    ("BACKGROUND",    (0,4), (-1,7),  C_WHITE),
    ("BACKGROUND",    (0,4), (-1,4),  C_GREY_ROW),
    ("BOX",           (0,0), (-1,-1), 0.6, C_MED_BLUE),
    ("INNERGRID",     (0,0), (-1,-1), 0.3, colors.HexColor("#BBBBBB")),
    ("VALIGN",        (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING",    (0,0), (-1,-1), 4),
    ("BOTTOMPADDING", (0,0), (-1,-1), 4),
    ("LEFTPADDING",   (0,0), (-1,-1), 4),
    ("FONTNAME",      (0,0), (-1,0),  "Helvetica-Bold"),
]))
story.append(cerv_tbl)

story.append(Spacer(1, 5))
story.append(Paragraph(
    "<b>Key:</b>  Red text = critical/life-threatening deficit  •  Green text = favourable function  •  "
    "Phrenic nerve origin = C3-C4-C5 (supplies diaphragm)  •  Brachial plexus starts at C5",
    note_style))

story.append(PageBreak())

# ═══════════════════════════════════════════════════════════════════════════
# PAGE 3 – THORACIC LEVEL TABLE (T1–T12)
# ═══════════════════════════════════════════════════════════════════════════

story.append(Table([[Paragraph("THORACIC SPINAL CORD INJURY  (T1 – T12)", title_style)]],
    colWidths=[26.6*cm]))
story[-1].setStyle(TableStyle([
    ("BACKGROUND",(0,0),(-1,-1),C_DARK_BLUE),
    ("TOPPADDING",(0,0),(-1,-1),7),("BOTTOMPADDING",(0,0),(-1,-1),7),
]))
story.append(Spacer(1, 6))

thor_hdr = [PH("Level"), PH("Key Muscles /\nStructures"), PH("Respiratory\nStatus"),
            PH("Bladder /\nBowel"), PH("Motor Loss"), PH("Autonomic /\nSpecial Effects"), PH("Functional\nOutcome")]

thor_data = [
    [PB("T1"), P("Intrinsic hand\nmuscles (thenar,\nhypoth., interossei)"),
     PG("Normal\n(intercostals\nabove intact)"),
     P("Neurogenic\nbladder/bowel"),
     P("Paraplegia (both\nlower limbs);\nweak hand intrinsics"),
     P("Horner syndrome\npossible if T1\nsympathetics cut"),
     PG("Full UL function;\nindependent manual\nwheelchair")],

    [PR("T2–T5"), P("Upper intercostal\nmuscles; upper\ntrunk"),
     P("Reduced reserve;\nweak cough;\nURI risk"),
     P("Neurogenic\nbladder;\nconstipation"),
     P("Paraplegia below\nT2; lower limbs &\nlower trunk"),
     PR("Cardiac sympathetics\n(T1-T4): neurogenic\nshock risk if >=T3"),
     P("Manual wheelchair;\nfull upper limb\nfunction")],

    [PR("T4"), P("Mid-chest\nintercostals"),
     P("Moderately\nreduced"),
     P("Neurogenic\nbladder/bowel"),
     P("Paraplegia below\nnipple line"),
     PR("NIPPLE LINE landmark\n(T4 dermatome);\nautonomic dysreflexia\nif stimulated"),
     P("Manual wheelchair;\nindependent\nupper body")],

    [PR("T6"), P("Mid-thoracic\nintercostals;\nupper abdominals"),
     P("Near-normal\nupper chest\nmovements"),
     P("Neurogenic\nbladder/bowel"),
     P("Paraplegia;\nupper abdominals\nnot yet intact"),
     PR("ABOVE T6 = RISK OF\nAUTONOMIC\nDYSREFLEXIA\n(splanchnic sympath.)"),
     P("Wheelchair\nindependent;\nimproved truncal\ncontrol")],

    [PG("T7–T9"), P("Lower intercostals;\npartial abdominals"),
     PG("Near-normal"),
     P("Neurogenic\nbladder/bowel"),
     P("Paraplegia; lower\nthoracic & lower\nlimbs affected"),
     P("Improving truncal\nstability; risk of\nautonomic dysreflexia\ndecreasing"),
     PG("Household ambulation\nwith KAFO+crutches\npossible for some")],

    [PG("T10"), P("Full abdominals;\nlower intercostals"),
     PG("Normal\n(full respiratory\nmuscle function)"),
     P("Neurogenic\nbladder/bowel\n(modifying)"),
     P("Paraplegia below\numbilicus; legs\nand lower trunk"),
     PG("UMBILICUS landmark\n(T10 dermatome);\ngood trunk stability;\nstrong cough"),
     PG("Good wheelchair\nindependence;\nsome walk with\northoses")],

    [PG("T11–T12"), P("Lower abdominals;\niliopsoas (partial);\nhip flexors begin"),
     PG("Normal"),
     P("Neurogenic bladder\nimproving toward\nconus level"),
     P("Paraplegia; hip\nflexors partially\npreserved"),
     PG("Closest to lumbar\nlevel; improving\nlower limb control"),
     PG("Better functional\noutcomes; lumbar\northosis + ambul.\nfeasible")],
]

thor_tbl = Table([thor_hdr]+thor_data,
    colWidths=[1.8*cm, 3.8*cm, 3.0*cm, 3.0*cm, 3.8*cm, 4.5*cm, 3.7*cm],
    repeatRows=1)
thor_tbl.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,0),  C_DARK_BLUE),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),  [C_GREY_ROW, C_WHITE]),
    ("BACKGROUND",    (0,1), (-1,3),  colors.HexColor("#FDECEA")),  # T1-T6 danger
    ("BACKGROUND",    (0,4), (-1,7),  C_LIGHT_GREEN),
    ("BOX",           (0,0), (-1,-1), 0.6, C_DARK_BLUE),
    ("INNERGRID",     (0,0), (-1,-1), 0.3, colors.HexColor("#BBBBBB")),
    ("VALIGN",        (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING",    (0,0), (-1,-1), 4),
    ("BOTTOMPADDING", (0,0), (-1,-1), 4),
    ("LEFTPADDING",   (0,0), (-1,-1), 4),
    ("FONTNAME",      (0,0), (-1,0),  "Helvetica-Bold"),
]))
story.append(thor_tbl)

story.append(Spacer(1, 5))
story.append(Paragraph(
    "<b>Autonomic Dysreflexia:</b> Life-threatening hypertension triggered by noxious stimulus below lesion in injuries >=T6. "
    "<b>Neurogenic Shock:</b> Bradycardia + Hypotension + Vasodilation in injuries >=T3 (cardiac sympathetics T1-T4 disrupted). "
    "<b>Spinal Shock:</b> Temporary loss of ALL reflexes below injury immediately after SCI.",
    note_style))

story.append(PageBreak())

# ═══════════════════════════════════════════════════════════════════════════
# PAGE 4 – FUNCTIONAL SUMMARY + CLINICAL PEARLS
# ═══════════════════════════════════════════════════════════════════════════

story.append(Table([[Paragraph("FUNCTIONAL OUTCOMES SUMMARY  &  CLINICAL PEARLS", title_style)]],
    colWidths=[26.6*cm]))
story[-1].setStyle(TableStyle([
    ("BACKGROUND",(0,0),(-1,-1),C_MED_BLUE),
    ("TOPPADDING",(0,0),(-1,-1),7),("BOTTOMPADDING",(0,0),(-1,-1),7),
]))
story.append(Spacer(1, 8))

# ── Functional summary table ─────────────────────────────────────────────
func_hdr = [PH("Level"), PH("Category"), PH("Ventilation"), PH("Wheelchair"), PH("Upper Limb\nFunction"), PH("ADL\nIndependence"), PH("Ambulation\nPotential")]
func_data = [
    [PR("C1–C3"), PR("HIGH TETRAPLEGIA"), PR("Vent. dependent"), P("Power chair\nhead/chin ctrl"), PR("None"), PR("Total dependence"), PR("None")],
    [PR("C4"),    PR("TETRAPLEGIA"),     P("Possibly vent-free"), P("Power chair\nchin control"),  P("Shoulder shrug"),    PR("Total depend."),          PR("None")],
    [P("C5"),    PB("TETRAPLEGIA"),     PG("Independent"), P("Power-assist\nchair"),         P("Elbow flex;\nno grip"),         P("Partial; needs\ndevices"),          P("None")],
    [PG("C6"),   PB("TETRAPLEGIA"),     PG("Independent"), PG("Manual chair"),               PG("Tenodesis grip;\nwrist ext."),  PG("Partial ADL\nindependence"),       P("None")],
    [PG("C7"),   PB("TETRAPLEGIA"),     PG("Independent"), PG("Manual chair"),               PG("Triceps; most\nUL function"),   PG("Most ADLs"),                       P("None")],
    [PG("C8"),   PB("TETRAPLEGIA"),     PG("Independent"), PG("Manual chair"),               PG("Near-full\nhand function"),    PG("ADL independent"),                 P("None")],
    [PG("T1–T6"),PG("PARAPLEGIA"),      PG("Normal"),      PG("Manual chair"),               PG("Full"),                        PG("Independent"),                     P("Therapeutic only;\nKAFO needed")],
    [PG("T7–T12"),PG("PARAPLEGIA"),     PG("Normal"),      PG("Manual chair"),               PG("Full"),                        PG("Independent"),                     PG("Household / community\nambulation possible")],
]

func_tbl = Table([func_hdr]+func_data,
    colWidths=[1.8*cm, 3.5*cm, 3.0*cm, 3.5*cm, 4.0*cm, 4.0*cm, 4.0*cm],
    repeatRows=1)
func_tbl.setStyle(TableStyle([
    ("BACKGROUND",    (0,0), (-1,0),  C_MED_BLUE),
    ("ROWBACKGROUNDS",(0,1),(-1,-1),  [C_GREY_ROW, C_WHITE]),
    ("BOX",           (0,0), (-1,-1), 0.6, C_MED_BLUE),
    ("INNERGRID",     (0,0), (-1,-1), 0.3, colors.HexColor("#BBBBBB")),
    ("VALIGN",        (0,0), (-1,-1), "MIDDLE"),
    ("TOPPADDING",    (0,0), (-1,-1), 5),
    ("BOTTOMPADDING", (0,0), (-1,-1), 5),
    ("LEFTPADDING",   (0,0), (-1,-1), 5),
]))
story.append(func_tbl)
story.append(Spacer(1, 10))

# ── Clinical Pearls ────────────────────────────────────────────────────────
story.append(Paragraph("Clinical Pearls", h1_style))
story.append(HRFlowable(width="100%", thickness=1.5, color=C_MED_BLUE))
story.append(Spacer(1, 4))

pearls = [
    ("<b>Phrenic Nerve (C3-C4-C5):</b>", "Injury above C5 = loss of diaphragm = respiratory failure. Injury at C5 = borderline; may deteriorate as cord swells superiorly."),
    ("<b>Burning Hands Sign:</b>", "Complaint of 'burning hands' after trauma strongly suggests cervical SCI. Urgent imaging required."),
    ("<b>Neurogenic vs. Spinal Shock:</b>", "Spinal shock = temporary loss of ALL reflexes below lesion (resolves in days-weeks). Neurogenic shock (>=T3) = triad of bradycardia + hypotension + peripheral vasodilation (cardiac sympathetics T1-T4 lost)."),
    ("<b>Autonomic Dysreflexia:</b>", "Occurs in injuries >=T6. Massive sympathetic discharge from noxious stimulus below lesion (e.g., bladder distension, pressure sore). Presents as severe hypertension. EMERGENCY - remove stimulus immediately."),
    ("<b>T4 and T10 Landmarks:</b>", "T4 dermatome = nipple line. T10 dermatome = umbilicus. Use these to quickly estimate injury level on exam."),
    ("<b>Bladder in SCI:</b>", "Complete injuries almost never recover normal bladder function. ~15% of incomplete injuries do. Aggressive bladder management is essential to prevent upper tract damage and renal failure."),
    ("<b>Prognosis Rule:</b>", "ASIA A injuries: No motor recovery 2 levels below cervical SCI at 8 weeks = poor prognosis. ASIA C injuries: Highly likely to continue gaining motor function. 80% of central cord patients <50 yrs regain ambulation."),
    ("<b>Brown-Sequard Rule:</b>", "Hemisection = ipsilateral motor + proprio. loss; contralateral pain/temperature loss (spinothalamic tract crosses 1-2 segments before ascending). Best prognosis of all syndromes."),
]

pearl_rows = [[P(bold), PBody(desc)] for bold, desc in pearls]
pearl_tbl = Table(pearl_rows, colWidths=[5.2*cm, 21.4*cm])
pearl_tbl.setStyle(TableStyle([
    ("ROWBACKGROUNDS",(0,0),(-1,-1), [C_LIGHT_BLUE, C_WHITE]),
    ("VALIGN",       (0,0),(-1,-1),  "MIDDLE"),
    ("TOPPADDING",   (0,0),(-1,-1),  5),
    ("BOTTOMPADDING",(0,0),(-1,-1),  5),
    ("LEFTPADDING",  (0,0),(-1,-1),  6),
    ("BOX",          (0,0),(-1,-1),  0.5, C_MED_BLUE),
    ("INNERGRID",    (0,0),(-1,-1),  0.3, colors.HexColor("#AAAAAA")),
]))
story.append(pearl_tbl)

story.append(Spacer(1, 8))
story.append(Paragraph(
    "References: Goldman-Cecil Medicine Int. Ed. • Bradley & Daroff's Neurology in Clinical Practice • "
    "ROSEN's Emergency Medicine • Bailey & Love's Short Practice of Surgery 28e • Gray's Anatomy for Students • "
    "Ganong's Review of Medical Physiology 26e",
    note_style))

# ═══════════════════════════════════════════════════════════════════════════
# BUILD
# ═══════════════════════════════════════════════════════════════════════════
doc.build(story)
print("PDF generated:", OUTPUT)
Running Command

cd /home/daytona/workspace/sci-reference && python build_sci_pdf.py 2>&1

Running Command

ls -lh /home/daytona/workspace/sci-reference/SCI_Clinical_Reference.pdf

Your PDF is ready. Here's a summary of what's inside:

SCI Clinical Reference

PDF Document · PDF

A 4-page A4 landscape clinical reference card containing:
PageContent
Page 1ASIA Impairment Scale (Grade A-E) + Incomplete Syndromes comparison table (Central Cord, Brown-Sequard, Anterior Cord, Posterior Cord, Conus, Cauda Equina)
Page 2Cervical Level Table (C1-C8) - Key muscles, respiratory status, bladder/bowel, motor loss, autonomic effects, functional outcome - color-coded red for critical levels (C1-C4)
Page 3Thoracic Level Table (T1-T12) - Full level-wise breakdown with autonomic dysreflexia warnings at T6, neurogenic shock warning at T3, dermatome landmarks (T4=nipple, T10=umbilicus)
Page 4Functional Outcomes Summary table (all levels C1-T12 in one grid) + 8 Clinical Pearls (burning hands sign, phrenic nerve rule, autonomic dysreflexia, prognosis rules, etc.)
Design features: Color coding (red = dangerous/critical, green = favourable function, light blue for pearls), clear column headers, alternating row shading for quick scanning, and source references at the bottom of each page.
This is a shared conversation. Sign in to Orris to start your own chat.