Fix for sorting patients with open visits at the top of patient search results.