Background: Discrete Event Simulation (DES) is one of the many tools and methods used in the analysis and improvement of healthcare services. Indeed, DES provides perhaps the most powerful and intuitive method for analyzing, evaluating, and improving complex healthcare systems. This paper highlights the process of developing a Digital Twin (DT) framework based on online DES to run the DES model in parallel with the real world in real-time. Methods: This paper suggests a new methodology that uses DES connected to the Internet of Things (IoT) devices to build a DT platform of patient pathways in a hospital for near real-time monitoring and predictive simulation. An experimental platform that mimics the behavior of a hospital has been used to validate this methodology. Results: The application of the proposed methodology allowed us to test the monitoring functionality in the DT. Therefore, we noticed that the DT behaves exactly as the emulator does in near real-time, we also tested the prediction functionality and we noticed that the DT provides us with a proactive overview for the near future of the patient pathways. The predictive functionality of this DT must be improved depending on the various reasons mentioned in this article. Conclusions: This paper presents a new methodology called HospiT'Win that uses DES and IoT devices to develop a DT of patient pathways in hospitals. This DT consists of two real-time models, a DT for Monitoring (DTM) and a DT for Predicting (DTP). An experimental platform with an emulator of a real hospital was used to validate this methodology before connecting to the real hospital. In the DTP, "dynamic" empirical distributions were used to perform a predictive simulation for the near future. In future research, some additional features and machine learning algorithms will be used to improve the proposed DT models.