SOLVAR is a hybrid endemic-epidemic machine learning framework designed for forecasting healthcare-associated multidrug-resistant organism (MDRO) outbreaks. By adaptively combining data-driven machine learning classifiers with mechanistic transmission models, SOLVAR predicts weekly MDRO incidence and classifies outbreaks 1 to 3 weeks in advance, providing a practical tool for proactive infection control.
Note: This repository has been published for reference and preliminary evaluation. The methodology, framework, and findings are currently undergoing academic peer review and are awaiting full formal publication.
To run the standalone dashboard (solvar.py), the program expects a SQLite database containing your historical microbiological records.
- Default File Location:
~/Documents/hospital_data.db(You can also pass a custom path directly to thelaunch_standalone()function). - Expected Table Name:
patient_records - Expected Data Structure:
The framework automatically processes raw lab data into epidemiological features. Your table should include the following key columns:
RptReadyDate: The date the specimen result was reported (parsed as a datetime).Organism: The identified pathogen (e.g., "Staphylococcus aureus", "Klebsiella").PatientKey(orHN): A unique patient identifier used for 7-day deduplication and calculating colonization pressure.Ward: The hospital ward location.Age,Sex,Specialty,LOS: Patient demographics and length of stay (optional but recommended).- Antibiotic Susceptibility Columns: The script automatically detects columns containing "S", "I", or "R" values. Ensure your drug columns use standard abbreviations or names (e.g.,
MEM,VAN,OXA,CTX,Imipenem) so the pipeline can accurately identify target MDROs (CRE, ESBL-E, MRSA, MRAB, VRE).
Ensure you have the required dependencies installed (pandas, numpy, scipy, matplotlib, customtkinter, scikit-learn, xgboost, shap, statsmodels).
Run the script directly from your terminal:
python solvar.py