SSP-2081 removed group by pulled validated to select closest appointment