Ermes: the algorithm that protects the health of hospitals