Beispiel #1
0
        private static List <ScheduleOpening> GetProvAndOpAvailabilityHelper(List <long> listProvNums, DateTime dateEvaluating, ApptSearchData data,
                                                                             SearchBehaviorCriteria searchType, List <long> listOpNums, long blockoutType)
        {
            //No need to check RemotingRole; no call to db.
            List <ScheduleOpening> listPotentialTimeAvailable = new List <ScheduleOpening>();           //create or clear
            //Providers---------------------------------------------------------------------------------------------------------------
            List <ApptSearchProviderSchedule> listProvScheds = new List <ApptSearchProviderSchedule>(); //Provider Bar, ProviderSched Bar, Date and Provider

            listProvScheds = Appointments.GetProviderScheduleForProvidersAndDate(listProvNums, dateEvaluating, data.ListSchedules, data.ListAppointments);
            if (searchType == SearchBehaviorCriteria.ProviderTime)           //Fill the time the provider is available
            {
                listPotentialTimeAvailable = FillProviderTimeHelper(listProvScheds, data.AppointmentToAdd, dateEvaluating, blockoutType);
            }
            //Handle Operatories -----------------------------------------------------------------------------------------------------
            if (searchType == SearchBehaviorCriteria.ProviderTimeOperatory)                                 //Fill the time the prov and op are available
            {
                List <ApptSearchOperatorySchedule> listOpScheds = new List <ApptSearchOperatorySchedule>(); //filtered based on SearchType
                listOpScheds = GetAllForDate(dateEvaluating, data.ListSchedules, data.ListAppointments, data.ListSchedOps, listOpNums, listProvNums, blockoutType);
                listPotentialTimeAvailable = FillOperatoryTime(listOpScheds, listProvScheds, data.AppointmentToAdd, dateEvaluating, listProvNums, blockoutType
                                                               , data.ListSchedOps, data.ListSchedules);
            }
            return(listPotentialTimeAvailable);
        }