Background. Real–time prediction is key to prevention and control of healthcare–associated infections. Contacts between individuals drive infections, yet most prediction frameworks fail to capture the dynamics of contact. We develop a real–time machine learning framework that incorporates dynamic patient contact networks to predict patient–level hospital–onset COVID–19 infections (HOCIs), which we test and validate on international multi–site datasets spanning epidemic and endemic periods.
Methods. Our framework extracts dynamic contact networks from routinely collected hospital data and combines them with patient clinical attributes and background contextual hospital data to forecast the infection status of individual patients. We train and test the HOCI prediction framework using 51,157 hospital patients admitted to a UK (London) National Health Service (NHS) Trust from 01 April 2020 to 01 April 2021, spanning UK COVID-19 surges 1 and 2. We then validate the framework by applying it to data from a non-UK (Geneva) hospital site during an epidemic surge (40,057 total inpatients) and to data from the same London Trust from a subsequent period post surge 2, when COVID-19 had become endemic (43,375 total inpatients).
Findings. Based on the training data (London data spanning surges 1 and 2), the framework achieved high predictive performance using all variables (AUC–ROC 0.89 [0.88–0.90]) but was almost as predictive using only contact network variables (AUC–ROC 0.88 [0.86–0.90]), and more so than using only hospital contextual (AUC–ROC 0.82 [0.80–0.84]) or patient clinical (AUC–ROC 0.64 [0.62–0.66]) variables. The top three risk factors we identified consisted of one hospital contextual variable (background hospital COVID–19 prevalence) and two contact network variables (network closeness, and number of direct contacts to infectious patients), and together achieved AUC–ROC 0.85 [0.82–0.88]. Furthermore, the addition of contact network variables improved performance relative to hospital contextual variables on both the non–UK (AUC–ROC increased from 0.84 [0.82–0.86] to 0.88 [0.86–0.90]) and the UK validation datasets (AUC–ROC increased from 0.52 [0.49–0.53] to 0.68 [0.64–0.70]).
Interpretation. Our results suggest that dynamic patient contact networks can be a robust predictor of respiratory viral infections spreading in hospitals. Their integration in clinical care has the potential to enhance individualised infection prevention and early diagnosis.