예제 #1
0
        /* YRCA*/
        public List <reporteProductividadRom> GenerarReporteROM(ReporteRequest request)
        {
            List <reporteProductividadRom> result = new List <reporteProductividadRom>();
            var objCommand = GetSqlCommand("pNLS_ConsultaProductividadROM");

            InputParameterAdd.DateTime(objCommand, "fechasinicio", request.FechaInicio);
            InputParameterAdd.DateTime(objCommand, "Fechafin", request.FechaFin);
            InputParameterAdd.Int(objCommand, "idusuario", request.IdUsuario);//analista
            DataTable dataTable = Execute(objCommand);

            foreach (DataRow row in dataTable.Rows)
            {
                reporteProductividadRom item = new reporteProductividadRom
                {
                    codigoMuestra = Converter.GetString(row, "CodMuestra"),
                    Muestra       = Converter.GetString(row, "Muestra"),
                    Paciente      = Converter.GetString(row, "Paciente"),
                    codigoOrden   = Converter.GetString(row, "codigoOrden"),
                    nombreEstablecimientoOrigen = Converter.GetString(row, "EstablecimientoOrigen"),
                    fechaSolicitud = Converter.GetString(row, "fechaSolicitud"),
                    fechaRegistro  = Converter.GetDateTime(row, "fechaRegistro"),
                    fechaRecepcion = Converter.GetString(row, "fechaRecepcion"),
                    Enfermedad     = Converter.GetString(row, "Enfermedad"),
                    //nombreDestino = Converter.GetString(row, "EstablecimientoDestino"),
                    nombreExamen = Converter.GetString(row, "Examen")
                };
                result.Add(item);
            }
            return(result);
        }
예제 #2
0
        public List <ReporteResultadoInformado> GetCantidadResultadosInformados(ReporteRequest request)
        {
            List <ReporteResultadoInformado> result = new List <ReporteResultadoInformado>();
            var objCommand = GetSqlCommand("pNLS_GetCantidadResultadosInformados");

            InputParameterAdd.Int(objCommand, "tipoReporte", request.TipoReporte);
            InputParameterAdd.Varchar(objCommand, "nombrefiltro", request.NombreFiltro);
            InputParameterAdd.Varchar(objCommand, "idjurisdiccion", request.IdJurisdiccion);
            InputParameterAdd.DateTime(objCommand, "fechaDesde", request.FechaInicio);
            InputParameterAdd.DateTime(objCommand, "fechaHasta", request.FechaFin);
            InputParameterAdd.Int(objCommand, "idEnfermedad", request.IdEnfermedad);
            InputParameterAdd.Varchar(objCommand, "idExamen", request.IdExamen);
            DataTable dataTable = Execute(objCommand);

            foreach (DataRow item in dataTable.Rows)
            {
                ReporteResultadoInformado rpt = new ReporteResultadoInformado
                {
                    Examen              = Converter.GetString(item, "nombre"),
                    Paciente            = Converter.GetString(item, "Paciente"),
                    CantidadExamen      = Converter.GetInt(item, "CantidadExamen"),
                    CantidadExamenTotal = Converter.GetInt(item, "CantidadExamenTotal"),
                    CantidadPaciente    = Converter.GetInt(item, "CantidadPacienteTotal")
                };
                result.Add(rpt);
            }
            return(result);
        }
예제 #3
0
        //JRCR - 2doProducto
        public List <ReportePorcentajeResponse> GenerarReportePorcentaje(ReporteRequest request, Enums.TipoReporte tipoReporte)
        {
            List <ReportePorcentajeResponse> result = new List <ReportePorcentajeResponse>();
            ReporteDal dal = new ReporteDal();

            result = dal.GenerarReportePorcentaje(request, tipoReporte);
            return(result);
        }
예제 #4
0
        public List <ReporteResultadoInformado> GetCantidadResultadosInformados(ReporteRequest request)
        {
            List <ReporteResultadoInformado> result = new List <ReporteResultadoInformado>();
            ReporteDal dal = new ReporteDal();

            result = dal.GetCantidadResultadosInformados(request);

            return(result);
        }
예제 #5
0
        public List <ReportePieResponse> GenerarReporteMuestrasCorregidas(ReporteRequest request, Enums.TipoReporte tipoReporte)
        {
            List <ReportePieResponse> result = new List <ReportePieResponse>();
            ReporteDal dal = new ReporteDal();

            result = dal.GenerarReporteMuestrasCorregidas(request, tipoReporte);

            return(result);
        }
예제 #6
0
        /*yrca */

        public List <reporteProductividadRom> GenerarReporteROM(ReporteRequest request)
        {
            List <reporteProductividadRom> result = new List <reporteProductividadRom>();
            ReporteDal dal = new ReporteDal();

            result = dal.GenerarReporteROM(request);

            return(result);
        }
예제 #7
0
        //JRCR - 2doProducto
        public List <MotivoRechazoDatos> GenerarReporteRadar(ReporteRequest request, Enums.TipoReporte tipoReporte)
        {
            List <MotivoRechazoDatos> result = new List <MotivoRechazoDatos>();
            string spName = string.Empty;

            switch (tipoReporte)
            {
            case Enums.TipoReporte.MotivoRechazoROM:
                spName = "pNLS_ReporteMotivoRechazoROM";
                break;

            case Enums.TipoReporte.MotivoRechazoLaboratorio:
                spName = "pNLS_ReporteMotivoRechazoLaboratorio";
                break;
            }

            var objCommand = GetSqlCommand(spName);

            InputParameterAdd.Varchar(objCommand, "nombrefiltro", request.NombreFiltro);
            InputParameterAdd.Varchar(objCommand, "idjurisdiccion", request.IdJurisdiccion);
            InputParameterAdd.DateTime(objCommand, "fechainicio", request.FechaInicio);
            InputParameterAdd.DateTime(objCommand, "fechafin", request.FechaFin);
            InputParameterAdd.Int(objCommand, "enfermedad", request.IdEnfermedad);
            DataTable dataTable = Execute(objCommand);

            foreach (DataRow row in dataTable.Rows)
            {
                //ReporteRadarDatos item = new ReporteRadarDatos
                //{
                //    CriterioRechazo = Converter.GetString(row, "MotivoRechazo"),
                //    Establecimiento = Converter.GetString(row, "Establecimiento"),
                //    CantidadMuestras = Converter.GetInt(row, "CantidadMuestras")
                //};
                result.Add(new MotivoRechazoDatos
                {
                    EstablecimientoId       = Converter.GetInt(row, "idEstablecimiento"),
                    Establecimiento         = Converter.GetString(row, "Establecimiento"),
                    IdCriterioRechazo       = Converter.GetInt(row, "idCriterioRechazo"),
                    IdEnfermedad            = Converter.GetInt(row, "idEnfermedad"),
                    Enfermedad              = Converter.GetString(row, "Enfermedad"),
                    IdOrden                 = Converter.GetInt(row, "idOrden"),
                    CodigoOrden             = Converter.GetString(row, "codigoOrden"),
                    IdOrdenExamen           = Converter.GetInt(row, "idOrdenExamen"),
                    IdOrdenMuestraRecepcion = Converter.GetInt(row, "idOrdenMuestraRecepcion"),
                    TipoCriterioRechazo     = Converter.GetInt(row, "Tipo"),
                    CriterioRechazo         = Converter.GetString(row, "MotivoRechazo"),
                    CantidadMuestras        = Converter.GetInt(row, "CantidadMuestras"),
                    IdUsuarioRegistro       = Converter.GetInt(row, "idUsuarioRegistro")
                });
            }

            return(result);
        }
예제 #8
0
        public List <ConsultaReporteResultado> GetCantidadResultadosConsultados(ReporteRequest request)
        {
            List <ConsultaReporteResultado> result = new List <ConsultaReporteResultado>();
            var objCommand = GetSqlCommand("pNLS_ConsultaCantidadResultadosConsultados");

            InputParameterAdd.Int(objCommand, "tipoReporte", request.TipoReporte);
            InputParameterAdd.Varchar(objCommand, "nombrefiltro", request.NombreFiltro);
            InputParameterAdd.Varchar(objCommand, "idjurisdiccion", request.IdJurisdiccion);
            InputParameterAdd.DateTime(objCommand, "fechaDesde", request.FechaInicio);
            InputParameterAdd.DateTime(objCommand, "fechaHasta", request.FechaFin);
            InputParameterAdd.Int(objCommand, "idEnfermedad", request.IdEnfermedad);
            InputParameterAdd.Varchar(objCommand, "idExamen", request.IdExamen);
            DataTable dataTable = Execute(objCommand);

            if (request.TipoReporte == 1) //Reporte General
            {
                foreach (DataRow row in dataTable.Rows)
                {
                    ConsultaReporteResultado item = new ConsultaReporteResultado
                    {
                        Usuario          = Converter.GetString(row, "Usuario"),
                        CantidadConsulta = Converter.GetInt(row, "Cantidad"),
                        Establecimiento  = Converter.GetString(row, "EESS_Origen"),
                        Enfermedad       = Converter.GetString(row, "Enfermedad"),
                        Examen           = Converter.GetString(row, "Examen"),
                        totalResultado   = Converter.GetInt(row, "Total"),
                    };
                    result.Add(item);
                }
            }
            else //Reporte Detallado
            {
                foreach (DataRow row in dataTable.Rows)
                {
                    ConsultaReporteResultado item = new ConsultaReporteResultado
                    {
                        Usuario           = Converter.GetString(row, "Usuario"),
                        Establecimiento   = Converter.GetString(row, "EESS_Origen"),
                        FechaVerificacion = Converter.GetDateTime(row, "fechaValidacion"),
                        FechaImpresion    = Converter.GetDateTime(row, "fechaImpresion"),
                        Enfermedad        = Converter.GetString(row, "Enfermedad"),
                        Examen            = Converter.GetString(row, "Examen"),
                        HorasRetraso      = Converter.GetInt(row, "Horas"),
                        NumeroInforme     = Converter.GetInt(row, "numeroInforme")
                    };

                    result.Add(item);
                }
            }

            return(result);
        }
예제 #9
0
        //JRCR - 2doProducto
        public List <ReporteResult> GenerarReporte(ReporteRequest request, Enums.TipoReporte tipoReporte)
        {
            string spName = string.Empty;

            switch (tipoReporte)
            {
            case Enums.TipoReporte.OportunidadObtencionMuestras:
                spName = "pNLS_ReporteOportunidadObtencionMuestras";
                break;

            case Enums.TipoReporte.OportunidadEnvioMuestras:
                spName = "pNLS_ReporteOportunidadEnvioMuestras";
                break;

            case Enums.TipoReporte.OportunidadAnalisisMuestras:
                spName = "pNLS_ReporteOportunidadAnalisisMuestras";
                break;
            }

            List <ReporteResult> result = new List <ReporteResult>();
            var objCommand = GetSqlCommand(spName);

            InputParameterAdd.Varchar(objCommand, "nombrefiltro", request.NombreFiltro);
            InputParameterAdd.Varchar(objCommand, "idjurisdiccion", request.IdJurisdiccion);
            InputParameterAdd.DateTime(objCommand, "fechainicio", request.FechaInicio);
            InputParameterAdd.DateTime(objCommand, "fechafin", request.FechaFin);
            InputParameterAdd.Int(objCommand, "enfermedad", request.IdEnfermedad);
            DataTable dataTable = Execute(objCommand);

            foreach (DataRow row in dataTable.Rows)
            {
                ReporteResult item = new ReporteResult
                {
                    NumeroDias = Converter.GetInt(row, "diferenciadias"),
                    EstablecimientoCodigoUnico = Converter.GetInt(row, "establecimientocodigounico"),
                    NumeroMuestras             = Converter.GetInt(row, "totalmuestras")
                };
                result.Add(item);
            }

            return(result);
        }
예제 #10
0
        public List <ReportePieResponse> GenerarReportePorcentajeMuestrasRechazadas(ReporteRequest request, Enums.TipoReporte tipoReporte)
        {
            List <ReportePieResponse> result = new List <ReportePieResponse>();
            string spName = string.Empty;

            switch (tipoReporte)
            {
            case Enums.TipoReporte.NroPorcentajeMuestrasRechazadasEnROM:
                spName = "pNLS_ReportePorcentajeMuestrasRechazadasROM";
                break;

            case Enums.TipoReporte.NroPorcentajeResultadosRechazadosPorVerificador:
                spName = "pNLS_ReporteNroPorcentajeResultadosRechazadosPorVerificador";
                break;
            }

            var objCommand = GetSqlCommand(spName);

            InputParameterAdd.Varchar(objCommand, "nombrefiltro", request.NombreFiltro);
            InputParameterAdd.Varchar(objCommand, "idjurisdiccion", request.IdJurisdiccion);
            InputParameterAdd.DateTime(objCommand, "fechainicio", request.FechaInicio);
            InputParameterAdd.DateTime(objCommand, "fechafin", request.FechaFin);
            InputParameterAdd.Int(objCommand, "enfermedad", request.IdEnfermedad);
            InputParameterAdd.Varchar(objCommand, "examen", request.IdExamen);
            InputParameterAdd.Int(objCommand, "usuario", request.IdUsuario);//analista
            DataTable dataTable = Execute(objCommand);

            foreach (DataRow row in dataTable.Rows)
            {
                ReportePieResponse item = new ReportePieResponse
                {
                    Indicador = Converter.GetString(row, "Indicador"),
                    ValorIndicadorPorcentaje = Converter.GetDecimal(row, "ValorDecimal"),
                    ValorIndicadorNumero     = Converter.GetInt(row, "ValorIndicador")
                };

                result.Add(item);
            }

            return(result);
        }
예제 #11
0
        //JRCR - 2doProducto
        public List <ReportePorcentajeResponse> GenerarReportePorcentaje(ReporteRequest request, Enums.TipoReporte tipoReporte)
        {
            string spName = string.Empty;

            switch (tipoReporte)
            {
            case Enums.TipoReporte.PorcentajeResultadosEmitidos:
                spName = "pNLS_ReportePorcentajeResultadosEmitidos";
                break;
            }

            List <ReportePorcentajeResponse> result = new List <ReportePorcentajeResponse>();
            var objCommand = GetSqlCommand(spName);

            InputParameterAdd.Varchar(objCommand, "nombrefiltro", request.NombreFiltro);
            InputParameterAdd.Varchar(objCommand, "idjurisdiccion", request.IdJurisdiccion);
            InputParameterAdd.DateTime(objCommand, "fechainicio", request.FechaInicio);
            InputParameterAdd.DateTime(objCommand, "fechafin", request.FechaFin);
            InputParameterAdd.Int(objCommand, "enfermedad", request.IdEnfermedad);
            DataTable dataTable = Execute(objCommand);

            foreach (DataRow row in dataTable.Rows)
            {
                ReportePorcentajeResponse item = new ReportePorcentajeResponse
                {
                    Establecimiento = Converter.GetString(row, "Establecimiento"),
                    TotalRV         = Converter.GetDecimal(row, "TotalRV"),
                    TotalMuestras   = Converter.GetDecimal(row, "TotalMuestras"),
                    Porcentaje      = Converter.GetDecimal(row, "Porcentaje")
                };

                result.Add(item);
            }

            return(result);
        }
예제 #12
0
        public List <ConsultaReporteResultado> GetCantidadResultadosConsultadosPorSolicitante(ReporteRequest request)
        {
            List <ConsultaReporteResultado> result = new List <ConsultaReporteResultado>();
            ReporteDal dal = new ReporteDal();

            result = dal.GetCantidadResultadosConsultadosPorSolicitante(request);

            return(result);
        }
예제 #13
0
        public List <MotivoRechazoDatos> GenerarReporteRadar(ReporteRequest request, Enums.TipoReporte tipoReporte)
        {
            ReporteDal dal = new ReporteDal();

            return(dal.GenerarReporteRadar(request, tipoReporte));
        }