public IActionResult AppointmentWithDoctorSelectType(int idSelectLpu, string nameSelectLpu)
        {
            AppointmentWithDoctorViewModel appointmentViewModel = null;

            if (idSelectLpu != 0 && nameSelectLpu != null)
            {
                string polisNPatient   = HttpContext.Session.GetString("polisNPatient");
                string birthdayPatient = HttpContext.Session.GetString("birthdayPatient");
                HttpContext.Session.SetString("idSelectLpu", idSelectLpu.ToString());
                HttpContext.Session.SetString("nameSelectLpu", nameSelectLpu);
                var patientNetrica = new NetricaTestService.Patient
                {
                    Polis_N  = polisNPatient,
                    Birthday = DateTime.Parse(birthdayPatient)
                };
                var idPatient = netricaHelper.GetIdPatient(patientNetrica, idSelectLpu);
                if (idPatient == "")
                {
                    ErrorModel errors = new ErrorModel();
                    errors.IdError   = "idPatient is null";
                    errors.TextError = "Ошибка. Обратитесь к администратору системы";
                    return(View("~/Views/Home/ErrorPage.cshtml", errors));
                }
                HttpContext.Session.SetString("idPatient", idPatient);
            }

            if (HttpContext.Session.GetString("nextPathKey") == "AppointmentWithCOVID19")
            {
                appointmentViewModel = GetFilledAppointmentWithDoctorViewModel(null, "SelectSpesiality");
                return(View("~/Views/AppointmentWithDoctor/AppointmentWithDoctorSelectSpesiality.cshtml", appointmentViewModel));
            }

            appointmentViewModel = GetFilledAppointmentWithDoctorViewModel(null, null);
            return(View("~/Views/AppointmentWithDoctor/AppointmentWithDoctorSelectType.cshtml", appointmentViewModel));
        }
        private Dictionary <int, string> GetPermissibleLpuList(List <int> availableLpuList, Yamed_Service.Patient patient)
        {
            Dictionary <int, string> permissiblesLpu = new Dictionary <int, string>();
            var AllLpu = netricaHelper.GetAllLpu();

            foreach (var idLpu in availableLpuList)
            {
                var permissLpu = AllLpu.Where(l => l.Key == idLpu).FirstOrDefault();
                if (permissLpu.Key != 0)
                {
                    NetricaTestService.Patient netricaPatient = new NetricaTestService.Patient
                    {
                        Polis_N  = patient.NPolis,
                        Birthday = patient.Birthday
                    };
                    var idPatient = netricaHelper.GetIdPatient(netricaPatient, permissLpu.Key);
                    if (idPatient != "")
                    {
                        permissiblesLpu.Add(permissLpu.Key, permissLpu.Value);
                    }
                }
            }
            return(permissiblesLpu);
        }