예제 #1
0
        public void Generates_No_EPrescription()
        {
            EPrescriptionService ePrescriptionService = new EPrescriptionService(Create_stub_repository());

            String textPresctioption = ePrescriptionService.GeneratePrescriptionForPatient("99999999");

            Assert.Equal("", textPresctioption);
        }
예제 #2
0
        public void Get_ePrescription()
        {
            EPrescriptionService EPrescriptionService = new EPrescriptionService(CreateStubRepository());

            List <EPrescription> results = (List <EPrescription>)EPrescriptionService.GetAllEntities();

            Assert.NotNull(results);
        }
예제 #3
0
        public void Not_found_prescriptions_with_date_parameter()
        {
            EPrescriptionService service = new EPrescriptionService(CreateStubRepository());

            List <EPrescription> searchResult = service.FindEPrescriptionsForDateParameter(1, "2020-12-23");

            Assert.Empty(searchResult);
        }
예제 #4
0
        public void Not_found_ePrescription_for_patient()
        {
            EPrescriptionService ePrescriptionService = new EPrescriptionService(CreateStubRepository());

            EPrescription ePrescription = ePrescriptionService.GetEPrescriptionForPatient(7);

            Assert.Null(ePrescription);
        }
예제 #5
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);
 }