Exemplo n.º 1
0
 private List <SlotDoctorService> ConvertToSlotDoctorServiceList(ForeignDoctorService doctorService, int duration)
 {
     return(new List <SlotDoctorService>()
     {
         new SlotDoctorService()
         {
             DoctorServiceId = doctorService.Id,
             Duration = duration
         }
     });
 }
Exemplo n.º 2
0
        private List <SlotDoctorService> ConvertToSlotDoctorServiceList(ForeignDoctorService doctorService, int duration)
        {
            duration = RoundToNearestFive(duration);

            return(new List <SlotDoctorService>()
            {
                new SlotDoctorService()
                {
                    DoctorServiceId = doctorService.Id,
                    Duration = duration
                }
            });
        }
Exemplo n.º 3
0
        private static void ImportDoctorServices(ForeignDoctorServiceRepository doctorServiceRepo, DPDoctor dpDoctor, ForeignDoctor foreignDoctor, List <DoctorService> doctorServices)
        {
            if (doctorServices == null)
            {
                return;
            }

            foreach (var doctorService in doctorServices)
            {
                var foreignDoctorService = new ForeignDoctorService()
                {
                    Id              = doctorService.Id,
                    Name            = doctorService.Name,
                    PriceMax        = doctorService.PriceMax,
                    PriceMin        = doctorService.PriceMin,
                    ServiceId       = doctorService.ServiceId,
                    ForeignDoctorId = foreignDoctor.Id
                };

                doctorServiceRepo.InsertOrUpdate(foreignDoctorService);
            }
        }
Exemplo n.º 4
0
        public DoctorMapping Map(ForeignAddress address, DoctorFacility doctorFacility, ForeignDoctorService foreignDoctorService)
        {
            var mapping = GetByAddressAndDoctorFacility(address, doctorFacility);

            if (mapping == null)
            {
                return(_db.DoctorMappings.Add(new DoctorMapping()
                {
                    DoctorId = doctorFacility.DoctorId,
                    FacilityId = doctorFacility.FacilityId,
                    ForeignAddress = address,
                    ForeignDoctorService = foreignDoctorService
                }));
            }

            return(mapping);
        }