Ejemplo n.º 1
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);
 }
        public void Find_Reports_With_Comment_Or_Room_Searh_Parameter()
        {
            MedicalExaminationReportService service             = new MedicalExaminationReportService(CreateStubRepository());
            Dictionary <string, string>     parametersForSearch = new Dictionary <string, string>();
            List <string> logicOperators = new List <string>();

            parametersForSearch.Add("Sadržaju", "Sve je bilo uredu na pregledu");
            parametersForSearch.Add("Sobi", "101");
            logicOperators.Add("ILI");

            List <MedicalExaminationReport> searchResult = service.FindReportsUsingAdvancedSearch(1, parametersForSearch, logicOperators);

            searchResult.ShouldNotBeEmpty();
        }
        public void Find_Reports_With_Doctor_And_Date_Searh_Parameter()
        {
            MedicalExaminationReportService service             = new MedicalExaminationReportService(CreateStubRepository());
            Dictionary <string, string>     parametersForSearch = new Dictionary <string, string>();
            List <string> logicOperators = new List <string>();

            parametersForSearch.Add("Doktoru", "Milan");
            parametersForSearch.Add("Datumu", "2020-10-12");
            logicOperators.Add("I");

            List <MedicalExaminationReport> searchResult = service.FindReportsUsingAdvancedSearch(1, parametersForSearch, logicOperators);

            searchResult.ShouldNotBeEmpty();
        }
        public void Find_Reports_With_Three_Searh_Parameters()
        {
            MedicalExaminationReportService service             = new MedicalExaminationReportService(CreateStubRepository());
            Dictionary <string, string>     parametersForSearch = new Dictionary <string, string>();
            List <string> logicOperators = new List <string>();

            parametersForSearch.Add("Doktoru", "Milan");
            parametersForSearch.Add("Sadržaju", "Pacijent je dobro");
            parametersForSearch.Add("Sobi", "301");
            logicOperators.Add("ILI");
            logicOperators.Add("ILI");

            List <MedicalExaminationReport> searchResult = service.FindReportsUsingAdvancedSearch(1, parametersForSearch, logicOperators);

            searchResult.ShouldNotBeEmpty();
        }