Esempio n. 1
0
 public VoluntarioBasicoController(IVoluntarioBasicoService voluntarioService, IPacienteService pacienteService, IVoluntarioMedicoService voluntarioMedico, IVoluntarioAsociacionService voluntarioAsociacion)
 {
     _pacienteService      = pacienteService;
     _voluntarioService    = voluntarioService;
     _voluntarioMedico     = voluntarioMedico;
     _voluntarioAsociacion = voluntarioAsociacion;
 }
 public ConsultaController(
     IConsultaService consultaService
     , IPacienteService pacienteService)
 {
     _consultaService = consultaService;
     _pacienteService = pacienteService;
 }
Esempio n. 3
0
 public LoginController(IPacienteService pacienteService, IVoluntarioBasicoService voluntarioBasicoService, IVoluntarioMedicoService voluntarioMedicoService, IVoluntarioAsociacionService voluntarioAsociacionService)
 {
     _pacienteService             = pacienteService;
     _voluntarioBasicoService     = voluntarioBasicoService;
     _voluntarioMedicoService     = voluntarioMedicoService;
     _voluntarioAsociacionService = voluntarioAsociacionService;
 }
Esempio n. 4
0
 public EventoService(DataContext context, IVoluntarioBasicoService voluntarioBasicoService, IVoluntarioMedicoService voluntarioMedicoService, IPacienteService pacienteService)
 {
     _context = context;
     _voluntarioBasicoService = voluntarioBasicoService;
     _voluntarioMedicoService = voluntarioMedicoService;
     _pacienteService         = pacienteService;
 }
Esempio n. 5
0
 public PessoaController(IPacienteService pacienteService,
                         IFuncionarioService funcionarioService,
                         IUsuarioService usuarioService)
 {
     this._pacienteService    = pacienteService;
     this._funcionarioService = funcionarioService;
     this._usuarioService     = usuarioService;
 }
Esempio n. 6
0
 public ConsultaController(IPacienteService pacienteService, IPrimeraVisitaService primeraVisitaService,
                           IConsultaService consultaService, ILog log)
 {
     _pacienteService      = pacienteService;
     _primeraVisitaService = primeraVisitaService;
     _consultaService      = consultaService;
     _log = log;
 }
Esempio n. 7
0
        /**Constructor para controlador que necesita flexibilidad en los contextos y uso de UnitOfWork*/
        public PacientesController(ApplicationDbContext db, ILogger <PacientesController> logger, IConfiguration configuration)
        {
            ApplicationDbContext _context = db;

            _service       = new PacienteService(new UnitOfWorkContainer(_context), new PacienteRepository(_context));
            _logger        = logger;
            _configuration = configuration ?? throw new ArgumentNullException(nameof(configuration));
        }
Esempio n. 8
0
 public SynchManager(IRestService service,
                     IMedicoService medicoService,
                     IPacienteService pacienteService)
 {
     _restService     = service;
     _medicoService   = medicoService;
     _pacienteService = pacienteService;
 }
Esempio n. 9
0
        public PacienteServiceTest()
        {
            var mock = new MockFactory();

            _pacienteRepositoryMock = mock.CreateMock <IPacienteRepository>();

            _pacienteService = new PacienteService(_pacienteRepositoryMock.MockObject);
        }
Esempio n. 10
0
 public PacientesController(IPacienteService pacienteService, IPaisService paisService, IEstadoService estadoService,
                            ICidadeService cidadeService)
 {
     _pacienteService = pacienteService;
     _paisService     = paisService;
     _estadoService   = estadoService;
     _cidadeService   = cidadeService;
 }
Esempio n. 11
0
 public ReporteService(DataContext context, IVoluntarioBasicoService voluntarioService, IVoluntarioMedicoService voluntarioMedicoService, IVoluntarioAsociacionService voluntarioAsociacionService, IPacienteService pacienteService, IEspecialidadService especialidadService)
 {
     _context                     = context;
     _voluntarioService           = voluntarioService;
     _voluntarioMedicoService     = voluntarioMedicoService;
     _voluntarioAsociacionService = voluntarioAsociacionService;
     _pacientenService            = pacienteService;
     _especialidadService         = especialidadService;
 }
Esempio n. 12
0
 public PacienteController(IPacienteService pacienteService,
                           ILogger <PacienteController> logger,
                           IOptions <ApiSettings> apiSettings)
 {
     _pacienteService = pacienteService;
     _logger          = logger;
     _apiSettings     = apiSettings;
     _unavailable     = _apiSettings.Value.UnavailableMessage;
 }
Esempio n. 13
0
 public RelatorioController(IProntuarioService service, IPacienteService servicePaciente, ICadastroService serviceCadastro, IUsuarioService serviceUsuario, IFuncionarioService serviceFuncionario, IRelatorioService serviceRelatorio) : base(serviceUsuario)
 {
     _service            = service;
     _servicePaciente    = servicePaciente;
     _serviceCadastro    = serviceCadastro;
     _serviceFuncionario = serviceFuncionario;
     _serviceRelatorio   = serviceRelatorio;
     _serviceUsuario     = serviceUsuario;
 }
Esempio n. 14
0
 public PacientesController(IPacienteRepository pacientesRepository,
                            IMapper mapper,
                            IPacienteService pacienteService,
                            INotificador notificador) : base(notificador)
 {
     _pacientesRepository = pacientesRepository;
     _mapper           = mapper;
     _pacientesService = pacienteService;
 }
Esempio n. 15
0
 public ConsultasController(
     IConsultaService consultaService,
     IMedicoService medicoService,
     IPacienteService pacienteService
     )
 {
     _consultaService = consultaService;
     _medicoService   = medicoService;
     _pacienteService = pacienteService;
 }
Esempio n. 16
0
 public NotificacaoIncidenteController(
     INotificacaoIncidenteService notificacaoIncidenteService,
     ISetorService setorService,
     IPacienteService pacienteService,
     IMapper mapper)
 {
     _notificacaoIncidenteService = notificacaoIncidenteService;
     _setorService    = setorService;
     _pacienteService = pacienteService;
     _mapper          = mapper;
 }
Esempio n. 17
0
        public Paciente LeerPorId(int id)
        {
            IPacienteService proxy = ServiceFactory.Get <IPacienteService>();

            try
            {
                return(proxy.Ver(id));
            }
            catch (FaultException fex)
            {
                throw new ApplicationException(fex.Message);
            }
        }
Esempio n. 18
0
        public void Eliminar(int id)
        {
            IPacienteService proxy = ServiceFactory.Get <IPacienteService>();

            try
            {
                proxy.Eliminar(id);
            }
            catch (FaultException fex)
            {
                throw new ApplicationException(fex.Message);
            }
        }
Esempio n. 19
0
        public void Actualizar(Paciente paciente)
        {
            IPacienteService proxy = ServiceFactory.Get <IPacienteService>();

            try
            {
                proxy.Editar(paciente);
            }
            catch (FaultException fex)
            {
                throw new ApplicationException(fex.Message);
            }
        }
Esempio n. 20
0
        public PacientePageViewModel(INavigationService navigationService,
                                     IPageDialogService pageDialogService,
                                     IDeviceService deviceService,
                                     IPacienteService pacienteService)
            : base(navigationService, pageDialogService, deviceService)
        {
            Title            = Resources.MainPageTitle;
            Pacientes        = new ObservableRangeCollection <Paciente>();
            _pacienteService = pacienteService;

            AddItemCommand            = new DelegateCommand(OnAddItemCommandExecuted);
            DeleteItemCommand         = new DelegateCommand <Paciente>(OnDeleteItemCommandExecuted);
            PacienteItemTappedCommand = new DelegateCommand <Paciente>(OnPacienteItemTappedCommandExecuted);
        }
Esempio n. 21
0
 public CitaController(
     ICitaService citaService,
     IMedicoService medicoService,
     ISalaService salaService,
     ITipoServicioService tipoServicioService,
     IPacienteService pacienteService)
 {
     _citaService         = citaService;
     _medicoService       = medicoService;
     _salaService         = salaService;
     _tipoServicioService = tipoServicioService;
     _pacienteService     = pacienteService;
     _horarios            = new List <SelectListItem>();
 }
Esempio n. 22
0
        public List <Paciente> ListarTodosDeCliente(int ClienteId)
        {
            List <Paciente>  result = default(List <Paciente>);
            IPacienteService proxy  = ServiceFactory.Get <IPacienteService>();

            try
            {
                result = proxy.ListarTodosDeCliente(ClienteId);
            }
            catch (FaultException fex)
            {
                throw new ApplicationException(fex.Message);
            }
            return(result);
        }
Esempio n. 23
0
        public Paciente Agregar(Paciente paciente)
        {
            Paciente         result = default(Paciente);
            IPacienteService proxy  = ServiceFactory.Get <IPacienteService>();

            try
            {
                result = proxy.Agregar(paciente);
            }
            catch (FaultException fex)
            {
                throw new ApplicationException(fex.Message);
            }

            return(result);
        }
Esempio n. 24
0
        public void Paciente_Get_All()
        {
            //Arrange
            // _mockRepository.Setup(x => x.GetAll()).Returns(listCountry);
            //  var _mock = new Mock<IGenericRepository<Paciente>>();
            var listado = FakeListadoPacientes();

            //_mockUnitWork.Setup(x=>x.Repository= )
            _ = _mockRepository.Setup(x => x.GetAll(null, null, null, null)).Returns(listado.ToList());
            //Act
            _service = new PacienteService(_mockUnitWork.Object, _mockRepository.Object);
            var results = _service.GetAll().ToList();

            //Assert
            Assert.Equal(listado, results);
            Assert.Equal(4, results.Count);
        }
Esempio n. 25
0
        public void GestionCitasController_GetPaciente_RetornaExcepcion()
        {
            /// Arrange

            pacienteService = new StubIPacienteService
            {
                GetPacienteByDocumentoInt32 = (documento) => { throw new ArgumentNullException(); }
            };

            controller = new GestionCitasController(citaService, pacienteService, tipoCitaService);

            /// Act
            Paciente result = controller.GetPaciente(123456);

            /// Assert
            Assert.IsInstanceOfType(result, typeof(ExceptionResult), "Se debe retornar una excepción");
        }
Esempio n. 26
0
        public void GestionCitasController_GetPaciente_RetornaPacienteOk()
        {
            /// Arrange

            Paciente paciente = new Paciente {
                Id = 1, Documento = 123456, Nombre = "Otro Nombre"
            };

            pacienteService = new StubIPacienteService
            {
                GetPacienteByDocumentoInt32 = (documento) => paciente
            };

            controller = new GestionCitasController(citaService, pacienteService, tipoCitaService);

            /// Act
            Paciente result = controller.GetPaciente(123456);

            /// Assert
            Assert.IsNotNull(result);
            Assert.AreEqual(result.Documento, 123456, "El documento del paciente debe ser 123456");
            Assert.AreEqual(result.Nombre, "Otro Nombre", "El nombre del paciente debe ser Otro Nombre");
        }
 public PacienteController(
     IPacienteService pacienteService
     )
 {
     _pacienteService = pacienteService;
 }
Esempio n. 28
0
 public PacienteController(ILogger <PacienteController> logger, IPacienteService pacienteService)
 {
     _logger = logger;
     this._pacienteService = pacienteService;
 }
 public PacientesController(IPacienteService _pacienteService)
 {
     this.pacienteService = _pacienteService;
 }
Esempio n. 30
0
 public PacienteController(IPacienteService PacienteService)
 {
     this.PacienteService = PacienteService;
 }
 public PacienteController()
 {
     _pacienteService = new PacienteService();
 }
Esempio n. 32
0
 public PacientesController(IPacienteService servico, ILogger logger)
     : base(logger)
 {
     this._servico = servico;
 }