removed ! after uniq! when sorting patients visits