Sort case list by color, time until next exam, HR, flag