Beispiel #1
0
        public void Get_available_appointments_including_doctor_priority()
        {
            DoctorWorkDayService doctorWorkDayService = new DoctorWorkDayService(CreateDoctorWorkDayStubRepository(), null);

            Dictionary <int, List <Appointment> > result = doctorWorkDayService.GetAvailableAppointmentsByDateRangeAndDoctorIdIncludingPriority(new DateTime(2022, 12, 8), new DateTime(2022, 12, 8), 3, "Doctor");

            Assert.Equal(48, result[5].Count + result[6].Count + result[7].Count);
        }
Beispiel #2
0
        public void Get_available_appointments_by_date_range_and_doctor_id_invalid()
        {
            DoctorWorkDayService doctorWorkDayService = new DoctorWorkDayService(CreateDoctorWorkDayStubRepository(), null);

            Dictionary <int, List <Appointment> > result = doctorWorkDayService.GetAvailableAppointmentsByDateRangeAndDoctorId(new DateTime(2022, 12, 5), new DateTime(2022, 12, 7), 2);

            Assert.NotEqual(21, result[2].Count);
        }
Beispiel #3
0
        public void Get_available_appointments_by_date_and_doctor_id()
        {
            DoctorWorkDayService doctorWorkDayService = new DoctorWorkDayService(CreateDoctorWorkDayStubRepository(), null);

            List <Appointment> result = doctorWorkDayService.GetAvailableAppointmentsByDateAndDoctorId(new DateTime(2022, 12, 5), 1);

            Assert.Equal(22, result.Count);
        }
Beispiel #4
0
        public void Get_doctor_work_day_by_date_and_doctor_id_invalid()
        {
            DoctorWorkDayService doctorWorkDayService = new DoctorWorkDayService(CreateDoctorWorkDayStubRepository(), null);

            DoctorWorkDay result = doctorWorkDayService.GetDoctorWorkDayByDateAndDoctorId(new DateTime(2022, 12, 7), 1);

            Assert.Null(result);
        }
Beispiel #5
0
        public void Get_available_appointments_including_date_range_priority_invalid()
        {
            DoctorService        doctorService        = new DoctorService(CreateDoctorStubRepository());
            DoctorWorkDayService doctorWorkDayService = new DoctorWorkDayService(CreateDoctorWorkDayStubRepository(), doctorService);

            Dictionary <int, List <Appointment> > result = doctorWorkDayService.GetAvailableAppointmentsByDateRangeAndDoctorIdIncludingPriority(new DateTime(2022, 12, 8), new DateTime(2022, 12, 8), 3, "DateRange");

            Assert.NotEqual(47, result[4].Count + result[6].Count + result[8].Count);
        }
Beispiel #6
0
 private App()
 {
     EmailVerificationService = new EmailVerificationService();
     SftpService               = new SftpService();
     HttpService               = new HttpService();
     TenderService             = new TenderService();
     MedicalExaminationService = new MedicalExaminationService(
         new MedicalExaminationRepository(new MySQLStream <MedicalExamination>(), new IntSequencer()));
     PatientFeedbackService = new PatientFeedbackService(
         new PatientFeedbackRepository(new MySQLStream <PatientFeedback>(), new IntSequencer()));
     MedicalExaminationReportService = new MedicalExaminationReportService(
         new MedicalExaminationReportRepository(new MySQLStream <MedicalExaminationReport>(), new IntSequencer()));
     PrescriptionService = new PrescriptionService(
         new PrescriptionRepository(new MySQLStream <Prescription>(), new IntSequencer()));
     MedicalRecordService = new MedicalRecordService(
         new MedicalRecordRepository(new MySQLStream <MedicalRecord>(), new IntSequencer()), EmailVerificationService);
     QuestionService = new QuestionService(
         new QuestionRepository(new MySQLStream <Question>(), new IntSequencer()));
     AnswerService = new AnswerService(
         new AnswerRepository(new MySQLStream <Answer>(), new IntSequencer()), QuestionService);
     AllergiesService = new AllergiesService(
         new AllergiesRepository(new MySQLStream <Allergies>(), new IntSequencer()));
     PatientService = new PatientService(
         new PatientRepository(new MySQLStream <Patient>(), new IntSequencer()));
     SurveyService = new SurveyService(
         new SurveyRepository(new MySQLStream <Survey>(), new IntSequencer()), MedicalExaminationService, AnswerService);
     DoctorService = new DoctorService(
         new DoctorRepository(new MySQLStream <Doctor>(), new IntSequencer()));
     ReportService = new ReportService(
         new ReportRepository(new MySQLStream <Report>(), new IntSequencer()), SftpService);
     DoctorWorkDayService = new DoctorWorkDayService(
         new DoctorWorkDayRepository(new MySQLStream <DoctorWorkDay>(), new IntSequencer()), DoctorService);
     SpetialitationService = new SpetialitationService(
         new SpecialitationRepository(new MySQLStream <Specialitation>(), new IntSequencer()));
     AppointmentService = new AppointmentService(
         new AppointmentRepository(new MySQLStream <Appointment>(), new IntSequencer()), PatientService);
     EPrescriptionService = new EPrescriptionService(
         new EPrescriptionRepository(new MySQLStream <EPrescription>(), new IntSequencer()), SftpService);
     PharmacyService = new PharmacyService(
         new PharmacyRepository(new MySQLStream <Pharmacies>(), new IntSequencer()));
     RoomService = new RoomService(
         new RoomRepository(new MySQLStream <Room>(), new IntSequencer()));
     ManagerService = new ManagerService(
         new ManagerRepository(new MySQLStream <Manager>(), new IntSequencer()));
     SecretaryService = new SecretaryService(
         new SecretaryRepository(new MySQLStream <Secretary>(), new IntSequencer()));
     SystemAdministratorService = new SystemAdministratorService(
         new SystemAdministratorRepository(new MySQLStream <SystemAdministrator>(), new IntSequencer()));
     UserService = new UserService(
         new UserRepository(new MySQLStream <User>(), new IntSequencer()), PatientService, SystemAdministratorService);
 }