示例#1
0
        public List <ReporteOportunidadRom> ReporteOportunidadLaboratorio(DateTime fechaDesde, DateTime fechaHasta, int idEstablecimiento)
        {
            List <ReporteOportunidadRom> reporte = new List <ReporteOportunidadRom>();
            var objCommand = GetSqlCommand("pNLS_ReporteOportunidadLaboratorio");

            InputParameterAdd.DateTime(objCommand, "fechaDesde", fechaDesde);
            InputParameterAdd.DateTime(objCommand, "fechaHasta", fechaHasta);
            InputParameterAdd.Int(objCommand, "idEstablecimiento", idEstablecimiento);
            DataTable DetalleOportunidad = Execute(objCommand);

            foreach (DataRow row in DetalleOportunidad.Rows)
            {
                ReporteOportunidadRom item = new ReporteOportunidadRom
                {
                    Laboratorio       = Converter.GetString(row, "laboratorio"),
                    codificacion      = Converter.GetString(row, "codificacion"),
                    fechaRecepcionP   = Converter.GetString(row, "fechaRecepcionP"),
                    fechaEnvio        = Converter.GetString(row, "fechaValidado"),
                    DiasTranscurridos = Converter.GetInt(row, "DiasTranscurridos"),
                    Oportunidad       = Converter.GetString(row, "Porcentaje"),
                    totalEnvios       = Converter.GetInt(row, "totalEnvios"),
                    totalOportunos    = Converter.GetInt(row, "Oportunos")
                };
                reporte.Add(item);
            }
            return(reporte);
        }
示例#2
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);
        }
示例#3
0
        public List <CCSeguimientoCab> GetSeguimientos(DateTime FechaInicio, DateTime FechaFin, int IdEstablecimiento, int idEnfermedad, Guid idExamen)
        {
            var objCommand = GetSqlCommand("pNLS_GCCSeguimiento");

            InputParameterAdd.DateTime(objCommand, "fechainicio", FechaInicio);
            InputParameterAdd.DateTime(objCommand, "fechafin", FechaFin);
            InputParameterAdd.Int(objCommand, "IdEstablecimiento", IdEstablecimiento);
            InputParameterAdd.Int(objCommand, "idEnfermedad", idEnfermedad);
            InputParameterAdd.Guid(objCommand, "idExamen", idExamen);

            return(Execute(objCommand).AsEnumerable().Select(dr => new CCSeguimientoCab()
            {
                idseguimiento = Converter.GetInt(dr, "idseguimiento"),
                idEstablecimiento = Converter.GetInt(dr, "idEstablecimiento"),
                idEnfermedad = Converter.GetInt(dr, "idEstablecimiento"),
                idExamen = Converter.GetGuid(dr, "idExamen"),
                NombreEstablecimiento = Converter.GetString(dr, "NombreEstablecimiento"),
                NombreEnfermedad = Converter.GetString(dr, "NombreEnfermedad"),
                NombreExamen = Converter.GetString(dr, "NombreExamen"),
                ejecutadx = Converter.GetInt(dr, "ejecutadx"),
                ejecutacc = Converter.GetInt(dr, "ejecutacc"),
                cumpliocc = Converter.GetInt(dr, "cumpliocc"),
                NombreUsuario = Converter.GetString(dr, "UsuarioRegistro"),
                mca_inh = Converter.GetInt(dr, "mca_inh"),
                idusuarioregistro = Converter.GetInt(dr, "idusuarioregistro"),
                idusuarioedicion = Converter.GetInt(dr, "idusuarioedicion"),
                fecharegistro = Converter.GetDateTime(dr, "fecharegistro"),
                fechaedicion = Converter.GetDateTime(dr, "fechaedicion")
            }).ToList());
        }
示例#4
0
        public List <Model.ViewData.OportunidadResultado> GetOportunidadResultadoCovid(string tipoIdicador, DateTime fechaDesde, DateTime fechaHasta, int idExamenAgrupado, int idLaboratorio)
        {
            var objCommand = GetSqlCommand("pNLS_OportunidadResultadoCovid19");

            InputParameterAdd.DateTime(objCommand, "fechaini", fechaDesde);
            InputParameterAdd.DateTime(objCommand, "fechafin", fechaHasta);
            InputParameterAdd.Int(objCommand, "idExamenAgrupado", idExamenAgrupado);
            DataTable dataTable = Execute(objCommand);
            List <Model.ViewData.OportunidadResultado> OportunidadResultadoList = new List <Model.ViewData.OportunidadResultado>();

            foreach (DataRow row in dataTable.Rows)
            {
                Model.ViewData.OportunidadResultado OportunidadResultado = new Model.ViewData.OportunidadResultado
                {
                    total           = Converter.GetInt(row, "total"),
                    anio            = Converter.GetInt(row, "anio"),
                    mes             = Converter.GetString(row, "mes"),
                    nroOportuno     = Converter.GetInt(row, "nroOportuno"),
                    porcOportunidad = Converter.GetString(row, "porcOportunidad"),
                    tiempoCatalogo  = Converter.GetInt(row, "tiempoCatalogo")
                };
                OportunidadResultadoList.Add(OportunidadResultado);
            }
            return(OportunidadResultadoList);
        }
示例#5
0
        public List <OrdenMuestraRecepcionado> RecepcionarMuestra(OrdenMuestraVM model)
        {
            var objCommand = GetSqlCommand("pNLU_RecepcionMuestraROM");

            InputParameterAdd.Varchar(objCommand, "codigoMuestra", model.CodigoMuestra);
            InputParameterAdd.Int(objCommand, "establecimientoDestinoId", model.EstablecimientoDestinoId);
            InputParameterAdd.Int(objCommand, "establecimientoEnvioId", model.EstablecimientoEnvioId);
            InputParameterAdd.DateTime(objCommand, "fechaRecepcion", model.FechaRecepcion);
            InputParameterAdd.DateTime(objCommand, "fechaRecepcionRomINS", model.fechaRecepcionRomINS);
            InputParameterAdd.Int(objCommand, "idUsuario", model.IdUsuario);
            InputParameterAdd.Varchar(objCommand, "nroOficio", model.NroOficio);

            var resultado = new List <OrdenMuestraRecepcionado>();
            var dataTable = Execute(objCommand);

            foreach (DataRow row in dataTable.Rows)
            {
                resultado.Add(new OrdenMuestraRecepcionado
                {
                    CodigoMuestra           = Converter.GetString(row, "CodigoMuestra"),
                    CodigoLineal            = Converter.GetString(row, "CodigoLineal"),
                    IdOrdenMuestraRecepcion = Converter.GetGuid(row, "idOrdenMuestraRecepcion"),
                    Paciente             = Converter.GetString(row, "Paciente"),
                    IdOrdenMuestra       = Converter.GetGuid(row, "idOrdenMuestra"),
                    IdTipoMuestra        = Converter.GetInt(row, "idTipoMuestra"),
                    IdCriterioRechazo    = Converter.GetInt(row, "idCriterioRechazo"),
                    CriterioRechazoGlosa = Converter.GetString(row, "Glosa")
                });
            }

            return(resultado);
        }
示例#6
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);
        }
示例#7
0
        /// <summary>
        /// Descripción: Actualiza informacion de muestras de animales.
        /// Author: Terceros.
        /// Fecha Creacion: 01/01/2017
        /// Fecha Modificación: 02/02/2017.
        /// Modificación: Se agregaron comentarios, funcion no utilizada.
        /// </summary>
        /// <param name="animal"></param>
        public void UpdateAnimal(Model.Animal animal)
        {
            var objCommand = GetSqlCommand("pNLU_Animal");

            InputParameterAdd.Guid(objCommand, "idAnimal", animal.IdAnimal);
            InputParameterAdd.Int(objCommand, "idRaza", animal.Raza.IdRaza);
            InputParameterAdd.Int(objCommand, "codigoOrigen", animal.Origen);
            InputParameterAdd.Varchar(objCommand, "nombresAnimal", animal.Nombre);
            InputParameterAdd.Int(objCommand, "generoAnimal", animal.Genero);
            InputParameterAdd.DateTime(objCommand, "fechaNacimiento", animal.FechaNacimiento);
            InputParameterAdd.Int(objCommand, "edadAnio", animal.EdadAnio);
            InputParameterAdd.Int(objCommand, "edadMes", animal.EdadMes);
            InputParameterAdd.Varchar(objCommand, "idUbigeoAnimal", animal.IdUbigeo);
            InputParameterAdd.Varchar(objCommand, "direccionAnimal", animal.Direccion);
            InputParameterAdd.Varchar(objCommand, "nombreRefugio", animal.Refugio);
            InputParameterAdd.Int(objCommand, "tipoDocumento", animal.Propietario?.TipoDocumento);
            InputParameterAdd.Varchar(objCommand, "nroDocumento", animal.Propietario?.NroDocumento);
            InputParameterAdd.Varchar(objCommand, "apellidoPaterno", animal.Propietario?.ApellidoPaterno);
            InputParameterAdd.Varchar(objCommand, "apellidoMaterno", animal.Propietario?.ApellidoMaterno);
            InputParameterAdd.Varchar(objCommand, "nombres", animal.Propietario?.Nombres);
            InputParameterAdd.Int(objCommand, "genero", animal.Propietario?.Genero);
            InputParameterAdd.Varchar(objCommand, "idUbigeoPropietario", animal.Propietario?.UbigeoActual.Id);
            InputParameterAdd.Varchar(objCommand, "direccionPropietario", animal.Propietario?.DireccionActual);
            InputParameterAdd.Varchar(objCommand, "telefonoFijo", animal.Propietario?.TelefonoFijo);
            InputParameterAdd.Varchar(objCommand, "celular", animal.Propietario?.Celular1);
            InputParameterAdd.Int(objCommand, "idUsuarioEdicion", animal.IdUsuarioRegistro);

            ExecuteNonQuery(objCommand);
        }
示例#8
0
        public void InsertTempOrdenMuestra(TempModel.TempOrdenMuestra oTempOrdenMuestra, Guid idPaciente, Guid idExamen, int idtipoMuestra)
        {
            var objCommand = GetSqlCommand("pNLI_TempOrdenMuestra");

            InputParameterAdd.Guid(objCommand, "idPaciente", idPaciente);
            InputParameterAdd.Guid(objCommand, "idExamen", idExamen);
            InputParameterAdd.Int(objCommand, "idTIpoMuestra", oTempOrdenMuestra.IdTipoMuestra);
            InputParameterAdd.DateTime(objCommand, "fechaColeccion", oTempOrdenMuestra.FechaColeccion);
            InputParameterAdd.Int(objCommand, "idusuario", oTempOrdenMuestra.idusuario);

            ExecuteNonQuery(objCommand);
        }
示例#9
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);
        }
        /// <summary>
        /// Descripción: Obtiene el listado de las muestras listas para que el analista libere el resultado.
        /// Author: SOTERO BUSTAMANTE.
        /// Fecha Creacion: 28/01/2017
        /// Fecha Modificación: 02/02/2017.
        /// Modificación: Se agregaron comentarios.
        /// </summary>
        /// <param name="idUsuario"></param>
        /// <param name="fechaSolicitud"></param>
        /// <param name="codigoOrden"></param>
        /// <param name="fechaDesde"></param>
        /// <param name="fechaHasta"></param>
        /// <param name="nroOficio"></param>
        /// <param name="nroDocumento"></param>
        /// <param name="idLaboratorio"></param>
        /// <returns></returns>
        public List <ValidaResult> GetValidacionesSolicitudes(int idUsuario, int fechaSolicitud, string codigoOrden, DateTime fechaDesde, DateTime fechaHasta, string nroOficio, string nroDocumento, int idLaboratorio, int estado)
        {
            var listaValidaciones = new List <ValidaResult>();

            var objCommand = GetSqlCommand("pNLS_ValidacionesSolicitudes");

            InputParameterAdd.Int(objCommand, "idUsuario", idUsuario);
            InputParameterAdd.Int(objCommand, "fechaSolicitud", fechaSolicitud);
            InputParameterAdd.DateTime(objCommand, "FechaDesde", fechaDesde);
            InputParameterAdd.DateTime(objCommand, "FechaHasta", fechaHasta);
            InputParameterAdd.Varchar(objCommand, "codigoOrden", codigoOrden);
            InputParameterAdd.Varchar(objCommand, "nroOficio", nroOficio);
            InputParameterAdd.Varchar(objCommand, "nroDocumento", nroDocumento);
            InputParameterAdd.Int(objCommand, "idLaboratorioUsuario", idLaboratorio);
            InputParameterAdd.Int(objCommand, "EstadoSol", estado);

            var dataValidaciones = Execute(objCommand);

            if (dataValidaciones.Rows.Count == 0)
            {
                return(null);
            }

            for (var i = 0; i < dataValidaciones.Rows.Count; i++)
            {
                var row = dataValidaciones.Rows[i];

                var vr = new ValidaResult
                {
                    Establecimiento  = row["NombEstab"].ToString(),
                    CodigoOrden      = row["CodOrden"].ToString(),
                    nroDocumento     = row["nroDocumento"].ToString(),
                    tipoDocumento    = row["TipoDocumento"].ToString(),
                    fechaRegistro    = DateTime.Parse(row["fechaRegistro"].ToString()),
                    idOrden          = Converter.GetGuid(row, "idOrden"),
                    fechaSolicitud   = DateTime.Parse(row["fechaSolicitud"].ToString()),
                    genero           = int.Parse(row["genero"].ToString()),
                    fechaNacimiento  = !row.IsNull("fechaNacimiento") ? DateTime.Parse(row["fechaNacimiento"].ToString()) : DateTime.Now,
                    nroOficio        = row["nroOficio"].ToString(),
                    EXISTE_PENDIENTE = !row.IsNull("EXISTE_PENDIENTE") ? int.Parse(row["EXISTE_PENDIENTE"].ToString()) : 0,
                    EXISTE_VALIDADO  = !row.IsNull("EXISTE_VALIDADO") ? int.Parse(row["EXISTE_VALIDADO"].ToString()) : 0,

                    //SOTERO BUSTAMANTE SOLCITUD INGRESO DE NUEVO RESULTADO VERIFICADOR
                    SOLICITA_INGRESO = int.Parse(row["estatusSol"].ToString()),
                    NombreExamen     = row["NombreExamen"].ToString(),
                    idOrdenExamen    = row["idOrdenExamen"].ToString(),
                };

                listaValidaciones.Add(vr);
            }

            return(listaValidaciones);
        }
示例#11
0
        public List <ConsultaReporteResultado> GetCantidadResultadosConsultadosPorSolicitante(ReporteRequest request)
        {
            List <ConsultaReporteResultado> result = new List <ConsultaReporteResultado>();
            var objCommand = GetSqlCommand("pNLS_ConsultaCantidadResultadosConsultadosPorSolicitante");

            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);
        }
示例#12
0
        public void CrearOrdenExamenCore(CrearOrdenExamenVM model)
        {
            var objCommand = GetSqlCommand("pNLI_CrearOrdenExamenCore");

            InputParameterAdd.Guid(objCommand, "ordenexamenId", model.OrdenExamenId);
            InputParameterAdd.Guid(objCommand, "ordenId", model.OrdenId);
            InputParameterAdd.Int(objCommand, "enfermedadId", model.EnfermedadId);
            InputParameterAdd.Guid(objCommand, "examenId", model.ExamenId);
            InputParameterAdd.Int(objCommand, "tipoMuestraId", model.TipoMuestraId);
            //estatus se esta asignando -1 por defecto para todas las tablas dentro de este SP. Actualizarlo con el boton Guardar de la orden
            InputParameterAdd.Int(objCommand, "usuarioId", model.UsuarioId);
            InputParameterAdd.DateTime(objCommand, "fechaColeccion", model.FechaObtencionDT);
            InputParameterAdd.DateTime(objCommand, "horaColeccion", model.HoraObtencionDT);
            InputParameterAdd.Int(objCommand, "establecimientoId", model.EstablecimientoDestinoId);
            InputParameterAdd.Bit(objCommand, "tipoRegistro", model.TipoRegistro == TipoRegistroOrden.ORDEN_RECEPCION);
            objCommand.ExecuteNonQuery();
        }
示例#13
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);
        }
示例#14
0
        public string FinalizarCreacionOrden(CrearOrdenVM orden)
        {
            var objCommand = GetSqlCommand("pNLU_FinalizarOrdenCore");

            InputParameterAdd.Guid(objCommand, "idOrden", orden.Orden.IdOrden);
            InputParameterAdd.Int(objCommand, "idProyecto", orden.ProyectoId);
            InputParameterAdd.DateTime(objCommand, "fechaIngresoROM", orden.FechaIngresoROM);
            InputParameterAdd.Int(objCommand, "idSolicitante", orden.SolicitanteId);
            InputParameterAdd.DateTime(objCommand, "fechaSolicitud", orden.FechaSolicitud);
            //estatus se esta asignando -1 por defecto para todas las tablas dentro de este SP. Actualizarlo con el boton Guardar de la orden
            InputParameterAdd.DateTime(objCommand, "fechaEvaluacionFicha", orden.FechaEvaluacionFicha);
            InputParameterAdd.Varchar(objCommand, "nroOficio", orden.NroOficio);
            InputParameterAdd.Varchar(objCommand, "observaciones", orden.Observacion);
            InputParameterAdd.Int(objCommand, "idEstablecimientoOrigen", orden.EstablecimientoOrigenId);
            InputParameterAdd.Int(objCommand, "idEstablecimientoEnvio", orden.EstablecimientoEnvioId);
            OutputParameterAdd.Varchar(objCommand, "mensajeresultado", 200);
            objCommand.ExecuteNonQuery();
            //ExecuteNonQuery(objCommand);
            return((string)objCommand.Parameters["@mensajeresultado"].Value);
        }
示例#15
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);
        }
示例#16
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);
        }
示例#17
0
        /// <summary>
        /// Descripción: Registra informacion del paciente.
        /// Author: Terceros.
        /// Fecha Creacion: 01/01/2017
        /// Fecha Modificación: 02/02/2017.
        /// Modificación: Se agregaron comentarios, funcion no utilizada.
        /// </summary>
        /// <param name="paciente"></param>
        public void InsertPaciente(Paciente paciente)
        {
            var objCommand = GetSqlCommand("pNLI_Paciente");

            InputParameterAdd.Varchar(objCommand, "apellidoPaterno", paciente.ApellidoPaterno);
            InputParameterAdd.Varchar(objCommand, "apellidoMaterno", paciente.ApellidoMaterno);
            InputParameterAdd.Varchar(objCommand, "nombres", paciente.Nombres);
            InputParameterAdd.Int(objCommand, "genero", paciente.Genero);
            InputParameterAdd.DateTime(objCommand, "fechaNacimiento", paciente.FechaNacimiento);
            InputParameterAdd.Int(objCommand, "tipoDocumento", paciente.TipoDocumento);
            InputParameterAdd.Varchar(objCommand, "nroDocumento", paciente.NroDocumento);
            InputParameterAdd.Int(objCommand, "idUsuarioRegistro", paciente.IdUsuarioRegistro);

            /*InputParameterAdd.Varchar(objCommand, "idUbigeoReniec", paciente.DatoComplementario.IdUbigeo);
             * InputParameterAdd.Varchar(objCommand, "direccionReniec", paciente.DatoComplementario.DireccionReniec);
             * InputParameterAdd.Varchar(objCommand, "idUbigeoActual", paciente.DatoComplementario.IdUbigeoActual);
             * InputParameterAdd.Varchar(objCommand, "direccionActual", paciente.DatoComplementario.DireccionActual);
             * InputParameterAdd.Varchar(objCommand, "telefonoFijo", paciente.DatoComplementario.TelefonoFijo);
             * InputParameterAdd.Varchar(objCommand, "celular1", paciente.DatoComplementario.Celular1);
             * InputParameterAdd.Varchar(objCommand, "celular2", paciente.DatoComplementario.Celular2);
             * InputParameterAdd.Int(objCommand, "estado", paciente.DatoComplementario.Estado);
             */
            ExecuteNonQuery(objCommand);
        }
示例#18
0
        /// <summary>
        /// Descripción: Actualizar informacion del paciente.
        /// Author: Terceros.
        /// Fecha Creacion: 01/01/2017
        /// Fecha Modificación: 02/02/2017.
        /// Modificación: Se agregaron comentarios, funcion no utilizada.
        /// </summary>
        /// <param name="paciente"></param>
        public void UpdatePaciente(Paciente paciente)
        {
            var objCommand = GetSqlCommand("pNLU_Paciente");

            InputParameterAdd.Guid(objCommand, "idPaciente", paciente.IdPaciente);
            InputParameterAdd.Varchar(objCommand, "apellidoPaterno", paciente.ApellidoPaterno);
            InputParameterAdd.Varchar(objCommand, "apellidoMaterno", paciente.ApellidoMaterno);
            InputParameterAdd.Varchar(objCommand, "nombres", paciente.Nombres);
            InputParameterAdd.Int(objCommand, "genero", paciente.Genero);
            InputParameterAdd.DateTime(objCommand, "fechaNacimiento", paciente.FechaNacimiento);
            InputParameterAdd.Int(objCommand, "tipoDocumento", paciente.TipoDocumento);
            InputParameterAdd.Varchar(objCommand, "nroDocumento", paciente.NroDocumento);
            InputParameterAdd.Int(objCommand, "idUsuarioEdicion", paciente.IdUsuarioEdicion);
            InputParameterAdd.Varchar(objCommand, "idUbigeoReniec", paciente.UbigeoReniec.Id);
            InputParameterAdd.Varchar(objCommand, "direccionReniec", paciente.DireccionReniec);
            InputParameterAdd.Varchar(objCommand, "idUbigeoActual", paciente.UbigeoActual.Id);
            InputParameterAdd.Varchar(objCommand, "direccionActual", paciente.DireccionActual);
            InputParameterAdd.Varchar(objCommand, "telefonoFijo", paciente.TelefonoFijo);
            InputParameterAdd.Varchar(objCommand, "celular1", paciente.Celular1);
            InputParameterAdd.Varchar(objCommand, "celular2", paciente.Celular2);
            InputParameterAdd.Int(objCommand, "estado", paciente.Estado);

            ExecuteNonQuery(objCommand);
        }