Discrete-time MPC for switched systems with applications to biomedical problems