Terminal cancer: duration and prediction of survival time