The Internet of Things (IoT) has numerous applications in health care, from remote patient monitoring, smart sensors, integration of smart medical devices, to improving and optimizing the health care process. Some predictions say that in the next few years there will be a boost of IoT adoption in health care, both on the clinical side and the operational side. Specifically for the complex management of hospital operations, IoT will be able to solve well-known problems such as inefficient coordination of health care teams, poor allocation of space, human and material resources, and bad investment decisions. In this line we believe that up-to-date knowledge of the whereabouts of patients, health care workers, and hospital equipment at all times will transform the way modern hospitals operate and are managed, leading to more efficient and effective businesses based on statistical analysis and real-time alert mechanisms. In this sense, we are developing Hospital 4.0, a distributed IoT application that delivers real-time statistical information to hospital administrators and the health care teams. Our solution works by capturing signals sent by Bluetooth beacons worn by every patient and health professional (wristbands and ID tags. We use them primarily for identifying the localization, the timestamp of events and the co-located people. These gathered data are used to generate statistics about resource usage and notifications about emergency situations, which are displayed on managerial dashboards.