Steps to run the codes:
- BaseDatabaseBuilding.py to extract features for each patient-day observation by emergency and planned admissions, and calculate the outcomes of interest: imminent discharge within 24 hours;
- XGB model for training and prediction evaluation;
- Patient-level evaluation;
- Hospital-level evaluation.