logic updated for showing doctor view