algorithmic approach to the diagnosis