Example #1
0
 public AddModel(
     IArrangmentsService arrangmentsService,
     IPatientsService patientsService)
 {
     this.arrangmentsService = arrangmentsService;
     this.patientsService    = patientsService;
 }
 public ChatHub(
     IDoctorsService doctorsService,
     IPatientsService patientsService)
 {
     this.doctorsService  = doctorsService;
     this.patientsService = patientsService;
 }
 public PatientsController(
     IPatientsService patientsService,
     IDoctorsService doctorsService)
 {
     this.patientsService = patientsService;
     this.doctorsService  = doctorsService;
 }
        public SessionsViewModel(
            ISessionsService sessionsService,
            IPatientsService patientsService,
            [NotNull] ILogger logger,
            [NotNull] ToastNotifications.Notifier notifier,
            [NotNull] SessionAddedEventHandler sessionAddedEventHandler,
            [NotNull] SessionChangedEventHandler sessionChangedEventHandler,
            [NotNull] SessionDeletedEventHandler sessionDeletedEventHandler,
            [NotNull] ISessionsFileUiManager sessionFileManager)
        {
            _sessionsService            = sessionsService ?? throw new ArgumentNullException(nameof(sessionsService));
            _patientsService            = patientsService;
            _logger                     = logger ?? throw new ArgumentNullException(nameof(logger));
            _notifier                   = notifier;
            _sessionAddedEventHandler   = sessionAddedEventHandler ?? throw new ArgumentNullException(nameof(sessionAddedEventHandler));
            _sessionChangedEventHandler = sessionChangedEventHandler ?? throw new ArgumentNullException(nameof(sessionChangedEventHandler));
            _sessionDeletedEventHandler = sessionDeletedEventHandler ?? throw new ArgumentNullException(nameof(sessionDeletedEventHandler));
            _sessionFileManager         = sessionFileManager;

            _sessionAddedEventHandler.SessionAdded     += delegate { _isSessionListChanged = true; };
            _sessionChangedEventHandler.SessionChanged += delegate { _isSessionListChanged = true; };
            _sessionDeletedEventHandler.SessionDeleted += delegate { _isSessionListChanged = true; };

            _isSessionListChanged = false;
        }
 public PatientsController(
     IPatientsService patientsService,
     IValidator <CreatePatientRequestDto> createPatientRequestDtoValidator,
     IMapper mapper) : base(mapper)
 {
     _patientsService = patientsService;
     _createPatientRequestDtoValidator = createPatientRequestDtoValidator;
 }
Example #6
0
        public MainForm()
        {
            _patientsService = Program.ServiceProvider.GetService <IPatientsService>();

            InitializeComponent();

            _ = RefreshTable();
        }
Example #7
0
 public PatientsController(UserManager <ApplicationUser> userManager,
                           ApplicationDbContext db,
                           IPatientsService patientsService)
 {
     this.userManager     = userManager;
     this.db              = db;
     this.patientsService = patientsService;
 }
 public PrescriptionsController(
     IPrescriptionsService prescriptionsService,
     IPatientsService patientsService,
     IDoctorsService doctorsService)
 {
     this.prescriptionsService = prescriptionsService;
     this.patientsService      = patientsService;
     this.doctorsService       = doctorsService;
 }
Example #9
0
 public PatientViewModel(
     ILogger logger,
     IPatientsService patientsService, [NotNull] IEventBus eventBus,
     [NotNull] ToastNotifications.Notifier notifier)
 {
     _logger          = logger ?? throw new ArgumentNullException(nameof(logger));
     _patientsService = patientsService ?? throw new ArgumentNullException(nameof(patientsService));
     _eventBus        = eventBus ?? throw new ArgumentNullException(nameof(eventBus));
     _notifier        = notifier ?? throw new ArgumentNullException(nameof(notifier));
 }
 public ConsultationsController(
     IDoctorsService doctorsService,
     IConsultationsService consultationsService,
     IPatientsService patientsService,
     IEventsService eventsService)
 {
     this.doctorsService       = doctorsService;
     this.consultationsService = consultationsService;
     this.patientsService      = patientsService;
     this.eventsService        = eventsService;
 }
Example #11
0
 public DoctorsController(
     IDoctorsService doctorsService,
     IConsultationsService consultationsService,
     IPatientsService patientsService,
     ITownsService townsService)
 {
     this.doctorsService       = doctorsService;
     this.consultationsService = consultationsService;
     this.patientsService      = patientsService;
     this.townsService         = townsService;
 }
Example #12
0
 public AddModel(
     IDoctorsService doctorsService,
     IPatientsService patientsService,
     IAppointmentsService appointmentsService,
     IManipulationsService manipulationsService,
     UserManager <User> userManager)
 {
     this.doctorsService       = doctorsService;
     this.patientsService      = patientsService;
     this.appointmentsService  = appointmentsService;
     this.manipulationsService = manipulationsService;
     this.userManager          = userManager;
 }
Example #13
0
 public StatisticsController(
     IDoctorsService doctorsService,
     ITownsService townsService,
     IPatientsService patientsService,
     IConsultationsService consultationsService,
     ISpecialtiesService specialtiesService)
 {
     this.doctorsService       = doctorsService;
     this.townsService         = townsService;
     this.patientsService      = patientsService;
     this.consultationsService = consultationsService;
     this.specialtiesService   = specialtiesService;
 }
 public EventsService(
     IDeletableEntityRepository <CalendarEvent> eventsRepository,
     IDeletableEntityRepository <Consultation> consultationsRepository,
     IDoctorsService doctorsService,
     IPatientsService patientsService,
     IEmailsService emailsService)
 {
     this.eventsRepository        = eventsRepository;
     this.consultationsRepository = consultationsRepository;
     this.doctorsService          = doctorsService;
     this.patientsService         = patientsService;
     this.emailsService           = emailsService;
 }
Example #15
0
 public ConsultationsService(
     IDeletableEntityRepository <Doctor> doctorRepository,
     IDeletableEntityRepository <Consultation> consultationsRepository,
     IDeletableEntityRepository <Patient> patientsRepository,
     IEmailsService emailsService,
     IDoctorsService doctorsService,
     IPatientsService patientsService)
 {
     this.doctorRepository        = doctorRepository;
     this.consultationsRepository = consultationsRepository;
     this.patientsRepository      = patientsRepository;
     this.emailsService           = emailsService;
     this.doctorsService          = doctorsService;
     this.patientsService         = patientsService;
 }
 public RegisterPatient(
     UserManager <ApplicationUser> userManager,
     SignInManager <ApplicationUser> signInManager,
     ILogger <RegisterPatient> logger,
     IUsersService usersService,
     ITownsService townsService,
     IPatientsService patientsService,
     IConfiguration configuration,
     Services.Messaging.IEmailSender emailSender)
 {
     this.userManager     = userManager;
     this.signInManager   = signInManager;
     this.logger          = logger;
     this.usersService    = usersService;
     this.townsService    = townsService;
     this.patientsService = patientsService;
     this.configuration   = configuration;
     this.emailSender     = emailSender;
 }
        public BaseTestClass()
        {
            var options = new DbContextOptionsBuilder <ApplicationDbContext>()
                          .UseInMemoryDatabase(Guid.NewGuid().ToString());

            this.EventsRepository        = new EfDeletableEntityRepository <CalendarEvent>(new ApplicationDbContext(options.Options));
            this.ConsultationsRepository = new EfDeletableEntityRepository <Consultation>(new ApplicationDbContext(options.Options));
            this.DoctorsRepository       = new EfDeletableEntityRepository <Doctor>(new ApplicationDbContext(options.Options));
            this.UsersRepository         = new EfDeletableEntityRepository <ApplicationUser>(new ApplicationDbContext(options.Options));
            this.PatientsRepository      = new EfDeletableEntityRepository <Patient>(new ApplicationDbContext(options.Options));
            this.PrescribtionsRepository = new EfDeletableEntityRepository <Prescription>(new ApplicationDbContext(options.Options));

            this.EmailSender   = new SendGridEmailSender("test");
            this.EmailsService = new EmailsService(this.EmailSender);

            this.DoctorsService = new DoctorsService(
                this.DoctorsRepository,
                this.UsersRepository,
                this.EmailsService,
                this.PatientsRepository);

            this.PatientsService = new PatientsService(this.PatientsRepository);

            this.ConsultationsService = new ConsultationsService(
                this.DoctorsRepository,
                this.ConsultationsRepository,
                this.PatientsRepository,
                this.EmailsService,
                this.DoctorsService,
                this.PatientsService);

            this.EventsService = new EventsService(
                this.EventsRepository,
                this.ConsultationsRepository,
                this.DoctorsService,
                this.PatientsService,
                this.EmailsService);

            this.PrescriptionsService = new PrescriptionsService(this.PrescribtionsRepository);
        }
        public PatientsServiceTests()
        {
            this.list        = new List <Patient>();
            this.listOfUsers = new List <ApplicationUser>();

            var mockRepo       = new Mock <IDeletableEntityRepository <Patient> >();
            var mockRepoOfUser = new Mock <IDeletableEntityRepository <ApplicationUser> >();

            mockRepo.Setup(x => x.All()).Returns(this.list.AsQueryable());
            mockRepo.Setup(x => x.AllAsNoTracking()).Returns(this.list.AsQueryable());
            mockRepo.Setup(x => x.AddAsync(It.IsAny <Patient>())).Callback((Patient patient) => this.list.Add(patient));

            mockRepoOfUser.Setup(x => x.All()).Returns(this.listOfUsers.AsQueryable());
            mockRepoOfUser.Setup(x => x.AddAsync(It.IsAny <ApplicationUser>())).Callback((ApplicationUser user) => this.listOfUsers.Add(user));

            AutoMapperConfig.RegisterMappings(
                typeof(PatientViewModel).GetTypeInfo().Assembly);

            var service = new PatientsService(mockRepo.Object);

            this.patientsService = service;
        }
 public PatientsController(IPatientsService patientsService)
 {
     this.patientsService = patientsService;
 }
Example #20
0
 public EditModel(IPatientsService patientsService)
 {
     this.patientsService = patientsService;
 }
Example #21
0
 public AddModel(IPatientsService patientsService)
 {
     this.patientsService = patientsService;
 }
Example #22
0
 public DetailsModel(IPatientsService patientsService)
 {
     this.patientsService = patientsService;
 }
Example #23
0
 public PatientsController(IPatientsService patientsService, IEpisodesService episodesService)
 {
     this.patientsService = patientsService;
     this.episodesService = episodesService;
 }
Example #24
0
 public PatientsController(IPatientRepository r, IPatientsService serv, IVaccinationRepository rep)
 {
     repo     = r;
     _service = serv;
     _rep     = rep;
 }
Example #25
0
 public IndexModel(IPatientsService patientsService)
 {
     this.patientsService = patientsService;
 }
Example #26
0
        public EditForm(bool newPatient = true)
        {
            _patientsService      = Program.ServiceProvider.GetService <IPatientsService>();
            _diaryRecordsService  = Program.ServiceProvider.GetService <IDiaryRecordsService>();
            _paymentsService      = Program.ServiceProvider.GetService <IPaymentsService>();
            _dentalRecordsService = Program.ServiceProvider.GetService <IDentalRecordsService>();
            _patientTeethService  = Program.ServiceProvider.GetService <IPatientTeethService>();

            _patientPicturesManager = new PatientPicturesManager();

            InitializeComponent();

            storageComboBox.Items.AddRange(_storages);

            if (newPatient)
            {
                _payments      = new List <Payment>();
                _dentalRecords = new List <DentalRecord>();
                _diary         = new List <DiaryRecord>();
                _patientTeeth  = _patientTeethService.CreateNewPatientTeethAsync().Result;

                #region Set buttons tooltips

                string healthyToothStatusDescription = ToothStatus.Healthy.GetDescription();

                toothStatusToolTip.SetToolTip(button_11, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_12, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_13, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_14, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_15, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_16, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_17, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_18, healthyToothStatusDescription);

                toothStatusToolTip.SetToolTip(button_21, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_22, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_23, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_24, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_25, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_26, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_27, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_28, healthyToothStatusDescription);

                toothStatusToolTip.SetToolTip(button_31, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_32, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_33, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_34, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_35, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_36, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_37, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_38, healthyToothStatusDescription);

                toothStatusToolTip.SetToolTip(button_41, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_42, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_43, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_44, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_45, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_46, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_47, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_48, healthyToothStatusDescription);

                toothStatusToolTip.SetToolTip(button_51, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_52, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_53, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_54, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_55, healthyToothStatusDescription);

                toothStatusToolTip.SetToolTip(button_61, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_62, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_63, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_64, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_65, healthyToothStatusDescription);

                toothStatusToolTip.SetToolTip(button_71, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_72, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_73, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_74, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_75, healthyToothStatusDescription);

                toothStatusToolTip.SetToolTip(button_81, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_82, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_83, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_84, healthyToothStatusDescription);
                toothStatusToolTip.SetToolTip(button_85, healthyToothStatusDescription);

                #endregion Set buttons tooltips

                storageComboBox.SelectedIndex = 0;
                totalImgCountLabel.Text       = $"Всего снимков: {_patientPicturesManager.DisplayedPatientPicturesCount}";
                dateOfBirthPicker.Value       = dateOfBirthPicker.MinDate;

                RefreshDisplayedPatientPicture();
                RefreshAge();
            }
        }