Added visit history functionality for Doctor