Using the hidden semi-Markov model with the Coxian phase-type distribution to capture patient flow through a heathcare setting