I'm gonna do a presentation in topic of osteoarthritis and - A presentation outline should include 6 sections: 1. Introduction/identify/classification 2. Typical Clinical Manifestations 3. Laboratory Investigations 4. Diagnostic Criteria 5. Treatment (Non-pharmacological and phamarcological management) And classification (for all the classification points give me medication , treatment regimen and indication separately for men , women and menopause women and there guidelines links )

Reading File
Asking for Preferences
Finding Sources
Finding Sources
Searching the Web

osteoarthritis treatment guidelines 2024 2025 men women menopausal ACR EULAR OARSI

Searching PubMed

"osteoarthritis" AND "management guidelines"

Reading File
Reading File
Reading File
Reading Web Page

https://pmc.ncbi.nlm.nih.gov/articles/PMC9377706

Reading File
Reading File
Reading File
Searching the Web

ACR 2024 osteoarthritis guidelines pharmacological treatment menopausal women HRT NSAIDs

Reading File
Running Command

ls -la /home/daytona/workspace/ 2>/dev/null && ls /home/daytona/skills/docx/ 2>/dev/null

Running Command

mkdir -p /home/daytona/workspace/osteoarthritis-presentation

Writing File

~/osteoarthritis-presentation/build_oa_doc.js

const {
  Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
  HeadingLevel, AlignmentType, BorderStyle, WidthType, ShadingType,
  ExternalHyperlink, VerticalAlign, PageBreak, Header, Footer, PageNumber,
  NumberFormat
} = require('docx');
const fs = require('fs');

// ──────────────────────────────────────────────
// HELPER FUNCTIONS
// ──────────────────────────────────────────────
function h1(text) {
  return new Paragraph({
    text,
    heading: HeadingLevel.HEADING_1,
    spacing: { before: 400, after: 200 },
    pageBreakBefore: true,
  });
}

function h2(text) {
  return new Paragraph({
    text,
    heading: HeadingLevel.HEADING_2,
    spacing: { before: 300, after: 150 },
  });
}

function h3(text) {
  return new Paragraph({
    text,
    heading: HeadingLevel.HEADING_3,
    spacing: { before: 200, after: 100 },
  });
}

function body(text) {
  return new Paragraph({
    children: [new TextRun({ text, size: 22, font: 'Calibri' })],
    spacing: { before: 80, after: 80 },
  });
}

function bullet(text, lvl = 0) {
  return new Paragraph({
    children: [new TextRun({ text, size: 22, font: 'Calibri' })],
    bullet: { level: lvl },
    spacing: { before: 60, after: 60 },
  });
}

function boldBullet(label, value, lvl = 0) {
  return new Paragraph({
    children: [
      new TextRun({ text: label, bold: true, size: 22, font: 'Calibri' }),
      new TextRun({ text: value, size: 22, font: 'Calibri' }),
    ],
    bullet: { level: lvl },
    spacing: { before: 60, after: 60 },
  });
}

function note(text) {
  return new Paragraph({
    children: [new TextRun({ text, size: 20, italics: true, font: 'Calibri', color: '555555' })],
    spacing: { before: 60, after: 80 },
  });
}

function linkPara(label, url) {
  return new Paragraph({
    children: [
      new TextRun({ text: `${label}: `, bold: true, size: 22, font: 'Calibri' }),
      new ExternalHyperlink({
        link: url,
        children: [new TextRun({ text: url, style: 'Hyperlink', size: 22 })],
      }),
    ],
    bullet: { level: 0 },
    spacing: { before: 60, after: 60 },
  });
}

function sectionDivider() {
  return new Paragraph({ text: '', spacing: { before: 100, after: 100 } });
}

// ──────────────────────────────────────────────
// TABLE HELPER
// ──────────────────────────────────────────────
function makeTable(headers, rows, colWidths) {
  const headerCells = headers.map((h, i) =>
    new TableCell({
      children: [new Paragraph({
        children: [new TextRun({ text: h, bold: true, size: 20, font: 'Calibri', color: 'FFFFFF' })],
        alignment: AlignmentType.CENTER,
      })],
      shading: { fill: '1F4E79', type: ShadingType.SOLID },
      width: colWidths ? { size: colWidths[i], type: WidthType.PERCENTAGE } : undefined,
      verticalAlign: VerticalAlign.CENTER,
    })
  );

  const tableRows = [new TableRow({ children: headerCells, tableHeader: true })];

  rows.forEach((row, rIdx) => {
    const cells = row.map((cell, cIdx) => {
      const isArray = Array.isArray(cell);
      const lines = isArray ? cell : [cell];
      return new TableCell({
        children: lines.map(l =>
          new Paragraph({
            children: [new TextRun({ text: l, size: 20, font: 'Calibri' })],
            spacing: { before: 40, after: 40 },
          })
        ),
        shading: { fill: rIdx % 2 === 0 ? 'FFFFFF' : 'EEF3FA', type: ShadingType.SOLID },
        width: colWidths ? { size: colWidths[cIdx], type: WidthType.PERCENTAGE } : undefined,
      });
    });
    tableRows.push(new TableRow({ children: cells }));
  });

  return new Table({
    rows: tableRows,
    width: { size: 100, type: WidthType.PERCENTAGE },
  });
}

// ──────────────────────────────────────────────
// COVER PAGE
// ──────────────────────────────────────────────
const coverPage = [
  new Paragraph({ text: '', spacing: { before: 1200, after: 100 } }),
  new Paragraph({
    children: [new TextRun({ text: 'OSTEOARTHRITIS', bold: true, size: 56, font: 'Calibri', color: '1F4E79' })],
    alignment: AlignmentType.CENTER,
    spacing: { before: 0, after: 200 },
  }),
  new Paragraph({
    children: [new TextRun({ text: 'Comprehensive Presentation Outline', size: 32, font: 'Calibri', color: '2E74B5' })],
    alignment: AlignmentType.CENTER,
    spacing: { before: 0, after: 200 },
  }),
  new Paragraph({
    children: [new TextRun({ text: 'Classification · Clinical Features · Investigations · Diagnosis · Treatment', size: 24, font: 'Calibri', italics: true, color: '555555' })],
    alignment: AlignmentType.CENTER,
    spacing: { before: 0, after: 600 },
  }),
  new Paragraph({
    children: [new TextRun({ text: 'Including Sex-Specific Treatment Regimens: Men, Women & Menopausal Women', size: 24, font: 'Calibri', bold: true, color: '1F4E79' })],
    alignment: AlignmentType.CENTER,
    spacing: { before: 0, after: 400 },
  }),
  new Paragraph({
    children: [new TextRun({ text: 'Based on ACR/AF 2019 Guidelines | EULAR 2024 | OARSI 2023', size: 22, font: 'Calibri', italics: true, color: '777777' })],
    alignment: AlignmentType.CENTER,
    spacing: { before: 0, after: 200 },
  }),
  new Paragraph({
    children: [new TextRun({ text: `Prepared: June 2026`, size: 20, font: 'Calibri', color: '999999' })],
    alignment: AlignmentType.CENTER,
    spacing: { before: 400 },
  }),
];

// ──────────────────────────────────────────────
// SECTION 1: INTRODUCTION / IDENTIFICATION / CLASSIFICATION
// ──────────────────────────────────────────────
const section1 = [
  h1('SECTION 1: Introduction, Identification & Classification'),

  h2('1.1 Definition'),
  body('Osteoarthritis (OA) is characterized by failed repair of synovial joint tissues after intra-articular stress. The resulting breakdown of cartilage and bone leads to symptoms of pain, stiffness, and functional disability. Also known as "degenerative joint disease," it is the most common form of arthritis worldwide.'),
  body('OA involves active biochemical disease processes as well as mechanical forces affecting the entire synovial joint, including articular cartilage, subchondral bone, synovium, ligaments, capsule, and periarticular muscles.'),

  h2('1.2 Epidemiology'),
  bullet('Affects >500 million people worldwide'),
  bullet('Most common cause of arthritis and work disability (17% of U.S. disability)'),
  bullet('Affects ~20% of the U.S. population; ~27 million Americans have OA'),
  bullet('Radiographically present in nearly all patients >75 years'),
  bullet('Equal incidence in men and women aged 45-55 years'),
  bullet('After age 55: significantly more common in WOMEN'),
  bullet('Lifetime risk of symptomatic knee OA: ~40% in men, ~47% in women'),
  bullet('Risk rises to 60% in persons above a healthy weight'),
  bullet('OA cases rose globally by 48% between 1990 and 2019'),
  bullet('15th highest cause of years lived with disability worldwide'),
  bullet('80% of those affected suffer movement limitation; 25% cannot perform major daily activities'),

  h2('1.3 Pathobiology'),
  body('OA results from an imbalance between repair and destruction of joint tissues driven by:'),
  boldBullet('Mechanical factors: ', 'Excessive mechanical strain via obesity, malalignment, joint injury, occupational overuse', 0),
  boldBullet('Inflammatory pathways: ', 'Local synovitis, subchondral inflammation; systemic obesity-related inflammation', 0),
  boldBullet('Cartilage changes: ', 'Initial proteoglycan swelling → collagen matrix disruption → surface erosions → deep fissures', 0),
  boldBullet('Subchondral bone: ', 'Increased bone turnover, subchondral cysts, bone marrow lesions (associated with pain and progression)', 0),
  boldBullet('Osteophytes: ', 'Reactivation of endochondral ossification at joint margins', 0),
  boldBullet('Synovium: ', 'Hyperplastic and hypertrophic changes; produces proinflammatory mediators', 0),

  h2('1.4 Risk Factors'),
  h3('Modifiable:'),
  bullet('Obesity / excess body weight'),
  bullet('Joint malalignment'),
  bullet('Muscle weakness (e.g., quadriceps weakness predates knee OA)'),
  bullet('Sedentary lifestyle'),
  bullet('Occupational repetitive joint trauma (carpet layers, miners, kneeling workers)'),
  bullet('Athletic injuries (high-impact, high-intensity activities causing joint injury)'),

  h3('Non-Modifiable:'),
  bullet('Age (incidence increases rapidly ages 50-75)'),
  bullet('Female sex (especially post-menopause)'),
  bullet('Genetics (stronger for hand OA than knee OA)'),
  bullet('Prior joint injury'),
  bullet('Ethnicity'),

  h2('1.5 Classification of Osteoarthritis'),
  h3('A. By Etiology'),
  sectionDivider(),
  makeTable(
    ['Type', 'Description', 'Examples / Subtypes'],
    [
      ['Primary (Idiopathic)', 'No identifiable underlying cause; most common type', 'Localized (hand, knee, hip, spine, foot) or Generalized (≥3 joint groups)'],
      ['Secondary', 'Develops due to identifiable predisposing condition', 'Post-traumatic, congenital anomalies, metabolic disorders, inflammatory arthritis sequelae'],
      ['Hereditary', 'Collagen gene defects leading to cartilage vulnerability', 'Type II collagen mutations; familial hand OA with Heberden/Bouchard nodes'],
    ],
    [20, 40, 40]
  ),
  sectionDivider(),

  h3('B. By Joint Involved (Kellgren-Lawrence Radiological Grading)'),
  sectionDivider(),
  makeTable(
    ['Grade', 'Description', 'Radiological Features'],
    [
      ['Grade 0', 'Normal', 'No features of OA'],
      ['Grade 1', 'Doubtful OA', 'Possible osteophyte; no joint space narrowing'],
      ['Grade 2', 'Mild OA', 'Definite osteophyte; possible joint space narrowing'],
      ['Grade 3', 'Moderate OA', 'Multiple osteophytes; definite joint space narrowing; sclerosis'],
      ['Grade 4', 'Severe OA', 'Large osteophytes; marked narrowing; severe sclerosis; possible bony deformity'],
    ],
    [10, 25, 65]
  ),
  sectionDivider(),

  h3('C. ACR Classification by Joint Site'),
  bullet('Knee OA (most common - 85% of burden)'),
  bullet('Hip OA'),
  bullet('Hand OA - inflammatory variant; runs in families; more common in women'),
  bullet('Spine OA (spondylosis)'),
  bullet('Shoulder, ankle, foot OA (less common)'),

  h3('D. ACR Diagnostic Classification Criteria by Joint (Summary)'),
  body('The ACR developed classification criteria for the knee (1986), hip (1991), and hand (1990):'),
  bullet('Knee OA: Clinical + radiographic criteria (ACR 1986)'),
  bullet('Hip OA: Clinical + lab + radiographic (ACR 1991)'),
  bullet('Hand OA: Clinical criteria only (ACR 1990)'),
];

// ──────────────────────────────────────────────
// SECTION 2: CLINICAL MANIFESTATIONS
// ──────────────────────────────────────────────
const section2 = [
  h1('SECTION 2: Typical Clinical Manifestations'),

  h2('2.1 Symptoms'),
  boldBullet('Pain: ', 'Gradual onset, local to affected joint; worsens with use and as the day progresses; relieved by rest. In late disease, pain may occur at rest.'),
  boldBullet('Morning stiffness: ', 'Less than 30 minutes of localized morning stiffness (cf. >1 hour in RA); "gel phenomenon" - brief stiffness after prolonged inactivity'),
  boldBullet('Crepitus: ', 'Audible or palpable grating on joint movement'),
  boldBullet('Decreased range of motion: ', 'Gradual reduction in joint mobility'),
  boldBullet('Functional limitation: ', 'Difficulty with daily activities (climbing stairs, gripping objects, walking)'),
  boldBullet('No systemic symptoms: ', 'No constitutional features (fever, weight loss) - key distinction from inflammatory arthritis'),

  h2('2.2 Signs on Examination'),
  bullet('Joint-line tenderness'),
  bullet('Bony enlargement (osteophytes)'),
  bullet('Crepitus on passive movement'),
  bullet('Limited range of motion'),
  bullet('Joint deformity (in advanced disease)'),
  bullet('Periarticular muscle wasting/weakness'),
  bullet('Mild joint effusion (non-inflammatory; cool, non-erythematous)'),
  bullet('Varus/valgus deformity of knee in advanced cases'),

  h2('2.3 Joint-Specific Features'),
  sectionDivider(),
  makeTable(
    ['Joint', 'Typical Features', 'Special Signs'],
    [
      ['Knee', 'Medial compartment most common; pain on stairs; effusion', 'Varus deformity, McMurray test, Patellofemoral crepitus'],
      ['Hip', 'Groin/buttock/thigh pain; limp; referred to knee', 'Decreased internal rotation (earliest sign), leg length discrepancy'],
      ['Hand (DIP)', 'Heberden nodes (DIP joint bony swellings)', 'Inflammatory flares with redness/swelling; more common in women'],
      ['Hand (PIP)', 'Bouchard nodes (PIP joint bony swellings)', 'Can cause "trigger finger" or lateral deviation'],
      ['Spine', 'Low back/neck pain, stiffness; radiculopathy if foraminal narrowing', 'Spinal stenosis symptoms in lumbar OA'],
      ['First CMC', 'Squaring of thumb base; pain with grip/pinch', '"Square hand" appearance; positive grind test'],
    ],
    [15, 50, 35]
  ),
  sectionDivider(),

  h2('2.4 Disease Stages'),
  bullet('Early OA: Asymptomatic or mild activity-related pain; incidental finding on X-ray'),
  bullet('Moderate OA: Regular pain, stiffness, functional limitation; radiographic changes'),
  bullet('Advanced OA: Constant or near-constant pain; severe limitation; joint deformity; indication for surgery'),
  note('Note: Radiographic severity correlates poorly with symptom severity. Many patients with severe radiographic changes are relatively asymptomatic.'),
];

// ──────────────────────────────────────────────
// SECTION 3: LABORATORY INVESTIGATIONS
// ──────────────────────────────────────────────
const section3 = [
  h1('SECTION 3: Laboratory Investigations'),

  h2('3.1 Key Principle'),
  body('OA is primarily a CLINICAL and RADIOLOGICAL diagnosis. Laboratory tests are mostly normal and are used principally to EXCLUDE other diagnoses such as rheumatoid arthritis, gout, septic arthritis, or pseudogout.'),

  h2('3.2 Blood Tests'),
  sectionDivider(),
  makeTable(
    ['Investigation', 'Expected Result in OA', 'Purpose'],
    [
      ['ESR (Erythrocyte Sedimentation Rate)', 'Normal', 'Exclude inflammatory arthritis (elevated in RA, infection)'],
      ['CRP (C-Reactive Protein)', 'Normal or mildly elevated', 'Exclude systemic inflammation'],
      ['Full Blood Count (FBC/CBC)', 'Normal', 'Baseline; exclude anaemia of chronic disease'],
      ['Rheumatoid Factor (RF)', 'Negative', 'Exclude rheumatoid arthritis'],
      ['Anti-CCP Antibodies', 'Negative', 'Exclude RA (more specific than RF)'],
      ['ANA (Anti-Nuclear Antibody)', 'Negative', 'Exclude SLE or other connective tissue disease'],
      ['Uric Acid', 'Normal', 'Exclude gout (elevated in gout)'],
      ['Serum Calcium/Phosphate', 'Normal', 'Exclude metabolic bone disease'],
      ['Blood Glucose / HbA1c', 'As per patient baseline', 'Screen for diabetes (metabolic risk factor)'],
      ['Thyroid Function Tests', 'As per patient baseline', 'Hypothyroidism can mimic or worsen OA symptoms'],
      ['Serum Ferritin / Iron studies', 'Normal', 'Exclude haemochromatosis (secondary OA cause)'],
    ],
    [30, 30, 40]
  ),
  sectionDivider(),

  h2('3.3 Synovial Fluid Analysis (Joint Aspiration)'),
  body('Can support diagnosis; particularly useful to exclude infection or crystal arthropathy:'),
  sectionDivider(),
  makeTable(
    ['Parameter', 'OA Result', 'Septic Arthritis', 'Gout / CPPD'],
    [
      ['Appearance', 'Clear/yellow', 'Cloudy/purulent', 'Yellow/cloudy'],
      ['WBC count', '<2,000/mm³', '>50,000/mm³', '2,000-50,000/mm³'],
      ['Viscosity', 'Good (high)', 'Poor (low)', 'Poor (low)'],
      ['Crystals', 'Absent', 'Absent', 'Urate (gout) / CPPD crystals'],
      ['Culture', 'Negative', 'Positive', 'Negative'],
    ],
    [20, 20, 30, 30]
  ),
  sectionDivider(),

  h2('3.4 Imaging'),
  h3('Plain Radiographs (X-ray) - First Line'),
  bullet('Joint space narrowing (loss of cartilage)'),
  bullet('Subchondral sclerosis (bone hardening)'),
  bullet('Osteophyte formation at joint margins'),
  bullet('Subchondral cysts'),
  bullet('Bony deformity (in advanced disease)'),
  note('Weight-bearing views preferred for knee OA. Kellgren-Lawrence scale grades 0-4 (see Section 1.5).'),

  h3('MRI'),
  bullet('Detects cartilage changes before X-ray changes'),
  bullet('Identifies subchondral bone marrow lesions (associated with pain)'),
  bullet('Evaluates meniscal and ligament pathology'),
  bullet('NOT routinely required for diagnosis; used for surgical planning or atypical cases'),

  h3('Ultrasound'),
  bullet('Detects effusion, synovitis, osteophytes, and guides injections'),
  bullet('Increasingly used in clinical practice'),
  bullet('ACR strongly recommends ultrasound guidance for hip intra-articular injections'),

  h3('CT Scan'),
  bullet('Detailed bone anatomy assessment'),
  bullet('Useful pre-surgically for joint replacement planning'),
];

// ──────────────────────────────────────────────
// SECTION 4: DIAGNOSTIC CRITERIA
// ──────────────────────────────────────────────
const section4 = [
  h1('SECTION 4: Diagnostic Criteria'),

  h2('4.1 ACR Classification Criteria for Knee OA (1986)'),
  body('Clinical + Radiographic Criteria (must satisfy):'),
  bullet('Knee pain PLUS at least 5 of 9 features:'),
  bullet('Age >50 years', 1),
  bullet('Morning stiffness <30 minutes', 1),
  bullet('Crepitus on active motion', 1),
  bullet('Bony tenderness', 1),
  bullet('Bony enlargement', 1),
  bullet('No palpable warmth', 1),
  bullet('ESR <40 mm/hr', 1),
  bullet('RF <1:40', 1),
  bullet('Synovial fluid signs of OA (clear, viscous, WBC <2,000/mm³)', 1),
  note('Sensitivity 92%, Specificity 75% using clinical criteria alone.'),

  h2('4.2 ACR Classification Criteria for Hip OA (1991)'),
  body('Clinical + Laboratory + Radiographic:'),
  bullet('Hip pain AND at least 2 of 3:'),
  bullet('ESR <20 mm/hr', 1),
  bullet('Radiographic femoral or acetabular osteophytes', 1),
  bullet('Radiographic hip joint space narrowing', 1),
  note('Sensitivity 89%, Specificity 91%.'),

  h2('4.3 ACR Classification Criteria for Hand OA (1990)'),
  body('Clinical criteria only:'),
  bullet('Hand pain, aching, or stiffness AND 3 or 4 of:'),
  bullet('Hard tissue enlargement of ≥2 of 10 selected joints', 1),
  bullet('Hard tissue enlargement of ≥2 DIP joints', 1),
  bullet('Fewer than 3 swollen MCP joints', 1),
  bullet('Deformity of at least 1 of 10 selected joints', 1),
  note('Selected joints: 2nd and 3rd DIPs and PIPs, and 1st CMC joints bilaterally.'),
  note('Sensitivity 94%, Specificity 87%.'),

  h2('4.4 Differential Diagnosis - Key Conditions to Exclude'),
  sectionDivider(),
  makeTable(
    ['Condition', 'Distinguishing Features vs OA'],
    [
      ['Rheumatoid Arthritis (RA)', 'Morning stiffness >1hr; symmetric; RF/anti-CCP positive; MCP joints involved; systemic features'],
      ['Gout', 'Acute onset; hyperuricemia; negatively birefringent crystals on joint aspiration; podagra (1st MTP)'],
      ['Pseudogout (CPPD)', 'Calcium pyrophosphate crystals; often wrist/knee; chondrocalcinosis on X-ray'],
      ['Septic Arthritis', 'Fever; hot erythematous joint; WBC >50,000 in synovial fluid; positive culture'],
      ['Psoriatic Arthritis', 'Psoriasis skin lesions; DIP involvement; "sausage digits"; nail changes'],
      ['Ankylosing Spondylitis', 'Young men; sacroiliac involvement; HLA-B27 positive; inflammatory back pain'],
    ],
    [30, 70]
  ),
  sectionDivider(),
];

// ──────────────────────────────────────────────
// SECTION 5: TREATMENT
// ──────────────────────────────────────────────
const section5 = [
  h1('SECTION 5: Treatment of Osteoarthritis'),
  body('Management of OA should be individualized and multimodal. Core treatments include self-management, exercise, and weight maintenance. Treatment is guided by joint involved, symptom severity, comorbidities, and patient characteristics.'),

  h2('5.1 Non-Pharmacological Management'),
  h3('A. Education & Self-Management'),
  bullet('Patient education about OA, its prognosis, and treatment options'),
  bullet('Arthritis self-management programs (e.g., ASMP)'),
  bullet('Goal-setting and pain-coping strategies'),
  bullet('Strongly recommended by ACR/AF, EULAR, and OARSI'),

  h3('B. Exercise & Physical Activity'),
  bullet('Strongly recommended by ALL major guidelines as the cornerstone of OA management'),
  bullet('Aerobic exercise: walking, cycling, swimming - reduces pain and improves function'),
  bullet('Muscle strengthening: particularly quadriceps strengthening for knee OA'),
  bullet('Aquatic/hydrotherapy: lower impact on joints; useful for obese or severely limited patients'),
  bullet('Tai chi: evidence for knee OA pain and balance improvement'),
  bullet('Yoga: conditional recommendation for knee OA'),
  bullet('EULAR 2025 update: reducing sedentary behavior has independent health benefits'),
  note('Target: 150 min/week moderate-intensity aerobic activity (per WHO/EULAR 2025 guidelines)'),

  h3('C. Weight Management'),
  bullet('Strongly recommended for overweight/obese patients with knee and hip OA'),
  bullet('Weight loss of ≥5-10% body weight significantly reduces knee OA pain'),
  bullet('Reduces mechanical load: each kg lost = ~4 kg reduction in knee joint load'),
  bullet('Diet counseling + exercise is more effective than either alone'),
  bullet('For BMI ≥30 kg/m²: dietary weight management recommended even for hip OA'),

  h3('D. Physical Therapy & Occupational Therapy'),
  bullet('Physical therapy: ROM exercises, strengthening, manual therapy, gait training'),
  bullet('Occupational therapy: joint protection techniques, activity modification, adaptive equipment'),
  bullet('Splints and orthoses: thumb CMC splints for hand OA; knee bracing for medial compartment OA'),
  bullet('Walking aids: cane (contralateral hand), walker as needed'),
  bullet('Appropriate footwear: cushioned, supportive shoes; lateral wedge insoles for medial knee OA (conditional)'),

  h3('E. Mind-Body & Behavioral Therapies'),
  bullet('Cognitive Behavioral Therapy (CBT): for pain catastrophizing and depression comorbidity'),
  bullet('Mindfulness-based stress reduction'),
  bullet('Acupuncture: ACR/AF conditionally recommends for knee/hip OA; AAOS insufficient evidence'),
  bullet('TENS (transcutaneous electrical nerve stimulation): EULAR conditionally recommends; AAOS insufficient'),

  h3('F. Heat & Cold Therapy'),
  bullet('Heat: useful for chronic stiffness; pre-exercise preparation'),
  bullet('Cold packs: useful for acute flares with effusion'),

  h3('G. Assistive Devices & Environmental Modifications'),
  bullet('Raised toilet seats, grab rails, non-slip mats'),
  bullet('Kitchen aids and adapted tools for hand OA'),
  bullet('Work place accommodations (ergonomic adjustments)'),

  h2('5.2 Pharmacological Management'),
  h3('A. Analgesics - First Line'),
  sectionDivider(),
  makeTable(
    ['Drug', 'Dose', 'Route', 'ACR Recommendation', 'Notes'],
    [
      ['Acetaminophen (Paracetamol)', '500-1000 mg q6-8h; max 4g/day (3g/day in elderly/liver disease)', 'Oral', 'Conditional (not first-line)', 'Less effective than NSAIDs; safer GI profile; avoid hepatic disease'],
      ['Topical Diclofenac', '1% gel or 1.5% solution; apply to affected joint 2-4x/day', 'Topical', 'Strongly recommended (knee/hand)', 'First choice in elderly, renal impairment, GI risk; avoid hip (too deep)'],
      ['Topical NSAIDs (other)', 'As per formulation', 'Topical', 'Strongly recommended (knee/hand)', 'Lower systemic absorption; preferred in high GI-risk patients'],
    ],
    [20, 30, 10, 25, 15]
  ),
  sectionDivider(),

  h3('B. NSAIDs - Key Pharmacological Treatment'),
  sectionDivider(),
  makeTable(
    ['Drug', 'Dose', 'Route', 'Notes'],
    [
      ['Ibuprofen', '400-800 mg TID-QID with food', 'Oral', 'First choice; widely available; add PPI if high GI risk'],
      ['Naproxen', '250-500 mg BID', 'Oral', 'Longer half-life; add PPI if high GI risk'],
      ['Diclofenac', '50 mg TID or 75 mg BID (SR)', 'Oral', 'Available as dual-release; topical preferred for local joints'],
      ['Celecoxib (COX-2 inhibitor)', '100-200 mg OD-BID', 'Oral', 'Better GI profile; USE WITH CAUTION in cardiovascular disease'],
      ['Meloxicam', '7.5-15 mg OD', 'Oral', 'COX-2 selective at low dose; good tolerability'],
      ['Indomethacin', '25-50 mg TID', 'Oral', 'More GI side effects; avoid in elderly'],
    ],
    [18, 28, 8, 46]
  ),
  sectionDivider(),
  note('All oral NSAIDs should be at lowest effective dose for shortest duration. Add PPI (e.g., omeprazole 20mg OD) in: age >65, history of peptic ulcer, concurrent corticosteroids or anticoagulants.'),

  h3('C. Intra-Articular Injections'),
  sectionDivider(),
  makeTable(
    ['Agent', 'Dose / Schedule', 'Indication', 'Strength of Recommendation'],
    [
      ['Corticosteroid (e.g., triamcinolone, methylprednisolone)', '40mg triamcinolone; repeat max every 3 months; up to 4x/year per joint', 'Knee, hip (US-guided), shoulder OA flares', 'Strongly recommended (ACR/AF) for knee; conditional for hand'],
      ['Hyaluronic Acid (HA)', 'Weekly x3-5 injections per course', 'Knee OA (if other therapies failed)', 'Conditional (ACR, OARSI); Strongly AGAINST for hip (ACR)'],
      ['PRP (Platelet-Rich Plasma)', 'Variable protocols', 'Investigational', 'NOT routinely recommended (ACR against; insufficient evidence)'],
    ],
    [25, 30, 25, 20]
  ),
  sectionDivider(),

  h3('D. Adjunct Pharmacological Agents'),
  sectionDivider(),
  makeTable(
    ['Drug', 'Dose', 'Route', 'Recommendation', 'Notes'],
    [
      ['Duloxetine (SNRI)', '30mg OD x1 wk → 60mg OD maintenance', 'Oral', 'Conditionally recommended (ACR)', 'Useful for widespread/central pain sensitization; also treats comorbid depression'],
      ['Tramadol', '50-100 mg q4-6h; max 400 mg/day; ER 100-300 mg OD', 'Oral', 'Conditionally recommended (ACR)', 'For patients with contraindications to NSAIDs; avoid >65 years'],
      ['Non-tramadol Opioids', 'Lowest effective dose, shortest duration', 'Oral/Patch', 'Conditionally AGAINST (ACR)', 'Reserve for refractory pain; risk of dependence/falls'],
      ['Glucosamine Sulfate', '1500 mg OD', 'Oral', 'Against in knee/hip (ACR); conditional for hand (EULAR)', 'SULFATE formulation only; some evidence for symptom relief'],
      ['Chondroitin Sulfate', '800 mg OD', 'Oral', 'Conditional for hand OA (EULAR/ACR)', 'Stimulates proteoglycan synthesis'],
    ],
    [18, 28, 8, 22, 24]
  ),
  sectionDivider(),
  note('Strongly NOT recommended: bisphosphonates, hydroxychloroquine, methotrexate, TNF inhibitors, IL-1 receptor antagonists, colchicine (conditional), fish oil, vitamin D (insufficient evidence for OA symptoms).'),

  h3('E. Surgical Options (when conservative measures fail)'),
  bullet('Arthroscopic lavage/debridement: NOT recommended (insufficient evidence)'),
  bullet('Osteotomy: realigns joint; delay progression; used in younger patients with malalignment'),
  bullet('Total Joint Replacement (TKR/THR): Strongly recommended when functional status severely impaired despite optimal conservative management'),
  bullet('Unicompartmental knee replacement: for isolated medial or lateral compartment disease'),
  bullet('Arthrodesis (fusion): limited to certain joints (ankle, small joints)'),
];

// ──────────────────────────────────────────────
// SECTION 6: SEX-SPECIFIC TREATMENT
// ──────────────────────────────────────────────
const section6 = [
  h1('SECTION 6: Sex-Specific Treatment Regimens'),
  body('While OA management principles are largely universal, important differences in pharmacokinetics, comorbidity patterns, contraindications, and hormonal status mean that treatment should be tailored by sex and menopausal status.'),

  // ── MEN ──
  h2('6.1 Men with Osteoarthritis'),

  h3('A. Non-Pharmacological'),
  bullet('Weight loss: particularly important given higher rates of occupational-related OA in men'),
  bullet('Exercise: resistance training and aerobic exercise; cycling and swimming for hip/knee OA'),
  bullet('Occupational modifications: especially for manual workers'),
  bullet('Joint protection: knee bracing for occupational/athletic knee OA'),

  h3('B. Pharmacological Treatment in Men'),
  sectionDivider(),
  makeTable(
    ['Medication', 'Regimen', 'Indication', 'Key Considerations in Men'],
    [
      ['Topical Diclofenac 1%', '2-4g applied QID to affected joint', 'Knee/hand OA, especially if GI risk', 'Preferred in men with hypertension or mild renal impairment'],
      ['Ibuprofen', '400-800 mg TID with food + PPI', 'Mild-moderate knee/hip/hand OA', 'Monitor BP and renal function; avoid if CVD or renal disease'],
      ['Naproxen', '250-500 mg BID + PPI', 'Alternative NSAID for persistent symptoms', 'Possibly lower cardiovascular risk than other NSAIDs (mixed evidence)'],
      ['Celecoxib', '100-200 mg OD-BID', 'GI-risk men (peptic ulcer history)', 'Contraindicated if significant cardiovascular disease; monitor BP'],
      ['Intra-articular Triamcinolone', '40 mg injection; repeat q3 months max', 'Acute flare with effusion', 'Caution in men with diabetes (transient hyperglycemia); US-guided for hip'],
      ['Duloxetine', '30 mg OD → 60 mg OD', 'Widespread OA / central sensitization / comorbid depression', 'Monitor for urinary retention (men with BPH); sexual side effects possible'],
      ['Tramadol', '50-100 mg q6h (max 400 mg/day)', 'Refractory pain when NSAIDs contraindicated', 'Risk of dependence; avoid with alcohol; reduce dose if renal impairment'],
      ['Glucosamine Sulfate', '1500 mg OD', 'Symptomatic knee OA (if accepted by patient)', 'Generally safe; ACR recommends against; some clinical benefit for symptoms'],
    ],
    [22, 20, 25, 33]
  ),
  sectionDivider(),
  note('Men have higher rates of cardiovascular risk factors and occupational OA. NSAIDs should always be used with cardiovascular risk assessment. Testosterone levels do NOT play a documented protective role in OA.'),

  h3('C. Guideline References for Men'),
  linkPara('ACR/AF 2019 OA Guidelines (Hand, Hip, Knee)', 'https://www.rheumatology.org/Portals/0/Files/ACR-2019-OA-Guideline.pdf'),
  linkPara('EULAR 2024 Non-pharmacological OA Guidelines', 'https://ard.bmj.com/content/83/6/730'),
  linkPara('OARSI 2023 OA Guidelines', 'https://www.oarsijournal.com/article/S1063-4584(23)00739-7/fulltext'),
  linkPara('AAOS Knee OA Clinical Practice Guideline', 'https://www.aaos.org/quality/quality-programs/lower-extremity-programs/osteoarthritis-of-the-knee/'),

  sectionDivider(),

  // ── WOMEN ──
  h2('6.2 Women with Osteoarthritis (Pre-Menopausal & Peri-Menopausal)'),
  body('Women develop OA more frequently, at younger ages (especially hand OA), and with greater symptom severity than men. Inflammatory hand OA (Heberden/Bouchard nodes) has a strong female predominance.'),

  h3('A. Non-Pharmacological'),
  bullet('Hand joint protection and splinting (particularly thumb CMC splint) - especially important for women with hand OA'),
  bullet('Weight management: particularly important in reproductive years given hormonal effects on fat distribution'),
  bullet('Exercise: aquatic exercise especially well-tolerated; yoga conditionally recommended'),
  bullet('Occupational/household task modification'),
  bullet('Pelvic floor consideration: high-impact exercise may require modification for women with pelvic floor dysfunction'),

  h3('B. Pharmacological Treatment in Women (Pre/Peri-Menopausal)'),
  sectionDivider(),
  makeTable(
    ['Medication', 'Regimen', 'Indication', 'Key Considerations in Women'],
    [
      ['Topical Diclofenac 1%', '2-4g applied QID', 'Knee/hand OA', 'First choice given lower systemic absorption; safe in women with GI risk'],
      ['Ibuprofen', '400-600 mg TID with food + PPI', 'Mild-moderate OA pain', 'Caution in women planning pregnancy; use lowest dose; avoid in 3rd trimester'],
      ['Naproxen', '250-500 mg BID + PPI', 'Alternative NSAID', 'Avoid in pregnancy; caution in women with kidney disease or CV risk'],
      ['Celecoxib', '100-200 mg OD-BID', 'GI-risk women (GERD, PUD history)', 'Contraindicated in pregnancy; monitor BP; cardiovascular risk assessment'],
      ['Intra-articular Triamcinolone', '40 mg; max 4x/year', 'Acute OA flare / effusion', 'Generally safe in non-pregnant women; avoid in pregnant women'],
      ['Duloxetine', '30 mg OD → 60 mg OD', 'Widespread pain / comorbid anxiety-depression', 'Particularly useful in women who have comorbid depression/anxiety with OA; serotonin syndrome caution'],
      ['Tramadol', '50-100 mg q6h (max 400 mg/day)', 'Refractory pain / NSAID intolerance', 'Avoid in pregnancy and breastfeeding; risk of neonatal abstinence if used in pregnancy'],
      ['Chondroitin Sulfate', '800 mg OD', 'Hand OA (symptom relief)', 'Conditionally recommended for hand OA; safe profile; may help slow progression'],
    ],
    [22, 20, 25, 33]
  ),
  sectionDivider(),
  note('In women of reproductive age, always consider pregnancy status before prescribing NSAIDs (avoid in 1st and 3rd trimesters), duloxetine, or tramadol.'),

  h3('C. Guideline References for Women'),
  linkPara('ACR/AF 2019 OA Management Guidelines', 'https://www.rheumatology.org/Portals/0/Files/ACR-2019-OA-Guideline.pdf'),
  linkPara('EULAR 2024 Hip and Knee OA Guidelines', 'https://ard.bmj.com/content/83/6/730'),
  linkPara('EULAR 2025 Physical Activity Recommendations', 'https://ard.bmj.com/content/early/2025/03/01/ard-2024-226757'),
  linkPara('OARSI OA Guidelines', 'https://www.oarsijournal.com/article/S1063-4584(23)00739-7/fulltext'),

  sectionDivider(),

  // ── MENOPAUSAL WOMEN ──
  h2('6.3 Menopausal Women with Osteoarthritis'),
  body('Postmenopausal women represent the highest-risk group for OA. Estrogen loss accelerates cartilage degradation, increases synovial inflammation, and contributes to weight gain and muscle loss. OA onset and progression is often accelerated after menopause.'),

  h3('A. Why Menopause Worsens OA'),
  bullet('Estrogen deficiency: reduces cartilage protection, increases inflammatory cytokines (IL-1, TNF)'),
  bullet('Accelerated bone loss → subchondral bone changes'),
  bullet('Weight gain and muscle loss (sarcopenia) → increased joint load'),
  bullet('Central sensitization: lower pain threshold post-menopause'),
  bullet('Co-morbidities: increased CVD, osteoporosis, hypertension → limits NSAID use'),

  h3('B. Non-Pharmacological (Menopausal)'),
  bullet('Weight management: PRIORITY - post-menopausal weight gain is a major driver of OA progression'),
  bullet('Resistance training: preserves muscle mass (sarcopenia prevention) and reduces joint load'),
  bullet('Aquatic exercise: lower joint impact; especially beneficial for symptomatic OA with obesity'),
  bullet('Balance and proprioception training: reduces fall risk (concurrent osteoporosis concern)'),
  bullet('Cognitive Behavioral Therapy (CBT): for central sensitization pain amplification'),
  bullet('Thermal therapy: heat wraps for hip/knee stiffness; particularly effective for menopausal joint stiffness'),

  h3('C. Pharmacological Treatment in Menopausal Women'),
  sectionDivider(),
  makeTable(
    ['Medication', 'Regimen', 'Indication', 'Key Considerations in Menopausal Women'],
    [
      ['Topical Diclofenac 1%', '2-4g applied QID', 'Knee/hand OA', 'PREFERRED first-line pharmacological therapy due to high CVD/renal/GI risk in this age group; minimal systemic absorption'],
      ['Topical Capsaicin 0.025-0.075%', 'Apply TID-QID for 4 weeks minimum', 'Knee OA (conditional)', 'Some evidence for knee OA; burning sensation common initially; conditionally recommended (ACR)'],
      ['Acetaminophen', '500-1000 mg q6-8h; max 3g/day', 'Mild OA; NSAID intolerant', 'Preferred over NSAIDs in women with CVD, renal impairment, or on anticoagulants; limit dose in alcohol use'],
      ['Celecoxib', '100-200 mg OD-BID', 'Moderate OA pain with GI risk, no significant CVD', 'COX-2 inhibitor; better GI profile; cardiovascular risk assessment MANDATORY; avoid if CHD, stroke history'],
      ['Naproxen + PPI', '250-500 mg BID + omeprazole 20mg OD', 'Systemic OA pain (knee/hip/hand) with GI protection', 'Naproxen has relatively favorable cardiovascular risk profile among oral NSAIDs; PPI mandatory ≥65 years'],
      ['Duloxetine', '30 mg OD × 1 week → 60 mg OD', 'Widespread OA pain, central sensitization, comorbid depression', 'PARTICULARLY USEFUL in menopausal women with comorbid depression, anxiety, hot flashes; also treats vasomotor symptoms to some degree'],
      ['Tramadol (low dose)', '50 mg q6-8h (max 300 mg/day in elderly)', 'Refractory OA pain, NSAID intolerant', 'CAUTION in elderly: increased fall risk, cognitive impairment; reduce dose; short-term use only; AVOID with SSRIs (serotonin syndrome)'],
      ['Intra-articular Triamcinolone', '40 mg; max 4x/year; avoid >1 injection/3 months', 'Knee/hip/shoulder OA flare', 'Use cautiously in diabetic post-menopausal women (hyperglycemia); consider HA injection as alternative for sustained relief'],
      ['Hyaluronic Acid (HA) Injection', '3-5 weekly injections; course every 6 months', 'Knee OA when IACS inadequate or contraindicated', 'Longer duration of action than IACS; useful in post-menopausal women with recurrent knee effusions; NOT recommended for hip'],
    ],
    [20, 22, 24, 34]
  ),
  sectionDivider(),

  h3('D. Hormone Therapy (HT) / Hormone Replacement Therapy (HRT)'),
  body('The role of HT in OA management is evolving. Current evidence and guidelines:'),
  bullet('Estrogen deficiency is associated with increased OA incidence and progression'),
  bullet('Observational studies suggest HT may reduce OA risk and progression, particularly in early post-menopause ("window of opportunity")'),
  bullet('Greatest benefit: initiated at age 50-59 years or within 10 years of menopause'),
  bullet('HT remains the MOST EFFECTIVE treatment for menopausal vasomotor symptoms (IMS, NAMS, EMAS guidelines)'),
  bullet('HT does NOT replace OA-specific treatments but may provide some joint-protective benefit'),
  sectionDivider(),
  makeTable(
    ['HT Type', 'Regimen', 'Indication', 'Key Notes'],
    [
      ['Combined Estrogen-Progestogen (EPT)', 'Estradiol 1-2mg OD (oral) or estradiol patch 50-100 mcg/24h + progestogen (e.g., micronized progesterone 200mg OD for 12 days/month or dydrogesterone 10mg OD)', 'Women with intact uterus; menopausal symptoms with joint complaints', 'Progestogen REQUIRED in women with uterus to prevent endometrial hyperplasia; transdermal route preferred for lower VTE/stroke risk'],
      ['Estrogen-Only Therapy (ET)', 'Oral estradiol 1-2mg OD or transdermal patch 50 mcg', 'Post-hysterectomy women with menopausal symptoms + OA', 'No progestogen needed; transdermal preferred; lower CVD and VTE risk vs oral'],
      ['Tibolone', '2.5 mg OD orally', 'Menopausal symptoms with possible OA benefit; not available in all countries', 'Synthetic steroid with estrogenic, progestogenic and androgenic activity; may improve mood and libido'],
    ],
    [18, 32, 28, 22]
  ),
  sectionDivider(),
  note('HT is NOT a primary OA treatment. It should be prescribed primarily for menopausal symptom management by an appropriate specialist. OA-specific treatments (as above) should be continued alongside. HT decisions require individual benefit-risk assessment (considering cardiovascular, breast cancer, VTE risk).'),
  note('HT use should be reassessed annually. Consider discontinuation after 3-5 years of use in women at average risk. Current IMS/NAMS/EMAS guidelines support use when benefits outweigh risks.'),

  h3('E. Bone Protection in Menopausal Women with OA'),
  body('Concurrent osteoporosis management is often required:'),
  bullet('DEXA scan: recommended for all post-menopausal women with OA given concurrent fall/fracture risk'),
  bullet('Calcium (1200 mg/day) + Vitamin D (800-1000 IU/day): supplement if dietary intake insufficient'),
  bullet('Bisphosphonates (e.g., alendronate 70mg weekly): for osteoporosis - NOT for OA symptoms (ACR strongly against for OA)'),
  bullet('Denosumab (60mg SC every 6 months): second-line for osteoporosis in post-menopausal women'),
  note('Bisphosphonates are NOT recommended for OA symptom management (ACR strong recommendation against). Prescribe only if concurrent osteoporosis diagnosis confirmed on DEXA.'),

  h3('F. Guideline References for Menopausal Women'),
  linkPara('ACR/AF 2019 Osteoarthritis Guidelines', 'https://www.rheumatology.org/Portals/0/Files/ACR-2019-OA-Guideline.pdf'),
  linkPara('EULAR 2024 Recommendations for OA Management', 'https://ard.bmj.com/content/83/6/730'),
  linkPara('EULAR 2025 Physical Activity in OA', 'https://ard.bmj.com/content/early/2025/03/01/ard-2024-226757'),
  linkPara('International Menopause Society (IMS) HRT Guidelines 2023', 'https://www.imsociety.org/education/menopause-live/menopause-live-detail/2023/hormonal-treatment-of-the-menopause-ims-guidelines'),
  linkPara('North American Menopause Society (NAMS) Position Statement', 'https://www.menopause.org/publications/clinical-practice-materials/hormone-therapy-position-statement'),
  linkPara('OARSI 2023 OA Guidelines', 'https://www.oarsijournal.com/article/S1063-4584(23)00739-7/fulltext'),
  linkPara('HRT and OA outcomes - PMC Review (2022)', 'https://pmc.ncbi.nlm.nih.gov/articles/PMC9397736'),
  linkPara('OA Guidelines Comparison across 6 Societies - PMC (2022)', 'https://pmc.ncbi.nlm.nih.gov/articles/PMC9377706'),

  sectionDivider(),

  // ── SUMMARY TABLE ──
  h2('6.4 Summary Comparison: Treatment by Patient Group'),
  sectionDivider(),
  makeTable(
    ['Treatment', 'Men', 'Women (Pre/Peri-menopausal)', 'Menopausal Women'],
    [
      ['Topical NSAIDs', 'First-line for local joints', 'First-line; avoid in pregnancy', 'PREFERRED first-line (lower systemic risk)'],
      ['Oral NSAIDs', 'Use with CVD/renal assessment', 'Use with pregnancy risk assessment', 'Cautious use; assess CVD/renal; naproxen + PPI preferred'],
      ['COX-2 inhibitors', 'If GI risk, no CVD', 'If GI risk; avoid pregnancy', 'If GI risk, MANDATORY CVD assessment'],
      ['Duloxetine', 'Useful for widespread pain', 'Useful if comorbid depression/anxiety', 'ESPECIALLY useful - treats OA pain + mood + vasomotor symptoms'],
      ['Intra-articular steroids', 'Safe; caution in diabetes', 'Safe; avoid in pregnancy', 'Caution in diabetics; hyperglycemia risk; limit frequency'],
      ['Tramadol', 'Short-term only; renal dose adjust', 'Avoid in pregnancy/breastfeeding', 'HIGH fall/cognitive risk; lowest dose; short-term only'],
      ['Hormone Therapy (HT)', 'Not applicable', 'Not applicable for OA', 'May provide joint-protective + vasomotor benefits; individualize risk'],
      ['Bone protection', 'Routine calcium/vit D', 'Routine calcium/vit D', 'DEXA scan + calcium/vit D + bisphosphonate if osteoporosis'],
      ['Exercise emphasis', 'Aerobic + resistance; occupational modification', 'Weight-bearing + aquatic; pelvic floor consideration', 'Resistance (sarcopenia prevention) + balance training + aquatic'],
    ],
    [25, 22, 27, 26]
  ),
  sectionDivider(),
];

// ──────────────────────────────────────────────
// REFERENCES
// ──────────────────────────────────────────────
const references = [
  h1('References & Guidelines'),
  h2('Major Guidelines'),
  linkPara('ACR/Arthritis Foundation OA Guideline 2019 (Hand, Hip, Knee)', 'https://www.rheumatology.org/Portals/0/Files/ACR-2019-OA-Guideline.pdf'),
  linkPara('EULAR 2024 Recommendations for Non-pharmacological Management of Hip and Knee OA', 'https://ard.bmj.com/content/83/6/730'),
  linkPara('EULAR 2025 Update - Physical Activity in IA and OA', 'https://ard.bmj.com/content/early/2025/03/01/ard-2024-226757'),
  linkPara('OARSI OA Guidelines 2023', 'https://www.oarsijournal.com/article/S1063-4584(23)00739-7/fulltext'),
  linkPara('AAOS Knee OA Clinical Practice Guideline', 'https://www.aaos.org/quality/quality-programs/lower-extremity-programs/osteoarthritis-of-the-knee/'),
  linkPara('International Menopause Society Global Consensus on Menopause HT', 'https://www.imsociety.org/education/menopause-live/menopause-live-detail/2023/hormonal-treatment-of-the-menopause-ims-guidelines'),
  linkPara('North American Menopause Society (NAMS) 2022 HT Position Statement', 'https://www.menopause.org/publications/clinical-practice-materials/hormone-therapy-position-statement'),
  linkPara('EMAS Guidelines for Menopausal HT', 'https://www.emas-online.org/guidelines/'),

  h2('Key Textbook Sources'),
  bullet('Goldman-Cecil Medicine, 26th Edition, Chapter 241: Osteoarthritis (David J. Hunter)'),
  bullet('Textbook of Family Medicine, 9th Edition, Chapter 32: Musculoskeletal Problems (Swanson)'),
  bullet("Robbins & Kumar Basic Pathology: Joint diseases"),

  h2('Supporting Evidence'),
  linkPara('OA Guidelines Comparison - 6 Professional Societies (PMC 2022)', 'https://pmc.ncbi.nlm.nih.gov/articles/PMC9377706'),
  linkPara('HRT, Menopause and OA/CVD Outcomes - Narrative Review (PMC 2022)', 'https://pmc.ncbi.nlm.nih.gov/articles/PMC9397736'),
  linkPara('Prieto-Alhambra et al. OA Incidence by Age/Sex (ARD 2014)', 'https://ard.bmj.com/content/73/9/1659'),
];

// ──────────────────────────────────────────────
// ASSEMBLE DOCUMENT
// ──────────────────────────────────────────────
const allChildren = [
  ...coverPage,
  ...section1,
  ...section2,
  ...section3,
  ...section4,
  ...section5,
  ...section6,
  ...references,
];

const doc = new Document({
  creator: 'Orris Medical AI',
  title: 'Osteoarthritis Presentation Outline',
  description: 'Comprehensive OA presentation covering classification, clinical features, investigations, diagnosis, and sex-specific treatment',
  styles: {
    default: {
      document: {
        run: { font: 'Calibri', size: 22 },
      },
    },
    paragraphStyles: [
      {
        id: 'Heading1',
        name: 'Heading 1',
        basedOn: 'Normal',
        next: 'Normal',
        quickFormat: true,
        run: { size: 32, bold: true, color: '1F4E79', font: 'Calibri' },
        paragraph: { spacing: { before: 400, after: 200 } },
      },
      {
        id: 'Heading2',
        name: 'Heading 2',
        basedOn: 'Normal',
        next: 'Normal',
        quickFormat: true,
        run: { size: 26, bold: true, color: '2E74B5', font: 'Calibri' },
        paragraph: { spacing: { before: 300, after: 150 } },
      },
      {
        id: 'Heading3',
        name: 'Heading 3',
        basedOn: 'Normal',
        next: 'Normal',
        quickFormat: true,
        run: { size: 24, bold: true, color: '5B9BD5', font: 'Calibri' },
        paragraph: { spacing: { before: 200, after: 100 } },
      },
    ],
  },
  sections: [
    {
      properties: {},
      children: allChildren,
    },
  ],
});

const outputPath = '/home/daytona/workspace/osteoarthritis-presentation/Osteoarthritis_Presentation_Outline.docx';
Packer.toBuffer(doc).then((buffer) => {
  fs.writeFileSync(outputPath, buffer);
  console.log('SUCCESS: Document saved to', outputPath);
}).catch((err) => {
  console.error('ERROR:', err);
  process.exit(1);
});
Running Command

cd /home/daytona/workspace/osteoarthritis-presentation && node build_oa_doc.js 2>&1

Running Command

python3 /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/workspace/osteoarthritis-presentation/Osteoarthritis_Presentation_Outline.docx 2>&1

Running Command

cd /home/daytona/workspace/osteoarthritis-presentation && ls -lh *.docx && python3 -c "import zipfile; z=zipfile.ZipFile('Osteoarthritis_Presentation_Outline.docx'); print('Valid ZIP. Files:', z.namelist()[:10])"

Your Word document is ready:

Osteoarthritis Presentation Outline

Word Document · DOCX


Here is a full summary of what is inside the document:

Document Contents (6 Sections + Cover Page)

Cover Page - Titled with all sections listed, guideline references noted (ACR/AF 2019, EULAR 2024, OARSI 2023)

Section 1 - Introduction, Identification & Classification

  • Definition and pathobiology (cartilage, subchondral bone, synovium changes)
  • Epidemiology with sex-specific incidence data (47% lifetime risk in women vs 40% in men)
  • Modifiable vs non-modifiable risk factors
  • Classification tables:
    • By etiology: Primary, Secondary, Hereditary
    • Kellgren-Lawrence radiological grading (Grade 0-4)
    • ACR classification by joint site (knee, hip, hand, spine)
    • ACR diagnostic classification criteria per joint

Section 2 - Typical Clinical Manifestations

  • Symptoms: pain pattern, morning stiffness <30 min, crepitus, gel phenomenon
  • Physical examination signs
  • Joint-specific features table (knee, hip, hand DIP/PIP, spine, first CMC)
  • Disease stages (early, moderate, advanced)

Section 3 - Laboratory Investigations

  • Key principle: OA is clinical/radiological; labs used to EXCLUDE differentials
  • Blood tests table (ESR, CRP, FBC, RF, anti-CCP, uric acid, ferritin, thyroid)
  • Synovial fluid analysis comparison table (OA vs septic arthritis vs gout)
  • Imaging: X-ray (first line), MRI, ultrasound, CT scan

Section 4 - Diagnostic Criteria

  • ACR Knee OA criteria 1986 (sensitivity 92%)
  • ACR Hip OA criteria 1991 (sensitivity 89%)
  • ACR Hand OA criteria 1990 (sensitivity 94%)
  • Differential diagnosis table (RA, gout, pseudogout, septic, psoriatic, AS)

Section 5 - Treatment

  • Non-pharmacological: Education, exercise (aerobic/resistance/aquatic/tai chi), weight loss, PT/OT, splints, CBT, heat/cold, assistive devices
  • Pharmacological tables: Acetaminophen, topical NSAIDs, oral NSAIDs (ibuprofen, naproxen, diclofenac, celecoxib, meloxicam), intra-articular corticosteroids and HA, duloxetine, tramadol, glucosamine/chondroitin
  • Surgical options (osteotomy, TJR, arthrodesis)

Section 6 - Sex-Specific Treatment (the detailed section you requested)

GroupKey Treatment Focus
MenCVD/renal risk assessment with NSAIDs; occupational OA considerations; duloxetine for BPH-caution; tramadol dose adjustment
Women (Pre/Peri-menopausal)Pregnancy safety for all drugs; hand OA splinting; topical NSAIDs first-line; chondroitin for hand OA
Menopausal WomenTopical NSAIDs preferred (high systemic risk); naproxen + PPI if oral needed; duloxetine (dual OA + vasomotor benefit); HRT table (EPT vs ET vs tibolone with regimens + indications); bone protection (DEXA + bisphosphonates if osteoporosis); fall risk caution with tramadol
HRT section includes regimens, indications, and notes per formulation type, plus guideline links to IMS, NAMS, EMAS, EULAR, ACR, OARSI.

References Section

All major guideline links are embedded as clickable hyperlinks in the document.

Create me a word file and I need 10 page with that information long and medication dosing too

Give me too Create me a word file and I need 10 page with that information long and medication dosing too

Running Command

mkdir -p /home/daytona/workspace/osteoarthritis-v2 && ls /home/daytona/workspace/osteoarthritis-v2/

Osteoarthritis (OA) Treatment Plan (Based on ACR/EULAR Recommendations) 1. Mild OA (Pain ≤3/10, Minimal Functional Limitation) Non-Pharmacological Treatment (First-Line for All Patients) Patient education Weight reduction if BMI >25 kg/m² Aim for ≥5–10% body weight loss Exercise program: Quadriceps strengthening Aerobic exercise (walking, cycling, swimming) Range of motion exercises Physiotherapy Knee brace or cane if needed Medication Topical NSAIDs (Preferred) Diclofenac 1% gel Knee/ankle/foot: 4 g four times daily Hand/wrist/elbow: 2 g four times daily Maximum: 32 g/day Paracetamol (Acetaminophen) 500–1000 mg orally every 6–8 hours PRN Maximum: Healthy adult: 4 g/day Elderly/liver disease: ≤3 g/day Use when pain is mild and inflammation is minimal. --- 2. Moderate OA (Pain 4–6/10, Daily Activity Affected) Continue all non-pharmacological measures. Oral NSAIDs Ibuprofen 400–800 mg orally every 6–8 hours Maximum: 3200 mg/day Naproxen 250–500 mg orally twice daily Maximum: 1000 mg/day Diclofenac 50 mg orally 2–3 times daily Maximum: 150 mg/day Celecoxib (COX-2 inhibitor) Indicated if: Gastric ulcer history High GI risk Dose: 100 mg twice daily OR 200 mg once daily Gastroprotection For patients: Age >65 Previous peptic ulcer Concurrent anticoagulants Add: Pantoprazole 40 mg daily OR Omeprazole 20 mg daily --- 3. Moderate-Severe OA (Pain 6–8/10 Despite NSAIDs) Duloxetine Useful when: Chronic OA pain Central sensitization Depression/anxiety coexist Dose: Start 30 mg daily for 1 week Then 60 mg daily Maximum: 60 mg/day --- Tramadol Reserved for: Failure of NSAIDs Not surgical candidate Dose: 25–50 mg every 4–6 hours PRN Maximum: 400 mg/day Elderly >75 years: 300 mg/day Monitor: Dizziness Falls Constipation Dependence risk --- 4. Acute OA Flare (Synovitis/Effusion) Intra-Articular Corticosteroid Injection Triamcinolone Acetonide Knee: 20–40 mg Shoulder: 20–40 mg Hip: 40 mg (image-guided) Maximum: Every 3 months No more than 3–4 injections/year Indications: Significant joint effusion Acute inflammatory flare Severe pain preventing rehabilitation Expected benefit: 2–8 weeks --- 5. Severe OA (Pain >8/10) Combination Therapy Example: Diclofenac gel QID Celecoxib 100 mg BID Duloxetine 60 mg/day OR Naproxen 500 mg BID Pantoprazole 40 mg/day Duloxetine 60 mg/day Short-term: Tramadol 50 mg every 6 hours PRN --- 6. Knee OA-Specific Measures Unloader Brace Indications: Unicompartmental OA Varus/valgus deformity Walking Aid Cane in opposite hand Reduces knee load by ~20–25% --- 7. Hip OA Preferred: Weight loss Physiotherapy NSAIDs Injection: Ultrasound-guided corticosteroid Avoid: Repeated injections --- 8. Hand OA Topical NSAIDs First-line treatment Thumb Splint For first CMC joint OA Oral NSAIDs If topical therapy fails --- 9. Treatments NOT Routinely Recommended ❌ Glucosamine ❌ Chondroitin ❌ Stem cell therapy ❌ PRP (Platelet-rich plasma) ❌ Hyaluronic acid injections (ACR recommendation against routine use) ❌ Long-term opioid therapy --- 10. Surgical Treatment Total Knee Arthroplasty (TKA) Indications: End-stage OA Severe pain Failed conservative therapy ≥6 months Marked functional limitation Expected outcome: Pain relief in 80–90% of patients --- Total Hip Arthroplasty (THA) Indications: Advanced hip OA Severe disability Radiographic progression --- Suggested Stepwise Approach for Exams Step 1: Education + Exercise + Weight Loss ↓ Step 2: Topical NSAID ± Paracetamol ↓ Step 3: Oral NSAID (with PPI if high GI risk) ↓ Step 4: Duloxetine or Intra-articular Steroid ↓ Step 5: Short-term Tramadol ↓ Step 6: Total Joint Replacement This is the treatment algorithm most closely aligned with current ACR and EULAR osteoarthritis guidelines and is suitable for clinical exams, ward presentations, and orthopedic rotations. Make me a ppt from given information same as it

Reading File
Reading File
Writing File

~/osteoarthritis-v2/build_oa_pptx.js

"use strict";
const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.author = "Orris Medical AI";
pres.title = "Osteoarthritis (OA) Treatment Plan – ACR/EULAR";

// ─────────────────────────────────────────────
// COLOUR PALETTE
// ─────────────────────────────────────────────
const C = {
  darkNav:  "0D2137",   // very dark navy – title bg, section headers
  navy:     "1B3A5C",   // main brand navy
  mid:      "2E74B5",   // medium blue – sub-headers, accents
  light:    "D6E4F0",   // light blue – cell fills, bg panels
  accent:   "E84A2F",   // red-orange – warnings, NOT-recommended
  green:    "1A7A4A",   // green – preferred / step markers
  amber:    "C67C00",   // amber – caution notices
  white:    "FFFFFF",
  nearBlack:"111111",
  grey:     "5A5A5A",
  lightGrey:"F4F7FB",
};

// ─────────────────────────────────────────────
// SHARED HELPERS
// ─────────────────────────────────────────────
function darkSlide(slide) {
  slide.background = { color: C.darkNav };
}
function lightSlide(slide) {
  slide.background = { color: C.lightGrey };
}

// Full-width top banner
function addBanner(slide, text, subtext, dark = false) {
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: "100%", h: 1.05,
    fill: { color: dark ? C.navy : C.mid },
    line: { type: "none" },
  });
  slide.addText(text, {
    x: 0.3, y: 0.04, w: 9.4, h: 0.62,
    fontSize: 22, bold: true, color: C.white,
    fontFace: "Calibri", valign: "middle", margin: 0,
  });
  if (subtext) {
    slide.addText(subtext, {
      x: 0.3, y: 0.66, w: 9.4, h: 0.32,
      fontSize: 11, color: C.light, fontFace: "Calibri",
      italic: true, valign: "top", margin: 0,
    });
  }
}

// Left-side accent bar + section label
function addSectionBar(slide, label, color) {
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 1.08, w: 0.18, h: 4.42,
    fill: { color: color || C.mid }, line: { type: "none" },
  });
  slide.addText(label, {
    x: 0.01, y: 1.08, w: 0.16, h: 4.42,
    fontSize: 7, color: C.white, fontFace: "Calibri",
    bold: true, rotate: 270, align: "center", valign: "middle", margin: 0,
  });
}

// Small pill badge
function badge(slide, txt, x, y, color) {
  slide.addShape(pres.ShapeType.roundRect, {
    x, y, w: 1.5, h: 0.3,
    fill: { color: color || C.mid },
    line: { type: "none" }, rectRadius: 0.06,
  });
  slide.addText(txt, {
    x, y, w: 1.5, h: 0.3,
    fontSize: 8.5, bold: true, color: C.white,
    fontFace: "Calibri", align: "center", valign: "middle", margin: 0,
  });
}

// Bullet list helper – returns array for addText
function blist(items, opts = {}) {
  return items.map((item, i) => ({
    text: item.text || item,
    options: {
      bullet: item.sub ? { indent: 27 } : { indent: 12 },
      fontSize: item.fs || opts.fs || 11.5,
      color: item.color || opts.color || C.nearBlack,
      bold: !!item.bold,
      breakLine: i < items.length - 1,
      fontFace: "Calibri",
    },
  }));
}

// Two-column layout helper
function twoCol(slide, leftItems, rightItems, yStart, height, fsz) {
  const fs = fsz || 11;
  slide.addText(blist(leftItems, { fs }), {
    x: 0.25, y: yStart, w: 4.55, h: height,
    valign: "top", margin: [4, 6, 4, 6],
    fill: { color: C.white }, line: { color: C.light, pt: 1 },
  });
  slide.addText(blist(rightItems, { fs }), {
    x: 4.9, y: yStart, w: 4.85, h: height,
    valign: "top", margin: [4, 6, 4, 6],
    fill: { color: C.white }, line: { color: C.light, pt: 1 },
  });
}

// Dosing box
function dosingBox(slide, drug, dose, max, notes, x, y, w, h, badgeColor) {
  slide.addShape(pres.ShapeType.rect, {
    x, y, w, h,
    fill: { color: C.white },
    line: { color: badgeColor || C.mid, pt: 1.5 },
  });
  // top colour strip
  slide.addShape(pres.ShapeType.rect, {
    x, y, w, h: 0.26,
    fill: { color: badgeColor || C.mid },
    line: { type: "none" },
  });
  slide.addText(drug, {
    x: x + 0.08, y: y + 0.01, w: w - 0.1, h: 0.24,
    fontSize: 10, bold: true, color: C.white,
    fontFace: "Calibri", valign: "middle", margin: 0,
  });
  const lines = [];
  if (dose)  lines.push({ text: "Dose: " + dose,  options: { fontSize: 9.5, color: C.nearBlack, fontFace: "Calibri", bold: false, breakLine: true } });
  if (max)   lines.push({ text: "Max: "  + max,   options: { fontSize: 9.5, color: accent(badgeColor), fontFace: "Calibri", bold: true, breakLine: true } });
  if (notes) lines.push({ text: notes,             options: { fontSize: 8.5, color: C.grey, fontFace: "Calibri", italic: true } });
  slide.addText(lines, {
    x: x + 0.08, y: y + 0.3, w: w - 0.16, h: h - 0.36,
    valign: "top", margin: 0,
  });
}

function accent(c) {
  if (c === C.green) return C.green;
  if (c === C.accent) return C.accent;
  return C.navy;
}

// Step arrow for algorithm slide
function stepArrow(slide, num, label, x, y, color) {
  slide.addShape(pres.ShapeType.chevron, {
    x, y, w: 1.52, h: 0.58,
    fill: { color: color || C.mid },
    line: { type: "none" },
  });
  slide.addText([
    { text: `Step ${num}`, options: { fontSize: 8, bold: true, color: C.white, breakLine: true } },
    { text: label,         options: { fontSize: 7.5, color: C.white } },
  ], {
    x, y, w: 1.52, h: 0.58,
    align: "center", valign: "middle", margin: 0, fontFace: "Calibri",
  });
}

// ─────────────────────────────────────────────
// SLIDE 1 – TITLE
// ─────────────────────────────────────────────
{
  const s = pres.addSlide();
  darkSlide(s);

  // Large background geometry
  s.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: "100%", h: "100%",
    fill: { color: C.darkNav }, line: { type: "none" },
  });
  s.addShape(pres.ShapeType.rect, {
    x: 0, y: 3.5, w: "100%", h: 2.125,
    fill: { color: C.navy }, line: { type: "none" },
  });
  s.addShape(pres.ShapeType.rect, {
    x: 7.5, y: 0, w: 2.5, h: 3.5,
    fill: { color: C.mid }, line: { type: "none" },
  });
  // Accent bar
  s.addShape(pres.ShapeType.rect, {
    x: 0, y: 3.5, w: 0.25, h: 2.125,
    fill: { color: C.accent }, line: { type: "none" },
  });

  s.addText("OSTEOARTHRITIS", {
    x: 0.4, y: 0.45, w: 6.9, h: 1,
    fontSize: 40, bold: true, color: C.white,
    fontFace: "Calibri", charSpacing: 3, margin: 0,
  });
  s.addText("Treatment Plan", {
    x: 0.4, y: 1.4, w: 6.9, h: 0.65,
    fontSize: 28, color: C.light, fontFace: "Calibri", margin: 0,
  });
  s.addText("OA", {
    x: 7.6, y: 0.2, w: 2.3, h: 3.0,
    fontSize: 120, bold: true, color: "FFFFFF18",
    fontFace: "Calibri", align: "center", valign: "middle", margin: 0,
  });
  s.addText("Based on ACR / EULAR Recommendations", {
    x: 0.4, y: 3.6, w: 9.3, h: 0.38,
    fontSize: 13, color: C.light, fontFace: "Calibri",
    italic: true, margin: 0,
  });
  s.addText([
    { text: "Mild  →  Moderate  →  Severe  →  Surgical", options: { fontSize: 11, color: "FFFFFFAA" } },
  ], { x: 0.4, y: 4.05, w: 9.3, h: 0.3, fontFace: "Calibri", margin: 0 });

  s.addText("ACR/AF 2019   |   EULAR 2024   |   OARSI 2023", {
    x: 0.4, y: 4.9, w: 9.3, h: 0.3,
    fontSize: 9.5, color: "FFFFFF66", fontFace: "Calibri", margin: 0,
  });
}

// ─────────────────────────────────────────────
// SLIDE 2 – TABLE OF CONTENTS
// ─────────────────────────────────────────────
{
  const s = pres.addSlide();
  lightSlide(s);
  addBanner(s, "Presentation Overview", "ACR/EULAR-Based OA Treatment Plan");
  addSectionBar(s, "OVERVIEW", C.navy);

  const sections = [
    ["01", "Mild OA",            "Pain ≤3/10 · Non-pharmacological + Topical/Paracetamol"],
    ["02", "Moderate OA",        "Pain 4–6/10 · Oral NSAIDs · Gastroprotection"],
    ["03", "Moderate-Severe OA", "Pain 6–8/10 · Duloxetine · Tramadol"],
    ["04", "Acute OA Flare",     "Synovitis/Effusion · Intra-articular Corticosteroid"],
    ["05", "Severe OA",          "Pain >8/10 · Combination Therapy"],
    ["06", "Joint-Specific OA",  "Knee · Hip · Hand"],
    ["07", "NOT Recommended",    "Glucosamine · PRP · Stem Cell · Long-term Opioids"],
    ["08", "Surgical Treatment", "TKA · THA – Indications & Outcomes"],
    ["09", "Stepwise Algorithm", "6-Step Exam-Ready Treatment Ladder"],
  ];

  const cols = 3;
  const boxW = 3.0, boxH = 0.78, gapX = 0.18, gapY = 0.1;
  const startX = 0.25, startY = 1.15;

  sections.forEach(([num, title, sub], i) => {
    const col = i % cols;
    const row = Math.floor(i / cols);
    const x = startX + col * (boxW + gapX);
    const y = startY + row * (boxH + gapY);

    s.addShape(pres.ShapeType.rect, {
      x, y, w: boxW, h: boxH,
      fill: { color: C.white }, line: { color: C.light, pt: 1 },
    });
    s.addShape(pres.ShapeType.rect, {
      x, y, w: 0.38, h: boxH,
      fill: { color: C.mid }, line: { type: "none" },
    });
    s.addText(num, {
      x, y, w: 0.38, h: boxH,
      fontSize: 13, bold: true, color: C.white,
      fontFace: "Calibri", align: "center", valign: "middle", margin: 0,
    });
    s.addText(title, {
      x: x + 0.44, y: y + 0.07, w: boxW - 0.5, h: 0.32,
      fontSize: 11.5, bold: true, color: C.navy,
      fontFace: "Calibri", margin: 0,
    });
    s.addText(sub, {
      x: x + 0.44, y: y + 0.4, w: boxW - 0.5, h: 0.32,
      fontSize: 8.5, color: C.grey, fontFace: "Calibri",
      italic: true, margin: 0,
    });
  });
}

// ─────────────────────────────────────────────
// SLIDE 3 – MILD OA: Non-Pharmacological
// ─────────────────────────────────────────────
{
  const s = pres.addSlide();
  lightSlide(s);
  addBanner(s, "Mild OA — Step 1: Non-Pharmacological Treatment (First-Line for ALL)", "Pain ≤3/10 · Minimal Functional Limitation");
  addSectionBar(s, "MILD OA", C.green);
  badge(s, "Pain ≤ 3/10", 0.25, 1.12, C.green);
  badge(s, "FIRST LINE", 1.85, 1.12, C.mid);

  twoCol(s,
    [
      { text: "EDUCATION & LIFESTYLE", bold: true, color: C.navy, fs: 11 },
      { text: "Patient education about OA & prognosis" },
      { text: "Arthritis self-management program" },
      { text: "Goal-setting and pain-coping strategies" },
      "",
      { text: "WEIGHT REDUCTION", bold: true, color: C.navy, fs: 11 },
      { text: "Indicated if BMI > 25 kg/m²" },
      { text: "Target: ≥5–10% body weight loss" },
      { text: "Each 1 kg lost = 4 kg less knee load" },
    ],
    [
      { text: "EXERCISE PROGRAM", bold: true, color: C.navy, fs: 11 },
      { text: "Quadriceps strengthening (Level 1A)" },
      { text: "Aerobic: walking, cycling, swimming" },
      { text: "Range of motion exercises" },
      { text: "Aquatic/hydrotherapy" },
      "",
      { text: "PHYSIOTHERAPY & AIDS", bold: true, color: C.navy, fs: 11 },
      { text: "Physiotherapy referral" },
      { text: "Knee brace or cane if needed" },
      { text: "Occupational therapy & joint protection" },
    ],
    1.48, 3.85, 11
  );
}

// ─────────────────────────────────────────────
// SLIDE 4 – MILD OA: Medications
// ─────────────────────────────────────────────
{
  const s = pres.addSlide();
  lightSlide(s);
  addBanner(s, "Mild OA — Medications: Topical NSAIDs & Paracetamol", "Preferred pharmacological options when pain is mild and inflammation is minimal");
  addSectionBar(s, "MILD OA", C.green);
  badge(s, "TOPICAL FIRST", 0.25, 1.12, C.green);

  // Topical NSAID card
  s.addShape(pres.ShapeType.rect, {
    x: 0.25, y: 1.5, w: 5.5, h: 3.8,
    fill: { color: C.white }, line: { color: C.green, pt: 2 },
  });
  s.addShape(pres.ShapeType.rect, {
    x: 0.25, y: 1.5, w: 5.5, h: 0.34,
    fill: { color: C.green }, line: { type: "none" },
  });
  s.addText("TOPICAL NSAID — Diclofenac 1% Gel  (Preferred First-Line)", {
    x: 0.35, y: 1.52, w: 5.3, h: 0.3,
    fontSize: 10.5, bold: true, color: C.white, fontFace: "Calibri", margin: 0,
  });
  s.addText([
    { text: "Indication: ", options: { bold: true, fontSize: 11, color: C.navy, breakLine: true } },
    { text: "Knee, ankle, foot, hand, wrist, elbow OA", options: { fontSize: 11, color: C.nearBlack, breakLine: true } },
    { text: " ", options: { fontSize: 6, breakLine: true } },
    { text: "Dosing by Joint:", options: { bold: true, fontSize: 11, color: C.navy, breakLine: true } },
    { text: "Knee / Ankle / Foot:   4 g  four times daily (QID)", options: { bullet: { indent: 12 }, fontSize: 11, color: C.nearBlack, breakLine: true } },
    { text: "Hand / Wrist / Elbow:  2 g  four times daily (QID)", options: { bullet: { indent: 12 }, fontSize: 11, color: C.nearBlack, breakLine: true } },
    { text: " ", options: { fontSize: 6, breakLine: true } },
    { text: "Maximum Daily Dose:  32 g / day", options: { bold: true, fontSize: 11, color: C.accent, breakLine: true } },
    { text: " ", options: { fontSize: 6, breakLine: true } },
    { text: "Advantages:", options: { bold: true, fontSize: 11, color: C.navy, breakLine: true } },
    { text: "Minimal systemic absorption → safer in elderly, renal impairment, CV risk", options: { bullet: { indent: 12 }, fontSize: 10.5, color: C.nearBlack, breakLine: true } },
    { text: "Strongly recommended by ACR/AF for knee and hand OA", options: { bullet: { indent: 12 }, fontSize: 10.5, color: C.nearBlack } },
  ], {
    x: 0.35, y: 1.9, w: 5.3, h: 3.3,
    valign: "top", margin: 0, fontFace: "Calibri",
  });

  // Paracetamol card
  s.addShape(pres.ShapeType.rect, {
    x: 5.9, y: 1.5, w: 3.85, h: 3.8,
    fill: { color: C.white }, line: { color: C.mid, pt: 2 },
  });
  s.addShape(pres.ShapeType.rect, {
    x: 5.9, y: 1.5, w: 3.85, h: 0.34,
    fill: { color: C.mid }, line: { type: "none" },
  });
  s.addText("PARACETAMOL (Acetaminophen)", {
    x: 6.0, y: 1.52, w: 3.65, h: 0.3,
    fontSize: 10.5, bold: true, color: C.white, fontFace: "Calibri", margin: 0,
  });
  s.addText([
    { text: "Dose:", options: { bold: true, fontSize: 11, color: C.navy, breakLine: true } },
    { text: "500–1000 mg orally every 6–8 hours PRN", options: { fontSize: 11, color: C.nearBlack, breakLine: true } },
    { text: " ", options: { fontSize: 6, breakLine: true } },
    { text: "Maximum Daily Dose:", options: { bold: true, fontSize: 11, color: C.navy, breakLine: true } },
    { text: "Healthy adult:           4 g / day", options: { bullet: { indent: 12 }, fontSize: 11, color: C.nearBlack, breakLine: true } },
    { text: "Elderly / liver disease: ≤ 3 g / day", options: { bullet: { indent: 12 }, fontSize: 11, color: C.accent, breakLine: true } },
    { text: " ", options: { fontSize: 6, breakLine: true } },
    { text: "ACR Recommendation:", options: { bold: true, fontSize: 11, color: C.navy, breakLine: true } },
    { text: "Conditional (no longer considered first-line due to modest efficacy)", options: { fontSize: 10.5, color: C.grey, italic: true, breakLine: true } },
    { text: " ", options: { fontSize: 6, breakLine: true } },
    { text: "Use when:", options: { bold: true, fontSize: 11, color: C.navy, breakLine: true } },
    { text: "Pain mild · Inflammation minimal · NSAID contraindicated", options: { fontSize: 10.5, color: C.nearBlack } },
  ], {
    x: 6.0, y: 1.9, w: 3.65, h: 3.3,
    valign: "top", margin: 0, fontFace: "Calibri",
  });
}

// ─────────────────────────────────────────────
// SLIDE 5 – MODERATE OA: Oral NSAIDs
// ─────────────────────────────────────────────
{
  const s = pres.addSlide();
  lightSlide(s);
  addBanner(s, "Moderate OA — Oral NSAIDs", "Pain 4–6/10 · Daily Activity Affected · Continue ALL Non-Pharmacological Measures");
  addSectionBar(s, "MODERATE OA", C.mid);
  badge(s, "Pain 4–6/10", 0.25, 1.12, C.mid);
  badge(s, "ORAL NSAIDs", 1.85, 1.12, C.navy);

  // 4 drug boxes
  const drugs = [
    { name: "Ibuprofen", dose: "400–800 mg orally every 6–8 h with food", max: "3200 mg/day", notes: "First choice · widely available · add PPI if GI risk", col: C.mid },
    { name: "Naproxen", dose: "250–500 mg orally twice daily (BID)", max: "1000 mg/day", notes: "Longer half-life · relatively favourable CV risk profile", col: C.navy },
    { name: "Diclofenac", dose: "50 mg 2–3× daily  OR  75 mg SR twice daily", max: "150 mg/day", notes: "Also available as slow-release; topical preferred for local joints", col: C.mid },
    { name: "Celecoxib  (COX-2 inhibitor)", dose: "100 mg twice daily  OR  200 mg once daily", max: "200 mg/day", notes: "Indicated: GI ulcer history · high GI risk · CAUTION: cardiovascular disease", col: C.accent },
  ];
  const boxW = 4.65, boxH = 2.0;
  drugs.forEach((d, i) => {
    const x = i % 2 === 0 ? 0.25 : 5.1;
    const y = Math.floor(i / 2) === 0 ? 1.5 : 3.62;
    dosingBox(s, d.name, d.dose, d.max, d.notes, x, y, boxW, boxH, d.col);
  });
}

// ─────────────────────────────────────────────
// SLIDE 6 – GASTROPROTECTION
// ─────────────────────────────────────────────
{
  const s = pres.addSlide();
  lightSlide(s);
  addBanner(s, "Moderate OA — Gastroprotection with Oral NSAIDs", "Mandatory in high-risk patients to prevent NSAID-induced ulcers");
  addSectionBar(s, "MODERATE OA", C.mid);
  badge(s, "GI PROTECTION", 0.25, 1.12, C.amber);

  // Indication box
  s.addShape(pres.ShapeType.rect, {
    x: 0.25, y: 1.5, w: 9.5, h: 1.5,
    fill: { color: "FFF8E6" }, line: { color: C.amber, pt: 1.5 },
  });
  s.addText("Indications for Adding a PPI to NSAID Therapy", {
    x: 0.35, y: 1.55, w: 9.3, h: 0.3,
    fontSize: 12, bold: true, color: C.amber, fontFace: "Calibri", margin: 0,
  });
  s.addText([
    { text: "Age > 65 years", options: { bullet: { indent: 12 }, fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: "History of peptic ulcer disease or upper GI bleeding", options: { bullet: { indent: 12 }, fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: "Concurrent use of oral corticosteroids or anticoagulants", options: { bullet: { indent: 12 }, fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: "Alcohol use / smoking (relative indication)", options: { bullet: { indent: 12 }, fontSize: 11.5, color: C.nearBlack } },
  ], { x: 0.35, y: 1.88, w: 9.3, h: 1.05, valign: "top", margin: 0, fontFace: "Calibri" });

  // Two PPI cards
  dosingBox(s, "Pantoprazole (Preferred)", "40 mg orally once daily, taken before food", "40 mg / day", "Take 30 min before first meal of the day", 0.25, 3.15, 4.6, 2.2, C.green);
  dosingBox(s, "Omeprazole (Alternative)", "20 mg orally once daily, taken before food", "20 mg / day", "Equally effective; may interact with clopidogrel", 5.15, 3.15, 4.6, 2.2, C.mid);

  s.addText("⚠  COX-2 inhibitor (Celecoxib) does NOT eliminate need for PPI in very high GI-risk patients", {
    x: 0.25, y: 5.22, w: 9.5, h: 0.28,
    fontSize: 9.5, color: C.accent, fontFace: "Calibri", italic: true, margin: 0,
  });
}

// ─────────────────────────────────────────────
// SLIDE 7 – MODERATE-SEVERE OA: Duloxetine
// ─────────────────────────────────────────────
{
  const s = pres.addSlide();
  lightSlide(s);
  addBanner(s, "Moderate-Severe OA — Duloxetine (SNRI)", "Pain 6–8/10 · Despite NSAIDs · Central Sensitization · Comorbid Depression/Anxiety");
  addSectionBar(s, "MOD-SEVERE", C.navy);
  badge(s, "Pain 6–8/10", 0.25, 1.12, C.navy);
  badge(s, "CENTRAL PAIN", 1.85, 1.12, C.mid);

  // Large feature card
  s.addShape(pres.ShapeType.rect, {
    x: 0.25, y: 1.5, w: 6.0, h: 3.9,
    fill: { color: C.white }, line: { color: C.navy, pt: 2 },
  });
  s.addShape(pres.ShapeType.rect, {
    x: 0.25, y: 1.5, w: 6.0, h: 0.36,
    fill: { color: C.navy }, line: { type: "none" },
  });
  s.addText("DULOXETINE  (Cymbalta®)  –  SNRI", {
    x: 0.35, y: 1.52, w: 5.8, h: 0.32,
    fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", margin: 0,
  });
  s.addText([
    { text: "Indications:", options: { bold: true, fontSize: 12, color: C.navy, breakLine: true } },
    { text: "Chronic OA pain not responding to NSAIDs", options: { bullet: { indent: 12 }, fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: "Central sensitization / widespread pain", options: { bullet: { indent: 12 }, fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: "Co-existing depression or anxiety", options: { bullet: { indent: 12 }, fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: " ", options: { fontSize: 5, breakLine: true } },
    { text: "Dosing Protocol:", options: { bold: true, fontSize: 12, color: C.navy, breakLine: true } },
    { text: "Week 1:       30 mg once daily (titration dose)", options: { bullet: { indent: 12 }, fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: "Week 2+:     60 mg once daily (maintenance)", options: { bullet: { indent: 12 }, fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: "Maximum:   60 mg / day", options: { bullet: { indent: 12 }, fontSize: 11.5, bold: true, color: C.accent, breakLine: true } },
    { text: " ", options: { fontSize: 5, breakLine: true } },
    { text: "Mechanism:  Inhibits serotonin & norepinephrine reuptake → descending pain inhibition", options: { fontSize: 10.5, color: C.grey, italic: true } },
  ], {
    x: 0.35, y: 1.92, w: 5.8, h: 3.4,
    valign: "top", margin: 0, fontFace: "Calibri",
  });

  // Side panel – monitoring
  s.addShape(pres.ShapeType.rect, {
    x: 6.5, y: 1.5, w: 3.25, h: 3.9,
    fill: { color: "FFF0F0" }, line: { color: C.accent, pt: 1.5 },
  });
  s.addText("Monitor / Cautions", {
    x: 6.6, y: 1.58, w: 3.05, h: 0.3,
    fontSize: 11, bold: true, color: C.accent, fontFace: "Calibri", margin: 0,
  });
  s.addText([
    { text: "Nausea (common on initiation)", options: { bullet: { indent: 12 }, fontSize: 10.5, color: C.nearBlack, breakLine: true } },
    { text: "Insomnia / dizziness", options: { bullet: { indent: 12 }, fontSize: 10.5, color: C.nearBlack, breakLine: true } },
    { text: "Increased BP — monitor", options: { bullet: { indent: 12 }, fontSize: 10.5, color: C.nearBlack, breakLine: true } },
    { text: "Urinary retention (men with BPH)", options: { bullet: { indent: 12 }, fontSize: 10.5, color: C.nearBlack, breakLine: true } },
    { text: "Sexual dysfunction", options: { bullet: { indent: 12 }, fontSize: 10.5, color: C.nearBlack, breakLine: true } },
    { text: "Serotonin syndrome risk if combined with SSRIs / tramadol", options: { bullet: { indent: 12 }, fontSize: 10.5, color: C.accent, breakLine: true } },
    { text: " ", options: { fontSize: 5, breakLine: true } },
    { text: "ACR: Conditionally recommended for knee, hip & hand OA", options: { fontSize: 10, color: C.navy, italic: true } },
  ], {
    x: 6.6, y: 1.95, w: 3.05, h: 3.35,
    valign: "top", margin: 0, fontFace: "Calibri",
  });
}

// ─────────────────────────────────────────────
// SLIDE 8 – TRAMADOL
// ─────────────────────────────────────────────
{
  const s = pres.addSlide();
  lightSlide(s);
  addBanner(s, "Moderate-Severe OA — Tramadol", "Reserved for NSAID failure · Not a surgical candidate · Short-term use");
  addSectionBar(s, "MOD-SEVERE", C.navy);
  badge(s, "LAST RESORT", 0.25, 1.12, C.accent);
  badge(s, "MONITOR CLOSELY", 1.85, 1.12, C.amber);

  s.addShape(pres.ShapeType.rect, {
    x: 0.25, y: 1.5, w: 5.8, h: 3.9,
    fill: { color: C.white }, line: { color: C.amber, pt: 2 },
  });
  s.addShape(pres.ShapeType.rect, {
    x: 0.25, y: 1.5, w: 5.8, h: 0.36,
    fill: { color: C.amber }, line: { type: "none" },
  });
  s.addText("TRAMADOL  (Weak Opioid Agonist + SNRI)", {
    x: 0.35, y: 1.52, w: 5.6, h: 0.32,
    fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", margin: 0,
  });
  s.addText([
    { text: "Reserved for:", options: { bold: true, fontSize: 12, color: C.navy, breakLine: true } },
    { text: "Failure of NSAIDs/duloxetine", options: { bullet: { indent: 12 }, fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: "Patient not a surgical candidate", options: { bullet: { indent: 12 }, fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: "Contraindication to other agents", options: { bullet: { indent: 12 }, fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: " ", options: { fontSize: 5, breakLine: true } },
    { text: "Dosing:", options: { bold: true, fontSize: 12, color: C.navy, breakLine: true } },
    { text: "25–50 mg orally every 4–6 hours PRN", options: { bullet: { indent: 12 }, fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: " ", options: { fontSize: 5, breakLine: true } },
    { text: "Maximum Daily Dose:", options: { bold: true, fontSize: 12, color: C.navy, breakLine: true } },
    { text: "Standard adult:   400 mg / day", options: { bullet: { indent: 12 }, fontSize: 11.5, bold: true, color: C.accent, breakLine: true } },
    { text: "Elderly > 75 yr:   300 mg / day  (REDUCE DOSE)", options: { bullet: { indent: 12 }, fontSize: 11.5, bold: true, color: C.accent, breakLine: true } },
    { text: "Renal impairment: dose interval increased (q12h if eGFR < 30)", options: { bullet: { indent: 12 }, fontSize: 10.5, color: C.grey, italic: true } },
  ], {
    x: 0.35, y: 1.92, w: 5.6, h: 3.4,
    valign: "top", margin: 0, fontFace: "Calibri",
  });

  // Adverse effects box
  s.addShape(pres.ShapeType.rect, {
    x: 6.3, y: 1.5, w: 3.45, h: 3.9,
    fill: { color: "FFF8E6" }, line: { color: C.accent, pt: 1.5 },
  });
  s.addText("⚠  Adverse Effects & Monitoring", {
    x: 6.4, y: 1.58, w: 3.25, h: 0.3,
    fontSize: 10.5, bold: true, color: C.accent, fontFace: "Calibri", margin: 0,
  });
  s.addText([
    { text: "Dizziness / sedation", options: { bullet: { indent: 12 }, fontSize: 11, color: C.nearBlack, breakLine: true } },
    { text: "Falls risk (especially elderly)", options: { bullet: { indent: 12 }, fontSize: 11, color: C.accent, bold: true, breakLine: true } },
    { text: "Constipation", options: { bullet: { indent: 12 }, fontSize: 11, color: C.nearBlack, breakLine: true } },
    { text: "Nausea / vomiting", options: { bullet: { indent: 12 }, fontSize: 11, color: C.nearBlack, breakLine: true } },
    { text: "Dependence / abuse risk", options: { bullet: { indent: 12 }, fontSize: 11, color: C.accent, bold: true, breakLine: true } },
    { text: "Serotonin syndrome (with SSRIs/duloxetine)", options: { bullet: { indent: 12 }, fontSize: 11, color: C.accent, bold: true, breakLine: true } },
    { text: "Seizure threshold lowering", options: { bullet: { indent: 12 }, fontSize: 11, color: C.nearBlack, breakLine: true } },
    { text: " ", options: { fontSize: 5, breakLine: true } },
    { text: "AVOID in pregnancy, breastfeeding, cognitive impairment", options: { fontSize: 10, color: C.accent, italic: true, bold: true } },
  ], {
    x: 6.4, y: 1.95, w: 3.25, h: 3.35,
    valign: "top", margin: 0, fontFace: "Calibri",
  });
}

// ─────────────────────────────────────────────
// SLIDE 9 – ACUTE OA FLARE: IA Corticosteroid
// ─────────────────────────────────────────────
{
  const s = pres.addSlide();
  lightSlide(s);
  addBanner(s, "Acute OA Flare — Intra-Articular Corticosteroid Injection", "Synovitis / Effusion · Short-term Relief 2–8 Weeks");
  addSectionBar(s, "ACUTE FLARE", C.accent);
  badge(s, "FLARE/EFFUSION", 0.25, 1.12, C.accent);

  // Main card
  s.addShape(pres.ShapeType.rect, {
    x: 0.25, y: 1.5, w: 5.5, h: 3.9,
    fill: { color: C.white }, line: { color: C.accent, pt: 2 },
  });
  s.addShape(pres.ShapeType.rect, {
    x: 0.25, y: 1.5, w: 5.5, h: 0.36,
    fill: { color: C.accent }, line: { type: "none" },
  });
  s.addText("TRIAMCINOLONE ACETONIDE — Intra-Articular", {
    x: 0.35, y: 1.52, w: 5.3, h: 0.32,
    fontSize: 11.5, bold: true, color: C.white, fontFace: "Calibri", margin: 0,
  });

  const jointDoses = [
    ["Knee",      "20–40 mg"],
    ["Shoulder",  "20–40 mg"],
    ["Hip",       "40 mg  (image-guided ONLY)"],
    ["Wrist",     "10–25 mg"],
    ["Small hand joints", "5–10 mg"],
  ];
  // Joint dose table inside card
  s.addText("Joint Dosing:", {
    x: 0.35, y: 1.96, w: 5.3, h: 0.25,
    fontSize: 11.5, bold: true, color: C.navy, fontFace: "Calibri", margin: 0,
  });
  jointDoses.forEach(([joint, dose], i) => {
    const y = 2.25 + i * 0.36;
    s.addShape(pres.ShapeType.rect, {
      x: 0.3, y, w: 2.3, h: 0.3,
      fill: { color: i % 2 === 0 ? C.light : "EAF0F6" }, line: { type: "none" },
    });
    s.addShape(pres.ShapeType.rect, {
      x: 2.65, y, w: 3.0, h: 0.3,
      fill: { color: i % 2 === 0 ? C.light : "EAF0F6" }, line: { type: "none" },
    });
    s.addText(joint, { x: 0.35, y: y + 0.02, w: 2.2, h: 0.26, fontSize: 11, color: C.navy, fontFace: "Calibri", bold: true, margin: 0 });
    s.addText(dose,  { x: 2.7,  y: y + 0.02, w: 2.9, h: 0.26, fontSize: 11, color: C.nearBlack, fontFace: "Calibri", margin: 0 });
  });

  s.addText([
    { text: "Maximum frequency:", options: { bold: true, fontSize: 11.5, color: C.accent, breakLine: true } },
    { text: "Every 3 months per joint · No more than 3–4 injections/year", options: { fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: "Expected benefit: 2–8 weeks", options: { fontSize: 11, color: C.grey, italic: true } },
  ], { x: 0.35, y: 4.08, w: 5.3, h: 1.2, valign: "top", margin: 0, fontFace: "Calibri" });

  // Indications panel
  s.addShape(pres.ShapeType.rect, {
    x: 5.9, y: 1.5, w: 3.85, h: 3.9,
    fill: { color: "FFF0F0" }, line: { color: C.accent, pt: 1.5 },
  });
  s.addText("Indications", {
    x: 6.0, y: 1.58, w: 3.65, h: 0.3,
    fontSize: 12, bold: true, color: C.accent, fontFace: "Calibri", margin: 0,
  });
  s.addText([
    { text: "Significant joint effusion", options: { bullet: { indent: 12 }, fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: "Acute inflammatory OA flare", options: { bullet: { indent: 12 }, fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: "Severe pain preventing rehabilitation", options: { bullet: { indent: 12 }, fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: "Patient unable to tolerate oral NSAIDs", options: { bullet: { indent: 12 }, fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: " ", options: { fontSize: 5, breakLine: true } },
    { text: "Cautions:", options: { bold: true, fontSize: 11.5, color: C.amber, breakLine: true } },
    { text: "Post-injection hyperglycemia (diabetics)", options: { bullet: { indent: 12 }, fontSize: 11, color: C.nearBlack, breakLine: true } },
    { text: "Aseptic technique mandatory", options: { bullet: { indent: 12 }, fontSize: 11, color: C.nearBlack, breakLine: true } },
    { text: "Post-injection flare (24–48h)", options: { bullet: { indent: 12 }, fontSize: 11, color: C.nearBlack, breakLine: true } },
    { text: "Skin hypopigmentation / fat necrosis (rare)", options: { bullet: { indent: 12 }, fontSize: 11, color: C.nearBlack, breakLine: true } },
    { text: " ", options: { fontSize: 5, breakLine: true } },
    { text: "ACR strongly recommends for knee OA", options: { fontSize: 10, color: C.green, italic: true, bold: true } },
  ], { x: 6.0, y: 1.96, w: 3.65, h: 3.35, valign: "top", margin: 0, fontFace: "Calibri" });
}

// ─────────────────────────────────────────────
// SLIDE 10 – SEVERE OA: Combination Therapy
// ─────────────────────────────────────────────
{
  const s = pres.addSlide();
  lightSlide(s);
  addBanner(s, "Severe OA — Combination Therapy", "Pain >8/10 · Multiple Agents Required · Pending Surgical Assessment");
  addSectionBar(s, "SEVERE OA", C.accent);
  badge(s, "Pain > 8/10", 0.25, 1.12, C.accent);
  badge(s, "COMBINATION", 1.85, 1.12, C.navy);

  // Regimen A
  s.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.5, w: 4.55, h: 3.9, fill: { color: C.white }, line: { color: C.mid, pt: 2 } });
  s.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.5, w: 4.55, h: 0.34, fill: { color: C.mid }, line: { type: "none" } });
  s.addText("Regimen A  (Topical + COX-2 + Central)", {
    x: 0.35, y: 1.52, w: 4.35, h: 0.3,
    fontSize: 10.5, bold: true, color: C.white, fontFace: "Calibri", margin: 0,
  });
  s.addText([
    { text: "Diclofenac 1% gel", options: { bullet: { indent: 12 }, fontSize: 12, bold: true, color: C.navy, breakLine: true } },
    { text: "  4 g QID to affected joint", options: { fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: " ", options: { fontSize: 5, breakLine: true } },
    { text: "Celecoxib 100 mg BID", options: { bullet: { indent: 12 }, fontSize: 12, bold: true, color: C.navy, breakLine: true } },
    { text: "  Oral, with food", options: { fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: " ", options: { fontSize: 5, breakLine: true } },
    { text: "Duloxetine 60 mg once daily", options: { bullet: { indent: 12 }, fontSize: 12, bold: true, color: C.navy, breakLine: true } },
    { text: "  Central pain + mood benefit", options: { fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: " ", options: { fontSize: 5, breakLine: true } },
    { text: "± Tramadol 50 mg q6h PRN (short-term only)", options: { bullet: { indent: 12 }, fontSize: 11, color: C.amber } },
  ], { x: 0.35, y: 1.9, w: 4.35, h: 3.4, valign: "top", margin: 0, fontFace: "Calibri" });

  // Regimen B
  s.addShape(pres.ShapeType.rect, { x: 5.2, y: 1.5, w: 4.55, h: 3.9, fill: { color: C.white }, line: { color: C.navy, pt: 2 } });
  s.addShape(pres.ShapeType.rect, { x: 5.2, y: 1.5, w: 4.55, h: 0.34, fill: { color: C.navy }, line: { type: "none" } });
  s.addText("Regimen B  (Oral NSAID + PPI + Central)", {
    x: 5.3, y: 1.52, w: 4.35, h: 0.3,
    fontSize: 10.5, bold: true, color: C.white, fontFace: "Calibri", margin: 0,
  });
  s.addText([
    { text: "Naproxen 500 mg BID", options: { bullet: { indent: 12 }, fontSize: 12, bold: true, color: C.navy, breakLine: true } },
    { text: "  With food · oral", options: { fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: " ", options: { fontSize: 5, breakLine: true } },
    { text: "Pantoprazole 40 mg once daily", options: { bullet: { indent: 12 }, fontSize: 12, bold: true, color: C.navy, breakLine: true } },
    { text: "  Before breakfast (gastroprotection)", options: { fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: " ", options: { fontSize: 5, breakLine: true } },
    { text: "Duloxetine 60 mg once daily", options: { bullet: { indent: 12 }, fontSize: 12, bold: true, color: C.navy, breakLine: true } },
    { text: "  Start at 30 mg × 1 week then 60 mg", options: { fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: " ", options: { fontSize: 5, breakLine: true } },
    { text: "± Tramadol 50 mg q6h PRN (short-term only)", options: { bullet: { indent: 12 }, fontSize: 11, color: C.amber } },
  ], { x: 5.3, y: 1.9, w: 4.35, h: 3.4, valign: "top", margin: 0, fontFace: "Calibri" });
}

// ─────────────────────────────────────────────
// SLIDE 11 – JOINT-SPECIFIC OA
// ─────────────────────────────────────────────
{
  const s = pres.addSlide();
  lightSlide(s);
  addBanner(s, "Joint-Specific Management — Knee · Hip · Hand OA", "Targeted interventions based on joint involved");
  addSectionBar(s, "JOINT-SPECIFIC", C.green);

  // 3 joint cards
  const joints = [
    {
      title: "KNEE OA", color: C.mid,
      lines: [
        { text: "Unloader knee brace", options: { bullet: { indent: 10 }, fontSize: 11, color: C.nearBlack, breakLine: true } },
        { text: "  Indications: unicompartmental OA, varus/valgus deformity", options: { fontSize: 10, color: C.grey, italic: true, breakLine: true } },
        { text: "Walking cane (contralateral hand)", options: { bullet: { indent: 10 }, fontSize: 11, color: C.nearBlack, breakLine: true } },
        { text: "  Reduces knee joint load by ~20–25%", options: { fontSize: 10, color: C.grey, italic: true, breakLine: true } },
        { text: "Topical diclofenac QID (first-line)", options: { bullet: { indent: 10 }, fontSize: 11, color: C.nearBlack, breakLine: true } },
        { text: "Oral NSAIDs + PPI if topical inadequate", options: { bullet: { indent: 10 }, fontSize: 11, color: C.nearBlack, breakLine: true } },
        { text: "IA corticosteroid for flares", options: { bullet: { indent: 10 }, fontSize: 11, color: C.nearBlack, breakLine: true } },
        { text: "Quadriceps strengthening (Level 1A)", options: { bullet: { indent: 10 }, fontSize: 11, color: C.green, breakLine: true } },
        { text: "TKA when conservative measures fail ≥6 months", options: { bullet: { indent: 10 }, fontSize: 11, color: C.accent } },
      ],
    },
    {
      title: "HIP OA", color: C.navy,
      lines: [
        { text: "Weight loss – PRIORITY", options: { bullet: { indent: 10 }, fontSize: 11, color: C.nearBlack, breakLine: true } },
        { text: "Physiotherapy – hip flexor & abductor strengthening", options: { bullet: { indent: 10 }, fontSize: 11, color: C.nearBlack, breakLine: true } },
        { text: "Walking cane (contralateral hand)", options: { bullet: { indent: 10 }, fontSize: 11, color: C.nearBlack, breakLine: true } },
        { text: "Oral NSAIDs (topical NOT effective for hip)", options: { bullet: { indent: 10 }, fontSize: 11, color: C.nearBlack, breakLine: true } },
        { text: "IA corticosteroid: ultrasound-guided (40 mg triamcinolone)", options: { bullet: { indent: 10 }, fontSize: 11, color: C.nearBlack, breakLine: true } },
        { text: "  Avoid repeated injections (cartilage damage risk)", options: { fontSize: 10, color: C.accent, italic: true, breakLine: true } },
        { text: "HA injection: ACR strongly AGAINST for hip", options: { bullet: { indent: 10 }, fontSize: 11, color: C.accent, breakLine: true } },
        { text: "THA for advanced hip OA with severe disability", options: { bullet: { indent: 10 }, fontSize: 11, color: C.accent } },
      ],
    },
    {
      title: "HAND OA", color: C.green,
      lines: [
        { text: "Topical NSAIDs – FIRST-LINE", options: { bullet: { indent: 10 }, fontSize: 11, color: C.green, bold: true, breakLine: true } },
        { text: "  Diclofenac gel 2 g QID to affected joints", options: { fontSize: 10, color: C.nearBlack, breakLine: true } },
        { text: "Thumb splint (1st CMC joint OA)", options: { bullet: { indent: 10 }, fontSize: 11, color: C.nearBlack, breakLine: true } },
        { text: "Joint protection & occupational therapy", options: { bullet: { indent: 10 }, fontSize: 11, color: C.nearBlack, breakLine: true } },
        { text: "Oral NSAIDs if topical therapy fails", options: { bullet: { indent: 10 }, fontSize: 11, color: C.nearBlack, breakLine: true } },
        { text: "Chondroitin 800 mg/day (EULAR conditional)", options: { bullet: { indent: 10 }, fontSize: 11, color: C.nearBlack, breakLine: true } },
        { text: "IA steroid for inflammatory flare (DIP/PIP)", options: { bullet: { indent: 10 }, fontSize: 11, color: C.nearBlack, breakLine: true } },
        { text: "Heberden/Bouchard node care – reassure patient", options: { bullet: { indent: 10 }, fontSize: 11, color: C.grey, italic: true } },
      ],
    },
  ];

  joints.forEach((j, i) => {
    const x = 0.25 + i * 3.28;
    s.addShape(pres.ShapeType.rect, {
      x, y: 1.5, w: 3.1, h: 3.9,
      fill: { color: C.white }, line: { color: j.color, pt: 2 },
    });
    s.addShape(pres.ShapeType.rect, {
      x, y: 1.5, w: 3.1, h: 0.34,
      fill: { color: j.color }, line: { type: "none" },
    });
    s.addText(j.title, {
      x: x + 0.1, y: 1.52, w: 2.9, h: 0.3,
      fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", margin: 0,
    });
    s.addText(j.lines, {
      x: x + 0.1, y: 1.9, w: 2.9, h: 3.42,
      valign: "top", margin: 0, fontFace: "Calibri",
    });
  });
}

// ─────────────────────────────────────────────
// SLIDE 12 – NOT RECOMMENDED
// ─────────────────────────────────────────────
{
  const s = pres.addSlide();
  lightSlide(s);
  addBanner(s, "Treatments NOT Routinely Recommended", "Based on ACR/AF 2019 & EULAR Guidelines");
  addSectionBar(s, "NOT RECOMMENDED", C.accent);
  badge(s, "ACR AGAINST", 0.25, 1.12, C.accent);

  const notRec = [
    { drug: "Glucosamine",            reason: "ACR strongly against for knee & hip OA; insufficient evidence. Only ESCEO recommends glucosamine sulfate for knee OA." },
    { drug: "Chondroitin",            reason: "ACR against for knee/hip OA. Conditionally recommended for hand OA only (EULAR/ACR)." },
    { drug: "Stem Cell Therapy",      reason: "No high-quality RCT evidence. Experimental only. Not recommended by any major guideline." },
    { drug: "PRP (Platelet-Rich Plasma)", reason: "ACR conditionally recommends against. Evidence insufficient; variable protocols; high cost." },
    { drug: "Hyaluronic Acid (knee)", reason: "ACR conditionally recommends against for knee. Only consider if all other measures have failed. Strongly against for hip OA." },
    { drug: "Long-term Opioids",      reason: "All major guidelines against. High addiction risk, falls, cognitive impairment, no disease modification." },
    { drug: "Bisphosphonates",        reason: "ACR strongly against for OA symptoms. Prescribe only if concurrent osteoporosis confirmed on DEXA." },
    { drug: "TNF inhibitors / IL-1 antagonists", reason: "ACR strongly against. No evidence of benefit in OA; reserved for inflammatory arthritis only." },
  ];

  notRec.forEach((item, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = col === 0 ? 0.25 : 5.1;
    const y = 1.5 + row * 0.98;
    s.addShape(pres.ShapeType.rect, {
      x, y, w: 4.7, h: 0.88,
      fill: { color: "FFF0F0" }, line: { color: C.accent, pt: 0.8 },
    });
    s.addShape(pres.ShapeType.rect, {
      x, y, w: 0.22, h: 0.88,
      fill: { color: C.accent }, line: { type: "none" },
    });
    s.addText("✕", {
      x, y, w: 0.22, h: 0.88,
      fontSize: 12, bold: true, color: C.white,
      fontFace: "Calibri", align: "center", valign: "middle", margin: 0,
    });
    s.addText(item.drug, {
      x: x + 0.28, y: y + 0.05, w: 4.35, h: 0.28,
      fontSize: 11.5, bold: true, color: C.accent, fontFace: "Calibri", margin: 0,
    });
    s.addText(item.reason, {
      x: x + 0.28, y: y + 0.34, w: 4.35, h: 0.48,
      fontSize: 9.5, color: C.grey, fontFace: "Calibri", margin: 0,
    });
  });
}

// ─────────────────────────────────────────────
// SLIDE 13 – SURGICAL TREATMENT
// ─────────────────────────────────────────────
{
  const s = pres.addSlide();
  lightSlide(s);
  addBanner(s, "Surgical Treatment — Total Joint Arthroplasty", "When Conservative Management Has Failed ≥ 6 Months");
  addSectionBar(s, "SURGICAL", C.navy);
  badge(s, "LAST RESORT", 0.25, 1.12, C.navy);

  // TKA
  s.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.5, w: 4.65, h: 3.9, fill: { color: C.white }, line: { color: C.navy, pt: 2 } });
  s.addShape(pres.ShapeType.rect, { x: 0.25, y: 1.5, w: 4.65, h: 0.36, fill: { color: C.navy }, line: { type: "none" } });
  s.addText("TOTAL KNEE ARTHROPLASTY (TKA)", {
    x: 0.35, y: 1.52, w: 4.45, h: 0.32,
    fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", margin: 0,
  });
  s.addText([
    { text: "Indications:", options: { bold: true, fontSize: 12, color: C.navy, breakLine: true } },
    { text: "End-stage knee OA (K-L Grade 3–4)", options: { bullet: { indent: 12 }, fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: "Severe, persistent pain not controlled by conservative Rx", options: { bullet: { indent: 12 }, fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: "Failed conservative therapy ≥ 6 months", options: { bullet: { indent: 12 }, fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: "Marked functional limitation in daily activities", options: { bullet: { indent: 12 }, fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: "Radiographic joint destruction with deformity", options: { bullet: { indent: 12 }, fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: " ", options: { fontSize: 5, breakLine: true } },
    { text: "Expected Outcomes:", options: { bold: true, fontSize: 12, color: C.navy, breakLine: true } },
    { text: "Pain relief in 80–90% of patients", options: { bullet: { indent: 12 }, fontSize: 11.5, color: C.green, bold: true, breakLine: true } },
    { text: "Implant survival: 90–95% at 10 years", options: { bullet: { indent: 12 }, fontSize: 11.5, color: C.green, bold: true, breakLine: true } },
    { text: " ", options: { fontSize: 5, breakLine: true } },
    { text: "Alternatives:  Unicompartmental KR · High tibial osteotomy", options: { fontSize: 10, color: C.grey, italic: true } },
  ], { x: 0.35, y: 1.92, w: 4.45, h: 3.4, valign: "top", margin: 0, fontFace: "Calibri" });

  // THA
  s.addShape(pres.ShapeType.rect, { x: 5.1, y: 1.5, w: 4.65, h: 3.9, fill: { color: C.white }, line: { color: C.mid, pt: 2 } });
  s.addShape(pres.ShapeType.rect, { x: 5.1, y: 1.5, w: 4.65, h: 0.36, fill: { color: C.mid }, line: { type: "none" } });
  s.addText("TOTAL HIP ARTHROPLASTY (THA)", {
    x: 5.2, y: 1.52, w: 4.45, h: 0.32,
    fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", margin: 0,
  });
  s.addText([
    { text: "Indications:", options: { bold: true, fontSize: 12, color: C.navy, breakLine: true } },
    { text: "Advanced hip OA with severe disability", options: { bullet: { indent: 12 }, fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: "Failure of ≥ 6 months conservative treatment", options: { bullet: { indent: 12 }, fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: "Radiographic progression (joint space loss, osteophytes)", options: { bullet: { indent: 12 }, fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: "Significant quality of life impairment", options: { bullet: { indent: 12 }, fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: "Groin/buttock pain at rest and with activity", options: { bullet: { indent: 12 }, fontSize: 11.5, color: C.nearBlack, breakLine: true } },
    { text: " ", options: { fontSize: 5, breakLine: true } },
    { text: "Expected Outcomes:", options: { bold: true, fontSize: 12, color: C.navy, breakLine: true } },
    { text: "Excellent pain relief and functional restoration", options: { bullet: { indent: 12 }, fontSize: 11.5, color: C.green, bold: true, breakLine: true } },
    { text: "Implant survival: 85–95% at 20 years", options: { bullet: { indent: 12 }, fontSize: 11.5, color: C.green, bold: true, breakLine: true } },
    { text: " ", options: { fontSize: 5, breakLine: true } },
    { text: "Pre-op requirements: Weight optimisation · Smoking cessation · Physio", options: { fontSize: 10, color: C.grey, italic: true } },
  ], { x: 5.2, y: 1.92, w: 4.45, h: 3.4, valign: "top", margin: 0, fontFace: "Calibri" });
}

// ─────────────────────────────────────────────
// SLIDE 14 – 6-STEP ALGORITHM
// ─────────────────────────────────────────────
{
  const s = pres.addSlide();
  lightSlide(s);
  addBanner(s, "Stepwise Treatment Algorithm — Exam-Ready Summary", "ACR / EULAR / OARSI   ·   Suitable for Clinical Exams, Ward Rounds & Orthopaedic Rotations");
  addSectionBar(s, "ALGORITHM", C.navy);

  const steps = [
    { n: 1, label: "Education\nExercise\nWeight Loss", color: C.green,  details: "Non-pharm CORE — all patients\nQuadriceps strengthening · Walking\nSelf-management · BMI reduction" },
    { n: 2, label: "Topical NSAID\n± Paracetamol", color: "2E8B57",    details: "Diclofenac 1% gel 2–4 g QID\nParacetamol 500–1000 mg q6–8h PRN\nMax paracetamol: 4 g/day (3 g elderly)" },
    { n: 3, label: "Oral NSAID\n+ PPI if risk", color: C.mid,          details: "Ibuprofen 400–800 mg q6–8h\nNaproxen 250–500 mg BID\nCelecoxib 100–200 mg/day\nPantoprazole 40 mg or Omeprazole 20 mg" },
    { n: 4, label: "Duloxetine\nor IA Steroid", color: C.navy,         details: "Duloxetine 30→60 mg OD (central pain)\nTriamcinolone 20–40 mg IA (flare/effusion)\nRepeat IA max every 3 months" },
    { n: 5, label: "Tramadol\n(short-term)", color: C.amber,           details: "25–50 mg q4–6h PRN\nMax: 400 mg/day (300 mg >75 yr)\nMonitor: falls, dependence, cognition" },
    { n: 6, label: "Total Joint\nReplacement", color: C.accent,        details: "TKA: pain relief 80–90%; 90-95% survive 10yr\nTHA: excellent outcomes; 85-95% at 20yr\nIndication: failed conservative Rx ≥6 months" },
  ];

  const boxW = 1.42, boxH = 0.72, startX = 0.22, arrowY = 1.5;
  // chevron row
  steps.forEach((st, i) => {
    const x = startX + i * (boxW + 0.1);
    s.addShape(pres.ShapeType.chevron, {
      x, y: arrowY, w: boxW, h: boxH,
      fill: { color: st.color }, line: { type: "none" },
    });
    s.addText([
      { text: `Step ${st.n}`, options: { fontSize: 8, bold: true, color: C.white, breakLine: true } },
      { text: st.label,       options: { fontSize: 7.5, color: C.white } },
    ], { x, y: arrowY, w: boxW, h: boxH, align: "center", valign: "middle", margin: 0, fontFace: "Calibri" });
  });

  // Detail cards below
  steps.forEach((st, i) => {
    const x = startX + i * (boxW + 0.1);
    const y = arrowY + boxH + 0.18;
    s.addShape(pres.ShapeType.rect, {
      x, y, w: boxW, h: 3.0,
      fill: { color: C.white }, line: { color: st.color, pt: 1.5 },
    });
    s.addShape(pres.ShapeType.rect, {
      x, y, w: boxW, h: 0.18,
      fill: { color: st.color }, line: { type: "none" },
    });
    s.addText(st.details, {
      x: x + 0.05, y: y + 0.22, w: boxW - 0.1, h: 2.7,
      fontSize: 7.8, color: C.nearBlack, fontFace: "Calibri",
      valign: "top", margin: 0,
    });
  });

  s.addText("↓ Escalate only if previous step provides inadequate relief. Surgical referral at any point if indicated.", {
    x: 0.22, y: 5.3, w: 9.5, h: 0.25,
    fontSize: 8.5, color: C.grey, fontFace: "Calibri", italic: true, margin: 0,
  });
}

// ─────────────────────────────────────────────
// SLIDE 15 – THANK YOU / REFERENCES
// ─────────────────────────────────────────────
{
  const s = pres.addSlide();
  darkSlide(s);
  s.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: "100%", h: "100%",
    fill: { color: C.darkNav }, line: { type: "none" },
  });
  s.addShape(pres.ShapeType.rect, {
    x: 0, y: 3.5, w: "100%", h: 2.125,
    fill: { color: C.navy }, line: { type: "none" },
  });
  s.addShape(pres.ShapeType.rect, {
    x: 0, y: 3.5, w: 0.25, h: 2.125,
    fill: { color: C.green }, line: { type: "none" },
  });

  s.addText("Thank You", {
    x: 0.5, y: 0.6, w: 9, h: 0.9,
    fontSize: 44, bold: true, color: C.white, fontFace: "Calibri", margin: 0,
  });
  s.addText("Osteoarthritis Treatment Plan  |  ACR/EULAR Based", {
    x: 0.5, y: 1.55, w: 9, h: 0.42,
    fontSize: 16, color: C.light, fontFace: "Calibri", italic: true, margin: 0,
  });

  s.addText("Guideline References", {
    x: 0.4, y: 3.6, w: 9.3, h: 0.3,
    fontSize: 11, bold: true, color: C.light, fontFace: "Calibri", margin: 0,
  });
  s.addText([
    { text: "ACR/Arthritis Foundation OA Guideline 2019 (Hand, Hip, Knee)  |  ", options: { fontSize: 9, color: "FFFFFFAA", breakLine: false } },
    { text: "EULAR 2024 Non-Pharmacological OA Recommendations  |  ", options: { fontSize: 9, color: "FFFFFFAA", breakLine: false } },
    { text: "OARSI 2023 OA Treatment Guidelines  |  AAOS Knee OA CPG", options: { fontSize: 9, color: "FFFFFFAA" } },
  ], { x: 0.4, y: 3.96, w: 9.3, h: 0.3, margin: 0, fontFace: "Calibri" });

  s.addText([
    { text: "rheumatology.org  ·  ard.bmj.com  ·  oarsijournal.com  ·  aaos.org", options: { fontSize: 8.5, color: "FFFFFF55" } },
  ], { x: 0.4, y: 4.35, w: 9.3, h: 0.28, margin: 0, fontFace: "Calibri" });

  s.addText("Goldman-Cecil Medicine 26e  ·  Textbook of Family Medicine 9e  ·  Bailey & Love's Surgery 28e", {
    x: 0.4, y: 4.82, w: 9.3, h: 0.25,
    fontSize: 8, color: "FFFFFF44", fontFace: "Calibri", italic: true, margin: 0,
  });
}

// ─────────────────────────────────────────────
// WRITE FILE
// ─────────────────────────────────────────────
const OUT = "/home/daytona/workspace/osteoarthritis-v2/OA_Treatment_Plan_ACR_EULAR.pptx";
pres.writeFile({ fileName: OUT }).then(() => {
  console.log("SUCCESS:", OUT);
}).catch(e => { console.error("ERROR:", e); process.exit(1); });
Running Command

cd /home/daytona/workspace/osteoarthritis-v2 && node build_oa_pptx.js 2>&1

Running Command

cd /home/daytona/workspace/osteoarthritis-v2 && sed -i \ 's/"FFFFFF18"/"1B3A5C"/g; s/"FFFFFFAA"/"D6E4F0"/g; s/"FFFFFF66"/"AACCE0"/g; s/"FFFFFF55"/"AACCE0"/g; s/"FFFFFF44"/"7AADCC"/g' \ build_oa_pptx.js && node build_oa_pptx.js 2>&1

Running Command

ls -lh /home/daytona/workspace/osteoarthritis-v2/OA_Treatment_Plan_ACR_EULAR.pptx && python3 -c "import zipfile; z=zipfile.ZipFile('/home/daytona/workspace/osteoarthritis-v2/OA_Treatment_Plan_ACR_EULAR.pptx'); slides=[f for f in z.namelist() if f.startswith('ppt/slides/slide') and not '_rels' in f]; print(f'Valid PPTX. Slides: {len(slides)}')"

Your PowerPoint is ready - 15 slides, 399 KB:

OA Treatment Plan ACR EULAR

Presentation · PPTX


Here is exactly what each slide contains:
SlideTitleContent
1Title SlideDark navy design - "Osteoarthritis Treatment Plan - ACR/EULAR"
2Overview9-section table of contents with numbered cards
3Mild OA - Non-PharmEducation, weight loss targets, exercise program, physiotherapy, aids
4Mild OA - MedicationsDiclofenac 1% gel full dosing by joint (knee 4g QID, hand 2g QID, max 32g/day) + Paracetamol with adult/elderly max doses
5Moderate OA - Oral NSAIDs4 drug cards: Ibuprofen, Naproxen, Diclofenac, Celecoxib - all with full doses and max doses
6GastroprotectionPPI indications + Pantoprazole 40mg vs Omeprazole 20mg cards
7Duloxetine30mg→60mg titration protocol, mechanism, full monitoring panel
8Tramadol25-50mg q4-6h, max 400/300mg (elderly), full adverse effects + cautions
9Acute Flare - IA SteroidTriamcinolone acetonide dose table by joint (knee/shoulder 20-40mg, hip 40mg image-guided), frequency limits, indications
10Severe OA - CombinationRegimen A (diclofenac + celecoxib + duloxetine) and Regimen B (naproxen + PPI + duloxetine)
11Joint-Specific3 side-by-side cards for Knee, Hip, and Hand OA with targeted treatments
12NOT Recommended8 red cards: glucosamine, chondroitin, stem cells, PRP, HA, long-term opioids, bisphosphonates, biologics - with reasons
13SurgicalTKA vs THA - indications, outcomes (80-90% pain relief), survival rates
146-Step AlgorithmChevron step ladder with detail cards: Education → Topical → Oral NSAID → Duloxetine/IA → Tramadol → Surgery
15Thank You / ReferencesDark closing slide with all guideline sources

Give me compilation of oa

Asking for Preferences
Running Command

mkdir -p /home/daytona/workspace/oa-compilation && ls /home/daytona/workspace/oa-compilation/

This is a shared conversation. Sign in to Orris to start your own chat.