Changed appointment controller search function to get method based on json in url param. merged with kyle's code.