Filters blank referralIds when searching for patients