Ejemplo n.º 1
0
 public MedicalReportCommandHandler(IMedicalRecordRepository medicalRecordRepository, IMediatorHandler bus,
                                    INotificationHandler <DomainNotification> domainNotifications) : base(medicalRecordRepository, bus,
                                                                                                          domainNotifications)
 {
     _bus = bus;
     _medicalRecordRepository = medicalRecordRepository;
 }
 public AppointmentRepository(IUserRepository userRepository, IMedicalRecordRepository medicalRecordRepository,
                              IRoomRepository roomRepository, Stream <Appointment> stream) : base(stream, "Appointment")
 {
     this.doctorRepository        = userRepository;
     this.medicalRecordRepository = medicalRecordRepository;
     this.roomRepository          = roomRepository;
 }
Ejemplo n.º 3
0
 protected CommandHandler(IMedicalRecordRepository medicalRecordRepository, IMediatorHandler bus,
                          INotificationHandler <DomainNotification> domainNotifications)
 {
     _medicalRecordRepository = medicalRecordRepository;
     _bus = bus;
     _domainNotifications = (DomainNotificationHandler)domainNotifications;
 }
Ejemplo n.º 4
0
 public MedicalRecordService(
     IMedicalRecordRepository medicalRecordRepository,
     IMapper mapper)
 {
     _medicalRecordRepository = medicalRecordRepository;
     _mapper = mapper;
 }
Ejemplo n.º 5
0
 public TherapyRepository(ICSVStream <Therapy> stream, ISequencer <long> sequencer, IEagerCSVRepository <MedicalRecord, long> medicalRecordEagerRepository, IMedicalRecordRepository medicalRecordRepository, IEagerCSVRepository <Prescription, long> prescriptionEagerCSVRepository, IDiagnosisRepository diagnosisCSVRepository) : base(ENTITY_NAME, stream, sequencer, new LongIdGeneratorStrategy <Therapy>())
 {
     _prescriptionEagerCSVRepository  = prescriptionEagerCSVRepository;
     _medicalRecordEagerCSVRepository = medicalRecordEagerRepository;
     _medicalRecordRepository         = medicalRecordRepository;
     _diagnosisCSVRepository          = diagnosisCSVRepository;
 }
Ejemplo n.º 6
0
 public MedicalRecordAppService(IMediatorHandler bus, IMapper mapper,
                                IMedicalRecordRepository medicalRecordRepository)
 {
     _bus    = bus;
     _mapper = mapper;
     _medicalRecordRepository = medicalRecordRepository;
 }
 public ExaminationSurgeryRepository(TreatmentRepository treatmentRepository,
                                     MedicalRecordRepository.MedicalRecordRepository medicalRecordRepository,
                                     UserRepository.UserRepository doctorRepository, Stream <ExaminationSurgery> stream) : base(stream, "Examination")
 {
     this.treatmentRepository     = treatmentRepository;
     this.medicalRecordRepository = medicalRecordRepository;
     this.doctorRepository        = doctorRepository;
 }
Ejemplo n.º 8
0
 public MedicalRecordService(IMedicalRecordRepository medicalRecordRepository,
                             ICodeTablesRepository codeTablesRepository,
                             IConfiguration configuration
                             )
 {
     _medicalRecordRepository = medicalRecordRepository;
     _codeTablesRepository    = codeTablesRepository;
     _configuration           = configuration;
 }
 public PdfCreatorController(IMedicalRecordService mRecordService,
                             IMedicalRecordRepository mRecordRepository,
                             IWebHostEnvironment env,
                             IViewRenderService renderService)
 {
     _mRecordService    = mRecordService;
     _renderService     = renderService;
     _mRecordRepository = mRecordRepository;
     _env = env;
 }
Ejemplo n.º 10
0
 public PatientInfoService(
     IPatientAdmissionRepository patientAdmissionRepository,
     IEprService eprService,
     IMedicalRecordRepository medicalRecordRepository,
     ICodeTablesRepository codeTablesRepository,
     IMedicalRecordService medicalRecordService)
 {
     _patientAdmissionRepository = patientAdmissionRepository;
     _eprService = eprService;
     _medicalRecordRepository = medicalRecordRepository;
     _codeTablesRepository    = codeTablesRepository;
     _medicalRecordService    = medicalRecordService;
 }
Ejemplo n.º 11
0
 public MedicalRecordBusiness(IMapper mapper,
                              IMedicalRecordRepository medicalRecordRepository,
                              IPatientRepository patientRepository,
                              IMedicalRecordStatusRepository medicalRecordStatusRepository,
                              IDiseaseRepository diseaseRepository,
                              ITreatmentDiseaseRepository treatmentDiseaseRepository)
 {
     _mapper = mapper;
     _medicalRecordRepository       = medicalRecordRepository;
     _patientRepository             = patientRepository;
     _medicalRecordStatusRepository = medicalRecordStatusRepository;
     _diseaseRepository             = diseaseRepository;
     _treatmentDiseaseRepository    = treatmentDiseaseRepository;
 }
Ejemplo n.º 12
0
 public TreatmentBusiness(IMapper mapper,
                          ITreatmentRepository treatmentRepository,
                          IEmployeeRepository employeeRepository,
                          IPatientRepository patientRepository,
                          IMedicalRecordRepository medicalRecordRepository,
                          ITreatmentDiseaseRepository treatmentDiseaseRepository,
                          IDiseaseRepository diseaseRepository)
 {
     _mapper = mapper;
     _treatmentRepository        = treatmentRepository;
     _employeeRepository         = employeeRepository;
     _patientRepository          = patientRepository;
     _medicalRecordRepository    = medicalRecordRepository;
     _treatmentDiseaseRepository = treatmentDiseaseRepository;
     _diseaseRepository          = diseaseRepository;
 }
Ejemplo n.º 13
0
 public UnitOfWork(
     DataContext context,
     IPatientRepository patientRepository,
     ITechnicianRepository technicianRepository,
     IPhysicianRepository physicianRepository,
     IMedicalRecordRepository medicalRecordRepository,
     IMedicalRegistryRepository medicalRegistryRepository,
     IHealthCareProviderRepository healthCareProviderRepository
     )
 {
     _context = context;
     this.PatientRepository            = patientRepository;
     this.PhysicianRepository          = physicianRepository;
     this.TechnicianRepository         = technicianRepository;
     this.MedicalRecordRepository      = medicalRecordRepository;
     this.MedicalRegistryRepository    = medicalRegistryRepository;
     this.HealthCareProviderRepository = healthCareProviderRepository;
 }
Ejemplo n.º 14
0
 public MedicalRecordService(IMedicalRecordRepository medicalRecordRepository, IUnitOfWork unitOfWork)
 {
     this._medicalRecordRepository = medicalRecordRepository;
     _unitOfWork = unitOfWork;
 }
Ejemplo n.º 15
0
 public DashBoardController(IClientRepository clientRepository, IMedicalRecordRepository medicalRecordRepository)
 {
     this.clientRepository        = clientRepository;
     this.medicalRecordRepository = medicalRecordRepository;
 }
Ejemplo n.º 16
0
 public MedicalRecordService(IMedicalRecordRepository medicalRecordRepository, IMedicalProfileRepository medicalProfileRepository, IUnitOfWork unitOfWork)
 {
     _medicalRecordRepository  = medicalRecordRepository;
     _medicalProfileRepository = medicalProfileRepository;
     _unitOfWork = unitOfWork;
 }
Ejemplo n.º 17
0
 public MedicalRecordsController()
 {
     this.medicalRepository = new MedicalRecordRepository(new GymContext());
     this.clientRepository  = new ClientRepository(new GymContext());
 }
 public NotificationService(INotificationRepository notificationRepository, IUserRepository userRepository, IMedicalRecordRepository medicalRecordRepository)
 {
     this.notificationRepository  = notificationRepository;
     this.userRepository          = userRepository;
     this.medicalRecordRepository = medicalRecordRepository;
 }
 public BedRepository(IRoomRepository roomRepository, IMedicalRecordRepository medicalRecordRepository, Stream <Bed> stream) : base(stream, "Bed")
 {
     this.roomRepository          = roomRepository;
     this.medicalRecordRepository = medicalRecordRepository;
 }
Ejemplo n.º 20
0
 public MedicalRecordsController(IMedicalRecordRepository medicalRepository, IClientRepository clientRepository)
 {
     this.medicalRepository = medicalRepository;
     this.clientRepository  = clientRepository;
 }
Ejemplo n.º 21
0
 public MedicalRecordService(IMedicalRecordRepository medicalRecordRepository, IUserGateway userGateway)
 {
     _medicalRecordRepository = medicalRecordRepository;
     _userGateway             = userGateway;
 }
Ejemplo n.º 22
0
 public MedicalRecordService(IMedicalRecordRepository medicalRecordRepository, IEmailVerificationService emailVerificationService)
 {
     this.medicalRecordRepository  = medicalRecordRepository;
     this.emailVerificationService = emailVerificationService;
 }
Ejemplo n.º 23
0
        public void Init()
        {
            #region Dummy Lists
            var passwordSalt1 = PasswordUtilities.CreateSalt(16);
            var password1     = PasswordUtilities.GenerateSHA256Hash("12345", passwordSalt1);

            clients = new List <Client>
            {
                new Client {
                    ClientID = 1, FirstName = "John", LastName = "Doe", DocType = "DNI", DocNumber = 34578800, BirthDate = new DateTime(1990, 12, 31),
                    DateFrom = new DateTime(2008, 09, 01), Email = "*****@*****.**",
                    Password = password1, PasswordSalt = passwordSalt1, Role = Catalog.Roles.Client, Sexo = Catalog.Genre.Hombre
                },

                new Client {
                    ClientID = 2, FirstName = "Cristian", LastName = "Piqué", DocType = "DNI", DocNumber = 34578644, BirthDate = new DateTime(1989, 12, 31),
                    DateFrom = new DateTime(2008, 09, 01), Email = "*****@*****.**",
                    Password = password1, PasswordSalt = passwordSalt1, Role = Catalog.Roles.Admin, Sexo = Catalog.Genre.Hombre
                },

                new Client {
                    ClientID = 3, FirstName = "José", LastName = "Pérez", DocType = "DNI", DocNumber = 34578644, BirthDate = new DateTime(1982, 12, 31),
                    DateFrom = new DateTime(2014, 09, 01), Email = "*****@*****.**",
                    Password = password1, PasswordSalt = passwordSalt1, Role = Catalog.Roles.Instructor, Sexo = Catalog.Genre.Hombre
                },

                new Client {
                    ClientID = 4, FirstName = "Ray", LastName = "Allen", DocType = "DNI", DocNumber = 34578644, BirthDate = new DateTime(1992, 12, 31),
                    DateFrom = new DateTime(2014, 09, 01), Email = "*****@*****.**",
                    Password = password1, PasswordSalt = passwordSalt1, Role = Catalog.Roles.Client, Sexo = Catalog.Genre.Hombre
                },

                new Client {
                    ClientID = 5, FirstName = "Enzo", LastName = "Gutiérrez", DocType = "DNI", DocNumber = 34578644, BirthDate = new DateTime(1991, 12, 31),
                    DateFrom = new DateTime(2014, 09, 01), Email = "*****@*****.**",
                    Password = password1, PasswordSalt = passwordSalt1, Role = Catalog.Roles.Client, Sexo = Catalog.Genre.Hombre
                },

                new Client {
                    ClientID = 6, FirstName = "Juana", LastName = "Pérez", DocType = "DNI", DocNumber = 33123654, BirthDate = new DateTime(1979, 08, 11),
                    DateFrom = new DateTime(2015, 09, 01), Email = "*****@*****.**",
                    Password = password1, PasswordSalt = passwordSalt1, Role = Catalog.Roles.Client, Sexo = Catalog.Genre.Mujer
                },

                new Client {
                    ClientID = 7, FirstName = "Carolina", LastName = "García", DocType = "DNI", DocNumber = 12345678, BirthDate = new DateTime(1971, 11, 15),
                    DateFrom = new DateTime(2015, 09, 01), Email = "*****@*****.**",
                    Password = password1, PasswordSalt = passwordSalt1, Role = Catalog.Roles.Instructor, Sexo = Catalog.Genre.Mujer
                },

                new Client {
                    ClientID = 8, FirstName = "Martina", LastName = "Núñez", DocType = "DNI", DocNumber = 34578644, BirthDate = new DateTime(1981, 02, 01),
                    DateFrom = new DateTime(2015, 09, 01), Email = "*****@*****.**",
                    Password = password1, PasswordSalt = passwordSalt1, Role = Catalog.Roles.Client, Sexo = Catalog.Genre.Mujer
                },

                new Client {
                    ClientID = 9, FirstName = "Sol", LastName = "Rodríguez", DocType = "DNI", DocNumber = 34578644, BirthDate = new DateTime(1991, 12, 31),
                    DateFrom = new DateTime(2015, 09, 01), Email = "*****@*****.**",
                    Password = password1, PasswordSalt = passwordSalt1, Role = Catalog.Roles.Client, Sexo = Catalog.Genre.Mujer
                },

                new Client {
                    ClientID = 10, FirstName = "José", LastName = "García", DocType = "DNI", DocNumber = 34578644, BirthDate = new DateTime(1986, 12, 31),
                    DateFrom = new DateTime(2016, 09, 01), Email = "*****@*****.**",
                    Password = password1, PasswordSalt = passwordSalt1, Role = Catalog.Roles.Client, Sexo = Catalog.Genre.Hombre
                }
            };

            medicalRecords = new List <MedicalRecord>
            {
                new MedicalRecord {
                    ClientID = 1, Age = 26, Gender = 'M', Heigth = 1.81, Weight = 77
                },
                new MedicalRecord {
                    ClientID = 2, Age = 33, Gender = 'F', Heigth = 1.81, Weight = 75
                },
                new MedicalRecord {
                    ClientID = 3, Age = 28, Gender = 'F', Heigth = 1.81, Weight = 75
                },
                new MedicalRecord {
                    ClientID = 4, Age = 23, Gender = 'M', Heigth = 1.81, Weight = 79
                },
                new MedicalRecord {
                    ClientID = 5, Age = 26, Gender = 'M', Heigth = 1.81, Weight = 75
                },
                new MedicalRecord {
                    ClientID = 6, Age = 26, Gender = 'F', Heigth = 1.81, Weight = 75
                },
                new MedicalRecord {
                    ClientID = 7, Age = 25, Gender = 'M', Heigth = 1.81, Weight = 88
                },
                new MedicalRecord {
                    ClientID = 8, Age = 26, Gender = 'M', Heigth = 1.81, Weight = 75
                },
                new MedicalRecord {
                    ClientID = 10, Age = 18, Gender = 'M', Heigth = 1.81, Weight = 75
                },
                new MedicalRecord {
                    ClientID = 4, Age = 26, Gender = 'M', Heigth = 1.81, Weight = 75
                },
            };
            #endregion

            #region Repositories
            clientRepository        = Mock.Create <IClientRepository>();
            medicalRecordRepository = Mock.Create <IMedicalRecordRepository>();
            context  = Mock.Create <HttpContextBase>();
            request  = Mock.Create <HttpRequestBase>();
            response = Mock.Create <HttpResponseBase>();
            session  = Mock.Create <HttpSessionStateBase>();
            server   = Mock.Create <HttpServerUtilityBase>();
            #endregion

            #region Controller
            controller = new DashBoardController(clientRepository, medicalRecordRepository);
            #endregion

            #region Fake Context
            Mock.Arrange(() => clientRepository
                         .GetClientByID(CLIENT_ID_TO_USE))
            .Returns(clients.Where(c => c.ClientID == CLIENT_ID_TO_USE)
                     .FirstOrDefault());

            Mock.Arrange(() => context.Request).Returns(request);
            Mock.Arrange(() => context.Response).Returns(response);
            Mock.Arrange(() => context.Session).Returns(session);
            Mock.Arrange(() => context.Server).Returns(server);
            Mock.Arrange(() => session["UserData"]).Returns(clients.Where(c => c.ClientID == CLIENT_ID_TO_USE));
            #endregion

            #region JustMock
            #endregion
        }
Ejemplo n.º 24
0
 public MedicalRecordService(IMedicalRecordRepository medicalRecordRepository,
                             IUserService userService)
 {
     _medicalRecordRepository = medicalRecordRepository;
     _userService             = userService;
 }
 public MedicalRecordService(IMedicalRecordRepository medicalRecordRepository)
 {
     this.medicalRecordRepository = medicalRecordRepository;
 }
Ejemplo n.º 26
0
 public MedicalRecordController(IUnitOfWork unitOfWork) : base(unitOfWork)
 {
     this.repMedicalRecord = this.Rep as IMedicalRecordRepository;
 }
Ejemplo n.º 27
0
 public DiagnosisRepository(ICSVStream <Diagnosis> stream, ISequencer <long> sequencer, IEagerCSVRepository <Therapy, long> therapyEagerCSVRepository, IEagerCSVRepository <Disease, long> diseaseEagerCSVRepository, IMedicalRecordRepository medicalRecordRepository) : base(ENTITY_NAME, stream, sequencer, new LongIdGeneratorStrategy <Diagnosis>())
 {
     _therapyEagerCSVRepository = therapyEagerCSVRepository;
     _diseaseEagerCSVRepository = diseaseEagerCSVRepository;
     _medicalRecordRepository   = medicalRecordRepository;
 }