Fixed bug with visit search with surgeries