Added code to check query string for clinic