A semi-Markov model for patient progression through clinical trials