Audit alchol

Asking for Preferences
Reading File
Finding Sources
Finding Sources
Searching PubMed

"AUDIT" AND "alcohol use disorders identification test" AND screening

Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
I now have all the information needed for a comprehensive answer.

AUDIT - Alcohol Use Disorders Identification Test

Overview

The AUDIT was developed by the World Health Organization (WHO) in the late 1980s as a brief screening instrument for the early detection of hazardous (risk of harm) and harmful (presence of harm) alcohol use across a variety of clinical settings. It takes less than 5 minutes to administer and requires no professional training. It focuses on drinking patterns in the past year.
  • Kaplan & Sadock's Comprehensive Textbook of Psychiatry, p. 3370

The 10 AUDIT Questions

Each question is scored 0-4; total score range = 0-40.

Domain 1: Alcohol Consumption (Questions 1-3)

Q1. How often do you have a drink containing alcohol?
  • (0) Never → Skip to Q9-10
  • (1) Monthly or less
  • (2) 2-4 times a month
  • (3) 2-3 times a week
  • (4) 4 or more times a week
Q2. How many drinks containing alcohol do you have on a typical day when you are drinking?
  • (0) 1 or 2
  • (1) 3 or 4
  • (2) 5 or 6
  • (3) 7, 8, or 9
  • (4) 10 or more
Q3. How often do you have six or more drinks on one occasion?
  • (0) Never
  • (1) Less than monthly
  • (2) Monthly
  • (3) Weekly
  • (4) Daily or almost daily
Skip to Q9 and Q10 if total score for Q2 + Q3 = 0

Domain 2: Dependence Symptoms (Questions 4-6)

Q4. How often during the past year have you found that you were not able to stop drinking once you had started?
  • (0) Never / (1) Less than monthly / (2) Monthly / (3) Weekly / (4) Daily or almost daily
Q5. How often during the past year have you failed to do what was normally expected from you because of drinking?
  • (0) Never / (1) Less than monthly / (2) Monthly / (3) Weekly / (4) Daily or almost daily
Q6. How often during the past year have you needed a first drink in the morning to get yourself going after a heavy drinking session?
  • (0) Never / (1) Less than monthly / (2) Monthly / (3) Weekly / (4) Daily or almost daily

Domain 3: Harmful Alcohol Use (Questions 7-10)

Q7. How often during the past year have you had a feeling of guilt or remorse after drinking?
  • (0) Never / (1) Less than monthly / (2) Monthly / (3) Weekly / (4) Daily or almost daily
Q8. How often during the past year have you been unable to remember what happened the night before because you had been drinking?
  • (0) Never / (1) Less than monthly / (2) Monthly / (3) Weekly / (4) Daily or almost daily
Q9. Have you or someone else been injured as a result of your drinking?
  • (0) No
  • (2) Yes, but not in the past year
  • (4) Yes, during the past year
Q10. Has a relative, friend, doctor, or other health worker been concerned about your drinking or suggested you cut down?
  • (0) No
  • (2) Yes, but not in the past year
  • (4) Yes, during the past year

Score Interpretation

ScoreInterpretationAction
0-7Low-risk / abstainerReinforce safe use
8-15Hazardous drinkingSimple brief advice to reduce drinking
16-19Harmful drinkingBrief counseling + continued monitoring
≥20Likely alcohol dependenceFull diagnostic evaluation warranted
  • Textbook of Family Medicine 9e, p. 1351-1352
  • Kaplan & Sadock's Comprehensive Textbook of Psychiatry, p. 3370

AUDIT-C (Abbreviated Version)

The AUDIT-C consists of only questions 1, 2, and 3 (the consumption domain). Score range = 0-12.
  • Positive screen (general adults): ≥3 for women, ≥4 for men
  • Positive screen (older adults ≥65 years): ≥2 suggests need for further assessment
  • It accounts for most of the AUDIT's discriminative power in medical populations

Comparison with Other Screening Tools

ToolQuestionsTimeBest Use
AUDIT10~5 minPrimary care, general population, early detection
AUDIT-C3~1 minQuick consumption screen, elderly
CAGE4~1 minHigh specificity for dependence; misses early hazardous use
MAST25~5-10 minHigher predictive value; harder to administer
SMAST-G10~5 minSpecifically validated for older adults
TWEAK5~2 minObstetric/perinatal screening; score ≥2 = risk drinker

Clinical Pearls

  • AUDIT sensitivity at threshold ≥8 is high (especially in men); using ≥10 increases specificity but reduces sensitivity. Less stringent cutoffs may perform better for women and adolescents.
  • Biological markers can complement AUDIT screening: MCV >100 fL, AST > ALT, GGT elevated (by 5 drinks/day for 2 weeks), and carbohydrate-deficient transferrin (CDT) >1.7% saturation.
  • In the ED setting, AUDIT and AUDIT-C have superior sensitivity and specificity among short alcohol screening tools (alongside SASQ - Single Alcohol Screening Question).
  • A negative response to drinking questions does not rule out AUD - the patient may have had to quit due to alcohol problems.
  • The JAMA 2024 Rational Clinical Examination systematic review (PMID 38592385) provides updated evidence on clinical features and screening tools for diagnosing alcohol use disorder.

USPSTF Recommendation

The US Preventive Services Task Force recommends screening all adults for alcohol misuse annually using one of three tools: the 10-question AUDIT, the 3-question AUDIT-C, or the single-question SASQ.
  • Symptom to Diagnosis: An Evidence-Based Guide, 4th Edition, p. 11440

Op induce polyneuropaghy

Finding Sources
Finding Sources
Finding Sources
Finding Sources
Searching PubMed

organophosphate induced polyneuropathy OPIDN

Reading File
Reading File
Finding Sources
Reading File
Reading File
Finding Sources
Reading File
Reading File
Excellent - I now have comprehensive textbook content. Here is the full answer:

Organophosphate-Induced Delayed Polyneuropathy (OPIDN)

Definition

OPIDN is a delayed peripheral (and sometimes central) axonopathy that occurs after exposure to certain organophosphate (OP) compounds, presenting 1-3 weeks after acute poisoning, even in the absence of prior cholinergic toxicity. It is distinct from the acute cholinergic crisis and the intermediate syndrome.
  • Bradley and Daroff's Neurology in Clinical Practice, p. 1195
  • Tietz Textbook of Laboratory Medicine, 7th Ed., p. 1506

Three Neurological Syndromes of OP Poisoning

SyndromeOnsetMechanismKey Features
Acute Cholinergic CrisisMinutes-hoursAChE inhibition → ACh accumulationSLUDGE, miosis, bronchospasm, seizures, coma
Intermediate Syndrome24-96 hrs after cholinergic resolutionExcessive nicotinic receptor stimulation; possible redistribution of lipophilic OPs from adiposeProximal limb weakness, neck flexors, cranial nerve palsies, respiratory muscle paralysis (potentially fatal)
OPIDN1-3 weeks after exposureNTE inhibition + "aging"Distal sensorimotor polyneuropathy; no respiratory muscle involvement

Pathophysiology

The mechanism of OPIDN is not related to AChE inhibition. Two main processes are involved:
  1. Neuropathy Target Esterase (NTE) inhibition: OPs phosphorylate and inhibit NTE, an axonal membrane enzyme present in essentially all neurons. The exact physiological role of NTE is uncertain, but its inhibition triggers axonal degeneration.
  2. "Aging" of inhibited NTE: Subsequent dealkylation locks the phosphoryl-NTE bond irreversibly. The degree of "aging" correlates with the severity of neuropathy.
  3. Alternative pathway: Phosphorylation and activation of a Ca²⁺/calmodulin kinase may enhance proteolysis of neuronal cytoskeletal proteins, causing structural changes in neurofilaments and impaired axonal transport.
  • Katzung's Basic and Clinical Pharmacology, 16th Ed., p. 848
  • Bradley and Daroff's Neurology in Clinical Practice, p. 1196

Causative Agents

Not all OPs cause OPIDN - only those that strongly inhibit NTE:
  • Tri-ortho cresyl phosphate (TOCP) - the classic prototype; additive in lubricating oils. Caused mass epidemics from contaminated illicit alcohol ("Jake leg" paralysis)
  • Leptophos
  • Trichlorfon
  • Mipafox
  • Military nerve agents (sarin, soman, tabun, VX) - at high doses
Note: There is no evidence that peripheral nerve dysfunction follows prolonged low-level OP exposure.

Clinical Features

Prodrome (if acute poisoning preceded):
  • Typical cholinergic crisis symptoms (nausea, salivation, lacrimation, diarrhea, bradycardia)
OPIDN symptoms (1-3 weeks later):
  • Paresthesias in the feet and calf cramps (early)
  • Progressive distal weakness spreading proximally
  • Maximal deficit within 2 weeks of onset
  • Quadriplegia in severe cases
  • Sensory deficits on clinical examination (despite inconspicuous sensory complaints)
  • Loss of Achilles reflex; other tendon reflexes depressed
  • Cranial nerve function is typically spared
  • Respiratory muscles NOT affected (unlike intermediate syndrome)
Late / Upper Motor Neuron signs:
  • As peripheral neuropathy partially improves, pyramidal (UMN) signs become unmasked (spasticity, brisk reflexes) - reflecting concurrent spinal cord involvement (myelopathy). This determines functional prognosis.

Electrodiagnostic Findings

  • Pattern: Axonopathy (not demyelinating)
  • Partial denervation of affected muscles
  • Small compound muscle action potentials (CMAPs)
  • Normal or only minimally reduced maximal motor conduction velocity

Prognosis

SeverityOutcome
Mild OPIDN (neuropathy only)Good recovery after removal of exposure
Severe OPIDN (with myelopathy / UMN involvement)Generally poor prognosis - UMN findings determine functional recovery
  • Frameworks for Internal Medicine, p. 548

Treatment

  • No specific treatment exists to arrest progression or hasten recovery
  • Supportive care and physiotherapy
  • For the acute cholinergic phase (if present): Atropine (muscarinic effects) + Pralidoxime (reactivates AChE before aging occurs) + Benzodiazepines (seizures) + ventilatory support
  • Pralidoxime has no effect on OPIDN once aging has occurred

Key Distinguishing Points

  • OPIDN is caused by NTE inhibition, not AChE inhibition
  • Onset is delayed 1-3 weeks (not immediate)
  • Respiratory muscles spared (unlike intermediate syndrome)
  • Electrophysiology shows axonopathy, not demyelination
  • Co-existing central cord involvement (myelopathy) worsens prognosis
  • Classic historical cause: contaminated ginger extract ("Jake") with TOCP during Prohibition era, causing thousands of cases of "Jake leg" paralysis

What is the intermediate syndrome of organophosphate poisoning?

Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
All the key information is now available. Here is the complete answer:

Intermediate Syndrome (IMS) of Organophosphate Poisoning

Definition & Timing

The intermediate syndrome is a neuromuscular complication of organophosphate (OP) poisoning that occurs between the acute cholinergic crisis and the development of delayed polyneuropathy (OPIDN). It typically becomes manifest within 1-5 days (most sources say 24-96 hours) after acute exposure and usually resolves within 7 days to 2-3 weeks.
It is reported in up to 40% of patients following OP ingestion.
  • Tintinalli's Emergency Medicine, p. 1343
  • Bradley and Daroff's Neurology in Clinical Practice, p. 1199

Position Among the Four OP Syndromes

SyndromeOnsetDuration
Acute cholinergic crisisMinutes to hoursHours to days
Intermediate syndrome1-5 days~7 days to 2-3 weeks
Chronic toxicityWeeks (repeated exposure)Variable
OPIDN1-3 weeksMonths; often permanent

Mechanism

The exact mechanism is not fully established, but it is primarily due to:
  • Excessive nicotinic receptor stimulation at the neuromuscular junction (NMJ) - distinct from the muscarinic effects seen in the acute phase
  • Neuromuscular transmission failure - progressive decrement in NMJ transmission efficiency
  • Prolonged AChE inhibition - symptoms correlate with severity of poisoning and duration of AChE suppression
  • In lipophilic OPs: possible redistribution from adipose tissue back into circulation after apparent clinical resolution, causing re-emergence of toxicity and inadequate oxime therapy
Importantly, IMS reflects nicotinic (not muscarinic) excess. Signs of cholinergic excess (SLUDGE) are absent during IMS.
  • Katzung's Basic and Clinical Pharmacology, 16th Ed., p. 1930
  • Bradley and Daroff's Neurology in Clinical Practice, p. 1199

Clinical Features

The hallmarks are weakness of specific muscle groups (no SLUDGE features):

Muscle Groups Affected (in order of clinical importance):

Muscle GroupClinical Consequence
Respiratory musclesVentilatory failure - the main cause of death
Neck flexorsInability to raise head from pillow
Proximal limb musclesProximal > distal weakness of arms and legs
Cranial nerve-innervated musclesFacial weakness, diplopia, dysphagia, dysarthria

Key Negative Features:

  • No salivation, lacrimation, miosis, or bradycardia (muscarinic signs absent)
  • No sensory disturbance (distinguishes it from OPIDN)
  • Nerve gas poisoning has not been reported to cause IMS

Diagnosis

  • Primarily clinical - based on history and the timing of muscle weakness after OP exposure
  • EMG may assist: shows a decremental response on repetitive nerve stimulation - reflecting NMJ transmission failure (pattern similar to myasthenic syndromes)
  • The diagnosis is often missed because:
    • The patient may have appeared to recover from the cholinergic crisis
    • IMS may be misattributed to inadequate atropine dosing (but atropine does not treat IMS)

Why It Is Dangerous

"Because organophosphorus poisoning frequently occurs in less developed parts of the world where medical resources are very limited, the development of the intermediate syndrome is frequently a lethal complication."
  • Katzung's Basic and Clinical Pharmacology, 16th Ed., p. 1930
The key danger is respiratory muscle paralysis leading to cardiorespiratory failure. Patients who develop IMS are at great risk of death and may require mechanical ventilation.

Treatment

  • No specific antidote for IMS; it is not effectively treated with the standard OP management protocol (atropine + pralidoxime)
  • Atropine only treats muscarinic effects - it has no effect on nicotinic/NMJ dysfunction
  • Pralidoxime may help if given early (before AChE aging), but by the time IMS develops, aging may already have occurred
  • Mechanical ventilation is the mainstay - early aggressive respiratory support is critical
  • Early antidote therapy and supportive measures at the acute stage may prevent or reduce IMS severity
  • Symptoms resolve spontaneously within ~7 days with adequate respiratory support

Comparison: IMS vs OPIDN

FeatureIntermediate SyndromeOPIDN
Onset1-5 days1-3 weeks
MechanismNicotinic NMJ failureNTE inhibition
Respiratory involvementYes - potentially fatalNo
Sensory featuresNoYes (paresthesias)
PatternProximal > distalDistal > proximal
UMN signsNoYes (late, if myelopathy)
PrognosisRecovers in ~1 week with ventilationVariable; may be permanent
Nerve gas causes it?Not reportedYes (high dose)

Write a brief note on pathophysiology of neuropathic pain

Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Loading Image
Loading Image

Pathophysiology of Neuropathic Pain

Definition

Neuropathic pain is pain that arises from damage to, or dysfunction of, any part of the peripheral or central somatosensory nervous system - as opposed to nociceptive pain, which results from activation of pain fibers by a relevant noxious stimulus. It is characterized clinically by spontaneous pain, allodynia (pain from non-painful stimuli), and hyperalgesia (exaggerated pain from painful stimuli).
  • Stahl's Essential Psychopharmacology, p. 398
  • Goldman-Cecil Medicine, p. 268

Mechanisms - Overview

Neuropathic pain arises from three broad, overlapping mechanisms:
  1. Peripheral sensitization
  2. Central sensitization (segmental and suprasegmental)
  3. Loss of descending inhibitory control

1. Peripheral Sensitization

After nerve injury or disease, normal transduction and conduction in primary afferent neurons is hijacked to maintain nociceptive signaling in the absence of a relevant stimulus:
  • Ectopic discharge: Injured afferent neurons and dorsal root ganglion (DRG) cells fire spontaneously, generating pain without a peripheral trigger
  • Ion channel upregulation: Increased expression of voltage-gated sodium channels (Nav1.3, Nav1.7, Nav1.8) and TRP channels (e.g., TRPV1) lowers firing threshold
  • Cross-talk (ephaptic transmission): Damaged neurons allow abnormal electrical coupling between adjacent neurons - A-fibers (touch) can activate C-fiber pain pathways
  • Neuroinflammation: Damaged neurons and surrounding macrophages/mast cells release prostaglandins, bradykinin, substance P, CGRP, and cytokines (IL-1β, TNF-α), which sensitize nociceptors and lower their activation threshold
The sensitized primary afferent bombards the spinal cord with continuous impulses, setting the stage for central changes.
  • Katzung's Basic and Clinical Pharmacology, 16th Ed.

2. Central Sensitization

A. Segmental (Spinal Cord / Dorsal Horn) Sensitization

Repeated or prolonged afferent input produces hyperexcitability of dorsal horn neurons:
  • NMDA receptor activation: Persistent glutamate release from primary afferents activates NMDA receptors (normally blocked by Mg²⁺ at rest). This causes Ca²⁺ influx, triggering intracellular signaling cascades (PKC, CaM kinase) that phosphorylate ion channels and lower the threshold of dorsal horn neurons
  • Wind-up: Repeated C-fiber stimulation progressively increases dorsal horn neuron discharge - each stimulus produces a greater response than the last
  • Loss of inhibitory interneurons: GABAergic and glycinergic interneurons normally dampen pain transmission. Their degeneration ("disinhibition") amplifies the signal. This also unmasks A-fiber (touch) input to pain-projecting neurons - the structural basis of allodynia
  • Loss of large fiber inhibition (Gate Control Theory): Normally, Aβ fibers (tactile) activate inhibitory interneurons that suppress C-fiber pain signals. When large fibers are damaged, this gate is lost
  • Glial activation: Microglia and astrocytes release pro-inflammatory mediators (TNF-α, IL-6, NO) that further enhance synaptic excitability

B. Suprasegmental (Brain) Sensitization

The brain "learns" from persistent pain and undergoes plastic changes in the thalamus and cortex:
  • Thalamic relay neurons become hyperexcitable (deafferentation hyperactivity)
  • Reorganization of cortical maps (somatosensory cortex) can generate pain in regions distant from the original injury (e.g., phantom limb pain)
  • The brain may maintain pain pathways autonomously, even without ongoing peripheral input - underlying conditions like fibromyalgia
"It is as though the brain has learned from its experience of pain, and decides not only to keep the process going, but also to enhance it and make it permanent."
  • Stahl's Essential Psychopharmacology, p. 400
Segmental central sensitization diagram showing peripheral input driving dorsal horn sensitization in conditions such as diabetic neuropathic pain and shingles

3. Loss of Descending Inhibitory Control

The brain normally sends descending inhibitory signals to the dorsal horn via noradrenergic and serotonergic pathways (from the periaqueductal grey / locus coeruleus / raphe nuclei), which suppress pain transmission. In neuropathic states:
  • Descending inhibition is reduced or overwhelmed by facilitation
  • The balance shifts toward descending facilitation, amplifying spinal pain signals
  • This is the basis for using SNRIs (duloxetine, venlafaxine) and TCAs in neuropathic pain - they enhance noradrenergic and serotonergic descending inhibition

Key Neurotransmitters at the Dorsal Horn

Dorsal horn neurotransmitter interactions showing primary afferent, interneuron, projection neuron, and descending neuron
TransmitterReceptorRole
GlutamateAMPA-R, NMDA-RExcitatory; NMDA activation drives central sensitization
Substance P / CGRPNK1, NK2, NK3; CGRP-RSlow excitatory; neurogenic inflammation
GABA / GlycineGABA-A/BInhibitory; loss causes disinhibition
Endorphinsμ-opioid receptorInhibitory; analgesic
Norepinephrineα₂-adrenoceptorsDescending inhibition
Serotonin5HT1B/D (inhibitory), 5HT3 (excitatory)Dual role - net inhibitory
  • Stahl's Essential Psychopharmacology, p. 399

Summary Diagram of Mechanisms

Nerve injury / disease
        ↓
PERIPHERAL SENSITIZATION
• Ectopic discharge (DRG, injured axon)
• Ion channel upregulation (Nav1.7, Nav1.8, TRPV1)
• Neuroinflammation (PGE2, bradykinin, cytokines)
• Ephaptic cross-talk
        ↓
Sustained afferent barrage → Dorsal Horn
        ↓
CENTRAL SENSITIZATION (Segmental)
• NMDA activation → Ca²⁺ influx → Wind-up
• Loss of GABAergic inhibitory interneurons
• Microglial/astrocyte activation
• A-fiber pain signaling (allodynia)
        ↓
SUPRASEGMENTAL SENSITIZATION
• Thalamic/cortical reorganization
• Self-sustaining pain without peripheral input
        +
LOSS OF DESCENDING INHIBITION
• Reduced NE/5HT inhibitory tone
• Descending facilitation predominates
        ↓
NEUROPATHIC PAIN
(Burning, allodynia, hyperalgesia, spontaneous pain)

Clinical Correlates

SymptomUnderlying Mechanism
Spontaneous burning painEctopic discharge from injured afferents
Allodynia (touch causes pain)Loss of GABAergic gate + A-fiber rewiring to pain pathways
HyperalgesiaPeripheral + central sensitization lowers threshold
Paroxysmal shooting painEctopic bursts from DRG/demyelinated axons
HyperpathiaWind-up in dorsal horn
Phantom limb painDeafferentation + cortical reorganization

Create a visual comparison of nociceptive vs neuropathic pain

Generating Image

A detailed medical educational infographic comparing nociceptive pain vs neuropathic pain side by side. Split layout with two columns. Left column titled "NOCICEPTIVE PAIN" with a warm orange/red color scheme, right column titled "NEUROPATHIC PAIN" with a blue/purple color scheme. Each column includes sections for: Definition, Mechanism (with a small anatomical illustration - left showing tissue injury with nociceptor activation, right showing damaged nerve with ectopic discharge), Cause/Etiology, Quality of Pain, Clinical Features, Examples, and Treatment Targets. Include icons: flame for nociceptive, lightning bolt for neuropathic. At the bottom, a shared row showing how they can overlap as "Mixed Pain". Clean white background, medical illustration style, clearly readable text labels, professional clinical reference card format.

Nociceptive vs Neuropathic Pain Comparison
Here is a summary of the key differences shown in the visual:

Nociceptive vs Neuropathic Pain - At a Glance

FeatureNociceptive Pain 🔥Neuropathic Pain ⚡
DefinitionPain from activation of nociceptors by actual/threatened tissue damagePain from damage or dysfunction of the somatosensory nervous system itself
Nervous systemIntactDamaged or dysfunctional
MechanismNociceptor stimulation → normal pain signalEctopic discharge, peripheral/central sensitization, disinhibition
QualityAching, throbbing, sharp, well-localizedBurning, shooting, stabbing, electric, often poorly localized
Spontaneous painAbsent (pain = stimulus)Present - pain without stimulus
AllodyniaAbsentPresent (touch causes pain)
HyperalgesiaMild, proportionateDisproportionate
ExamplesFracture, surgical wound, arthritis, visceral painDiabetic neuropathy, postherpetic neuralgia, phantom limb, trigeminal neuralgia
Response to NSAIDs/opioidsGoodPartial/poor
Key treatmentsNSAIDs, paracetamol, opioidsAnticonvulsants (gabapentin, pregabalin), TCAs, SNRIs, topical agents
Resolves with healing?Usually yesOften persists independently

Mixed Pain

Many conditions involve both types simultaneously - e.g., low back pain with radiculopathy, cancer pain, post-surgical pain. Treatment must address both components.

Give me pdf off all topics we discuss here separately

Reading File
Running Command

mkdir -p /tmp/workspace/medical-notes-pdfs && ls /tmp/workspace/

Running Command

cat << 'PYEOF' > /tmp/workspace/medical-notes-pdfs/make_pdf1_audit.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 from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, HRFlowable from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY doc = SimpleDocTemplate( "/tmp/workspace/medical-notes-pdfs/1_AUDIT_Alcohol_Screening.pdf", pagesize=A4, rightMargin=2*cm, leftMargin=2*cm, topMargin=2*cm, bottomMargin=2*cm ) styles = getSampleStyleSheet() W = A4[0] - 4*cm # Custom styles title_style = ParagraphStyle('Title', parent=styles['Title'], fontSize=20, textColor=colors.HexColor('#1a237e'), spaceAfter=6, alignment=TA_CENTER) subtitle_style = ParagraphStyle('Sub', parent=styles['Normal'], fontSize=11, textColor=colors.HexColor('#5c6bc0'), spaceAfter=10, alignment=TA_CENTER) h1_style = ParagraphStyle('H1', parent=styles['Heading1'], fontSize=14, textColor=colors.HexColor('#1a237e'), spaceBefore=14, spaceAfter=4, borderPad=4, backColor=colors.HexColor('#e8eaf6'), leading=18) h2_style = ParagraphStyle('H2', parent=styles['Heading2'], fontSize=12, textColor=colors.HexColor('#283593'), spaceBefore=8, spaceAfter=4) body_style = ParagraphStyle('Body', parent=styles['Normal'], fontSize=10, leading=14, spaceAfter=4, alignment=TA_JUSTIFY) bullet_style = ParagraphStyle('Bullet', parent=styles['Normal'], fontSize=10, leading=14, spaceAfter=3, leftIndent=14, bulletIndent=4) footer_style = ParagraphStyle('Footer', parent=styles['Normal'], fontSize=8, textColor=colors.grey, alignment=TA_CENTER) note_style = ParagraphStyle('Note', parent=styles['Normal'], fontSize=9, textColor=colors.HexColor('#b71c1c'), leading=13, borderPad=6, backColor=colors.HexColor('#ffebee'), leftIndent=8) story = [] # Header story.append(Paragraph("AUDIT", title_style)) story.append(Paragraph("Alcohol Use Disorders Identification Test", subtitle_style)) story.append(HRFlowable(width=W, thickness=2, color=colors.HexColor('#1a237e'))) story.append(Spacer(1, 8)) # Overview story.append(Paragraph("Overview", h1_style)) story.append(Paragraph( "The AUDIT was developed by the <b>World Health Organization (WHO) in the late 1980s</b> as a brief " "screening instrument for the early detection of <b>hazardous</b> (risk of harm) and <b>harmful</b> " "(presence of harm) alcohol use across a variety of clinical settings. It takes less than 5 minutes " "to administer and requires no professional training. It focuses on drinking patterns in the <b>past year</b>.", body_style)) story.append(Spacer(1, 4)) # Key facts box kf_data = [ ['Items', 'Score Range', 'Time', 'Focus Period'], ['10 questions', '0 – 40', '< 5 minutes', 'Past 12 months'], ] kf_table = Table(kf_data, colWidths=[W/4]*4) kf_table.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#1a237e')), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 10), ('ALIGN', (0,0), (-1,-1), 'CENTER'), ('VALIGN', (0,0), (-1,-1), 'MIDDLE'), ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#e8eaf6'), colors.white]), ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#9fa8da')), ('TOPPADDING', (0,0), (-1,-1), 5), ('BOTTOMPADDING', (0,0), (-1,-1), 5), ])) story.append(kf_table) story.append(Spacer(1, 10)) # The 10 Questions story.append(Paragraph("The 10 AUDIT Questions", h1_style)) story.append(Paragraph("<b>Domain 1: Alcohol Consumption (Questions 1–3)</b>", h2_style)) q_data = [ ['Q', 'Question', 'Answer Options (Score)'], ['1', 'How often do you have a drink containing alcohol?', '(0) Never (1) Monthly or less\n(2) 2–4×/month (3) 2–3×/week (4) ≥4×/week'], ['2', 'How many drinks on a typical drinking day?', '(0) 1–2 (1) 3–4 (2) 5–6 (3) 7–9 (4) ≥10'], ['3', 'How often do you have ≥6 drinks on one occasion?', '(0) Never (1) <monthly (2) Monthly (3) Weekly (4) Daily'], ] q_table = Table(q_data, colWidths=[1*cm, 7*cm, W - 8*cm]) q_table.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#3949ab')), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 9), ('ALIGN', (0,0), (0,-1), 'CENTER'), ('VALIGN', (0,0), (-1,-1), 'TOP'), ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#e8eaf6'), colors.white]), ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#9fa8da')), ('TOPPADDING', (0,0), (-1,-1), 5), ('BOTTOMPADDING', (0,0), (-1,-1), 5), ('LEFTPADDING', (0,0), (-1,-1), 5), ])) story.append(q_table) story.append(Paragraph("→ Skip to Q9 and Q10 if total score for Q2 + Q3 = 0", note_style)) story.append(Spacer(1, 6)) story.append(Paragraph("<b>Domain 2: Dependence Symptoms (Questions 4–6)</b>", h2_style)) dep_data = [ ['Q', 'Question'], ['4', 'How often in the past year were you unable to stop drinking once you had started?'], ['5', 'How often in the past year have you failed to do what was normally expected because of drinking?'], ['6', 'How often in the past year have you needed a morning drink to get going after heavy drinking?'], ] dep_table = Table(dep_data, colWidths=[1*cm, W - 1*cm]) dep_table.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#5c6bc0')), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 9), ('ALIGN', (0,0), (0,-1), 'CENTER'), ('VALIGN', (0,0), (-1,-1), 'TOP'), ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#e8eaf6'), colors.white]), ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#9fa8da')), ('TOPPADDING', (0,0), (-1,-1), 5), ('BOTTOMPADDING', (0,0), (-1,-1), 5), ('LEFTPADDING', (0,0), (-1,-1), 5), ])) story.append(dep_table) story.append(Paragraph("Each scored: (0) Never (1) &lt;monthly (2) Monthly (3) Weekly (4) Daily or almost daily", bullet_style)) story.append(Spacer(1, 6)) story.append(Paragraph("<b>Domain 3: Harmful Alcohol Use (Questions 7–10)</b>", h2_style)) harm_data = [ ['Q', 'Question', 'Special Scoring'], ['7', 'How often in the past year have you felt guilty or remorseful after drinking?', '0–4 scale'], ['8', 'How often in the past year were you unable to remember what happened the night before?', '0–4 scale'], ['9', 'Have you or someone else been injured as a result of your drinking?', '(0) No (2) Yes, not past year (4) Yes, past year'], ['10', 'Has a relative/friend/doctor been concerned about your drinking or suggested cutting down?', '(0) No (2) Yes, not past year (4) Yes, past year'], ] harm_table = Table(harm_data, colWidths=[1*cm, 8*cm, W - 9*cm]) harm_table.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#7986cb')), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 9), ('ALIGN', (0,0), (0,-1), 'CENTER'), ('VALIGN', (0,0), (-1,-1), 'TOP'), ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#e8eaf6'), colors.white]), ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#9fa8da')), ('TOPPADDING', (0,0), (-1,-1), 5), ('BOTTOMPADDING', (0,0), (-1,-1), 5), ('LEFTPADDING', (0,0), (-1,-1), 5), ])) story.append(harm_table) story.append(Spacer(1, 10)) # Score Interpretation story.append(Paragraph("Score Interpretation", h1_style)) score_data = [ ['Score', 'Category', 'Interpretation', 'Action'], ['0 – 7', 'Low-risk', 'Safe/abstinent use', 'Reinforce safe drinking behaviour'], ['8 – 15', 'Hazardous', 'Risk of harm exists', 'Simple brief advice to reduce drinking'], ['16 – 19', 'Harmful', 'Harm is occurring', 'Brief counselling + continued monitoring'], ['≥ 20', 'Dependence', 'Likely alcohol dependence', 'Full diagnostic evaluation warranted'], ] score_table = Table(score_data, colWidths=[1.8*cm, 3*cm, 5*cm, W - 9.8*cm]) score_table.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#1a237e')), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 9), ('ALIGN', (0,0), (1,-1), 'CENTER'), ('VALIGN', (0,0), (-1,-1), 'MIDDLE'), ('BACKGROUND', (0,1), (-1,1), colors.HexColor('#c8e6c9')), ('BACKGROUND', (0,2), (-1,2), colors.HexColor('#fff9c4')), ('BACKGROUND', (0,3), (-1,3), colors.HexColor('#ffe0b2')), ('BACKGROUND', (0,4), (-1,4), colors.HexColor('#ffcdd2')), ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#9fa8da')), ('TOPPADDING', (0,0), (-1,-1), 6), ('BOTTOMPADDING', (0,0), (-1,-1), 6), ('LEFTPADDING', (0,0), (-1,-1), 6), ('FONTNAME', (0,1), (0,-1), 'Helvetica-Bold'), ])) story.append(score_table) story.append(Spacer(1, 10)) # AUDIT-C story.append(Paragraph("AUDIT-C (Abbreviated Version)", h1_style)) story.append(Paragraph( "The <b>AUDIT-C</b> uses only Questions 1, 2, and 3. Score range: <b>0–12</b>. " "It accounts for most of the AUDIT's discriminative power in medical populations.", body_style)) auditc_data = [ ['Population', 'Positive Screen Threshold'], ['General adults – Men', '≥ 4'], ['General adults – Women', '≥ 3'], ['Older adults (≥ 65 years)', '≥ 2 (suggests further assessment)'], ] auditc_table = Table(auditc_data, colWidths=[W/2, W/2]) auditc_table.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#5c6bc0')), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 10), ('ALIGN', (0,0), (-1,-1), 'CENTER'), ('VALIGN', (0,0), (-1,-1), 'MIDDLE'), ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#e8eaf6'), colors.white]), ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#9fa8da')), ('TOPPADDING', (0,0), (-1,-1), 5), ('BOTTOMPADDING', (0,0), (-1,-1), 5), ])) story.append(auditc_table) story.append(Spacer(1, 10)) # Comparison table story.append(Paragraph("Comparison of Alcohol Screening Tools", h1_style)) comp_data = [ ['Tool', 'Items', 'Time', 'Best Use'], ['AUDIT', '10', '~5 min', 'Primary care; early hazardous/harmful detection'], ['AUDIT-C', '3', '~1 min', 'Quick consumption screen; elderly'], ['CAGE', '4', '~1 min', 'High specificity for dependence; misses early use'], ['MAST', '25', '~10 min', 'Higher predictive value; harder to administer'], ['SMAST-G', '10', '~5 min', 'Validated specifically for older adults'], ['TWEAK', '5', '~2 min', 'Obstetric/perinatal screening; score ≥2 = risk'], ] comp_table = Table(comp_data, colWidths=[2.5*cm, 1.5*cm, 2*cm, W - 6*cm]) comp_table.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#1a237e')), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 9), ('ALIGN', (0,0), (2,-1), 'CENTER'), ('VALIGN', (0,0), (-1,-1), 'MIDDLE'), ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#e8eaf6'), colors.white]), ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#9fa8da')), ('TOPPADDING', (0,0), (-1,-1), 5), ('BOTTOMPADDING', (0,0), (-1,-1), 5), ('LEFTPADDING', (0,0), (-1,-1), 5), ])) story.append(comp_table) story.append(Spacer(1, 10)) # Clinical Pearls story.append(Paragraph("Clinical Pearls", h1_style)) pearls = [ "AUDIT sensitivity at threshold ≥8 is high (especially men). Use ≥10 for greater specificity. Lower cutoffs for women and adolescents.", "USPSTF recommends screening <b>all adults annually</b> using AUDIT, AUDIT-C, or single-question SASQ.", "A negative response to drinking questions does NOT rule out AUD - the patient may have had to quit due to alcohol problems.", "Biological markers complement AUDIT: MCV >100 fL, AST > ALT, GGT elevated, CDT >1.7% saturation.", "In the ED setting, AUDIT and AUDIT-C have superior sensitivity/specificity among brief alcohol screening tools.", ] for p in pearls: story.append(Paragraph(f"• {p}", bullet_style)) story.append(Spacer(1, 14)) story.append(HRFlowable(width=W, thickness=1, color=colors.HexColor('#9fa8da'))) story.append(Paragraph("Sources: Kaplan & Sadock's Comprehensive Textbook of Psychiatry | Textbook of Family Medicine 9e | Goldman-Cecil Medicine | Symptom to Diagnosis 4e", footer_style)) doc.build(story) print("PDF 1 created successfully.") PYEOF python3 /tmp/workspace/medical-notes-pdfs/make_pdf1_audit.py

Running Command

cat << 'PYEOF' > /tmp/workspace/medical-notes-pdfs/make_pdf2_opidn.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 from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, HRFlowable from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY doc = SimpleDocTemplate( "/tmp/workspace/medical-notes-pdfs/2_OPIDN_Organophosphate_Polyneuropathy.pdf", pagesize=A4, rightMargin=2*cm, leftMargin=2*cm, topMargin=2*cm, bottomMargin=2*cm ) styles = getSampleStyleSheet() W = A4[0] - 4*cm title_s = ParagraphStyle('T', parent=styles['Title'], fontSize=18, textColor=colors.HexColor('#1b5e20'), spaceAfter=4, alignment=TA_CENTER) sub_s = ParagraphStyle('S', parent=styles['Normal'], fontSize=11, textColor=colors.HexColor('#388e3c'), spaceAfter=10, alignment=TA_CENTER) h1_s = ParagraphStyle('H1', parent=styles['Heading1'], fontSize=13, textColor=colors.HexColor('#1b5e20'), spaceBefore=12, spaceAfter=4, backColor=colors.HexColor('#e8f5e9'), leading=18) h2_s = ParagraphStyle('H2', parent=styles['Heading2'], fontSize=11, textColor=colors.HexColor('#2e7d32'), spaceBefore=8, spaceAfter=3) body_s = ParagraphStyle('B', parent=styles['Normal'], fontSize=10, leading=14, spaceAfter=4, alignment=TA_JUSTIFY) bullet_s = ParagraphStyle('Bl', parent=styles['Normal'], fontSize=10, leading=13, spaceAfter=3, leftIndent=14) footer_s = ParagraphStyle('F', parent=styles['Normal'], fontSize=8, textColor=colors.grey, alignment=TA_CENTER) box_s = ParagraphStyle('Box', parent=styles['Normal'], fontSize=9, textColor=colors.HexColor('#b71c1c'), leading=13, backColor=colors.HexColor('#ffebee'), leftIndent=8, spaceAfter=6) code_s = ParagraphStyle('Code', parent=styles['Normal'], fontSize=9, leading=13, backColor=colors.HexColor('#f1f8e9'), leftIndent=12, spaceAfter=4, fontName='Courier') story = [] story.append(Paragraph("OPIDN", title_s)) story.append(Paragraph("Organophosphate-Induced Delayed Polyneuropathy", sub_s)) story.append(HRFlowable(width=W, thickness=2, color=colors.HexColor('#1b5e20'))) story.append(Spacer(1, 8)) story.append(Paragraph("Definition", h1_s)) story.append(Paragraph( "OPIDN is a <b>delayed peripheral (and sometimes central) axonopathy</b> that develops after exposure " "to certain organophosphate (OP) compounds. It presents <b>1–3 weeks after acute exposure</b>, " "even in the absence of prior cholinergic toxicity, and is entirely distinct from both the acute " "cholinergic crisis and the intermediate syndrome.", body_s)) story.append(Paragraph("Three Neurological Syndromes of OP Poisoning", h1_s)) syn_data = [ ['Syndrome', 'Onset', 'Mechanism', 'Key Features'], ['Acute Cholinergic Crisis', 'Minutes–hours', 'AChE inhibition → ACh excess', 'SLUDGE, miosis, bronchospasm, seizures, coma'], ['Intermediate Syndrome', '24–96 hrs', 'Nicotinic receptor over-stimulation', 'Proximal weakness, cranial nerve palsies, respiratory paralysis (potentially fatal)'], ['OPIDN', '1–3 weeks', 'NTE inhibition + "aging"', 'Distal sensorimotor polyneuropathy; NO respiratory muscle involvement'], ] syn_table = Table(syn_data, colWidths=[3.5*cm, 2.5*cm, 4.5*cm, W-10.5*cm]) syn_table.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#1b5e20')), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 8.5), ('VALIGN', (0,0), (-1,-1), 'TOP'), ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#e8f5e9'), colors.white]), ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#a5d6a7')), ('TOPPADDING', (0,0), (-1,-1), 5), ('BOTTOMPADDING', (0,0), (-1,-1), 5), ('LEFTPADDING', (0,0), (-1,-1), 5), ('BACKGROUND', (0,3), (-1,3), colors.HexColor('#fff9c4')), ])) story.append(syn_table) story.append(Spacer(1, 8)) story.append(Paragraph("Pathophysiology", h1_s)) story.append(Paragraph("<b>NOT related to AChE inhibition.</b> Two main mechanisms:", body_s)) mech = [ "<b>1. NTE (Neuropathy Target Esterase) inhibition:</b> Certain OPs phosphorylate and inhibit NTE, an axonal membrane enzyme present in essentially all neurons. Its inhibition triggers axonal degeneration.", '<b>2. "Aging" of inhibited NTE:</b> Dealkylation locks the phosphoryl-NTE bond irreversibly. Aging must occur for full neuropathy to develop - degree of aging correlates with severity.', "<b>3. Alternative pathway:</b> Phosphorylation/activation of Ca²⁺/calmodulin kinase → enhanced proteolysis of neuronal cytoskeletal proteins → structural changes in neurofilaments → impaired axonal transport.", ] for m in mech: story.append(Paragraph(f"• {m}", bullet_s)) story.append(Spacer(1, 6)) story.append(Paragraph("Causative Agents", h1_s)) story.append(Paragraph("Not all OPs cause OPIDN - only those that strongly inhibit NTE:", body_s)) agents = ["Tri-ortho cresyl phosphate (TOCP) - prototype; caused mass 'Jake leg' paralysis epidemics from contaminated illicit alcohol", "Leptophos", "Trichlorfon", "Mipafox", "Military nerve agents (sarin, soman, tabun, VX) - at high doses"] for a in agents: story.append(Paragraph(f"• {a}", bullet_s)) story.append(Paragraph("⚠ No evidence that prolonged LOW-LEVEL OP exposure causes peripheral neuropathy.", box_s)) story.append(Paragraph("Clinical Features", h1_s)) story.append(Paragraph("<b>Early (1–3 weeks post-exposure):</b>", h2_s)) early = ["Paresthesias in the feet and calf cramps", "Progressive distal weakness spreading proximally", "Maximal deficit within 2 weeks of onset", "Quadriplegia in severe cases", "Sensory deficits on examination (despite inconspicuous complaints)", "Loss of Achilles reflex; other tendon reflexes depressed", "Cranial nerve function typically SPARED", "Respiratory muscles NOT affected"] for e in early: story.append(Paragraph(f"• {e}", bullet_s)) story.append(Paragraph("<b>Late (Upper Motor Neuron signs):</b>", h2_s)) story.append(Paragraph( "As peripheral neuropathy partially improves, <b>pyramidal (UMN) signs become unmasked</b> " "(spasticity, brisk reflexes) - reflecting concurrent spinal cord involvement (myelopathy). " "This determines functional prognosis.", body_s)) story.append(Paragraph("Electrodiagnostic Findings", h1_s)) edx_data = [ ['Parameter', 'Finding'], ['Pattern', 'Axonopathy (NOT demyelinating)'], ['EMG', 'Partial denervation of affected muscles'], ['CMAPs', 'Small compound muscle action potentials'], ['Motor conduction velocity', 'Normal or only minimally reduced'], ] edx_table = Table(edx_data, colWidths=[W/2, W/2]) edx_table.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#2e7d32')), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 9.5), ('ALIGN', (0,0), (-1,-1), 'LEFT'), ('VALIGN', (0,0), (-1,-1), 'MIDDLE'), ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#e8f5e9'), colors.white]), ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#a5d6a7')), ('TOPPADDING', (0,0), (-1,-1), 5), ('BOTTOMPADDING', (0,0), (-1,-1), 5), ('LEFTPADDING', (0,0), (-1,-1), 8), ])) story.append(edx_table) story.append(Spacer(1, 8)) story.append(Paragraph("Prognosis", h1_s)) prog_data = [ ['Severity', 'Outcome'], ['Mild OPIDN (neuropathy only)', 'Good recovery after removal of exposure'], ['Severe OPIDN (with myelopathy / UMN involvement)', 'Generally POOR - UMN findings determine functional recovery'], ] prog_table = Table(prog_data, colWidths=[W/2, W/2]) prog_table.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#1b5e20')), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 9.5), ('BACKGROUND', (0,1), (-1,1), colors.HexColor('#c8e6c9')), ('BACKGROUND', (0,2), (-1,2), colors.HexColor('#ffcdd2')), ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#a5d6a7')), ('TOPPADDING', (0,0), (-1,-1), 6), ('BOTTOMPADDING', (0,0), (-1,-1), 6), ('LEFTPADDING', (0,0), (-1,-1), 8), ('VALIGN', (0,0), (-1,-1), 'MIDDLE'), ])) story.append(prog_table) story.append(Spacer(1, 8)) story.append(Paragraph("Treatment", h1_s)) tx = [ "<b>No specific treatment</b> exists to arrest progression or hasten recovery", "Supportive care and physiotherapy", "For acute cholinergic phase: <b>Atropine</b> (muscarinic) + <b>Pralidoxime</b> (reactivates AChE before aging) + <b>Benzodiazepines</b> (seizures) + ventilatory support", "Pralidoxime has NO effect on OPIDN once aging has occurred", "Lymphocyte NTE measurement can monitor occupational exposure and predict neuropathy", ] for t in tx: story.append(Paragraph(f"• {t}", bullet_s)) story.append(Spacer(1, 14)) story.append(HRFlowable(width=W, thickness=1, color=colors.HexColor('#a5d6a7'))) story.append(Paragraph("Sources: Bradley and Daroff's Neurology in Clinical Practice | Katzung's Basic and Clinical Pharmacology 16e | Tietz Textbook of Laboratory Medicine 7e | Frameworks for Internal Medicine", footer_s)) doc.build(story) print("PDF 2 created.") PYEOF python3 /tmp/workspace/medical-notes-pdfs/make_pdf2_opidn.py

Running Command

cat << 'PYEOF' > /tmp/workspace/medical-notes-pdfs/make_pdf3_ims.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 from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, HRFlowable from reportlab.lib.enums import TA_CENTER, TA_JUSTIFY doc = SimpleDocTemplate( "/tmp/workspace/medical-notes-pdfs/3_Intermediate_Syndrome_OP_Poisoning.pdf", pagesize=A4, rightMargin=2*cm, leftMargin=2*cm, topMargin=2*cm, bottomMargin=2*cm ) styles = getSampleStyleSheet() W = A4[0] - 4*cm title_s = ParagraphStyle('T', parent=styles['Title'], fontSize=18, textColor=colors.HexColor('#bf360c'), spaceAfter=4, alignment=TA_CENTER) sub_s = ParagraphStyle('S', parent=styles['Normal'], fontSize=11, textColor=colors.HexColor('#e64a19'), spaceAfter=10, alignment=TA_CENTER) h1_s = ParagraphStyle('H1', parent=styles['Heading1'], fontSize=13, textColor=colors.HexColor('#bf360c'), spaceBefore=12, spaceAfter=4, backColor=colors.HexColor('#fbe9e7'), leading=18) h2_s = ParagraphStyle('H2', parent=styles['Heading2'], fontSize=11, textColor=colors.HexColor('#d84315'), spaceBefore=8, spaceAfter=3) body_s = ParagraphStyle('B', parent=styles['Normal'], fontSize=10, leading=14, spaceAfter=4, alignment=TA_JUSTIFY) bullet_s = ParagraphStyle('Bl', parent=styles['Normal'], fontSize=10, leading=13, spaceAfter=3, leftIndent=14) footer_s = ParagraphStyle('F', parent=styles['Normal'], fontSize=8, textColor=colors.grey, alignment=TA_CENTER) warn_s = ParagraphStyle('W', parent=styles['Normal'], fontSize=9.5, textColor=colors.HexColor('#b71c1c'), leading=14, backColor=colors.HexColor('#ffebee'), leftIndent=8, spaceAfter=6, fontName='Helvetica-Bold') neg_s = ParagraphStyle('Neg', parent=styles['Normal'], fontSize=9.5, leading=14, backColor=colors.HexColor('#e3f2fd'), leftIndent=8, spaceAfter=6) story = [] story.append(Paragraph("Intermediate Syndrome (IMS)", title_s)) story.append(Paragraph("of Organophosphate Poisoning", sub_s)) story.append(HRFlowable(width=W, thickness=2, color=colors.HexColor('#bf360c'))) story.append(Spacer(1, 8)) story.append(Paragraph("Definition & Position", h1_s)) story.append(Paragraph( "The <b>Intermediate Syndrome</b> is a neuromuscular complication of organophosphate poisoning that occurs " "<b>between</b> the acute cholinergic crisis and OPIDN. It is caused primarily by <b>excessive nicotinic receptor " "stimulation</b> at the neuromuscular junction and progressive neuromuscular transmission failure. " "It occurs in up to <b>40% of patients</b> following OP ingestion.", body_s)) timeline_data = [ ['Syndrome', 'Onset', 'Duration', 'Main Risk'], ['Acute Cholinergic Crisis', 'Minutes–hours', 'Hours–days', 'Respiratory failure from bronchospasm'], ['INTERMEDIATE SYNDROME', '1–5 days', '~7 days–3 weeks', '⚠ RESPIRATORY MUSCLE PARALYSIS'], ['Chronic Toxicity', 'Weeks (repeated exposure)', 'Variable', 'Sensorimotor axonopathy'], ['OPIDN', '1–3 weeks', 'Months–permanent', 'Myelopathy; functional disability'], ] tl_table = Table(timeline_data, colWidths=[4*cm, 3*cm, 3*cm, W-10*cm]) tl_table.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#bf360c')), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 8.5), ('VALIGN', (0,0), (-1,-1), 'MIDDLE'), ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#fbe9e7'), colors.white]), ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#ffab91')), ('TOPPADDING', (0,0), (-1,-1), 5), ('BOTTOMPADDING', (0,0), (-1,-1), 5), ('LEFTPADDING', (0,0), (-1,-1), 5), ('BACKGROUND', (0,2), (-1,2), colors.HexColor('#ffccbc')), ('FONTNAME', (0,2), (-1,2), 'Helvetica-Bold'), ('TEXTCOLOR', (0,2), (-1,2), colors.HexColor('#bf360c')), ])) story.append(tl_table) story.append(Spacer(1, 8)) story.append(Paragraph("Pathophysiology", h1_s)) mech = [ "<b>Excessive nicotinic NMJ stimulation</b> - not related to muscarinic receptor stimulation (hence: no SLUDGE signs)", "<b>Neuromuscular transmission failure</b> - progressive decrement in NMJ transmission efficiency", "<b>Prolonged AChE inhibition</b> - severity correlates with duration of cholinesterase suppression", "<b>Lipophilic OP redistribution</b> from adipose tissue back into circulation after apparent clinical recovery, causing re-emergence of toxicity", ] for m in mech: story.append(Paragraph(f"• {m}", bullet_s)) story.append(Paragraph("⚠ IMS reflects NICOTINIC (not muscarinic) excess. Muscarinic signs (SLUDGE) are ABSENT during IMS.", warn_s)) story.append(Paragraph("Clinical Features", h1_s)) story.append(Paragraph("<b>Muscle groups affected (in order of clinical importance):</b>", h2_s)) muscle_data = [ ['Muscle Group', 'Clinical Consequence', 'Severity'], ['Respiratory muscles', 'Ventilatory failure - MAIN CAUSE OF DEATH', '⚠ Critical'], ['Neck flexors', 'Unable to raise head from pillow', 'Moderate'], ['Proximal limb muscles', 'Proximal > distal limb weakness', 'Moderate'], ['Cranial nerve muscles', 'Facial weakness, diplopia, dysphagia, dysarthria', 'Moderate'], ] m_table = Table(muscle_data, colWidths=[4*cm, 7*cm, W-11*cm]) m_table.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#d84315')), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 9), ('VALIGN', (0,0), (-1,-1), 'TOP'), ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#fbe9e7'), colors.white]), ('BACKGROUND', (0,1), (-1,1), colors.HexColor('#ffcdd2')), ('FONTNAME', (0,1), (-1,1), 'Helvetica-Bold'), ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#ffab91')), ('TOPPADDING', (0,0), (-1,-1), 5), ('BOTTOMPADDING', (0,0), (-1,-1), 5), ('LEFTPADDING', (0,0), (-1,-1), 6), ])) story.append(m_table) story.append(Spacer(1, 6)) story.append(Paragraph("<b>Key NEGATIVE features (distinguishing features):</b>", h2_s)) neg_features = [ "NO salivation, lacrimation, miosis, or bradycardia (muscarinic signs absent)", "NO sensory disturbance (distinguishes from OPIDN)", "Nerve gas poisoning has NOT been reported to cause IMS", ] for n in neg_features: story.append(Paragraph(f"✗ {n}", neg_s)) story.append(Paragraph("Diagnosis", h1_s)) diag = [ "Primarily <b>clinical</b> - based on timing of muscle weakness after OP exposure", "<b>EMG</b>: shows a <b>decremental response on repetitive nerve stimulation</b> - reflecting NMJ transmission failure (similar to myasthenic pattern)", "Often <b>missed</b> because the patient may have appeared to recover from the cholinergic crisis", "Misattribution to inadequate atropine is a common error - atropine does NOT treat IMS", ] for d in diag: story.append(Paragraph(f"• {d}", bullet_s)) story.append(Paragraph("Treatment", h1_s)) story.append(Paragraph( "<b>There is no specific antidote for IMS.</b> It is not effectively treated with the standard OP " "protocol (atropine + pralidoxime).", warn_s)) tx = [ "<b>Mechanical ventilation</b> is the mainstay - early aggressive respiratory support is life-saving", "Atropine - treats only muscarinic effects; NO effect on NMJ dysfunction", "Pralidoxime - may help if given early (before AChE aging), but by IMS onset, aging may have occurred", "Early antidote therapy at the acute stage may <b>prevent or reduce</b> IMS severity", "Symptoms resolve spontaneously in ~7 days with adequate respiratory support", ] for t in tx: story.append(Paragraph(f"• {t}", bullet_s)) story.append(Spacer(1, 8)) story.append(Paragraph("IMS vs OPIDN - Key Comparison", h1_s)) comp_data = [ ['Feature', 'IMS', 'OPIDN'], ['Onset', '1–5 days', '1–3 weeks'], ['Mechanism', 'Nicotinic NMJ failure', 'NTE inhibition'], ['Respiratory involvement', 'YES - potentially fatal', 'NO'], ['Sensory features', 'NO', 'YES (paresthesias)'], ['Weakness pattern', 'Proximal > distal', 'Distal > proximal'], ['UMN signs', 'NO', 'YES (late, if myelopathy)'], ['Prognosis', 'Recovers in ~1 week (with ventilation)', 'Variable; may be permanent'], ['Nerve gas as cause', 'NOT reported', 'YES (high dose)'], ['Treatment', 'Ventilation (supportive)', 'Supportive only'], ] comp_table = Table(comp_data, colWidths=[4.5*cm, (W-4.5*cm)/2, (W-4.5*cm)/2]) comp_table.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#bf360c')), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 9), ('VALIGN', (0,0), (-1,-1), 'TOP'), ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#fbe9e7'), colors.white]), ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#ffab91')), ('TOPPADDING', (0,0), (-1,-1), 5), ('BOTTOMPADDING', (0,0), (-1,-1), 5), ('LEFTPADDING', (0,0), (-1,-1), 6), ('FONTNAME', (0,1), (0,-1), 'Helvetica-Bold'), ])) story.append(comp_table) story.append(Spacer(1, 14)) story.append(HRFlowable(width=W, thickness=1, color=colors.HexColor('#ffab91'))) story.append(Paragraph("Sources: Bradley and Daroff's Neurology in Clinical Practice | Tintinalli's Emergency Medicine | Katzung's Basic and Clinical Pharmacology 16e | Tietz Textbook of Laboratory Medicine 7e", footer_s)) doc.build(story) print("PDF 3 created.") PYEOF python3 /tmp/workspace/medical-notes-pdfs/make_pdf3_ims.py

Running Command

cat << 'PYEOF' > /tmp/workspace/medical-notes-pdfs/make_pdf4_neuropathic.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 from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, HRFlowable from reportlab.lib.enums import TA_CENTER, TA_JUSTIFY doc = SimpleDocTemplate( "/tmp/workspace/medical-notes-pdfs/4_Pathophysiology_Neuropathic_Pain.pdf", pagesize=A4, rightMargin=2*cm, leftMargin=2*cm, topMargin=2*cm, bottomMargin=2*cm ) styles = getSampleStyleSheet() W = A4[0] - 4*cm title_s = ParagraphStyle('T', parent=styles['Title'], fontSize=18, textColor=colors.HexColor('#4a148c'), spaceAfter=4, alignment=TA_CENTER) sub_s = ParagraphStyle('S', parent=styles['Normal'], fontSize=11, textColor=colors.HexColor('#7b1fa2'), spaceAfter=10, alignment=TA_CENTER) h1_s = ParagraphStyle('H1', parent=styles['Heading1'], fontSize=13, textColor=colors.HexColor('#4a148c'), spaceBefore=12, spaceAfter=4, backColor=colors.HexColor('#f3e5f5'), leading=18) h2_s = ParagraphStyle('H2', parent=styles['Heading2'], fontSize=11, textColor=colors.HexColor('#6a1b9a'), spaceBefore=8, spaceAfter=3) body_s = ParagraphStyle('B', parent=styles['Normal'], fontSize=10, leading=14, spaceAfter=4, alignment=TA_JUSTIFY) bullet_s = ParagraphStyle('Bl', parent=styles['Normal'], fontSize=10, leading=13, spaceAfter=3, leftIndent=14) subbullet_s = ParagraphStyle('SBl', parent=styles['Normal'], fontSize=9.5, leading=13, spaceAfter=2, leftIndent=28) footer_s = ParagraphStyle('F', parent=styles['Normal'], fontSize=8, textColor=colors.grey, alignment=TA_CENTER) quote_s = ParagraphStyle('Q', parent=styles['Normal'], fontSize=9.5, leading=14, backColor=colors.HexColor('#ede7f6'), leftIndent=12, rightIndent=12, spaceAfter=6, fontName='Helvetica-Oblique') code_s = ParagraphStyle('Code', parent=styles['Normal'], fontSize=8.5, leading=13, backColor=colors.HexColor('#f3e5f5'), leftIndent=12, spaceAfter=4, fontName='Courier') story = [] story.append(Paragraph("Pathophysiology of Neuropathic Pain", title_s)) story.append(Paragraph("A Brief Structured Note", sub_s)) story.append(HRFlowable(width=W, thickness=2, color=colors.HexColor('#4a148c'))) story.append(Spacer(1, 8)) story.append(Paragraph("Definition", h1_s)) story.append(Paragraph( "Neuropathic pain is pain arising from <b>damage to, or dysfunction of, any part of the peripheral " "or central somatosensory nervous system</b>. Unlike nociceptive pain (activation of intact pain fibres " "by a relevant stimulus), neuropathic pain persists or arises <b>independently of any ongoing tissue damage</b>. " "Key clinical hallmarks: spontaneous pain, <b>allodynia</b> (pain from non-painful stimuli), and " "<b>hyperalgesia</b> (exaggerated pain from painful stimuli).", body_s)) story.append(Paragraph("Overview of Mechanisms", h1_s)) mech_data = [ ['Mechanism', 'Site', 'Outcome'], ['Peripheral Sensitization', 'Peripheral nerves, DRG', 'Ectopic discharge; lowered activation threshold'], ['Central Sensitization (Segmental)', 'Dorsal horn, spinal cord', 'Wind-up; allodynia; hyperalgesia'], ['Central Sensitization (Suprasegmental)', 'Thalamus, cortex, brain', 'Self-sustaining pain; cortical reorganization'], ['Loss of Descending Inhibition', 'PAG, LC, raphe → spinal cord', 'Amplified pain signals; facilitation dominates'], ] mech_table = Table(mech_data, colWidths=[4.5*cm, 4*cm, W-8.5*cm]) mech_table.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#4a148c')), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 9), ('VALIGN', (0,0), (-1,-1), 'TOP'), ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#f3e5f5'), colors.white]), ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#ce93d8')), ('TOPPADDING', (0,0), (-1,-1), 5), ('BOTTOMPADDING', (0,0), (-1,-1), 5), ('LEFTPADDING', (0,0), (-1,-1), 6), ])) story.append(mech_table) story.append(Spacer(1, 8)) story.append(Paragraph("1. Peripheral Sensitization", h1_s)) story.append(Paragraph( "After nerve injury or disease, <b>normal transduction and conduction in primary afferent neurons " "is hijacked</b> to maintain nociceptive signalling in the absence of a relevant stimulus:", body_s)) periph = [ "<b>Ectopic discharge:</b> Injured afferents and DRG cells fire spontaneously, generating pain without a peripheral trigger", "<b>Ion channel upregulation:</b> Increased expression of Nav1.3, Nav1.7, Nav1.8 (voltage-gated Na⁺ channels) and TRPV1 lowers firing threshold", "<b>Cross-talk (ephaptic transmission):</b> Abnormal electrical coupling between adjacent neurons - Aβ (touch) fibres activate C-fibre pain pathways", "<b>Neuroinflammation:</b> Prostaglandins, bradykinin, substance P, CGRP, IL-1β, TNF-α sensitize nociceptors and lower activation threshold", ] for p in periph: story.append(Paragraph(f"• {p}", bullet_s)) story.append(Paragraph( "The sensitized primary afferent bombards the spinal cord with continuous impulses, " "setting the stage for central sensitization.", quote_s)) story.append(Paragraph("2. Central Sensitization", h1_s)) story.append(Paragraph("<b>A. Segmental (Dorsal Horn / Spinal Cord)</b>", h2_s)) seg = [ "<b>NMDA receptor activation:</b> Persistent glutamate release activates NMDA-Rs (normally Mg²⁺-blocked). Ca²⁺ influx → PKC, CaM kinase activation → phosphorylation of ion channels → lowered threshold of dorsal horn neurons", "<b>Wind-up:</b> Repeated C-fibre stimulation progressively increases dorsal horn neuron discharge (temporal summation)", "<b>Loss of inhibitory interneurons:</b> Degeneration of GABAergic/glycinergic interneurons → disinhibition → amplified pain signal; Aβ fibres gain access to pain-projecting neurons → <b>allodynia</b>", "<b>Loss of large-fibre inhibition (Gate Control):</b> Normally Aβ fibres activate inhibitory interneurons. When large fibres are damaged, this gate is lost", "<b>Glial activation:</b> Microglia and astrocytes release TNF-α, IL-6, NO → further enhance synaptic excitability", ] for s in seg: story.append(Paragraph(f"• {s}", bullet_s)) story.append(Paragraph("<b>B. Suprasegmental (Thalamus and Cortex)</b>", h2_s)) supra = [ "Thalamic relay neurons become hyperexcitable (<b>deafferentation hyperactivity</b>)", "Cortical map reorganization can generate pain in areas distant from original injury (e.g. phantom limb pain)", "The brain can maintain pain pathways <b>autonomously without ongoing peripheral input</b> (basis of fibromyalgia)", ] for s in supra: story.append(Paragraph(f"• {s}", bullet_s)) story.append(Paragraph( '"It is as though the brain has learned from its experience of pain, and decides not only to keep the ' 'process going, but also to enhance it and make it permanent." — Stahl\'s Essential Psychopharmacology', quote_s)) story.append(Paragraph("3. Loss of Descending Inhibitory Control", h1_s)) desc = [ "Brain normally sends <b>descending inhibitory signals</b> to the dorsal horn via noradrenergic (locus coeruleus) and serotonergic (raphe nuclei) pathways from the periaqueductal grey (PAG)", "In neuropathic states, the balance shifts toward <b>descending facilitation</b>, amplifying spinal pain signals", "This is the pharmacological basis for <b>SNRIs (duloxetine, venlafaxine)</b> and <b>TCAs</b> - they enhance descending noradrenergic and serotonergic inhibition", ] for d in desc: story.append(Paragraph(f"• {d}", bullet_s)) story.append(Paragraph("Key Neurotransmitters at the Dorsal Horn", h1_s)) nt_data = [ ['Transmitter', 'Receptor', 'Role'], ['Glutamate', 'AMPA-R, NMDA-R', 'Excitatory; NMDA drives central sensitization'], ['Substance P / CGRP', 'NK1, NK2, NK3; CGRP-R', 'Slow excitatory; neurogenic inflammation'], ['GABA / Glycine', 'GABA-A/B; Glycine-R', 'Inhibitory; loss → disinhibition'], ['Endorphins', 'μ-opioid receptor', 'Inhibitory; analgesic (basis of opioid therapy)'], ['Norepinephrine', 'α₂-adrenoceptors', 'Descending inhibition (basis of TCAs/SNRIs)'], ['Serotonin', '5HT1B/D (inhibitory), 5HT3 (excitatory)', 'Dual role - net inhibitory in descending pathways'], ] nt_table = Table(nt_data, colWidths=[3.5*cm, 4.5*cm, W-8*cm]) nt_table.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#6a1b9a')), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 9), ('VALIGN', (0,0), (-1,-1), 'TOP'), ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#f3e5f5'), colors.white]), ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#ce93d8')), ('TOPPADDING', (0,0), (-1,-1), 5), ('BOTTOMPADDING', (0,0), (-1,-1), 5), ('LEFTPADDING', (0,0), (-1,-1), 6), ])) story.append(nt_table) story.append(Spacer(1, 8)) story.append(Paragraph("Clinical Correlates", h1_s)) cc_data = [ ['Symptom', 'Underlying Mechanism'], ['Spontaneous burning pain', 'Ectopic discharge from injured afferents'], ['Allodynia (touch causes pain)', 'Loss of GABAergic gate + Aβ-fibre rewiring to pain pathways'], ['Hyperalgesia', 'Peripheral + central sensitization lowers threshold'], ['Paroxysmal shooting pain', 'Ectopic bursts from DRG / demyelinated axons'], ['Hyperpathia', 'Wind-up in dorsal horn'], ['Phantom limb pain', 'Deafferentation + cortical reorganization'], ] cc_table = Table(cc_data, colWidths=[W/2, W/2]) cc_table.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#4a148c')), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 9), ('VALIGN', (0,0), (-1,-1), 'TOP'), ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#f3e5f5'), colors.white]), ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#ce93d8')), ('TOPPADDING', (0,0), (-1,-1), 5), ('BOTTOMPADDING', (0,0), (-1,-1), 5), ('LEFTPADDING', (0,0), (-1,-1), 6), ])) story.append(cc_table) story.append(Spacer(1, 8)) story.append(Paragraph("Nociceptive vs Neuropathic Pain - Quick Comparison", h1_s)) noc_data = [ ['Feature', 'Nociceptive Pain', 'Neuropathic Pain'], ['Nervous system', 'Intact', 'Damaged / dysfunctional'], ['Mechanism', 'Nociceptor stimulation', 'Ectopic discharge; sensitization; disinhibition'], ['Quality', 'Aching, throbbing, sharp', 'Burning, shooting, electric, stabbing'], ['Spontaneous pain', 'Absent', 'Present'], ['Allodynia', 'Absent', 'Present'], ['Hyperalgesia', 'Proportionate', 'Disproportionate'], ['Response to NSAIDs/opioids', 'Good', 'Partial / poor'], ['Key treatments', 'NSAIDs, paracetamol, opioids', 'Gabapentin, pregabalin, TCAs, SNRIs'], ['Resolves with healing?', 'Usually yes', 'Often persists independently'], ] noc_table = Table(noc_data, colWidths=[4*cm, (W-4*cm)/2, (W-4*cm)/2]) noc_table.setStyle(TableStyle([ ('BACKGROUND', (0,0), (-1,0), colors.HexColor('#4a148c')), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), 9), ('VALIGN', (0,0), (-1,-1), 'TOP'), ('ROWBACKGROUNDS', (0,1), (-1,-1), [colors.HexColor('#f3e5f5'), colors.white]), ('BACKGROUND', (1,1), (1,-1), colors.HexColor('#fff9c4')), ('BACKGROUND', (2,1), (2,-1), colors.HexColor('#ede7f6')), ('GRID', (0,0), (-1,-1), 0.5, colors.HexColor('#ce93d8')), ('TOPPADDING', (0,0), (-1,-1), 5), ('BOTTOMPADDING', (0,0), (-1,-1), 5), ('LEFTPADDING', (0,0), (-1,-1), 6), ('FONTNAME', (0,1), (0,-1), 'Helvetica-Bold'), ])) story.append(noc_table) story.append(Spacer(1, 14)) story.append(HRFlowable(width=W, thickness=1, color=colors.HexColor('#ce93d8'))) story.append(Paragraph("Sources: Stahl's Essential Psychopharmacology | Goldman-Cecil Medicine International Edition | Katzung's Basic and Clinical Pharmacology 16e | Rosen's Emergency Medicine | Rheumatology 2e (Elsevier)", footer_s)) doc.build(story) print("PDF 4 created.") PYEOF python3 /tmp/workspace/medical-notes-pdfs/make_pdf4_neuropathic.py

Running Command

ls -lh /tmp/workspace/medical-notes-pdfs/*.pdf

All 4 PDFs are ready for download. Here they are:

📄 Medical Notes - PDF Downloads

1. AUDIT - Alcohol Use Disorders Identification Test

1 AUDIT Alcohol Screening

PDF Document · PDF

2. Organophosphate-Induced Delayed Polyneuropathy (OPIDN)

2 OPIDN Organophosphate Polyneuropathy

PDF Document · PDF

3. Intermediate Syndrome of Organophosphate Poisoning

3 Intermediate Syndrome OP Poisoning

PDF Document · PDF

4. Pathophysiology of Neuropathic Pain

4 Pathophysiology Neuropathic Pain

PDF Document · PDF


Each PDF includes:
  • PDF 1 - Full AUDIT questionnaire (all 10 questions with scoring), score interpretation table, AUDIT-C cutoffs, comparison of screening tools, and clinical pearls
  • PDF 2 - OPIDN definition, three OP syndromes table, pathophysiology (NTE mechanism), causative agents, clinical features, EDx findings, prognosis, and treatment
  • PDF 3 - IMS definition, timeline across all 4 OP syndromes, pathophysiology, muscle groups affected, diagnosis, treatment, and IMS vs OPIDN comparison table
  • PDF 4 - Neuropathic pain definition, overview of all mechanisms, peripheral sensitization, segmental and suprasegmental central sensitization, loss of descending inhibition, dorsal horn neurotransmitters, clinical correlates, and nociceptive vs neuropathic comparison

Pathophysiology of pain.

Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Loading Image
Loading Image
I now have rich, authoritative content from Harrison's 22e. Here is the comprehensive note:

Pathophysiology of Pain

Definition & Duality of Pain

Pain is an unpleasant sensation localized to a part of the body, described in terms of a penetrating or tissue-destructive process (stabbing, burning, twisting, tearing, squeezing) and a bodily/emotional reaction (terrifying, nauseating). Pain has a fundamental duality - it is both a sensation and an emotion. Acute pain characteristically produces:
  • Behavioral arousal and stress response (↑BP, ↑HR, ↑pupil diameter, ↑plasma cortisol)
  • Local muscle contraction (limb flexion, abdominal wall rigidity)
  • Anxiety and urge to escape
The function of the pain sensory system is to protect the body and maintain homeostasis by detecting, localizing, and identifying potential or actual tissue-damaging processes.
  • Harrison's Principles of Internal Medicine 22e, p. 136

The Four Processes of Pain

Pain travels from periphery to conscious perception through four sequential processes:
TRANSDUCTION → TRANSMISSION → MODULATION → PERCEPTION
(periphery)     (nerve fibres)  (spinal cord/  (cortex)
                                 brain)

1. Peripheral Mechanisms

Primary Afferent Nociceptors

A peripheral nerve contains three types of axons - primary sensory afferents, motor neurons, and sympathetic postganglionic neurons. Primary afferents are classified by diameter, myelination, and conduction velocity:
Components of a cutaneous nerve showing Aβ, Aδ and C fibres, dorsal root ganglion, and spinal cord
Fibre TypeDiameterMyelinationConductionFunction
LargeHeavily myelinatedFastLight touch/moving stimuli; does NOT produce pain normally
SmallThinly myelinatedMediumNociception - sharp, well-localized, fast pain ("first pain")
CSmallestUnmyelinatedSlowNociception - dull, diffuse, burning pain ("second pain")
Ability to detect painful stimuli is completely abolished when conduction in Aδ and C fibres is blocked.
Most nociceptors are polymodal - they respond to heat, intense cold, intense mechanical distortion (pinch), and chemical stimuli. Each of these stimuli can produce pain, and each can sensitize the receptor to other types of stimuli.
  • Harrison's Principles of Internal Medicine 22e, p. 136-137

Transduction - Converting Stimuli to Signals

Noxious stimuli activate peripheral nociceptor terminals. Specific molecular transducers include:
  • TRPV1 (Transient Receptor Potential Vanilloid 1): activated by heat (>43°C), capsaicin, and acidic pH
  • TRPA1: activated by cold, mechanical stimuli, and chemical irritants
  • Voltage-gated Na⁺ channels (Nav1.7, Nav1.8, Nav1.9): drive action potential generation
  • Acid-sensing ion channels (ASICs): activated by tissue acidosis in ischemia/inflammation
  • P2X receptors: activated by ATP released from damaged cells

Sensitization

When intense, repeated, or prolonged stimuli are applied to damaged or inflamed tissues, the threshold for activating nociceptors is lowered - this is sensitization:
Peripheral Sensitization:
  • Inflammatory mediators activate intracellular signal transduction in nociceptors
  • Increased production, transport, and membrane insertion of chemically gated and voltage-gated ion channels
  • Key mediators: bradykinin (BK), nerve growth factor (NGF), prostaglandins (PGs), leukotrienes, substance P, low pH
  • Result: lower threshold for mechanical, thermal, and chemical stimuli
Silent Nociceptors: A large proportion of Aδ and C fibres innervating viscera are completely insensitive in normal tissue. In the presence of inflammatory mediators, these "silent nociceptors" become active - explaining why deep structures (joints, hollow viscera) can become the source of severe pain under pathological conditions.

Neurogenic Inflammation (Nociceptor-Induced Inflammation)

Primary afferent nociceptors are not passive messengers - they also actively participate in tissue protection via neuroeffector functions. When activated, they release peptide mediators peripherally:
  • Substance P: potent vasodilator; causes mast cell degranulation and histamine release; chemotactic for leukocytes
  • CGRP (Calcitonin Gene-Related Peptide): potent vasodilator; enhances and prolongs substance P effects
  • Cholecystokinin
These create a local "flare" reaction - neurogenic inflammation - amplifying the local inflammatory response.

2. Transmission - The Ascending Pain Pathway

Once generated, the pain signal travels centrally via three-neuron chain:
Pain transmission (A) and pain modulation network (B) - spinothalamic tract to thalamus and cortex; descending modulation from hypothalamus through PAG and medulla

1st Order Neuron: Primary Afferent → Dorsal Horn

  • Cell bodies in the dorsal root ganglion (DRG)
  • Enter the spinal cord via the dorsal root
  • Synapse in the dorsal horn (mainly Rexed laminae I, II, and V)

Dorsal Horn Synaptic Transmission

  • Fast transmission: Aδ fibres release glutamate → activates AMPA receptors → fast EPSPs
  • Slow transmission: C fibres release glutamate + substance P + CGRP → activate NMDA-R and NK1-R → sustained excitation
  • The dorsal horn contains interneurons (excitatory and inhibitory) that modulate transmission

2nd Order Neuron: Dorsal Horn → Thalamus (Spinothalamic Tract)

  • Axons cross the midline in the anterior white commissure and ascend in the contralateral spinothalamic tract (STT)
  • The STT divides into two components:
    • Neospinothalamic tract (lateral STT): Aδ fibres → ventral posterolateral (VPL) nucleus of thalamus → somatosensory cortex (localization, quality, intensity of pain)
    • Paleospinothalamic tract (medial STT): C fibres → medial thalamic nuclei, reticular formation, PAG → limbic system (emotional/affective component of pain)

3rd Order Neuron: Thalamus → Cortex

  • Ventral posterolateral (VPL) thalamus → somatosensory cortex (SI, SII): sensory-discriminative aspect
  • Medial thalamic nuclei → anterior cingulate cortex (ACC), frontal insular cortex: affective-motivational aspect
  • Anterior cingulate cortex: generates the "suffering" component of pain

3. Modulation - Pain Control Systems

Pain produced by injuries of similar magnitude is remarkably variable. The powerful effect of expectation, attention, and psychology on perceived pain intensity is explained by brain circuits that modulate activity of pain-transmission pathways.

Descending Pain Inhibitory System (Opioidergic)

A key modulatory circuit runs: Frontal cortex/Hypothalamus → PAG (midbrain) → RVM (medulla) → Dorsal horn
  • The Periaqueductal Grey (PAG) receives input from the hypothalamus and frontal cortex
  • PAG activates neurons in the Rostral Ventral Medulla (RVM), which sends descending projections via the dorsolateral funiculus to the spinal dorsal horn
  • These descending neurons release norepinephrine and serotonin (5-HT), which activate inhibitory interneurons in the dorsal horn
  • Inhibitory interneurons release enkephalins, GABA, and glycine to suppress pain transmission
  • Every component of this circuit contains opioid receptors - this is the basis for opioid analgesia
  • Brain imaging shows that placebo analgesia activates this same circuit (PAG, RVM, rACC, hypothalamus) - and is reversed by naloxone

Gate Control Theory (Melzack & Wall, 1965)

A conceptual model explaining modulation at the dorsal horn level:
  • Aβ fibres (touch, vibration) activate inhibitory interneurons in the substantia gelatinosa (SG)
  • These interneurons "close the gate" by inhibiting the projection neuron (T-cell) in lamina V
  • C/Aδ fibres (pain) inhibit the same SG interneurons - "opening the gate"
  • Clinical application: TENS, acupuncture, rubbing an injured area - all activate Aβ fibres to close the gate

Endogenous Opioid System

Three families of endogenous opioid peptides:
PeptidePrecursorPreferred ReceptorLocation
EnkephalinsProenkephalinδ (delta)Dorsal horn, brainstem
β-EndorphinPOMCμ (mu)PAG, hypothalamus
DynorphinsProdynorphinκ (kappa)Spinal cord, limbic system
Released during stress, exercise, and sexual activity - explaining stress-induced analgesia.

4. Perception - Supraspinal Processing

Pain is ultimately perceived in the brain through activation of multiple regions collectively called the "pain matrix":
Brain RegionRole
Somatosensory cortex (SI, SII)Localization, quality, intensity (sensory-discriminative)
Anterior cingulate cortex (ACC)Suffering, emotional response, motivation to escape
Insular cortexInteroception; autonomic responses; emotional colouring
Prefrontal cortexCognitive evaluation; anticipation; attention
HypothalamusAutonomic and neuroendocrine stress responses
AmygdalaFear and anxiety component of pain

5. Sensitization - Pathological Pain States

TypeSiteMechanismClinical Result
Peripheral sensitizationPeripheral terminals, DRGInflammatory mediators lower nociceptor thresholdHyperalgesia, allodynia in injured tissue
Central sensitizationDorsal horn (spinal cord)NMDA-R activation, wind-up, loss of inhibitionAllodynia, hyperalgesia beyond injured area
Suprasegmental sensitizationThalamus, cortexPlastic changes; cortical reorganizationChronic pain, phantom limb, fibromyalgia
A striking example of peripheral sensitization: sunburned skin, in which severe pain is produced by a gentle slap or warm shower.

Summary: The Pain Pathway

TISSUE INJURY / NOXIOUS STIMULUS
         ↓
  TRANSDUCTION (peripheral terminals)
  Nociceptor activation (TRPV1, Nav1.7/1.8, ASICs)
  Aδ fibres → "fast" sharp pain
  C fibres → "slow" dull/burning pain
         ↓
  PERIPHERAL SENSITIZATION
  BK, PGs, NGF, Substance P, CGRP → ↑excitability
  Silent nociceptors recruited
         ↓
  TRANSMISSION (DRG → Dorsal Horn)
  Glutamate (AMPA/NMDA-R), Substance P (NK1-R)
         ↓
  CENTRAL SENSITIZATION (Dorsal Horn)
  Wind-up, NMDA activation, loss of inhibitory interneurons
         ↓
  ASCENDING SPINOTHALAMIC TRACT
  (Neospinothalamic → VPL → Somatosensory cortex)
  (Paleospinothalamic → Medial thalamus → Limbic system)
         ↓
  SUPRASPINAL MODULATION
  PAG → RVM → ↓Dorsal horn (endogenous opioids, NE, 5-HT)
  Gate control (Aβ → inhibitory interneurons)
         ↓
  PERCEPTION ("Pain Matrix")
  Somatosensory cortex: WHERE and HOW MUCH
  Anterior cingulate: SUFFERING
  Insular cortex: AUTONOMIC response
  Prefrontal cortex: MEANING and CONTEXT
  • Harrison's Principles of Internal Medicine 22e, Chapter 14 (Pain: Pathophysiology and Management)

Generate a PDF summary of pain pathophysiology for clinical reference

Running Command

cat << 'PYEOF' > /tmp/workspace/medical-notes-pdfs/make_pdf5_pain_patho.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 from reportlab.platypus import (SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, HRFlowable, PageBreak, KeepTogether) from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_JUSTIFY, TA_RIGHT from reportlab.platypus import Flowable import io PAGE_W, PAGE_H = A4 LM = RM = 2*cm TM = BM = 2*cm W = PAGE_W - LM - RM doc = SimpleDocTemplate( "/tmp/workspace/medical-notes-pdfs/5_Pain_Pathophysiology_Clinical_Reference.pdf", pagesize=A4, rightMargin=RM, leftMargin=LM, topMargin=TM, bottomMargin=BM, title="Pain Pathophysiology – Clinical Reference", author="Orris Medical AI" ) # ─── Colour palette ────────────────────────────────────────── C_DARK = colors.HexColor('#b71c1c') # deep red C_MID = colors.HexColor('#e53935') # mid red C_LIGHT = colors.HexColor('#ffebee') # pale blush C_ACCENT = colors.HexColor('#ff8a80') # light red C_HEAD = colors.HexColor('#212121') # near black C_SUB = colors.HexColor('#4e342e') # dark brown C_GRID = colors.HexColor('#ef9a9a') # rose grid C_ALT1 = colors.HexColor('#fff8f8') C_ALT2 = colors.white C_BOX = colors.HexColor('#fce4ec') # pink box bg C_GREY = colors.HexColor('#757575') styles = getSampleStyleSheet() def ps(name, parent='Normal', **kw): return ParagraphStyle(name, parent=styles[parent], **kw) # Styles TITLE = ps('TITLE', 'Title', fontSize=22, textColor=C_DARK, spaceAfter=2, alignment=TA_CENTER, leading=26) SUBT = ps('SUBT', 'Normal', fontSize=11, textColor=C_MID, spaceAfter=6, alignment=TA_CENTER) H1 = ps('H1', 'Heading1',fontSize=13, textColor=C_DARK, spaceBefore=12,spaceAfter=4, backColor=C_LIGHT, leading=18, leftIndent=4) H2 = ps('H2', 'Heading2',fontSize=11, textColor=C_SUB, spaceBefore=8, spaceAfter=3) BODY = ps('BODY', 'Normal', fontSize=9.5,leading=14, spaceAfter=4, alignment=TA_JUSTIFY) BULLET = ps('BULLET', 'Normal', fontSize=9.5,leading=13, spaceAfter=3, leftIndent=14) SBULL = ps('SBULL', 'Normal', fontSize=9, leading=12, spaceAfter=2, leftIndent=28) FOOT = ps('FOOT', 'Normal', fontSize=7.5,textColor=C_GREY, alignment=TA_CENTER) BOX = ps('BOX', 'Normal', fontSize=9.5,leading=14, spaceAfter=4, leftIndent=8, backColor=C_BOX, textColor=C_DARK, fontName='Helvetica-Bold') QUOTE = ps('QUOTE', 'Normal', fontSize=9, leading=13, spaceAfter=5, leftIndent=12, rightIndent=12, backColor=colors.HexColor('#fff3e0'), fontName='Helvetica-Oblique') CODE = ps('CODE', 'Normal', fontSize=8.5,leading=13, spaceAfter=4, leftIndent=10, fontName='Courier', backColor=colors.HexColor('#fafafa')) PAGETITLE = ps('PT', 'Normal', fontSize=9, textColor=C_GREY, alignment=TA_RIGHT) def hr(thick=1.5, col=C_MID): return HRFlowable(width=W, thickness=thick, color=col, spaceAfter=4) def tbl(data, colw, header_bg=C_DARK, alt1=C_ALT1, alt2=C_ALT2, fontsize=9, vpad=5): t = Table(data, colWidths=colw) style = [ ('BACKGROUND', (0,0), (-1,0), header_bg), ('TEXTCOLOR', (0,0), (-1,0), colors.white), ('FONTNAME', (0,0), (-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0), (-1,-1), fontsize), ('VALIGN', (0,0), (-1,-1), 'TOP'), ('GRID', (0,0), (-1,-1), 0.4, C_GRID), ('TOPPADDING', (0,0), (-1,-1), vpad), ('BOTTOMPADDING',(0,0),(-1,-1), vpad), ('LEFTPADDING', (0,0), (-1,-1), 6), ('RIGHTPADDING',(0,0), (-1,-1), 4), ] for i in range(1, len(data)): bg = alt1 if i % 2 == 1 else alt2 style.append(('BACKGROUND', (0,i), (-1,i), bg)) t.setStyle(TableStyle(style)) return t story = [] # ══════════════════════════════════════ # TITLE PAGE BLOCK # ══════════════════════════════════════ story.append(Spacer(1, 0.5*cm)) story.append(Paragraph("Pathophysiology of Pain", TITLE)) story.append(Paragraph("Clinical Reference Summary", SUBT)) story.append(hr(2.5, C_DARK)) story.append(Spacer(1, 4)) # Quick-reference overview box overview_data = [ ['Four Core Processes', 'Key Structures', 'Key Mediators'], ['1. Transduction', 'Nociceptor terminals, DRG', 'TRPV1, Nav1.7/1.8, ASICs, P2X'], ['2. Transmission', 'Aδ / C fibres → Dorsal horn → STT → Thalamus', 'Glutamate, Substance P, CGRP'], ['3. Modulation', 'PAG → RVM → Dorsal horn (Gate control)', 'Enkephalins, NE, 5-HT, GABA'], ['4. Perception', 'Somatosensory cortex, ACC, Insula, PFC', 'Opioid receptors; "pain matrix"'], ] story.append(tbl(overview_data, [3.5*cm, 6.5*cm, W-10*cm], header_bg=C_DARK, fontsize=9)) story.append(Spacer(1, 6)) # ══════════════════════════════════════ # SECTION 1 – THE PAIN SENSORY SYSTEM # ══════════════════════════════════════ story.append(Paragraph("1. The Pain Sensory System", H1)) story.append(Paragraph( "Pain is an <b>unpleasant sensation</b> with a fundamental <b>duality</b>: it is both a " "<b>sensation</b> (stabbing, burning, tearing) and an <b>emotion</b> (terrifying, nauseating). " "Acute pain produces behavioural arousal, stress response (↑BP, ↑HR, ↑cortisol, ↑pupil diameter), " "and local muscle contraction. The function of the pain sensory system is to <b>protect the body " "and maintain homeostasis</b> by detecting, localising, and identifying tissue-damaging processes.", BODY)) # ══════════════════════════════════════ # SECTION 2 – PERIPHERAL MECHANISMS # ══════════════════════════════════════ story.append(Paragraph("2. Peripheral Mechanisms", H1)) story.append(Paragraph("<b>Primary Afferent Fibre Classification</b>", H2)) fibre_data = [ ['Fibre', 'Diameter', 'Myelination', 'Velocity', 'Function', 'Pain Role'], ['Aβ', 'Large', 'Heavy', 'Fast (30–70 m/s)', 'Light touch, moving stimuli', 'No pain in normal state'], ['Aδ', 'Small', 'Thin', 'Medium (5–30 m/s)', 'Sharp, well-localised pain', '"First pain" (fast, pricking)'], ['C', 'Smallest','None (unmyelinated)','Slow (<2 m/s)', 'Dull, diffuse, burning pain', '"Second pain" (slow, aching)'], ] story.append(tbl(fibre_data, [1*cm, 1.8*cm, 3.2*cm, 3*cm, 3.5*cm, W-12.5*cm])) story.append(Spacer(1, 4)) story.append(Paragraph("<b>Transduction – Converting Stimuli to Electrical Signals</b>", H2)) transducers = [ "<b>TRPV1:</b> Activated by heat (>43°C), capsaicin, acidic pH – the classic pain transducer", "<b>TRPA1:</b> Cold, mechanical stimuli, chemical irritants", "<b>Nav1.7, Nav1.8, Nav1.9:</b> Voltage-gated Na⁺ channels – drive action potential generation; Nav1.7 mutations cause congenital insensitivity to pain", "<b>ASICs (Acid-Sensing Ion Channels):</b> Activated by tissue acidosis in ischaemia/inflammation", "<b>P2X receptors:</b> Activated by ATP released from damaged cells", ] for t_item in transducers: story.append(Paragraph(f"• {t_item}", BULLET)) story.append(Paragraph("<b>Peripheral Sensitization</b>", H2)) story.append(Paragraph( "When nociceptors are exposed to <b>damaged or inflamed tissue</b>, their activation threshold " "is lowered and firing frequency increases – this is <b>peripheral sensitization</b>. " "Inflammatory mediators activate intracellular signal transduction, increasing production " "and membrane insertion of ion channels.", BODY)) sens_data = [ ['Mediator', 'Source', 'Effect on Nociceptor'], ['Bradykinin (BK)', 'Plasma kininogen (kinin cascade)', 'Direct excitation + sensitization via B1/B2 receptors'], ['Prostaglandins (PGs)', 'Arachidonic acid via COX-1/COX-2', 'Sensitize to heat and mechanical stimuli (basis of NSAID action)'], ['NGF (Nerve Growth Factor)', 'Keratinocytes, mast cells, fibroblasts', 'Upregulates TRPV1 and Nav1.8; DRG soma changes'], ['Leukotrienes', 'Lipoxygenase pathway', 'Sensitize and directly activate nociceptors'], ['Low pH / H⁺', 'Ischaemia, inflammation', 'Activates ASICs and TRPV1'], ['Histamine', 'Mast cell degranulation', 'Itch and pain at low doses'], ['ATP', 'Damaged cells', 'Activates P2X3 on nociceptors'], ] story.append(tbl(sens_data, [3.5*cm, 4*cm, W-7.5*cm], fontsize=8.5)) story.append(Spacer(1, 4)) story.append(Paragraph("<b>Silent Nociceptors</b>", H2)) story.append(Paragraph( "A large proportion of Aδ and C fibres innervating <b>viscera</b> are <b>completely insensitive " "in normal non-inflamed tissue</b> – they cannot be activated by any known mechanical or thermal " "stimulus. In the presence of inflammatory mediators, these <b>silent nociceptors</b> become " "mechanosensitive. This explains how relatively insensitive deep structures (joints, hollow viscera) " "can become the source of severe pain under pathological conditions.", BODY)) story.append(Paragraph("<b>Neurogenic Inflammation</b>", H2)) story.append(Paragraph( "When activated, primary afferent nociceptors <b>release neuropeptides peripherally</b> – an " "active tissue-protective neuroeffector function:", BODY)) neuro_inf = [ "<b>Substance P (11-amino-acid peptide):</b> Potent vasodilator; mast cell degranulation (→ histamine release); chemotactic for leukocytes; enhances vascular permeability", "<b>CGRP (Calcitonin Gene-Related Peptide):</b> Potent vasodilator; enhances and prolongs Substance P effects; involved in migraine pathophysiology", "<b>Cholecystokinin:</b> Modulates opioid-mediated analgesia", ] for n in neuro_inf: story.append(Paragraph(f"• {n}", BULLET)) story.append(Paragraph( '"Neurogenic inflammation" = local flare, oedema, and immune cell recruitment driven by the nociceptor itself.', QUOTE)) # ══════════════════════════════════════ # SECTION 3 – TRANSMISSION (ASCENDING) # ══════════════════════════════════════ story.append(Paragraph("3. Transmission – The Ascending Pain Pathway", H1)) story.append(Paragraph( "Pain is transmitted centrally via a <b>three-neuron chain</b>: primary afferent → dorsal horn → " "thalamus → cortex.", BODY)) story.append(Paragraph("<b>1st Order: Primary Afferent → Dorsal Horn</b>", H2)) first_order = [ "Cell bodies in the <b>dorsal root ganglion (DRG)</b> within vertebral foramina", "Enter spinal cord via the dorsal root; synapse in <b>Rexed laminae I, II (SG), and V</b>", "<b>Aδ fibres</b> → lamina I and V (sharp, well-localised)", "<b>C fibres</b> → lamina I and II (burning, diffuse)", "Aδ synapse releases <b>glutamate</b> (fast AMPA-mediated EPSPs)", "C fibres co-release <b>glutamate + Substance P + CGRP</b> → activates AMPA-R, NMDA-R, and NK1-R", ] for f in first_order: story.append(Paragraph(f"• {f}", BULLET)) story.append(Paragraph("<b>2nd Order: Dorsal Horn → Thalamus (Spinothalamic Tract)</b>", H2)) stt_data = [ ['Tract', 'Fibres', 'Destination', 'Function'], ['Neospinothalamic (lateral STT)', 'Mainly Aδ', 'VPL nucleus of thalamus', 'Sensory-discriminative: location, quality, intensity'], ['Paleospinothalamic (medial STT)', 'Mainly C', 'Medial thalamic nuclei, reticular formation, PAG', 'Affective-motivational: suffering, arousal'], ] story.append(tbl(stt_data, [4*cm, 2.5*cm, 4*cm, W-10.5*cm], fontsize=8.5)) story.append(Paragraph("Axons cross the <b>midline</b> via the anterior white commissure before ascending – hence contralateral pain loss with Brown-Séquard syndrome.", BODY)) story.append(Paragraph("<b>3rd Order: Thalamus → Cortex (Pain Matrix)</b>", H2)) cortex_data = [ ['Region', 'Thalamic Input', 'Function in Pain'], ['Somatosensory cortex (SI, SII)', 'VPL', 'WHERE and HOW MUCH – sensory-discriminative'], ['Anterior cingulate cortex (ACC)', 'Medial thalamus', 'SUFFERING, motivation to escape, emotional response'], ['Insular cortex', 'Medial thalamus', 'Interoception; autonomic colouring; empathy for pain'], ['Prefrontal cortex (PFC)', 'Medial thalamus', 'Cognitive evaluation; attention; anticipation of pain'], ['Hypothalamus', 'Medial thalamus', 'Neuroendocrine and autonomic stress responses'], ['Amygdala', 'Medial thalamus', 'Fear, anxiety, conditioned pain responses'], ] story.append(tbl(cortex_data, [4*cm, 3*cm, W-7*cm], fontsize=8.5)) # ══════════════════════════════════════ # SECTION 4 – MODULATION # ══════════════════════════════════════ story.append(Paragraph("4. Modulation – Pain Control Systems", H1)) story.append(Paragraph( "Pain produced by injuries of similar magnitude is <b>remarkably variable</b> across individuals and " "situations. This reflects endogenous pain-modulating circuits. There are two broad systems: " "<b>descending inhibition</b> and the <b>gate control</b> mechanism.", BODY)) story.append(Paragraph("<b>A. Descending Opioidergic Inhibitory System</b>", H2)) story.append(Paragraph( "The key circuit: <b>Frontal cortex / Hypothalamus → PAG (midbrain) → RVM (medulla) → " "Dorsal horn</b>", BODY)) desc = [ "The <b>Periaqueductal Grey (PAG)</b> receives input from the hypothalamus and frontal cortex; " "it is rich in μ-opioid receptors", "PAG activates the <b>Rostral Ventromedial Medulla (RVM)</b>, which projects via the " "<b>dorsolateral funiculus</b> to the spinal dorsal horn", "Descending fibres release <b>norepinephrine (NE)</b> and <b>serotonin (5-HT)</b>, activating " "inhibitory interneurons in the dorsal horn", "Inhibitory interneurons release <b>enkephalins, GABA, and glycine</b> to suppress " "pain-transmission neurons", "<b>Every component of this circuit contains opioid receptors</b> – basis for opioid analgesia", "<b>Placebo analgesia</b> activates this same PAG → RVM circuit (fMRI-confirmed; reversed by naloxone)", "Clinical use: <b>SNRIs and TCAs</b> enhance NE and 5-HT descending inhibition – basis for " "their efficacy in neuropathic pain", ] for d in desc: story.append(Paragraph(f"• {d}", BULLET)) story.append(Paragraph("<b>B. Gate Control Theory (Melzack & Wall, 1965)</b>", H2)) story.append(Paragraph( "Aβ fibres (light touch/vibration) activate <b>inhibitory interneurons</b> in the substantia " "gelatinosa (SG, lamina II), which suppress the dorsal horn projection neuron (T-cell, lamina V). " "C/Aδ fibres inhibit these same SG interneurons – 'opening the gate'. The brain can also send " "descending signals to close the gate.", BODY)) gate_data = [ ['Input', 'Effect on SG Interneuron', 'Gate Status', 'Result'], ['Aβ fibres (touch/vibration)', 'Activated (excitatory)', 'CLOSED', 'Pain transmission suppressed'], ['C/Aδ fibres (pain)', 'Inhibited', 'OPEN', 'Pain transmission facilitated'], ['Descending inhibitory fibres', 'Activated', 'CLOSED', 'Analgesia (opioids, TENS, acupuncture)'], ] story.append(tbl(gate_data, [4*cm, 4*cm, 2.5*cm, W-10.5*cm], fontsize=8.5)) story.append(Paragraph("<b>C. Endogenous Opioid System</b>", H2)) opioid_data = [ ['Peptide', 'Precursor', 'Preferred Receptor', 'Key Locations'], ['Enkephalins (met- & leu-)', 'Proenkephalin', 'δ (delta)', 'Dorsal horn, brainstem, limbic system'], ['β-Endorphin', 'POMC', 'μ (mu)', 'PAG, hypothalamus, pituitary'], ['Dynorphins', 'Prodynorphin', 'κ (kappa)', 'Spinal cord, limbic system, hypothalamus'], ['Endomorphins', 'Unknown precursor', 'μ (mu)', 'Spinal cord, brainstem, thalamus'], ] story.append(tbl(opioid_data, [3.5*cm, 3*cm, 3*cm, W-9.5*cm], fontsize=8.5)) story.append(Paragraph( "Released during stress, exercise, and sexual activity – explaining <b>stress-induced analgesia</b>. " "Inhibit pain by: (1) pre-synaptically reducing primary afferent transmitter release; " "(2) post-synaptically hyperpolarising dorsal horn neurons.", BODY)) # ══════════════════════════════════════ # SECTION 5 – SENSITIZATION # ══════════════════════════════════════ story.append(Paragraph("5. Sensitization – Pathological Amplification", H1)) sens2_data = [ ['Type', 'Site', 'Key Mechanism', 'Clinical Result'], ['Peripheral sensitization', 'Peripheral terminals, DRG', 'Inflammatory mediators (BK, PGs, NGF) ↑ion channel expression/insertion → ↓threshold', 'Primary hyperalgesia, allodynia at injury site'], ['Central sensitization (segmental)', 'Spinal dorsal horn', 'NMDA-R activation → Ca²⁺ influx → PKC, CaM kinase → ↑excitability; wind-up; loss of GABAergic inhibition', 'Secondary hyperalgesia, allodynia beyond injury site'], ['Suprasegmental sensitization', 'Thalamus, cortex', 'Thalamic/cortical plastic changes; deafferentation hyperactivity; cortical reorganization', 'Chronic pain, phantom limb, fibromyalgia'], ['Loss of descending inhibition', 'PAG → RVM → Dorsal horn', 'Balance shifts toward facilitation; reduced NE/5-HT tone', 'Amplified pain; central sensitivity syndromes'], ] story.append(tbl(sens2_data, [3.5*cm, 3*cm, 5*cm, W-11.5*cm], fontsize=8.5)) story.append(Spacer(1, 4)) story.append(Paragraph( "Striking example of peripheral sensitization: <b>sunburned skin</b>, in which severe pain is " "produced by a gentle slap or a warm shower. Both allodynia and hyperalgesia result from " "sensitization lowering the threshold for nociceptor and dorsal horn neuron activation.", QUOTE)) story.append(Paragraph("Wind-Up and NMDA Receptor Activation", H2)) wind_up = [ "Repeated C-fibre stimulation at low frequency causes <b>progressive increase</b> in dorsal horn neuron discharge (temporal summation) – called <b>wind-up</b>", "Mechanism: repeated Substance P release sustains membrane depolarisation; this removes the Mg²⁺ block from <b>NMDA receptors</b>", "Ca²⁺ influx through NMDA-R activates <b>PKC, CaM kinase II, and phospholipase A₂</b>", "PKC phosphorylates NMDA-R and AMPA-R → ↑conductance; inserts new AMPA-R into membrane", "Production of <b>nitric oxide (NO)</b> – diffuses retrogradely to enhance pre-synaptic glutamate release", "End result: <b>long-term potentiation (LTP)</b> at dorsal horn synapses – a cellular memory for pain", ] for w in wind_up: story.append(Paragraph(f"• {w}", BULLET)) # ══════════════════════════════════════ # SECTION 6 – PAIN TYPES # ══════════════════════════════════════ story.append(Paragraph("6. Classification of Pain", H1)) pain_types = [ ['Type', 'Definition', 'Mechanism', 'Examples'], ['Nociceptive\n(Somatic)', 'Pain from actual/threatened tissue damage; NS intact', 'Nociceptor activation; normal signalling', 'Fracture, surgical wound, osteoarthritis'], ['Nociceptive\n(Visceral)', 'Pain from visceral organs; often poorly localised, referred', 'Hollow viscus distension, ischaemia, capsule stretch', 'Appendicitis, renal colic, MI'], ['Neuropathic', 'Pain from damage/dysfunction of somatosensory NS', 'Ectopic discharge, sensitization, disinhibition', 'Diabetic neuropathy, PHN, trigeminal neuralgia'], ['Nocipastic\n(Nociplastic)', 'Pain without clear tissue/nerve damage; altered nociception', 'Suprasegmental sensitization; descending facilitation', 'Fibromyalgia, IBS, chronic widespread pain'], ['Mixed', 'Combination of above mechanisms', 'Multiple concurrent mechanisms', 'Cancer pain, low back pain with radiculopathy'], ] story.append(tbl(pain_types, [2.5*cm, 3.5*cm, 4.5*cm, W-10.5*cm], fontsize=8.5)) # ══════════════════════════════════════ # SECTION 7 – NEUROTRANSMITTERS # ══════════════════════════════════════ story.append(Paragraph("7. Key Neurotransmitters at the Dorsal Horn", H1)) nt_data = [ ['Transmitter', 'Receptor(s)', 'Role', 'Clinical Relevance'], ['Glutamate', 'AMPA-R, NMDA-R, kainate-R', 'Fast excitatory; NMDA drives central sensitization', 'Ketamine (NMDA antagonist) for refractory pain'], ['Substance P', 'NK1, NK2, NK3', 'Slow excitatory; neurogenic inflammation', 'NK1 antagonists (aprepitant) for chemotherapy nausea/pain'], ['CGRP', 'CGRP-R', 'Slow excitatory; vasodilation', 'Anti-CGRP monoclonals (erenumab) for migraine prevention'], ['GABA', 'GABA-A, GABA-B', 'Inhibitory; "inhibitory gate"', 'Gabapentinoids ↑GABA tone; benzodiazepines'], ['Glycine', 'Glycine-R (also NMDA co-agonist)', 'Inhibitory at own receptor; excitatory via NMDA', 'Strychnine (glycine antagonist) causes hyperalgesia'], ['Enkephalins', 'μ, δ opioid receptors', 'Pre- and post-synaptic inhibition', 'Basis for opioid analgesia'], ['Norepinephrine', 'α₂-adrenoceptors (inhibitory)', 'Descending inhibition', 'Basis for TCA/SNRI action; clonidine (α₂ agonist)'], ['Serotonin (5-HT)', '5HT1B/D (inhibitory), 5HT3 (excitatory)', 'Dual role; net inhibitory descending', 'SNRIs, TCAs; 5HT3 antagonists (ondansetron)'], ['Nitric oxide (NO)', 'Diffusible gas', 'Retrograde messenger; ↑pre-synaptic glutamate', 'NOS inhibitors under investigation'], ] story.append(tbl(nt_data, [2.5*cm, 3*cm, 3.5*cm, W-9*cm], fontsize=8)) # ══════════════════════════════════════ # SECTION 8 – SUMMARY DIAGRAM (text-art) # ══════════════════════════════════════ story.append(Paragraph("8. Summary: The Pain Pathway", H1)) pathway_lines = [ "TISSUE INJURY / NOXIOUS STIMULUS", " ↓", "TRANSDUCTION (peripheral nociceptor terminals)", " Stimulus → ion channel activation (TRPV1, ASICs, Nav1.7/1.8) → action potential", " Aδ → 'first pain' (sharp, fast) | C fibres → 'second pain' (dull, slow)", " ↓", "PERIPHERAL SENSITIZATION", " BK, PGs, NGF, Substance P, CGRP → ↓threshold; silent nociceptors recruited", " Neurogenic inflammation: SP + CGRP released peripherally → flare", " ↓", "TRANSMISSION (DRG → Dorsal Horn)", " Aδ: glutamate → AMPA-R (fast EPSP)", " C: glutamate + SP + CGRP → AMPA-R + NMDA-R + NK1-R (sustained excitation)", " ↓", "CENTRAL SENSITIZATION (Dorsal Horn)", " NMDA-R activation → Ca²⁺ → PKC → wind-up → LTP", " Loss of GABAergic/glycinergic interneurons → disinhibition", " ↓", "ASCENDING SPINOTHALAMIC TRACT (contralateral)", " Neospinothalamic → VPL thalamus → Somatosensory cortex (location, quality)", " Paleospinothalamic → Medial thalamus → ACC + Insula (suffering, affect)", " ↓ ↑", "PAIN PERCEPTION ('Pain Matrix') ←→ DESCENDING MODULATION", " SI/SII: WHERE, HOW MUCH PAG → RVM → Dorsal horn", " ACC: SUFFERING NE, 5-HT, enkephalins", " Insula: AUTONOMIC response Gate control (Aβ fibres)", " PFC: MEANING, CONTEXT Opioid receptors at every level", ] for line in pathway_lines: story.append(Paragraph(line, CODE)) # ══════════════════════════════════════ # SECTION 9 – CLINICAL CORRELATES # ══════════════════════════════════════ story.append(Paragraph("9. Clinical Correlates", H1)) cc_data = [ ['Symptom/Sign', 'Underlying Mechanism', 'Clinical Example'], ['Spontaneous pain', 'Ectopic discharge from injured afferents or DRG', 'Postherpetic neuralgia; phantom limb'], ['Allodynia\n(pain from non-painful stimuli)', 'Loss of GABAergic gate; Aβ-fibre rewiring to pain pathways', 'Sunburned skin; diabetic neuropathy'], ['Primary hyperalgesia', 'Peripheral sensitization at injury site', 'Tender wound; inflamed joint'], ['Secondary hyperalgesia', 'Central sensitization beyond injury', 'Area surrounding a burn; fibromyalgia'], ['Referred pain', 'Visceral and somatic afferents converge on same dorsal horn neurons', 'MI → left arm; appendicitis → periumbilical then RIF'], ['Shooting/electric pain', 'Ectopic bursts from demyelinated axons', 'Trigeminal neuralgia; MS-related pain'], ['Hyperpathia', 'Wind-up; lowered dorsal horn threshold', 'Spinal cord injury pain'], ['Phantom limb pain', 'Deafferentation; cortical reorganization', 'Post-amputation'], ['Placebo analgesia', 'Activation of PAG → RVM descending opioidergic system', 'Clinical trials; doctor-patient interaction'], ['Nocebo effect', 'Expectation-induced pain via cortical → descending facilitation', 'Pain worsened by negative suggestion'], ] story.append(tbl(cc_data, [3.5*cm, 5*cm, W-8.5*cm], fontsize=8.5)) # ══════════════════════════════════════ # FOOTER # ══════════════════════════════════════ story.append(Spacer(1, 12)) story.append(hr(1, C_GRID)) story.append(Paragraph( "Source: Harrison's Principles of Internal Medicine 22e (2025) – Chapter 14: Pain: Pathophysiology and Management | " "Stahl's Essential Psychopharmacology | Goldman-Cecil Medicine International Edition | Katzung's Basic and Clinical Pharmacology 16e", FOOT)) doc.build(story) print("PDF 5 created successfully.") PYEOF python3 /tmp/workspace/medical-notes-pdfs/make_pdf5_pain_patho.py

Running Command

ls -lh /tmp/workspace/medical-notes-pdfs/5_Pain_Pathophysiology_Clinical_Reference.pdf

Your PDF clinical reference is ready:

5 Pain Pathophysiology Clinical Reference

PDF Document · PDF


What's inside (9 sections):
  1. The Pain Sensory System - definition, duality, acute pain responses
  2. Peripheral Mechanisms - fibre classification table (Aβ/Aδ/C), transduction molecules (TRPV1, Nav1.7/1.8, ASICs), peripheral sensitization mediators table, silent nociceptors, neurogenic inflammation
  3. Ascending Transmission - 3-neuron chain, spinothalamic tract (neospinothalamic vs paleospinothalamic), pain matrix cortical regions table
  4. Modulation - descending opioidergic circuit (PAG → RVM), gate control theory table, endogenous opioid peptides table
  5. Sensitization - peripheral/central/suprasegmental/descending table; wind-up and NMDA-receptor mechanism step-by-step
  6. Pain Classification - nociceptive/neuropathic/nocipastic/mixed pain table
  7. Dorsal Horn Neurotransmitters - full table with receptors, roles, and clinical drugs
  8. Summary Pathway Diagram - complete text-art flowchart from stimulus to perception
  9. Clinical Correlates - allodynia, hyperalgesia, referred pain, placebo/nocebo, phantom limb, and more
Source: Harrison's Principles of Internal Medicine 22e, Chapter 14
This is a shared conversation. Sign in to Orris to start your own chat.