updated controller for patients appointments