Internet of Things for hospital patient flow management