/** * Universal Health Framework - Comprehensive Care for All Conditions * * ╔═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗ * ║ ║ * ║ ██╗ ██╗███╗ ██╗██╗██╗ ██╗███████╗██████╗ ███████╗ █████╗ ██╗ ██╗ ██╗███████╗ █████╗ ██╗ ████████╗██╗ ██╗ ║ * ║ ██║ ██║████╗ ██║██║██║ ██║██╔════╝██╔══██╗██╔════╝██╔══██╗██║ ██║ ██║██╔════╝██╔══██╗██║ ╚══██╔══╝██║ ██║ ║ * ║ ██║ ██║██╔██╗ ██║██║██║ ██║█████╗ ██████╔╝███████╗███████║██║ ███████║█████╗ ███████║██║ ██║ ███████║ ║ * ║ ██║ ██║██║╚██╗██║██║╚██╗ ██╔╝██╔══╝ ██╔══██╗╚════██║██╔══██║██║ ██╔══██║██╔══╝ ██╔══██║██║ ██║ ██╔══██║ ║ * ║ ╚██████╔╝██║ ╚████║██║ ╚████╔╝ ███████╗██║ ██║███████║██║ ██║███████╗ ██║ ██║███████╗██║ ██║███████╗██║ ██║ ██║ ║ * ║ ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═══╝ ╚══════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═╝ ║ * ║ ║ * ╠═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════╣ * ║ ║ * ║ COMPREHENSIVE HEALTH FOR ALL CONDITIONS - ANY PERSON, ANY HEALTH NEED ║ * ║ ║ * ║ Coverage: ║ * ║ ✓ Cancer (complete framework with 17,000+ lines) ║ * ║ ✓ Cardiovascular diseases (heart disease, stroke, hypertension) ║ * ║ ✓ Metabolic disorders (diabetes, obesity, thyroid, lipids) ║ * ║ ✓ Infectious diseases (bacterial, viral, fungal, parasitic) ║ * ║ ✓ Neurological conditions (Alzheimer's, Parkinson's, epilepsy, MS) ║ * ║ ✓ Mental health (depression, anxiety, bipolar, schizophrenia, PTSD) ║ * ║ ✓ Respiratory diseases (asthma, COPD, pulmonary fibrosis) ║ * ║ ✓ Autoimmune conditions (RA, lupus, IBD, psoriasis) ║ * ║ ✓ Kidney and liver diseases ║ * ║ ✓ Musculoskeletal conditions (arthritis, osteoporosis) ║ * ║ ✓ Preventive care and wellness ║ * ║ ✓ Pediatric through geriatric across all conditions ║ * ║ ✓ Emergency medicine and critical care ║ * ║ ✓ Pregnancy and reproductive health ║ * ║ ✓ Rare and orphan diseases ║ * ║ ║ * ╚═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝ */ // ═══════════════════════════════════════════════════════════════════════════════ // UNIVERSAL HEALTH CONDITION TAXONOMY // ═══════════════════════════════════════════════════════════════════════════════ export type HealthDomain = | 'Oncology' | 'Cardiovascular' | 'Metabolic' | 'Infectious' | 'Neurological' | 'Psychiatric' | 'Respiratory' | 'Autoimmune' | 'Renal' | 'Hepatic' | 'Gastrointestinal' | 'Musculoskeletal' | 'Dermatologic' | 'Hematologic' | 'Reproductive' | 'Ophthalmologic' | 'ENT' | 'Preventive' | 'Emergency' | 'Pediatric' | 'Geriatric' | 'Palliative' | 'RareDisease'; export interface HealthCondition { id: string; name: string; domain: HealthDomain; icdCode: string; prevalence: string; riskFactors: string[]; symptoms: string[]; diagnosticCriteria: string[]; differentialDiagnosis: string[]; treatmentApproaches: TreatmentApproach[]; emergencySigns: string[]; preventionStrategies: string[]; prognosis: string; specialPopulations: SpecialPopulationConsideration[]; } export interface TreatmentApproach { category: 'Pharmacological' | 'Surgical' | 'Procedural' | 'Lifestyle' | 'Psychotherapy' | 'Rehabilitative' | 'Supportive'; firstLine: Treatment[]; secondLine: Treatment[]; adjunctive: Treatment[]; contraindicatedWith: string[]; } export interface Treatment { name: string; type: string; indication: string; dosing?: string; duration?: string; efficacy: string; sideEffects: string[]; monitoring: string[]; evidenceLevel: 'Strong' | 'Moderate' | 'Limited' | 'Expert Opinion'; } export interface SpecialPopulationConsideration { population: string; modifications: string[]; precautions: string[]; } // ═══════════════════════════════════════════════════════════════════════════════ // CARDIOVASCULAR DISEASE PROTOCOLS // ═══════════════════════════════════════════════════════════════════════════════ export const CARDIOVASCULAR_CONDITIONS: HealthCondition[] = [ { id: 'hypertension', name: 'Hypertension (High Blood Pressure)', domain: 'Cardiovascular', icdCode: 'I10', prevalence: '~45% of adults', riskFactors: ['Age', 'Obesity', 'High sodium diet', 'Sedentary lifestyle', 'Family history', 'Diabetes', 'Chronic kidney disease'], symptoms: ['Often asymptomatic', 'Headache (severe hypertension)', 'Nosebleeds', 'Shortness of breath'], diagnosticCriteria: ['SBP ≥130 mmHg or DBP ≥80 mmHg on 2+ occasions', 'Ambulatory BP monitoring for confirmation'], differentialDiagnosis: ['White coat hypertension', 'Secondary hypertension (renal, endocrine)', 'Medication-induced'], treatmentApproaches: [ { category: 'Lifestyle', firstLine: [ { name: 'DASH Diet', type: 'Diet', indication: 'All hypertension', efficacy: 'Reduces SBP 8-14 mmHg', sideEffects: [], monitoring: ['Weight', 'BP'], evidenceLevel: 'Strong' }, { name: 'Sodium restriction', type: 'Diet', indication: 'All hypertension', dosing: '<2300mg/day ideal <1500mg', efficacy: 'Reduces SBP 5-6 mmHg', sideEffects: [], monitoring: ['BP'], evidenceLevel: 'Strong' }, { name: 'Aerobic exercise', type: 'Exercise', indication: 'All patients', dosing: '150 min/week moderate intensity', efficacy: 'Reduces SBP 4-9 mmHg', sideEffects: [], monitoring: ['Exercise tolerance'], evidenceLevel: 'Strong' }, { name: 'Weight loss', type: 'Weight management', indication: 'BMI >25', efficacy: 'Reduces SBP ~1 mmHg per kg lost', sideEffects: [], monitoring: ['Weight', 'BMI'], evidenceLevel: 'Strong' } ], secondLine: [], adjunctive: [ { name: 'Alcohol reduction', type: 'Lifestyle', indication: 'Those who drink', dosing: '≤2 drinks/day men, ≤1 women', efficacy: 'Reduces SBP 2-4 mmHg', sideEffects: [], monitoring: [], evidenceLevel: 'Strong' } ], contraindicatedWith: [] }, { category: 'Pharmacological', firstLine: [ { name: 'ACE inhibitor (lisinopril)', type: 'ACEi', indication: 'First-line, especially diabetes/CKD/HF', dosing: '10-40mg daily', efficacy: 'Reduces SBP 10-15 mmHg', sideEffects: ['Cough', 'Hyperkalemia', 'Angioedema'], monitoring: ['K+', 'Creatinine', 'BP'], evidenceLevel: 'Strong' }, { name: 'ARB (losartan)', type: 'ARB', indication: 'ACEi intolerant, diabetes/CKD/HF', dosing: '50-100mg daily', efficacy: 'Reduces SBP 10-15 mmHg', sideEffects: ['Hyperkalemia'], monitoring: ['K+', 'Creatinine', 'BP'], evidenceLevel: 'Strong' }, { name: 'Calcium channel blocker (amlodipine)', type: 'CCB', indication: 'First-line, especially elderly/Black patients', dosing: '5-10mg daily', efficacy: 'Reduces SBP 10-15 mmHg', sideEffects: ['Edema', 'Headache', 'Flushing'], monitoring: ['BP', 'Edema'], evidenceLevel: 'Strong' }, { name: 'Thiazide diuretic (chlorthalidone)', type: 'Diuretic', indication: 'First-line, especially elderly', dosing: '12.5-25mg daily', efficacy: 'Reduces SBP 10-15 mmHg', sideEffects: ['Hypokalemia', 'Hyperuricemia', 'Hyponatremia'], monitoring: ['Electrolytes', 'Uric acid', 'BP'], evidenceLevel: 'Strong' } ], secondLine: [ { name: 'Beta-blocker (metoprolol)', type: 'Beta-blocker', indication: 'CAD, HF, arrhythmia', dosing: '25-200mg BID', efficacy: 'Reduces SBP 10-15 mmHg', sideEffects: ['Bradycardia', 'Fatigue', 'ED'], monitoring: ['HR', 'BP'], evidenceLevel: 'Strong' }, { name: 'Spironolactone', type: 'MRA', indication: 'Resistant hypertension', dosing: '25-50mg daily', efficacy: 'Reduces SBP 10-15 mmHg', sideEffects: ['Hyperkalemia', 'Gynecomastia'], monitoring: ['K+', 'Creatinine'], evidenceLevel: 'Strong' } ], adjunctive: [], contraindicatedWith: ['ACEi + ARB together', 'ACEi/ARB in pregnancy'] } ], emergencySigns: ['BP >180/120 with symptoms (hypertensive emergency)', 'Chest pain', 'Neurological symptoms', 'Visual changes', 'Severe headache'], preventionStrategies: ['Healthy diet', 'Regular exercise', 'Weight management', 'Limited alcohol', 'Stress management', 'Regular BP screening'], prognosis: 'Excellent with treatment; untreated leads to stroke, MI, HF, CKD', specialPopulations: [ { population: 'Pregnancy', modifications: ['Methyldopa, labetalol, nifedipine preferred'], precautions: ['ACEi/ARB contraindicated'] }, { population: 'Elderly', modifications: ['Start lower doses', 'Avoid orthostatic hypotension'], precautions: ['Fall risk'] }, { population: 'Diabetes', modifications: ['Target <130/80', 'ACEi/ARB preferred'], precautions: ['Monitor renal function'] }, { population: 'Black patients', modifications: ['CCB or thiazide preferred as initial', 'ACEi/ARB less effective as monotherapy'], precautions: [] } ] }, { id: 'coronary-artery-disease', name: 'Coronary Artery Disease (CAD)', domain: 'Cardiovascular', icdCode: 'I25.10', prevalence: '~7% of adults', riskFactors: ['Age', 'Male sex', 'Family history', 'Smoking', 'Hypertension', 'Diabetes', 'Dyslipidemia', 'Obesity'], symptoms: ['Chest pain/pressure (angina)', 'Shortness of breath', 'Fatigue', 'May be asymptomatic'], diagnosticCriteria: ['Stress testing (exercise, pharmacologic)', 'Coronary CT angiography', 'Invasive coronary angiography', 'Calcium scoring'], differentialDiagnosis: ['GERD', 'Musculoskeletal pain', 'Anxiety/panic', 'Pericarditis', 'Aortic dissection'], treatmentApproaches: [ { category: 'Pharmacological', firstLine: [ { name: 'Aspirin', type: 'Antiplatelet', indication: 'All CAD patients (secondary prevention)', dosing: '81mg daily', efficacy: 'Reduces cardiovascular events 25%', sideEffects: ['GI bleeding', 'Bruising'], monitoring: ['Bleeding signs'], evidenceLevel: 'Strong' }, { name: 'High-intensity statin (atorvastatin)', type: 'Statin', indication: 'All CAD patients', dosing: '40-80mg daily', efficacy: 'Reduces LDL 50%+, reduces events 30%', sideEffects: ['Myalgias', 'Hepatotoxicity'], monitoring: ['Lipids', 'LFTs', 'Symptoms'], evidenceLevel: 'Strong' }, { name: 'Beta-blocker', type: 'Beta-blocker', indication: 'Post-MI, HF, angina', dosing: 'Metoprolol 25-200mg BID', efficacy: 'Reduces mortality post-MI', sideEffects: ['Bradycardia', 'Fatigue'], monitoring: ['HR', 'BP'], evidenceLevel: 'Strong' }, { name: 'ACE inhibitor', type: 'ACEi', indication: 'CAD with DM, HF, HTN, or LV dysfunction', dosing: 'Lisinopril 10-40mg daily', efficacy: 'Reduces cardiovascular events', sideEffects: ['Cough', 'Hyperkalemia'], monitoring: ['K+', 'Creatinine'], evidenceLevel: 'Strong' } ], secondLine: [ { name: 'P2Y12 inhibitor (clopidogrel)', type: 'Antiplatelet', indication: 'Post-PCI, ACS, aspirin intolerant', dosing: '75mg daily', efficacy: 'Reduces stent thrombosis', sideEffects: ['Bleeding'], monitoring: ['Bleeding'], evidenceLevel: 'Strong' }, { name: 'Ezetimibe', type: 'Cholesterol absorption inhibitor', indication: 'LDL not at goal on statin', dosing: '10mg daily', efficacy: 'Additional 15-20% LDL reduction', sideEffects: ['Minimal'], monitoring: ['Lipids'], evidenceLevel: 'Strong' }, { name: 'PCSK9 inhibitor (evolocumab)', type: 'PCSK9i', indication: 'Very high risk, LDL not at goal', dosing: '140mg SC q2 weeks', efficacy: 'Additional 50-60% LDL reduction', sideEffects: ['Injection site reactions'], monitoring: ['Lipids'], evidenceLevel: 'Strong' } ], adjunctive: [ { name: 'Nitrates (nitroglycerin)', type: 'Vasodilator', indication: 'Angina symptoms', dosing: '0.4mg SL PRN', efficacy: 'Rapid angina relief', sideEffects: ['Headache', 'Hypotension'], monitoring: ['BP', 'Symptoms'], evidenceLevel: 'Strong' }, { name: 'Ranolazine', type: 'Antianginal', indication: 'Refractory angina', dosing: '500-1000mg BID', efficacy: 'Reduces angina episodes', sideEffects: ['Dizziness', 'QTc prolongation'], monitoring: ['ECG'], evidenceLevel: 'Moderate' } ], contraindicatedWith: ['Nitrates + PDE5 inhibitors (sildenafil)'] }, { category: 'Procedural', firstLine: [ { name: 'PCI (percutaneous coronary intervention)', type: 'Interventional', indication: 'Significant stenosis with symptoms/ischemia, ACS', efficacy: 'Relieves symptoms; mortality benefit in STEMI', sideEffects: ['Bleeding', 'Stent thrombosis', 'Restenosis'], monitoring: ['Dual antiplatelet therapy compliance'], evidenceLevel: 'Strong' } ], secondLine: [ { name: 'CABG (coronary artery bypass grafting)', type: 'Surgery', indication: 'Left main disease, 3-vessel disease especially with DM', efficacy: 'Survival benefit in complex disease', sideEffects: ['Surgical complications', 'Stroke', 'Infection'], monitoring: ['Post-op recovery', 'Graft patency'], evidenceLevel: 'Strong' } ], adjunctive: [], contraindicatedWith: [] }, { category: 'Lifestyle', firstLine: [ { name: 'Smoking cessation', type: 'Lifestyle', indication: 'All smokers', efficacy: 'Reduces mortality by 36%', sideEffects: [], monitoring: ['Cessation status'], evidenceLevel: 'Strong' }, { name: 'Cardiac rehabilitation', type: 'Rehab', indication: 'Post-MI, post-revascularization', efficacy: 'Reduces mortality 20-30%', sideEffects: [], monitoring: ['Exercise capacity'], evidenceLevel: 'Strong' }, { name: 'Mediterranean diet', type: 'Diet', indication: 'All CAD patients', efficacy: 'Reduces cardiovascular events', sideEffects: [], monitoring: ['Adherence'], evidenceLevel: 'Strong' } ], secondLine: [], adjunctive: [], contraindicatedWith: [] } ], emergencySigns: ['Chest pain at rest', 'New/worsening angina', 'Shortness of breath with minimal exertion', 'Symptoms of MI (STEMI/NSTEMI)'], preventionStrategies: ['Control risk factors (BP, lipids, glucose)', 'Exercise', 'Healthy diet', 'Smoking cessation', 'Weight management', 'Aspirin (in select high-risk individuals for primary prevention)'], prognosis: 'Variable; excellent with optimal medical therapy and revascularization when indicated; reduced with HF or recurrent events', specialPopulations: [ { population: 'Women', modifications: ['Symptoms may be atypical'], precautions: ['Underdiagnosed'] }, { population: 'Diabetes', modifications: ['More aggressive risk factor control', 'SGLT2 inhibitors/GLP-1 agonists with CV benefit'], precautions: ['Higher risk of silent ischemia'] }, { population: 'CKD', modifications: ['Adjust medications for renal function', 'Higher bleeding risk'], precautions: ['Contrast-induced nephropathy with angiography'] } ] }, { id: 'heart-failure', name: 'Heart Failure', domain: 'Cardiovascular', icdCode: 'I50.9', prevalence: '~2% of adults, increasing with age', riskFactors: ['CAD', 'Hypertension', 'Diabetes', 'Obesity', 'Valvular disease', 'Cardiomyopathy', 'Arrhythmias'], symptoms: ['Dyspnea (exertional, orthopnea, PND)', 'Fatigue', 'Lower extremity edema', 'Weight gain', 'Reduced exercise tolerance'], diagnosticCriteria: ['Symptoms + structural/functional cardiac abnormality', 'BNP/NT-proBNP elevation', 'Echocardiogram (EF for classification)', 'HFrEF (EF ≤40%), HFmrEF (41-49%), HFpEF (≥50%)'], differentialDiagnosis: ['Pulmonary disease (COPD)', 'Obesity', 'Deconditioning', 'Anemia', 'Liver disease'], treatmentApproaches: [ { category: 'Pharmacological', firstLine: [ { name: 'ARNI (sacubitril/valsartan)', type: 'ARNI', indication: 'HFrEF (replaces ACEi/ARB if tolerated)', dosing: '24/26mg to 97/103mg BID', efficacy: 'Reduces mortality and hospitalization', sideEffects: ['Hypotension', 'Hyperkalemia', 'Angioedema'], monitoring: ['BP', 'K+', 'Creatinine'], evidenceLevel: 'Strong' }, { name: 'Beta-blocker (carvedilol, metoprolol succinate, bisoprolol)', type: 'Beta-blocker', indication: 'All HFrEF (stable)', dosing: 'Titrate to target dose', efficacy: 'Reduces mortality 30-35%', sideEffects: ['Bradycardia', 'Fatigue', 'Hypotension'], monitoring: ['HR', 'BP', 'Symptoms'], evidenceLevel: 'Strong' }, { name: 'MRA (spironolactone or eplerenone)', type: 'MRA', indication: 'HFrEF with EF ≤35% and symptoms', dosing: 'Spironolactone 25-50mg daily', efficacy: 'Reduces mortality 30%', sideEffects: ['Hyperkalemia', 'Gynecomastia'], monitoring: ['K+', 'Creatinine'], evidenceLevel: 'Strong' }, { name: 'SGLT2 inhibitor (dapagliflozin, empagliflozin)', type: 'SGLT2i', indication: 'HFrEF and HFpEF (all HF)', dosing: '10mg daily', efficacy: 'Reduces hospitalization and CV death', sideEffects: ['UTI', 'Genital infections', 'Volume depletion'], monitoring: ['Symptoms', 'Glucose if diabetic'], evidenceLevel: 'Strong' } ], secondLine: [ { name: 'Loop diuretic (furosemide)', type: 'Diuretic', indication: 'Volume overload/congestion', dosing: '20-80mg daily (or higher)', efficacy: 'Relieves congestion', sideEffects: ['Electrolyte disturbances', 'AKI'], monitoring: ['Weight', 'Electrolytes', 'Creatinine'], evidenceLevel: 'Strong' }, { name: 'Hydralazine/isosorbide dinitrate', type: 'Vasodilator', indication: 'ACEi/ARB/ARNI intolerant; Black patients with HFrEF', dosing: 'Fixed-dose combination', efficacy: 'Reduces mortality in Black patients', sideEffects: ['Headache', 'Hypotension'], monitoring: ['BP', 'Symptoms'], evidenceLevel: 'Strong' }, { name: 'Ivabradine', type: 'If current', indication: 'HFrEF with HR ≥70 on max beta-blocker', dosing: '5-7.5mg BID', efficacy: 'Reduces hospitalization', sideEffects: ['Bradycardia', 'Visual disturbances'], monitoring: ['HR'], evidenceLevel: 'Strong' } ], adjunctive: [ { name: 'Digoxin', type: 'Cardiac glycoside', indication: 'Persistent symptoms, rate control in AF', dosing: '0.125-0.25mg daily', efficacy: 'Reduces hospitalization', sideEffects: ['Toxicity with narrow therapeutic index'], monitoring: ['Digoxin level', 'K+', 'Creatinine'], evidenceLevel: 'Moderate' } ], contraindicatedWith: ['NSAIDs', 'Non-dihydropyridine CCBs in HFrEF', 'Thiazolidinediones'] }, { category: 'Procedural', firstLine: [ { name: 'ICD (implantable cardioverter-defibrillator)', type: 'Device', indication: 'EF ≤35% despite GDMT for primary prevention', efficacy: 'Reduces sudden cardiac death', sideEffects: ['Inappropriate shocks', 'Infection'], monitoring: ['Device checks'], evidenceLevel: 'Strong' }, { name: 'CRT (cardiac resynchronization therapy)', type: 'Device', indication: 'EF ≤35%, LBBB, QRS ≥150ms, NYHA II-IV', efficacy: 'Improves symptoms and mortality', sideEffects: ['Procedure complications'], monitoring: ['Symptoms', 'Echo'], evidenceLevel: 'Strong' } ], secondLine: [ { name: 'LVAD (left ventricular assist device)', type: 'Device', indication: 'Advanced HF as bridge to transplant or destination therapy', efficacy: 'Improves survival in advanced HF', sideEffects: ['Bleeding', 'Infection', 'Stroke', 'Device malfunction'], monitoring: ['INR', 'Device function', 'Symptoms'], evidenceLevel: 'Strong' }, { name: 'Heart transplantation', type: 'Surgery', indication: 'End-stage HF without contraindications', efficacy: '1-year survival ~90%, 10-year ~50%', sideEffects: ['Rejection', 'Immunosuppression complications'], monitoring: ['Biopsy', 'Immunosuppression levels'], evidenceLevel: 'Strong' } ], adjunctive: [], contraindicatedWith: [] } ], emergencySigns: ['Acute pulmonary edema', 'Cardiogenic shock', 'New/rapid-onset symptoms', 'Hypotension with symptoms'], preventionStrategies: ['Control HTN and CAD', 'Treat diabetes optimally', 'Limit alcohol', 'Avoid cardiotoxins', 'Maintain healthy weight'], prognosis: '5-year mortality ~50% historically; improving with GDMT quadruple therapy', specialPopulations: [ { population: 'HFpEF', modifications: ['SGLT2i now indicated; treat comorbidities; diuretics for congestion'], precautions: ['Less evidence for traditional HF meds'] }, { population: 'Elderly', modifications: ['Start low, go slow', 'Monitor for hypotension/falls'], precautions: ['Polypharmacy concerns'] }, { population: 'Pregnancy', modifications: ['Avoid ACEi/ARB/ARNI/MRA', 'Hydralazine/nitrates and beta-blockers safer'], precautions: ['High-risk pregnancy'] } ] }, { id: 'atrial-fibrillation', name: 'Atrial Fibrillation (AFib)', domain: 'Cardiovascular', icdCode: 'I48.91', prevalence: '~2-3% of adults, increases with age', riskFactors: ['Age', 'HTN', 'Obesity', 'Sleep apnea', 'CAD', 'HF', 'Thyroid disease', 'Alcohol'], symptoms: ['Palpitations', 'Fatigue', 'Dyspnea', 'Dizziness', 'Chest discomfort', 'May be asymptomatic'], diagnosticCriteria: ['ECG showing irregularly irregular rhythm with absent P waves', 'May need Holter or event monitor for paroxysmal AF'], differentialDiagnosis: ['Other arrhythmias (atrial flutter, SVT, MAT)', 'Sinus arrhythmia', 'Frequent PACs'], treatmentApproaches: [ { category: 'Pharmacological', firstLine: [ { name: 'Anticoagulation (DOAC preferred)', type: 'Anticoagulant', indication: 'CHA2DS2-VASc ≥2 (men) or ≥3 (women)', dosing: 'Apixaban 5mg BID, Rivaroxaban 20mg daily, etc.', efficacy: 'Reduces stroke risk by 65%+', sideEffects: ['Bleeding'], monitoring: ['Bleeding', 'Renal function'], evidenceLevel: 'Strong' }, { name: 'Beta-blocker (metoprolol)', type: 'Rate control', indication: 'Rate control strategy', dosing: 'Titrate to HR 60-110', efficacy: 'Controls ventricular rate', sideEffects: ['Bradycardia', 'Fatigue'], monitoring: ['HR', 'BP'], evidenceLevel: 'Strong' }, { name: 'Diltiazem or verapamil', type: 'Rate control', indication: 'Rate control (if no HFrEF)', dosing: 'Diltiazem 120-360mg daily', efficacy: 'Controls rate', sideEffects: ['Hypotension', 'Bradycardia'], monitoring: ['HR', 'BP'], evidenceLevel: 'Strong' } ], secondLine: [ { name: 'Amiodarone', type: 'Rhythm control', indication: 'Rhythm control, especially with structural heart disease', dosing: 'Loading then 200mg daily', efficacy: 'Most effective antiarrhythmic', sideEffects: ['Thyroid', 'Pulmonary fibrosis', 'Hepatotoxicity', 'Photosensitivity'], monitoring: ['TFTs', 'LFTs', 'PFTs', 'ECG'], evidenceLevel: 'Strong' }, { name: 'Flecainide/Propafenone', type: 'Rhythm control', indication: 'Rhythm control in structurally normal heart', dosing: 'Variable', efficacy: 'Effective for paroxysmal AF', sideEffects: ['Proarrhythmia'], monitoring: ['ECG'], evidenceLevel: 'Strong' }, { name: 'Sotalol', type: 'Rhythm control', indication: 'Rhythm control', dosing: '80-160mg BID', efficacy: 'Moderate efficacy', sideEffects: ['QTc prolongation', 'Torsades'], monitoring: ['ECG', 'QTc'], evidenceLevel: 'Moderate' } ], adjunctive: [ { name: 'Digoxin', type: 'Rate control', indication: 'Adjunct rate control, especially in HF', dosing: '0.125-0.25mg daily', efficacy: 'Rate control at rest', sideEffects: ['Toxicity'], monitoring: ['Level', 'K+'], evidenceLevel: 'Moderate' } ], contraindicatedWith: ['Flecainide/propafenone in structural heart disease'] }, { category: 'Procedural', firstLine: [ { name: 'Catheter ablation', type: 'Ablation', indication: 'Symptomatic AF refractory to or intolerant of antiarrhythmics; may be first-line in paroxysmal AF', efficacy: '70-80% success for paroxysmal; lower for persistent', sideEffects: ['Stroke', 'Tamponade', 'PV stenosis'], monitoring: ['Rhythm monitoring post-procedure'], evidenceLevel: 'Strong' } ], secondLine: [ { name: 'Left atrial appendage closure (Watchman)', type: 'Device', indication: 'Cannot tolerate long-term anticoagulation', efficacy: 'Non-inferior to warfarin for stroke prevention', sideEffects: ['Procedure complications', 'Device leak'], monitoring: ['TEE follow-up'], evidenceLevel: 'Strong' }, { name: 'Surgical Maze procedure', type: 'Surgery', indication: 'AF with other cardiac surgery indication', efficacy: 'High success rate', sideEffects: ['Surgical risks'], monitoring: ['Rhythm'], evidenceLevel: 'Moderate' } ], adjunctive: [], contraindicatedWith: [] } ], emergencySigns: ['Rapid ventricular response with hemodynamic instability', 'Stroke symptoms', 'New heart failure'], preventionStrategies: ['Control HTN', 'Treat sleep apnea', 'Weight loss', 'Limit alcohol', 'Exercise'], prognosis: 'Chronic condition; stroke risk main concern; mortality increased 1.5-2x', specialPopulations: [ { population: 'CKD', modifications: ['Dose-adjust DOACs', 'Warfarin may be needed for severe CKD/dialysis'], precautions: ['Higher bleeding risk'] }, { population: 'Elderly', modifications: ['DOACs preferred over warfarin', 'Fall risk consideration'], precautions: ['Bleeding vs stroke balance'] } ] } ]; // ═══════════════════════════════════════════════════════════════════════════════ // METABOLIC/ENDOCRINE CONDITIONS // ═══════════════════════════════════════════════════════════════════════════════ export const METABOLIC_CONDITIONS: HealthCondition[] = [ { id: 'type2-diabetes', name: 'Type 2 Diabetes Mellitus', domain: 'Metabolic', icdCode: 'E11.9', prevalence: '~10% of adults', riskFactors: ['Obesity', 'Family history', 'Sedentary lifestyle', 'Age >45', 'Ethnicity (higher in certain groups)', 'Prediabetes', 'Gestational diabetes history'], symptoms: ['Polyuria', 'Polydipsia', 'Fatigue', 'Blurred vision', 'Slow wound healing', 'Often asymptomatic early'], diagnosticCriteria: ['Fasting glucose ≥126 mg/dL', 'HbA1c ≥6.5%', '2-hour glucose ≥200 mg/dL on OGTT', 'Random glucose ≥200 with symptoms'], differentialDiagnosis: ['Type 1 diabetes', 'LADA', 'MODY', 'Secondary diabetes (steroids, pancreatic disease)'], treatmentApproaches: [ { category: 'Lifestyle', firstLine: [ { name: 'Medical nutrition therapy', type: 'Diet', indication: 'All patients', efficacy: 'Can reduce HbA1c 1-2%', sideEffects: [], monitoring: ['Weight', 'HbA1c'], evidenceLevel: 'Strong' }, { name: 'Physical activity', type: 'Exercise', indication: 'All patients', dosing: '150 min/week moderate + resistance training', efficacy: 'Reduces HbA1c 0.5-0.7%', sideEffects: [], monitoring: ['Exercise log'], evidenceLevel: 'Strong' }, { name: 'Weight loss', type: 'Weight management', indication: 'Overweight/obese', dosing: '5-10% body weight loss goal', efficacy: 'Can induce remission in some', sideEffects: [], monitoring: ['Weight', 'HbA1c'], evidenceLevel: 'Strong' } ], secondLine: [], adjunctive: [], contraindicatedWith: [] }, { category: 'Pharmacological', firstLine: [ { name: 'Metformin', type: 'Biguanide', indication: 'First-line pharmacotherapy', dosing: '500-2000mg daily (divided)', efficacy: 'Reduces HbA1c 1-1.5%', sideEffects: ['GI upset', 'B12 deficiency', 'Lactic acidosis (rare)'], monitoring: ['Creatinine', 'B12', 'HbA1c'], evidenceLevel: 'Strong' }, { name: 'SGLT2 inhibitor (empagliflozin)', type: 'SGLT2i', indication: 'With ASCVD, HF, or CKD (or high risk)', dosing: '10-25mg daily', efficacy: 'Reduces HbA1c 0.5-1%, CV and renal benefits', sideEffects: ['UTI', 'Genital infections', 'DKA'], monitoring: ['Creatinine', 'HbA1c'], evidenceLevel: 'Strong' }, { name: 'GLP-1 receptor agonist (semaglutide)', type: 'GLP-1 RA', indication: 'With ASCVD or high risk; obesity', dosing: 'Semaglutide 0.5-2mg SC weekly', efficacy: 'Reduces HbA1c 1-1.5%, weight loss 5-15%, CV benefit', sideEffects: ['Nausea', 'Vomiting', 'Pancreatitis (rare)'], monitoring: ['HbA1c', 'Weight'], evidenceLevel: 'Strong' } ], secondLine: [ { name: 'DPP-4 inhibitor (sitagliptin)', type: 'DPP-4i', indication: 'Add-on if GLP-1 not suitable', dosing: '100mg daily', efficacy: 'Reduces HbA1c 0.5-0.8%', sideEffects: ['Generally well-tolerated'], monitoring: ['HbA1c'], evidenceLevel: 'Strong' }, { name: 'Sulfonylurea (glipizide)', type: 'SU', indication: 'Cost-effective option; caution in elderly', dosing: '5-20mg daily', efficacy: 'Reduces HbA1c 1-1.5%', sideEffects: ['Hypoglycemia', 'Weight gain'], monitoring: ['Glucose', 'HbA1c'], evidenceLevel: 'Strong' }, { name: 'Pioglitazone', type: 'TZD', indication: 'Insulin sensitizer; NAFLD', dosing: '15-45mg daily', efficacy: 'Reduces HbA1c 1-1.5%', sideEffects: ['Weight gain', 'Edema', 'Fractures', 'Bladder cancer concern'], monitoring: ['Weight', 'Edema', 'LFTs'], evidenceLevel: 'Strong' } ], adjunctive: [ { name: 'Insulin', type: 'Insulin', indication: 'If HbA1c very high, not at goal, or catabolic features', dosing: 'Start basal 10 units or 0.1-0.2 U/kg', efficacy: 'Most effective glucose lowering', sideEffects: ['Hypoglycemia', 'Weight gain'], monitoring: ['Glucose', 'HbA1c'], evidenceLevel: 'Strong' } ], contraindicatedWith: ['Metformin in severe CKD/acute illness with lactic acidosis risk'] } ], emergencySigns: ['DKA (rare in T2DM)', 'Hyperosmolar hyperglycemic state', 'Severe hypoglycemia'], preventionStrategies: ['Weight loss in prediabetes', 'Healthy diet', 'Exercise', 'Metformin in high-risk prediabetes'], prognosis: 'Chronic; complications reduced with good control; life expectancy reduced by 5-10 years if poorly controlled', specialPopulations: [ { population: 'CKD', modifications: ['Dose-adjust metformin', 'SGLT2i if eGFR allows', 'Insulin may be needed'], precautions: ['Hypoglycemia risk higher'] }, { population: 'Elderly', modifications: ['Less stringent HbA1c targets (7.5-8.5%)', 'Avoid hypoglycemia', 'Avoid SU if possible'], precautions: ['Fall risk with hypoglycemia'] }, { population: 'Heart failure', modifications: ['SGLT2i preferred', 'Avoid TZDs'], precautions: [] } ] }, { id: 'hypothyroidism', name: 'Hypothyroidism', domain: 'Metabolic', icdCode: 'E03.9', prevalence: '~5% of population', riskFactors: ['Female sex', 'Age >60', 'Autoimmune disease', 'Family history', 'Prior thyroid surgery/radiation'], symptoms: ['Fatigue', 'Weight gain', 'Cold intolerance', 'Constipation', 'Dry skin', 'Hair loss', 'Depression', 'Bradycardia'], diagnosticCriteria: ['Elevated TSH with low free T4 (overt)', 'Elevated TSH with normal free T4 (subclinical)'], differentialDiagnosis: ['Depression', 'Anemia', 'Sleep apnea', 'CKD', 'Medication side effects'], treatmentApproaches: [ { category: 'Pharmacological', firstLine: [ { name: 'Levothyroxine', type: 'Thyroid hormone', indication: 'Overt hypothyroidism; subclinical if TSH >10 or symptoms', dosing: '1.6 mcg/kg/day; start 25-50mcg in elderly/cardiac', efficacy: 'Normalizes thyroid function', sideEffects: ['Overtreatment: palpitations, bone loss'], monitoring: ['TSH in 6-8 weeks, then annually'], evidenceLevel: 'Strong' } ], secondLine: [ { name: 'Liothyronine (T3)', type: 'Thyroid hormone', indication: 'Consider if persistent symptoms on T4 alone (controversial)', dosing: 'Low dose in combination', efficacy: 'Limited evidence for benefit', sideEffects: ['Arrhythmias'], monitoring: ['TSH, T3'], evidenceLevel: 'Limited' } ], adjunctive: [], contraindicatedWith: [] } ], emergencySigns: ['Myxedema coma (severe hypothyroidism with altered mental status, hypothermia)'], preventionStrategies: ['Adequate iodine intake', 'Monitor after thyroid interventions'], prognosis: 'Excellent with treatment; lifelong therapy usually required', specialPopulations: [ { population: 'Pregnancy', modifications: ['Increase dose 25-30% early; monitor TSH q4 weeks'], precautions: ['Untreated causes fetal harm'] }, { population: 'Elderly', modifications: ['Start low dose', 'May accept higher TSH target'], precautions: ['Cardiac risk with rapid correction'] } ] } ]; // ═══════════════════════════════════════════════════════════════════════════════ // MENTAL HEALTH CONDITIONS // ═══════════════════════════════════════════════════════════════════════════════ export const MENTAL_HEALTH_CONDITIONS: HealthCondition[] = [ { id: 'major-depressive-disorder', name: 'Major Depressive Disorder', domain: 'Psychiatric', icdCode: 'F32.9', prevalence: '~7% annually, ~20% lifetime', riskFactors: ['Family history', 'Trauma', 'Chronic illness', 'Substance use', 'Social isolation', 'Female sex'], symptoms: ['Depressed mood', 'Anhedonia', 'Sleep changes', 'Appetite/weight changes', 'Fatigue', 'Concentration problems', 'Guilt/worthlessness', 'Suicidal ideation'], diagnosticCriteria: ['≥5 symptoms for ≥2 weeks', 'Must include depressed mood or anhedonia', 'Functional impairment', 'Not due to substance or medical condition'], differentialDiagnosis: ['Bipolar disorder', 'Persistent depressive disorder', 'Adjustment disorder', 'Grief', 'Medical causes (hypothyroidism, anemia)', 'Substance-induced'], treatmentApproaches: [ { category: 'Psychotherapy', firstLine: [ { name: 'Cognitive Behavioral Therapy (CBT)', type: 'Psychotherapy', indication: 'Mild-moderate depression; adjunct in severe', duration: '12-16 sessions typically', efficacy: 'Equivalent to medication for mild-moderate', sideEffects: [], monitoring: ['PHQ-9'], evidenceLevel: 'Strong' }, { name: 'Interpersonal Therapy (IPT)', type: 'Psychotherapy', indication: 'Mild-moderate depression', duration: '12-16 sessions', efficacy: 'Effective for interpersonal issues', sideEffects: [], monitoring: ['PHQ-9'], evidenceLevel: 'Strong' } ], secondLine: [ { name: 'Behavioral Activation', type: 'Psychotherapy', indication: 'Depression', efficacy: 'Effective, especially for anhedonia', sideEffects: [], monitoring: ['Activity log'], evidenceLevel: 'Strong' } ], adjunctive: [], contraindicatedWith: [] }, { category: 'Pharmacological', firstLine: [ { name: 'SSRI (sertraline, escitalopram)', type: 'Antidepressant', indication: 'Moderate-severe depression', dosing: 'Sertraline 50-200mg, Escitalopram 10-20mg', duration: 'Minimum 6-12 months; longer if recurrent', efficacy: 'Response in 50-60%', sideEffects: ['Nausea', 'Sexual dysfunction', 'Insomnia/sedation'], monitoring: ['Response in 4-6 weeks', 'Suicidality in young'], evidenceLevel: 'Strong' }, { name: 'SNRI (venlafaxine, duloxetine)', type: 'Antidepressant', indication: 'Depression, especially with pain', dosing: 'Venlafaxine 75-225mg, Duloxetine 60mg', efficacy: 'Similar to SSRI', sideEffects: ['Nausea', 'HTN (venlafaxine)', 'Discontinuation syndrome'], monitoring: ['BP with venlafaxine'], evidenceLevel: 'Strong' } ], secondLine: [ { name: 'Bupropion', type: 'Antidepressant', indication: 'Depression; avoids sexual SE; helps with smoking', dosing: '150-450mg daily', efficacy: 'Effective', sideEffects: ['Insomnia', 'Seizure risk at high dose'], monitoring: [], evidenceLevel: 'Strong' }, { name: 'Mirtazapine', type: 'Antidepressant', indication: 'Depression with insomnia/poor appetite', dosing: '15-45mg at bedtime', efficacy: 'Effective', sideEffects: ['Sedation', 'Weight gain'], monitoring: ['Weight'], evidenceLevel: 'Strong' } ], adjunctive: [ { name: 'Aripiprazole augmentation', type: 'Atypical antipsychotic', indication: 'Treatment-resistant depression', dosing: '2-15mg daily', efficacy: 'Augments antidepressant response', sideEffects: ['Akathisia', 'Weight gain'], monitoring: ['Metabolic parameters'], evidenceLevel: 'Strong' }, { name: 'Lithium augmentation', type: 'Mood stabilizer', indication: 'Treatment-resistant depression', dosing: '600-900mg daily', efficacy: 'Augments response', sideEffects: ['Thyroid/kidney effects', 'Toxicity'], monitoring: ['Lithium level', 'Renal', 'Thyroid'], evidenceLevel: 'Strong' } ], contraindicatedWith: ['MAOIs with SSRIs/SNRIs'] }, { category: 'Procedural', firstLine: [ { name: 'ECT (electroconvulsive therapy)', type: 'Neuromodulation', indication: 'Severe/treatment-resistant depression, suicidality, psychotic features', efficacy: 'Most effective treatment (70-90%)', sideEffects: ['Memory effects', 'Anesthesia risks'], monitoring: ['Cognitive function'], evidenceLevel: 'Strong' } ], secondLine: [ { name: 'TMS (transcranial magnetic stimulation)', type: 'Neuromodulation', indication: 'Treatment-resistant depression (failed ≥1 medication)', efficacy: '50-60% response', sideEffects: ['Headache', 'Scalp discomfort'], monitoring: [], evidenceLevel: 'Strong' }, { name: 'Ketamine/Esketamine', type: 'NMDA antagonist', indication: 'Treatment-resistant depression', dosing: 'Esketamine nasal spray per protocol', efficacy: 'Rapid response in hours-days', sideEffects: ['Dissociation', 'BP elevation', 'Abuse potential'], monitoring: ['REMS program', 'BP'], evidenceLevel: 'Strong' } ], adjunctive: [], contraindicatedWith: [] } ], emergencySigns: ['Active suicidal ideation with plan', 'Psychotic features', 'Catatonia', 'Inability to care for self'], preventionStrategies: ['Early intervention', 'Stress management', 'Social support', 'Treatment of substance use'], prognosis: '60-70% respond to first treatment; recurrence common (50% after first episode)', specialPopulations: [ { population: 'Pregnancy', modifications: ['Weigh risks/benefits', 'Sertraline often preferred', 'Avoid paroxetine (cardiac defects)'], precautions: ['Neonatal effects', 'Postpartum monitoring'] }, { population: 'Elderly', modifications: ['Start at half dose', 'Avoid anticholinergic medications', 'SSRIs preferred'], precautions: ['Falls with SSRIs', 'Hyponatremia'] }, { population: 'Children/Adolescents', modifications: ['Fluoxetine FDA-approved', 'Close monitoring for suicidality'], precautions: ['Black box warning'] } ] }, { id: 'generalized-anxiety', name: 'Generalized Anxiety Disorder', domain: 'Psychiatric', icdCode: 'F41.1', prevalence: '~3% annually', riskFactors: ['Family history', 'Female sex', 'Trauma', 'Chronic illness', 'Personality factors'], symptoms: ['Excessive worry most days for ≥6 months', 'Difficulty controlling worry', 'Restlessness', 'Fatigue', 'Concentration problems', 'Irritability', 'Muscle tension', 'Sleep disturbance'], diagnosticCriteria: ['Excessive anxiety/worry ≥6 months', '≥3 associated symptoms', 'Significant distress/impairment', 'Not due to substance/medical condition'], differentialDiagnosis: ['Panic disorder', 'Social anxiety', 'OCD', 'PTSD', 'Medical causes (hyperthyroidism, pheochromocytoma)', 'Substance-induced'], treatmentApproaches: [ { category: 'Psychotherapy', firstLine: [ { name: 'CBT for anxiety', type: 'Psychotherapy', indication: 'GAD', duration: '12-16 sessions', efficacy: 'Effective, durable effects', sideEffects: [], monitoring: ['GAD-7'], evidenceLevel: 'Strong' } ], secondLine: [ { name: 'Applied relaxation', type: 'Psychotherapy', indication: 'GAD', efficacy: 'Effective', sideEffects: [], monitoring: [], evidenceLevel: 'Moderate' } ], adjunctive: [], contraindicatedWith: [] }, { category: 'Pharmacological', firstLine: [ { name: 'SSRI (sertraline, escitalopram)', type: 'Antidepressant', indication: 'GAD', dosing: 'Same as depression dosing', efficacy: 'Effective', sideEffects: ['Same as for depression'], monitoring: ['Response in 4-6 weeks'], evidenceLevel: 'Strong' }, { name: 'SNRI (venlafaxine, duloxetine)', type: 'Antidepressant', indication: 'GAD', dosing: 'Same as depression', efficacy: 'Effective', sideEffects: ['Same'], monitoring: ['Same'], evidenceLevel: 'Strong' } ], secondLine: [ { name: 'Buspirone', type: 'Anxiolytic', indication: 'GAD (non-sedating, no dependence)', dosing: '15-60mg daily in divided doses', efficacy: 'Modest efficacy, delayed onset', sideEffects: ['Dizziness', 'Headache'], monitoring: [], evidenceLevel: 'Moderate' }, { name: 'Pregabalin', type: 'Anticonvulsant', indication: 'GAD (not FDA-approved in US but effective)', dosing: '150-600mg daily', efficacy: 'Effective', sideEffects: ['Sedation', 'Dizziness', 'Weight gain'], monitoring: [], evidenceLevel: 'Strong' } ], adjunctive: [ { name: 'Benzodiazepines (short-term)', type: 'Anxiolytic', indication: 'Acute anxiety; bridge to SSRI effect', dosing: 'Lowest effective dose, shortest duration', efficacy: 'Rapid relief', sideEffects: ['Sedation', 'Dependence', 'Cognitive effects'], monitoring: ['Limit duration'], evidenceLevel: 'Strong' } ], contraindicatedWith: ['Long-term benzodiazepines if possible'] } ], emergencySigns: ['Severe panic', 'Suicidal ideation', 'Inability to function'], preventionStrategies: ['Stress management', 'Regular exercise', 'Adequate sleep', 'Limited caffeine/alcohol'], prognosis: 'Chronic condition; symptoms wax and wane; good response to treatment', specialPopulations: [ { population: 'Elderly', modifications: ['Avoid benzodiazepines (falls, cognitive effects)'], precautions: ['Start medications low'] }, { population: 'Substance use', modifications: ['Avoid benzodiazepines'], precautions: ['Address substance use concurrently'] } ] } ]; // ═══════════════════════════════════════════════════════════════════════════════ // PREVENTIVE CARE AND WELLNESS // ═══════════════════════════════════════════════════════════════════════════════ export interface PreventiveCareRecommendation { category: string; ageGroup: string; sex: 'All' | 'Male' | 'Female'; intervention: string; frequency: string; evidenceGrade: 'A' | 'B' | 'C' | 'D' | 'I'; uspstfSource: string; } export const PREVENTIVE_CARE_GUIDELINES: PreventiveCareRecommendation[] = [ // Cancer Screening { category: 'Cancer Screening', ageGroup: '50-75', sex: 'All', intervention: 'Colorectal cancer screening (colonoscopy, FIT, etc.)', frequency: 'Per test type', evidenceGrade: 'A', uspstfSource: 'USPSTF 2021' }, { category: 'Cancer Screening', ageGroup: '45-75', sex: 'All', intervention: 'Colorectal cancer screening (may start at 45)', frequency: 'Per test type', evidenceGrade: 'A', uspstfSource: 'USPSTF 2021' }, { category: 'Cancer Screening', ageGroup: '50-80', sex: 'All', intervention: 'Lung cancer screening with LDCT (if 20+ pack-years, current or quit <15 years)', frequency: 'Annual', evidenceGrade: 'B', uspstfSource: 'USPSTF 2021' }, { category: 'Cancer Screening', ageGroup: '40-74', sex: 'Female', intervention: 'Breast cancer screening (mammography)', frequency: 'Every 1-2 years', evidenceGrade: 'B', uspstfSource: 'USPSTF 2024' }, { category: 'Cancer Screening', ageGroup: '21-65', sex: 'Female', intervention: 'Cervical cancer screening (Pap ± HPV)', frequency: 'Every 3-5 years per age/test', evidenceGrade: 'A', uspstfSource: 'USPSTF 2018' }, { category: 'Cancer Screening', ageGroup: '55-69', sex: 'Male', intervention: 'Prostate cancer screening (shared decision making)', frequency: 'Individualized', evidenceGrade: 'C', uspstfSource: 'USPSTF 2018' }, // Cardiovascular { category: 'CV Prevention', ageGroup: '40-75', sex: 'All', intervention: 'Statin for primary prevention (if 10-year ASCVD risk ≥10%)', frequency: 'Ongoing', evidenceGrade: 'B', uspstfSource: 'USPSTF 2022' }, { category: 'CV Prevention', ageGroup: '18+', sex: 'All', intervention: 'Blood pressure screening', frequency: 'Every 1-2 years if normal', evidenceGrade: 'A', uspstfSource: 'USPSTF 2021' }, { category: 'CV Prevention', ageGroup: '35+ (men), 45+ (women)', sex: 'All', intervention: 'Lipid screening', frequency: 'Every 5 years if normal', evidenceGrade: 'A', uspstfSource: 'USPSTF' }, // Metabolic { category: 'Diabetes', ageGroup: '35-70', sex: 'All', intervention: 'Diabetes screening (if overweight/obese)', frequency: 'Every 3 years if normal', evidenceGrade: 'B', uspstfSource: 'USPSTF 2021' }, // Infectious Disease Prevention { category: 'Immunization', ageGroup: 'All adults', sex: 'All', intervention: 'Influenza vaccine', frequency: 'Annual', evidenceGrade: 'A', uspstfSource: 'ACIP' }, { category: 'Immunization', ageGroup: '50+', sex: 'All', intervention: 'Shingrix (recombinant zoster vaccine)', frequency: '2 doses', evidenceGrade: 'A', uspstfSource: 'ACIP' }, { category: 'Immunization', ageGroup: '65+', sex: 'All', intervention: 'Pneumococcal vaccine (PCV20 or PCV15+PPSV23)', frequency: 'Per schedule', evidenceGrade: 'A', uspstfSource: 'ACIP' }, { category: 'Immunization', ageGroup: 'All', sex: 'All', intervention: 'COVID-19 vaccine', frequency: 'Per current guidance', evidenceGrade: 'A', uspstfSource: 'ACIP' }, { category: 'Immunization', ageGroup: 'Up to 26 (or 27-45 shared decision)', sex: 'All', intervention: 'HPV vaccine', frequency: '2-3 doses per age', evidenceGrade: 'A', uspstfSource: 'ACIP' }, // Mental Health { category: 'Mental Health', ageGroup: 'Adults', sex: 'All', intervention: 'Depression screening', frequency: 'Periodically', evidenceGrade: 'B', uspstfSource: 'USPSTF 2016' }, { category: 'Mental Health', ageGroup: '12-18', sex: 'All', intervention: 'Adolescent depression screening', frequency: 'Annually', evidenceGrade: 'B', uspstfSource: 'USPSTF' }, // Substance Use { category: 'Substance Use', ageGroup: 'Adults', sex: 'All', intervention: 'Unhealthy alcohol use screening + brief counseling', frequency: 'Periodically', evidenceGrade: 'B', uspstfSource: 'USPSTF 2018' }, { category: 'Substance Use', ageGroup: 'Adults', sex: 'All', intervention: 'Tobacco use screening + cessation counseling', frequency: 'At every visit', evidenceGrade: 'A', uspstfSource: 'USPSTF 2021' }, // Other { category: 'Bone Health', ageGroup: '65+', sex: 'Female', intervention: 'Osteoporosis screening (DEXA)', frequency: 'Per risk', evidenceGrade: 'B', uspstfSource: 'USPSTF 2018' }, { category: 'Infectious', ageGroup: '15-65', sex: 'All', intervention: 'HIV screening', frequency: 'At least once; more if risk factors', evidenceGrade: 'A', uspstfSource: 'USPSTF 2019' }, { category: 'Infectious', ageGroup: '18-79', sex: 'All', intervention: 'Hepatitis C screening', frequency: 'Once', evidenceGrade: 'B', uspstfSource: 'USPSTF 2020' } ]; // ═══════════════════════════════════════════════════════════════════════════════ // UNIVERSAL HEALTH ENGINE // ═══════════════════════════════════════════════════════════════════════════════ export class UniversalHealthEngine { private conditions: Map = new Map(); constructor() { this.initializeConditions(); } private initializeConditions(): void { const allConditions = [ ...CARDIOVASCULAR_CONDITIONS, ...METABOLIC_CONDITIONS, ...MENTAL_HEALTH_CONDITIONS ]; for (const condition of allConditions) { this.conditions.set(condition.id, condition); } } getCondition(id: string): HealthCondition | undefined { return this.conditions.get(id); } searchConditions(query: string): HealthCondition[] { const results: HealthCondition[] = []; for (const condition of this.conditions.values()) { if (condition.name.toLowerCase().includes(query.toLowerCase()) || condition.symptoms.some(s => s.toLowerCase().includes(query.toLowerCase()))) { results.push(condition); } } return results; } getConditionsByDomain(domain: HealthDomain): HealthCondition[] { return Array.from(this.conditions.values()).filter(c => c.domain === domain); } getPreventiveCare(age: number, sex: 'Male' | 'Female'): PreventiveCareRecommendation[] { return PREVENTIVE_CARE_GUIDELINES.filter(rec => { const [minAge, maxAge] = rec.ageGroup.includes('-') ? rec.ageGroup.split('-').map(a => parseInt(a) || 0) : [0, 150]; const ageMatch = age >= minAge && age <= maxAge; const sexMatch = rec.sex === 'All' || rec.sex === sex; return ageMatch && sexMatch; }); } identifyConditionFromSymptoms(symptoms: string[]): HealthCondition[] { const matches: { condition: HealthCondition; score: number }[] = []; for (const condition of this.conditions.values()) { let score = 0; for (const symptom of symptoms) { if (condition.symptoms.some(s => s.toLowerCase().includes(symptom.toLowerCase()))) { score += 2; } if (condition.riskFactors.some(r => r.toLowerCase().includes(symptom.toLowerCase()))) { score += 1; } } if (score > 0) { matches.push({ condition, score }); } } return matches.sort((a, b) => b.score - a.score).map(m => m.condition); } routeToSpecialist(condition: HealthCondition): string[] { const specialistMap: Record = { 'Oncology': ['Medical Oncologist', 'Surgical Oncologist', 'Radiation Oncologist'], 'Cardiovascular': ['Cardiologist', 'Electrophysiologist', 'Cardiothoracic Surgeon'], 'Metabolic': ['Endocrinologist', 'Diabetes Educator'], 'Infectious': ['Infectious Disease Specialist'], 'Neurological': ['Neurologist', 'Neurosurgeon'], 'Psychiatric': ['Psychiatrist', 'Psychologist', 'Licensed Therapist'], 'Respiratory': ['Pulmonologist'], 'Autoimmune': ['Rheumatologist'], 'Renal': ['Nephrologist'], 'Hepatic': ['Hepatologist', 'Gastroenterologist'], 'Gastrointestinal': ['Gastroenterologist'], 'Musculoskeletal': ['Orthopedic Surgeon', 'Rheumatologist', 'Physiatrist'], 'Dermatologic': ['Dermatologist'], 'Hematologic': ['Hematologist'], 'Reproductive': ['OB/GYN', 'Reproductive Endocrinologist', 'Urologist'], 'Ophthalmologic': ['Ophthalmologist'], 'ENT': ['Otolaryngologist'], 'Preventive': ['Primary Care Physician'], 'Emergency': ['Emergency Medicine Physician'], 'Pediatric': ['Pediatrician', 'Pediatric Specialist'], 'Geriatric': ['Geriatrician'], 'Palliative': ['Palliative Care Specialist', 'Hospice'], 'RareDisease': ['Geneticist', 'Relevant Subspecialist'] }; return specialistMap[condition.domain] || ['Primary Care Physician']; } generateHealthPlan( age: number, sex: 'Male' | 'Female', conditions: string[], riskFactors: string[] ): { preventiveCare: PreventiveCareRecommendation[]; conditionManagement: HealthCondition[]; riskModification: string[]; specialistReferrals: string[]; } { const preventiveCare = this.getPreventiveCare(age, sex); const conditionManagement: HealthCondition[] = []; for (const condId of conditions) { const cond = this.getCondition(condId); if (cond) conditionManagement.push(cond); } const riskModification: string[] = []; if (riskFactors.includes('smoking')) riskModification.push('Smoking cessation program'); if (riskFactors.includes('obesity')) riskModification.push('Weight management program'); if (riskFactors.includes('sedentary')) riskModification.push('Exercise prescription: 150 min/week moderate activity'); if (riskFactors.includes('poor diet')) riskModification.push('Nutrition counseling: Mediterranean or DASH diet'); const specialistReferrals = new Set(); for (const cond of conditionManagement) { for (const spec of this.routeToSpecialist(cond)) { specialistReferrals.add(spec); } } return { preventiveCare, conditionManagement, riskModification, specialistReferrals: Array.from(specialistReferrals) }; } getAllDomains(): HealthDomain[] { return [ 'Oncology', 'Cardiovascular', 'Metabolic', 'Infectious', 'Neurological', 'Psychiatric', 'Respiratory', 'Autoimmune', 'Renal', 'Hepatic', 'Gastrointestinal', 'Musculoskeletal', 'Dermatologic', 'Hematologic', 'Reproductive', 'Ophthalmologic', 'ENT', 'Preventive', 'Emergency', 'Pediatric', 'Geriatric', 'Palliative', 'RareDisease' ]; } } // Export singleton export const universalHealthEngine = new UniversalHealthEngine();