public PartialViewResult FindSpecialist(HomePageViewModel model)
        {
            bool CheckAilmentsText(List <Tag> list)
            {
                if (list != null)
                {
                    foreach (var item in list)
                    {
                        if (item.Text != null)
                        {
                            return(true);
                        }
                    }
                }

                return(false);
            }

            if (CheckAilmentsText(model.Ailments))
            {
                Specialist ginekolg   = new Ginekolog(repository);
                Specialist stomatolog = new Stomatolog(repository);
                Specialist ortopeda   = new Ortopeda(repository);


                ginekolg.setNumber(stomatolog);
                stomatolog.setNumber(ortopeda);



                ginekolg.ForwardRequest(model.Ailments);
                List <string> listofspecialist = ortopeda.GetSpecialistsNames().Distinct().ToList();

                SearchDoctorViewModel DoctorModel = new SearchDoctorViewModel();
                HomePageViewModel     Model       = model;

                for (int i = 0; i < listofspecialist.Count(); i++)
                {
                    Model.MedicalSpecialist = listofspecialist[i];
                    DoctorModel.Users.AddRange(repository.SearchForDoctor(Model).Users);
                }

                DoctorModel.Users.Distinct(new UserComparer());

                return(PartialView(DoctorModel));
            }



            SearchDoctorViewModel doctormodel = repository.SearchForDoctor(model);


            return(PartialView(doctormodel));
        }
        public PartialViewResult FindAilment(List <Tag> Ailments)

        {
            Specialist ginekolg   = new Ginekolog(repository);
            Specialist stomatolog = new Stomatolog(repository);
            Specialist ortopeda   = new Ortopeda(repository);


            ginekolg.setNumber(stomatolog);
            stomatolog.setNumber(ortopeda);



            ginekolg.ForwardRequest(Ailments);
            List <string> listofspecialist = ortopeda.GetSpecialistsNames();



            SearchDoctorViewModel doctormodel = repository.SearchForDoctor(new HomePageViewModel());

            return(PartialView("FindSpecialist", doctormodel));
        }