Online optimization methods applied to the management of health services