Prognosis algorithm