patient visit controller and appointment