Sorted users by rank in create appointment