public void Get_survey_ids_for_doctor_ids() { MedicalExaminationService medicalExaminationService = new MedicalExaminationService(CreateMedicalExaminationStubRepository()); SurveyService surveyService = new SurveyService(CreateSurveyStubRepository(), medicalExaminationService, null); Dictionary <int, List <int> > results = surveyService.GetSurveyIdsForDoctorIds(); Assert.Equal(2, results.Keys.Count); }
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 Add_MedicalExamination_Doctor() { var waitingRoom = new Mock <WaitingRoom>(); Doctor doctor = new Doctor("Ante", "Antić", "54372816532", DateTime.Now, "ia54372", "1234", waitingRoom.Object); LoggedIn.Initialize(doctor); var mockPatient = new Mock <Patient>(); var mockExaminationType = new Mock <ExaminationType>(); var examination = new MedicalExamination(); var medicalExaminationRepository = new Mock <IMedicalExaminationRepository>(); medicalExaminationRepository.Setup(x => x.Add(examination)).Returns(examination); MedicalExaminationService medicalExaminationService = new MedicalExaminationService(medicalExaminationRepository.Object); var ex = medicalExaminationService.Add(mockPatient.Object, mockExaminationType.Object, false); medicalExaminationRepository.Verify(x => x.Add(ex), Times.Once()); Assert.AreEqual(doctor, ex.Doctor); }
public SurveyService(ISurveyRepository surveyRepository, MedicalExaminationService medicalExaminationService, AnswerService answerService) { SurveyRepository = surveyRepository; MedicalExaminationService = medicalExaminationService; AnswerService = answerService; }
public MedicalExaminationController(MedicalExaminationService medicalExaminationService) { this.medicalExaminationService = medicalExaminationService; }