AI-based disease prediction and diagnosis system for Ghana and Africa, providing symptom analysis, treatment recommendations, and healthcare guidance.
import { useState, useRef, useEffect } from "react";
/* ─────────────────────────── DATA ─────────────────────────── */
const SYMPTOMS = [
"Fever","High Temperature","Chills & Rigors","Night Sweats","Persistent Headache",
"Body Aches & Pains","Severe Fatigue","Loss of Appetite","Unexplained Weight Loss",
"Nausea","Vomiting","Diarrhoea","Bloody Stool","Abdominal Pain","Stomach Cramps",
"Dry Cough","Productive Cough","Difficulty Breathing","Chest Pain","Chest Tightness",
"Sore Throat","Runny Nose","Nasal Congestion","Skin Rash","Skin Itching",
"Skin Lesions / Blisters","Jaundice (Yellow Eyes or Skin)","Dark Urine","Pale/Clay Stool",
"Swollen Lymph Nodes","Swollen Limbs / Oedema","Joint Pain / Swelling","Muscle Weakness",
"Eye Redness","Eye Discharge","Painful Urination","Frequent Urination","Blood in Urine",
"Genital Sores / Discharge","Confusion / Disorientation","Seizures / Convulsions",
"Stiff Neck","Sensitivity to Light","Ear Pain / Discharge","Nosebleed",
"Bleeding Gums","Painful Swallowing","Numbness or Tingling","Rapid Heartbeat",
"Dizziness / Fainting","Excessive Thirst"
];
const GH_REGIONS = [
"Greater Accra","Ashanti","Western","Eastern","Central","Northern",
"Upper East","Upper West","Volta","Bono","Oti","Ahafo",
"Bono East","North East","Savannah","Western North"
];
const AFRICA_COUNTRIES = [
"Nigeria","Kenya","Tanzania","Uganda","Ethiopia","Côte d'Ivoire",
"Senegal","Cameroon","Zimbabwe","Zambia","Mali","Burkina Faso",
"South Africa","Rwanda","Mozambique","Other African Country"
];
const STORAGE_KEY = "medipredict_app_v3";
const readStore = () => { try { return JSON.parse(localStorage.getItem(STORAGE_KEY)||"[]"); } catch { return []; } };
const writeStore = h => { try { localStorage.setItem(STORAGE_KEY, JSON.stringify(h.slice(0,100))); } catch {} };
/* ─────────────────────────── ICONS ─────────────────────────── */
const Icon = ({ d, size=18, color="currentColor" }) => (
);
const IHome = () => ;
const ISearch = () => ;
const ISave = () …