search for appointments functionality