Exemple #1
0
        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                var hashCode = 41;
                // Suitable nullity checks etc, of course :)
                if (NombreProveedor != null)
                {
                    hashCode = hashCode * 59 + NombreProveedor.GetHashCode();
                }
                if (Identificacion != null)
                {
                    hashCode = hashCode * 59 + Identificacion.GetHashCode();
                }
                if (TipoConvenio != null)
                {
                    hashCode = hashCode * 59 + TipoConvenio.GetHashCode();
                }
                if (FechaVigencia != null)
                {
                    hashCode = hashCode * 59 + FechaVigencia.GetHashCode();
                }
                if (Correo != null)
                {
                    hashCode = hashCode * 59 + Correo.GetHashCode();
                }

                /*if (Pais != null)
                 * hashCode = hashCode * 59 + Pais.GetHashCode();*/
                if (Ciudad != null)
                {
                    hashCode = hashCode * 59 + Ciudad.GetHashCode();
                }
                if (Endpoint != null)
                {
                    hashCode = hashCode * 59 + Endpoint.GetHashCode();
                }
                if (TemplateEntrada != null)
                {
                    hashCode = hashCode * 59 + TemplateEntrada.GetHashCode();
                }
                if (TemplateSalida != null)
                {
                    hashCode = hashCode * 59 + TemplateSalida.GetHashCode();
                }
                if (EstadoConvenio != null)
                {
                    hashCode = hashCode * 59 + EstadoConvenio.GetHashCode();
                }
                return(hashCode);
            }
        }
        private void tsBtnConsultarSis_Click(object sender, EventArgs e)
        {
            CredencialWS    Clave = new CredencialWS();
            siswsSoapClient ws    = new siswsSoapClient();
            string          Trama = string.Empty;

            string[] Campos;
            string   FechaVigencia;
            string   Componente;

            /***********************CREDENCIALES WS.*/
            Clave.Usuario = "fissal";
            Clave.Clave   = "uhy2c32zlk";

            /***********************/

            /*************CONSULTAMOS DATA SIS - WS**/

            int           codigoConciliacion = VariablesGlobales.CodigoConciliacionX;
            List <string> listaPacientes     = objEstadoCuentaConciliacionBL.EstadoCuentaConciliacion_ListarPaciente(codigoConciliacion);
            int           filasPacientes     = listaPacientes.Count;
            string        pacienteId;

            tsPgsBarBuscador.Minimum = 0;
            tsPgsBarBuscador.Maximum = filasPacientes;
            //tsslMensajePgsBarBuscador.Text = "Procesando consulta SIS...";
            tsslMensajePgsBarBuscador.Visible = true;
            tsPgsBarBuscador.Visible          = true;
            for (int i = 0; i < filasPacientes; i++)
            {
                Trama      = string.Empty;
                pacienteId = listaPacientes[i];
                Paciente ObjPaciente = objPacienteBL.GetPacientePorId(pacienteId);
                /****************************************************************/
                if (ObjPaciente.TipoDocumentoId == 1)
                {
                    Trama = ws.BuscarAseguradosDocIdent(Clave, "00006210", "1", ObjPaciente.NumeroDocumento);
                    if (!string.Equals(Trama, string.Empty))
                    {
                        Campos        = Trama.Split('|');
                        FechaVigencia = Campos[16];
                        Componente    = Campos[13];

                        /****** AGREGAR VALIDACION VIGENCIA *******************/

                        if (Componente == "1") // SUBSIDIADO = ACTIVO
                        {
                            objEstadoCuentaConciliacionBL.EstadoCuentaConciliacion_UpdateActivoSIS(pacienteId, "1", codigoConciliacion);
                        }
                        else if (Componente == "2") // NRUSS
                        {
                            if (FechaVigencia != "")
                            {
                                string FVigencia = FechaVigencia.ToString();
                                string Eval      = FVigencia.Substring(6, 2) + '/' + FVigencia.Substring(4, 2) + '/' + FVigencia.Substring(0, 4);

                                DateTime FEval = Convert.ToDateTime(Eval);
                                DateTime FHoy  = DatosBL.GetDate();

                                if (FEval.Date >= FHoy.Date)
                                {
                                    objEstadoCuentaConciliacionBL.EstadoCuentaConciliacion_UpdateActivoSIS(pacienteId, "1", codigoConciliacion);
                                }
                                else
                                {
                                    objEstadoCuentaConciliacionBL.EstadoCuentaConciliacion_UpdateActivoSIS(pacienteId, "0", codigoConciliacion);
                                }
                            }
                            else
                            {
                                objEstadoCuentaConciliacionBL.EstadoCuentaConciliacion_UpdateActivoSIS(pacienteId, "1", codigoConciliacion);
                            }
                        }
                        /******************************************************/
                    }
                    else
                    {
                        objEstadoCuentaConciliacionBL.EstadoCuentaConciliacion_UpdateActivoSIS(pacienteId, "0", codigoConciliacion);
                    }
                }

                /****************************************************************/

                tsPgsBarBuscador.Value         = i;
                tsslMensajePgsBarBuscador.Text = "N° Registros consultados = " + tsPgsBarBuscador.Value.ToString();
            }
            tsslMensajePgsBarBuscador.Visible = false;
            tsslMensajePgsBarBuscador.Text    = string.Empty;
            tsPgsBarBuscador.Visible          = false;
            tsPgsBarBuscador.Value            = tsPgsBarBuscador.Minimum;
            CargarData();
            MessageBox.Show("¡Proceso SIS Concluido!", "FISSAL", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
Exemple #3
0
        void ValidarSis()
        {
            int msgsis;
            EstadoCuentaConciliacionBL objEstadoCuentaConciliacionBL = new EstadoCuentaConciliacionBL();
            PacienteBL objPacienteBL = new PacienteBL();

            CredencialWS    Clave = new CredencialWS();
            siswsSoapClient ws    = new siswsSoapClient();
            string          Trama = string.Empty;

            string[] Campos;
            string   FechaVigencia;
            string   Componente;

            /***********************CREDENCIALES WS.*/
            Clave.Usuario = "fissal";
            Clave.Clave   = "uhy2c32zlk";
            /***********************/

            /*************CONSULTAMOS DATA SIS - WS**/

            int           codigoConciliacion = VariablesGlobales.CodigoConciliacionX;
            List <string> listaPacientes     = objEstadoCuentaConciliacionBL.EstadoCuentaConciliacion_ListarPacienteIdSis();
            int           filasPacientes     = listaPacientes.Count;
            string        pacienteId;

            for (int i = 0; i < filasPacientes; i++)
            {
                msgsis     = 0;
                pacienteId = listaPacientes[i];
                Paciente ObjPaciente = objPacienteBL.GetPacientePorId(pacienteId);
                /****************************************************************/
                if (ObjPaciente.TipoDocumentoId == 1)
                {
                    try
                    {
                        Trama = ws.BuscarAseguradosDocIdent(Clave, "00006210", "1", ObjPaciente.NumeroDocumento);
                    }
                    catch //(Exception ex)
                    {
                        Trama  = string.Empty;
                        msgsis = 1;
                    }
                }
                else if (ObjPaciente.TipoDocumentoId == 2)
                {
                    try
                    {
                        Trama = ws.BuscarAseguradosDocIdent(Clave, "00006210", "2", "0" + ObjPaciente.NumeroDocumento);
                    }
                    catch //(Exception ex)
                    {
                        Trama  = string.Empty;
                        msgsis = 1;
                    }
                }

                if (msgsis != 1)
                {
                    if (!string.Equals(Trama, string.Empty))
                    {
                        Campos        = Trama.Split('|');
                        FechaVigencia = Campos[16];
                        Componente    = Campos[13];

                        /****** AGREGAR VALIDACION VIGENCIA *******************/

                        if (Componente == "1") // SUBSIDIADO = ACTIVO
                        {
                            objEstadoCuentaConciliacionBL.EstadoCuentaConciliacion_ActualizaActivoSIS(pacienteId, "1");
                        }
                        else if (Componente == "2") // NRUSS
                        {
                            if (FechaVigencia != "")
                            {
                                string FVigencia = FechaVigencia.ToString();
                                string Eval      = FVigencia.Substring(6, 2) + '/' + FVigencia.Substring(4, 2) + '/' + FVigencia.Substring(0, 4);

                                DateTime FEval = Convert.ToDateTime(Eval);
                                DateTime FHoy  = DatosBL.GetDate();

                                if (FEval > FHoy)
                                {
                                    objEstadoCuentaConciliacionBL.EstadoCuentaConciliacion_ActualizaActivoSIS(pacienteId, "1");
                                }
                                else
                                {
                                    objEstadoCuentaConciliacionBL.EstadoCuentaConciliacion_ActualizaActivoSIS(pacienteId, "0");
                                }
                            }
                            else
                            {
                                objEstadoCuentaConciliacionBL.EstadoCuentaConciliacion_ActualizaActivoSIS(pacienteId, "1");
                            }
                        }
                        /******************************************************/
                    }
                    else
                    {
                        objEstadoCuentaConciliacionBL.EstadoCuentaConciliacion_ActualizaActivoSIS(pacienteId, "0");
                    }

                    /****************************************************************/
                }
                else
                {
                    DialogResult result = MessageBox.Show("¡Problemas de conexion con el SIS..!", "FISSAL", MessageBoxButtons.RetryCancel);
                    if (result == DialogResult.Retry)
                    {
                        ValidarSis();
                    }
                }
            }
            CargaGrilla();
            MessageBox.Show("¡Proceso SIS Concluido!", "FISSAL", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
Exemple #4
0
        /// <summary>
        /// Returns true if Convenio instances are equal
        /// </summary>
        /// <param name="other">Instance of Convenio to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(Convenio other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     NombreProveedor == other.NombreProveedor ||
                     NombreProveedor != null &&
                     NombreProveedor.Equals(other.NombreProveedor)
                     ) &&
                 (
                     Identificacion == other.Identificacion ||
                     Identificacion != null &&
                     Identificacion.Equals(other.Identificacion)
                 ) &&
                 (
                     TipoConvenio == other.TipoConvenio ||
                     TipoConvenio != null &&
                     TipoConvenio.Equals(other.TipoConvenio)
                 ) &&
                 (
                     FechaVigencia == other.FechaVigencia ||
                     FechaVigencia != null &&
                     FechaVigencia.Equals(other.FechaVigencia)
                 ) &&
                 (
                     Correo == other.Correo ||
                     Correo != null &&
                     Correo.Equals(other.Correo)
                 ) /*&&
                    * (
                    * Pais == other.Pais ||
                    * Pais != null &&
                    * Pais.Equals(other.Pais)
                    * ) */&&
                 (
                     Ciudad == other.Ciudad ||
                     Ciudad != null &&
                     Ciudad.Equals(other.Ciudad)
                 ) &&
                 (
                     Endpoint == other.Endpoint ||
                     Endpoint != null &&
                     Endpoint.Equals(other.Endpoint)
                 ) &&
                 (
                     TemplateEntrada == other.TemplateEntrada ||
                     TemplateEntrada != null &&
                     TemplateEntrada.Equals(other.TemplateEntrada)
                 ) &&
                 (
                     TemplateSalida == other.TemplateSalida ||
                     TemplateSalida != null &&
                     TemplateSalida.Equals(other.TemplateSalida)
                 ) &&
                 (
                     EstadoConvenio == other.EstadoConvenio ||
                     EstadoConvenio != null &&
                     EstadoConvenio.Equals(other.EstadoConvenio)
                 ));
        }
        private void ConsultarSis()
        {
            if (!(dgvPreAutorizaciones.RowCount > 0))
            {
                return;
            }
            int?establecimientoId;

            if (cboEstablecimiento.SelectedIndex != 0 && cboEstablecimiento.SelectedIndex != -1)
            {
                establecimientoId = Convert.ToInt32(cboEstablecimiento.SelectedValue);
            }
            else
            {
                establecimientoId = null;
            }
            if (objAutorizacionBL.ExistenPendientesPacienteActivoSis(establecimientoId))
            {
                CredencialWS    Clave = new CredencialWS();
                siswsSoapClient ws    = new siswsSoapClient();
                string          Trama = string.Empty;
                string[]        Campos;
                string          FechaVigencia;
                string          Componente;
                byte?           tipoRegimen;
                string          activoSis = string.Empty;
                /***********************CREDENCIALES WS.*/
                Clave.Usuario = "fissal";
                Clave.Clave   = "uhy2c32zlk";

                /***********************/
                /*************CONSULTAMOS DATA SIS - WS**/
                List <string> listaPacientes;
                if (cboEstablecimiento.SelectedIndex != 0 && cboEstablecimiento.SelectedIndex != -1)
                {
                    listaPacientes = objAutorizacionBL.GetPacienteIdActivoSisPendientePorEstablecimiento(Convert.ToInt32(cboEstablecimiento.SelectedValue));
                }
                else
                {
                    listaPacientes = objAutorizacionBL.GetAllPacienteIdActivoSisPendiente();
                }

                int    filasPacientes = listaPacientes.Count;
                string pacienteId;
                tsPgsBarBuscador.Minimum          = 0;
                tsPgsBarBuscador.Maximum          = filasPacientes;
                tsslTotalRegistros.Visible        = false;
                tsslMensajePgsBarBuscador.Text    = "Procesando...";
                tsslMensajePgsBarBuscador.Visible = true;
                tsPgsBarBuscador.Visible          = true;

                for (int i = 0; i < filasPacientes; i++)
                {
                    Trama      = string.Empty;
                    pacienteId = listaPacientes[i];

                    Paciente ObjPaciente = objPacienteBL.GetPacientePorId(pacienteId);
                    /****************************************************************/
                    if (ObjPaciente.TipoDocumentoId == 1)
                    {
                        Trama = ws.BuscarAseguradosDocIdent(Clave, "00006210", "1", ObjPaciente.NumeroDocumento);

                        if (!string.Equals(Trama, string.Empty))
                        {
                            Campos        = Trama.Split('|');
                            FechaVigencia = Campos[16];
                            Componente    = Campos[13];
                            /****** AGREGAR VALIDACION VIGENCIA *******************/
                            if (Componente == "1") // SUBSIDIADO = ACTIVO
                            {
                                activoSis = "1";
                            }
                            else if (Componente == "2") // NRUSS
                            {
                                if (!string.Equals(FechaVigencia, string.Empty))
                                {
                                    string   FVigencia = FechaVigencia.ToString();
                                    string   Eval      = FVigencia.Substring(6, 2) + '/' + FVigencia.Substring(4, 2) + '/' + FVigencia.Substring(0, 4);
                                    DateTime FEval     = Convert.ToDateTime(Eval);
                                    DateTime FHoy      = DatosBL.GetDate();
                                    if (FEval.Date >= FHoy.Date)
                                    {
                                        activoSis = "1";
                                    }
                                    else
                                    {
                                        activoSis = "0";
                                    }
                                }
                                else
                                {
                                    activoSis = "1";
                                }
                            }
                            /******************************************************/
                            tipoRegimen = Convert.ToByte(Componente);
                        }
                        else
                        {
                            activoSis   = "0";
                            tipoRegimen = null;
                        }

                        if (cboEstablecimiento.SelectedIndex != 0 && cboEstablecimiento.SelectedIndex != -1)
                        {
                            objAutorizacionBL.ActualizarActivoSisPreAutorizacionesPorEstablecimiento(pacienteId, activoSis, tipoRegimen, VariablesGlobales.Login, Convert.ToInt32(cboEstablecimiento.SelectedValue));
                        }
                        else
                        {
                            objAutorizacionBL.ActualizarActivoSisPreAutorizaciones(pacienteId, activoSis, tipoRegimen, VariablesGlobales.Login);
                        }
                    }

                    /****************************************************************/

                    tsPgsBarBuscador.Value         = i;
                    tsslMensajePgsBarBuscador.Text = string.Format("Procesando {0} de {1}", Convert.ToString(i + 1), filasPacientes.ToString());
                }
                tsslMensajePgsBarBuscador.Visible = false;
                tsslMensajePgsBarBuscador.Text    = string.Empty;
                tsPgsBarBuscador.Visible          = false;
                tsslTotalRegistros.Visible        = true;
                tsPgsBarBuscador.Value            = tsPgsBarBuscador.Minimum;
                CargarDgvPreAutorizaciones();
                Buscar();
                MessageBox.Show("Consulta SIS Concluida", "FISSAL", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("No hay pacientes con consulta SIS pendiente", "FISSAL", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }