Good afternoon sir Patient named 60y female yasmin kco sjogrens + htn + ckd a/w severe anemia (hb-4.4) + ?secondary myelofibrosis ?primary mpn Sir patient ko humne kal advice kiya tha admission and pcv transfusion patient subah emergency mei aye indoor hone for blood transfusion Patient is on Tab prednisolone 10mg po 1-0-0 Tab cilacar 10mg po 1-0-0 Tab sobisis 1000mg po 1-0-1 What is definitive management
myelofibrosis management treatment
secondary myelofibrosis Sjogren syndrome management 2024
https://www.htct.com.br/en-primary-myelofibrosis-current-theโฆ
| Feature | Autoimmune MF (AMF) | Primary MPN/MF |
|---|---|---|
| Association | Sjรถgren's, SLE, scleroderma โ | De novo |
| BM histology | Reticulin fibrosis, NO clustered/atypical megakaryocytes | Atypical megakaryocytes, clustered |
| DAT | May be positive | Usually negative |
| ANA/RF | Elevated | Usually absent |
| Prognosis | Benign, reversible | Malignant, progressive |
| Treatment | Corticosteroids โ respond well | JAK inhibitors, Allo-HSCT |
| Risk | Management |
|---|---|
| Low risk | Observation + symptom management |
| Intermediate-1 | Individualized ยฑ JAK inhibitor |
| Intermediate-2/High | JAK inhibitor + consider Allogeneic HSCT (only curative option) |
| Drug | Purpose | Comment |
|---|---|---|
| Prednisolone 10 mg OD | Sjรถgren's / AMF? | Dose likely insufficient for AMF โ may need uptitration to 1 mg/kg |
| Cilacar (Cilnidipine) 10 mg OD | HTN | Continue โ calcium channel blocker, acceptable in CKD |
| Sobisis (Sodium bicarbonate) 1000 mg BD | CKD metabolic acidosis | Continue โ standard CKD management |
I will send you reports
| Parameter | Value | Normal | Interpretation |
|---|---|---|---|
| Haemoglobin | 7.3 g/dL | 12โ15 | Severe anemia (up from 4.4 โ transfusion response) |
| WBC | 8.62 | 4โ10 | Normal |
| RBC | 2.62 | 3.8โ4.8 | Low |
| Hematocrit | 23.5% | 36โ46 | Low |
| MCV | 89.5 fL | 83โ101 | Normocytic |
| MCH | 27.9 | 27โ32 | Low-normal |
| MCHC | 31.2 | 31.5โ34.5 | Low-normal (borderline hypochromic) |
| RDW | 19.7 | 11.6โ14 | โ ๏ธ VERY HIGH โ anisocytosis |
| Platelet count | 145 | 150โ410 | Borderline low (mild thrombocytopenia) |
| MPV | 7.3 | 7โ11 | Normal |
| Neutrophil | 76.9% | 40โ80 | Normal |
| Parameter | Value | Normal | Interpretation |
|---|---|---|---|
| Blood Urea | 87.7 | 13โ43 | โ ๏ธ HIGH โ azotemia |
| Creatinine | 4.13 mg/dL | 0.6โ1.2 | ๐ด SEVERELY ELEVATED โ advanced CKD |
| Sodium | 140 | 132โ146 | Normal |
| Potassium | 4.33 | 3.5โ5.1 | Normal |
| Chloride | 105 | 99โ109 | Normal |
| Parameter | Value | Interpretation |
|---|---|---|
| Urine Albumin/Creatinine Ratio | 3995.2 (Normal 0โ30) | ๐ด Massive proteinuria โ nephrotic-range |
| Urine Blood | Present (++) | Hematuria |
| Urine Protein | Present (+) | Proteinuria |
| Urine Pus Cells | 1โ2 | Minimal |
| Ionised Calcium | 1.17 (1.12โ1.32) | Normal |
| Issue | Action |
|---|---|
| Cr 4.13, eGFR ~12 | Nephrology referral urgent โ pre-dialysis planning |
| Massive proteinuria (ACR 3995) | Renal biopsy to characterize โ amyloid? Membranous? TIN? |
| Anemia of CKD | EPO alfa/darbepoetin โ start after transfusion stabilized (target Hb 10โ11 in CKD) |
| Metabolic acidosis | Continue Sobisis (sodium bicarb) โ continue |
| HTN | Continue Cilacar โ good choice in CKD (CCB); avoid ACEi/ARB with Cr 4.13 |
| Hyperphosphatemia | Check serum phosphate โ if high, start phosphate binder |
| Hyperkalemia risk | Monitor Kโบ closely โ currently 4.33 (borderline for CKD 5) |
| Test | Why |
|---|---|
| JAK2 V617F / CALR / MPL | Distinguish primary vs autoimmune MF โ the ANSWER |
| Peripheral smear | Tear-drop cells, leukoerythroblastic picture |
| Serum ferritin, TIBC, iron | Mixed iron deficiency component? |
| Serum B12 + Folate | High RDW suggests nutritional component |
| LDH, Uric acid | Disease burden in MF |
| Serum phosphate, PTH | CKD mineral-bone disease |
| Renal biopsy | Massive proteinuria โ must characterize the nephropathy |
| Peripheral smear + reticulocyte count | Hemolytic component? |
| DAT (Direct Coombs) | Autoimmune hemolysis in Sjรถgren's |
| Serum EPO level | Guide EPO therapy decision |
Paroxysmal nocturnal hemoglobinuria treTment
Paroxysmal nocturnal hemoglobinuria treTment
"paroxysmal nocturnal hemoglobinuria"[MeSH Terms] AND treatment
"paroxysmal nocturnal hemoglobinuria" AND eculizumab
| Drug | Route | Dosing | Notes |
|---|---|---|---|
| Eculizumab (Soliris) | IV | 600 mg/week ร 4 wk โ 900 mg at week 5 โ 900 mg every 2 weeks | First approved; gold standard; โ hemolysis, โ transfusions, โ thrombosis |
| Ravulizumab (Ultomiris) | IV | Weight-based loading (2400โ3000 mg) โ 3000โ3600 mg every 8 weeks | Longer half-life derivative of eculizumab; same efficacy, less frequent dosing โ preferred in practice |
| Crovalimab (Piasky) | SC | Subcutaneous โ available in some countries | Useful in eculizumab/ravulizumab resistant patients |
| Drug | Target | Route | Status |
|---|---|---|---|
| Pegcetacoplan (Empaveli) | C3 | SC 1080 mg twice weekly | FDA approved; prevents both intravascular AND extravascular hemolysis โ corrects anemia more completely |
| Iptacopan (Fabhalta) | Factor B (alternative pathway) | Oral 200 mg BD | FDA approved 2023 โ first oral complement inhibitor for PNH; superior Hb improvement vs eculizumab |
| Danicopan | Factor D | Oral | FDA approved as add-on for C5-inhibitor-inadequate responders |
Anti-C3/proximal inhibitors prevent C3 opsonization โ NO extravascular hemolysis โ anemia corrects more completely (vs C5 inhibitors which leave extravascular hemolysis ongoing)
โ ๏ธ However: if complement blockade is abruptly stopped, the large accumulated PNH red cell population can undergo massive sudden lysis โ do NOT stop abruptly.
| Measure | Details |
|---|---|
| Folic acid | At least 3 mg/day โ mandatory (chronic hemolysis depletes folate) |
| Iron supplementation | Check serum iron/ferritin periodically โ chronic hemosiderinuria causes iron deficiency |
| Red cell transfusions | Leukocyte-depleted (washed/filtered) packed red cells โ use when symptomatic |
| Erythropoiesis-stimulating agents | EPO alfa โ if EPO deficiency coexists (esp. with CKD) |
| Avoid triggers | Infections, surgery, contrast dyes, strenuous exercise โ can precipitate hemolytic crises |
| Corticosteroids | โ NOT indicated for chronic hemolysis (no evidence, significant side effects); a short course may help during acute inflammatory exacerbation |
PNH Diagnosis (flow cytometry: CD55/CD59 deficiency on RBCs + FLAER on granulocytes)
โ
โโโ Classic hemolytic PNH
โ โโโ Symptomatic / transfusion-dependent / thrombosis
โ โ โ COMPLEMENT INHIBITOR
โ โ โโโ Prefer: Iptacopan (oral, superior anemia)
โ โ โโโ Or: Ravulizumab (8-weekly IV, proven)
โ โ โโโ If C5 inadequate response: add Danicopan or switch to Pegcetacoplan
โ โโโ Young + HLA-identical sibling โ Consider Allo-BMT
โ
โโโ PNH-AA Syndrome (bone marrow failure dominant)
โ โ ATG + Cyclosporine ยฑ Eculizumab ยฑ Eltrombopag
โ โ HLA-matched sibling โ Allo-BMT (preferred)
โ
โโโ Supportive (where biologics unavailable)
โ Folic acid + iron + transfusions + anticoagulation if thrombosis
| Point | Detail |
|---|---|
| Diagnose with | Flow cytometry (FLAER + CD59) โ Gold standard |
| First choice biologic | Ravulizumab (same as eculizumab but 8-weekly โ practical advantage) |
| Best for anemia correction | Iptacopan (oral C3 proximal inhibitor) or Pegcetacoplan |
| Before any complement inhibitor | Meningococcal vaccine + penicillin prophylaxis |
| Only cure | Allo-BMT |
| Steroids | โ NOT for chronic hemolysis |
| Thrombosis | Anticoagulate + start complement inhibitor |
| Never stop complement inhibitor abruptly | Risk of massive rebound hemolysis |
Paroxysmal nocturnal hemoglobinuria treTment
โ ๏ธ Before ANY complement inhibitor: Vaccinate against Meningococcus A/B/C/W/Y + start penicillin prophylaxis
Search for latest PNH clinical guidelines 2024-2025
"paroxysmal nocturnal hemoglobinuria" AND guideline
PNH paroxysmal nocturnal hemoglobinuria clinical guidelines 2024 2025
PMID: 39307719
"paroxysmal nocturnal hemoglobinuria" AND (iptacopan OR pegcetacoplan OR danicopan OR crovalimab)
https://www.hematologyandoncology.net/supplements/navigatingโฆ
PMID: 39371251
PMID: 38884175
| Drug | Target | FDA Approval | Route | Key Update |
|---|---|---|---|---|
| Crovalimab (Piasky) | C5 | June 2024 โ NEW | SC every 4 weeks | Phase 3 COMMODORE 2 trial โ non-inferior to eculizumab |
| Iptacopan (Fabhalta) | Factor B | Dec 2023 (PI updated March 2025) | Oral BD | First oral monotherapy; superior Hb correction vs anti-C5 |
| Danicopan (Voydeya) | Factor D | March 2024 | Oral TDS | Add-on to C5 inhibitor for extravascular hemolysis |
| Pegcetacoplan (Empaveli) | C3 | Updated PI Feb 2024 | SC twice weekly | First-line approved; prevents both IVH + EVH |
| Ravulizumab (Ultomiris) | C5 | Updated PI Sept 2024 | IV every 8 weeks | Remains standard C5 inhibitor |
| Eculizumab (Soliris) | C5 | Updated PI Feb 2025 | IV every 2 weeks | Still used; longer track record |
NEW PNH PATIENT โ Symptomatic / Hemolytic
โ
โผ
First-line: Choose complement inhibitor based on patient profile
โ
โโโ Anemia is primary concern / wants oral therapy
โ โ IPTACOPAN (oral BD) โ PREFERRED 2024-25
โ [corrects both IVH + EVH; superior Hb normalization]
โ
โโโ Wants subcutaneous/self-administer, less frequent
โ โ CROVALIMAB (SC every 4 weeks) โ NEW 2024
โ [non-inferior to eculizumab; patient-preferred]
โ
โโโ IV acceptable, established long-term data
โ โ RAVULIZUMAB (IV every 8 wk) or ECULIZUMAB (IV every 2 wk)
โ
โโโ Patient already on C5 inhibitor but persistent EVH/anemia
โ ADD DANICOPAN (oral TDS) โ NEW 2024
โ OR SWITCH TO PEGCETACOPLAN (SC twice weekly)
| PMID | Citation |
|---|---|
| 39307719 | Chinese CSH PNH Guidelines 2024 โ Zhonghua Xue Ye Xue Za Zhi |
| 38884175 | COMMODORE 2 RCT: Crovalimab vs Eculizumab โ Am J Hematol 2024 |
| 39371251 | Panse et al. PNH Pathophysiology & Treatment โ Transfus Med Hemother 2024 |
| 40233322 | Fattizzo et al. Breakthrough Hemolysis โ Blood 2025 |
| 39273426 | Hillmen et al. Navigating Complement Pathway โ Int J Mol Sci 2024 |
Describe pnh a little and indian scenario management
PNH paroxysmal nocturnal hemoglobinuria India management eculizumab access 2024
eculizumab India CDSCO approval PNH price cost access PMJAY 2025
Normal cell: CD55 + CD59 on surface โ Complement BLOCKED โ RBC safe โ
PNH cell: PIG-A mutation โ No GPI anchor โ No CD55/CD59 โ Complement ATTACKS โ RBC destroyed ๐ด
| Feature | Why it Happens |
|---|---|
| Hemoglobinuria (dark/cola urine โ classically morning) | Intravascular hemolysis during sleep (slight pH drop activates complement) |
| Anemia (often severe) | Chronic RBC destruction + iron loss in urine |
| Thrombosis (major killer) | Platelet activation + NO scavenging โ hypercoagulability |
| Test | Finding |
|---|---|
| Flow cytometry (FLAER + CD59) | Gold standard diagnosis โ GPI-deficient cells on granulocytes, monocytes, RBCs |
| LDH | Very elevated (marker of hemolysis severity) |
| Haptoglobin | Low/absent |
| Bilirubin (indirect) | Elevated |
| Urine hemosiderin | Positive (chronic) |
| DAT | Negative โ key distinguishing feature |
| Clone size | % GPI-deficient granulocytes โ guides treatment decisions |
CDSCO approved Eculizumab (Soliris) โ January 2025 AstraZeneca India officially launched โ September 2025
| Step | Action |
|---|---|
| Diagnose | Flow cytometry with FLAER + CD59 (available at AIIMS, Tata Memorial, CMC Vellore, PGI Chandigarh) |
| Risk stratify | LDH, clone size, thrombosis history, Hb trend |
| Vaccinate FIRST | Meningococcus A/C/W/Y + B, Pneumococcus, HiB โ 2 weeks before drug |
| Start Eculizumab | 600 mg IV weekly ร4 โ 900 mg at week 5 โ 900 mg every 2 weeks |
| Penicillin prophylaxis | Amoxicillin 250 mg BD โ lifelong while on complement inhibitor |
| Anticoagulation | If any thrombosis history โ warfarin/LMWH/DOAC |
| Measure | Details |
|---|---|
| Folic acid 5 mg OD | Mandatory โ chronic hemolysis depletes folate |
| Iron supplementation | Monitor ferritin โ hemosiderinuria causes iron deficiency; oral iron ferrous sulfate |
| PCV transfusions | Leukocyte-depleted packed RBCs โ as needed; some patients transfusion-dependent |
| Anticoagulation | Warfarin (INR 2โ3) or LMWH for thrombosis โ critical, saves lives |
| Avoid triggers | Infections, surgery, IV contrast, strenuous exercise |
| Prednisolone short course | Only during acute inflammatory exacerbation โ NOT for chronic use |
| Measure | Details |
|---|---|
| ATG + Cyclosporine | Immunosuppression for bone marrow failure component |
| Eltrombopag | Add to ATG for better multilineage response |
| Allo-BMT | Only cure โ if HLA-matched sibling available, young patient; AIIMS/Tata/CMC |
| Centre | Capability |
|---|---|
| AIIMS New Delhi | PNH diagnosis + eculizumab therapy available |
| Tata Memorial Centre, Mumbai | Comprehensive |
| CMC Vellore | Haematology expertise, BMT |
| PGI Chandigarh | Flow cytometry + management |
| SGPGI Lucknow | Haematology |
| NIMHANS / KGMU | Limited |
What is ATG
| Product | Source | Brand Name |
|---|---|---|
| Rabbit ATG | Rabbit immunized with human thymocytes | Thymoglobulin (Sanofi) |
| Horse ATG (Equine) | Horse immunized with human thymocytes | Atgam (Pfizer) |
In aplastic anemia: Horse ATG is preferred (superior response over rabbit ATG in treatment-naรฏve patients โ shown in multiple trials)
| Indication | Role |
|---|---|
| Aplastic anemia (AA) | Primary treatment when BMT not available |
| PNH-Aplastic Anemia syndrome | Treats the bone marrow failure component |
| Renal transplant rejection | Prophylaxis and treatment |
| Other organ transplant rejection | Liver, heart |
| Conditioning for BMT | Part of preparative regimen |
| Step | Detail |
|---|---|
| Dose | hATG (Atgam) 40 mg/kg/day ร 4 days IV |
| Route | Slow IV infusion over 4โ6 hours via central/large peripheral vein |
| Combined with | Cyclosporine A (CsA) 5 mg/kg/day in 2 divided doses โ started day 1, continued for โฅ6 months |
| + Eltrombopag | 150 mg OD โ added to ATG+CsA (improves trilineage response in AA) |
| + G-CSF | Optional โ used by some centres to accelerate neutrophil recovery |
| Steroids | Methylprednisolone 1 mg/kg/day ร 2 weeks (prevents serum sickness from ATG) |
| Side Effect | Details |
|---|---|
| Fever, chills, rigors | Most common โ during infusion |
| Hypotension | During infusion |
| Serum sickness (days 7โ14) | Fever, rash, arthralgia, proteinuria โ treat with steroids |
| Leukopenia + thrombocytopenia | Expected (T cell depletion) โ monitor counts |
| Anaphylaxis | Rare but serious |
| Infections | Increased susceptibility (T cell depleted state) โ prophylax with fluconazole, acyclovir |
| Scenario | Preferred Treatment |
|---|---|
| Severe AA, age <40, HLA-matched sibling | Allo-BMT first (>95% cure) |
| Severe AA, no matched donor / age >40 | ATG + CsA + Eltrombopag |
| PNH-AA, no complement inhibitor access | ATG + CsA |
| PNH-AA on eculizumab, marrow failure | ATG + CsA + Eculizumab together |
| Relapse after ATG | Rabbit ATG (rATG) repeat OR BMT |
Can we give cyclosporine a without atg
"Addition of cyclosporine to ATG increased the response rate, and cyclosporine helped maintain remissions. Many other attempts to improve on the regimen of ATG plus cyclosporine failed." โ Harrison's 22E
| Scenario | Is CsA alone used? | Response |
|---|---|---|
| Non-severe aplastic anemia | Yes โ acceptable | Moderate response ~40โ50% |
| Severe AA โ no ATG available | Yes โ but suboptimal | Lower response than combination |
| Maintenance after ATG response | Yes โ continued alone after ATG course ends | Helps maintain remission, prevent relapse |
| Relapse on tapering CsA | Reintroduce CsA | Often recaptures response |
| Elderly / frail โ cannot tolerate ATG | Yes โ CsA alone practical option | Acceptable compromise |
| Severe AA โ standard care | โ Not preferred | Inferior to ATG+CsA |
| ATG + CsA | CsA Alone | |
|---|---|---|
| Mechanism | Depletes autoreactive T cells (ATG) + blocks T cell activation (CsA) | Blocks T cell activation only |
| Response rate (severe AA) | 60โ70% | 30โ40% |
| Complete response | ~35โ40% | ~10โ15% |
| Speed of response | 2โ3 months | Slower |
| Relapse | 30โ40% | Higher |
Make me a ppt presentation on language and speech disorder with definition, flowcharts,tables and use harrison and dejong medical books as reference not very lengthy
ls /home/daytona/workspace/ 2>/dev/null || echo "workspace empty"
mkdir -p /home/daytona/workspace/speech-language-ppt
~/speech-language-ppt/build.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Language and Speech Disorders";
pres.author = "Orris Medical";
// === COLOUR PALETTE ===
const BG_DARK = "0D1B2A"; // deep navy
const BG_MID = "1B2A4A"; // mid navy
const ACCENT1 = "2EC4B6"; // teal
const ACCENT2 = "E84855"; // coral red
const ACCENT3 = "F5A623"; // amber
const WHITE = "FFFFFF";
const LIGHT_GRAY = "D6E4F0";
const TEXT_DARK = "0D1B2A";
// Helper: add slide with dark BG
function addSlide(bg) {
const s = pres.addSlide();
s.background = { color: bg || BG_DARK };
return s;
}
// Helper: section header bar
function addHeader(slide, title, subtitle) {
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 0.9, fill: { color: ACCENT1 }, line: { color: ACCENT1 }
});
slide.addText(title, {
x: 0.3, y: 0.08, w: 9.4, h: 0.7, fontSize: 24, bold: true,
color: TEXT_DARK, fontFace: "Calibri", valign: "middle"
});
if (subtitle) {
slide.addText(subtitle, {
x: 0.3, y: 0.95, w: 9.4, h: 0.35, fontSize: 12, color: LIGHT_GRAY,
fontFace: "Calibri", italic: true
});
}
}
// Helper: footer reference
function addFooter(slide, ref) {
slide.addText(ref || "Harrison's Principles of Internal Medicine 22E | Bradley & Daroff's Neurology in Clinical Practice", {
x: 0.2, y: 5.3, w: 9.6, h: 0.25, fontSize: 8, color: ACCENT1,
fontFace: "Calibri", italic: true, align: "left"
});
}
// ================================================================
// SLIDE 1 โ TITLE SLIDE
// ================================================================
{
const s = addSlide(BG_DARK);
// Decorative left bar
s.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 0.25, h: 5.625, fill: { color: ACCENT1 }, line: { color: ACCENT1 }
});
s.addShape(pres.ShapeType.rect, {
x: 0.25, y: 0, w: 0.12, h: 5.625, fill: { color: ACCENT2 }, line: { color: ACCENT2 }
});
// Red accent top
s.addShape(pres.ShapeType.rect, {
x: 0.37, y: 1.7, w: 9.63, h: 0.08, fill: { color: ACCENT2 }, line: { color: ACCENT2 }
});
s.addText("LANGUAGE &", {
x: 0.7, y: 0.6, w: 9, h: 0.9, fontSize: 46, bold: true,
color: WHITE, fontFace: "Calibri", charSpacing: 3
});
s.addText("SPEECH DISORDERS", {
x: 0.7, y: 1.4, w: 9, h: 0.85, fontSize: 40, bold: true,
color: ACCENT1, fontFace: "Calibri", charSpacing: 2
});
s.addText("Definitions โข Classifications โข Clinical Syndromes โข Flowcharts", {
x: 0.7, y: 2.0, w: 9, h: 0.5, fontSize: 16, color: LIGHT_GRAY,
fontFace: "Calibri", italic: true
});
s.addShape(pres.ShapeType.rect, {
x: 0.7, y: 2.65, w: 3.5, h: 0.06, fill: { color: ACCENT3 }, line: { color: ACCENT3 }
});
s.addText([
{ text: "References: ", options: { bold: true, color: ACCENT3 } },
{ text: "Harrison's Principles of Internal Medicine 22E (2025) | Bradley & Daroff's Neurology in Clinical Practice", options: { color: LIGHT_GRAY } }
], { x: 0.7, y: 2.85, w: 9.1, h: 0.45, fontSize: 12, fontFace: "Calibri" });
s.addText("Prepared for: Clinical Medicine Teaching", {
x: 0.7, y: 5.1, w: 6, h: 0.35, fontSize: 11, color: "6B8CAE", fontFace: "Calibri", italic: true
});
}
// ================================================================
// SLIDE 2 โ OVERVIEW
// ================================================================
{
const s = addSlide(BG_DARK);
addHeader(s, "Overview: Language vs Speech");
addFooter(s);
// Two boxes side-by-side
const boxes = [
{
label: "LANGUAGE DISORDERS",
color: ACCENT1,
items: [
"Impairment of the symbol system",
"Understanding OR expressing words",
"Aphasia (acquired in adults)",
"Involves: reading, writing, naming, comprehension",
"Lesion: dominant cerebral hemisphere"
]
},
{
label: "SPEECH DISORDERS",
color: ACCENT2,
items: [
"Impairment of the motor act of speaking",
"Articulation, phonation, prosody affected",
"Dysarthria, Dysphonia, Mutism",
"Language content is preserved",
"Lesion: motor cortex, cerebellum, brainstem, PNS"
]
}
];
boxes.forEach((box, i) => {
const x = i === 0 ? 0.35 : 5.2;
s.addShape(pres.ShapeType.rect, {
x, y: 1.1, w: 4.5, h: 0.45, fill: { color: box.color }, line: { color: box.color }
});
s.addText(box.label, {
x, y: 1.1, w: 4.5, h: 0.45, fontSize: 13, bold: true,
color: TEXT_DARK, fontFace: "Calibri", align: "center", valign: "middle"
});
s.addShape(pres.ShapeType.rect, {
x, y: 1.55, w: 4.5, h: 3.4, fill: { color: BG_MID }, line: { color: box.color, pt: 1.5 }
});
box.items.forEach((item, j) => {
s.addText("โธ " + item, {
x: x + 0.15, y: 1.6 + j * 0.62, w: 4.2, h: 0.55,
fontSize: 12, color: LIGHT_GRAY, fontFace: "Calibri", valign: "middle"
});
});
});
// Middle separator arrow
s.addText("โ ", {
x: 4.7, y: 2.8, w: 0.6, h: 0.6, fontSize: 30, bold: true,
color: ACCENT3, fontFace: "Calibri", align: "center"
});
}
// ================================================================
// SLIDE 3 โ DEFINITION: APHASIA
// ================================================================
{
const s = addSlide(BG_DARK);
addHeader(s, "Aphasia โ Definition & Key Features");
addFooter(s, "Bradley & Daroff's Neurology in Clinical Practice");
// Definition box
s.addShape(pres.ShapeType.rect, {
x: 0.35, y: 1.05, w: 9.3, h: 1.0, fill: { color: BG_MID }, line: { color: ACCENT1, pt: 2 }
});
s.addText([
{ text: "DEFINITION: ", options: { bold: true, color: ACCENT1 } },
{ text: "Aphasia is an acquired disorder of language caused by brain damage, affecting the ability to speak, understand, read, or write, in a person who previously had these abilities. It results from injury to language-dominant (usually left) hemisphere.", options: { color: WHITE } }
], { x: 0.5, y: 1.08, w: 9.0, h: 0.95, fontSize: 13, fontFace: "Calibri", valign: "middle" });
// Four key domains
const domains = [
{ title: "FLUENCY", desc: "Fluent vs Non-fluent โ rate, effort, phrase length", color: ACCENT1 },
{ title: "COMPREHENSION", desc: "Ability to understand spoken language", color: ACCENT2 },
{ title: "REPETITION", desc: "Ability to repeat phrases (tests arcuate fasciculus)", color: ACCENT3 },
{ title: "NAMING", desc: "Anomia โ inability to name objects (universal in aphasia)", color: "9B59B6" }
];
domains.forEach((d, i) => {
const x = 0.35 + i * 2.35;
s.addShape(pres.ShapeType.rect, { x, y: 2.3, w: 2.2, h: 0.38, fill: { color: d.color }, line: { color: d.color } });
s.addText(d.title, { x, y: 2.3, w: 2.2, h: 0.38, fontSize: 11, bold: true, color: TEXT_DARK, fontFace: "Calibri", align: "center", valign: "middle" });
s.addShape(pres.ShapeType.rect, { x, y: 2.68, w: 2.2, h: 1.1, fill: { color: BG_MID }, line: { color: d.color, pt: 1 } });
s.addText(d.desc, { x: x + 0.08, y: 2.72, w: 2.1, h: 1.0, fontSize: 11, color: LIGHT_GRAY, fontFace: "Calibri", valign: "middle" });
});
s.addText("Key Bedside Test: 'Repeat after me โ No ifs, ands, or buts'", {
x: 0.35, y: 4.0, w: 9.3, h: 0.4, fontSize: 13, color: ACCENT3,
fontFace: "Calibri", italic: true, bold: true, align: "center"
});
s.addText("Aphasia โ Dysarthria | Aphasia โ Mutism | Aphasia = Language deficit, not motor speech", {
x: 0.35, y: 4.45, w: 9.3, h: 0.35, fontSize: 11, color: ACCENT2,
fontFace: "Calibri", align: "center"
});
}
// ================================================================
// SLIDE 4 โ CLASSIFICATION TABLE
// ================================================================
{
const s = addSlide(BG_DARK);
addHeader(s, "Classification of Aphasia Syndromes");
addFooter(s, "Bradley & Daroff's Neurology in Clinical Practice, Table 13.1โ13.5");
const rows = [
["Type", "Fluency", "Comprehension", "Repetition", "Lesion Site"],
["Broca", "Non-fluent", "Intact*", "Impaired", "Inf. frontal gyrus (Broca area)"],
["Wernicke", "Fluent", "Impaired", "Impaired", "Post. sup. temporal gyrus"],
["Conduction", "Fluent", "Intact", "Severely impaired", "Arcuate fasciculus / supramarginal"],
["Global", "Non-fluent", "Impaired", "Impaired", "Large L. MCA territory"],
["Transcortical Motor", "Non-fluent", "Intact", "Intact โ", "Anterior / superior to Broca"],
["Transcortical Sensory", "Fluent", "Impaired", "Intact โ", "Posterior watershed zone"],
["Anomic", "Fluent", "Intact", "Intact", "Variable / angular gyrus"],
["Pure Alexia", "Fluent", "Intact", "Intact", "Left post. cerebral artery"],
];
const colW = [1.9, 1.1, 1.4, 1.4, 3.1];
const colX = [0.25, 2.15, 3.25, 4.65, 6.05];
const rowH = 0.44;
const startY = 1.0;
rows.forEach((row, ri) => {
row.forEach((cell, ci) => {
const isHeader = ri === 0;
const fillColor = isHeader ? ACCENT1 : (ri % 2 === 0 ? BG_MID : "162236");
const textColor = isHeader ? TEXT_DARK : (ci === 0 ? ACCENT1 : (
cell.includes("Intact") ? ACCENT1 :
cell.includes("Impaired") ? ACCENT2 :
cell.includes("โ") ? ACCENT3 : LIGHT_GRAY
));
s.addShape(pres.ShapeType.rect, {
x: colX[ci], y: startY + ri * rowH, w: colW[ci], h: rowH,
fill: { color: fillColor },
line: { color: "1E3A5F", pt: 0.5 }
});
s.addText(cell, {
x: colX[ci] + 0.05, y: startY + ri * rowH + 0.03,
w: colW[ci] - 0.1, h: rowH - 0.06,
fontSize: isHeader ? 10 : 9.5, bold: isHeader,
color: textColor, fontFace: "Calibri", valign: "middle",
align: isHeader ? "center" : "left"
});
});
});
s.addText("*Broca: comprehension relatively preserved but complex syntax mildly affected", {
x: 0.25, y: 5.15, w: 9.5, h: 0.25, fontSize: 8.5, color: "6B8CAE", fontFace: "Calibri", italic: true
});
}
// ================================================================
// SLIDE 5 โ BROCA & WERNICKE COMPARISON
// ================================================================
{
const s = addSlide(BG_DARK);
addHeader(s, "Broca vs Wernicke Aphasia โ Clinical Comparison");
addFooter(s);
const features = [
["Feature", "Broca (Expressive)", "Wernicke (Receptive)"],
["Speech", "Non-fluent, telegraphic, agrammatic", "Fluent, logorrheic, paraphasic"],
["Comprehension", "Relatively INTACT", "IMPAIRED"],
["Repetition", "Impaired", "Impaired"],
["Naming", "Impaired (tip-of-tongue)", "Impaired (bizarre substitutions)"],
["Writing", "Dysmorphic, dysgrammatic", "Well-formed but paragraphic"],
["Motor signs", "Right hemiparesis PRESENT", "Usually ABSENT"],
["Insight", "AWARE โ frustrated, depressed", "Often UNAWARE โ paranoid"],
["Lesion", "Inf. frontal (Broca area, L)", "Post. sup. temporal (Wernicke area, L)"],
];
const cW = [2.3, 3.5, 3.5];
const cX = [0.3, 2.6, 6.1];
features.forEach((row, ri) => {
row.forEach((cell, ci) => {
const isHeader = ri === 0;
let fillColor = ri % 2 === 0 ? "162236" : BG_MID;
if (isHeader) {
fillColor = ci === 0 ? BG_MID : ci === 1 ? ACCENT2 : ACCENT1;
}
const textColor = isHeader
? (ci === 0 ? WHITE : TEXT_DARK)
: (ci === 0 ? ACCENT3 : LIGHT_GRAY);
s.addShape(pres.ShapeType.rect, {
x: cX[ci], y: 1.0 + ri * 0.48, w: cW[ci], h: 0.48,
fill: { color: fillColor }, line: { color: "1E3A5F", pt: 0.5 }
});
s.addText(cell, {
x: cX[ci] + 0.06, y: 1.03 + ri * 0.48,
w: cW[ci] - 0.12, h: 0.4,
fontSize: isHeader ? 11 : 10, bold: isHeader,
color: textColor, fontFace: "Calibri", valign: "middle"
});
});
});
}
// ================================================================
// SLIDE 6 โ FLOWCHART: APPROACH TO APHASIA
// ================================================================
{
const s = addSlide(BG_DARK);
addHeader(s, "Clinical Flowchart: Approach to Aphasia");
addFooter(s);
// Box helper
function flowBox(x, y, w, h, text, fillColor, textColor, fontSize) {
s.addShape(pres.ShapeType.rect, { x, y, w, h, fill: { color: fillColor || BG_MID }, line: { color: ACCENT1, pt: 1.5 }, rectRadius: 0.08 });
s.addText(text, { x: x + 0.05, y: y + 0.04, w: w - 0.1, h: h - 0.08, fontSize: fontSize || 11, bold: true, color: textColor || WHITE, fontFace: "Calibri", align: "center", valign: "middle" });
}
function arrow(x1, y1, x2, y2) {
s.addShape(pres.ShapeType.line, { x: x1, y: y1, w: 0, h: y2 - y1, line: { color: ACCENT3, pt: 1.5 } });
// arrowhead approximate
s.addText("โผ", { x: x1 - 0.12, y: y2 - 0.18, w: 0.3, h: 0.2, fontSize: 9, color: ACCENT3, fontFace: "Calibri" });
}
function harrow(x1, y, x2) {
s.addShape(pres.ShapeType.line, { x: x1, y, w: x2 - x1, h: 0, line: { color: ACCENT3, pt: 1.5 } });
}
// Start
flowBox(3.5, 1.0, 3.0, 0.45, "Patient with communication difficulty", ACCENT1, TEXT_DARK, 10);
arrow(5.0, 1.45, 5.0, 1.85);
// Is it aphasia?
flowBox(3.3, 1.85, 3.4, 0.45, "Is language content affected?", BG_MID, WHITE, 10);
// NO branch
s.addText("NO", { x: 6.8, y: 2.02, w: 0.5, h: 0.2, fontSize: 9, color: ACCENT2, bold: true, fontFace: "Calibri" });
harrow(6.7, 2.07, 7.5);
flowBox(7.5, 1.85, 2.25, 0.45, "SPEECH DISORDER\n(Dysarthria / Dysphonia)", ACCENT2, WHITE, 9);
// YES branch
s.addText("YES", { x: 5.0, y: 2.32, w: 0.5, h: 0.2, fontSize: 9, color: ACCENT1, bold: true, fontFace: "Calibri" });
arrow(5.0, 2.3, 5.0, 2.7);
// Fluency
flowBox(3.3, 2.7, 3.4, 0.45, "Is speech FLUENT?", BG_MID, WHITE, 10);
// NON-FLUENT left branch
s.addText("NON-FLUENT", { x: 1.1, y: 2.82, w: 1.2, h: 0.2, fontSize: 8.5, color: ACCENT2, bold: true, fontFace: "Calibri" });
harrow(3.3, 2.92, 2.2);
arrow(2.2, 2.92, 2.2, 3.32);
// Fluent right branch
s.addText("FLUENT", { x: 6.9, y: 2.82, w: 0.8, h: 0.2, fontSize: 8.5, color: ACCENT1, bold: true, fontFace: "Calibri" });
harrow(6.7, 2.92, 7.6);
arrow(7.6, 2.92, 7.6, 3.32);
// Repetition row โ non-fluent side
flowBox(0.5, 3.32, 3.4, 0.42, "Repetition?", BG_MID, WHITE, 10);
// Repetition row โ fluent side
flowBox(6.1, 3.32, 3.4, 0.42, "Comprehension?", BG_MID, WHITE, 10);
// Non-fluent: impaired โ Broca
s.addText("Impaired", { x: 0.6, y: 3.78, w: 1.0, h: 0.2, fontSize: 8.5, color: ACCENT2, bold: true, fontFace: "Calibri" });
arrow(1.2, 3.74, 1.2, 4.12);
flowBox(0.35, 4.12, 1.8, 0.42, "BROCA\nAPHASIA", ACCENT2, WHITE, 10);
// Non-fluent: intact โ Transcortical Motor
s.addText("Intact", { x: 2.7, y: 3.78, w: 0.8, h: 0.2, fontSize: 8.5, color: ACCENT1, bold: true, fontFace: "Calibri" });
arrow(3.1, 3.74, 3.1, 4.12);
flowBox(2.45, 4.12, 1.8, 0.42, "TRANSCORTICAL\nMOTOR", ACCENT3, TEXT_DARK, 9);
// Fluent: impaired โ Wernicke
s.addText("Impaired", { x: 6.2, y: 3.78, w: 1.0, h: 0.2, fontSize: 8.5, color: ACCENT2, bold: true, fontFace: "Calibri" });
arrow(6.8, 3.74, 6.8, 4.12);
flowBox(6.1, 4.12, 1.8, 0.42, "WERNICKE\nAPHASIA", ACCENT1, TEXT_DARK, 10);
// Fluent: intact โ check repetition
s.addText("Intact", { x: 8.2, y: 3.78, w: 0.8, h: 0.2, fontSize: 8.5, color: ACCENT1, bold: true, fontFace: "Calibri" });
arrow(8.6, 3.74, 8.6, 4.12);
flowBox(7.9, 4.12, 1.85, 0.42, "ANOMIC /\nTRANSCORTICAL S", ACCENT3, TEXT_DARK, 9);
// Both impaired: Global
s.addText("All 3 impaired โ GLOBAL APHASIA", { x: 3.6, y: 4.75, w: 3.5, h: 0.32, fontSize: 10, bold: true, color: ACCENT2, fontFace: "Calibri", align: "center" });
s.addText("Fluent + Intact Comprehension + Impaired Repetition โ CONDUCTION APHASIA", { x: 3.6, y: 5.1, w: 3.5, h: 0.28, fontSize: 9, color: ACCENT3, fontFace: "Calibri", align: "center" });
}
// ================================================================
// SLIDE 7 โ SPEECH DISORDERS
// ================================================================
{
const s = addSlide(BG_DARK);
addHeader(s, "Speech Disorders โ Classification");
addFooter(s, "Harrison's Principles of Internal Medicine 22E | Bradley & Daroff's Neurology");
const disorders = [
{
name: "DYSARTHRIA",
color: ACCENT2,
def: "Motor speech disorder: difficulty articulating words due to weakness, incoordination, or altered tone of speech muscles. Language is intact.",
types: [
"Flaccid โ LMN lesion (bulbar palsy)",
"Spastic โ UMN lesion (pseudobulbar palsy)",
"Ataxic โ Cerebellar disease",
"Hypokinetic โ Parkinson's disease",
"Hyperkinetic โ Huntington's, dystonia",
"Mixed โ ALS (flaccid + spastic)"
]
},
{
name: "DYSPHONIA",
color: ACCENT3,
def: "Disorder of voice production (phonation). Voice is hoarse, breathy, weak, or strained. Due to laryngeal or vagal nerve pathology.",
types: [
"Hoarse voice โ laryngitis, vocal cord nodule",
"Breathy voice โ vocal cord paralysis",
"Hypophonic โ Parkinson's disease",
"Spasmodic dysphonia โ laryngeal dystonia"
]
}
];
disorders.forEach((d, i) => {
const x = i === 0 ? 0.3 : 5.2;
s.addShape(pres.ShapeType.rect, { x, y: 1.0, w: 4.5, h: 0.4, fill: { color: d.color }, line: { color: d.color } });
s.addText(d.name, { x, y: 1.0, w: 4.5, h: 0.4, fontSize: 14, bold: true, color: TEXT_DARK, fontFace: "Calibri", align: "center", valign: "middle" });
s.addShape(pres.ShapeType.rect, { x, y: 1.4, w: 4.5, h: 0.7, fill: { color: BG_MID }, line: { color: d.color, pt: 1 } });
s.addText(d.def, { x: x + 0.1, y: 1.42, w: 4.3, h: 0.65, fontSize: 10.5, color: LIGHT_GRAY, fontFace: "Calibri", valign: "middle" });
s.addShape(pres.ShapeType.rect, { x, y: 2.1, w: 4.5, h: 2.9, fill: { color: "162236" }, line: { color: d.color, pt: 1 } });
d.types.forEach((t, j) => {
s.addText("โ " + t, { x: x + 0.15, y: 2.15 + j * 0.44, w: 4.2, h: 0.4, fontSize: 10.5, color: LIGHT_GRAY, fontFace: "Calibri", valign: "middle" });
});
});
}
// ================================================================
// SLIDE 8 โ DYSARTHRIA TYPES TABLE
// ================================================================
{
const s = addSlide(BG_DARK);
addHeader(s, "Dysarthria โ Types & Localization");
addFooter(s, "Bradley & Daroff's Neurology in Clinical Practice");
const rows = [
["Type", "Lesion Site", "Speech Quality", "Key Cause"],
["Flaccid", "LMN / bulbar", "Nasal, breathy, weak, hypophonic", "Bulbar palsy, MND, GBS"],
["Spastic", "UMN / bilateral corticobulbar", "Strained, strangled, slow", "Pseudobulbar palsy, Bilateral stroke"],
["Ataxic", "Cerebellum", "Scanning, irregular rhythm, explosive", "MS, cerebellar ataxia, alcohol"],
["Hypokinetic", "Basal ganglia (SNc)", "Rapid, monotone, low volume", "Parkinson's disease"],
["Hyperkinetic", "Basal ganglia", "Variable rate/volume, involuntary", "Huntington's, dystonia"],
["Mixed", "Multiple levels", "Combined features", "ALS (flaccid + spastic)"],
];
const cW = [1.7, 2.4, 3.0, 2.6];
const cX = [0.3, 2.0, 4.4, 7.4];
rows.forEach((row, ri) => {
row.forEach((cell, ci) => {
const isHeader = ri === 0;
const fill = isHeader ? ACCENT2 : (ri % 2 === 0 ? "162236" : BG_MID);
const color = isHeader ? TEXT_DARK : (ci === 0 ? ACCENT2 : LIGHT_GRAY);
s.addShape(pres.ShapeType.rect, {
x: cX[ci], y: 1.0 + ri * 0.56, w: cW[ci], h: 0.56,
fill: { color: fill }, line: { color: "1E3A5F", pt: 0.5 }
});
s.addText(cell, {
x: cX[ci] + 0.05, y: 1.03 + ri * 0.56,
w: cW[ci] - 0.1, h: 0.5,
fontSize: isHeader ? 11 : 10, bold: isHeader,
color, fontFace: "Calibri", valign: "middle",
align: isHeader ? "center" : "left"
});
});
});
}
// ================================================================
// SLIDE 9 โ FLOWCHART: APPROACH TO SPEECH DISORDER
// ================================================================
{
const s = addSlide(BG_DARK);
addHeader(s, "Flowchart: Approach to Dysarthria");
addFooter(s);
function box(x, y, w, h, text, fill, tc, fs) {
s.addShape(pres.ShapeType.rect, { x, y, w, h, fill: { color: fill || BG_MID }, line: { color: ACCENT1, pt: 1.2 } });
s.addText(text, { x: x + 0.06, y: y + 0.05, w: w - 0.12, h: h - 0.1, fontSize: fs || 10, bold: true, color: tc || WHITE, fontFace: "Calibri", align: "center", valign: "middle" });
}
box(3.5, 1.0, 3.0, 0.42, "Dysarthria โ Motor speech problem", ACCENT2, WHITE, 10);
// Arrow down
s.addShape(pres.ShapeType.line, { x: 5.0, y: 1.42, w: 0, h: 0.35, line: { color: ACCENT3, pt: 1.5 } });
s.addText("โผ", { x: 4.88, y: 1.73, w: 0.26, h: 0.2, fontSize: 9, color: ACCENT3, fontFace: "Calibri" });
box(3.5, 1.95, 3.0, 0.42, "Is weakness present?", BG_MID, WHITE, 10);
// YES โ LMN or UMN
s.addText("YES", { x: 5.05, y: 2.42, w: 0.5, h: 0.18, fontSize: 8.5, bold: true, color: ACCENT1, fontFace: "Calibri" });
s.addShape(pres.ShapeType.line, { x: 5.0, y: 2.37, w: 0, h: 0.35, line: { color: ACCENT3, pt: 1.5 } });
s.addText("โผ", { x: 4.88, y: 2.68, w: 0.26, h: 0.2, fontSize: 9, color: ACCENT3, fontFace: "Calibri" });
box(3.4, 2.87, 3.2, 0.42, "LMN or UMN signs?", BG_MID, WHITE, 10);
// LMN
s.addText("LMN (wasting, fasciculation)", { x: 0.2, y: 2.98, w: 2.0, h: 0.2, fontSize: 8, color: ACCENT2, bold: true, fontFace: "Calibri" });
s.addShape(pres.ShapeType.line, { x: 2.2, y: 3.08, w: 1.2, h: 0, line: { color: ACCENT3, pt: 1 } });
box(0.2, 3.2, 2.0, 0.42, "FLACCID\nDYSARTHRIA\n(Bulbar palsy)", "1B3A2A", ACCENT1, 9);
// UMN
s.addText("UMN (spastic, hyperreflexia)", { x: 7.6, y: 2.98, w: 2.2, h: 0.2, fontSize: 8, color: ACCENT2, bold: true, fontFace: "Calibri" });
s.addShape(pres.ShapeType.line, { x: 7.6, y: 3.08, w: -1.0, h: 0, line: { color: ACCENT3, pt: 1 } });
box(7.8, 3.2, 2.0, 0.42, "SPASTIC\nDYSARTHRIA\n(Pseudobulbar)", "3A1B1B", ACCENT2, 9);
// NO โ no weakness
s.addText("NO", { x: 6.6, y: 2.12, w: 0.4, h: 0.18, fontSize: 8.5, bold: true, color: ACCENT2, fontFace: "Calibri" });
s.addShape(pres.ShapeType.line, { x: 6.5, y: 2.16, w: 0.8, h: 0, line: { color: ACCENT3, pt: 1 } });
s.addShape(pres.ShapeType.line, { x: 7.3, y: 2.16, w: 0, h: 0.35, line: { color: ACCENT3, pt: 1 } });
s.addText("โผ", { x: 7.18, y: 2.47, w: 0.26, h: 0.2, fontSize: 9, color: ACCENT3, fontFace: "Calibri" });
box(6.3, 2.65, 3.4, 0.42, "Rhythmic / Involuntary movements?", BG_MID, WHITE, 10);
s.addText("YES โ Cerebellar signs", { x: 6.4, y: 3.12, w: 1.6, h: 0.2, fontSize: 8, color: ACCENT1, bold: true, fontFace: "Calibri" });
box(6.3, 3.32, 1.6, 0.42, "ATAXIC\nDYSARTHRIA", "1B3A2A", ACCENT1, 9);
s.addText("NO โ Basal ganglia", { x: 8.2, y: 3.12, w: 1.5, h: 0.2, fontSize: 8, color: ACCENT3, bold: true, fontFace: "Calibri" });
box(8.1, 3.32, 1.65, 0.42, "HYPO/HYPER-\nKINETIC", "2A2A1B", ACCENT3, 9);
// MND at bottom
s.addShape(pres.ShapeType.rect, { x: 2.5, y: 4.6, w: 5.0, h: 0.7, fill: { color: BG_MID }, line: { color: ACCENT2, pt: 2 } });
s.addText([
{ text: "โ ALS / Motor Neuron Disease: ", options: { bold: true, color: ACCENT2 } },
{ text: "MIXED dysarthria (flaccid + spastic) = combined LMN + UMN signs", options: { color: WHITE } }
], { x: 2.55, y: 4.65, w: 4.9, h: 0.6, fontSize: 11, fontFace: "Calibri", valign: "middle" });
}
// ================================================================
// SLIDE 10 โ SPECIAL SYNDROMES
// ================================================================
{
const s = addSlide(BG_DARK);
addHeader(s, "Special Language Syndromes");
addFooter(s, "Bradley & Daroff's Neurology in Clinical Practice โ Dejerine Syndromes");
const items = [
{
name: "ALEXIA WITHOUT AGRAPHIA",
color: ACCENT1,
who: "Dejerine, 1892",
def: "Can WRITE but cannot READ own writing ('linguistic blindfolding')",
speech: "Normal speech & comprehension",
lesion: "Left PCA territory: medial occipital ยฑ splenium of corpus callosum",
key: "Letter-by-letter reading as recovery; right hemianopia"
},
{
name: "ALEXIA WITH AGRAPHIA",
color: ACCENT2,
who: "Dejerine, 1891",
def: "Cannot READ or WRITE ('acquired illiteracy'); oral language preserved",
speech: "Often fluent with paraphasic errors",
lesion: "Angular gyrus (left inferior parietal lobule)",
key: "Often associated Gerstmann syndrome (finger agnosia, acalculia, L-R disorientation)"
},
{
name: "CONDUCTION APHASIA",
color: ACCENT3,
who: "Wernicke / Geschwind",
def: "Fluent speech + intact comprehension + severely impaired REPETITION",
speech: "Phonemic paraphasias, 'conduit d'approche' โ self-correcting attempts",
lesion: "Arcuate fasciculus / supramarginal gyrus",
key: "Repetition disproportionately impaired compared to other functions"
},
];
items.forEach((item, i) => {
const y = 1.05 + i * 1.48;
s.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 1.95, h: 1.25, fill: { color: item.color }, line: { color: item.color } });
s.addText(item.name, { x: 0.35, y: y + 0.05, w: 1.85, h: 0.45, fontSize: 11, bold: true, color: TEXT_DARK, fontFace: "Calibri", align: "center", valign: "middle" });
s.addText(item.who, { x: 0.35, y: y + 0.52, w: 1.85, h: 0.25, fontSize: 9, color: TEXT_DARK, fontFace: "Calibri", align: "center", italic: true });
s.addShape(pres.ShapeType.rect, { x: 2.25, y, w: 7.45, h: 1.25, fill: { color: BG_MID }, line: { color: item.color, pt: 1.2 } });
s.addText([
{ text: "Def: ", options: { bold: true, color: item.color } }, { text: item.def + " ", options: { color: WHITE } },
{ text: "\nSpeech: ", options: { bold: true, color: item.color, breakLine: false } }, { text: item.speech + " ", options: { color: LIGHT_GRAY } },
{ text: "\nLesion: ", options: { bold: true, color: item.color, breakLine: false } }, { text: item.lesion + " ", options: { color: LIGHT_GRAY } },
{ text: "\nKey: ", options: { bold: true, color: ACCENT3, breakLine: false } }, { text: item.key, options: { color: LIGHT_GRAY } }
], { x: 2.35, y: y + 0.06, w: 7.25, h: 1.13, fontSize: 10, fontFace: "Calibri", valign: "top" });
});
}
// ================================================================
// SLIDE 11 โ SUMMARY TABLE
// ================================================================
{
const s = addSlide(BG_DARK);
addHeader(s, "Summary: Key Distinctions at a Glance");
addFooter(s);
const rows = [
["Feature", "APHASIA", "DYSARTHRIA", "DYSPHONIA"],
["Domain affected", "Language (symbol system)", "Motor speech articulation", "Voice/phonation"],
["Comprehension", "May be impaired", "Intact", "Intact"],
["Language content", "Abnormal", "Normal", "Normal"],
["Fluency", "Variable", "Slow / Distorted", "Reduced volume"],
["Cause", "Cortical / subcortical lesion", "Motor pathway lesion", "Laryngeal / vagal"],
["Reading/Writing", "Often affected", "Not affected", "Not affected"],
["Lesion side", "Dominant (L) hemisphere", "Motor pathways (bilateral)", "Larynx / CN X"],
];
const cW = [2.3, 2.3, 2.3, 2.3];
const cX = [0.4, 2.7, 5.0, 7.3];
const headerColors = [BG_MID, ACCENT1, ACCENT2, ACCENT3];
const headerTextColors = [WHITE, TEXT_DARK, WHITE, TEXT_DARK];
rows.forEach((row, ri) => {
row.forEach((cell, ci) => {
const isHeader = ri === 0;
const fill = isHeader ? headerColors[ci] : (ri % 2 === 0 ? "162236" : BG_MID);
const color = isHeader ? headerTextColors[ci] : (ci === 0 ? LIGHT_GRAY : LIGHT_GRAY);
s.addShape(pres.ShapeType.rect, {
x: cX[ci], y: 1.0 + ri * 0.53, w: cW[ci], h: 0.53,
fill: { color: fill }, line: { color: "1E3A5F", pt: 0.5 }
});
s.addText(cell, {
x: cX[ci] + 0.06, y: 1.03 + ri * 0.53,
w: cW[ci] - 0.12, h: 0.47,
fontSize: isHeader ? 11 : 10, bold: isHeader,
color, fontFace: "Calibri", valign: "middle",
align: isHeader ? "center" : "left"
});
});
});
}
// ================================================================
// SLIDE 12 โ REFERENCES
// ================================================================
{
const s = addSlide(BG_DARK);
// Left accent bar
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.3, h: 5.625, fill: { color: ACCENT1 }, line: { color: ACCENT1 } });
s.addText("REFERENCES", {
x: 0.5, y: 0.35, w: 9.0, h: 0.6, fontSize: 30, bold: true,
color: ACCENT1, fontFace: "Calibri", charSpacing: 4
});
s.addShape(pres.ShapeType.rect, { x: 0.5, y: 0.98, w: 9.0, h: 0.05, fill: { color: ACCENT2 }, line: { color: ACCENT2 } });
const refs = [
"1. Bradley WG, Daroff RB, et al. Bradley and Daroff's Neurology in Clinical Practice, 8th Edition. Chapter 13: Aphasia and Related Disorders. Elsevier, 2022.",
"2. Longo DL, Fauci AS, et al. Harrison's Principles of Internal Medicine, 22nd Edition (2025). Chapter on Language, Cognition and Communication Disorders. McGraw Hill.",
"3. Dejerine J. Sur un cas de cรฉcitรฉ verbale avec agraphie, suivi d'autopsie. CR Soc Biol. 1891.",
"4. Dejerine J. Contribution ร l'รฉtude anatomoclinique et clinique des diffรฉrentes variรฉtรฉs de cรฉcitรฉ verbale. CR Soc Biol. 1892.",
"5. Broca P. Remarques sur le siรจge de la facultรฉ du langage articulรฉ. Bull Soc Anat Paris. 1861;6:330โ357.",
"6. Wernicke C. Der Aphasische Symptomencomplex. Breslau: Cohn & Weigert; 1874.",
];
refs.forEach((ref, i) => {
s.addText(ref, {
x: 0.6, y: 1.15 + i * 0.65, w: 9.0, h: 0.58,
fontSize: 11.5, color: i < 2 ? WHITE : LIGHT_GRAY,
fontFace: "Calibri", valign: "middle"
});
});
}
// ================================================================
// WRITE FILE
// ================================================================
pres.writeFile({ fileName: "/home/daytona/workspace/speech-language-ppt/Language_Speech_Disorders.pptx" })
.then(() => console.log("DONE"))
.catch(e => console.error(e));
cd /home/daytona/workspace/speech-language-ppt && node build.js 2>&1
ls -lh /home/daytona/workspace/speech-language-ppt/
Language Speech Disorders
Presentation ยท PPTX
| Slide | Content |
|---|---|
| 1 | Title slide |
| 2 | Language vs Speech disorders โ side-by-side comparison boxes |
| 3 | Definition of Aphasia โ 4 key domains (Fluency, Comprehension, Repetition, Naming) |
| 4 | Classification table โ all aphasia types with fluency/comprehension/repetition/lesion site |
| 5 | Broca vs Wernicke โ detailed comparison table |
| 6 | Clinical flowchart โ step-by-step approach to diagnosing aphasia type |
| 7 | Speech disorders โ Dysarthria & Dysphonia definitions + types |
| 8 | Dysarthria types table โ Flaccid/Spastic/Ataxic/Hypokinetic/Hyperkinetic/Mixed with causes |
| 9 | Flowchart โ Approach to dysarthria with localization |
| 10 | Special syndromes โ Alexia w/o Agraphia, Alexia w/ Agraphia (Dejerine), Conduction Aphasia |
| 11 | Summary table โ Aphasia vs Dysarthria vs Dysphonia at a glance |
| 12 | References โ Harrison's 22E + Bradley & Daroff + Broca, Wernicke, Dejerine original papers |
Create an Excel table comparing all aphasia syndromes4 slides
~/speech-language-ppt/build_excel.py
import openpyxl
from openpyxl.styles import (PatternFill, Font, Alignment, Border, Side,
GradientFill)
from openpyxl.utils import get_column_letter
from openpyxl.worksheet.page import PageMargins
wb = openpyxl.Workbook()
ws = wb.active
ws.title = "Aphasia Syndromes"
# โโ Colours โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
NAVY = "0D1B2A"
MID_NAVY = "1B2A4A"
TEAL = "2EC4B6"
CORAL = "E84855"
AMBER = "F5A623"
PURPLE = "9B59B6"
LIGHT = "D6E4F0"
WHITE = "FFFFFF"
DARK_ROW = "162236"
MID_ROW = "1E3550"
def fill(hex_color):
return PatternFill("solid", fgColor=hex_color)
def font(color=WHITE, bold=False, sz=10, italic=False):
return Font(name="Calibri", color=color, bold=bold, size=sz, italic=italic)
def border():
s = Side(border_style="thin", color="2A4A6A")
return Border(left=s, right=s, top=s, bottom=s)
def center(wrap=False):
return Alignment(horizontal="center", vertical="center", wrap_text=wrap)
def left(wrap=True):
return Alignment(horizontal="left", vertical="center", wrap_text=wrap)
# โโ Title row โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
ws.row_dimensions[1].height = 38
ws.merge_cells("A1:P1")
c = ws["A1"]
c.value = "APHASIA SYNDROMES โ Comprehensive Comparison Table"
c.fill = fill(TEAL)
c.font = Font(name="Calibri", color=NAVY, bold=True, size=16)
c.alignment = center()
# Subtitle
ws.row_dimensions[2].height = 22
ws.merge_cells("A2:P2")
c = ws["A2"]
c.value = "Reference: Bradley & Daroff's Neurology in Clinical Practice | Harrison's Principles of Internal Medicine 22E (2025)"
c.fill = fill(MID_NAVY)
c.font = Font(name="Calibri", color=LIGHT, bold=False, size=9, italic=True)
c.alignment = center()
# โโ Column headers โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
headers = [
"Syndrome",
"Fluency",
"Comprehension\n(Auditory)",
"Repetition",
"Naming",
"Reading",
"Writing",
"Spontaneous\nSpeech",
"Motor /\nSensory Signs",
"Lesion Site",
"Vascular\nTerritory",
"Key Clinical\nFeature",
"Psychiatric /\nBehavioural",
"Eponym /\nHistory",
"Differentiating\nPearl",
"Treatment\nFocus"
]
col_widths = [22, 14, 16, 14, 12, 12, 12, 24, 22, 28, 20, 28, 22, 20, 30, 24]
ws.row_dimensions[3].height = 44
for ci, (h, w) in enumerate(zip(headers, col_widths), start=1):
cell = ws.cell(row=3, column=ci, value=h)
# Alternate header colours
hcolors = [NAVY, CORAL, CORAL, TEAL, TEAL, AMBER, AMBER,
MID_NAVY, MID_NAVY, CORAL, CORAL, TEAL, AMBER, MID_NAVY, TEAL, CORAL]
cell.fill = fill(hcolors[ci-1])
cell.font = Font(name="Calibri", color=WHITE if hcolors[ci-1] not in (TEAL, AMBER) else NAVY,
bold=True, size=10)
cell.alignment = center(wrap=True)
cell.border = border()
ws.column_dimensions[get_column_letter(ci)].width = w
# โโ Data โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# Each row: 16 fields matching headers above
data = [
[
"BROCA APHASIA\n(Expressive)",
"NON-FLUENT\nTelegraphic / agrammatic",
"INTACT\n(mild complex syntax difficulty)",
"IMPAIRED",
"IMPAIRED\n(tip-of-tongue)",
"Often IMPAIRED\n(third alexia)",
"IMPAIRED\n(dysmorphic, dysgrammatic)",
"Hesitant, effortful; principal nouns & verbs retained; omits grammatical words (agrammatism)",
"RIGHT HEMIPARESIS\nRight hemisensory loss\nยฑ Apraxia of left limbs",
"Inferior frontal gyrus\n(Broca area, BA 44/45)\nLeft hemisphere",
"Left MCA\n(superior division)\nFrontal branches",
"Telegraphic speech;\nnon-fluent but aware;\nfrustration & depression common",
"DEPRESSION\nAwareness of deficit;\nfrustration",
"Paul Broca, 1861\n(Patient 'Tan' โ Leborgne)",
"Good comprehension DIFFERENTIATES from Global;\nLanguage content preserved vs Dysarthria",
"Speech therapy;\nLanguage rehabilitation;\nDepression management"
],
[
"WERNICKE APHASIA\n(Receptive)",
"FLUENT\nLogorrheic / jargon",
"IMPAIRED\n(often severe)",
"IMPAIRED",
"IMPAIRED\n(bizarre paraphasias)",
"IMPAIRED\n(reading comprehension)",
"IMPAIRED\n(paragraphic, well-formed)",
"Effortless, rapid; verbal paraphasias, neologisms, jargon; 'empty speech'",
"Usually ABSENT\nยฑ Right homonymous hemianopia\nNo hemiparesis",
"Posterior superior\ntemporal gyrus\n(Wernicke area, BA 22)\nLeft hemisphere",
"Left MCA\n(inferior division)\nTemporal branches",
"Jargon speech;\nunaware of deficits;\nlarge lesions โ paranoia",
"Often UNAWARE\nAngry or paranoid;\nlack of concern (anosognosia)",
"Carl Wernicke, 1874",
"Fluent but meaningless;\nDAB negative comprehension;\ndistinguish from psychosis",
"Communication strategies;\nwriting/reading aids;\nawareness counselling"
],
[
"GLOBAL APHASIA",
"NON-FLUENT\nor mute",
"IMPAIRED\n(severe)",
"IMPAIRED\n(severely)",
"IMPAIRED\n(severely)",
"IMPAIRED",
"IMPAIRED",
"Minimal output; may be mute or produce only stereotypic utterances",
"RIGHT HEMIPLEGIA\nRight hemisensory loss\nRight hemianopia",
"Large left hemisphere\ninfarction affecting\nboth Broca + Wernicke areas",
"Left MCA\n(complete territory)\nor large cortical infarct",
"All language modalities severely impaired;\nworst prognosis for recovery",
"Profound disability;\ndepression common;\nfrustration",
"N/A โ defined by extent\nnot single eponym",
"All 4 functions impaired;\ndistinguish from locked-in syndrome\n(where comprehension may be preserved)",
"Augmentative communication;\ngestural approaches;\nfamily support"
],
[
"CONDUCTION APHASIA",
"FLUENT\nwith phonemic paraphasias",
"INTACT\n(relatively preserved)",
"SEVERELY IMPAIRED\n(disproportionate)",
"IMPAIRED\n(phonemic paraphasias)",
"Variable",
"Variable",
"Fluent with phonemic paraphasias; 'conduit d'approche' โ repeated self-correction attempts toward target",
"Usually ABSENT\nยฑ Mild right arm weakness",
"Arcuate fasciculus\nSupramarginal gyrus\n(inferior parietal lobule)",
"Left MCA\n(parietal branches)\nor post. Sylvian fissure",
"Repetition is DISPROPORTIONATELY impaired vs comprehension;\nconduit d'approche behaviour",
"Awareness of errors;\nfrustration with repeated self-corrections",
"Wernicke (1874);\nGeschwind (disconnection theory)",
"Key: Intact comprehension + severely impaired repetition;\nphonemic (not verbal) paraphasias",
"Repetition-focused therapy;\nphonological cueing"
],
[
"TRANSCORTICAL\nMOTOR APHASIA",
"NON-FLUENT\nReduced initiation",
"INTACT",
"INTACT โ\n(key feature)",
"IMPAIRED\n(anomia)",
"Variable",
"IMPAIRED",
"Reduced spontaneous output; latency before speaking; can repeat well; echoing tendency",
"ยฑ Mild right leg\nweakness (supplementary motor area)",
"Anterior/superior\nto Broca area;\nSMA or watershed zone\n(left frontal)",
"Left ACA territory\nor MCAโACA watershed",
"INTACT REPETITION in a non-fluent patient;\ntendency to complete sentences",
"Apathy, reduced\ninitiative (abulia)",
"Described by\nLichtheim (1885)",
"INTACT REPETITION differentiates from Broca;\nlook for watershed ischaemia (hypotension, cardiac arrest)",
"Initiation strategies;\nmotivation therapy;\naddress underlying ischaemia"
],
[
"TRANSCORTICAL\nSENSORY APHASIA",
"FLUENT\noften echolalic",
"IMPAIRED",
"INTACT โ\n(echolalia โ repeats but doesn't comprehend)",
"IMPAIRED",
"IMPAIRED",
"IMPAIRED",
"Fluent with semantic paraphasias; pronounced echolalia; repeats examiner's words",
"Usually ABSENT",
"Posterior watershed\nzone (left temporalโ\nparietalโoccipital)",
"Left MCAโPCA\nwatershed territory",
"ECHOLALIA with INTACT repetition in a patient with poor comprehension",
"Often unaware;\nbehavioural disturbance",
"Described by\nLichtheim (1885)",
"Intact repetition + echolalia differentiates from Wernicke;\nposterior watershed location",
"Comprehension aids;\nauditoryvisualmatch\nstrategies"
],
[
"ANOMIC APHASIA\n(Amnesic Aphasia)",
"FLUENT",
"INTACT",
"INTACT",
"IMPAIRED\n(anomia โ word-finding difficulty)",
"INTACT",
"INTACT (mostly)",
"Fluent, circumlocutory speech; word-finding pauses; 'tip-of-tongue' state; empty phrases used instead of specific nouns",
"Usually ABSENT",
"Variable; often\nangular gyrus\n(left inferior parietal)\nor temporal",
"Variable; left MCA\nparietal or temporal branches",
"Isolated anomia;\nleast severe aphasia;\ncan be residual from recovery of any aphasia",
"Mild frustration;\ngenerally good insight",
"Described by\nKussmaul (1877)",
"Most benign; often residual;\nnaming-specific deficit;\nno other language impairment",
"Word-finding therapy;\nsemanticphonological cueing"
],
[
"PURE ALEXIA\nWITHOUT AGRAPHIA",
"FLUENT\n(oral language intact)",
"INTACT\n(oral comprehension intact)",
"INTACT",
"IMPAIRED for colours\n(colour anomia)",
"SEVERELY IMPAIRED\n('linguistic blindfolding')",
"INTACT โ\n(can write, cannot read own writing)",
"Oral speech normal; can write spontaneously but unable to read what was written",
"RIGHT HOMONYMOUS\nHEMIANOPIA\n(nearly always)\nNo hemiparesis",
"Left medial occipital\n+ Splenium of corpus\ncallosum (disconnection)",
"Left PCA territory\n(medial occipital + splenium)",
"Patient writes normally but cannot read own writing;\nletter-by-letter reading in recovery",
"Usually preserved;\nnot depressed",
"Dejerine, 1892\n('pure word blindness')",
"Writing INTACT but reading severely impaired;\nright hemianopia always present;\ncolour anomia",
"Letter recognition training;\ncompensatory strategies"
],
[
"ALEXIA WITH AGRAPHIA\n(Acquired Illiteracy)",
"FLUENT\n(often paraphasic)",
"INTACT (oral)",
"INTACT (oral)",
"IMPAIRED\n(often)",
"IMPAIRED\n(cannot read)",
"IMPAIRED\n(cannot write)",
"Oral speech relatively preserved; literacy (reading + writing) both lost; may have mild paraphasic speech",
"Usually ABSENT\nNo hemiparesis",
"Angular gyrus\n(left inferior parietal\nlobule, BA 39)",
"Left MCA\n(inferior parietal branches)",
"Both reading AND writing lost;\n'acquired illiteracy';\nGerstmann syndrome common",
"Frustration;\nawareness preserved",
"Dejerine, 1891",
"BOTH reading + writing impaired (unlike Pure Alexia where writing is intact);\ncheck for Gerstmann syndrome",
"Literacy retraining;\nGerstmann rehabilitation"
],
[
"SUBCORTICAL APHASIA\n(Thalamic / Striatal)",
"Variable\n(often non-fluent or hypophonic)",
"Variable\n(often mildly impaired)",
"Variable",
"IMPAIRED\n(anomia prominent)",
"Variable",
"Variable",
"Hypophonic, low-volume speech; paraphasias; may fluctuate; thalamic aphasia: fluent with semantic paraphasias",
"RIGHT HEMIPARESIS\n(capsular lesions)\nHemisensory loss",
"Thalamus, caudate,\nputamen, internal\ncapsule (anterior limb)",
"Left lenticulostriate\narteries or thalamic\nperforators",
"Fluctuating language disturbance;\nhypophonia; prominent anomia;\nnot fitting classic cortical patterns",
"Variable; abulia\nwith thalamic lesions",
"First described by\nMarie (1906) and\nmodern studies post-CT era",
"Subcortical + non-cortical location;\ndoes not fit classic cortical aphasia patterns;\nMRI essential",
"Treat underlying aetiology;\nlanguage therapy"
],
]
# Row formatting
row_fills = [
("0D1F35", CORAL), # Broca
("1A1035", TEAL), # Wernicke
("1A1020", "E84855"), # Global
("0D2035", AMBER), # Conduction
("0D2518", "2EC4B6"), # TCM
("201520", PURPLE), # TCS
("0F1E1A", AMBER), # Anomic
("0D1828", CORAL), # Pure Alexia
("0D2828", TEAL), # Alexia+Agraphia
("1A1E10", AMBER), # Subcortical
]
for ri, (row_data, (row_bg, row_accent)) in enumerate(zip(data, row_fills), start=4):
ws.row_dimensions[ri].height = 72
for ci, value in enumerate(row_data, start=1):
cell = ws.cell(row=ri, column=ci, value=value)
cell.fill = fill(row_bg)
cell.border = border()
# Syndrome name column โ bold, coloured
if ci == 1:
cell.font = Font(name="Calibri", color=row_accent, bold=True, size=11)
cell.alignment = center(wrap=True)
elif ci in (2, 3, 4): # Fluency, Comprehension, Repetition โ key diagnostic
# Colour code values
val = str(value).upper()
if "INTACT" in val or "โ" in val:
cell.font = Font(name="Calibri", color=TEAL, bold=True, size=10)
elif "IMPAIRED" in val or "NON-FLUENT" in val or "MUTE" in val:
cell.font = Font(name="Calibri", color=CORAL, bold=True, size=10)
elif "FLUENT" in val:
cell.font = Font(name="Calibri", color="7EC8C8", bold=True, size=10)
else:
cell.font = Font(name="Calibri", color=LIGHT, size=10)
cell.alignment = center(wrap=True)
elif ci in (14,): # Eponym
cell.font = Font(name="Calibri", color=AMBER, italic=True, size=9)
cell.alignment = center(wrap=True)
else:
cell.font = Font(name="Calibri", color=LIGHT, size=9.5)
cell.alignment = left(wrap=True)
# โโ Freeze panes at row 4 col B โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
ws.freeze_panes = "B4"
# โโ Legend โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
legend_row = len(data) + 5
ws.row_dimensions[legend_row] = openpyxl.worksheet.dimensions.RowDimension(ws, index=legend_row, height=20)
ws.merge_cells(f"A{legend_row}:D{legend_row}")
ws.cell(legend_row, 1).value = "COLOUR LEGEND:"
ws.cell(legend_row, 1).font = Font(name="Calibri", color=WHITE, bold=True, size=10)
ws.cell(legend_row, 1).fill = fill(MID_NAVY)
ws.cell(legend_row, 1).alignment = center()
legends = [
(TEAL, WHITE, "INTACT / Fluent / Preserved"),
(CORAL, WHITE, "IMPAIRED / Non-fluent / Absent"),
(AMBER, NAVY, "VARIABLE / Special feature"),
(PURPLE, WHITE, "Transcortical Sensory specific"),
]
for j, (bg, fg, label) in enumerate(legends, start=5):
c = ws.cell(legend_row, j)
c.value = label
c.fill = fill(bg)
c.font = Font(name="Calibri", color=fg, bold=False, size=9)
c.alignment = center()
c.border = border()
# Reference row
ref_row = legend_row + 1
ws.row_dimensions[ref_row] = openpyxl.worksheet.dimensions.RowDimension(ws, index=ref_row, height=18)
ws.merge_cells(f"A{ref_row}:P{ref_row}")
ws.cell(ref_row, 1).value = "Sources: Bradley & Daroff's Neurology in Clinical Practice (2022) | Harrison's Principles of Internal Medicine 22E (2025, McGraw Hill) | Dejerine J (1891, 1892) | Broca P (1861) | Wernicke C (1874)"
ws.cell(ref_row, 1).font = Font(name="Calibri", color=LIGHT, italic=True, size=8)
ws.cell(ref_row, 1).fill = fill(NAVY)
ws.cell(ref_row, 1).alignment = left(wrap=False)
# โโ Page setup โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
ws.page_setup.orientation = "landscape"
ws.page_setup.fitToPage = True
ws.page_setup.fitToWidth = 1
ws.page_setup.fitToHeight = 0
out = "/home/daytona/workspace/speech-language-ppt/Aphasia_Syndromes_Comparison.xlsx"
wb.save(out)
print("DONE:", out)
cd /home/daytona/workspace/speech-language-ppt && python3 build_excel.py 2>&1
~/speech-language-ppt/build_excel.py
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/speech-language-ppt/build_excel.py'
cd /home/daytona/workspace/speech-language-ppt && python3 build_excel.py 2>&1
python3 -c " import openpyxl, os wb = openpyxl.Workbook() ws = wb.active ws['A1'] = 'test' out = '/tmp/test.xlsx' wb.save(out) print('tmp save OK') import shutil shutil.move(out, '/home/daytona/workspace/speech-language-ppt/test.xlsx') print('move OK') "
python3 -c " import openpyxl, shutil wb = openpyxl.Workbook() ws = wb.active ws['A1'] = 'test' wb.save('/tmp/test.xlsx') print('tmp save OK') # copy instead of move import subprocess result = subprocess.run(['cp', '/tmp/test.xlsx', '/home/daytona/workspace/speech-language-ppt/test.xlsx'], capture_output=True, text=True) print(result.returncode, result.stderr) "
~/speech-language-ppt/build_excel.py
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/speech-language-ppt/build_excel.py'
cd /home/daytona/workspace/speech-language-ppt && python3 build_excel.py 2>&1
~/speech-language-ppt/build_aphasia_ppt.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Aphasia Syndromes";
const NAVY = "0D1B2A"; const MID = "1B2A4A"; const TEAL = "2EC4B6";
const CORAL = "E84855"; const AMBER = "F5A623"; const PURPLE = "9B59B6";
const WHITE = "FFFFFF"; const LIGHT = "D6E4F0"; const DARK = "162236";
function addSlide(bg) { const s = pres.addSlide(); s.background = { color: bg || NAVY }; return s; }
function hdr(s, title, sub) {
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:0.82, fill:{color:TEAL}, line:{color:TEAL} });
s.addText(title, { x:0.3, y:0.05, w:9.4, h:0.72, fontSize:22, bold:true, color:NAVY, fontFace:"Calibri", valign:"middle" });
if (sub) s.addText(sub, { x:0.3, y:0.84, w:9.4, h:0.3, fontSize:10, color:LIGHT, fontFace:"Calibri", italic:true });
}
function foot(s, ref) {
s.addText(ref || "Harrison's 22E (2025) | Bradley & Daroff's Neurology in Clinical Practice", {
x:0.2, y:5.32, w:9.6, h:0.22, fontSize:7.5, color:TEAL, fontFace:"Calibri", italic:true });
}
// =====================================================================
// SLIDE 1 โ Title
// =====================================================================
{
const s = addSlide(NAVY);
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.28, h:5.625, fill:{color:TEAL}, line:{color:TEAL} });
s.addShape(pres.ShapeType.rect, { x:0.28, y:0, w:0.12, h:5.625, fill:{color:CORAL}, line:{color:CORAL} });
s.addShape(pres.ShapeType.rect, { x:0.4, y:1.55, w:9.6, h:0.07, fill:{color:CORAL}, line:{color:CORAL} });
s.addText("APHASIA SYNDROMES", { x:0.65, y:0.5, w:9.0, h:0.95, fontSize:48, bold:true, color:WHITE, fontFace:"Calibri", charSpacing:2 });
s.addText("Classification โข Localization โข Clinical Features โข Comparison", { x:0.65, y:1.62, w:9.0, h:0.45, fontSize:15, color:LIGHT, fontFace:"Calibri", italic:true });
s.addShape(pres.ShapeType.rect, { x:0.65, y:2.22, w:4.0, h:0.06, fill:{color:AMBER}, line:{color:AMBER} });
// Quick-reference boxes
const types = [
{ label:"NON-FLUENT", sub:"Broca ยท Global ยท TCM", color:CORAL },
{ label:"FLUENT", sub:"Wernicke ยท Conduction ยท TCS ยท Anomic", color:TEAL },
{ label:"LITERACY", sub:"Alexia ยฑAgraphia", color:AMBER },
{ label:"SUBCORTICAL", sub:"Thalamic ยท Striatal", color:PURPLE },
];
types.forEach((t,i) => {
const x = 0.65 + i*2.35;
s.addShape(pres.ShapeType.rect, { x, y:2.5, w:2.2, h:0.38, fill:{color:t.color}, line:{color:t.color} });
s.addText(t.label, { x, y:2.5, w:2.2, h:0.38, fontSize:12, bold:true, color:t.color===AMBER?NAVY:WHITE, fontFace:"Calibri", align:"center", valign:"middle" });
s.addShape(pres.ShapeType.rect, { x, y:2.88, w:2.2, h:0.52, fill:{color:MID}, line:{color:t.color, pt:1} });
s.addText(t.sub, { x:x+0.06, y:2.9, w:2.1, h:0.48, fontSize:10, color:LIGHT, fontFace:"Calibri", align:"center", valign:"middle" });
});
s.addText([
{ text:"Ref: ", options:{bold:true, color:AMBER} },
{ text:"Harrison's Principles of Internal Medicine 22E (2025) | Bradley & Daroff's Neurology in Clinical Practice", options:{color:LIGHT} }
], { x:0.65, y:3.65, w:9.1, h:0.4, fontSize:11, fontFace:"Calibri" });
}
// =====================================================================
// SLIDE 2 โ Big Comparison Table (Broca, Wernicke, Global, Conduction)
// =====================================================================
{
const s = addSlide(NAVY);
hdr(s, "Aphasia Syndromes โ Core Diagnostic Features", "The 4 key functions: Fluency ยท Comprehension ยท Repetition ยท Naming");
foot(s);
const cols = ["Feature", "BROCA", "WERNICKE", "GLOBAL", "CONDUCTION", "TR. MOTOR", "TR. SENSORY", "ANOMIC"];
const colColors = [MID, CORAL, TEAL, "7F1A25", AMBER, "1A6060", PURPLE, "2A4A1A"];
const colW = [1.55, 1.1, 1.1, 0.9, 1.15, 1.1, 1.1, 1.0];
const colX = [0.2, 1.75, 2.85, 3.95, 4.85, 6.0, 7.1, 8.2];
const rows = [
["Fluency", "Non-fluent","Fluent","Non-fluent","Fluent","Non-fluent","Fluent","Fluent"],
["Comprehension", "Intact*", "IMPAIRED","IMPAIRED","Intact","Intact","IMPAIRED","Intact"],
["Repetition", "Impaired", "Impaired","Impaired","SEVERELYโ","INTACT โ","INTACT โ","Intact"],
["Naming", "Impaired", "Impaired","Impaired","Impaired","Impaired","Impaired","IMPAIREDโ"],
["Reading", "Oftenโ", "Impaired","Impaired","Variable","Variable","Impaired","Intact"],
["Writing", "Impaired", "Paragraphic","Impaired","Variable","Impaired","Impaired","Intact"],
["Motor signs", "R. hemip.","Absent","R. hemip.","Absentยฑ","Mild legโ","Absent","Absent"],
["Lesion", "Broca area\n(Inf frontal)","Wernicke\n(Sup temp)","Large L MCA","Arc. fasc.\nSupramarg","Ant/sup to\nBroca/SMA","Post watershed\nTPC junction","Angular\ngyrus/var"],
];
// Header row
const hRowY = 1.1;
cols.forEach((c, ci) => {
s.addShape(pres.ShapeType.rect, { x:colX[ci], y:hRowY, w:colW[ci], h:0.45, fill:{color:colColors[ci]}, line:{color:"1E3A5F", pt:0.5} });
s.addText(c, { x:colX[ci]+0.03, y:hRowY, w:colW[ci]-0.06, h:0.45, fontSize:ci===0?10:9.5, bold:true, color:ci===0?WHITE:ci===3||ci===4?NAVY:WHITE, fontFace:"Calibri", align:"center", valign:"middle" });
});
rows.forEach((row, ri) => {
const rowY = 1.55 + ri * 0.5;
const rowFill = ri % 2 === 0 ? DARK : MID;
row.forEach((cell, ci) => {
s.addShape(pres.ShapeType.rect, { x:colX[ci], y:rowY, w:colW[ci], h:0.5, fill:{color:rowFill}, line:{color:"1E3A5F", pt:0.4} });
// Colour-code key values
let color = LIGHT;
const v = cell.toUpperCase();
if (v.includes("INTACT") || v.includes("โ") || v.includes("ABSENT")) color = TEAL;
else if (v.includes("IMPAIRED") || v.includes("NON-FLUENT") || v.includes("HEMIP")) color = CORAL;
else if (v.includes("SEVERELY") || v.includes("IMPAIREDโ")) color = AMBER;
if (ci === 0) color = LIGHT;
s.addText(cell, { x:colX[ci]+0.03, y:rowY+0.03, w:colW[ci]-0.06, h:0.44, fontSize:ci===0?9.5:9, bold:ci===0, color, fontFace:"Calibri", align:ci===0?"left":"center", valign:"middle" });
});
});
// Legend
const lY = 5.1;
[["INTACT / Absent",TEAL,NAVY],["IMPAIRED",CORAL,WHITE],["Special finding",AMBER,NAVY]].forEach((l,i) => {
s.addShape(pres.ShapeType.rect, { x:0.2+i*2.2, y:lY, w:2.1, h:0.2, fill:{color:l[1]}, line:{color:l[1]} });
s.addText(l[0], { x:0.2+i*2.2, y:lY, w:2.1, h:0.2, fontSize:8, bold:true, color:l[2], fontFace:"Calibri", align:"center", valign:"middle" });
});
s.addText("*Broca: comprehension relatively intact but complex syntax affected", { x:6.7, y:5.1, w:3.1, h:0.2, fontSize:7.5, color:"6B8CAE", fontFace:"Calibri", italic:true });
}
// =====================================================================
// SLIDE 3 โ Localization diagram + Literacy syndromes
// =====================================================================
{
const s = addSlide(NAVY);
hdr(s, "Lesion Localization & Literacy Syndromes (Dejerine)", "Left hemisphere language map | Pure Alexia vs Alexia with Agraphia");
foot(s, "Dejerine J (1891, 1892) | Bradley & Daroff's Neurology in Clinical Practice");
// Left panel: brain location boxes
const locs = [
{ area:"BROCA AREA\n(BA 44/45)", pos:"Inferior Frontal Gyrus", aphasia:"Broca Aphasia", color:CORAL, x:0.2, y:1.1 },
{ area:"WERNICKE AREA\n(BA 22)", pos:"Post. Sup. Temporal Gyrus", aphasia:"Wernicke Aphasia", color:TEAL, x:0.2, y:2.1 },
{ area:"ARCUATE FASC.\nSupramarginal Gyrus", pos:"Inf. Parietal / White Matter", aphasia:"Conduction Aphasia", color:AMBER, x:0.2, y:3.1 },
{ area:"ANGULAR GYRUS\n(BA 39)", pos:"Left Inf. Parietal Lobule", aphasia:"Alexia+Agraphia", color:PURPLE, x:0.2, y:4.1 },
];
locs.forEach(l => {
s.addShape(pres.ShapeType.rect, { x:l.x, y:l.y, w:2.0, h:0.85, fill:{color:l.color}, line:{color:l.color} });
s.addText(l.area, { x:l.x+0.05, y:l.y+0.02, w:1.9, h:0.45, fontSize:9.5, bold:true, color:l.color===AMBER?NAVY:WHITE, fontFace:"Calibri", align:"center", valign:"middle" });
s.addText(l.pos, { x:l.x+0.05, y:l.y+0.48, w:1.9, h:0.32, fontSize:8.5, color:l.color===AMBER?NAVY:WHITE, fontFace:"Calibri", align:"center", italic:true });
});
// Right panel: Dejerine Literacy Syndromes
const dejerine = [
{
title:"PURE ALEXIA WITHOUT AGRAPHIA",
year:"Dejerine 1892",
color:CORAL,
fields:[
["Can WRITE", "โ YES โ normal writing"],
["Can READ", "โ NO โ 'linguistic blindfolding'"],
["Can read own writing?", "โ NO"],
["Oral speech", "โ INTACT"],
["Lesion", "Left medial occipital + Splenium of CC"],
["Vascular", "Left PCA territory"],
["Sign", "Right homonymous hemianopia (always)"],
["Recovery", "Letter-by-letter reading"]
]
},
{
title:"ALEXIA WITH AGRAPHIA",
year:"Dejerine 1891",
color:TEAL,
fields:[
["Can WRITE", "โ NO โ 'acquired illiteracy'"],
["Can READ", "โ NO"],
["Oral speech", "โ Intact (mild paraphasias)"],
["Lesion", "Angular gyrus (BA 39), left IPL"],
["Vascular", "Left MCA (inferior parietal branch)"],
["Sign", "Often Gerstmann syndrome"],
["Pearl", "BOTH reading + writing lost"],
["Distinguish", "from Pure Alexia: writing LOST here"]
]
}
];
dejerine.forEach((d, i) => {
const x = 2.55 + i * 3.7;
s.addShape(pres.ShapeType.rect, { x, y:1.05, w:3.4, h:0.38, fill:{color:d.color}, line:{color:d.color} });
s.addText(d.title, { x:x+0.05, y:1.05, w:3.3, h:0.38, fontSize:10, bold:true, color:d.color===TEAL?NAVY:WHITE, fontFace:"Calibri", align:"center", valign:"middle" });
s.addText(d.year, { x:x+0.05, y:1.43, w:3.3, h:0.22, fontSize:9, color:d.color, italic:true, fontFace:"Calibri", align:"center" });
d.fields.forEach((f, fi) => {
const fy = 1.65 + fi * 0.46;
s.addShape(pres.ShapeType.rect, { x, y:fy, w:1.2, h:0.42, fill:{color:MID}, line:{color:"1E3A5F", pt:0.4} });
s.addText(f[0], { x:x+0.04, y:fy+0.02, w:1.14, h:0.38, fontSize:8.5, bold:true, color:d.color, fontFace:"Calibri", valign:"middle" });
s.addShape(pres.ShapeType.rect, { x:x+1.2, y:fy, w:2.2, h:0.42, fill:{color:DARK}, line:{color:"1E3A5F", pt:0.4} });
const vColor = f[1].startsWith("โ") ? TEAL : f[1].startsWith("โ") ? CORAL : LIGHT;
s.addText(f[1], { x:x+1.25, y:fy+0.02, w:2.1, h:0.38, fontSize:8.5, color:vColor, fontFace:"Calibri", valign:"middle" });
});
});
}
// =====================================================================
// SLIDE 4 โ Clinical Approach Flowchart + Transcortical syndromes
// =====================================================================
{
const s = addSlide(NAVY);
hdr(s, "Transcortical Syndromes & Diagnostic Flowchart", "Key rule: INTACT REPETITION = Transcortical (Motor or Sensory)");
foot(s);
// Left: Transcortical comparison
const tcs = [
{
name:"TRANSCORTICAL\nMOTOR (TCM)",
color:CORAL,
rows:[
["Fluency","Non-fluent, reduced initiation"],
["Comprehension","INTACT"],
["Repetition","INTACT โ โ KEY feature"],
["Echolalia","May complete sentences"],
["Lesion","Ant/sup to Broca, SMA, ACA watershed"],
["Cause","Hypotension, ACA infarct"],
["Behaviour","Apathy, abulia, reduced initiative"],
]
},
{
name:"TRANSCORTICAL\nSENSORY (TCS)",
color:PURPLE,
rows:[
["Fluency","Fluent (paraphasic)"],
["Comprehension","IMPAIRED"],
["Repetition","INTACT โ โ with ECHOLALIA"],
["Echolalia","Pronounced โ repeats examiner"],
["Lesion","Post watershed (temporal-parietal-occipital)"],
["Cause","MCAโPCA watershed ischaemia"],
["Behaviour","Unaware, echolalia, semantic errors"],
]
}
];
tcs.forEach((t, i) => {
const x = 0.18 + i * 4.7;
s.addShape(pres.ShapeType.rect, { x, y:1.02, w:4.4, h:0.42, fill:{color:t.color}, line:{color:t.color} });
s.addText(t.name, { x, y:1.02, w:4.4, h:0.42, fontSize:12, bold:true, color:WHITE, fontFace:"Calibri", align:"center", valign:"middle" });
t.rows.forEach((r, ri) => {
const ry = 1.44 + ri * 0.53;
s.addShape(pres.ShapeType.rect, { x, y:ry, w:1.3, h:0.5, fill:{color:MID}, line:{color:"1E3A5F", pt:0.4} });
s.addText(r[0], { x:x+0.04, y:ry+0.03, w:1.22, h:0.44, fontSize:9, bold:true, color:t.color, fontFace:"Calibri", valign:"middle" });
s.addShape(pres.ShapeType.rect, { x:x+1.3, y:ry, w:3.1, h:0.5, fill:{color:DARK}, line:{color:"1E3A5F", pt:0.4} });
const vColor = r[1].includes("INTACT") || r[1].includes("โ") ? TEAL : r[1].includes("IMPAIRED") ? CORAL : LIGHT;
s.addText(r[1], { x:x+1.35, y:ry+0.03, w:3.0, h:0.44, fontSize:9, color:vColor, fontFace:"Calibri", valign:"middle" });
});
});
// Right panel โ Mini flowchart decision box
const fc_x = 9.6;
// Compact side-column summary
s.addShape(pres.ShapeType.rect, { x:9.3, y:1.02, w:0.5, h:4.42, fill:{color:MID}, line:{color:TEAL, pt:1.5} });
s.addText("INTACT REPETITION = TRANSCORTICAL\n\nFluent + Intact rep + Poor comp โ TCS\nNon-fluent + Intact rep + OK comp โ TCM\n\nECHOLALIA is hallmark of TCS", {
x:9.3, y:1.04, w:0.46, h:4.38, fontSize:6.5, color:TEAL, fontFace:"Calibri", valign:"middle", align:"center"
});
// Bottom summary bar
s.addShape(pres.ShapeType.rect, { x:0.18, y:5.08, w:9.1, h:0.3, fill:{color:MID}, line:{color:AMBER, pt:1} });
s.addText([
{ text:"๐ง Quick Rule: ", options:{bold:true, color:AMBER} },
{ text:"Intact Repetition = Transcortical (watershed ischaemia) | ", options:{color:WHITE} },
{ text:"Severely โ Repetition = Conduction | ", options:{color:CORAL} },
{ text:"Echolalia = TCS", options:{color:TEAL} }
], { x:0.22, y:5.08, w:9.0, h:0.3, fontSize:10, fontFace:"Calibri", valign:"middle" });
}
pres.writeFile({ fileName: "/tmp/Aphasia_4Slides.pptx" })
.then(() => {
const { execSync } = require("child_process");
execSync("cp /tmp/Aphasia_4Slides.pptx /home/daytona/workspace/speech-language-ppt/Aphasia_4Slides.pptx");
console.log("DONE");
}).catch(e => console.error(e));
cd /home/daytona/workspace/speech-language-ppt && node build_aphasia_ppt.js 2>&1
ls -lh /home/daytona/workspace/speech-language-ppt/*.xlsx /home/daytona/workspace/speech-language-ppt/*.pptx 2>&1
Aphasia Syndromes Comparison
Spreadsheet ยท XLSX
Aphasia 4Slides
Presentation ยท PPTX
| Slide | Content |
|---|---|
| 1 | Title + 4-category overview (Non-fluent / Fluent / Literacy / Subcortical) |
| 2 | Master comparison table โ all 7 syndromes ร 8 features, colour-coded |
| 3 | Lesion localization map + Dejerine literacy syndromes (Pure Alexia vs Alexia+Agraphia) |
| 4 | Transcortical syndromes (TCM vs TCS) + Quick diagnostic rule |
Make ppt lengthy of 30 slides with radiological images and areas of cerebrum wherever relevant speech and language areas from relevant references and make the background of ppt white and simple dont use blue and teal colour
Broca area Wernicke area language cortex brain MRI
aphasia MRI lesion left hemisphere stroke
Wernicke aphasia MRI temporal lobe lesion
arcuate fasciculus white matter tractography DTI language
Broca aphasia MRI stroke left frontal lobe infarction
global aphasia large MCA territory infarction CT scan
pure alexia posterior cerebral artery infarction occipital MRI
cerebral lobes functional areas lateral view diagram cortex
~/speech-language-ppt/build_30slides.js
const pptxgen = require("pptxgenjs");
const { execSync } = require("child_process");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Language and Speech Disorders";
// โโ PALETTE: White background, professional academic style โโ
const WHITE = "FFFFFF";
const BLACK = "1A1A1A";
const DARK = "2C2C2C";
const GRAY = "4A4A4A";
const LGRAY = "F2F2F2";
const MGRAY = "D0D0D0";
const RED = "C0392B";
const DRED = "922B21";
const ORANGE = "D35400";
const AMBER = "CA6F1E";
const GREEN = "1A7A4A";
const PURPLE = "6C3483";
const MRED = "E8C8C5"; // light red fill
const MGREEN = "C8E5D5"; // light green fill
const MPURP = "E0D0EE"; // light purple fill
const MORAN = "FAE5D3"; // light orange fill
// โโ Image URLs โโ
const IMG = {
broca_wern_diagram: "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_d9c64539e56a5ff2837db6acc027217f58539b7bec9704ebb1c9c228d3a85920.jpg",
lang_network_fmri: "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_c82079a8bf6bfc1d9c231149c06349b5ddad3ee05ade5a1cf5f9bc5dc3fd935d.jpg",
brain_lobes_diagram:"https://cdn.orris.care/cdss_images/pmc_clinical_VQA_50b00387db18f4904a401e8726030061affbdb44b1f9ddfcb913bf52cd690401.jpg",
muc_brodmann: "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_2c0a949d86f15e3f83e26878147016ab0753da386704c64838a5db5fef87b759.jpg",
lang_network_atlas: "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_a0d9f7a98cc6cc7eb6ed427fb37a24e5cb00695e9dad0394a72b51e07c56230c.jpg",
speech_network_roi: "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_bd3a217299aa27fce592134b5e665e5eca284384bae30eccfb366544d2996fbf.jpg",
arcuate_dti_single: "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_23ab7cf547b67c393734fdf8e9ef46baecd230d1822f2a031495618725a5a033.jpg",
all_tracts_dti: "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_9117b5b3b7bf1792ac28c0bcdeb967b5b85a0fc121881df8ae0f4d579941b811.jpg",
broca_ct: "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_4031fbb8e02fd0bf2e85f664256f67de9b845cba95c33a1104e4bea1c9806f51.jpg",
broca_mri_sagittal: "https://cdn.orris.care/cdss_images/medpix_vqa_c12226a5-98e5-4d35-899f-db2030a4415c_1766301782921.png",
broca_mri_flair: "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_c7a22c3d482d8663ab2c29d0e8c536204b4326b558c27723294d87d487dc72d8.jpg",
wernicke_overlap: "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_2035ba88225c7c7f1c2c577c5736d6bee77d35f501a2d0fd7323038f27d2349e.jpg",
wernicke_ct_hemor: "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_1b4443a186ddc07159f4120c09a144be62c5052833e2b3aede82f1fbf8822dd4.jpg",
global_aphasia_mri: "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_b719ad510506561a99aee833c2c76607ecc856d917624588a51b73c5b37342fe.jpg",
global_aphasia_ct: "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_67816d4ae19819803833096c4820976dcf029b66f08af2e44f9e7645a482c4ea.jpg",
lesion_overlap_aph: "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_8169a4a22c3cce5997c4055ed7f6516f72854402e9ab16f12150d7848af271a6.jpg",
pca_mri_flair: "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_a95a36c59f8f2e0d28872be2867d434888c4ecda4c772e21a247ebd8edeb95cc.jpg",
lang_reorganize: "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_24e897fb78c758094ef7e7e828dc30f8d3fabed17ef0b3d8934126781718f5fd.jpg",
};
// Fetch all images at once
console.log("Fetching images...");
const imgUrls = Object.values(IMG).map(u => `"${u}"`).join(" ");
let imgData = {};
try {
const raw = execSync(
`node /home/daytona/skills/shared/scripts/fetch_images.js ${imgUrls}`,
{ maxBuffer: 100 * 1024 * 1024 }
).toString();
const arr = JSON.parse(raw);
Object.keys(IMG).forEach((k, i) => { imgData[k] = arr[i]; });
console.log("Images fetched:", Object.keys(imgData).length);
} catch(e) { console.error("Image fetch error:", e.message); }
function img(key) {
const d = imgData[key];
return (d && d.base64 && !d.error) ? d.base64 : null;
}
// โโ Helpers โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
function slide(note) {
const s = pres.addSlide();
s.background = { color: WHITE };
return s;
}
// Header bar: red left stripe + title
function header(s, title, sub, stripeColor) {
const sc = stripeColor || RED;
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:0.75, fill:{color:sc}, line:{color:sc} });
s.addShape(pres.ShapeType.rect, { x:0, y:0.75, w:10, h:0.04, fill:{color:MGRAY}, line:{color:MGRAY} });
s.addText(title, { x:0.3, y:0.06, w:9.4, h:0.63, fontSize:22, bold:true, color:WHITE, fontFace:"Calibri", valign:"middle" });
if (sub) s.addText(sub, { x:0.3, y:0.8, w:9.4, h:0.28, fontSize:10.5, color:GRAY, fontFace:"Calibri", italic:true });
}
function footer(s, ref) {
s.addShape(pres.ShapeType.rect, { x:0, y:5.42, w:10, h:0.2, fill:{color:LGRAY}, line:{color:MGRAY} });
s.addText(ref || "Bradley & Daroff's Neurology in Clinical Practice | Harrison's Principles of Internal Medicine 22E (2025)",
{ x:0.2, y:5.43, w:9.6, h:0.18, fontSize:7.5, color:GRAY, fontFace:"Calibri", italic:true });
}
function bullet(s, items, x, y, w, h, color, fontSize) {
const arr = items.map((t, i) => ({
text: t,
options: { bullet:{code:"25BA"}, color: color||BLACK, breakLine: i < items.length-1, fontSize: fontSize||11, fontFace:"Calibri" }
}));
s.addText(arr, { x, y, w, h });
}
function box(s, x, y, w, h, fillColor, borderColor, text, textColor, fontSize, bold) {
s.addShape(pres.ShapeType.rect, { x, y, w, h, fill:{color:fillColor||LGRAY}, line:{color:borderColor||MGRAY, pt:1} });
if (text) s.addText(text, { x:x+0.06, y:y+0.04, w:w-0.12, h:h-0.08, fontSize:fontSize||10, bold:bold||false, color:textColor||BLACK, fontFace:"Calibri", valign:"middle", align:"center" });
}
function sectionDivider(s, title, sub, color) {
const c = color || RED;
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color:c}, line:{color:c} });
s.addText(title, { x:0.8, y:1.8, w:8.4, h:1.2, fontSize:38, bold:true, color:WHITE, fontFace:"Calibri", align:"center", valign:"middle" });
if (sub) s.addText(sub, { x:0.8, y:3.1, w:8.4, h:0.5, fontSize:16, color:"FFE8E5", fontFace:"Calibri", align:"center", italic:true });
s.addShape(pres.ShapeType.rect, { x:2.5, y:3.7, w:5.0, h:0.06, fill:{color:WHITE}, line:{color:WHITE} });
}
// ============================================================
// SLIDE 1 โ TITLE
// ============================================================
{
const s = slide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:1.8, fill:{color:RED}, line:{color:RED} });
s.addShape(pres.ShapeType.rect, { x:0, y:1.8, w:10, h:0.06, fill:{color:AMBER}, line:{color:AMBER} });
s.addText("LANGUAGE AND SPEECH DISORDERS", {
x:0.4, y:0.18, w:9.2, h:1.5, fontSize:36, bold:true, color:WHITE, fontFace:"Calibri", align:"center", valign:"middle" });
s.addText("Definitions ยท Classification ยท Neuroanatomy ยท Radiology ยท Clinical Syndromes ยท Management", {
x:0.4, y:1.95, w:9.2, h:0.4, fontSize:13, color:GRAY, fontFace:"Calibri", italic:true, align:"center" });
// Two reference boxes
[["Harrison's Principles of Internal Medicine\n22nd Edition (2025) โ McGraw Hill", 0.4],
["Bradley & Daroff's Neurology\nin Clinical Practice (2022) โ Elsevier", 5.4]].forEach(([t,x]) => {
box(s, x, 2.6, 4.6, 0.9, MRED, RED, t, DRED, 11, false);
});
s.addText("Prepared for: Clinical Neurology Teaching", { x:0.4, y:3.75, w:9.2, h:0.3, fontSize:11, color:GRAY, fontFace:"Calibri", italic:true, align:"center" });
// Brain image
if (img("brain_lobes_diagram")) {
s.addImage({ data: img("brain_lobes_diagram"), x:2.5, y:4.1, w:5.0, h:1.3, sizing:{type:"contain",w:5.0,h:1.3} });
}
footer(s);
}
// ============================================================
// SLIDE 2 โ OVERVIEW / CONTENTS
// ============================================================
{
const s = slide();
header(s, "Presentation Overview", "What we will cover today");
footer(s);
const topics = [
["Section 1", "Neuroanatomy of Language: Cortical Language Areas", RED],
["Section 2", "White Matter Tracts: Arcuate Fasciculus & Connections", ORANGE],
["Section 3", "Classification of Language Disorders", AMBER],
["Section 4", "Aphasia Syndromes: Definitions & Clinical Features", RED],
["Section 5", "Radiological Correlates: MRI & CT Findings", DRED],
["Section 6", "Speech Disorders: Dysarthria, Dysphonia, Apraxia", ORANGE],
["Section 7", "Literacy Disorders: Alexia, Agraphia (Dejerine)", PURPLE],
["Section 8", "Bedside Assessment & Clinical Approach", GREEN],
["Section 9", "Rehabilitation & Management", AMBER],
];
topics.forEach((t, i) => {
const x = i < 5 ? 0.3 : 5.3;
const y = 1.15 + (i < 5 ? i : i-5) * 0.77;
box(s, x, y, 1.0, 0.55, t[2], t[2], t[0], WHITE, 10, true);
s.addText(t[1], { x:x+1.1, y:y+0.06, w:3.7, h:0.45, fontSize:11, color:BLACK, fontFace:"Calibri", valign:"middle" });
});
}
// ============================================================
// SLIDE 3 โ SECTION DIVIDER: NEUROANATOMY
// ============================================================
{
const s = slide();
sectionDivider(s, "SECTION 1\nNeuroanatomy of Language", "Cortical Language Areas & Cerebral Localisation", RED);
}
// ============================================================
// SLIDE 4 โ CEREBRAL LOBES & LANGUAGE AREAS
// ============================================================
{
const s = slide();
header(s, "Cerebral Lobes & Language Areas", "Lateral view of the dominant (left) hemisphere");
footer(s);
if (img("brain_lobes_diagram")) {
s.addImage({ data: img("brain_lobes_diagram"), x:0.3, y:1.0, w:5.5, h:3.8, sizing:{type:"contain",w:5.5,h:3.8} });
}
const areas = [
{ name:"Frontal Lobe", role:"Broca's area (BA 44/45)\nSpeech production, syntax\nSMA: initiation", color:RED },
{ name:"Parietal Lobe", role:"Supramarginal gyrus\nAngular gyrus (BA 39)\nPhonological processing", color:ORANGE },
{ name:"Temporal Lobe", role:"Wernicke's area (BA 22)\nLanguage comprehension\nSemantic memory", color:PURPLE },
{ name:"Occipital Lobe", role:"Visual cortex (BA 17)\nVisual word recognition\nAlexia when damaged", color:GREEN },
];
areas.forEach((a, i) => {
const y = 1.1 + i * 1.06;
box(s, 6.0, y, 1.5, 0.95, a.color, a.color, a.name, WHITE, 10, true);
box(s, 7.5, y, 2.3, 0.95, LGRAY, MGRAY, a.role, DARK, 9.5, false);
});
}
// ============================================================
// SLIDE 5 โ BROCA & WERNICKE AREAS (DIAGRAM)
// ============================================================
{
const s = slide();
header(s, "Broca's & Wernicke's Areas โ Classical Language Map", "Perisylvian language network with arcuate fasciculus");
footer(s);
if (img("broca_wern_diagram")) {
s.addImage({ data: img("broca_wern_diagram"), x:0.3, y:1.0, w:5.8, h:3.9, sizing:{type:"contain",w:5.8,h:3.9} });
}
const pts = [
{ label:"BROCA'S AREA", loc:"Inferior Frontal Gyrus (BA 44, 45)", fn:"Speech production, syntactic processing, motor programming of speech", color:RED },
{ label:"WERNICKE'S AREA", loc:"Post. Sup. Temporal Gyrus (BA 22)", fn:"Auditory language comprehension, phonological decoding", color:ORANGE },
{ label:"ARCUATE FASCICULUS", loc:"White matter: temporal โ frontal", fn:"Connects Wernicke to Broca; damage โ Conduction aphasia", color:PURPLE },
{ label:"PRIMARY MOTOR CORTEX", loc:"Precentral Gyrus (BA 4)", fn:"Motor execution of speech via corticobulbar tract", color:GREEN },
];
pts.forEach((p, i) => {
const y = 1.1 + i * 1.0;
box(s, 6.2, y, 1.6, 0.88, p.color, p.color, p.label, WHITE, 9, true);
s.addText([
{text: p.loc+"\n", options:{bold:true, color:DARK, fontSize:9.5, fontFace:"Calibri"}},
{text: p.fn, options:{color:GRAY, fontSize:9, fontFace:"Calibri"}}
], { x:7.85, y:y+0.04, w:1.95, h:0.82, valign:"middle" });
});
}
// ============================================================
// SLIDE 6 โ fMRI LANGUAGE NETWORK
// ============================================================
{
const s = slide();
header(s, "Functional MRI: Language Network Lateralisation", "Broca's area (left) & Wernicke's area (right) โ resting-state fMRI");
footer(s, "Harrison's 22E (2025) | Hugging Face PMC Clinical VQA");
if (img("lang_network_fmri")) {
s.addImage({ data: img("lang_network_fmri"), x:0.3, y:1.0, w:9.4, h:4.0, sizing:{type:"contain",w:9.4,h:4.0} });
}
s.addText("fMRI shows strong LEFT hemisphere lateralization for language. Broca's area: left inferior frontal gyrus; Wernicke's area: left posterior superior temporal region. Color scale: blue = negative connectivity, red = positive connectivity.", {
x:0.3, y:5.0, w:9.4, h:0.35, fontSize:9, color:GRAY, fontFace:"Calibri", italic:true });
}
// ============================================================
// SLIDE 7 โ BRODMANN AREAS & LANGUAGE (MUC MODEL)
// ============================================================
{
const s = slide();
header(s, "Brodmann Areas & Language โ MUC Model", "MemoryโUnificationโControl model of language cortex");
footer(s, "Bradley & Daroff's Neurology in Clinical Practice");
if (img("muc_brodmann")) {
s.addImage({ data: img("muc_brodmann"), x:0.3, y:1.0, w:5.5, h:3.8, sizing:{type:"contain",w:5.5,h:3.8} });
}
const brod = [
{ area:"BA 44, 45", name:"Broca's Area", fn:"Syntactic unification, speech production", color:RED },
{ area:"BA 22", name:"Wernicke's Area", fn:"Auditory comprehension, semantic processing", color:ORANGE },
{ area:"BA 39", name:"Angular Gyrus", fn:"Reading, cross-modal language integration", color:PURPLE },
{ area:"BA 40", name:"Supramarginal Gyrus", fn:"Phonological processing, repetition pathway", color:GREEN },
{ area:"BA 6, SMA", name:"Premotor / SMA", fn:"Speech initiation, motor planning", color:AMBER },
{ area:"BA 17โ19", name:"Occipital Cortex", fn:"Visual word processing (reading/writing)", color:GRAY },
];
brod.forEach((b, i) => {
const y = 1.1 + i * 0.73;
box(s, 6.1, y, 0.85, 0.6, b.color, b.color, b.area, WHITE, 9, true);
box(s, 6.95, y, 1.3, 0.6, LGRAY, MGRAY, b.name, DARK, 9, true);
s.addText(b.fn, { x:8.28, y:y+0.05, w:1.52, h:0.5, fontSize:8.5, color:GRAY, fontFace:"Calibri", valign:"middle" });
});
}
// ============================================================
// SLIDE 8 โ SECTION: WHITE MATTER TRACTS
// ============================================================
{
const s = slide();
sectionDivider(s, "SECTION 2\nWhite Matter Tracts", "Arcuate Fasciculus & Language Connectivity", ORANGE);
}
// ============================================================
// SLIDE 9 โ ARCUATE FASCICULUS DTI
// ============================================================
{
const s = slide();
header(s, "Arcuate Fasciculus โ DTI Tractography", "The key white matter tract connecting Broca's and Wernicke's areas", ORANGE);
footer(s);
if (img("arcuate_dti_single")) {
s.addImage({ data: img("arcuate_dti_single"), x:0.3, y:1.0, w:5.5, h:3.9, sizing:{type:"contain",w:5.5,h:3.9} });
}
s.addText("ARCUATE FASCICULUS", { x:6.1, y:1.05, w:3.6, h:0.42, fontSize:14, bold:true, color:RED, fontFace:"Calibri", align:"center" });
const facts = [
"Superior longitudinal fasciculus component",
"C-shaped arc around the Sylvian fissure",
"Connects posterior temporal (Wernicke) to inferior frontal (Broca)",
"Critical for REPETITION of language",
"Disruption โ Conduction Aphasia",
"Visible on DTI as yellow-red fiber bundle",
"Predominantly LEFT hemisphere dominant",
"Absent/hypoplastic in some language disorders",
];
bullet(s, facts, 6.1, 1.55, 3.7, 3.3, DARK, 10.5);
box(s, 6.1, 4.9, 3.7, 0.45, MRED, RED, "Lesion of arcuate fasciculus โ CONDUCTION APHASIA\n(Fluent speech + intact comprehension + impaired repetition)", DRED, 9, false);
}
// ============================================================
// SLIDE 10 โ ALL LANGUAGE TRACTS DTI
// ============================================================
{
const s = slide();
header(s, "Language White Matter Tracts โ DTI Atlas", "Five key perisylvian fiber bundles", ORANGE);
footer(s);
if (img("all_tracts_dti")) {
s.addImage({ data: img("all_tracts_dti"), x:0.3, y:1.0, w:5.6, h:4.0, sizing:{type:"contain",w:5.6,h:4.0} });
}
const tracts = [
{ name:"Arcuate Fasciculus (AF)", color:"F1C40F", fn:"Wernicke โ Broca; repetition pathway" },
{ name:"Sup. Longitudinal Fasc. (SLF)", color:"E91E8C", fn:"Frontoparietal integration" },
{ name:"Inf. Fronto-Occipital Fasc. (IFOF)", color:"E74C3C", fn:"Frontal โ occipital; reading semantics" },
{ name:"Inf. Longitudinal Fasc. (ILF)", color:"27AE60", fn:"Temporal โ occipital; visual semantics" },
{ name:"Uncinate Fasciculus (UF)", color:"BDC3C7", fn:"Orbitofrontal โ anterior temporal" },
];
tracts.forEach((t, i) => {
const y = 1.15 + i * 0.86;
box(s, 6.1, y, 0.22, 0.72, t.color, t.color, "", WHITE, 9, false);
s.addText(t.name, { x:6.38, y:y+0.06, w:3.42, h:0.28, fontSize:10.5, bold:true, color:DARK, fontFace:"Calibri" });
s.addText(t.fn, { x:6.38, y:y+0.36, w:3.42, h:0.3, fontSize:9.5, color:GRAY, fontFace:"Calibri" });
});
}
// ============================================================
// SLIDE 11 โ SECTION: CLASSIFICATION
// ============================================================
{
const s = slide();
sectionDivider(s, "SECTION 3\nClassification of Language\nand Speech Disorders", "Aphasia ยท Dysarthria ยท Dysphonia ยท Alexia ยท Agraphia", AMBER);
}
// ============================================================
// SLIDE 12 โ CLASSIFICATION TABLE
// ============================================================
{
const s = slide();
header(s, "Classification: Language vs Speech Disorders", "", AMBER);
footer(s);
// Two columns
const cols = [
{ title:"LANGUAGE DISORDERS (Aphasia spectrum)", color:RED, items:[
"Involve the SYMBOL SYSTEM โ content of language",
"Reading, writing, naming, comprehension affected",
"Lesion in dominant (left) cerebral hemisphere",
"Language content ABNORMAL",
"Types: Broca, Wernicke, Global, Conduction,",
" Transcortical Motor/Sensory, Anomic,",
" Alexia, Agraphia, Subcortical aphasia"
]},
{ title:"SPEECH DISORDERS (Motor speech)", color:ORANGE, items:[
"Involve the MOTOR ACT of speaking",
"Articulation, voice, rhythm affected",
"Language CONTENT is INTACT",
"Flaccid, Spastic, Ataxic, Hypokinetic,",
" Hyperkinetic, Mixed Dysarthria",
"Dysphonia (voice disorder)",
"Apraxia of speech (motor programming)"
]}
];
cols.forEach((c, i) => {
const x = i === 0 ? 0.3 : 5.2;
box(s, x, 1.05, 4.5, 0.45, c.color, c.color, c.title, WHITE, 11, true);
box(s, x, 1.5, 4.5, 3.5, LGRAY, MGRAY, null, BLACK, 10, false);
bullet(s, c.items, x+0.15, 1.58, 4.3, 3.35, DARK, 10.5);
});
// Middle
s.addText("โ ", { x:4.8, y:2.8, w:0.4, h:0.6, fontSize:28, bold:true, color:RED, fontFace:"Calibri", align:"center" });
// Key distinguisher
box(s, 0.3, 5.05, 9.4, 0.35, MRED, RED,
"KEY: Aphasia = abnormal language content | Dysarthria = normal content, abnormal motor output | Both โ Psychogenic mutism",
DRED, 9.5, false);
}
// ============================================================
// SLIDE 13 โ DEFINITION OF APHASIA
// ============================================================
{
const s = slide();
header(s, "Aphasia โ Definition & Bedside Testing", "Acquired language disorder from dominant hemisphere damage");
footer(s);
box(s, 0.3, 1.0, 9.4, 1.0, MRED, RED, null, BLACK, 10, false);
s.addText([
{text:"DEFINITION: ", options:{bold:true, color:RED, fontSize:13, fontFace:"Calibri"}},
{text:"Aphasia is an ACQUIRED disorder of LANGUAGE caused by brain damage, affecting the ability to speak, understand, read, or write โ in a person who previously had intact language function. It results from injury to the language-dominant (usually left) hemisphere.\n", options:{color:DARK, fontSize:12, fontFace:"Calibri"}},
{text:"โ Bradley & Daroff's Neurology in Clinical Practice", options:{italic:true, color:GRAY, fontSize:10, fontFace:"Calibri"}}
], { x:0.5, y:1.04, w:9.0, h:0.92, valign:"middle" });
// 4 Domain boxes
const domains = [
{ d:"FLUENCY", desc:"Rate, effort, phrase length, prosody of spontaneous speech\nFluent vs Non-fluent is the first branch in classification", color:RED },
{ d:"COMPREHENSION", desc:"Understanding spoken language\nTested: yes/no questions, point-to commands", color:ORANGE },
{ d:"REPETITION", desc:"Repeat 'No ifs, ands, or buts'\nTests integrity of arcuate fasciculus", color:PURPLE },
{ d:"NAMING", desc:"Anomia = universal in aphasia\nConfrontation naming: 'What is this called?'", color:GREEN },
];
domains.forEach((d, i) => {
const x = 0.3 + i * 2.38;
box(s, x, 2.1, 2.22, 0.45, d.color, d.color, d.d, WHITE, 11, true);
box(s, x, 2.55, 2.22, 1.35, LGRAY, MGRAY, d.desc, DARK, 9.5, false);
});
box(s, 0.3, 4.0, 4.3, 0.6, MRED, RED,
"Bedside Test: 'Repeat after me โ No ifs, ands, or buts'\n(Tests all 3: fluency, repetition, motor speech)", DRED, 10, false);
box(s, 4.75, 4.0, 5.0, 0.6, LGRAY, MGRAY,
"Writing sample: always obtain โ reveals mild aphasia\nNaming: 'body parts, pen, watch, coin'\nReading: newspaper headline aloud + comprehension", DARK, 10, false);
}
// ============================================================
// SLIDE 14 โ SECTION: APHASIA SYNDROMES
// ============================================================
{
const s = slide();
sectionDivider(s, "SECTION 4\nAphasia Syndromes", "Clinical Features ยท Lesion Sites ยท Radiological Correlates", RED);
}
// ============================================================
// SLIDE 15 โ BROCA APHASIA (clinical + MRI)
// ============================================================
{
const s = slide();
header(s, "Broca's Aphasia โ Expressive (Non-fluent) Aphasia", "Paul Broca, 1861 โ Patient 'Tan' (Leborgne)");
footer(s);
if (img("broca_mri_sagittal")) {
s.addImage({ data: img("broca_mri_sagittal"), x:6.5, y:1.0, w:3.3, h:2.5, sizing:{type:"contain",w:3.3,h:2.5} });
s.addText("T2 MRI โ Sagittal\nLeft inferior frontal gyrus encephalomalacia\n(chronic Broca area infarct)", { x:6.5, y:3.5, w:3.3, h:0.65, fontSize:8.5, color:GRAY, fontFace:"Calibri", italic:true, align:"center" });
}
const rows = [
["Fluency", "NON-FLUENT; telegraphic; agrammatic; effortful", RED],
["Comprehension", "Relatively INTACT (complex syntax mildly โ)", GREEN],
["Repetition", "IMPAIRED", RED],
["Naming", "Impaired โ tip-of-tongue; phonemic paraphasias", ORANGE],
["Writing", "Dysmorphic, dysgrammatic", ORANGE],
["Reading", "Often impaired (third alexia)", ORANGE],
["Motor signs", "RIGHT HEMIPARESIS (contralateral)", RED],
["Lesion", "Inferior frontal gyrus โ Broca area (BA 44/45)", DARK],
["Vascular", "Left MCA superior division โ frontal branches", DARK],
["Behaviour", "AWARE โ frustrated, depressed, insight preserved", PURPLE],
];
rows.forEach((r, i) => {
const y = 1.1 + i * 0.41;
box(s, 0.3, y, 1.9, 0.38, LGRAY, MGRAY, r[0], DARK, 10, true);
box(s, 2.2, y, 4.1, 0.38, WHITE, MGRAY, r[1], r[2], 10, false);
});
}
// ============================================================
// SLIDE 16 โ BROCA APHASIA CT + FLAIR
// ============================================================
{
const s = slide();
header(s, "Broca's Aphasia โ CT & MRI Imaging", "Left frontal/inferior frontal lesion โ Broca area");
footer(s, "Diagnostic neuroimaging โ PMC Clinical VQA database");
s.addText("CT Scan โ Broca (left) vs Wernicke (right) aphasia comparison", {
x:0.3, y:0.85, w:9.4, h:0.3, fontSize:11, color:GRAY, fontFace:"Calibri", italic:true });
if (img("broca_ct")) {
s.addImage({ data: img("broca_ct"), x:0.3, y:1.15, w:5.8, h:2.8, sizing:{type:"contain",w:5.8,h:2.8} });
}
s.addText("CT: Chronic ischaemic infarction โ left inferior frontal gyrus (Broca area). Cortical loss and left lateral ventricle widening indicate established stroke.", {
x:0.3, y:3.95, w:5.8, h:0.5, fontSize:9, color:GRAY, fontFace:"Calibri", italic:true });
if (img("broca_mri_flair")) {
s.addImage({ data: img("broca_mri_flair"), x:6.3, y:1.15, w:3.5, h:2.8, sizing:{type:"contain",w:3.5,h:2.8} });
}
s.addText("MRI FLAIR/DWI: Wedge-shaped hyperintense lesion left parietal lobe โ acute ischaemic infarction (venous infarct) presenting with Broca's aphasia", {
x:6.3, y:3.95, w:3.5, h:0.5, fontSize:9, color:GRAY, fontFace:"Calibri", italic:true });
}
// ============================================================
// SLIDE 17 โ WERNICKE APHASIA
// ============================================================
{
const s = slide();
header(s, "Wernicke's Aphasia โ Receptive (Fluent) Aphasia", "Carl Wernicke, 1874 โ Posterior superior temporal gyrus");
footer(s);
if (img("wernicke_ct_hemor")) {
s.addImage({ data: img("wernicke_ct_hemor"), x:6.5, y:1.0, w:3.3, h:2.5, sizing:{type:"contain",w:3.3,h:2.5} });
s.addText("CT scan: Hyperdense lesion in left temporal lobe โ Wernicke's area โ acute haemorrhagic stroke causing receptive aphasia", { x:6.5, y:3.5, w:3.3, h:0.65, fontSize:8.5, color:GRAY, fontFace:"Calibri", italic:true, align:"center" });
}
const rows = [
["Fluency", "FLUENT; logorrheic; jargon; paraphasic", GREEN],
["Comprehension", "IMPAIRED โ often severely", RED],
["Repetition", "IMPAIRED", RED],
["Naming", "Impaired โ bizarre verbal paraphasias/neologisms", RED],
["Writing", "Well-formed but paragraphic (spelling errors)", ORANGE],
["Reading", "Impaired โ comprehension and aloud", RED],
["Motor signs", "Usually ABSENT; ยฑ right hemianopia", GREEN],
["Lesion", "Post. superior temporal gyrus (BA 22) + inf. parietal", DARK],
["Vascular", "Left MCA inferior division โ temporal branches", DARK],
["Behaviour", "Often UNAWARE; paranoid; unconcerned (anosognosia)", PURPLE],
];
rows.forEach((r, i) => {
const y = 1.1 + i * 0.41;
box(s, 0.3, y, 1.9, 0.38, LGRAY, MGRAY, r[0], DARK, 10, true);
box(s, 2.2, y, 4.1, 0.38, WHITE, MGRAY, r[1], r[2], 10, false);
});
}
// ============================================================
// SLIDE 18 โ WERNICKE MRI LESION OVERLAP
// ============================================================
{
const s = slide();
header(s, "Wernicke's Aphasia โ MRI Lesion Overlap Map", "12-patient lesion overlap: posterior superior temporal โ angular gyrus", ORANGE);
footer(s, "Diagnostic neuroimaging โ PMC Clinical VQA database");
if (img("wernicke_overlap")) {
s.addImage({ data: img("wernicke_overlap"), x:1.0, y:1.0, w:8.0, h:4.0, sizing:{type:"contain",w:8.0,h:4.0} });
}
s.addText("Lesion overlap from 12 Wernicke's aphasia patients. Maximal overlap (red/orange) concentrated in posterior superior temporal lobe, extending to angular gyrus and temporoparietal junction โ classic Wernicke territory. Left MCA inferior division.", {
x:0.3, y:5.0, w:9.4, h:0.35, fontSize:9, color:GRAY, fontFace:"Calibri", italic:true });
}
// ============================================================
// SLIDE 19 โ GLOBAL APHASIA
// ============================================================
{
const s = slide();
header(s, "Global Aphasia โ Most Severe Form", "All language modalities severely impaired โ large left MCA territory");
footer(s);
if (img("global_aphasia_mri")) {
s.addImage({ data: img("global_aphasia_mri"), x:5.7, y:0.95, w:4.1, h:3.0, sizing:{type:"contain",w:4.1,h:3.0} });
s.addText("MRI DWI/FLAIR: Large left MCA territory infarction. Hyperintense lesion involving both frontal (Broca) and temporal (Wernicke) regions. Causing global aphasia.", { x:5.7, y:3.95, w:4.1, h:0.5, fontSize:8.5, color:GRAY, fontFace:"Calibri", italic:true, align:"center" });
}
const features = [
["Fluency", "NON-FLUENT or MUTE; stereotypic utterances only", RED],
["Comprehension", "SEVERELY IMPAIRED", RED],
["Repetition", "SEVERELY IMPAIRED", RED],
["Naming", "Severely impaired", RED],
["Reading/Writing", "Both severely impaired", RED],
["Motor signs", "RIGHT HEMIPLEGIA + hemisensory loss + hemianopia", RED],
["Lesion", "Large left hemisphere โ both Broca + Wernicke territory", DARK],
["Prognosis", "POOR โ worst outcome of all aphasia types", DRED],
];
features.forEach((r, i) => {
const y = 1.1 + i * 0.47;
box(s, 0.3, y, 1.9, 0.43, LGRAY, MGRAY, r[0], DARK, 10, true);
box(s, 2.2, y, 3.3, 0.43, WHITE, MGRAY, r[1], r[2], 10, false);
});
}
// ============================================================
// SLIDE 20 โ CONDUCTION APHASIA
// ============================================================
{
const s = slide();
header(s, "Conduction Aphasia โ Arcuate Fasciculus Lesion", "Wernicke (1874) & Geschwind (disconnection hypothesis)", PURPLE);
footer(s);
box(s, 0.3, 1.02, 9.4, 0.75, MPURP, PURPLE,
"DEFINITION: Fluent speech + relatively intact comprehension + SEVERELY impaired repetition. Caused by disconnection of Wernicke's area from Broca's area via the arcuate fasciculus. The key feature is repetition impaired out of proportion to other deficits.",
DARK, 10.5, false);
const rows = [
["Fluency", "FLUENT; phonemic paraphasias", GREEN],
["Comprehension", "Relatively INTACT", GREEN],
["Repetition", "SEVERELY IMPAIRED โ disproportionate", RED],
["Naming", "Impaired โ phonemic paraphasias", ORANGE],
["Motor signs", "Usually absent; mild right arm weakness", GREEN],
["Lesion", "Arcuate fasciculus / Supramarginal gyrus (BA 40)", DARK],
["Vascular", "Left MCA โ parietal branches, post. Sylvian", DARK],
["Key behaviour", "Conduit d'approche: repeated self-correction toward target", PURPLE],
];
rows.forEach((r, i) => {
const y = 1.85 + i * 0.42;
box(s, 0.3, y, 1.9, 0.39, LGRAY, MGRAY, r[0], DARK, 10, true);
box(s, 2.2, y, 7.2, 0.39, WHITE, MGRAY, r[1], r[2], 10, false);
});
if (img("arcuate_dti_single")) {
s.addImage({ data: img("arcuate_dti_single"), x:7.5, y:1.85, w:2.3, h:2.0, sizing:{type:"contain",w:2.3,h:2.0} });
s.addText("DTI: Arcuate fasciculus โ lesion here โ conduction aphasia", { x:7.5, y:3.85, w:2.3, h:0.35, fontSize:7.5, color:GRAY, fontFace:"Calibri", italic:true, align:"center" });
}
}
// ============================================================
// SLIDE 21 โ TRANSCORTICAL APHASIA (MOTOR + SENSORY)
// ============================================================
{
const s = slide();
header(s, "Transcortical Aphasias โ Intact Repetition", "Watershed territory lesions โ INTACT repetition is the hallmark", AMBER);
footer(s, "Lichtheim (1885) | Bradley & Daroff's Neurology");
s.addText("KEY RULE: INTACT REPETITION = Transcortical Aphasia (watershed ischaemia โ hypotension, cardiac arrest)", {
x:0.3, y:0.88, w:9.4, h:0.3, fontSize:11, bold:true, color:RED, fontFace:"Calibri", align:"center" });
const tcs = [
{
name:"TRANSCORTICAL MOTOR (TCM)", color:RED,
rows:[
["Fluency", "NON-FLUENT; reduced initiation; latency"],
["Comprehension", "INTACT"],
["Repetition", "INTACT โ โ hallmark"],
["Lesion", "Ant/sup to Broca; SMA; ACA watershed"],
["Cause", "ACA infarct; hypotension; cardiac arrest"],
["Behaviour", "Apathy, abulia โ frontal lobe syndrome"],
]
},
{
name:"TRANSCORTICAL SENSORY (TCS)", color:PURPLE,
rows:[
["Fluency", "FLUENT; echolalic; semantic paraphasias"],
["Comprehension", "IMPAIRED"],
["Repetition", "INTACT โ โ with pronounced ECHOLALIA"],
["Lesion", "Post. watershed: temporal-parietal-occipital jct"],
["Cause", "MCAโPCA watershed ischaemia"],
["Behaviour", "Echolalia, unaware, repeats examiner verbatim"],
]
}
];
tcs.forEach((t, i) => {
const x = i === 0 ? 0.3 : 5.2;
box(s, x, 1.22, 4.5, 0.42, t.color, t.color, t.name, WHITE, 11, true);
t.rows.forEach((r, ri) => {
const y = 1.64 + ri * 0.56;
box(s, x, y, 1.5, 0.53, LGRAY, MGRAY, r[0], DARK, 10, true);
box(s, x+1.5, y, 3.0, 0.53, WHITE, MGRAY, r[1],
r[1].includes("INTACT") || r[1].includes("โ") ? GREEN : r[1].includes("IMPAIRED") || r[1].includes("NON-FLUENT") ? RED : DARK, 10, false);
});
});
}
// ============================================================
// SLIDE 22 โ ANOMIC APHASIA + SUBCORTICAL
// ============================================================
{
const s = slide();
header(s, "Anomic & Subcortical Aphasia", "Most common residual + basal ganglia/thalamic aphasia");
footer(s);
const two = [
{
name:"ANOMIC APHASIA (Amnesic)", color:GREEN, x:0.3,
def:"Most BENIGN aphasia; often residual from recovery of any type. Isolated word-finding difficulty with otherwise preserved language.",
rows:[
["Fluency", "Fluent โ circumlocutory"],
["Comprehension", "INTACT"],
["Repetition", "INTACT"],
["Naming", "IMPAIRED โ hallmark; anomia"],
["Motor signs", "Usually absent"],
["Lesion", "Angular gyrus (BA 39) or variable temporal"],
]
},
{
name:"SUBCORTICAL APHASIA", color:AMBER, x:5.2,
def:"Thalamic or striatal lesions causing aphasia not fitting classic cortical patterns. Hypophonic, fluctuating, prominent anomia.",
rows:[
["Fluency", "Variable โ often hypophonic"],
["Comprehension", "Variably impaired"],
["Repetition", "Variable"],
["Naming", "IMPAIRED โ anomia prominent"],
["Motor signs", "Right hemiparesis (capsular)"],
["Lesion", "Thalamus, caudate, putamen, internal capsule"],
]
}
];
two.forEach(t => {
box(s, t.x, 1.05, 4.5, 0.42, t.color, t.color, t.name, WHITE, 11, true);
s.addText(t.def, { x:t.x+0.1, y:1.5, w:4.3, h:0.58, fontSize:10, color:GRAY, fontFace:"Calibri", italic:true, valign:"middle" });
t.rows.forEach((r, ri) => {
const y = 2.1 + ri * 0.5;
box(s, t.x, y, 1.4, 0.46, LGRAY, MGRAY, r[0], DARK, 10, true);
box(s, t.x+1.4, y, 3.1, 0.46, WHITE, MGRAY, r[1],
r[1].includes("INTACT") ? GREEN : r[1].includes("IMPAIRED") ? RED : DARK, 10, false);
});
});
}
// ============================================================
// SLIDE 23 โ MASTER COMPARISON TABLE
// ============================================================
{
const s = slide();
header(s, "Aphasia Syndromes โ Master Comparison Table", "The 4 key diagnostic domains: Fluency ยท Comprehension ยท Repetition ยท Lesion");
footer(s);
const cols = ["Syndrome", "Fluency", "Comprehension", "Repetition", "Key Feature", "Lesion"];
const colW = [1.55, 0.95, 1.4, 1.1, 2.3, 2.5];
const colX = [0.2, 1.75, 2.7, 4.1, 5.2, 7.5];
const rows = [
["BROCA", "Non-fluent", "Intact*", "Impaired", "Agrammatism; R hemiparesis", "Inf. frontal (BA 44/45)"],
["WERNICKE", "Fluent", "IMPAIRED", "Impaired", "Jargon; unaware; paraphasias","Post. sup. temporal (BA 22)"],
["GLOBAL", "Non-fluent", "IMPAIRED", "Impaired", "All modalities severe; mute", "Large left MCA territory"],
["CONDUCTION", "Fluent", "Intact", "SEVERELYโ", "Conduit d'approche; phonemic","Arcuate fasciculus/supraMarg"],
["TCM", "Non-fluent", "Intact", "INTACT โ", "Apathy; abulia; echolaliaยฑ", "Ant/sup Broca; SMA; ACA wsh"],
["TCS", "Fluent", "IMPAIRED", "INTACT โ", "Echolalia; unaware", "Post. watershed TPC jct"],
["ANOMIC", "Fluent", "Intact", "Intact", "Circumlocution; tip-of-tongue","Angular gyrus / variable"],
["SUBCORTICAL", "Hypophonic", "Variable", "Variable", "Fluctuating; hypophonia", "Thalamus/striatum/capsule"],
];
const hY = 1.08;
cols.forEach((c, ci) => {
box(s, colX[ci], hY, colW[ci], 0.4, RED, RED, c, WHITE, 9.5, true);
});
rows.forEach((row, ri) => {
const rowY = 1.48 + ri * 0.47;
const fill = ri % 2 === 0 ? WHITE : LGRAY;
row.forEach((cell, ci) => {
s.addShape(pres.ShapeType.rect, { x:colX[ci], y:rowY, w:colW[ci], h:0.44, fill:{color:fill}, line:{color:MGRAY, pt:0.5} });
const clr = cell.includes("INTACT") || cell.includes("โ") ? GREEN
: cell.includes("IMPAIRED") || cell.includes("Non-fluent") || cell.includes("SEVERELY") ? RED
: cell.includes("Variable") ? AMBER : ci===0 ? RED : DARK;
s.addText(cell, { x:colX[ci]+0.04, y:rowY+0.03, w:colW[ci]-0.08, h:0.38, fontSize:ci===0?10:9, bold:ci===0, color:clr, fontFace:"Calibri", valign:"middle" });
});
});
}
// ============================================================
// SLIDE 24 โ SECTION: SPEECH DISORDERS
// ============================================================
{
const s = slide();
sectionDivider(s, "SECTION 5\nSpeech Disorders", "Dysarthria ยท Dysphonia ยท Apraxia of Speech", ORANGE);
}
// ============================================================
// SLIDE 25 โ DYSARTHRIA TYPES TABLE
// ============================================================
{
const s = slide();
header(s, "Dysarthria โ Classification & Localization", "Motor speech disorder: language content INTACT, motor output impaired", ORANGE);
footer(s, "Bradley & Daroff's Neurology in Clinical Practice | Harrison's 22E");
const head = ["Type", "Lesion Site", "Speech Quality", "Clinical Cause", "Associated Signs"];
const rows = [
["FLACCID", "LMN / Brainstem / cranial nerves", "Nasal, breathy, hypophonic, weak", "Bulbar palsy, GBS, MG, ALS (LMN)", "Fasciculations, wasting, nasal regurg"],
["SPASTIC", "Bilateral UMN / corticobulbar", "Strained, strangled, slow, harsh", "Pseudobulbar palsy, bilateral strokes","Brisk jaw jerk, emotional lability"],
["ATAXIC", "Cerebellum", "Scanning, irregular rhythm, explosive", "MS, cerebellar ataxia, alcohol", "Ataxia, nystagmus, intention tremor"],
["HYPOKINETIC", "Basal ganglia (Substantia nigra)", "Rapid (festinant), monotone, hypophonic", "Parkinson's disease", "Rigidity, tremor, mask facies"],
["HYPERKINETIC","Basal ganglia / extrapyramidal", "Variable rate/volume, involuntary outbursts","Huntington's, dystonia, Sydenham's", "Chorea, dystonia, tics"],
["MIXED", "Multiple levels (UMN + LMN)", "Combined features (nasal + strained)", "ALS / Motor Neuron Disease", "Both UMN and LMN signs together"],
];
const colW2 = [1.3, 2.1, 2.1, 1.95, 2.3];
const colX2 = [0.2, 1.5, 3.6, 5.7, 7.65];
head.forEach((h, ci) => {
box(s, colX2[ci], 1.08, colW2[ci], 0.42, ORANGE, ORANGE, h, WHITE, 9.5, true);
});
rows.forEach((row, ri) => {
const ry = 1.5 + ri * 0.62;
const fill = ri % 2 === 0 ? WHITE : LGRAY;
row.forEach((cell, ci) => {
s.addShape(pres.ShapeType.rect, { x:colX2[ci], y:ry, w:colW2[ci], h:0.59, fill:{color:fill}, line:{color:MGRAY, pt:0.5} });
s.addText(cell, { x:colX2[ci]+0.04, y:ry+0.04, w:colW2[ci]-0.08, h:0.51, fontSize:ci===0?10:9, bold:ci===0, color:ci===0?RED:DARK, fontFace:"Calibri", valign:"middle" });
});
});
}
// ============================================================
// SLIDE 26 โ SECTION: LITERACY DISORDERS
// ============================================================
{
const s = slide();
sectionDivider(s, "SECTION 6\nLiteracy Disorders", "Alexia & Agraphia โ Dejerine's Syndromes (1891 & 1892)", PURPLE);
}
// ============================================================
// SLIDE 27 โ DEJERINE SYNDROMES (ALEXIA) + PCA IMAGE
// ============================================================
{
const s = slide();
header(s, "Alexia โ Dejerine's Literacy Syndromes", "Pure Alexia without Agraphia (1892) vs Alexia with Agraphia (1891)", PURPLE);
footer(s, "Dejerine J (1891, 1892) | Bradley & Daroff's Neurology in Clinical Practice");
if (img("pca_mri_flair")) {
s.addImage({ data: img("pca_mri_flair"), x:7.0, y:1.05, w:2.8, h:2.5, sizing:{type:"contain",w:2.8,h:2.5} });
s.addText("Left PCA territory infarction: thalamus + medial occipital cortex โ pure alexia without agraphia", { x:7.0, y:3.55, w:2.8, h:0.5, fontSize:8, color:GRAY, fontFace:"Calibri", italic:true, align:"center" });
}
const dej = [
{
title:"PURE ALEXIA WITHOUT AGRAPHIA", year:"Dejerine 1892", color:RED,
items:[
"CAN write normally โ CANNOT read own writing",
"'Linguistic blindfolding' โ letters look like random symbols",
"Oral language (speech + comprehension) INTACT",
"Letter-by-letter reading in recovery phase",
"RIGHT HOMONYMOUS HEMIANOPIA โ virtually always present",
"COLOUR ANOMIA โ cannot name colours",
"LESION: Left medial occipital + splenium of corpus callosum",
"VASCULAR: Left posterior cerebral artery (PCA) territory",
"MECHANISM: Geschwind disconnection โ right visual cortex\n cannot transfer info to left hemisphere language areas",
]
},
{
title:"ALEXIA WITH AGRAPHIA", year:"Dejerine 1891", color:PURPLE,
items:[
"CANNOT read AND cannot write โ 'acquired illiteracy'",
"Oral language relatively preserved",
"Often mild fluent paraphasic speech",
"No hemiparesis typically",
"GERSTMANN SYNDROME common:",
" โข Finger agnosia โข Acalculia",
" โข Left-right disorientation โข Agraphia",
"LESION: Angular gyrus (BA 39), left inferior parietal lobule",
"VASCULAR: Left MCA inferior parietal branches",
]
}
];
dej.forEach((d, i) => {
const x = i === 0 ? 0.3 : 3.7;
box(s, x, 1.05, 3.2, 0.42, d.color, d.color, `${d.title}\n${d.year}`, WHITE, 9.5, true);
bullet(s, d.items, x+0.1, 1.5, 3.05, 3.85, DARK, 9.5);
});
}
// ============================================================
// SLIDE 28 โ CLINICAL APPROACH FLOWCHART
// ============================================================
{
const s = slide();
header(s, "Clinical Approach to Language & Speech Disorder", "Bedside algorithm โ Flowchart");
footer(s);
function fBox(x, y, w, h, text, fill, border, tc, fs) {
s.addShape(pres.ShapeType.rect, { x, y, w, h, fill:{color:fill||LGRAY}, line:{color:border||MGRAY, pt:1} });
s.addText(text, { x:x+0.05, y:y+0.04, w:w-0.1, h:h-0.08, fontSize:fs||10, bold:true, color:tc||BLACK, fontFace:"Calibri", align:"center", valign:"middle" });
}
function arrow(x, y1, y2) {
s.addShape(pres.ShapeType.line, { x, y:y1, w:0, h:y2-y1, line:{color:RED, pt:1.5} });
s.addText("โผ", { x:x-0.1, y:y2-0.15, w:0.22, h:0.18, fontSize:8, color:RED, fontFace:"Calibri" });
}
function hArrow(x1, y, x2) {
s.addShape(pres.ShapeType.line, { x:x1, y, w:x2-x1, h:0, line:{color:RED, pt:1.2} });
s.addText(x2>x1?"โบ":"โ", { x:x2>x1?x2-0.15:x2, y:y-0.1, w:0.18, h:0.18, fontSize:8, color:RED, fontFace:"Calibri" });
}
fBox(3.4, 1.0, 3.2, 0.42, "Communication Difficulty", LGRAY, RED, RED, 11);
arrow(5.0, 1.42, 1.78);
fBox(3.4, 1.78, 3.2, 0.42, "Language content abnormal?", LGRAY, RED, DARK, 10);
s.addText("NO โ", { x:6.65, y:1.88, w:0.6, h:0.22, fontSize:9, bold:true, color:RED, fontFace:"Calibri" });
hArrow(6.65, 1.99, 7.5);
fBox(7.5, 1.78, 2.3, 0.42, "SPEECH DISORDER\n(Dysarthria / Dysphonia)", MORAN, ORANGE, ORANGE, 9);
s.addText("YES", { x:5.05, y:2.24, w:0.5, h:0.18, fontSize:9, bold:true, color:GREEN, fontFace:"Calibri" });
arrow(5.0, 2.2, 2.55);
fBox(3.4, 2.55, 3.2, 0.42, "Is speech FLUENT?", LGRAY, RED, DARK, 10);
// Non-fluent left
s.addText("NON-FLUENT", { x:1.0, y:2.65, w:1.4, h:0.22, fontSize:8.5, bold:true, color:RED, fontFace:"Calibri" });
hArrow(3.4, 2.76, 2.2);
s.addShape(pres.ShapeType.line, { x:2.2, y:2.76, w:0, h:0.37, line:{color:RED, pt:1.2} });
fBox(0.3, 3.13, 3.8, 0.42, "Repetition intact?", LGRAY, ORANGE, DARK, 10);
fBox(0.3, 3.68, 1.8, 0.38, "YES โ TCM", MORAN, ORANGE, ORANGE, 9);
fBox(2.2, 3.68, 1.9, 0.38, "NO โ BROCA / GLOBAL", MRED, RED, RED, 9);
// Fluent right
s.addText("FLUENT", { x:6.7, y:2.65, w:0.8, h:0.22, fontSize:8.5, bold:true, color:GREEN, fontFace:"Calibri" });
hArrow(6.6, 2.76, 7.5);
s.addShape(pres.ShapeType.line, { x:7.5, y:2.76, w:0, h:0.37, line:{color:RED, pt:1.2} });
fBox(5.9, 3.13, 3.8, 0.42, "Comprehension intact?", LGRAY, PURPLE, DARK, 10);
fBox(5.9, 3.68, 1.8, 0.38, "YES: check repetition", LGRAY, GREEN, GREEN, 9);
fBox(7.8, 3.68, 1.9, 0.38, "NO โ WERNICKE / TCS", MPURP, PURPLE, PURPLE, 9);
// Bottom legend
fBox(0.3, 4.2, 2.1, 0.38, "Fluent + Intact + โโโ Rep\n= CONDUCTION", MRED, RED, RED, 8.5);
fBox(2.55, 4.2, 2.1, 0.38, "Fluent + Intact + Intact Rep\n= ANOMIC", MGREEN, GREEN, GREEN, 8.5);
fBox(4.8, 4.2, 2.1, 0.38, "Non-fluent + Intact + Intact\n= TRANSCORTICAL MOTOR", MORAN, ORANGE, ORANGE, 8.5);
fBox(7.05, 4.2, 2.65, 0.38, "All 3 impaired + Non-fluent\n= GLOBAL APHASIA", MRED, DRED, DRED, 8.5);
}
// ============================================================
// SLIDE 29 โ REHABILITATION & MANAGEMENT
// ============================================================
{
const s = slide();
header(s, "Rehabilitation & Management of Aphasia", "Acute, sub-acute and chronic phase management");
footer(s, "Harrison's Principles of Internal Medicine 22E (2025) | Bradley & Daroff's Neurology");
const phases = [
{
phase:"ACUTE PHASE", color:RED,
items:[
"Treat underlying cause: stroke thrombolysis/thrombectomy, tumour, abscess",
"CT/MRI brain: define lesion, establish aetiology",
"Multidisciplinary team: neurology + speech & language therapy (SLT)",
"Communication aids: writing board, picture cards, AAC devices",
"Nil by mouth assessment if dysphagia present (SALT assessment)",
]
},
{
phase:"SPECIFIC THERAPY", color:ORANGE,
items:[
"Speech & Language Therapy (SLT): cornerstone of aphasia rehabilitation",
"Melodic Intonation Therapy (MIT): for Broca's aphasia โ uses melody/rhythm",
"Constraint-Induced Language Therapy (CILT): intensive practice",
"Semantic Feature Analysis (SFA): for anomic aphasia",
"Technology: tablet-based apps, AAC devices for severe global aphasia",
]
},
{
phase:"ADJUNCT TREATMENTS", color:PURPLE,
items:[
"Transcranial Direct Current Stimulation (tDCS): emerging evidence",
"Repetitive TMS (rTMS): inhibit right hemisphere suppressing left recovery",
"Pharmacotherapy: memantine, donepezil (limited evidence)",
"Psychological support: depression is common in Broca's aphasia",
"Family/carer training: communication strategies at home",
]
}
];
phases.forEach((p, i) => {
const y = 1.06 + i * 1.42;
box(s, 0.3, y, 2.0, 1.28, p.color, p.color, p.phase, WHITE, 11, true);
bullet(s, p.items, 2.4, y+0.04, 7.4, 1.2, DARK, 10.5);
s.addShape(pres.ShapeType.rect, { x:0.3, y:y+1.28, w:9.4, h:0.04, fill:{color:MGRAY}, line:{color:MGRAY} });
});
}
// ============================================================
// SLIDE 30 โ REFERENCES
// ============================================================
{
const s = slide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:0.75, fill:{color:RED}, line:{color:RED} });
s.addText("REFERENCES", { x:0.3, y:0.06, w:9.4, h:0.63, fontSize:24, bold:true, color:WHITE, fontFace:"Calibri", valign:"middle" });
s.addShape(pres.ShapeType.rect, { x:0, y:0.75, w:10, h:0.05, fill:{color:AMBER}, line:{color:AMBER} });
const refs = [
"1. Longo DL, Fauci AS, et al. Harrison's Principles of Internal Medicine, 22nd Edition (2025). Chapter on Language Disorders. McGraw Hill Medical.",
"2. Bradley WG, Daroff RB, et al. Bradley and Daroff's Neurology in Clinical Practice, 8th Edition (2022). Chapter 13: Aphasia and Related Disorders. Elsevier.",
"3. Broca P. Remarques sur le siรจge de la facultรฉ du langage articulรฉ. Bulletin de la Sociรฉtรฉ Anatomique de Paris. 1861;6:330โ357.",
"4. Wernicke C. Der Aphasische Symptomencomplex: Eine Psychologische Studie auf Anatomischer Basis. Breslau: Cohn & Weigert; 1874.",
"5. Dejerine J. Sur un cas de cรฉcitรฉ verbale avec agraphie, suivi d'autopsie. Comptes Rendus de la Sociรฉtรฉ de Biologie. 1891.",
"6. Dejerine J. Contribution ร l'รฉtude anatomoclinique et clinique des diffรฉrentes variรฉtรฉs de cรฉcitรฉ verbale. Comptes Rendus de la Sociรฉtรฉ de Biologie. 1892.",
"7. Geschwind N. Disconnexion syndromes in animals and man. Brain. 1965;88:237โ294.",
"8. Lichtheim L. On aphasia. Brain. 1885;7:433โ484.",
"9. Kreisler A, et al. The anatomy of aphasia revisited. Neurology. 2000;54:1117โ1123.",
"10. Radiological images: PMC Clinical VQA dataset (Hugging Face). MedPix-VQA database. Used for educational purposes.",
];
refs.forEach((r, i) => {
const isBold = i < 2;
s.addText(r, { x:0.3, y:0.9+i*0.46, w:9.4, h:0.43, fontSize:10.5, bold:isBold, color:i<2?BLACK:GRAY, fontFace:"Calibri", valign:"middle" });
});
}
// โโ Write โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
console.log("Writing file...");
pres.writeFile({ fileName: "/tmp/Lang_Speech_30Slides.pptx" })
.then(() => {
execSync("cp /tmp/Lang_Speech_30Slides.pptx /home/daytona/workspace/speech-language-ppt/Lang_Speech_30Slides.pptx");
console.log("DONE โ /home/daytona/workspace/speech-language-ppt/Lang_Speech_30Slides.pptx");
}).catch(e => console.error("PPT error:", e));
cd /home/daytona/workspace/speech-language-ppt && node build_30slides.js 2>&1
ls -lh /home/daytona/workspace/speech-language-ppt/Lang_Speech_30Slides.pptx
Lang Speech 30Slides
Presentation ยท PPTX
| # | Slide | Content |
|---|---|---|
| 1 | Title Slide | Full title, references, brain lobes image |
| 2 | Contents | All 9 sections with colour labels |
| 3 | Section divider | Neuroanatomy |
| 4 | Cerebral Lobes & Language Areas | Brain lobe diagram with functional roles |
| 5 | Broca's & Wernicke's Areas | Classical language map diagram with arcuate fasciculus |
| 6 | fMRI Language Network | resting-state fMRI showing L hemisphere lateralisation |
| 7 | Brodmann Areas โ MUC Model | BA 44/45, 22, 39, 40, 6, 17โ19 with functions |
| 8 | Section divider | White Matter Tracts |
| 9 | Arcuate Fasciculus โ DTI | DTI tractography image + key facts |
| 10 | All Language Tracts | AF, SLF, IFOF, ILF, Uncinate โ DTI atlas |
| 11 | Section divider | Classification |
| 12 | Language vs Speech Classification | Side-by-side table |
| 13 | Definition of Aphasia | 4 domains + bedside tests |
| 14 | Section divider | Aphasia Syndromes |
| 15 | Broca's Aphasia | Clinical features + T2 MRI sagittal |
| 16 | Broca's โ CT & FLAIR | CT chronic infarct + MRI FLAIR/DWI |
| 17 | Wernicke's Aphasia | Clinical features + CT haemorrhage |
| 18 | Wernicke's โ Lesion Overlap MRI | 12-patient MRI overlap map |
| 19 | Global Aphasia | Clinical features + MRI DWI/FLAIR |
| 20 | Conduction Aphasia | Features + DTI arcuate fasciculus |
| 21 | Transcortical Aphasias (TCM + TCS) | Side-by-side comparison |
| 22 | Anomic & Subcortical Aphasia | Side-by-side comparison |
| 23 | Master Comparison Table | All 8 syndromes ร 6 features |
| 24 | Section divider | Speech Disorders |
| 25 | Dysarthria โ 6 types table | Flaccid/Spastic/Ataxic/Hypokinetic/Hyperkinetic/Mixed |
| 26 | Section divider | Literacy Disorders |
| 27 | Dejerine Syndromes โ Alexia | Pure Alexia vs Alexia+Agraphia + left PCA MRI |
| 28 | Clinical Flowchart | Step-by-step diagnostic algorithm |
| 29 | Rehabilitation & Management | Acute, SLT, tDCS/TMS, pharmacotherapy |
| 30 | References | Harrison's 22E, Bradley & Daroff, Broca, Wernicke, Dejerine, Geschwind |