From b7e6822d01e32a6dab73c82d8844bc9008319f1e Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Wed, 21 Jan 2026 10:31:08 -0300 Subject: [PATCH 01/42] nuevo req, se agrega el tipo de autenticacion --- Business/Data/Usuario.cs | 41 ++++++--- Business/Data/Usuario.hbm.xml | 2 +- WebLab/Usuarios/UsuarioEdit.aspx | 10 +++ WebLab/Usuarios/UsuarioEdit.aspx.cs | 60 ++++++++++++- WebLab/Usuarios/UsuarioEdit.aspx.designer.cs | 94 ++++++++++++-------- WebLab/Usuarios/UsuarioList.aspx | 3 + WebLab/Usuarios/UsuarioList.aspx.cs | 4 +- 7 files changed, 160 insertions(+), 54 deletions(-) diff --git a/Business/Data/Usuario.cs b/Business/Data/Usuario.cs index af779a53..374e901c 100644 --- a/Business/Data/Usuario.cs +++ b/Business/Data/Usuario.cs @@ -36,6 +36,7 @@ public sealed class Usuario: Business.BaseDataAccess private bool m_externo; private string m_email; private string m_telefono; + private string m_tipoAutenticacion; #endregion #region Default ( Empty ) Class Constuctor @@ -63,7 +64,7 @@ public Usuario() m_externo = false; m_email= String.Empty; m_telefono = String.Empty; - + m_tipoAutenticacion = String.Empty; } @@ -93,7 +94,7 @@ public Usuario( m_requiereCambioPass = false; m_administrador = false; m_externo = false; - + m_tipoAutenticacion = String.Empty; } #endregion // End Required Fields Only Constructor @@ -429,24 +430,38 @@ public bool IsChanged get { return m_isChanged; } } - - #endregion + /// + /// + /// + public string TipoAutenticacion + { + get { return m_tipoAutenticacion; } + set + { + if (value != null && value.Length > 10) + throw new ArgumentOutOfRangeException("Invalid value for m_tipoAutenticacion", value, value.ToString()); - #region Metodos + m_isChanged |= (m_tipoAutenticacion != value); m_tipoAutenticacion = value; + } + } + #endregion + + + #region Metodos - #endregion + #endregion - //public bool esHemoterapia() - //{ - // var index=this.IdPerfil.Nombre.ToUpper().IndexOf("HEMOTERAPIA"); - // if (index > -1) return true; - // else return false; + //public bool esHemoterapia() + //{ + // var index=this.IdPerfil.Nombre.ToUpper().IndexOf("HEMOTERAPIA"); + // if (index > -1) return true; + // else return false; - //} + //} - } + } } diff --git a/Business/Data/Usuario.hbm.xml b/Business/Data/Usuario.hbm.xml index c0208ff7..85737535 100644 --- a/Business/Data/Usuario.hbm.xml +++ b/Business/Data/Usuario.hbm.xml @@ -27,7 +27,7 @@ - + diff --git a/WebLab/Usuarios/UsuarioEdit.aspx b/WebLab/Usuarios/UsuarioEdit.aspx index f3108e2e..3d0a7e5d 100644 --- a/WebLab/Usuarios/UsuarioEdit.aspx +++ b/WebLab/Usuarios/UsuarioEdit.aspx @@ -125,6 +125,13 @@
+ + + Tipo Autenticacion: + + + + @@ -136,6 +143,7 @@ ControlToValidate="txtUsername" ErrorMessage="Usuario" ValidationGroup="0">* + @@ -147,6 +155,7 @@ * + @@ -198,6 +207,7 @@ +
diff --git a/WebLab/Usuarios/UsuarioEdit.aspx.cs b/WebLab/Usuarios/UsuarioEdit.aspx.cs index 6a280c53..eddb9bca 100644 --- a/WebLab/Usuarios/UsuarioEdit.aspx.cs +++ b/WebLab/Usuarios/UsuarioEdit.aspx.cs @@ -16,6 +16,7 @@ using System.Data.SqlClient; using CrystalDecisions.Shared; using CrystalDecisions.Web; +using System.Text.RegularExpressions; namespace WebLab.Usuarios { @@ -129,6 +130,9 @@ private void MostrarDatos() MostrarEfectores(); + ddlTipoAutenticacion.SelectedValue = oRegistro.TipoAutenticacion.Trim(); + ddlTipoAutenticacion.Enabled = false; + habilitarPorAutenticacion(); } private void habilitarAdministrador() @@ -227,7 +231,7 @@ private void Guardar(Usuario oRegistro) oRegistro.RequiereCambioPass = chkRequiereContrasenia.Checked; oRegistro.IdUsuarioActualizacion = int.Parse(Session["idUsuario"].ToString()); oRegistro.FechaActualizacion = DateTime.Now; - + oRegistro.TipoAutenticacion = ddlTipoAutenticacion.SelectedValue; oRegistro.Save(); if (Request["id"] == null) // NUEVO USUARIO @@ -541,5 +545,59 @@ protected void customValidacionGeneral0_ServerValidate(object source, ServerVali } + + private void habilitarPorAutenticacion() + { + if (ddlTipoAutenticacion.SelectedValue == "ONELOGIN") + { + //No se habilita “Requiere nueva contraseña al ingresar” + chkRequiereContrasenia.Enabled = false; + chkRequiereContrasenia.Checked = false; + //No se habilita “exclusivo Río Negro” + chkExterno.Enabled = false; + chkExterno.Enabled = false; + //Por defecto la contraseña es el username + txtPassword.Enabled = false; + rfvPassword.Enabled = false; + } + else + { + chkRequiereContrasenia.Enabled = true; + chkExterno.Enabled = true; + + //Se puede poner una contraseña + if (Request["id"] == null){ txtPassword.Enabled = true; rfvPassword.Enabled = true; } + else + txtPassword.Enabled = false; + } + + + } + protected void ddlTipoAutenticacion_SelectedIndexChanged(object sender, EventArgs e) + { + + habilitarPorAutenticacion(); + + } + + + protected void customValidacionGeneral1_ServerValidate1(object source, ServerValidateEventArgs args) + { + if (ddlTipoAutenticacion.SelectedValue == "ONELOGIN") + { + //El username debe ser un numero (numero de documento) no debe admitir letras ni caracteres especiales. + + bool validate = Regex.IsMatch(txtUsername.Text, @"^\d+$"); + if (!validate) + { + args.IsValid = false; + return; + } + //Luego de validar el usuario, pongo la contraseña por defecto + if (Request["id"] == null) txtPassword.Text = txtUsername.Text; + } + } + + } } diff --git a/WebLab/Usuarios/UsuarioEdit.aspx.designer.cs b/WebLab/Usuarios/UsuarioEdit.aspx.designer.cs index 16e26a7c..049bba71 100644 --- a/WebLab/Usuarios/UsuarioEdit.aspx.designer.cs +++ b/WebLab/Usuarios/UsuarioEdit.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace WebLab.Usuarios { - - - public partial class UsuarioEdit { - +namespace WebLab.Usuarios +{ + + + public partial class UsuarioEdit + { + /// /// HFCurrTabIndex control. /// @@ -20,7 +22,7 @@ public partial class UsuarioEdit { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.HiddenField HFCurrTabIndex; - + /// /// txtApellido control. /// @@ -29,7 +31,7 @@ public partial class UsuarioEdit { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.TextBox txtApellido; - + /// /// rfvApellido control. /// @@ -38,7 +40,7 @@ public partial class UsuarioEdit { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.RequiredFieldValidator rfvApellido; - + /// /// txtNombre control. /// @@ -47,7 +49,7 @@ public partial class UsuarioEdit { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.TextBox txtNombre; - + /// /// rfvNombre control. /// @@ -56,7 +58,7 @@ public partial class UsuarioEdit { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.RequiredFieldValidator rfvNombre; - + /// /// txtFirmaValidacion control. /// @@ -65,7 +67,7 @@ public partial class UsuarioEdit { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.TextBox txtFirmaValidacion; - + /// /// email control. /// @@ -74,7 +76,7 @@ public partial class UsuarioEdit { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlInputGenericControl email; - + /// /// txtTelefono control. /// @@ -83,7 +85,16 @@ public partial class UsuarioEdit { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.TextBox txtTelefono; - + + /// + /// ddlTipoAutenticacion control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList ddlTipoAutenticacion; + /// /// txtUsername control. /// @@ -92,7 +103,7 @@ public partial class UsuarioEdit { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.TextBox txtUsername; - + /// /// rfvUsuario control. /// @@ -101,7 +112,7 @@ public partial class UsuarioEdit { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.RequiredFieldValidator rfvUsuario; - + /// /// customValidacionGeneral control. /// @@ -110,7 +121,7 @@ public partial class UsuarioEdit { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.CustomValidator customValidacionGeneral; - + /// /// customValidacionGeneral0 control. /// @@ -119,7 +130,16 @@ public partial class UsuarioEdit { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.CustomValidator customValidacionGeneral0; - + + /// + /// customValidacionGeneral1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CustomValidator customValidacionGeneral1; + /// /// txtPassword control. /// @@ -128,7 +148,7 @@ public partial class UsuarioEdit { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.TextBox txtPassword; - + /// /// rfvPassword control. /// @@ -137,7 +157,7 @@ public partial class UsuarioEdit { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.RequiredFieldValidator rfvPassword; - + /// /// chkAdministrador control. /// @@ -146,7 +166,7 @@ public partial class UsuarioEdit { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.CheckBox chkAdministrador; - + /// /// ddlEfector control. /// @@ -155,7 +175,7 @@ public partial class UsuarioEdit { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.DropDownList ddlEfector; - + /// /// rvEfector control. /// @@ -164,7 +184,7 @@ public partial class UsuarioEdit { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.RangeValidator rvEfector; - + /// /// ddlArea control. /// @@ -173,7 +193,7 @@ public partial class UsuarioEdit { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.DropDownList ddlArea; - + /// /// ddlPerfil control. /// @@ -182,7 +202,7 @@ public partial class UsuarioEdit { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.DropDownList ddlPerfil; - + /// /// rvPerfil control. /// @@ -191,7 +211,7 @@ public partial class UsuarioEdit { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.RangeValidator rvPerfil; - + /// /// ddlEfectorDestino control. /// @@ -200,7 +220,7 @@ public partial class UsuarioEdit { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.DropDownList ddlEfectorDestino; - + /// /// rvEfectorDestino control. /// @@ -209,7 +229,7 @@ public partial class UsuarioEdit { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.RangeValidator rvEfectorDestino; - + /// /// chkActivo control. /// @@ -218,7 +238,7 @@ public partial class UsuarioEdit { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.CheckBox chkActivo; - + /// /// chkExterno control. /// @@ -227,7 +247,7 @@ public partial class UsuarioEdit { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.CheckBox chkExterno; - + /// /// chkRequiereContrasenia control. /// @@ -236,7 +256,7 @@ public partial class UsuarioEdit { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.CheckBox chkRequiereContrasenia; - + /// /// lnkRegresar control. /// @@ -245,7 +265,7 @@ public partial class UsuarioEdit { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.LinkButton lnkRegresar; - + /// /// btnGuardar control. /// @@ -254,7 +274,7 @@ public partial class UsuarioEdit { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Button btnGuardar; - + /// /// ValidationSummary1 control. /// @@ -263,7 +283,7 @@ public partial class UsuarioEdit { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary1; - + /// /// btnAuditoria control. /// @@ -272,7 +292,7 @@ public partial class UsuarioEdit { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Button btnAuditoria; - + /// /// btnBlanquear control. /// @@ -281,7 +301,7 @@ public partial class UsuarioEdit { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Button btnBlanquear; - + /// /// ddlEfector2 control. /// @@ -290,7 +310,7 @@ public partial class UsuarioEdit { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.DropDownList ddlEfector2; - + /// /// btnAgregarEfector control. /// @@ -299,7 +319,7 @@ public partial class UsuarioEdit { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.Button btnAgregarEfector; - + /// /// gvListaEfector control. /// diff --git a/WebLab/Usuarios/UsuarioList.aspx b/WebLab/Usuarios/UsuarioList.aspx index 443e7206..81b52e9a 100644 --- a/WebLab/Usuarios/UsuarioList.aspx +++ b/WebLab/Usuarios/UsuarioList.aspx @@ -67,7 +67,10 @@ + + + Date: Tue, 3 Feb 2026 15:27:24 -0300 Subject: [PATCH 02/42] (Lab-195) Requerimientos Derivaciones (#61) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feature: Grabar estado inicial de derivación. ResultadoCar: “Pendiente de Derivar” * fix: solo se actualizan los detalleProtocolos que se ingresaron al protocolo. * fix: de query que actualiza las derivaciones en el protocolo emisor * fix: Flexibilizar fecha y hora de retiro del lote * fix: correcion de fecha en recepcion de lote * fix: por ahora no restringimos la fecha de recibo * fix: faltaba la auditoria * para resolver conflicto * fix: para no pacientes cambio del metodo de derivacion que guarda el ResultadoCar * controles para el error de test * controles para el error de test * recibir lote. se saco try catch con nueva funcion de GET en BaseDataAccess * correciones para test * para pasar a test 12/1/2025 * correciones de Caro y Vane --- Business/BaseDataAccess.cs | 24 +- Business/Data/Laboratorio/Derivacion.cs | 80 +++---- Business/Data/Laboratorio/DetalleProtocolo.cs | 75 +++++- Business/Data/Laboratorio/LoteDerivacion.cs | 50 +++- .../Data/Laboratorio/LoteDerivacion.hbm.xml | 2 +- WebLab/Derivaciones/InformeLote.aspx | 12 +- WebLab/Derivaciones/InformeLote.aspx.cs | 8 +- .../DerivacionMultiEfectorLote.aspx | 25 +- .../DerivacionMultiEfectorLote.aspx.cs | 224 +++++++++++------- ...erivacionMultiEfectorLote.aspx.designer.cs | 9 + WebLab/Protocolos/DerivacionRecibirLote.aspx | 27 ++- .../Protocolos/DerivacionRecibirLote.aspx.cs | 62 +++-- .../DerivacionRecibirLote.aspx.designer.cs | 26 +- WebLab/Protocolos/ProtocoloEdit2.aspx.cs | 11 +- .../Protocolos/ProtocoloProductoEdit.aspx.cs | 9 +- 15 files changed, 424 insertions(+), 220 deletions(-) diff --git a/Business/BaseDataAccess.cs b/Business/BaseDataAccess.cs index da937100..73792a2b 100644 --- a/Business/BaseDataAccess.cs +++ b/Business/BaseDataAccess.cs @@ -297,11 +297,29 @@ public object Get(Type type, object id) } } - public object Get(object id) + public object Get(object id) + { + return this.Get(this.GetType(), id); + } + + + + public object GetIfExists(Type type, object id) { - return this.Get(this.GetType(),id); - } + object returnValue = null; + try + { + returnValue = m_session.Get(type, id); + + return returnValue; + } + catch (Exception ex) + { + //TODO: disciminar en caso q la excepcion sea del tipo id inexistente. + throw ex; + } + } public IList GetListByPropertyValue(Type type, string propertyName, object propertyValue) { try diff --git a/Business/Data/Laboratorio/Derivacion.cs b/Business/Data/Laboratorio/Derivacion.cs index 3eebb651..f7fd4f20 100644 --- a/Business/Data/Laboratorio/Derivacion.cs +++ b/Business/Data/Laboratorio/Derivacion.cs @@ -267,46 +267,46 @@ public int IdMotivoCancelacion { } #endregion - public static List DerivacionesByLote(int idLote) { - List derivaciones = new List(); - try { - ISession session = NHibernateHttpModule.CurrentSession; - IList lista = session.CreateQuery("from Derivacion where idLote="+idLote).List(); - - foreach (Derivacion item in lista) { - derivaciones.Add(item); - } - } catch (Exception) { - - } - return derivaciones; - } - - public void MarcarComoRecibidas(Protocolo oAnterior, Protocolo oNuevo, Usuario oUser, int idLoteDerivacion) - { - string query = - @"update LAB_Derivacion - set estado=3---recibido - ,idProtocoloDerivacion=" + oNuevo.IdProtocolo.ToString() + @" - from LAB_Derivacion D - inner join LAB_DetalleProtocolo Det on Det.idDetalleProtocolo= d.idDetalleProtocolo - where Det.idProtocolo=" + oAnterior.IdProtocolo.ToString() + " and idLote=" + idLoteDerivacion; - - SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; - SqlCommand cmd = new SqlCommand(query, conn); - int idRealizado = Convert.ToInt32(cmd.ExecuteScalar()); - - //Se indica en el protocolo de Origen que fue recibido en el destino - if (oAnterior != null) - { - if (idLoteDerivacion != 0) - oAnterior.GrabarAuditoriaDetalleProtocolo("Recepcion Derivacion", oUser.IdUsuario, "Lote " + idLoteDerivacion, "Protocolo " + oNuevo.Numero.ToString()); - else - oAnterior.GrabarAuditoriaDetalleProtocolo("Recepcion Derivacion", oUser.IdUsuario, "Protocolo", oNuevo.Numero.ToString()); - } - } - - public string ObtenerItemsPendientes(string idLoteDerivacion, string idProtocolo) + //public static List DerivacionesByLote(int idLote) { + // List derivaciones = new List(); + // try { + // ISession session = NHibernateHttpModule.CurrentSession; + // IList lista = session.CreateQuery("from Derivacion where idLote="+idLote).List(); + + // foreach (Derivacion item in lista) { + // derivaciones.Add(item); + // } + // } catch (Exception) { + + // } + // return derivaciones; + //} + + //public void MarcarComoRecibidas(Protocolo oAnterior, Protocolo oNuevo, Usuario oUser, int idLoteDerivacion) //Se hace ahora en DetalleProtocolo.ActualizarItemsDerivados + // { + // string query = + // @"update LAB_Derivacion + // set estado=3---recibido + // ,idProtocoloDerivacion=" + oNuevo.IdProtocolo.ToString() + @" + // from LAB_Derivacion D + // inner join LAB_DetalleProtocolo Det on Det.idDetalleProtocolo= d.idDetalleProtocolo + // where Det.idProtocolo=" + oAnterior.IdProtocolo.ToString() + " and idLote=" + idLoteDerivacion; + + // SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; + // SqlCommand cmd = new SqlCommand(query, conn); + // int idRealizado = Convert.ToInt32(cmd.ExecuteScalar()); + + // //Se indica en el protocolo de Origen que fue recibido en el destino + // if (oAnterior != null) + // { + // if (idLoteDerivacion != 0) + // oAnterior.GrabarAuditoriaDetalleProtocolo("Recepcion Derivacion", oUser.IdUsuario, "Lote " + idLoteDerivacion, "Protocolo " + oNuevo.Numero.ToString()); + // else + // oAnterior.GrabarAuditoriaDetalleProtocolo("Recepcion Derivacion", oUser.IdUsuario, "Protocolo", oNuevo.Numero.ToString()); + // } + //} + + public string ObtenerItemsPendientes(string idLoteDerivacion, string idProtocolo) { ////// ---------------------->Buscar las derivaciones que no han sido ingresadas //los protocolos detalles me dan las derivaciones diff --git a/Business/Data/Laboratorio/DetalleProtocolo.cs b/Business/Data/Laboratorio/DetalleProtocolo.cs index 10b806c6..1056b435 100644 --- a/Business/Data/Laboratorio/DetalleProtocolo.cs +++ b/Business/Data/Laboratorio/DetalleProtocolo.cs @@ -1449,11 +1449,80 @@ public void GuardarDerivacion(Usuario oUser) oRegistro.Save(); - // graba el resultado en ResultadCar "Derivado: " + oItem.GetEfectorDerivacion(oCon.IdEfector); - //oDetalle.ResultadoCar = "Pendiente de Derivacion";//"se podria poner a que efector.... - //oDetalle.Save(); + // graba el resultado en ResultadCar "Pendiente de derivar" + this.ResultadoCar = "Pendiente de derivar"; + this.Save(); this.GrabarAuditoriaDetalleProtocolo("Graba Derivado", oUser.IdUsuario); } } + + //public void ActualizoResultado(Protocolo oRegistro, Protocolo oAnterior, int idLoteDerivacion) + //{ + + //Se hace ahora en el metodo ActualizarItemsDerivados + //ResultadoCar: Recibido en YYYY Protocolo Nro. XXXX + + //string query = + // " update LAB_DetalleProtocolo " + + // " set resultadoCar= 'Recibido en " + oRegistro.IdEfector.Nombre + " Protocolo Nro. " + oRegistro.Numero + + // "' from LAB_DetalleProtocolo Det " + + // " inner join LAB_Derivacion D on Det.idDetalleProtocolo = d.idDetalleProtocolo " + + // " where Det.idProtocolo=" + oAnterior.IdProtocolo.ToString() + " and idLote=" + idLoteDerivacion; + + + //// Pero que pasa en los casos que en el efector destino un analisis no se ingrese? + //// Tendriamos como recibido el analisis en el emisor pero en el receptor no estaria cargado + + //SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; + //SqlCommand cmd = new SqlCommand(query, conn); + //int idRealizado = Convert.ToInt32(cmd.ExecuteScalar()); + + //} + + public void ActualizarItemsDerivados(Protocolo oRegistro, Protocolo oAnterior, int idLoteDerivacion, Usuario oUser) + { + // PREMISA: Cuales son los idDetalle del protocolo emisor que si se grabaron en el protocolo nuevo + string query = + @" SELECT dp_origen.idDetalleProtocolo + FROM LAB_DetalleProtocolo dp_origen + INNER JOIN LAB_Derivacion d on d.idDetalleProtocolo = dp_origen.idDetalleProtocolo + WHERE dp_origen.idProtocolo = " + oAnterior.IdProtocolo + " and idLote = " + idLoteDerivacion + @" + AND EXISTS ( + SELECT 1 + FROM LAB_DetalleProtocolo dp_dest + WHERE dp_dest.idProtocolo = " + oRegistro.IdProtocolo + @" + AND dp_dest.idItem = dp_origen.idItem + ); "; + + SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; + DataSet Ds = new DataSet(); + SqlDataAdapter adapter = new SqlDataAdapter(); + adapter.SelectCommand = new SqlCommand(query, conn); + adapter.Fill(Ds); + DataTable dt = Ds.Tables[0]; + + foreach (DataRow item in dt.Rows) + { + int idDetalleProtocolo = int.Parse(item[0].ToString()); + + DetalleProtocolo dp = new DetalleProtocolo(); + dp = (DetalleProtocolo)dp.Get(typeof(DetalleProtocolo), "IdDetalleProtocolo", idDetalleProtocolo); + dp.ResultadoCar = "Recibido en " + oRegistro.IdEfector.Nombre + " Protocolo Nro. " + oRegistro.Numero; + dp.Save(); + + Derivacion de = new Derivacion(); + de = (Derivacion)de.Get(typeof(Derivacion), "IdDetalleProtocolo", dp); + de.Estado = 3; + de.IdProtocoloDerivacion = oAnterior.IdProtocolo; + de.Save(); + } + + //Se indica en el protocolo de Origen que fue recibido en el destino + if (oAnterior != null) + { + oAnterior.GrabarAuditoriaDetalleProtocolo("Recepcion Derivacion", oUser.IdUsuario, "Lote " + idLoteDerivacion, "Protocolo " + oRegistro.Numero.ToString()); + + } + } } } diff --git a/Business/Data/Laboratorio/LoteDerivacion.cs b/Business/Data/Laboratorio/LoteDerivacion.cs index 12e32c7c..ef7ace96 100644 --- a/Business/Data/Laboratorio/LoteDerivacion.cs +++ b/Business/Data/Laboratorio/LoteDerivacion.cs @@ -1,5 +1,10 @@ -using System; -using System.Collections.Generic; +using NHibernate; +using NHibernate.Expression; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; using System.Text; @@ -143,34 +148,55 @@ public string descripcionEstadoLote() { return estado.Nombre; } - public bool HayDerivacionesPendientes() { - List dList = Derivacion.DerivacionesByLote(this.IdLoteDerivacion); - dList = dList.FindAll(x => x.IdProtocoloDerivacion == 0 && x.Estado == 1); - - if (dList.Count > 0) - return true; + public bool HayDerivacionesPendientes() + { + //List dList = Derivacion.DerivacionesByLote(this.IdLoteDerivacion); + //dList = dList.FindAll(x => x.IdProtocoloDerivacion == 0 && x.Estado == 1); + + //Revisar que Derivacion tenga DetalleProtocolo + string m_strSQL = " Select idDerivacion FROM LAB_Derivacion WHERE idLote=" +this.IdLoteDerivacion+ " and idProtocoloDerivacion=0 and estado=1 and " + + " idDetalleProtocolo in (Select idDetalleProtocolo FROM LAB_DetalleProtocolo where IdEfector = " + this.IdEfectorOrigen.IdEfector + ")"; + DataSet Ds = new DataSet(); + SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; + SqlDataAdapter adapter = new SqlDataAdapter(); + adapter.SelectCommand = new SqlCommand(m_strSQL, conn); + adapter.Fill(Ds); + DataTable dt = Ds.Tables[0]; + + if(dt != null) + { + if (dt.Rows.Count > 0) + return true; + else + return false; + } else return false; - + } + public void ActualizaEstadoLote(int idUsuario, string ProtocoloNuevo, string ProtocoloAnterior) { if (Estado == 4) //Pasa de Recibido a Ingresado { Estado = 5; - GrabarAuditoriaLoteDerivacion(descripcionEstadoLote(), idUsuario); + LoteDerivacionEstado oEstado = new LoteDerivacionEstado(); + oEstado = (LoteDerivacionEstado)oEstado.Get(typeof(LoteDerivacionEstado), Estado); + GrabarAuditoriaLoteDerivacion(oEstado.Nombre, idUsuario); FechaIngreso = DateTime.Now; } //Graba el ingreso del protocolo en el lote GrabarAuditoriaLoteDerivacion("Ingresa protocolo", idUsuario, "Nmero Protocolo", ProtocoloNuevo, ProtocoloAnterior); - //Si al generar este nuevo protocolo se finalizo la carga del lote, cambiar estado a Completado + //No hay derivaciones pendientes, cambio el estado del lote a Ingresado Total if (!HayDerivacionesPendientes()) { Estado = 6; //Pasa a Completado si no tiene ms derivaciones pendientes - GrabarAuditoriaLoteDerivacion(descripcionEstadoLote(), idUsuario); + LoteDerivacionEstado oEstado = new LoteDerivacionEstado(); + oEstado = (LoteDerivacionEstado)oEstado.Get(typeof(LoteDerivacionEstado), Estado); + GrabarAuditoriaLoteDerivacion(oEstado.Nombre, idUsuario); } Save(); diff --git a/Business/Data/Laboratorio/LoteDerivacion.hbm.xml b/Business/Data/Laboratorio/LoteDerivacion.hbm.xml index 499cc40d..41a49f27 100644 --- a/Business/Data/Laboratorio/LoteDerivacion.hbm.xml +++ b/Business/Data/Laboratorio/LoteDerivacion.hbm.xml @@ -3,7 +3,7 @@ - + diff --git a/WebLab/Derivaciones/InformeLote.aspx b/WebLab/Derivaciones/InformeLote.aspx index 6b01eb65..fb9427e9 100644 --- a/WebLab/Derivaciones/InformeLote.aspx +++ b/WebLab/Derivaciones/InformeLote.aspx @@ -3,6 +3,12 @@ diff --git a/WebLab/Derivaciones/InformeLote.aspx.cs b/WebLab/Derivaciones/InformeLote.aspx.cs index b6914eca..9b0efd72 100644 --- a/WebLab/Derivaciones/InformeLote.aspx.cs +++ b/WebLab/Derivaciones/InformeLote.aspx.cs @@ -65,10 +65,10 @@ protected void Page_Load(object sender, EventArgs e) CargarGrilla(); CargarControles(); } - else - { - CargarFechaHoraActual(); //Despues de guardar, si no tenia fecha seleccionada lo trae ahora sin datos - } + //else + //{ + // CargarFechaHoraActual(); //Despues de guardar, si no tenia fecha seleccionada lo trae ahora sin datos --> NO recuerdo cuando sucedia, pero si ahora lo dejo, pone la fecha actual en envio y no la del formulario. + //} } else diff --git a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx index d7bfeb93..c3bf7499 100644 --- a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx +++ b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx @@ -11,12 +11,12 @@ var txtNumeroLote = document.getElementById('<%= txtNumeroLote.ClientID %>'); //console.log(txtNumeroLote); var num = txtNumeroLote.value; - //console.log(num); + //console.log(num); num = num.replace(/\D/g, ''); //console.log(num); $("#<%=txtNumeroLote.ClientID%>").val(num); } - + @@ -50,9 +50,10 @@
- - - + + Nro. Lote: + +
@@ -93,20 +94,14 @@
+ DataKeyNames="idProtocolo" OnRowDataBound="gvProtocolosDerivados_RowDataBound" OnRowCommand="gvProtocolosDerivados_RowCommand"> - - <%----%> - - - + + - diff --git a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.cs b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.cs index d1a4a55a..6e0bb7c0 100644 --- a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.cs +++ b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.cs @@ -23,7 +23,7 @@ public partial class DerivacionMultiEfectorLote : System.Web.UI.Page public Configuracion oC = new Configuracion(); public Usuario oUser = new Usuario(); - #region Carga + protected void Page_PreInit(object sender, EventArgs e) { @@ -56,6 +56,7 @@ protected void Page_Load(object sender, EventArgs e) txtNumeroLote.Focus(); } + } private void VerificaPermisos(string sObjeto) { @@ -110,28 +111,23 @@ protected bool NoIngresado(int estado) break; } return tiene; - } - #endregion - - #region Buscar + } protected void btnBuscar_Click(object sender, EventArgs e) { - try - { - resetearForm(); - LoteDerivacion lote = new LoteDerivacion(); - lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), Convert.ToInt32(txtNumeroLote.Text)); + + resetearForm(); + LoteDerivacion lote = new LoteDerivacion(); + lote = (LoteDerivacion)lote.GetIfExists(typeof(LoteDerivacion),int.Parse(txtNumeroLote.Text)); + if (lote != null) + { if (efectorCorrecto(lote)) { //El efector destino es el efector logueado CargarControladores(lote); } + } - catch (Exception) - { - ScriptManager.RegisterStartupScript(this, GetType(), "mensajeError", "alert('Número de lote inexistente.');", true); - } - + else ScriptManager.RegisterStartupScript(this, GetType(), "mensajeError", "alert('Número de lote inexistente.');", true); } private void CargarControladores(LoteDerivacion lote) { @@ -142,60 +138,66 @@ private void CargarControladores(LoteDerivacion lote) } //Cargo el estado - lblEstadoLote.Text = lote.descripcionEstadoLote(); + // lblEstadoLote.Text = lote.descripcionEstadoLote(); + + LoteDerivacionEstado estado = new LoteDerivacionEstado(); + estado = (LoteDerivacionEstado)estado.Get(typeof(LoteDerivacionEstado), lote.Estado); + lblEstadoLote.Text = estado.Nombre; //Cargo el efector de Origen - Efector efectorOrigen = new Efector(); - efectorOrigen = (Efector)efectorOrigen.Get(typeof(Efector), "IdEfector", lote.IdEfectorOrigen.IdEfector); - lblEfectorOrigen.Text = efectorOrigen.Nombre; + if (lote.IdEfectorOrigen != null) + lblEfectorOrigen.Text = lote.IdEfectorOrigen.Nombre; + + //Cargo grilla de protocolos para ingresar + DataTable dt = LeerDatosProtocolosDerivados(); + if (dt != null) + { + gvProtocolosDerivados.DataSource = dt; + gvProtocolosDerivados.DataBind(); + + } + - //Cargo grilla de protocolos para ingresar - DataTable dt = LeerDatosProtocolosDerivados(); int cantidad = dt.Rows.Count; if (cantidad > 0) - { - gvProtocolosDerivados.DataSource = dt; + { lblCantidadRegistros.Text = "Cantidad de registros encontrados " + cantidad; if (cantidad <= 10) divScroll.Style["height"] = "auto"; // altura mínima else divScroll.Style["height"] = "500px"; // altura grande con scroll - + } else - { - gvProtocolosDerivados.DataSource = null; - gvProtocolosDerivados.Visible = true; //asi sale el cartel de grilla vacia "EmptyDataText" + { //Si no trajo datos verifico el estado del lote - gvProtocolosDerivados.EmptyDataRowStyle.ForeColor = System.Drawing.Color.Red; + // gvProtocolosDerivados.EmptyDataRowStyle.ForeColor = System.Drawing.Color.Red; switch (lote.Estado) { case 1: - gvProtocolosDerivados.EmptyDataText = "No se puede recepcionar lote, todavia no se ha derivado."; break; + // gvProtocolosDerivados.EmptyDataText = "No se puede recepcionar lote, todavia no se ha derivado."; break; + lblCantidadRegistros.Text = "No se puede recepcionar lote, todavia no se ha derivado "; break; case 2: case 3: case 4: - case 5: - gvProtocolosDerivados.EmptyDataText = "No se encontraron protocolos para el lote ingresado."; - - break; - case 6: //Si esta el lote esta completo muestro otro mensaje de la grilla - gvProtocolosDerivados.EmptyDataText = "Ya se ingresaron todos los protocolos del lote."; - gvProtocolosDerivados.EmptyDataRowStyle.ForeColor = System.Drawing.Color.Black; - break; - } - divScroll.Style["height"] = "auto"; - } - gvProtocolosDerivados.DataBind(); - + case 5: + lblCantidadRegistros.Text = "No se encontraron protocolos para el lote ingresado."; break; + + case 6: //Si esta el lote esta completo muestro otro mensaje de la grilla + lblCantidadRegistros.Text = "Ya se ingresaron todos los protocolos del lote."; break; + + + } + divScroll.Style["height"] = "auto"; + } + } private bool efectorCorrecto(LoteDerivacion lote) { - try - { + //Verifico que el efector de Destino sea el que se tenga que ingresar if (lote.IdEfectorDestino.IdEfector == oUser.IdEfector.IdEfector) { @@ -204,8 +206,9 @@ private bool efectorCorrecto(LoteDerivacion lote) } else { - Efector e = new Efector(); - e = (Efector)e.Get(typeof(Efector), lote.IdEfectorDestino.IdEfector); + //Efector e = new Efector(); + //e = (Efector)e.Get(typeof(Efector), lote.IdEfectorDestino.IdEfector); + lblErrorEfectorOrigen.Visible = true; lblErrorEfectorOrigen.Text = "El lote no corresponde al efector del usuario '" + oC.IdEfector.Nombre + "'"; divControlLote.Attributes["class"] = "form-group has-error"; @@ -214,13 +217,6 @@ private bool efectorCorrecto(LoteDerivacion lote) } - } - catch (Exception excep) - { - - // if(excep.Message.Contains("")) - return false; //Cuando da error idlote inexistente que devuelva falso - } } @@ -253,41 +249,42 @@ and L.estado in (2, 4, 5) DataSet Ds = new DataSet(); SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString); ///Performance: conexion de solo lectura - SqlDataAdapter adapter = new SqlDataAdapter - { - SelectCommand = new SqlCommand(m_strSQL, conn) - }; + SqlDataAdapter adapter = new SqlDataAdapter(); + adapter.SelectCommand = new SqlCommand(m_strSQL, conn); + + adapter.Fill(Ds); return Ds.Tables[0]; } - - protected bool HabilitarIngreso() - { - bool puedeIngresarProtocolo = false; - LoteDerivacion lote = new LoteDerivacion(); - lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), Convert.ToInt32(txtNumeroLote.Text)); - - /* Estados del Lote - idEstado nombre - 1 Creado -> NO permitir cargar protocolo - 2 Derivado -> NO permitir cargar protocolo - 3 Cancelado -> NO permitir cargar protocolo - 4 Recibido -> permitir cargar protocolo - 5 Ingresado -> permitir cargar protocolo - 6 Completado -> No hay más protocolos para cargar + //protected bool HabilitarIngreso() + //{ + // bool puedeIngresarProtocolo = false; + + // LoteDerivacion lote = new LoteDerivacion(); + // lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), Convert.ToInt32(txtNumeroLote.Text)); + + // /* Estados del Lote + // idEstado nombre + // 1 Creado -> NO permitir cargar protocolo + // 2 Derivado -> NO permitir cargar protocolo + // 3 Cancelado -> NO permitir cargar protocolo + // 4 Recibido -> permitir cargar protocolo + // 5 Ingresado -> permitir cargar protocolo + // 6 Completado -> No hay más protocolos para cargar - */ - if (lote.Estado == 5 || lote.Estado == 4) - { - puedeIngresarProtocolo = true; - } - return puedeIngresarProtocolo; - } - #endregion + // */ + // if (lote.Estado == 5 || lote.Estado == 4) + // { + // puedeIngresarProtocolo = true; + // } + // return puedeIngresarProtocolo; + //} #region NuevoLote + + /* protected void lnkIngresoProtocolo_Command(object sender, CommandEventArgs e) { int idProtocolo = Convert.ToInt32(e.CommandArgument); @@ -325,6 +322,42 @@ private void GenerarNuevoProtocolo(int idProtocoloOrigen, int idPaciente) "&Operacion=AltaDerivacionMultiEfectorLote" , false); } + } + */ + + private void GenerarNuevoProtocolo(object idProtocoloOrigen ) + { + + string s_idServicio, idLote; + int i_idProtocoloOrigen = int.Parse(idProtocoloOrigen.ToString()); + + Protocolo p = new Protocolo(); + p = (Protocolo)p.Get(typeof(Protocolo), i_idProtocoloOrigen); + + s_idServicio = p.IdTipoServicio.IdTipoServicio.ToString(); + idLote = txtNumeroLote.Text; + int idPaciente= p.IdPaciente.IdPaciente; + + if (p.IdPaciente.IdPaciente > 0) + { + Response.Redirect("ProtocoloEdit2.aspx?idEfectorSolicitante=" + p.IdEfector.IdEfector + + "&idProtocolo=" + idProtocoloOrigen + + "&idServicio=" + s_idServicio + + "&idLote=" + idLote + + "&idPaciente=" + idPaciente + + "&Operacion=AltaDerivacionMultiEfectorLote", false); + } + else + { + //Es Muestra No Pacientes + Response.Redirect("ProtocoloProductoEdit.aspx?idEfectorSolicitante=" + p.IdEfector.IdEfector + + "&idProtocolo=" + idProtocoloOrigen + + "&idServicio=" + s_idServicio + + "&idLote=" + idLote + + "&Desde=AltaDerivacionMultiEfectorLote" + + "&Operacion=AltaDerivacionMultiEfectorLote", false); + } + } #endregion @@ -334,14 +367,35 @@ protected void btn_recibirLote_Click(object sender, EventArgs e) { Response.Redirect("DerivacionRecibirLote.aspx?idLote=" + txtNumeroLote.Text + "&idServicio=" + Request["idServicio"], false); } + + #endregion - protected void txtNumeroLote_TextChanged(object sender, EventArgs e) - { - //Si cambia el numero de lote, que vuelva a realizar la busqueda para que refresque los datos de busqueda - btnBuscar_Click(null, null); - } + protected void gvProtocolosDerivados_RowDataBound(object sender, GridViewRowEventArgs e) + { + + ///Cuando se carga la grilla es porque ya verifiqué el estado del lote + + if (e.Row.RowType == DataControlRowType.DataRow) + { + LinkButton cmdProtocolo = (LinkButton)e.Row.Cells[3].Controls[1]; + cmdProtocolo.CommandArgument = this.gvProtocolosDerivados.DataKeys[e.Row.RowIndex].Value.ToString(); + cmdProtocolo.ToolTip = "Ingresar Protocolo"; + if ((lblEstadoLote.Text == "Recibido") || (lblEstadoLote.Text == "Ingresado Parcial")) + cmdProtocolo.Enabled = true; + else + + cmdProtocolo.Enabled = false; + } + + } + protected void gvProtocolosDerivados_RowCommand(object sender, GridViewCommandEventArgs e) + { + + + GenerarNuevoProtocolo (e.CommandArgument); + } } } \ No newline at end of file diff --git a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.designer.cs b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.designer.cs index 05179157..4b6dedc4 100644 --- a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.designer.cs +++ b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.designer.cs @@ -50,6 +50,15 @@ public partial class DerivacionMultiEfectorLote /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl divControlLote; + /// + /// lblNumeroLote control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblNumeroLote; + /// /// txtNumeroLote control. /// diff --git a/WebLab/Protocolos/DerivacionRecibirLote.aspx b/WebLab/Protocolos/DerivacionRecibirLote.aspx index 625adea2..dd94a4d7 100644 --- a/WebLab/Protocolos/DerivacionRecibirLote.aspx +++ b/WebLab/Protocolos/DerivacionRecibirLote.aspx @@ -8,10 +8,10 @@ - + --%> @@ -109,13 +110,13 @@ Fecha y Hora: - <%----%> + <%-- --%> - *Error en Fecha + <%-- *Error en Fecha *Error en Hora - + --%> @@ -128,12 +129,16 @@ - + + + +
diff --git a/WebLab/Protocolos/DerivacionRecibirLote.aspx.cs b/WebLab/Protocolos/DerivacionRecibirLote.aspx.cs index 31b87abd..41cd5772 100644 --- a/WebLab/Protocolos/DerivacionRecibirLote.aspx.cs +++ b/WebLab/Protocolos/DerivacionRecibirLote.aspx.cs @@ -70,15 +70,12 @@ private void CargarEncabezado() private void CargarFechaHoraActual() { DateTime miFecha = DateTime.UtcNow.AddHours(-3); //Hora estándar de Argentina (UTC-03:00) - //txt_Fecha.Value = miFecha.Date.ToString("yyyy-MM-dd"); txtHora.Value = miFecha.ToString("HH:mm"); txtFecha.Text = miFecha.Date.ToString("yyyy-MM-dd"); - //LAB-74 Control de fecha: La fecha de ingreso del lote no puede ser anterior a la fecha de envio del lote - rvFecha.MinimumValue = hidFechaEnvio.Value; - rvFecha.MaximumValue = txtFecha.Text; //Fecha Date today - rvFecha.Text = "La fecha de recepcion no puede ser menor a la fecha de envio " + hidFechaEnvio.Value; - + //rvFecha.MinimumValue = hidFechaEnvio.Value; + //rvFecha.MaximumValue = txtFecha.Text; //Fecha Date today + //rvFecha.Text = "La fecha de recepcion no puede ser menor a la fecha de envio " + hidFechaEnvio.Value; } private void VerificaPermisos(string sObjeto) @@ -112,16 +109,20 @@ private void VerificaPermisos(string sObjeto) protected void btn_recibirLote_Click(object sender, EventArgs e) { - //Cambiar estado al lote - LoteDerivacion lote = new LoteDerivacion(); - lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), Convert.ToInt32(Request["idLote"])); - lote.Estado = 4; - lote.IdUsuarioRecepcion = oUser.IdUsuario; - lote.Save(); - - //Generar Auditorias - GenerarAuditorias(lote); - btn_volver_Click(null, null); + if (Page.IsValid) + { + //Cambiar estado al lote + LoteDerivacion lote = new LoteDerivacion(); + lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), Convert.ToInt32(Request["idLote"])); + lote.Estado = 4; + lote.IdUsuarioRecepcion = oUser.IdUsuario; + lote.Save(); + + //Generar Auditorias + GenerarAuditorias(lote); + btn_volver_Click(null, null); + } + } private void GenerarAuditorias(LoteDerivacion lote) @@ -157,5 +158,34 @@ protected void btn_volver_Click(object sender, EventArgs e) { Response.Redirect("DerivacionMultiEfectorLote.aspx?idServicio=" + Request["idServicio"] + "&idLote=" + Request["idLote"], false); } + + protected void cvValidacionInput_ServerValidate(object source, ServerValidateEventArgs args) + { + + string error = ""; + + if (string.IsNullOrEmpty(txtFecha.Text )) + { + args.IsValid = false; + error = "*Error en Fecha"; + } + + if (string.IsNullOrEmpty(txtHora.Value)) + { + args.IsValid = false; + error = "*Error en Hora"; + } + + /* Por ahora no restringimos la fecha porque ellos si se equivocan no pueden editar la derivacion enviada*/ + //if (DateTime.Parse(txtFecha.Text) < DateTime.Parse(hidFechaEnvio.Value)) + //{ + // error = "La fecha de recepcion no puede ser menor a la fecha de envio " + DateTime.Parse(hidFechaEnvio.Value).ToString("dd/MM/yyyy"); + // args.IsValid = false; + //} + + + + this.cvValidacionInput.ErrorMessage = error ; + } } } \ No newline at end of file diff --git a/WebLab/Protocolos/DerivacionRecibirLote.aspx.designer.cs b/WebLab/Protocolos/DerivacionRecibirLote.aspx.designer.cs index 0705dca8..15e2ad4f 100644 --- a/WebLab/Protocolos/DerivacionRecibirLote.aspx.designer.cs +++ b/WebLab/Protocolos/DerivacionRecibirLote.aspx.designer.cs @@ -105,40 +105,22 @@ public partial class DerivacionRecibirLote protected global::System.Web.UI.HtmlControls.HtmlInputGenericControl txtHora; /// - /// rfvFecha control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.RequiredFieldValidator rfvFecha; - - /// - /// rfvHora control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.RequiredFieldValidator rfvHora; - - /// - /// rvFecha control. + /// txtObs control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RangeValidator rvFecha; + protected global::System.Web.UI.HtmlControls.HtmlTextArea txtObs; /// - /// txtObs control. + /// cvValidacionInput control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.HtmlControls.HtmlTextArea txtObs; + protected global::System.Web.UI.WebControls.CustomValidator cvValidacionInput; /// /// btnRecibirLote control. diff --git a/WebLab/Protocolos/ProtocoloEdit2.aspx.cs b/WebLab/Protocolos/ProtocoloEdit2.aspx.cs index 9b1513ac..087267f5 100644 --- a/WebLab/Protocolos/ProtocoloEdit2.aspx.cs +++ b/WebLab/Protocolos/ProtocoloEdit2.aspx.cs @@ -1885,8 +1885,14 @@ protected void btnGuardar_Click(object sender, EventArgs e) private void ActualizarEstadoDerivacion(Protocolo oRegistro, Protocolo oRegistroAnterior) { - Business.Data.Laboratorio.Derivacion oDerivacion = new Business.Data.Laboratorio.Derivacion(); - oDerivacion.MarcarComoRecibidas(oRegistroAnterior,oRegistro, oUser, Convert.ToInt32(Request["idLote"])); + + DetalleProtocolo dp = new DetalleProtocolo(); + dp.ActualizarItemsDerivados(oRegistro, oRegistroAnterior, Convert.ToInt32(Request["idLote"]), oUser); + + //Business.Data.Laboratorio.Derivacion oDerivacion = new Business.Data.Laboratorio.Derivacion(); + //oDerivacion.MarcarComoRecibidas(oRegistroAnterior,oRegistro, oUser, Convert.ToInt32(Request["idLote"])); + //Business.Data.Laboratorio.DetalleProtocolo oDetalle = new Business.Data.Laboratorio.DetalleProtocolo(); + //oDetalle.ActualizoResultado(oRegistro, oRegistroAnterior,Convert.ToInt32(Request["idLote"])); } private string getListaAreasCodigoBarras() @@ -5283,6 +5289,7 @@ private void GenerarResultadoSISA(DetalleProtocolo oDetalle, string idPruebaSISA request.Headers.Add("app_id", "0e4fcbbf"); + Stream postStream = request.GetRequestStream(); postStream.Write(data, 0, data.Length); diff --git a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs index 193a2389..aeae90d2 100644 --- a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs +++ b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs @@ -1231,7 +1231,8 @@ private void GuardarDetalle(Business.Data.Laboratorio.Protocolo oRegistro) GuardarDetallePractica(oDetalle); - GuardarDerivacion(oDetalle); + //GuardarDerivacion(oDetalle); + oDetalle.GuardarDerivacion(oUser); } else //si ya esta actualizo si trajo muestra o no { @@ -2136,8 +2137,10 @@ private void CargarProtocoloDerivadoLote() private void ActualizarEstadoDerivacion(Protocolo oRegistro, Protocolo oAnterior) { - Business.Data.Laboratorio.Derivacion oDerivacion = new Business.Data.Laboratorio.Derivacion(); - oDerivacion.MarcarComoRecibidas(oAnterior, oRegistro, oUser, Convert.ToInt32(Request["idLote"])); + //Business.Data.Laboratorio.Derivacion oDerivacion = new Business.Data.Laboratorio.Derivacion(); + //oDerivacion.MarcarComoRecibidas(oAnterior, oRegistro, oUser, Convert.ToInt32(Request["idLote"])); + DetalleProtocolo dp = new DetalleProtocolo(); + dp.ActualizarItemsDerivados(oRegistro, oAnterior, Convert.ToInt32(Request["idLote"]), oUser); } private void VerificacionEstadoLote(Protocolo oRegistro, Protocolo oAnterior) From 2713bec0c6f3675431278efc778a0c3f29634467 Mon Sep 17 00:00:00 2001 From: caroPintos <77695282+caroPintos@users.noreply.github.com> Date: Tue, 3 Feb 2026 15:55:04 -0300 Subject: [PATCH 03/42] Mantenimiento Enero 2026 (#69) --- .../ControlResultados/ControlPlanilla.aspx.cs | 46 +- .../ControlResultados/ProtocoloList.aspx.cs | 51 +- WebLab/ImpresionResult/ResultadoList.aspx.cs | 19 +- WebLab/Protocolos/ProtocoloEdit2.aspx | 16 +- .../ProtocoloEdit2.aspx.designer.cs | 36 +- WebLab/Site1.Master | 2 +- WebLab/SiteTurnos.Master | 2 +- WebLab/Turnos/Default.aspx | 22 +- WebLab/Turnos/TurnoList.aspx | 10 +- WebLab/Turnos/TurnosEdit2.aspx | 101 +- WebLab/Turnos/TurnosEdit2.aspx.cs | 52 +- WebLab/controldecambios.html | 872 +++++++++--------- 12 files changed, 667 insertions(+), 562 deletions(-) diff --git a/WebLab/ControlResultados/ControlPlanilla.aspx.cs b/WebLab/ControlResultados/ControlPlanilla.aspx.cs index 6e86645f..ba6e3f64 100644 --- a/WebLab/ControlResultados/ControlPlanilla.aspx.cs +++ b/WebLab/ControlResultados/ControlPlanilla.aspx.cs @@ -190,31 +190,31 @@ protected void btnBuscar_Click(object sender, EventArgs e) //if (ddlArea.SelectedValue != "0") m_parametro += " AND i.idArea=" + ddlArea.SelectedValue; - Configuracion oCon = new Configuracion(); oCon = (Configuracion)oCon.Get(typeof(Configuracion), 1); - switch (oCon.TipoNumeracionProtocolo)// busqueda con autonumerico - { - case 0: - { + //Configuracion oCon = new Configuracion(); oCon = (Configuracion)oCon.Get(typeof(Configuracion), 1); + //switch (oCon.TipoNumeracionProtocolo)// busqueda con autonumerico + //{ + // case 0: + // { if (txtProtocoloDesde.Value != "") m_parametro += " And P.numero>=" + int.Parse(txtProtocoloDesde.Value); if (txtProtocoloHasta.Value != "") m_parametro += " AND P.numero<=" + int.Parse(txtProtocoloHasta.Value); - } break; - case 1: - { - if (txtProtocoloDesde.Value != "") m_parametro += " And P.numeroDiario>=" + int.Parse(txtProtocoloDesde.Value); - if (txtProtocoloHasta.Value != "") m_parametro += " AND P.numeroDiario<=" + int.Parse(txtProtocoloHasta.Value); - } break; - case 2: - { - if (txtProtocoloDesde.Value != "") m_parametro += " And P.numeroSector>=" + int.Parse(txtProtocoloDesde.Value); - if (txtProtocoloHasta.Value != "") m_parametro += " AND P.numeroSector<=" + int.Parse(txtProtocoloHasta.Value); - } break; - - case 3: - { - if (txtProtocoloDesde.Value != "") m_parametro += " And P.numeroTipoServicio>=" + int.Parse(txtProtocoloDesde.Value); - if (txtProtocoloHasta.Value != "") m_parametro += " AND P.numeroTipoServicio<=" + int.Parse(txtProtocoloHasta.Value); - } break; - } + // } break; + // case 1: + // { + // if (txtProtocoloDesde.Value != "") m_parametro += " And P.numeroDiario>=" + int.Parse(txtProtocoloDesde.Value); + // if (txtProtocoloHasta.Value != "") m_parametro += " AND P.numeroDiario<=" + int.Parse(txtProtocoloHasta.Value); + // } break; + // case 2: + // { + // if (txtProtocoloDesde.Value != "") m_parametro += " And P.numeroSector>=" + int.Parse(txtProtocoloDesde.Value); + // if (txtProtocoloHasta.Value != "") m_parametro += " AND P.numeroSector<=" + int.Parse(txtProtocoloHasta.Value); + // } break; + + // case 3: + // { + // if (txtProtocoloDesde.Value != "") m_parametro += " And P.numeroTipoServicio>=" + int.Parse(txtProtocoloDesde.Value); + // if (txtProtocoloHasta.Value != "") m_parametro += " AND P.numeroTipoServicio<=" + int.Parse(txtProtocoloHasta.Value); + // } break; + //} if (ddlEfector.SelectedValue != "0") m_parametro += " AND P.idEfectorSolicitante=" + ddlEfector.SelectedValue; diff --git a/WebLab/ControlResultados/ProtocoloList.aspx.cs b/WebLab/ControlResultados/ProtocoloList.aspx.cs index 8f067068..b839ef24 100644 --- a/WebLab/ControlResultados/ProtocoloList.aspx.cs +++ b/WebLab/ControlResultados/ProtocoloList.aspx.cs @@ -72,20 +72,47 @@ private object LeerDatos() /* Filtra los protocolos con analisis con formulas a calcular sin resultados*/ + //string m_strSQL = @" SELECT P.idProtocolo, P.numero as numero, cONVERT(varchar(10),P.fecha,103) as fecha, + // CASE + // WHEN Pa.idestado = 2 THEN CAST(Pa.numeroAdic AS varchar(20)) + // ELSE CAST(Pa.numeroDocumento AS varchar(20)) + // END AS dni, + // Pa.apellido+ ' ' + Pa.nombre as paciente, + // O.nombre as origen, Pri.nombre as prioridad, SS.nombre as sector,P.estado, P.impreso + // FROM Lab_Protocolo P with (nolock) + // INNER JOIN Lab_Origen O with (nolock) on O.idOrigen= P.idOrigen + // INNER JOIN Lab_Prioridad Pri with (nolock) on Pri.idPrioridad= P.idPrioridad + // INNER JOIN Sys_Paciente Pa with (nolock) on Pa.idPaciente= P.idPaciente + // INNER JOIN LAB_SectorServicio SS with (nolock) ON P.idSector= SS.idSectorServicio + // INNER JOIN LAB_DetalleProtocolo AS DP with (nolock) ON P.idProtocolo = DP.idProtocolo + // INNER JOIN LAB_Item AS I with (nolock) ON DP.idSubItem = I.idItem + // INNER JOIN LAB_Formula AS F with (nolock) ON I.idItem = F.idItem + // WHERE (F.idTipoFormula = 1) AND (P.estado =1) AND (DP.conResultado = 0) AND " + Request["Parametros"].ToString(); // +str_orden; + + /*Se reformula sql con mejor preformance para no mostrar protocolos duplicados */ string m_strSQL = @" SELECT P.idProtocolo, P.numero as numero, cONVERT(varchar(10),P.fecha,103) as fecha, - case when Pa.idestado=2 then Pa.numeroAdic else Pa.numeroDocumento end as dni,Pa.apellido+ ' ' + Pa.nombre as paciente, + CASE + WHEN Pa.idestado = 2 THEN CAST(Pa.numeroAdic AS varchar(20)) + ELSE CAST(Pa.numeroDocumento AS varchar(20)) + END AS dni, + LTRIM(RTRIM(ISNULL(Pa.apellido,'') + ' ' + ISNULL(Pa.nombre,''))) AS paciente, O.nombre as origen, Pri.nombre as prioridad, SS.nombre as sector,P.estado, P.impreso - FROM Lab_Protocolo P with (nolock) - INNER JOIN Lab_Origen O with (nolock) on O.idOrigen= P.idOrigen - INNER JOIN Lab_Prioridad Pri with (nolock) on Pri.idPrioridad= P.idPrioridad - INNER JOIN Sys_Paciente Pa with (nolock) on Pa.idPaciente= P.idPaciente - INNER JOIN LAB_SectorServicio SS with (nolock) ON P.idSector= SS.idSectorServicio - INNER JOIN LAB_DetalleProtocolo AS DP with (nolock) ON P.idProtocolo = DP.idProtocolo - INNER JOIN LAB_Item AS I with (nolock) ON DP.idSubItem = I.idItem - INNER JOIN LAB_Formula AS F with (nolock) ON I.idItem = F.idItem - WHERE (F.idTipoFormula = 1) AND (P.estado =1) AND (DP.conResultado = 0) AND " + Request["Parametros"].ToString(); // +str_orden; - - //" INNER JOIN Lab_Configuracion Con ON Con.idEfector= P.idEfector " + + FROM Lab_Protocolo P WITH (NOLOCK) + INNER JOIN Lab_Origen O WITH (NOLOCK) ON O.idOrigen = P.idOrigen + INNER JOIN Lab_Prioridad Pri WITH (NOLOCK) ON Pri.idPrioridad = P.idPrioridad + INNER JOIN Sys_Paciente Pa WITH (NOLOCK) ON Pa.idPaciente = P.idPaciente + INNER JOIN LAB_SectorServicio SS WITH (NOLOCK) ON P.idSector = SS.idSectorServicio + WHERE (P.estado =1) AND " + Request["Parametros"].ToString()+ + @" AND EXISTS ( SELECT 1 + FROM LAB_DetalleProtocolo DP WITH (NOLOCK) + + INNER JOIN LAB_Formula F WITH (NOLOCK) ON DP.idSubItem = F.idItem + WHERE DP.idProtocolo = P.idProtocolo and P.idEfector = DP.idEfector + AND DP.conResultado = 0 + AND F.idTipoFormula = 1 ) + order by P.numero " ; + + DataSet Ds = new DataSet(); // SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString); ///Performance: conexion de solo lectura diff --git a/WebLab/ImpresionResult/ResultadoList.aspx.cs b/WebLab/ImpresionResult/ResultadoList.aspx.cs index 77b83c5d..eb50a559 100644 --- a/WebLab/ImpresionResult/ResultadoList.aspx.cs +++ b/WebLab/ImpresionResult/ResultadoList.aspx.cs @@ -202,17 +202,24 @@ private object LeerDatos() string m_strSQL = ""; if (Request["idTipoServicio"].ToString() != "5") - m_strSQL = @" SELECT DISTINCT P.idProtocolo, - P.numero as numero, CONVERT(varchar(10),P.fecha,103) as fecha, case when Pa.idestado= 2 then Pa.numeroAdic else convert(varchar,Pa.numeroDocumento) end as dni ,Pa.apellido+ ' ' + Pa.nombre as paciente, + m_strSQL = @" SELECT P.idProtocolo, + P.numero as numero, CONVERT(varchar(10),P.fecha,103) as fecha, + CASE + WHEN Pa.idestado = 2 THEN CAST(Pa.numeroAdic AS varchar(20)) + ELSE CAST(Pa.numeroDocumento AS varchar(20)) + END as dni ,Pa.apellido+ ' ' + Pa.nombre as paciente, O.nombre as origen, Pri.nombre as prioridad, SS.nombre as sector,P.estado, P.impreso FROM Lab_Protocolo P (nolock) INNER JOIN Lab_Origen O (nolock) on O.idOrigen= P.idOrigen INNER JOIN Lab_Prioridad Pri (nolock) on Pri.idPrioridad= P.idPrioridad INNER JOIN Sys_Paciente Pa (nolock) on Pa.idPaciente= P.idPaciente - INNER JOIN LAB_SectorServicio SS (nolock) ON P.idSector= SS.idSectorServicio - INNER JOIN LAB_DetalleProtocolo AS DP (nolock) ON P.idProtocolo = DP.idProtocolo - INNER JOIN LAB_Item AS I (nolock) ON DP.idItem = I.idItem - WHERE " + str_condicion +str_orden; + INNER JOIN LAB_SectorServicio SS (nolock) ON P.idSector= SS.idSectorServicio + WHERE " + str_condicion + + @" AND EXISTS ( + SELECT 1 + FROM LAB_DetalleProtocolo DP WITH (NOLOCK) + WHERE DP.idProtocolo = P.idProtocolo + )"+ str_orden; else m_strSQL = @" SELECT DISTINCT P.idProtocolo, P.numero as numero, CONVERT(varchar(10),P.fecha,103) as fecha, M.nombre as muestra, C.descripcion as conservacion, diff --git a/WebLab/Protocolos/ProtocoloEdit2.aspx b/WebLab/Protocolos/ProtocoloEdit2.aspx index 12b331e0..9df5f915 100644 --- a/WebLab/Protocolos/ProtocoloEdit2.aspx +++ b/WebLab/Protocolos/ProtocoloEdit2.aspx @@ -493,7 +493,7 @@ -
+
@@ -574,11 +574,7 @@
-
- - Impresora de Etiquetas: - -
+ @@ -794,7 +790,13 @@ - +
+
+ + + +
+ diff --git a/WebLab/Protocolos/ProtocoloEdit2.aspx.designer.cs b/WebLab/Protocolos/ProtocoloEdit2.aspx.designer.cs index 8ff1ffc6..0aa6f601 100644 --- a/WebLab/Protocolos/ProtocoloEdit2.aspx.designer.cs +++ b/WebLab/Protocolos/ProtocoloEdit2.aspx.designer.cs @@ -633,24 +633,6 @@ public partial class ProtocoloEdit2 { /// protected global::Anthem.LinkButton lnkAgregarItem; - /// - /// pnlImpresoraAlta control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl pnlImpresoraAlta; - - /// - /// ddlImpresoraEtiqueta control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.DropDownList ddlImpresoraEtiqueta; - /// /// TxtDatosCargados control. /// @@ -912,6 +894,24 @@ public partial class ProtocoloEdit2 { /// protected global::WebLab.Calidad.IncidenciaEdit IncidenciaEdit1; + /// + /// pnlImpresoraAlta control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl pnlImpresoraAlta; + + /// + /// ddlImpresoraEtiqueta control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList ddlImpresoraEtiqueta; + /// /// txtObservacion control. /// diff --git a/WebLab/Site1.Master b/WebLab/Site1.Master index f63daa62..df05ef5f 100644 --- a/WebLab/Site1.Master +++ b/WebLab/Site1.Master @@ -222,7 +222,7 @@ document.onkeydown=checkKeyCode; font-weight: normal; font-size: 14px; font-family: Arial; - text-align:center;">Versión MultiEfector Dic.2025-22. " target="_blank" >Ver Cambios Version

+ text-align:center;">Versión MultiEfector Febrero 2026-03. " target="_blank" >Ver Cambios Version

diff --git a/WebLab/SiteTurnos.Master b/WebLab/SiteTurnos.Master index a7f26ac8..6dd0f9e1 100644 --- a/WebLab/SiteTurnos.Master +++ b/WebLab/SiteTurnos.Master @@ -222,7 +222,7 @@ document.onkeydown=checkKeyCode; font-weight: normal; font-size: 14px; font-family: Arial; - text-align:center;">Versión MultiEfector Dic.2025-22. " target="_blank" >Ver Cambios Version

+ text-align:center;">Versión MultiEfector Febrero 2026-03" target="_blank" >Ver Cambios Version

diff --git a/WebLab/Turnos/Default.aspx b/WebLab/Turnos/Default.aspx index d9b785df..7bfe40d8 100644 --- a/WebLab/Turnos/Default.aspx +++ b/WebLab/Turnos/Default.aspx @@ -226,7 +226,7 @@ Tipo de Doc.: - + DNI Temporal @@ -241,7 +241,7 @@ Nro. Documento: + onblur="valNumeroSinPunto(this)" maxlength="8" tabindex="1" style="width: 100px"/> * - + --Seleccione-- Femenino Masculino @@ -276,7 +276,7 @@ @@ -294,14 +294,14 @@ Apellidos: - + Nombres: - + @@ -309,7 +309,7 @@ DU Madre/Tutor: + onblur="valNumero(this)" style="width: 150px" maxlength="8" tabindex="7"/> Sólo numeros (sin puntos ni espacios) @@ -318,7 +318,7 @@ Apellido Madre/Tutor: - @@ -327,14 +327,14 @@ Nombres/s Madre/Tutor: - +   - + @@ -354,7 +354,7 @@ + EmptyDataText="No se encontraron pacientes para los parametros de busqueda ingresados" ForeColor="#666666" GridLines="Horizontal" onpageindexchanging="gvLista_PageIndexChanging" onrowcommand="gvLista_RowCommand" onrowdatabound="gvLista_RowDataBound" PageSize="13" Width="100%" TabIndex="11"> diff --git a/WebLab/Turnos/TurnoList.aspx b/WebLab/Turnos/TurnoList.aspx index 4e247901..a830b6bd 100644 --- a/WebLab/Turnos/TurnoList.aspx +++ b/WebLab/Turnos/TurnoList.aspx @@ -78,20 +78,18 @@ - -
+   - + -
-
+
  - + 2.- Seleccione Fecha del Turno diff --git a/WebLab/Turnos/TurnosEdit2.aspx b/WebLab/Turnos/TurnosEdit2.aspx index f1619fba..6783aa60 100644 --- a/WebLab/Turnos/TurnosEdit2.aspx +++ b/WebLab/Turnos/TurnosEdit2.aspx @@ -53,6 +53,42 @@ + + + + @@ -341,68 +377,61 @@
Diagnósticos Presuntivos - Codificación CIE 10 - + +
- - - - - - - - - - + + + + - - - - + - - - + + + + + - -
- Codigo:     + + Codigo:     -
- Nombre:   +
+ Nombre:   -
- -
-
+ Diagnosticos encontrados -   - Diagnosticos del Paciente
+ + CssClass="form-control input-sm" Height="150px" Width="800px"> +
-

+
+ +
+ Diagnosticos del Paciente
-
+ + +
diff --git a/WebLab/Turnos/TurnosEdit2.aspx.cs b/WebLab/Turnos/TurnosEdit2.aspx.cs index 188ac2ba..9fc63d8e 100644 --- a/WebLab/Turnos/TurnosEdit2.aspx.cs +++ b/WebLab/Turnos/TurnosEdit2.aspx.cs @@ -92,33 +92,37 @@ protected void Page_Load(object sender, EventArgs e) { CargarListas(); lblTitulo.Text = "NUEVO TURNO"; - DateTime m_fecha =DateTime.Parse(Session["Turno_Fecha"].ToString()); - string m_tipoServicio = Session["Turno_IdTipoServicio"].ToString(); - string m_hora = Session["Turno_Hora"].ToString(); - string m_iditem = Session["idItem"].ToString(); - - lblFecha.Text = m_fecha.ToShortDateString(); - lblHora.Text = m_hora; - lblIdTipoServicio.Text = m_tipoServicio; - - TipoServicio oServicio = new TipoServicio(); - oServicio = (TipoServicio)oServicio.Get(typeof(TipoServicio), int.Parse(m_tipoServicio)); + if (Session["Turno_Fecha"] != null) + { + DateTime m_fecha = DateTime.Parse(Session["Turno_Fecha"].ToString()); + string m_tipoServicio = Session["Turno_IdTipoServicio"].ToString(); + string m_hora = Session["Turno_Hora"].ToString(); + string m_iditem = Session["idItem"].ToString(); + lblFecha.Text = m_fecha.ToShortDateString(); + lblHora.Text = m_hora; + lblIdTipoServicio.Text = m_tipoServicio; + + TipoServicio oServicio = new TipoServicio(); + oServicio = (TipoServicio)oServicio.Get(typeof(TipoServicio), int.Parse(m_tipoServicio)); - if (m_iditem != "0") - { - Item oItem = new Item(); - oItem = (Item)oItem.Get(typeof(Item), int.Parse(m_iditem)); - string sDatos = ""; - sDatos += "#" +oItem.Codigo+ "#" + oItem.Nombre + "@"; - TxtDatos.Value = sDatos; - } - if (oServicio!=null) - lblTipoServicio.Text = oServicio.Nombre; - - MostrarPaciente(); - + if (m_iditem != "0") + { + Item oItem = new Item(); + oItem = (Item)oItem.Get(typeof(Item), int.Parse(m_iditem)); + string sDatos = ""; + sDatos += "#" + oItem.Codigo + "#" + oItem.Nombre + "@"; + TxtDatos.Value = sDatos; + } + + if (oServicio != null) + lblTipoServicio.Text = oServicio.Nombre; + + MostrarPaciente(); + } + else + Response.Redirect("../FinSesion.aspx", false); } chkImprimir.Visible = false; lnkReimprimirComprobante.Visible = false; diff --git a/WebLab/controldecambios.html b/WebLab/controldecambios.html index 19155e4e..e9f27f9f 100644 --- a/WebLab/controldecambios.html +++ b/WebLab/controldecambios.html @@ -34,487 +34,525 @@

Lista de cambios en SIL2

-
2025.12.22
+
2026.02.03
    -
  • - Protocolos: -
      -
    • Se agregan mejoras al control existente de ingreso de determinaciones contenidas en otras.
    • -
    • Se agrega mejora para evitar que protocolos de Laboratorio General se graben como de Microbiologia y viceversa.
    • -
    -
  • -
  • - Placas R1 y R2 (ALPLEX): Se corrige y mejora visualizacion de resultados positivos de la placas de LNC. + Calculo Masivo de Formulas: Se corrige error reportado por Laboratorio Andacollo y se realizan mejoras para que no se muestre el mismo protocolo mas una vez.
  • - Estadisticas-Grupos Etareos: Se cambia el grupo etareo de "1 a 2 (aos)" por "12 a 23 m (meses)" de acuerdo a lo determinado por Nacion - SNVS. + Turnos:Mejora en la carga de diagnsticos, incorporando una visualizacin ampliada del control de seleccin para facilitar su uso.
  • -
-
2025.12.15
-
  • - API Resultados para ANDES: -
      -
    • Se corrige para mostrar las observaciones de los resultados numericos.
    • -
    • Se corrige para mostrar las derivaciones de microbiologia.
    • -
    + Protocolo:Mejora en la visualizacin y seleccin de la impresora durante la carga de protocolos, permitiendo elegir la impresora fuera del panel de determinaciones.
  • - Derivaciones: Se agrega posibilidad de imprimir etiquetas sin condicionamiento de que se encuentren las derivaciones en un lote.Cambio de Funcionalidad -
  • -
  • - Carga Resultados Microbiologia:Se habilita la carga de resultados en aislamientos y antibiogramas desde la opcin Carga (Perfil Administrativo) Nueva Funcionalidad: -
      -
    • Cuando no existen datos validados en aislamientos y antibiogramas.
    • -
    • Pero s existen datos validados en la solapa de anlisis principal.
    • -
    • En la edicion de Antibiograma se habilita la modificacion de Mecanismos de Resistencia (en Perfil Administrativo)
    • -
    -
  • -
  • - Listado Ordenado. Se corrige error que no mostraba todas las determinaciones de los protocolos en algunos casos. + Permisos Agenda:Se habilita permisos, de carga/modificacion/eliminaciones de Agendas al perfil Administrativo.
  • -
-
2025.12.11
-
    -
  • - Mecanismos de Resistencia en Microbiologia: Se agrega posibilidad de modificar los mecanismos de resistencia de ATB cargados previamente (desde Validacion).Nueva Funcionalidad -
  • -
  • - Usuarios: Se agrega posibilidad de cambiar estado (Activo/Inactivo) de los usuarios, desde el perfil Bioquimico, de cada Laboratorio.Nueva Funcionalidad -
  • -
+ +
2026.02.02
+
    -
    2025.12.04
    -
      -
    • Derivaciones:Se realizan mejoras en el PDF de Control de Derivaciones; agregando el estado de la derivacion entre otras mejoras.Nueva Funcionalidad -
    • -
    • - Mecanismos de Resistencia en Microbiologia: API Resultados para ANDES. Se corrige visualizacion en casos de mas un ATB con mas de un mecanismo de resistencia. -
    • -
    -
    2025.12.02
    -
      -
    • - Mecanismos de Resistencia en Microbiologia:Se corrige error en boton "Mostrar Resultados anteriores" reportado por JNA -
    • -
    • - Valor de Referencia: Ajuste en forma de determinar el valor de referencia por paciente: -
        -
      • Si el diagnstico indica embarazo (cdigo Z32.1), se asigna el VR especfico para Embarazada (E).
      • -
      • Si no existe un VR definido para embarazadas en la configuracin, se utiliza en primera instancia el VR correspondiente a Femenino (F).
      • -
      • Si tampoco existe un VR definido para Femenino, se utiliza el VR de Indistinto (I), que aplica a cualquier sexo.
      • -
      -
    • -
    - -
    2025.11.18
    +
  • + Lote: Se modifica para que permita el ingreso de fecha y hora a futuro del retiro del lote. +
  • +
  • + Estado Derivaciones: Se agrega mas trazabilidad en el estado de la derivacion desde la visualizacion de resultados (sil y Andes); desde que se genera la derivacion hasta que es recibida en Destino. +
  • + + +
+
2026.01.29
  • - Mecanismos de Resistencia en Microbiologia: -
      -
    • Se agrega la posibilidad de registrar en los ATB multiples mecanismos de resistencia. Nueva Funcionalidad
    • -
    • Se corrige edicion de ATB con mecanismos de resistencia, entre otras mejoras relacionadas
    • -
    -
  • - Derivaciones: Se agrega posibilidad de descargar PDF de derivaciones en cualquier estado de la derivacion.Nueva Funcionalidad -
  • -
  • - Interoperabilidad SNVS: Se inhabilita servicio para Eventos Sifilis. + Resultados a SISA: Se agrega nuevo parametro de interoperabilidad de unidad de edad del paciente a informar (aos, meses, dias).
  • +
+ +
2025.12.22
+
    + +
  • + Protocolos: Se agrega mejora para evitar que protocolos de Laboratorio General se graben como de Microbiologia y viceversa. +
  • +
  • + Placas R1 y R2 (ALPLEX): Se corrige y mejora visualizacion de resultados positivos de la placas de LNC. +
  • +
  • + Estadisticas-Grupos Etareos: Se cambia el grupo etareo de "1 a 2 (aos)" por "12 a 23 m (meses)" de acuerdo a lo determinado por Nacion - SNVS. +
  • +
+
2025.12.15
+
    +
  • + API Resultados para ANDES: +
      +
    • Se corrige para mostrar las observaciones de los resultados numericos.
    • +
    • Se corrige para mostrar las derivaciones de microbiologia.
    • +
    +
  • +
  • + Derivaciones: Se agrega posibilidad de imprimir etiquetas sin condicionamiento de que se encuentren las derivaciones en un lote.Cambio de Funcionalidad +
  • +
  • + Carga Resultados Microbiologia:Se habilita la carga de resultados en aislamientos y antibiogramas desde la opcin Carga (Perfil Administrativo) Nueva Funcionalidad: +
      +
    • Cuando no existen datos validados en aislamientos y antibiogramas.
    • +
    • Pero s existen datos validados en la solapa de anlisis principal.
    • +
    • En la edicion de Antibiograma se habilita la modificacion de Mecanismos de Resistencia (en Perfil Administrativo)
    • +
    +
  • +
  • + Listado Ordenado. Se corrige error que no mostraba todas las determinaciones de los protocolos en algunos casos. +
  • -
+ +
2025.12.11
+
    +
  • + Mecanismos de Resistencia en Microbiologia: Se agrega posibilidad de modificar los mecanismos de resistencia de ATB cargados previamente (desde Validacion).Nueva Funcionalidad +
  • +
  • + Usuarios: Se agrega posibilidad de cambiar estado (Activo/Inactivo) de los usuarios, desde el perfil Bioquimico, de cada Laboratorio.Nueva Funcionalidad +
  • +
-
2025.11.11
-
    -
  • - - Mecanismos de Resistencia en Microbiologia:Nuevas Funcionalidades -
      -
    • Se agreg la posibilidad de registrar en los ATB el mecanismo de resistencia.
    • -
    • En la validacion de resultados, al clickear "Mostrar Resultados Anteriores" se muestra el ultimo mecanismo de resistencia registrado en antibiogramas previos del mismo paciente o muestra (si es que hubiera)
    • +
      2025.12.04
      +
        +
      • + Derivaciones:Se realizan mejoras en el PDF de Control de Derivaciones; agregando el estado de la derivacion entre otras mejoras.Nueva Funcionalidad +
      • +
      • + Mecanismos de Resistencia en Microbiologia: API Resultados para ANDES. Se corrige visualizacion en casos de mas un ATB con mas de un mecanismo de resistencia. +
      • +
      +
      2025.12.02
      +
        +
      • + Mecanismos de Resistencia en Microbiologia:Se corrige error en boton "Mostrar Resultados anteriores" reportado por JNA +
      • +
      • + Valor de Referencia: Ajuste en forma de determinar el valor de referencia por paciente: +
          +
        • Si el diagnstico indica embarazo (cdigo Z32.1), se asigna el VR especfico para Embarazada (E).
        • +
        • Si no existe un VR definido para embarazadas en la configuracin, se utiliza en primera instancia el VR correspondiente a Femenino (F).
        • +
        • Si tampoco existe un VR definido para Femenino, se utiliza el VR de Indistinto (I), que aplica a cualquier sexo.
        • +
        +
      • +
      -
    • En la visualizacion de resultados por pantalla y en los PDF se agreg el mecanismo de resistencia en los ATB de forma destacada.
    • +
      2025.11.18
      +
        +
      • + Mecanismos de Resistencia en Microbiologia: +
          +
        • Se agrega la posibilidad de registrar en los ATB multiples mecanismos de resistencia. Nueva Funcionalidad
        • +
        • Se corrige edicion de ATB con mecanismos de resistencia, entre otras mejoras relacionadas
        • +
        +
      • + Derivaciones: Se agrega posibilidad de descargar PDF de derivaciones en cualquier estado de la derivacion.Nueva Funcionalidad +
      • +
      • + Interoperabilidad SNVS: Se inhabilita servicio para Eventos Sifilis. +
      • + +
      + +
      2025.11.11
      +
        +
      • + + Mecanismos de Resistencia en Microbiologia:Nuevas Funcionalidades +
          +
        • Se agreg la posibilidad de registrar en los ATB el mecanismo de resistencia.
        • +
        • En la validacion de resultados, al clickear "Mostrar Resultados Anteriores" se muestra el ultimo mecanismo de resistencia registrado en antibiogramas previos del mismo paciente o muestra (si es que hubiera)
        • + +
        • En la visualizacion de resultados por pantalla y en los PDF se agreg el mecanismo de resistencia en los ATB de forma destacada.
        • -
        • - Se agreg en el servicio que consume ANDES la visualizacion del Mecanismo de resistencia en ATB.
        • -
        • - Estadsticas Microbiologa: -
          • - Se agreg una nueva solapa "Mecanismos de Resistencia" con las cantidades registradas por determinacion, grupo etario, sexo y tipo de muestra. -
          • + Se agreg en el servicio que consume ANDES la visualizacion del Mecanismo de resistencia en ATB. +
          • - Se incorpora la funcionalidad para exportar a Excel el listado de pacientes con mecanismos de resistencia registrados
          • + Estadsticas Microbiologa: +
              +
            • + Se agreg una nueva solapa "Mecanismos de Resistencia" con las cantidades registradas por determinacion, grupo etario, sexo y tipo de muestra. +
            • +
            • + Se incorpora la funcionalidad para exportar a Excel el listado de pacientes con mecanismos de resistencia registrados +
            -
          - - - +
        + + +
      • Placas VR2: Se ajusta visualizacion en placas de virus respiratorios. - +
      • - -
      - -
      2025.11.05
      -
        -
      • - Derivaciones No Pacientes: Se agrega posibilidad de incluir en los lotes derivaciones del modulo de no pacientes y recibirlos en destino. - Nueva Funcionalidad -
      • +
      -
    -
    2025.10.30
    -
      -
    • - Interoperabilidad SISA: Se corrige notificacion de mas un resultado por muestra y evento. -
    • -
    • - Carga/Validacion por HT: Se modifica para que las determinaciones de seleccion multiple se seleccione por defecto desde una lista desplegable de selccion simple y se habilita un boton para seleccion multiple en caso de requerir. - Cambio de funcionalidad -
    • -
    • - Carga/Validacion por Analisis: Se modifica para que las determinaciones se listen ordenadas por fecha y numero de protocolo. - Cambio de funcionalidad -
    • -
    • - Impresion de Etiquetas: Se cargan las siglas de las areas que impactaran en la impresion de etiquetas. - Nueva Funcionalidad -
    • +
      2025.11.05
      +
        +
      • + Derivaciones No Pacientes: Se agrega posibilidad de incluir en los lotes derivaciones del modulo de no pacientes y recibirlos en destino. -
      -
      2025.10.29
      -
        -
      • - Edicion de Protocolos: Se corrige error "Codigo de analisis no existe o no es valido" al momento de editar un protocolo (pacientes y no pacientes). -
      • -
      • - Edicion de Determinaciones desde Validacion:Se corrige que no generaba la derivacion en los casos que si debe generar. -
      • -
      • - Configuracion Determinaciones:Se cambia para que no sea posible eliminar determinaciones creadas; solo modificar o inhabilitar. - Cambio de funcionalidad -
      • -
      • - Impresion de Etiquetas: Se agreg la posibilidad de imprimir las siglas de las areas (sujeto a que se definan dichas siglas) - Nueva Funcionalidad -
      • + Nueva Funcionalidad + -
      -
      2025.10.22
      -
        -
      • - Interoperabilidad LNC :Se cambia interoperabilidad de tipo de muestras Hisopado y Aspirado en SISA y en ANDES. -
      • -
      +
    +
    2025.10.30
    +
      +
    • + Interoperabilidad SISA: Se corrige notificacion de mas un resultado por muestra y evento. +
    • +
    • + Carga/Validacion por HT: Se modifica para que las determinaciones de seleccion multiple se seleccione por defecto desde una lista desplegable de selccion simple y se habilita un boton para seleccion multiple en caso de requerir. + Cambio de funcionalidad +
    • +
    • + Carga/Validacion por Analisis: Se modifica para que las determinaciones se listen ordenadas por fecha y numero de protocolo. + Cambio de funcionalidad +
    • +
    • + Impresion de Etiquetas: Se cargan las siglas de las areas que impactaran en la impresion de etiquetas. + Nueva Funcionalidad +
    • -
      2025.10.20
      -
        -
      • - Lista de Lotes: Se agrega nuevo punto de menu en Derivaciones-->Lista de Lotes con la posibilidad de obtener una trazabilidad de los cambios de estado de los mismos. - - Nueva Funcionalidad 1er. version de funcionalidad. Se agregaran mas cambios -
      • -
      • - Ingreso de Protocolos:Se corrige ingreso de determinaciones desde turno para que tome el mismo orden en que fueron ingresadas en el turno. -
      • -
      • - Interoperabilidad SISA:Mejora en performance de notificacion. -
      • -
      • - Placas LC:Se readapta interpretacion de resultados de acuerdo a nueva forma de informar (antes en mayusculas). -
      • -
      • - Panel Seguimiento Diario LC:Se ordena listado por numero de protocolo de menor a mayor. -
      • -
      • - Ingreso de FFEE:Se adapta control de ingreso de paciente con la misma muestra en el mismo dia controlando que sea por efector. - Cambio de Funcionalidad -
      • +
      +
      2025.10.29
      +
        +
      • + Edicion de Protocolos: Se corrige error "Codigo de analisis no existe o no es valido" al momento de editar un protocolo (pacientes y no pacientes). +
      • +
      • + Edicion de Determinaciones desde Validacion:Se corrige que no generaba la derivacion en los casos que si debe generar. +
      • +
      • + Configuracion Determinaciones:Se cambia para que no sea posible eliminar determinaciones creadas; solo modificar o inhabilitar. + Cambio de funcionalidad +
      • +
      • + Impresion de Etiquetas: Se agreg la posibilidad de imprimir las siglas de las areas (sujeto a que se definan dichas siglas) + Nueva Funcionalidad +
      • -
      -
      2025.10.15
      -
        -
      • - Lote de derivacion: Se corrige error reportado al seleccionar un lote con derivaciones borradas. +
      +
      2025.10.22
      +
        +
      • + Interoperabilidad LNC :Se cambia interoperabilidad de tipo de muestras Hisopado y Aspirado en SISA y en ANDES. +
      • +
      - +
      2025.10.20
      +
        +
      • + Lista de Lotes: Se agrega nuevo punto de menu en Derivaciones-->Lista de Lotes con la posibilidad de obtener una trazabilidad de los cambios de estado de los mismos. + Nueva Funcionalidad 1er. version de funcionalidad. Se agregaran mas cambios +
      • +
      • + Ingreso de Protocolos:Se corrige ingreso de determinaciones desde turno para que tome el mismo orden en que fueron ingresadas en el turno. +
      • +
      • + Interoperabilidad SISA:Mejora en performance de notificacion. +
      • +
      • + Placas LC:Se readapta interpretacion de resultados de acuerdo a nueva forma de informar (antes en mayusculas). +
      • +
      • + Panel Seguimiento Diario LC:Se ordena listado por numero de protocolo de menor a mayor. +
      • +
      • + Ingreso de FFEE:Se adapta control de ingreso de paciente con la misma muestra en el mismo dia controlando que sea por efector. + Cambio de Funcionalidad +
      • -
      -
      2025.10.14
      -
        -
      • - Etiquetas de CB:Se habilita desde los Parametros del SI la posibilidad de incluir la impresion del - tipo de muestra en la etiqueta de Microbiologia - Nueva Funcionalidad +
      +
      2025.10.15
      +
        +
      • + Lote de derivacion: Se corrige error reportado al seleccionar un lote con derivaciones borradas. +
      • - -
      • - Recepcion de FFEE: Se ajustan parametros para la recepcion de fichas electronicas para determinaciones del Laboratorio Central (LNC) -
      • -
      • - Interoperabilidad SISA: Se migran los eventos que informa Laboratorio Central (LNC) en el SIL1 al SIl2 Nueva Funcionalidad: -
          -
        • COVID-19, Influenza y OVR en ambulatorios (No UMAs)
        • -
        • Internado y/o fallecido por COVID o IRA
        • -
        • Monitoreo de SARS COV-2 y OVR en ambulatorios
        • -
        • Unidad Centinela de Infeccin Respiratoria Aguda Grave (UC-IRAG)
        • -
        • Chagas agudo congenito
        • -
        • Hantavirosis
        • -
        • Hantavirus en estudio de contactos estrechos
        • +
        +
        2025.10.14
        +
          +
        • + Etiquetas de CB:Se habilita desde los Parametros del SI la posibilidad de incluir la impresion del + tipo de muestra + en la etiqueta de Microbiologia + Nueva Funcionalidad - -
        -
      • -
      -
      2025.10.08
      -
        -
      • - Generacion de PDF: Se corrige error reportado del limite de conexiones. +
      • +
      • + Recepcion de FFEE: Se ajustan parametros para la recepcion de fichas electronicas para determinaciones del Laboratorio Central (LNC) -
      • - + +
      • + Interoperabilidad SISA: Se migran los eventos que informa Laboratorio Central (LNC) en el SIL1 al SIl2 Nueva Funcionalidad: +
          +
        • COVID-19, Influenza y OVR en ambulatorios (No UMAs)
        • +
        • Internado y/o fallecido por COVID o IRA
        • +
        • Monitoreo de SARS COV-2 y OVR en ambulatorios
        • +
        • Unidad Centinela de Infeccin Respiratoria Aguda Grave (UC-IRAG)
        • +
        • Chagas agudo congenito
        • +
        • Hantavirosis
        • +
        • Hantavirus en estudio de contactos estrechos
        • -
        -
        2025.10.02
        -
          -
        • - Etiquetas de Derivaciones: Se modifica para imprimir etiquetas incluidas en un lote generado o enviado. Nueva Funcionalidad +
        +
      • - - +
      +
      2025.10.08
      +
        +
      • + Generacion de PDF: Se corrige error reportado del limite de conexiones. -
      -
      2025.09.29
      -
        -
      • Derivacion: Se agrega posibilidad de descargar PDF en los listados de derivaciones -
      • -
      • - Resultados anteriores en Validacion: Se cambia logica de busqueda de resultados anteriores. -
      • -
      • - Presentacion en Validacion: Se amplia tamao de prompt para que se pueda seleccionar presentaciones de nombres largos y quede visible el boton Guardar. -
      • -
      • - Laboratorio Central: Se habilita agregan nuevas determinaciones en panel de Seguimiento Diario. -
      • - -
      -
      2025.09.25
      -
        -
      • - Derivacion por Lotes: Se habilita la generacion y recepcion de derivaciones por lote. Nueva Funcionalidad -
      • -
      • - Laboratorio Central: Se habilita panel de Seguimiento. -
      • -
      • - Estadistica de Produccion: Se corrige la generacion por Efector. -
      • -
      - -
      2025.09.11
      -
        -
      • - Estadistica Microbiologia: Se corrige calculo de cantidad de protocolos con protocolos con multiples diagnosticos. -
      • -
      • - Placas Laboratorio Central: Se habilita funcionalidad de automatizacion de Placas. Nueva Funcionalidad +
      • - -
      • - Estado Protocolos: Se cambia para que cuando un protocolo Terminado no cambie su estado cuando se gestionen las derivaciones. - Nueva Funcionalidad -
      • +
      +
      2025.10.02
      +
        +
      • + Etiquetas de Derivaciones: Se modifica para imprimir etiquetas incluidas en un lote generado o enviado. Nueva Funcionalidad -
      -
      2025.09.02
      -
        -
      • - Etiquetas de CB: Se habilit una nueva solapa denominada "Etiquetas reas" en los Parmetros del SI. Esta permite seleccionar qu reas imprimirn etiquetas al momento del alta de un nuevo protocolo por parte del efector. - Las reas no destinadas a impresin, como por ejemplo el rea Administrativa, no estarn disponibles para su seleccin.Nueva funcionalidad -
      • -
      • - Resultados a SISA Interoperabilidad: Se cambia usuario de interoperabilidad y forma de obtenerlo. -
      • -
      -
      2025.08.07
      -
        -
      • - Nomenclador de Recupero Financiero: Se vinculan las determinaciones al nomenclador. -
      • + -
      • - Estadistica Resultado Predefinido: Se ajusta conteo de pacientes en descarga de excel o pdf de pacientes cuando se destilda "Incluir sin Diagnostico". -
      • -
      -
      2025.08.06
      -
        -
      • - Configuracion Determinaciones: se agrega nueva solapa con visualizacion de Autoanalizadores a los que est vinculados la determinacion; con el objetivo de automatizar, en proximas actualizaciones, la determinacion de valor de referencia por equipo. Nueva funcionalidad -
      • -
      • - Resultados a SISA Interoperabilidad: Nueva funcionalidad -
          -
        • Se amplian los resultados a interoperar para los eventos Sifilis y Sifilis en Personas Gestantes
        • -
        • Se agrega nuevo evento Sifilis congnita
        • -
        - -
      • -
      • - Hoja de trabajo: se agrega nuevo parametro para Imprimir Diagnostico. Nueva funcionalidad -
      • -
      • - Conexion con MPI Andes: se modifica para que cuando no traiga todos los datos basicos del paciente no muestre error, solo muestre los datos encontrados. Mejora funcionalidad -
      • -
      • - Resultados a SISA Interoperabilidad: Se corrige cuando el paciente no tiene domicilio cargado, se genera error. Se cambia para que se informen "Sin Datos" en SISA. Mejora funcionalidad -
      • -
      -
      2025.07.21
      -
        -
      • - Resultados a SISA Interoperabilidad: Se corrige error detectado en la interoperabilidad de muestras
      • +
      +
      2025.09.29
      +
        +
      • + Derivacion: Se agrega posibilidad de descargar PDF en los listados de derivaciones +
      • +
      • + Resultados anteriores en Validacion: Se cambia logica de busqueda de resultados anteriores. +
      • +
      • + Presentacion en Validacion: Se amplia tamao de prompt para que se pueda seleccionar presentaciones de nombres largos y quede visible el boton Guardar. +
      • +
      • + Laboratorio Central: Se habilita agregan nuevas determinaciones en panel de Seguimiento Diario. +
      • -
      -
      2025.07.18
      -
        -
      • - Resultados a SISA Interoperabilidad: TBC . Se agrega nuevo evento para interoperar Nueva funcionalidad
      • - +
      +
      2025.09.25
      +
        +
      • + Derivacion por Lotes: Se habilita la generacion y recepcion de derivaciones por lote. Nueva Funcionalidad +
      • +
      • + Laboratorio Central: Se habilita panel de Seguimiento. +
      • +
      • + Estadistica de Produccion: Se corrige la generacion por Efector. +
      • +
      -
    +
    2025.09.11
    +
      +
    • + Estadistica Microbiologia: Se corrige calculo de cantidad de protocolos con protocolos con multiples diagnosticos. +
    • +
    • + Placas Laboratorio Central: Se habilita funcionalidad de automatizacion de Placas. Nueva Funcionalidad -
      2025.07.10
      -
        -
      • - Resultados a SISA Interoperabilidad: -
          -
        • Se cambi filtro de busqueda de "Determinacion" por "Evento a informar".Cambio de funcionalidad
        • -
        • Se mejora bsqueda de datos, al selecionar evento o resultado de recarga la grilla de datos.Nueva funcionalidad
        • -
        • Se agreg log de errores para control cuando no interopera con algun evento, para uso interno.Nueva funcionalidad
        • -
        • Se agreg control de error para cuando el dato "telefono" supera la cantidad de caracteres con los que se puede interoperar.
        • + +
        • + Estado Protocolos: Se cambia para que cuando un protocolo Terminado no cambie su estado cuando se gestionen las derivaciones. + Nueva Funcionalidad +
        • -
        -
      • +
      +
      2025.09.02
      +
        +
      • + Etiquetas de CB: Se habilit una nueva solapa denominada "Etiquetas reas" en los Parmetros del SI. Esta permite seleccionar qu reas imprimirn etiquetas al momento del alta de un nuevo protocolo por parte del efector. + Las reas no destinadas a impresin, como por ejemplo el rea Administrativa, no estarn disponibles para su seleccin.Nueva funcionalidad +
      • -
      -
      2025.07.03
      -
        -
      • - Estadisticas Producccin: -
          -
        • Se mejor el tiempo de respuesta del proceso mediante una optimizacin interna de las consultas de datos.
        • -
        • Se incorpor una validacin para limitar la generacin de informacin a un mximo de un ao.
        • -
        • Se implement un control para evitar mltiples solicitudes de informacin al hacer doble clic en el botn 'Generar Reporte' durante la misma sesin de usuario
        • +
        • + Resultados a SISA Interoperabilidad: Se cambia usuario de interoperabilidad y forma de obtenerlo. +
        • +
        +
        2025.08.07
        +
          +
        • + Nomenclador de Recupero Financiero: Se vinculan las determinaciones al nomenclador. +
        • +
        • + Estadistica Resultado Predefinido: Se ajusta conteo de pacientes en descarga de excel o pdf de pacientes cuando se destilda "Incluir sin Diagnostico". +
        • +
        +
        2025.08.06
        +
          +
        • + Configuracion Determinaciones: se agrega nueva solapa con visualizacion de Autoanalizadores a los que est vinculados la determinacion; con el objetivo de automatizar, en proximas actualizaciones, la determinacion de valor de referencia por equipo. Nueva funcionalidad +
        • +
        • + Resultados a SISA Interoperabilidad: Nueva funcionalidad +
            +
          • Se amplian los resultados a interoperar para los eventos Sifilis y Sifilis en Personas Gestantes
          • +
          • Se agrega nuevo evento Sifilis congnita
          • +
          -
        -
      • + +
      • + Hoja de trabajo: se agrega nuevo parametro para Imprimir Diagnostico. Nueva funcionalidad +
      • +
      • + Conexion con MPI Andes: se modifica para que cuando no traiga todos los datos basicos del paciente no muestre error, solo muestre los datos encontrados. Mejora funcionalidad +
      • +
      • + Resultados a SISA Interoperabilidad: Se corrige cuando el paciente no tiene domicilio cargado, se genera error. Se cambia para que se informen "Sin Datos" en SISA. Mejora funcionalidad +
      • -
      -
      2025.06.30
      -
        -
      • - Usuarios: Se agrega posibilidad de descargar a excel.Nueva funcionalidad -
      • - -
      -
      2025.06.25
      -
        -
      • - API Resultados para ANDES. Se agrega posibilidad de mostrar protocolos de microbiologia con ATB validados y sin determinaciones validadas.Nueva funcionalidad -
      • -
      • - Estadistica de Turnos: Se agrega control para que las fechas ingresadas sean vlidas. -
      • -
      • - Resultados de Contador Hematologico 5 poblaciones: Calculo automtico de frmulas.Nueva funcionalidad -
      • - -
      +
    +
    2025.07.21
    +
      +
    • + Resultados a SISA Interoperabilidad: Se corrige error detectado en la interoperabilidad de muestras +
    • -
      2025.06.10
      -
        -
      • - Estadistica de Detalle de Derivaciones: Se agrega descarga de excel con determinaciones derivadas desde efector.Nueva funcionalidad -
      • -
      • - Estadistica de Turnos: Se agrega estadistica consolidada por todos los efectores para nivel central.Nueva funcionalidad -
      • -
      • - Derivaciones: Se corrige perdida del dato de usuario de registracion el momento de la derivacion. -
      • -
      • - Adjuntos de Resultados: Se habilita para que se pueda adjuntar mas un archivo por determinacin.Nueva funcionalidad -
      • -
      • - - Resultados Predefinidos Multiples: se agrega la opcion de borrar resultados ingresado previamente.Nueva funcionalidad -
          -
        • Carga / Validacion por Hoja de Trabajo
        • -
        • Carga / Validacion por Analisis
        • +
        +
        2025.07.18
        +
          +
        • + Resultados a SISA Interoperabilidad: TBC . Se agrega nuevo evento para interoperar Nueva funcionalidad +
        • -
        -
      • -
      -
      2025.06.03
      -
        -
      • - Hoja Trabajo a Demanda: Se corrige para que muestre determinaciones que forman parte de Determinaciones compuestas. -
      • -
      • - Turnos: Se habilita la modificacion de turnos del dia y a futuro. -
      • -
      -
      2025.06.02
      -
        - -
      • - Generacion de Hoja de Trabajo: Se corrige que no mostraban los antecedentes en las hojas marcadas con esta opcion. - Los antecedentes se muestran considerando el resultado anterior del paciente para una determincion en cualquier laboratorio. -
      • -
      • - Estadistica: Cambio de nombre de origen "Externo" por "Ambulatorio". -
      • -
      -
      2025.05.28
      -
        -
      • +
      - Carga / Validacion por Hoja de Trabajo -
        -
      • Se corrige alineacin de la grilla cuando tiene determinaciones con resultados predefinidos multiples.
      • -
      • Resultados Predefinidos Multiples: Se saca boton para agregar opcion; reemplazando por el click en la caja de texto para mostrar y elegir las opciones multiplesNueva funcionalidad
      • - +
        2025.07.10
        +
          +
        • + Resultados a SISA Interoperabilidad: +
            +
          • Se cambi filtro de busqueda de "Determinacion" por "Evento a informar".Cambio de funcionalidad
          • +
          • Se mejora bsqueda de datos, al selecionar evento o resultado de recarga la grilla de datos.Nueva funcionalidad
          • +
          • Se agreg log de errores para control cuando no interopera con algun evento, para uso interno.Nueva funcionalidad
          • +
          • Se agreg control de error para cuando el dato "telefono" supera la cantidad de caracteres con los que se puede interoperar.
          • -
          -
        • -
        -
        2025.05.22
        -
          -
        • - Impresion de Resultados: Se corrige para que no se visualicen los titulos no informables de determinaciones compuestas. -
        • -
        • - Auditoria: Se controla que se ingresen numeros de protocolos vlidos. -
        • -
        + +
      + + +
    +
    2025.07.03
    +
      +
    • + Estadisticas Producccin: +
        +
      • Se mejor el tiempo de respuesta del proceso mediante una optimizacin interna de las consultas de datos.
      • +
      • Se incorpor una validacin para limitar la generacin de informacin a un mximo de un ao.
      • +
      • Se implement un control para evitar mltiples solicitudes de informacin al hacer doble clic en el botn 'Generar Reporte' durante la misma sesin de usuario
      • + + +
      +
    • + +
    +
    2025.06.30
    +
      +
    • + Usuarios: Se agrega posibilidad de descargar a excel.Nueva funcionalidad +
    • + +
    +
    2025.06.25
    +
      +
    • + API Resultados para ANDES. Se agrega posibilidad de mostrar protocolos de microbiologia con ATB validados y sin determinaciones validadas.Nueva funcionalidad +
    • +
    • + Estadistica de Turnos: Se agrega control para que las fechas ingresadas sean vlidas. +
    • +
    • + Resultados de Contador Hematologico 5 poblaciones: Calculo automtico de frmulas.Nueva funcionalidad +
    • + +
    + +
    2025.06.10
    +
      +
    • + Estadistica de Detalle de Derivaciones: Se agrega descarga de excel con determinaciones derivadas desde efector.Nueva funcionalidad +
    • +
    • + Estadistica de Turnos: Se agrega estadistica consolidada por todos los efectores para nivel central.Nueva funcionalidad +
    • +
    • + Derivaciones: Se corrige perdida del dato de usuario de registracion el momento de la derivacion. +
    • +
    • + Adjuntos de Resultados: Se habilita para que se pueda adjuntar mas un archivo por determinacin.Nueva funcionalidad +
    • +
    • + + Resultados Predefinidos Multiples: se agrega la opcion de borrar resultados ingresado previamente.Nueva funcionalidad +
        +
      • Carga / Validacion por Hoja de Trabajo
      • +
      • Carga / Validacion por Analisis
      • + + +
      +
    • +
    +
    2025.06.03
    +
      +
    • + Hoja Trabajo a Demanda: Se corrige para que muestre determinaciones que forman parte de Determinaciones compuestas. +
    • +
    • + Turnos: Se habilita la modificacion de turnos del dia y a futuro. +
    • +
    +
    2025.06.02
    +
      + +
    • + Generacion de Hoja de Trabajo: Se corrige que no mostraban los antecedentes en las hojas marcadas con esta opcion. + Los antecedentes se muestran considerando el resultado anterior del paciente para una determincion en cualquier laboratorio. +
    • +
    • + Estadistica: Cambio de nombre de origen "Externo" por "Ambulatorio". +
    • +
    +
    2025.05.28
    +
      +
    • + + Carga / Validacion por Hoja de Trabajo +
        +
      • Se corrige alineacin de la grilla cuando tiene determinaciones con resultados predefinidos multiples.
      • +
      • Resultados Predefinidos Multiples: Se saca boton para agregar opcion; reemplazando por el click en la caja de texto para mostrar y elegir las opciones multiplesNueva funcionalidad
      • + + +
      +
    • +
    +
    2025.05.22
    +
      +
    • + Impresion de Resultados: Se corrige para que no se visualicen los titulos no informables de determinaciones compuestas. +
    • +
    • + Auditoria: Se controla que se ingresen numeros de protocolos vlidos. +
    • +
    2025.05.19
    • From c2ee7adb6e4c65bb082513e9381b4378a6b1d585 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Wed, 4 Feb 2026 10:30:04 -0300 Subject: [PATCH 04/42] fix: habilitar cambiar tipo de autenticacion y ampliar el ancho de listado de usuarios --- Tests-Cypress/cypress/fixtures/local.env.json | 4 ++++ WebLab/Usuarios/UsuarioEdit.aspx.cs | 2 +- WebLab/Usuarios/UsuarioList.aspx | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 Tests-Cypress/cypress/fixtures/local.env.json diff --git a/Tests-Cypress/cypress/fixtures/local.env.json b/Tests-Cypress/cypress/fixtures/local.env.json new file mode 100644 index 00000000..3dfef1cf --- /dev/null +++ b/Tests-Cypress/cypress/fixtures/local.env.json @@ -0,0 +1,4 @@ +{ + "USER_NAME": "usuario_test", + "USER_PASSWORD": "123456" +} \ No newline at end of file diff --git a/WebLab/Usuarios/UsuarioEdit.aspx.cs b/WebLab/Usuarios/UsuarioEdit.aspx.cs index eddb9bca..cedb7f78 100644 --- a/WebLab/Usuarios/UsuarioEdit.aspx.cs +++ b/WebLab/Usuarios/UsuarioEdit.aspx.cs @@ -131,7 +131,7 @@ private void MostrarDatos() MostrarEfectores(); ddlTipoAutenticacion.SelectedValue = oRegistro.TipoAutenticacion.Trim(); - ddlTipoAutenticacion.Enabled = false; + habilitarPorAutenticacion(); } diff --git a/WebLab/Usuarios/UsuarioList.aspx b/WebLab/Usuarios/UsuarioList.aspx index 81b52e9a..d97d3ab0 100644 --- a/WebLab/Usuarios/UsuarioList.aspx +++ b/WebLab/Usuarios/UsuarioList.aspx @@ -12,7 +12,7 @@ -
      +

      USUARIOS From 2baada5797348dc364a9610cb8230b74c2fd5145 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Wed, 4 Feb 2026 15:45:59 -0300 Subject: [PATCH 05/42] ---hablar con caro por este cambio --- WebLab/Usuarios/UsuarioEdit.aspx.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WebLab/Usuarios/UsuarioEdit.aspx.cs b/WebLab/Usuarios/UsuarioEdit.aspx.cs index cedb7f78..8aa016a5 100644 --- a/WebLab/Usuarios/UsuarioEdit.aspx.cs +++ b/WebLab/Usuarios/UsuarioEdit.aspx.cs @@ -175,7 +175,7 @@ protected void btnGuardar_Click(object sender, EventArgs e) private void Guardar(Usuario oRegistro) { string accion = "Crea"; - if (oRegistro != null) + if(Request["id"] != null) accion = "Modifica"; Perfil oPerfil = new Perfil(); @@ -207,7 +207,7 @@ private void Guardar(Usuario oRegistro) oRegistro.Telefono = txtTelefono.Text; - if (accion != "Modifica") //no se modifica contrasñea + if (accion != "Modifica") //no se modifica contraseña { Utility oUtil = new Utility(); string m_password = oUtil.Encrypt(txtPassword.Text); From a0078d95f4ac215485a5a23fa40303714160d61d Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Thu, 5 Feb 2026 10:29:12 -0300 Subject: [PATCH 06/42] fix: pendiente de revision proceso de alta de usuario --- WebLab/Usuarios/UsuarioEdit.aspx.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebLab/Usuarios/UsuarioEdit.aspx.cs b/WebLab/Usuarios/UsuarioEdit.aspx.cs index 8aa016a5..322518d6 100644 --- a/WebLab/Usuarios/UsuarioEdit.aspx.cs +++ b/WebLab/Usuarios/UsuarioEdit.aspx.cs @@ -175,7 +175,7 @@ protected void btnGuardar_Click(object sender, EventArgs e) private void Guardar(Usuario oRegistro) { string accion = "Crea"; - if(Request["id"] != null) + if (oRegistro != null) accion = "Modifica"; Perfil oPerfil = new Perfil(); From 10e2de7145b65c7f5edec71e63400c31d10ec182 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Thu, 5 Feb 2026 11:17:22 -0300 Subject: [PATCH 07/42] Delete Tests-Cypress/cypress/fixtures/local.env.json --- Tests-Cypress/cypress/fixtures/local.env.json | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 Tests-Cypress/cypress/fixtures/local.env.json diff --git a/Tests-Cypress/cypress/fixtures/local.env.json b/Tests-Cypress/cypress/fixtures/local.env.json deleted file mode 100644 index 3dfef1cf..00000000 --- a/Tests-Cypress/cypress/fixtures/local.env.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "USER_NAME": "usuario_test", - "USER_PASSWORD": "123456" -} \ No newline at end of file From 3abd60e2084397598be8d94c2a79d8c320f2f20a Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Thu, 19 Feb 2026 15:09:51 -0300 Subject: [PATCH 08/42] (LAB-107) Correccion de bug "Se borran los analisis del protocolo/turno al elegir un medico" (#26) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: rebase con main * fix: traigo correctamente el JSON * fix: selecion de profesional en el drop down * fix: rebase con main * fix: traigo correctamente el JSON * fix: selecion de profesional en el drop down * fix: valida que si puso una matricula elija un medico y no la opcion "--selecciona--" * fix: se corrige el bug que borraba los analisis cargados en un protocolo cuando se abria el pop up de seleccionar medico * fix: se corrige el bug que borraba los analisis cargados en un protocolo cuando se abria el pop up de seleccionar medico * Al resolver conflicto falto llamar el metodo CargarDatosTxtDatosCargados * fix: correcciones de pruebas de Caro. Cuando se destildaba una determinacion tildaba, y cuando se carga el combo de profesionales, que de error si no se eligio ninguno * fix: rebase con main * fix: traigo correctamente el JSON * fix: selecion de profesional en el drop down * fix: rebase con main * fix: traigo correctamente el JSON * fix: selecion de profesional en el drop down * fix: correcion luego de correcion de conflictos * fix: correcion luego de correcion de conflictos * correciones de los conflictos * fix de testing, comentados console log * nuevos hidden para controlar todos los post back del formulario * comentarios de las funciones * js * fix: estados en txtDatos * se toma en cuenta cuando hay redirect de cambio de paciente. y fix de carga de txtdatos * fix: Protocolos – Análisis repetidos * fix: rebaseo con main * fix: correcion script sql * Asociado a LAB-214: Sacar del PR la correcion de la tarea https://proyectos.andes.gob.ar/browse/LAB-192 (pasarla a otra rama ) para despues trabajarla, ya que baja mucho la performance del sistema. * fix: 1-protocolo: en la validacion faltaba mantener los datos cargados para los casos de error de FIS, FUC y fecha de muestra 2-turnos: que no se duplique el medico solicitante 3-resultados: sacar LAB192 * label para medico --- WebLab/Protocolos/MedicoSel.aspx | 22 +- WebLab/Protocolos/MedicoSel.aspx.cs | 81 +- WebLab/Protocolos/MedicoSel.aspx.designer.cs | 29 +- WebLab/Protocolos/ProtocoloEdit2.aspx | 1070 +++++----- WebLab/Protocolos/ProtocoloEdit2.aspx.cs | 721 +++---- .../ProtocoloEdit2.aspx.designer.cs | 249 +-- .../Protocolos/ProtocoloProductoEdit.aspx.cs | 282 ++- WebLab/Resultados/AnalisisEdit.aspx | 19 +- WebLab/Resultados/AnalisisEdit.aspx.cs | 222 ++- WebLab/Turnos/Default.aspx.cs | 6 +- WebLab/Turnos/TurnosEdit2.aspx | 1746 ++++++++--------- WebLab/Turnos/TurnosEdit2.aspx.cs | 80 +- WebLab/Turnos/TurnosEdit2.aspx.designer.cs | 107 +- WebLab/WebLab.csproj | 22 +- WebLab/packages.config | 1 + WebLabResultados/WebLabResultados.csproj | 31 - 16 files changed, 2586 insertions(+), 2102 deletions(-) diff --git a/WebLab/Protocolos/MedicoSel.aspx b/WebLab/Protocolos/MedicoSel.aspx index 5d059d71..006ec74b 100644 --- a/WebLab/Protocolos/MedicoSel.aspx +++ b/WebLab/Protocolos/MedicoSel.aspx @@ -37,19 +37,21 @@
      - +
      + + - + - - - - - - - - + + + + + + +

      diff --git a/WebLab/Protocolos/MedicoSel.aspx.cs b/WebLab/Protocolos/MedicoSel.aspx.cs index 606e18c4..ddaeb4d6 100644 --- a/WebLab/Protocolos/MedicoSel.aspx.cs +++ b/WebLab/Protocolos/MedicoSel.aspx.cs @@ -1,5 +1,6 @@ using Business.Data; using Business.Data.Laboratorio; +using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Data; @@ -19,19 +20,20 @@ public partial class MedicoSel : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { - if (!Page.IsPostBack) - { - + if (!Page.IsPostBack) + { + Session["matricula"] = null; + Session["apellidoNombre"] = null; } - } - + protected void btnBuscar_Click(object sender, EventArgs e) { try { + lblErrorAPI.Text = ""; Configuracion oCon = new Configuracion(); oCon = (Configuracion)oCon.Get(typeof(Configuracion), 1); ///Buscar especilista @@ -39,32 +41,29 @@ protected void btnBuscar_Click(object sender, EventArgs e) string nombre = txtNombre.Text; string s_urlWFC = oCon.UrlMatriculacion; string s_url = s_urlWFC + "nombre=" + nombre + "&apellido=" + apellido;// + "&codigoProfesion=1 "; + System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; HttpWebRequest request = (HttpWebRequest)WebRequest.Create(s_url); HttpWebResponse ws1 = (HttpWebResponse)request.GetResponse(); JavaScriptSerializer jsonSerializer = new JavaScriptSerializer(); - + Stream st = ws1.GetResponseStream(); StreamReader sr = new StreamReader(st); string s = sr.ReadToEnd(); if (s != "0") { - - //List pro = jsonSerializer.Deserialize>(s); - - DataTable t = GetJSONToDataTableUsingMethod(s); + DataTable t = GetDataTableMatriculaciones(s); //GetJSONToDataTableUsingMethod(s); gvMedico.DataSource = t; gvMedico.DataBind(); - - } } catch (Exception ex) { - + lblErrorAPI.Visible = true; + lblErrorAPI.Text = "Ha ocurrido un error: " + ex.Message.ToString() + ". Comuniquese con el administrador."; } - + } public static DataTable GetJSONToDataTableUsingMethod(string JSONData) @@ -119,13 +118,41 @@ public static DataTable GetJSONToDataTableUsingMethod(string JSONData) } return dtUsingMethodReturn; } + + private static DataTable GetDataTableMatriculaciones(string json) + { + //Pasa de JSON al tipo de objeto ProfesionalMatriculado + List personas = JsonConvert.DeserializeObject>(json); + DataTable dt = new DataTable(); + + if (personas.Count > 0) + { + //Guardo solo en la tabla aquellos datos que necesito + dt.Columns.Add("nombre"); + dt.Columns.Add("apellido"); + dt.Columns.Add("titulo"); + dt.Columns.Add("matriculaNumero"); + + foreach (Protocolos.ProtocoloEdit2.ProfesionalMatriculado persona in personas) + { + foreach (Protocolos.ProtocoloEdit2.Profesiones prof in persona.profesiones) + { + foreach (Protocolos.ProtocoloEdit2.Matricula mat in prof.matriculacion) + { + if (DateTime.Compare(mat.fin, DateTime.Now) > 0) //Solo agrega las matriculas no vencidas + { + dt.Rows.Add(persona.nombre, persona.apellido, prof.titulo, mat.matriculaNumero); + } + } + } + } + } + return dt; + } protected void gvMedico_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.Cells.Count > 1) { - - - if (e.Row.RowType == DataControlRowType.DataRow) { LinkButton CmdModificar = (LinkButton)e.Row.Cells[3].Controls[1]; @@ -133,23 +160,27 @@ protected void gvMedico_RowDataBound(object sender, GridViewRowEventArgs e) CmdModificar.CommandName = "Seleccionar"; CmdModificar.ToolTip = "Seleccionar"; + // Valor adicional (Nombre y apellido) + DataRow rowData = ((DataRowView)e.Row.DataItem).Row; + CmdModificar.Attributes["nombre"] = rowData.ItemArray[0].ToString(); + CmdModificar.Attributes["apellido"] = rowData.ItemArray[1].ToString(); } - - } } protected void gvMedico_RowCommand(object sender, GridViewCommandEventArgs e) { - if (e.CommandName== "Seleccionar") + if (e.CommandName == "Seleccionar") { - - Session["matricula"] = e.CommandArgument.ToString(); - - - + Session["matricula"] = e.CommandArgument.ToString(); + LinkButton boton = (LinkButton)e.CommandSource; + Session["apellidoNombre"] = boton.Attributes["apellido"] + " " + boton.Attributes["nombre"]; } + } + + + } } \ No newline at end of file diff --git a/WebLab/Protocolos/MedicoSel.aspx.designer.cs b/WebLab/Protocolos/MedicoSel.aspx.designer.cs index a48b0927..a609d583 100644 --- a/WebLab/Protocolos/MedicoSel.aspx.designer.cs +++ b/WebLab/Protocolos/MedicoSel.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace WebLab.Protocolos { - - - public partial class MedicoSel { - +namespace WebLab.Protocolos +{ + + + public partial class MedicoSel + { + /// /// form1 control. /// @@ -20,7 +22,7 @@ public partial class MedicoSel { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// txtApellido control. /// @@ -29,7 +31,7 @@ public partial class MedicoSel { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.TextBox txtApellido; - + /// /// txtNombre control. /// @@ -38,7 +40,7 @@ public partial class MedicoSel { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.TextBox txtNombre; - + /// /// btnBuscar control. /// @@ -47,7 +49,16 @@ public partial class MedicoSel { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Button btnBuscar; - + + /// + /// lblErrorAPI control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblErrorAPI; + /// /// gvMedico control. /// diff --git a/WebLab/Protocolos/ProtocoloEdit2.aspx b/WebLab/Protocolos/ProtocoloEdit2.aspx index 9df5f915..3cec70b9 100644 --- a/WebLab/Protocolos/ProtocoloEdit2.aspx +++ b/WebLab/Protocolos/ProtocoloEdit2.aspx @@ -235,6 +235,9 @@ + + + Cambiar Paciente  Datos del Paciente @@ -397,10 +400,10 @@ - - + + @@ -859,597 +862,726 @@ + - - - - + + + diff --git a/WebLab/Protocolos/ProtocoloEdit2.aspx.cs b/WebLab/Protocolos/ProtocoloEdit2.aspx.cs index 087267f5..9e992e48 100644 --- a/WebLab/Protocolos/ProtocoloEdit2.aspx.cs +++ b/WebLab/Protocolos/ProtocoloEdit2.aspx.cs @@ -141,7 +141,9 @@ protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) - { + { + Session["matricula"] = ""; //para que lo borre de la sesion al entrar a un nuevo protocolo + Session["apellidoNombre"] = null; SetToken(); PreventingDoubleSubmit(btnGuardar); if (Session["idUsuario"] != null) @@ -178,6 +180,11 @@ protected void Page_Load(object sender, EventArgs e) pnlNavegacion.Visible = false; } + + if(Request["idPaciente"] != null) //Cambio de paciente + { + HFModificarPaciente.Value = "Si"; + } } else @@ -249,7 +256,6 @@ protected void Page_Load(object sender, EventArgs e) } if (Request["Operacion"].ToString() == "AltaDerivacionMultiEfector" ) { - int numeroProtocolo = int.Parse(Session["numeroProtocolo"].ToString()); Business.Data.Laboratorio.Protocolo oRegistro = new Business.Data.Laboratorio.Protocolo(); oRegistro = (Business.Data.Laboratorio.Protocolo)oRegistro.Get(typeof(Business.Data.Laboratorio.Protocolo), "Numero", numeroProtocolo); @@ -3675,11 +3681,10 @@ protected void cvAnalisis_ServerValidate(object source, ServerValidateEventArgs } - protected void cvValidacionInput_ServerValidate_vane(object source, ServerValidateEventArgs args) + protected void cvValidacionInput_ServerValidate(object source, ServerValidateEventArgs args) { - string[] bk = TxtDatosCargados.Value.Split(';'); - + TxtDatosCargados.Value = TxtDatos.Value; string sDatos = ""; @@ -3689,20 +3694,19 @@ protected void cvValidacionInput_ServerValidate_vane(object source, ServerValida for (int i = 0; i < tabla.Length - 1; i++) { string[] fila = tabla[i].Split('#'); - string codigo = fila[1].ToString(); - string muestra= fila[2].ToString(); - string conResultado = "false"; - //Cargo el valor del resultado para no perderlo si da error la validacion - if (i < bk.Length && bk.Length > 1) //TxtDatosCargados en Alta no tiene valores! - { - string[] filaBk = bk[i].Split('#'); - conResultado = filaBk[2].ToString(); - } + string codigo = fila[1].ToString(); + string tarea = fila[2].ToString(); + string muestra= fila[3].ToString(); + string estado = "false"; + + if (tabla.Length > 1) //TxtDatosCargados en Alta no tiene valores! + estado = fila[4].ToString(); + if (sDatos == "") - sDatos = codigo + "#" + muestra + "#" + conResultado; + sDatos = codigo + "#" + muestra + "#" + estado; else - sDatos += ";" + codigo + "#" + muestra + "#" + conResultado; + sDatos += ";" + codigo + "#" + muestra + "#" + estado; } @@ -3721,7 +3725,7 @@ protected void cvValidacionInput_ServerValidate_vane(object source, ServerValida // } if (!VerificarAnalisisContenidos() ) - { TxtDatos.Value = ""; + { //TxtDatos.Value = ""; args.IsValid = false; return; @@ -3747,7 +3751,7 @@ protected void cvValidacionInput_ServerValidate_vane(object source, ServerValida if (oC.DiagObligatorio) {if (lstDiagnosticosFinal.Items.Count == 0) { - TxtDatos.Value = ""; + //TxtDatos.Value = ""; args.IsValid = false; this.cvValidacionInput.ErrorMessage = "Debe ingresar al menos un diagnóstico presuntivo del paciente"; return; @@ -3757,7 +3761,7 @@ protected void cvValidacionInput_ServerValidate_vane(object source, ServerValida ///Validacion de la fecha de protocolo if (txtFecha.Value == "") { - TxtDatos.Value = ""; + // TxtDatos.Value = ""; args.IsValid = false; this.cvValidacionInput.ErrorMessage = "Debe ingresar la fecha del protocolo"; return; @@ -3767,7 +3771,7 @@ protected void cvValidacionInput_ServerValidate_vane(object source, ServerValida if (DateTime.Parse(txtFecha.Value) > DateTime.Now) { - TxtDatos.Value = ""; + //TxtDatos.Value = ""; args.IsValid = false; this.cvValidacionInput.ErrorMessage = "La fecha del protocolo no puede ser superior a la fecha actual"; return; @@ -3779,7 +3783,7 @@ protected void cvValidacionInput_ServerValidate_vane(object source, ServerValida if ((ddlSectorServicio.SelectedValue == "0")) { - TxtDatos.Value = ""; + //TxtDatos.Value = ""; args.IsValid = false; this.cvValidacionInput.ErrorMessage = "Debe ingresar sector"; return; @@ -3787,7 +3791,7 @@ protected void cvValidacionInput_ServerValidate_vane(object source, ServerValida if ((ddlOrigen.SelectedValue == "0")) { - TxtDatos.Value = ""; + //TxtDatos.Value = ""; args.IsValid = false; this.cvValidacionInput.ErrorMessage = "Debe ingresar Origen"; return; @@ -3795,7 +3799,7 @@ protected void cvValidacionInput_ServerValidate_vane(object source, ServerValida if ((ddlPrioridad.SelectedValue == "0")) { - TxtDatos.Value = ""; + //TxtDatos.Value = ""; args.IsValid = false; this.cvValidacionInput.ErrorMessage = "Debe ingresar Prioridad"; return; @@ -3803,7 +3807,7 @@ protected void cvValidacionInput_ServerValidate_vane(object source, ServerValida if ((ddlMuestra.SelectedValue == "0") && (pnlMuestra.Visible)) { - TxtDatos.Value = ""; + // TxtDatos.Value = ""; args.IsValid = false; this.cvValidacionInput.ErrorMessage = "Debe ingresar Tipo de Muestra"; return; @@ -3815,7 +3819,7 @@ protected void cvValidacionInput_ServerValidate_vane(object source, ServerValida if ((VerificaRequiereCaracter(sDatos)) && (ddlCaracter.SelectedValue == "0")) //if ((sDatos.Contains(oC.CodigoCovid) && (ddlCaracter.SelectedValue=="0"))) { - TxtDatos.Value = ""; + //TxtDatos.Value = ""; args.IsValid = false; this.cvValidacionInput.ErrorMessage = "Debe seleccionar el caracter del protocolo"; return; @@ -3827,7 +3831,7 @@ protected void cvValidacionInput_ServerValidate_vane(object source, ServerValida { if ((txtFechaFIS.Value == "") && (chkSinFIS.Checked==false)) { - TxtDatos.Value = ""; + //TxtDatos.Value = ""; args.IsValid = false; this.cvValidacionInput.ErrorMessage = "Debe ingresar fecha de inicio de síntomas"; return; @@ -3837,7 +3841,7 @@ protected void cvValidacionInput_ServerValidate_vane(object source, ServerValida if ((ddlCaracter.SelectedValue == "4") && (txtFechaFUC.Value=="") && (chkSinFUC.Checked==false)) { - TxtDatos.Value = ""; + // TxtDatos.Value = ""; args.IsValid = false; this.cvValidacionInput.ErrorMessage = "Debe ingresar fecha de último contacto"; return; @@ -3845,21 +3849,21 @@ protected void cvValidacionInput_ServerValidate_vane(object source, ServerValida } if ((ddlEspecialista.SelectedValue=="-1") && (oC.MedicoObligatorio)) { - TxtDatos.Value = ""; + //TxtDatos.Value = ""; args.IsValid = false; this.cvValidacionInput.ErrorMessage = "Debe ingresar la mátricula del médico solicitante"; return; } if (ddlOrigen.SelectedValue == "0") { - TxtDatos.Value = ""; + //TxtDatos.Value = ""; args.IsValid = false; this.cvValidacionInput.ErrorMessage = "Debe ingresar el origen"; return; } if ((oC.IdSectorDefecto== 0) && (ddlSectorServicio.SelectedValue == "0")) { - TxtDatos.Value = ""; + // TxtDatos.Value = ""; args.IsValid = false; this.cvValidacionInput.ErrorMessage = "Debe ingresar el Servicio"; return; @@ -3868,7 +3872,7 @@ protected void cvValidacionInput_ServerValidate_vane(object source, ServerValida if ((lblAlertaObraSocial.Visible) && (lblObraSocial.Text == "-")) { - TxtDatos.Value = ""; + //TxtDatos.Value = ""; args.IsValid = false; this.cvValidacionInput.ErrorMessage = "Debe ingresar la obra social/financiador"; return; @@ -3878,7 +3882,7 @@ protected void cvValidacionInput_ServerValidate_vane(object source, ServerValida if (txtFechaOrden.Value == "") { - TxtDatos.Value = ""; + // TxtDatos.Value = ""; args.IsValid = false; this.cvValidacionInput.ErrorMessage = "Debe ingresar la fecha de la orden"; return; @@ -3887,7 +3891,7 @@ protected void cvValidacionInput_ServerValidate_vane(object source, ServerValida { if (DateTime.Parse(txtFechaOrden.Value) > DateTime.Now) { - TxtDatos.Value = ""; + // TxtDatos.Value = ""; args.IsValid = false; this.cvValidacionInput.ErrorMessage = "La fecha de la orden no puede ser superior a la fecha actual"; return; @@ -3896,7 +3900,7 @@ protected void cvValidacionInput_ServerValidate_vane(object source, ServerValida { if (DateTime.Parse(txtFechaOrden.Value) > DateTime.Parse(txtFecha.Value)) { - TxtDatos.Value = ""; + //TxtDatos.Value = ""; args.IsValid = false; this.cvValidacionInput.ErrorMessage = "La fecha de la orden no puede ser superior a la fecha del protocolo"; return; @@ -3911,7 +3915,7 @@ protected void cvValidacionInput_ServerValidate_vane(object source, ServerValida if (txtFechaTomaMuestra.Value == "") { - TxtDatos.Value = ""; + //TxtDatos.Value = ""; args.IsValid = false; this.cvValidacionInput.ErrorMessage = "Debe ingresar la fecha de toma de muestra"; return; @@ -3920,7 +3924,7 @@ protected void cvValidacionInput_ServerValidate_vane(object source, ServerValida { if (DateTime.Parse(txtFechaTomaMuestra.Value) > DateTime.Now) { - TxtDatos.Value = ""; + //TxtDatos.Value = ""; args.IsValid = false; this.cvValidacionInput.ErrorMessage = "La fecha de toma de muestra no puede ser superior a la fecha actual"; return; @@ -3929,7 +3933,7 @@ protected void cvValidacionInput_ServerValidate_vane(object source, ServerValida { if (DateTime.Parse(txtFechaTomaMuestra.Value) > DateTime.Parse(txtFecha.Value)) { - TxtDatos.Value = ""; + //TxtDatos.Value = ""; args.IsValid = false; this.cvValidacionInput.ErrorMessage = "La fecha de toma de muestra no puede ser superior a la fecha del protocolo"; return; @@ -3948,7 +3952,7 @@ protected void cvValidacionInput_ServerValidate_vane(object source, ServerValida { if (DateTime.Parse(txtFechaFIS.Value) > DateTime.Now) { - TxtDatos.Value = ""; + //TxtDatos.Value = ""; args.IsValid = false; this.cvValidacionInput.ErrorMessage = "La FIS no puede ser superior a la fecha actual"; return; @@ -3957,7 +3961,7 @@ protected void cvValidacionInput_ServerValidate_vane(object source, ServerValida { if (DateTime.Parse(txtFechaTomaMuestra.Value) < DateTime.Parse(txtFechaFIS.Value)) { - TxtDatos.Value = ""; + //TxtDatos.Value = ""; args.IsValid = false; this.cvValidacionInput.ErrorMessage = "La FIS no puede ser despues de la fecha de toma de muestra"; return; @@ -3977,7 +3981,7 @@ protected void cvValidacionInput_ServerValidate_vane(object source, ServerValida { if (DateTime.Parse(txtFechaFUC.Value) > DateTime.Now) { - TxtDatos.Value = ""; + //TxtDatos.Value = ""; args.IsValid = false; this.cvValidacionInput.ErrorMessage = "La FUC no puede ser superior a la fecha actual"; return; @@ -3986,7 +3990,7 @@ protected void cvValidacionInput_ServerValidate_vane(object source, ServerValida { if (DateTime.Parse(txtFechaTomaMuestra.Value) < DateTime.Parse(txtFechaFUC.Value)) { - TxtDatos.Value = ""; + //TxtDatos.Value = ""; args.IsValid = false; this.cvValidacionInput.ErrorMessage = "La FUC no puede ser despues de la fecha de toma de muestra"; return; @@ -3996,324 +4000,279 @@ protected void cvValidacionInput_ServerValidate_vane(object source, ServerValida } }//fin control + if (txtEspecialista.Text != "0" && ddlEspecialista.SelectedValue == "0") + { + args.IsValid = false; + this.cvValidacionInput.ErrorMessage = "Debe seleccionar un medico del listado"; + return; + } } } - - protected void cvValidacionInput_ServerValidate(object source, ServerValidateEventArgs args) - { - - TxtDatosCargados.Value = TxtDatos.Value; - - string sDatos = ""; + private bool VerificarAnalisisContenidos() + { + bool devolver = true; + string[] tabla = TxtDatos.Value.Split('@'); + string listaCodigo = ""; - string[] tabla = TxtDatos.Value.Split('@'); - for (int i = 0; i < tabla.Length - 1; i++) + { string[] fila = tabla[i].Split('#'); string codigo = fila[1].ToString(); - string muestra= fila[2].ToString(); - - if (sDatos == "") - sDatos = codigo + "#" + muestra; - else - sDatos += ";" + codigo + "#" + muestra; + if (listaCodigo == "") + listaCodigo = "'" + codigo + "'"; + else + listaCodigo += ",'" + codigo + "'"; - } + int i_idItemPractica = 0; + if (codigo != "") + { - + Item oItem = new Item(); + oItem = (Item)oItem.Get(typeof(Item), "Codigo", codigo, "Baja", false); + if (oItem.VerificaMuestrasAsociadas(int.Parse(ddlMuestra.SelectedValue))) + { + i_idItemPractica = oItem.IdItem; + for (int j = 0; j < tabla.Length - 1; j++) - TxtDatosCargados.Value = sDatos; - //saco restriccion de forma temporal - //if (Request["Operacion"].ToString()!="Modifica") - // if (!VerificarFechaPacienteMuestra()) - // { - // TxtDatos.Value = ""; - // args.IsValid = false; - // this.cvValidacionInput.ErrorMessage = "No es posible ingresar para la misma fecha, muestra y paciente un nuevo protocolo."; - // return; - // } + { + string[] fila2 = tabla[j].Split('#'); + string codigo2 = fila2[1].ToString(); + if ((codigo2 != "") && (codigo != codigo2)) + { + Item oItem2 = new Item(); + oItem2 = (Item)oItem2.Get(typeof(Item), "Codigo", codigo2, "Baja", false); - if (!VerificarAnalisisContenidos() ) - { TxtDatos.Value = ""; - args.IsValid = false; - - return; - } - else - { + //MultiEfector: filtro por efector - - /// + ISession m_session = NHibernateHttpModule.CurrentSession; + ICriteria crit = m_session.CreateCriteria(typeof(PracticaDeterminacion)); + crit.Add(Expression.Eq("IdItemPractica", oItem)); + crit.Add(Expression.Eq("IdItemDeterminacion", oItem2.IdItem)); + crit.Add(Expression.Eq("IdEfector", oUser.IdEfector)); + PracticaDeterminacion oGrupo = (PracticaDeterminacion)crit.UniqueResult(); - if ((TxtDatos.Value == "") || (TxtDatos.Value == "1###on@")) - { - args.IsValid = false; - this.cvValidacionInput.ErrorMessage = "Debe completar al menos un análisis"; - return; - } - else args.IsValid = true; + if (oGrupo != null) + { - //validacion Diagnostico - if (oC.DiagObligatorio) - {if (lstDiagnosticosFinal.Items.Count == 0) - { - TxtDatos.Value = ""; - args.IsValid = false; - this.cvValidacionInput.ErrorMessage = "Debe ingresar al menos un diagnóstico presuntivo del paciente"; - return; - } - } + this.cvValidacionInput.ErrorMessage = "Ha cargado análisis contenidos en otros. Verifique los códigos " + codigo + " y " + codigo2 + "!"; + devolver = false; break; - ///Validacion de la fecha de protocolo - if (txtFecha.Value == "") - { - TxtDatos.Value = ""; - args.IsValid = false; - this.cvValidacionInput.ErrorMessage = "Debe ingresar la fecha del protocolo"; - return; - } - else - { + } - if (DateTime.Parse(txtFecha.Value) > DateTime.Now) - { - TxtDatos.Value = ""; - args.IsValid = false; - this.cvValidacionInput.ErrorMessage = "La fecha del protocolo no puede ser superior a la fecha actual"; - return; + } + + }////for } else - args.IsValid = true; - } + { + this.cvValidacionInput.ErrorMessage = "Ha ingresado tipo de muestra que no corresponde con el codigo " + codigo + ". Verifique configuracion."; + devolver = false; break; + } - if ((ddlSectorServicio.SelectedValue == "0")) - { - TxtDatos.Value = ""; - args.IsValid = false; - this.cvValidacionInput.ErrorMessage = "Debe ingresar sector"; - return; - } + }/// if codigo + if (!devolver) break; + } - if ((ddlOrigen.SelectedValue == "0")) - { - TxtDatos.Value = ""; - args.IsValid = false; - this.cvValidacionInput.ErrorMessage = "Debe ingresar Origen"; - return; - } - - if ((ddlPrioridad.SelectedValue == "0")) - { - TxtDatos.Value = ""; - args.IsValid = false; - this.cvValidacionInput.ErrorMessage = "Debe ingresar Prioridad"; - return; - } - - if ((ddlMuestra.SelectedValue == "0") && (pnlMuestra.Visible)) - { - TxtDatos.Value = ""; - args.IsValid = false; - this.cvValidacionInput.ErrorMessage = "Debe ingresar Tipo de Muestra"; - return; - } - /// Valida que debe seleccionar un caracter si es un caso notificable a SISA + if ((devolver) && (listaCodigo != "")) + { devolver = VerificarAnalisisComplejosContenidos(listaCodigo); } + return devolver; + } - if ((VerificaRequiereCaracter(sDatos)) && (ddlCaracter.SelectedValue == "0")) - //if ((sDatos.Contains(oC.CodigoCovid) && (ddlCaracter.SelectedValue=="0"))) - { - TxtDatos.Value = ""; - args.IsValid = false; - this.cvValidacionInput.ErrorMessage = "Debe seleccionar el caracter del protocolo"; - return; - } - // fin valida - // validacion si es sospechoso o detctar ingresar fecha de inicio de sintomas + //LAB-192: Bug análisis Repetidos en protocolos. No lo pasamos a produccion porque baja la perfomance del sistema. - if (VerificaObligatoriedadFIS()) - { - if ((txtFechaFIS.Value == "") && (chkSinFIS.Checked==false)) - { - TxtDatos.Value = ""; - args.IsValid = false; - this.cvValidacionInput.ErrorMessage = "Debe ingresar fecha de inicio de síntomas"; - return; - } - } - // validacion si es contacto ingresar fecha de ultimo contacto - if ((ddlCaracter.SelectedValue == "4") && (txtFechaFUC.Value=="") && (chkSinFUC.Checked==false)) - { - - TxtDatos.Value = ""; - args.IsValid = false; - this.cvValidacionInput.ErrorMessage = "Debe ingresar fecha de último contacto"; - return; - - } - if ((ddlEspecialista.SelectedValue=="-1") && (oC.MedicoObligatorio)) - { - TxtDatos.Value = ""; - args.IsValid = false; - this.cvValidacionInput.ErrorMessage = "Debe ingresar la mátricula del médico solicitante"; - return; - } - if (ddlOrigen.SelectedValue == "0") - { - TxtDatos.Value = ""; - args.IsValid = false; - this.cvValidacionInput.ErrorMessage = "Debe ingresar el origen"; - return; - } - if ((oC.IdSectorDefecto== 0) && (ddlSectorServicio.SelectedValue == "0")) - { - TxtDatos.Value = ""; - args.IsValid = false; - this.cvValidacionInput.ErrorMessage = "Debe ingresar el Servicio"; - return; - } - + //private bool VerificarAnalisisContenidos_LAB192() + //{ + // bool devolver = true; + // string[] tabla = TxtDatos.Value.Split('@'); + // string listaCodigo = ""; - if ((lblAlertaObraSocial.Visible) && (lblObraSocial.Text == "-")) - { - TxtDatos.Value = ""; - args.IsValid = false; - this.cvValidacionInput.ErrorMessage = "Debe ingresar la obra social/financiador"; - return; - } + // var subItemsEnBD = new Dictionary(); + // //List subItemsEnDB = new List(); - ///Validacion de la fecha de la orden - if (txtFechaOrden.Value == "") - { - TxtDatos.Value = ""; - args.IsValid = false; - this.cvValidacionInput.ErrorMessage = "Debe ingresar la fecha de la orden"; - return; - } - else - { - if (DateTime.Parse(txtFechaOrden.Value) > DateTime.Now) - { - TxtDatos.Value = ""; - args.IsValid = false; - this.cvValidacionInput.ErrorMessage = "La fecha de la orden no puede ser superior a la fecha actual"; - return; - } - else - { - if (DateTime.Parse(txtFechaOrden.Value) > DateTime.Parse(txtFecha.Value)) - { - TxtDatos.Value = ""; - args.IsValid = false; - this.cvValidacionInput.ErrorMessage = "La fecha de la orden no puede ser superior a la fecha del protocolo"; - return; - } - else - args.IsValid = true; - } - } + // for (int i = 0; i < tabla.Length - 1; i++) - + // { + // string[] fila = tabla[i].Split('#'); + // string codigo = fila[1].ToString(); + // if (listaCodigo == "") + // listaCodigo = "'" + codigo + "'"; + // else + // listaCodigo += ",'" + codigo + "'"; + + // if (codigo != "") + // { + // Item oItem = new Item(); + // oItem = (Item)oItem.Get(typeof(Item), "Codigo", codigo, "Baja", false); + // //1- Si el idItem ya esta en DetalleProtocolo (para los casos de "Modifica" no verifico Analisis) + // // if (Request["Operacion"].ToString() == "Modifica") + // if (Request["idProtocolo"] != null)//Caro: unifco instanciacion de protocolo cuando es modificacion + // { + // Business.Data.Laboratorio.Protocolo oRegistro = new Business.Data.Laboratorio.Protocolo(); + // oRegistro = (Business.Data.Laboratorio.Protocolo)oRegistro.Get(typeof(Business.Data.Laboratorio.Protocolo), int.Parse(Request["idProtocolo"].ToString())); + // //try //Caro: saco try cath por errores silenciosos + // //{ + // if ((oRegistro != null) && (oItem != null)) + // { + // ISession m_session = NHibernateHttpModule.CurrentSession; + // ICriteria crit = m_session.CreateCriteria(typeof(DetalleProtocolo)); + // crit.Add(Expression.Eq("IdItem", oItem)); + // crit.Add(Expression.Eq("IdProtocolo", oRegistro)); + // IList lista = crit.List(); + + // if (lista.Count == 0)//no esta en la base + // { + // devolver = VerificaMuestrasAsociadas(codigo, oItem, tabla, subItemsEnBD); + + // } + // else + // { + // foreach (DetalleProtocolo oDetalle in lista) + // { + // subItemsEnBD[oDetalle.IdSubItem.IdItem] = oDetalle.IdItem.IdItem; + // } + + // } + // } + // //} + // //catch(Exception e) + // //{ + // // this.cvValidacionInput.ErrorMessage = e.Message; + // // devolver = false; break; + // //} - if (txtFechaTomaMuestra.Value == "") - { - TxtDatos.Value = ""; - args.IsValid = false; - this.cvValidacionInput.ErrorMessage = "Debe ingresar la fecha de toma de muestra"; - return; - } - else - { - if (DateTime.Parse(txtFechaTomaMuestra.Value) > DateTime.Now) - { - TxtDatos.Value = ""; - args.IsValid = false; - this.cvValidacionInput.ErrorMessage = "La fecha de toma de muestra no puede ser superior a la fecha actual"; - return; - } - else - { - if (DateTime.Parse(txtFechaTomaMuestra.Value) > DateTime.Parse(txtFecha.Value)) - { - TxtDatos.Value = ""; - args.IsValid = false; - this.cvValidacionInput.ErrorMessage = "La fecha de toma de muestra no puede ser superior a la fecha del protocolo"; - return; - } - else - args.IsValid = true; - } - } + // } + // else // no es modificacion + // { + // devolver = VerificaMuestrasAsociadas(codigo, oItem, tabla); + // } - /// control de fecha inicio de sintomas - /// - - if (txtFechaFIS.Value != "") - - { - if (DateTime.Parse(txtFechaFIS.Value) > DateTime.Now) - { - TxtDatos.Value = ""; - args.IsValid = false; - this.cvValidacionInput.ErrorMessage = "La FIS no puede ser superior a la fecha actual"; - return; - } - else - { - if (DateTime.Parse(txtFechaTomaMuestra.Value) < DateTime.Parse(txtFechaFIS.Value)) - { - TxtDatos.Value = ""; - args.IsValid = false; - this.cvValidacionInput.ErrorMessage = "La FIS no puede ser despues de la fecha de toma de muestra"; - return; - } - else - args.IsValid = true; - } - }//fin control + // }/// if codigo + // if (!devolver) break; + // } + // if ((devolver) && (listaCodigo != "")) + // { devolver = VerificarAnalisisComplejosContenidos(listaCodigo); } - /// control de fecha inicio de sintomas - /// - + // return devolver; - if (txtFechaFUC.Value != "") + //} - { - if (DateTime.Parse(txtFechaFUC.Value) > DateTime.Now) - { - TxtDatos.Value = ""; - args.IsValid = false; - this.cvValidacionInput.ErrorMessage = "La FUC no puede ser superior a la fecha actual"; - return; - } - else - { - if (DateTime.Parse(txtFechaTomaMuestra.Value) < DateTime.Parse(txtFechaFUC.Value)) - { - TxtDatos.Value = ""; - args.IsValid = false; - this.cvValidacionInput.ErrorMessage = "La FUC no puede ser despues de la fecha de toma de muestra"; - return; - } - else - args.IsValid = true; - } - }//fin control + //private bool VerificaMuestrasAsociadas(string codigo, Item oItem, string[] tabla, Dictionary itemsEnBD = null) + //{ + // bool devolver = true; - } - } + + // if (oItem.VerificaMuestrasAsociadas(int.Parse(ddlMuestra.SelectedValue))) + // { + + + // for (int j = 0; j < tabla.Length - 1; j++) + + // { + // string[] fila2 = tabla[j].Split('#'); + // string codigo2 = fila2[1].ToString(); + // if ((codigo2 != "") && (codigo != codigo2)) + // { + // Item oItem2 = new Item(); + // oItem2 = (Item)oItem2.Get(typeof(Item), "Codigo", codigo2, "Baja", false); + + // //MultiEfector: filtro por efector + // ISession m_session = NHibernateHttpModule.CurrentSession; + // ICriteria crit = m_session.CreateCriteria(typeof(PracticaDeterminacion)); + // crit.Add(Expression.Eq("IdItemPractica", oItem)); + // crit.Add(Expression.Eq("IdItemDeterminacion", oItem2.IdItem)); + // crit.Add(Expression.Eq("IdEfector", oUser.IdEfector)); + // PracticaDeterminacion oGrupo = (PracticaDeterminacion)crit.UniqueResult(); + + + + // if (oGrupo != null) + // { + + // this.cvValidacionInput.ErrorMessage = "Ha cargado análisis contenidos en otros. Verifique los códigos " + codigo + " y " + codigo2 + "!"; + // devolver = false; break; + + // } + + // //-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + // //Verifico que el codigo cargado tampoco este en mi lista de subItems de la base de datos! + + // if (itemsEnBD != null) + // { + // Item oItemExistente = new Item(); + // bool hayConflicto = false; + // int itemExistente = 0; + + // m_session = NHibernateHttpModule.CurrentSession; + // crit = m_session.CreateCriteria(typeof(PracticaDeterminacion)); + // crit.Add(Expression.Eq("IdItemPractica", oItem)); + // crit.Add(Expression.Eq("IdEfector", oUser.IdEfector)); + // IList detalle = crit.List(); + + // if (detalle.Count > 0) //Es practica + // { + // foreach (PracticaDeterminacion item in detalle) + // { + // if (itemsEnBD.ContainsKey(item.IdItemDeterminacion)) + // { + // itemExistente = itemsEnBD[item.IdItemDeterminacion]; + // hayConflicto = true; break; + // } + // } + // } + // else //es determinacion simple idItem=idSubitem + // { + // if (itemsEnBD.ContainsKey(oItem.IdItem)) + // { + // itemExistente = itemsEnBD[oItem.IdItem]; + // hayConflicto = true; + // } + // } + + // if (hayConflicto) + // { + // string mensajeerror = ""; + // oItemExistente = (Item)oItemExistente.Get(typeof(Item), "IdItem", itemExistente);//, "Baja", false); //Caro: le saco la condicion de baja porque si fue grabado en la base y despues lo pusieron de baja no lo va a encontrar + // if (oItemExistente != null)///Caro agrego control de que exista si no va a dar error al usarlo + // { + // mensajeerror = + // "Ha cargado análisis contenidos en otros. Verifique los códigos " + + // codigo + " y " + oItemExistente.Codigo + "!"; + + // } + // else + // mensajeerror = "Ha cargado análisis contenidos en otros. Verifique los códigos "; + + // this.cvValidacionInput.ErrorMessage = mensajeerror; + // devolver = false; + // } + + // } + // } + + // }////for + // } + // else + // { + // this.cvValidacionInput.ErrorMessage = "Ha ingresado tipo de muestra que no corresponde con el codigo " + codigo + ". Verifique configuracion."; + // devolver = false; //break; + + // } + + // return devolver; + //} private bool VerificaRequiereCaracter(string sDatos) { @@ -4368,83 +4327,7 @@ private bool VerificaObligatoriedadFIS() //} - private bool VerificarAnalisisContenidos() - { - bool devolver = true; - string[] tabla = TxtDatos.Value.Split('@'); - string listaCodigo = ""; - - for (int i = 0; i < tabla.Length - 1; i++) - - { - string[] fila = tabla[i].Split('#'); - string codigo = fila[1].ToString(); - if (listaCodigo == "") - listaCodigo = "'" + codigo + "'"; - else - listaCodigo += ",'" + codigo + "'"; - - int i_idItemPractica = 0; - if (codigo != "") - { - - Item oItem = new Item(); - oItem = (Item)oItem.Get(typeof(Item), "Codigo", codigo, "Baja", false); - if (oItem.VerificaMuestrasAsociadas(int.Parse(ddlMuestra.SelectedValue))) - { - - i_idItemPractica = oItem.IdItem; - for (int j = 0; j < tabla.Length - 1; j++) - - { - string[] fila2 = tabla[j].Split('#'); - string codigo2 = fila2[1].ToString(); - if ((codigo2 != "") && (codigo != codigo2)) - { - Item oItem2 = new Item(); - oItem2 = (Item)oItem2.Get(typeof(Item), "Codigo", codigo2, "Baja", false); - - //MultiEfector: filtro por efector - - - ISession m_session = NHibernateHttpModule.CurrentSession; - ICriteria crit = m_session.CreateCriteria(typeof(PracticaDeterminacion)); - crit.Add(Expression.Eq("IdItemPractica", oItem)); - crit.Add(Expression.Eq("IdItemDeterminacion", oItem2.IdItem)); - crit.Add(Expression.Eq("IdEfector", oUser.IdEfector)); - PracticaDeterminacion oGrupo = (PracticaDeterminacion)crit.UniqueResult(); - - - - if (oGrupo != null) - { - - this.cvValidacionInput.ErrorMessage = "Ha cargado análisis contenidos en otros. Verifique los códigos " + codigo + " y " + codigo2 + "!"; - devolver = false; break; - - } - - } - - }////for - } - else - { - this.cvValidacionInput.ErrorMessage = "Ha ingresado tipo de muestra que no corresponde con el codigo " + codigo + ". Verifique configuracion."; - devolver = false; break; - - } - - }/// if codigo - if (!devolver) break; - } - - if ((devolver) && (listaCodigo != "")) - { devolver = VerificarAnalisisComplejosContenidos(listaCodigo); } - - return devolver; - - } + private bool VerificarAnalisisComplejosContenidos(string listaCodigo) { ///Este es un segundo nivel de validacion en donde los analisis contenidos no estan directamente sino en diagramas @@ -4770,9 +4653,42 @@ private void MostrarMedico() ddlEspecialista.Items.Insert(0, new ListItem(espe, matricula+ '#' + espe)); } if (pro.Count > 1) + { if (Request["idProtocolo"] == null) { ddlEspecialista.Items.Insert(0, new ListItem("--Seleccione--", "0")); } + #region SelecionProfesional + if (Session["apellidoNombre"] != null) + { + foreach (ListItem item in ddlEspecialista.Items) + { + + //EJEMPLO DE item.Value: + //1541#CAVIEZA NAIR AMANCAY - TÉCNICO SUPERIOR EN RADIOLOGIA# + int positionFinal = item.Value.IndexOf("-"); + if (positionFinal < 0) + continue; //Es el caso de "--Seleccione--", "0" + + string apellidoNombre = item.Value.Substring(0, positionFinal); + int posicion = apellidoNombre.IndexOf("#"); + + if (posicion < 0) + continue; + + apellidoNombre = apellidoNombre.Substring(posicion + 1).Trim(); + + + if (apellidoNombre.Equals(Session["apellidoNombre"].ToString())) + { + ddlEspecialista.SelectedValue = item.Value; + break; + } + } + } + #endregion + } + + lblErrorMedico.Visible = false; } @@ -4802,7 +4718,7 @@ private void MostrarMedico() } - + public class Profesiones { public List matriculacion { get; set; } @@ -4810,19 +4726,21 @@ public class Profesiones } public class Matricula - { public string matriculaNumero { get; set; } - + public DateTime fin { get; set; } + } - public class ProfesionalMatriculado + public class ProfesionalMatriculado { // public int documento { get; set; } public string nombre { get; set; } public string apellido { get; set; } + public string cuit { get; set; } public List profesiones { get; set; } + public string id { get; set; } //id que trae de ANDES //public string Nombre { get; set; } //public string FechaNacimiento { get; set; } //public string FechaNac { get; set; } @@ -4882,13 +4800,16 @@ public class ProfesionalMatriculado protected void Button1_Click(object sender, EventArgs e) { - if (Session["matricula"] != null) + if (Session["matricula"] != null && Session["matricula"].ToString() != "") + //Agregue que sea distinto de vacio porque al Cancelar sin traer matricula, + //deja un string vacio, que hacia que entrara al if y buscara nuevamente un medico + //haciendo que la ejecucion se extendiera innecesariamente { txtEspecialista.Text = Session["matricula"].ToString(); MostrarMedico(); - TxtDatos.Value = ""; + //TxtDatos.Value = ""; //No quiero pisar los datos cargados } } @@ -5289,7 +5210,6 @@ private void GenerarResultadoSISA(DetalleProtocolo oDetalle, string idPruebaSISA request.Headers.Add("app_id", "0e4fcbbf"); - Stream postStream = request.GetRequestStream(); postStream.Write(data, 0, data.Length); @@ -5341,7 +5261,6 @@ private void CargarProtocoloDerivadoLote() CargarProtocoloDerivado(oRegistro, analisis); } } - } } diff --git a/WebLab/Protocolos/ProtocoloEdit2.aspx.designer.cs b/WebLab/Protocolos/ProtocoloEdit2.aspx.designer.cs index 0aa6f601..26829d6d 100644 --- a/WebLab/Protocolos/ProtocoloEdit2.aspx.designer.cs +++ b/WebLab/Protocolos/ProtocoloEdit2.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace WebLab.Protocolos { - - - public partial class ProtocoloEdit2 { - +namespace WebLab.Protocolos +{ + + + public partial class ProtocoloEdit2 + { + /// /// pnlLista control. /// @@ -20,7 +22,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl pnlLista; - + /// /// gvLista control. /// @@ -29,7 +31,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.GridView gvLista; - + /// /// lblServicio control. /// @@ -38,7 +40,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblServicio; - + /// /// pnlNavegacion control. /// @@ -47,7 +49,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Panel pnlNavegacion; - + /// /// lblEstado control. /// @@ -56,7 +58,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblEstado; - + /// /// lnkAnterior control. /// @@ -65,7 +67,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.LinkButton lnkAnterior; - + /// /// lnkSiguiente control. /// @@ -74,7 +76,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.LinkButton lnkSiguiente; - + /// /// pnlTitulo control. /// @@ -83,7 +85,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl pnlTitulo; - + /// /// pnlPaciente control. /// @@ -92,7 +94,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Panel pnlPaciente; - + /// /// logoRenaper control. /// @@ -101,7 +103,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlImage logoRenaper; - + /// /// lblPaciente control. /// @@ -110,7 +112,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblPaciente; - + /// /// HFIdPaciente control. /// @@ -119,7 +121,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.HiddenField HFIdPaciente; - + /// /// HFNumeroDocumento control. /// @@ -128,7 +130,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.HiddenField HFNumeroDocumento; - + /// /// HFSexo control. /// @@ -137,7 +139,34 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.HiddenField HFSexo; - + + /// + /// HFSelMedico control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HiddenField HFSelMedico; + + /// + /// HFSelRenaper control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HiddenField HFSelRenaper; + + /// + /// HFModificarPaciente control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HiddenField HFModificarPaciente; + /// /// hplModificarPaciente control. /// @@ -146,7 +175,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.HyperLink hplModificarPaciente; - + /// /// hplActualizarPaciente control. /// @@ -155,7 +184,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.HyperLink hplActualizarPaciente; - + /// /// lblAlertaProtocolo control. /// @@ -164,7 +193,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblAlertaProtocolo; - + /// /// pnlNumero control. /// @@ -173,7 +202,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Panel pnlNumero; - + /// /// lblTitulo control. /// @@ -182,7 +211,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblTitulo; - + /// /// lblUsuario control. /// @@ -191,7 +220,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblUsuario; - + /// /// btnNotificarSISA control. /// @@ -200,7 +229,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Button btnNotificarSISA; - + /// /// lblNroSISA control. /// @@ -209,7 +238,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblNroSISA; - + /// /// spanadjunto control. /// @@ -218,7 +247,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl spanadjunto; - + /// /// lblAdjunto control. /// @@ -227,7 +256,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblAdjunto; - + /// /// lblFechaNacimiento control. /// @@ -236,7 +265,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblFechaNacimiento; - + /// /// lblEdad control. /// @@ -245,7 +274,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblEdad; - + /// /// lblUnidadEdad control. /// @@ -254,7 +283,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblUnidadEdad; - + /// /// lblSexo control. /// @@ -263,7 +292,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblSexo; - + /// /// lnkValidarRenaper control. /// @@ -272,7 +301,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.LinkButton lnkValidarRenaper; - + /// /// lblObraSocial control. /// @@ -281,7 +310,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblObraSocial; - + /// /// btnSelObraSocial control. /// @@ -290,7 +319,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.LinkButton btnSelObraSocial; - + /// /// lblAlertaObraSocial control. /// @@ -299,7 +328,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.Label lblAlertaObraSocial; - + /// /// txtTelefono control. /// @@ -308,7 +337,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.TextBox txtTelefono; - + /// /// cvValidacionInput control. /// @@ -317,7 +346,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.CustomValidator cvValidacionInput; - + /// /// lblIdPaciente control. /// @@ -326,7 +355,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblIdPaciente; - + /// /// txtFecha control. /// @@ -335,7 +364,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlInputText txtFecha; - + /// /// txtFechaOrden control. /// @@ -344,7 +373,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlInputText txtFechaOrden; - + /// /// txtFechaTomaMuestra control. /// @@ -353,7 +382,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlInputText txtFechaTomaMuestra; - + /// /// txtNumeroOrigen control. /// @@ -362,7 +391,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.TextBox txtNumeroOrigen; - + /// /// ddlEfector control. /// @@ -371,7 +400,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.DropDownList ddlEfector; - + /// /// txtEspecialista control. /// @@ -380,7 +409,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.TextBox txtEspecialista; - + /// /// ddlEspecialista control. /// @@ -389,7 +418,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.DropDownList ddlEspecialista; - + /// /// LinkButton1 control. /// @@ -398,7 +427,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.LinkButton LinkButton1; - + /// /// ddlOrigen control. /// @@ -407,7 +436,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.DropDownList ddlOrigen; - + /// /// ddlSectorServicio control. /// @@ -416,7 +445,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.DropDownList ddlSectorServicio; - + /// /// ddlPrioridad control. /// @@ -425,7 +454,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.DropDownList ddlPrioridad; - + /// /// lblSalaCama control. /// @@ -434,7 +463,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblSalaCama; - + /// /// txtSala control. /// @@ -443,7 +472,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.TextBox txtSala; - + /// /// txtCama control. /// @@ -452,7 +481,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.TextBox txtCama; - + /// /// pnlMuestra control. /// @@ -461,7 +490,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Panel pnlMuestra; - + /// /// txtCodigoMuestra control. /// @@ -470,7 +499,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.TextBox txtCodigoMuestra; - + /// /// ddlMuestra control. /// @@ -479,7 +508,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.DropDownList ddlMuestra; - + /// /// lblCaracterSisa control. /// @@ -488,7 +517,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl lblCaracterSisa; - + /// /// ddlCaracter control. /// @@ -497,7 +526,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.DropDownList ddlCaracter; - + /// /// lblNroHisopado control. /// @@ -506,7 +535,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl lblNroHisopado; - + /// /// txtNumeroOrigen2 control. /// @@ -515,7 +544,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.TextBox txtNumeroOrigen2; - + /// /// lblErrorMedico control. /// @@ -524,7 +553,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.Label lblErrorMedico; - + /// /// diag control. /// @@ -533,7 +562,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlImage diag; - + /// /// tab3Titulo control. /// @@ -542,7 +571,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl tab3Titulo; - + /// /// tituloCalidad control. /// @@ -551,7 +580,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl tituloCalidad; - + /// /// inci control. /// @@ -560,7 +589,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlImage inci; - + /// /// tableTitulo control. /// @@ -569,7 +598,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlTable tableTitulo; - + /// /// TxtCantidadFilas control. /// @@ -578,7 +607,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlInputHidden TxtCantidadFilas; - + /// /// CodOS control. /// @@ -587,7 +616,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlInputHidden CodOS; - + /// /// chkRecordarPractica control. /// @@ -596,7 +625,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.CheckBox chkRecordarPractica; - + /// /// ddlRutina control. /// @@ -605,7 +634,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.DropDownList ddlRutina; - + /// /// lnkAgregarRutina control. /// @@ -614,7 +643,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.LinkButton lnkAgregarRutina; - + /// /// ddlItem control. /// @@ -623,7 +652,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.DropDownList ddlItem; - + /// /// lnkAgregarItem control. /// @@ -632,7 +661,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.LinkButton lnkAgregarItem; - + /// /// TxtDatosCargados control. /// @@ -641,7 +670,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlInputHidden TxtDatosCargados; - + /// /// TxtDatos control. /// @@ -650,7 +679,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlInputHidden TxtDatos; - + /// /// txtTareas control. /// @@ -659,7 +688,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlInputHidden txtTareas; - + /// /// txtCodigoDiagnostico control. /// @@ -668,7 +697,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.TextBox txtCodigoDiagnostico; - + /// /// txtNombreDiagnostico control. /// @@ -677,7 +706,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.TextBox txtNombreDiagnostico; - + /// /// btnBusquedaDiagnostico control. /// @@ -686,7 +715,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.Button btnBusquedaDiagnostico; - + /// /// btnBusquedaFrecuente control. /// @@ -695,7 +724,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.Button btnBusquedaFrecuente; - + /// /// btnRecordarDiagnostico control. /// @@ -704,7 +733,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.Button btnRecordarDiagnostico; - + /// /// lstDiagnosticos control. /// @@ -713,7 +742,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.ListBox lstDiagnosticos; - + /// /// lblMensajeDiagnostico control. /// @@ -722,7 +751,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.Label lblMensajeDiagnostico; - + /// /// btnAgregarDiagnostico control. /// @@ -731,7 +760,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.ImageButton btnAgregarDiagnostico; - + /// /// lstDiagnosticosFinal control. /// @@ -740,7 +769,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.ListBox lstDiagnosticosFinal; - + /// /// btnSacarDiagnostico control. /// @@ -749,7 +778,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.ImageButton btnSacarDiagnostico; - + /// /// lblFechaFIS control. /// @@ -758,7 +787,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.Label lblFechaFIS; - + /// /// txtFechaFIS control. /// @@ -767,7 +796,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlInputText txtFechaFIS; - + /// /// chkSinFIS control. /// @@ -776,7 +805,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.CheckBox chkSinFIS; - + /// /// Label1 control. /// @@ -785,7 +814,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.Label Label1; - + /// /// txtFechaFUC control. /// @@ -794,7 +823,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlInputText txtFechaFUC; - + /// /// chkSinFUC control. /// @@ -803,7 +832,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.CheckBox chkSinFUC; - + /// /// pnlEtiquetas control. /// @@ -812,7 +841,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Panel pnlEtiquetas; - + /// /// rdbSeleccionarAreasEtiquetas control. /// @@ -821,7 +850,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.RadioButtonList rdbSeleccionarAreasEtiquetas; - + /// /// chkAreaCodigoBarra control. /// @@ -830,7 +859,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.CheckBoxList chkAreaCodigoBarra; - + /// /// ddlImpresora2 control. /// @@ -839,7 +868,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.DropDownList ddlImpresora2; - + /// /// btnReimprimirCodigoBarras control. /// @@ -848,7 +877,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.Button btnReimprimirCodigoBarras; - + /// /// lblMensajeImpresion control. /// @@ -857,7 +886,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.Label lblMensajeImpresion; - + /// /// chkRecordarConfiguracion control. /// @@ -866,7 +895,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.CheckBox chkRecordarConfiguracion; - + /// /// chkCodificaPaciente control. /// @@ -875,7 +904,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.CheckBox chkCodificaPaciente; - + /// /// pnlIncidencia control. /// @@ -884,7 +913,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Panel pnlIncidencia; - + /// /// IncidenciaEdit1 control. /// @@ -893,7 +922,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::WebLab.Calidad.IncidenciaEdit IncidenciaEdit1; - + /// /// pnlImpresoraAlta control. /// @@ -920,7 +949,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.TextBox txtObservacion; - + /// /// chkNotificar control. /// @@ -929,7 +958,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.CheckBox chkNotificar; - + /// /// hidToken control. /// @@ -938,7 +967,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlInputHidden hidToken; - + /// /// txtCodigo control. /// @@ -947,7 +976,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.TextBox txtCodigo; - + /// /// txtCodigosRutina control. /// @@ -956,7 +985,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::Anthem.TextBox txtCodigosRutina; - + /// /// btnCancelar control. /// @@ -965,7 +994,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Button btnCancelar; - + /// /// btnGuardar control. /// @@ -974,7 +1003,7 @@ public partial class ProtocoloEdit2 { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Button btnGuardar; - + /// /// ValidationSummary1 control. /// diff --git a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs index aeae90d2..8f546259 100644 --- a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs +++ b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs @@ -164,7 +164,7 @@ protected void Page_Load(object sender, EventArgs e) CargarProtocoloDerivadoLote(); } - + } } else @@ -800,7 +800,7 @@ protected void btnGuardar_Click(object sender, EventArgs e) case "ProtocoloList": Response.Redirect("ProtocoloList.aspx?idServicio=" + Session["idServicio"].ToString() + "&Tipo=ListaProducto"); break; case "Control": Avanzar(1); break; } - } + } if (Request["Operacion"].ToString() == "AltaDerivacionMultiEfectorLote") { Business.Data.Laboratorio.Protocolo oRegistroAnterior = new Business.Data.Laboratorio.Protocolo(); @@ -1609,8 +1609,6 @@ protected void btnCancelar_Click(object sender, EventArgs e) case "Control": Response.Redirect("ProtocoloList.aspx?idServicio=" + Session["idServicio"].ToString() + "&Tipo=Control"); break; case "AltaDerivacionMultiEfectorLote": Response.Redirect("DerivacionMultiEfectorLote.aspx?idEfectorSolicitante=" + Request["idEfectorSolicitante"].ToString() + "&idServicio=1&idLote=" + Request["idLote"]); break; } - - } @@ -1721,6 +1719,8 @@ protected void cvAnalisis_ServerValidate(object source, ServerValidateEventArgs protected void cvValidacionInput_ServerValidate(object source, ServerValidateEventArgs args) { + string[] bk = TxtDatosCargados.Value.Split(';'); + TxtDatosCargados.Value = TxtDatos.Value; string sDatos = ""; @@ -1731,12 +1731,19 @@ protected void cvValidacionInput_ServerValidate(object source, ServerValidateEve { string[] fila = tabla[i].Split('#'); string codigo = fila[1].ToString(); - string muestra= fila[2].ToString(); - - if (sDatos == "") - sDatos = codigo + "#" + muestra; + string muestra= fila[2].ToString(); + string conResultado = "false"; + + //Cargo el valor del resultado para no perderlo si da error la validacion + if (i < bk.Length && bk.Length > 1) //TxtDatosCargados en Alta no tiene valores! + { + string[] filaBk = bk[i].Split('#'); + conResultado = filaBk[2].ToString(); + } + if (sDatos == "") + sDatos = codigo + "#" + muestra + "#" + conResultado; else - sDatos += ";" + codigo + "#" + muestra; + sDatos += ";" + codigo + "#" + muestra + "#" + conResultado; } @@ -1817,14 +1824,14 @@ protected void cvValidacionInput_ServerValidate(object source, ServerValidateEve } } - private bool VerificarAnalisisContenidos() { bool devolver = true; string[] tabla = TxtDatos.Value.Split('@'); string listaCodigo = ""; - + for (int i = 0; i < tabla.Length - 1; i++) + { string[] fila = tabla[i].Split('#'); string codigo = fila[1].ToString(); @@ -1838,52 +1845,245 @@ private bool VerificarAnalisisContenidos() { Item oItem = new Item(); - oItem = (Item)oItem.Get(typeof(Item), "Codigo", codigo, "Baja", false); + oItem = (Item)oItem.Get(typeof(Item), "Codigo", codigo, "Baja", false); + if (oItem.VerificaMuestrasAsociadas(int.Parse(ddlMuestra.SelectedValue))) + { + i_idItemPractica = oItem.IdItem; + for (int j = 0; j < tabla.Length - 1; j++) - i_idItemPractica = oItem.IdItem; - for (int j = 0; j < tabla.Length - 1; j++) - { - string[] fila2 = tabla[j].Split('#'); - string codigo2 = fila2[1].ToString(); - if ((codigo2 != "") && (codigo!=codigo2)) { - Item oItem2 = new Item(); - oItem2 = (Item)oItem2.Get(typeof(Item), "Codigo", codigo2, "Baja", false); + string[] fila2 = tabla[j].Split('#'); + string codigo2 = fila2[1].ToString(); + if ((codigo2 != "") && (codigo != codigo2)) + { + Item oItem2 = new Item(); + oItem2 = (Item)oItem2.Get(typeof(Item), "Codigo", codigo2, "Baja", false); - //PracticaDeterminacion oGrupo = new PracticaDeterminacion(); - //oGrupo = (PracticaDeterminacion)oGrupo.Get(typeof(PracticaDeterminacion), "IdItemPractica", oItem, "IdItemDeterminacion", oItem2.IdItem); + //MultiEfector: filtro por efector - ISession m_session = NHibernateHttpModule.CurrentSession; - ICriteria crit = m_session.CreateCriteria(typeof(PracticaDeterminacion)); - crit.Add(Expression.Eq("IdItemPractica", oItem)); - crit.Add(Expression.Eq("IdItemDeterminacion", oItem2.IdItem)); - crit.Add(Expression.Eq("IdEfector", oUser.IdEfector)); - PracticaDeterminacion oGrupo = (PracticaDeterminacion)crit.UniqueResult(); + ISession m_session = NHibernateHttpModule.CurrentSession; + ICriteria crit = m_session.CreateCriteria(typeof(PracticaDeterminacion)); + crit.Add(Expression.Eq("IdItemPractica", oItem)); + crit.Add(Expression.Eq("IdItemDeterminacion", oItem2.IdItem)); + crit.Add(Expression.Eq("IdEfector", oUser.IdEfector)); + PracticaDeterminacion oGrupo = (PracticaDeterminacion)crit.UniqueResult(); + + + + if (oGrupo != null) + { + + this.cvValidacionInput.ErrorMessage = "Ha cargado análisis contenidos en otros. Verifique los códigos " + codigo + " y " + codigo2 + "!"; + devolver = false; break; + + } - if (oGrupo != null) - { - - this.cvValidacionInput.ErrorMessage = "Ha cargado análisis contenidos en otros. Verifique los códigos " + codigo + " y " + codigo2 + "!"; - devolver = false; break; - } - - } - }////for + + }////for + } + else + { + this.cvValidacionInput.ErrorMessage = "Ha ingresado tipo de muestra que no corresponde con el codigo " + codigo + ". Verifique configuracion."; + devolver = false; break; + + } + }/// if codigo if (!devolver) break; } if ((devolver) && (listaCodigo != "")) { devolver = VerificarAnalisisComplejosContenidos(listaCodigo); } - + return devolver; - - } - private bool VerificarAnalisisComplejosContenidos(string listaCodigo) + } + + //LAB-192: Bug análisis Repetidos en protocolos. No lo pasamos a produccion porque baja la perfomance del sistema. + + // private bool VerificarAnalisisContenidos_LAB192() + // { + // bool devolver = true; + // string[] tabla = TxtDatos.Value.Split('@'); + // string listaCodigo = ""; + // var subItemsEnBD = new Dictionary(); + // for (int i = 0; i < tabla.Length - 1; i++) + // { + // string[] fila = tabla[i].Split('#'); + // string codigo = fila[1].ToString(); + // if (listaCodigo == "") + // listaCodigo = "'" + codigo + "'"; + // else + // listaCodigo += ",'" + codigo + "'"; + + // if (codigo != "") + // { + + // Item oItem = new Item(); + // oItem = (Item)oItem.Get(typeof(Item), "Codigo", codigo, "Baja", false); + + // //1- Si el idItem ya esta en DetalleProtocolo (para los casos de "Modifica" no verifico Analisis) + // // if (Request["Operacion"].ToString() == "Modifica") + // if (Request["idProtocolo"] != null)//Caro: unifco instanciacion de protocolo cuando es modificacion + // { + // Business.Data.Laboratorio.Protocolo oRegistro = new Business.Data.Laboratorio.Protocolo(); + // oRegistro = (Business.Data.Laboratorio.Protocolo)oRegistro.Get(typeof(Business.Data.Laboratorio.Protocolo), int.Parse(Request["idProtocolo"].ToString())); + // //try //Caro: saco try cath por errores silenciosos + // //{ + // if ((oRegistro != null) && (oItem != null)) + // { + // ISession m_session = NHibernateHttpModule.CurrentSession; + // ICriteria crit = m_session.CreateCriteria(typeof(DetalleProtocolo)); + // crit.Add(Expression.Eq("IdItem", oItem)); + // crit.Add(Expression.Eq("IdProtocolo", oRegistro)); + // IList lista = crit.List(); + + // if (lista.Count == 0)//no esta en la base + // { + // devolver = VerificaMuestrasAsociadas(codigo, oItem, tabla, subItemsEnBD); + + // } + // else + // { + // foreach (DetalleProtocolo oDetalle in lista) + // { + // subItemsEnBD[oDetalle.IdSubItem.IdItem] = oDetalle.IdItem.IdItem; + // } + + // } + // } + // //} + // //catch(Exception e) + // //{ + // // this.cvValidacionInput.ErrorMessage = e.Message; + // // devolver = false; break; + // //} + + // } + // else // no es modificacion + // { + // devolver = VerificaMuestrasAsociadas(codigo, oItem, tabla); + // } + + // }/// if codigo + // if (!devolver) break; + // } + + // if ((devolver) && (listaCodigo != "")) + // { devolver = VerificarAnalisisComplejosContenidos(listaCodigo); } + + // return devolver; + + // } + // private bool VerificaMuestrasAsociadas(string codigo, Item oItem, string[] tabla, Dictionary itemsEnBD = null) + //{ + // bool devolver = true; + + + // if (oItem.VerificaMuestrasAsociadas(int.Parse(ddlMuestra.SelectedValue))) + // { + + + // for (int j = 0; j < tabla.Length - 1; j++) + + // { + // string[] fila2 = tabla[j].Split('#'); + // string codigo2 = fila2[1].ToString(); + // if ((codigo2 != "") && (codigo != codigo2)) + // { + // Item oItem2 = new Item(); + // oItem2 = (Item)oItem2.Get(typeof(Item), "Codigo", codigo2, "Baja", false); + + // //MultiEfector: filtro por efector + // ISession m_session = NHibernateHttpModule.CurrentSession; + // ICriteria crit = m_session.CreateCriteria(typeof(PracticaDeterminacion)); + // crit.Add(Expression.Eq("IdItemPractica", oItem)); + // crit.Add(Expression.Eq("IdItemDeterminacion", oItem2.IdItem)); + // crit.Add(Expression.Eq("IdEfector", oUser.IdEfector)); + // PracticaDeterminacion oGrupo = (PracticaDeterminacion)crit.UniqueResult(); + + + + // if (oGrupo != null) + // { + + // this.cvValidacionInput.ErrorMessage = "Ha cargado análisis contenidos en otros. Verifique los códigos " + codigo + " y " + codigo2 + "!"; + // devolver = false; break; + + // } + + // // -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* + // //Verifico que el codigo cargado tampoco este en mi lista de subItems de la base de datos! + + // if (itemsEnBD != null) + // { + // Item oItemExistente = new Item(); + // bool hayConflicto = false; + // int itemExistente = 0; + + // m_session = NHibernateHttpModule.CurrentSession; + // crit = m_session.CreateCriteria(typeof(PracticaDeterminacion)); + // crit.Add(Expression.Eq("IdItemPractica", oItem)); + // crit.Add(Expression.Eq("IdEfector", oUser.IdEfector)); + // IList detalle = crit.List(); + + // if (detalle.Count > 0) //Es practica + // { + // foreach (PracticaDeterminacion item in detalle) + // { + // if (itemsEnBD.ContainsKey(item.IdItemDeterminacion)) + // { + // itemExistente = itemsEnBD[item.IdItemDeterminacion]; + // hayConflicto = true; break; + // } + // } + // } + // else //es determinacion simple idItem=idSubitem + // { + // if (itemsEnBD.ContainsKey(oItem.IdItem)) + // { + // itemExistente = itemsEnBD[oItem.IdItem]; + // hayConflicto = true; + // } + // } + + // if (hayConflicto) + // { + // string mensajeerror = ""; + // oItemExistente = (Item)oItemExistente.Get(typeof(Item), "IdItem", itemExistente);//, "Baja", false); //Caro: le saco la condicion de baja porque si fue grabado en la base y despues lo pusieron de baja no lo va a encontrar + // if (oItemExistente != null)///Caro agrego control de que exista si no va a dar error al usarlo + // { + // mensajeerror = + // "Ha cargado análisis contenidos en otros. Verifique los códigos " + + // codigo + " y " + oItemExistente.Codigo + "!"; + + // } + // else + // mensajeerror = "Ha cargado análisis contenidos en otros. Verifique los códigos "; + + // this.cvValidacionInput.ErrorMessage = mensajeerror; + // devolver = false; + // } + + // } + // } + + // }////for + // } + // else + // { + // this.cvValidacionInput.ErrorMessage = "Ha ingresado tipo de muestra que no corresponde con el codigo " + codigo + ". Verifique configuracion."; + // devolver = false; //break; + + // } + + // return devolver; + //} + + private bool VerificarAnalisisComplejosContenidos(string listaCodigo) { ///Este es un segundo nivel de validacion en donde los analisis contenidos no estan directamente sino en diagramas bool devolver = true; string m_ssql = "SELECT PD.idItemDeterminacion, I.codigo" + diff --git a/WebLab/Resultados/AnalisisEdit.aspx b/WebLab/Resultados/AnalisisEdit.aspx index e0baedda..932608e3 100644 --- a/WebLab/Resultados/AnalisisEdit.aspx +++ b/WebLab/Resultados/AnalisisEdit.aspx @@ -66,9 +66,10 @@
      - + Muestra:     @@ -91,7 +92,7 @@ -
      +
      @@ -126,10 +127,10 @@ - + >--%> @@ -219,7 +220,9 @@
      +
      -
      - - - - - - - - - - - -
       Tipo de Servicio: - - - - - - - -   - -   - -  
       Fecha - - - -  : + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - - + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + - - - - - - - - - - - -
       Tipo de Servicio: + + + + + +    
       Fecha + + + +  : - - - - -   - -   - -  
       Sector: - - - - - - + +    
       Sector: + + + + + Dato requerido - - - - - <%-- + + + <%-- No tiene --%>
      - - -
      - -  
       Médico Solicitante (MP): - - - - + + +  
       Médico Solicitante (MP): + + + - - - - - - - -   - -   - -  
      -   - - - - - -
      -
      -  
      -   - -
      - - -
      - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - -
      - - - - - - - <%-- --%> - + + + + + + + + + -
      - - Codigo - Descripcion - Sin Muestra   
      -
      - - - - - -
      - - -
      - - -
      - - +
        + + + - - - - -
      - - -
      - -
      - - +
       
        + +
      + + +
      + + + + + + + + +
      + + + + + + + <%-- --%> + +
      CodigoDescripcion + Sin Muestra
      +
      + + + + +
      + + +
      + + +
      + + + + + + + + +
      + + +
      + + +
      + + + + +
      +
      + + + - -
      -
      - - - -
      @@ -454,623 +427,612 @@
      -
      -   - - -   + + + + +
        + + + +   + - - - -
      - - -
       
      + - - - - - - - - + + var idPaciente = $("#<%= lblIdPaciente.ID %>").val(); + function SelObraSocial() { + var dom = document.domain; + var domArray = dom.split('.'); + for (var i = domArray.length - 1; i >= 0; i--) { + try { + var dom = ''; + for (var j = domArray.length - 1; j >= i; j--) { + dom = (j == domArray.length - 1) ? (domArray[j]) : domArray[j] + '.' + dom; + } + document.domain = dom; + break; + } catch (E) { + } + } + + + var $this = $(this); + $('