From 3839e0962b09b125618a5efcfa2a9a448e3c2548 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Tue, 14 Oct 2025 16:02:19 -0300 Subject: [PATCH 01/61] fix: Requerimiento 1: Cambiar a nomenclatura CamelCase --- WebLab/Derivaciones/Derivados2.aspx | 2 +- WebLab/Derivaciones/Derivados2.aspx.cs | 2 +- .../Derivaciones/Derivados2.aspx.designer.cs | 4 +- WebLab/Derivaciones/GestionarLote.aspx | 6 +-- WebLab/Derivaciones/GestionarLote.aspx.cs | 6 +-- .../GestionarLote.aspx.designer.cs | 12 +++--- WebLab/Derivaciones/InformeList3.aspx | 26 ++++++------ WebLab/Derivaciones/InformeList3.aspx.cs | 24 +++++------ .../InformeList3.aspx.designer.cs | 20 +++++----- WebLab/Derivaciones/InformeLote.aspx | 40 +++++++++---------- WebLab/Derivaciones/InformeLote.aspx.cs | 26 ++++++------ .../Derivaciones/InformeLote.aspx.designer.cs | 24 +++++------ .../DerivacionMultiEfectorLote.aspx | 14 +++---- .../DerivacionMultiEfectorLote.aspx.cs | 26 ++++++------ ...erivacionMultiEfectorLote.aspx.designer.cs | 28 ++++++------- WebLab/Protocolos/DerivacionRecibirLote.aspx | 24 +++++------ .../Protocolos/DerivacionRecibirLote.aspx.cs | 24 +++++------ .../DerivacionRecibirLote.aspx.designer.cs | 40 +++++++++---------- 18 files changed, 174 insertions(+), 174 deletions(-) diff --git a/WebLab/Derivaciones/Derivados2.aspx b/WebLab/Derivaciones/Derivados2.aspx index 0670fda..e34edf8 100644 --- a/WebLab/Derivaciones/Derivados2.aspx +++ b/WebLab/Derivaciones/Derivados2.aspx @@ -146,7 +146,7 @@
- + diff --git a/WebLab/Derivaciones/Derivados2.aspx.cs b/WebLab/Derivaciones/Derivados2.aspx.cs index d6c5dbc..8abf0a8 100644 --- a/WebLab/Derivaciones/Derivados2.aspx.cs +++ b/WebLab/Derivaciones/Derivados2.aspx.cs @@ -248,7 +248,7 @@ private void verificaResultados(string str_condicion) } else { - cv_botonBuscar.IsValid = false; //que de error sin enviar alert + cvBotonBuscar.IsValid = false; //que de error sin enviar alert } diff --git a/WebLab/Derivaciones/Derivados2.aspx.designer.cs b/WebLab/Derivaciones/Derivados2.aspx.designer.cs index 49285a3..e7be903 100644 --- a/WebLab/Derivaciones/Derivados2.aspx.designer.cs +++ b/WebLab/Derivaciones/Derivados2.aspx.designer.cs @@ -132,13 +132,13 @@ public partial class Derivados2 protected global::System.Web.UI.WebControls.RadioButtonList rdbEstado; /// - /// cv_botonBuscar control. + /// cvBotonBuscar control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.CustomValidator cv_botonBuscar; + protected global::System.Web.UI.WebControls.CustomValidator cvBotonBuscar; /// /// btnBuscar control. diff --git a/WebLab/Derivaciones/GestionarLote.aspx b/WebLab/Derivaciones/GestionarLote.aspx index b99ddc2..68224e5 100644 --- a/WebLab/Derivaciones/GestionarLote.aspx +++ b/WebLab/Derivaciones/GestionarLote.aspx @@ -68,8 +68,8 @@ - - + + @@ -95,7 +95,7 @@
- + diff --git a/WebLab/Derivaciones/GestionarLote.aspx.cs b/WebLab/Derivaciones/GestionarLote.aspx.cs index f9ce658..45ba280 100644 --- a/WebLab/Derivaciones/GestionarLote.aspx.cs +++ b/WebLab/Derivaciones/GestionarLote.aspx.cs @@ -100,9 +100,9 @@ protected void btnBuscar_Click(object sender, EventArgs e) if (ddlEfector.SelectedValue != "0") str_condicion += " AND l.idEfectorDestino = " + ddlEfector.SelectedValue; str_condicion += " AND idEfectorOrigen = " + oUser.IdEfector.IdEfector.ToString(); - if (!string.IsNullOrWhiteSpace(tb_nrolote.Text)) + if (!string.IsNullOrWhiteSpace(tbNrolote.Text)) { - str_condicion += " AND idLoteDerivacion = " + tb_nrolote.Text; + str_condicion += " AND idLoteDerivacion = " + tbNrolote.Text; } verificaResultados(Convert.ToInt32(rdbEstado.SelectedValue), str_condicion); @@ -152,7 +152,7 @@ private void verificaResultados(int estado, string parametros) } else { - cv_botonBuscar.IsValid = false; //que de error sin enviar alert + cvBotonBuscar.IsValid = false; //que de error sin enviar alert } diff --git a/WebLab/Derivaciones/GestionarLote.aspx.designer.cs b/WebLab/Derivaciones/GestionarLote.aspx.designer.cs index f8ea1ba..81c6526 100644 --- a/WebLab/Derivaciones/GestionarLote.aspx.designer.cs +++ b/WebLab/Derivaciones/GestionarLote.aspx.designer.cs @@ -60,22 +60,22 @@ public partial class GestionarLote protected global::System.Web.UI.HtmlControls.HtmlInputText txtFechaHasta; /// - /// tb_nrolote control. + /// tbNrolote control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.TextBox tb_nrolote; + protected global::System.Web.UI.WebControls.TextBox tbNrolote; /// - /// cv_nroLote control. + /// cvNroLote control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.CustomValidator cv_nroLote; + protected global::System.Web.UI.WebControls.CustomValidator cvNroLote; /// /// ddlEfector control. @@ -96,13 +96,13 @@ public partial class GestionarLote protected global::System.Web.UI.WebControls.RadioButtonList rdbEstado; /// - /// cv_botonBuscar control. + /// cvBotonBuscar control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.CustomValidator cv_botonBuscar; + protected global::System.Web.UI.WebControls.CustomValidator cvBotonBuscar; /// /// btnBuscar control. diff --git a/WebLab/Derivaciones/InformeList3.aspx b/WebLab/Derivaciones/InformeList3.aspx index 98644db..beb8b24 100644 --- a/WebLab/Derivaciones/InformeList3.aspx +++ b/WebLab/Derivaciones/InformeList3.aspx @@ -6,11 +6,11 @@ function validarFormulario() { var todoOk = false; - var validatorEstado = document.getElementById('<%= rv_estado.ClientID %>'); + var validatorEstado = document.getElementById('<%= rvEstado.ClientID %>'); <%--var txtObservacion = document.getElementById('<%= txtObservacion.ClientID %>');--%> //--> Cambio TextBox por DropDownList - var motivoCancelacion = document.getElementById('<%= ddl_motivoCancelacion.ClientID%>'); + var motivoCancelacion = document.getElementById('<%= ddlMotivoCancelacion.ClientID%>'); var estado = document.getElementById('<%= ddlEstado.ClientID %>'); - var label = document.getElementById('<%= lbl_ErrorMotivo.ClientID %>'); + var label = document.getElementById('<%= lblErrorMotivo.ClientID %>'); //Limpio los labels de error label.className = 'hidden'; @@ -59,18 +59,18 @@ return true; // Detiene la validación con al menos un check } } - var label = document.getElementById('<%= lbl_errorLista.ClientID %>'); + var label = document.getElementById('<%= lblErrorLista.ClientID %>'); label.className = 'exposed'; return todoOk; } function reseteaLabelErrorGrilla() { - var labelGrilla = document.getElementById('<%= lbl_errorLista.ClientID %>'); + var labelGrilla = document.getElementById('<%= lblErrorLista.ClientID %>'); labelGrilla.className = 'hidden'; } function reseteaLabelErrorMotivo() { - var labelMotivo = document.getElementById('<%= lbl_ErrorMotivo.ClientID %>'); + var labelMotivo = document.getElementById('<%= lblErrorMotivo.ClientID %>'); labelMotivo.className = 'hidden'; } @@ -103,7 +103,7 @@ } function activaMotivos(estado) { - var motivos = document.getElementById('<%= ddl_motivoCancelacion.ClientID %>'); + var motivos = document.getElementById('<%= ddlMotivoCancelacion.ClientID %>'); console.log(motivos); console.log(estado.value); if (estado.value == 2) { @@ -125,7 +125,7 @@ } }); //Si selecciono todas las derivaciones, deshabilito el error que no selecciono ninguna fila - if (seleccionar && document.getElementById('<%= lbl_errorLista.ClientID %>').className == 'exposed') { + if (seleccionar && document.getElementById('<%= lblErrorLista.ClientID %>').className == 'exposed') { reseteaLabelErrorGrilla(); } } @@ -224,7 +224,7 @@ Marcar como: - Motivo Cancelación: - + - + Observación: - + - +
Seleccionar: Todas  Ninguna diff --git a/WebLab/Derivaciones/InformeList3.aspx.cs b/WebLab/Derivaciones/InformeList3.aspx.cs index 966affd..d90f4c5 100644 --- a/WebLab/Derivaciones/InformeList3.aspx.cs +++ b/WebLab/Derivaciones/InformeList3.aspx.cs @@ -80,9 +80,9 @@ protected void Page_Load(object sender, EventArgs e) #region carga private void CargarParaModificacion() { - ddl_motivoCancelacion.SelectedValue = "0"; + ddlMotivoCancelacion.SelectedValue = "0"; ddlEstado.SelectedIndex = 2; - ddl_motivoCancelacion.Enabled = false; + ddlMotivoCancelacion.Enabled = false; //Observación Business.Data.Laboratorio.LoteDerivacion lote = new LoteDerivacion(); @@ -92,7 +92,7 @@ private void CargarParaModificacion() crit.Add(Expression.Eq("Idlote", lote.IdLoteDerivacion)); IList lista = crit.List(); if (lista.Count > 0) - txt_observacion.Text = ((Business.Data.Laboratorio.Derivacion)lista[0]).Observacion; + txtObservacion.Text = ((Business.Data.Laboratorio.Derivacion)lista[0]).Observacion; } private void CargarListas() @@ -108,8 +108,8 @@ private void CargarListas() oUtil = new Utility(); //Motivos de cancelacion LAB-75 m_ssql = "SELECT idMotivo, descripcion FROM LAB_DerivacionMotivoCancelacion WHERE baja = 0"; - oUtil.CargarCombo(ddl_motivoCancelacion, m_ssql, "idMotivo", "descripcion", connReady); - ddl_motivoCancelacion.Items.Insert(0, new ListItem("--Seleccione--", "0")); + oUtil.CargarCombo(ddlMotivoCancelacion, m_ssql, "idMotivo", "descripcion", connReady); + ddlMotivoCancelacion.Items.Insert(0, new ListItem("--Seleccione--", "0")); @@ -120,7 +120,7 @@ private void habilitarImprresion() { gvLista.Columns[11].Visible = true; lnkPDF.Visible = true; - ddl_motivoCancelacion.Enabled = false; + ddlMotivoCancelacion.Enabled = false; } else { @@ -130,15 +130,15 @@ private void habilitarImprresion() } private void limpiarForm() { - txt_observacion.Text = string.Empty; - ddl_motivoCancelacion.SelectedIndex = 0; + txtObservacion.Text = string.Empty; + ddlMotivoCancelacion.SelectedIndex = 0; ddlEstado.SelectedIndex = 0; } private void activarControles(bool valor) { btnGuardar.Enabled = valor; - txt_observacion.Enabled = valor; + txtObservacion.Enabled = valor; lnkMarcar.Enabled = valor; lnkDesMarcar.Enabled = valor; //ddl_motivoCancelacion.Enabled = valor; @@ -406,18 +406,18 @@ private void ActualizarDetalleProtocolo(GridViewRow row, int idLote = 0, int de { int estadoSeleccionado; string resultadoDerivacion; - string observacion = txt_observacion.Text; + string observacion = txtObservacion.Text; int idUsuarioRegistro = oUser.IdUsuario; //Convert.ToInt32(Session["idUsuario"]); int idUsuarioResultado = oUser.IdUsuario; DateTime fechaDeHoy = DateTime.Now; DateTime fechaDeHoyDetalle = DateTime.Now; - int MotivoCancelacion = int.Parse(ddl_motivoCancelacion.SelectedItem.Value); + int MotivoCancelacion = int.Parse(ddlMotivoCancelacion.SelectedItem.Value); bool conResultado = true; if (desasociaLote == 0) { estadoSeleccionado = Convert.ToInt32(ddlEstado.SelectedValue);//Estado seleccionado => 2 No Enviado - 4 Pendiente para enviar - resultadoDerivacion = (estadoSeleccionado == 2) ? "No Derivado: " + ddl_motivoCancelacion.SelectedItem.Text : "Pendiente para enviar "; + resultadoDerivacion = (estadoSeleccionado == 2) ? "No Derivado: " + ddlMotivoCancelacion.SelectedItem.Text : "Pendiente para enviar "; } else { diff --git a/WebLab/Derivaciones/InformeList3.aspx.designer.cs b/WebLab/Derivaciones/InformeList3.aspx.designer.cs index 2f6e719..4c71d42 100644 --- a/WebLab/Derivaciones/InformeList3.aspx.designer.cs +++ b/WebLab/Derivaciones/InformeList3.aspx.designer.cs @@ -51,40 +51,40 @@ public partial class InformeList3 protected global::System.Web.UI.WebControls.DropDownList ddlEstado; /// - /// rv_estado control. + /// rvEstado control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RangeValidator rv_estado; + protected global::System.Web.UI.WebControls.RangeValidator rvEstado; /// - /// ddl_motivoCancelacion control. + /// ddlMotivoCancelacion control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.DropDownList ddl_motivoCancelacion; + protected global::System.Web.UI.WebControls.DropDownList ddlMotivoCancelacion; /// - /// lbl_ErrorMotivo control. + /// lblErrorMotivo control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_ErrorMotivo; + protected global::System.Web.UI.WebControls.Label lblErrorMotivo; /// - /// txt_observacion control. + /// txtObservacion control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.TextBox txt_observacion; + protected global::System.Web.UI.WebControls.TextBox txtObservacion; /// /// btnGuardar control. @@ -105,13 +105,13 @@ public partial class InformeList3 protected global::System.Web.UI.WebControls.LinkButton lnkPDF; /// - /// lbl_errorLista control. + /// lblErrorLista control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_errorLista; + protected global::System.Web.UI.WebControls.Label lblErrorLista; /// /// lnkMarcar control. diff --git a/WebLab/Derivaciones/InformeLote.aspx b/WebLab/Derivaciones/InformeLote.aspx index cfb5191..314b28b 100644 --- a/WebLab/Derivaciones/InformeLote.aspx +++ b/WebLab/Derivaciones/InformeLote.aspx @@ -7,10 +7,10 @@ var validatorEstado = document.getElementById('<%= Range1.ClientID %>'); var txtObservacion = document.getElementById('<%= txtObservacion.ClientID %>'); var estado = document.getElementById('<%= ddlEstados.ClientID %>'); - var label = document.getElementById('<%= lbl_ErrorMotivo.ClientID %>'); - var labelGrilla = document.getElementById('<%= lbl_errorLista.ClientID %>'); - var lista_transporte = document.getElementById('<%= ddl_Transporte.ClientID %>'); - var labelErrorTransporte = document.getElementById('<%= lbl_ErrorTransporte.ClientID %>'); + var label = document.getElementById('<%= lblErrorMotivo.ClientID %>'); + var labelGrilla = document.getElementById('<%= lblErrorLista.ClientID %>'); + var lista_transporte = document.getElementById('<%= ddlTransporte.ClientID %>'); + var labelErrorTransporte = document.getElementById('<%= lblErrorTransporte.ClientID %>'); //Limpio los labels de error label.className = 'hidden'; @@ -62,7 +62,7 @@ return true; // Detiene la validacin con al menos un check } } - var label = document.getElementById('<%= lbl_errorLista.ClientID %>'); + var label = document.getElementById('<%= lblErrorLista.ClientID %>'); label.className = 'exposed'; return todoOk; } @@ -71,8 +71,8 @@ //Habilita la seleccion del listado desplegable donde estan los transportes var ddl = document.getElementById('<%= ddlEstados.ClientID %>'); - var labelErrorTransporte = document.getElementById('<%= lbl_ErrorTransporte.ClientID%>'); - var lista_transporte = document.getElementById('<%= ddl_Transporte.ClientID%>'); + var labelErrorTransporte = document.getElementById('<%= lblErrorTransporte.ClientID%>'); + var lista_transporte = document.getElementById('<%= ddlTransporte.ClientID%>'); var estado = ddl.value; //console.log("--"); //console.log(lista_transporte); @@ -88,7 +88,7 @@ function reseteaLabelErrorLote() { //Esconde el label que tiene el error - var labelGrilla = document.getElementById('<%= lbl_errorLista.ClientID %>'); + var labelGrilla = document.getElementById('<%= lblErrorLista.ClientID %>'); labelGrilla.className = 'hidden'; } @@ -104,8 +104,8 @@ function verificaSeleccion() { //Esta funcion revisa que se haya selecionado un transporte - var lista_transporte = document.getElementById('<%= ddl_Transporte.ClientID %>'); - var labelErrorTransporte = document.getElementById('<%= lbl_ErrorTransporte.ClientID %>'); + var lista_transporte = document.getElementById('<%= ddlTransporte.ClientID %>'); + var labelErrorTransporte = document.getElementById('<%= lblErrorTransporte.ClientID %>'); //console.log("transporte"); //console.log(lista_transporte.value); if (lista_transporte.selectedIndex == 0) { @@ -116,8 +116,8 @@ } document.addEventListener("DOMContentLoaded", function () { - var txtFecha = document.getElementById('<%= txt_Fecha.ClientID %>'); - var txtHora = document.getElementById('<%= txt_Hora.ClientID %>'); + var txtFecha = document.getElementById('<%= txtFecha.ClientID %>'); + var txtHora = document.getElementById('<%= txtHora.ClientID %>'); function cambioFechaHorario() { var fechaSeleccionada = new Date(txtFecha.value); @@ -187,20 +187,20 @@ Retira transporte: - + <%-- --%> - + Observaciones: - + <%-- @@ -209,15 +209,15 @@ Fecha y Hora de retiro: - + - *Error en Fecha + *Error en Fecha - + - *Error en Hora + *Error en Hora @@ -247,7 +247,7 @@ - +
Seleccionar: Todas  diff --git a/WebLab/Derivaciones/InformeLote.aspx.cs b/WebLab/Derivaciones/InformeLote.aspx.cs index bbf74ef..a241305 100644 --- a/WebLab/Derivaciones/InformeLote.aspx.cs +++ b/WebLab/Derivaciones/InformeLote.aspx.cs @@ -129,11 +129,11 @@ private void activarControles(bool valor) txtObservacion.Enabled = valor; ddlEstados.Enabled = valor; //rb_transportista.Enabled = true; //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) - ddl_Transporte.Enabled = valor; + ddlTransporte.Enabled = valor; lnkMarcar.Enabled = valor; lnkDesMarcar.Enabled = valor; - txt_Fecha.Enabled = valor; - txt_Hora.Enabled = valor; + txtFecha.Enabled = valor; + txtHora.Enabled = valor; } private void CargarControles() @@ -155,10 +155,10 @@ private void CargarEstados() private void CargarTransportistas() { - ddl_Transporte.Items.Add("-- SELECCIONE --"); + ddlTransporte.Items.Add("-- SELECCIONE --"); //Vanesa: por ahora esta hardcodeado los transportitas, hacer mejora que lea de la base de datos - ddl_Transporte.Items.Add("Público"); - ddl_Transporte.Items.Add("Privado"); + ddlTransporte.Items.Add("Público"); + ddlTransporte.Items.Add("Privado"); //Utility oUtil = new Utility(); @@ -169,8 +169,8 @@ private void CargarTransportistas() private void CargarFechaHoraActual() { DateTime miFecha = DateTime.UtcNow.AddHours(-3); //Hora estándar de Argentina (UTC-03:00) - txt_Fecha.Text = miFecha.Date.ToString("yyyy-MM-dd"); - txt_Hora.Text = miFecha.ToString("HH:mm"); + txtFecha.Text = miFecha.Date.ToString("yyyy-MM-dd"); + txtHora.Text = miFecha.ToString("HH:mm"); //Date1.Text = miFecha.Date.ToString("yyyy-MM-dd"); //Time1.Text = miFecha.ToString("HH:mm"); } @@ -339,7 +339,7 @@ private bool Guardar() int estadoLote = Convert.ToInt32(ddlEstados.SelectedValue); string resultadoDerivacion = estadoLote == 2 ? "Derivado: " + row.Cells[3].Text : "No Derivado. "; //string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? rb_transportista.SelectedValue : ""); //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) - string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? ddl_Transporte.SelectedValue : ""); + string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? ddlTransporte.SelectedValue : ""); LoteDerivacion lote = new LoteDerivacion(); lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); @@ -348,7 +348,7 @@ private bool Guardar() lote.Observacion = observacion; lote.IdUsuarioEnvio = idUsuario; //para Estado "Derivado" poner la fecha actual y para estado "Cancelado" no poner Fecha - string fecha_hora = txt_Fecha.Text + " " + txt_Hora.Text; + string fecha_hora = txtFecha.Text + " " + txtHora.Text; lote.FechaEnvio = (estadoLote == 2) ? Convert.ToDateTime(fecha_hora) : DateTime.Parse("01/01/1900"); lote.Save(); @@ -404,10 +404,10 @@ Estado de la derivacion LAB_DerivacionEstado if (estadoLote == 2) //Si deriva indica con que transportista fue, y que fecha y hora se retiro { // lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", rb_transportista.SelectedValue); //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) - lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", ddl_Transporte.SelectedValue); - DateTime f = new DateTime(Convert.ToInt16(txt_Fecha.Text.Substring(0, 4)), Convert.ToInt16(txt_Fecha.Text.Substring(5, 2)), Convert.ToInt16(txt_Fecha.Text.Substring(8, 2))); + lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", ddlTransporte.SelectedValue); + DateTime f = new DateTime(Convert.ToInt16(txtFecha.Text.Substring(0, 4)), Convert.ToInt16(txtFecha.Text.Substring(5, 2)), Convert.ToInt16(txtFecha.Text.Substring(8, 2))); lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Fecha", f.ToString("dd/MM/yyyy")); //que las fechas tengan el mismo formato - lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Hora", txt_Hora.Text); + lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Hora", txtHora.Text); } diff --git a/WebLab/Derivaciones/InformeLote.aspx.designer.cs b/WebLab/Derivaciones/InformeLote.aspx.designer.cs index a81c429..59d5969 100644 --- a/WebLab/Derivaciones/InformeLote.aspx.designer.cs +++ b/WebLab/Derivaciones/InformeLote.aspx.designer.cs @@ -42,22 +42,22 @@ public partial class InformeLote protected global::System.Web.UI.WebControls.RangeValidator Range1; /// - /// ddl_Transporte control. + /// ddlTransporte control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.DropDownList ddl_Transporte; + protected global::System.Web.UI.WebControls.DropDownList ddlTransporte; /// - /// lbl_ErrorTransporte control. + /// lblErrorTransporte control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_ErrorTransporte; + protected global::System.Web.UI.WebControls.Label lblErrorTransporte; /// /// txtObservacion control. @@ -69,22 +69,22 @@ public partial class InformeLote protected global::System.Web.UI.WebControls.TextBox txtObservacion; /// - /// lbl_ErrorMotivo control. + /// lblErrorMotivo control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_ErrorMotivo; + protected global::System.Web.UI.WebControls.Label lblErrorMotivo; /// - /// txt_Fecha control. + /// txtFecha control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.TextBox txt_Fecha; + protected global::System.Web.UI.WebControls.TextBox txtFecha; /// /// RequiredFieldValidator1 control. @@ -96,13 +96,13 @@ public partial class InformeLote protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1; /// - /// txt_Hora control. + /// txtHora control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.TextBox txt_Hora; + protected global::System.Web.UI.WebControls.TextBox txtHora; /// /// RequiredFieldValidator2 control. @@ -123,13 +123,13 @@ public partial class InformeLote protected global::System.Web.UI.WebControls.Button btnGuardar; /// - /// lbl_errorLista control. + /// lblErrorLista control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_errorLista; + protected global::System.Web.UI.WebControls.Label lblErrorLista; /// /// lnkMarcar control. diff --git a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx index 853354f..1ee7de9 100644 --- a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx +++ b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx @@ -49,7 +49,7 @@ -
+
@@ -69,20 +69,20 @@ -
- +
+
Efector origen: - + Estado Lote: - + @@ -125,7 +125,7 @@ - + @@ -144,7 +144,7 @@
diff --git a/WebLab/Protocolos/DerivacionRecibirLote.aspx.cs b/WebLab/Protocolos/DerivacionRecibirLote.aspx.cs index 7697a72..31b87ab 100644 --- a/WebLab/Protocolos/DerivacionRecibirLote.aspx.cs +++ b/WebLab/Protocolos/DerivacionRecibirLote.aspx.cs @@ -52,18 +52,18 @@ private void CargarEncabezado() lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), Convert.ToInt32(Request["idLote"])); //lbl_FechaRegistro.Text = lote.FechaRegistro.Substring(0, 10); //fechaEnvio.Text = DateTime.Parse(lote.FechaEnvio.Substring(0, 10)).ToString("yyyy-MM-dd"); - hid_fechaEnvio.Value = lote.FechaEnvio.ToString("yyyy-MM-dd"); - lbl_fechaPermitida.Text = "Fecha envio: " + lote.FechaEnvio; + hidFechaEnvio.Value = lote.FechaEnvio.ToString("yyyy-MM-dd"); + lblFechaPermitida.Text = "Fecha envio: " + lote.FechaEnvio; Efector origen = new Efector(); origen = (Efector)origen.Get(typeof(Efector), lote.IdEfectorOrigen.IdEfector); - lb_efector.Text = origen.Nombre; + lbEfector.Text = origen.Nombre; CargarFechaHoraActual(); //LAB-56 Cargo el transportista List auditorias = AuditoriaLoteDerivacion.AuditoriasPorLote(Convert.ToInt32(Request["idLote"])); AuditoriaLoteDerivacion transporte = auditorias.FindLast(a => a.Analisis == "Transportista"); - lbl_transportista.Text = transporte.Valor; + lblTransportista.Text = transporte.Valor; } @@ -71,13 +71,13 @@ 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"); - txt_Hora.Value = miFecha.ToString("HH:mm"); + 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 - rv_Fecha.MinimumValue = hid_fechaEnvio.Value; - rv_Fecha.MaximumValue = txtFecha.Text; //Fecha Date today - rv_Fecha.Text = "La fecha de recepcion no puede ser menor a la fecha de envio " + hid_fechaEnvio.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; } @@ -142,14 +142,14 @@ private void GenerarAuditorias(LoteDerivacion lote) // lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Fecha Recibido", f.ToString("yyyy-MM-dd")); //Cambio formato de fecha asi tiene el mismo cuando se retira el lote //} - if (!string.IsNullOrEmpty(txt_Hora.Value)) - lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Hora Recibido", txt_Hora.Value); + if (!string.IsNullOrEmpty(txtHora.Value)) + lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Hora Recibido", txtHora.Value); //if (!string.IsNullOrEmpty(txt_transportista.Text)) // lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Transportista", txt_transportista.Text); - if (!string.IsNullOrEmpty(txt_obs.Value)) - lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Observacion", txt_obs.Value); + if (!string.IsNullOrEmpty(txtObs.Value)) + lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Observacion", txtObs.Value); } #endregion diff --git a/WebLab/Protocolos/DerivacionRecibirLote.aspx.designer.cs b/WebLab/Protocolos/DerivacionRecibirLote.aspx.designer.cs index 04492b4..0705dca 100644 --- a/WebLab/Protocolos/DerivacionRecibirLote.aspx.designer.cs +++ b/WebLab/Protocolos/DerivacionRecibirLote.aspx.designer.cs @@ -51,40 +51,40 @@ public partial class DerivacionRecibirLote protected global::System.Web.UI.WebControls.Label txtNumeroLote; /// - /// lb_efector control. + /// lbEfector control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lb_efector; + protected global::System.Web.UI.WebControls.Label lbEfector; /// - /// lbl_fechaPermitida control. + /// lblFechaPermitida control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_fechaPermitida; + protected global::System.Web.UI.WebControls.Label lblFechaPermitida; /// - /// hid_fechaEnvio control. + /// hidFechaEnvio control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.HiddenField hid_fechaEnvio; + protected global::System.Web.UI.WebControls.HiddenField hidFechaEnvio; /// - /// lbl_transportista control. + /// lblTransportista control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_transportista; + protected global::System.Web.UI.WebControls.Label lblTransportista; /// /// txtFecha control. @@ -96,13 +96,13 @@ public partial class DerivacionRecibirLote protected global::System.Web.UI.WebControls.TextBox txtFecha; /// - /// txt_Hora control. + /// txtHora control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.HtmlControls.HtmlInputGenericControl txt_Hora; + protected global::System.Web.UI.HtmlControls.HtmlInputGenericControl txtHora; /// /// rfvFecha control. @@ -114,48 +114,48 @@ public partial class DerivacionRecibirLote protected global::System.Web.UI.WebControls.RequiredFieldValidator rfvFecha; /// - /// rfv_Hora control. + /// rfvHora control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RequiredFieldValidator rfv_Hora; + protected global::System.Web.UI.WebControls.RequiredFieldValidator rfvHora; /// - /// rv_Fecha control. + /// rvFecha control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RangeValidator rv_Fecha; + protected global::System.Web.UI.WebControls.RangeValidator rvFecha; /// - /// txt_obs control. + /// txtObs control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.HtmlControls.HtmlTextArea txt_obs; + protected global::System.Web.UI.HtmlControls.HtmlTextArea txtObs; /// - /// btn_recibirLote control. + /// btnRecibirLote control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Button btn_recibirLote; + protected global::System.Web.UI.WebControls.Button btnRecibirLote; /// - /// btn_volver control. + /// btnVolver control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Button btn_volver; + protected global::System.Web.UI.WebControls.Button btnVolver; } } From e6e307bdf5b07f49efa5bfb7f53e61506776c3d1 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Tue, 14 Oct 2025 16:02:19 -0300 Subject: [PATCH 02/61] fix: Requerimiento 1: Cambiar a nomenclatura CamelCase --- WebLab/Derivaciones/Derivados2.aspx | 2 +- WebLab/Derivaciones/Derivados2.aspx.cs | 2 +- .../Derivaciones/Derivados2.aspx.designer.cs | 4 +- WebLab/Derivaciones/GestionarLote.aspx | 6 +-- WebLab/Derivaciones/GestionarLote.aspx.cs | 6 +-- .../GestionarLote.aspx.designer.cs | 12 +++--- WebLab/Derivaciones/InformeList3.aspx | 26 ++++++------ WebLab/Derivaciones/InformeList3.aspx.cs | 24 +++++------ .../InformeList3.aspx.designer.cs | 20 +++++----- WebLab/Derivaciones/InformeLote.aspx | 40 +++++++++---------- WebLab/Derivaciones/InformeLote.aspx.cs | 26 ++++++------ .../Derivaciones/InformeLote.aspx.designer.cs | 24 +++++------ .../DerivacionMultiEfectorLote.aspx | 14 +++---- .../DerivacionMultiEfectorLote.aspx.cs | 26 ++++++------ ...erivacionMultiEfectorLote.aspx.designer.cs | 28 ++++++------- WebLab/Protocolos/DerivacionRecibirLote.aspx | 24 +++++------ .../Protocolos/DerivacionRecibirLote.aspx.cs | 24 +++++------ .../DerivacionRecibirLote.aspx.designer.cs | 40 +++++++++---------- 18 files changed, 174 insertions(+), 174 deletions(-) diff --git a/WebLab/Derivaciones/Derivados2.aspx b/WebLab/Derivaciones/Derivados2.aspx index 0670fda..e34edf8 100644 --- a/WebLab/Derivaciones/Derivados2.aspx +++ b/WebLab/Derivaciones/Derivados2.aspx @@ -146,7 +146,7 @@
- + diff --git a/WebLab/Derivaciones/Derivados2.aspx.cs b/WebLab/Derivaciones/Derivados2.aspx.cs index d6c5dbc..8abf0a8 100644 --- a/WebLab/Derivaciones/Derivados2.aspx.cs +++ b/WebLab/Derivaciones/Derivados2.aspx.cs @@ -248,7 +248,7 @@ private void verificaResultados(string str_condicion) } else { - cv_botonBuscar.IsValid = false; //que de error sin enviar alert + cvBotonBuscar.IsValid = false; //que de error sin enviar alert } diff --git a/WebLab/Derivaciones/Derivados2.aspx.designer.cs b/WebLab/Derivaciones/Derivados2.aspx.designer.cs index 49285a3..e7be903 100644 --- a/WebLab/Derivaciones/Derivados2.aspx.designer.cs +++ b/WebLab/Derivaciones/Derivados2.aspx.designer.cs @@ -132,13 +132,13 @@ public partial class Derivados2 protected global::System.Web.UI.WebControls.RadioButtonList rdbEstado; /// - /// cv_botonBuscar control. + /// cvBotonBuscar control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.CustomValidator cv_botonBuscar; + protected global::System.Web.UI.WebControls.CustomValidator cvBotonBuscar; /// /// btnBuscar control. diff --git a/WebLab/Derivaciones/GestionarLote.aspx b/WebLab/Derivaciones/GestionarLote.aspx index b99ddc2..68224e5 100644 --- a/WebLab/Derivaciones/GestionarLote.aspx +++ b/WebLab/Derivaciones/GestionarLote.aspx @@ -68,8 +68,8 @@ - - + + @@ -95,7 +95,7 @@
- + diff --git a/WebLab/Derivaciones/GestionarLote.aspx.cs b/WebLab/Derivaciones/GestionarLote.aspx.cs index f9ce658..45ba280 100644 --- a/WebLab/Derivaciones/GestionarLote.aspx.cs +++ b/WebLab/Derivaciones/GestionarLote.aspx.cs @@ -100,9 +100,9 @@ protected void btnBuscar_Click(object sender, EventArgs e) if (ddlEfector.SelectedValue != "0") str_condicion += " AND l.idEfectorDestino = " + ddlEfector.SelectedValue; str_condicion += " AND idEfectorOrigen = " + oUser.IdEfector.IdEfector.ToString(); - if (!string.IsNullOrWhiteSpace(tb_nrolote.Text)) + if (!string.IsNullOrWhiteSpace(tbNrolote.Text)) { - str_condicion += " AND idLoteDerivacion = " + tb_nrolote.Text; + str_condicion += " AND idLoteDerivacion = " + tbNrolote.Text; } verificaResultados(Convert.ToInt32(rdbEstado.SelectedValue), str_condicion); @@ -152,7 +152,7 @@ private void verificaResultados(int estado, string parametros) } else { - cv_botonBuscar.IsValid = false; //que de error sin enviar alert + cvBotonBuscar.IsValid = false; //que de error sin enviar alert } diff --git a/WebLab/Derivaciones/GestionarLote.aspx.designer.cs b/WebLab/Derivaciones/GestionarLote.aspx.designer.cs index f8ea1ba..81c6526 100644 --- a/WebLab/Derivaciones/GestionarLote.aspx.designer.cs +++ b/WebLab/Derivaciones/GestionarLote.aspx.designer.cs @@ -60,22 +60,22 @@ public partial class GestionarLote protected global::System.Web.UI.HtmlControls.HtmlInputText txtFechaHasta; /// - /// tb_nrolote control. + /// tbNrolote control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.TextBox tb_nrolote; + protected global::System.Web.UI.WebControls.TextBox tbNrolote; /// - /// cv_nroLote control. + /// cvNroLote control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.CustomValidator cv_nroLote; + protected global::System.Web.UI.WebControls.CustomValidator cvNroLote; /// /// ddlEfector control. @@ -96,13 +96,13 @@ public partial class GestionarLote protected global::System.Web.UI.WebControls.RadioButtonList rdbEstado; /// - /// cv_botonBuscar control. + /// cvBotonBuscar control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.CustomValidator cv_botonBuscar; + protected global::System.Web.UI.WebControls.CustomValidator cvBotonBuscar; /// /// btnBuscar control. diff --git a/WebLab/Derivaciones/InformeList3.aspx b/WebLab/Derivaciones/InformeList3.aspx index 98644db..beb8b24 100644 --- a/WebLab/Derivaciones/InformeList3.aspx +++ b/WebLab/Derivaciones/InformeList3.aspx @@ -6,11 +6,11 @@ function validarFormulario() { var todoOk = false; - var validatorEstado = document.getElementById('<%= rv_estado.ClientID %>'); + var validatorEstado = document.getElementById('<%= rvEstado.ClientID %>'); <%--var txtObservacion = document.getElementById('<%= txtObservacion.ClientID %>');--%> //--> Cambio TextBox por DropDownList - var motivoCancelacion = document.getElementById('<%= ddl_motivoCancelacion.ClientID%>'); + var motivoCancelacion = document.getElementById('<%= ddlMotivoCancelacion.ClientID%>'); var estado = document.getElementById('<%= ddlEstado.ClientID %>'); - var label = document.getElementById('<%= lbl_ErrorMotivo.ClientID %>'); + var label = document.getElementById('<%= lblErrorMotivo.ClientID %>'); //Limpio los labels de error label.className = 'hidden'; @@ -59,18 +59,18 @@ return true; // Detiene la validación con al menos un check } } - var label = document.getElementById('<%= lbl_errorLista.ClientID %>'); + var label = document.getElementById('<%= lblErrorLista.ClientID %>'); label.className = 'exposed'; return todoOk; } function reseteaLabelErrorGrilla() { - var labelGrilla = document.getElementById('<%= lbl_errorLista.ClientID %>'); + var labelGrilla = document.getElementById('<%= lblErrorLista.ClientID %>'); labelGrilla.className = 'hidden'; } function reseteaLabelErrorMotivo() { - var labelMotivo = document.getElementById('<%= lbl_ErrorMotivo.ClientID %>'); + var labelMotivo = document.getElementById('<%= lblErrorMotivo.ClientID %>'); labelMotivo.className = 'hidden'; } @@ -103,7 +103,7 @@ } function activaMotivos(estado) { - var motivos = document.getElementById('<%= ddl_motivoCancelacion.ClientID %>'); + var motivos = document.getElementById('<%= ddlMotivoCancelacion.ClientID %>'); console.log(motivos); console.log(estado.value); if (estado.value == 2) { @@ -125,7 +125,7 @@ } }); //Si selecciono todas las derivaciones, deshabilito el error que no selecciono ninguna fila - if (seleccionar && document.getElementById('<%= lbl_errorLista.ClientID %>').className == 'exposed') { + if (seleccionar && document.getElementById('<%= lblErrorLista.ClientID %>').className == 'exposed') { reseteaLabelErrorGrilla(); } } @@ -224,7 +224,7 @@ Marcar como: - Motivo Cancelación: - + - + Observación: - + - +
Seleccionar: Todas  Ninguna diff --git a/WebLab/Derivaciones/InformeList3.aspx.cs b/WebLab/Derivaciones/InformeList3.aspx.cs index 00eb73a..2921e22 100644 --- a/WebLab/Derivaciones/InformeList3.aspx.cs +++ b/WebLab/Derivaciones/InformeList3.aspx.cs @@ -88,9 +88,9 @@ protected void Page_Load(object sender, EventArgs e) #region carga private void CargarParaModificacion() { - ddl_motivoCancelacion.SelectedValue = "0"; + ddlMotivoCancelacion.SelectedValue = "0"; ddlEstado.SelectedIndex = 2; - ddl_motivoCancelacion.Enabled = false; + ddlMotivoCancelacion.Enabled = false; //Observación Business.Data.Laboratorio.LoteDerivacion lote = new LoteDerivacion(); @@ -100,7 +100,7 @@ private void CargarParaModificacion() crit.Add(Expression.Eq("Idlote", lote.IdLoteDerivacion)); IList lista = crit.List(); if (lista.Count > 0) - txt_observacion.Text = ((Business.Data.Laboratorio.Derivacion)lista[0]).Observacion; + txtObservacion.Text = ((Business.Data.Laboratorio.Derivacion)lista[0]).Observacion; } private void CargarListas() @@ -116,8 +116,8 @@ private void CargarListas() oUtil = new Utility(); //Motivos de cancelacion LAB-75 m_ssql = "SELECT idMotivo, descripcion FROM LAB_DerivacionMotivoCancelacion WHERE baja = 0"; - oUtil.CargarCombo(ddl_motivoCancelacion, m_ssql, "idMotivo", "descripcion", connReady); - ddl_motivoCancelacion.Items.Insert(0, new ListItem("--Seleccione--", "0")); + oUtil.CargarCombo(ddlMotivoCancelacion, m_ssql, "idMotivo", "descripcion", connReady); + ddlMotivoCancelacion.Items.Insert(0, new ListItem("--Seleccione--", "0")); @@ -128,7 +128,7 @@ private void habilitarImprresion() { gvLista.Columns[11].Visible = true; lnkPDF.Visible = true; - ddl_motivoCancelacion.Enabled = false; + ddlMotivoCancelacion.Enabled = false; } else { @@ -138,15 +138,15 @@ private void habilitarImprresion() } private void limpiarForm() { - txt_observacion.Text = string.Empty; - ddl_motivoCancelacion.SelectedIndex = 0; + txtObservacion.Text = string.Empty; + ddlMotivoCancelacion.SelectedIndex = 0; ddlEstado.SelectedIndex = 0; } private void activarControles(bool valor) { btnGuardar.Enabled = valor; - txt_observacion.Enabled = valor; + txtObservacion.Enabled = valor; lnkMarcar.Enabled = valor; lnkDesMarcar.Enabled = valor; //ddl_motivoCancelacion.Enabled = valor; @@ -414,18 +414,18 @@ private void ActualizarDetalleProtocolo(GridViewRow row, int idLote = 0, int de { int estadoSeleccionado; string resultadoDerivacion; - string observacion = txt_observacion.Text; + string observacion = txtObservacion.Text; int idUsuarioRegistro = oUser.IdUsuario; //Convert.ToInt32(Session["idUsuario"]); int idUsuarioResultado = oUser.IdUsuario; DateTime fechaDeHoy = DateTime.Now; DateTime fechaDeHoyDetalle = DateTime.Now; - int MotivoCancelacion = int.Parse(ddl_motivoCancelacion.SelectedItem.Value); + int MotivoCancelacion = int.Parse(ddlMotivoCancelacion.SelectedItem.Value); bool conResultado = true; if (desasociaLote == 0) { estadoSeleccionado = Convert.ToInt32(ddlEstado.SelectedValue);//Estado seleccionado => 2 No Enviado - 4 Pendiente para enviar - resultadoDerivacion = (estadoSeleccionado == 2) ? "No Derivado: " + ddl_motivoCancelacion.SelectedItem.Text : "Pendiente para enviar "; + resultadoDerivacion = (estadoSeleccionado == 2) ? "No Derivado: " + ddlMotivoCancelacion.SelectedItem.Text : "Pendiente para enviar "; } else { diff --git a/WebLab/Derivaciones/InformeList3.aspx.designer.cs b/WebLab/Derivaciones/InformeList3.aspx.designer.cs index 2f6e719..4c71d42 100644 --- a/WebLab/Derivaciones/InformeList3.aspx.designer.cs +++ b/WebLab/Derivaciones/InformeList3.aspx.designer.cs @@ -51,40 +51,40 @@ public partial class InformeList3 protected global::System.Web.UI.WebControls.DropDownList ddlEstado; /// - /// rv_estado control. + /// rvEstado control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RangeValidator rv_estado; + protected global::System.Web.UI.WebControls.RangeValidator rvEstado; /// - /// ddl_motivoCancelacion control. + /// ddlMotivoCancelacion control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.DropDownList ddl_motivoCancelacion; + protected global::System.Web.UI.WebControls.DropDownList ddlMotivoCancelacion; /// - /// lbl_ErrorMotivo control. + /// lblErrorMotivo control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_ErrorMotivo; + protected global::System.Web.UI.WebControls.Label lblErrorMotivo; /// - /// txt_observacion control. + /// txtObservacion control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.TextBox txt_observacion; + protected global::System.Web.UI.WebControls.TextBox txtObservacion; /// /// btnGuardar control. @@ -105,13 +105,13 @@ public partial class InformeList3 protected global::System.Web.UI.WebControls.LinkButton lnkPDF; /// - /// lbl_errorLista control. + /// lblErrorLista control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_errorLista; + protected global::System.Web.UI.WebControls.Label lblErrorLista; /// /// lnkMarcar control. diff --git a/WebLab/Derivaciones/InformeLote.aspx b/WebLab/Derivaciones/InformeLote.aspx index cfb5191..314b28b 100644 --- a/WebLab/Derivaciones/InformeLote.aspx +++ b/WebLab/Derivaciones/InformeLote.aspx @@ -7,10 +7,10 @@ var validatorEstado = document.getElementById('<%= Range1.ClientID %>'); var txtObservacion = document.getElementById('<%= txtObservacion.ClientID %>'); var estado = document.getElementById('<%= ddlEstados.ClientID %>'); - var label = document.getElementById('<%= lbl_ErrorMotivo.ClientID %>'); - var labelGrilla = document.getElementById('<%= lbl_errorLista.ClientID %>'); - var lista_transporte = document.getElementById('<%= ddl_Transporte.ClientID %>'); - var labelErrorTransporte = document.getElementById('<%= lbl_ErrorTransporte.ClientID %>'); + var label = document.getElementById('<%= lblErrorMotivo.ClientID %>'); + var labelGrilla = document.getElementById('<%= lblErrorLista.ClientID %>'); + var lista_transporte = document.getElementById('<%= ddlTransporte.ClientID %>'); + var labelErrorTransporte = document.getElementById('<%= lblErrorTransporte.ClientID %>'); //Limpio los labels de error label.className = 'hidden'; @@ -62,7 +62,7 @@ return true; // Detiene la validacin con al menos un check } } - var label = document.getElementById('<%= lbl_errorLista.ClientID %>'); + var label = document.getElementById('<%= lblErrorLista.ClientID %>'); label.className = 'exposed'; return todoOk; } @@ -71,8 +71,8 @@ //Habilita la seleccion del listado desplegable donde estan los transportes var ddl = document.getElementById('<%= ddlEstados.ClientID %>'); - var labelErrorTransporte = document.getElementById('<%= lbl_ErrorTransporte.ClientID%>'); - var lista_transporte = document.getElementById('<%= ddl_Transporte.ClientID%>'); + var labelErrorTransporte = document.getElementById('<%= lblErrorTransporte.ClientID%>'); + var lista_transporte = document.getElementById('<%= ddlTransporte.ClientID%>'); var estado = ddl.value; //console.log("--"); //console.log(lista_transporte); @@ -88,7 +88,7 @@ function reseteaLabelErrorLote() { //Esconde el label que tiene el error - var labelGrilla = document.getElementById('<%= lbl_errorLista.ClientID %>'); + var labelGrilla = document.getElementById('<%= lblErrorLista.ClientID %>'); labelGrilla.className = 'hidden'; } @@ -104,8 +104,8 @@ function verificaSeleccion() { //Esta funcion revisa que se haya selecionado un transporte - var lista_transporte = document.getElementById('<%= ddl_Transporte.ClientID %>'); - var labelErrorTransporte = document.getElementById('<%= lbl_ErrorTransporte.ClientID %>'); + var lista_transporte = document.getElementById('<%= ddlTransporte.ClientID %>'); + var labelErrorTransporte = document.getElementById('<%= lblErrorTransporte.ClientID %>'); //console.log("transporte"); //console.log(lista_transporte.value); if (lista_transporte.selectedIndex == 0) { @@ -116,8 +116,8 @@ } document.addEventListener("DOMContentLoaded", function () { - var txtFecha = document.getElementById('<%= txt_Fecha.ClientID %>'); - var txtHora = document.getElementById('<%= txt_Hora.ClientID %>'); + var txtFecha = document.getElementById('<%= txtFecha.ClientID %>'); + var txtHora = document.getElementById('<%= txtHora.ClientID %>'); function cambioFechaHorario() { var fechaSeleccionada = new Date(txtFecha.value); @@ -187,20 +187,20 @@ Retira transporte: - + <%-- --%> - + Observaciones: - + <%-- @@ -209,15 +209,15 @@ Fecha y Hora de retiro: - + - *Error en Fecha + *Error en Fecha - + - *Error en Hora + *Error en Hora @@ -247,7 +247,7 @@ - +
Seleccionar: Todas  diff --git a/WebLab/Derivaciones/InformeLote.aspx.cs b/WebLab/Derivaciones/InformeLote.aspx.cs index 3cfe9a2..8224fac 100644 --- a/WebLab/Derivaciones/InformeLote.aspx.cs +++ b/WebLab/Derivaciones/InformeLote.aspx.cs @@ -136,11 +136,11 @@ private void activarControles(bool valor) txtObservacion.Enabled = valor; ddlEstados.Enabled = valor; //rb_transportista.Enabled = true; //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) - ddl_Transporte.Enabled = valor; + ddlTransporte.Enabled = valor; lnkMarcar.Enabled = valor; lnkDesMarcar.Enabled = valor; - txt_Fecha.Enabled = valor; - txt_Hora.Enabled = valor; + txtFecha.Enabled = valor; + txtHora.Enabled = valor; } private void CargarControles() @@ -162,10 +162,10 @@ private void CargarEstados() private void CargarTransportistas() { - ddl_Transporte.Items.Add("-- SELECCIONE --"); + ddlTransporte.Items.Add("-- SELECCIONE --"); //Vanesa: por ahora esta hardcodeado los transportitas, hacer mejora que lea de la base de datos - ddl_Transporte.Items.Add("Público"); - ddl_Transporte.Items.Add("Privado"); + ddlTransporte.Items.Add("Público"); + ddlTransporte.Items.Add("Privado"); //Utility oUtil = new Utility(); @@ -176,8 +176,8 @@ private void CargarTransportistas() private void CargarFechaHoraActual() { DateTime miFecha = DateTime.UtcNow.AddHours(-3); //Hora estándar de Argentina (UTC-03:00) - txt_Fecha.Text = miFecha.Date.ToString("yyyy-MM-dd"); - txt_Hora.Text = miFecha.ToString("HH:mm"); + txtFecha.Text = miFecha.Date.ToString("yyyy-MM-dd"); + txtHora.Text = miFecha.ToString("HH:mm"); //Date1.Text = miFecha.Date.ToString("yyyy-MM-dd"); //Time1.Text = miFecha.ToString("HH:mm"); } @@ -346,7 +346,7 @@ private bool Guardar() int estadoLote = Convert.ToInt32(ddlEstados.SelectedValue); string resultadoDerivacion = estadoLote == 2 ? "Derivado: " + row.Cells[3].Text : "No Derivado. "; //string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? rb_transportista.SelectedValue : ""); //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) - string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? ddl_Transporte.SelectedValue : ""); + string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? ddlTransporte.SelectedValue : ""); LoteDerivacion lote = new LoteDerivacion(); lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); @@ -355,7 +355,7 @@ private bool Guardar() lote.Observacion = observacion; lote.IdUsuarioEnvio = idUsuario; //para Estado "Derivado" poner la fecha actual y para estado "Cancelado" no poner Fecha - string fecha_hora = txt_Fecha.Text + " " + txt_Hora.Text; + string fecha_hora = txtFecha.Text + " " + txtHora.Text; lote.FechaEnvio = (estadoLote == 2) ? Convert.ToDateTime(fecha_hora) : DateTime.Parse("01/01/1900"); lote.Save(); @@ -411,10 +411,10 @@ Estado de la derivacion LAB_DerivacionEstado if (estadoLote == 2) //Si deriva indica con que transportista fue, y que fecha y hora se retiro { // lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", rb_transportista.SelectedValue); //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) - lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", ddl_Transporte.SelectedValue); - DateTime f = new DateTime(Convert.ToInt16(txt_Fecha.Text.Substring(0, 4)), Convert.ToInt16(txt_Fecha.Text.Substring(5, 2)), Convert.ToInt16(txt_Fecha.Text.Substring(8, 2))); + lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", ddlTransporte.SelectedValue); + DateTime f = new DateTime(Convert.ToInt16(txtFecha.Text.Substring(0, 4)), Convert.ToInt16(txtFecha.Text.Substring(5, 2)), Convert.ToInt16(txtFecha.Text.Substring(8, 2))); lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Fecha", f.ToString("dd/MM/yyyy")); //que las fechas tengan el mismo formato - lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Hora", txt_Hora.Text); + lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Hora", txtHora.Text); } diff --git a/WebLab/Derivaciones/InformeLote.aspx.designer.cs b/WebLab/Derivaciones/InformeLote.aspx.designer.cs index a81c429..59d5969 100644 --- a/WebLab/Derivaciones/InformeLote.aspx.designer.cs +++ b/WebLab/Derivaciones/InformeLote.aspx.designer.cs @@ -42,22 +42,22 @@ public partial class InformeLote protected global::System.Web.UI.WebControls.RangeValidator Range1; /// - /// ddl_Transporte control. + /// ddlTransporte control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.DropDownList ddl_Transporte; + protected global::System.Web.UI.WebControls.DropDownList ddlTransporte; /// - /// lbl_ErrorTransporte control. + /// lblErrorTransporte control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_ErrorTransporte; + protected global::System.Web.UI.WebControls.Label lblErrorTransporte; /// /// txtObservacion control. @@ -69,22 +69,22 @@ public partial class InformeLote protected global::System.Web.UI.WebControls.TextBox txtObservacion; /// - /// lbl_ErrorMotivo control. + /// lblErrorMotivo control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_ErrorMotivo; + protected global::System.Web.UI.WebControls.Label lblErrorMotivo; /// - /// txt_Fecha control. + /// txtFecha control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.TextBox txt_Fecha; + protected global::System.Web.UI.WebControls.TextBox txtFecha; /// /// RequiredFieldValidator1 control. @@ -96,13 +96,13 @@ public partial class InformeLote protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1; /// - /// txt_Hora control. + /// txtHora control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.TextBox txt_Hora; + protected global::System.Web.UI.WebControls.TextBox txtHora; /// /// RequiredFieldValidator2 control. @@ -123,13 +123,13 @@ public partial class InformeLote protected global::System.Web.UI.WebControls.Button btnGuardar; /// - /// lbl_errorLista control. + /// lblErrorLista control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_errorLista; + protected global::System.Web.UI.WebControls.Label lblErrorLista; /// /// lnkMarcar control. diff --git a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx index 853354f..1ee7de9 100644 --- a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx +++ b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx @@ -49,7 +49,7 @@ -
+
@@ -69,20 +69,20 @@ -
- +
+
Efector origen: - + Estado Lote: - + @@ -125,7 +125,7 @@ - + @@ -144,7 +144,7 @@
diff --git a/WebLab/Protocolos/DerivacionRecibirLote.aspx.cs b/WebLab/Protocolos/DerivacionRecibirLote.aspx.cs index 7697a72..31b87ab 100644 --- a/WebLab/Protocolos/DerivacionRecibirLote.aspx.cs +++ b/WebLab/Protocolos/DerivacionRecibirLote.aspx.cs @@ -52,18 +52,18 @@ private void CargarEncabezado() lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), Convert.ToInt32(Request["idLote"])); //lbl_FechaRegistro.Text = lote.FechaRegistro.Substring(0, 10); //fechaEnvio.Text = DateTime.Parse(lote.FechaEnvio.Substring(0, 10)).ToString("yyyy-MM-dd"); - hid_fechaEnvio.Value = lote.FechaEnvio.ToString("yyyy-MM-dd"); - lbl_fechaPermitida.Text = "Fecha envio: " + lote.FechaEnvio; + hidFechaEnvio.Value = lote.FechaEnvio.ToString("yyyy-MM-dd"); + lblFechaPermitida.Text = "Fecha envio: " + lote.FechaEnvio; Efector origen = new Efector(); origen = (Efector)origen.Get(typeof(Efector), lote.IdEfectorOrigen.IdEfector); - lb_efector.Text = origen.Nombre; + lbEfector.Text = origen.Nombre; CargarFechaHoraActual(); //LAB-56 Cargo el transportista List auditorias = AuditoriaLoteDerivacion.AuditoriasPorLote(Convert.ToInt32(Request["idLote"])); AuditoriaLoteDerivacion transporte = auditorias.FindLast(a => a.Analisis == "Transportista"); - lbl_transportista.Text = transporte.Valor; + lblTransportista.Text = transporte.Valor; } @@ -71,13 +71,13 @@ 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"); - txt_Hora.Value = miFecha.ToString("HH:mm"); + 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 - rv_Fecha.MinimumValue = hid_fechaEnvio.Value; - rv_Fecha.MaximumValue = txtFecha.Text; //Fecha Date today - rv_Fecha.Text = "La fecha de recepcion no puede ser menor a la fecha de envio " + hid_fechaEnvio.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; } @@ -142,14 +142,14 @@ private void GenerarAuditorias(LoteDerivacion lote) // lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Fecha Recibido", f.ToString("yyyy-MM-dd")); //Cambio formato de fecha asi tiene el mismo cuando se retira el lote //} - if (!string.IsNullOrEmpty(txt_Hora.Value)) - lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Hora Recibido", txt_Hora.Value); + if (!string.IsNullOrEmpty(txtHora.Value)) + lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Hora Recibido", txtHora.Value); //if (!string.IsNullOrEmpty(txt_transportista.Text)) // lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Transportista", txt_transportista.Text); - if (!string.IsNullOrEmpty(txt_obs.Value)) - lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Observacion", txt_obs.Value); + if (!string.IsNullOrEmpty(txtObs.Value)) + lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Observacion", txtObs.Value); } #endregion diff --git a/WebLab/Protocolos/DerivacionRecibirLote.aspx.designer.cs b/WebLab/Protocolos/DerivacionRecibirLote.aspx.designer.cs index 04492b4..0705dca 100644 --- a/WebLab/Protocolos/DerivacionRecibirLote.aspx.designer.cs +++ b/WebLab/Protocolos/DerivacionRecibirLote.aspx.designer.cs @@ -51,40 +51,40 @@ public partial class DerivacionRecibirLote protected global::System.Web.UI.WebControls.Label txtNumeroLote; /// - /// lb_efector control. + /// lbEfector control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lb_efector; + protected global::System.Web.UI.WebControls.Label lbEfector; /// - /// lbl_fechaPermitida control. + /// lblFechaPermitida control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_fechaPermitida; + protected global::System.Web.UI.WebControls.Label lblFechaPermitida; /// - /// hid_fechaEnvio control. + /// hidFechaEnvio control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.HiddenField hid_fechaEnvio; + protected global::System.Web.UI.WebControls.HiddenField hidFechaEnvio; /// - /// lbl_transportista control. + /// lblTransportista control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_transportista; + protected global::System.Web.UI.WebControls.Label lblTransportista; /// /// txtFecha control. @@ -96,13 +96,13 @@ public partial class DerivacionRecibirLote protected global::System.Web.UI.WebControls.TextBox txtFecha; /// - /// txt_Hora control. + /// txtHora control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.HtmlControls.HtmlInputGenericControl txt_Hora; + protected global::System.Web.UI.HtmlControls.HtmlInputGenericControl txtHora; /// /// rfvFecha control. @@ -114,48 +114,48 @@ public partial class DerivacionRecibirLote protected global::System.Web.UI.WebControls.RequiredFieldValidator rfvFecha; /// - /// rfv_Hora control. + /// rfvHora control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RequiredFieldValidator rfv_Hora; + protected global::System.Web.UI.WebControls.RequiredFieldValidator rfvHora; /// - /// rv_Fecha control. + /// rvFecha control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RangeValidator rv_Fecha; + protected global::System.Web.UI.WebControls.RangeValidator rvFecha; /// - /// txt_obs control. + /// txtObs control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.HtmlControls.HtmlTextArea txt_obs; + protected global::System.Web.UI.HtmlControls.HtmlTextArea txtObs; /// - /// btn_recibirLote control. + /// btnRecibirLote control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Button btn_recibirLote; + protected global::System.Web.UI.WebControls.Button btnRecibirLote; /// - /// btn_volver control. + /// btnVolver control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Button btn_volver; + protected global::System.Web.UI.WebControls.Button btnVolver; } } From bb37aeb5c92e62bdab71d7d248fcc474660eacf3 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Thu, 16 Oct 2025 12:28:22 -0300 Subject: [PATCH 03/61] =?UTF-8?q?Requerimiento=202:=20Renombrar=20?= =?UTF-8?q?=E2=80=9CPaciente/Producto=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebLab/Derivaciones/InformeList3.aspx | 2 +- WebLab/Protocolos/DerivacionMultiEfectorLote.aspx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WebLab/Derivaciones/InformeList3.aspx b/WebLab/Derivaciones/InformeList3.aspx index beb8b24..aa8f056 100644 --- a/WebLab/Derivaciones/InformeList3.aspx +++ b/WebLab/Derivaciones/InformeList3.aspx @@ -326,7 +326,7 @@ - + diff --git a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx index 1ee7de9..072bd9d 100644 --- a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx +++ b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx @@ -97,7 +97,7 @@ <%----%> - + From 20cab680f1a7d22e6c4299b214aee2c5f61c970b Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Thu, 16 Oct 2025 12:29:52 -0300 Subject: [PATCH 04/61] fix: quedo dos veces el mismo metodo Un_load (porque compilo y no dio error.?...) --- WebLab/Derivaciones/InformeLote.aspx.cs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/WebLab/Derivaciones/InformeLote.aspx.cs b/WebLab/Derivaciones/InformeLote.aspx.cs index 8224fac..ae22645 100644 --- a/WebLab/Derivaciones/InformeLote.aspx.cs +++ b/WebLab/Derivaciones/InformeLote.aspx.cs @@ -73,15 +73,6 @@ protected void Page_Load(object sender, EventArgs e) } } - protected void Page_Unload(object sender, EventArgs e) - { - if (this.oCr.ReportDocument != null) - { - this.oCr.ReportDocument.Close(); - this.oCr.ReportDocument.Dispose(); - } - } - #region Carga From b88fbbb0a645a255612b596215339225d97e9c8f Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Thu, 16 Oct 2025 12:30:36 -0300 Subject: [PATCH 05/61] =?UTF-8?q?feature:=20Parte=20del=20Requerimiento=20?= =?UTF-8?q?4:=20Recepci=C3=B3n=20de=20derivaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DerivacionMultiEfectorLote.aspx.cs | 45 +++- WebLab/Protocolos/ProtocoloProductoEdit.aspx | 7 +- .../Protocolos/ProtocoloProductoEdit.aspx.cs | 242 ++++++++++++++---- 3 files changed, 225 insertions(+), 69 deletions(-) diff --git a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.cs b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.cs index 6bb6abc..36d6d50 100644 --- a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.cs +++ b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.cs @@ -43,7 +43,10 @@ protected void Page_Load(object sender, EventArgs e) { VerificaPermisos("Derivacion"); - ProtocoloList1.CargarGrillaProtocolo(Request["idServicio"].ToString()); + if (Request["idServicio"].ToString() != "5") + ProtocoloList1.CargarGrillaProtocolo(Request["idServicio"].ToString()); + else + pnlTitulo.Visible = false; if (Request["idLote"] != null) { @@ -218,7 +221,10 @@ private DataTable LeerDatosProtocolosDerivados() string m_strSQL = @"select convert(varchar(10),P.fecha,103) as fecha, P.numero, P.idPaciente as idPaciente, DE.descripcion as EstadoDerivacion , - P.idProtocolo , L.idEfectorDestino , ef.nombre , Pa.nombre + ' ' + Pa.apellido as paciente + P.idProtocolo , L.idEfectorDestino , ef.nombre , + case when P.idPaciente > 0 then + Pa.nombre + ' ' + Pa.apellido + else P.descripcionProducto end as paciente from LAB_Derivacion D inner join LAB_DetalleProtocolo as Det on Det.idDetalleProtocolo = D.idDetalleProtocolo inner join LAB_Protocolo as P on P.idProtocolo = det.idProtocolo @@ -231,7 +237,7 @@ and L.estado in (2, 4, 5) and D.estado=1 and D.idLote = " + txtNumeroLote.Text + @" group by P.fecha, P.numero, P.idPaciente, DE.descripcion, P.idProtocolo , - L.idEfectorDestino , ef.nombre , Pa.nombre + ' ' + Pa.apellido "; + L.idEfectorDestino , ef.nombre , Pa.nombre + ' ' + Pa.apellido ,P.descripcionProducto"; DataSet Ds = new DataSet(); @@ -308,7 +314,7 @@ protected void lnkIngresoProtocolo_Command(object sender, CommandEventArgs e) private void GenerarNuevoProtocolo(int idProtocoloOrigen, int idPaciente) { - string pivot, m_numero, s_idServicio, idLote; + string m_numero, s_idServicio, idLote; Protocolo p = new Protocolo(); p = (Protocolo)p.Get(typeof(Protocolo), idProtocoloOrigen); @@ -316,15 +322,28 @@ private void GenerarNuevoProtocolo(int idProtocoloOrigen, int idPaciente) s_idServicio = p.IdTipoServicio.IdTipoServicio.ToString(); m_numero = p.Numero.ToString(); idLote = txtNumeroLote.Text; - // DataTable dt = TraerItemsDerivadosProtocolo(); //-> ahora lo voy a cargar desde ProtocoloEdit2 - - Response.Redirect("ProtocoloEdit2.aspx?idEfectorSolicitante=" + p.IdEfector.IdEfector + - "&numeroProtocolo=" + m_numero + - "&idServicio=" + s_idServicio + - "&idLote=" + idLote + - "&idPaciente=" + idPaciente + - //"&Operacion=AltaDerivacionMultiEfectorLote&analisis=" + pivot, false); // No enviar los analisis por request - "&Operacion=AltaDerivacionMultiEfectorLote", false); + + if(idPaciente > 0) + { + Response.Redirect("ProtocoloEdit2.aspx?idEfectorSolicitante=" + p.IdEfector.IdEfector + + "&numeroProtocolo=" + m_numero + + "&idServicio=" + s_idServicio + + "&idLote=" + idLote + + "&idPaciente=" + idPaciente + + "&Operacion=AltaDerivacionMultiEfectorLote", false); + } + else + { + //Es Muestra No Pacientes + Response.Redirect("ProtocoloProductoEdit.aspx?idEfectorSolicitante=" + p.IdEfector.IdEfector + + "&numeroProtocolo=" + m_numero + + "&idServicio=" + s_idServicio + + "&idLote=" + idLote + + "&Desde=AltaDerivacionMultiEfectorLote" + + "&Operacion=AltaDerivacionMultiEfectorLote" , false); + //idprotocolo + } + } #endregion diff --git a/WebLab/Protocolos/ProtocoloProductoEdit.aspx b/WebLab/Protocolos/ProtocoloProductoEdit.aspx index 11a0677..1924f7b 100644 --- a/WebLab/Protocolos/ProtocoloProductoEdit.aspx +++ b/WebLab/Protocolos/ProtocoloProductoEdit.aspx @@ -719,7 +719,7 @@ diff --git a/WebLab/Derivaciones/Derivados2.aspx.cs b/WebLab/Derivaciones/Derivados2.aspx.cs index d6c5dbc..8abf0a8 100644 --- a/WebLab/Derivaciones/Derivados2.aspx.cs +++ b/WebLab/Derivaciones/Derivados2.aspx.cs @@ -248,7 +248,7 @@ private void verificaResultados(string str_condicion) } else { - cv_botonBuscar.IsValid = false; //que de error sin enviar alert + cvBotonBuscar.IsValid = false; //que de error sin enviar alert } diff --git a/WebLab/Derivaciones/Derivados2.aspx.designer.cs b/WebLab/Derivaciones/Derivados2.aspx.designer.cs index 49285a3..e7be903 100644 --- a/WebLab/Derivaciones/Derivados2.aspx.designer.cs +++ b/WebLab/Derivaciones/Derivados2.aspx.designer.cs @@ -132,13 +132,13 @@ public partial class Derivados2 protected global::System.Web.UI.WebControls.RadioButtonList rdbEstado; /// - /// cv_botonBuscar control. + /// cvBotonBuscar control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.CustomValidator cv_botonBuscar; + protected global::System.Web.UI.WebControls.CustomValidator cvBotonBuscar; /// /// btnBuscar control. diff --git a/WebLab/Derivaciones/GestionarLote.aspx b/WebLab/Derivaciones/GestionarLote.aspx index b99ddc2..68224e5 100644 --- a/WebLab/Derivaciones/GestionarLote.aspx +++ b/WebLab/Derivaciones/GestionarLote.aspx @@ -68,8 +68,8 @@ @@ -95,7 +95,7 @@ diff --git a/WebLab/Derivaciones/GestionarLote.aspx.cs b/WebLab/Derivaciones/GestionarLote.aspx.cs index f9ce658..45ba280 100644 --- a/WebLab/Derivaciones/GestionarLote.aspx.cs +++ b/WebLab/Derivaciones/GestionarLote.aspx.cs @@ -100,9 +100,9 @@ protected void btnBuscar_Click(object sender, EventArgs e) if (ddlEfector.SelectedValue != "0") str_condicion += " AND l.idEfectorDestino = " + ddlEfector.SelectedValue; str_condicion += " AND idEfectorOrigen = " + oUser.IdEfector.IdEfector.ToString(); - if (!string.IsNullOrWhiteSpace(tb_nrolote.Text)) + if (!string.IsNullOrWhiteSpace(tbNrolote.Text)) { - str_condicion += " AND idLoteDerivacion = " + tb_nrolote.Text; + str_condicion += " AND idLoteDerivacion = " + tbNrolote.Text; } verificaResultados(Convert.ToInt32(rdbEstado.SelectedValue), str_condicion); @@ -152,7 +152,7 @@ private void verificaResultados(int estado, string parametros) } else { - cv_botonBuscar.IsValid = false; //que de error sin enviar alert + cvBotonBuscar.IsValid = false; //que de error sin enviar alert } diff --git a/WebLab/Derivaciones/GestionarLote.aspx.designer.cs b/WebLab/Derivaciones/GestionarLote.aspx.designer.cs index f8ea1ba..81c6526 100644 --- a/WebLab/Derivaciones/GestionarLote.aspx.designer.cs +++ b/WebLab/Derivaciones/GestionarLote.aspx.designer.cs @@ -60,22 +60,22 @@ public partial class GestionarLote protected global::System.Web.UI.HtmlControls.HtmlInputText txtFechaHasta; /// - /// tb_nrolote control. + /// tbNrolote control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.TextBox tb_nrolote; + protected global::System.Web.UI.WebControls.TextBox tbNrolote; /// - /// cv_nroLote control. + /// cvNroLote control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.CustomValidator cv_nroLote; + protected global::System.Web.UI.WebControls.CustomValidator cvNroLote; /// /// ddlEfector control. @@ -96,13 +96,13 @@ public partial class GestionarLote protected global::System.Web.UI.WebControls.RadioButtonList rdbEstado; /// - /// cv_botonBuscar control. + /// cvBotonBuscar control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.CustomValidator cv_botonBuscar; + protected global::System.Web.UI.WebControls.CustomValidator cvBotonBuscar; /// /// btnBuscar control. diff --git a/WebLab/Derivaciones/InformeList3.aspx b/WebLab/Derivaciones/InformeList3.aspx index 98644db..beb8b24 100644 --- a/WebLab/Derivaciones/InformeList3.aspx +++ b/WebLab/Derivaciones/InformeList3.aspx @@ -6,11 +6,11 @@ function validarFormulario() { var todoOk = false; - var validatorEstado = document.getElementById('<%= rv_estado.ClientID %>'); + var validatorEstado = document.getElementById('<%= rvEstado.ClientID %>'); <%--var txtObservacion = document.getElementById('<%= txtObservacion.ClientID %>');--%> //--> Cambio TextBox por DropDownList - var motivoCancelacion = document.getElementById('<%= ddl_motivoCancelacion.ClientID%>'); + var motivoCancelacion = document.getElementById('<%= ddlMotivoCancelacion.ClientID%>'); var estado = document.getElementById('<%= ddlEstado.ClientID %>'); - var label = document.getElementById('<%= lbl_ErrorMotivo.ClientID %>'); + var label = document.getElementById('<%= lblErrorMotivo.ClientID %>'); //Limpio los labels de error label.className = 'hidden'; @@ -59,18 +59,18 @@ return true; // Detiene la validación con al menos un check } } - var label = document.getElementById('<%= lbl_errorLista.ClientID %>'); + var label = document.getElementById('<%= lblErrorLista.ClientID %>'); label.className = 'exposed'; return todoOk; } function reseteaLabelErrorGrilla() { - var labelGrilla = document.getElementById('<%= lbl_errorLista.ClientID %>'); + var labelGrilla = document.getElementById('<%= lblErrorLista.ClientID %>'); labelGrilla.className = 'hidden'; } function reseteaLabelErrorMotivo() { - var labelMotivo = document.getElementById('<%= lbl_ErrorMotivo.ClientID %>'); + var labelMotivo = document.getElementById('<%= lblErrorMotivo.ClientID %>'); labelMotivo.className = 'hidden'; } @@ -103,7 +103,7 @@ } function activaMotivos(estado) { - var motivos = document.getElementById('<%= ddl_motivoCancelacion.ClientID %>'); + var motivos = document.getElementById('<%= ddlMotivoCancelacion.ClientID %>'); console.log(motivos); console.log(estado.value); if (estado.value == 2) { @@ -125,7 +125,7 @@ } }); //Si selecciono todas las derivaciones, deshabilito el error que no selecciono ninguna fila - if (seleccionar && document.getElementById('<%= lbl_errorLista.ClientID %>').className == 'exposed') { + if (seleccionar && document.getElementById('<%= lblErrorLista.ClientID %>').className == 'exposed') { reseteaLabelErrorGrilla(); } } @@ -224,7 +224,7 @@ - - + <%-- @@ -247,7 +247,7 @@ + @@ -125,7 +125,7 @@ + @@ -144,7 +144,7 @@ @@ -100,7 +100,7 @@ @@ -111,11 +111,11 @@ @@ -125,7 +125,7 @@ @@ -133,9 +133,9 @@ diff --git a/WebLab/Protocolos/DerivacionRecibirLote.aspx.cs b/WebLab/Protocolos/DerivacionRecibirLote.aspx.cs index 7697a72..31b87ab 100644 --- a/WebLab/Protocolos/DerivacionRecibirLote.aspx.cs +++ b/WebLab/Protocolos/DerivacionRecibirLote.aspx.cs @@ -52,18 +52,18 @@ private void CargarEncabezado() lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), Convert.ToInt32(Request["idLote"])); //lbl_FechaRegistro.Text = lote.FechaRegistro.Substring(0, 10); //fechaEnvio.Text = DateTime.Parse(lote.FechaEnvio.Substring(0, 10)).ToString("yyyy-MM-dd"); - hid_fechaEnvio.Value = lote.FechaEnvio.ToString("yyyy-MM-dd"); - lbl_fechaPermitida.Text = "Fecha envio: " + lote.FechaEnvio; + hidFechaEnvio.Value = lote.FechaEnvio.ToString("yyyy-MM-dd"); + lblFechaPermitida.Text = "Fecha envio: " + lote.FechaEnvio; Efector origen = new Efector(); origen = (Efector)origen.Get(typeof(Efector), lote.IdEfectorOrigen.IdEfector); - lb_efector.Text = origen.Nombre; + lbEfector.Text = origen.Nombre; CargarFechaHoraActual(); //LAB-56 Cargo el transportista List auditorias = AuditoriaLoteDerivacion.AuditoriasPorLote(Convert.ToInt32(Request["idLote"])); AuditoriaLoteDerivacion transporte = auditorias.FindLast(a => a.Analisis == "Transportista"); - lbl_transportista.Text = transporte.Valor; + lblTransportista.Text = transporte.Valor; } @@ -71,13 +71,13 @@ 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"); - txt_Hora.Value = miFecha.ToString("HH:mm"); + 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 - rv_Fecha.MinimumValue = hid_fechaEnvio.Value; - rv_Fecha.MaximumValue = txtFecha.Text; //Fecha Date today - rv_Fecha.Text = "La fecha de recepcion no puede ser menor a la fecha de envio " + hid_fechaEnvio.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; } @@ -142,14 +142,14 @@ private void GenerarAuditorias(LoteDerivacion lote) // lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Fecha Recibido", f.ToString("yyyy-MM-dd")); //Cambio formato de fecha asi tiene el mismo cuando se retira el lote //} - if (!string.IsNullOrEmpty(txt_Hora.Value)) - lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Hora Recibido", txt_Hora.Value); + if (!string.IsNullOrEmpty(txtHora.Value)) + lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Hora Recibido", txtHora.Value); //if (!string.IsNullOrEmpty(txt_transportista.Text)) // lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Transportista", txt_transportista.Text); - if (!string.IsNullOrEmpty(txt_obs.Value)) - lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Observacion", txt_obs.Value); + if (!string.IsNullOrEmpty(txtObs.Value)) + lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Observacion", txtObs.Value); } #endregion diff --git a/WebLab/Protocolos/DerivacionRecibirLote.aspx.designer.cs b/WebLab/Protocolos/DerivacionRecibirLote.aspx.designer.cs index 04492b4..0705dca 100644 --- a/WebLab/Protocolos/DerivacionRecibirLote.aspx.designer.cs +++ b/WebLab/Protocolos/DerivacionRecibirLote.aspx.designer.cs @@ -51,40 +51,40 @@ public partial class DerivacionRecibirLote protected global::System.Web.UI.WebControls.Label txtNumeroLote; /// - /// lb_efector control. + /// lbEfector control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lb_efector; + protected global::System.Web.UI.WebControls.Label lbEfector; /// - /// lbl_fechaPermitida control. + /// lblFechaPermitida control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_fechaPermitida; + protected global::System.Web.UI.WebControls.Label lblFechaPermitida; /// - /// hid_fechaEnvio control. + /// hidFechaEnvio control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.HiddenField hid_fechaEnvio; + protected global::System.Web.UI.WebControls.HiddenField hidFechaEnvio; /// - /// lbl_transportista control. + /// lblTransportista control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_transportista; + protected global::System.Web.UI.WebControls.Label lblTransportista; /// /// txtFecha control. @@ -96,13 +96,13 @@ public partial class DerivacionRecibirLote protected global::System.Web.UI.WebControls.TextBox txtFecha; /// - /// txt_Hora control. + /// txtHora control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.HtmlControls.HtmlInputGenericControl txt_Hora; + protected global::System.Web.UI.HtmlControls.HtmlInputGenericControl txtHora; /// /// rfvFecha control. @@ -114,48 +114,48 @@ public partial class DerivacionRecibirLote protected global::System.Web.UI.WebControls.RequiredFieldValidator rfvFecha; /// - /// rfv_Hora control. + /// rfvHora control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RequiredFieldValidator rfv_Hora; + protected global::System.Web.UI.WebControls.RequiredFieldValidator rfvHora; /// - /// rv_Fecha control. + /// rvFecha control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RangeValidator rv_Fecha; + protected global::System.Web.UI.WebControls.RangeValidator rvFecha; /// - /// txt_obs control. + /// txtObs control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.HtmlControls.HtmlTextArea txt_obs; + protected global::System.Web.UI.HtmlControls.HtmlTextArea txtObs; /// - /// btn_recibirLote control. + /// btnRecibirLote control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Button btn_recibirLote; + protected global::System.Web.UI.WebControls.Button btnRecibirLote; /// - /// btn_volver control. + /// btnVolver control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Button btn_volver; + protected global::System.Web.UI.WebControls.Button btnVolver; } } From 914060906018b1735aaced81050d67be48f4ed0e Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Thu, 16 Oct 2025 12:28:22 -0300 Subject: [PATCH 07/61] =?UTF-8?q?Requerimiento=202:=20Renombrar=20?= =?UTF-8?q?=E2=80=9CPaciente/Producto=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebLab/Derivaciones/InformeList3.aspx | 2 +- WebLab/Protocolos/DerivacionMultiEfectorLote.aspx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WebLab/Derivaciones/InformeList3.aspx b/WebLab/Derivaciones/InformeList3.aspx index beb8b24..aa8f056 100644 --- a/WebLab/Derivaciones/InformeList3.aspx +++ b/WebLab/Derivaciones/InformeList3.aspx @@ -326,7 +326,7 @@ - + diff --git a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx index 1ee7de9..072bd9d 100644 --- a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx +++ b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx @@ -97,7 +97,7 @@ <%----%> - + From 83390d329238441293a19fd0590e4ba7cc03cf34 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Thu, 16 Oct 2025 12:30:36 -0300 Subject: [PATCH 08/61] =?UTF-8?q?feature:=20Parte=20del=20Requerimiento=20?= =?UTF-8?q?4:=20Recepci=C3=B3n=20de=20derivaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DerivacionMultiEfectorLote.aspx.cs | 45 +++- WebLab/Protocolos/ProtocoloProductoEdit.aspx | 7 +- .../Protocolos/ProtocoloProductoEdit.aspx.cs | 242 ++++++++++++++---- 3 files changed, 225 insertions(+), 69 deletions(-) diff --git a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.cs b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.cs index 6bb6abc..36d6d50 100644 --- a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.cs +++ b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.cs @@ -43,7 +43,10 @@ protected void Page_Load(object sender, EventArgs e) { VerificaPermisos("Derivacion"); - ProtocoloList1.CargarGrillaProtocolo(Request["idServicio"].ToString()); + if (Request["idServicio"].ToString() != "5") + ProtocoloList1.CargarGrillaProtocolo(Request["idServicio"].ToString()); + else + pnlTitulo.Visible = false; if (Request["idLote"] != null) { @@ -218,7 +221,10 @@ private DataTable LeerDatosProtocolosDerivados() string m_strSQL = @"select convert(varchar(10),P.fecha,103) as fecha, P.numero, P.idPaciente as idPaciente, DE.descripcion as EstadoDerivacion , - P.idProtocolo , L.idEfectorDestino , ef.nombre , Pa.nombre + ' ' + Pa.apellido as paciente + P.idProtocolo , L.idEfectorDestino , ef.nombre , + case when P.idPaciente > 0 then + Pa.nombre + ' ' + Pa.apellido + else P.descripcionProducto end as paciente from LAB_Derivacion D inner join LAB_DetalleProtocolo as Det on Det.idDetalleProtocolo = D.idDetalleProtocolo inner join LAB_Protocolo as P on P.idProtocolo = det.idProtocolo @@ -231,7 +237,7 @@ and L.estado in (2, 4, 5) and D.estado=1 and D.idLote = " + txtNumeroLote.Text + @" group by P.fecha, P.numero, P.idPaciente, DE.descripcion, P.idProtocolo , - L.idEfectorDestino , ef.nombre , Pa.nombre + ' ' + Pa.apellido "; + L.idEfectorDestino , ef.nombre , Pa.nombre + ' ' + Pa.apellido ,P.descripcionProducto"; DataSet Ds = new DataSet(); @@ -308,7 +314,7 @@ protected void lnkIngresoProtocolo_Command(object sender, CommandEventArgs e) private void GenerarNuevoProtocolo(int idProtocoloOrigen, int idPaciente) { - string pivot, m_numero, s_idServicio, idLote; + string m_numero, s_idServicio, idLote; Protocolo p = new Protocolo(); p = (Protocolo)p.Get(typeof(Protocolo), idProtocoloOrigen); @@ -316,15 +322,28 @@ private void GenerarNuevoProtocolo(int idProtocoloOrigen, int idPaciente) s_idServicio = p.IdTipoServicio.IdTipoServicio.ToString(); m_numero = p.Numero.ToString(); idLote = txtNumeroLote.Text; - // DataTable dt = TraerItemsDerivadosProtocolo(); //-> ahora lo voy a cargar desde ProtocoloEdit2 - - Response.Redirect("ProtocoloEdit2.aspx?idEfectorSolicitante=" + p.IdEfector.IdEfector + - "&numeroProtocolo=" + m_numero + - "&idServicio=" + s_idServicio + - "&idLote=" + idLote + - "&idPaciente=" + idPaciente + - //"&Operacion=AltaDerivacionMultiEfectorLote&analisis=" + pivot, false); // No enviar los analisis por request - "&Operacion=AltaDerivacionMultiEfectorLote", false); + + if(idPaciente > 0) + { + Response.Redirect("ProtocoloEdit2.aspx?idEfectorSolicitante=" + p.IdEfector.IdEfector + + "&numeroProtocolo=" + m_numero + + "&idServicio=" + s_idServicio + + "&idLote=" + idLote + + "&idPaciente=" + idPaciente + + "&Operacion=AltaDerivacionMultiEfectorLote", false); + } + else + { + //Es Muestra No Pacientes + Response.Redirect("ProtocoloProductoEdit.aspx?idEfectorSolicitante=" + p.IdEfector.IdEfector + + "&numeroProtocolo=" + m_numero + + "&idServicio=" + s_idServicio + + "&idLote=" + idLote + + "&Desde=AltaDerivacionMultiEfectorLote" + + "&Operacion=AltaDerivacionMultiEfectorLote" , false); + //idprotocolo + } + } #endregion diff --git a/WebLab/Protocolos/ProtocoloProductoEdit.aspx b/WebLab/Protocolos/ProtocoloProductoEdit.aspx index 11a0677..1924f7b 100644 --- a/WebLab/Protocolos/ProtocoloProductoEdit.aspx +++ b/WebLab/Protocolos/ProtocoloProductoEdit.aspx @@ -719,7 +719,7 @@
@@ -778,7 +778,8 @@ function VerificaLargo (source, arguments) function InicioPagina() - { + { + if (document.getElementById('<%= Page.Master.FindControl("ContentPlaceHolder1").FindControl("TxtDatosCargados").ClientID %>').value == "") {///protocolo nuevo CrearFila(true); @@ -1231,7 +1232,7 @@ function VerificaLargo (source, arguments) } - + diff --git a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs index 35695aa..25823eb 100644 --- a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs +++ b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs @@ -157,8 +157,12 @@ protected void Page_Load(object sender, EventArgs e) btnCancelar.Text = "Cancelar"; btnCancelar.Width = Unit.Pixel(80); + btnCancelar.Visible = true; + if (Request["Operacion"].ToString() == "AltaDerivacionMultiEfectorLote") + { + CargarProtocoloDerivadoLote(); + } - } } else @@ -193,29 +197,31 @@ private void CargarDeterminacionesPeticion(Peticion oRegistro) } - private void CargarDeterminacionesDerivacion(string s_analisis, string s_diagnostico) + private void CargarDeterminacionesDerivacion(string s_analisis) { - - string[] tabla = s_analisis.Split('|'); + string pivot = ""; string sDatos = ""; + /////Crea nuevamente los detalles. for (int i = 0; i <= tabla.Length - 1; i++) { - if (sDatos == "") - sDatos = tabla[i].ToString() + "#Si"; - else - sDatos += ";" + tabla[i].ToString() + "#Si"; - - } - - - + Item oItem = new Item(); + oItem = (Item)oItem.Get(typeof(Item), int.Parse(tabla[i].ToString())); + if (oItem != null) + if (pivot != oItem.Nombre) + { + if (sDatos == "") + sDatos = oItem.Codigo + "#Si#False"; + else + sDatos += ";" + oItem.Codigo + "#Si#False"; + pivot = oItem.Nombre; + } + } TxtDatosCargados.Value = sDatos; - } - + protected void txtCodigoMuestra_TextChanged(object sender, EventArgs e) { @@ -499,6 +505,7 @@ private void CargarListas() (Request["Operacion"].ToString() == "AltaTurno") || (Request["Operacion"].ToString() == "AltaDerivacion") || (Request["Operacion"].ToString() == "AltaDerivacionMultiEfector") || + (Request["Operacion"].ToString() == "AltaDerivacionMultiEfectorLote") || (Request["Operacion"].ToString() == "AltaPeticion") || (Request["Operacion"].ToString() == "AltaFFEE") ) @@ -711,7 +718,7 @@ private void CargarItems() FROM Lab_item I with (nolock) inner join lab_itemEfector IE with (nolock) on I.idItem= IE.idItem and Ie.idefector=" + oC.IdEfector.IdEfector.ToString() + //MultiEfector @"INNER JOIN Lab_area A (nolock) ON A.idArea= I.idArea - where A.baja=0 and I.baja=0 and A.idtipoServicio in (1, 3) AND (I.tipo= 'P') order by I.nombre "; + where A.baja=0 and I.baja=0 and IE.disponible=1 and A.idtipoServicio in (1, 3) AND (I.tipo= 'P') order by I.nombre "; //NHibernate.Cfg.Configuration oConf = new NHibernate.Cfg.Configuration(); //String strconn = oConf.GetProperty("hibernate.connection.connection_string"); SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString); ///Performance: conexion de solo lectura @@ -788,7 +795,14 @@ 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") + { + ActualizarEstadoDerivacion(oRegistro); + VerificacionEstadoLote(oRegistro); + Response.Redirect("DerivacionMultiEfectorLote.aspx?idEfectorSolicitante=" + Request["idEfectorSolicitante"].ToString() + "&idServicio=" + Request["idServicio"].ToString() + "&idLote=" + Request["idLote"]); + } } else { @@ -1391,7 +1405,7 @@ private void GuardarDetalle2(Business.Data.Laboratorio.Protocolo oRegistro) private void GuardarDetallePractica(DetalleProtocolo oDet) { - if (VerificarSiEsDerivable(oDet)) //oDet.IdItem.IdEfector.IdEfector != oDet.IdItem.IdEfectorDerivacion.IdEfector) //Si es un item derivable no busca hijos y guarda directamente. + if (oDet.VerificarSiEsDerivable(oUser.IdEfector)) //Cambio para que quede como ProtocoloEdit2 { oDet.IdSubItem = oDet.IdItem; oDet.Save(); @@ -1497,31 +1511,31 @@ private void GuardarValorReferencia(DetalleProtocolo oDetalle) //Fin calculo de valor de refrencia y metodo } - private bool VerificarSiEsDerivable(DetalleProtocolo oDet) - { - bool ok = false; - /// buscar idefectorderivacion desde lab_itemefector - ISession m_session = NHibernateHttpModule.CurrentSession; - ICriteria critItemEfector = m_session.CreateCriteria(typeof(ItemEfector)); - critItemEfector.Add(Expression.Eq("IdItem", oDet.IdItem)); - critItemEfector.Add(Expression.Eq("IdEfector", oUser.IdEfector)); - IList detalle1 = critItemEfector.List(); - if (detalle1.Count > 0) - { - foreach (ItemEfector oitemEfector in detalle1) - { - if (oDet.IdEfector.IdEfector != oitemEfector.IdEfectorDerivacion.IdEfector) - { - ok = true; break; - } - } - } - else - ok = false; + //private bool VerificarSiEsDerivable(DetalleProtocolo oDet) + //{ + // bool ok = false; + // /// buscar idefectorderivacion desde lab_itemefector + // ISession m_session = NHibernateHttpModule.CurrentSession; + // ICriteria critItemEfector = m_session.CreateCriteria(typeof(ItemEfector)); + // critItemEfector.Add(Expression.Eq("IdItem", oDet.IdItem)); + // critItemEfector.Add(Expression.Eq("IdEfector", oUser.IdEfector)); + // IList detalle1 = critItemEfector.List(); + // if (detalle1.Count > 0) + // { + // foreach (ItemEfector oitemEfector in detalle1) + // { + // if (oDet.IdEfector.IdEfector != oitemEfector.IdEfectorDerivacion.IdEfector) + // { + // ok = true; break; + // } + // } + // } + // else + // ok = false; - return ok; + // return ok; - } + //} protected void ddlSexo_SelectedIndexChanged(object sender, EventArgs e) @@ -1582,18 +1596,13 @@ protected void txtCodigo_TextChanged1(object sender, EventArgs e) protected void btnCancelar_Click(object sender, EventArgs e) { - switch (Request["Desde"].ToString()) - { - //case "Default": Response.Redirect("Default.aspx?idServicio=" + Session["idServicio"].ToString(), false); break; - case "ProtocoloList": Response.Redirect("ProtocoloList.aspx?idServicio=" + Session["idServicio"].ToString() + "&Tipo=ListaProducto"); break; - case "Control": Response.Redirect("ProtocoloList.aspx?idServicio=" + Session["idServicio"].ToString() + "&Tipo=Control"); break; - // case "Urgencia": Response.Redirect("../Urgencia/UrgenciaList.aspx",false); break; - // case "Derivacion": Response.Redirect("Derivacion.aspx?idServicio="+Session["idServicio"].ToString(), false); break; - } - - - - } + switch (Request["Desde"].ToString()) + { + case "ProtocoloList": Response.Redirect("ProtocoloList.aspx?idServicio=" + Session["idServicio"].ToString() + "&Tipo=ListaProducto"); break; + case "Control": Response.Redirect("ProtocoloList.aspx?idServicio=" + Session["idServicio"].ToString() + "&Tipo=Control"); break; + case "AltaDerivacionMultiEfectorLote": Response.Redirect("DerivacionMultiEfectorLote.aspx?idEfectorSolicitante=" + Request["idEfectorSolicitante"].ToString() + "&idServicio=" + Request["idServicio"].ToString() + "&idLote=" + Request["idLote"]); break; + } + } @@ -2037,6 +2046,133 @@ protected void btnArchivos_Click(object sender, EventArgs e) { Response.Redirect("ProtocoloAdjuntar.aspx?idProtocolo=" + Request["idProtocolo"].ToString() +"&desde=protocolo"); } + + private void CargarProtocoloDerivadoLote() + { + string numeroProtocolo = Request["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", int.Parse(numeroProtocolo)); + if (oRegistro != null) + { + lblTitulo.Visible = false; + lblServicio1.Visible = true; + lblServicio.Visible = true; + txtFecha.Value = DateTime.Now.ToShortDateString(); + txtFechaOrden.Value = oRegistro.FechaOrden.ToShortDateString(); + txtCodigoMuestra.Text = ""; + txtDescripcionProducto.Text = oRegistro.DescripcionProducto; + ddlConservacion.SelectedValue = oRegistro.IdConservacion.ToString(); + txtNumeroOrigen.Text = oRegistro.Numero.ToString(); + ddlEfector.SelectedValue = oRegistro.IdEfector.IdEfector.ToString(); + ddlSectorServicio.SelectedValue = oRegistro.IdSector.IdSectorServicio.ToString(); + txtObservacion.Text = oRegistro.Observacion; + pnlNavegacion.Visible = false; + btnCancelar.Text = "Cancelar"; + btnCancelar.Width = Unit.Pixel(80); + ddlMuestra.SelectedValue = oRegistro.IdMuestra.ToString(); + Muestra oMuestra = new Muestra(); + oMuestra = (Muestra)oMuestra.Get(typeof(Muestra), "IdMuestra", oRegistro.IdMuestra, "Baja", false); + txtCodigoMuestra.Text = oMuestra.Codigo; + + + #region CargaDeterminaciones + ////// ---------------------->Buscar las derivaciones que no han sido ingresadas + //el protocolo me da los protocolos detalles + //los protocolos detalles me dan las derivaciones + //la derivacion debe estar enviada + //la derivacion debe tener el mismo lote que el ingresado (no todos los analisis pueden haber sido enviados con el mismo lote) + + string m_strSQL = + //select distinct STRING_AGG(Det.idItem ,' | ') as Item ---> (No esta disponible en SQL 2014) + @" SELECT STUFF(( SELECT ' | ' + CAST(Det.idItem AS VARCHAR(20)) + from LAB_Derivacion D + inner join LAB_DetalleProtocolo as Det on Det.idDetalleProtocolo = D.idDetalleProtocolo + inner join LAB_Protocolo as P on P.idProtocolo = det.idProtocolo + inner join LAB_DerivacionEstado as LE on LE.idEstado = D.estado + inner join LAB_LoteDerivacion L on L.idLoteDerivacion = D.idLote + where P.baja = 0 + and D.estado in (1) ---------------------- Buscar las derivaciones que no han sido ingresadas + and L.idLoteDerivacion = " + Request["idLote"].ToString() + " and p.numero = " + numeroProtocolo + + " FOR XML PATH(''), TYPE ).value('.', 'NVARCHAR(MAX)'), 1, 3, '') AS Item; "; + + DataSet Ds = new DataSet(); + SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; + SqlDataAdapter adapter = new SqlDataAdapter(); + adapter.SelectCommand = new SqlCommand(m_strSQL, conn); + adapter.Fill(Ds); + + string analisis = Convert.ToString(Ds.Tables[0].Rows[0][0]); + CargarDeterminacionesDerivacion(analisis); + #endregion + } + } + + private void VerificacionEstadoLote(Protocolo oRegistro) + { + + if (Request["idLote"] != null) //Si no tiene Lote, no actualiza estado de Lote + { + int idLote = Convert.ToInt32(Request["idLote"]); + try + { + if (idLote != 0) + { + LoteDerivacion lote = new LoteDerivacion(); + lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); + + + if (lote.Estado == 4) //Pasa de Recibido a Ingresado + { + lote.Estado = 5; + lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); + } + + //Graba el ingreso del protocolo en el lote + lote.GrabarAuditoriaLoteDerivacion("Ingresa protocolo", oUser.IdUsuario, "Número Protocolo", oRegistro.Numero.ToString(), Request["numeroProtocolo"]); + + //Si al generar este nuevo protocolo se finalizo la carga del lote, cambiar estado a Completado + if (!lote.HayDerivacionesPendientes()) + { + lote.Estado = 6; //Pasa a Completado si no tiene más derivaciones pendientes + lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); + } + + lote.Save(); + } + } + catch (Exception) + { + } + } + } + private void ActualizarEstadoDerivacion(Protocolo oRegistro) + { + SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; + int idLote = Convert.ToInt32(Request["idLote"]); + + string query = + @"update LAB_Derivacion + set estado=3---recibido + ,idProtocoloDerivacion=" + oRegistro.IdProtocolo.ToString() + @" + from LAB_Derivacion D + inner join LAB_DetalleProtocolo Det on Det.idDetalleProtocolo= d.idDetalleProtocolo + inner join LAB_Protocolo P on P.idProtocolo= Det.idProtocolo + where P.numero=" + Request["numeroProtocolo"].ToString() + @" and idLote=" + idLote; + + 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 + Business.Data.Laboratorio.Protocolo oPOrigen = new Business.Data.Laboratorio.Protocolo(); + oPOrigen = (Business.Data.Laboratorio.Protocolo)oPOrigen.Get(typeof(Business.Data.Laboratorio.Protocolo), "Numero", int.Parse(Request["numeroProtocolo"].ToString())); + if (oPOrigen != null) + { + oPOrigen.GrabarAuditoriaDetalleProtocolo("Recepcion Derivacion", oUser.IdUsuario, "Lote " + idLote, "Protocolo " + oRegistro.Numero.ToString()); + } + + } + } } From 1231c486fca0fa5fc2660e1d2ff29f3601d462ac Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Tue, 14 Oct 2025 16:02:19 -0300 Subject: [PATCH 06/61] fix: Requerimiento 1: Cambiar a nomenclatura CamelCase --- WebLab/Derivaciones/Derivados2.aspx | 2 +- WebLab/Derivaciones/Derivados2.aspx.cs | 2 +- .../Derivaciones/Derivados2.aspx.designer.cs | 4 +- WebLab/Derivaciones/GestionarLote.aspx | 6 +-- WebLab/Derivaciones/GestionarLote.aspx.cs | 6 +-- .../GestionarLote.aspx.designer.cs | 12 +++--- WebLab/Derivaciones/InformeList3.aspx | 26 ++++++------ WebLab/Derivaciones/InformeList3.aspx.cs | 18 ++++----- .../InformeList3.aspx.designer.cs | 20 +++++----- WebLab/Derivaciones/InformeLote.aspx | 40 +++++++++---------- WebLab/Derivaciones/InformeLote.aspx.cs | 26 ++++++------ .../Derivaciones/InformeLote.aspx.designer.cs | 24 +++++------ .../DerivacionMultiEfectorLote.aspx | 14 +++---- .../DerivacionMultiEfectorLote.aspx.cs | 26 ++++++------ ...erivacionMultiEfectorLote.aspx.designer.cs | 28 ++++++------- WebLab/Protocolos/DerivacionRecibirLote.aspx | 24 +++++------ .../Protocolos/DerivacionRecibirLote.aspx.cs | 24 +++++------ .../DerivacionRecibirLote.aspx.designer.cs | 40 +++++++++---------- 18 files changed, 171 insertions(+), 171 deletions(-) diff --git a/WebLab/Derivaciones/Derivados2.aspx b/WebLab/Derivaciones/Derivados2.aspx index 0670fda..e34edf8 100644 --- a/WebLab/Derivaciones/Derivados2.aspx +++ b/WebLab/Derivaciones/Derivados2.aspx @@ -146,7 +146,7 @@

- +
- - + +

- +
Marcar como: - Motivo Cancelación: - + - + Observación: - +
- +
Seleccionar: Todas  Ninguna diff --git a/WebLab/Derivaciones/InformeList3.aspx.cs b/WebLab/Derivaciones/InformeList3.aspx.cs index c7ad438..9e3c43a 100644 --- a/WebLab/Derivaciones/InformeList3.aspx.cs +++ b/WebLab/Derivaciones/InformeList3.aspx.cs @@ -104,8 +104,8 @@ private void CargarListas() oUtil = new Utility(); //Motivos de cancelacion LAB-75 m_ssql = "SELECT idMotivo, descripcion FROM LAB_DerivacionMotivoCancelacion WHERE baja = 0"; - oUtil.CargarCombo(ddl_motivoCancelacion, m_ssql, "idMotivo", "descripcion", connReady); - ddl_motivoCancelacion.Items.Insert(0, new ListItem("--Seleccione--", "0")); + oUtil.CargarCombo(ddlMotivoCancelacion, m_ssql, "idMotivo", "descripcion", connReady); + ddlMotivoCancelacion.Items.Insert(0, new ListItem("--Seleccione--", "0")); @@ -116,7 +116,7 @@ private void habilitarImpresion() { gvLista.Columns[11].Visible = true; lnkPDF.Visible = true; - ddl_motivoCancelacion.Enabled = false; + ddlMotivoCancelacion.Enabled = false; } else { @@ -126,15 +126,15 @@ private void habilitarImpresion() } private void limpiarForm() { - txt_observacion.Text = string.Empty; - ddl_motivoCancelacion.SelectedIndex = 0; + txtObservacion.Text = string.Empty; + ddlMotivoCancelacion.SelectedIndex = 0; ddlEstado.SelectedIndex = 0; } private void activarControles(bool valor) { btnGuardar.Enabled = valor; - txt_observacion.Enabled = valor; + txtObservacion.Enabled = valor; lnkMarcar.Enabled = valor; lnkDesMarcar.Enabled = valor; //ddl_motivoCancelacion.Enabled = valor; @@ -384,12 +384,12 @@ private void ActualizarDetalleProtocolo(GridViewRow row, int idLote = 0, int de { int estadoSeleccionado; string resultadoDerivacion; - string observacion = txt_observacion.Text; + string observacion = txtObservacion.Text; int idUsuarioRegistro = oUser.IdUsuario; //Convert.ToInt32(Session["idUsuario"]); int idUsuarioResultado = oUser.IdUsuario; DateTime fechaDeHoy = DateTime.Now; DateTime fechaDeHoyDetalle = DateTime.Now; - int MotivoCancelacion = int.Parse(ddl_motivoCancelacion.SelectedItem.Value); + int MotivoCancelacion = int.Parse(ddlMotivoCancelacion.SelectedItem.Value); bool conResultado = true; @@ -397,7 +397,7 @@ private void ActualizarDetalleProtocolo(GridViewRow row, int idLote = 0, int de if (desasociaLote == 0) { estadoSeleccionado = Convert.ToInt32(ddlEstado.SelectedValue);//Estado seleccionado => 2 No Enviado - 4 Pendiente para enviar - resultadoDerivacion = (estadoSeleccionado == 2) ? "No Derivado: " + ddl_motivoCancelacion.SelectedItem.Text : "Pendiente para enviar "; + resultadoDerivacion = (estadoSeleccionado == 2) ? "No Derivado: " + ddlMotivoCancelacion.SelectedItem.Text : "Pendiente para enviar "; } else { diff --git a/WebLab/Derivaciones/InformeList3.aspx.designer.cs b/WebLab/Derivaciones/InformeList3.aspx.designer.cs index 2f6e719..4c71d42 100644 --- a/WebLab/Derivaciones/InformeList3.aspx.designer.cs +++ b/WebLab/Derivaciones/InformeList3.aspx.designer.cs @@ -51,40 +51,40 @@ public partial class InformeList3 protected global::System.Web.UI.WebControls.DropDownList ddlEstado; /// - /// rv_estado control. + /// rvEstado control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RangeValidator rv_estado; + protected global::System.Web.UI.WebControls.RangeValidator rvEstado; /// - /// ddl_motivoCancelacion control. + /// ddlMotivoCancelacion control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.DropDownList ddl_motivoCancelacion; + protected global::System.Web.UI.WebControls.DropDownList ddlMotivoCancelacion; /// - /// lbl_ErrorMotivo control. + /// lblErrorMotivo control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_ErrorMotivo; + protected global::System.Web.UI.WebControls.Label lblErrorMotivo; /// - /// txt_observacion control. + /// txtObservacion control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.TextBox txt_observacion; + protected global::System.Web.UI.WebControls.TextBox txtObservacion; /// /// btnGuardar control. @@ -105,13 +105,13 @@ public partial class InformeList3 protected global::System.Web.UI.WebControls.LinkButton lnkPDF; /// - /// lbl_errorLista control. + /// lblErrorLista control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_errorLista; + protected global::System.Web.UI.WebControls.Label lblErrorLista; /// /// lnkMarcar control. diff --git a/WebLab/Derivaciones/InformeLote.aspx b/WebLab/Derivaciones/InformeLote.aspx index cfb5191..314b28b 100644 --- a/WebLab/Derivaciones/InformeLote.aspx +++ b/WebLab/Derivaciones/InformeLote.aspx @@ -7,10 +7,10 @@ var validatorEstado = document.getElementById('<%= Range1.ClientID %>'); var txtObservacion = document.getElementById('<%= txtObservacion.ClientID %>'); var estado = document.getElementById('<%= ddlEstados.ClientID %>'); - var label = document.getElementById('<%= lbl_ErrorMotivo.ClientID %>'); - var labelGrilla = document.getElementById('<%= lbl_errorLista.ClientID %>'); - var lista_transporte = document.getElementById('<%= ddl_Transporte.ClientID %>'); - var labelErrorTransporte = document.getElementById('<%= lbl_ErrorTransporte.ClientID %>'); + var label = document.getElementById('<%= lblErrorMotivo.ClientID %>'); + var labelGrilla = document.getElementById('<%= lblErrorLista.ClientID %>'); + var lista_transporte = document.getElementById('<%= ddlTransporte.ClientID %>'); + var labelErrorTransporte = document.getElementById('<%= lblErrorTransporte.ClientID %>'); //Limpio los labels de error label.className = 'hidden'; @@ -62,7 +62,7 @@ return true; // Detiene la validacin con al menos un check } } - var label = document.getElementById('<%= lbl_errorLista.ClientID %>'); + var label = document.getElementById('<%= lblErrorLista.ClientID %>'); label.className = 'exposed'; return todoOk; } @@ -71,8 +71,8 @@ //Habilita la seleccion del listado desplegable donde estan los transportes var ddl = document.getElementById('<%= ddlEstados.ClientID %>'); - var labelErrorTransporte = document.getElementById('<%= lbl_ErrorTransporte.ClientID%>'); - var lista_transporte = document.getElementById('<%= ddl_Transporte.ClientID%>'); + var labelErrorTransporte = document.getElementById('<%= lblErrorTransporte.ClientID%>'); + var lista_transporte = document.getElementById('<%= ddlTransporte.ClientID%>'); var estado = ddl.value; //console.log("--"); //console.log(lista_transporte); @@ -88,7 +88,7 @@ function reseteaLabelErrorLote() { //Esconde el label que tiene el error - var labelGrilla = document.getElementById('<%= lbl_errorLista.ClientID %>'); + var labelGrilla = document.getElementById('<%= lblErrorLista.ClientID %>'); labelGrilla.className = 'hidden'; } @@ -104,8 +104,8 @@ function verificaSeleccion() { //Esta funcion revisa que se haya selecionado un transporte - var lista_transporte = document.getElementById('<%= ddl_Transporte.ClientID %>'); - var labelErrorTransporte = document.getElementById('<%= lbl_ErrorTransporte.ClientID %>'); + var lista_transporte = document.getElementById('<%= ddlTransporte.ClientID %>'); + var labelErrorTransporte = document.getElementById('<%= lblErrorTransporte.ClientID %>'); //console.log("transporte"); //console.log(lista_transporte.value); if (lista_transporte.selectedIndex == 0) { @@ -116,8 +116,8 @@ } document.addEventListener("DOMContentLoaded", function () { - var txtFecha = document.getElementById('<%= txt_Fecha.ClientID %>'); - var txtHora = document.getElementById('<%= txt_Hora.ClientID %>'); + var txtFecha = document.getElementById('<%= txtFecha.ClientID %>'); + var txtHora = document.getElementById('<%= txtHora.ClientID %>'); function cambioFechaHorario() { var fechaSeleccionada = new Date(txtFecha.value); @@ -187,20 +187,20 @@
Retira transporte: + <%-- --%>
Observaciones: - + @@ -209,15 +209,15 @@ Fecha y Hora de retiro: - + - *Error en Fecha + *Error en Fecha - + - *Error en Hora + *Error en Hora
- +
Seleccionar: Todas  diff --git a/WebLab/Derivaciones/InformeLote.aspx.cs b/WebLab/Derivaciones/InformeLote.aspx.cs index c0daa70..eacf927 100644 --- a/WebLab/Derivaciones/InformeLote.aspx.cs +++ b/WebLab/Derivaciones/InformeLote.aspx.cs @@ -136,11 +136,11 @@ private void activarControles(bool valor) txtObservacion.Enabled = valor; ddlEstados.Enabled = valor; //rb_transportista.Enabled = true; //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) - ddl_Transporte.Enabled = valor; + ddlTransporte.Enabled = valor; lnkMarcar.Enabled = valor; lnkDesMarcar.Enabled = valor; - txt_Fecha.Enabled = valor; - txt_Hora.Enabled = valor; + txtFecha.Enabled = valor; + txtHora.Enabled = valor; } private void CargarControles() @@ -162,10 +162,10 @@ private void CargarEstados() private void CargarTransportistas() { - ddl_Transporte.Items.Add("-- SELECCIONE --"); + ddlTransporte.Items.Add("-- SELECCIONE --"); //Vanesa: por ahora esta hardcodeado los transportitas, hacer mejora que lea de la base de datos - ddl_Transporte.Items.Add("Público"); - ddl_Transporte.Items.Add("Privado"); + ddlTransporte.Items.Add("Público"); + ddlTransporte.Items.Add("Privado"); //Utility oUtil = new Utility(); @@ -176,8 +176,8 @@ private void CargarTransportistas() private void CargarFechaHoraActual() { DateTime miFecha = DateTime.UtcNow.AddHours(-3); //Hora estándar de Argentina (UTC-03:00) - txt_Fecha.Text = miFecha.Date.ToString("yyyy-MM-dd"); - txt_Hora.Text = miFecha.ToString("HH:mm"); + txtFecha.Text = miFecha.Date.ToString("yyyy-MM-dd"); + txtHora.Text = miFecha.ToString("HH:mm"); //Date1.Text = miFecha.Date.ToString("yyyy-MM-dd"); //Time1.Text = miFecha.ToString("HH:mm"); } @@ -346,7 +346,7 @@ private bool Guardar() int estadoLote = Convert.ToInt32(ddlEstados.SelectedValue); string resultadoDerivacion = estadoLote == 2 ? "Derivado: " + row.Cells[3].Text : "No Derivado. "; //string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? rb_transportista.SelectedValue : ""); //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) - string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? ddl_Transporte.SelectedValue : ""); + string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? ddlTransporte.SelectedValue : ""); LoteDerivacion lote = new LoteDerivacion(); lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); @@ -355,7 +355,7 @@ private bool Guardar() lote.Observacion = observacion; lote.IdUsuarioEnvio = idUsuario; //para Estado "Derivado" poner la fecha actual y para estado "Cancelado" no poner Fecha - string fecha_hora = txt_Fecha.Text + " " + txt_Hora.Text; + string fecha_hora = txtFecha.Text + " " + txtHora.Text; lote.FechaEnvio = (estadoLote == 2) ? Convert.ToDateTime(fecha_hora) : DateTime.Parse("01/01/1900"); lote.Save(); @@ -411,10 +411,10 @@ Estado de la derivacion LAB_DerivacionEstado if (estadoLote == 2) //Si deriva indica con que transportista fue, y que fecha y hora se retiro { // lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", rb_transportista.SelectedValue); //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) - lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", ddl_Transporte.SelectedValue); - DateTime f = new DateTime(Convert.ToInt16(txt_Fecha.Text.Substring(0, 4)), Convert.ToInt16(txt_Fecha.Text.Substring(5, 2)), Convert.ToInt16(txt_Fecha.Text.Substring(8, 2))); + lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", ddlTransporte.SelectedValue); + DateTime f = new DateTime(Convert.ToInt16(txtFecha.Text.Substring(0, 4)), Convert.ToInt16(txtFecha.Text.Substring(5, 2)), Convert.ToInt16(txtFecha.Text.Substring(8, 2))); lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Fecha", f.ToString("dd/MM/yyyy")); //que las fechas tengan el mismo formato - lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Hora", txt_Hora.Text); + lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Hora", txtHora.Text); } diff --git a/WebLab/Derivaciones/InformeLote.aspx.designer.cs b/WebLab/Derivaciones/InformeLote.aspx.designer.cs index a81c429..59d5969 100644 --- a/WebLab/Derivaciones/InformeLote.aspx.designer.cs +++ b/WebLab/Derivaciones/InformeLote.aspx.designer.cs @@ -42,22 +42,22 @@ public partial class InformeLote protected global::System.Web.UI.WebControls.RangeValidator Range1; /// - /// ddl_Transporte control. + /// ddlTransporte control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.DropDownList ddl_Transporte; + protected global::System.Web.UI.WebControls.DropDownList ddlTransporte; /// - /// lbl_ErrorTransporte control. + /// lblErrorTransporte control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_ErrorTransporte; + protected global::System.Web.UI.WebControls.Label lblErrorTransporte; /// /// txtObservacion control. @@ -69,22 +69,22 @@ public partial class InformeLote protected global::System.Web.UI.WebControls.TextBox txtObservacion; /// - /// lbl_ErrorMotivo control. + /// lblErrorMotivo control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_ErrorMotivo; + protected global::System.Web.UI.WebControls.Label lblErrorMotivo; /// - /// txt_Fecha control. + /// txtFecha control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.TextBox txt_Fecha; + protected global::System.Web.UI.WebControls.TextBox txtFecha; /// /// RequiredFieldValidator1 control. @@ -96,13 +96,13 @@ public partial class InformeLote protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1; /// - /// txt_Hora control. + /// txtHora control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.TextBox txt_Hora; + protected global::System.Web.UI.WebControls.TextBox txtHora; /// /// RequiredFieldValidator2 control. @@ -123,13 +123,13 @@ public partial class InformeLote protected global::System.Web.UI.WebControls.Button btnGuardar; /// - /// lbl_errorLista control. + /// lblErrorLista control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_errorLista; + protected global::System.Web.UI.WebControls.Label lblErrorLista; /// /// lnkMarcar control. diff --git a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx index 853354f..1ee7de9 100644 --- a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx +++ b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx @@ -49,7 +49,7 @@
-
+
@@ -69,20 +69,20 @@
-
- +
+
Efector origen: - +
Estado Lote: -
-
- +
- - + +
Transportista: - + <%----%>
Fecha y Hora: <%----%> - + *Error en Fecha - *Error en Hora - + *Error en Hora +
Observaciones: - +
diff --git a/WebLab/Derivaciones/Derivados2.aspx.cs b/WebLab/Derivaciones/Derivados2.aspx.cs index d6c5dbc..8abf0a8 100644 --- a/WebLab/Derivaciones/Derivados2.aspx.cs +++ b/WebLab/Derivaciones/Derivados2.aspx.cs @@ -248,7 +248,7 @@ private void verificaResultados(string str_condicion) } else { - cv_botonBuscar.IsValid = false; //que de error sin enviar alert + cvBotonBuscar.IsValid = false; //que de error sin enviar alert } diff --git a/WebLab/Derivaciones/Derivados2.aspx.designer.cs b/WebLab/Derivaciones/Derivados2.aspx.designer.cs index 49285a3..e7be903 100644 --- a/WebLab/Derivaciones/Derivados2.aspx.designer.cs +++ b/WebLab/Derivaciones/Derivados2.aspx.designer.cs @@ -132,13 +132,13 @@ public partial class Derivados2 protected global::System.Web.UI.WebControls.RadioButtonList rdbEstado; /// - /// cv_botonBuscar control. + /// cvBotonBuscar control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.CustomValidator cv_botonBuscar; + protected global::System.Web.UI.WebControls.CustomValidator cvBotonBuscar; /// /// btnBuscar control. diff --git a/WebLab/Derivaciones/GestionarLote.aspx b/WebLab/Derivaciones/GestionarLote.aspx index b99ddc2..68224e5 100644 --- a/WebLab/Derivaciones/GestionarLote.aspx +++ b/WebLab/Derivaciones/GestionarLote.aspx @@ -68,8 +68,8 @@ @@ -95,7 +95,7 @@ diff --git a/WebLab/Derivaciones/GestionarLote.aspx.cs b/WebLab/Derivaciones/GestionarLote.aspx.cs index f9ce658..45ba280 100644 --- a/WebLab/Derivaciones/GestionarLote.aspx.cs +++ b/WebLab/Derivaciones/GestionarLote.aspx.cs @@ -100,9 +100,9 @@ protected void btnBuscar_Click(object sender, EventArgs e) if (ddlEfector.SelectedValue != "0") str_condicion += " AND l.idEfectorDestino = " + ddlEfector.SelectedValue; str_condicion += " AND idEfectorOrigen = " + oUser.IdEfector.IdEfector.ToString(); - if (!string.IsNullOrWhiteSpace(tb_nrolote.Text)) + if (!string.IsNullOrWhiteSpace(tbNrolote.Text)) { - str_condicion += " AND idLoteDerivacion = " + tb_nrolote.Text; + str_condicion += " AND idLoteDerivacion = " + tbNrolote.Text; } verificaResultados(Convert.ToInt32(rdbEstado.SelectedValue), str_condicion); @@ -152,7 +152,7 @@ private void verificaResultados(int estado, string parametros) } else { - cv_botonBuscar.IsValid = false; //que de error sin enviar alert + cvBotonBuscar.IsValid = false; //que de error sin enviar alert } diff --git a/WebLab/Derivaciones/GestionarLote.aspx.designer.cs b/WebLab/Derivaciones/GestionarLote.aspx.designer.cs index f8ea1ba..81c6526 100644 --- a/WebLab/Derivaciones/GestionarLote.aspx.designer.cs +++ b/WebLab/Derivaciones/GestionarLote.aspx.designer.cs @@ -60,22 +60,22 @@ public partial class GestionarLote protected global::System.Web.UI.HtmlControls.HtmlInputText txtFechaHasta; /// - /// tb_nrolote control. + /// tbNrolote control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.TextBox tb_nrolote; + protected global::System.Web.UI.WebControls.TextBox tbNrolote; /// - /// cv_nroLote control. + /// cvNroLote control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.CustomValidator cv_nroLote; + protected global::System.Web.UI.WebControls.CustomValidator cvNroLote; /// /// ddlEfector control. @@ -96,13 +96,13 @@ public partial class GestionarLote protected global::System.Web.UI.WebControls.RadioButtonList rdbEstado; /// - /// cv_botonBuscar control. + /// cvBotonBuscar control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.CustomValidator cv_botonBuscar; + protected global::System.Web.UI.WebControls.CustomValidator cvBotonBuscar; /// /// btnBuscar control. diff --git a/WebLab/Derivaciones/InformeList3.aspx b/WebLab/Derivaciones/InformeList3.aspx index 98644db..beb8b24 100644 --- a/WebLab/Derivaciones/InformeList3.aspx +++ b/WebLab/Derivaciones/InformeList3.aspx @@ -6,11 +6,11 @@ function validarFormulario() { var todoOk = false; - var validatorEstado = document.getElementById('<%= rv_estado.ClientID %>'); + var validatorEstado = document.getElementById('<%= rvEstado.ClientID %>'); <%--var txtObservacion = document.getElementById('<%= txtObservacion.ClientID %>');--%> //--> Cambio TextBox por DropDownList - var motivoCancelacion = document.getElementById('<%= ddl_motivoCancelacion.ClientID%>'); + var motivoCancelacion = document.getElementById('<%= ddlMotivoCancelacion.ClientID%>'); var estado = document.getElementById('<%= ddlEstado.ClientID %>'); - var label = document.getElementById('<%= lbl_ErrorMotivo.ClientID %>'); + var label = document.getElementById('<%= lblErrorMotivo.ClientID %>'); //Limpio los labels de error label.className = 'hidden'; @@ -59,18 +59,18 @@ return true; // Detiene la validación con al menos un check } } - var label = document.getElementById('<%= lbl_errorLista.ClientID %>'); + var label = document.getElementById('<%= lblErrorLista.ClientID %>'); label.className = 'exposed'; return todoOk; } function reseteaLabelErrorGrilla() { - var labelGrilla = document.getElementById('<%= lbl_errorLista.ClientID %>'); + var labelGrilla = document.getElementById('<%= lblErrorLista.ClientID %>'); labelGrilla.className = 'hidden'; } function reseteaLabelErrorMotivo() { - var labelMotivo = document.getElementById('<%= lbl_ErrorMotivo.ClientID %>'); + var labelMotivo = document.getElementById('<%= lblErrorMotivo.ClientID %>'); labelMotivo.className = 'hidden'; } @@ -103,7 +103,7 @@ } function activaMotivos(estado) { - var motivos = document.getElementById('<%= ddl_motivoCancelacion.ClientID %>'); + var motivos = document.getElementById('<%= ddlMotivoCancelacion.ClientID %>'); console.log(motivos); console.log(estado.value); if (estado.value == 2) { @@ -125,7 +125,7 @@ } }); //Si selecciono todas las derivaciones, deshabilito el error que no selecciono ninguna fila - if (seleccionar && document.getElementById('<%= lbl_errorLista.ClientID %>').className == 'exposed') { + if (seleccionar && document.getElementById('<%= lblErrorLista.ClientID %>').className == 'exposed') { reseteaLabelErrorGrilla(); } } @@ -224,7 +224,7 @@ - - + <%-- @@ -247,7 +247,7 @@ + @@ -125,7 +125,7 @@ + @@ -144,7 +144,7 @@ @@ -100,7 +100,7 @@ @@ -111,11 +111,11 @@ @@ -125,7 +125,7 @@ @@ -133,9 +133,9 @@ diff --git a/WebLab/Protocolos/DerivacionRecibirLote.aspx.cs b/WebLab/Protocolos/DerivacionRecibirLote.aspx.cs index 7697a72..31b87ab 100644 --- a/WebLab/Protocolos/DerivacionRecibirLote.aspx.cs +++ b/WebLab/Protocolos/DerivacionRecibirLote.aspx.cs @@ -52,18 +52,18 @@ private void CargarEncabezado() lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), Convert.ToInt32(Request["idLote"])); //lbl_FechaRegistro.Text = lote.FechaRegistro.Substring(0, 10); //fechaEnvio.Text = DateTime.Parse(lote.FechaEnvio.Substring(0, 10)).ToString("yyyy-MM-dd"); - hid_fechaEnvio.Value = lote.FechaEnvio.ToString("yyyy-MM-dd"); - lbl_fechaPermitida.Text = "Fecha envio: " + lote.FechaEnvio; + hidFechaEnvio.Value = lote.FechaEnvio.ToString("yyyy-MM-dd"); + lblFechaPermitida.Text = "Fecha envio: " + lote.FechaEnvio; Efector origen = new Efector(); origen = (Efector)origen.Get(typeof(Efector), lote.IdEfectorOrigen.IdEfector); - lb_efector.Text = origen.Nombre; + lbEfector.Text = origen.Nombre; CargarFechaHoraActual(); //LAB-56 Cargo el transportista List auditorias = AuditoriaLoteDerivacion.AuditoriasPorLote(Convert.ToInt32(Request["idLote"])); AuditoriaLoteDerivacion transporte = auditorias.FindLast(a => a.Analisis == "Transportista"); - lbl_transportista.Text = transporte.Valor; + lblTransportista.Text = transporte.Valor; } @@ -71,13 +71,13 @@ 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"); - txt_Hora.Value = miFecha.ToString("HH:mm"); + 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 - rv_Fecha.MinimumValue = hid_fechaEnvio.Value; - rv_Fecha.MaximumValue = txtFecha.Text; //Fecha Date today - rv_Fecha.Text = "La fecha de recepcion no puede ser menor a la fecha de envio " + hid_fechaEnvio.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; } @@ -142,14 +142,14 @@ private void GenerarAuditorias(LoteDerivacion lote) // lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Fecha Recibido", f.ToString("yyyy-MM-dd")); //Cambio formato de fecha asi tiene el mismo cuando se retira el lote //} - if (!string.IsNullOrEmpty(txt_Hora.Value)) - lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Hora Recibido", txt_Hora.Value); + if (!string.IsNullOrEmpty(txtHora.Value)) + lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Hora Recibido", txtHora.Value); //if (!string.IsNullOrEmpty(txt_transportista.Text)) // lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Transportista", txt_transportista.Text); - if (!string.IsNullOrEmpty(txt_obs.Value)) - lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Observacion", txt_obs.Value); + if (!string.IsNullOrEmpty(txtObs.Value)) + lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Observacion", txtObs.Value); } #endregion diff --git a/WebLab/Protocolos/DerivacionRecibirLote.aspx.designer.cs b/WebLab/Protocolos/DerivacionRecibirLote.aspx.designer.cs index 04492b4..0705dca 100644 --- a/WebLab/Protocolos/DerivacionRecibirLote.aspx.designer.cs +++ b/WebLab/Protocolos/DerivacionRecibirLote.aspx.designer.cs @@ -51,40 +51,40 @@ public partial class DerivacionRecibirLote protected global::System.Web.UI.WebControls.Label txtNumeroLote; /// - /// lb_efector control. + /// lbEfector control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lb_efector; + protected global::System.Web.UI.WebControls.Label lbEfector; /// - /// lbl_fechaPermitida control. + /// lblFechaPermitida control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_fechaPermitida; + protected global::System.Web.UI.WebControls.Label lblFechaPermitida; /// - /// hid_fechaEnvio control. + /// hidFechaEnvio control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.HiddenField hid_fechaEnvio; + protected global::System.Web.UI.WebControls.HiddenField hidFechaEnvio; /// - /// lbl_transportista control. + /// lblTransportista control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_transportista; + protected global::System.Web.UI.WebControls.Label lblTransportista; /// /// txtFecha control. @@ -96,13 +96,13 @@ public partial class DerivacionRecibirLote protected global::System.Web.UI.WebControls.TextBox txtFecha; /// - /// txt_Hora control. + /// txtHora control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.HtmlControls.HtmlInputGenericControl txt_Hora; + protected global::System.Web.UI.HtmlControls.HtmlInputGenericControl txtHora; /// /// rfvFecha control. @@ -114,48 +114,48 @@ public partial class DerivacionRecibirLote protected global::System.Web.UI.WebControls.RequiredFieldValidator rfvFecha; /// - /// rfv_Hora control. + /// rfvHora control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RequiredFieldValidator rfv_Hora; + protected global::System.Web.UI.WebControls.RequiredFieldValidator rfvHora; /// - /// rv_Fecha control. + /// rvFecha control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RangeValidator rv_Fecha; + protected global::System.Web.UI.WebControls.RangeValidator rvFecha; /// - /// txt_obs control. + /// txtObs control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.HtmlControls.HtmlTextArea txt_obs; + protected global::System.Web.UI.HtmlControls.HtmlTextArea txtObs; /// - /// btn_recibirLote control. + /// btnRecibirLote control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Button btn_recibirLote; + protected global::System.Web.UI.WebControls.Button btnRecibirLote; /// - /// btn_volver control. + /// btnVolver control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Button btn_volver; + protected global::System.Web.UI.WebControls.Button btnVolver; } } From 591f10144b201ad37ca808cc10a5a9571376d905 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Thu, 16 Oct 2025 12:28:22 -0300 Subject: [PATCH 15/61] =?UTF-8?q?Requerimiento=202:=20Renombrar=20?= =?UTF-8?q?=E2=80=9CPaciente/Producto=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebLab/Derivaciones/InformeList3.aspx | 2 +- WebLab/Protocolos/DerivacionMultiEfectorLote.aspx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WebLab/Derivaciones/InformeList3.aspx b/WebLab/Derivaciones/InformeList3.aspx index beb8b24..aa8f056 100644 --- a/WebLab/Derivaciones/InformeList3.aspx +++ b/WebLab/Derivaciones/InformeList3.aspx @@ -326,7 +326,7 @@ - + diff --git a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx index 1ee7de9..072bd9d 100644 --- a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx +++ b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx @@ -97,7 +97,7 @@ <%----%> - + From e87db01956461d540c118c4e4daceb63d55828ae Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Thu, 16 Oct 2025 12:30:36 -0300 Subject: [PATCH 16/61] =?UTF-8?q?feature:=20Parte=20del=20Requerimiento=20?= =?UTF-8?q?4:=20Recepci=C3=B3n=20de=20derivaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DerivacionMultiEfectorLote.aspx.cs | 45 +++- WebLab/Protocolos/ProtocoloProductoEdit.aspx | 7 +- .../Protocolos/ProtocoloProductoEdit.aspx.cs | 242 ++++++++++++++---- 3 files changed, 225 insertions(+), 69 deletions(-) diff --git a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.cs b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.cs index 6bb6abc..36d6d50 100644 --- a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.cs +++ b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.cs @@ -43,7 +43,10 @@ protected void Page_Load(object sender, EventArgs e) { VerificaPermisos("Derivacion"); - ProtocoloList1.CargarGrillaProtocolo(Request["idServicio"].ToString()); + if (Request["idServicio"].ToString() != "5") + ProtocoloList1.CargarGrillaProtocolo(Request["idServicio"].ToString()); + else + pnlTitulo.Visible = false; if (Request["idLote"] != null) { @@ -218,7 +221,10 @@ private DataTable LeerDatosProtocolosDerivados() string m_strSQL = @"select convert(varchar(10),P.fecha,103) as fecha, P.numero, P.idPaciente as idPaciente, DE.descripcion as EstadoDerivacion , - P.idProtocolo , L.idEfectorDestino , ef.nombre , Pa.nombre + ' ' + Pa.apellido as paciente + P.idProtocolo , L.idEfectorDestino , ef.nombre , + case when P.idPaciente > 0 then + Pa.nombre + ' ' + Pa.apellido + else P.descripcionProducto end as paciente from LAB_Derivacion D inner join LAB_DetalleProtocolo as Det on Det.idDetalleProtocolo = D.idDetalleProtocolo inner join LAB_Protocolo as P on P.idProtocolo = det.idProtocolo @@ -231,7 +237,7 @@ and L.estado in (2, 4, 5) and D.estado=1 and D.idLote = " + txtNumeroLote.Text + @" group by P.fecha, P.numero, P.idPaciente, DE.descripcion, P.idProtocolo , - L.idEfectorDestino , ef.nombre , Pa.nombre + ' ' + Pa.apellido "; + L.idEfectorDestino , ef.nombre , Pa.nombre + ' ' + Pa.apellido ,P.descripcionProducto"; DataSet Ds = new DataSet(); @@ -308,7 +314,7 @@ protected void lnkIngresoProtocolo_Command(object sender, CommandEventArgs e) private void GenerarNuevoProtocolo(int idProtocoloOrigen, int idPaciente) { - string pivot, m_numero, s_idServicio, idLote; + string m_numero, s_idServicio, idLote; Protocolo p = new Protocolo(); p = (Protocolo)p.Get(typeof(Protocolo), idProtocoloOrigen); @@ -316,15 +322,28 @@ private void GenerarNuevoProtocolo(int idProtocoloOrigen, int idPaciente) s_idServicio = p.IdTipoServicio.IdTipoServicio.ToString(); m_numero = p.Numero.ToString(); idLote = txtNumeroLote.Text; - // DataTable dt = TraerItemsDerivadosProtocolo(); //-> ahora lo voy a cargar desde ProtocoloEdit2 - - Response.Redirect("ProtocoloEdit2.aspx?idEfectorSolicitante=" + p.IdEfector.IdEfector + - "&numeroProtocolo=" + m_numero + - "&idServicio=" + s_idServicio + - "&idLote=" + idLote + - "&idPaciente=" + idPaciente + - //"&Operacion=AltaDerivacionMultiEfectorLote&analisis=" + pivot, false); // No enviar los analisis por request - "&Operacion=AltaDerivacionMultiEfectorLote", false); + + if(idPaciente > 0) + { + Response.Redirect("ProtocoloEdit2.aspx?idEfectorSolicitante=" + p.IdEfector.IdEfector + + "&numeroProtocolo=" + m_numero + + "&idServicio=" + s_idServicio + + "&idLote=" + idLote + + "&idPaciente=" + idPaciente + + "&Operacion=AltaDerivacionMultiEfectorLote", false); + } + else + { + //Es Muestra No Pacientes + Response.Redirect("ProtocoloProductoEdit.aspx?idEfectorSolicitante=" + p.IdEfector.IdEfector + + "&numeroProtocolo=" + m_numero + + "&idServicio=" + s_idServicio + + "&idLote=" + idLote + + "&Desde=AltaDerivacionMultiEfectorLote" + + "&Operacion=AltaDerivacionMultiEfectorLote" , false); + //idprotocolo + } + } #endregion diff --git a/WebLab/Protocolos/ProtocoloProductoEdit.aspx b/WebLab/Protocolos/ProtocoloProductoEdit.aspx index 11a0677..1924f7b 100644 --- a/WebLab/Protocolos/ProtocoloProductoEdit.aspx +++ b/WebLab/Protocolos/ProtocoloProductoEdit.aspx @@ -719,7 +719,7 @@
@@ -778,7 +778,8 @@ function VerificaLargo (source, arguments) function InicioPagina() - { + { + if (document.getElementById('<%= Page.Master.FindControl("ContentPlaceHolder1").FindControl("TxtDatosCargados").ClientID %>').value == "") {///protocolo nuevo CrearFila(true); @@ -1231,7 +1232,7 @@ function VerificaLargo (source, arguments) } - + diff --git a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs index 35695aa..25823eb 100644 --- a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs +++ b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs @@ -157,8 +157,12 @@ protected void Page_Load(object sender, EventArgs e) btnCancelar.Text = "Cancelar"; btnCancelar.Width = Unit.Pixel(80); + btnCancelar.Visible = true; + if (Request["Operacion"].ToString() == "AltaDerivacionMultiEfectorLote") + { + CargarProtocoloDerivadoLote(); + } - } } else @@ -193,29 +197,31 @@ private void CargarDeterminacionesPeticion(Peticion oRegistro) } - private void CargarDeterminacionesDerivacion(string s_analisis, string s_diagnostico) + private void CargarDeterminacionesDerivacion(string s_analisis) { - - string[] tabla = s_analisis.Split('|'); + string pivot = ""; string sDatos = ""; + /////Crea nuevamente los detalles. for (int i = 0; i <= tabla.Length - 1; i++) { - if (sDatos == "") - sDatos = tabla[i].ToString() + "#Si"; - else - sDatos += ";" + tabla[i].ToString() + "#Si"; - - } - - - + Item oItem = new Item(); + oItem = (Item)oItem.Get(typeof(Item), int.Parse(tabla[i].ToString())); + if (oItem != null) + if (pivot != oItem.Nombre) + { + if (sDatos == "") + sDatos = oItem.Codigo + "#Si#False"; + else + sDatos += ";" + oItem.Codigo + "#Si#False"; + pivot = oItem.Nombre; + } + } TxtDatosCargados.Value = sDatos; - } - + protected void txtCodigoMuestra_TextChanged(object sender, EventArgs e) { @@ -499,6 +505,7 @@ private void CargarListas() (Request["Operacion"].ToString() == "AltaTurno") || (Request["Operacion"].ToString() == "AltaDerivacion") || (Request["Operacion"].ToString() == "AltaDerivacionMultiEfector") || + (Request["Operacion"].ToString() == "AltaDerivacionMultiEfectorLote") || (Request["Operacion"].ToString() == "AltaPeticion") || (Request["Operacion"].ToString() == "AltaFFEE") ) @@ -711,7 +718,7 @@ private void CargarItems() FROM Lab_item I with (nolock) inner join lab_itemEfector IE with (nolock) on I.idItem= IE.idItem and Ie.idefector=" + oC.IdEfector.IdEfector.ToString() + //MultiEfector @"INNER JOIN Lab_area A (nolock) ON A.idArea= I.idArea - where A.baja=0 and I.baja=0 and A.idtipoServicio in (1, 3) AND (I.tipo= 'P') order by I.nombre "; + where A.baja=0 and I.baja=0 and IE.disponible=1 and A.idtipoServicio in (1, 3) AND (I.tipo= 'P') order by I.nombre "; //NHibernate.Cfg.Configuration oConf = new NHibernate.Cfg.Configuration(); //String strconn = oConf.GetProperty("hibernate.connection.connection_string"); SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString); ///Performance: conexion de solo lectura @@ -788,7 +795,14 @@ 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") + { + ActualizarEstadoDerivacion(oRegistro); + VerificacionEstadoLote(oRegistro); + Response.Redirect("DerivacionMultiEfectorLote.aspx?idEfectorSolicitante=" + Request["idEfectorSolicitante"].ToString() + "&idServicio=" + Request["idServicio"].ToString() + "&idLote=" + Request["idLote"]); + } } else { @@ -1391,7 +1405,7 @@ private void GuardarDetalle2(Business.Data.Laboratorio.Protocolo oRegistro) private void GuardarDetallePractica(DetalleProtocolo oDet) { - if (VerificarSiEsDerivable(oDet)) //oDet.IdItem.IdEfector.IdEfector != oDet.IdItem.IdEfectorDerivacion.IdEfector) //Si es un item derivable no busca hijos y guarda directamente. + if (oDet.VerificarSiEsDerivable(oUser.IdEfector)) //Cambio para que quede como ProtocoloEdit2 { oDet.IdSubItem = oDet.IdItem; oDet.Save(); @@ -1497,31 +1511,31 @@ private void GuardarValorReferencia(DetalleProtocolo oDetalle) //Fin calculo de valor de refrencia y metodo } - private bool VerificarSiEsDerivable(DetalleProtocolo oDet) - { - bool ok = false; - /// buscar idefectorderivacion desde lab_itemefector - ISession m_session = NHibernateHttpModule.CurrentSession; - ICriteria critItemEfector = m_session.CreateCriteria(typeof(ItemEfector)); - critItemEfector.Add(Expression.Eq("IdItem", oDet.IdItem)); - critItemEfector.Add(Expression.Eq("IdEfector", oUser.IdEfector)); - IList detalle1 = critItemEfector.List(); - if (detalle1.Count > 0) - { - foreach (ItemEfector oitemEfector in detalle1) - { - if (oDet.IdEfector.IdEfector != oitemEfector.IdEfectorDerivacion.IdEfector) - { - ok = true; break; - } - } - } - else - ok = false; + //private bool VerificarSiEsDerivable(DetalleProtocolo oDet) + //{ + // bool ok = false; + // /// buscar idefectorderivacion desde lab_itemefector + // ISession m_session = NHibernateHttpModule.CurrentSession; + // ICriteria critItemEfector = m_session.CreateCriteria(typeof(ItemEfector)); + // critItemEfector.Add(Expression.Eq("IdItem", oDet.IdItem)); + // critItemEfector.Add(Expression.Eq("IdEfector", oUser.IdEfector)); + // IList detalle1 = critItemEfector.List(); + // if (detalle1.Count > 0) + // { + // foreach (ItemEfector oitemEfector in detalle1) + // { + // if (oDet.IdEfector.IdEfector != oitemEfector.IdEfectorDerivacion.IdEfector) + // { + // ok = true; break; + // } + // } + // } + // else + // ok = false; - return ok; + // return ok; - } + //} protected void ddlSexo_SelectedIndexChanged(object sender, EventArgs e) @@ -1582,18 +1596,13 @@ protected void txtCodigo_TextChanged1(object sender, EventArgs e) protected void btnCancelar_Click(object sender, EventArgs e) { - switch (Request["Desde"].ToString()) - { - //case "Default": Response.Redirect("Default.aspx?idServicio=" + Session["idServicio"].ToString(), false); break; - case "ProtocoloList": Response.Redirect("ProtocoloList.aspx?idServicio=" + Session["idServicio"].ToString() + "&Tipo=ListaProducto"); break; - case "Control": Response.Redirect("ProtocoloList.aspx?idServicio=" + Session["idServicio"].ToString() + "&Tipo=Control"); break; - // case "Urgencia": Response.Redirect("../Urgencia/UrgenciaList.aspx",false); break; - // case "Derivacion": Response.Redirect("Derivacion.aspx?idServicio="+Session["idServicio"].ToString(), false); break; - } - - - - } + switch (Request["Desde"].ToString()) + { + case "ProtocoloList": Response.Redirect("ProtocoloList.aspx?idServicio=" + Session["idServicio"].ToString() + "&Tipo=ListaProducto"); break; + case "Control": Response.Redirect("ProtocoloList.aspx?idServicio=" + Session["idServicio"].ToString() + "&Tipo=Control"); break; + case "AltaDerivacionMultiEfectorLote": Response.Redirect("DerivacionMultiEfectorLote.aspx?idEfectorSolicitante=" + Request["idEfectorSolicitante"].ToString() + "&idServicio=" + Request["idServicio"].ToString() + "&idLote=" + Request["idLote"]); break; + } + } @@ -2037,6 +2046,133 @@ protected void btnArchivos_Click(object sender, EventArgs e) { Response.Redirect("ProtocoloAdjuntar.aspx?idProtocolo=" + Request["idProtocolo"].ToString() +"&desde=protocolo"); } + + private void CargarProtocoloDerivadoLote() + { + string numeroProtocolo = Request["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", int.Parse(numeroProtocolo)); + if (oRegistro != null) + { + lblTitulo.Visible = false; + lblServicio1.Visible = true; + lblServicio.Visible = true; + txtFecha.Value = DateTime.Now.ToShortDateString(); + txtFechaOrden.Value = oRegistro.FechaOrden.ToShortDateString(); + txtCodigoMuestra.Text = ""; + txtDescripcionProducto.Text = oRegistro.DescripcionProducto; + ddlConservacion.SelectedValue = oRegistro.IdConservacion.ToString(); + txtNumeroOrigen.Text = oRegistro.Numero.ToString(); + ddlEfector.SelectedValue = oRegistro.IdEfector.IdEfector.ToString(); + ddlSectorServicio.SelectedValue = oRegistro.IdSector.IdSectorServicio.ToString(); + txtObservacion.Text = oRegistro.Observacion; + pnlNavegacion.Visible = false; + btnCancelar.Text = "Cancelar"; + btnCancelar.Width = Unit.Pixel(80); + ddlMuestra.SelectedValue = oRegistro.IdMuestra.ToString(); + Muestra oMuestra = new Muestra(); + oMuestra = (Muestra)oMuestra.Get(typeof(Muestra), "IdMuestra", oRegistro.IdMuestra, "Baja", false); + txtCodigoMuestra.Text = oMuestra.Codigo; + + + #region CargaDeterminaciones + ////// ---------------------->Buscar las derivaciones que no han sido ingresadas + //el protocolo me da los protocolos detalles + //los protocolos detalles me dan las derivaciones + //la derivacion debe estar enviada + //la derivacion debe tener el mismo lote que el ingresado (no todos los analisis pueden haber sido enviados con el mismo lote) + + string m_strSQL = + //select distinct STRING_AGG(Det.idItem ,' | ') as Item ---> (No esta disponible en SQL 2014) + @" SELECT STUFF(( SELECT ' | ' + CAST(Det.idItem AS VARCHAR(20)) + from LAB_Derivacion D + inner join LAB_DetalleProtocolo as Det on Det.idDetalleProtocolo = D.idDetalleProtocolo + inner join LAB_Protocolo as P on P.idProtocolo = det.idProtocolo + inner join LAB_DerivacionEstado as LE on LE.idEstado = D.estado + inner join LAB_LoteDerivacion L on L.idLoteDerivacion = D.idLote + where P.baja = 0 + and D.estado in (1) ---------------------- Buscar las derivaciones que no han sido ingresadas + and L.idLoteDerivacion = " + Request["idLote"].ToString() + " and p.numero = " + numeroProtocolo + + " FOR XML PATH(''), TYPE ).value('.', 'NVARCHAR(MAX)'), 1, 3, '') AS Item; "; + + DataSet Ds = new DataSet(); + SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; + SqlDataAdapter adapter = new SqlDataAdapter(); + adapter.SelectCommand = new SqlCommand(m_strSQL, conn); + adapter.Fill(Ds); + + string analisis = Convert.ToString(Ds.Tables[0].Rows[0][0]); + CargarDeterminacionesDerivacion(analisis); + #endregion + } + } + + private void VerificacionEstadoLote(Protocolo oRegistro) + { + + if (Request["idLote"] != null) //Si no tiene Lote, no actualiza estado de Lote + { + int idLote = Convert.ToInt32(Request["idLote"]); + try + { + if (idLote != 0) + { + LoteDerivacion lote = new LoteDerivacion(); + lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); + + + if (lote.Estado == 4) //Pasa de Recibido a Ingresado + { + lote.Estado = 5; + lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); + } + + //Graba el ingreso del protocolo en el lote + lote.GrabarAuditoriaLoteDerivacion("Ingresa protocolo", oUser.IdUsuario, "Número Protocolo", oRegistro.Numero.ToString(), Request["numeroProtocolo"]); + + //Si al generar este nuevo protocolo se finalizo la carga del lote, cambiar estado a Completado + if (!lote.HayDerivacionesPendientes()) + { + lote.Estado = 6; //Pasa a Completado si no tiene más derivaciones pendientes + lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); + } + + lote.Save(); + } + } + catch (Exception) + { + } + } + } + private void ActualizarEstadoDerivacion(Protocolo oRegistro) + { + SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; + int idLote = Convert.ToInt32(Request["idLote"]); + + string query = + @"update LAB_Derivacion + set estado=3---recibido + ,idProtocoloDerivacion=" + oRegistro.IdProtocolo.ToString() + @" + from LAB_Derivacion D + inner join LAB_DetalleProtocolo Det on Det.idDetalleProtocolo= d.idDetalleProtocolo + inner join LAB_Protocolo P on P.idProtocolo= Det.idProtocolo + where P.numero=" + Request["numeroProtocolo"].ToString() + @" and idLote=" + idLote; + + 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 + Business.Data.Laboratorio.Protocolo oPOrigen = new Business.Data.Laboratorio.Protocolo(); + oPOrigen = (Business.Data.Laboratorio.Protocolo)oPOrigen.Get(typeof(Business.Data.Laboratorio.Protocolo), "Numero", int.Parse(Request["numeroProtocolo"].ToString())); + if (oPOrigen != null) + { + oPOrigen.GrabarAuditoriaDetalleProtocolo("Recepcion Derivacion", oUser.IdUsuario, "Lote " + idLote, "Protocolo " + oRegistro.Numero.ToString()); + } + + } + } } From 6702deeb0e5ad605d517239c6852fa425004ebe8 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Thu, 16 Oct 2025 15:59:12 -0300 Subject: [PATCH 09/61] feature: Requerimiento 1: Cambiar a nomenclatura CamelCase --- WebLab/Derivaciones/InformeList3.aspx.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WebLab/Derivaciones/InformeList3.aspx.cs b/WebLab/Derivaciones/InformeList3.aspx.cs index 9e3c43a..b851e6d 100644 --- a/WebLab/Derivaciones/InformeList3.aspx.cs +++ b/WebLab/Derivaciones/InformeList3.aspx.cs @@ -73,7 +73,7 @@ protected void Page_Load(object sender, EventArgs e) pnlNroLote.Visible = true; HyperLink1.NavigateUrl = "~/Derivaciones/GestionarLote.aspx"; ddlEstado.SelectedIndex = 2; - ddl_motivoCancelacion.Enabled = false; + ddlMotivoCancelacion.Enabled = false; } } @@ -424,7 +424,7 @@ private void ActualizarDetalleProtocolo(GridViewRow row, int idLote = 0, int de oDeriva.IdMotivoCancelacion = MotivoCancelacion; //La observacion se cambia solo si es Alta, si se desasocia el lote, o si al modificar agrego una observacion - if (Request["Tipo"] == "Alta" || desasociaLote == 1 ||(Request["Tipo"] == "Modifica" && !string.IsNullOrEmpty(txt_observacion.Text))) + if (Request["Tipo"] == "Alta" || desasociaLote == 1 ||(Request["Tipo"] == "Modifica" && !string.IsNullOrEmpty(txtObservacion.Text))) { oDeriva.Observacion = observacion; } From c238d9c7a039aa032ab3ff8d680dc38c783d01b7 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Thu, 16 Oct 2025 16:00:21 -0300 Subject: [PATCH 10/61] =?UTF-8?q?feature;=20en=20proceso=20Requerimiento?= =?UTF-8?q?=204:=20Recepci=C3=B3n=20de=20derivaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebLab/Protocolos/ProtocoloMensaje.aspx | 102 ++++++++++-------- WebLab/Protocolos/ProtocoloMensaje.aspx.cs | 31 +++--- .../ProtocoloMensaje.aspx.designer.cs | 33 ++++-- .../Protocolos/ProtocoloProductoEdit.aspx.cs | 8 +- 4 files changed, 101 insertions(+), 73 deletions(-) diff --git a/WebLab/Protocolos/ProtocoloMensaje.aspx b/WebLab/Protocolos/ProtocoloMensaje.aspx index 4f8d1e7..99508a1 100644 --- a/WebLab/Protocolos/ProtocoloMensaje.aspx +++ b/WebLab/Protocolos/ProtocoloMensaje.aspx @@ -1,52 +1,64 @@ <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProtocoloMensaje.aspx.cs" Inherits="WebLab.Protocolos.ProtocoloMensaje" MasterPageFile="~/Site1.Master" %> - - -

-
- -
-
-
- - - -
- -
-
- ALTA DE MUESTRA - -
-
- - -

-
-

- - - - - - -
- - -
-
- - -
- + + +
+
+
+ +
+
+
+ + + +
+ +
+
+ ALTA DE MUESTRA +
+
+ + +

+

+
+

+

+ + + + + +
+ + +
+
+ + +
+ diff --git a/WebLab/Protocolos/ProtocoloMensaje.aspx.cs b/WebLab/Protocolos/ProtocoloMensaje.aspx.cs index bdbdb59..c8d3623 100644 --- a/WebLab/Protocolos/ProtocoloMensaje.aspx.cs +++ b/WebLab/Protocolos/ProtocoloMensaje.aspx.cs @@ -20,9 +20,6 @@ namespace WebLab.Protocolos { public partial class ProtocoloMensaje : System.Web.UI.Page { - - - protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) @@ -44,25 +41,35 @@ protected void Page_Load(object sender, EventArgs e) Business.Data.Laboratorio.Muestra oM = new Business.Data.Laboratorio.Muestra(); oM = (Business.Data.Laboratorio.Muestra)oM.Get(typeof(Business.Data.Laboratorio.Muestra), oP.IdMuestra); lblDescripcion.Text = oM.Nombre.ToUpper() + " " + oP.DescripcionProducto; + + if (Request["idLote"] != null) + { + lnkRegresar.Visible = true; + lnkNuevo.Visible = false; + } } } - - } - - - - - protected void lnkRegresar_Click(object sender, EventArgs e) + } + protected void lnkNuevo_Click(object sender, EventArgs e) { Business.Data.Laboratorio.Protocolo oP = new Business.Data.Laboratorio.Protocolo(); oP = (Business.Data.Laboratorio.Protocolo)oP.Get(typeof(Business.Data.Laboratorio.Protocolo), int.Parse(Request["id"].ToString())); - if ((oP.IdTipoServicio.IdTipoServicio==3) || (oP.IdTipoServicio.IdTipoServicio == 5)) - Response.Redirect("ProtocoloProductoEdit.aspx?Operacion=Alta", false); + if ((oP.IdTipoServicio.IdTipoServicio == 3) || (oP.IdTipoServicio.IdTipoServicio == 5)) + Response.Redirect("ProtocoloProductoEdit.aspx?Operacion=Alta", false); if (oP.IdTipoServicio.IdTipoServicio == 6) Response.Redirect("Default2.aspx?idServicio=6&idUrgencia=0&idCaso=0", false); + } + protected void lnkRegresar_Click(object sender, EventArgs e) + { + if (Request["idLote"] != null) //Regreso a la recepcion de lotes de derivaciones + { + Response.Redirect("DerivacionMultiEfectorLote.aspx?idServicio=1&idEfectorSolicitante=" + Request["idEfectorSolicitante"].ToString() + "&idLote=" + Request["idLote"]); + } } + + } } diff --git a/WebLab/Protocolos/ProtocoloMensaje.aspx.designer.cs b/WebLab/Protocolos/ProtocoloMensaje.aspx.designer.cs index c743d7b..528e52e 100644 --- a/WebLab/Protocolos/ProtocoloMensaje.aspx.designer.cs +++ b/WebLab/Protocolos/ProtocoloMensaje.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace WebLab.Protocolos { - - - public partial class ProtocoloMensaje { - +namespace WebLab.Protocolos +{ + + + public partial class ProtocoloMensaje + { + /// /// error control. /// @@ -20,7 +22,7 @@ public partial class ProtocoloMensaje { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl error; - + /// /// lblError control. /// @@ -29,7 +31,7 @@ public partial class ProtocoloMensaje { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblError; - + /// /// altaMuestra control. /// @@ -38,7 +40,7 @@ public partial class ProtocoloMensaje { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl altaMuestra; - + /// /// pnlTitulo control. /// @@ -47,7 +49,7 @@ public partial class ProtocoloMensaje { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl pnlTitulo; - + /// /// lblTitulo control. /// @@ -56,7 +58,7 @@ public partial class ProtocoloMensaje { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblTitulo; - + /// /// lblDescripcion control. /// @@ -65,7 +67,16 @@ public partial class ProtocoloMensaje { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblDescripcion; - + + /// + /// lnkRegresar control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton lnkRegresar; + /// /// lnkNuevo control. /// diff --git a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs index 25823eb..d3417c6 100644 --- a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs +++ b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs @@ -801,7 +801,7 @@ protected void btnGuardar_Click(object sender, EventArgs e) { ActualizarEstadoDerivacion(oRegistro); VerificacionEstadoLote(oRegistro); - Response.Redirect("DerivacionMultiEfectorLote.aspx?idEfectorSolicitante=" + Request["idEfectorSolicitante"].ToString() + "&idServicio=" + Request["idServicio"].ToString() + "&idLote=" + Request["idLote"]); + Response.Redirect("ProtocoloMensaje.aspx?id=" + oRegistro.IdProtocolo + "&idLote=" + Request["idLote"] + "&idEfectorSolicitante=" + Request["idEfectorSolicitante"], false); } } else @@ -1600,7 +1600,7 @@ protected void btnCancelar_Click(object sender, EventArgs e) { case "ProtocoloList": Response.Redirect("ProtocoloList.aspx?idServicio=" + Session["idServicio"].ToString() + "&Tipo=ListaProducto"); break; case "Control": Response.Redirect("ProtocoloList.aspx?idServicio=" + Session["idServicio"].ToString() + "&Tipo=Control"); break; - case "AltaDerivacionMultiEfectorLote": Response.Redirect("DerivacionMultiEfectorLote.aspx?idEfectorSolicitante=" + Request["idEfectorSolicitante"].ToString() + "&idServicio=" + Request["idServicio"].ToString() + "&idLote=" + Request["idLote"]); break; + case "AltaDerivacionMultiEfectorLote": Response.Redirect("DerivacionMultiEfectorLote.aspx?idEfectorSolicitante=" + Request["idEfectorSolicitante"].ToString() + "&idServicio=1&idLote=" + Request["idLote"]); break; } } @@ -2070,9 +2070,7 @@ private void CargarProtocoloDerivadoLote() btnCancelar.Text = "Cancelar"; btnCancelar.Width = Unit.Pixel(80); ddlMuestra.SelectedValue = oRegistro.IdMuestra.ToString(); - Muestra oMuestra = new Muestra(); - oMuestra = (Muestra)oMuestra.Get(typeof(Muestra), "IdMuestra", oRegistro.IdMuestra, "Baja", false); - txtCodigoMuestra.Text = oMuestra.Codigo; + #region CargaDeterminaciones From b4060143f2f09766dc0c29e9b18f4601e5455da1 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Fri, 17 Oct 2025 12:28:59 -0300 Subject: [PATCH 11/61] feature: Requerimiento 3: Adaptar PDF --- Business/Data/Laboratorio/LoteDerivacion.cs | 17 +++---- WebLab/App_Data/dsInformes.Designer.cs | 47 +++++++++++++++++++- WebLab/App_Data/dsInformes.xsd | 9 ++-- WebLab/App_Data/dsInformes.xss | 22 ++++----- WebLab/Informes/DerivacionLote.rpt | Bin 32768 -> 32768 bytes 5 files changed, 70 insertions(+), 25 deletions(-) diff --git a/Business/Data/Laboratorio/LoteDerivacion.cs b/Business/Data/Laboratorio/LoteDerivacion.cs index 2fa31ba..69c4d2c 100644 --- a/Business/Data/Laboratorio/LoteDerivacion.cs +++ b/Business/Data/Laboratorio/LoteDerivacion.cs @@ -96,14 +96,15 @@ public string Observacion { public static string derivacionPDF(int idLote) { - string m_strSQL = " SELECT numero, convert(varchar(10), fecha,103) as fecha, dni, determinacion, " + - " apellido + ' '+ nombre as paciente, efectorderivacion, fechaNacimiento as edad, unidadEdad, sexo, " + - " solicitante as especialista, idLote ," + - " CASE WHEN(len(idLote) < 9) " + - " THEN '00000' + CONVERT(VARCHAR, idLote) " + - " ELSE CONVERT(VARCHAR, idLote ) " + - " END as idLoteString " + - " FROM vta_LAB_Derivaciones WHERE idLote=" + idLote + " ORDER BY efectorDerivacion,numero "; + string m_strSQL = @"SELECT numero, convert(varchar(10), fecha,103) as fecha, dni, determinacion, + apellido + ' '+ nombre as paciente, efectorderivacion, fechaNacimiento as edad, unidadEdad, sexo, + solicitante as especialista, idLote , + CASE WHEN(len(idLote) < 9) + THEN '00000' + CONVERT(VARCHAR, idLote) + ELSE CONVERT(VARCHAR, idLote ) + END as idLoteString , + idTipoServicio + FROM vta_LAB_Derivaciones WHERE idLote= "+ idLote + " ORDER BY efectorDerivacion,numero "; return m_strSQL; } diff --git a/WebLab/App_Data/dsInformes.Designer.cs b/WebLab/App_Data/dsInformes.Designer.cs index e54301c..726b187 100644 --- a/WebLab/App_Data/dsInformes.Designer.cs +++ b/WebLab/App_Data/dsInformes.Designer.cs @@ -1535,6 +1535,8 @@ public partial class protocoloDataTable : global::System.Data.TypedTableBase diff --git a/WebLab/App_Data/dsInformes.xsd b/WebLab/App_Data/dsInformes.xsd index 0e927e8..8794fa2 100644 --- a/WebLab/App_Data/dsInformes.xsd +++ b/WebLab/App_Data/dsInformes.xsd @@ -72,7 +72,8 @@ - + + @@ -225,7 +226,7 @@ - + @@ -239,7 +240,7 @@ - + @@ -422,7 +423,7 @@ - + diff --git a/WebLab/App_Data/dsInformes.xss b/WebLab/App_Data/dsInformes.xss index 4ed68e1..e353c27 100644 --- a/WebLab/App_Data/dsInformes.xss +++ b/WebLab/App_Data/dsInformes.xss @@ -6,17 +6,17 @@ --> - - - - - - - - - - - + + + + + + + + + + + \ No newline at end of file diff --git a/WebLab/Informes/DerivacionLote.rpt b/WebLab/Informes/DerivacionLote.rpt index 3983b5258fd961c0a0eead3755e10929729d014e..db6795f8bb49d4204570a32d54309f66092d59aa 100644 GIT binary patch delta 9135 zcmV;gBT(FcfC7Mk0>Jou77<20096JEx0sRU2|F< zo+lfFv{i+cBa%OdlD+Q)-`QFJ+xI$PgC?o)&M4d>0Ni2FHM3kbq9PTaxEI|X9V&3Ej0Y1`3H>ZJQ>5FFH{SCf``9jCx31#oh6kF!3SxwLnTiftq#xs zZ&}4Mud)vFQiEsM3B(KFK@XYgIY0pWo2ugI6d=!qV(>1DzgiY^5_Enjzh}qx(i{JB z*S?!X-3zPkP$7jQx%HPyr+*nwSq>4ga4Qd&lHY`Ah}WY#L3@GIBAm93EP6`NZe%MnZF@=vp`j>;7ieg&RPQcx>3bvS7l; zn6Ra^g^ngU6k$q32zKyr~h6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J*Bh6*mr zytIRSZmx4vnbp3Wgv`RSWmSb6Yg0!5 Date: Fri, 17 Oct 2025 13:35:30 -0300 Subject: [PATCH 12/61] =?UTF-8?q?(LAB-159)=20Agregar=20nuevo=20punto=20de?= =?UTF-8?q?=20men=C3=BA=20=E2=80=9CLista=20de=20Lotes=E2=80=9D=20(#46)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * en proceso * en proceso * feature: listado de protocolos * fix: correciones fecha actual y correcion argumento auditorias --- WebLab/Derivaciones/LoteList.aspx | 222 ++++++++ WebLab/Derivaciones/LoteList.aspx.cs | 536 ++++++++++++++++++ WebLab/Derivaciones/LoteList.aspx.designer.cs | 179 ++++++ WebLab/Pacientes/js/ValidaFecha.js | 4 + WebLab/WebLab.csproj | 8 + 5 files changed, 949 insertions(+) create mode 100644 WebLab/Derivaciones/LoteList.aspx create mode 100644 WebLab/Derivaciones/LoteList.aspx.cs create mode 100644 WebLab/Derivaciones/LoteList.aspx.designer.cs diff --git a/WebLab/Derivaciones/LoteList.aspx b/WebLab/Derivaciones/LoteList.aspx new file mode 100644 index 0000000..8f89e81 --- /dev/null +++ b/WebLab/Derivaciones/LoteList.aspx @@ -0,0 +1,222 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LoteList.aspx.cs" Inherits="WebLab.Derivaciones.LoteList" MasterPageFile="~/Site1.Master" %> + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+
+
+

+ +

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
Fecha Desde: + Fecha Hasta: + +
Lote Desde: + + Lote Hasta: + +
Estado: + +
Efector Origen: + + Efector Destino: + +
+
+ + +
+
+ + + + + + +
+ +
+
+ +
+ +
+
+ +
diff --git a/WebLab/Derivaciones/LoteList.aspx.cs b/WebLab/Derivaciones/LoteList.aspx.cs new file mode 100644 index 0000000..d66b505 --- /dev/null +++ b/WebLab/Derivaciones/LoteList.aspx.cs @@ -0,0 +1,536 @@ +using Business; +using Business.Data; +using Business.Data.Laboratorio; +using CrystalDecisions.Shared; +using CrystalDecisions.Web; +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Data.SqlClient; +using System.IO; +using System.Linq; +using System.Text; +using System.Web; +using System.Web.UI; +using System.Web.UI.HtmlControls; +using System.Web.UI.WebControls; + +namespace WebLab.Derivaciones +{ + public partial class LoteList : System.Web.UI.Page + { + public Configuracion oC = new Configuracion(); + public Usuario oUser = new Usuario(); + public CrystalReportSource oCr = new CrystalReportSource(); + + protected void Page_PreInit(object sender, EventArgs e) + { + if (Session["idUsuario"] != null) + { + oCr.Report.FileName = ""; + oCr.CacheDuration = 0; + oCr.EnableCaching = false; + oUser = (Usuario)oUser.Get(typeof(Usuario), int.Parse(Session["idUsuario"].ToString())); + oC = (Configuracion)oC.Get(typeof(Configuracion), "IdEfector", oUser.IdEfector); + } + else + Response.Redirect("../FinSesion.aspx", false); + + } + + protected void Page_Load(object sender, EventArgs e) + { + if (Session["idUsuario"] != null) + { + if (!IsPostBack) + { + lblTitulo.Text = "LISTA DE LOTES"; + habilitaOrdenarEfector(); + CargarFiltros(); + } + } + else + Response.Redirect("../FinSesion.aspx", false); + + } + private void habilitaOrdenarEfector() + { + //solo ordeno por efector origen si es subsecretaria + string expresion = ""; + if (oUser.IdEfector.IdEfector == 227) + expresion = "efectorOrigen"; + + gvLista.Columns[2].SortExpression = expresion; + } + protected void Page_Unload(object sender, EventArgs e) + { + if (this.oCr.ReportDocument != null) + { + this.oCr.ReportDocument.Close(); + this.oCr.ReportDocument.Dispose(); + } + } + #region Validaciones + protected void cvValidar_ServerValidate(object source, ServerValidateEventArgs args) + { + if (Session["idUsuario"] != null) + { + DateTime fecha1 = new DateTime(), fecha2 = new DateTime(); + + try + { + fecha1 = DateTime.Parse(txtFechaDesde.Value); + fecha2 = DateTime.Parse(txtFechaHasta.Value); + } + catch + { + args.IsValid = false; + cvValidar.ErrorMessage = "Fechas inválidas"; + } + + if (txtFechaDesde.Value == "") + { + args.IsValid = false; + cvValidar.ErrorMessage = "Fechas de inicio y de fin"; + } + else + { + if (txtFechaHasta.Value == "") + { + args.IsValid = false; + cvValidar.ErrorMessage = "Fechas de inicio y de fin"; + } + else + { + if (fecha1.CompareTo(fecha2) <= 0) + args.IsValid = true; + else + { + cvValidar.ErrorMessage = "Fechas Desde no puede ser mayor a Fecha Hasta"; + args.IsValid = false; + } + } + } + + if (txtLoteDesde.Text != "" && txtLoteHasta.Text != "" && (Convert.ToInt32(txtLoteDesde.Text) > Convert.ToInt32(txtLoteHasta.Text))) + { + cvValidar.ErrorMessage = "Lote Desde no puede ser mayor a Lote Hasta"; + args.IsValid = false; + } + } + else + Response.Redirect("../FinSesion.aspx", false); + + } + + #endregion + + #region Inicializar + private string consultaEfectorDestino(int efectorOrigen = 0) + { + string consulta = @"select distinct E.idEfector, E.nombre + from sys_efector E (nolock) + INNER JOIN LAB_LoteDerivacion l (nolock) on l.idEfectorDestino = E.idEfector + where l.baja=0 "; + + if (efectorOrigen == 0) + return consulta + " order by E.nombre"; + else + return consulta + " and L.idEfectorOrigen= " + efectorOrigen + " ORDER BY E.nombre"; + } + + + private void CargarFiltros() + { + if (Session["idUsuario"] != null) + { + Utility oUtil = new Utility(); + string connReady = ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString; + string msql; + + //Fechas + txtFechaDesde.Value = DateTime.Now.ToShortDateString(); + txtFechaHasta.Value = DateTime.Now.ToShortDateString(); + + //Estados de lotes + msql = "Select idEstado, nombre from LAB_LoteDerivacionEstado where baja = 0"; + oUtil.CargarCombo(ddlEstado, msql, "idEstado", "nombre", connReady); + ddlEstado.Items.Insert(0, new ListItem("--TODOS--", "0")); + + //Efector origen y destino + if (oUser.IdEfector.IdEfector == 227) //SUBSECRETARIA DE SALUD + { //Opción todos solo para nivel de subsecretaria de salud + msql = @"select distinct E.idEfector, E.nombre + from sys_efector E (nolock) + INNER JOIN LAB_LoteDerivacion l (nolock) on l.idEfectorOrigen = E.idEfector + where l.baja=0 + order by E.nombre"; + + oUtil.CargarCombo(ddlEfectorOrigen, msql, "idEfector", "nombre", connReady); + ddlEfectorOrigen.Items.Insert(0, new ListItem("--TODOS--", "0")); + + msql = consultaEfectorDestino(); + oUtil.CargarCombo(ddlEfectorDestino, msql, "idEfector", "nombre", connReady); + ddlEfectorDestino.Items.Insert(0, new ListItem("--TODOS--", "0")); + } + else + { //ORIGEN: Si es efector no subsecretaria de salud solo el efector del usuario logueado. + msql = "select E.idEfector, E.nombre from sys_efector E (nolock) where E.idEfector= " + oUser.IdEfector.IdEfector.ToString(); + oUtil.CargarCombo(ddlEfectorOrigen, msql, "idEfector", "nombre", connReady); + //DESTINO: Si es efector no subsecretaria de salud solo los efectores a los que el efector origen puede derivar + + msql = consultaEfectorDestino(oUser.IdEfector.IdEfector); + + oUtil.CargarCombo(ddlEfectorDestino, msql, "idEfector", "nombre", connReady); + ddlEfectorDestino.Items.Insert(0, new ListItem("--TODOS--", "0")); + } + } + else + Response.Redirect("../FinSesion.aspx", false); + } + private void CargarGrilla() + { + if (Session["idUsuario"] != null) + { + gvLista.DataSource = GenerarGrilla(); + gvLista.DataBind(); + } + else + Response.Redirect("../FinSesion.aspx", false); + } + + private DataTable GenerarGrilla() + { + string str_condicion = " L.baja = 0 "; + + if (txtFechaDesde.Value != "") + { + DateTime fecha1 = DateTime.Parse(txtFechaDesde.Value); + str_condicion += " AND l.fechaRegistro>= '" + fecha1.ToString("yyyyMMdd") + "'"; + } + + if (txtFechaHasta.Value != "") + { + DateTime fecha2 = DateTime.Parse(txtFechaHasta.Value); + fecha2 = fecha2.AddDays(1); + str_condicion += " AND l.fechaRegistro<= '" + fecha2.ToString("yyyyMMdd") + "'"; + } + + if (txtLoteDesde.Text != "") + str_condicion += " AND L.idLoteDerivacion >= " + int.Parse(txtLoteDesde.Text); + if (txtLoteHasta.Text != "") + str_condicion += " AND L.idLoteDerivacion <= " + int.Parse(txtLoteHasta.Text); + + if (ddlEfectorOrigen.SelectedValue != "0") + str_condicion += " AND L.idEfectorOrigen = " + ddlEfectorOrigen.SelectedValue; + + if (ddlEfectorDestino.SelectedValue != "0") + str_condicion += " AND L.idEfectorDestino = " + ddlEfectorDestino.SelectedValue; + + if (ddlEstado.SelectedValue != "0") + str_condicion += " AND L.estado = " + ddlEstado.SelectedValue; + + string str_sql = @"select idLoteDerivacion as numero, fechaRegistro, efOrigen.nombre as efectorOrigen, efOrigen.idEfector as idEfectorOrigen, + efDestino.nombre as efectorDestino, E.nombre AS estado, isnull(U.apellido, 'Automatico') as username + from LAB_LoteDerivacion L (nolock) + INNER JOIN LAB_LoteDerivacionEstado E(nolock) ON E.idEstado = L.estado + INNER JOIN Sys_Efector efOrigen (nolock) ON efOrigen.idEfector = L.idEfectorOrigen + INNER JOIN Sys_Efector efDestino (nolock) ON efDestino.idEfector = L.idEfectorDestino + INNER JOIN Sys_Usuario U (nolock) ON U.idUsuario = L.idUsuarioRegistro + where " + str_condicion; + DataSet Ds = new DataSet(); + SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; + SqlDataAdapter adapter = new SqlDataAdapter(); + adapter.SelectCommand = new SqlCommand(str_sql, conn); + adapter.Fill(Ds); + + CantidadRegistros.Text = Ds.Tables[0].Rows.Count.ToString() + " registros encontrados"; + ViewState["Datos"] = Ds.Tables[0]; + return Ds.Tables[0]; + } + + protected void ddlEfectorOrigen_SelectedIndexChanged(object sender, EventArgs e) + { + ddlEfectorDestino.Items.Clear(); + int efectorOrigen = Convert.ToInt32(ddlEfectorOrigen.SelectedValue); + string msql; + string connReady = ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString; + Utility oUtil = new Utility(); + if (efectorOrigen != 0) + { + msql = consultaEfectorDestino(efectorOrigen); + oUtil.CargarCombo(ddlEfectorDestino, msql, "idEfector", "nombre", connReady); + ddlEfectorDestino.Items.Insert(0, new ListItem("--TODOS--", "0")); + } + else + { + msql = consultaEfectorDestino(); + oUtil.CargarCombo(ddlEfectorDestino, msql, "idEfector", "nombre", connReady); + ddlEfectorDestino.Items.Insert(0, new ListItem("--TODOS--", "0")); + } + + } + #endregion + + #region Buscar + protected void btnBuscar_Click(object sender, EventArgs e) + { + if (Session["idUsuario"] != null) + { + gvLista.DataSource = null; + + if (Page.IsValid) + CargarGrilla(); + } + else + Response.Redirect("../FinSesion.aspx", false); + } + + #endregion + + #region Impresiones + protected void lnkPDFAuditoria_Command(object sender, CommandEventArgs e) + { + if (Session["idUsuario"] != null) + { + int idLote = Convert.ToInt32(((System.Web.UI.WebControls.LinkButton)sender).CommandArgument); + string m_strSQL, m_strCondicion = ""; + + if (!oUser.Administrador) + { + m_strCondicion = " and L.idEfectorDestino = " + oUser.IdEfector.IdEfector.ToString(); + } + + m_strSQL = @" SELECT L.idLoteDerivacion AS numero,isnull(U.apellido,'Automatico') as username, A.fecha AS fecha, A.hora, A.accion, A.analisis, A.valor, A.valorAnterior + FROM LAB_AuditoriaLote AS A with (nolock) + left JOIN Sys_Usuario AS U with (nolock) ON A.idUsuario = U.idUsuario + inner join LAB_LoteDerivacion L with (nolock) on L.idLoteDerivacion= A.idLote + where L.idLoteDerivacion = " + idLote + m_strCondicion + " ORDER BY A.idAuditoriaLote"; + + SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; + SqlDataAdapter adapter = new SqlDataAdapter(); + DataSet Ds1 = new DataSet(); + adapter.SelectCommand = new SqlCommand(m_strSQL, conn); + adapter.Fill(Ds1, "auditoria"); + DataTable data = Ds1.Tables[0]; + + if (data.Rows.Count > 0) + { + ParameterDiscreteValue encabezado1 = new ParameterDiscreteValue(); + ParameterDiscreteValue encabezado2 = new ParameterDiscreteValue(); + + if (oUser.IdEfector.IdEfector == 227) + { + //tengo que cargar la configuracion del efector Origen + int efectorOrigen = Convert.ToInt32(((LinkButton)sender).CommandName); + Efector ef = new Efector(); + ef = (Efector) ef.Get(typeof(Efector), "IdEfector", efectorOrigen); + oC = new Configuracion(); + oC = (Configuracion)oC.Get(typeof(Configuracion), "IdEfector", ef); + } + + + if (oC != null) + { + encabezado1.Value = oC.EncabezadoLinea1; + encabezado2.Value = oC.EncabezadoLinea2; + } + else + { + encabezado1.Value = oUser.IdEfector.Nombre; + encabezado2.Value = oUser.IdEfector.Domicilio; + } + ParameterDiscreteValue encabezado3 = new ParameterDiscreteValue + { + Value = "Auditoria de Lote" + }; + + oCr.Report.FileName = "../Informes/AuditoriaLote.rpt"; + oCr.ReportDocument.SetDataSource(data); + oCr.ReportDocument.ParameterFields[0].CurrentValues.Add(encabezado1); + oCr.ReportDocument.ParameterFields[1].CurrentValues.Add(encabezado2); + oCr.ReportDocument.ParameterFields[2].CurrentValues.Add(encabezado3); + oCr.DataBind(); + + Utility oUtil = new Utility(); + string nombrePDF = oUtil.CompletarNombrePDF("Auditoria_Lote_" + idLote); + oCr.ReportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, true, nombrePDF); + } + else + { + string popupScript = ""; + ScriptManager.RegisterStartupScript(this, GetType(), "PopupScript", popupScript, true); + } + } + else + Response.Redirect("../FinSesion.aspx", false); + } + + protected void lnkPDFImprimir_Command(object sender, CommandEventArgs e) + { + if (Session["idUsuario"] != null) + { + int idLote = Convert.ToInt32((((System.Web.UI.WebControls.LinkButton)sender).CommandArgument)); + string m_strSQL = Business.Data.Laboratorio.LoteDerivacion.derivacionPDF(idLote); + + DataSet Ds = new DataSet(); + SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; + SqlDataAdapter adapter = new SqlDataAdapter(); + adapter.SelectCommand = new SqlCommand(m_strSQL, conn); + adapter.Fill(Ds); + + if (Ds.Tables[0].Rows.Count > 0) + { + string informe = "../Informes/DerivacionLote.rpt"; + + if (oUser.IdEfector.IdEfector == 227) + { + //tengo que cargar la configuracion del efector Origen + int efectorOrigen = Convert.ToInt32(((LinkButton)sender).CommandName); + Efector ef = new Efector(); + ef = (Efector)ef.Get(typeof(Efector), "IdEfector", efectorOrigen); + oC = new Configuracion(); + oC = (Configuracion)oC.Get(typeof(Configuracion), "IdEfector", ef); + } + + ParameterDiscreteValue encabezado1 = new ParameterDiscreteValue(); + encabezado1.Value = oC.EncabezadoLinea1; + ParameterDiscreteValue encabezado2 = new ParameterDiscreteValue(); + encabezado2.Value = oC.EncabezadoLinea2; + ParameterDiscreteValue encabezado3 = new ParameterDiscreteValue(); + encabezado3.Value = oC.EncabezadoLinea3; + + oCr.Report.FileName = informe; + oCr.ReportDocument.SetDataSource(Ds.Tables[0]); + oCr.ReportDocument.ParameterFields[0].CurrentValues.Add(encabezado1); + oCr.ReportDocument.ParameterFields[1].CurrentValues.Add(encabezado2); + oCr.ReportDocument.ParameterFields[2].CurrentValues.Add(encabezado3); + oCr.DataBind(); + + Utility oUtil = new Utility(); + string nombrePDF = oUtil.CompletarNombrePDF("Derivaciones_" + idLote); + oCr.ReportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, true, nombrePDF); + } + else + Response.Redirect("../FinSesion.aspx", false); + } + } + + protected void lnkExcel_Click(object sender, EventArgs e) + { + if (Session["idUsuario"] != null) + { + if (Page.IsValid) + { + if (gvLista.Rows.Count != 0) + { + DataTable tabla = ViewState["Datos"] as DataTable; + + if (tabla.Rows.Count > 0) + { + tabla.Columns.Remove("idEfectorOrigen"); + tabla.Columns["numero"].ColumnName = "Nro."; + tabla.Columns["fechaRegistro"].ColumnName = "Fecha Generación"; + tabla.Columns["efectorOrigen"].ColumnName = "Efector Origen"; + tabla.Columns["efectorDestino"].ColumnName = "Efector Destino"; + tabla.Columns["estado"].ColumnName = "Estado"; + tabla.Columns["username"].ColumnName = "Usuario Generación"; + + StringBuilder sb = new StringBuilder(); + StringWriter sw = new StringWriter(sb); + HtmlTextWriter htw = new HtmlTextWriter(sw); + HtmlForm form = new HtmlForm(); + GridView dg = new GridView(); + dg.EnableViewState = false; + dg.DataSource = tabla; + dg.DataBind(); + Page pagina = new Page(); + pagina.EnableEventValidation = false; + pagina.DesignerInitialize(); + pagina.Controls.Add(form); + form.Controls.Add(dg); + pagina.RenderControl(htw); + Utility oUtil = new Utility(); + string nombrXLS = oUtil.CompletarNombrePDF("Lotes"); + Response.Clear(); + Response.Buffer = true; + Response.ContentType = "application/vnd.ms-excel"; + Response.AddHeader("Content-Disposition", "attachment;filename=" + nombrXLS + ".xls"); + Response.Charset = "UTF-8"; + Response.ContentEncoding = Encoding.Default; + Response.Write(sb.ToString()); + Response.End(); + } + else + { + ScriptManager.RegisterStartupScript(this, GetType(), "PopupScript3", "alert('No hay datos para exportar.');", true); + } + } + else + { + ScriptManager.RegisterStartupScript(this, GetType(), "PopupScript2", "alert('No hay datos para exportar.');", true); + } + + } + } + else + Response.Redirect("../FinSesion.aspx", false); + } + + #endregion + + #region gvLista + protected void gvLista_PageIndexChanging(object sender, GridViewPageEventArgs e) + { + if (Session["idUsuario"] != null) + { + gvLista.PageIndex = e.NewPageIndex; + int currentPage = gvLista.PageIndex + 1; + CurrentPageLabel.Text = "Página " + currentPage.ToString() + " de " + gvLista.PageCount.ToString(); + CargarGrilla(); + } + else + Response.Redirect("../FinSesion.aspx", false); + } + + protected void gvLista_Sorting(object sender, GridViewSortEventArgs e) + { + if (Session["idUsuario"] != null) + { + DataTable dt = ViewState["Datos"] as DataTable; + string sortDirection = GetSortDirection(e.SortExpression); + dt.DefaultView.Sort = e.SortExpression + " " + sortDirection; + gvLista.DataSource = dt; + gvLista.DataBind(); + } + else + Response.Redirect("../FinSesion.aspx", false); + } + private string GetSortDirection(string column) + { + string sortDirection = "ASC"; + string sortExpression = ViewState["SortExpression"] as string; + + if (sortExpression != null) + { + if (sortExpression == column) + { + string lastDirection = ViewState["SortDirection"] as string; + if ((lastDirection != null) && (lastDirection == "ASC")) + sortDirection = "DESC"; + } + } + + ViewState["SortDirection"] = sortDirection; + ViewState["SortExpression"] = column; + return sortDirection; + } + + + + #endregion + + + } +} \ No newline at end of file diff --git a/WebLab/Derivaciones/LoteList.aspx.designer.cs b/WebLab/Derivaciones/LoteList.aspx.designer.cs new file mode 100644 index 0000000..409c7a8 --- /dev/null +++ b/WebLab/Derivaciones/LoteList.aspx.designer.cs @@ -0,0 +1,179 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WebLab.Derivaciones +{ + + + public partial class LoteList + { + + /// + /// pnlTitulo control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl pnlTitulo; + + /// + /// lblTitulo control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblTitulo; + + /// + /// txtFechaDesde control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlInputText txtFechaDesde; + + /// + /// txtFechaHasta control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlInputText txtFechaHasta; + + /// + /// txtLoteDesde control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtLoteDesde; + + /// + /// txtLoteHasta control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtLoteHasta; + + /// + /// ddlEstado control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList ddlEstado; + + /// + /// ddlEfectorOrigen control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList ddlEfectorOrigen; + + /// + /// ddlEfectorDestino control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DropDownList ddlEfectorDestino; + + /// + /// pnlControl control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel pnlControl; + + /// + /// cvValidar control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CustomValidator cvValidar; + + /// + /// pnlLista control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel pnlLista; + + /// + /// btnBuscar control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnBuscar; + + /// + /// CantidadRegistros control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label CantidadRegistros; + + /// + /// CurrentPageLabel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label CurrentPageLabel; + + /// + /// gvLista control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.GridView gvLista; + + /// + /// pnlImpresion control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel pnlImpresion; + + /// + /// lnkExcel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton lnkExcel; + } +} diff --git a/WebLab/Pacientes/js/ValidaFecha.js b/WebLab/Pacientes/js/ValidaFecha.js index b22db71..283fe1b 100644 --- a/WebLab/Pacientes/js/ValidaFecha.js +++ b/WebLab/Pacientes/js/ValidaFecha.js @@ -169,3 +169,7 @@ function IsNumeric(sText) return IsNumber; } +// busca todas las ocurrencias de caracteres no numéricos y los borra, deja solo numeros +function soloNumeros(input) { + input.value = input.value.replace(/\D/g, ''); +} diff --git a/WebLab/WebLab.csproj b/WebLab/WebLab.csproj index 3df8036..1282e92 100644 --- a/WebLab/WebLab.csproj +++ b/WebLab/WebLab.csproj @@ -2088,6 +2088,7 @@ + @@ -4618,6 +4619,13 @@ ProtocoloList.aspx + + LoteList.aspx + ASPXCodeBehind + + + LoteList.aspx + NuevoLote.aspx ASPXCodeBehind From 3409b5a35da51c0cf4e015fabacedab45483d197 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Fri, 17 Oct 2025 15:53:33 -0300 Subject: [PATCH 13/61] fix: no derivar lotes sin determinaciones --- WebLab/Derivaciones/InformeLote.aspx.cs | 210 ++++++++++++++---------- 1 file changed, 126 insertions(+), 84 deletions(-) diff --git a/WebLab/Derivaciones/InformeLote.aspx.cs b/WebLab/Derivaciones/InformeLote.aspx.cs index eacf927..85ca259 100644 --- a/WebLab/Derivaciones/InformeLote.aspx.cs +++ b/WebLab/Derivaciones/InformeLote.aspx.cs @@ -311,17 +311,26 @@ protected void btnGuardar_Click(object sender, EventArgs e) { if (Session["idUsuario"] != null) { - if (Guardar()) + int idLote = verificarDeterminaciones(); + if (idLote == 0) //No trajo ningun id Lote con error { - ScriptManager.RegisterStartupScript(this, GetType(), "mensajeOk", "alert('✅ Se guardaron los cambios con exito');", true); + if (Guardar()) + { + ScriptManager.RegisterStartupScript(this, GetType(), "mensajeOk", "alert('✅ Se guardaron los cambios con exito');", true); + } + else + { + ScriptManager.RegisterStartupScript(this, GetType(), "mensajeOk", "alert('❌ ERROR: No se pudo guardar los datos.\\n Revisá los campos e intentá nuevamente');", true); + + } + CargarGrilla(); + limpiarForm(); } else - { - ScriptManager.RegisterStartupScript(this, GetType(), "mensajeOk", "alert('❌ ERROR: No se pudo guardar los datos\nRevisá los campos e intentá nuevamente');", true); - + { //Es el idLote con error + ScriptManager.RegisterStartupScript(this, GetType(), "mensajeOk", "alert('❌ ERROR: El lote Nro:"+idLote+" no se puede derivar, no tiene determinaciones asociadas.\\nDescarte el lote por falta de determinaciones o modifique el lote agregando determinaciones');", true); } - CargarGrilla(); - limpiarForm(); + } else { @@ -330,97 +339,130 @@ protected void btnGuardar_Click(object sender, EventArgs e) } + private int verificarDeterminaciones() + { + int tieneDeterminaciones = 0; + //Verificamos que en lote no se hayan descartados todas sus determinaciones asi no se Deriva vacio + if (Convert.ToInt32(ddlEstados.SelectedValue) == 2) + { + foreach (GridViewRow row in gvLista.Rows) + { + CheckBox a = ((CheckBox)(row.Cells[0].FindControl("CheckBox1"))); + if (a.Checked) + { + int idLote = Convert.ToInt32(row.Cells[2].Text); + string consultaSql = @"select top 1 1 from LAB_LoteDerivacion L with (nolock) + inner join LAB_Derivacion D with (nolock) ON D.idLote = L.idLoteDerivacion + where idLote =" + idLote; + DataTable dt = GetData(consultaSql); + if(dt.Rows.Count == 0) + return idLote; + + } + + } + + } + + return tieneDeterminaciones; + } private bool Guardar() { bool seGuardoEnBd = false; - - foreach (GridViewRow row in gvLista.Rows) + if(verificarDeterminaciones() == 0) //No trajo ningun id Lote con error { - CheckBox a = ((CheckBox)(row.Cells[0].FindControl("CheckBox1"))); - if (a.Checked) + foreach (GridViewRow row in gvLista.Rows) { - - int idLote = Convert.ToInt32(row.Cells[2].Text); - int idUsuario = oUser.IdUsuario; - int estadoLote = Convert.ToInt32(ddlEstados.SelectedValue); - string resultadoDerivacion = estadoLote == 2 ? "Derivado: " + row.Cells[3].Text : "No Derivado. "; - //string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? rb_transportista.SelectedValue : ""); //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) - string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? ddlTransporte.SelectedValue : ""); - LoteDerivacion lote = new LoteDerivacion(); - lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); - - //Se cambia el estado del lote LAB_LoteDerivacion - lote.Estado = estadoLote; - lote.Observacion = observacion; - lote.IdUsuarioEnvio = idUsuario; - //para Estado "Derivado" poner la fecha actual y para estado "Cancelado" no poner Fecha - string fecha_hora = txtFecha.Text + " " + txtHora.Text; - lote.FechaEnvio = (estadoLote == 2) ? Convert.ToDateTime(fecha_hora) : DateTime.Parse("01/01/1900"); - lote.Save(); - - ISession m_session = NHibernateHttpModule.CurrentSession; - ICriteria crit = m_session.CreateCriteria(typeof(Business.Data.Laboratorio.Derivacion)); - crit.Add(Expression.Eq("Idlote", lote.IdLoteDerivacion)); - IList lista = crit.List(); - if (lista.Count > 0) + CheckBox a = ((CheckBox)(row.Cells[0].FindControl("CheckBox1"))); + if (a.Checked) { - foreach (Business.Data.Laboratorio.Derivacion oDeriva in lista) + int idLote = Convert.ToInt32(row.Cells[2].Text); + int idUsuario = oUser.IdUsuario; + int estadoLote = Convert.ToInt32(ddlEstados.SelectedValue); + string resultadoDerivacion = estadoLote == 2 ? "Derivado: " + row.Cells[3].Text : "No Derivado. "; + //string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? rb_transportista.SelectedValue : ""); //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) + string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? ddlTransporte.SelectedValue : ""); + LoteDerivacion lote = new LoteDerivacion(); + lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); + + //Se cambia el estado del lote LAB_LoteDerivacion + lote.Estado = estadoLote; + lote.Observacion = observacion; + lote.IdUsuarioEnvio = idUsuario; + //para Estado "Derivado" poner la fecha actual y para estado "Cancelado" no poner Fecha + string fecha_hora = txtFecha.Text + " " + txtHora.Text; + lote.FechaEnvio = (estadoLote == 2) ? Convert.ToDateTime(fecha_hora) : DateTime.Parse("01/01/1900"); + lote.Save(); + + ISession m_session = NHibernateHttpModule.CurrentSession; + ICriteria crit = m_session.CreateCriteria(typeof(Business.Data.Laboratorio.Derivacion)); + crit.Add(Expression.Eq("Idlote", lote.IdLoteDerivacion)); + IList lista = crit.List(); + if (lista.Count > 0) { - #region Derivacion - //Cambia el estado de las derivaciones LAB_Derivacion - - /* - Estado del lote LAB_LoteDerivacionEstado (representa el estado del lote, no de la derivacion) - 1 : Creado - 2 : Derivado - 3 : Cancelado - - Estado de la derivacion LAB_DerivacionEstado - 0 : Pendiente de derivar - 1 : Enviado - 2 : No Enviado - 3 : Recibido - 4 : Pendiente para enviar - */ - oDeriva.Estado = (estadoLote == 2) ? 1 : 2; - oDeriva.Save(); - #endregion - - - #region cambio_codificacion_a_derivacion - //Cambia el resultado de LAB_DetalleProtocolo - DetalleProtocolo oDet = oDeriva.IdDetalleProtocolo; - oDet.ResultadoCar = resultadoDerivacion + " "+observacion; - oDet.ConResultado = true; - oDet.IdUsuarioResultado = idUsuario; - oDet.FechaResultado = Convert.ToDateTime(fecha_hora); - oDet.Save(); - //Inserta auditoria del detalle del protocolo - oDet.GrabarAuditoriaDetalleProtocolo("Graba", idUsuario); - #endregion + + foreach (Business.Data.Laboratorio.Derivacion oDeriva in lista) + { + #region Derivacion + //Cambia el estado de las derivaciones LAB_Derivacion + + /* + Estado del lote LAB_LoteDerivacionEstado (representa el estado del lote, no de la derivacion) + 1 : Creado + 2 : Derivado + 3 : Cancelado + + Estado de la derivacion LAB_DerivacionEstado + 0 : Pendiente de derivar + 1 : Enviado + 2 : No Enviado + 3 : Recibido + 4 : Pendiente para enviar + */ + oDeriva.Estado = (estadoLote == 2) ? 1 : 2; + oDeriva.Save(); + #endregion + + + #region cambio_codificacion_a_derivacion + //Cambia el resultado de LAB_DetalleProtocolo + DetalleProtocolo oDet = oDeriva.IdDetalleProtocolo; + oDet.ResultadoCar = resultadoDerivacion + " " + observacion; + oDet.ConResultado = true; + oDet.IdUsuarioResultado = idUsuario; + oDet.FechaResultado = Convert.ToDateTime(fecha_hora); + oDet.Save(); + //Inserta auditoria del detalle del protocolo + oDet.GrabarAuditoriaDetalleProtocolo("Graba", idUsuario); + #endregion + } } - } - - - //Inserta auditoria del lote - lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), idUsuario); // LAB-54 Sacar la palabra "Estado: xxxxx" - lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Observacion", txtObservacion.Text); - - if (estadoLote == 2) //Si deriva indica con que transportista fue, y que fecha y hora se retiro - { // lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", rb_transportista.SelectedValue); //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) - lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", ddlTransporte.SelectedValue); - DateTime f = new DateTime(Convert.ToInt16(txtFecha.Text.Substring(0, 4)), Convert.ToInt16(txtFecha.Text.Substring(5, 2)), Convert.ToInt16(txtFecha.Text.Substring(8, 2))); - lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Fecha", f.ToString("dd/MM/yyyy")); //que las fechas tengan el mismo formato - lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Hora", txtHora.Text); + + + //Inserta auditoria del lote + lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), idUsuario); // LAB-54 Sacar la palabra "Estado: xxxxx" + lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Observacion", txtObservacion.Text); + + if (estadoLote == 2) //Si deriva indica con que transportista fue, y que fecha y hora se retiro + { // lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", rb_transportista.SelectedValue); //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) + lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", ddlTransporte.SelectedValue); + DateTime f = new DateTime(Convert.ToInt16(txtFecha.Text.Substring(0, 4)), Convert.ToInt16(txtFecha.Text.Substring(5, 2)), Convert.ToInt16(txtFecha.Text.Substring(8, 2))); + lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Fecha", f.ToString("dd/MM/yyyy")); //que las fechas tengan el mismo formato + lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Hora", txtHora.Text); + } + + + seGuardoEnBd = true; } - - - seGuardoEnBd = true; } } + else + { + + } return seGuardoEnBd; } From 35ba54af298b077cd2acf6758b670540d1356fea Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Tue, 14 Oct 2025 16:02:19 -0300 Subject: [PATCH 14/61] fix: Requerimiento 1: Cambiar a nomenclatura CamelCase --- WebLab/Derivaciones/Derivados2.aspx | 2 +- WebLab/Derivaciones/Derivados2.aspx.cs | 2 +- .../Derivaciones/Derivados2.aspx.designer.cs | 4 +- WebLab/Derivaciones/GestionarLote.aspx | 6 +-- WebLab/Derivaciones/GestionarLote.aspx.cs | 6 +-- .../GestionarLote.aspx.designer.cs | 12 +++--- WebLab/Derivaciones/InformeList3.aspx | 26 ++++++------ WebLab/Derivaciones/InformeList3.aspx.cs | 18 ++++----- .../InformeList3.aspx.designer.cs | 20 +++++----- WebLab/Derivaciones/InformeLote.aspx | 40 +++++++++---------- WebLab/Derivaciones/InformeLote.aspx.cs | 26 ++++++------ .../Derivaciones/InformeLote.aspx.designer.cs | 24 +++++------ .../DerivacionMultiEfectorLote.aspx | 14 +++---- .../DerivacionMultiEfectorLote.aspx.cs | 26 ++++++------ ...erivacionMultiEfectorLote.aspx.designer.cs | 28 ++++++------- WebLab/Protocolos/DerivacionRecibirLote.aspx | 24 +++++------ .../Protocolos/DerivacionRecibirLote.aspx.cs | 24 +++++------ .../DerivacionRecibirLote.aspx.designer.cs | 40 +++++++++---------- 18 files changed, 171 insertions(+), 171 deletions(-) diff --git a/WebLab/Derivaciones/Derivados2.aspx b/WebLab/Derivaciones/Derivados2.aspx index 0670fda..e34edf8 100644 --- a/WebLab/Derivaciones/Derivados2.aspx +++ b/WebLab/Derivaciones/Derivados2.aspx @@ -146,7 +146,7 @@

- +
- - + +

- +
Marcar como: - Motivo Cancelación: - + - + Observación: - +
- +
Seleccionar: Todas  Ninguna diff --git a/WebLab/Derivaciones/InformeList3.aspx.cs b/WebLab/Derivaciones/InformeList3.aspx.cs index c7ad438..9e3c43a 100644 --- a/WebLab/Derivaciones/InformeList3.aspx.cs +++ b/WebLab/Derivaciones/InformeList3.aspx.cs @@ -104,8 +104,8 @@ private void CargarListas() oUtil = new Utility(); //Motivos de cancelacion LAB-75 m_ssql = "SELECT idMotivo, descripcion FROM LAB_DerivacionMotivoCancelacion WHERE baja = 0"; - oUtil.CargarCombo(ddl_motivoCancelacion, m_ssql, "idMotivo", "descripcion", connReady); - ddl_motivoCancelacion.Items.Insert(0, new ListItem("--Seleccione--", "0")); + oUtil.CargarCombo(ddlMotivoCancelacion, m_ssql, "idMotivo", "descripcion", connReady); + ddlMotivoCancelacion.Items.Insert(0, new ListItem("--Seleccione--", "0")); @@ -116,7 +116,7 @@ private void habilitarImpresion() { gvLista.Columns[11].Visible = true; lnkPDF.Visible = true; - ddl_motivoCancelacion.Enabled = false; + ddlMotivoCancelacion.Enabled = false; } else { @@ -126,15 +126,15 @@ private void habilitarImpresion() } private void limpiarForm() { - txt_observacion.Text = string.Empty; - ddl_motivoCancelacion.SelectedIndex = 0; + txtObservacion.Text = string.Empty; + ddlMotivoCancelacion.SelectedIndex = 0; ddlEstado.SelectedIndex = 0; } private void activarControles(bool valor) { btnGuardar.Enabled = valor; - txt_observacion.Enabled = valor; + txtObservacion.Enabled = valor; lnkMarcar.Enabled = valor; lnkDesMarcar.Enabled = valor; //ddl_motivoCancelacion.Enabled = valor; @@ -384,12 +384,12 @@ private void ActualizarDetalleProtocolo(GridViewRow row, int idLote = 0, int de { int estadoSeleccionado; string resultadoDerivacion; - string observacion = txt_observacion.Text; + string observacion = txtObservacion.Text; int idUsuarioRegistro = oUser.IdUsuario; //Convert.ToInt32(Session["idUsuario"]); int idUsuarioResultado = oUser.IdUsuario; DateTime fechaDeHoy = DateTime.Now; DateTime fechaDeHoyDetalle = DateTime.Now; - int MotivoCancelacion = int.Parse(ddl_motivoCancelacion.SelectedItem.Value); + int MotivoCancelacion = int.Parse(ddlMotivoCancelacion.SelectedItem.Value); bool conResultado = true; @@ -397,7 +397,7 @@ private void ActualizarDetalleProtocolo(GridViewRow row, int idLote = 0, int de if (desasociaLote == 0) { estadoSeleccionado = Convert.ToInt32(ddlEstado.SelectedValue);//Estado seleccionado => 2 No Enviado - 4 Pendiente para enviar - resultadoDerivacion = (estadoSeleccionado == 2) ? "No Derivado: " + ddl_motivoCancelacion.SelectedItem.Text : "Pendiente para enviar "; + resultadoDerivacion = (estadoSeleccionado == 2) ? "No Derivado: " + ddlMotivoCancelacion.SelectedItem.Text : "Pendiente para enviar "; } else { diff --git a/WebLab/Derivaciones/InformeList3.aspx.designer.cs b/WebLab/Derivaciones/InformeList3.aspx.designer.cs index 2f6e719..4c71d42 100644 --- a/WebLab/Derivaciones/InformeList3.aspx.designer.cs +++ b/WebLab/Derivaciones/InformeList3.aspx.designer.cs @@ -51,40 +51,40 @@ public partial class InformeList3 protected global::System.Web.UI.WebControls.DropDownList ddlEstado; /// - /// rv_estado control. + /// rvEstado control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RangeValidator rv_estado; + protected global::System.Web.UI.WebControls.RangeValidator rvEstado; /// - /// ddl_motivoCancelacion control. + /// ddlMotivoCancelacion control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.DropDownList ddl_motivoCancelacion; + protected global::System.Web.UI.WebControls.DropDownList ddlMotivoCancelacion; /// - /// lbl_ErrorMotivo control. + /// lblErrorMotivo control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_ErrorMotivo; + protected global::System.Web.UI.WebControls.Label lblErrorMotivo; /// - /// txt_observacion control. + /// txtObservacion control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.TextBox txt_observacion; + protected global::System.Web.UI.WebControls.TextBox txtObservacion; /// /// btnGuardar control. @@ -105,13 +105,13 @@ public partial class InformeList3 protected global::System.Web.UI.WebControls.LinkButton lnkPDF; /// - /// lbl_errorLista control. + /// lblErrorLista control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_errorLista; + protected global::System.Web.UI.WebControls.Label lblErrorLista; /// /// lnkMarcar control. diff --git a/WebLab/Derivaciones/InformeLote.aspx b/WebLab/Derivaciones/InformeLote.aspx index cfb5191..314b28b 100644 --- a/WebLab/Derivaciones/InformeLote.aspx +++ b/WebLab/Derivaciones/InformeLote.aspx @@ -7,10 +7,10 @@ var validatorEstado = document.getElementById('<%= Range1.ClientID %>'); var txtObservacion = document.getElementById('<%= txtObservacion.ClientID %>'); var estado = document.getElementById('<%= ddlEstados.ClientID %>'); - var label = document.getElementById('<%= lbl_ErrorMotivo.ClientID %>'); - var labelGrilla = document.getElementById('<%= lbl_errorLista.ClientID %>'); - var lista_transporte = document.getElementById('<%= ddl_Transporte.ClientID %>'); - var labelErrorTransporte = document.getElementById('<%= lbl_ErrorTransporte.ClientID %>'); + var label = document.getElementById('<%= lblErrorMotivo.ClientID %>'); + var labelGrilla = document.getElementById('<%= lblErrorLista.ClientID %>'); + var lista_transporte = document.getElementById('<%= ddlTransporte.ClientID %>'); + var labelErrorTransporte = document.getElementById('<%= lblErrorTransporte.ClientID %>'); //Limpio los labels de error label.className = 'hidden'; @@ -62,7 +62,7 @@ return true; // Detiene la validacin con al menos un check } } - var label = document.getElementById('<%= lbl_errorLista.ClientID %>'); + var label = document.getElementById('<%= lblErrorLista.ClientID %>'); label.className = 'exposed'; return todoOk; } @@ -71,8 +71,8 @@ //Habilita la seleccion del listado desplegable donde estan los transportes var ddl = document.getElementById('<%= ddlEstados.ClientID %>'); - var labelErrorTransporte = document.getElementById('<%= lbl_ErrorTransporte.ClientID%>'); - var lista_transporte = document.getElementById('<%= ddl_Transporte.ClientID%>'); + var labelErrorTransporte = document.getElementById('<%= lblErrorTransporte.ClientID%>'); + var lista_transporte = document.getElementById('<%= ddlTransporte.ClientID%>'); var estado = ddl.value; //console.log("--"); //console.log(lista_transporte); @@ -88,7 +88,7 @@ function reseteaLabelErrorLote() { //Esconde el label que tiene el error - var labelGrilla = document.getElementById('<%= lbl_errorLista.ClientID %>'); + var labelGrilla = document.getElementById('<%= lblErrorLista.ClientID %>'); labelGrilla.className = 'hidden'; } @@ -104,8 +104,8 @@ function verificaSeleccion() { //Esta funcion revisa que se haya selecionado un transporte - var lista_transporte = document.getElementById('<%= ddl_Transporte.ClientID %>'); - var labelErrorTransporte = document.getElementById('<%= lbl_ErrorTransporte.ClientID %>'); + var lista_transporte = document.getElementById('<%= ddlTransporte.ClientID %>'); + var labelErrorTransporte = document.getElementById('<%= lblErrorTransporte.ClientID %>'); //console.log("transporte"); //console.log(lista_transporte.value); if (lista_transporte.selectedIndex == 0) { @@ -116,8 +116,8 @@ } document.addEventListener("DOMContentLoaded", function () { - var txtFecha = document.getElementById('<%= txt_Fecha.ClientID %>'); - var txtHora = document.getElementById('<%= txt_Hora.ClientID %>'); + var txtFecha = document.getElementById('<%= txtFecha.ClientID %>'); + var txtHora = document.getElementById('<%= txtHora.ClientID %>'); function cambioFechaHorario() { var fechaSeleccionada = new Date(txtFecha.value); @@ -187,20 +187,20 @@
Retira transporte: + <%-- --%>
Observaciones: - + @@ -209,15 +209,15 @@ Fecha y Hora de retiro: - + - *Error en Fecha + *Error en Fecha - + - *Error en Hora + *Error en Hora
- +
Seleccionar: Todas  diff --git a/WebLab/Derivaciones/InformeLote.aspx.cs b/WebLab/Derivaciones/InformeLote.aspx.cs index c0daa70..eacf927 100644 --- a/WebLab/Derivaciones/InformeLote.aspx.cs +++ b/WebLab/Derivaciones/InformeLote.aspx.cs @@ -136,11 +136,11 @@ private void activarControles(bool valor) txtObservacion.Enabled = valor; ddlEstados.Enabled = valor; //rb_transportista.Enabled = true; //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) - ddl_Transporte.Enabled = valor; + ddlTransporte.Enabled = valor; lnkMarcar.Enabled = valor; lnkDesMarcar.Enabled = valor; - txt_Fecha.Enabled = valor; - txt_Hora.Enabled = valor; + txtFecha.Enabled = valor; + txtHora.Enabled = valor; } private void CargarControles() @@ -162,10 +162,10 @@ private void CargarEstados() private void CargarTransportistas() { - ddl_Transporte.Items.Add("-- SELECCIONE --"); + ddlTransporte.Items.Add("-- SELECCIONE --"); //Vanesa: por ahora esta hardcodeado los transportitas, hacer mejora que lea de la base de datos - ddl_Transporte.Items.Add("Público"); - ddl_Transporte.Items.Add("Privado"); + ddlTransporte.Items.Add("Público"); + ddlTransporte.Items.Add("Privado"); //Utility oUtil = new Utility(); @@ -176,8 +176,8 @@ private void CargarTransportistas() private void CargarFechaHoraActual() { DateTime miFecha = DateTime.UtcNow.AddHours(-3); //Hora estándar de Argentina (UTC-03:00) - txt_Fecha.Text = miFecha.Date.ToString("yyyy-MM-dd"); - txt_Hora.Text = miFecha.ToString("HH:mm"); + txtFecha.Text = miFecha.Date.ToString("yyyy-MM-dd"); + txtHora.Text = miFecha.ToString("HH:mm"); //Date1.Text = miFecha.Date.ToString("yyyy-MM-dd"); //Time1.Text = miFecha.ToString("HH:mm"); } @@ -346,7 +346,7 @@ private bool Guardar() int estadoLote = Convert.ToInt32(ddlEstados.SelectedValue); string resultadoDerivacion = estadoLote == 2 ? "Derivado: " + row.Cells[3].Text : "No Derivado. "; //string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? rb_transportista.SelectedValue : ""); //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) - string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? ddl_Transporte.SelectedValue : ""); + string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? ddlTransporte.SelectedValue : ""); LoteDerivacion lote = new LoteDerivacion(); lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); @@ -355,7 +355,7 @@ private bool Guardar() lote.Observacion = observacion; lote.IdUsuarioEnvio = idUsuario; //para Estado "Derivado" poner la fecha actual y para estado "Cancelado" no poner Fecha - string fecha_hora = txt_Fecha.Text + " " + txt_Hora.Text; + string fecha_hora = txtFecha.Text + " " + txtHora.Text; lote.FechaEnvio = (estadoLote == 2) ? Convert.ToDateTime(fecha_hora) : DateTime.Parse("01/01/1900"); lote.Save(); @@ -411,10 +411,10 @@ Estado de la derivacion LAB_DerivacionEstado if (estadoLote == 2) //Si deriva indica con que transportista fue, y que fecha y hora se retiro { // lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", rb_transportista.SelectedValue); //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) - lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", ddl_Transporte.SelectedValue); - DateTime f = new DateTime(Convert.ToInt16(txt_Fecha.Text.Substring(0, 4)), Convert.ToInt16(txt_Fecha.Text.Substring(5, 2)), Convert.ToInt16(txt_Fecha.Text.Substring(8, 2))); + lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", ddlTransporte.SelectedValue); + DateTime f = new DateTime(Convert.ToInt16(txtFecha.Text.Substring(0, 4)), Convert.ToInt16(txtFecha.Text.Substring(5, 2)), Convert.ToInt16(txtFecha.Text.Substring(8, 2))); lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Fecha", f.ToString("dd/MM/yyyy")); //que las fechas tengan el mismo formato - lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Hora", txt_Hora.Text); + lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Hora", txtHora.Text); } diff --git a/WebLab/Derivaciones/InformeLote.aspx.designer.cs b/WebLab/Derivaciones/InformeLote.aspx.designer.cs index a81c429..59d5969 100644 --- a/WebLab/Derivaciones/InformeLote.aspx.designer.cs +++ b/WebLab/Derivaciones/InformeLote.aspx.designer.cs @@ -42,22 +42,22 @@ public partial class InformeLote protected global::System.Web.UI.WebControls.RangeValidator Range1; /// - /// ddl_Transporte control. + /// ddlTransporte control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.DropDownList ddl_Transporte; + protected global::System.Web.UI.WebControls.DropDownList ddlTransporte; /// - /// lbl_ErrorTransporte control. + /// lblErrorTransporte control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_ErrorTransporte; + protected global::System.Web.UI.WebControls.Label lblErrorTransporte; /// /// txtObservacion control. @@ -69,22 +69,22 @@ public partial class InformeLote protected global::System.Web.UI.WebControls.TextBox txtObservacion; /// - /// lbl_ErrorMotivo control. + /// lblErrorMotivo control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_ErrorMotivo; + protected global::System.Web.UI.WebControls.Label lblErrorMotivo; /// - /// txt_Fecha control. + /// txtFecha control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.TextBox txt_Fecha; + protected global::System.Web.UI.WebControls.TextBox txtFecha; /// /// RequiredFieldValidator1 control. @@ -96,13 +96,13 @@ public partial class InformeLote protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1; /// - /// txt_Hora control. + /// txtHora control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.TextBox txt_Hora; + protected global::System.Web.UI.WebControls.TextBox txtHora; /// /// RequiredFieldValidator2 control. @@ -123,13 +123,13 @@ public partial class InformeLote protected global::System.Web.UI.WebControls.Button btnGuardar; /// - /// lbl_errorLista control. + /// lblErrorLista control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_errorLista; + protected global::System.Web.UI.WebControls.Label lblErrorLista; /// /// lnkMarcar control. diff --git a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx index 853354f..1ee7de9 100644 --- a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx +++ b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx @@ -49,7 +49,7 @@
-
+
@@ -69,20 +69,20 @@
-
- +
+
Efector origen: - +
Estado Lote: -
-
- +
- - + +
Transportista: - + <%----%>
Fecha y Hora: <%----%> - + *Error en Fecha - *Error en Hora - + *Error en Hora +
Observaciones: - +
diff --git a/WebLab/Informes/Auditoria.aspx.cs b/WebLab/Informes/Auditoria.aspx.cs index eb70ddd..b1e2c99 100644 --- a/WebLab/Informes/Auditoria.aspx.cs +++ b/WebLab/Informes/Auditoria.aspx.cs @@ -97,7 +97,7 @@ private void Inicializar() pnlControlProtocolo.Visible = true; pnlControlAcceso.Visible = false; pnControlLote.Visible = false; - + txtProtocolo.Focus(); } break; @@ -110,6 +110,7 @@ private void Inicializar() pnlControlProtocolo.Visible = false; pnlControlAcceso.Visible = false; pnControlLote.Visible = true; + txtLote.Focus(); } break; } @@ -476,7 +477,7 @@ private DataTable GetDataSetAuditoraLote() FROM LAB_AuditoriaLote AS A with (nolock) left JOIN Sys_Usuario AS U with (nolock) ON A.idUsuario = U.idUsuario inner join LAB_LoteDerivacion L with (nolock) on L.idLoteDerivacion= A.idLote - where L.idLoteDerivacion = " + txt_lote.Text.Trim() + m_strCondicion + " ORDER BY A.idAuditoriaLote"; + where L.idLoteDerivacion = " + txtLote.Text.Trim() + m_strCondicion + " ORDER BY A.idAuditoriaLote"; DataSet Ds1 = new DataSet(); adapter.SelectCommand = new SqlCommand(m_strSQL, conn); @@ -525,7 +526,7 @@ private void ImprimirAuditoriaLote() oCr.DataBind(); Utility oUtil = new Utility(); - string nombrePDF = oUtil.CompletarNombrePDF("Auditoria_Lote_" + txt_lote.Text); + string nombrePDF = oUtil.CompletarNombrePDF("Auditoria_Lote_" + txtLote.Text); oCr.ReportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, true, nombrePDF); diff --git a/WebLab/Informes/Auditoria.aspx.designer.cs b/WebLab/Informes/Auditoria.aspx.designer.cs index 4a2a2b7..069c8f6 100644 --- a/WebLab/Informes/Auditoria.aspx.designer.cs +++ b/WebLab/Informes/Auditoria.aspx.designer.cs @@ -67,7 +67,7 @@ public partial class Auditoria /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.CompareValidator cvDni; - + /// /// ddlUsuario control. /// @@ -168,13 +168,13 @@ public partial class Auditoria protected global::System.Web.UI.WebControls.Panel pnControlLote; /// - /// txt_lote control. + /// txtLote control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.TextBox txt_lote; + protected global::System.Web.UI.WebControls.TextBox txtLote; /// /// RequiredFieldValidator2 control. From 20ca613f769bc48d894e8009fb27e5fd0320a863 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Tue, 21 Oct 2025 11:00:55 -0300 Subject: [PATCH 23/61] fix: se pasa el metodo ActualizaEstadoLote a LoteDerivacion --- Business/Data/Laboratorio/LoteDerivacion.cs | 32 +++++++--- WebLab/Protocolos/ProtocoloEdit2.aspx.cs | 64 ++++++++++--------- .../Protocolos/ProtocoloProductoEdit.aspx.cs | 50 ++++----------- 3 files changed, 70 insertions(+), 76 deletions(-) diff --git a/Business/Data/Laboratorio/LoteDerivacion.cs b/Business/Data/Laboratorio/LoteDerivacion.cs index 939a893..12e32c7 100644 --- a/Business/Data/Laboratorio/LoteDerivacion.cs +++ b/Business/Data/Laboratorio/LoteDerivacion.cs @@ -97,8 +97,8 @@ public string Observacion { public static string derivacionPDF(int idLote) { - //agregar el tipo de muestra para NO PACIENTES idMuestra de LAB_Muestra con el idmuestra de protocolo - + //agrego el tipo de muestra para NO PACIENTES (Cambios en la vista vta_LAB_Derivaciones) + string m_strSQL = @"SELECT numero, convert(varchar(10), fecha,103) as fecha, dni, determinacion, apellido + ' '+ nombre as paciente, efectorderivacion, fechaNacimiento as edad, unidadEdad, sexo, solicitante as especialista, idLote , @@ -154,11 +154,27 @@ public bool HayDerivacionesPendientes() { } - - //public bool IngresoProtocolo() { - // List derivaciones = Derivacion.DerivacionesByLote(this.IdLoteDerivacion); - - // derivaciones.co - //} + public void ActualizaEstadoLote(int idUsuario, string ProtocoloNuevo, string ProtocoloAnterior) + { + if (Estado == 4) //Pasa de Recibido a Ingresado + { + Estado = 5; + GrabarAuditoriaLoteDerivacion(descripcionEstadoLote(), 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 + if (!HayDerivacionesPendientes()) + { + Estado = 6; //Pasa a Completado si no tiene ms derivaciones pendientes + GrabarAuditoriaLoteDerivacion(descripcionEstadoLote(), idUsuario); + } + + Save(); + } + } } diff --git a/WebLab/Protocolos/ProtocoloEdit2.aspx.cs b/WebLab/Protocolos/ProtocoloEdit2.aspx.cs index 40539b2..20e8bf6 100644 --- a/WebLab/Protocolos/ProtocoloEdit2.aspx.cs +++ b/WebLab/Protocolos/ProtocoloEdit2.aspx.cs @@ -4971,47 +4971,51 @@ private void GenerarResultadoSISA(DetalleProtocolo oDetalle, string idPruebaSISA } - private void ActualizaEstadoLote(int idLote, Protocolo oRegistro) //SE PISO CON EL PR MantenimientoVarios (#15) - { - try - { - if (idLote != 0) - { - LoteDerivacion lote = new LoteDerivacion(); - lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); + //private void ActualizaEstadoLote(int idLote, Protocolo oRegistro) //SE PISO CON EL PR MantenimientoVarios (#15) + //{ + // try + // { + // if (idLote != 0) + // { + // LoteDerivacion lote = new LoteDerivacion(); + // lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); - if (lote.Estado == 4) //Pasa de Recibido a Ingresado - { - lote.Estado = 5; - lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); - } + // if (lote.Estado == 4) //Pasa de Recibido a Ingresado + // { + // lote.Estado = 5; + // lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); + // lote.FechaIngreso = DateTime.Now; + // } - //Graba el ingreso del protocolo en el lote - lote.GrabarAuditoriaLoteDerivacion("Ingresa protocolo", oUser.IdUsuario, "Número Protocolo", oRegistro.Numero.ToString(), Request["numeroProtocolo"]); + // //Graba el ingreso del protocolo en el lote + // lote.GrabarAuditoriaLoteDerivacion("Ingresa protocolo", oUser.IdUsuario, "Número Protocolo", oRegistro.Numero.ToString(), Request["numeroProtocolo"]); - //Si al generar este nuevo protocolo se finalizo la carga del lote, cambiar estado a Completado - if (!lote.HayDerivacionesPendientes()) - { - lote.Estado = 6; //Pasa a Completado si no tiene más derivaciones pendientes - lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); - } + // //Si al generar este nuevo protocolo se finalizo la carga del lote, cambiar estado a Completado + // if (!lote.HayDerivacionesPendientes()) + // { + // lote.Estado = 6; //Pasa a Completado si no tiene más derivaciones pendientes + // lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); + // } - lote.Save(); - } - } - catch (Exception) - { - } - } + // lote.Save(); + // } + // } + // catch (Exception) + // { + // } + //} - private void VerificacionEstadoLote(Protocolo oRegistro) //SE PISO CON EL PR MantenimientoVarios (#15) + private void VerificacionEstadoLote(Protocolo oRegistro) { if (Request["idLote"] != null) //Si no tiene Lote, no actualiza estado de Lote { int idLote = Convert.ToInt32(Request["idLote"]); - ActualizaEstadoLote(idLote, oRegistro); + LoteDerivacion lote = new LoteDerivacion(); + lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); + lote.ActualizaEstadoLote(oUser.IdUsuario, oRegistro.Numero.ToString(), Request["numeroProtocolo"] ); + // ActualizaEstadoLote(idLote, oRegistro); } } diff --git a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs index d3417c6..385f1cb 100644 --- a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs +++ b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs @@ -2105,44 +2105,7 @@ and D.estado in (1) ---------------------- Buscar las derivaciones que no han si } } - private void VerificacionEstadoLote(Protocolo oRegistro) - { - - if (Request["idLote"] != null) //Si no tiene Lote, no actualiza estado de Lote - { - int idLote = Convert.ToInt32(Request["idLote"]); - try - { - if (idLote != 0) - { - LoteDerivacion lote = new LoteDerivacion(); - lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); - - - if (lote.Estado == 4) //Pasa de Recibido a Ingresado - { - lote.Estado = 5; - lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); - } - - //Graba el ingreso del protocolo en el lote - lote.GrabarAuditoriaLoteDerivacion("Ingresa protocolo", oUser.IdUsuario, "Número Protocolo", oRegistro.Numero.ToString(), Request["numeroProtocolo"]); - - //Si al generar este nuevo protocolo se finalizo la carga del lote, cambiar estado a Completado - if (!lote.HayDerivacionesPendientes()) - { - lote.Estado = 6; //Pasa a Completado si no tiene más derivaciones pendientes - lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); - } - - lote.Save(); - } - } - catch (Exception) - { - } - } - } + private void ActualizarEstadoDerivacion(Protocolo oRegistro) { SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; @@ -2171,6 +2134,17 @@ from LAB_Derivacion D } + private void VerificacionEstadoLote(Protocolo oRegistro) + { + if (Request["idLote"] != null) //Si no tiene Lote, no actualiza estado de Lote + { + int idLote = Convert.ToInt32(Request["idLote"]); + LoteDerivacion lote = new LoteDerivacion(); + lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); + lote.ActualizaEstadoLote(oUser.IdUsuario, oRegistro.Numero.ToString(), Request["numeroProtocolo"]); + // ActualizaEstadoLote(idLote, oRegistro); + } + } } } From ddd42cfb58df7d4a60666ab573526119be6d7c30 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Tue, 21 Oct 2025 11:08:36 -0300 Subject: [PATCH 24/61] fix: se implenta store para el listado. se agrega la verificacion de permisos. se agregan columnas de fechas de generacion, ingreso y envio --- WebLab/Derivaciones/LoteList.aspx | 13 ++++--- WebLab/Derivaciones/LoteList.aspx.cs | 54 +++++++++++++++++++--------- 2 files changed, 46 insertions(+), 21 deletions(-) diff --git a/WebLab/Derivaciones/LoteList.aspx b/WebLab/Derivaciones/LoteList.aspx index 8f89e81..3669e51 100644 --- a/WebLab/Derivaciones/LoteList.aspx +++ b/WebLab/Derivaciones/LoteList.aspx @@ -85,7 +85,7 @@ @@ -112,7 +112,7 @@
@@ -778,7 +778,8 @@ function VerificaLargo (source, arguments) function InicioPagina() - { + { + if (document.getElementById('<%= Page.Master.FindControl("ContentPlaceHolder1").FindControl("TxtDatosCargados").ClientID %>').value == "") {///protocolo nuevo CrearFila(true); @@ -1231,7 +1232,7 @@ function VerificaLargo (source, arguments) } - + diff --git a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs index 35695aa..25823eb 100644 --- a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs +++ b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs @@ -157,8 +157,12 @@ protected void Page_Load(object sender, EventArgs e) btnCancelar.Text = "Cancelar"; btnCancelar.Width = Unit.Pixel(80); + btnCancelar.Visible = true; + if (Request["Operacion"].ToString() == "AltaDerivacionMultiEfectorLote") + { + CargarProtocoloDerivadoLote(); + } - } } else @@ -193,29 +197,31 @@ private void CargarDeterminacionesPeticion(Peticion oRegistro) } - private void CargarDeterminacionesDerivacion(string s_analisis, string s_diagnostico) + private void CargarDeterminacionesDerivacion(string s_analisis) { - - string[] tabla = s_analisis.Split('|'); + string pivot = ""; string sDatos = ""; + /////Crea nuevamente los detalles. for (int i = 0; i <= tabla.Length - 1; i++) { - if (sDatos == "") - sDatos = tabla[i].ToString() + "#Si"; - else - sDatos += ";" + tabla[i].ToString() + "#Si"; - - } - - - + Item oItem = new Item(); + oItem = (Item)oItem.Get(typeof(Item), int.Parse(tabla[i].ToString())); + if (oItem != null) + if (pivot != oItem.Nombre) + { + if (sDatos == "") + sDatos = oItem.Codigo + "#Si#False"; + else + sDatos += ";" + oItem.Codigo + "#Si#False"; + pivot = oItem.Nombre; + } + } TxtDatosCargados.Value = sDatos; - } - + protected void txtCodigoMuestra_TextChanged(object sender, EventArgs e) { @@ -499,6 +505,7 @@ private void CargarListas() (Request["Operacion"].ToString() == "AltaTurno") || (Request["Operacion"].ToString() == "AltaDerivacion") || (Request["Operacion"].ToString() == "AltaDerivacionMultiEfector") || + (Request["Operacion"].ToString() == "AltaDerivacionMultiEfectorLote") || (Request["Operacion"].ToString() == "AltaPeticion") || (Request["Operacion"].ToString() == "AltaFFEE") ) @@ -711,7 +718,7 @@ private void CargarItems() FROM Lab_item I with (nolock) inner join lab_itemEfector IE with (nolock) on I.idItem= IE.idItem and Ie.idefector=" + oC.IdEfector.IdEfector.ToString() + //MultiEfector @"INNER JOIN Lab_area A (nolock) ON A.idArea= I.idArea - where A.baja=0 and I.baja=0 and A.idtipoServicio in (1, 3) AND (I.tipo= 'P') order by I.nombre "; + where A.baja=0 and I.baja=0 and IE.disponible=1 and A.idtipoServicio in (1, 3) AND (I.tipo= 'P') order by I.nombre "; //NHibernate.Cfg.Configuration oConf = new NHibernate.Cfg.Configuration(); //String strconn = oConf.GetProperty("hibernate.connection.connection_string"); SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString); ///Performance: conexion de solo lectura @@ -788,7 +795,14 @@ 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") + { + ActualizarEstadoDerivacion(oRegistro); + VerificacionEstadoLote(oRegistro); + Response.Redirect("DerivacionMultiEfectorLote.aspx?idEfectorSolicitante=" + Request["idEfectorSolicitante"].ToString() + "&idServicio=" + Request["idServicio"].ToString() + "&idLote=" + Request["idLote"]); + } } else { @@ -1391,7 +1405,7 @@ private void GuardarDetalle2(Business.Data.Laboratorio.Protocolo oRegistro) private void GuardarDetallePractica(DetalleProtocolo oDet) { - if (VerificarSiEsDerivable(oDet)) //oDet.IdItem.IdEfector.IdEfector != oDet.IdItem.IdEfectorDerivacion.IdEfector) //Si es un item derivable no busca hijos y guarda directamente. + if (oDet.VerificarSiEsDerivable(oUser.IdEfector)) //Cambio para que quede como ProtocoloEdit2 { oDet.IdSubItem = oDet.IdItem; oDet.Save(); @@ -1497,31 +1511,31 @@ private void GuardarValorReferencia(DetalleProtocolo oDetalle) //Fin calculo de valor de refrencia y metodo } - private bool VerificarSiEsDerivable(DetalleProtocolo oDet) - { - bool ok = false; - /// buscar idefectorderivacion desde lab_itemefector - ISession m_session = NHibernateHttpModule.CurrentSession; - ICriteria critItemEfector = m_session.CreateCriteria(typeof(ItemEfector)); - critItemEfector.Add(Expression.Eq("IdItem", oDet.IdItem)); - critItemEfector.Add(Expression.Eq("IdEfector", oUser.IdEfector)); - IList detalle1 = critItemEfector.List(); - if (detalle1.Count > 0) - { - foreach (ItemEfector oitemEfector in detalle1) - { - if (oDet.IdEfector.IdEfector != oitemEfector.IdEfectorDerivacion.IdEfector) - { - ok = true; break; - } - } - } - else - ok = false; + //private bool VerificarSiEsDerivable(DetalleProtocolo oDet) + //{ + // bool ok = false; + // /// buscar idefectorderivacion desde lab_itemefector + // ISession m_session = NHibernateHttpModule.CurrentSession; + // ICriteria critItemEfector = m_session.CreateCriteria(typeof(ItemEfector)); + // critItemEfector.Add(Expression.Eq("IdItem", oDet.IdItem)); + // critItemEfector.Add(Expression.Eq("IdEfector", oUser.IdEfector)); + // IList detalle1 = critItemEfector.List(); + // if (detalle1.Count > 0) + // { + // foreach (ItemEfector oitemEfector in detalle1) + // { + // if (oDet.IdEfector.IdEfector != oitemEfector.IdEfectorDerivacion.IdEfector) + // { + // ok = true; break; + // } + // } + // } + // else + // ok = false; - return ok; + // return ok; - } + //} protected void ddlSexo_SelectedIndexChanged(object sender, EventArgs e) @@ -1582,18 +1596,13 @@ protected void txtCodigo_TextChanged1(object sender, EventArgs e) protected void btnCancelar_Click(object sender, EventArgs e) { - switch (Request["Desde"].ToString()) - { - //case "Default": Response.Redirect("Default.aspx?idServicio=" + Session["idServicio"].ToString(), false); break; - case "ProtocoloList": Response.Redirect("ProtocoloList.aspx?idServicio=" + Session["idServicio"].ToString() + "&Tipo=ListaProducto"); break; - case "Control": Response.Redirect("ProtocoloList.aspx?idServicio=" + Session["idServicio"].ToString() + "&Tipo=Control"); break; - // case "Urgencia": Response.Redirect("../Urgencia/UrgenciaList.aspx",false); break; - // case "Derivacion": Response.Redirect("Derivacion.aspx?idServicio="+Session["idServicio"].ToString(), false); break; - } - - - - } + switch (Request["Desde"].ToString()) + { + case "ProtocoloList": Response.Redirect("ProtocoloList.aspx?idServicio=" + Session["idServicio"].ToString() + "&Tipo=ListaProducto"); break; + case "Control": Response.Redirect("ProtocoloList.aspx?idServicio=" + Session["idServicio"].ToString() + "&Tipo=Control"); break; + case "AltaDerivacionMultiEfectorLote": Response.Redirect("DerivacionMultiEfectorLote.aspx?idEfectorSolicitante=" + Request["idEfectorSolicitante"].ToString() + "&idServicio=" + Request["idServicio"].ToString() + "&idLote=" + Request["idLote"]); break; + } + } @@ -2037,6 +2046,133 @@ protected void btnArchivos_Click(object sender, EventArgs e) { Response.Redirect("ProtocoloAdjuntar.aspx?idProtocolo=" + Request["idProtocolo"].ToString() +"&desde=protocolo"); } + + private void CargarProtocoloDerivadoLote() + { + string numeroProtocolo = Request["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", int.Parse(numeroProtocolo)); + if (oRegistro != null) + { + lblTitulo.Visible = false; + lblServicio1.Visible = true; + lblServicio.Visible = true; + txtFecha.Value = DateTime.Now.ToShortDateString(); + txtFechaOrden.Value = oRegistro.FechaOrden.ToShortDateString(); + txtCodigoMuestra.Text = ""; + txtDescripcionProducto.Text = oRegistro.DescripcionProducto; + ddlConservacion.SelectedValue = oRegistro.IdConservacion.ToString(); + txtNumeroOrigen.Text = oRegistro.Numero.ToString(); + ddlEfector.SelectedValue = oRegistro.IdEfector.IdEfector.ToString(); + ddlSectorServicio.SelectedValue = oRegistro.IdSector.IdSectorServicio.ToString(); + txtObservacion.Text = oRegistro.Observacion; + pnlNavegacion.Visible = false; + btnCancelar.Text = "Cancelar"; + btnCancelar.Width = Unit.Pixel(80); + ddlMuestra.SelectedValue = oRegistro.IdMuestra.ToString(); + Muestra oMuestra = new Muestra(); + oMuestra = (Muestra)oMuestra.Get(typeof(Muestra), "IdMuestra", oRegistro.IdMuestra, "Baja", false); + txtCodigoMuestra.Text = oMuestra.Codigo; + + + #region CargaDeterminaciones + ////// ---------------------->Buscar las derivaciones que no han sido ingresadas + //el protocolo me da los protocolos detalles + //los protocolos detalles me dan las derivaciones + //la derivacion debe estar enviada + //la derivacion debe tener el mismo lote que el ingresado (no todos los analisis pueden haber sido enviados con el mismo lote) + + string m_strSQL = + //select distinct STRING_AGG(Det.idItem ,' | ') as Item ---> (No esta disponible en SQL 2014) + @" SELECT STUFF(( SELECT ' | ' + CAST(Det.idItem AS VARCHAR(20)) + from LAB_Derivacion D + inner join LAB_DetalleProtocolo as Det on Det.idDetalleProtocolo = D.idDetalleProtocolo + inner join LAB_Protocolo as P on P.idProtocolo = det.idProtocolo + inner join LAB_DerivacionEstado as LE on LE.idEstado = D.estado + inner join LAB_LoteDerivacion L on L.idLoteDerivacion = D.idLote + where P.baja = 0 + and D.estado in (1) ---------------------- Buscar las derivaciones que no han sido ingresadas + and L.idLoteDerivacion = " + Request["idLote"].ToString() + " and p.numero = " + numeroProtocolo + + " FOR XML PATH(''), TYPE ).value('.', 'NVARCHAR(MAX)'), 1, 3, '') AS Item; "; + + DataSet Ds = new DataSet(); + SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; + SqlDataAdapter adapter = new SqlDataAdapter(); + adapter.SelectCommand = new SqlCommand(m_strSQL, conn); + adapter.Fill(Ds); + + string analisis = Convert.ToString(Ds.Tables[0].Rows[0][0]); + CargarDeterminacionesDerivacion(analisis); + #endregion + } + } + + private void VerificacionEstadoLote(Protocolo oRegistro) + { + + if (Request["idLote"] != null) //Si no tiene Lote, no actualiza estado de Lote + { + int idLote = Convert.ToInt32(Request["idLote"]); + try + { + if (idLote != 0) + { + LoteDerivacion lote = new LoteDerivacion(); + lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); + + + if (lote.Estado == 4) //Pasa de Recibido a Ingresado + { + lote.Estado = 5; + lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); + } + + //Graba el ingreso del protocolo en el lote + lote.GrabarAuditoriaLoteDerivacion("Ingresa protocolo", oUser.IdUsuario, "Número Protocolo", oRegistro.Numero.ToString(), Request["numeroProtocolo"]); + + //Si al generar este nuevo protocolo se finalizo la carga del lote, cambiar estado a Completado + if (!lote.HayDerivacionesPendientes()) + { + lote.Estado = 6; //Pasa a Completado si no tiene más derivaciones pendientes + lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); + } + + lote.Save(); + } + } + catch (Exception) + { + } + } + } + private void ActualizarEstadoDerivacion(Protocolo oRegistro) + { + SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; + int idLote = Convert.ToInt32(Request["idLote"]); + + string query = + @"update LAB_Derivacion + set estado=3---recibido + ,idProtocoloDerivacion=" + oRegistro.IdProtocolo.ToString() + @" + from LAB_Derivacion D + inner join LAB_DetalleProtocolo Det on Det.idDetalleProtocolo= d.idDetalleProtocolo + inner join LAB_Protocolo P on P.idProtocolo= Det.idProtocolo + where P.numero=" + Request["numeroProtocolo"].ToString() + @" and idLote=" + idLote; + + 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 + Business.Data.Laboratorio.Protocolo oPOrigen = new Business.Data.Laboratorio.Protocolo(); + oPOrigen = (Business.Data.Laboratorio.Protocolo)oPOrigen.Get(typeof(Business.Data.Laboratorio.Protocolo), "Numero", int.Parse(Request["numeroProtocolo"].ToString())); + if (oPOrigen != null) + { + oPOrigen.GrabarAuditoriaDetalleProtocolo("Recepcion Derivacion", oUser.IdUsuario, "Lote " + idLote, "Protocolo " + oRegistro.Numero.ToString()); + } + + } + } } From 60ae327e4f00ae0864a2d122e6fe31e33bce91a6 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Thu, 16 Oct 2025 15:59:12 -0300 Subject: [PATCH 17/61] feature: Requerimiento 1: Cambiar a nomenclatura CamelCase --- WebLab/Derivaciones/InformeList3.aspx.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WebLab/Derivaciones/InformeList3.aspx.cs b/WebLab/Derivaciones/InformeList3.aspx.cs index 9e3c43a..b851e6d 100644 --- a/WebLab/Derivaciones/InformeList3.aspx.cs +++ b/WebLab/Derivaciones/InformeList3.aspx.cs @@ -73,7 +73,7 @@ protected void Page_Load(object sender, EventArgs e) pnlNroLote.Visible = true; HyperLink1.NavigateUrl = "~/Derivaciones/GestionarLote.aspx"; ddlEstado.SelectedIndex = 2; - ddl_motivoCancelacion.Enabled = false; + ddlMotivoCancelacion.Enabled = false; } } @@ -424,7 +424,7 @@ private void ActualizarDetalleProtocolo(GridViewRow row, int idLote = 0, int de oDeriva.IdMotivoCancelacion = MotivoCancelacion; //La observacion se cambia solo si es Alta, si se desasocia el lote, o si al modificar agrego una observacion - if (Request["Tipo"] == "Alta" || desasociaLote == 1 ||(Request["Tipo"] == "Modifica" && !string.IsNullOrEmpty(txt_observacion.Text))) + if (Request["Tipo"] == "Alta" || desasociaLote == 1 ||(Request["Tipo"] == "Modifica" && !string.IsNullOrEmpty(txtObservacion.Text))) { oDeriva.Observacion = observacion; } From 2fecdb14202cc95d28adb434dae4af0e862fffdf Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Thu, 16 Oct 2025 16:00:21 -0300 Subject: [PATCH 18/61] =?UTF-8?q?feature;=20en=20proceso=20Requerimiento?= =?UTF-8?q?=204:=20Recepci=C3=B3n=20de=20derivaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebLab/Protocolos/ProtocoloMensaje.aspx | 102 ++++++++++-------- WebLab/Protocolos/ProtocoloMensaje.aspx.cs | 31 +++--- .../ProtocoloMensaje.aspx.designer.cs | 33 ++++-- .../Protocolos/ProtocoloProductoEdit.aspx.cs | 8 +- 4 files changed, 101 insertions(+), 73 deletions(-) diff --git a/WebLab/Protocolos/ProtocoloMensaje.aspx b/WebLab/Protocolos/ProtocoloMensaje.aspx index 4f8d1e7..99508a1 100644 --- a/WebLab/Protocolos/ProtocoloMensaje.aspx +++ b/WebLab/Protocolos/ProtocoloMensaje.aspx @@ -1,52 +1,64 @@ <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProtocoloMensaje.aspx.cs" Inherits="WebLab.Protocolos.ProtocoloMensaje" MasterPageFile="~/Site1.Master" %> - - -

-
- -
-
-
- - - -
- -
-
- ALTA DE MUESTRA - -
-
- - -

-
-

- - - - - - -
- - -
-
- - -
- + + +
+
+
+ +
+
+
+ + + +
+ +
+
+ ALTA DE MUESTRA +
+
+ + +

+

+
+

+

+ + + + + +
+ + +
+
+ + +
+ diff --git a/WebLab/Protocolos/ProtocoloMensaje.aspx.cs b/WebLab/Protocolos/ProtocoloMensaje.aspx.cs index bdbdb59..c8d3623 100644 --- a/WebLab/Protocolos/ProtocoloMensaje.aspx.cs +++ b/WebLab/Protocolos/ProtocoloMensaje.aspx.cs @@ -20,9 +20,6 @@ namespace WebLab.Protocolos { public partial class ProtocoloMensaje : System.Web.UI.Page { - - - protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) @@ -44,25 +41,35 @@ protected void Page_Load(object sender, EventArgs e) Business.Data.Laboratorio.Muestra oM = new Business.Data.Laboratorio.Muestra(); oM = (Business.Data.Laboratorio.Muestra)oM.Get(typeof(Business.Data.Laboratorio.Muestra), oP.IdMuestra); lblDescripcion.Text = oM.Nombre.ToUpper() + " " + oP.DescripcionProducto; + + if (Request["idLote"] != null) + { + lnkRegresar.Visible = true; + lnkNuevo.Visible = false; + } } } - - } - - - - - protected void lnkRegresar_Click(object sender, EventArgs e) + } + protected void lnkNuevo_Click(object sender, EventArgs e) { Business.Data.Laboratorio.Protocolo oP = new Business.Data.Laboratorio.Protocolo(); oP = (Business.Data.Laboratorio.Protocolo)oP.Get(typeof(Business.Data.Laboratorio.Protocolo), int.Parse(Request["id"].ToString())); - if ((oP.IdTipoServicio.IdTipoServicio==3) || (oP.IdTipoServicio.IdTipoServicio == 5)) - Response.Redirect("ProtocoloProductoEdit.aspx?Operacion=Alta", false); + if ((oP.IdTipoServicio.IdTipoServicio == 3) || (oP.IdTipoServicio.IdTipoServicio == 5)) + Response.Redirect("ProtocoloProductoEdit.aspx?Operacion=Alta", false); if (oP.IdTipoServicio.IdTipoServicio == 6) Response.Redirect("Default2.aspx?idServicio=6&idUrgencia=0&idCaso=0", false); + } + protected void lnkRegresar_Click(object sender, EventArgs e) + { + if (Request["idLote"] != null) //Regreso a la recepcion de lotes de derivaciones + { + Response.Redirect("DerivacionMultiEfectorLote.aspx?idServicio=1&idEfectorSolicitante=" + Request["idEfectorSolicitante"].ToString() + "&idLote=" + Request["idLote"]); + } } + + } } diff --git a/WebLab/Protocolos/ProtocoloMensaje.aspx.designer.cs b/WebLab/Protocolos/ProtocoloMensaje.aspx.designer.cs index c743d7b..528e52e 100644 --- a/WebLab/Protocolos/ProtocoloMensaje.aspx.designer.cs +++ b/WebLab/Protocolos/ProtocoloMensaje.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace WebLab.Protocolos { - - - public partial class ProtocoloMensaje { - +namespace WebLab.Protocolos +{ + + + public partial class ProtocoloMensaje + { + /// /// error control. /// @@ -20,7 +22,7 @@ public partial class ProtocoloMensaje { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl error; - + /// /// lblError control. /// @@ -29,7 +31,7 @@ public partial class ProtocoloMensaje { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblError; - + /// /// altaMuestra control. /// @@ -38,7 +40,7 @@ public partial class ProtocoloMensaje { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl altaMuestra; - + /// /// pnlTitulo control. /// @@ -47,7 +49,7 @@ public partial class ProtocoloMensaje { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl pnlTitulo; - + /// /// lblTitulo control. /// @@ -56,7 +58,7 @@ public partial class ProtocoloMensaje { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblTitulo; - + /// /// lblDescripcion control. /// @@ -65,7 +67,16 @@ public partial class ProtocoloMensaje { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblDescripcion; - + + /// + /// lnkRegresar control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton lnkRegresar; + /// /// lnkNuevo control. /// diff --git a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs index 25823eb..d3417c6 100644 --- a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs +++ b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs @@ -801,7 +801,7 @@ protected void btnGuardar_Click(object sender, EventArgs e) { ActualizarEstadoDerivacion(oRegistro); VerificacionEstadoLote(oRegistro); - Response.Redirect("DerivacionMultiEfectorLote.aspx?idEfectorSolicitante=" + Request["idEfectorSolicitante"].ToString() + "&idServicio=" + Request["idServicio"].ToString() + "&idLote=" + Request["idLote"]); + Response.Redirect("ProtocoloMensaje.aspx?id=" + oRegistro.IdProtocolo + "&idLote=" + Request["idLote"] + "&idEfectorSolicitante=" + Request["idEfectorSolicitante"], false); } } else @@ -1600,7 +1600,7 @@ protected void btnCancelar_Click(object sender, EventArgs e) { case "ProtocoloList": Response.Redirect("ProtocoloList.aspx?idServicio=" + Session["idServicio"].ToString() + "&Tipo=ListaProducto"); break; case "Control": Response.Redirect("ProtocoloList.aspx?idServicio=" + Session["idServicio"].ToString() + "&Tipo=Control"); break; - case "AltaDerivacionMultiEfectorLote": Response.Redirect("DerivacionMultiEfectorLote.aspx?idEfectorSolicitante=" + Request["idEfectorSolicitante"].ToString() + "&idServicio=" + Request["idServicio"].ToString() + "&idLote=" + Request["idLote"]); break; + case "AltaDerivacionMultiEfectorLote": Response.Redirect("DerivacionMultiEfectorLote.aspx?idEfectorSolicitante=" + Request["idEfectorSolicitante"].ToString() + "&idServicio=1&idLote=" + Request["idLote"]); break; } } @@ -2070,9 +2070,7 @@ private void CargarProtocoloDerivadoLote() btnCancelar.Text = "Cancelar"; btnCancelar.Width = Unit.Pixel(80); ddlMuestra.SelectedValue = oRegistro.IdMuestra.ToString(); - Muestra oMuestra = new Muestra(); - oMuestra = (Muestra)oMuestra.Get(typeof(Muestra), "IdMuestra", oRegistro.IdMuestra, "Baja", false); - txtCodigoMuestra.Text = oMuestra.Codigo; + #region CargaDeterminaciones From 669e6b3ffeafd7c1f9f3034e64e368256aa6155f Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Fri, 17 Oct 2025 12:28:59 -0300 Subject: [PATCH 19/61] feature: Requerimiento 3: Adaptar PDF --- Business/Data/Laboratorio/LoteDerivacion.cs | 17 +++---- WebLab/App_Data/dsInformes.Designer.cs | 47 +++++++++++++++++++- WebLab/App_Data/dsInformes.xsd | 9 ++-- WebLab/App_Data/dsInformes.xss | 22 ++++----- WebLab/Informes/DerivacionLote.rpt | Bin 32768 -> 32768 bytes 5 files changed, 70 insertions(+), 25 deletions(-) diff --git a/Business/Data/Laboratorio/LoteDerivacion.cs b/Business/Data/Laboratorio/LoteDerivacion.cs index 2fa31ba..69c4d2c 100644 --- a/Business/Data/Laboratorio/LoteDerivacion.cs +++ b/Business/Data/Laboratorio/LoteDerivacion.cs @@ -96,14 +96,15 @@ public string Observacion { public static string derivacionPDF(int idLote) { - string m_strSQL = " SELECT numero, convert(varchar(10), fecha,103) as fecha, dni, determinacion, " + - " apellido + ' '+ nombre as paciente, efectorderivacion, fechaNacimiento as edad, unidadEdad, sexo, " + - " solicitante as especialista, idLote ," + - " CASE WHEN(len(idLote) < 9) " + - " THEN '00000' + CONVERT(VARCHAR, idLote) " + - " ELSE CONVERT(VARCHAR, idLote ) " + - " END as idLoteString " + - " FROM vta_LAB_Derivaciones WHERE idLote=" + idLote + " ORDER BY efectorDerivacion,numero "; + string m_strSQL = @"SELECT numero, convert(varchar(10), fecha,103) as fecha, dni, determinacion, + apellido + ' '+ nombre as paciente, efectorderivacion, fechaNacimiento as edad, unidadEdad, sexo, + solicitante as especialista, idLote , + CASE WHEN(len(idLote) < 9) + THEN '00000' + CONVERT(VARCHAR, idLote) + ELSE CONVERT(VARCHAR, idLote ) + END as idLoteString , + idTipoServicio + FROM vta_LAB_Derivaciones WHERE idLote= "+ idLote + " ORDER BY efectorDerivacion,numero "; return m_strSQL; } diff --git a/WebLab/App_Data/dsInformes.Designer.cs b/WebLab/App_Data/dsInformes.Designer.cs index e54301c..726b187 100644 --- a/WebLab/App_Data/dsInformes.Designer.cs +++ b/WebLab/App_Data/dsInformes.Designer.cs @@ -1535,6 +1535,8 @@ public partial class protocoloDataTable : global::System.Data.TypedTableBase diff --git a/WebLab/App_Data/dsInformes.xsd b/WebLab/App_Data/dsInformes.xsd index 0e927e8..8794fa2 100644 --- a/WebLab/App_Data/dsInformes.xsd +++ b/WebLab/App_Data/dsInformes.xsd @@ -72,7 +72,8 @@ - + + @@ -225,7 +226,7 @@ - + @@ -239,7 +240,7 @@ - + @@ -422,7 +423,7 @@ - + diff --git a/WebLab/App_Data/dsInformes.xss b/WebLab/App_Data/dsInformes.xss index 4ed68e1..e353c27 100644 --- a/WebLab/App_Data/dsInformes.xss +++ b/WebLab/App_Data/dsInformes.xss @@ -6,17 +6,17 @@ --> - - - - - - - - - - - + + + + + + + + + + + \ No newline at end of file diff --git a/WebLab/Informes/DerivacionLote.rpt b/WebLab/Informes/DerivacionLote.rpt index 3983b5258fd961c0a0eead3755e10929729d014e..db6795f8bb49d4204570a32d54309f66092d59aa 100644 GIT binary patch delta 9135 zcmV;gBT(FcfC7Mk0>Jou77<20096JEx0sRU2|F< zo+lfFv{i+cBa%OdlD+Q)-`QFJ+xI$PgC?o)&M4d>0Ni2FHM3kbq9PTaxEI|X9V&3Ej0Y1`3H>ZJQ>5FFH{SCf``9jCx31#oh6kF!3SxwLnTiftq#xs zZ&}4Mud)vFQiEsM3B(KFK@XYgIY0pWo2ugI6d=!qV(>1DzgiY^5_Enjzh}qx(i{JB z*S?!X-3zPkP$7jQx%HPyr+*nwSq>4ga4Qd&lHY`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QktXLj9MKPwALrH!~x>F}~ zr7z^!U!+n2JHyBBbgQCEcsic5+}rcN_S*+0SZ@SmRCV8%EDae;TbL{KreJ*Bh6*mr zytIRSZmx4vnbp3Wgv`RSWmSb6Yg0!5 Date: Fri, 17 Oct 2025 15:53:33 -0300 Subject: [PATCH 20/61] fix: no derivar lotes sin determinaciones --- WebLab/Derivaciones/InformeLote.aspx.cs | 210 ++++++++++++++---------- 1 file changed, 126 insertions(+), 84 deletions(-) diff --git a/WebLab/Derivaciones/InformeLote.aspx.cs b/WebLab/Derivaciones/InformeLote.aspx.cs index eacf927..85ca259 100644 --- a/WebLab/Derivaciones/InformeLote.aspx.cs +++ b/WebLab/Derivaciones/InformeLote.aspx.cs @@ -311,17 +311,26 @@ protected void btnGuardar_Click(object sender, EventArgs e) { if (Session["idUsuario"] != null) { - if (Guardar()) + int idLote = verificarDeterminaciones(); + if (idLote == 0) //No trajo ningun id Lote con error { - ScriptManager.RegisterStartupScript(this, GetType(), "mensajeOk", "alert('✅ Se guardaron los cambios con exito');", true); + if (Guardar()) + { + ScriptManager.RegisterStartupScript(this, GetType(), "mensajeOk", "alert('✅ Se guardaron los cambios con exito');", true); + } + else + { + ScriptManager.RegisterStartupScript(this, GetType(), "mensajeOk", "alert('❌ ERROR: No se pudo guardar los datos.\\n Revisá los campos e intentá nuevamente');", true); + + } + CargarGrilla(); + limpiarForm(); } else - { - ScriptManager.RegisterStartupScript(this, GetType(), "mensajeOk", "alert('❌ ERROR: No se pudo guardar los datos\nRevisá los campos e intentá nuevamente');", true); - + { //Es el idLote con error + ScriptManager.RegisterStartupScript(this, GetType(), "mensajeOk", "alert('❌ ERROR: El lote Nro:"+idLote+" no se puede derivar, no tiene determinaciones asociadas.\\nDescarte el lote por falta de determinaciones o modifique el lote agregando determinaciones');", true); } - CargarGrilla(); - limpiarForm(); + } else { @@ -330,97 +339,130 @@ protected void btnGuardar_Click(object sender, EventArgs e) } + private int verificarDeterminaciones() + { + int tieneDeterminaciones = 0; + //Verificamos que en lote no se hayan descartados todas sus determinaciones asi no se Deriva vacio + if (Convert.ToInt32(ddlEstados.SelectedValue) == 2) + { + foreach (GridViewRow row in gvLista.Rows) + { + CheckBox a = ((CheckBox)(row.Cells[0].FindControl("CheckBox1"))); + if (a.Checked) + { + int idLote = Convert.ToInt32(row.Cells[2].Text); + string consultaSql = @"select top 1 1 from LAB_LoteDerivacion L with (nolock) + inner join LAB_Derivacion D with (nolock) ON D.idLote = L.idLoteDerivacion + where idLote =" + idLote; + DataTable dt = GetData(consultaSql); + if(dt.Rows.Count == 0) + return idLote; + + } + + } + + } + + return tieneDeterminaciones; + } private bool Guardar() { bool seGuardoEnBd = false; - - foreach (GridViewRow row in gvLista.Rows) + if(verificarDeterminaciones() == 0) //No trajo ningun id Lote con error { - CheckBox a = ((CheckBox)(row.Cells[0].FindControl("CheckBox1"))); - if (a.Checked) + foreach (GridViewRow row in gvLista.Rows) { - - int idLote = Convert.ToInt32(row.Cells[2].Text); - int idUsuario = oUser.IdUsuario; - int estadoLote = Convert.ToInt32(ddlEstados.SelectedValue); - string resultadoDerivacion = estadoLote == 2 ? "Derivado: " + row.Cells[3].Text : "No Derivado. "; - //string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? rb_transportista.SelectedValue : ""); //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) - string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? ddlTransporte.SelectedValue : ""); - LoteDerivacion lote = new LoteDerivacion(); - lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); - - //Se cambia el estado del lote LAB_LoteDerivacion - lote.Estado = estadoLote; - lote.Observacion = observacion; - lote.IdUsuarioEnvio = idUsuario; - //para Estado "Derivado" poner la fecha actual y para estado "Cancelado" no poner Fecha - string fecha_hora = txtFecha.Text + " " + txtHora.Text; - lote.FechaEnvio = (estadoLote == 2) ? Convert.ToDateTime(fecha_hora) : DateTime.Parse("01/01/1900"); - lote.Save(); - - ISession m_session = NHibernateHttpModule.CurrentSession; - ICriteria crit = m_session.CreateCriteria(typeof(Business.Data.Laboratorio.Derivacion)); - crit.Add(Expression.Eq("Idlote", lote.IdLoteDerivacion)); - IList lista = crit.List(); - if (lista.Count > 0) + CheckBox a = ((CheckBox)(row.Cells[0].FindControl("CheckBox1"))); + if (a.Checked) { - foreach (Business.Data.Laboratorio.Derivacion oDeriva in lista) + int idLote = Convert.ToInt32(row.Cells[2].Text); + int idUsuario = oUser.IdUsuario; + int estadoLote = Convert.ToInt32(ddlEstados.SelectedValue); + string resultadoDerivacion = estadoLote == 2 ? "Derivado: " + row.Cells[3].Text : "No Derivado. "; + //string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? rb_transportista.SelectedValue : ""); //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) + string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? ddlTransporte.SelectedValue : ""); + LoteDerivacion lote = new LoteDerivacion(); + lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); + + //Se cambia el estado del lote LAB_LoteDerivacion + lote.Estado = estadoLote; + lote.Observacion = observacion; + lote.IdUsuarioEnvio = idUsuario; + //para Estado "Derivado" poner la fecha actual y para estado "Cancelado" no poner Fecha + string fecha_hora = txtFecha.Text + " " + txtHora.Text; + lote.FechaEnvio = (estadoLote == 2) ? Convert.ToDateTime(fecha_hora) : DateTime.Parse("01/01/1900"); + lote.Save(); + + ISession m_session = NHibernateHttpModule.CurrentSession; + ICriteria crit = m_session.CreateCriteria(typeof(Business.Data.Laboratorio.Derivacion)); + crit.Add(Expression.Eq("Idlote", lote.IdLoteDerivacion)); + IList lista = crit.List(); + if (lista.Count > 0) { - #region Derivacion - //Cambia el estado de las derivaciones LAB_Derivacion - - /* - Estado del lote LAB_LoteDerivacionEstado (representa el estado del lote, no de la derivacion) - 1 : Creado - 2 : Derivado - 3 : Cancelado - - Estado de la derivacion LAB_DerivacionEstado - 0 : Pendiente de derivar - 1 : Enviado - 2 : No Enviado - 3 : Recibido - 4 : Pendiente para enviar - */ - oDeriva.Estado = (estadoLote == 2) ? 1 : 2; - oDeriva.Save(); - #endregion - - - #region cambio_codificacion_a_derivacion - //Cambia el resultado de LAB_DetalleProtocolo - DetalleProtocolo oDet = oDeriva.IdDetalleProtocolo; - oDet.ResultadoCar = resultadoDerivacion + " "+observacion; - oDet.ConResultado = true; - oDet.IdUsuarioResultado = idUsuario; - oDet.FechaResultado = Convert.ToDateTime(fecha_hora); - oDet.Save(); - //Inserta auditoria del detalle del protocolo - oDet.GrabarAuditoriaDetalleProtocolo("Graba", idUsuario); - #endregion + + foreach (Business.Data.Laboratorio.Derivacion oDeriva in lista) + { + #region Derivacion + //Cambia el estado de las derivaciones LAB_Derivacion + + /* + Estado del lote LAB_LoteDerivacionEstado (representa el estado del lote, no de la derivacion) + 1 : Creado + 2 : Derivado + 3 : Cancelado + + Estado de la derivacion LAB_DerivacionEstado + 0 : Pendiente de derivar + 1 : Enviado + 2 : No Enviado + 3 : Recibido + 4 : Pendiente para enviar + */ + oDeriva.Estado = (estadoLote == 2) ? 1 : 2; + oDeriva.Save(); + #endregion + + + #region cambio_codificacion_a_derivacion + //Cambia el resultado de LAB_DetalleProtocolo + DetalleProtocolo oDet = oDeriva.IdDetalleProtocolo; + oDet.ResultadoCar = resultadoDerivacion + " " + observacion; + oDet.ConResultado = true; + oDet.IdUsuarioResultado = idUsuario; + oDet.FechaResultado = Convert.ToDateTime(fecha_hora); + oDet.Save(); + //Inserta auditoria del detalle del protocolo + oDet.GrabarAuditoriaDetalleProtocolo("Graba", idUsuario); + #endregion + } } - } - - - //Inserta auditoria del lote - lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), idUsuario); // LAB-54 Sacar la palabra "Estado: xxxxx" - lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Observacion", txtObservacion.Text); - - if (estadoLote == 2) //Si deriva indica con que transportista fue, y que fecha y hora se retiro - { // lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", rb_transportista.SelectedValue); //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) - lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", ddlTransporte.SelectedValue); - DateTime f = new DateTime(Convert.ToInt16(txtFecha.Text.Substring(0, 4)), Convert.ToInt16(txtFecha.Text.Substring(5, 2)), Convert.ToInt16(txtFecha.Text.Substring(8, 2))); - lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Fecha", f.ToString("dd/MM/yyyy")); //que las fechas tengan el mismo formato - lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Hora", txtHora.Text); + + + //Inserta auditoria del lote + lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), idUsuario); // LAB-54 Sacar la palabra "Estado: xxxxx" + lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Observacion", txtObservacion.Text); + + if (estadoLote == 2) //Si deriva indica con que transportista fue, y que fecha y hora se retiro + { // lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", rb_transportista.SelectedValue); //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) + lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", ddlTransporte.SelectedValue); + DateTime f = new DateTime(Convert.ToInt16(txtFecha.Text.Substring(0, 4)), Convert.ToInt16(txtFecha.Text.Substring(5, 2)), Convert.ToInt16(txtFecha.Text.Substring(8, 2))); + lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Fecha", f.ToString("dd/MM/yyyy")); //que las fechas tengan el mismo formato + lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Hora", txtHora.Text); + } + + + seGuardoEnBd = true; } - - - seGuardoEnBd = true; } } + else + { + + } return seGuardoEnBd; } From 09e4d3cca1c422c9e6a1934589e5b0e9bae4a7e5 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Tue, 21 Oct 2025 09:31:17 -0300 Subject: [PATCH 21/61] feature: se modifica el encabezado de la Derivacion para contemplar los casos de Muestras de No Pacientes --- Business/Data/Laboratorio/LoteDerivacion.cs | 8 +++- WebLab/App_Data/dsInformes.Designer.cs | 47 +++++++++++++++++++- WebLab/App_Data/dsInformes.xsd | 7 +-- WebLab/App_Data/dsInformes.xss | 12 ++--- WebLab/Informes/DerivacionLote.rpt | Bin 32768 -> 32768 bytes 5 files changed, 61 insertions(+), 13 deletions(-) diff --git a/Business/Data/Laboratorio/LoteDerivacion.cs b/Business/Data/Laboratorio/LoteDerivacion.cs index 69c4d2c..939a893 100644 --- a/Business/Data/Laboratorio/LoteDerivacion.cs +++ b/Business/Data/Laboratorio/LoteDerivacion.cs @@ -96,6 +96,9 @@ public string Observacion { public static string derivacionPDF(int idLote) { + + //agregar el tipo de muestra para NO PACIENTES idMuestra de LAB_Muestra con el idmuestra de protocolo + string m_strSQL = @"SELECT numero, convert(varchar(10), fecha,103) as fecha, dni, determinacion, apellido + ' '+ nombre as paciente, efectorderivacion, fechaNacimiento as edad, unidadEdad, sexo, solicitante as especialista, idLote , @@ -103,8 +106,9 @@ CASE WHEN(len(idLote) < 9) THEN '00000' + CONVERT(VARCHAR, idLote) ELSE CONVERT(VARCHAR, idLote ) END as idLoteString , - idTipoServicio - FROM vta_LAB_Derivaciones WHERE idLote= "+ idLote + " ORDER BY efectorDerivacion,numero "; + idTipoServicio , + TipoProducto + FROM vta_LAB_Derivaciones WHERE idLote= " + idLote + " ORDER BY efectorDerivacion,numero "; return m_strSQL; } diff --git a/WebLab/App_Data/dsInformes.Designer.cs b/WebLab/App_Data/dsInformes.Designer.cs index 726b187..e33dba7 100644 --- a/WebLab/App_Data/dsInformes.Designer.cs +++ b/WebLab/App_Data/dsInformes.Designer.cs @@ -1537,6 +1537,8 @@ public partial class protocoloDataTable : global::System.Data.TypedTableBase diff --git a/WebLab/App_Data/dsInformes.xsd b/WebLab/App_Data/dsInformes.xsd index 8794fa2..9526790 100644 --- a/WebLab/App_Data/dsInformes.xsd +++ b/WebLab/App_Data/dsInformes.xsd @@ -74,6 +74,7 @@ + @@ -226,7 +227,7 @@ - + @@ -240,7 +241,7 @@ - + @@ -423,7 +424,7 @@ - + diff --git a/WebLab/App_Data/dsInformes.xss b/WebLab/App_Data/dsInformes.xss index e353c27..ba3c7af 100644 --- a/WebLab/App_Data/dsInformes.xss +++ b/WebLab/App_Data/dsInformes.xss @@ -8,15 +8,15 @@ - - + + - - - - + + + + \ No newline at end of file diff --git a/WebLab/Informes/DerivacionLote.rpt b/WebLab/Informes/DerivacionLote.rpt index db6795f8bb49d4204570a32d54309f66092d59aa..955144e498bab2d3ffc64f8bb7c012d10ca670b9 100644 GIT binary patch delta 9108 zcmV;FBWv7%fC7Mk0h706+i$000000000006+i$01yHsQ-ea2VhOK*#sL5U0B63};IpF&-Zy{kbOvPn<7qKL4&NEd(b+u7>;14e})1e;9) z>-+1T;i)iSqa{zUIBLurl+sg6Nmb9-j|LJXZ|qHY4CD*(?y z=U@+iV6of(7iT{2RBRoQtn)Jps8l?&E;GVIF=tF^cs4;X=JIgZ4=mJ`U#8gX2QH-3 zHKY1qfvphgFq4ZrFPVrEnwR?Hhe4{O&vwWJ=rc-oV890~evbg_sHGyQGiql9%_`t6 zCA9dW=|D!)doBN>dehP|u4L+}lyM+_fh;C}14>K-ps2#T@Yi{vIe!zT9#7RkuJ7Rw zO-BdJ+u3IdBtD?)>U-$h~EZe44qC{s)f+L$hYagZr5eP6*kfJA>R?VOl|~s^Nottv~>slV$|Y_;jmgl0=qnI;B6*|SqZ63=Sr z!}QC|YVJhGSIUkkWxGJC!e~yxvBc=;T9ntnOf- zrNtEDt>!hYPI+|ZJv6ltsq@4o&H6_g5P6%0(M%0)@Z99M1m{N+^Q^1tzz=MHcx3Ah zZI1KD6X}%8HrwR^^xRJo#((GbP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yh>;T~?(CXCvtc-U n0g^gw4xkaGpKd?g0RsR406-O!dIWv}g_HR@{{d^W`8x+h=X9S? From c22d3498a97710f27dc5d53314b1c8790defd89d Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Tue, 21 Oct 2025 10:57:07 -0300 Subject: [PATCH 22/61] fix: a camelCase --- WebLab/Informes/Auditoria.aspx | 4 ++-- WebLab/Informes/Auditoria.aspx.cs | 7 ++++--- WebLab/Informes/Auditoria.aspx.designer.cs | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/WebLab/Informes/Auditoria.aspx b/WebLab/Informes/Auditoria.aspx index 0e480ae..1883a3f 100644 --- a/WebLab/Informes/Auditoria.aspx +++ b/WebLab/Informes/Auditoria.aspx @@ -159,9 +159,9 @@
- + + ControlToValidate="txtLote" ErrorMessage="*" ValidationGroup="0">  
Efector Origen: - + Efector Destino:
@@ -144,11 +144,14 @@ - + + + + + CommandName='<%# Eval("idEfectorOrigen") %>'> @@ -157,7 +160,7 @@ + CommandName='<%# Eval("idEfectorOrigen") %>'> diff --git a/WebLab/Derivaciones/LoteList.aspx.cs b/WebLab/Derivaciones/LoteList.aspx.cs index d66b505..720612f 100644 --- a/WebLab/Derivaciones/LoteList.aspx.cs +++ b/WebLab/Derivaciones/LoteList.aspx.cs @@ -4,6 +4,7 @@ using CrystalDecisions.Shared; using CrystalDecisions.Web; using System; +using System.Collections; using System.Collections.Generic; using System.Configuration; using System.Data; @@ -45,6 +46,7 @@ protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { + VerificaPermisos("Lista de Lotes"); lblTitulo.Text = "LISTA DE LOTES"; habilitaOrdenarEfector(); CargarFiltros(); @@ -54,6 +56,21 @@ protected void Page_Load(object sender, EventArgs e) Response.Redirect("../FinSesion.aspx", false); } + + private void VerificaPermisos(string sObjeto) + { + if (Session["s_permiso"] != null) + { + Utility oUtil = new Utility(); + int i_permiso = oUtil.VerificaPermisos((ArrayList)Session["s_permiso"], sObjeto); + switch (i_permiso) + { + case 0: Response.Redirect("../AccesoDenegado.aspx", false); break; + //case 1: btn .Visible = false; break; + } + } + else Response.Redirect("../FinSesion.aspx", false); + } private void habilitaOrdenarEfector() { //solo ordeno por efector origen si es subsecretaria @@ -139,7 +156,7 @@ INNER JOIN LAB_LoteDerivacion l (nolock) on l.idEfectorDestino = E.idEfector else return consulta + " and L.idEfectorOrigen= " + efectorOrigen + " ORDER BY E.nombre"; } - + private void CargarFiltros() { @@ -231,18 +248,20 @@ private DataTable GenerarGrilla() if (ddlEstado.SelectedValue != "0") str_condicion += " AND L.estado = " + ddlEstado.SelectedValue; - string str_sql = @"select idLoteDerivacion as numero, fechaRegistro, efOrigen.nombre as efectorOrigen, efOrigen.idEfector as idEfectorOrigen, - efDestino.nombre as efectorDestino, E.nombre AS estado, isnull(U.apellido, 'Automatico') as username - from LAB_LoteDerivacion L (nolock) - INNER JOIN LAB_LoteDerivacionEstado E(nolock) ON E.idEstado = L.estado - INNER JOIN Sys_Efector efOrigen (nolock) ON efOrigen.idEfector = L.idEfectorOrigen - INNER JOIN Sys_Efector efDestino (nolock) ON efDestino.idEfector = L.idEfectorDestino - INNER JOIN Sys_Usuario U (nolock) ON U.idUsuario = L.idUsuarioRegistro - where " + str_condicion; + DataSet Ds = new DataSet(); SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; - SqlDataAdapter adapter = new SqlDataAdapter(); - adapter.SelectCommand = new SqlCommand(str_sql, conn); + SqlDataAdapter adapter; + SqlCommand cmd = new SqlCommand(); + + cmd.CommandType = CommandType.StoredProcedure; + cmd.CommandText = "[LAB_ListaLotes]"; + cmd.Parameters.Add("@FiltroBusqueda", SqlDbType.NVarChar); + cmd.Parameters["@FiltroBusqueda"].Value = str_condicion; + cmd.Connection = conn; + + + adapter = new SqlDataAdapter(cmd); adapter.Fill(Ds); CantidadRegistros.Text = Ds.Tables[0].Rows.Count.ToString() + " registros encontrados"; @@ -325,7 +344,7 @@ inner join LAB_LoteDerivacion L with (nolock) on L.idLoteDerivacion= A.idLote //tengo que cargar la configuracion del efector Origen int efectorOrigen = Convert.ToInt32(((LinkButton)sender).CommandName); Efector ef = new Efector(); - ef = (Efector) ef.Get(typeof(Efector), "IdEfector", efectorOrigen); + ef = (Efector)ef.Get(typeof(Efector), "IdEfector", efectorOrigen); oC = new Configuracion(); oC = (Configuracion)oC.Get(typeof(Configuracion), "IdEfector", ef); } @@ -425,17 +444,20 @@ protected void lnkExcel_Click(object sender, EventArgs e) { if (gvLista.Rows.Count != 0) { - DataTable tabla = ViewState["Datos"] as DataTable; - + DataTable tabla = ViewState["Datos"] as DataTable; + if (tabla.Rows.Count > 0) { tabla.Columns.Remove("idEfectorOrigen"); tabla.Columns["numero"].ColumnName = "Nro."; - tabla.Columns["fechaRegistro"].ColumnName = "Fecha Generación"; + tabla.Columns["fechaRegistro"].ColumnName = "Fecha"; tabla.Columns["efectorOrigen"].ColumnName = "Efector Origen"; tabla.Columns["efectorDestino"].ColumnName = "Efector Destino"; tabla.Columns["estado"].ColumnName = "Estado"; - tabla.Columns["username"].ColumnName = "Usuario Generación"; + tabla.Columns["username"].ColumnName = "Usuario Gen."; + tabla.Columns["fechaGeneracion"].ColumnName = "Fecha Gen."; + tabla.Columns["fechaIngreso"].ColumnName = "Fecha Ing."; + tabla.Columns["fechaEnvio"].ColumnName = "Fecha Envio"; StringBuilder sb = new StringBuilder(); StringWriter sw = new StringWriter(sb); From 97b3f3ead633aa35d60fa50fe336ec04591c8bfa Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Tue, 21 Oct 2025 15:28:25 -0300 Subject: [PATCH 25/61] Update pull_request_template.md (#36) --- .github/pull_request_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index bd495b0..7b87537 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -36,7 +36,7 @@ _____________________________________________ - [ ] Si - [ ] No -- [ ] - [ ] No corresponde +- [ ] No corresponde From 68f12f0fce82b6647cd23baf9b8e071f49572be9 Mon Sep 17 00:00:00 2001 From: caroPintos <77695282+caroPintos@users.noreply.github.com> Date: Tue, 21 Oct 2025 15:29:00 -0300 Subject: [PATCH 26/61] Mantenimiento Oct. 2025 (#49) --- .../Laboratorio/ConfiguracionCodigoBarra.cs | 25 +- .../ConfiguracionCodigoBarra.hbm.xml | 1 + Business/Data/Laboratorio/Ficha.cs | 32 +- Business/Data/Laboratorio/Ficha.hbm.xml | 3 +- Business/Data/Laboratorio/Item.cs | 20 +- Business/Data/Paciente.cs | 6 +- WebLab/Derivaciones/LoteList.aspx | 15 +- WebLab/Derivaciones/LoteList.aspx.cs | 25 ++ WebLab/Derivaciones/LoteList.aspx.designer.cs | 53 ++- WebLab/ParametrosEdit.aspx | 1 + WebLab/ParametrosEdit.aspx.cs | 3 + WebLab/Placas/PlacaResultado.aspx.cs | 18 +- WebLab/Placas/PlacaResultadoMixta.aspx.cs | 8 +- WebLab/Protocolos/DefaultFFEE.aspx.cs | 2 +- WebLab/Protocolos/DefaultFFEE2.aspx.cs | 192 ++++++----- WebLab/Protocolos/ProtocoloEdit2.aspx | 4 +- WebLab/Protocolos/ProtocoloEdit2.aspx.cs | 43 ++- WebLab/Resultados/ResultadosaSisa2.aspx | 9 +- WebLab/Resultados/ResultadosaSisa2.aspx.cs | 314 +++++++++--------- .../ResultadosaSisa2.aspx.designer.cs | 27 ++ WebLab/Seguimiento.aspx.cs | 4 +- WebLab/Site1.Master | 2 +- WebLab/SiteTurnos.Master | 2 +- WebLab/Turnos/TurnosEdit2.aspx.cs | 84 +++-- WebLab/controldecambios.html | 82 ++++- 25 files changed, 612 insertions(+), 363 deletions(-) diff --git a/Business/Data/Laboratorio/ConfiguracionCodigoBarra.cs b/Business/Data/Laboratorio/ConfiguracionCodigoBarra.cs index 2f9afab..9ee0193 100644 --- a/Business/Data/Laboratorio/ConfiguracionCodigoBarra.cs +++ b/Business/Data/Laboratorio/ConfiguracionCodigoBarra.cs @@ -24,6 +24,7 @@ public sealed class ConfiguracionCodigoBarra: Business.BaseDataAccess private bool m_protocoloorigen; private bool m_protocolosector; private bool m_protocolonumeroorigen; + private bool m_protocolotipomuestra; private bool m_pacientenumerodocumento; private bool m_pacienteapellido; private bool m_pacientesexo; @@ -46,6 +47,7 @@ public ConfiguracionCodigoBarra() m_protocoloorigen = false; m_protocolosector = false; m_protocolonumeroorigen = false; + m_protocolotipomuestra = false; m_pacientenumerodocumento = false; m_pacienteapellido = false; m_pacientesexo = false; @@ -66,6 +68,7 @@ public ConfiguracionCodigoBarra( bool protocoloorigen, bool protocolosector, bool protocolonumeroorigen, + bool protocolotipomuestra, bool pacientenumerodocumento, bool pacienteapellido, bool pacientesexo, @@ -80,6 +83,7 @@ public ConfiguracionCodigoBarra( m_protocoloorigen = protocoloorigen; m_protocolosector = protocolosector; m_protocolonumeroorigen = protocolonumeroorigen; + m_protocolotipomuestra = protocolotipomuestra; pacientenumerodocumento = m_pacientenumerodocumento; m_pacienteapellido = pacienteapellido; m_pacientesexo = pacientesexo; @@ -175,11 +179,22 @@ public bool ProtocoloFecha } } - - /// - /// - /// - public bool ProtocoloOrigen + + + public bool ProtocoloTipoMuestra + { + get { return m_protocolotipomuestra; } + set + { + m_isChanged |= (m_protocolotipomuestra != value); + m_protocolotipomuestra = value; + } + + } + /// + /// + /// + public bool ProtocoloOrigen { get { return m_protocoloorigen; } set diff --git a/Business/Data/Laboratorio/ConfiguracionCodigoBarra.hbm.xml b/Business/Data/Laboratorio/ConfiguracionCodigoBarra.hbm.xml index 62367a9..31a17cd 100644 --- a/Business/Data/Laboratorio/ConfiguracionCodigoBarra.hbm.xml +++ b/Business/Data/Laboratorio/ConfiguracionCodigoBarra.hbm.xml @@ -13,6 +13,7 @@ + diff --git a/Business/Data/Laboratorio/Ficha.cs b/Business/Data/Laboratorio/Ficha.cs index 181a0b9..8795000 100644 --- a/Business/Data/Laboratorio/Ficha.cs +++ b/Business/Data/Laboratorio/Ficha.cs @@ -33,10 +33,12 @@ public sealed class Ficha : Business.BaseDataAccess private DateTime m_fecha ; private DateTime m_fechasintoma; + private DateTime m_fechatoma; private int m_idusuarioregistro; private DateTime m_fecharegistro; private string m_analisis; private int m_idTipoMuestra; + private int m_idorigen; #region Default ( Empty ) Class Constuctor @@ -52,12 +54,14 @@ public Ficha() m_tipoFicha = String.Empty; m_identificadorlabo = String.Empty; m_fechasintoma = DateTime.MinValue; + m_fechatoma = DateTime.MinValue; m_idusuarioregistro = 0; m_fecharegistro = DateTime.MinValue; m_clasificacion = String.Empty; m_idCasoSnvs = String.Empty; m_fecha = DateTime.MinValue; m_idTipoMuestra = 0; + m_idorigen = 0; } @@ -82,8 +86,10 @@ public Ficha( DateTime fecharegistro, DateTime fecha, DateTime fechasintoma, + DateTime fechatoma, int idTipoMuestra, - string idCasoSnvs + string idCasoSnvs, + int idorigen ) : this() { @@ -93,9 +99,11 @@ string idCasoSnvs m_fecharegistro = DateTime.MinValue; m_fecha = DateTime.MinValue; m_fechasintoma = DateTime.MinValue; + m_fechatoma = DateTime.MinValue; m_analisis = analisis; m_idCasoSnvs = idCasoSnvs; m_idTipoMuestra = idTipoMuestra; + m_idorigen = idorigen; } #endregion // End Required Fields Only Constructor @@ -116,6 +124,17 @@ public int IdFichaRecepcion } + public int IdOrigen + { + get { return m_idorigen; } + set + { + m_isChanged |= (m_idorigen != value); + m_idorigen = value; + } + + } + public int IdTipoMuestra { get { return m_idTipoMuestra; } @@ -284,6 +303,17 @@ public DateTime FechaSintoma } + public DateTime FechaToma + { + get { return m_fechatoma; } + set + { + m_isChanged |= (m_fechatoma != value); + m_fechatoma = value; + } + + } + public DateTime Fecha { get { return m_fecha; } diff --git a/Business/Data/Laboratorio/Ficha.hbm.xml b/Business/Data/Laboratorio/Ficha.hbm.xml index 3c31c1a..eeb5548 100644 --- a/Business/Data/Laboratorio/Ficha.hbm.xml +++ b/Business/Data/Laboratorio/Ficha.hbm.xml @@ -21,8 +21,9 @@ - + + diff --git a/Business/Data/Laboratorio/Item.cs b/Business/Data/Laboratorio/Item.cs index 2ace21d..1459973 100644 --- a/Business/Data/Laboratorio/Item.cs +++ b/Business/Data/Laboratorio/Item.cs @@ -750,7 +750,7 @@ public string GetResultado(string valorItem) foreach (ResultadoItem oDet in lista) { if (oDet.Resultado.Length >= i) - if (oDet.Resultado.Substring(0, i) == valorItem) + if (oDet.Resultado.ToUpper().Substring(0, i) == valorItem.ToUpper()) { res = oDet.Resultado; break; } @@ -908,6 +908,24 @@ public bool VerificaMuestrasRepetida(int idMuestra) return dev; } + public string GetRecomendacion() + { + string rec=""; + //ISession m_session = NHibernateHttpModule.CurrentSession; + ICriteria critRec = m_session.CreateCriteria(typeof(ItemRecomendacion)); + critRec.Add(Expression.Eq("IdItem", this)); + IList listaRecomendacion = critRec.List(); + + foreach (ItemRecomendacion oRec in listaRecomendacion) + { + if (rec == "") + rec = oRec.IdRecomendacion.Descripcion; + else + rec = rec + " " + oRec.IdRecomendacion.Descripcion; + } + return rec; + } + //public string GetValorFormula(Protocolo oProtocolo) //{ diff --git a/Business/Data/Paciente.cs b/Business/Data/Paciente.cs index 06e834a..ace17fe 100644 --- a/Business/Data/Paciente.cs +++ b/Business/Data/Paciente.cs @@ -1312,13 +1312,15 @@ public string GetProtocolosReciente(string idServicio) } - public string GetFechaProtocolosReciente(string idServicio, string idmuestra) + public string GetFechaProtocolosRecientexEfector(string idServicio, string idmuestra, string idEfector) { string result = ""; ICriteria critProtocolo = m_session.CreateCriteria(typeof(Protocolo)); string ssql_Protocolo = " IdProtocolo in (Select top 1 LAb_Protocolo.IdProtocolo From LAb_Protocolo where Lab_Protocolo.idTipoServicio=" + idServicio + - " and LAb_Protocolo.baja=0 and Lab_Protocolo.idMuestra="+idmuestra+" and LAb_Protocolo.idPaciente=" + this.IdPaciente.ToString() + + " and LAb_Protocolo.baja=0 " + + " and Lab_Protocolo.IdEfector = "+ idEfector + + " and Lab_Protocolo.idMuestra="+idmuestra+" and LAb_Protocolo.idPaciente=" + this.IdPaciente.ToString() + " and LAb_Protocolo.Fecha>='" + DateTime.Now.AddDays(-7).ToString("yyyyMMdd") + "' order by LAb_Protocolo.IdProtocolo desc )"; if (idServicio == "6") // si es forense no importa la fecha ssql_Protocolo = " IdProtocolo in (Select top 1 LAb_Protocolo.IdProtocolo From LAb_Protocolo where Lab_Protocolo.idTipoServicio=" + idServicio + diff --git a/WebLab/Derivaciones/LoteList.aspx b/WebLab/Derivaciones/LoteList.aspx index 8f89e81..b3bc3d0 100644 --- a/WebLab/Derivaciones/LoteList.aspx +++ b/WebLab/Derivaciones/LoteList.aspx @@ -97,17 +97,9 @@
- +
- - - -
+ -
- - + @@ -215,8 +207,7 @@
- -
+
diff --git a/WebLab/Derivaciones/LoteList.aspx.cs b/WebLab/Derivaciones/LoteList.aspx.cs index d66b505..303f470 100644 --- a/WebLab/Derivaciones/LoteList.aspx.cs +++ b/WebLab/Derivaciones/LoteList.aspx.cs @@ -4,6 +4,7 @@ using CrystalDecisions.Shared; using CrystalDecisions.Web; using System; +using System.Collections; using System.Collections.Generic; using System.Configuration; using System.Data; @@ -45,6 +46,7 @@ protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { + VerificaPermisos("Lista de Lotes"); lblTitulo.Text = "LISTA DE LOTES"; habilitaOrdenarEfector(); CargarFiltros(); @@ -54,6 +56,29 @@ protected void Page_Load(object sender, EventArgs e) Response.Redirect("../FinSesion.aspx", false); } + private void VerificaPermisos(string sObjeto) + { + if (Session["idUsuario"] != null) + { + if (Session["s_permiso"] != null) + { + Utility oUtil = new Utility(); + Permiso = oUtil.VerificaPermisos((ArrayList)Session["s_permiso"], sObjeto); + switch (Permiso) + { + case 0: Response.Redirect("../AccesoDenegado.aspx", false); break; + + } + } + else Response.Redirect("../FinSesion.aspx", false); + } + else Response.Redirect("../FinSesion.aspx", false); + } + private int Permiso /*el permiso */ + { + get { return ViewState["Permiso"] == null ? 0 : int.Parse(ViewState["Permiso"].ToString()); } + set { ViewState["Permiso"] = value; } + } private void habilitaOrdenarEfector() { //solo ordeno por efector origen si es subsecretaria diff --git a/WebLab/Derivaciones/LoteList.aspx.designer.cs b/WebLab/Derivaciones/LoteList.aspx.designer.cs index 409c7a8..d1bdbcd 100644 --- a/WebLab/Derivaciones/LoteList.aspx.designer.cs +++ b/WebLab/Derivaciones/LoteList.aspx.designer.cs @@ -7,13 +7,11 @@ // //------------------------------------------------------------------------------ -namespace WebLab.Derivaciones -{ - - - public partial class LoteList - { - +namespace WebLab.Derivaciones { + + + public partial class LoteList { + /// /// pnlTitulo control. /// @@ -22,7 +20,7 @@ public partial class LoteList /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl pnlTitulo; - + /// /// lblTitulo control. /// @@ -31,7 +29,7 @@ public partial class LoteList /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblTitulo; - + /// /// txtFechaDesde control. /// @@ -40,7 +38,7 @@ public partial class LoteList /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlInputText txtFechaDesde; - + /// /// txtFechaHasta control. /// @@ -49,7 +47,7 @@ public partial class LoteList /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlInputText txtFechaHasta; - + /// /// txtLoteDesde control. /// @@ -58,7 +56,7 @@ public partial class LoteList /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.TextBox txtLoteDesde; - + /// /// txtLoteHasta control. /// @@ -67,7 +65,7 @@ public partial class LoteList /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.TextBox txtLoteHasta; - + /// /// ddlEstado control. /// @@ -76,7 +74,7 @@ public partial class LoteList /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.DropDownList ddlEstado; - + /// /// ddlEfectorOrigen control. /// @@ -85,7 +83,7 @@ public partial class LoteList /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.DropDownList ddlEfectorOrigen; - + /// /// ddlEfectorDestino control. /// @@ -94,16 +92,7 @@ public partial class LoteList /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.DropDownList ddlEfectorDestino; - - /// - /// pnlControl control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Panel pnlControl; - + /// /// cvValidar control. /// @@ -112,7 +101,7 @@ public partial class LoteList /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.CustomValidator cvValidar; - + /// /// pnlLista control. /// @@ -121,7 +110,7 @@ public partial class LoteList /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Panel pnlLista; - + /// /// btnBuscar control. /// @@ -130,7 +119,7 @@ public partial class LoteList /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Button btnBuscar; - + /// /// CantidadRegistros control. /// @@ -139,7 +128,7 @@ public partial class LoteList /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label CantidadRegistros; - + /// /// CurrentPageLabel control. /// @@ -148,7 +137,7 @@ public partial class LoteList /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label CurrentPageLabel; - + /// /// gvLista control. /// @@ -157,7 +146,7 @@ public partial class LoteList /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.GridView gvLista; - + /// /// pnlImpresion control. /// @@ -166,7 +155,7 @@ public partial class LoteList /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Panel pnlImpresion; - + /// /// lnkExcel control. /// diff --git a/WebLab/ParametrosEdit.aspx b/WebLab/ParametrosEdit.aspx index 857aba6..4090aec 100644 --- a/WebLab/ParametrosEdit.aspx +++ b/WebLab/ParametrosEdit.aspx @@ -1335,6 +1335,7 @@ $("#tabContainer").tabs({ selected: currTab }); Origen Sector Nro. Origen + Tipo de Muestra diff --git a/WebLab/ParametrosEdit.aspx.cs b/WebLab/ParametrosEdit.aspx.cs index 860b4ff..f2877f9 100644 --- a/WebLab/ParametrosEdit.aspx.cs +++ b/WebLab/ParametrosEdit.aspx.cs @@ -418,6 +418,8 @@ private void MostrarDatosCodigoBarrasMicrobiologia() chkProtocolo2.Items[3].Selected = oRegistro.ProtocoloSector; chkProtocolo2.Items[4].Selected = oRegistro.ProtocoloNumeroOrigen; + chkProtocolo2.Items[5].Selected = oRegistro.ProtocoloTipoMuestra; + chkPaciente2.Items[0].Selected = oRegistro.PacienteApellido; chkPaciente2.Items[1].Selected = oRegistro.PacienteSexo; @@ -1351,6 +1353,7 @@ private void GuardarCDsMicrobiologia(ConfiguracionCodigoBarra oRegistro, TipoSer oRegistro.ProtocoloOrigen = chkProtocolo2.Items[2].Selected; oRegistro.ProtocoloSector = chkProtocolo2.Items[3].Selected; oRegistro.ProtocoloNumeroOrigen = chkProtocolo2.Items[4].Selected; + oRegistro.ProtocoloTipoMuestra = chkProtocolo2.Items[5].Selected; oRegistro.PacienteApellido = chkPaciente2.Items[0].Selected; oRegistro.PacienteSexo = chkPaciente2.Items[1].Selected; diff --git a/WebLab/Placas/PlacaResultado.aspx.cs b/WebLab/Placas/PlacaResultado.aspx.cs index 90543fb..aa02a1a 100644 --- a/WebLab/Placas/PlacaResultado.aspx.cs +++ b/WebLab/Placas/PlacaResultado.aspx.cs @@ -1573,7 +1573,7 @@ private void MostrarDatosPlaca() lblFIS.ForeColor = Color.Red; lblFIS.Visible = true; - string res = arr[5].ToString(); + string res = arr[5].ToString().ToUpper();//compatible para resultado informado en minusculas @@ -1806,7 +1806,7 @@ private void MostrarDatosPlaca() - string res = arr[5].ToString(); + string res = arr[5].ToString().ToUpper();///compatible mayuscula y miniscula Control control5 = Master.FindControl("ContentPlaceHolder1").FindControl("pnlAlplex").FindControl(lblresultado); Label lblResultado = (Label)control5; lblResultado.Text = lblResultado.Text.Replace("Label", ""); @@ -1903,7 +1903,7 @@ private void MostrarDatosPlaca() lblCt1.Text = arrct[0].ToString(); - res = arr[5].ToString().ToUpper(); + res = arr[5].ToString().ToUpper();///compatibla may y min @@ -2251,7 +2251,7 @@ inner join lab_detalletipoplaca as DTP with (nolock) on DTP.iditem= DP.iditem an return ct; } - private string getDeterminacion(string tipoct) + private string getDeterminacion(string tipoct) { string m_strSQL = ""; //string ct = ""; @@ -2277,7 +2277,7 @@ private string getDeterminacion(string tipoct) } return codigo; } - + private string getNumeroProtocolo(int idDetalleProtocolo) { try @@ -3029,9 +3029,9 @@ private void GrabarResultadito(Protocolo oProtocolo, Item oItem, string valorIte default: if (valorItem != "") { - if (valorItem == "SE DETEC") + if (valorItem.ToUpper() == "SE DETEC") oDetalle.ResultadoCar = oDetalle.IdSubItem.GetResultado(valorItem); - if (valorItem == "NO SE DET") + if (valorItem.ToUpper() == "NO SE DET") oDetalle.ResultadoCar = oDetalle.IdSubItem.GetResultado(valorItem); oDetalle.ConResultado = true; } @@ -3094,7 +3094,7 @@ private void GrabarResultadito(Protocolo oProtocolo, Item oItem, string valorIte if (valorItem.Length > 10) res = valorItem.Substring(0, 10); - if ((oDetalle.IdItem.Codigo == oCon.CodigoCovid) && (oDetalle.IdProtocolo.IdPaciente.IdPaciente > 0) && (res == "SE DET"))// GENOMA DE COVID-19")) + if ((oDetalle.IdItem.Codigo == oCon.CodigoCovid) && (oDetalle.IdProtocolo.IdPaciente.IdPaciente > 0) && (res.ToUpper() == "SE DET"))// GENOMA DE COVID-19")) { if (oCon.PreValida) { @@ -3708,7 +3708,7 @@ private void GuardarResultado(string m_idDetalleProtocolo, string valorItem ) // if (valorItem.Length > 10) res = valorItem.Substring(0, 10); - if ((oDetalle.IdItem.Codigo == oCon.CodigoCovid) && (oDetalle.IdProtocolo.IdPaciente.IdPaciente > 0) && (res == "SE DETECTA"))// GENOMA DE COVID-19")) + if ((oDetalle.IdItem.Codigo == oCon.CodigoCovid) && (oDetalle.IdProtocolo.IdPaciente.IdPaciente > 0) && (res.ToUpper() == "SE DETECTA"))// GENOMA DE COVID-19")) { if (oCon.PreValida) diff --git a/WebLab/Placas/PlacaResultadoMixta.aspx.cs b/WebLab/Placas/PlacaResultadoMixta.aspx.cs index 2328398..8049544 100644 --- a/WebLab/Placas/PlacaResultadoMixta.aspx.cs +++ b/WebLab/Placas/PlacaResultadoMixta.aspx.cs @@ -575,7 +575,7 @@ private void MostrarDatosPlaca() lblFIS.ForeColor = Color.Red; lblFIS.Visible = true; - string res = arr[5].ToString(); + string res = arr[5].ToString().ToUpper(); @@ -1527,12 +1527,12 @@ private void GuardarResultado(string m_idDetalleProtocolo, string valorItem ) // default: if (valorItem != "") { - if (valorItem == "SE DETECTA") + if (valorItem.ToUpper() == "SE DETECTA") { valorItem = "SE DETECT"; oDetalle.ResultadoCar = oDetalle.IdSubItem.GetResultado(valorItem); } - if (valorItem == "NO SE DETECTA") + if (valorItem.ToUpper() == "NO SE DETECTA") { valorItem = "NO SE DETECT"; oDetalle.ResultadoCar = oDetalle.IdSubItem.GetResultado(valorItem); @@ -1598,7 +1598,7 @@ private void GuardarResultado(string m_idDetalleProtocolo, string valorItem ) // if (valorItem.Length > 10) res = valorItem.Substring(0, 10); - if ((oDetalle.IdItem.Codigo == oCon.CodigoCovid) && (oDetalle.IdProtocolo.IdPaciente.IdPaciente > 0) && (res == "SE DETECTA"))// GENOMA DE COVID-19")) + if ((oDetalle.IdItem.Codigo == oCon.CodigoCovid) && (oDetalle.IdProtocolo.IdPaciente.IdPaciente > 0) && (res.ToUpper() == "SE DETECTA"))// GENOMA DE COVID-19")) { if (oCon.PreValida) diff --git a/WebLab/Protocolos/DefaultFFEE.aspx.cs b/WebLab/Protocolos/DefaultFFEE.aspx.cs index 4f2a728..e3483ce 100644 --- a/WebLab/Protocolos/DefaultFFEE.aspx.cs +++ b/WebLab/Protocolos/DefaultFFEE.aspx.cs @@ -358,7 +358,7 @@ private string Validacion(FFEE respuesta_d) Paciente oPaciente = new Paciente(); oPaciente = (Paciente)oPaciente.Get(typeof(Paciente), id); - string tieneingreso = oPaciente.GetFechaProtocolosReciente("3", idTipoMuestra); + string tieneingreso = oPaciente.GetFechaProtocolosRecientexEfector("3", idTipoMuestra, oUser.IdEfector.IdEfector.ToString()); if (tieneingreso == DateTime.Now.ToShortDateString()) errores += " El paciente ya tiene ingresada la misma muestra en el día de la fecha. Verifique"; diff --git a/WebLab/Protocolos/DefaultFFEE2.aspx.cs b/WebLab/Protocolos/DefaultFFEE2.aspx.cs index ef9a26f..c9b736b 100644 --- a/WebLab/Protocolos/DefaultFFEE2.aspx.cs +++ b/WebLab/Protocolos/DefaultFFEE2.aspx.cs @@ -400,7 +400,7 @@ private string Validacion(FFEE respuesta_d) Paciente oPaciente = new Paciente(); oPaciente = (Paciente)oPaciente.Get(typeof(Paciente), id); - string tieneingreso = oPaciente.GetFechaProtocolosReciente("3", idTipoMuestra); + string tieneingreso = oPaciente.GetFechaProtocolosRecientexEfector("3", idTipoMuestra, oUser.IdEfector.IdEfector.ToString()); if (tieneingreso == DateTime.Now.ToShortDateString()) errores += " El paciente ya tiene ingresada la misma muestra en el día de la fecha. Verifique"; @@ -612,7 +612,8 @@ private bool GuardaFicha(FFEE respuesta_d) try { ///guarda ficha para recuperar en protocoloedit2 - string det= BuscarDeterminaciones(respuesta_d.Tipo_ficha); + int ID_ORIGEN = 0; + string det = BuscarDeterminaciones(respuesta_d.Tipo_ficha); /* if (det == "") return false; else @@ -652,6 +653,25 @@ private bool GuardaFicha(FFEE respuesta_d) oRegistro.IdTipoMuestra = int.Parse(idTipoMuestra); } } + + if (respuesta_d.requerimientocuidado != null) + { + if (respuesta_d.requerimientocuidado.ToUpper() == "AMBULATORIO") + ID_ORIGEN = 1; + + if (respuesta_d.requerimientocuidado.ToUpper().Contains("INTERNA")) + ID_ORIGEN = 2; + } + else + ID_ORIGEN = 1; + if (respuesta_d.Tipo_ficha == "UMA") ID_ORIGEN = 1; //AMBULATORIO + + oRegistro.IdOrigen = ID_ORIGEN; + if (respuesta_d.fechamuestra == null) + oRegistro.FechaToma = DateTime.Parse(respuesta_d.Fecha); + else + oRegistro.FechaToma = DateTime.Parse(respuesta_d.fechamuestra); + oRegistro.Analisis = det;// BuscarDeterminaciones(respuesta_d.Tipo_ficha); oRegistro.Save(); return true; @@ -674,22 +694,22 @@ private void VerificarSiExisteFFE(string _id) oFicha.Delete(); } - private void GuardarDiagnosticos(Business.Data.Laboratorio.Protocolo oRegistro) - { - ///Caro: poner diagnsotico por defecto segun tipo de ficha - - ProtocoloDiagnostico oDetalle = new ProtocoloDiagnostico(); - oDetalle.IdProtocolo = oRegistro; - oDetalle.IdEfector = oRegistro.IdEfector; - if ((oRegistro.IdCaracter==1) || (oRegistro.IdCaracter == 26)) - oDetalle.IdDiagnostico = 3562; - else - oDetalle.IdDiagnostico = 12458; // 999.7 sin registro - oDetalle.Save(); + //private void GuardarDiagnosticos(Business.Data.Laboratorio.Protocolo oRegistro) + //{ + // ///Caro: poner diagnsotico por defecto segun tipo de ficha + + // ProtocoloDiagnostico oDetalle = new ProtocoloDiagnostico(); + // oDetalle.IdProtocolo = oRegistro; + // oDetalle.IdEfector = oRegistro.IdEfector; + // if ((oRegistro.IdCaracter==1) || (oRegistro.IdCaracter == 26)) + // oDetalle.IdDiagnostico = 3562; + // else + // oDetalle.IdDiagnostico = 12458; // 999.7 sin registro + // oDetalle.Save(); - } + //} private int GuardarProtocolo(Paciente oPaciente, FFEE respuesta_d) @@ -897,7 +917,7 @@ private int GuardarProtocolo(Paciente oPaciente, FFEE respuesta_d) //if (grabarincidenciafuc) // oRegistro.GeneraIncidenciaAutomatica(47, int.Parse(Session["idUsuario"].ToString())); //else - GuardarDiagnosticos(oRegistro); + // GuardarDiagnosticos(oRegistro); //if ((!grabarincidenciafis) && (!grabarincidenciafuc)) @@ -941,81 +961,93 @@ private SectorServicio BuscarSectorDefecto() private void CargarTipoFichas() { - // Configuracion oCon = new Configuracion(); oCon = (Configuracion)oCon.Get(typeof(Configuracion), 1); - /* System.Net.ServicePointManager.SecurityProtocol = - System.Net.SecurityProtocolType.Tls12; - string URL = "";// ConfigurationManager.AppSettings["urlffeeandes"].ToString(); - URL = URL + "https://app.andes.gob.ar/api/bi/queries/listado-tiposFichas/json"; - - string s_token = ConfigurationManager.AppSettings["tokenffeeandes"].ToString(); - - - JavaScriptSerializer jsonSerializer = new JavaScriptSerializer(); - HttpWebRequest request; - request = WebRequest.Create(URL) as HttpWebRequest; - request.Timeout = 10 * 1000; - request.Method = "GET"; - - request.ContentType = "application/json"; - request.Headers.Add("Authorization", s_token); + Utility oUtil = new Utility(); + //Configuracion oC = new Configuracion(); oC = (Configuracion)oC.Get(typeof(Configuracion), "IdConfiguracion", 1); + string connReady = ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString; ///Performance: conexion de solo lectura + ///Carga de grupos de numeración solo si el tipo de numeración es 2: por Grupos + string m_ssql = "SELECT nombre as nombre, codigo FROM LAB_TipoFicha with (nolock) WHERE (baja = 0) order by nombre"; - HttpWebResponse response = request.GetResponse() as HttpWebResponse; - StreamReader reader = new StreamReader(response.GetResponseStream()); - string body = reader.ReadToEnd(); - body = body.Replace("[", "").Replace("]", ""); - if (body != "") - { - //string fileName = "WeatherForecast.json"; - //string jsonString = jsonSerializer.Serialize(body); - //File.WriteAllText(fileName, jsonString); + oUtil.CargarCombo(ddlTipoFicha, m_ssql, "codigo", "nombre", connReady); + ddlTipoFicha.Items.Insert(0, new ListItem("Seleccione", "0")); - //string json = JsonConvert.SerializeObject(body); - //List respuesta_d = jsonSerializer.Deserialize(body); ; - //foreach (var f in respuesta_d.ficha) - //{ - // ddlTipoFicha.Items.Add(f.ficha.nombre); - //} - // // Recorremos el array de datos del JSON - - - [ - { - "id": "600ceaf8220da69a4bbe7223", - "nombre": "covid19" - }, - { - "id": "6257096489e70952a20eadc3", - "nombre": "UMA" - }, - { - "id": "648ca796698f662a8932649e", - "nombre": "Intento de Suicidio" - }, - { - "id": "6643a1abb428bb3f28064b30", - "nombre": "Hantavirus" - }, - { - "id": "66eebc26eea39c3da812ba4e", - "nombre": "Dengue" - }, - { - "id": "66df637dd1a25e5b8d7eb8b8", - "nombre": "Sifilis" - } -] - */ - ddlTipoFicha.Items.Insert(0, new ListItem("Seleccione", "0")); + // Configuracion oCon = new Configuracion(); oCon = (Configuracion)oCon.Get(typeof(Configuracion), 1); + /* System.Net.ServicePointManager.SecurityProtocol = + System.Net.SecurityProtocolType.Tls12; + string URL = "";// ConfigurationManager.AppSettings["urlffeeandes"].ToString(); + URL = URL + "https://app.andes.gob.ar/api/bi/queries/listado-tiposFichas/json"; + + string s_token = ConfigurationManager.AppSettings["tokenffeeandes"].ToString(); + + + JavaScriptSerializer jsonSerializer = new JavaScriptSerializer(); + + HttpWebRequest request; + request = WebRequest.Create(URL) as HttpWebRequest; + request.Timeout = 10 * 1000; + request.Method = "GET"; + + request.ContentType = "application/json"; + request.Headers.Add("Authorization", s_token); + + + HttpWebResponse response = request.GetResponse() as HttpWebResponse; + StreamReader reader = new StreamReader(response.GetResponseStream()); + string body = reader.ReadToEnd(); + body = body.Replace("[", "").Replace("]", ""); + if (body != "") + { + //string fileName = "WeatherForecast.json"; + //string jsonString = jsonSerializer.Serialize(body); + //File.WriteAllText(fileName, jsonString); + + + //string json = JsonConvert.SerializeObject(body); + //List respuesta_d = jsonSerializer.Deserialize(body); ; + //foreach (var f in respuesta_d.ficha) + //{ + // ddlTipoFicha.Items.Add(f.ficha.nombre); + //} + // // Recorremos el array de datos del JSON + + + [ + { + "id": "600ceaf8220da69a4bbe7223", + "nombre": "covid19" + }, + { + "id": "6257096489e70952a20eadc3", + "nombre": "UMA" + }, + { + "id": "648ca796698f662a8932649e", + "nombre": "Intento de Suicidio" + }, + { + "id": "6643a1abb428bb3f28064b30", + "nombre": "Hantavirus" + }, + { + "id": "66eebc26eea39c3da812ba4e", + "nombre": "Dengue" + }, + { + "id": "66df637dd1a25e5b8d7eb8b8", + "nombre": "Sifilis" + } + ] + + ddlTipoFicha.Items.Insert(0, new ListItem("Seleccione", "0")); ddlTipoFicha.Items.Insert(1, new ListItem("covid19", "600ceaf8220da69a4bbe7223"));// es micro y para labo central y genera automaticamente ficha ddlTipoFicha.Items.Insert(2, new ListItem("UMA", "6257096489e70952a20eadc3"));// es micro y para labo central y genera automaticamente ficha ddlTipoFicha.Items.Insert(3, new ListItem("Intento de Suicidio", "648ca796698f662a8932649e")); ddlTipoFicha.Items.Insert(4, new ListItem("Hantavirus", "6643a1abb428bb3f28064b30"));// es micro y para labo central y genera automaticamente ficha ddlTipoFicha.Items.Insert(5, new ListItem("Dengue", "66eebc26eea39c3da812ba4e"));// es Labo y micro y para todos y NO genera automaticamente ficha ddlTipoFicha.Items.Insert(6, new ListItem("Sifilis", "66df637dd1a25e5b8d7eb8b8"));// es Labo y micro y para todos y NO genera automaticamente ficha - //} + //} */ } private void CargarEfectores() diff --git a/WebLab/Protocolos/ProtocoloEdit2.aspx b/WebLab/Protocolos/ProtocoloEdit2.aspx index 8825baf..12b331e 100644 --- a/WebLab/Protocolos/ProtocoloEdit2.aspx +++ b/WebLab/Protocolos/ProtocoloEdit2.aspx @@ -455,7 +455,7 @@ + ToolTip="Seleccione el caracter" TabIndex="14" Width="150px" class="form-control input-sm"> @@ -544,7 +544,7 @@ diff --git a/WebLab/Protocolos/ProtocoloEdit2.aspx.cs b/WebLab/Protocolos/ProtocoloEdit2.aspx.cs index 40539b2..534a3f1 100644 --- a/WebLab/Protocolos/ProtocoloEdit2.aspx.cs +++ b/WebLab/Protocolos/ProtocoloEdit2.aspx.cs @@ -349,15 +349,15 @@ private void CargarFFEE( string idFicha) lblTitulo.Visible = false; txtFecha.Value = DateTime.Now.ToShortDateString(); txtFechaOrden.Value = oRegistro.Fecha.ToShortDateString();///fecha en la ficha - txtFechaTomaMuestra.Value = DateTime.Now.ToShortDateString(); + txtFechaTomaMuestra.Value = oRegistro.FechaToma.ToShortDateString();///fecha toma muestra pnlNavegacion.Visible = false; btnCancelar.Text = "Cancelar"; btnCancelar.Width = Unit.Pixel(80); - txtNumeroOrigen.Text = oRegistro.Identificadorlabo; + txtNumeroOrigen2.Text = oRegistro.Identificadorlabo;//numero de pcr va en hispado o numero de origen 2 ddlEfector.SelectedValue = oRegistro.IdEfectorSolicitante.IdEfector.ToString(); SelectedEfector(); - ddlOrigen.SelectedValue = "1";// oRegistro.IdOrigen.IdOrigen.ToString();//ver el origen + ddlOrigen.SelectedValue = oRegistro.IdOrigen.ToString(); ddlSectorServicio.SelectedValue = oSector.IdSectorServicio.ToString();// oRegistro.IdSector.IdSectorServicio.ToString(); //ver el servicio ddlPrioridad.SelectedValue = "1";// oRegistro.IdPrioridad.IdPrioridad.ToString(); //if (oRegistro.IdTipoServicio.IdTipoServicio == 3) ddlMuestra.SelectedValue = oRegistro.IdMuestra.ToString(); @@ -373,7 +373,7 @@ private void CargarFFEE( string idFicha) ddlEspecialista.UpdateAfterCallBack = true; ddlMuestra.SelectedValue = oRegistro.IdTipoMuestra.ToString(); - + ddlOrigen.SelectedValue = oRegistro.IdOrigen.ToString(); txtFechaFIS.Value= oRegistro.FechaSintoma.ToShortDateString(); if (oRegistro.Analisis != "") @@ -383,18 +383,43 @@ private void CargarFFEE( string idFicha) CargarDiagnosticoFicha(oRegistro.TipoFicha); + ////caracteres segun laborotorio central + string idCar = BuscarCaracter(oRegistro.Clasificacion); + if (oRegistro.TipoFicha == "UMA") idCar = "26"; + + ddlCaracter.SelectedValue = idCar; } } + private string BuscarCaracter(string clasificacion) + { + Utility oUtil = new Utility(); + ///Carga del combo de determinaciones + string m_ssql = "select top 1 idsil from Rel_andes with (nolock) where tipo='Caracter' and nombreandes='"+ clasificacion+"'"; + NHibernate.Cfg.Configuration oConf = new NHibernate.Cfg.Configuration(); + String strconn = oConf.GetProperty("hibernate.connection.connection_string"); + SqlDataAdapter da = new SqlDataAdapter(m_ssql, strconn); + DataSet ds = new DataSet(); + da.Fill(ds, "T"); + + + string sTareas = ""; + for (int i = 0; i < ds.Tables["T"].Rows.Count; i++) + { + sTareas = ds.Tables["T"].Rows[i][0].ToString(); + } + return sTareas; + + } private void CargarDiagnosticoFicha(string Tipo_ficha) {///CARO poner en la tabla las determinaciones por ficha dengue /sifilis // Utility oUtil = new Utility(); ///Carga del combo de determinaciones - string m_ssql = @"select nombresil from Rel_andes where tipo='Diagnostico' and nombreAndes='Dengue' "; + string m_ssql = @"select nombresil from Rel_andes where tipo='Diagnostico' and nombreAndes='"+ Tipo_ficha + "' "; NHibernate.Cfg.Configuration oConf = new NHibernate.Cfg.Configuration(); String strconn = oConf.GetProperty("hibernate.connection.connection_string"); @@ -704,6 +729,7 @@ private void CargarDeterminacionesTurno() ISession m_session = NHibernateHttpModule.CurrentSession; ICriteria crit = m_session.CreateCriteria(typeof(TurnoItem)); crit.Add(Expression.Eq("IdTurno", oTurno)); + crit.AddOrder(Order.Asc("IdTurnoItem"));// correccion para ingreso ordenado IList items = crit.List(); string pivot = ""; @@ -731,7 +757,8 @@ private void CargarDeterminacionesTurno() //ISession m_session = NHibernateHttpModule.CurrentSession; ICriteria crit2 = m_session.CreateCriteria(typeof(TurnoDiagnostico)); crit2.Add(Expression.Eq("IdTurno", oTurno)); - + crit2.AddOrder(Order.Asc("IdTurnoDiagnostico"));// correccion para ingreso ordenado + IList diagnosticos = crit2.List(); foreach (TurnoDiagnostico oDiag in diagnosticos) @@ -1704,7 +1731,9 @@ protected void btnGuardar_Click(object sender, EventArgs e) (Request["Operacion"].ToString() == "AltaDerivacion") || (Request["Operacion"].ToString() == "AltaDerivacionMultiEfector") || (Request["Operacion"].ToString() == "AltaDerivacionMultiEfectorLote") || - (Request["Operacion"].ToString() == "AltaPeticion")) + (Request["Operacion"].ToString() == "AltaPeticion") || + (Request["Operacion"].ToString() == "AltaFFEE") ///desde ficha electronica + ) { diff --git a/WebLab/Resultados/ResultadosaSisa2.aspx b/WebLab/Resultados/ResultadosaSisa2.aspx index 57a2493..1c4afdf 100644 --- a/WebLab/Resultados/ResultadosaSisa2.aspx +++ b/WebLab/Resultados/ResultadosaSisa2.aspx @@ -135,6 +135,10 @@ Efector: + + + +         @@ -229,7 +233,10 @@ Efector: - + + + + diff --git a/WebLab/Resultados/ResultadosaSisa2.aspx.cs b/WebLab/Resultados/ResultadosaSisa2.aspx.cs index c6f0b2f..a2dfd54 100644 --- a/WebLab/Resultados/ResultadosaSisa2.aspx.cs +++ b/WebLab/Resultados/ResultadosaSisa2.aspx.cs @@ -204,78 +204,17 @@ private void BorrarLineaTemporalesdesdeAPI(string ideventocaso) - private void ProcesarLinea(string linea) - { - try - { - string[] arr = linea.Split((";").ToCharArray()); - - - if (arr.Length >= 1) - { - - - string idevento= arr[0].ToString(); - string documento = arr[1].ToString().Substring(0, 3); // Replace ("DNI","").Replace("IND","").Trim(); - if (documento == "DNI") - { - string nombre = arr[2].ToString(); - string idDerivacion = arr[9].ToString(); - string idEventoMuestra = arr[15].ToString(); - documento= arr[1].ToString().Replace ("DNI","").Trim(); - documento = documento.Replace("F", "").Replace("M", "").Trim(); - DateTime fechatoma = DateTime.Parse(arr[14].ToString().Trim()); - - string ftoma= fechatoma.ToString("yyyy-MM-dd"); - SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; - - string query = @" -INSERT INTO [dbo].[LAB_Temp_ResultadoSISA] - ([idevento] - ,[dni] - ,[nombre] - ,[idDerivacion] - ,[idEventoMuestra] - ,idUsuario - ,fechatoma - ) - VALUES - ( " + idevento + ",'" + documento + "','" + nombre + "'," + idDerivacion + "," + idEventoMuestra + "," + Session["idUsuario"].ToString() +",'" + ftoma + "' )"; - SqlCommand cmd = new SqlCommand(query, conn); - - - int idres = Convert.ToInt32(cmd.ExecuteScalar()); - - } - - } - - } - catch (Exception ex) - { - string exception = ""; - - exception = ex.Message + "
"; - - // estatus.Text = "hay lineas del archivo que han sido ignoradas por no tener el formato esperado por el sistema." + exception; - } - } + protected void btnGuardar_Click(object sender, EventArgs e) { - //if (ddlItem.SelectedValue == "1") //derivaciones sin responder - - //{ - // SubirSISA(); - - //} - //if (ddlItem.SelectedValue == "2") //eventos desde sil + SubirSISAdesdeAPI(); } - private bool ProcesaSISA(DetalleProtocolo oDetalle, string res, string idcasosisa) + private bool ProcesaSISA(DetalleProtocolo oDetalle, string idcasosisa) { bool generacaso = false; @@ -284,7 +223,7 @@ private bool ProcesaSISA(DetalleProtocolo oDetalle, string res, string idcasosis if (int.Parse(idcasosisa)==0) { // generacaso = GenerarCasoSISA(oDetalle, res); - generacaso = GenerarCasoSISA_V2(oDetalle, res); + generacaso = GenerarCasoSISA_V2(oDetalle); } @@ -301,7 +240,7 @@ private bool ProcesaSISA(DetalleProtocolo oDetalle, string res, string idcasosis GenerarMuestraSISA(oDetalle.IdProtocolo, oDetalle.IdProtocolo.IdCasoSISA); if (oDetalle.IdeventomuestraSISA > 0) - GenerarResultadoSISA(oDetalle, res); + GenerarResultadoSISA(oDetalle); /****/ @@ -561,73 +500,105 @@ private bool GenerarCasoSISA(DetalleProtocolo oDetalle, string res) } - private bool GenerarCasoSISA_V2(DetalleProtocolo oDetalle, string res) + private bool GenerarCasoSISA_V2(DetalleProtocolo oDetalle) { /*Version 2*/ + /*Cambio para que vuelva a buscar los datos en la base y tome los datos desde la grilla*/ System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12; bool generacaso = false; - string caracter = ""; - string idevento = ""; - string nombreevento = ""; - string idclasificacionmanual = ""; - string nombreclasificacionmanual = ""; - string idgrupoevento = ""; - string nombregrupoevento = ""; + //string caracter = ""; + //string idevento = ""; + //string nombreevento = ""; + //string idclasificacionmanual = ""; + //string nombreclasificacionmanual = ""; + //string idgrupoevento = ""; + //string nombregrupoevento = ""; bool seguir = false; - string m_strSQL = ""; + //string m_strSQL = ""; JavaScriptSerializer jsonSerializer = new JavaScriptSerializer(); try { - // query levanta todos los que se generan segun el caracter - m_strSQL = @" select * from LAB_ConfiguracionSISA with (nolock) where idCaracter=" + oDetalle.IdProtocolo.IdCaracter.ToString() + " and idItem= " + oDetalle.IdSubItem.IdItem.ToString(); - // si es contacto se sube==>si es negativo como contacto y si es positivo como sospechoso. - if ((res == "SE DETECTA") && (oDetalle.IdProtocolo.IdCaracter == 4) && (oC.CodigoCovid == oDetalle.IdSubItem.Codigo)) - { - m_strSQL = " select * from LAB_ConfiguracionSISA with (nolock) where idCaracter=1 and idItem= " + oDetalle.IdSubItem.IdItem.ToString(); - } + // // query levanta todos los que se generan segun el caracter + // m_strSQL = @" select * from LAB_ConfiguracionSISA with (nolock) where idCaracter=" + oDetalle.IdProtocolo.IdCaracter.ToString() + " and idItem= " + oDetalle.IdSubItem.IdItem.ToString() + " and idEvento=" + ddlItem.SelectedValue; + // // si es contacto se sube==>si es negativo como contacto y si es positivo como sospechoso. + // if ((res == "SE DETECTA") && (oDetalle.IdProtocolo.IdCaracter == 4) && (oC.CodigoCovid == oDetalle.IdSubItem.Codigo)) + // { + // m_strSQL = " select * from LAB_ConfiguracionSISA with (nolock) where idCaracter=1 and idItem= " + oDetalle.IdSubItem.IdItem.ToString()+ " and idEvento=" + ddlItem.SelectedValue; + // } + + + // m_strSQL += @" and fechavigenciadesde<=convert(date,convert(varchar,getdate(),112)) + //and ( fechavigenciahasta >convert(date,convert(varchar,getdate(),112)) or convert(varchar, fechavigenciahasta, 103) = '01/01/1900') + // and (idorigen=0 or idOrigen=" +oDetalle.IdProtocolo.IdOrigen.IdOrigen.ToString() +")"; + + // //Control de efector solicitante + // //Monitoreo de SARS COV - 2 y OVR en ambulatorios ==> solo aplica para Hospital Heller + // //Demas eventos para todos los efectores solicitantes. + // m_strSQL += @" and (idefectorsolicitante=0 or + // idefectorsolicitante in (" + oDetalle.IdProtocolo.IdEfectorSolicitante.IdEfector.ToString() + "))"; + + // //control de embarzada=s /N + // m_strSQL += @" and soloEmbarazada='" + oDetalle.IdProtocolo.Embarazada.ToString()+"'"; + // ///control de edades + // m_strSQL += @" and ("+oDetalle.IdProtocolo.Edad+" between edadDesde and edadHasta and "+oDetalle.IdProtocolo.UnidadEdad +" = 0) "; + + + // DataSet Ds = new DataSet(); + // // SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; + // SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString); ///Performance: conexion de solo lectura + // SqlDataAdapter adapter = new SqlDataAdapter(); + // adapter.SelectCommand = new SqlCommand(m_strSQL, conn); + // adapter.Fill(Ds); + + // DataTable dt = Ds.Tables[0]; + + // for (int i = 0; i < dt.Rows.Count; i++) + // { + // caracter = dt.Rows[i][1].ToString(); + // idevento = dt.Rows[i][2].ToString(); + // HdidEventoSISA.Value = idevento; + // nombreevento = dt.Rows[i][3].ToString(); + // idclasificacionmanual = dt.Rows[i][4].ToString(); + // nombreclasificacionmanual = dt.Rows[i][5].ToString(); + // idgrupoevento = dt.Rows[i][6].ToString(); + // nombregrupoevento = dt.Rows[i][7].ToString(); + // seguir = true; + // break; + // } + - m_strSQL += @" and fechavigenciadesde<=convert(date,convert(varchar,getdate(),112)) -and ( fechavigenciahasta >convert(date,convert(varchar,getdate(),112)) or convert(varchar, fechavigenciahasta, 103) = '01/01/1900') - and (idorigen=0 or idOrigen=" +oDetalle.IdProtocolo.IdOrigen.IdOrigen.ToString() +")"; + //caracter = dt.Rows[i][1].ToString(); + // idevento = dt.Rows[i][2].ToString(); + // HdidEventoSISA.Value = idevento; + // nombreevento = dt.Rows[i][3].ToString(); + // idclasificacionmanual = dt.Rows[i][4].ToString(); + // nombreclasificacionmanual = dt.Rows[i][5].ToString(); + // idgrupoevento = dt.Rows[i][6].ToString(); + // nombregrupoevento = dt.Rows[i][7].ToString(); - //Control de efector solicitante - //Monitoreo de SARS COV - 2 y OVR en ambulatorios ==> solo aplica para Hospital Heller - //Demas eventos para todos los efectores solicitantes. - m_strSQL += @" and (idefectorsolicitante=0 or - idefectorsolicitante in (" + oDetalle.IdProtocolo.IdEfectorSolicitante.IdEfector.ToString() + "))"; + // string idmuestra = gvLista.Rows[row.RowIndex].Cells[8].Text; + // string idtipomuestra = gvLista.Rows[row.RowIndex].Cells[9].Text; + // HdIdMuestra.Value = idmuestra; + // HdIdTipoMuestra.Value = idtipomuestra; - //control de embarzada=s /N - m_strSQL += @" and soloEmbarazada='" + oDetalle.IdProtocolo.Embarazada.ToString()+"'"; - ///control de edades - m_strSQL += @" and ("+oDetalle.IdProtocolo.Edad+" between edadDesde and edadHasta and "+oDetalle.IdProtocolo.UnidadEdad +" = 0) "; + // HdIdPrueba.Value = gvLista.Rows[row.RowIndex].Cells[10].Text; + // HdIdTipoPrueba.Value = gvLista.Rows[row.RowIndex].Cells[11].Text; + // HdidResultadoSISA.Value = gvLista.Rows[row.RowIndex].Cells[12].Text; + // HidItemSIL.Value = gvLista.Rows[row.RowIndex].Cells[15].Text; - DataSet Ds = new DataSet(); - // SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; - SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString); ///Performance: conexion de solo lectura - SqlDataAdapter adapter = new SqlDataAdapter(); - adapter.SelectCommand = new SqlCommand(m_strSQL, conn); - adapter.Fill(Ds); - DataTable dt = Ds.Tables[0]; + // /*nuevos campos recuperados desde la grilla*/ + // HidCaracter.Value = gvLista.Rows[row.RowIndex].Cells[16].Text; + // //idevento = dt.Rows[i][2].ToString(); + // HdidEventoSISA.Value = gvLista.Rows[row.RowIndex].Cells[13].Text; - for (int i = 0; i < dt.Rows.Count; i++) - { - caracter = dt.Rows[i][1].ToString(); - idevento = dt.Rows[i][2].ToString(); - HdidEventoSISA.Value = idevento; - nombreevento = dt.Rows[i][3].ToString(); - idclasificacionmanual = dt.Rows[i][4].ToString(); - nombreclasificacionmanual = dt.Rows[i][5].ToString(); - idgrupoevento = dt.Rows[i][6].ToString(); - nombregrupoevento = dt.Rows[i][7].ToString(); - seguir = true; - break; - } + seguir = true; + //break; if (seguir) { string conexionServicio = oC.UrlServicioSISA; @@ -734,10 +705,11 @@ private bool GenerarCasoSISA_V2(DetalleProtocolo oDetalle, string res) eventoCasoNominal newevento = new eventoCasoNominal { + fechaPapel = fnpapel, // "10-12-2019", - idGrupoEvento = idgrupoevento, - idEvento = idevento, // "77", - idClasificacionManualCaso = idclasificacionmanual, // "22" + idGrupoEvento = HidGrupoEvento.Value,//idgrupoevento, + idEvento = HdidEventoSISA.Value ,///idevento, // "77", + idClasificacionManualCaso = HidClasificacionManual.Value,/// idclasificacionmanual, // "22" idEstablecimientoCarga = s_idestablecimiento, //prod: "51580352167442", }; @@ -954,7 +926,7 @@ private void GenerarMuestraSISA(Protocolo protocolo, int idCasoSISA) } - private void GenerarResultadoSISA(DetalleProtocolo oDetalle, string resul ) + private void GenerarResultadoSISA(DetalleProtocolo oDetalle ) { System.Net.ServicePointManager.SecurityProtocol = @@ -979,27 +951,27 @@ private void GenerarResultadoSISA(DetalleProtocolo oDetalle, string resul ) { - // query levanta todos los que se generan segun el caracter - string m_strSQL = " select * from LAB_ConfiguracionSISA with (nolock) where idCaracter=" + oDetalle.IdProtocolo.IdCaracter.ToString() + " and idItem= " + oDetalle.IdSubItem.IdItem.ToString(); +// // query levanta todos los que se generan segun el caracter +// string m_strSQL = " select * from LAB_ConfiguracionSISA with (nolock) where idCaracter=" + oDetalle.IdProtocolo.IdCaracter.ToString() + " and idItem= " + oDetalle.IdSubItem.IdItem.ToString(); - // si es contacto se sube==>si es negativo como contacto y si es positivo como sospechoso. - if ((resul == "SE DETECTA") && (oDetalle.IdProtocolo.IdCaracter == 4) && (oC.CodigoCovid == oDetalle.IdSubItem.Codigo)) - { - m_strSQL = " select * from LAB_ConfiguracionSISA with (nolock) where idCaracter=1 and idItem= " + oDetalle.IdSubItem.IdItem.ToString(); - } - m_strSQL += @" and fechavigenciadesde<=convert(date,convert(varchar,getdate(),112)) -and ( fechavigenciahasta >convert(date,convert(varchar,getdate(),112)) or convert(varchar, fechavigenciahasta, 103) = '01/01/1900') - and (idorigen=0 or idOrigen=" + oDetalle.IdProtocolo.IdOrigen.IdOrigen.ToString() + ")"; +// // si es contacto se sube==>si es negativo como contacto y si es positivo como sospechoso. +// if ((resul == "SE DETECTA") && (oDetalle.IdProtocolo.IdCaracter == 4) && (oC.CodigoCovid == oDetalle.IdSubItem.Codigo)) +// { +// m_strSQL = " select * from LAB_ConfiguracionSISA with (nolock) where idCaracter=1 and idItem= " + oDetalle.IdSubItem.IdItem.ToString(); +// } +// m_strSQL += @" and fechavigenciadesde<=convert(date,convert(varchar,getdate(),112)) +//and ( fechavigenciahasta >convert(date,convert(varchar,getdate(),112)) or convert(varchar, fechavigenciahasta, 103) = '01/01/1900') +// and (idorigen=0 or idOrigen=" + oDetalle.IdProtocolo.IdOrigen.IdOrigen.ToString() + ")"; - //Control de efector solicitante - //Monitoreo de SARS COV - 2 y OVR en ambulatorios ==> solo aplica para Hospital Heller - //Demas eventos para todos los efectores solicitantes. - m_strSQL += @" and (idefectorsolicitante=0 or idefectorsolicitante in (" + oDetalle.IdProtocolo.IdEfectorSolicitante.IdEfector.ToString() + "))"; - //control de embarzada=s /N - m_strSQL += @" and soloEmbarazada='" + oDetalle.IdProtocolo.Embarazada.ToString() + "'"; - ///control de edades - m_strSQL += @" and (" + oDetalle.IdProtocolo.Edad + " between edadDesde and edadHasta and " + oDetalle.IdProtocolo.UnidadEdad + " = 0) "; +// //Control de efector solicitante +// //Monitoreo de SARS COV - 2 y OVR en ambulatorios ==> solo aplica para Hospital Heller +// //Demas eventos para todos los efectores solicitantes. +// m_strSQL += @" and (idefectorsolicitante=0 or idefectorsolicitante in (" + oDetalle.IdProtocolo.IdEfectorSolicitante.IdEfector.ToString() + "))"; +// //control de embarzada=s /N +// m_strSQL += @" and soloEmbarazada='" + oDetalle.IdProtocolo.Embarazada.ToString() + "'"; +// ///control de edades +// m_strSQL += @" and (" + oDetalle.IdProtocolo.Edad + " between edadDesde and edadHasta and " + oDetalle.IdProtocolo.UnidadEdad + " = 0) "; string idestablecimientodiagnostico = oDetalle.IdProtocolo.IdEfector.CodigoSISA;///.IdEfectorSolicitante.CodigoSISA; @@ -1008,23 +980,23 @@ private void GenerarResultadoSISA(DetalleProtocolo oDetalle, string resul ) ////idestablecimientodiagnostico = "107093"; - DataSet Ds = new DataSet(); - // SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; - SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString); ///Performance: conexion de solo lectura - SqlDataAdapter adapter = new SqlDataAdapter(); - adapter.SelectCommand = new SqlCommand(m_strSQL, conn); - adapter.Fill(Ds); + //DataSet Ds = new DataSet(); + //// SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; + //SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString); ///Performance: conexion de solo lectura + //SqlDataAdapter adapter = new SqlDataAdapter(); + //adapter.SelectCommand = new SqlCommand(m_strSQL, conn); + //adapter.Fill(Ds); - DataTable dt = Ds.Tables[0]; + //DataTable dt = Ds.Tables[0]; - for (int i = 0; i < dt.Rows.Count; i++) - { + //for (int i = 0; i < dt.Rows.Count; i++) + //{ - HdidEventoSISA.Value = dt.Rows[i][2].ToString(); + // HdidEventoSISA.Value = dt.Rows[i][2].ToString(); - break; - } + // break; + //} int id_resultado_a_informar = int.Parse(HdidResultadoSISA.Value); int idevento = int.Parse(HdidEventoSISA.Value); @@ -1119,7 +1091,7 @@ private void SubirSISAdesdeAPI() int i = 0; foreach (GridViewRow row in gvLista.Rows) { - string idItem = ddlItem.SelectedValue.ToString(); + string idItem = ddlItem.SelectedValue.ToString();// idevento // string res = gvLista.Rows[row.RowIndex].Cells[6].Text; ////string idderivacion = gvLista.Rows[row.RowIndex].Cells[4].Text; @@ -1134,6 +1106,20 @@ private void SubirSISAdesdeAPI() HdidResultadoSISA.Value = gvLista.Rows[row.RowIndex].Cells[12].Text; HidItemSIL.Value= gvLista.Rows[row.RowIndex].Cells[15].Text; + + /*nuevos campos recuperados desde la grilla*/ + HidCaracter.Value = gvLista.Rows[row.RowIndex].Cells[16].Text;// por ahora no se usa para interoperar---vER!! + //idevento = dt.Rows[i][2].ToString(); + HdidEventoSISA.Value = gvLista.Rows[row.RowIndex].Cells[13].Text; + HidGrupoEvento.Value = gvLista.Rows[row.RowIndex].Cells[17].Text; + HidClasificacionManual.Value = gvLista.Rows[row.RowIndex].Cells[18].Text; + //nombreevento = dt.Rows[i][3].ToString(); + //idclasificacionmanual = dt.Rows[i][4].ToString(); + //nombreclasificacionmanual = dt.Rows[i][5].ToString(); + //idgrupoevento = dt.Rows[i][6].ToString(); + //nombregrupoevento = dt.Rows[i][7].ToString(); + + string idcasosisa= gvLista.Rows[row.RowIndex].Cells[14].Text; CheckBox a = ((CheckBox)(row.Cells[0].FindControl("CheckBox1"))); if (a.Checked == true) @@ -1144,33 +1130,33 @@ private void SubirSISAdesdeAPI() if (oDetalleProtocolo != null) { - string res = oDetalleProtocolo.ResultadoCar; + //string res = oDetalleProtocolo.ResultadoCar; - if (oDetalleProtocolo.IdSubItem.Codigo == oC.CodigoCovid) - { - if (res.Length > 10) - { - if (res.Substring(0, 10) == "SE DETECTA") - { if (ProcesaSISA(oDetalleProtocolo, "SE DETECTA", idcasosisa)) i = i + 1; } + //if (oDetalleProtocolo.IdSubItem.Codigo == oC.CodigoCovid) + //{ + // if (res.Length > 10) + // { + // if (res.Substring(0, 10) == "SE DETECTA") + // { if (ProcesaSISA(oDetalleProtocolo, "SE DETECTA", idcasosisa)) i = i + 1; } - if (res.Substring(0, 13) == "NO SE DETECTA") - { if (ProcesaSISA(oDetalleProtocolo, "NO SE DETECTA", idcasosisa)) i = i + 1; } + // if (res.Substring(0, 13) == "NO SE DETECTA") + // { if (ProcesaSISA(oDetalleProtocolo, "NO SE DETECTA", idcasosisa)) i = i + 1; } - } - } - else + // } + //} + //else - { - if (ProcesaSISA(oDetalleProtocolo, res, idcasosisa)) + //{ + if (ProcesaSISA(oDetalleProtocolo, idcasosisa)) { i = i + 1; } - } + //} // BorrarLineaTemporalesdesdeAPI(ideventomuestra); } diff --git a/WebLab/Resultados/ResultadosaSisa2.aspx.designer.cs b/WebLab/Resultados/ResultadosaSisa2.aspx.designer.cs index 501bc96..a7ebc7b 100644 --- a/WebLab/Resultados/ResultadosaSisa2.aspx.designer.cs +++ b/WebLab/Resultados/ResultadosaSisa2.aspx.designer.cs @@ -183,6 +183,33 @@ public partial class ResultadosaSisa2 { /// protected global::System.Web.UI.HtmlControls.HtmlInputHidden HidItemSIL; + /// + /// HidCaracter control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlInputHidden HidCaracter; + + /// + /// HidGrupoEvento control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlInputHidden HidGrupoEvento; + + /// + /// HidClasificacionManual control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlInputHidden HidClasificacionManual; + /// /// btnSISA control. /// diff --git a/WebLab/Seguimiento.aspx.cs b/WebLab/Seguimiento.aspx.cs index ef46b23..f8b264b 100644 --- a/WebLab/Seguimiento.aspx.cs +++ b/WebLab/Seguimiento.aspx.cs @@ -198,7 +198,9 @@ inner JOIN [SYS_efector] e with (nolock) on e.idefector = ir.idEfectorSolicitan inner JOIN LAB_DetalleProtocolo DP with (nolock) ON DP.idProtocolo = IR.idProtocolo where DP.idsubitem in ( " + GetDeterminaciones() +") "+ m_strSQLCondicion + @" -and ir.baja=0 "; +and ir.baja=0 +order by ir.numero +"; if ((int.Parse(rdbOpcion.SelectedValue) == 1) || (int.Parse(rdbOpcion.SelectedValue) == 2)) //pacientes diferentes diff --git a/WebLab/Site1.Master b/WebLab/Site1.Master index c166a4c..6284058 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 Octubre 2025-02 " target="_blank" >Ver Cambios Version

+ text-align:center;">Versión MultiEfector Octubre 2025-20 " target="_blank" >Ver Cambios Version

diff --git a/WebLab/SiteTurnos.Master b/WebLab/SiteTurnos.Master index fe5940d..ffa67f1 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 Octubre 2025-02." target="_blank" >Ver Cambios Version

+ text-align:center;">Versión MultiEfector Octubre 2025-20." target="_blank" >Ver Cambios Version

diff --git a/WebLab/Turnos/TurnosEdit2.aspx.cs b/WebLab/Turnos/TurnosEdit2.aspx.cs index 6961078..188ac2b 100644 --- a/WebLab/Turnos/TurnosEdit2.aspx.cs +++ b/WebLab/Turnos/TurnosEdit2.aspx.cs @@ -200,6 +200,7 @@ private void MuestraDatos() ISession m_session = NHibernateHttpModule.CurrentSession; ICriteria crit = m_session.CreateCriteria(typeof(TurnoItem)); crit.Add(Expression.Eq("IdTurno", oRegistro)); + crit.AddOrder(Order.Asc("IdTurnoItem"));// correccion para visualizacion ordenada IList items = crit.List(); string pivot = ""; @@ -220,6 +221,7 @@ private void MuestraDatos() TurnoDiagnostico oDiagnostico = new TurnoDiagnostico(); ICriteria crit2 = m_session.CreateCriteria(typeof(TurnoDiagnostico)); crit2.Add(Expression.Eq("IdTurno", oRegistro)); + crit2.AddOrder(Order.Asc("IdTurnoDiagnostico"));// correccion para visualizacion ordenada IList diagnosticos = crit2.List(); @@ -507,7 +509,8 @@ protected void ddlItem_SelectedIndexChanged(object sender, EventArgs e) { Item oItem = new Item(); oItem = (Item)oItem.Get(typeof(Item), int.Parse(ddlItem.SelectedValue)); - txtCodigo.Text = oItem.Codigo; + if (oItem!=null) + txtCodigo.Text = oItem.Codigo; txtCodigo.UpdateAfterCallBack = true; } } @@ -637,14 +640,14 @@ private void GuardarDiagnosticos(Turno oRegistro) ICriteria crit = m_session.CreateCriteria(typeof(TurnoDiagnostico)); crit.Add(Expression.Eq("IdTurno", oRegistro)); IList detalle = crit.List(); - if (detalle.Count > 0) - { + //if (detalle.Count > 0) + //{ foreach (TurnoDiagnostico oDetalle in detalle) { oDetalle.Delete(); } - } + //} /////Crea nuevamente los detalles. for (int i = 0; i < lstDiagnosticosFinal.Items.Count; i++) @@ -808,13 +811,13 @@ private void GuardarDetalle(Turno oRegistro) ICriteria crit = m_session.CreateCriteria(typeof(TurnoItem)); crit.Add(Expression.Eq("IdTurno", oRegistro)); IList detalle = crit.List(); - if (detalle.Count > 0) - { + //if (detalle.Count > 0) + //{ foreach (TurnoItem oDetalle in detalle) { oDetalle.Delete(); } - } + //} string[] tabla = TxtDatos.Value.Split('@'); @@ -829,36 +832,47 @@ private void GuardarDetalle(Turno oRegistro) { Item oItem = new Item(); oItem= (Item)oItem.Get(typeof(Item), "Codigo", codigo,"Baja",false); - - //ISession m_session = NHibernateHttpModule.CurrentSession; - ICriteria critRec = m_session.CreateCriteria(typeof(ItemRecomendacion)); - critRec.Add(Expression.Eq("IdItem", oItem)); - IList listaRecomendacion = critRec.List(); - if (listaRecomendacion.Count > 0) - { - foreach (ItemRecomendacion oRec in listaRecomendacion) - { - TurnoItem oDetalle = new TurnoItem(); - oDetalle.IdTurno = oRegistro; - oDetalle.IdEfector = oRegistro.IdEfector; - oDetalle.IdItem = oItem; - ///buscar recomdaciones asociadas al item - oDetalle.Recomendacion = oRec.IdRecomendacion.Descripcion; - oDetalle.Save(); - - } - } - else /// si no hay ninguna recomendacion se guarda vacia - { - TurnoItem oDetalle = new TurnoItem(); - oDetalle.IdTurno = oRegistro; - oDetalle.IdEfector = oRegistro.IdEfector; - oDetalle.IdItem = oItem; - ///buscar recomdaciones asociadas al item - oDetalle.Recomendacion =""; - oDetalle.Save(); + if (oItem != null) + { + string rec= oItem.GetRecomendacion(); + TurnoItem oDetalle = new TurnoItem(); + oDetalle.IdTurno = oRegistro; + oDetalle.IdEfector = oRegistro.IdEfector; + oDetalle.IdItem = oItem; + ///buscar recomdaciones asociadas al item + oDetalle.Recomendacion = rec; + oDetalle.Save(); } + ////ISession m_session = NHibernateHttpModule.CurrentSession; + //ICriteria critRec = m_session.CreateCriteria(typeof(ItemRecomendacion)); + //critRec.Add(Expression.Eq("IdItem", oItem)); + //IList listaRecomendacion = critRec.List(); + //if (listaRecomendacion.Count > 0) + //{ + // foreach (ItemRecomendacion oRec in listaRecomendacion) + // { + // TurnoItem oDetalle = new TurnoItem(); + // oDetalle.IdTurno = oRegistro; + // oDetalle.IdEfector = oRegistro.IdEfector; + // oDetalle.IdItem = oItem; + // ///buscar recomdaciones asociadas al item + // oDetalle.Recomendacion = oRec.IdRecomendacion.Descripcion; + // oDetalle.Save(); + + // } + //} + //else /// si no hay ninguna recomendacion se guarda vacia + //{ + + // TurnoItem oDetalle = new TurnoItem(); + // oDetalle.IdTurno = oRegistro; + // oDetalle.IdEfector = oRegistro.IdEfector; + // oDetalle.IdItem = oItem; + // ///buscar recomdaciones asociadas al item + // oDetalle.Recomendacion =""; + // oDetalle.Save(); + //} } diff --git a/WebLab/controldecambios.html b/WebLab/controldecambios.html index 3bf1abe..7646ad5 100644 --- a/WebLab/controldecambios.html +++ b/WebLab/controldecambios.html @@ -28,13 +28,86 @@ +

Lista de cambios en SIL2

+
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. +
  • + +
+
2025.10.15
+
    +
  • + Lote de derivacion: Se corrige error reportado al seleccionar un lote con derivaciones borradas. + +
  • + + +
+
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 + + +
  • +
  • + 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: +
      +
    • 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.08
+
    +
  • + Generacion de PDF: Se corrige error reportado del limite de conexiones. + +
  • + + +
2025.10.02
  • - Etiquetas de Derivaciones: Se modifica para imprimir etiquetas incluidas en un lote generado o enviado. + Etiquetas de Derivaciones: Se modifica para imprimir etiquetas incluidas en un lote generado o enviado. Nueva Funcionalidad +
  • @@ -58,7 +131,7 @@

    Lista de cambios en SIL2

    2025.09.25
    • - Derivacion por Lotes: Se habilita la generacion y recepcion de derivaciones por lote. + Derivacion por Lotes: Se habilita la generacion y recepcion de derivaciones por lote. Nueva Funcionalidad
    • Laboratorio Central: Se habilita panel de Seguimiento. @@ -74,10 +147,13 @@

      Lista de cambios en SIL2

      Estadistica Microbiologia: Se corrige calculo de cantidad de protocolos con protocolos con multiples diagnosticos.
    • - Placas Laboratorio Central: Se habilita funcionalidad de automatizacion de Placas. + 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 +
    From 7d65e1484bc6c6dd9c68fe21dc78e8220a8f3e70 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Tue, 14 Oct 2025 16:02:19 -0300 Subject: [PATCH 27/61] fix: Requerimiento 1: Cambiar a nomenclatura CamelCase --- WebLab/Derivaciones/Derivados2.aspx | 2 +- WebLab/Derivaciones/Derivados2.aspx.cs | 2 +- .../Derivaciones/Derivados2.aspx.designer.cs | 4 +- WebLab/Derivaciones/GestionarLote.aspx | 6 +-- WebLab/Derivaciones/GestionarLote.aspx.cs | 6 +-- .../GestionarLote.aspx.designer.cs | 12 +++--- WebLab/Derivaciones/InformeList3.aspx | 26 ++++++------ WebLab/Derivaciones/InformeList3.aspx.cs | 18 ++++----- .../InformeList3.aspx.designer.cs | 20 +++++----- WebLab/Derivaciones/InformeLote.aspx | 40 +++++++++---------- WebLab/Derivaciones/InformeLote.aspx.cs | 26 ++++++------ .../Derivaciones/InformeLote.aspx.designer.cs | 24 +++++------ .../DerivacionMultiEfectorLote.aspx | 14 +++---- .../DerivacionMultiEfectorLote.aspx.cs | 26 ++++++------ ...erivacionMultiEfectorLote.aspx.designer.cs | 28 ++++++------- WebLab/Protocolos/DerivacionRecibirLote.aspx | 24 +++++------ .../Protocolos/DerivacionRecibirLote.aspx.cs | 24 +++++------ .../DerivacionRecibirLote.aspx.designer.cs | 40 +++++++++---------- 18 files changed, 171 insertions(+), 171 deletions(-) diff --git a/WebLab/Derivaciones/Derivados2.aspx b/WebLab/Derivaciones/Derivados2.aspx index 0670fda..e34edf8 100644 --- a/WebLab/Derivaciones/Derivados2.aspx +++ b/WebLab/Derivaciones/Derivados2.aspx @@ -146,7 +146,7 @@
    - + diff --git a/WebLab/Derivaciones/Derivados2.aspx.cs b/WebLab/Derivaciones/Derivados2.aspx.cs index d6c5dbc..8abf0a8 100644 --- a/WebLab/Derivaciones/Derivados2.aspx.cs +++ b/WebLab/Derivaciones/Derivados2.aspx.cs @@ -248,7 +248,7 @@ private void verificaResultados(string str_condicion) } else { - cv_botonBuscar.IsValid = false; //que de error sin enviar alert + cvBotonBuscar.IsValid = false; //que de error sin enviar alert } diff --git a/WebLab/Derivaciones/Derivados2.aspx.designer.cs b/WebLab/Derivaciones/Derivados2.aspx.designer.cs index 49285a3..e7be903 100644 --- a/WebLab/Derivaciones/Derivados2.aspx.designer.cs +++ b/WebLab/Derivaciones/Derivados2.aspx.designer.cs @@ -132,13 +132,13 @@ public partial class Derivados2 protected global::System.Web.UI.WebControls.RadioButtonList rdbEstado; /// - /// cv_botonBuscar control. + /// cvBotonBuscar control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.CustomValidator cv_botonBuscar; + protected global::System.Web.UI.WebControls.CustomValidator cvBotonBuscar; /// /// btnBuscar control. diff --git a/WebLab/Derivaciones/GestionarLote.aspx b/WebLab/Derivaciones/GestionarLote.aspx index b99ddc2..68224e5 100644 --- a/WebLab/Derivaciones/GestionarLote.aspx +++ b/WebLab/Derivaciones/GestionarLote.aspx @@ -68,8 +68,8 @@ - - + + @@ -95,7 +95,7 @@
    - + diff --git a/WebLab/Derivaciones/GestionarLote.aspx.cs b/WebLab/Derivaciones/GestionarLote.aspx.cs index f9ce658..45ba280 100644 --- a/WebLab/Derivaciones/GestionarLote.aspx.cs +++ b/WebLab/Derivaciones/GestionarLote.aspx.cs @@ -100,9 +100,9 @@ protected void btnBuscar_Click(object sender, EventArgs e) if (ddlEfector.SelectedValue != "0") str_condicion += " AND l.idEfectorDestino = " + ddlEfector.SelectedValue; str_condicion += " AND idEfectorOrigen = " + oUser.IdEfector.IdEfector.ToString(); - if (!string.IsNullOrWhiteSpace(tb_nrolote.Text)) + if (!string.IsNullOrWhiteSpace(tbNrolote.Text)) { - str_condicion += " AND idLoteDerivacion = " + tb_nrolote.Text; + str_condicion += " AND idLoteDerivacion = " + tbNrolote.Text; } verificaResultados(Convert.ToInt32(rdbEstado.SelectedValue), str_condicion); @@ -152,7 +152,7 @@ private void verificaResultados(int estado, string parametros) } else { - cv_botonBuscar.IsValid = false; //que de error sin enviar alert + cvBotonBuscar.IsValid = false; //que de error sin enviar alert } diff --git a/WebLab/Derivaciones/GestionarLote.aspx.designer.cs b/WebLab/Derivaciones/GestionarLote.aspx.designer.cs index f8ea1ba..81c6526 100644 --- a/WebLab/Derivaciones/GestionarLote.aspx.designer.cs +++ b/WebLab/Derivaciones/GestionarLote.aspx.designer.cs @@ -60,22 +60,22 @@ public partial class GestionarLote protected global::System.Web.UI.HtmlControls.HtmlInputText txtFechaHasta; /// - /// tb_nrolote control. + /// tbNrolote control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.TextBox tb_nrolote; + protected global::System.Web.UI.WebControls.TextBox tbNrolote; /// - /// cv_nroLote control. + /// cvNroLote control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.CustomValidator cv_nroLote; + protected global::System.Web.UI.WebControls.CustomValidator cvNroLote; /// /// ddlEfector control. @@ -96,13 +96,13 @@ public partial class GestionarLote protected global::System.Web.UI.WebControls.RadioButtonList rdbEstado; /// - /// cv_botonBuscar control. + /// cvBotonBuscar control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.CustomValidator cv_botonBuscar; + protected global::System.Web.UI.WebControls.CustomValidator cvBotonBuscar; /// /// btnBuscar control. diff --git a/WebLab/Derivaciones/InformeList3.aspx b/WebLab/Derivaciones/InformeList3.aspx index 98644db..beb8b24 100644 --- a/WebLab/Derivaciones/InformeList3.aspx +++ b/WebLab/Derivaciones/InformeList3.aspx @@ -6,11 +6,11 @@ function validarFormulario() { var todoOk = false; - var validatorEstado = document.getElementById('<%= rv_estado.ClientID %>'); + var validatorEstado = document.getElementById('<%= rvEstado.ClientID %>'); <%--var txtObservacion = document.getElementById('<%= txtObservacion.ClientID %>');--%> //--> Cambio TextBox por DropDownList - var motivoCancelacion = document.getElementById('<%= ddl_motivoCancelacion.ClientID%>'); + var motivoCancelacion = document.getElementById('<%= ddlMotivoCancelacion.ClientID%>'); var estado = document.getElementById('<%= ddlEstado.ClientID %>'); - var label = document.getElementById('<%= lbl_ErrorMotivo.ClientID %>'); + var label = document.getElementById('<%= lblErrorMotivo.ClientID %>'); //Limpio los labels de error label.className = 'hidden'; @@ -59,18 +59,18 @@ return true; // Detiene la validación con al menos un check } } - var label = document.getElementById('<%= lbl_errorLista.ClientID %>'); + var label = document.getElementById('<%= lblErrorLista.ClientID %>'); label.className = 'exposed'; return todoOk; } function reseteaLabelErrorGrilla() { - var labelGrilla = document.getElementById('<%= lbl_errorLista.ClientID %>'); + var labelGrilla = document.getElementById('<%= lblErrorLista.ClientID %>'); labelGrilla.className = 'hidden'; } function reseteaLabelErrorMotivo() { - var labelMotivo = document.getElementById('<%= lbl_ErrorMotivo.ClientID %>'); + var labelMotivo = document.getElementById('<%= lblErrorMotivo.ClientID %>'); labelMotivo.className = 'hidden'; } @@ -103,7 +103,7 @@ } function activaMotivos(estado) { - var motivos = document.getElementById('<%= ddl_motivoCancelacion.ClientID %>'); + var motivos = document.getElementById('<%= ddlMotivoCancelacion.ClientID %>'); console.log(motivos); console.log(estado.value); if (estado.value == 2) { @@ -125,7 +125,7 @@ } }); //Si selecciono todas las derivaciones, deshabilito el error que no selecciono ninguna fila - if (seleccionar && document.getElementById('<%= lbl_errorLista.ClientID %>').className == 'exposed') { + if (seleccionar && document.getElementById('<%= lblErrorLista.ClientID %>').className == 'exposed') { reseteaLabelErrorGrilla(); } } @@ -224,7 +224,7 @@ Marcar como: - Motivo Cancelación: - + - + Observación: - + - +
    Seleccionar: Todas  Ninguna diff --git a/WebLab/Derivaciones/InformeList3.aspx.cs b/WebLab/Derivaciones/InformeList3.aspx.cs index c7ad438..9e3c43a 100644 --- a/WebLab/Derivaciones/InformeList3.aspx.cs +++ b/WebLab/Derivaciones/InformeList3.aspx.cs @@ -104,8 +104,8 @@ private void CargarListas() oUtil = new Utility(); //Motivos de cancelacion LAB-75 m_ssql = "SELECT idMotivo, descripcion FROM LAB_DerivacionMotivoCancelacion WHERE baja = 0"; - oUtil.CargarCombo(ddl_motivoCancelacion, m_ssql, "idMotivo", "descripcion", connReady); - ddl_motivoCancelacion.Items.Insert(0, new ListItem("--Seleccione--", "0")); + oUtil.CargarCombo(ddlMotivoCancelacion, m_ssql, "idMotivo", "descripcion", connReady); + ddlMotivoCancelacion.Items.Insert(0, new ListItem("--Seleccione--", "0")); @@ -116,7 +116,7 @@ private void habilitarImpresion() { gvLista.Columns[11].Visible = true; lnkPDF.Visible = true; - ddl_motivoCancelacion.Enabled = false; + ddlMotivoCancelacion.Enabled = false; } else { @@ -126,15 +126,15 @@ private void habilitarImpresion() } private void limpiarForm() { - txt_observacion.Text = string.Empty; - ddl_motivoCancelacion.SelectedIndex = 0; + txtObservacion.Text = string.Empty; + ddlMotivoCancelacion.SelectedIndex = 0; ddlEstado.SelectedIndex = 0; } private void activarControles(bool valor) { btnGuardar.Enabled = valor; - txt_observacion.Enabled = valor; + txtObservacion.Enabled = valor; lnkMarcar.Enabled = valor; lnkDesMarcar.Enabled = valor; //ddl_motivoCancelacion.Enabled = valor; @@ -384,12 +384,12 @@ private void ActualizarDetalleProtocolo(GridViewRow row, int idLote = 0, int de { int estadoSeleccionado; string resultadoDerivacion; - string observacion = txt_observacion.Text; + string observacion = txtObservacion.Text; int idUsuarioRegistro = oUser.IdUsuario; //Convert.ToInt32(Session["idUsuario"]); int idUsuarioResultado = oUser.IdUsuario; DateTime fechaDeHoy = DateTime.Now; DateTime fechaDeHoyDetalle = DateTime.Now; - int MotivoCancelacion = int.Parse(ddl_motivoCancelacion.SelectedItem.Value); + int MotivoCancelacion = int.Parse(ddlMotivoCancelacion.SelectedItem.Value); bool conResultado = true; @@ -397,7 +397,7 @@ private void ActualizarDetalleProtocolo(GridViewRow row, int idLote = 0, int de if (desasociaLote == 0) { estadoSeleccionado = Convert.ToInt32(ddlEstado.SelectedValue);//Estado seleccionado => 2 No Enviado - 4 Pendiente para enviar - resultadoDerivacion = (estadoSeleccionado == 2) ? "No Derivado: " + ddl_motivoCancelacion.SelectedItem.Text : "Pendiente para enviar "; + resultadoDerivacion = (estadoSeleccionado == 2) ? "No Derivado: " + ddlMotivoCancelacion.SelectedItem.Text : "Pendiente para enviar "; } else { diff --git a/WebLab/Derivaciones/InformeList3.aspx.designer.cs b/WebLab/Derivaciones/InformeList3.aspx.designer.cs index 2f6e719..4c71d42 100644 --- a/WebLab/Derivaciones/InformeList3.aspx.designer.cs +++ b/WebLab/Derivaciones/InformeList3.aspx.designer.cs @@ -51,40 +51,40 @@ public partial class InformeList3 protected global::System.Web.UI.WebControls.DropDownList ddlEstado; /// - /// rv_estado control. + /// rvEstado control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RangeValidator rv_estado; + protected global::System.Web.UI.WebControls.RangeValidator rvEstado; /// - /// ddl_motivoCancelacion control. + /// ddlMotivoCancelacion control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.DropDownList ddl_motivoCancelacion; + protected global::System.Web.UI.WebControls.DropDownList ddlMotivoCancelacion; /// - /// lbl_ErrorMotivo control. + /// lblErrorMotivo control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_ErrorMotivo; + protected global::System.Web.UI.WebControls.Label lblErrorMotivo; /// - /// txt_observacion control. + /// txtObservacion control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.TextBox txt_observacion; + protected global::System.Web.UI.WebControls.TextBox txtObservacion; /// /// btnGuardar control. @@ -105,13 +105,13 @@ public partial class InformeList3 protected global::System.Web.UI.WebControls.LinkButton lnkPDF; /// - /// lbl_errorLista control. + /// lblErrorLista control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_errorLista; + protected global::System.Web.UI.WebControls.Label lblErrorLista; /// /// lnkMarcar control. diff --git a/WebLab/Derivaciones/InformeLote.aspx b/WebLab/Derivaciones/InformeLote.aspx index cfb5191..314b28b 100644 --- a/WebLab/Derivaciones/InformeLote.aspx +++ b/WebLab/Derivaciones/InformeLote.aspx @@ -7,10 +7,10 @@ var validatorEstado = document.getElementById('<%= Range1.ClientID %>'); var txtObservacion = document.getElementById('<%= txtObservacion.ClientID %>'); var estado = document.getElementById('<%= ddlEstados.ClientID %>'); - var label = document.getElementById('<%= lbl_ErrorMotivo.ClientID %>'); - var labelGrilla = document.getElementById('<%= lbl_errorLista.ClientID %>'); - var lista_transporte = document.getElementById('<%= ddl_Transporte.ClientID %>'); - var labelErrorTransporte = document.getElementById('<%= lbl_ErrorTransporte.ClientID %>'); + var label = document.getElementById('<%= lblErrorMotivo.ClientID %>'); + var labelGrilla = document.getElementById('<%= lblErrorLista.ClientID %>'); + var lista_transporte = document.getElementById('<%= ddlTransporte.ClientID %>'); + var labelErrorTransporte = document.getElementById('<%= lblErrorTransporte.ClientID %>'); //Limpio los labels de error label.className = 'hidden'; @@ -62,7 +62,7 @@ return true; // Detiene la validacin con al menos un check } } - var label = document.getElementById('<%= lbl_errorLista.ClientID %>'); + var label = document.getElementById('<%= lblErrorLista.ClientID %>'); label.className = 'exposed'; return todoOk; } @@ -71,8 +71,8 @@ //Habilita la seleccion del listado desplegable donde estan los transportes var ddl = document.getElementById('<%= ddlEstados.ClientID %>'); - var labelErrorTransporte = document.getElementById('<%= lbl_ErrorTransporte.ClientID%>'); - var lista_transporte = document.getElementById('<%= ddl_Transporte.ClientID%>'); + var labelErrorTransporte = document.getElementById('<%= lblErrorTransporte.ClientID%>'); + var lista_transporte = document.getElementById('<%= ddlTransporte.ClientID%>'); var estado = ddl.value; //console.log("--"); //console.log(lista_transporte); @@ -88,7 +88,7 @@ function reseteaLabelErrorLote() { //Esconde el label que tiene el error - var labelGrilla = document.getElementById('<%= lbl_errorLista.ClientID %>'); + var labelGrilla = document.getElementById('<%= lblErrorLista.ClientID %>'); labelGrilla.className = 'hidden'; } @@ -104,8 +104,8 @@ function verificaSeleccion() { //Esta funcion revisa que se haya selecionado un transporte - var lista_transporte = document.getElementById('<%= ddl_Transporte.ClientID %>'); - var labelErrorTransporte = document.getElementById('<%= lbl_ErrorTransporte.ClientID %>'); + var lista_transporte = document.getElementById('<%= ddlTransporte.ClientID %>'); + var labelErrorTransporte = document.getElementById('<%= lblErrorTransporte.ClientID %>'); //console.log("transporte"); //console.log(lista_transporte.value); if (lista_transporte.selectedIndex == 0) { @@ -116,8 +116,8 @@ } document.addEventListener("DOMContentLoaded", function () { - var txtFecha = document.getElementById('<%= txt_Fecha.ClientID %>'); - var txtHora = document.getElementById('<%= txt_Hora.ClientID %>'); + var txtFecha = document.getElementById('<%= txtFecha.ClientID %>'); + var txtHora = document.getElementById('<%= txtHora.ClientID %>'); function cambioFechaHorario() { var fechaSeleccionada = new Date(txtFecha.value); @@ -187,20 +187,20 @@ Retira transporte: - + <%-- --%> - + Observaciones: - + <%-- @@ -209,15 +209,15 @@ Fecha y Hora de retiro: - + - *Error en Fecha + *Error en Fecha - + - *Error en Hora + *Error en Hora @@ -247,7 +247,7 @@ - +
    Seleccionar: Todas  diff --git a/WebLab/Derivaciones/InformeLote.aspx.cs b/WebLab/Derivaciones/InformeLote.aspx.cs index c0daa70..eacf927 100644 --- a/WebLab/Derivaciones/InformeLote.aspx.cs +++ b/WebLab/Derivaciones/InformeLote.aspx.cs @@ -136,11 +136,11 @@ private void activarControles(bool valor) txtObservacion.Enabled = valor; ddlEstados.Enabled = valor; //rb_transportista.Enabled = true; //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) - ddl_Transporte.Enabled = valor; + ddlTransporte.Enabled = valor; lnkMarcar.Enabled = valor; lnkDesMarcar.Enabled = valor; - txt_Fecha.Enabled = valor; - txt_Hora.Enabled = valor; + txtFecha.Enabled = valor; + txtHora.Enabled = valor; } private void CargarControles() @@ -162,10 +162,10 @@ private void CargarEstados() private void CargarTransportistas() { - ddl_Transporte.Items.Add("-- SELECCIONE --"); + ddlTransporte.Items.Add("-- SELECCIONE --"); //Vanesa: por ahora esta hardcodeado los transportitas, hacer mejora que lea de la base de datos - ddl_Transporte.Items.Add("Público"); - ddl_Transporte.Items.Add("Privado"); + ddlTransporte.Items.Add("Público"); + ddlTransporte.Items.Add("Privado"); //Utility oUtil = new Utility(); @@ -176,8 +176,8 @@ private void CargarTransportistas() private void CargarFechaHoraActual() { DateTime miFecha = DateTime.UtcNow.AddHours(-3); //Hora estándar de Argentina (UTC-03:00) - txt_Fecha.Text = miFecha.Date.ToString("yyyy-MM-dd"); - txt_Hora.Text = miFecha.ToString("HH:mm"); + txtFecha.Text = miFecha.Date.ToString("yyyy-MM-dd"); + txtHora.Text = miFecha.ToString("HH:mm"); //Date1.Text = miFecha.Date.ToString("yyyy-MM-dd"); //Time1.Text = miFecha.ToString("HH:mm"); } @@ -346,7 +346,7 @@ private bool Guardar() int estadoLote = Convert.ToInt32(ddlEstados.SelectedValue); string resultadoDerivacion = estadoLote == 2 ? "Derivado: " + row.Cells[3].Text : "No Derivado. "; //string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? rb_transportista.SelectedValue : ""); //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) - string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? ddl_Transporte.SelectedValue : ""); + string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? ddlTransporte.SelectedValue : ""); LoteDerivacion lote = new LoteDerivacion(); lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); @@ -355,7 +355,7 @@ private bool Guardar() lote.Observacion = observacion; lote.IdUsuarioEnvio = idUsuario; //para Estado "Derivado" poner la fecha actual y para estado "Cancelado" no poner Fecha - string fecha_hora = txt_Fecha.Text + " " + txt_Hora.Text; + string fecha_hora = txtFecha.Text + " " + txtHora.Text; lote.FechaEnvio = (estadoLote == 2) ? Convert.ToDateTime(fecha_hora) : DateTime.Parse("01/01/1900"); lote.Save(); @@ -411,10 +411,10 @@ Estado de la derivacion LAB_DerivacionEstado if (estadoLote == 2) //Si deriva indica con que transportista fue, y que fecha y hora se retiro { // lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", rb_transportista.SelectedValue); //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) - lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", ddl_Transporte.SelectedValue); - DateTime f = new DateTime(Convert.ToInt16(txt_Fecha.Text.Substring(0, 4)), Convert.ToInt16(txt_Fecha.Text.Substring(5, 2)), Convert.ToInt16(txt_Fecha.Text.Substring(8, 2))); + lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", ddlTransporte.SelectedValue); + DateTime f = new DateTime(Convert.ToInt16(txtFecha.Text.Substring(0, 4)), Convert.ToInt16(txtFecha.Text.Substring(5, 2)), Convert.ToInt16(txtFecha.Text.Substring(8, 2))); lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Fecha", f.ToString("dd/MM/yyyy")); //que las fechas tengan el mismo formato - lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Hora", txt_Hora.Text); + lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Hora", txtHora.Text); } diff --git a/WebLab/Derivaciones/InformeLote.aspx.designer.cs b/WebLab/Derivaciones/InformeLote.aspx.designer.cs index a81c429..59d5969 100644 --- a/WebLab/Derivaciones/InformeLote.aspx.designer.cs +++ b/WebLab/Derivaciones/InformeLote.aspx.designer.cs @@ -42,22 +42,22 @@ public partial class InformeLote protected global::System.Web.UI.WebControls.RangeValidator Range1; /// - /// ddl_Transporte control. + /// ddlTransporte control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.DropDownList ddl_Transporte; + protected global::System.Web.UI.WebControls.DropDownList ddlTransporte; /// - /// lbl_ErrorTransporte control. + /// lblErrorTransporte control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_ErrorTransporte; + protected global::System.Web.UI.WebControls.Label lblErrorTransporte; /// /// txtObservacion control. @@ -69,22 +69,22 @@ public partial class InformeLote protected global::System.Web.UI.WebControls.TextBox txtObservacion; /// - /// lbl_ErrorMotivo control. + /// lblErrorMotivo control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_ErrorMotivo; + protected global::System.Web.UI.WebControls.Label lblErrorMotivo; /// - /// txt_Fecha control. + /// txtFecha control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.TextBox txt_Fecha; + protected global::System.Web.UI.WebControls.TextBox txtFecha; /// /// RequiredFieldValidator1 control. @@ -96,13 +96,13 @@ public partial class InformeLote protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1; /// - /// txt_Hora control. + /// txtHora control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.TextBox txt_Hora; + protected global::System.Web.UI.WebControls.TextBox txtHora; /// /// RequiredFieldValidator2 control. @@ -123,13 +123,13 @@ public partial class InformeLote protected global::System.Web.UI.WebControls.Button btnGuardar; /// - /// lbl_errorLista control. + /// lblErrorLista control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_errorLista; + protected global::System.Web.UI.WebControls.Label lblErrorLista; /// /// lnkMarcar control. diff --git a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx index 853354f..1ee7de9 100644 --- a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx +++ b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx @@ -49,7 +49,7 @@ -
    +
    @@ -69,20 +69,20 @@ -
    - +
    +
    Efector origen: - + Estado Lote: - + @@ -125,7 +125,7 @@ - + @@ -144,7 +144,7 @@
    diff --git a/WebLab/Protocolos/DerivacionRecibirLote.aspx.cs b/WebLab/Protocolos/DerivacionRecibirLote.aspx.cs index 7697a72..31b87ab 100644 --- a/WebLab/Protocolos/DerivacionRecibirLote.aspx.cs +++ b/WebLab/Protocolos/DerivacionRecibirLote.aspx.cs @@ -52,18 +52,18 @@ private void CargarEncabezado() lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), Convert.ToInt32(Request["idLote"])); //lbl_FechaRegistro.Text = lote.FechaRegistro.Substring(0, 10); //fechaEnvio.Text = DateTime.Parse(lote.FechaEnvio.Substring(0, 10)).ToString("yyyy-MM-dd"); - hid_fechaEnvio.Value = lote.FechaEnvio.ToString("yyyy-MM-dd"); - lbl_fechaPermitida.Text = "Fecha envio: " + lote.FechaEnvio; + hidFechaEnvio.Value = lote.FechaEnvio.ToString("yyyy-MM-dd"); + lblFechaPermitida.Text = "Fecha envio: " + lote.FechaEnvio; Efector origen = new Efector(); origen = (Efector)origen.Get(typeof(Efector), lote.IdEfectorOrigen.IdEfector); - lb_efector.Text = origen.Nombre; + lbEfector.Text = origen.Nombre; CargarFechaHoraActual(); //LAB-56 Cargo el transportista List auditorias = AuditoriaLoteDerivacion.AuditoriasPorLote(Convert.ToInt32(Request["idLote"])); AuditoriaLoteDerivacion transporte = auditorias.FindLast(a => a.Analisis == "Transportista"); - lbl_transportista.Text = transporte.Valor; + lblTransportista.Text = transporte.Valor; } @@ -71,13 +71,13 @@ 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"); - txt_Hora.Value = miFecha.ToString("HH:mm"); + 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 - rv_Fecha.MinimumValue = hid_fechaEnvio.Value; - rv_Fecha.MaximumValue = txtFecha.Text; //Fecha Date today - rv_Fecha.Text = "La fecha de recepcion no puede ser menor a la fecha de envio " + hid_fechaEnvio.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; } @@ -142,14 +142,14 @@ private void GenerarAuditorias(LoteDerivacion lote) // lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Fecha Recibido", f.ToString("yyyy-MM-dd")); //Cambio formato de fecha asi tiene el mismo cuando se retira el lote //} - if (!string.IsNullOrEmpty(txt_Hora.Value)) - lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Hora Recibido", txt_Hora.Value); + if (!string.IsNullOrEmpty(txtHora.Value)) + lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Hora Recibido", txtHora.Value); //if (!string.IsNullOrEmpty(txt_transportista.Text)) // lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Transportista", txt_transportista.Text); - if (!string.IsNullOrEmpty(txt_obs.Value)) - lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Observacion", txt_obs.Value); + if (!string.IsNullOrEmpty(txtObs.Value)) + lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Observacion", txtObs.Value); } #endregion diff --git a/WebLab/Protocolos/DerivacionRecibirLote.aspx.designer.cs b/WebLab/Protocolos/DerivacionRecibirLote.aspx.designer.cs index 04492b4..0705dca 100644 --- a/WebLab/Protocolos/DerivacionRecibirLote.aspx.designer.cs +++ b/WebLab/Protocolos/DerivacionRecibirLote.aspx.designer.cs @@ -51,40 +51,40 @@ public partial class DerivacionRecibirLote protected global::System.Web.UI.WebControls.Label txtNumeroLote; /// - /// lb_efector control. + /// lbEfector control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lb_efector; + protected global::System.Web.UI.WebControls.Label lbEfector; /// - /// lbl_fechaPermitida control. + /// lblFechaPermitida control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_fechaPermitida; + protected global::System.Web.UI.WebControls.Label lblFechaPermitida; /// - /// hid_fechaEnvio control. + /// hidFechaEnvio control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.HiddenField hid_fechaEnvio; + protected global::System.Web.UI.WebControls.HiddenField hidFechaEnvio; /// - /// lbl_transportista control. + /// lblTransportista control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_transportista; + protected global::System.Web.UI.WebControls.Label lblTransportista; /// /// txtFecha control. @@ -96,13 +96,13 @@ public partial class DerivacionRecibirLote protected global::System.Web.UI.WebControls.TextBox txtFecha; /// - /// txt_Hora control. + /// txtHora control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.HtmlControls.HtmlInputGenericControl txt_Hora; + protected global::System.Web.UI.HtmlControls.HtmlInputGenericControl txtHora; /// /// rfvFecha control. @@ -114,48 +114,48 @@ public partial class DerivacionRecibirLote protected global::System.Web.UI.WebControls.RequiredFieldValidator rfvFecha; /// - /// rfv_Hora control. + /// rfvHora control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RequiredFieldValidator rfv_Hora; + protected global::System.Web.UI.WebControls.RequiredFieldValidator rfvHora; /// - /// rv_Fecha control. + /// rvFecha control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RangeValidator rv_Fecha; + protected global::System.Web.UI.WebControls.RangeValidator rvFecha; /// - /// txt_obs control. + /// txtObs control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.HtmlControls.HtmlTextArea txt_obs; + protected global::System.Web.UI.HtmlControls.HtmlTextArea txtObs; /// - /// btn_recibirLote control. + /// btnRecibirLote control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Button btn_recibirLote; + protected global::System.Web.UI.WebControls.Button btnRecibirLote; /// - /// btn_volver control. + /// btnVolver control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Button btn_volver; + protected global::System.Web.UI.WebControls.Button btnVolver; } } From cec7c480aada64252d3c95e26da3fac2baa70668 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Thu, 16 Oct 2025 12:28:22 -0300 Subject: [PATCH 28/61] =?UTF-8?q?Requerimiento=202:=20Renombrar=20?= =?UTF-8?q?=E2=80=9CPaciente/Producto=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebLab/Derivaciones/InformeList3.aspx | 2 +- WebLab/Protocolos/DerivacionMultiEfectorLote.aspx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WebLab/Derivaciones/InformeList3.aspx b/WebLab/Derivaciones/InformeList3.aspx index beb8b24..aa8f056 100644 --- a/WebLab/Derivaciones/InformeList3.aspx +++ b/WebLab/Derivaciones/InformeList3.aspx @@ -326,7 +326,7 @@ - + diff --git a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx index 1ee7de9..072bd9d 100644 --- a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx +++ b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx @@ -97,7 +97,7 @@ <%----%> - + From e6873e277004c9ea37dcc45a83cc6d8e8cdc73f2 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Thu, 16 Oct 2025 12:30:36 -0300 Subject: [PATCH 29/61] =?UTF-8?q?feature:=20Parte=20del=20Requerimiento=20?= =?UTF-8?q?4:=20Recepci=C3=B3n=20de=20derivaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DerivacionMultiEfectorLote.aspx.cs | 45 +++- WebLab/Protocolos/ProtocoloProductoEdit.aspx | 7 +- .../Protocolos/ProtocoloProductoEdit.aspx.cs | 242 ++++++++++++++---- 3 files changed, 225 insertions(+), 69 deletions(-) diff --git a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.cs b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.cs index 6bb6abc..36d6d50 100644 --- a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.cs +++ b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.cs @@ -43,7 +43,10 @@ protected void Page_Load(object sender, EventArgs e) { VerificaPermisos("Derivacion"); - ProtocoloList1.CargarGrillaProtocolo(Request["idServicio"].ToString()); + if (Request["idServicio"].ToString() != "5") + ProtocoloList1.CargarGrillaProtocolo(Request["idServicio"].ToString()); + else + pnlTitulo.Visible = false; if (Request["idLote"] != null) { @@ -218,7 +221,10 @@ private DataTable LeerDatosProtocolosDerivados() string m_strSQL = @"select convert(varchar(10),P.fecha,103) as fecha, P.numero, P.idPaciente as idPaciente, DE.descripcion as EstadoDerivacion , - P.idProtocolo , L.idEfectorDestino , ef.nombre , Pa.nombre + ' ' + Pa.apellido as paciente + P.idProtocolo , L.idEfectorDestino , ef.nombre , + case when P.idPaciente > 0 then + Pa.nombre + ' ' + Pa.apellido + else P.descripcionProducto end as paciente from LAB_Derivacion D inner join LAB_DetalleProtocolo as Det on Det.idDetalleProtocolo = D.idDetalleProtocolo inner join LAB_Protocolo as P on P.idProtocolo = det.idProtocolo @@ -231,7 +237,7 @@ and L.estado in (2, 4, 5) and D.estado=1 and D.idLote = " + txtNumeroLote.Text + @" group by P.fecha, P.numero, P.idPaciente, DE.descripcion, P.idProtocolo , - L.idEfectorDestino , ef.nombre , Pa.nombre + ' ' + Pa.apellido "; + L.idEfectorDestino , ef.nombre , Pa.nombre + ' ' + Pa.apellido ,P.descripcionProducto"; DataSet Ds = new DataSet(); @@ -308,7 +314,7 @@ protected void lnkIngresoProtocolo_Command(object sender, CommandEventArgs e) private void GenerarNuevoProtocolo(int idProtocoloOrigen, int idPaciente) { - string pivot, m_numero, s_idServicio, idLote; + string m_numero, s_idServicio, idLote; Protocolo p = new Protocolo(); p = (Protocolo)p.Get(typeof(Protocolo), idProtocoloOrigen); @@ -316,15 +322,28 @@ private void GenerarNuevoProtocolo(int idProtocoloOrigen, int idPaciente) s_idServicio = p.IdTipoServicio.IdTipoServicio.ToString(); m_numero = p.Numero.ToString(); idLote = txtNumeroLote.Text; - // DataTable dt = TraerItemsDerivadosProtocolo(); //-> ahora lo voy a cargar desde ProtocoloEdit2 - - Response.Redirect("ProtocoloEdit2.aspx?idEfectorSolicitante=" + p.IdEfector.IdEfector + - "&numeroProtocolo=" + m_numero + - "&idServicio=" + s_idServicio + - "&idLote=" + idLote + - "&idPaciente=" + idPaciente + - //"&Operacion=AltaDerivacionMultiEfectorLote&analisis=" + pivot, false); // No enviar los analisis por request - "&Operacion=AltaDerivacionMultiEfectorLote", false); + + if(idPaciente > 0) + { + Response.Redirect("ProtocoloEdit2.aspx?idEfectorSolicitante=" + p.IdEfector.IdEfector + + "&numeroProtocolo=" + m_numero + + "&idServicio=" + s_idServicio + + "&idLote=" + idLote + + "&idPaciente=" + idPaciente + + "&Operacion=AltaDerivacionMultiEfectorLote", false); + } + else + { + //Es Muestra No Pacientes + Response.Redirect("ProtocoloProductoEdit.aspx?idEfectorSolicitante=" + p.IdEfector.IdEfector + + "&numeroProtocolo=" + m_numero + + "&idServicio=" + s_idServicio + + "&idLote=" + idLote + + "&Desde=AltaDerivacionMultiEfectorLote" + + "&Operacion=AltaDerivacionMultiEfectorLote" , false); + //idprotocolo + } + } #endregion diff --git a/WebLab/Protocolos/ProtocoloProductoEdit.aspx b/WebLab/Protocolos/ProtocoloProductoEdit.aspx index 11a0677..1924f7b 100644 --- a/WebLab/Protocolos/ProtocoloProductoEdit.aspx +++ b/WebLab/Protocolos/ProtocoloProductoEdit.aspx @@ -719,7 +719,7 @@ diff --git a/WebLab/Informes/Auditoria.aspx.cs b/WebLab/Informes/Auditoria.aspx.cs index eb70ddd..b1e2c99 100644 --- a/WebLab/Informes/Auditoria.aspx.cs +++ b/WebLab/Informes/Auditoria.aspx.cs @@ -97,7 +97,7 @@ private void Inicializar() pnlControlProtocolo.Visible = true; pnlControlAcceso.Visible = false; pnControlLote.Visible = false; - + txtProtocolo.Focus(); } break; @@ -110,6 +110,7 @@ private void Inicializar() pnlControlProtocolo.Visible = false; pnlControlAcceso.Visible = false; pnControlLote.Visible = true; + txtLote.Focus(); } break; } @@ -476,7 +477,7 @@ private DataTable GetDataSetAuditoraLote() FROM LAB_AuditoriaLote AS A with (nolock) left JOIN Sys_Usuario AS U with (nolock) ON A.idUsuario = U.idUsuario inner join LAB_LoteDerivacion L with (nolock) on L.idLoteDerivacion= A.idLote - where L.idLoteDerivacion = " + txt_lote.Text.Trim() + m_strCondicion + " ORDER BY A.idAuditoriaLote"; + where L.idLoteDerivacion = " + txtLote.Text.Trim() + m_strCondicion + " ORDER BY A.idAuditoriaLote"; DataSet Ds1 = new DataSet(); adapter.SelectCommand = new SqlCommand(m_strSQL, conn); @@ -525,7 +526,7 @@ private void ImprimirAuditoriaLote() oCr.DataBind(); Utility oUtil = new Utility(); - string nombrePDF = oUtil.CompletarNombrePDF("Auditoria_Lote_" + txt_lote.Text); + string nombrePDF = oUtil.CompletarNombrePDF("Auditoria_Lote_" + txtLote.Text); oCr.ReportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, true, nombrePDF); diff --git a/WebLab/Informes/Auditoria.aspx.designer.cs b/WebLab/Informes/Auditoria.aspx.designer.cs index 4a2a2b7..069c8f6 100644 --- a/WebLab/Informes/Auditoria.aspx.designer.cs +++ b/WebLab/Informes/Auditoria.aspx.designer.cs @@ -67,7 +67,7 @@ public partial class Auditoria /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.CompareValidator cvDni; - + /// /// ddlUsuario control. /// @@ -168,13 +168,13 @@ public partial class Auditoria protected global::System.Web.UI.WebControls.Panel pnControlLote; /// - /// txt_lote control. + /// txtLote control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.TextBox txt_lote; + protected global::System.Web.UI.WebControls.TextBox txtLote; /// /// RequiredFieldValidator2 control. From 501d972cb5b2dbfca8d542d0224c06a40d4518fa Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Tue, 21 Oct 2025 11:00:55 -0300 Subject: [PATCH 36/61] fix: se pasa el metodo ActualizaEstadoLote a LoteDerivacion --- Business/Data/Laboratorio/LoteDerivacion.cs | 32 +++++++--- WebLab/Protocolos/ProtocoloEdit2.aspx.cs | 64 ++++++++++--------- .../Protocolos/ProtocoloProductoEdit.aspx.cs | 50 ++++----------- 3 files changed, 70 insertions(+), 76 deletions(-) diff --git a/Business/Data/Laboratorio/LoteDerivacion.cs b/Business/Data/Laboratorio/LoteDerivacion.cs index 939a893..12e32c7 100644 --- a/Business/Data/Laboratorio/LoteDerivacion.cs +++ b/Business/Data/Laboratorio/LoteDerivacion.cs @@ -97,8 +97,8 @@ public string Observacion { public static string derivacionPDF(int idLote) { - //agregar el tipo de muestra para NO PACIENTES idMuestra de LAB_Muestra con el idmuestra de protocolo - + //agrego el tipo de muestra para NO PACIENTES (Cambios en la vista vta_LAB_Derivaciones) + string m_strSQL = @"SELECT numero, convert(varchar(10), fecha,103) as fecha, dni, determinacion, apellido + ' '+ nombre as paciente, efectorderivacion, fechaNacimiento as edad, unidadEdad, sexo, solicitante as especialista, idLote , @@ -154,11 +154,27 @@ public bool HayDerivacionesPendientes() { } - - //public bool IngresoProtocolo() { - // List derivaciones = Derivacion.DerivacionesByLote(this.IdLoteDerivacion); - - // derivaciones.co - //} + public void ActualizaEstadoLote(int idUsuario, string ProtocoloNuevo, string ProtocoloAnterior) + { + if (Estado == 4) //Pasa de Recibido a Ingresado + { + Estado = 5; + GrabarAuditoriaLoteDerivacion(descripcionEstadoLote(), 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 + if (!HayDerivacionesPendientes()) + { + Estado = 6; //Pasa a Completado si no tiene ms derivaciones pendientes + GrabarAuditoriaLoteDerivacion(descripcionEstadoLote(), idUsuario); + } + + Save(); + } + } } diff --git a/WebLab/Protocolos/ProtocoloEdit2.aspx.cs b/WebLab/Protocolos/ProtocoloEdit2.aspx.cs index 534a3f1..558050e 100644 --- a/WebLab/Protocolos/ProtocoloEdit2.aspx.cs +++ b/WebLab/Protocolos/ProtocoloEdit2.aspx.cs @@ -5000,47 +5000,51 @@ private void GenerarResultadoSISA(DetalleProtocolo oDetalle, string idPruebaSISA } - private void ActualizaEstadoLote(int idLote, Protocolo oRegistro) //SE PISO CON EL PR MantenimientoVarios (#15) - { - try - { - if (idLote != 0) - { - LoteDerivacion lote = new LoteDerivacion(); - lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); + //private void ActualizaEstadoLote(int idLote, Protocolo oRegistro) //SE PISO CON EL PR MantenimientoVarios (#15) + //{ + // try + // { + // if (idLote != 0) + // { + // LoteDerivacion lote = new LoteDerivacion(); + // lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); - if (lote.Estado == 4) //Pasa de Recibido a Ingresado - { - lote.Estado = 5; - lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); - } + // if (lote.Estado == 4) //Pasa de Recibido a Ingresado + // { + // lote.Estado = 5; + // lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); + // lote.FechaIngreso = DateTime.Now; + // } - //Graba el ingreso del protocolo en el lote - lote.GrabarAuditoriaLoteDerivacion("Ingresa protocolo", oUser.IdUsuario, "Número Protocolo", oRegistro.Numero.ToString(), Request["numeroProtocolo"]); + // //Graba el ingreso del protocolo en el lote + // lote.GrabarAuditoriaLoteDerivacion("Ingresa protocolo", oUser.IdUsuario, "Número Protocolo", oRegistro.Numero.ToString(), Request["numeroProtocolo"]); - //Si al generar este nuevo protocolo se finalizo la carga del lote, cambiar estado a Completado - if (!lote.HayDerivacionesPendientes()) - { - lote.Estado = 6; //Pasa a Completado si no tiene más derivaciones pendientes - lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); - } + // //Si al generar este nuevo protocolo se finalizo la carga del lote, cambiar estado a Completado + // if (!lote.HayDerivacionesPendientes()) + // { + // lote.Estado = 6; //Pasa a Completado si no tiene más derivaciones pendientes + // lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); + // } - lote.Save(); - } - } - catch (Exception) - { - } - } + // lote.Save(); + // } + // } + // catch (Exception) + // { + // } + //} - private void VerificacionEstadoLote(Protocolo oRegistro) //SE PISO CON EL PR MantenimientoVarios (#15) + private void VerificacionEstadoLote(Protocolo oRegistro) { if (Request["idLote"] != null) //Si no tiene Lote, no actualiza estado de Lote { int idLote = Convert.ToInt32(Request["idLote"]); - ActualizaEstadoLote(idLote, oRegistro); + LoteDerivacion lote = new LoteDerivacion(); + lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); + lote.ActualizaEstadoLote(oUser.IdUsuario, oRegistro.Numero.ToString(), Request["numeroProtocolo"] ); + // ActualizaEstadoLote(idLote, oRegistro); } } diff --git a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs index d3417c6..385f1cb 100644 --- a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs +++ b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs @@ -2105,44 +2105,7 @@ and D.estado in (1) ---------------------- Buscar las derivaciones que no han si } } - private void VerificacionEstadoLote(Protocolo oRegistro) - { - - if (Request["idLote"] != null) //Si no tiene Lote, no actualiza estado de Lote - { - int idLote = Convert.ToInt32(Request["idLote"]); - try - { - if (idLote != 0) - { - LoteDerivacion lote = new LoteDerivacion(); - lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); - - - if (lote.Estado == 4) //Pasa de Recibido a Ingresado - { - lote.Estado = 5; - lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); - } - - //Graba el ingreso del protocolo en el lote - lote.GrabarAuditoriaLoteDerivacion("Ingresa protocolo", oUser.IdUsuario, "Número Protocolo", oRegistro.Numero.ToString(), Request["numeroProtocolo"]); - - //Si al generar este nuevo protocolo se finalizo la carga del lote, cambiar estado a Completado - if (!lote.HayDerivacionesPendientes()) - { - lote.Estado = 6; //Pasa a Completado si no tiene más derivaciones pendientes - lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); - } - - lote.Save(); - } - } - catch (Exception) - { - } - } - } + private void ActualizarEstadoDerivacion(Protocolo oRegistro) { SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; @@ -2171,6 +2134,17 @@ from LAB_Derivacion D } + private void VerificacionEstadoLote(Protocolo oRegistro) + { + if (Request["idLote"] != null) //Si no tiene Lote, no actualiza estado de Lote + { + int idLote = Convert.ToInt32(Request["idLote"]); + LoteDerivacion lote = new LoteDerivacion(); + lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); + lote.ActualizaEstadoLote(oUser.IdUsuario, oRegistro.Numero.ToString(), Request["numeroProtocolo"]); + // ActualizaEstadoLote(idLote, oRegistro); + } + } } } From 5a3a6f6ba079d2a6c330c334f7799a502de5c804 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Tue, 21 Oct 2025 11:08:36 -0300 Subject: [PATCH 37/61] fix: se implenta store para el listado. se agrega la verificacion de permisos. se agregan columnas de fechas de generacion, ingreso y envio --- WebLab/Derivaciones/LoteList.aspx | 13 ++++++---- WebLab/Derivaciones/LoteList.aspx.cs | 37 ++++++++++++++++------------ 2 files changed, 29 insertions(+), 21 deletions(-) diff --git a/WebLab/Derivaciones/LoteList.aspx b/WebLab/Derivaciones/LoteList.aspx index b3bc3d0..a399be9 100644 --- a/WebLab/Derivaciones/LoteList.aspx +++ b/WebLab/Derivaciones/LoteList.aspx @@ -85,7 +85,7 @@ @@ -104,7 +104,7 @@
    @@ -778,7 +778,8 @@ function VerificaLargo (source, arguments) function InicioPagina() - { + { + if (document.getElementById('<%= Page.Master.FindControl("ContentPlaceHolder1").FindControl("TxtDatosCargados").ClientID %>').value == "") {///protocolo nuevo CrearFila(true); @@ -1231,7 +1232,7 @@ function VerificaLargo (source, arguments) } - + diff --git a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs index 35695aa..25823eb 100644 --- a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs +++ b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs @@ -157,8 +157,12 @@ protected void Page_Load(object sender, EventArgs e) btnCancelar.Text = "Cancelar"; btnCancelar.Width = Unit.Pixel(80); + btnCancelar.Visible = true; + if (Request["Operacion"].ToString() == "AltaDerivacionMultiEfectorLote") + { + CargarProtocoloDerivadoLote(); + } - } } else @@ -193,29 +197,31 @@ private void CargarDeterminacionesPeticion(Peticion oRegistro) } - private void CargarDeterminacionesDerivacion(string s_analisis, string s_diagnostico) + private void CargarDeterminacionesDerivacion(string s_analisis) { - - string[] tabla = s_analisis.Split('|'); + string pivot = ""; string sDatos = ""; + /////Crea nuevamente los detalles. for (int i = 0; i <= tabla.Length - 1; i++) { - if (sDatos == "") - sDatos = tabla[i].ToString() + "#Si"; - else - sDatos += ";" + tabla[i].ToString() + "#Si"; - - } - - - + Item oItem = new Item(); + oItem = (Item)oItem.Get(typeof(Item), int.Parse(tabla[i].ToString())); + if (oItem != null) + if (pivot != oItem.Nombre) + { + if (sDatos == "") + sDatos = oItem.Codigo + "#Si#False"; + else + sDatos += ";" + oItem.Codigo + "#Si#False"; + pivot = oItem.Nombre; + } + } TxtDatosCargados.Value = sDatos; - } - + protected void txtCodigoMuestra_TextChanged(object sender, EventArgs e) { @@ -499,6 +505,7 @@ private void CargarListas() (Request["Operacion"].ToString() == "AltaTurno") || (Request["Operacion"].ToString() == "AltaDerivacion") || (Request["Operacion"].ToString() == "AltaDerivacionMultiEfector") || + (Request["Operacion"].ToString() == "AltaDerivacionMultiEfectorLote") || (Request["Operacion"].ToString() == "AltaPeticion") || (Request["Operacion"].ToString() == "AltaFFEE") ) @@ -711,7 +718,7 @@ private void CargarItems() FROM Lab_item I with (nolock) inner join lab_itemEfector IE with (nolock) on I.idItem= IE.idItem and Ie.idefector=" + oC.IdEfector.IdEfector.ToString() + //MultiEfector @"INNER JOIN Lab_area A (nolock) ON A.idArea= I.idArea - where A.baja=0 and I.baja=0 and A.idtipoServicio in (1, 3) AND (I.tipo= 'P') order by I.nombre "; + where A.baja=0 and I.baja=0 and IE.disponible=1 and A.idtipoServicio in (1, 3) AND (I.tipo= 'P') order by I.nombre "; //NHibernate.Cfg.Configuration oConf = new NHibernate.Cfg.Configuration(); //String strconn = oConf.GetProperty("hibernate.connection.connection_string"); SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString); ///Performance: conexion de solo lectura @@ -788,7 +795,14 @@ 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") + { + ActualizarEstadoDerivacion(oRegistro); + VerificacionEstadoLote(oRegistro); + Response.Redirect("DerivacionMultiEfectorLote.aspx?idEfectorSolicitante=" + Request["idEfectorSolicitante"].ToString() + "&idServicio=" + Request["idServicio"].ToString() + "&idLote=" + Request["idLote"]); + } } else { @@ -1391,7 +1405,7 @@ private void GuardarDetalle2(Business.Data.Laboratorio.Protocolo oRegistro) private void GuardarDetallePractica(DetalleProtocolo oDet) { - if (VerificarSiEsDerivable(oDet)) //oDet.IdItem.IdEfector.IdEfector != oDet.IdItem.IdEfectorDerivacion.IdEfector) //Si es un item derivable no busca hijos y guarda directamente. + if (oDet.VerificarSiEsDerivable(oUser.IdEfector)) //Cambio para que quede como ProtocoloEdit2 { oDet.IdSubItem = oDet.IdItem; oDet.Save(); @@ -1497,31 +1511,31 @@ private void GuardarValorReferencia(DetalleProtocolo oDetalle) //Fin calculo de valor de refrencia y metodo } - private bool VerificarSiEsDerivable(DetalleProtocolo oDet) - { - bool ok = false; - /// buscar idefectorderivacion desde lab_itemefector - ISession m_session = NHibernateHttpModule.CurrentSession; - ICriteria critItemEfector = m_session.CreateCriteria(typeof(ItemEfector)); - critItemEfector.Add(Expression.Eq("IdItem", oDet.IdItem)); - critItemEfector.Add(Expression.Eq("IdEfector", oUser.IdEfector)); - IList detalle1 = critItemEfector.List(); - if (detalle1.Count > 0) - { - foreach (ItemEfector oitemEfector in detalle1) - { - if (oDet.IdEfector.IdEfector != oitemEfector.IdEfectorDerivacion.IdEfector) - { - ok = true; break; - } - } - } - else - ok = false; + //private bool VerificarSiEsDerivable(DetalleProtocolo oDet) + //{ + // bool ok = false; + // /// buscar idefectorderivacion desde lab_itemefector + // ISession m_session = NHibernateHttpModule.CurrentSession; + // ICriteria critItemEfector = m_session.CreateCriteria(typeof(ItemEfector)); + // critItemEfector.Add(Expression.Eq("IdItem", oDet.IdItem)); + // critItemEfector.Add(Expression.Eq("IdEfector", oUser.IdEfector)); + // IList detalle1 = critItemEfector.List(); + // if (detalle1.Count > 0) + // { + // foreach (ItemEfector oitemEfector in detalle1) + // { + // if (oDet.IdEfector.IdEfector != oitemEfector.IdEfectorDerivacion.IdEfector) + // { + // ok = true; break; + // } + // } + // } + // else + // ok = false; - return ok; + // return ok; - } + //} protected void ddlSexo_SelectedIndexChanged(object sender, EventArgs e) @@ -1582,18 +1596,13 @@ protected void txtCodigo_TextChanged1(object sender, EventArgs e) protected void btnCancelar_Click(object sender, EventArgs e) { - switch (Request["Desde"].ToString()) - { - //case "Default": Response.Redirect("Default.aspx?idServicio=" + Session["idServicio"].ToString(), false); break; - case "ProtocoloList": Response.Redirect("ProtocoloList.aspx?idServicio=" + Session["idServicio"].ToString() + "&Tipo=ListaProducto"); break; - case "Control": Response.Redirect("ProtocoloList.aspx?idServicio=" + Session["idServicio"].ToString() + "&Tipo=Control"); break; - // case "Urgencia": Response.Redirect("../Urgencia/UrgenciaList.aspx",false); break; - // case "Derivacion": Response.Redirect("Derivacion.aspx?idServicio="+Session["idServicio"].ToString(), false); break; - } - - - - } + switch (Request["Desde"].ToString()) + { + case "ProtocoloList": Response.Redirect("ProtocoloList.aspx?idServicio=" + Session["idServicio"].ToString() + "&Tipo=ListaProducto"); break; + case "Control": Response.Redirect("ProtocoloList.aspx?idServicio=" + Session["idServicio"].ToString() + "&Tipo=Control"); break; + case "AltaDerivacionMultiEfectorLote": Response.Redirect("DerivacionMultiEfectorLote.aspx?idEfectorSolicitante=" + Request["idEfectorSolicitante"].ToString() + "&idServicio=" + Request["idServicio"].ToString() + "&idLote=" + Request["idLote"]); break; + } + } @@ -2037,6 +2046,133 @@ protected void btnArchivos_Click(object sender, EventArgs e) { Response.Redirect("ProtocoloAdjuntar.aspx?idProtocolo=" + Request["idProtocolo"].ToString() +"&desde=protocolo"); } + + private void CargarProtocoloDerivadoLote() + { + string numeroProtocolo = Request["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", int.Parse(numeroProtocolo)); + if (oRegistro != null) + { + lblTitulo.Visible = false; + lblServicio1.Visible = true; + lblServicio.Visible = true; + txtFecha.Value = DateTime.Now.ToShortDateString(); + txtFechaOrden.Value = oRegistro.FechaOrden.ToShortDateString(); + txtCodigoMuestra.Text = ""; + txtDescripcionProducto.Text = oRegistro.DescripcionProducto; + ddlConservacion.SelectedValue = oRegistro.IdConservacion.ToString(); + txtNumeroOrigen.Text = oRegistro.Numero.ToString(); + ddlEfector.SelectedValue = oRegistro.IdEfector.IdEfector.ToString(); + ddlSectorServicio.SelectedValue = oRegistro.IdSector.IdSectorServicio.ToString(); + txtObservacion.Text = oRegistro.Observacion; + pnlNavegacion.Visible = false; + btnCancelar.Text = "Cancelar"; + btnCancelar.Width = Unit.Pixel(80); + ddlMuestra.SelectedValue = oRegistro.IdMuestra.ToString(); + Muestra oMuestra = new Muestra(); + oMuestra = (Muestra)oMuestra.Get(typeof(Muestra), "IdMuestra", oRegistro.IdMuestra, "Baja", false); + txtCodigoMuestra.Text = oMuestra.Codigo; + + + #region CargaDeterminaciones + ////// ---------------------->Buscar las derivaciones que no han sido ingresadas + //el protocolo me da los protocolos detalles + //los protocolos detalles me dan las derivaciones + //la derivacion debe estar enviada + //la derivacion debe tener el mismo lote que el ingresado (no todos los analisis pueden haber sido enviados con el mismo lote) + + string m_strSQL = + //select distinct STRING_AGG(Det.idItem ,' | ') as Item ---> (No esta disponible en SQL 2014) + @" SELECT STUFF(( SELECT ' | ' + CAST(Det.idItem AS VARCHAR(20)) + from LAB_Derivacion D + inner join LAB_DetalleProtocolo as Det on Det.idDetalleProtocolo = D.idDetalleProtocolo + inner join LAB_Protocolo as P on P.idProtocolo = det.idProtocolo + inner join LAB_DerivacionEstado as LE on LE.idEstado = D.estado + inner join LAB_LoteDerivacion L on L.idLoteDerivacion = D.idLote + where P.baja = 0 + and D.estado in (1) ---------------------- Buscar las derivaciones que no han sido ingresadas + and L.idLoteDerivacion = " + Request["idLote"].ToString() + " and p.numero = " + numeroProtocolo + + " FOR XML PATH(''), TYPE ).value('.', 'NVARCHAR(MAX)'), 1, 3, '') AS Item; "; + + DataSet Ds = new DataSet(); + SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; + SqlDataAdapter adapter = new SqlDataAdapter(); + adapter.SelectCommand = new SqlCommand(m_strSQL, conn); + adapter.Fill(Ds); + + string analisis = Convert.ToString(Ds.Tables[0].Rows[0][0]); + CargarDeterminacionesDerivacion(analisis); + #endregion + } + } + + private void VerificacionEstadoLote(Protocolo oRegistro) + { + + if (Request["idLote"] != null) //Si no tiene Lote, no actualiza estado de Lote + { + int idLote = Convert.ToInt32(Request["idLote"]); + try + { + if (idLote != 0) + { + LoteDerivacion lote = new LoteDerivacion(); + lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); + + + if (lote.Estado == 4) //Pasa de Recibido a Ingresado + { + lote.Estado = 5; + lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); + } + + //Graba el ingreso del protocolo en el lote + lote.GrabarAuditoriaLoteDerivacion("Ingresa protocolo", oUser.IdUsuario, "Número Protocolo", oRegistro.Numero.ToString(), Request["numeroProtocolo"]); + + //Si al generar este nuevo protocolo se finalizo la carga del lote, cambiar estado a Completado + if (!lote.HayDerivacionesPendientes()) + { + lote.Estado = 6; //Pasa a Completado si no tiene más derivaciones pendientes + lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); + } + + lote.Save(); + } + } + catch (Exception) + { + } + } + } + private void ActualizarEstadoDerivacion(Protocolo oRegistro) + { + SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; + int idLote = Convert.ToInt32(Request["idLote"]); + + string query = + @"update LAB_Derivacion + set estado=3---recibido + ,idProtocoloDerivacion=" + oRegistro.IdProtocolo.ToString() + @" + from LAB_Derivacion D + inner join LAB_DetalleProtocolo Det on Det.idDetalleProtocolo= d.idDetalleProtocolo + inner join LAB_Protocolo P on P.idProtocolo= Det.idProtocolo + where P.numero=" + Request["numeroProtocolo"].ToString() + @" and idLote=" + idLote; + + 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 + Business.Data.Laboratorio.Protocolo oPOrigen = new Business.Data.Laboratorio.Protocolo(); + oPOrigen = (Business.Data.Laboratorio.Protocolo)oPOrigen.Get(typeof(Business.Data.Laboratorio.Protocolo), "Numero", int.Parse(Request["numeroProtocolo"].ToString())); + if (oPOrigen != null) + { + oPOrigen.GrabarAuditoriaDetalleProtocolo("Recepcion Derivacion", oUser.IdUsuario, "Lote " + idLote, "Protocolo " + oRegistro.Numero.ToString()); + } + + } + } } From 17e0a4621a209feb2acada2616a6b59e961e6e14 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Thu, 16 Oct 2025 15:59:12 -0300 Subject: [PATCH 30/61] feature: Requerimiento 1: Cambiar a nomenclatura CamelCase --- WebLab/Derivaciones/InformeList3.aspx.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WebLab/Derivaciones/InformeList3.aspx.cs b/WebLab/Derivaciones/InformeList3.aspx.cs index 9e3c43a..b851e6d 100644 --- a/WebLab/Derivaciones/InformeList3.aspx.cs +++ b/WebLab/Derivaciones/InformeList3.aspx.cs @@ -73,7 +73,7 @@ protected void Page_Load(object sender, EventArgs e) pnlNroLote.Visible = true; HyperLink1.NavigateUrl = "~/Derivaciones/GestionarLote.aspx"; ddlEstado.SelectedIndex = 2; - ddl_motivoCancelacion.Enabled = false; + ddlMotivoCancelacion.Enabled = false; } } @@ -424,7 +424,7 @@ private void ActualizarDetalleProtocolo(GridViewRow row, int idLote = 0, int de oDeriva.IdMotivoCancelacion = MotivoCancelacion; //La observacion se cambia solo si es Alta, si se desasocia el lote, o si al modificar agrego una observacion - if (Request["Tipo"] == "Alta" || desasociaLote == 1 ||(Request["Tipo"] == "Modifica" && !string.IsNullOrEmpty(txt_observacion.Text))) + if (Request["Tipo"] == "Alta" || desasociaLote == 1 ||(Request["Tipo"] == "Modifica" && !string.IsNullOrEmpty(txtObservacion.Text))) { oDeriva.Observacion = observacion; } From 3620688afb66de4fb858567b64a13232cb84ae96 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Thu, 16 Oct 2025 16:00:21 -0300 Subject: [PATCH 31/61] =?UTF-8?q?feature;=20en=20proceso=20Requerimiento?= =?UTF-8?q?=204:=20Recepci=C3=B3n=20de=20derivaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebLab/Protocolos/ProtocoloMensaje.aspx | 102 ++++++++++-------- WebLab/Protocolos/ProtocoloMensaje.aspx.cs | 31 +++--- .../ProtocoloMensaje.aspx.designer.cs | 33 ++++-- .../Protocolos/ProtocoloProductoEdit.aspx.cs | 8 +- 4 files changed, 101 insertions(+), 73 deletions(-) diff --git a/WebLab/Protocolos/ProtocoloMensaje.aspx b/WebLab/Protocolos/ProtocoloMensaje.aspx index 4f8d1e7..99508a1 100644 --- a/WebLab/Protocolos/ProtocoloMensaje.aspx +++ b/WebLab/Protocolos/ProtocoloMensaje.aspx @@ -1,52 +1,64 @@ <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProtocoloMensaje.aspx.cs" Inherits="WebLab.Protocolos.ProtocoloMensaje" MasterPageFile="~/Site1.Master" %> - - -

    -
    - -
    -
    -
    - - - -
    - -
    -
    - ALTA DE MUESTRA - -
    -
    - - -

    -
    -

    - - - - - - -
    - - -
    -
    - - -
    - + + +
    +
    +
    + +
    +
    +
    + + + +
    + +
    +
    + ALTA DE MUESTRA +
    +
    + + +

    +

    +
    +

    +

    + + + + + +
    + + +
    +
    + + +
    + diff --git a/WebLab/Protocolos/ProtocoloMensaje.aspx.cs b/WebLab/Protocolos/ProtocoloMensaje.aspx.cs index bdbdb59..c8d3623 100644 --- a/WebLab/Protocolos/ProtocoloMensaje.aspx.cs +++ b/WebLab/Protocolos/ProtocoloMensaje.aspx.cs @@ -20,9 +20,6 @@ namespace WebLab.Protocolos { public partial class ProtocoloMensaje : System.Web.UI.Page { - - - protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) @@ -44,25 +41,35 @@ protected void Page_Load(object sender, EventArgs e) Business.Data.Laboratorio.Muestra oM = new Business.Data.Laboratorio.Muestra(); oM = (Business.Data.Laboratorio.Muestra)oM.Get(typeof(Business.Data.Laboratorio.Muestra), oP.IdMuestra); lblDescripcion.Text = oM.Nombre.ToUpper() + " " + oP.DescripcionProducto; + + if (Request["idLote"] != null) + { + lnkRegresar.Visible = true; + lnkNuevo.Visible = false; + } } } - - } - - - - - protected void lnkRegresar_Click(object sender, EventArgs e) + } + protected void lnkNuevo_Click(object sender, EventArgs e) { Business.Data.Laboratorio.Protocolo oP = new Business.Data.Laboratorio.Protocolo(); oP = (Business.Data.Laboratorio.Protocolo)oP.Get(typeof(Business.Data.Laboratorio.Protocolo), int.Parse(Request["id"].ToString())); - if ((oP.IdTipoServicio.IdTipoServicio==3) || (oP.IdTipoServicio.IdTipoServicio == 5)) - Response.Redirect("ProtocoloProductoEdit.aspx?Operacion=Alta", false); + if ((oP.IdTipoServicio.IdTipoServicio == 3) || (oP.IdTipoServicio.IdTipoServicio == 5)) + Response.Redirect("ProtocoloProductoEdit.aspx?Operacion=Alta", false); if (oP.IdTipoServicio.IdTipoServicio == 6) Response.Redirect("Default2.aspx?idServicio=6&idUrgencia=0&idCaso=0", false); + } + protected void lnkRegresar_Click(object sender, EventArgs e) + { + if (Request["idLote"] != null) //Regreso a la recepcion de lotes de derivaciones + { + Response.Redirect("DerivacionMultiEfectorLote.aspx?idServicio=1&idEfectorSolicitante=" + Request["idEfectorSolicitante"].ToString() + "&idLote=" + Request["idLote"]); + } } + + } } diff --git a/WebLab/Protocolos/ProtocoloMensaje.aspx.designer.cs b/WebLab/Protocolos/ProtocoloMensaje.aspx.designer.cs index c743d7b..528e52e 100644 --- a/WebLab/Protocolos/ProtocoloMensaje.aspx.designer.cs +++ b/WebLab/Protocolos/ProtocoloMensaje.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace WebLab.Protocolos { - - - public partial class ProtocoloMensaje { - +namespace WebLab.Protocolos +{ + + + public partial class ProtocoloMensaje + { + /// /// error control. /// @@ -20,7 +22,7 @@ public partial class ProtocoloMensaje { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl error; - + /// /// lblError control. /// @@ -29,7 +31,7 @@ public partial class ProtocoloMensaje { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblError; - + /// /// altaMuestra control. /// @@ -38,7 +40,7 @@ public partial class ProtocoloMensaje { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl altaMuestra; - + /// /// pnlTitulo control. /// @@ -47,7 +49,7 @@ public partial class ProtocoloMensaje { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl pnlTitulo; - + /// /// lblTitulo control. /// @@ -56,7 +58,7 @@ public partial class ProtocoloMensaje { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblTitulo; - + /// /// lblDescripcion control. /// @@ -65,7 +67,16 @@ public partial class ProtocoloMensaje { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblDescripcion; - + + /// + /// lnkRegresar control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton lnkRegresar; + /// /// lnkNuevo control. /// diff --git a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs index 25823eb..d3417c6 100644 --- a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs +++ b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs @@ -801,7 +801,7 @@ protected void btnGuardar_Click(object sender, EventArgs e) { ActualizarEstadoDerivacion(oRegistro); VerificacionEstadoLote(oRegistro); - Response.Redirect("DerivacionMultiEfectorLote.aspx?idEfectorSolicitante=" + Request["idEfectorSolicitante"].ToString() + "&idServicio=" + Request["idServicio"].ToString() + "&idLote=" + Request["idLote"]); + Response.Redirect("ProtocoloMensaje.aspx?id=" + oRegistro.IdProtocolo + "&idLote=" + Request["idLote"] + "&idEfectorSolicitante=" + Request["idEfectorSolicitante"], false); } } else @@ -1600,7 +1600,7 @@ protected void btnCancelar_Click(object sender, EventArgs e) { case "ProtocoloList": Response.Redirect("ProtocoloList.aspx?idServicio=" + Session["idServicio"].ToString() + "&Tipo=ListaProducto"); break; case "Control": Response.Redirect("ProtocoloList.aspx?idServicio=" + Session["idServicio"].ToString() + "&Tipo=Control"); break; - case "AltaDerivacionMultiEfectorLote": Response.Redirect("DerivacionMultiEfectorLote.aspx?idEfectorSolicitante=" + Request["idEfectorSolicitante"].ToString() + "&idServicio=" + Request["idServicio"].ToString() + "&idLote=" + Request["idLote"]); break; + case "AltaDerivacionMultiEfectorLote": Response.Redirect("DerivacionMultiEfectorLote.aspx?idEfectorSolicitante=" + Request["idEfectorSolicitante"].ToString() + "&idServicio=1&idLote=" + Request["idLote"]); break; } } @@ -2070,9 +2070,7 @@ private void CargarProtocoloDerivadoLote() btnCancelar.Text = "Cancelar"; btnCancelar.Width = Unit.Pixel(80); ddlMuestra.SelectedValue = oRegistro.IdMuestra.ToString(); - Muestra oMuestra = new Muestra(); - oMuestra = (Muestra)oMuestra.Get(typeof(Muestra), "IdMuestra", oRegistro.IdMuestra, "Baja", false); - txtCodigoMuestra.Text = oMuestra.Codigo; + #region CargaDeterminaciones From 5fd43191e8ca39b1cb1aefeaddb11ea477b7ebc6 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Fri, 17 Oct 2025 12:28:59 -0300 Subject: [PATCH 32/61] feature: Requerimiento 3: Adaptar PDF --- Business/Data/Laboratorio/LoteDerivacion.cs | 17 +++---- WebLab/App_Data/dsInformes.Designer.cs | 47 +++++++++++++++++++- WebLab/App_Data/dsInformes.xsd | 9 ++-- WebLab/App_Data/dsInformes.xss | 22 ++++----- WebLab/Informes/DerivacionLote.rpt | Bin 32768 -> 32768 bytes 5 files changed, 70 insertions(+), 25 deletions(-) diff --git a/Business/Data/Laboratorio/LoteDerivacion.cs b/Business/Data/Laboratorio/LoteDerivacion.cs index 2fa31ba..69c4d2c 100644 --- a/Business/Data/Laboratorio/LoteDerivacion.cs +++ b/Business/Data/Laboratorio/LoteDerivacion.cs @@ -96,14 +96,15 @@ public string Observacion { public static string derivacionPDF(int idLote) { - string m_strSQL = " SELECT numero, convert(varchar(10), fecha,103) as fecha, dni, determinacion, " + - " apellido + ' '+ nombre as paciente, efectorderivacion, fechaNacimiento as edad, unidadEdad, sexo, " + - " solicitante as especialista, idLote ," + - " CASE WHEN(len(idLote) < 9) " + - " THEN '00000' + CONVERT(VARCHAR, idLote) " + - " ELSE CONVERT(VARCHAR, idLote ) " + - " END as idLoteString " + - " FROM vta_LAB_Derivaciones WHERE idLote=" + idLote + " ORDER BY efectorDerivacion,numero "; + string m_strSQL = @"SELECT numero, convert(varchar(10), fecha,103) as fecha, dni, determinacion, + apellido + ' '+ nombre as paciente, efectorderivacion, fechaNacimiento as edad, unidadEdad, sexo, + solicitante as especialista, idLote , + CASE WHEN(len(idLote) < 9) + THEN '00000' + CONVERT(VARCHAR, idLote) + ELSE CONVERT(VARCHAR, idLote ) + END as idLoteString , + idTipoServicio + FROM vta_LAB_Derivaciones WHERE idLote= "+ idLote + " ORDER BY efectorDerivacion,numero "; return m_strSQL; } diff --git a/WebLab/App_Data/dsInformes.Designer.cs b/WebLab/App_Data/dsInformes.Designer.cs index e54301c..726b187 100644 --- a/WebLab/App_Data/dsInformes.Designer.cs +++ b/WebLab/App_Data/dsInformes.Designer.cs @@ -1535,6 +1535,8 @@ public partial class protocoloDataTable : global::System.Data.TypedTableBase diff --git a/WebLab/App_Data/dsInformes.xsd b/WebLab/App_Data/dsInformes.xsd index 0e927e8..8794fa2 100644 --- a/WebLab/App_Data/dsInformes.xsd +++ b/WebLab/App_Data/dsInformes.xsd @@ -72,7 +72,8 @@ - + + @@ -225,7 +226,7 @@ - + @@ -239,7 +240,7 @@ - + @@ -422,7 +423,7 @@ - + diff --git a/WebLab/App_Data/dsInformes.xss b/WebLab/App_Data/dsInformes.xss index 4ed68e1..e353c27 100644 --- a/WebLab/App_Data/dsInformes.xss +++ b/WebLab/App_Data/dsInformes.xss @@ -6,17 +6,17 @@ --> - - - - - - - - - - - + + + + + + + + + + + \ No newline at end of file diff --git a/WebLab/Informes/DerivacionLote.rpt b/WebLab/Informes/DerivacionLote.rpt index 3983b5258fd961c0a0eead3755e10929729d014e..db6795f8bb49d4204570a32d54309f66092d59aa 100644 GIT binary patch delta 9135 zcmV;gBT(FcfC7Mk0>Jou77<20096JEx0sRU2|F< zo+lfFv{i+cBa%OdlD+Q)-`QFJ+xI$PgC?o)&M4d>0Ni2FHM3kbq9PTaxEI|X9V&3Ej0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l z;EB|ww_KnTUnorq|9Q9R+P%LqVo%v6fXz$Q(b***ILjjHosHbWE8?PTZ_*XPzeuUD z+a#8F9>VCrBC8(@IjFX5#aAWR{WDUAmSHJUgFmF30XITUa`!Gpqd zAChTy9*L3_5qqy6YS%wBFKbDrx%~?p_C$XVNlWQktXLj9MKPwALrH!~x>F}~ zr7z^!U!+n2JHyBBbgQCEcsic5+}rcN_S*+0SZ@SmRCV8%EDae;TbL{KreJ*Bh6*mr zytIRSZmx4vnbp3Wgv`RSWmSb6Yg0!5 Date: Fri, 17 Oct 2025 15:53:33 -0300 Subject: [PATCH 33/61] fix: no derivar lotes sin determinaciones --- WebLab/Derivaciones/InformeLote.aspx.cs | 210 ++++++++++++++---------- 1 file changed, 126 insertions(+), 84 deletions(-) diff --git a/WebLab/Derivaciones/InformeLote.aspx.cs b/WebLab/Derivaciones/InformeLote.aspx.cs index eacf927..85ca259 100644 --- a/WebLab/Derivaciones/InformeLote.aspx.cs +++ b/WebLab/Derivaciones/InformeLote.aspx.cs @@ -311,17 +311,26 @@ protected void btnGuardar_Click(object sender, EventArgs e) { if (Session["idUsuario"] != null) { - if (Guardar()) + int idLote = verificarDeterminaciones(); + if (idLote == 0) //No trajo ningun id Lote con error { - ScriptManager.RegisterStartupScript(this, GetType(), "mensajeOk", "alert('✅ Se guardaron los cambios con exito');", true); + if (Guardar()) + { + ScriptManager.RegisterStartupScript(this, GetType(), "mensajeOk", "alert('✅ Se guardaron los cambios con exito');", true); + } + else + { + ScriptManager.RegisterStartupScript(this, GetType(), "mensajeOk", "alert('❌ ERROR: No se pudo guardar los datos.\\n Revisá los campos e intentá nuevamente');", true); + + } + CargarGrilla(); + limpiarForm(); } else - { - ScriptManager.RegisterStartupScript(this, GetType(), "mensajeOk", "alert('❌ ERROR: No se pudo guardar los datos\nRevisá los campos e intentá nuevamente');", true); - + { //Es el idLote con error + ScriptManager.RegisterStartupScript(this, GetType(), "mensajeOk", "alert('❌ ERROR: El lote Nro:"+idLote+" no se puede derivar, no tiene determinaciones asociadas.\\nDescarte el lote por falta de determinaciones o modifique el lote agregando determinaciones');", true); } - CargarGrilla(); - limpiarForm(); + } else { @@ -330,97 +339,130 @@ protected void btnGuardar_Click(object sender, EventArgs e) } + private int verificarDeterminaciones() + { + int tieneDeterminaciones = 0; + //Verificamos que en lote no se hayan descartados todas sus determinaciones asi no se Deriva vacio + if (Convert.ToInt32(ddlEstados.SelectedValue) == 2) + { + foreach (GridViewRow row in gvLista.Rows) + { + CheckBox a = ((CheckBox)(row.Cells[0].FindControl("CheckBox1"))); + if (a.Checked) + { + int idLote = Convert.ToInt32(row.Cells[2].Text); + string consultaSql = @"select top 1 1 from LAB_LoteDerivacion L with (nolock) + inner join LAB_Derivacion D with (nolock) ON D.idLote = L.idLoteDerivacion + where idLote =" + idLote; + DataTable dt = GetData(consultaSql); + if(dt.Rows.Count == 0) + return idLote; + + } + + } + + } + + return tieneDeterminaciones; + } private bool Guardar() { bool seGuardoEnBd = false; - - foreach (GridViewRow row in gvLista.Rows) + if(verificarDeterminaciones() == 0) //No trajo ningun id Lote con error { - CheckBox a = ((CheckBox)(row.Cells[0].FindControl("CheckBox1"))); - if (a.Checked) + foreach (GridViewRow row in gvLista.Rows) { - - int idLote = Convert.ToInt32(row.Cells[2].Text); - int idUsuario = oUser.IdUsuario; - int estadoLote = Convert.ToInt32(ddlEstados.SelectedValue); - string resultadoDerivacion = estadoLote == 2 ? "Derivado: " + row.Cells[3].Text : "No Derivado. "; - //string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? rb_transportista.SelectedValue : ""); //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) - string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? ddlTransporte.SelectedValue : ""); - LoteDerivacion lote = new LoteDerivacion(); - lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); - - //Se cambia el estado del lote LAB_LoteDerivacion - lote.Estado = estadoLote; - lote.Observacion = observacion; - lote.IdUsuarioEnvio = idUsuario; - //para Estado "Derivado" poner la fecha actual y para estado "Cancelado" no poner Fecha - string fecha_hora = txtFecha.Text + " " + txtHora.Text; - lote.FechaEnvio = (estadoLote == 2) ? Convert.ToDateTime(fecha_hora) : DateTime.Parse("01/01/1900"); - lote.Save(); - - ISession m_session = NHibernateHttpModule.CurrentSession; - ICriteria crit = m_session.CreateCriteria(typeof(Business.Data.Laboratorio.Derivacion)); - crit.Add(Expression.Eq("Idlote", lote.IdLoteDerivacion)); - IList lista = crit.List(); - if (lista.Count > 0) + CheckBox a = ((CheckBox)(row.Cells[0].FindControl("CheckBox1"))); + if (a.Checked) { - foreach (Business.Data.Laboratorio.Derivacion oDeriva in lista) + int idLote = Convert.ToInt32(row.Cells[2].Text); + int idUsuario = oUser.IdUsuario; + int estadoLote = Convert.ToInt32(ddlEstados.SelectedValue); + string resultadoDerivacion = estadoLote == 2 ? "Derivado: " + row.Cells[3].Text : "No Derivado. "; + //string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? rb_transportista.SelectedValue : ""); //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) + string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? ddlTransporte.SelectedValue : ""); + LoteDerivacion lote = new LoteDerivacion(); + lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); + + //Se cambia el estado del lote LAB_LoteDerivacion + lote.Estado = estadoLote; + lote.Observacion = observacion; + lote.IdUsuarioEnvio = idUsuario; + //para Estado "Derivado" poner la fecha actual y para estado "Cancelado" no poner Fecha + string fecha_hora = txtFecha.Text + " " + txtHora.Text; + lote.FechaEnvio = (estadoLote == 2) ? Convert.ToDateTime(fecha_hora) : DateTime.Parse("01/01/1900"); + lote.Save(); + + ISession m_session = NHibernateHttpModule.CurrentSession; + ICriteria crit = m_session.CreateCriteria(typeof(Business.Data.Laboratorio.Derivacion)); + crit.Add(Expression.Eq("Idlote", lote.IdLoteDerivacion)); + IList lista = crit.List(); + if (lista.Count > 0) { - #region Derivacion - //Cambia el estado de las derivaciones LAB_Derivacion - - /* - Estado del lote LAB_LoteDerivacionEstado (representa el estado del lote, no de la derivacion) - 1 : Creado - 2 : Derivado - 3 : Cancelado - - Estado de la derivacion LAB_DerivacionEstado - 0 : Pendiente de derivar - 1 : Enviado - 2 : No Enviado - 3 : Recibido - 4 : Pendiente para enviar - */ - oDeriva.Estado = (estadoLote == 2) ? 1 : 2; - oDeriva.Save(); - #endregion - - - #region cambio_codificacion_a_derivacion - //Cambia el resultado de LAB_DetalleProtocolo - DetalleProtocolo oDet = oDeriva.IdDetalleProtocolo; - oDet.ResultadoCar = resultadoDerivacion + " "+observacion; - oDet.ConResultado = true; - oDet.IdUsuarioResultado = idUsuario; - oDet.FechaResultado = Convert.ToDateTime(fecha_hora); - oDet.Save(); - //Inserta auditoria del detalle del protocolo - oDet.GrabarAuditoriaDetalleProtocolo("Graba", idUsuario); - #endregion + + foreach (Business.Data.Laboratorio.Derivacion oDeriva in lista) + { + #region Derivacion + //Cambia el estado de las derivaciones LAB_Derivacion + + /* + Estado del lote LAB_LoteDerivacionEstado (representa el estado del lote, no de la derivacion) + 1 : Creado + 2 : Derivado + 3 : Cancelado + + Estado de la derivacion LAB_DerivacionEstado + 0 : Pendiente de derivar + 1 : Enviado + 2 : No Enviado + 3 : Recibido + 4 : Pendiente para enviar + */ + oDeriva.Estado = (estadoLote == 2) ? 1 : 2; + oDeriva.Save(); + #endregion + + + #region cambio_codificacion_a_derivacion + //Cambia el resultado de LAB_DetalleProtocolo + DetalleProtocolo oDet = oDeriva.IdDetalleProtocolo; + oDet.ResultadoCar = resultadoDerivacion + " " + observacion; + oDet.ConResultado = true; + oDet.IdUsuarioResultado = idUsuario; + oDet.FechaResultado = Convert.ToDateTime(fecha_hora); + oDet.Save(); + //Inserta auditoria del detalle del protocolo + oDet.GrabarAuditoriaDetalleProtocolo("Graba", idUsuario); + #endregion + } } - } - - - //Inserta auditoria del lote - lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), idUsuario); // LAB-54 Sacar la palabra "Estado: xxxxx" - lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Observacion", txtObservacion.Text); - - if (estadoLote == 2) //Si deriva indica con que transportista fue, y que fecha y hora se retiro - { // lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", rb_transportista.SelectedValue); //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) - lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", ddlTransporte.SelectedValue); - DateTime f = new DateTime(Convert.ToInt16(txtFecha.Text.Substring(0, 4)), Convert.ToInt16(txtFecha.Text.Substring(5, 2)), Convert.ToInt16(txtFecha.Text.Substring(8, 2))); - lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Fecha", f.ToString("dd/MM/yyyy")); //que las fechas tengan el mismo formato - lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Hora", txtHora.Text); + + + //Inserta auditoria del lote + lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), idUsuario); // LAB-54 Sacar la palabra "Estado: xxxxx" + lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Observacion", txtObservacion.Text); + + if (estadoLote == 2) //Si deriva indica con que transportista fue, y que fecha y hora se retiro + { // lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", rb_transportista.SelectedValue); //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) + lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", ddlTransporte.SelectedValue); + DateTime f = new DateTime(Convert.ToInt16(txtFecha.Text.Substring(0, 4)), Convert.ToInt16(txtFecha.Text.Substring(5, 2)), Convert.ToInt16(txtFecha.Text.Substring(8, 2))); + lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Fecha", f.ToString("dd/MM/yyyy")); //que las fechas tengan el mismo formato + lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Hora", txtHora.Text); + } + + + seGuardoEnBd = true; } - - - seGuardoEnBd = true; } } + else + { + + } return seGuardoEnBd; } From 0bd065e9be2d7ddaae280167f27c0c58589a0048 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Tue, 21 Oct 2025 09:31:17 -0300 Subject: [PATCH 34/61] feature: se modifica el encabezado de la Derivacion para contemplar los casos de Muestras de No Pacientes --- Business/Data/Laboratorio/LoteDerivacion.cs | 8 +++- WebLab/App_Data/dsInformes.Designer.cs | 47 +++++++++++++++++++- WebLab/App_Data/dsInformes.xsd | 7 +-- WebLab/App_Data/dsInformes.xss | 12 ++--- WebLab/Informes/DerivacionLote.rpt | Bin 32768 -> 32768 bytes 5 files changed, 61 insertions(+), 13 deletions(-) diff --git a/Business/Data/Laboratorio/LoteDerivacion.cs b/Business/Data/Laboratorio/LoteDerivacion.cs index 69c4d2c..939a893 100644 --- a/Business/Data/Laboratorio/LoteDerivacion.cs +++ b/Business/Data/Laboratorio/LoteDerivacion.cs @@ -96,6 +96,9 @@ public string Observacion { public static string derivacionPDF(int idLote) { + + //agregar el tipo de muestra para NO PACIENTES idMuestra de LAB_Muestra con el idmuestra de protocolo + string m_strSQL = @"SELECT numero, convert(varchar(10), fecha,103) as fecha, dni, determinacion, apellido + ' '+ nombre as paciente, efectorderivacion, fechaNacimiento as edad, unidadEdad, sexo, solicitante as especialista, idLote , @@ -103,8 +106,9 @@ CASE WHEN(len(idLote) < 9) THEN '00000' + CONVERT(VARCHAR, idLote) ELSE CONVERT(VARCHAR, idLote ) END as idLoteString , - idTipoServicio - FROM vta_LAB_Derivaciones WHERE idLote= "+ idLote + " ORDER BY efectorDerivacion,numero "; + idTipoServicio , + TipoProducto + FROM vta_LAB_Derivaciones WHERE idLote= " + idLote + " ORDER BY efectorDerivacion,numero "; return m_strSQL; } diff --git a/WebLab/App_Data/dsInformes.Designer.cs b/WebLab/App_Data/dsInformes.Designer.cs index 726b187..e33dba7 100644 --- a/WebLab/App_Data/dsInformes.Designer.cs +++ b/WebLab/App_Data/dsInformes.Designer.cs @@ -1537,6 +1537,8 @@ public partial class protocoloDataTable : global::System.Data.TypedTableBase diff --git a/WebLab/App_Data/dsInformes.xsd b/WebLab/App_Data/dsInformes.xsd index 8794fa2..9526790 100644 --- a/WebLab/App_Data/dsInformes.xsd +++ b/WebLab/App_Data/dsInformes.xsd @@ -74,6 +74,7 @@ + @@ -226,7 +227,7 @@ - + @@ -240,7 +241,7 @@ - + @@ -423,7 +424,7 @@ - + diff --git a/WebLab/App_Data/dsInformes.xss b/WebLab/App_Data/dsInformes.xss index e353c27..ba3c7af 100644 --- a/WebLab/App_Data/dsInformes.xss +++ b/WebLab/App_Data/dsInformes.xss @@ -8,15 +8,15 @@ - - + + - - - - + + + + \ No newline at end of file diff --git a/WebLab/Informes/DerivacionLote.rpt b/WebLab/Informes/DerivacionLote.rpt index db6795f8bb49d4204570a32d54309f66092d59aa..955144e498bab2d3ffc64f8bb7c012d10ca670b9 100644 GIT binary patch delta 9108 zcmV;FBWv7%fC7Mk0h706+i$000000000006+i$01yHsQ-ea2VhOK*#sL5U0B63};IpF&-Zy{kbOvPn<7qKL4&NEd(b+u7>;14e})1e;9) z>-+1T;i)iSqa{zUIBLurl+sg6Nmb9-j|LJXZ|qHY4CD*(?y z=U@+iV6of(7iT{2RBRoQtn)Jps8l?&E;GVIF=tF^cs4;X=JIgZ4=mJ`U#8gX2QH-3 zHKY1qfvphgFq4ZrFPVrEnwR?Hhe4{O&vwWJ=rc-oV890~evbg_sHGyQGiql9%_`t6 zCA9dW=|D!)doBN>dehP|u4L+}lyM+_fh;C}14>K-ps2#T@Yi{vIe!zT9#7RkuJ7Rw zO-BdJ+u3IdBtD?)>U-$h~EZe44qC{s)f+L$hYagZr5eP6*kfJA>R?VOl|~s^Nottv~>slV$|Y_;jmgl0=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1G2RQ z^Me+!Sxz8^!^aaV{-K)|=C8fu< zLmVF_@-!)^b`)3)Ebmca*MW!@I_sW>yF2c;mLYeX%H!Zcbpu=1e_e;nW!~jE^4GI9 z!F=-g@;@)-AtvxK`ps47EKeHZ;z_xvA-^T+z#?->5K+!m^;%wyh>;T~?(CXCvtc-U n0g^gw4xkaGpKd?g0RsR406-O!dIWv}g_HR@{{d^W`8x+h=X9S? From bae4efff44c524a20bd98f05e3bf3f0042a9f570 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Tue, 21 Oct 2025 10:57:07 -0300 Subject: [PATCH 35/61] fix: a camelCase --- WebLab/Informes/Auditoria.aspx | 4 ++-- WebLab/Informes/Auditoria.aspx.cs | 7 ++++--- WebLab/Informes/Auditoria.aspx.designer.cs | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/WebLab/Informes/Auditoria.aspx b/WebLab/Informes/Auditoria.aspx index 0e480ae..1883a3f 100644 --- a/WebLab/Informes/Auditoria.aspx +++ b/WebLab/Informes/Auditoria.aspx @@ -159,9 +159,9 @@
    - + + ControlToValidate="txtLote" ErrorMessage="*" ValidationGroup="0">  
    Efector Origen: - + Efector Destino:
    @@ -136,11 +136,14 @@ - + + + + + CommandName='<%# Eval("idEfectorOrigen") %>'> @@ -149,7 +152,7 @@ + CommandName='<%# Eval("idEfectorOrigen") %>'> diff --git a/WebLab/Derivaciones/LoteList.aspx.cs b/WebLab/Derivaciones/LoteList.aspx.cs index 303f470..9a5e0ae 100644 --- a/WebLab/Derivaciones/LoteList.aspx.cs +++ b/WebLab/Derivaciones/LoteList.aspx.cs @@ -164,7 +164,7 @@ INNER JOIN LAB_LoteDerivacion l (nolock) on l.idEfectorDestino = E.idEfector else return consulta + " and L.idEfectorOrigen= " + efectorOrigen + " ORDER BY E.nombre"; } - + private void CargarFiltros() { @@ -256,18 +256,20 @@ private DataTable GenerarGrilla() if (ddlEstado.SelectedValue != "0") str_condicion += " AND L.estado = " + ddlEstado.SelectedValue; - string str_sql = @"select idLoteDerivacion as numero, fechaRegistro, efOrigen.nombre as efectorOrigen, efOrigen.idEfector as idEfectorOrigen, - efDestino.nombre as efectorDestino, E.nombre AS estado, isnull(U.apellido, 'Automatico') as username - from LAB_LoteDerivacion L (nolock) - INNER JOIN LAB_LoteDerivacionEstado E(nolock) ON E.idEstado = L.estado - INNER JOIN Sys_Efector efOrigen (nolock) ON efOrigen.idEfector = L.idEfectorOrigen - INNER JOIN Sys_Efector efDestino (nolock) ON efDestino.idEfector = L.idEfectorDestino - INNER JOIN Sys_Usuario U (nolock) ON U.idUsuario = L.idUsuarioRegistro - where " + str_condicion; + DataSet Ds = new DataSet(); SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; - SqlDataAdapter adapter = new SqlDataAdapter(); - adapter.SelectCommand = new SqlCommand(str_sql, conn); + SqlDataAdapter adapter; + SqlCommand cmd = new SqlCommand(); + + cmd.CommandType = CommandType.StoredProcedure; + cmd.CommandText = "[LAB_ListaLotes]"; + cmd.Parameters.Add("@FiltroBusqueda", SqlDbType.NVarChar); + cmd.Parameters["@FiltroBusqueda"].Value = str_condicion; + cmd.Connection = conn; + + + adapter = new SqlDataAdapter(cmd); adapter.Fill(Ds); CantidadRegistros.Text = Ds.Tables[0].Rows.Count.ToString() + " registros encontrados"; @@ -350,7 +352,7 @@ inner join LAB_LoteDerivacion L with (nolock) on L.idLoteDerivacion= A.idLote //tengo que cargar la configuracion del efector Origen int efectorOrigen = Convert.ToInt32(((LinkButton)sender).CommandName); Efector ef = new Efector(); - ef = (Efector) ef.Get(typeof(Efector), "IdEfector", efectorOrigen); + ef = (Efector)ef.Get(typeof(Efector), "IdEfector", efectorOrigen); oC = new Configuracion(); oC = (Configuracion)oC.Get(typeof(Configuracion), "IdEfector", ef); } @@ -450,17 +452,20 @@ protected void lnkExcel_Click(object sender, EventArgs e) { if (gvLista.Rows.Count != 0) { - DataTable tabla = ViewState["Datos"] as DataTable; - + DataTable tabla = ViewState["Datos"] as DataTable; + if (tabla.Rows.Count > 0) { tabla.Columns.Remove("idEfectorOrigen"); tabla.Columns["numero"].ColumnName = "Nro."; - tabla.Columns["fechaRegistro"].ColumnName = "Fecha Generación"; + tabla.Columns["fechaRegistro"].ColumnName = "Fecha"; tabla.Columns["efectorOrigen"].ColumnName = "Efector Origen"; tabla.Columns["efectorDestino"].ColumnName = "Efector Destino"; tabla.Columns["estado"].ColumnName = "Estado"; - tabla.Columns["username"].ColumnName = "Usuario Generación"; + tabla.Columns["username"].ColumnName = "Usuario Gen."; + tabla.Columns["fechaGeneracion"].ColumnName = "Fecha Gen."; + tabla.Columns["fechaIngreso"].ColumnName = "Fecha Ing."; + tabla.Columns["fechaEnvio"].ColumnName = "Fecha Envio"; StringBuilder sb = new StringBuilder(); StringWriter sw = new StringWriter(sb); From 0bcaafd42a5909520ceb0b1f9ca2c4697f48110d Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Wed, 22 Oct 2025 12:09:27 -0300 Subject: [PATCH 38/61] fix: correciones luego de testeo --- WebLab/Derivaciones/InformeLote.aspx.cs | 20 +++++++------------- WebLab/Derivaciones/LoteList.aspx.cs | 4 +++- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/WebLab/Derivaciones/InformeLote.aspx.cs b/WebLab/Derivaciones/InformeLote.aspx.cs index 85ca259..e9067a5 100644 --- a/WebLab/Derivaciones/InformeLote.aspx.cs +++ b/WebLab/Derivaciones/InformeLote.aspx.cs @@ -301,6 +301,8 @@ private void GenerarPDF(string idLote) string nombrePDF = oUtil.CompletarNombrePDF("Derivaciones"+idLote); oCr.ReportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, true, nombrePDF); } + else + ScriptManager.RegisterStartupScript(this, GetType(), "mensajeOk", "alert('No se encontraron datos para el numero de lote ingresado');", true); } @@ -328,9 +330,9 @@ protected void btnGuardar_Click(object sender, EventArgs e) } else { //Es el idLote con error - ScriptManager.RegisterStartupScript(this, GetType(), "mensajeOk", "alert('❌ ERROR: El lote Nro:"+idLote+" no se puede derivar, no tiene determinaciones asociadas.\\nDescarte el lote por falta de determinaciones o modifique el lote agregando determinaciones');", true); + ScriptManager.RegisterStartupScript(this, GetType(), "mensajeError", "alert('No se puede derivar lote N° " + idLote + " no tiene determinaciones.\\nAgregue determinaciones o descarte el lote.');", true); } - + } else { @@ -351,19 +353,12 @@ private int verificarDeterminaciones() if (a.Checked) { int idLote = Convert.ToInt32(row.Cells[2].Text); - string consultaSql = @"select top 1 1 from LAB_LoteDerivacion L with (nolock) - inner join LAB_Derivacion D with (nolock) ON D.idLote = L.idLoteDerivacion - where idLote =" + idLote; - DataTable dt = GetData(consultaSql); - if(dt.Rows.Count == 0) + DataTable dt = GetData("select top 1 1 from vta_LAB_Derivaciones where idLote =" + idLote); + if(dt.Rows.Count == 0) return idLote; - } - } - } - return tieneDeterminaciones; } @@ -382,7 +377,6 @@ private bool Guardar() int idUsuario = oUser.IdUsuario; int estadoLote = Convert.ToInt32(ddlEstados.SelectedValue); string resultadoDerivacion = estadoLote == 2 ? "Derivado: " + row.Cells[3].Text : "No Derivado. "; - //string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? rb_transportista.SelectedValue : ""); //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? ddlTransporte.SelectedValue : ""); LoteDerivacion lote = new LoteDerivacion(); lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); @@ -390,7 +384,7 @@ private bool Guardar() //Se cambia el estado del lote LAB_LoteDerivacion lote.Estado = estadoLote; lote.Observacion = observacion; - lote.IdUsuarioEnvio = idUsuario; + lote.IdUsuarioEnvio = (estadoLote == 2) ? idUsuario : 0; //para Estado "Derivado" poner la fecha actual y para estado "Cancelado" no poner Fecha string fecha_hora = txtFecha.Text + " " + txtHora.Text; lote.FechaEnvio = (estadoLote == 2) ? Convert.ToDateTime(fecha_hora) : DateTime.Parse("01/01/1900"); diff --git a/WebLab/Derivaciones/LoteList.aspx.cs b/WebLab/Derivaciones/LoteList.aspx.cs index 9a5e0ae..3f06378 100644 --- a/WebLab/Derivaciones/LoteList.aspx.cs +++ b/WebLab/Derivaciones/LoteList.aspx.cs @@ -440,8 +440,10 @@ protected void lnkPDFImprimir_Command(object sender, CommandEventArgs e) oCr.ReportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, true, nombrePDF); } else - Response.Redirect("../FinSesion.aspx", false); + ScriptManager.RegisterStartupScript(this, GetType(), "mensajeOk", "alert('No se encontraron datos para el numero de lote ingresado');", true); + } + else Response.Redirect("../FinSesion.aspx", false); } protected void lnkExcel_Click(object sender, EventArgs e) From 8cee0d8898483b4d0b2e13f517054ef474288de9 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Fri, 24 Oct 2025 14:23:16 -0300 Subject: [PATCH 39/61] fix: correcion de PR --- Business/Data/Laboratorio/Derivacion.cs | 54 ++++++- .../DerivacionMultiEfectorLote.aspx.cs | 6 +- WebLab/Protocolos/ProtocoloEdit2.aspx.cs | 143 ++++-------------- WebLab/Protocolos/ProtocoloMensaje.aspx | 5 - WebLab/Protocolos/ProtocoloMensaje.aspx.cs | 25 ++- .../ProtocoloMensaje.aspx.designer.cs | 9 -- .../Protocolos/ProtocoloProductoEdit.aspx.cs | 85 +++-------- 7 files changed, 113 insertions(+), 214 deletions(-) diff --git a/Business/Data/Laboratorio/Derivacion.cs b/Business/Data/Laboratorio/Derivacion.cs index 329480d..3eebb65 100644 --- a/Business/Data/Laboratorio/Derivacion.cs +++ b/Business/Data/Laboratorio/Derivacion.cs @@ -4,6 +4,8 @@ insert license info here using System; using System.Collections; using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; using NHibernate; namespace Business.Data.Laboratorio @@ -280,6 +282,56 @@ public static List DerivacionesByLote(int idLote) { 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) + { + ////// ---------------------->Buscar las derivaciones que no han sido ingresadas + //los protocolos detalles me dan las derivaciones + //la derivacion debe estar enviada + //la derivacion debe tener el mismo lote que el ingresado (no todos los analisis pueden haber sido enviados con el mismo lote) + + string m_strSQL = + //select distinct STRING_AGG(Det.idItem ,' | ') as Item ---> (No esta disponible en SQL 2014) + @" SELECT STUFF(( SELECT ' | ' + CAST(Det.idItem AS VARCHAR(20)) + from LAB_Derivacion D + inner join LAB_DetalleProtocolo as Det on Det.idDetalleProtocolo = D.idDetalleProtocolo + where + D.estado in (1) ---------------------- Buscar las derivaciones que no han sido ingresadas + and D.idLote = " + idLoteDerivacion + @" + and Det.idprotocolo = " + idProtocolo + + " FOR XML PATH(''), TYPE ).value('.', 'NVARCHAR(MAX)'), 1, 3, '') AS Item; "; + + DataSet Ds = new DataSet(); + SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; + SqlDataAdapter adapter = new SqlDataAdapter + { + SelectCommand = new SqlCommand(m_strSQL, conn) + }; + adapter.Fill(Ds); + return Convert.ToString(Ds.Tables[0].Rows[0][0]); + } } } diff --git a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.cs b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.cs index 36d6d50..6ff7151 100644 --- a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.cs +++ b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.cs @@ -320,13 +320,12 @@ private void GenerarNuevoProtocolo(int idProtocoloOrigen, int idPaciente) p = (Protocolo)p.Get(typeof(Protocolo), idProtocoloOrigen); s_idServicio = p.IdTipoServicio.IdTipoServicio.ToString(); - m_numero = p.Numero.ToString(); idLote = txtNumeroLote.Text; if(idPaciente > 0) { Response.Redirect("ProtocoloEdit2.aspx?idEfectorSolicitante=" + p.IdEfector.IdEfector + - "&numeroProtocolo=" + m_numero + + "&idProtocolo=" + idProtocoloOrigen + "&idServicio=" + s_idServicio + "&idLote=" + idLote + "&idPaciente=" + idPaciente + @@ -336,12 +335,11 @@ private void GenerarNuevoProtocolo(int idProtocoloOrigen, int idPaciente) { //Es Muestra No Pacientes Response.Redirect("ProtocoloProductoEdit.aspx?idEfectorSolicitante=" + p.IdEfector.IdEfector + - "&numeroProtocolo=" + m_numero + + "&idProtocolo=" + idProtocoloOrigen + "&idServicio=" + s_idServicio + "&idLote=" + idLote + "&Desde=AltaDerivacionMultiEfectorLote" + "&Operacion=AltaDerivacionMultiEfectorLote" , false); - //idprotocolo } } diff --git a/WebLab/Protocolos/ProtocoloEdit2.aspx.cs b/WebLab/Protocolos/ProtocoloEdit2.aspx.cs index 558050e..d37743c 100644 --- a/WebLab/Protocolos/ProtocoloEdit2.aspx.cs +++ b/WebLab/Protocolos/ProtocoloEdit2.aspx.cs @@ -249,10 +249,11 @@ protected void Page_Load(object sender, EventArgs e) } if (Request["Operacion"].ToString() == "AltaDerivacionMultiEfector" ) { - - string numeroProtocolo= Request["numeroProtocolo"].ToString(); - string analisis= Request["analisis"].ToString(); - CargarProtocoloDerivado(numeroProtocolo, analisis); + 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); + string analisis = Request["analisis"].ToString(); + CargarProtocoloDerivado(oRegistro, analisis); } if (Request["Operacion"].ToString() == "AltaDerivacionMultiEfectorLote") { @@ -471,16 +472,12 @@ private void CargarDiagnosticoFicha(string Tipo_ficha) } - private void CargarProtocoloDerivado(string numeroProtocolo, string analisis) + private void CargarProtocoloDerivado(Protocolo oRegistro, string analisis) { - Utility oUtil = new Utility(); //Actualiza los datos de los objetos : alta o modificacion . - - Business.Data.Laboratorio.Protocolo oRegistro = new Business.Data.Laboratorio.Protocolo(); - oRegistro = (Business.Data.Laboratorio.Protocolo)oRegistro.Get(typeof(Business.Data.Laboratorio.Protocolo), "Numero", int.Parse(numeroProtocolo)); //oRegistro.GrabarAuditoriaProtocolo("Consulta", int.Parse(Session["idUsuario"].ToString())); - if (oRegistro != null) + if (oRegistro != null && !oRegistro.Baja) { hplActualizarPaciente.Visible = false; hplModificarPaciente.Visible = false; @@ -1822,11 +1819,13 @@ protected void btnGuardar_Click(object sender, EventArgs e) else { //if (Request["Operacion"].ToString() == "AltaDerivacion") - if (Request["Operacion"].ToString() == "AltaDerivacionMultiEfector" || - Request["Operacion"].ToString() == "AltaDerivacionMultiEfectorLote") + if (Request["Operacion"].ToString() == "AltaDerivacionMultiEfector" || Request["Operacion"].ToString() == "AltaDerivacionMultiEfectorLote") { - ActualizarEstadoDerivacion(oRegistro); - VerificacionEstadoLote(oRegistro); + Business.Data.Laboratorio.Protocolo oRegistroAnterior = new Business.Data.Laboratorio.Protocolo(); + oRegistroAnterior = (Business.Data.Laboratorio.Protocolo)oRegistroAnterior.Get(typeof(Protocolo), int.Parse(Request["idProtocolo"].ToString())); + ActualizarEstadoDerivacion(oRegistro, oRegistroAnterior); + VerificacionEstadoLote(oRegistro, oRegistroAnterior); + if(Request["Operacion"].ToString() == "AltaDerivacionMultiEfector") Response.Redirect("DerivacionMultiEfector.aspx?idEfectorSolicitante=" + Request["idEfectorSolicitante"].ToString() + "&idServicio=" + Session["idServicio"].ToString()); else @@ -1877,40 +1876,10 @@ protected void btnGuardar_Click(object sender, EventArgs e) } - private void ActualizarEstadoDerivacion(Protocolo oRegistro) + private void ActualizarEstadoDerivacion(Protocolo oRegistro, Protocolo oRegistroAnterior) { - SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; - int idLote = 0; - if (Request["idLote"] != null) //Si es nulo es un protocolo anterior a la gestion por lotes - idLote = Convert.ToInt32(Request["idLote"]); - - string query = - @"update LAB_Derivacion - set estado=3---recibido - ,idProtocoloDerivacion="+oRegistro.IdProtocolo.ToString()+@" - from LAB_Derivacion D - inner join LAB_DetalleProtocolo Det on Det.idDetalleProtocolo= d.idDetalleProtocolo - inner join LAB_Protocolo P on P.idProtocolo= Det.idProtocolo - where P.numero=" + Request["numeroProtocolo"].ToString() + @" and idLote=" + idLote; - - SqlCommand cmd = new SqlCommand(query, conn); - - ///grabar auditoria de - - int idRealizado = Convert.ToInt32(cmd.ExecuteScalar()); - - //Se indica en el protocolo de Origen que fue recibido en el destino - Business.Data.Laboratorio.Protocolo oPOrigen = new Business.Data.Laboratorio.Protocolo(); - oPOrigen = (Business.Data.Laboratorio.Protocolo)oPOrigen.Get(typeof(Business.Data.Laboratorio.Protocolo), "Numero", int.Parse(Request["numeroProtocolo"].ToString())); - if (oPOrigen != null) - { - if(idLote != 0 ) - oPOrigen.GrabarAuditoriaDetalleProtocolo("Recepcion Derivacion", oUser.IdUsuario, "Lote " +idLote , "Protocolo "+ oRegistro.Numero.ToString()); - else - oPOrigen.GrabarAuditoriaDetalleProtocolo("Recepcion Derivacion", oUser.IdUsuario, "Protocolo", oRegistro.Numero.ToString()); - } - - + Business.Data.Laboratorio.Derivacion oDerivacion = new Business.Data.Laboratorio.Derivacion(); + oDerivacion.MarcarComoRecibidas(oRegistroAnterior,oRegistro, oUser, Convert.ToInt32(Request["idLote"])); } private string getListaAreasCodigoBarras() @@ -5000,42 +4969,7 @@ private void GenerarResultadoSISA(DetalleProtocolo oDetalle, string idPruebaSISA } - //private void ActualizaEstadoLote(int idLote, Protocolo oRegistro) //SE PISO CON EL PR MantenimientoVarios (#15) - //{ - // try - // { - // if (idLote != 0) - // { - // LoteDerivacion lote = new LoteDerivacion(); - // lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); - - - // if (lote.Estado == 4) //Pasa de Recibido a Ingresado - // { - // lote.Estado = 5; - // lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); - // lote.FechaIngreso = DateTime.Now; - // } - - // //Graba el ingreso del protocolo en el lote - // lote.GrabarAuditoriaLoteDerivacion("Ingresa protocolo", oUser.IdUsuario, "Número Protocolo", oRegistro.Numero.ToString(), Request["numeroProtocolo"]); - - // //Si al generar este nuevo protocolo se finalizo la carga del lote, cambiar estado a Completado - // if (!lote.HayDerivacionesPendientes()) - // { - // lote.Estado = 6; //Pasa a Completado si no tiene más derivaciones pendientes - // lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); - // } - - // lote.Save(); - // } - // } - // catch (Exception) - // { - // } - //} - - private void VerificacionEstadoLote(Protocolo oRegistro) + private void VerificacionEstadoLote(Protocolo oRegistro, Protocolo oRegistroAnterior) { if (Request["idLote"] != null) //Si no tiene Lote, no actualiza estado de Lote @@ -5043,49 +4977,24 @@ private void VerificacionEstadoLote(Protocolo oRegistro) int idLote = Convert.ToInt32(Request["idLote"]); LoteDerivacion lote = new LoteDerivacion(); lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); - lote.ActualizaEstadoLote(oUser.IdUsuario, oRegistro.Numero.ToString(), Request["numeroProtocolo"] ); - // ActualizaEstadoLote(idLote, oRegistro); + lote.ActualizaEstadoLote(oUser.IdUsuario, oRegistro.Numero.ToString(), oRegistroAnterior.Numero.ToString()); } } private void CargarProtocoloDerivadoLote() { - string numeroProtocolo = Request["numeroProtocolo"].ToString(); - int idLote = Convert.ToInt32(Request["idLote"]); - string analisis; - - ////// ---------------------->Buscar las derivaciones que no han sido ingresadas - //el protocolo me da los protocolos detalles - //los protocolos detalles me dan las derivaciones - //la derivacion debe estar enviada - //la derivacion debe tener el mismo lote que el ingresado (no todos los analisis pueden haber sido enviados con el mismo lote) - - string m_strSQL = - //select distinct STRING_AGG(Det.idItem ,' | ') as Item ---> (No esta disponible en SQL 2014) - @" SELECT STUFF(( SELECT ' | ' + CAST(Det.idItem AS VARCHAR(20)) - from LAB_Derivacion D - inner join LAB_DetalleProtocolo as Det on Det.idDetalleProtocolo = D.idDetalleProtocolo - inner join LAB_Protocolo as P on P.idProtocolo = det.idProtocolo - inner join LAB_DerivacionEstado as LE on LE.idEstado = D.estado - inner join LAB_LoteDerivacion L on L.idLoteDerivacion = D.idLote - where P.baja = 0 - and D.estado in (1) ---------------------- Buscar las derivaciones que no han sido ingresadas - and L.idLoteDerivacion = " + idLote + " and p.numero = " + numeroProtocolo + - " FOR XML PATH(''), TYPE ).value('.', 'NVARCHAR(MAX)'), 1, 3, '') AS Item; "; - - DataSet Ds = new DataSet(); - SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; - SqlDataAdapter adapter = new SqlDataAdapter + 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())); + if (oRegistro != null && !oRegistro.Baja) { - SelectCommand = new SqlCommand(m_strSQL, conn) - }; - adapter.Fill(Ds); - analisis = Convert.ToString(Ds.Tables[0].Rows[0][0]); - CargarProtocoloDerivado(numeroProtocolo, analisis); + Business.Data.Laboratorio.Derivacion oDerivacion = new Business.Data.Laboratorio.Derivacion(); + //Obtengo analisis + string analisis = oDerivacion.ObtenerItemsPendientes(Request["idLote"].ToString(), oRegistro.IdProtocolo.ToString()); + CargarProtocoloDerivado(oRegistro, analisis); + } } - } } diff --git a/WebLab/Protocolos/ProtocoloMensaje.aspx b/WebLab/Protocolos/ProtocoloMensaje.aspx index 99508a1..4a52b78 100644 --- a/WebLab/Protocolos/ProtocoloMensaje.aspx +++ b/WebLab/Protocolos/ProtocoloMensaje.aspx @@ -38,11 +38,6 @@
    - +
    - diff --git a/WebLab/Derivaciones/Derivados2.aspx.cs b/WebLab/Derivaciones/Derivados2.aspx.cs index d6c5dbc..8abf0a8 100644 --- a/WebLab/Derivaciones/Derivados2.aspx.cs +++ b/WebLab/Derivaciones/Derivados2.aspx.cs @@ -248,7 +248,7 @@ private void verificaResultados(string str_condicion) } else { - cv_botonBuscar.IsValid = false; //que de error sin enviar alert + cvBotonBuscar.IsValid = false; //que de error sin enviar alert } diff --git a/WebLab/Derivaciones/Derivados2.aspx.designer.cs b/WebLab/Derivaciones/Derivados2.aspx.designer.cs index 49285a3..e7be903 100644 --- a/WebLab/Derivaciones/Derivados2.aspx.designer.cs +++ b/WebLab/Derivaciones/Derivados2.aspx.designer.cs @@ -132,13 +132,13 @@ public partial class Derivados2 protected global::System.Web.UI.WebControls.RadioButtonList rdbEstado; /// - /// cv_botonBuscar control. + /// cvBotonBuscar control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.CustomValidator cv_botonBuscar; + protected global::System.Web.UI.WebControls.CustomValidator cvBotonBuscar; /// /// btnBuscar control. diff --git a/WebLab/Derivaciones/GestionarLote.aspx b/WebLab/Derivaciones/GestionarLote.aspx index b99ddc2..68224e5 100644 --- a/WebLab/Derivaciones/GestionarLote.aspx +++ b/WebLab/Derivaciones/GestionarLote.aspx @@ -68,8 +68,8 @@ @@ -95,7 +95,7 @@ diff --git a/WebLab/Derivaciones/GestionarLote.aspx.cs b/WebLab/Derivaciones/GestionarLote.aspx.cs index f9ce658..45ba280 100644 --- a/WebLab/Derivaciones/GestionarLote.aspx.cs +++ b/WebLab/Derivaciones/GestionarLote.aspx.cs @@ -100,9 +100,9 @@ protected void btnBuscar_Click(object sender, EventArgs e) if (ddlEfector.SelectedValue != "0") str_condicion += " AND l.idEfectorDestino = " + ddlEfector.SelectedValue; str_condicion += " AND idEfectorOrigen = " + oUser.IdEfector.IdEfector.ToString(); - if (!string.IsNullOrWhiteSpace(tb_nrolote.Text)) + if (!string.IsNullOrWhiteSpace(tbNrolote.Text)) { - str_condicion += " AND idLoteDerivacion = " + tb_nrolote.Text; + str_condicion += " AND idLoteDerivacion = " + tbNrolote.Text; } verificaResultados(Convert.ToInt32(rdbEstado.SelectedValue), str_condicion); @@ -152,7 +152,7 @@ private void verificaResultados(int estado, string parametros) } else { - cv_botonBuscar.IsValid = false; //que de error sin enviar alert + cvBotonBuscar.IsValid = false; //que de error sin enviar alert } diff --git a/WebLab/Derivaciones/GestionarLote.aspx.designer.cs b/WebLab/Derivaciones/GestionarLote.aspx.designer.cs index f8ea1ba..81c6526 100644 --- a/WebLab/Derivaciones/GestionarLote.aspx.designer.cs +++ b/WebLab/Derivaciones/GestionarLote.aspx.designer.cs @@ -60,22 +60,22 @@ public partial class GestionarLote protected global::System.Web.UI.HtmlControls.HtmlInputText txtFechaHasta; /// - /// tb_nrolote control. + /// tbNrolote control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.TextBox tb_nrolote; + protected global::System.Web.UI.WebControls.TextBox tbNrolote; /// - /// cv_nroLote control. + /// cvNroLote control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.CustomValidator cv_nroLote; + protected global::System.Web.UI.WebControls.CustomValidator cvNroLote; /// /// ddlEfector control. @@ -96,13 +96,13 @@ public partial class GestionarLote protected global::System.Web.UI.WebControls.RadioButtonList rdbEstado; /// - /// cv_botonBuscar control. + /// cvBotonBuscar control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.CustomValidator cv_botonBuscar; + protected global::System.Web.UI.WebControls.CustomValidator cvBotonBuscar; /// /// btnBuscar control. diff --git a/WebLab/Derivaciones/InformeList3.aspx b/WebLab/Derivaciones/InformeList3.aspx index 98644db..beb8b24 100644 --- a/WebLab/Derivaciones/InformeList3.aspx +++ b/WebLab/Derivaciones/InformeList3.aspx @@ -6,11 +6,11 @@ function validarFormulario() { var todoOk = false; - var validatorEstado = document.getElementById('<%= rv_estado.ClientID %>'); + var validatorEstado = document.getElementById('<%= rvEstado.ClientID %>'); <%--var txtObservacion = document.getElementById('<%= txtObservacion.ClientID %>');--%> //--> Cambio TextBox por DropDownList - var motivoCancelacion = document.getElementById('<%= ddl_motivoCancelacion.ClientID%>'); + var motivoCancelacion = document.getElementById('<%= ddlMotivoCancelacion.ClientID%>'); var estado = document.getElementById('<%= ddlEstado.ClientID %>'); - var label = document.getElementById('<%= lbl_ErrorMotivo.ClientID %>'); + var label = document.getElementById('<%= lblErrorMotivo.ClientID %>'); //Limpio los labels de error label.className = 'hidden'; @@ -59,18 +59,18 @@ return true; // Detiene la validación con al menos un check } } - var label = document.getElementById('<%= lbl_errorLista.ClientID %>'); + var label = document.getElementById('<%= lblErrorLista.ClientID %>'); label.className = 'exposed'; return todoOk; } function reseteaLabelErrorGrilla() { - var labelGrilla = document.getElementById('<%= lbl_errorLista.ClientID %>'); + var labelGrilla = document.getElementById('<%= lblErrorLista.ClientID %>'); labelGrilla.className = 'hidden'; } function reseteaLabelErrorMotivo() { - var labelMotivo = document.getElementById('<%= lbl_ErrorMotivo.ClientID %>'); + var labelMotivo = document.getElementById('<%= lblErrorMotivo.ClientID %>'); labelMotivo.className = 'hidden'; } @@ -103,7 +103,7 @@ } function activaMotivos(estado) { - var motivos = document.getElementById('<%= ddl_motivoCancelacion.ClientID %>'); + var motivos = document.getElementById('<%= ddlMotivoCancelacion.ClientID %>'); console.log(motivos); console.log(estado.value); if (estado.value == 2) { @@ -125,7 +125,7 @@ } }); //Si selecciono todas las derivaciones, deshabilito el error que no selecciono ninguna fila - if (seleccionar && document.getElementById('<%= lbl_errorLista.ClientID %>').className == 'exposed') { + if (seleccionar && document.getElementById('<%= lblErrorLista.ClientID %>').className == 'exposed') { reseteaLabelErrorGrilla(); } } @@ -224,7 +224,7 @@ - - + <%-- @@ -247,7 +247,7 @@ + @@ -125,7 +125,7 @@ + @@ -144,7 +144,7 @@ @@ -100,7 +100,7 @@ @@ -111,11 +111,11 @@ @@ -125,7 +125,7 @@ @@ -133,9 +133,9 @@ diff --git a/WebLab/Protocolos/DerivacionRecibirLote.aspx.cs b/WebLab/Protocolos/DerivacionRecibirLote.aspx.cs index 7697a72..31b87ab 100644 --- a/WebLab/Protocolos/DerivacionRecibirLote.aspx.cs +++ b/WebLab/Protocolos/DerivacionRecibirLote.aspx.cs @@ -52,18 +52,18 @@ private void CargarEncabezado() lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), Convert.ToInt32(Request["idLote"])); //lbl_FechaRegistro.Text = lote.FechaRegistro.Substring(0, 10); //fechaEnvio.Text = DateTime.Parse(lote.FechaEnvio.Substring(0, 10)).ToString("yyyy-MM-dd"); - hid_fechaEnvio.Value = lote.FechaEnvio.ToString("yyyy-MM-dd"); - lbl_fechaPermitida.Text = "Fecha envio: " + lote.FechaEnvio; + hidFechaEnvio.Value = lote.FechaEnvio.ToString("yyyy-MM-dd"); + lblFechaPermitida.Text = "Fecha envio: " + lote.FechaEnvio; Efector origen = new Efector(); origen = (Efector)origen.Get(typeof(Efector), lote.IdEfectorOrigen.IdEfector); - lb_efector.Text = origen.Nombre; + lbEfector.Text = origen.Nombre; CargarFechaHoraActual(); //LAB-56 Cargo el transportista List auditorias = AuditoriaLoteDerivacion.AuditoriasPorLote(Convert.ToInt32(Request["idLote"])); AuditoriaLoteDerivacion transporte = auditorias.FindLast(a => a.Analisis == "Transportista"); - lbl_transportista.Text = transporte.Valor; + lblTransportista.Text = transporte.Valor; } @@ -71,13 +71,13 @@ 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"); - txt_Hora.Value = miFecha.ToString("HH:mm"); + 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 - rv_Fecha.MinimumValue = hid_fechaEnvio.Value; - rv_Fecha.MaximumValue = txtFecha.Text; //Fecha Date today - rv_Fecha.Text = "La fecha de recepcion no puede ser menor a la fecha de envio " + hid_fechaEnvio.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; } @@ -142,14 +142,14 @@ private void GenerarAuditorias(LoteDerivacion lote) // lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Fecha Recibido", f.ToString("yyyy-MM-dd")); //Cambio formato de fecha asi tiene el mismo cuando se retira el lote //} - if (!string.IsNullOrEmpty(txt_Hora.Value)) - lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Hora Recibido", txt_Hora.Value); + if (!string.IsNullOrEmpty(txtHora.Value)) + lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Hora Recibido", txtHora.Value); //if (!string.IsNullOrEmpty(txt_transportista.Text)) // lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Transportista", txt_transportista.Text); - if (!string.IsNullOrEmpty(txt_obs.Value)) - lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Observacion", txt_obs.Value); + if (!string.IsNullOrEmpty(txtObs.Value)) + lote.GrabarAuditoriaLoteDerivacion(estado, oUser.IdUsuario, "Observacion", txtObs.Value); } #endregion diff --git a/WebLab/Protocolos/DerivacionRecibirLote.aspx.designer.cs b/WebLab/Protocolos/DerivacionRecibirLote.aspx.designer.cs index 04492b4..0705dca 100644 --- a/WebLab/Protocolos/DerivacionRecibirLote.aspx.designer.cs +++ b/WebLab/Protocolos/DerivacionRecibirLote.aspx.designer.cs @@ -51,40 +51,40 @@ public partial class DerivacionRecibirLote protected global::System.Web.UI.WebControls.Label txtNumeroLote; /// - /// lb_efector control. + /// lbEfector control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lb_efector; + protected global::System.Web.UI.WebControls.Label lbEfector; /// - /// lbl_fechaPermitida control. + /// lblFechaPermitida control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_fechaPermitida; + protected global::System.Web.UI.WebControls.Label lblFechaPermitida; /// - /// hid_fechaEnvio control. + /// hidFechaEnvio control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.HiddenField hid_fechaEnvio; + protected global::System.Web.UI.WebControls.HiddenField hidFechaEnvio; /// - /// lbl_transportista control. + /// lblTransportista control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_transportista; + protected global::System.Web.UI.WebControls.Label lblTransportista; /// /// txtFecha control. @@ -96,13 +96,13 @@ public partial class DerivacionRecibirLote protected global::System.Web.UI.WebControls.TextBox txtFecha; /// - /// txt_Hora control. + /// txtHora control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.HtmlControls.HtmlInputGenericControl txt_Hora; + protected global::System.Web.UI.HtmlControls.HtmlInputGenericControl txtHora; /// /// rfvFecha control. @@ -114,48 +114,48 @@ public partial class DerivacionRecibirLote protected global::System.Web.UI.WebControls.RequiredFieldValidator rfvFecha; /// - /// rfv_Hora control. + /// rfvHora control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RequiredFieldValidator rfv_Hora; + protected global::System.Web.UI.WebControls.RequiredFieldValidator rfvHora; /// - /// rv_Fecha control. + /// rvFecha control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RangeValidator rv_Fecha; + protected global::System.Web.UI.WebControls.RangeValidator rvFecha; /// - /// txt_obs control. + /// txtObs control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.HtmlControls.HtmlTextArea txt_obs; + protected global::System.Web.UI.HtmlControls.HtmlTextArea txtObs; /// - /// btn_recibirLote control. + /// btnRecibirLote control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Button btn_recibirLote; + protected global::System.Web.UI.WebControls.Button btnRecibirLote; /// - /// btn_volver control. + /// btnVolver control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Button btn_volver; + protected global::System.Web.UI.WebControls.Button btnVolver; } } From dfbd541c8abb49eca685b0a6c8bbd3f9d0db6586 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Thu, 16 Oct 2025 12:28:22 -0300 Subject: [PATCH 42/61] =?UTF-8?q?Requerimiento=202:=20Renombrar=20?= =?UTF-8?q?=E2=80=9CPaciente/Producto=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebLab/Derivaciones/InformeList3.aspx | 2 +- WebLab/Protocolos/DerivacionMultiEfectorLote.aspx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WebLab/Derivaciones/InformeList3.aspx b/WebLab/Derivaciones/InformeList3.aspx index beb8b24..aa8f056 100644 --- a/WebLab/Derivaciones/InformeList3.aspx +++ b/WebLab/Derivaciones/InformeList3.aspx @@ -326,7 +326,7 @@ - + diff --git a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx index 1ee7de9..072bd9d 100644 --- a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx +++ b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx @@ -97,7 +97,7 @@ <%----%> - + From a6a006537f8ffb9e4db8b02be599f1dff84edabc Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Thu, 16 Oct 2025 12:30:36 -0300 Subject: [PATCH 43/61] =?UTF-8?q?feature:=20Parte=20del=20Requerimiento=20?= =?UTF-8?q?4:=20Recepci=C3=B3n=20de=20derivaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DerivacionMultiEfectorLote.aspx.cs | 45 +++- WebLab/Protocolos/ProtocoloProductoEdit.aspx | 7 +- .../Protocolos/ProtocoloProductoEdit.aspx.cs | 240 ++++++++++++++---- 3 files changed, 224 insertions(+), 68 deletions(-) diff --git a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.cs b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.cs index 6bb6abc..36d6d50 100644 --- a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.cs +++ b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.cs @@ -43,7 +43,10 @@ protected void Page_Load(object sender, EventArgs e) { VerificaPermisos("Derivacion"); - ProtocoloList1.CargarGrillaProtocolo(Request["idServicio"].ToString()); + if (Request["idServicio"].ToString() != "5") + ProtocoloList1.CargarGrillaProtocolo(Request["idServicio"].ToString()); + else + pnlTitulo.Visible = false; if (Request["idLote"] != null) { @@ -218,7 +221,10 @@ private DataTable LeerDatosProtocolosDerivados() string m_strSQL = @"select convert(varchar(10),P.fecha,103) as fecha, P.numero, P.idPaciente as idPaciente, DE.descripcion as EstadoDerivacion , - P.idProtocolo , L.idEfectorDestino , ef.nombre , Pa.nombre + ' ' + Pa.apellido as paciente + P.idProtocolo , L.idEfectorDestino , ef.nombre , + case when P.idPaciente > 0 then + Pa.nombre + ' ' + Pa.apellido + else P.descripcionProducto end as paciente from LAB_Derivacion D inner join LAB_DetalleProtocolo as Det on Det.idDetalleProtocolo = D.idDetalleProtocolo inner join LAB_Protocolo as P on P.idProtocolo = det.idProtocolo @@ -231,7 +237,7 @@ and L.estado in (2, 4, 5) and D.estado=1 and D.idLote = " + txtNumeroLote.Text + @" group by P.fecha, P.numero, P.idPaciente, DE.descripcion, P.idProtocolo , - L.idEfectorDestino , ef.nombre , Pa.nombre + ' ' + Pa.apellido "; + L.idEfectorDestino , ef.nombre , Pa.nombre + ' ' + Pa.apellido ,P.descripcionProducto"; DataSet Ds = new DataSet(); @@ -308,7 +314,7 @@ protected void lnkIngresoProtocolo_Command(object sender, CommandEventArgs e) private void GenerarNuevoProtocolo(int idProtocoloOrigen, int idPaciente) { - string pivot, m_numero, s_idServicio, idLote; + string m_numero, s_idServicio, idLote; Protocolo p = new Protocolo(); p = (Protocolo)p.Get(typeof(Protocolo), idProtocoloOrigen); @@ -316,15 +322,28 @@ private void GenerarNuevoProtocolo(int idProtocoloOrigen, int idPaciente) s_idServicio = p.IdTipoServicio.IdTipoServicio.ToString(); m_numero = p.Numero.ToString(); idLote = txtNumeroLote.Text; - // DataTable dt = TraerItemsDerivadosProtocolo(); //-> ahora lo voy a cargar desde ProtocoloEdit2 - - Response.Redirect("ProtocoloEdit2.aspx?idEfectorSolicitante=" + p.IdEfector.IdEfector + - "&numeroProtocolo=" + m_numero + - "&idServicio=" + s_idServicio + - "&idLote=" + idLote + - "&idPaciente=" + idPaciente + - //"&Operacion=AltaDerivacionMultiEfectorLote&analisis=" + pivot, false); // No enviar los analisis por request - "&Operacion=AltaDerivacionMultiEfectorLote", false); + + if(idPaciente > 0) + { + Response.Redirect("ProtocoloEdit2.aspx?idEfectorSolicitante=" + p.IdEfector.IdEfector + + "&numeroProtocolo=" + m_numero + + "&idServicio=" + s_idServicio + + "&idLote=" + idLote + + "&idPaciente=" + idPaciente + + "&Operacion=AltaDerivacionMultiEfectorLote", false); + } + else + { + //Es Muestra No Pacientes + Response.Redirect("ProtocoloProductoEdit.aspx?idEfectorSolicitante=" + p.IdEfector.IdEfector + + "&numeroProtocolo=" + m_numero + + "&idServicio=" + s_idServicio + + "&idLote=" + idLote + + "&Desde=AltaDerivacionMultiEfectorLote" + + "&Operacion=AltaDerivacionMultiEfectorLote" , false); + //idprotocolo + } + } #endregion diff --git a/WebLab/Protocolos/ProtocoloProductoEdit.aspx b/WebLab/Protocolos/ProtocoloProductoEdit.aspx index 11a0677..1924f7b 100644 --- a/WebLab/Protocolos/ProtocoloProductoEdit.aspx +++ b/WebLab/Protocolos/ProtocoloProductoEdit.aspx @@ -719,7 +719,7 @@
    - - protected global::System.Web.UI.WebControls.Label lblDescripcion; - /// - /// lnkRegresar control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.LinkButton lnkRegresar; - /// /// lnkNuevo control. /// diff --git a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs index 385f1cb..8087c4e 100644 --- a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs +++ b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs @@ -799,8 +799,10 @@ protected void btnGuardar_Click(object sender, EventArgs e) if (Request["Operacion"].ToString() == "AltaDerivacionMultiEfectorLote") { - ActualizarEstadoDerivacion(oRegistro); - VerificacionEstadoLote(oRegistro); + Business.Data.Laboratorio.Protocolo oRegistroAnterior = new Business.Data.Laboratorio.Protocolo(); + oRegistroAnterior = (Business.Data.Laboratorio.Protocolo) oRegistroAnterior.Get(typeof(Protocolo), int.Parse(Request["idProtocolo"].ToString())); + ActualizarEstadoDerivacion(oRegistro,oRegistroAnterior); + VerificacionEstadoLote(oRegistro, oRegistroAnterior); Response.Redirect("ProtocoloMensaje.aspx?id=" + oRegistro.IdProtocolo + "&idLote=" + Request["idLote"] + "&idEfectorSolicitante=" + Request["idEfectorSolicitante"], false); } } @@ -2049,9 +2051,9 @@ protected void btnArchivos_Click(object sender, EventArgs e) private void CargarProtocoloDerivadoLote() { - string numeroProtocolo = Request["numeroProtocolo"].ToString(); + string idProtocolo = Request["idProtocolo"].ToString(); Business.Data.Laboratorio.Protocolo oRegistro = new Business.Data.Laboratorio.Protocolo(); - oRegistro = (Business.Data.Laboratorio.Protocolo)oRegistro.Get(typeof(Business.Data.Laboratorio.Protocolo), "Numero", int.Parse(numeroProtocolo)); + oRegistro = (Business.Data.Laboratorio.Protocolo)oRegistro.Get(typeof(Business.Data.Laboratorio.Protocolo), int.Parse(idProtocolo)); if (oRegistro != null) { lblTitulo.Visible = false; @@ -2070,79 +2072,34 @@ private void CargarProtocoloDerivadoLote() btnCancelar.Text = "Cancelar"; btnCancelar.Width = Unit.Pixel(80); ddlMuestra.SelectedValue = oRegistro.IdMuestra.ToString(); - - - - #region CargaDeterminaciones - ////// ---------------------->Buscar las derivaciones que no han sido ingresadas - //el protocolo me da los protocolos detalles - //los protocolos detalles me dan las derivaciones - //la derivacion debe estar enviada - //la derivacion debe tener el mismo lote que el ingresado (no todos los analisis pueden haber sido enviados con el mismo lote) - - string m_strSQL = - //select distinct STRING_AGG(Det.idItem ,' | ') as Item ---> (No esta disponible en SQL 2014) - @" SELECT STUFF(( SELECT ' | ' + CAST(Det.idItem AS VARCHAR(20)) - from LAB_Derivacion D - inner join LAB_DetalleProtocolo as Det on Det.idDetalleProtocolo = D.idDetalleProtocolo - inner join LAB_Protocolo as P on P.idProtocolo = det.idProtocolo - inner join LAB_DerivacionEstado as LE on LE.idEstado = D.estado - inner join LAB_LoteDerivacion L on L.idLoteDerivacion = D.idLote - where P.baja = 0 - and D.estado in (1) ---------------------- Buscar las derivaciones que no han sido ingresadas - and L.idLoteDerivacion = " + Request["idLote"].ToString() + " and p.numero = " + numeroProtocolo + - " FOR XML PATH(''), TYPE ).value('.', 'NVARCHAR(MAX)'), 1, 3, '') AS Item; "; - - DataSet Ds = new DataSet(); - SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; - SqlDataAdapter adapter = new SqlDataAdapter(); - adapter.SelectCommand = new SqlCommand(m_strSQL, conn); - adapter.Fill(Ds); + - string analisis = Convert.ToString(Ds.Tables[0].Rows[0][0]); - CargarDeterminacionesDerivacion(analisis); - #endregion + if(!oRegistro.Baja) + { + Business.Data.Laboratorio.Derivacion oDerivacion = new Business.Data.Laboratorio.Derivacion(); + //Obtengo analisis + string analisis = oDerivacion.ObtenerItemsPendientes(Request["idLote"].ToString(), oRegistro.IdProtocolo.ToString()); + CargarDeterminacionesDerivacion(analisis); + } + } } - - - private void ActualizarEstadoDerivacion(Protocolo oRegistro) - { - SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; - int idLote = Convert.ToInt32(Request["idLote"]); - - string query = - @"update LAB_Derivacion - set estado=3---recibido - ,idProtocoloDerivacion=" + oRegistro.IdProtocolo.ToString() + @" - from LAB_Derivacion D - inner join LAB_DetalleProtocolo Det on Det.idDetalleProtocolo= d.idDetalleProtocolo - inner join LAB_Protocolo P on P.idProtocolo= Det.idProtocolo - where P.numero=" + Request["numeroProtocolo"].ToString() + @" and idLote=" + idLote; - - 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 - Business.Data.Laboratorio.Protocolo oPOrigen = new Business.Data.Laboratorio.Protocolo(); - oPOrigen = (Business.Data.Laboratorio.Protocolo)oPOrigen.Get(typeof(Business.Data.Laboratorio.Protocolo), "Numero", int.Parse(Request["numeroProtocolo"].ToString())); - if (oPOrigen != null) - { - oPOrigen.GrabarAuditoriaDetalleProtocolo("Recepcion Derivacion", oUser.IdUsuario, "Lote " + idLote, "Protocolo " + oRegistro.Numero.ToString()); - } + 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"])); } - private void VerificacionEstadoLote(Protocolo oRegistro) + private void VerificacionEstadoLote(Protocolo oRegistro, Protocolo oAnterior) { if (Request["idLote"] != null) //Si no tiene Lote, no actualiza estado de Lote { int idLote = Convert.ToInt32(Request["idLote"]); LoteDerivacion lote = new LoteDerivacion(); lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); - lote.ActualizaEstadoLote(oUser.IdUsuario, oRegistro.Numero.ToString(), Request["numeroProtocolo"]); - // ActualizaEstadoLote(idLote, oRegistro); + lote.ActualizaEstadoLote(oUser.IdUsuario, oRegistro.Numero.ToString(), oAnterior.Numero.ToString()); } } } From dfc7a0b4fe48675f3c24e62fb648f9171a9fb46b Mon Sep 17 00:00:00 2001 From: caroPintos <77695282+caroPintos@users.noreply.github.com> Date: Mon, 3 Nov 2025 15:18:33 -0300 Subject: [PATCH 40/61] Mantenimiento Labo Central (#52) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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.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 --- Business/Data/Laboratorio/Item.cs | 3 +- WebLab/Derivaciones/InformeLote.aspx.cs | 24 +- WebLab/Items/ItemList.aspx.cs | 7 +- WebLab/Placas/PlacaResultado.aspx.cs | 12 +- WebLab/Placas/PlacaResultadoMixta.aspx.cs | 4 +- WebLab/Protocolos/ProtocoloEdit2.aspx.cs | 61 +- .../Protocolos/ProtocoloProductoEdit.aspx.cs | 46 +- WebLab/Resultados/AnalisisEdit.aspx.cs | 449 ++++------ WebLab/Resultados/ResultadoHTEdit.aspx.cs | 121 +-- WebLab/Resultados/ResultadoItemEdit.aspx.cs | 783 +++++++++--------- WebLab/Resultados/ResultadosaSisa2.aspx.cs | 238 +++--- WebLab/Site1.Master | 2 +- WebLab/SiteTurnos.Master | 2 +- WebLab/controldecambios.html | 52 +- 14 files changed, 878 insertions(+), 926 deletions(-) diff --git a/Business/Data/Laboratorio/Item.cs b/Business/Data/Laboratorio/Item.cs index 1459973..a6192ea 100644 --- a/Business/Data/Laboratorio/Item.cs +++ b/Business/Data/Laboratorio/Item.cs @@ -736,7 +736,7 @@ public bool VerificaValoresMinimosMaximos(string valorControl) return devolver; } - public string GetResultado(string valorItem) + public string GetResultado(string valorItem, Efector oEfector) { int i = valorItem.Length; @@ -744,6 +744,7 @@ public string GetResultado(string valorItem) ISession m_session = NHibernateHttpModule.CurrentSession; ICriteria crit = m_session.CreateCriteria(typeof(ResultadoItem)); crit.Add(Expression.Eq("IdItem", this)); + crit.Add(Expression.Eq("IdEfector", oEfector)); IList lista = crit.List(); if (lista.Count > 0) { diff --git a/WebLab/Derivaciones/InformeLote.aspx.cs b/WebLab/Derivaciones/InformeLote.aspx.cs index c0daa70..13adbe6 100644 --- a/WebLab/Derivaciones/InformeLote.aspx.cs +++ b/WebLab/Derivaciones/InformeLote.aspx.cs @@ -73,17 +73,9 @@ protected void Page_Load(object sender, EventArgs e) } } - //protected void Page_Unload(object sender, EventArgs e) - //{ - // if (this.oCr.ReportDocument != null) - // { - // this.oCr.ReportDocument.Close(); - // this.oCr.ReportDocument.Dispose(); - // } - //} - #region Carga + private DataTable GetData(string m_strSQL) @@ -221,9 +213,7 @@ protected string habilitarEditarSegunEstado(int estado) return ""; } - - - #endregion + #region Marca protected void lnkMarcar_Click(object sender, EventArgs e) @@ -363,8 +353,12 @@ private bool Guardar() ICriteria crit = m_session.CreateCriteria(typeof(Business.Data.Laboratorio.Derivacion)); crit.Add(Expression.Eq("Idlote", lote.IdLoteDerivacion)); IList lista = crit.List(); - if (lista.Count > 0) - { + + + + + + foreach (Business.Data.Laboratorio.Derivacion oDeriva in lista) { @@ -401,7 +395,7 @@ Estado de la derivacion LAB_DerivacionEstado oDet.GrabarAuditoriaDetalleProtocolo("Graba", idUsuario); #endregion } - } + diff --git a/WebLab/Items/ItemList.aspx.cs b/WebLab/Items/ItemList.aspx.cs index 636b41d..73ffdec 100644 --- a/WebLab/Items/ItemList.aspx.cs +++ b/WebLab/Items/ItemList.aspx.cs @@ -385,8 +385,8 @@ protected void gvLista_RowDataBound(object sender, GridViewRowEventArgs e) CmdModificar.CommandName = "Modificar"; CmdModificar.ToolTip = "Modificar"; - + ///Caro: inahbilitado por el momento ImageButton CmdEliminar = (ImageButton)e.Row.Cells[7].Controls[1]; CmdEliminar.CommandArgument = this.gvLista.DataKeys[e.Row.RowIndex].Value.ToString(); CmdEliminar.CommandName = "Eliminar"; @@ -397,7 +397,10 @@ protected void gvLista_RowDataBound(object sender, GridViewRowEventArgs e) CmdEliminar.Visible = false; CmdModificar.ToolTip = "Consultar"; } - CmdEliminar.Visible = oUser.Administrador; + + ///Caro: inahbilitado por el momento + //CmdEliminar.Visible = oUser.Administrador; + CmdEliminar.Visible = false; diff --git a/WebLab/Placas/PlacaResultado.aspx.cs b/WebLab/Placas/PlacaResultado.aspx.cs index aa02a1a..984b0fa 100644 --- a/WebLab/Placas/PlacaResultado.aspx.cs +++ b/WebLab/Placas/PlacaResultado.aspx.cs @@ -3030,9 +3030,9 @@ private void GrabarResultadito(Protocolo oProtocolo, Item oItem, string valorIte if (valorItem != "") { if (valorItem.ToUpper() == "SE DETEC") - oDetalle.ResultadoCar = oDetalle.IdSubItem.GetResultado(valorItem); + oDetalle.ResultadoCar = oDetalle.IdSubItem.GetResultado(valorItem, oDetalle.IdEfector); if (valorItem.ToUpper() == "NO SE DET") - oDetalle.ResultadoCar = oDetalle.IdSubItem.GetResultado(valorItem); + oDetalle.ResultadoCar = oDetalle.IdSubItem.GetResultado(valorItem, oDetalle.IdEfector); oDetalle.ConResultado = true; } else @@ -3377,7 +3377,7 @@ private void GuardarResultadoDetalleCT(string m_id, string nombreItem, string va oDetalle1.IdItem = oItem; oDetalle1.IdSubItem = oItem; oDetalle1.TrajoMuestra = "Si"; - oDetalle1.Informable = oItem.Informable; + oDetalle1.Informable = oItem.GetInformableEfector(oUser.IdEfector); oDetalle1.ResultadoCar = valor; oDetalle1.ConResultado = true; @@ -3414,7 +3414,7 @@ private void GuardarResultadoDetalleCT(string m_id, string nombreItem, string va oDetalle.IdItem = oItem; oDetalle.IdSubItem = oItem; oDetalle.TrajoMuestra = "Si"; - oDetalle.Informable = oItem.Informable; + oDetalle.Informable = oItem.GetInformableEfector(oUser.IdEfector); oDetalle.ResultadoCar = valor; oDetalle.ConResultado = true; @@ -3482,7 +3482,7 @@ private void GuardarResultaditoDetalleCT(Protocolo oRegistro, Item oItem, string oDetalle1.IdItem = oItem; oDetalle1.IdSubItem = oItem; oDetalle1.TrajoMuestra = "Si"; - oDetalle1.Informable = oItem.Informable; + oDetalle1.Informable = oItem.GetInformableEfector(oUser.IdEfector); oDetalle1.ResultadoCar = valor; oDetalle1.ConResultado = true; @@ -3523,7 +3523,7 @@ private void GuardarResultaditoDetalleCT(Protocolo oRegistro, Item oItem, string oDetalle.IdItem = oItem; oDetalle.IdSubItem = oItem; oDetalle.TrajoMuestra = "Si"; - oDetalle.Informable = oItem.Informable; + oDetalle.Informable = oItem.GetInformableEfector(oUser.IdEfector); oDetalle.ResultadoCar = valor; oDetalle.ConResultado = true; diff --git a/WebLab/Placas/PlacaResultadoMixta.aspx.cs b/WebLab/Placas/PlacaResultadoMixta.aspx.cs index 8049544..8be451e 100644 --- a/WebLab/Placas/PlacaResultadoMixta.aspx.cs +++ b/WebLab/Placas/PlacaResultadoMixta.aspx.cs @@ -1530,12 +1530,12 @@ private void GuardarResultado(string m_idDetalleProtocolo, string valorItem ) // if (valorItem.ToUpper() == "SE DETECTA") { valorItem = "SE DETECT"; - oDetalle.ResultadoCar = oDetalle.IdSubItem.GetResultado(valorItem); + oDetalle.ResultadoCar = oDetalle.IdSubItem.GetResultado(valorItem, oDetalle.IdEfector); } if (valorItem.ToUpper() == "NO SE DETECTA") { valorItem = "NO SE DETECT"; - oDetalle.ResultadoCar = oDetalle.IdSubItem.GetResultado(valorItem); + oDetalle.ResultadoCar = oDetalle.IdSubItem.GetResultado(valorItem, oDetalle.IdEfector); } oDetalle.ConResultado = true; } diff --git a/WebLab/Protocolos/ProtocoloEdit2.aspx.cs b/WebLab/Protocolos/ProtocoloEdit2.aspx.cs index 534a3f1..ccfb3a9 100644 --- a/WebLab/Protocolos/ProtocoloEdit2.aspx.cs +++ b/WebLab/Protocolos/ProtocoloEdit2.aspx.cs @@ -1385,7 +1385,7 @@ inner join lab_item P with (nolock) on dp.idsubitem = p.iditem where dp.idProtocolo = " + Request["idProtocolo"].ToString() + @" and dp.trajoMuestra = 'Si' and p.idarea = A.idArea) order by nombre"; - oUtil.CargarCheckBox(chkAreaCodigoBarra, m_ssql, "idArea", "nombre"); + oUtil.CargarCheckBox(chkAreaCodigoBarra, m_ssql, "idArea", "nombre", connReady); chkAreaCodigoBarra.Items.Insert(0, new ListItem("General", "-1")); } } @@ -1505,6 +1505,13 @@ inner join lab_item P with (nolock) on dp.idsubitem = p.iditem oUtil.CargarCombo(ddlItem, m_ssql, "idItem", "nombre", connReady); + //Carga de combo de rutinas + m_ssql = "SELECT idRutina, nombre FROM Lab_Rutina (nolock) where baja=0 and IdEfector= " + oUser.IdEfector.IdEfector.ToString() + " and idTipoServicio= " + Session["idServicio"].ToString() + " order by nombre ";//Ver MultiEfector + oUtil.CargarCombo(ddlRutina, m_ssql, "idRutina", "nombre", connReady); + ddlRutina.Items.Insert(0, new ListItem("Seleccione una rutina", "0")); + + ddlItem.UpdateAfterCallBack = true; + ddlRutina.UpdateAfterCallBack = true; if (Request["Operacion"].ToString() != "Modifica") { @@ -1671,25 +1678,32 @@ private void CargarItems() { Utility oUtil = new Utility(); ///Carga del combo de determinaciones - string m_ssql = "SELECT I.idItem as idItem, I.codigo as codigo, I.nombre as nombre, I.nombre + ' - ' + I.codigo as nombreLargo, " + - " IE.disponible " + - " FROM Lab_item I with (nolock) " + - " inner join lab_itemEfector IE with (nolock) on I.idItem= IE.idItem and Ie.idefector=" + oC.IdEfector.IdEfector.ToString() + //MultiEfector - " INNER JOIN Lab_area A with (nolock) ON A.idArea= I.idArea " + - " where A.baja=0 and I.baja=0 and IE.disponible=1 "+ - " and A.idtipoServicio= " + Session["idServicio"].ToString() + " AND (I.tipo= 'P') order by I.nombre "; - SqlConnection strconn = new SqlConnection(ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString); ///Performance: conexion de solo lectura - //NHibernate.Cfg.Configuration oConf = new NHibernate.Cfg.Configuration(); - //String strconn = oConf.GetProperty("hibernate.connection.connection_string"); + /// + string str_condicion = ""; + ///Caro: en el caso de modificacion agrego que cargue las determinaciones que estan en el protocolo independientemente si estan activas o no + if ((Request["Operacion"].ToString() == "Modifica") && (Request["idProtocolo"]!=null)) + str_condicion = " or exists(select 1 from LAB_DetalleProtocolo p WHERE p.iditem = I.iditem and idProtocolo = " + Request["idProtocolo"].ToString() + ") "; + + + + string m_ssql = @"SELECT I.idItem as idItem, I.codigo as codigo, I.nombre as nombre, I.nombre + ' - ' + I.codigo as nombreLargo, IE.disponible + FROM Lab_item I with (nolock) + inner join lab_itemEfector IE with (nolock) on I.idItem= IE.idItem and Ie.idefector=" + oC.IdEfector.IdEfector.ToString() + //MultiEfector + @" INNER JOIN Lab_area A with (nolock) ON A.idArea= I.idArea + where (A.baja=0 and I.baja=0 and IE.disponible=1 and A.idtipoServicio= " + Session["idServicio"].ToString() + @" AND (I.tipo= 'P')) "+ + str_condicion + @"order by I.nombre "; + + + + + SqlConnection strconn = new SqlConnection(ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString); ///Performance: conexion de solo lectura SqlDataAdapter da = new SqlDataAdapter(m_ssql, strconn); DataSet ds = new DataSet(); da.Fill(ds, "T"); - //gvLista.DataSource = ds.Tables["T"]; - //gvLista.DataBind(); - - - ddlItem.Items.Insert(0, new ListItem("", "0")); + + //Caro: Nomenclador es necesario cargar ddlitem porque ya se carga en CargarListas() + /// ddlItem.Items.Insert(0, new ListItem("", "0")); string sTareas = ""; for (int i = 0; i < ds.Tables["T"].Rows.Count; i++) @@ -1698,14 +1712,7 @@ private void CargarItems() } txtTareas.Value = sTareas; - //Carga de combo de rutinas - m_ssql = "SELECT idRutina, nombre FROM Lab_Rutina (nolock) where baja=0 and IdEfector= "+ oUser.IdEfector.IdEfector.ToString() +" and idTipoServicio= " + Session["idServicio"].ToString() + " order by nombre ";//Ver MultiEfector - oUtil.CargarCombo(ddlRutina, m_ssql, "idRutina", "nombre"); - ddlRutina.Items.Insert(0, new ListItem("Seleccione una rutina", "0")); - - ddlItem.UpdateAfterCallBack = true; - ddlRutina.UpdateAfterCallBack = true; - + m_ssql = null; oUtil = null; } @@ -3224,9 +3231,9 @@ private void AgregarRutina() ISession m_session = NHibernateHttpModule.CurrentSession; ICriteria crit = m_session.CreateCriteria(typeof(DetalleRutina)); crit.Add(Expression.Eq("IdRutina", oRutina)); + crit.AddOrder(Order.Asc("IdDetalleRutina")); IList detalle = crit.List(); - if (detalle.Count > 0) - { + string codigos=""; foreach (DetalleRutina oDetalle in detalle) { @@ -3246,7 +3253,7 @@ private void AgregarRutina() txtCodigosRutina.Text = codigos; txtCodigosRutina.UpdateAfterCallBack = true; - } + } diff --git a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs index 35695aa..bd74cc3 100644 --- a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs +++ b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs @@ -40,7 +40,7 @@ protected void Page_PreInit(object sender, EventArgs e) } - + private void CargarGrilla() { @@ -56,7 +56,7 @@ from Lab_Protocolo P with (nolock) adapter.SelectCommand = new SqlCommand(m_strSQL, conn); adapter.Fill(Ds); gvLista.DataSource = Ds.Tables[0]; - gvLista.DataBind(); + gvLista.DataBind(); } private void PreventingDoubleSubmit(Button button) @@ -463,7 +463,7 @@ private void CargarListas() lblServicio1.Text = "PROTOCOLO DE " + oServicio.Nombre.ToUpper(); - ///Carga de grupos de numeración solo si el tipo de numeración es 2: por Grupos + ///Carga de grupos de numeración solo si el tipo de numeración es 2: por Grupos => obsoleto con sil2 string m_ssql = "SELECT idSectorServicio, prefijo + ' - ' + nombre as nombre FROM LAB_SectorServicio with (nolock) WHERE (baja = 0) order by nombre"; oUtil.CargarCombo(ddlSectorServicio, m_ssql, "idSectorServicio", "nombre", connReady); ddlSectorServicio.Items.Insert(0, new ListItem("Seleccione", "0")); @@ -588,7 +588,15 @@ INNER JOIN Lab_area A with (nolock) ON A.idArea= I.idArea ///Carga de determinaciones y rutinas dependen de la selección del tipo de servicio CargarItems(); - + + //Carga de combo de rutinas + m_ssql = "SELECT idRutina, nombre FROM Lab_Rutina with (nolock) where baja=0 and idTipoServicio in ( 1,3) and idEfector=" + oUser.IdEfector.IdEfector.ToString() + " order by nombre "; + oUtil.CargarCombo(ddlRutina, m_ssql, "idRutina", "nombre", connReady); + ddlRutina.Items.Insert(0, new ListItem("Seleccione una rutina", "0")); + + ddlItem.UpdateAfterCallBack = true; + ddlRutina.UpdateAfterCallBack = true; + m_ssql = null; oUtil = null; @@ -702,18 +710,19 @@ private void CargarItems() { Utility oUtil = new Utility(); ///Carga del combo de determinaciones - //string m_ssql = @" SELECT I.idItem as idItem, I.codigo as codigo, I.nombre as nombre, I.nombre + ' - ' + I.codigo as nombreLargo, I.disponible - // FROM Lab_item I with (nolock) - // INNER JOIN Lab_area A with (nolock) ON A.idArea= I.idArea - // where A.baja=0 and I.baja=0 and A.idtipoServicio in (1, 3) AND (I.tipo= 'P') order by I.nombre "; + string str_condicion = ""; + ///Caro: agrego que cargue las determinaciones que estan en el protocolo + if ((Request["Operacion"].ToString() == "Modifica") && (Request["idProtocolo"] != null)) + str_condicion = " or exists(select 1 from LAB_DetalleProtocolo p WHERE p.iditem = I.iditem and idProtocolo = " + Request["idProtocolo"].ToString() + ") "; + string m_ssql = @"SELECT I.idItem as idItem, I.codigo as codigo, I.nombre as nombre, I.nombre + ' - ' + I.codigo as nombreLargo, IE.disponible FROM Lab_item I with (nolock) inner join lab_itemEfector IE with (nolock) on I.idItem= IE.idItem and Ie.idefector=" + oC.IdEfector.IdEfector.ToString() + //MultiEfector - @"INNER JOIN Lab_area A (nolock) ON A.idArea= I.idArea - where A.baja=0 and I.baja=0 and A.idtipoServicio in (1, 3) AND (I.tipo= 'P') order by I.nombre "; - //NHibernate.Cfg.Configuration oConf = new NHibernate.Cfg.Configuration(); - //String strconn = oConf.GetProperty("hibernate.connection.connection_string"); + @" INNER JOIN Lab_area A (nolock) ON A.idArea= I.idArea + where (A.baja=0 and I.baja=0 and A.idtipoServicio in (1, 3) AND (I.tipo= 'P')) " + + str_condicion + @"order by I.nombre "; + SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString); ///Performance: conexion de solo lectura SqlDataAdapter da = new SqlDataAdapter(m_ssql, conn); DataSet ds = new DataSet(); @@ -722,8 +731,8 @@ inner join lab_itemEfector IE with (nolock) on I.idItem= IE.idItem and Ie.idefe //gvLista.DataSource = ds.Tables["T"]; //gvLista.DataBind(); - - ddlItem.Items.Insert(0, new ListItem("", "0")); + //Caro: no es necesario cargar ddlitem ya se carga en CargarListas() + /// ddlItem.Items.Insert(0, new ListItem("", "0")); string sTareas = ""; for (int i = 0; i < ds.Tables["T"].Rows.Count; i++) @@ -732,14 +741,6 @@ inner join lab_itemEfector IE with (nolock) on I.idItem= IE.idItem and Ie.idefe } txtTareas.Value = sTareas; - //Carga de combo de rutinas - m_ssql = "SELECT idRutina, nombre FROM Lab_Rutina with (nolock) where baja=0 and idTipoServicio in ( 1,3) and idEfector=" + oUser.IdEfector.IdEfector.ToString() +" order by nombre "; - oUtil.CargarCombo(ddlRutina, m_ssql, "idRutina", "nombre"); - ddlRutina.Items.Insert(0, new ListItem("Seleccione una rutina", "0")); - - ddlItem.UpdateAfterCallBack = true; - ddlRutina.UpdateAfterCallBack = true; - m_ssql = null; oUtil = null; } @@ -1614,6 +1615,7 @@ private void AgregarRutina() ICriteria crit = m_session.CreateCriteria(typeof(DetalleRutina)); crit.Add(Expression.Eq("IdRutina", oRutina)); IList detalle = crit.List(); + crit.AddOrder(Order.Asc("IdDetalleRutina")); if (detalle.Count > 0) { string codigos=""; diff --git a/WebLab/Resultados/AnalisisEdit.aspx.cs b/WebLab/Resultados/AnalisisEdit.aspx.cs index b1aee32..2f5316f 100644 --- a/WebLab/Resultados/AnalisisEdit.aspx.cs +++ b/WebLab/Resultados/AnalisisEdit.aspx.cs @@ -13,6 +13,7 @@ using NHibernate.Expression; using System.Collections; using System.Configuration; +using Business.Data; namespace WebLab.Resultados { @@ -24,53 +25,74 @@ private Random private static int TEST = 0; - private bool IsTokenValid() - { - bool result = double.Parse(hidToken.Value) == ((double)Session["NextToken"]); - SetToken(); - return result; - } + //private bool IsTokenValid() + //{ + // bool result = double.Parse(hidToken.Value) == ((double)Session["NextToken"]); + // SetToken(); + // return result; + //} + + //private void SetToken() + //{ + // double next = random.Next(); + // hidToken.Value = next + ""; + // Session["NextToken"] = next; + //} + Usuario oUser = new Usuario(); - private void SetToken() + Protocolo oProtocolo = new Protocolo(); + + protected void Page_PreInit(object sender, EventArgs e) { - double next = random.Next(); - hidToken.Value = next + ""; - Session["NextToken"] = next; + if (Session["idUsuarioValida"] != null) + { + + oUser = (Usuario)oUser.Get(typeof(Usuario), int.Parse(Session["idUsuarioValida"].ToString())); + //oC = (Configuracion)oC.Get(typeof(Configuracion), "IdEfector", oUser.IdEfector); + } + else Response.Redirect("../FinSesion.aspx", false); + } - Protocolo oProtocolo = new Protocolo(); protected void Page_Load(object sender, EventArgs e) { - if (!Page.IsPostBack) + if (Session["idUsuarioValida"] != null) { - SetToken(); - 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())); + if (!Page.IsPostBack) + { + //SetToken(); + 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())); - if (oRegistro.IdTipoServicio.IdTipoServicio == 5) + if (oRegistro.IdTipoServicio.IdTipoServicio == 5) - lblProtocolo.Text = oRegistro.Numero.ToString() + " " + oRegistro.getMuestra(); - else + lblProtocolo.Text = oRegistro.Numero.ToString() + " " + oRegistro.getMuestra(); + else - lblProtocolo.Text = oRegistro.Numero.ToString() + " " + oRegistro.IdPaciente.Apellido + " " + oRegistro.IdPaciente.Nombre; + lblProtocolo.Text = oRegistro.Numero.ToString() + " " + oRegistro.IdPaciente.Apellido + " " + oRegistro.IdPaciente.Nombre; CargarListas(oRegistro); MuestraDatos(); - + } } + else + { + //Si se perdio la sesion le pida a la pagina padre que se redirija al login + string script = "window.top.location.href = '../FinSesion.aspx';"; + ScriptManager.RegisterStartupScript(this, GetType(), "redirigirLogin", script, true); + return; + } } private void MuestraDatos() { //Actualiza los datos de los objetos : alta o modificacion . - // Configuracion oC = new Configuracion(); oC = (Configuracion)oC.Get(typeof(Configuracion), "IdConfiguracion", 1); - + 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())); - // oRegistro.GrabarAuditoriaProtocolo("Consulta", int.Parse(Session["idUsuario"].ToString())); - + ddlMuestra.SelectedValue = oRegistro.IdMuestra.ToString(); CargarItems(oRegistro); @@ -150,42 +172,55 @@ private void mostrarCodigoMuestra() private void CargarListas(Protocolo oRegistro) { Utility oUtil = new Utility(); - //Configuracion oC = new Configuracion(); oC = (Configuracion)oC.Get(typeof(Configuracion), "IdConfiguracion", 1); - - + ////Solo cargar las listas deplegables con las determinaciones disponibles en este momento. + string connReady = ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString; ///Performance: conexion de solo lectura - //string m_ssql = @"SELECT I.idItem as idItem, I.nombre + ' - ' + I.codigo as nombre - // FROM Lab_item I with (nolock) - // INNER JOIN Lab_area A with (nolock) ON A.idArea= I.idArea - // where A.baja=0 and I.baja=0 and I.disponible=1 and A.idtipoServicio= " + oRegistro.IdTipoServicio.IdTipoServicio.ToString() + " AND (I.tipo= 'P') order by I.nombre "; + string str_condicion = oRegistro.IdTipoServicio.IdTipoServicio.ToString(); + if (oRegistro.IdTipoServicio.IdTipoServicio == 5) + str_condicion = "1,3"; + ////Caro mejorar el tiposervicio=5 string m_ssql = "SELECT I.idItem as idItem, I.nombre + ' - ' + I.codigo as nombre " + " FROM Lab_item I with (nolock) " + " inner join lab_itemEfector IE with (nolock) on I.idItem= IE.idItem and Ie.idefector=" + oRegistro.IdEfector.IdEfector.ToString() + //MultiEfector " INNER JOIN Lab_area A (nolock) ON A.idArea= I.idArea " + " where A.baja=0 and I.baja=0 and IE.disponible=1 " + - " and A.idtipoServicio= " + oRegistro.IdTipoServicio.IdTipoServicio.ToString() + " AND (I.tipo= 'P') order by I.nombre "; - if (oRegistro.IdTipoServicio.IdTipoServicio==5) - m_ssql = "SELECT I.idItem as idItem, I.nombre + ' - ' + I.codigo as nombre " + - " FROM Lab_item I with (nolock) " + - " INNER JOIN Lab_area A with (nolock) ON A.idArea= I.idArea " + - " where A.baja=0 and I.baja=0 and I.disponible=1 and A.idtipoServicio (1,3) AND (I.tipo= 'P') order by I.nombre "; + " and A.idtipoServicio in ("+str_condicion+") AND (I.tipo= 'P') order by I.nombre "; + //if (oRegistro.IdTipoServicio.IdTipoServicio==5) + // m_ssql = "SELECT I.idItem as idItem, I.nombre + ' - ' + I.codigo as nombre " + + // " FROM Lab_item I with (nolock) " + + // " INNER JOIN Lab_area A with (nolock) ON A.idArea= I.idArea " + + // " where A.baja=0 and I.baja=0 and I.disponible=1 and A.idtipoServicio (1,3) AND (I.tipo= 'P') order by I.nombre "; - oUtil.CargarCombo(ddlItem, m_ssql, "idItem", "nombre"); + oUtil.CargarCombo(ddlItem, m_ssql, "idItem", "nombre", connReady); + //////Caro, ver por que hay un cargarlistas para llenarddlitem - - ///Carga de determinaciones y rutinas dependen de la selección del tipo de servicio - CargarItems(oRegistro); + /////Carga de determinaciones para la + //CargarItems(oRegistro); //CargarDiagnosticosFrecuentes(); + //Carga de combo de rutinas + ///Correccion multiEfector + m_ssql = @"SELECT idRutina, nombre FROM Lab_Rutina with (nolock) where baja=0 and IdEfector= " + oRegistro.IdEfector.IdEfector.ToString() + + @" and idTipoServicio= " + oRegistro.IdTipoServicio.IdTipoServicio.ToString() + " order by nombre "; + if (oRegistro.IdTipoServicio.IdTipoServicio == 5) + m_ssql = "SELECT idRutina, nombre FROM Lab_Rutina with (nolock) where baja=0 and IdEfector= " + oRegistro.IdEfector.IdEfector.ToString() + " and idTipoServicio in (1, 3) order by nombre "; + + oUtil.CargarCombo(ddlRutina, m_ssql, "idRutina", "nombre", connReady); + ddlRutina.Items.Insert(0, new ListItem("Seleccione una rutina", "0")); + + //ddlItem.UpdateAfterCallBack = true; + //ddlRutina.UpdateAfterCallBack = true; + + if ((oRegistro.IdTipoServicio.IdTipoServicio == 3) || (oRegistro.IdTipoServicio.IdTipoServicio == 5)) { ////////////Carga de combos de Muestras pnlMuestra.Visible = true; m_ssql = "SELECT idMuestra, nombre + ' - ' + codigo as nombre FROM LAB_Muestra with (nolock) order by nombre "; - oUtil.CargarCombo(ddlMuestra, m_ssql, "idMuestra", "nombre"); + oUtil.CargarCombo(ddlMuestra, m_ssql, "idMuestra", "nombre", connReady); ////////////////7 } m_ssql = null; @@ -196,59 +231,35 @@ private void CargarListas(Protocolo oRegistro) private void CargarItems(Protocolo oRegistro) { - Utility oUtil = new Utility(); - ///Carga del combo de determinaciones - //string m_ssql = "SELECT I.idItem as idItem, I.codigo as codigo, I.nombre as nombre, I.nombre + ' - ' + I.codigo as nombreLargo, " + - // " I.disponible " + - // " FROM Lab_item I with (nolock) " + - // " INNER JOIN Lab_area A with (nolock) ON A.idArea= I.idArea " + - // " where A.baja=0 and I.baja=0 and A.idtipoServicio= " + oRegistro.IdTipoServicio.IdTipoServicio.ToString() + " AND (I.tipo= 'P') order by I.nombre "; - - /////Correccion MultiEfector - string m_ssql = "SELECT I.idItem as idItem, I.codigo as codigo, I.nombre as nombre, I.nombre + ' - ' + I.codigo as nombreLargo, " + - " IE.disponible " + - " FROM Lab_item I with (nolock) " + - " inner join lab_itemEfector IE with (nolock) on I.idItem= IE.idItem and Ie.idefector=" + oRegistro.IdEfector.IdEfector.ToString() + //MultiEfector - " INNER JOIN Lab_area A (nolock) ON A.idArea= I.idArea " + - " where A.baja=0 and I.baja=0 and IE.disponible=1 " + - " and A.idtipoServicio= " + oRegistro.IdTipoServicio.IdTipoServicio.ToString() + " AND (I.tipo= 'P') order by I.nombre "; - if (oRegistro.IdTipoServicio.IdTipoServicio==5) - m_ssql = "SELECT I.idItem as idItem, I.codigo as codigo, I.nombre as nombre, I.nombre + ' - ' + I.codigo as nombreLargo, " + - " I.disponible " + - " FROM Lab_item I with (nolock) " + - " INNER JOIN Lab_area A with (nolock) ON A.idArea= I.idArea " + - " where A.baja=0 and I.baja=0 and A.idtipoServicio in (1, 3) AND (I.tipo= 'P') order by I.nombre "; - - //NHibernate.Cfg.Configuration oConf = new NHibernate.Cfg.Configuration(); - //String strconn = oConf.GetProperty("hibernate.connection.connection_string"); + Utility oUtil = new Utility(); + string str_condicion = oRegistro.IdTipoServicio.IdTipoServicio.ToString(); + if (oRegistro.IdTipoServicio.IdTipoServicio == 5) + str_condicion = "1,3"; + + + /////Cargar las determinaciones disponibles ahora y las que estan en el protocolo + string m_ssql = @"SELECT I.idItem as idItem, I.codigo as codigo, I.nombre as nombre, I.nombre + ' - ' + I.codigo as nombreLargo, IE.disponible + FROM Lab_item I with (nolock) + inner join lab_itemEfector IE with (nolock) on I.idItem= IE.idItem and Ie.idefector=" + oRegistro.IdEfector.IdEfector.ToString() + + @"INNER JOIN Lab_area A (nolock) ON A.idArea= I.idArea + where (A.baja=0 and I.baja=0 and IE.disponible=1 and A.idtipoServicio in (" + str_condicion + @") AND (I.tipo= 'P') ) + or exists(select 1 from LAB_DetalleProtocolo p WHERE p.iditem = I.iditem and idProtocolo = "+oRegistro.IdProtocolo.ToString()+") order by I.nombre "; + SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString); ///Performance: conexion de solo lectura SqlDataAdapter da = new SqlDataAdapter(m_ssql, conn); DataSet ds = new DataSet(); da.Fill(ds, "T"); - - ddlItem.Items.Insert(0, new ListItem("", "0")); + ///Caro: no hace falta cargar ddlitem; ya se cargó en CargarLists() + ///ddlItem.Items.Insert(0, new ListItem("", "0")); string sTareas = ""; for (int i = 0; i < ds.Tables["T"].Rows.Count; i++) { sTareas += "#" + ds.Tables["T"].Rows[i][1].ToString() + "#" + ds.Tables["T"].Rows[i][2].ToString() + "#" + ds.Tables["T"].Rows[i][4].ToString() + "@"; } - txtTareas.Value = sTareas; - - //Carga de combo de rutinas - ///Correccion multiEfector - m_ssql = @"SELECT idRutina, nombre FROM Lab_Rutina with (nolock) where baja=0 and IdEfector= " + oRegistro.IdEfector.IdEfector.ToString() + - @" and idTipoServicio= " + oRegistro.IdTipoServicio.IdTipoServicio.ToString() + " order by nombre "; - if (oRegistro.IdTipoServicio.IdTipoServicio==5) - m_ssql = "SELECT idRutina, nombre FROM Lab_Rutina with (nolock) where baja=0 and IdEfector= " + oRegistro.IdEfector.IdEfector.ToString() + " and idTipoServicio in (1, 3) order by nombre "; - - oUtil.CargarCombo(ddlRutina, m_ssql, "idRutina", "nombre"); - ddlRutina.Items.Insert(0, new ListItem("Seleccione una rutina", "0")); - - ddlItem.UpdateAfterCallBack = true; - ddlRutina.UpdateAfterCallBack = true; + txtTareas.Value = sTareas; m_ssql = null; oUtil = null; @@ -282,12 +293,12 @@ protected void btnGuardar_Click(object sender, EventArgs e) private void Guardar(Business.Data.Laboratorio.Protocolo oRegistro) { - if (IsTokenValid()) - { - TEST++; + //if (IsTokenValid()) + //{ + // TEST++; GuardarDetalle(oRegistro); - } + //} // oRegistro.GrabarAuditoriaProtocolo(Request["Operacion"].ToString(), int.Parse(Session["idUsuario"].ToString())); } @@ -350,9 +361,17 @@ private void GuardarDetalle(Business.Data.Laboratorio.Protocolo oRegistro) else*/ if (trajomuestra == "true") + { oDetalle.TrajoMuestra = "No"; + oDetalle.FechaResultado = DateTime.Now; + oDetalle.GrabarAuditoriaDetalleProtocolo("Sin Muestra", oUser.IdUsuario); + } else + { oDetalle.TrajoMuestra = "Si"; + oDetalle.FechaResultado = DateTime.Parse("01/01/1900"); + } + oDetalle.FechaResultado = DateTime.Parse("01/01/1900"); @@ -363,9 +382,12 @@ private void GuardarDetalle(Business.Data.Laboratorio.Protocolo oRegistro) oDetalle.FechaObservacion = DateTime.Parse("01/01/1900"); oDetalle.FechaValidaObservacion = DateTime.Parse("01/01/1900"); oDetalle.FechaPreValida = DateTime.Parse("01/01/1900"); - oDetalle.Informable = oItem.Informable; + oDetalle.Informable = oItem.GetInformableEfector(oUser.IdEfector); GuardarDetallePractica(oDetalle); + + // GuardarDerivacion(oDetalle); + //oDetalle.GuardarDerivacion(oUser); } else //si ya esta actualizo si trajo muestra o no { @@ -430,8 +452,8 @@ private void GuardarDetalle(Business.Data.Laboratorio.Protocolo oRegistro) else oRegistro.FechaRetiro = oRegistro.Fecha.AddDays(dias_espera); - - if( oRegistro.IdTipoServicio.IdTipoServicio==3) oRegistro.IdMuestra = int.Parse(ddlMuestra.SelectedValue); + //Para casos de modificacion, si cambio el tipo de Muestra que tambien contemple el Servicio 5 + if( oRegistro.IdTipoServicio.IdTipoServicio==3 || oRegistro.IdTipoServicio.IdTipoServicio == 5) oRegistro.IdMuestra = int.Parse(ddlMuestra.SelectedValue); oRegistro.Save(); @@ -522,11 +544,13 @@ private void GuardarDetalle2(Business.Data.Laboratorio.Protocolo oRegistro) private void GuardarDetallePractica(DetalleProtocolo oDet) { - if (oDet.VerificarSiEsDerivable(oDet.IdItem.IdEfector)) //oDet.IdItem.IdEfector.IdEfector != oDet.IdItem.IdEfectorDerivacion.IdEfector) //Si es un item derivable no busca hijos y guarda directamente. + if (oDet.VerificarSiEsDerivable(oDet.IdProtocolo.IdEfector)) //oDet.IdItem.IdEfector.IdEfector != oDet.IdItem.IdEfectorDerivacion.IdEfector) //Si es un item derivable no busca hijos y guarda directamente. { oDet.IdSubItem = oDet.IdItem; oDet.Save(); oDet.GuardarValorReferencia(); + //Guarda Derivacion + oDet.GuardarDerivacion(oUser); } else @@ -547,31 +571,50 @@ private void GuardarDetallePractica(DetalleProtocolo oDet) oSItem=(Item)oSItem.Get(typeof(Item), oSubitem.IdItemDeterminacion); if (i == 1) { - oDet.IdSubItem = oSItem; - oDet.Save(); + //oDet.IdSubItem = oSItem; + //oDet.Save(); + if (oDet.TrajoMuestra == "Si") + { + oDet.IdSubItem = oSItem; + oDet.FechaResultado = DateTime.Parse("01/01/1900"); + } + else + { + oDet.IdSubItem = oDet.IdItem; //no trajo muestra le pone el mismo id + oDet.FechaResultado = DateTime.Now; + } + + oDet.Save(); + oDet.GuardarSinInsumo(); + oDet.GuardarValorReferencia(); + if (oDet.TrajoMuestra == "No") + oDet.GrabarAuditoriaDetalleProtocolo("Sin Muestra", oUser.IdUsuario); } else { - DetalleProtocolo oDetalle = new DetalleProtocolo(); - oDetalle.IdProtocolo =oDet.IdProtocolo; - oDetalle.IdEfector = oDet.IdEfector; - oDetalle.IdItem = oDet.IdItem; - oDetalle.IdSubItem = oSItem; - oDetalle.TrajoMuestra = oDet.TrajoMuestra; - oDetalle.Informable = oSItem.Informable; - - oDetalle.FechaResultado = DateTime.Parse("01/01/1900"); - oDetalle.FechaValida = DateTime.Parse("01/01/1900"); - oDetalle.FechaControl = DateTime.Parse("01/01/1900"); - oDetalle.FechaImpresion = DateTime.Parse("01/01/1900"); - oDetalle.FechaEnvio = DateTime.Parse("01/01/1900"); - oDetalle.FechaObservacion = DateTime.Parse("01/01/1900"); - oDetalle.FechaValidaObservacion = DateTime.Parse("01/01/1900"); - oDetalle.FechaPreValida = DateTime.Parse("01/01/1900"); - - oDetalle.Save(); - - GuardarValorReferencia(oDetalle); + if (oDet.TrajoMuestra == "Si") // sino trajo muestra no guardo el detalle + { + DetalleProtocolo oDetalle = new DetalleProtocolo(); + oDetalle.IdProtocolo = oDet.IdProtocolo; + oDetalle.IdEfector = oDet.IdEfector; + oDetalle.IdItem = oDet.IdItem; + oDetalle.IdSubItem = oSItem; + oDetalle.TrajoMuestra = oDet.TrajoMuestra; + oDetalle.Informable = oSItem.Informable; + + oDetalle.FechaResultado = DateTime.Parse("01/01/1900"); + oDetalle.FechaValida = DateTime.Parse("01/01/1900"); + oDetalle.FechaControl = DateTime.Parse("01/01/1900"); + oDetalle.FechaImpresion = DateTime.Parse("01/01/1900"); + oDetalle.FechaEnvio = DateTime.Parse("01/01/1900"); + oDetalle.FechaObservacion = DateTime.Parse("01/01/1900"); + oDetalle.FechaValidaObservacion = DateTime.Parse("01/01/1900"); + oDetalle.FechaPreValida = DateTime.Parse("01/01/1900"); + + oDetalle.Save(); + oDetalle.GuardarSinInsumo(); + oDetalle.GuardarValorReferencia(); + } } i = i + 1; }//fin if @@ -580,84 +623,19 @@ private void GuardarDetallePractica(DetalleProtocolo oDet) else { oDet.IdSubItem = oDet.IdItem; - oDet.Informable = oDet.IdSubItem.Informable; + oDet.Informable = oDet.IdSubItem.GetInformableEfector(oUser.IdEfector); oDet.Save(); - - GuardarValorReferencia(oDet); + oDet.GuardarSinInsumo(); + oDet.GuardarValorReferencia(); + if (oDet.TrajoMuestra == "No") + oDet.GrabarAuditoriaDetalleProtocolo("Sin Muestra", oUser.IdUsuario); + }//fin if (detalle.Count > 0) } } - private void GuardarValorReferencia(DetalleProtocolo oDetalle) - { - - string s_unidadMedida = ""; //string s_metodo = ""; - //Item oItem = new Item(); - //oItem = (Item)oItem.Get(typeof(Item), int.Parse(m_idItem)); - if (oDetalle.IdSubItem.IdUnidadMedida > 0) - { - UnidadMedida oUnidad = new UnidadMedida(); - oUnidad = (UnidadMedida)oUnidad.Get(typeof(UnidadMedida), oDetalle.IdSubItem.IdUnidadMedida); - if (oUnidad != null) s_unidadMedida = oUnidad.Nombre; - - } - - ///Calculo de valor de referencia al momento de generar el registro - /// - int pres = oDetalle.IdSubItem.GetPresentacionEfector(oDetalle.IdEfector); - - string m_metodo = ""; - string m_valorReferencia = ""; - string valorRef = oDetalle.CalcularValoresReferencia(pres); - if (valorRef != "") - { - string[] arr = valorRef.Split(("|").ToCharArray()); - switch (arr.Length) - { - case 1: m_valorReferencia = arr[0].ToString(); break; - case 2: - { - m_valorReferencia = arr[0].ToString(); - m_metodo = arr[1].ToString(); - } - break; - } - - } - oDetalle.UnidadMedida = s_unidadMedida; - oDetalle.Metodo = m_metodo; - oDetalle.ValorReferencia = m_valorReferencia; - oDetalle.Save(); - //Fin calculo de valor de refrencia y metodo - } - - - //private bool VerificarSiEsDerivable(DetalleProtocolo oDet) - //{ - // bool ok=false; - // /// buscar idefectorderivacion desde lab_itemefector - // ISession m_session = NHibernateHttpModule.CurrentSession; - // ICriteria critItemEfector = m_session.CreateCriteria(typeof(ItemEfector)); - // critItemEfector.Add(Expression.Eq("IdItem", oDet.IdItem)); - // critItemEfector.Add(Expression.Eq("IdEfector", oDet.IdProtocolo.IdEfector)); - // IList detalle1 = critItemEfector.List(); - // if (detalle1.Count > 0) - // { - // foreach (ItemEfector oitemEfector in detalle1) - // { - // if (oDet.IdEfector.IdEfector != oitemEfector.IdEfectorDerivacion.IdEfector) - // { - // ok = true; break; - // } - // } - // } - // else - // ok = false; - - // return ok; - - //} + protected void ddlSexo_SelectedIndexChanged(object sender, EventArgs e) { @@ -718,9 +696,11 @@ private void AgregarRutina() ISession m_session = NHibernateHttpModule.CurrentSession; ICriteria crit = m_session.CreateCriteria(typeof(DetalleRutina)); crit.Add(Expression.Eq("IdRutina", oRutina)); + crit.AddOrder(Order.Asc("IdDetalleRutina")); + + IList detalle = crit.List(); - if (detalle.Count > 0) - { + string codigos = ""; foreach (DetalleRutina oDetalle in detalle) { @@ -728,19 +708,12 @@ private void AgregarRutina() if (codigos == "") codigos = oDetalle.IdItem.Codigo; else - codigos += ";" + oDetalle.IdItem.Codigo; - - - - //ddlRutina.SelectedValue = "0"; - //ddlRutina.UpdateAfterCallBack = true; - - + codigos += ";" + oDetalle.IdItem.Codigo; } txtCodigosRutina.Text = codigos; txtCodigosRutina.UpdateAfterCallBack = true; - } + } @@ -916,89 +889,11 @@ private bool VerificarAnalisisComplejosContenidos(string listaCodigo) } - protected void lnkSiguiente_Click(object sender, EventArgs e) - { - Avanzar(1); - } - - protected void lnkAnterior_Click(object sender, EventArgs e) - { - Avanzar(-1); - } - - private void Avanzar(int avance) - { - - int ProtocoloActual = int.Parse(Request["idProtocolo"].ToString()); - //Protocolo oProtocoloActual = new Protocolo(); - //oProtocoloActual = (Protocolo)oProtocoloActual.Get(typeof(Protocolo), ProtocoloActual); - int ProtocoloNuevo = ProtocoloActual; - - if (Session["ListaProtocolo"] != null) - { - string[] lista = Session["ListaProtocolo"].ToString().Split(','); - for (int i = 0; i < lista.Length; i++) - { - if (ProtocoloActual == int.Parse(lista[i].ToString())) - { - if (avance == 1) - { - if (i < lista.Length - 1) - { - ProtocoloNuevo = int.Parse(lista[i + 1].ToString()); break; - } - } - else //retrocede - { - if (i > 0) - { - ProtocoloNuevo = int.Parse(lista[i - 1].ToString()); break; - } - } - - - } - } - } - //if (avance == 1) - //{ - // ProtocoloNuevo = ProtocoloActual+1; - //} - //else //retrocede - // ProtocoloNuevo = ProtocoloActual - 1; - - - - ISession m_session = NHibernateHttpModule.CurrentSession; - ICriteria crit = m_session.CreateCriteria(typeof(Protocolo)); - crit.Add(Expression.Eq("IdProtocolo", ProtocoloNuevo)); - //crit.Add(Expression.Eq("IdSector", oProtocoloActual.IdSector)); - Protocolo oProtocolo = (Protocolo)crit.UniqueResult(); - - string m_parametro = ""; - if (Request["DesdeUrgencia"] != null) m_parametro = "&DesdeUrgencia=1"; - - if (oProtocolo != null) - { - //if (Request["Desde"].ToString() == "Control") - Response.Redirect("ProtocoloEdit2.aspx?Desde=" + Request["Desde"].ToString() + "&idServicio=" + Session["idServicio"].ToString() + "&Operacion=Modifica&idProtocolo=" + ProtocoloNuevo + m_parametro); - //else - // Response.Redirect("ProtocoloEdit2.aspx?Desde="+Request["Desde"].ToString()+"&idServicio=" + Session["idServicio"].ToString() + "&Operacion=Modifica&idProtocolo=" + ProtocoloNuevo + m_parametro); - } - else - Response.Redirect("ProtocoloEdit2.aspx?Desde=" + Request["Desde"].ToString() + "&idServicio=" + Session["idServicio"].ToString() + "&Operacion=Modifica&idProtocolo=" + ProtocoloActual + m_parametro); - - } - - - - protected void gvLista_RowCommand(object sender, GridViewCommandEventArgs e) - { - if (e.CommandName == "Modificar") - Response.Redirect("ProtocoloEdit2.aspx?Desde=" + Request["Desde"].ToString() + "&idServicio=" + Request["idServicio"].ToString() + "&Operacion=Modifica&idProtocolo=" + e.CommandArgument.ToString()); + + - } + diff --git a/WebLab/Resultados/ResultadoHTEdit.aspx.cs b/WebLab/Resultados/ResultadoHTEdit.aspx.cs index 71966a8..f4e55b2 100644 --- a/WebLab/Resultados/ResultadoHTEdit.aspx.cs +++ b/WebLab/Resultados/ResultadoHTEdit.aspx.cs @@ -625,14 +625,14 @@ private void ArmarTabla(HojaTrabajo oRegistro) break; case 4: //Lista predefinida con seleccion multiple (sin seleccion multiple...jiji) { - /*Antes - //Verifica si la determinacion tiene una lista predeterminada de resultados + //Antes + ////Verifica si la determinacion tiene una lista predeterminada de resultados ISession m_session = NHibernateHttpModule.CurrentSession; ICriteria crit = m_session.CreateCriteria(typeof(ResultadoItem)); crit.Add(Expression.Eq("IdItem", oItem)); crit.Add(Expression.Eq("IdEfector", oUser.IdEfector)); //Multiefector crit.Add(Expression.Eq("Baja", false)); - /// crit.AddOrder(Order.Asc("Resultado")); // el orden lo define el usuario + crit.AddOrder(Order.Asc("Resultado")); // el orden lo define el usuario ///Si tiene resultados predeterminados muestra un combo IList resultados = crit.List(); @@ -702,64 +702,76 @@ private void ArmarTabla(HojaTrabajo oRegistro) ddl1.Enabled = false; } } + ///agrega boton para seleccionar las opciones + ImageButton btnAddDetalle = new ImageButton(); + btnAddDetalle.TabIndex = short.Parse("500"); + //btnAddDetalle.AutoUpdateAfterCallBack = true; + btnAddDetalle.ID = "b" + m_idControl; + btnAddDetalle.ToolTip = "Desplegar opciones"; + btnAddDetalle.ImageUrl = "~/App_Themes/default/images/add.png"; + //btnObservacionDetalle2.Attributes.Add("onClick", "javascript: ObservacionEdit (" + oDetalle.IdDetalleProtocolo.ToString() + "," + oDetalle.IdProtocolo.IdTipoServicio.IdTipoServicio.ToString() + ",'" + Request["Operacion"].ToString() + "'); return false"); + btnAddDetalle.Attributes.Add("onClick", "javascript: PredefinidoSelect (" + oDet.IdDetalleProtocolo.ToString() + ",'" + Request["Operacion"].ToString() + "'); return false"); + //btnAddDetalle.Click += new ImageClickEventHandler(btnAddDetalle_Click); + ddl1.Width= Unit.Pixel(150); objCell.Controls.Add(ddl1); + objCell.Controls.Add(btnAddDetalle); objCell.Width = Unit.Pixel(150); - }*/ + } ///ahora - string m_resultadoDefecto = ""; - if (oDet.ConResultado == false) // sin resultado - { - ISession m_session = NHibernateHttpModule.CurrentSession; - ICriteria crit = m_session.CreateCriteria(typeof(ResultadoItem)); - crit.Add(Expression.Eq("IdItem", oItem)); - crit.Add(Expression.Eq("IdEfector", oUser.IdEfector)); - crit.Add(Expression.Eq("Baja", false)); - /// crit.AddOrder(Order.Asc("Resultado")); /// el orden lo define el usuario - ///Si tiene resultados predeterminados muestra un combo - IList resultados = crit.List(); - foreach (ResultadoItem oResultado in resultados) - { - ListItem Item = new ListItem(); - Item.Value = oResultado.IdResultadoItem.ToString(); - Item.Text = oResultado.Resultado; - - if (oResultado.ResultadoDefecto) - m_resultadoDefecto = oResultado.Resultado; - } - - } - TextBox txt1 = new TextBox(); - txt1.ID = m_idControl; - txt1.ReadOnly = true;// no es posible editar como texto, sino que agregar /quitar desde las opciones - txt1.TabIndex = short.Parse(i + 1.ToString()); - txt1.Text = oDet.ResultadoCar; - txt1.TextMode = TextBoxMode.SingleLine; - txt1.Width = Unit.Percentage(95); - // txt1.Rows = 1; - txt1.MaxLength = 200; - txt1.ToolTip = oDet.ResultadoCar; - //txt1.Attributes.Add("onClick", "javascript: PredefinidoSelect (" + oDet.IdDetalleProtocolo.ToString() + ",'" + Request["Operacion"].ToString() + "'); return false"); - //txt1.CssClass = "myTexto"; - if (oDet.ConResultado == false) // sin resultado - txt1.Text = m_resultadoDefecto; - - ///agrega boton para seleccionar las opciones - /* ImageButton btnAddDetalle = new ImageButton(); - btnAddDetalle.TabIndex = short.Parse("500"); - //btnAddDetalle.AutoUpdateAfterCallBack = true; - btnAddDetalle.ID = "b" + m_idControl; - btnAddDetalle.ToolTip = "Desplegar opciones"; - btnAddDetalle.ImageUrl = "~/App_Themes/default/images/add.png"; - //btnObservacionDetalle2.Attributes.Add("onClick", "javascript: ObservacionEdit (" + oDetalle.IdDetalleProtocolo.ToString() + "," + oDetalle.IdProtocolo.IdTipoServicio.IdTipoServicio.ToString() + ",'" + Request["Operacion"].ToString() + "'); return false"); - btnAddDetalle.Attributes.Add("onClick", "javascript: PredefinidoSelect (" + oDet.IdDetalleProtocolo.ToString() + ",'" + Request["Operacion"].ToString() + "'); return false"); - //btnAddDetalle.Click += new ImageClickEventHandler(btnAddDetalle_Click); - - */ - bool agregarSeleccion = true; + // string m_resultadoDefecto = ""; + // if (oDet.ConResultado == false) // sin resultado + // { + // ISession m_session = NHibernateHttpModule.CurrentSession; + // ICriteria crit = m_session.CreateCriteria(typeof(ResultadoItem)); + // crit.Add(Expression.Eq("IdItem", oItem)); + // crit.Add(Expression.Eq("IdEfector", oUser.IdEfector)); + // crit.Add(Expression.Eq("Baja", false)); + // /// crit.AddOrder(Order.Asc("Resultado")); /// el orden lo define el usuario + // ///Si tiene resultados predeterminados muestra un combo + // IList resultados = crit.List(); + // foreach (ResultadoItem oResultado in resultados) + // { + // ListItem Item = new ListItem(); + // Item.Value = oResultado.IdResultadoItem.ToString(); + // Item.Text = oResultado.Resultado; + + // if (oResultado.ResultadoDefecto) + // m_resultadoDefecto = oResultado.Resultado; + // } + + // } + // TextBox txt1 = new TextBox(); + // txt1.ID = m_idControl; + // txt1.ReadOnly = true;// no es posible editar como texto, sino que agregar /quitar desde las opciones + // txt1.TabIndex = short.Parse(i + 1.ToString()); + // txt1.Text = oDet.ResultadoCar; + // txt1.TextMode = TextBoxMode.SingleLine; + //txt1.Width = Unit.Percentage(95); + // // txt1.Rows = 1; + // txt1.MaxLength = 200; + // txt1.ToolTip = oDet.ResultadoCar; + // //txt1.Attributes.Add("onClick", "javascript: PredefinidoSelect (" + oDet.IdDetalleProtocolo.ToString() + ",'" + Request["Operacion"].ToString() + "'); return false"); + // //txt1.CssClass = "myTexto"; + //if (oDet.ConResultado == false) // sin resultado + // txt1.Text = m_resultadoDefecto; + + /////agrega boton para seleccionar las opciones + //ImageButton btnAddDetalle = new ImageButton(); + //btnAddDetalle.TabIndex = short.Parse("500"); + ////btnAddDetalle.AutoUpdateAfterCallBack = true; + //btnAddDetalle.ID = "b" + m_idControl; + //btnAddDetalle.ToolTip = "Desplegar opciones"; + //btnAddDetalle.ImageUrl = "~/App_Themes/default/images/add.png"; + ////btnObservacionDetalle2.Attributes.Add("onClick", "javascript: ObservacionEdit (" + oDetalle.IdDetalleProtocolo.ToString() + "," + oDetalle.IdProtocolo.IdTipoServicio.IdTipoServicio.ToString() + ",'" + Request["Operacion"].ToString() + "'); return false"); + //btnAddDetalle.Attributes.Add("onClick", "javascript: PredefinidoSelect (" + oDet.IdDetalleProtocolo.ToString() + ",'" + Request["Operacion"].ToString() + "'); return false"); + ////btnAddDetalle.Click += new ImageClickEventHandler(btnAddDetalle_Click); + + + /* bool agregarSeleccion = true; if (oDet.IdUsuarioValida > 0) // validado txt1.BackColor = Color.LightBlue; else @@ -807,6 +819,7 @@ private void ArmarTabla(HojaTrabajo oRegistro) objCell.Controls.Add(txt1); // objCell.Controls.Add(btnAddDetalle); objCell.Width = Unit.Pixel(150); + */ } break; diff --git a/WebLab/Resultados/ResultadoItemEdit.aspx.cs b/WebLab/Resultados/ResultadoItemEdit.aspx.cs index 7843ab1..1066cbc 100644 --- a/WebLab/Resultados/ResultadoItemEdit.aspx.cs +++ b/WebLab/Resultados/ResultadoItemEdit.aspx.cs @@ -80,7 +80,7 @@ private void MostrarResumen() gvResumen.DataBind(); gvResumen.Visible = true; lblProcesado.Visible = true; - + /* // sisa lblMensajeSISA.Visible = false; Configuracion oCon = new Configuracion(); oCon = (Configuracion)oCon.Get(typeof(Configuracion), 1); @@ -138,513 +138,514 @@ private void MostrarResumen() lblMensajeSISA.Text ="Se han generado "+ i.ToString() + " eventos nuevos en SISA"; lblMensajeSISA.Visible = true; } - }// if (oCon.NotificarSISA) + }// if (oCon.NotificarSISA) + */ } - private bool ProcesaSISA(DetalleProtocolo oDetalle, string res) - { - bool generacaso = false; + //private bool ProcesaSISA(DetalleProtocolo oDetalle, string res) + //{ + // bool generacaso = false; - try - { - if (oDetalle.IdProtocolo.IdCasoSISA == 0) - generacaso = GenerarCasoSISA(oDetalle, res); + // try + // { + // if (oDetalle.IdProtocolo.IdCasoSISA == 0) + // generacaso = GenerarCasoSISA(oDetalle, res); - string m_strSQL = @"SELECT distinct idDetalleProtocolo, S.idMuestra as IdMuestraSISA, S.idTipoMuestra as idTipoMuestraSISA, s.idPrueba as idPruebaSISA, s.idTipoPrueba as idTipoPruebaSISA, - ds.idResultadoSISA,S.idEvento - FROM LAB_DetalleProtocolo d with (nolock) - inner join LAB_ConfiguracionSISA S with (nolock) on S.idCaracter=" + oDetalle.IdProtocolo.IdCaracter.ToString() + @" and s.idItem= d.idSubItem - inner join LAB_ConfiguracionSISADetalle DS with (nolock) on DS.idItem=d.idSubItem and resultadocar= ds.resultado - where d.idProtocolo= " + oDetalle.IdProtocolo.IdProtocolo.ToString(); + // string m_strSQL = @"SELECT distinct idDetalleProtocolo, S.idMuestra as IdMuestraSISA, S.idTipoMuestra as idTipoMuestraSISA, s.idPrueba as idPruebaSISA, s.idTipoPrueba as idTipoPruebaSISA, + // ds.idResultadoSISA,S.idEvento + // FROM LAB_DetalleProtocolo d with (nolock) + // inner join LAB_ConfiguracionSISA S with (nolock) on S.idCaracter=" + oDetalle.IdProtocolo.IdCaracter.ToString() + @" and s.idItem= d.idSubItem + // inner join LAB_ConfiguracionSISADetalle DS with (nolock) on DS.idItem=d.idSubItem and resultadocar= ds.resultado + // where d.idProtocolo= " + oDetalle.IdProtocolo.IdProtocolo.ToString(); - DataSet Ds = new DataSet(); - SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; - SqlDataAdapter adapter = new SqlDataAdapter(); - adapter.SelectCommand = new SqlCommand(m_strSQL, conn); - adapter.Fill(Ds); + // DataSet Ds = new DataSet(); + // SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; + // SqlDataAdapter adapter = new SqlDataAdapter(); + // adapter.SelectCommand = new SqlCommand(m_strSQL, conn); + // adapter.Fill(Ds); - string idDetalleProtocolo; - string idMuestra; - string idTipoMuestra; - string idPrueba; - string idTipoPrueba; - string idResultadoSISA; - string idEvento; + // string idDetalleProtocolo; + // string idMuestra; + // string idTipoMuestra; + // string idPrueba; + // string idTipoPrueba; + // string idResultadoSISA; + // string idEvento; - DataTable dt = Ds.Tables[0]; + // DataTable dt = Ds.Tables[0]; - for (int i = 0; i < dt.Rows.Count; i++) - { - idDetalleProtocolo = dt.Rows[i][0].ToString(); - idMuestra = dt.Rows[i][1].ToString(); - idTipoMuestra = dt.Rows[i][2].ToString(); - idPrueba = dt.Rows[i][3].ToString(); - idTipoPrueba = dt.Rows[i][4].ToString(); - idResultadoSISA = dt.Rows[i][5].ToString(); - idEvento = dt.Rows[i][6].ToString(); + // for (int i = 0; i < dt.Rows.Count; i++) + // { + // idDetalleProtocolo = dt.Rows[i][0].ToString(); + // idMuestra = dt.Rows[i][1].ToString(); + // idTipoMuestra = dt.Rows[i][2].ToString(); + // idPrueba = dt.Rows[i][3].ToString(); + // idTipoPrueba = dt.Rows[i][4].ToString(); + // idResultadoSISA = dt.Rows[i][5].ToString(); + // idEvento = dt.Rows[i][6].ToString(); - if ((oDetalle.IdProtocolo.IdCasoSISA > 0) && (oDetalle.IdeventomuestraSISA == 0)) - GenerarMuestraSISA(oDetalle.IdProtocolo, idMuestra, idTipoMuestra, idDetalleProtocolo); + // if ((oDetalle.IdProtocolo.IdCasoSISA > 0) && (oDetalle.IdeventomuestraSISA == 0)) + // GenerarMuestraSISA(oDetalle.IdProtocolo, idMuestra, idTipoMuestra, idDetalleProtocolo); - if (oDetalle.IdeventomuestraSISA > 0) - GenerarResultadoSISA(oDetalle, idPrueba, idTipoPrueba, idResultadoSISA, idEvento); + // if (oDetalle.IdeventomuestraSISA > 0) + // GenerarResultadoSISA(oDetalle, idPrueba, idTipoPrueba, idResultadoSISA, idEvento); - break; - } + // break; + // } - } - catch (Exception e) - { - generacaso = false; + // } + // catch (Exception e) + // { + // generacaso = false; - } - return generacaso; + // } + // return generacaso; - } + //} - public void GenerarMuestraSISA(Protocolo protocolo, string idMuestraSISA, string idtipoMuestraSISA, string idDetalleProtocolo) + //public void GenerarMuestraSISA(Protocolo protocolo, string idMuestraSISA, string idtipoMuestraSISA, string idDetalleProtocolo) - { - System.Net.ServicePointManager.SecurityProtocol = - System.Net.SecurityProtocolType.Tls12; + //{ + // System.Net.ServicePointManager.SecurityProtocol = + // System.Net.SecurityProtocolType.Tls12; - Configuracion oCon = new Configuracion(); oCon = (Configuracion)oCon.Get(typeof(Configuracion), 1); - string URL = oCon.URLMuestraSISA; + // Configuracion oCon = new Configuracion(); oCon = (Configuracion)oCon.Get(typeof(Configuracion), 1); + // string URL = oCon.URLMuestraSISA; - bool generacaso = true; - string ftoma = protocolo.FechaTomaMuestra.ToString("yyyy-MM-dd");//.ToShortDateString("yyyy/MM/dd").Replace("/", "-"); + // bool generacaso = true; + // string ftoma = protocolo.FechaTomaMuestra.ToString("yyyy-MM-dd");//.ToShortDateString("yyyy/MM/dd").Replace("/", "-"); - string idestablecimientotoma = protocolo.IdEfectorSolicitante.CodigoSISA; - if (idestablecimientotoma == "") - //pongo por defecto laboratorio central - idestablecimientotoma = "107093"; + // string idestablecimientotoma = protocolo.IdEfectorSolicitante.CodigoSISA; + // if (idestablecimientotoma == "") + // //pongo por defecto laboratorio central + // idestablecimientotoma = "107093"; - ResultadoxNro.EventoMuestra newmuestra = new ResultadoxNro.EventoMuestra - { - adecuada = true, - aislamiento = false, - fechaToma = ftoma, // "2020-08-23", - idEstablecimientoToma = int.Parse(idestablecimientotoma), // 140618, // sacar del efector solicitante - idEventoCaso = protocolo.IdCasoSISA, // 2061287, - idMuestra = int.Parse(idMuestraSISA), - idtipoMuestra = int.Parse(idtipoMuestraSISA), - muestra = true - }; - JavaScriptSerializer jsonSerializer = new JavaScriptSerializer(); - - string DATA = jsonSerializer.Serialize(newmuestra); - - - byte[] data = UTF8Encoding.UTF8.GetBytes(DATA); - - HttpWebRequest request; - request = WebRequest.Create(URL) as HttpWebRequest; - request.Timeout = 10 * 1000; - request.Method = "POST"; - request.ContentLength = data.Length; - request.ContentType = "application/json"; - request.Headers.Add("app_key", "b0fd61c3a08917cfd20491b24af6049e"); - request.Headers.Add("app_id", "22891c8f"); - - try - { + // ResultadoxNro.EventoMuestra newmuestra = new ResultadoxNro.EventoMuestra + // { + // adecuada = true, + // aislamiento = false, + // fechaToma = ftoma, // "2020-08-23", + // idEstablecimientoToma = int.Parse(idestablecimientotoma), // 140618, // sacar del efector solicitante + // idEventoCaso = protocolo.IdCasoSISA, // 2061287, + // idMuestra = int.Parse(idMuestraSISA), + // idtipoMuestra = int.Parse(idtipoMuestraSISA), + // muestra = true + // }; + // JavaScriptSerializer jsonSerializer = new JavaScriptSerializer(); - Stream postStream = request.GetRequestStream(); - postStream.Write(data, 0, data.Length); + // string DATA = jsonSerializer.Serialize(newmuestra); - HttpWebResponse response = request.GetResponse() as HttpWebResponse; - StreamReader reader = new StreamReader(response.GetResponseStream()); - string body = reader.ReadToEnd(); + // byte[] data = UTF8Encoding.UTF8.GetBytes(DATA); - if (body != "") - { - ResultadoxNro.EventoMuestraResultado respuesta_d = jsonSerializer.Deserialize(body); + // HttpWebRequest request; + // request = WebRequest.Create(URL) as HttpWebRequest; + // request.Timeout = 10 * 1000; + // request.Method = "POST"; + // request.ContentLength = data.Length; + // request.ContentType = "application/json"; + // request.Headers.Add("app_key", "b0fd61c3a08917cfd20491b24af6049e"); + // request.Headers.Add("app_id", "22891c8f"); - if (respuesta_d.id != 1) - { - DetalleProtocolo oDetalle = new DetalleProtocolo(); - oDetalle = (DetalleProtocolo)oDetalle.Get(typeof(DetalleProtocolo), int.Parse(idDetalleProtocolo)); + // try + // { - if (oDetalle != null) - { + // Stream postStream = request.GetRequestStream(); + // postStream.Write(data, 0, data.Length); - oDetalle.IdeventomuestraSISA = respuesta_d.id; - oDetalle.Save(); + // HttpWebResponse response = request.GetResponse() as HttpWebResponse; + // StreamReader reader = new StreamReader(response.GetResponseStream()); + // string body = reader.ReadToEnd(); - oDetalle.GrabarAuditoriaDetalleProtocolo("Genera Muestra SISA " + respuesta_d.id.ToString(), oDetalle.IdUsuarioValida); + // if (body != "") + // { + // ResultadoxNro.EventoMuestraResultado respuesta_d = jsonSerializer.Deserialize(body); + // if (respuesta_d.id != 1) + // { + // DetalleProtocolo oDetalle = new DetalleProtocolo(); + // oDetalle = (DetalleProtocolo)oDetalle.Get(typeof(DetalleProtocolo), int.Parse(idDetalleProtocolo)); - } //if - } //respuesta_o + // if (oDetalle != null) + // { + // oDetalle.IdeventomuestraSISA = respuesta_d.id; + // oDetalle.Save(); - }// body + // oDetalle.GrabarAuditoriaDetalleProtocolo("Genera Muestra SISA " + respuesta_d.id.ToString(), oDetalle.IdUsuarioValida); - } - catch (WebException ex) - { - string mensaje = new StreamReader(ex.Response.GetResponseStream()).ReadToEnd(); - } + // } //if + // } //respuesta_o - } + // }// body - private void GenerarResultadoSISA(DetalleProtocolo oDetalle, string idPruebaSISA, string idTipoPruebaSISA, string idResultadoSISA, string idEventoSISA) + // } - { - System.Net.ServicePointManager.SecurityProtocol = - System.Net.SecurityProtocolType.Tls12; - int ideventomuestra = oDetalle.IdeventomuestraSISA; - Configuracion oCon = new Configuracion(); oCon = (Configuracion)oCon.Get(typeof(Configuracion), 1); - string URL = oCon.URLResultadoSISA; + // catch (WebException ex) + // { + // string mensaje = new StreamReader(ex.Response.GetResponseStream()).ReadToEnd(); + // } + //} - try - { - int id_resultado_a_informar = int.Parse(idResultadoSISA); // 0; - int idevento = int.Parse(idEventoSISA); // 307; // sospechoso + //private void GenerarResultadoSISA(DetalleProtocolo oDetalle, string idPruebaSISA, string idTipoPruebaSISA, string idResultadoSISA, string idEventoSISA) + //{ - if (id_resultado_a_informar != 0) - { - string femision = oDetalle.FechaValida.ToString("yyyy-MM-dd");//.ToShortDateString("yyyy/MM/dd").Replace("/", "-"); + // System.Net.ServicePointManager.SecurityProtocol = + // System.Net.SecurityProtocolType.Tls12; + // int ideventomuestra = oDetalle.IdeventomuestraSISA; + // Configuracion oCon = new Configuracion(); oCon = (Configuracion)oCon.Get(typeof(Configuracion), 1); + // string URL = oCon.URLResultadoSISA; - string frecepcion = oDetalle.IdProtocolo.Fecha.ToString("yyyy-MM-dd");//ToShortDateString("yyyy/MM/dd").Replace("/", "-"); + // try + // { + // int id_resultado_a_informar = int.Parse(idResultadoSISA); // 0; + // int idevento = int.Parse(idEventoSISA); // 307; // sospechoso - resultado newresultado = new resultado - { // resultado de dni: 31935346 - derivada = false, - fechaEmisionResultado = femision, //"2020-09-14", // - fechaRecepcion = frecepcion, // "2020-09-13" - idDerivacion = null, //1125675,// - idEstablecimiento = 107093, //int.Parse( s_idestablecimiento), //prod: "51580352167442", - idEvento = idevento, // sospechoso: 307 y 309 contacto.. idem a la tabla de configuracion sisa - idEventoMuestra = ideventomuestra, // 2131682, // sale del excel - idPrueba = int.Parse(idPruebaSISA), //1076, // RT-PCR en tiempo real para agregar en la tabla de configuracion sisa - idResultado = id_resultado_a_informar,// 4, // 4: no detectable; 3: detectable - idTipoPrueba = int.Parse(idTipoPruebaSISA), //727, // Genoma viral SARS-CoV-2 para agregar en la tabla de configuracion sisa - noApta = true, - valor = "" - }; + // if (id_resultado_a_informar != 0) + // { + // string femision = oDetalle.FechaValida.ToString("yyyy-MM-dd");//.ToShortDateString("yyyy/MM/dd").Replace("/", "-"); + // string frecepcion = oDetalle.IdProtocolo.Fecha.ToString("yyyy-MM-dd");//ToShortDateString("yyyy/MM/dd").Replace("/", "-"); - JavaScriptSerializer jsonSerializer = new JavaScriptSerializer(); - string DATA = jsonSerializer.Serialize(newresultado); + // resultado newresultado = new resultado + // { // resultado de dni: 31935346 + // derivada = false, + // fechaEmisionResultado = femision, //"2020-09-14", // + // fechaRecepcion = frecepcion, // "2020-09-13" + // idDerivacion = null, //1125675,// + // idEstablecimiento = 107093, //int.Parse( s_idestablecimiento), //prod: "51580352167442", + // idEvento = idevento, // sospechoso: 307 y 309 contacto.. idem a la tabla de configuracion sisa + // idEventoMuestra = ideventomuestra, // 2131682, // sale del excel + // idPrueba = int.Parse(idPruebaSISA), //1076, // RT-PCR en tiempo real para agregar en la tabla de configuracion sisa + // idResultado = id_resultado_a_informar,// 4, // 4: no detectable; 3: detectable + // idTipoPrueba = int.Parse(idTipoPruebaSISA), //727, // Genoma viral SARS-CoV-2 para agregar en la tabla de configuracion sisa + // noApta = true, + // valor = "" + // }; - byte[] data = UTF8Encoding.UTF8.GetBytes(DATA); - HttpWebRequest request; - request = WebRequest.Create(URL) as HttpWebRequest; - request.Timeout = 10 * 1000; - request.Method = "POST"; - request.ContentLength = data.Length; - request.ContentType = "application/json"; - request.Headers.Add("app_key", "8482d41353ecd747c271f2ec869345e4"); - request.Headers.Add("app_id", "0e4fcbbf"); + // JavaScriptSerializer jsonSerializer = new JavaScriptSerializer(); + // string DATA = jsonSerializer.Serialize(newresultado); - Stream postStream = request.GetRequestStream(); - postStream.Write(data, 0, data.Length); - HttpWebResponse response = request.GetResponse() as HttpWebResponse; - StreamReader reader = new StreamReader(response.GetResponseStream()); - string body = reader.ReadToEnd(); - if (body != "") - { - oDetalle.GrabarAuditoriaDetalleProtocolo("Genera Resultado en SISA", oDetalle.IdUsuarioValida); + // byte[] data = UTF8Encoding.UTF8.GetBytes(DATA); - } + // HttpWebRequest request; + // request = WebRequest.Create(URL) as HttpWebRequest; + // request.Timeout = 10 * 1000; + // request.Method = "POST"; + // request.ContentLength = data.Length; + // request.ContentType = "application/json"; + // request.Headers.Add("app_key", "8482d41353ecd747c271f2ec869345e4"); + // request.Headers.Add("app_id", "0e4fcbbf"); - } - } - catch (WebException ex) - { - string mensaje = new StreamReader(ex.Response.GetResponseStream()).ReadToEnd(); + // Stream postStream = request.GetRequestStream(); + // postStream.Write(data, 0, data.Length); + // HttpWebResponse response = request.GetResponse() as HttpWebResponse; + // StreamReader reader = new StreamReader(response.GetResponseStream()); + // string body = reader.ReadToEnd(); + // if (body != "") + // { + // oDetalle.GrabarAuditoriaDetalleProtocolo("Genera Resultado en SISA", oDetalle.IdUsuarioValida); - } + // } + // } - } + // } + // catch (WebException ex) + // { + // string mensaje = new StreamReader(ex.Response.GetResponseStream()).ReadToEnd(); - private void GenerarNotificacionAndes(DetalleProtocolo oDetalle) - { + + // } + + + //} + + + //private void GenerarNotificacionAndes(DetalleProtocolo oDetalle) + //{ - try - { + // try + // { - // Configuracion oCon = new Configuracion(); oCon = (Configuracion)oCon.Get(typeof(Configuracion), 1); + // // Configuracion oCon = new Configuracion(); oCon = (Configuracion)oCon.Get(typeof(Configuracion), 1); - string URL = ConfigurationManager.AppSettings["urlnotifiacionandes"].ToString(); - string s_token= ConfigurationManager.AppSettings["tokennotifiacionandes"].ToString(); - string s_sexo = ""; - switch (oDetalle.IdProtocolo.IdPaciente.IdSexo) - { + // string URL = ConfigurationManager.AppSettings["urlnotifiacionandes"].ToString(); + // string s_token= ConfigurationManager.AppSettings["tokennotifiacionandes"].ToString(); + // string s_sexo = ""; + // switch (oDetalle.IdProtocolo.IdPaciente.IdSexo) + // { - case 2: s_sexo = "femenino"; break; - case 3: s_sexo = "masculino"; break; - } - string fn = oDetalle.IdProtocolo.IdPaciente.FechaNacimiento.ToString("dd/MM/yyyy");//.ToShortDateString("yyyy/MM/dd").Replace("/", "-"); - string fs = oDetalle.IdProtocolo.FechaOrden.ToString("dd/MM/yyyy"); - string numerodoc = oDetalle.IdProtocolo.IdPaciente.NumeroDocumento.ToString(); - if (oDetalle.IdProtocolo.IdPaciente.IdEstado == 2) // temporal - numerodoc = "0"; + // case 2: s_sexo = "femenino"; break; + // case 3: s_sexo = "masculino"; break; + // } + // string fn = oDetalle.IdProtocolo.IdPaciente.FechaNacimiento.ToString("dd/MM/yyyy");//.ToShortDateString("yyyy/MM/dd").Replace("/", "-"); + // string fs = oDetalle.IdProtocolo.FechaOrden.ToString("dd/MM/yyyy"); + // string numerodoc = oDetalle.IdProtocolo.IdPaciente.NumeroDocumento.ToString(); + // if (oDetalle.IdProtocolo.IdPaciente.IdEstado == 2) // temporal + // numerodoc = "0"; - string error = ""; - string firma = ""; - Usuario oUs = new Usuario(); oUs = (Usuario)oUs.Get(typeof(Usuario), oDetalle.IdUsuarioValida); - if (oUs != null) + // string error = ""; + // string firma = ""; + // Usuario oUs = new Usuario(); oUs = (Usuario)oUs.Get(typeof(Usuario), oDetalle.IdUsuarioValida); + // if (oUs != null) - firma = oUs.FirmaValidacion; + // firma = oUs.FirmaValidacion; - NotificacionPaciente newevento = new NotificacionPaciente - { - nombre = oDetalle.IdProtocolo.IdPaciente.Nombre, - apellido = oDetalle.IdProtocolo.IdPaciente.Apellido, - documento = numerodoc, - sexo = s_sexo, - fechaNacimiento = DateTime.Parse("01-01-1900"), - telefono = oDetalle.IdProtocolo.IdPaciente.InformacionContacto, - protocolo = oDetalle.IdProtocolo.Numero.ToString(), - resultado = oDetalle.ResultadoCar, - fechaSolicitud = DateTime.Parse("01-01-1753"), - validador = firma - }; + // NotificacionPaciente newevento = new NotificacionPaciente + // { + // nombre = oDetalle.IdProtocolo.IdPaciente.Nombre, + // apellido = oDetalle.IdProtocolo.IdPaciente.Apellido, + // documento = numerodoc, + // sexo = s_sexo, + // fechaNacimiento = DateTime.Parse("01-01-1900"), + // telefono = oDetalle.IdProtocolo.IdPaciente.InformacionContacto, + // protocolo = oDetalle.IdProtocolo.Numero.ToString(), + // resultado = oDetalle.ResultadoCar, + // fechaSolicitud = DateTime.Parse("01-01-1753"), + // validador = firma + // }; - const string Comillas = "\""; + // const string Comillas = "\""; - JavaScriptSerializer jsonSerializer = new JavaScriptSerializer(); + // JavaScriptSerializer jsonSerializer = new JavaScriptSerializer(); - string DATA = jsonSerializer.Serialize(newevento); - DATA = DATA.Replace("\"\\/Date(", "").Replace(")\\/\"", "").Replace("-2208978000000", "&&"); + // string DATA = jsonSerializer.Serialize(newevento); + // DATA = DATA.Replace("\"\\/Date(", "").Replace(")\\/\"", "").Replace("-2208978000000", "&&"); - DATA = DATA.Replace("&&", Comillas + fn + Comillas); + // DATA = DATA.Replace("&&", Comillas + fn + Comillas); - DATA = DATA.Replace("\"\\/Date(", "").Replace(")\\/\"", "").Replace("-6847794000000", "||"); + // DATA = DATA.Replace("\"\\/Date(", "").Replace(")\\/\"", "").Replace("-6847794000000", "||"); - DATA = DATA.Replace("||", Comillas + fs + Comillas); + // DATA = DATA.Replace("||", Comillas + fs + Comillas); - byte[] data = UTF8Encoding.UTF8.GetBytes(DATA); + // byte[] data = UTF8Encoding.UTF8.GetBytes(DATA); - HttpWebRequest request; - request = WebRequest.Create(URL) as HttpWebRequest; - request.Timeout = 10 * 1000; - request.Method = "POST"; - request.ContentLength = data.Length; - request.ContentType = "application/json"; - request.Headers.Add("Authorization", s_token); + // HttpWebRequest request; + // request = WebRequest.Create(URL) as HttpWebRequest; + // request.Timeout = 10 * 1000; + // request.Method = "POST"; + // request.ContentLength = data.Length; + // request.ContentType = "application/json"; + // request.Headers.Add("Authorization", s_token); - Stream postStream = request.GetRequestStream(); - postStream.Write(data, 0, data.Length); + // Stream postStream = request.GetRequestStream(); + // postStream.Write(data, 0, data.Length); - HttpWebResponse response = request.GetResponse() as HttpWebResponse; - StreamReader reader = new StreamReader(response.GetResponseStream()); - string body = reader.ReadToEnd(); - if (body != "") - { + // HttpWebResponse response = request.GetResponse() as HttpWebResponse; + // StreamReader reader = new StreamReader(response.GetResponseStream()); + // string body = reader.ReadToEnd(); + // if (body != "") + // { - oDetalle.GrabarAuditoriaDetalleProtocolo("Genera Notificacion Andes " , oDetalle.IdUsuarioValida); + // oDetalle.GrabarAuditoriaDetalleProtocolo("Genera Notificacion Andes " , oDetalle.IdUsuarioValida); - } + // } - } - catch (WebException ex) - { - string mensaje = new StreamReader(ex.Response.GetResponseStream()).ReadToEnd(); - } + // } + // catch (WebException ex) + // { + // string mensaje = new StreamReader(ex.Response.GetResponseStream()).ReadToEnd(); + // } - } - private bool GenerarCasoSISA(DetalleProtocolo oDetalle, string res) - { - System.Net.ServicePointManager.SecurityProtocol = - System.Net.SecurityProtocolType.Tls12; - bool generacaso = false; - string caracter = ""; - string idevento = ""; - string nombreevento = ""; - string idclasificacionmanual = ""; - string nombreclasificacionmanual = ""; - string idgrupoevento = ""; - string nombregrupoevento = ""; - bool seguir = false; + //} + //private bool GenerarCasoSISA(DetalleProtocolo oDetalle, string res) + //{ + // System.Net.ServicePointManager.SecurityProtocol = + // System.Net.SecurityProtocolType.Tls12; + // bool generacaso = false; + // string caracter = ""; + // string idevento = ""; + // string nombreevento = ""; + // string idclasificacionmanual = ""; + // string nombreclasificacionmanual = ""; + // string idgrupoevento = ""; + // string nombregrupoevento = ""; + // bool seguir = false; - try - { + // try + // { - string m_strSQL = " select * from LAB_ConfiguracionSISA with (nolock) where idCaracter= " + oDetalle.IdProtocolo.IdCaracter.ToString() + " and idItem=" + oDetalle.IdSubItem.IdItem.ToString(); - if ((res == "SE DETECTA") && (oDetalle.IdProtocolo.IdCaracter != 2) && (oCon.CodigoCovid == oDetalle.IdSubItem.Codigo)) - { - /// si es positivo y no es controlo de alta se genera un caso sospechoso solo para covid + // string m_strSQL = " select * from LAB_ConfiguracionSISA with (nolock) where idCaracter= " + oDetalle.IdProtocolo.IdCaracter.ToString() + " and idItem=" + oDetalle.IdSubItem.IdItem.ToString(); + // if ((res == "SE DETECTA") && (oDetalle.IdProtocolo.IdCaracter != 2) && (oCon.CodigoCovid == oDetalle.IdSubItem.Codigo)) + // { + // /// si es positivo y no es controlo de alta se genera un caso sospechoso solo para covid - m_strSQL = " select * from LAB_ConfiguracionSISA with (nolock) where idCaracter=1 and idItem=" + oDetalle.IdSubItem.IdItem.ToString(); - } + // m_strSQL = " select * from LAB_ConfiguracionSISA with (nolock) where idCaracter=1 and idItem=" + oDetalle.IdSubItem.IdItem.ToString(); + // } - 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]; - - for (int i = 0; i < dt.Rows.Count; i++) - { - caracter = dt.Rows[i][1].ToString(); - idevento = dt.Rows[i][2].ToString(); - nombreevento = dt.Rows[i][3].ToString(); - idclasificacionmanual = dt.Rows[i][4].ToString(); - nombreclasificacionmanual = dt.Rows[i][5].ToString(); - idgrupoevento = dt.Rows[i][6].ToString(); - nombregrupoevento = dt.Rows[i][7].ToString(); - seguir = true; - break; - - } - if (seguir) - { - - // Configuracion oCon = new Configuracion(); oCon = (Configuracion)oCon.Get(typeof(Configuracion), 1); - string URL = oCon.UrlServicioSISA; - string s_idestablecimiento = oCon.CodigoEstablecimientoSISA; // "14580562167000" - string usersisa = ConfigurationManager.AppSettings["usuarioSisa"].ToString(); - string[] a = usersisa.Split(':'); - string s_user = a[0].ToString(); - string s_userpass = a[1].ToString(); - - string s_sexo = ""; - switch (oDetalle.IdProtocolo.IdPaciente.IdSexo) - { - case 1: s_sexo = "I"; break; - case 2: s_sexo = "F"; break; - case 3: s_sexo = "M"; break; - } - string fn = oDetalle.IdProtocolo.IdPaciente.FechaNacimiento.ToShortDateString().Replace("/", "-"); - - string fnpapel = oDetalle.IdProtocolo.FechaOrden.ToShortDateString().Replace("/", "-"); - - - string numerodocumento = oDetalle.IdProtocolo.IdPaciente.NumeroDocumento.ToString(); - - string error = ""; - bool hayerror = false; - - evento newevento = new evento - { - idTipodoc = "1", - nrodoc = numerodocumento, - sexo = s_sexo, - fechaNacimiento = fn, //"05-06-1989", - idGrupoEvento = idgrupoevento, - idEvento = idevento, // "77", - idEstablecimientoCarga = s_idestablecimiento, //prod: "51580352167442", - fechaPapel = fnpapel, // "10-12-2019", - idClasificacionManualCaso = idclasificacionmanual, // "22" - }; - - AltaCaso caso = new AltaCaso - { - usuario = s_user, // "bcpintos", - clave = s_userpass, // "2398HH6RK6", - altaEventoCasoNominal = newevento - }; - - JavaScriptSerializer jsonSerializer = new JavaScriptSerializer(); - - string DATA = jsonSerializer.Serialize(caso); - - - - System.Net.Http.HttpClient client = new System.Net.Http.HttpClient(); - client.BaseAddress = new System.Uri(URL); - - System.Net.Http.HttpContent content = new StringContent(DATA, UTF8Encoding.UTF8, "application/json"); - HttpResponseMessage messge = client.PostAsync(URL, content).Result; - string description = string.Empty; - if (messge.IsSuccessStatusCode) - { - string result = messge.Content.ReadAsStringAsync().Result; - description = result; - RespuestaCaso respuesta_d = jsonSerializer.Deserialize(description); - if (respuesta_d.id_caso!="") + // 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]; + + // for (int i = 0; i < dt.Rows.Count; i++) + // { + // caracter = dt.Rows[i][1].ToString(); + // idevento = dt.Rows[i][2].ToString(); + // nombreevento = dt.Rows[i][3].ToString(); + // idclasificacionmanual = dt.Rows[i][4].ToString(); + // nombreclasificacionmanual = dt.Rows[i][5].ToString(); + // idgrupoevento = dt.Rows[i][6].ToString(); + // nombregrupoevento = dt.Rows[i][7].ToString(); + // seguir = true; + // break; + + // } + // if (seguir) + // { + + // // Configuracion oCon = new Configuracion(); oCon = (Configuracion)oCon.Get(typeof(Configuracion), 1); + // string URL = oCon.UrlServicioSISA; + // string s_idestablecimiento = oCon.CodigoEstablecimientoSISA; // "14580562167000" + // string usersisa = ConfigurationManager.AppSettings["usuarioSisa"].ToString(); + // string[] a = usersisa.Split(':'); + // string s_user = a[0].ToString(); + // string s_userpass = a[1].ToString(); + + // string s_sexo = ""; + // switch (oDetalle.IdProtocolo.IdPaciente.IdSexo) + // { + // case 1: s_sexo = "I"; break; + // case 2: s_sexo = "F"; break; + // case 3: s_sexo = "M"; break; + // } + // string fn = oDetalle.IdProtocolo.IdPaciente.FechaNacimiento.ToShortDateString().Replace("/", "-"); + + // string fnpapel = oDetalle.IdProtocolo.FechaOrden.ToShortDateString().Replace("/", "-"); + + + // string numerodocumento = oDetalle.IdProtocolo.IdPaciente.NumeroDocumento.ToString(); + + // string error = ""; + // bool hayerror = false; + + // evento newevento = new evento + // { + // idTipodoc = "1", + // nrodoc = numerodocumento, + // sexo = s_sexo, + // fechaNacimiento = fn, //"05-06-1989", + // idGrupoEvento = idgrupoevento, + // idEvento = idevento, // "77", + // idEstablecimientoCarga = s_idestablecimiento, //prod: "51580352167442", + // fechaPapel = fnpapel, // "10-12-2019", + // idClasificacionManualCaso = idclasificacionmanual, // "22" + // }; + + // AltaCaso caso = new AltaCaso + // { + // usuario = s_user, // "bcpintos", + // clave = s_userpass, // "2398HH6RK6", + // altaEventoCasoNominal = newevento + // }; + + // JavaScriptSerializer jsonSerializer = new JavaScriptSerializer(); + + // string DATA = jsonSerializer.Serialize(caso); + + + + // System.Net.Http.HttpClient client = new System.Net.Http.HttpClient(); + // client.BaseAddress = new System.Uri(URL); + + // System.Net.Http.HttpContent content = new StringContent(DATA, UTF8Encoding.UTF8, "application/json"); + // HttpResponseMessage messge = client.PostAsync(URL, content).Result; + // string description = string.Empty; + // if (messge.IsSuccessStatusCode) + // { + // string result = messge.Content.ReadAsStringAsync().Result; + // description = result; + // RespuestaCaso respuesta_d = jsonSerializer.Deserialize(description); + // if (respuesta_d.id_caso!="") - { // devolver el idcaso para guardar en la base de datos - string s_idcaso = respuesta_d.id_caso; - - oDetalle.IdProtocolo.IdCasoSISA = int.Parse(s_idcaso); - oDetalle.IdProtocolo.Save(); - if (respuesta_d.resultado == "OK") - oDetalle.IdProtocolo.GrabarAuditoriaProtocolo("Genera Caso SISA " + s_idcaso, int.Parse(Session["idUsuarioValida"].ToString())); - else - oDetalle.IdProtocolo.GrabarAuditoriaProtocolo("Actualiza Caso SISA " + s_idcaso, int.Parse(Session["idUsuarioValida"].ToString())); - - generacaso = true; - - } - else - { - generacaso = false; - hayerror = true; - error = respuesta_d.resultado; - - } - } - - } - - } - catch - { - generacaso = false; - //lblError.Text = "Hubo algun problema al conectar al servicio SISA: " + e.InnerException.InnerException.Message.ToString() + ". Intente de nuevo o haga clic en Salir"; - //lblError.Visible = true; - //btnSalir.Visible = true; - } - return generacaso; - - } + // { // devolver el idcaso para guardar en la base de datos + // string s_idcaso = respuesta_d.id_caso; + + // oDetalle.IdProtocolo.IdCasoSISA = int.Parse(s_idcaso); + // oDetalle.IdProtocolo.Save(); + // if (respuesta_d.resultado == "OK") + // oDetalle.IdProtocolo.GrabarAuditoriaProtocolo("Genera Caso SISA " + s_idcaso, int.Parse(Session["idUsuarioValida"].ToString())); + // else + // oDetalle.IdProtocolo.GrabarAuditoriaProtocolo("Actualiza Caso SISA " + s_idcaso, int.Parse(Session["idUsuarioValida"].ToString())); + + // generacaso = true; + + // } + // else + // { + // generacaso = false; + // hayerror = true; + // error = respuesta_d.resultado; + + // } + // } + + // } + + // } + // catch + // { + // generacaso = false; + // //lblError.Text = "Hubo algun problema al conectar al servicio SISA: " + e.InnerException.InnerException.Message.ToString() + ". Intente de nuevo o haga clic en Salir"; + // //lblError.Visible = true; + // //btnSalir.Visible = true; + // } + // return generacaso; + + //} private void Inicializar() { hypRegresar.NavigateUrl = "ResultadoBusqueda.aspx?idServicio=" + Request["idServicio"].ToString() + "&Operacion=Carga&modo=" + Request["modo"].ToString(); @@ -1515,14 +1516,14 @@ private DataTable getDataSet( string idItem) { string s_listaProtocolos = Session["Parametros"].ToString(); - string m_strSQL = " SELECT '' as paciente, '' as fecha , " + - " DP.idProtocolo AS numero , DP.idDetalleProtocolo, " + - " DP.formato0, DP.formato1, DP.formato2, DP.formato3, DP.formato4, " + - " DP.ValorReferencia, '' as MaximoReferencia, DP.Metodo as metodo, '' as tipoValorReferencia, DP.resultadoCar, " + - " DP.conResultado, '' as numeroDocumento, '' as observacionReferencia, DP.userCarga, DP.userValida , DP.userControl " + - " FROM vta_LAB_Resultados AS DP " + - " WHERE iditem= " + idItem + " and idProtocolo in (" + s_listaProtocolos + ")"+ - " ORDER BY DP.iddetalleprotocolo" ; + string m_strSQL = @" SELECT '' as paciente, '' as fecha , + DP.idProtocolo AS numero , DP.idDetalleProtocolo, + DP.formato0, DP.formato1, DP.formato2, DP.formato3, DP.formato4, + DP.ValorReferencia, '' as MaximoReferencia, DP.Metodo as metodo, '' as tipoValorReferencia, DP.resultadoCar, + DP.conResultado, '' as numeroDocumento, '' as observacionReferencia, DP.userCarga, DP.userValida , DP.userControl + FROM vta_LAB_Resultados AS DP inner join LAB_Protocolo as P with(nolock) on DP.idProtocolo = P.idProtocolo + WHERE iditem= " + idItem + " and P.idProtocolo in (" + s_listaProtocolos + ")"+ + " ORDER BY P.fecha, P.numero "; DataSet Ds = new DataSet(); SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; diff --git a/WebLab/Resultados/ResultadosaSisa2.aspx.cs b/WebLab/Resultados/ResultadosaSisa2.aspx.cs index a2dfd54..7b2c0fc 100644 --- a/WebLab/Resultados/ResultadosaSisa2.aspx.cs +++ b/WebLab/Resultados/ResultadosaSisa2.aspx.cs @@ -214,59 +214,28 @@ protected void btnGuardar_Click(object sender, EventArgs e) } - private bool ProcesaSISA(DetalleProtocolo oDetalle, string idcasosisa) + private bool ProcesaSISA(DetalleProtocolo oDetalle ) { bool generacaso = false; try { - if (int.Parse(idcasosisa)==0) - { - // generacaso = GenerarCasoSISA(oDetalle, res); - generacaso = GenerarCasoSISA_V2(oDetalle); - } - - - /*si el idcasosisa lo trae desde la vdrl reactiva y el protocolo del treponema es otro le pone el mismo caso al treponema*/ - //if ((oDetalle.IdProtocolo.IdCasoSISA == 0) && (int.Parse(idcasosisa) > 0)) - //{ - // oDetalle.IdProtocolo.IdCasoSISA = int.Parse(idcasosisa); - // oDetalle.IdProtocolo.Save(); - // oDetalle.IdProtocolo.GrabarAuditoriaProtocolo("Actualiza Caso SISA " + int.Parse(idcasosisa), oUser.IdUsuario); - - //} + + if (oDetalle.IdProtocolo.IdCasoSISA == 0) + GenerarCasoSISA_V2(oDetalle); if ((oDetalle.IdProtocolo.IdCasoSISA > 0) && (oDetalle.IdeventomuestraSISA == 0)) - GenerarMuestraSISA(oDetalle.IdProtocolo, oDetalle.IdProtocolo.IdCasoSISA); - - if (oDetalle.IdeventomuestraSISA > 0) - GenerarResultadoSISA(oDetalle); - - - /****/ - - /* if (oDetalle.IdProtocolo.IdCasoSISA == 0) - { - // generacaso = GenerarCasoSISA(oDetalle, res); - generacaso = GenerarCasoSISA_V2(oDetalle, res); - } - // Si hay un detalle con IdeventomuestraSISA>0 para el protocolo entonces: - // asociar el mismo IdeventomuestraSISA al detalle con flu que se quiere actualizar antes de invocar GenerarResultadoSISA - //SOLO para flu - //if (oDetalle.IdProtocolo.IdCasoSISA > 0) - //{ - // oDetalle.IdeventomuestraSISA = oDetalle.algunDetalleTieneMuestra(); - // oDetalle.Save(); - //} - if ((oDetalle.IdProtocolo.IdCasoSISA > 0) && (oDetalle.IdeventomuestraSISA == 0)) + { + bool existe = ExisteTipoMuestra(oDetalle , HdIdMuestra.Value, HdIdTipoMuestra.Value); + if (!existe) GenerarMuestraSISA(oDetalle.IdProtocolo, oDetalle.IdProtocolo.IdCasoSISA); if (oDetalle.IdeventomuestraSISA > 0) - GenerarResultadoSISA(oDetalle, res); + GenerarResultadoSISA(oDetalle); - */ + } BorrarDescartado(oDetalle); - //} + } catch (Exception e) { @@ -500,14 +469,14 @@ private bool GenerarCasoSISA(DetalleProtocolo oDetalle, string res) } - private bool GenerarCasoSISA_V2(DetalleProtocolo oDetalle) + private void GenerarCasoSISA_V2(DetalleProtocolo oDetalle) { /*Version 2*/ /*Cambio para que vuelva a buscar los datos en la base y tome los datos desde la grilla*/ System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12; - bool generacaso = false; + // bool generacaso = false; //string caracter = ""; //string idevento = ""; //string nombreevento = ""; @@ -763,7 +732,7 @@ private bool GenerarCasoSISA_V2(DetalleProtocolo oDetalle) } else { - generacaso = false; + // generacaso = false; //hayerror = true; error = respuesta_d.resultado; } @@ -793,10 +762,10 @@ private bool GenerarCasoSISA_V2(DetalleProtocolo oDetalle) else // ERROR_DATOS oDetalle.IdProtocolo.GrabarAuditoriaProtocolo("Actualiza Caso SISA " + s_idcaso, int.Parse(Session["idUsuario"].ToString())); } - else - generacaso = false; + //else + //generacaso = false; } - return generacaso; + // return generacaso; } @@ -826,103 +795,126 @@ private void GenerarMuestraSISA(Protocolo protocolo, int idCasoSISA) { string URL = arr[0].ToString(); string s_user = arr[1].ToString(); - string s_userpass = arr[2].ToString(); - - - //string URL = oC.URLMuestraSISA; - - - string ftoma = protocolo.FechaTomaMuestra.ToString("yyyy-MM-dd");//.ToShortDateString("yyyy/MM/dd").Replace("/", "-"); + string s_userpass = arr[2].ToString(); + + string ftoma = protocolo.FechaTomaMuestra.ToString("yyyy-MM-dd");//.ToShortDateString("yyyy/MM/dd").Replace("/", "-"); - //if (protocolo.FechaTomaMuestra< protocolo.FechaOrden) - // ftoma = protocolo.FechaOrden.ToString("yyyy-MM-dd");//.ToShortDateString("yyyy/MM/dd").Replace("/", "-"); + //if (protocolo.FechaTomaMuestra< protocolo.FechaOrden) + // ftoma = protocolo.FechaOrden.ToString("yyyy-MM-dd");//.ToShortDateString("yyyy/MM/dd").Replace("/", "-"); - string idestablecimientotoma = protocolo.IdEfectorSolicitante.CodigoSISA; - if ((idestablecimientotoma == "") || (idestablecimientotoma == "0")) - //pongo por defecto laboratorio central - idestablecimientotoma = protocolo.IdEfector.CodigoSISA; + string idestablecimientotoma = protocolo.IdEfectorSolicitante.CodigoSISA; + if ((idestablecimientotoma == "") || (idestablecimientotoma == "0")) + //pongo por defecto laboratorio central + idestablecimientotoma = protocolo.IdEfector.CodigoSISA; - ResultadoxNro.EventoMuestra newmuestra = new ResultadoxNro.EventoMuestra - { - adecuada = true, - aislamiento = false, - fechaToma = ftoma, // "2020-08-23", - idEstablecimientoToma = int.Parse(idestablecimientotoma), // 140618, // sacar del efector solicitante - idEventoCaso = idCasoSISA,// protocolo.IdCasoSISA, // 2061287, - idMuestra = int.Parse(HdIdMuestra.Value), //272, --covid - idtipoMuestra = int.Parse(HdIdTipoMuestra.Value), // 4,--covid - muestra = true - }; - JavaScriptSerializer jsonSerializer = new JavaScriptSerializer(); - - string DATA = jsonSerializer.Serialize(newmuestra); - - - byte[] data = UTF8Encoding.UTF8.GetBytes(DATA); - - HttpWebRequest request; - request = WebRequest.Create(URL) as HttpWebRequest; - request.Timeout = 10 * 1000; - request.Method = "POST"; - request.ContentLength = data.Length; - request.ContentType = "application/json"; - request.Headers.Add("app_key", s_userpass);// "b0fd61c3a08917cfd20491b24af6049e"); - request.Headers.Add("app_id", s_user);/// "22891c8f"); + ResultadoxNro.EventoMuestra newmuestra = new ResultadoxNro.EventoMuestra + { + adecuada = true, + aislamiento = false, + fechaToma = ftoma, // "2020-08-23", + idEstablecimientoToma = int.Parse(idestablecimientotoma), // 140618, // sacar del efector solicitante + idEventoCaso = idCasoSISA,// protocolo.IdCasoSISA, // 2061287, + idMuestra = int.Parse(HdIdMuestra.Value), //272, --covid + idtipoMuestra = int.Parse(HdIdTipoMuestra.Value), // 4,--covid + muestra = true + }; + JavaScriptSerializer jsonSerializer = new JavaScriptSerializer(); - try - { + string DATA = jsonSerializer.Serialize(newmuestra); - Stream postStream = request.GetRequestStream(); - postStream.Write(data, 0, data.Length); - HttpWebResponse response = request.GetResponse() as HttpWebResponse; - StreamReader reader = new StreamReader(response.GetResponseStream()); - string body = reader.ReadToEnd(); + byte[] data = UTF8Encoding.UTF8.GetBytes(DATA); + HttpWebRequest request; + request = WebRequest.Create(URL) as HttpWebRequest; + request.Timeout = 10 * 1000; + request.Method = "POST"; + request.ContentLength = data.Length; + request.ContentType = "application/json"; + request.Headers.Add("app_key", s_userpass);// "b0fd61c3a08917cfd20491b24af6049e"); + request.Headers.Add("app_id", s_user);/// "22891c8f"); - if (body != "") + try { - ResultadoxNro.EventoMuestraResultado respuesta_d = jsonSerializer.Deserialize(body); - if (respuesta_d.id != 1) - { - Item oItem = new Item(); - oItem = (Item)oItem.Get(typeof(Item), int.Parse(HidItemSIL.Value));//se cambia al cambiar filtro por evento y no por determinacion - - //string trajomuestra = fila[3].ToString(); - ISession m_session = NHibernateHttpModule.CurrentSession; - ICriteria crit = m_session.CreateCriteria(typeof(DetalleProtocolo)); - crit.Add(Expression.Eq("IdProtocolo", protocolo)); - crit.Add(Expression.Eq("IdSubItem", oItem)); - IList listadetalle = crit.List(); - foreach (DetalleProtocolo oDetalle in listadetalle) - { - - - oDetalle.IdeventomuestraSISA = respuesta_d.id; - oDetalle.Save(); + Stream postStream = request.GetRequestStream(); + postStream.Write(data, 0, data.Length); - oDetalle.GrabarAuditoriaDetalleProtocolo("Genera Muestra SISA " + respuesta_d.id.ToString(), oUser.IdUsuario); + HttpWebResponse response = request.GetResponse() as HttpWebResponse; + StreamReader reader = new StreamReader(response.GetResponseStream()); + string body = reader.ReadToEnd(); + if (body != "") + { + ResultadoxNro.EventoMuestraResultado respuesta_d = jsonSerializer.Deserialize(body); - } //for each - } //respuesta_o + if (respuesta_d.id != 1) + { + Item oItem = new Item(); + oItem = (Item)oItem.Get(typeof(Item), int.Parse(HidItemSIL.Value));//se cambia al cambiar filtro por evento y no por determinacion + + //string trajomuestra = fila[3].ToString(); + ISession m_session = NHibernateHttpModule.CurrentSession; + ICriteria crit = m_session.CreateCriteria(typeof(DetalleProtocolo)); + crit.Add(Expression.Eq("IdProtocolo", protocolo)); + crit.Add(Expression.Eq("IdSubItem", oItem)); + IList listadetalle = crit.List(); + foreach (DetalleProtocolo oDetalle in listadetalle) + { + oDetalle.IdeventomuestraSISA = respuesta_d.id; + oDetalle.Save(); + oDetalle.GrabarAuditoriaDetalleProtocolo("Genera Muestra SISA " + respuesta_d.id.ToString(), oUser.IdUsuario); + } //for each + } //respuesta_o + }// body + } + catch (WebException ex) + { + string mensaje = new StreamReader(ex.Response.GetResponseStream()).ReadToEnd(); + grabarLogMensaje("Genera Muestra SISA: "+ mensaje + "- idcasosisa:" + idCasoSISA.ToString()); + } + + } + } - }// body + private bool ExisteTipoMuestra(DetalleProtocolo oDetalle, string idmuestra, string idtipomuestra) + { + ///Verifica si para la misma muestra sisa ya existe creada se replica el ideventomuestraSISA en todos los detalles del mismo protocolo + bool existe = false; + string idevento=HdidEventoSISA.Value; + string ideventomuestraSISA = "0"; + string m_strSQL = @"select top 1 ideventomuestraSISA + from Lab_detalleprotocolo + where idProtocolo in (select idProtocolo from LAB_Protocolo with (nolock) where idcasosisa=" + oDetalle.IdProtocolo.IdCasoSISA.ToString() + @") + and ideventomuestraSISA>0 + and idsubitem in (select iditem from lab_configuracionsisa with (nolock) where idevento="+ idevento + " and idmuestra = " + idmuestra.ToString() + @" + and idTipoMuestra = " + idtipomuestra.ToString() + ") order by ideventomuestraSISA desc"; - } + 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]; - catch (WebException ex) - { - string mensaje = new StreamReader(ex.Response.GetResponseStream()).ReadToEnd(); - grabarLogMensaje(mensaje + "- idcasosisa:" + idCasoSISA.ToString()); - } + for (int i = 0; i < dt.Rows.Count; i++) + { + ideventomuestraSISA = dt.Rows[i][0].ToString(); + if ((ideventomuestraSISA != "0") && (oDetalle.IdeventomuestraSISA == 0)) + { + existe = true; + oDetalle.IdeventomuestraSISA = int.Parse(ideventomuestraSISA); + oDetalle.Save(); + oDetalle.GrabarAuditoriaDetalleProtocolo("Replica Muestra SISA " + ideventomuestraSISA.ToString(), oUser.IdUsuario); + } } + + return existe; } @@ -1150,7 +1142,7 @@ private void SubirSISAdesdeAPI() //else //{ - if (ProcesaSISA(oDetalleProtocolo, idcasosisa)) + if (ProcesaSISA(oDetalleProtocolo)) { i = i + 1; diff --git a/WebLab/Site1.Master b/WebLab/Site1.Master index 6284058..31a49c0 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 Octubre 2025-20 " target="_blank" >Ver Cambios Version

    + text-align:center;">Versión MultiEfector Octubre 2025-30 " target="_blank" >Ver Cambios Version

    diff --git a/WebLab/SiteTurnos.Master b/WebLab/SiteTurnos.Master index ffa67f1..f088180 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 Octubre 2025-20." target="_blank" >Ver Cambios Version

    + text-align:center;">Versión MultiEfector Octubre 2025-30." target="_blank" >Ver Cambios Version

    diff --git a/WebLab/controldecambios.html b/WebLab/controldecambios.html index 7646ad5..141a4c0 100644 --- a/WebLab/controldecambios.html +++ b/WebLab/controldecambios.html @@ -31,6 +31,49 @@

    Lista de cambios en SIL2

    +
    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.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.22
    +
      +
    • + Interoperabilidad LNC :Se cambia interoperabilidad de tipo de muestras Hisopado y Aspirado en SISA y en ANDES. +
    • +
    2025.10.20
      @@ -46,13 +89,14 @@

      Lista de cambios en SIL2

      Interoperabilidad SISA:Mejora en performance de notificacion.
    • - Placas LC:Se readapta interpretacion de resultados de acuerdo a nueva forma de informar (antes en mayusculas) + 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 + 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
    @@ -79,7 +123,7 @@

    Lista de cambios en SIL2

  • - Interoperabilidad SISA: Se migran los eventos que informa Laboratorio Central (LNC) en el SIL1 al SIl2: + 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
    • @@ -165,7 +209,7 @@

      Lista de cambios en SIL2

    • - Resultados a SISA Interoperabilidad: Se cambia usuario de interoperabilidad y forma de obtenerlo. + Resultados a SISA Interoperabilidad: Se cambia usuario de interoperabilidad y forma de obtenerlo.
    2025.08.07
    From bf20a84b7fdf0d9a71a36ee490815925fd929eed Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Tue, 14 Oct 2025 16:02:19 -0300 Subject: [PATCH 41/61] fix: Requerimiento 1: Cambiar a nomenclatura CamelCase --- WebLab/Derivaciones/Derivados2.aspx | 2 +- WebLab/Derivaciones/Derivados2.aspx.cs | 2 +- .../Derivaciones/Derivados2.aspx.designer.cs | 4 +- WebLab/Derivaciones/GestionarLote.aspx | 6 +-- WebLab/Derivaciones/GestionarLote.aspx.cs | 6 +-- .../GestionarLote.aspx.designer.cs | 12 +++--- WebLab/Derivaciones/InformeList3.aspx | 26 ++++++------ WebLab/Derivaciones/InformeList3.aspx.cs | 18 ++++----- .../InformeList3.aspx.designer.cs | 20 +++++----- WebLab/Derivaciones/InformeLote.aspx | 40 +++++++++---------- WebLab/Derivaciones/InformeLote.aspx.cs | 26 ++++++------ .../Derivaciones/InformeLote.aspx.designer.cs | 24 +++++------ .../DerivacionMultiEfectorLote.aspx | 14 +++---- .../DerivacionMultiEfectorLote.aspx.cs | 26 ++++++------ ...erivacionMultiEfectorLote.aspx.designer.cs | 28 ++++++------- WebLab/Protocolos/DerivacionRecibirLote.aspx | 24 +++++------ .../Protocolos/DerivacionRecibirLote.aspx.cs | 24 +++++------ .../DerivacionRecibirLote.aspx.designer.cs | 40 +++++++++---------- 18 files changed, 171 insertions(+), 171 deletions(-) diff --git a/WebLab/Derivaciones/Derivados2.aspx b/WebLab/Derivaciones/Derivados2.aspx index 0670fda..e34edf8 100644 --- a/WebLab/Derivaciones/Derivados2.aspx +++ b/WebLab/Derivaciones/Derivados2.aspx @@ -146,7 +146,7 @@

  • - +
    - - + +

    - +
    Marcar como: - Motivo Cancelación: - + - + Observación: - +
    - +
    Seleccionar: Todas  Ninguna diff --git a/WebLab/Derivaciones/InformeList3.aspx.cs b/WebLab/Derivaciones/InformeList3.aspx.cs index c7ad438..9e3c43a 100644 --- a/WebLab/Derivaciones/InformeList3.aspx.cs +++ b/WebLab/Derivaciones/InformeList3.aspx.cs @@ -104,8 +104,8 @@ private void CargarListas() oUtil = new Utility(); //Motivos de cancelacion LAB-75 m_ssql = "SELECT idMotivo, descripcion FROM LAB_DerivacionMotivoCancelacion WHERE baja = 0"; - oUtil.CargarCombo(ddl_motivoCancelacion, m_ssql, "idMotivo", "descripcion", connReady); - ddl_motivoCancelacion.Items.Insert(0, new ListItem("--Seleccione--", "0")); + oUtil.CargarCombo(ddlMotivoCancelacion, m_ssql, "idMotivo", "descripcion", connReady); + ddlMotivoCancelacion.Items.Insert(0, new ListItem("--Seleccione--", "0")); @@ -116,7 +116,7 @@ private void habilitarImpresion() { gvLista.Columns[11].Visible = true; lnkPDF.Visible = true; - ddl_motivoCancelacion.Enabled = false; + ddlMotivoCancelacion.Enabled = false; } else { @@ -126,15 +126,15 @@ private void habilitarImpresion() } private void limpiarForm() { - txt_observacion.Text = string.Empty; - ddl_motivoCancelacion.SelectedIndex = 0; + txtObservacion.Text = string.Empty; + ddlMotivoCancelacion.SelectedIndex = 0; ddlEstado.SelectedIndex = 0; } private void activarControles(bool valor) { btnGuardar.Enabled = valor; - txt_observacion.Enabled = valor; + txtObservacion.Enabled = valor; lnkMarcar.Enabled = valor; lnkDesMarcar.Enabled = valor; //ddl_motivoCancelacion.Enabled = valor; @@ -384,12 +384,12 @@ private void ActualizarDetalleProtocolo(GridViewRow row, int idLote = 0, int de { int estadoSeleccionado; string resultadoDerivacion; - string observacion = txt_observacion.Text; + string observacion = txtObservacion.Text; int idUsuarioRegistro = oUser.IdUsuario; //Convert.ToInt32(Session["idUsuario"]); int idUsuarioResultado = oUser.IdUsuario; DateTime fechaDeHoy = DateTime.Now; DateTime fechaDeHoyDetalle = DateTime.Now; - int MotivoCancelacion = int.Parse(ddl_motivoCancelacion.SelectedItem.Value); + int MotivoCancelacion = int.Parse(ddlMotivoCancelacion.SelectedItem.Value); bool conResultado = true; @@ -397,7 +397,7 @@ private void ActualizarDetalleProtocolo(GridViewRow row, int idLote = 0, int de if (desasociaLote == 0) { estadoSeleccionado = Convert.ToInt32(ddlEstado.SelectedValue);//Estado seleccionado => 2 No Enviado - 4 Pendiente para enviar - resultadoDerivacion = (estadoSeleccionado == 2) ? "No Derivado: " + ddl_motivoCancelacion.SelectedItem.Text : "Pendiente para enviar "; + resultadoDerivacion = (estadoSeleccionado == 2) ? "No Derivado: " + ddlMotivoCancelacion.SelectedItem.Text : "Pendiente para enviar "; } else { diff --git a/WebLab/Derivaciones/InformeList3.aspx.designer.cs b/WebLab/Derivaciones/InformeList3.aspx.designer.cs index 2f6e719..4c71d42 100644 --- a/WebLab/Derivaciones/InformeList3.aspx.designer.cs +++ b/WebLab/Derivaciones/InformeList3.aspx.designer.cs @@ -51,40 +51,40 @@ public partial class InformeList3 protected global::System.Web.UI.WebControls.DropDownList ddlEstado; /// - /// rv_estado control. + /// rvEstado control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.RangeValidator rv_estado; + protected global::System.Web.UI.WebControls.RangeValidator rvEstado; /// - /// ddl_motivoCancelacion control. + /// ddlMotivoCancelacion control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.DropDownList ddl_motivoCancelacion; + protected global::System.Web.UI.WebControls.DropDownList ddlMotivoCancelacion; /// - /// lbl_ErrorMotivo control. + /// lblErrorMotivo control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_ErrorMotivo; + protected global::System.Web.UI.WebControls.Label lblErrorMotivo; /// - /// txt_observacion control. + /// txtObservacion control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.TextBox txt_observacion; + protected global::System.Web.UI.WebControls.TextBox txtObservacion; /// /// btnGuardar control. @@ -105,13 +105,13 @@ public partial class InformeList3 protected global::System.Web.UI.WebControls.LinkButton lnkPDF; /// - /// lbl_errorLista control. + /// lblErrorLista control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_errorLista; + protected global::System.Web.UI.WebControls.Label lblErrorLista; /// /// lnkMarcar control. diff --git a/WebLab/Derivaciones/InformeLote.aspx b/WebLab/Derivaciones/InformeLote.aspx index cfb5191..314b28b 100644 --- a/WebLab/Derivaciones/InformeLote.aspx +++ b/WebLab/Derivaciones/InformeLote.aspx @@ -7,10 +7,10 @@ var validatorEstado = document.getElementById('<%= Range1.ClientID %>'); var txtObservacion = document.getElementById('<%= txtObservacion.ClientID %>'); var estado = document.getElementById('<%= ddlEstados.ClientID %>'); - var label = document.getElementById('<%= lbl_ErrorMotivo.ClientID %>'); - var labelGrilla = document.getElementById('<%= lbl_errorLista.ClientID %>'); - var lista_transporte = document.getElementById('<%= ddl_Transporte.ClientID %>'); - var labelErrorTransporte = document.getElementById('<%= lbl_ErrorTransporte.ClientID %>'); + var label = document.getElementById('<%= lblErrorMotivo.ClientID %>'); + var labelGrilla = document.getElementById('<%= lblErrorLista.ClientID %>'); + var lista_transporte = document.getElementById('<%= ddlTransporte.ClientID %>'); + var labelErrorTransporte = document.getElementById('<%= lblErrorTransporte.ClientID %>'); //Limpio los labels de error label.className = 'hidden'; @@ -62,7 +62,7 @@ return true; // Detiene la validacin con al menos un check } } - var label = document.getElementById('<%= lbl_errorLista.ClientID %>'); + var label = document.getElementById('<%= lblErrorLista.ClientID %>'); label.className = 'exposed'; return todoOk; } @@ -71,8 +71,8 @@ //Habilita la seleccion del listado desplegable donde estan los transportes var ddl = document.getElementById('<%= ddlEstados.ClientID %>'); - var labelErrorTransporte = document.getElementById('<%= lbl_ErrorTransporte.ClientID%>'); - var lista_transporte = document.getElementById('<%= ddl_Transporte.ClientID%>'); + var labelErrorTransporte = document.getElementById('<%= lblErrorTransporte.ClientID%>'); + var lista_transporte = document.getElementById('<%= ddlTransporte.ClientID%>'); var estado = ddl.value; //console.log("--"); //console.log(lista_transporte); @@ -88,7 +88,7 @@ function reseteaLabelErrorLote() { //Esconde el label que tiene el error - var labelGrilla = document.getElementById('<%= lbl_errorLista.ClientID %>'); + var labelGrilla = document.getElementById('<%= lblErrorLista.ClientID %>'); labelGrilla.className = 'hidden'; } @@ -104,8 +104,8 @@ function verificaSeleccion() { //Esta funcion revisa que se haya selecionado un transporte - var lista_transporte = document.getElementById('<%= ddl_Transporte.ClientID %>'); - var labelErrorTransporte = document.getElementById('<%= lbl_ErrorTransporte.ClientID %>'); + var lista_transporte = document.getElementById('<%= ddlTransporte.ClientID %>'); + var labelErrorTransporte = document.getElementById('<%= lblErrorTransporte.ClientID %>'); //console.log("transporte"); //console.log(lista_transporte.value); if (lista_transporte.selectedIndex == 0) { @@ -116,8 +116,8 @@ } document.addEventListener("DOMContentLoaded", function () { - var txtFecha = document.getElementById('<%= txt_Fecha.ClientID %>'); - var txtHora = document.getElementById('<%= txt_Hora.ClientID %>'); + var txtFecha = document.getElementById('<%= txtFecha.ClientID %>'); + var txtHora = document.getElementById('<%= txtHora.ClientID %>'); function cambioFechaHorario() { var fechaSeleccionada = new Date(txtFecha.value); @@ -187,20 +187,20 @@
    Retira transporte: + <%-- --%>
    Observaciones: - + @@ -209,15 +209,15 @@ Fecha y Hora de retiro: - + - *Error en Fecha + *Error en Fecha - + - *Error en Hora + *Error en Hora
    - +
    Seleccionar: Todas  diff --git a/WebLab/Derivaciones/InformeLote.aspx.cs b/WebLab/Derivaciones/InformeLote.aspx.cs index 13adbe6..382a36e 100644 --- a/WebLab/Derivaciones/InformeLote.aspx.cs +++ b/WebLab/Derivaciones/InformeLote.aspx.cs @@ -128,11 +128,11 @@ private void activarControles(bool valor) txtObservacion.Enabled = valor; ddlEstados.Enabled = valor; //rb_transportista.Enabled = true; //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) - ddl_Transporte.Enabled = valor; + ddlTransporte.Enabled = valor; lnkMarcar.Enabled = valor; lnkDesMarcar.Enabled = valor; - txt_Fecha.Enabled = valor; - txt_Hora.Enabled = valor; + txtFecha.Enabled = valor; + txtHora.Enabled = valor; } private void CargarControles() @@ -154,10 +154,10 @@ private void CargarEstados() private void CargarTransportistas() { - ddl_Transporte.Items.Add("-- SELECCIONE --"); + ddlTransporte.Items.Add("-- SELECCIONE --"); //Vanesa: por ahora esta hardcodeado los transportitas, hacer mejora que lea de la base de datos - ddl_Transporte.Items.Add("Público"); - ddl_Transporte.Items.Add("Privado"); + ddlTransporte.Items.Add("Público"); + ddlTransporte.Items.Add("Privado"); //Utility oUtil = new Utility(); @@ -168,8 +168,8 @@ private void CargarTransportistas() private void CargarFechaHoraActual() { DateTime miFecha = DateTime.UtcNow.AddHours(-3); //Hora estándar de Argentina (UTC-03:00) - txt_Fecha.Text = miFecha.Date.ToString("yyyy-MM-dd"); - txt_Hora.Text = miFecha.ToString("HH:mm"); + txtFecha.Text = miFecha.Date.ToString("yyyy-MM-dd"); + txtHora.Text = miFecha.ToString("HH:mm"); //Date1.Text = miFecha.Date.ToString("yyyy-MM-dd"); //Time1.Text = miFecha.ToString("HH:mm"); } @@ -336,7 +336,7 @@ private bool Guardar() int estadoLote = Convert.ToInt32(ddlEstados.SelectedValue); string resultadoDerivacion = estadoLote == 2 ? "Derivado: " + row.Cells[3].Text : "No Derivado. "; //string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? rb_transportista.SelectedValue : ""); //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) - string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? ddl_Transporte.SelectedValue : ""); + string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? ddlTransporte.SelectedValue : ""); LoteDerivacion lote = new LoteDerivacion(); lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); @@ -345,7 +345,7 @@ private bool Guardar() lote.Observacion = observacion; lote.IdUsuarioEnvio = idUsuario; //para Estado "Derivado" poner la fecha actual y para estado "Cancelado" no poner Fecha - string fecha_hora = txt_Fecha.Text + " " + txt_Hora.Text; + string fecha_hora = txtFecha.Text + " " + txtHora.Text; lote.FechaEnvio = (estadoLote == 2) ? Convert.ToDateTime(fecha_hora) : DateTime.Parse("01/01/1900"); lote.Save(); @@ -405,10 +405,10 @@ Estado de la derivacion LAB_DerivacionEstado if (estadoLote == 2) //Si deriva indica con que transportista fue, y que fecha y hora se retiro { // lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", rb_transportista.SelectedValue); //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) - lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", ddl_Transporte.SelectedValue); - DateTime f = new DateTime(Convert.ToInt16(txt_Fecha.Text.Substring(0, 4)), Convert.ToInt16(txt_Fecha.Text.Substring(5, 2)), Convert.ToInt16(txt_Fecha.Text.Substring(8, 2))); + lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", ddlTransporte.SelectedValue); + DateTime f = new DateTime(Convert.ToInt16(txtFecha.Text.Substring(0, 4)), Convert.ToInt16(txtFecha.Text.Substring(5, 2)), Convert.ToInt16(txtFecha.Text.Substring(8, 2))); lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Fecha", f.ToString("dd/MM/yyyy")); //que las fechas tengan el mismo formato - lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Hora", txt_Hora.Text); + lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Hora", txtHora.Text); } diff --git a/WebLab/Derivaciones/InformeLote.aspx.designer.cs b/WebLab/Derivaciones/InformeLote.aspx.designer.cs index a81c429..59d5969 100644 --- a/WebLab/Derivaciones/InformeLote.aspx.designer.cs +++ b/WebLab/Derivaciones/InformeLote.aspx.designer.cs @@ -42,22 +42,22 @@ public partial class InformeLote protected global::System.Web.UI.WebControls.RangeValidator Range1; /// - /// ddl_Transporte control. + /// ddlTransporte control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.DropDownList ddl_Transporte; + protected global::System.Web.UI.WebControls.DropDownList ddlTransporte; /// - /// lbl_ErrorTransporte control. + /// lblErrorTransporte control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_ErrorTransporte; + protected global::System.Web.UI.WebControls.Label lblErrorTransporte; /// /// txtObservacion control. @@ -69,22 +69,22 @@ public partial class InformeLote protected global::System.Web.UI.WebControls.TextBox txtObservacion; /// - /// lbl_ErrorMotivo control. + /// lblErrorMotivo control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_ErrorMotivo; + protected global::System.Web.UI.WebControls.Label lblErrorMotivo; /// - /// txt_Fecha control. + /// txtFecha control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.TextBox txt_Fecha; + protected global::System.Web.UI.WebControls.TextBox txtFecha; /// /// RequiredFieldValidator1 control. @@ -96,13 +96,13 @@ public partial class InformeLote protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1; /// - /// txt_Hora control. + /// txtHora control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.TextBox txt_Hora; + protected global::System.Web.UI.WebControls.TextBox txtHora; /// /// RequiredFieldValidator2 control. @@ -123,13 +123,13 @@ public partial class InformeLote protected global::System.Web.UI.WebControls.Button btnGuardar; /// - /// lbl_errorLista control. + /// lblErrorLista control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label lbl_errorLista; + protected global::System.Web.UI.WebControls.Label lblErrorLista; /// /// lnkMarcar control. diff --git a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx index 853354f..1ee7de9 100644 --- a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx +++ b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx @@ -49,7 +49,7 @@
    -
    +
    @@ -69,20 +69,20 @@
    -
    - +
    +
    Efector origen: - +
    Estado Lote: -
    -
    - +
    - - + +
    Transportista: - + <%----%>
    Fecha y Hora: <%----%> - + *Error en Fecha - *Error en Hora - + *Error en Hora +
    Observaciones: - +
    diff --git a/WebLab/Informes/Auditoria.aspx.cs b/WebLab/Informes/Auditoria.aspx.cs index eb70ddd..b1e2c99 100644 --- a/WebLab/Informes/Auditoria.aspx.cs +++ b/WebLab/Informes/Auditoria.aspx.cs @@ -97,7 +97,7 @@ private void Inicializar() pnlControlProtocolo.Visible = true; pnlControlAcceso.Visible = false; pnControlLote.Visible = false; - + txtProtocolo.Focus(); } break; @@ -110,6 +110,7 @@ private void Inicializar() pnlControlProtocolo.Visible = false; pnlControlAcceso.Visible = false; pnControlLote.Visible = true; + txtLote.Focus(); } break; } @@ -476,7 +477,7 @@ private DataTable GetDataSetAuditoraLote() FROM LAB_AuditoriaLote AS A with (nolock) left JOIN Sys_Usuario AS U with (nolock) ON A.idUsuario = U.idUsuario inner join LAB_LoteDerivacion L with (nolock) on L.idLoteDerivacion= A.idLote - where L.idLoteDerivacion = " + txt_lote.Text.Trim() + m_strCondicion + " ORDER BY A.idAuditoriaLote"; + where L.idLoteDerivacion = " + txtLote.Text.Trim() + m_strCondicion + " ORDER BY A.idAuditoriaLote"; DataSet Ds1 = new DataSet(); adapter.SelectCommand = new SqlCommand(m_strSQL, conn); @@ -525,7 +526,7 @@ private void ImprimirAuditoriaLote() oCr.DataBind(); Utility oUtil = new Utility(); - string nombrePDF = oUtil.CompletarNombrePDF("Auditoria_Lote_" + txt_lote.Text); + string nombrePDF = oUtil.CompletarNombrePDF("Auditoria_Lote_" + txtLote.Text); oCr.ReportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, true, nombrePDF); diff --git a/WebLab/Informes/Auditoria.aspx.designer.cs b/WebLab/Informes/Auditoria.aspx.designer.cs index 4a2a2b7..069c8f6 100644 --- a/WebLab/Informes/Auditoria.aspx.designer.cs +++ b/WebLab/Informes/Auditoria.aspx.designer.cs @@ -67,7 +67,7 @@ public partial class Auditoria /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.CompareValidator cvDni; - + /// /// ddlUsuario control. /// @@ -168,13 +168,13 @@ public partial class Auditoria protected global::System.Web.UI.WebControls.Panel pnControlLote; /// - /// txt_lote control. + /// txtLote control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.TextBox txt_lote; + protected global::System.Web.UI.WebControls.TextBox txtLote; /// /// RequiredFieldValidator2 control. From 8b9f01e3d7fc8dd19170c2681260e1020badea3b Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Tue, 21 Oct 2025 11:00:55 -0300 Subject: [PATCH 50/61] fix: se pasa el metodo ActualizaEstadoLote a LoteDerivacion --- Business/Data/Laboratorio/LoteDerivacion.cs | 32 +++++++--- WebLab/Protocolos/ProtocoloEdit2.aspx.cs | 64 ++++++++++--------- .../Protocolos/ProtocoloProductoEdit.aspx.cs | 50 ++++----------- 3 files changed, 70 insertions(+), 76 deletions(-) diff --git a/Business/Data/Laboratorio/LoteDerivacion.cs b/Business/Data/Laboratorio/LoteDerivacion.cs index 939a893..12e32c7 100644 --- a/Business/Data/Laboratorio/LoteDerivacion.cs +++ b/Business/Data/Laboratorio/LoteDerivacion.cs @@ -97,8 +97,8 @@ public string Observacion { public static string derivacionPDF(int idLote) { - //agregar el tipo de muestra para NO PACIENTES idMuestra de LAB_Muestra con el idmuestra de protocolo - + //agrego el tipo de muestra para NO PACIENTES (Cambios en la vista vta_LAB_Derivaciones) + string m_strSQL = @"SELECT numero, convert(varchar(10), fecha,103) as fecha, dni, determinacion, apellido + ' '+ nombre as paciente, efectorderivacion, fechaNacimiento as edad, unidadEdad, sexo, solicitante as especialista, idLote , @@ -154,11 +154,27 @@ public bool HayDerivacionesPendientes() { } - - //public bool IngresoProtocolo() { - // List derivaciones = Derivacion.DerivacionesByLote(this.IdLoteDerivacion); - - // derivaciones.co - //} + public void ActualizaEstadoLote(int idUsuario, string ProtocoloNuevo, string ProtocoloAnterior) + { + if (Estado == 4) //Pasa de Recibido a Ingresado + { + Estado = 5; + GrabarAuditoriaLoteDerivacion(descripcionEstadoLote(), 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 + if (!HayDerivacionesPendientes()) + { + Estado = 6; //Pasa a Completado si no tiene ms derivaciones pendientes + GrabarAuditoriaLoteDerivacion(descripcionEstadoLote(), idUsuario); + } + + Save(); + } + } } diff --git a/WebLab/Protocolos/ProtocoloEdit2.aspx.cs b/WebLab/Protocolos/ProtocoloEdit2.aspx.cs index ccfb3a9..d756620 100644 --- a/WebLab/Protocolos/ProtocoloEdit2.aspx.cs +++ b/WebLab/Protocolos/ProtocoloEdit2.aspx.cs @@ -5007,47 +5007,51 @@ private void GenerarResultadoSISA(DetalleProtocolo oDetalle, string idPruebaSISA } - private void ActualizaEstadoLote(int idLote, Protocolo oRegistro) //SE PISO CON EL PR MantenimientoVarios (#15) - { - try - { - if (idLote != 0) - { - LoteDerivacion lote = new LoteDerivacion(); - lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); + //private void ActualizaEstadoLote(int idLote, Protocolo oRegistro) //SE PISO CON EL PR MantenimientoVarios (#15) + //{ + // try + // { + // if (idLote != 0) + // { + // LoteDerivacion lote = new LoteDerivacion(); + // lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); - if (lote.Estado == 4) //Pasa de Recibido a Ingresado - { - lote.Estado = 5; - lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); - } + // if (lote.Estado == 4) //Pasa de Recibido a Ingresado + // { + // lote.Estado = 5; + // lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); + // lote.FechaIngreso = DateTime.Now; + // } - //Graba el ingreso del protocolo en el lote - lote.GrabarAuditoriaLoteDerivacion("Ingresa protocolo", oUser.IdUsuario, "Número Protocolo", oRegistro.Numero.ToString(), Request["numeroProtocolo"]); + // //Graba el ingreso del protocolo en el lote + // lote.GrabarAuditoriaLoteDerivacion("Ingresa protocolo", oUser.IdUsuario, "Número Protocolo", oRegistro.Numero.ToString(), Request["numeroProtocolo"]); - //Si al generar este nuevo protocolo se finalizo la carga del lote, cambiar estado a Completado - if (!lote.HayDerivacionesPendientes()) - { - lote.Estado = 6; //Pasa a Completado si no tiene más derivaciones pendientes - lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); - } + // //Si al generar este nuevo protocolo se finalizo la carga del lote, cambiar estado a Completado + // if (!lote.HayDerivacionesPendientes()) + // { + // lote.Estado = 6; //Pasa a Completado si no tiene más derivaciones pendientes + // lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); + // } - lote.Save(); - } - } - catch (Exception) - { - } - } + // lote.Save(); + // } + // } + // catch (Exception) + // { + // } + //} - private void VerificacionEstadoLote(Protocolo oRegistro) //SE PISO CON EL PR MantenimientoVarios (#15) + private void VerificacionEstadoLote(Protocolo oRegistro) { if (Request["idLote"] != null) //Si no tiene Lote, no actualiza estado de Lote { int idLote = Convert.ToInt32(Request["idLote"]); - ActualizaEstadoLote(idLote, oRegistro); + LoteDerivacion lote = new LoteDerivacion(); + lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); + lote.ActualizaEstadoLote(oUser.IdUsuario, oRegistro.Numero.ToString(), Request["numeroProtocolo"] ); + // ActualizaEstadoLote(idLote, oRegistro); } } diff --git a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs index b8a4ac1..b4d7f3a 100644 --- a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs +++ b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs @@ -2107,44 +2107,7 @@ and D.estado in (1) ---------------------- Buscar las derivaciones que no han si } } - private void VerificacionEstadoLote(Protocolo oRegistro) - { - - if (Request["idLote"] != null) //Si no tiene Lote, no actualiza estado de Lote - { - int idLote = Convert.ToInt32(Request["idLote"]); - try - { - if (idLote != 0) - { - LoteDerivacion lote = new LoteDerivacion(); - lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); - - - if (lote.Estado == 4) //Pasa de Recibido a Ingresado - { - lote.Estado = 5; - lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); - } - - //Graba el ingreso del protocolo en el lote - lote.GrabarAuditoriaLoteDerivacion("Ingresa protocolo", oUser.IdUsuario, "Número Protocolo", oRegistro.Numero.ToString(), Request["numeroProtocolo"]); - - //Si al generar este nuevo protocolo se finalizo la carga del lote, cambiar estado a Completado - if (!lote.HayDerivacionesPendientes()) - { - lote.Estado = 6; //Pasa a Completado si no tiene más derivaciones pendientes - lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); - } - - lote.Save(); - } - } - catch (Exception) - { - } - } - } + private void ActualizarEstadoDerivacion(Protocolo oRegistro) { SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; @@ -2173,6 +2136,17 @@ from LAB_Derivacion D } + private void VerificacionEstadoLote(Protocolo oRegistro) + { + if (Request["idLote"] != null) //Si no tiene Lote, no actualiza estado de Lote + { + int idLote = Convert.ToInt32(Request["idLote"]); + LoteDerivacion lote = new LoteDerivacion(); + lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); + lote.ActualizaEstadoLote(oUser.IdUsuario, oRegistro.Numero.ToString(), Request["numeroProtocolo"]); + // ActualizaEstadoLote(idLote, oRegistro); + } + } } } From a6d3eb3c930d5170f7d2fe45f3b847ed3096e4c2 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Tue, 21 Oct 2025 11:08:36 -0300 Subject: [PATCH 51/61] fix: se implenta store para el listado. se agrega la verificacion de permisos. se agregan columnas de fechas de generacion, ingreso y envio --- WebLab/Derivaciones/LoteList.aspx | 13 ++++++---- WebLab/Derivaciones/LoteList.aspx.cs | 37 ++++++++++++++++------------ 2 files changed, 29 insertions(+), 21 deletions(-) diff --git a/WebLab/Derivaciones/LoteList.aspx b/WebLab/Derivaciones/LoteList.aspx index b3bc3d0..a399be9 100644 --- a/WebLab/Derivaciones/LoteList.aspx +++ b/WebLab/Derivaciones/LoteList.aspx @@ -85,7 +85,7 @@ @@ -104,7 +104,7 @@
    @@ -778,7 +778,8 @@ function VerificaLargo (source, arguments) function InicioPagina() - { + { + if (document.getElementById('<%= Page.Master.FindControl("ContentPlaceHolder1").FindControl("TxtDatosCargados").ClientID %>').value == "") {///protocolo nuevo CrearFila(true); @@ -1231,7 +1232,7 @@ function VerificaLargo (source, arguments) } - + diff --git a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs index bd74cc3..9674d66 100644 --- a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs +++ b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs @@ -157,8 +157,12 @@ protected void Page_Load(object sender, EventArgs e) btnCancelar.Text = "Cancelar"; btnCancelar.Width = Unit.Pixel(80); + btnCancelar.Visible = true; + if (Request["Operacion"].ToString() == "AltaDerivacionMultiEfectorLote") + { + CargarProtocoloDerivadoLote(); + } - } } else @@ -193,29 +197,31 @@ private void CargarDeterminacionesPeticion(Peticion oRegistro) } - private void CargarDeterminacionesDerivacion(string s_analisis, string s_diagnostico) + private void CargarDeterminacionesDerivacion(string s_analisis) { - - string[] tabla = s_analisis.Split('|'); + string pivot = ""; string sDatos = ""; + /////Crea nuevamente los detalles. for (int i = 0; i <= tabla.Length - 1; i++) { - if (sDatos == "") - sDatos = tabla[i].ToString() + "#Si"; - else - sDatos += ";" + tabla[i].ToString() + "#Si"; - - } - - - + Item oItem = new Item(); + oItem = (Item)oItem.Get(typeof(Item), int.Parse(tabla[i].ToString())); + if (oItem != null) + if (pivot != oItem.Nombre) + { + if (sDatos == "") + sDatos = oItem.Codigo + "#Si#False"; + else + sDatos += ";" + oItem.Codigo + "#Si#False"; + pivot = oItem.Nombre; + } + } TxtDatosCargados.Value = sDatos; - } - + protected void txtCodigoMuestra_TextChanged(object sender, EventArgs e) { @@ -499,6 +505,7 @@ private void CargarListas() (Request["Operacion"].ToString() == "AltaTurno") || (Request["Operacion"].ToString() == "AltaDerivacion") || (Request["Operacion"].ToString() == "AltaDerivacionMultiEfector") || + (Request["Operacion"].ToString() == "AltaDerivacionMultiEfectorLote") || (Request["Operacion"].ToString() == "AltaPeticion") || (Request["Operacion"].ToString() == "AltaFFEE") ) @@ -789,7 +796,14 @@ 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") + { + ActualizarEstadoDerivacion(oRegistro); + VerificacionEstadoLote(oRegistro); + Response.Redirect("DerivacionMultiEfectorLote.aspx?idEfectorSolicitante=" + Request["idEfectorSolicitante"].ToString() + "&idServicio=" + Request["idServicio"].ToString() + "&idLote=" + Request["idLote"]); + } } else { @@ -1392,7 +1406,7 @@ private void GuardarDetalle2(Business.Data.Laboratorio.Protocolo oRegistro) private void GuardarDetallePractica(DetalleProtocolo oDet) { - if (VerificarSiEsDerivable(oDet)) //oDet.IdItem.IdEfector.IdEfector != oDet.IdItem.IdEfectorDerivacion.IdEfector) //Si es un item derivable no busca hijos y guarda directamente. + if (oDet.VerificarSiEsDerivable(oUser.IdEfector)) //Cambio para que quede como ProtocoloEdit2 { oDet.IdSubItem = oDet.IdItem; oDet.Save(); @@ -1498,31 +1512,31 @@ private void GuardarValorReferencia(DetalleProtocolo oDetalle) //Fin calculo de valor de refrencia y metodo } - private bool VerificarSiEsDerivable(DetalleProtocolo oDet) - { - bool ok = false; - /// buscar idefectorderivacion desde lab_itemefector - ISession m_session = NHibernateHttpModule.CurrentSession; - ICriteria critItemEfector = m_session.CreateCriteria(typeof(ItemEfector)); - critItemEfector.Add(Expression.Eq("IdItem", oDet.IdItem)); - critItemEfector.Add(Expression.Eq("IdEfector", oUser.IdEfector)); - IList detalle1 = critItemEfector.List(); - if (detalle1.Count > 0) - { - foreach (ItemEfector oitemEfector in detalle1) - { - if (oDet.IdEfector.IdEfector != oitemEfector.IdEfectorDerivacion.IdEfector) - { - ok = true; break; - } - } - } - else - ok = false; + //private bool VerificarSiEsDerivable(DetalleProtocolo oDet) + //{ + // bool ok = false; + // /// buscar idefectorderivacion desde lab_itemefector + // ISession m_session = NHibernateHttpModule.CurrentSession; + // ICriteria critItemEfector = m_session.CreateCriteria(typeof(ItemEfector)); + // critItemEfector.Add(Expression.Eq("IdItem", oDet.IdItem)); + // critItemEfector.Add(Expression.Eq("IdEfector", oUser.IdEfector)); + // IList detalle1 = critItemEfector.List(); + // if (detalle1.Count > 0) + // { + // foreach (ItemEfector oitemEfector in detalle1) + // { + // if (oDet.IdEfector.IdEfector != oitemEfector.IdEfectorDerivacion.IdEfector) + // { + // ok = true; break; + // } + // } + // } + // else + // ok = false; - return ok; + // return ok; - } + //} protected void ddlSexo_SelectedIndexChanged(object sender, EventArgs e) @@ -1583,18 +1597,13 @@ protected void txtCodigo_TextChanged1(object sender, EventArgs e) protected void btnCancelar_Click(object sender, EventArgs e) { - switch (Request["Desde"].ToString()) - { - //case "Default": Response.Redirect("Default.aspx?idServicio=" + Session["idServicio"].ToString(), false); break; - case "ProtocoloList": Response.Redirect("ProtocoloList.aspx?idServicio=" + Session["idServicio"].ToString() + "&Tipo=ListaProducto"); break; - case "Control": Response.Redirect("ProtocoloList.aspx?idServicio=" + Session["idServicio"].ToString() + "&Tipo=Control"); break; - // case "Urgencia": Response.Redirect("../Urgencia/UrgenciaList.aspx",false); break; - // case "Derivacion": Response.Redirect("Derivacion.aspx?idServicio="+Session["idServicio"].ToString(), false); break; - } - - - - } + switch (Request["Desde"].ToString()) + { + case "ProtocoloList": Response.Redirect("ProtocoloList.aspx?idServicio=" + Session["idServicio"].ToString() + "&Tipo=ListaProducto"); break; + case "Control": Response.Redirect("ProtocoloList.aspx?idServicio=" + Session["idServicio"].ToString() + "&Tipo=Control"); break; + case "AltaDerivacionMultiEfectorLote": Response.Redirect("DerivacionMultiEfectorLote.aspx?idEfectorSolicitante=" + Request["idEfectorSolicitante"].ToString() + "&idServicio=" + Request["idServicio"].ToString() + "&idLote=" + Request["idLote"]); break; + } + } @@ -2039,6 +2048,133 @@ protected void btnArchivos_Click(object sender, EventArgs e) { Response.Redirect("ProtocoloAdjuntar.aspx?idProtocolo=" + Request["idProtocolo"].ToString() +"&desde=protocolo"); } + + private void CargarProtocoloDerivadoLote() + { + string numeroProtocolo = Request["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", int.Parse(numeroProtocolo)); + if (oRegistro != null) + { + lblTitulo.Visible = false; + lblServicio1.Visible = true; + lblServicio.Visible = true; + txtFecha.Value = DateTime.Now.ToShortDateString(); + txtFechaOrden.Value = oRegistro.FechaOrden.ToShortDateString(); + txtCodigoMuestra.Text = ""; + txtDescripcionProducto.Text = oRegistro.DescripcionProducto; + ddlConservacion.SelectedValue = oRegistro.IdConservacion.ToString(); + txtNumeroOrigen.Text = oRegistro.Numero.ToString(); + ddlEfector.SelectedValue = oRegistro.IdEfector.IdEfector.ToString(); + ddlSectorServicio.SelectedValue = oRegistro.IdSector.IdSectorServicio.ToString(); + txtObservacion.Text = oRegistro.Observacion; + pnlNavegacion.Visible = false; + btnCancelar.Text = "Cancelar"; + btnCancelar.Width = Unit.Pixel(80); + ddlMuestra.SelectedValue = oRegistro.IdMuestra.ToString(); + Muestra oMuestra = new Muestra(); + oMuestra = (Muestra)oMuestra.Get(typeof(Muestra), "IdMuestra", oRegistro.IdMuestra, "Baja", false); + txtCodigoMuestra.Text = oMuestra.Codigo; + + + #region CargaDeterminaciones + ////// ---------------------->Buscar las derivaciones que no han sido ingresadas + //el protocolo me da los protocolos detalles + //los protocolos detalles me dan las derivaciones + //la derivacion debe estar enviada + //la derivacion debe tener el mismo lote que el ingresado (no todos los analisis pueden haber sido enviados con el mismo lote) + + string m_strSQL = + //select distinct STRING_AGG(Det.idItem ,' | ') as Item ---> (No esta disponible en SQL 2014) + @" SELECT STUFF(( SELECT ' | ' + CAST(Det.idItem AS VARCHAR(20)) + from LAB_Derivacion D + inner join LAB_DetalleProtocolo as Det on Det.idDetalleProtocolo = D.idDetalleProtocolo + inner join LAB_Protocolo as P on P.idProtocolo = det.idProtocolo + inner join LAB_DerivacionEstado as LE on LE.idEstado = D.estado + inner join LAB_LoteDerivacion L on L.idLoteDerivacion = D.idLote + where P.baja = 0 + and D.estado in (1) ---------------------- Buscar las derivaciones que no han sido ingresadas + and L.idLoteDerivacion = " + Request["idLote"].ToString() + " and p.numero = " + numeroProtocolo + + " FOR XML PATH(''), TYPE ).value('.', 'NVARCHAR(MAX)'), 1, 3, '') AS Item; "; + + DataSet Ds = new DataSet(); + SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; + SqlDataAdapter adapter = new SqlDataAdapter(); + adapter.SelectCommand = new SqlCommand(m_strSQL, conn); + adapter.Fill(Ds); + + string analisis = Convert.ToString(Ds.Tables[0].Rows[0][0]); + CargarDeterminacionesDerivacion(analisis); + #endregion + } + } + + private void VerificacionEstadoLote(Protocolo oRegistro) + { + + if (Request["idLote"] != null) //Si no tiene Lote, no actualiza estado de Lote + { + int idLote = Convert.ToInt32(Request["idLote"]); + try + { + if (idLote != 0) + { + LoteDerivacion lote = new LoteDerivacion(); + lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); + + + if (lote.Estado == 4) //Pasa de Recibido a Ingresado + { + lote.Estado = 5; + lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); + } + + //Graba el ingreso del protocolo en el lote + lote.GrabarAuditoriaLoteDerivacion("Ingresa protocolo", oUser.IdUsuario, "Número Protocolo", oRegistro.Numero.ToString(), Request["numeroProtocolo"]); + + //Si al generar este nuevo protocolo se finalizo la carga del lote, cambiar estado a Completado + if (!lote.HayDerivacionesPendientes()) + { + lote.Estado = 6; //Pasa a Completado si no tiene más derivaciones pendientes + lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); + } + + lote.Save(); + } + } + catch (Exception) + { + } + } + } + private void ActualizarEstadoDerivacion(Protocolo oRegistro) + { + SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; + int idLote = Convert.ToInt32(Request["idLote"]); + + string query = + @"update LAB_Derivacion + set estado=3---recibido + ,idProtocoloDerivacion=" + oRegistro.IdProtocolo.ToString() + @" + from LAB_Derivacion D + inner join LAB_DetalleProtocolo Det on Det.idDetalleProtocolo= d.idDetalleProtocolo + inner join LAB_Protocolo P on P.idProtocolo= Det.idProtocolo + where P.numero=" + Request["numeroProtocolo"].ToString() + @" and idLote=" + idLote; + + 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 + Business.Data.Laboratorio.Protocolo oPOrigen = new Business.Data.Laboratorio.Protocolo(); + oPOrigen = (Business.Data.Laboratorio.Protocolo)oPOrigen.Get(typeof(Business.Data.Laboratorio.Protocolo), "Numero", int.Parse(Request["numeroProtocolo"].ToString())); + if (oPOrigen != null) + { + oPOrigen.GrabarAuditoriaDetalleProtocolo("Recepcion Derivacion", oUser.IdUsuario, "Lote " + idLote, "Protocolo " + oRegistro.Numero.ToString()); + } + + } + } } From 0e455013c97594d112da4347dcf74d0b041f8742 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Thu, 16 Oct 2025 15:59:12 -0300 Subject: [PATCH 44/61] feature: Requerimiento 1: Cambiar a nomenclatura CamelCase --- WebLab/Derivaciones/InformeList3.aspx.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WebLab/Derivaciones/InformeList3.aspx.cs b/WebLab/Derivaciones/InformeList3.aspx.cs index 9e3c43a..b851e6d 100644 --- a/WebLab/Derivaciones/InformeList3.aspx.cs +++ b/WebLab/Derivaciones/InformeList3.aspx.cs @@ -73,7 +73,7 @@ protected void Page_Load(object sender, EventArgs e) pnlNroLote.Visible = true; HyperLink1.NavigateUrl = "~/Derivaciones/GestionarLote.aspx"; ddlEstado.SelectedIndex = 2; - ddl_motivoCancelacion.Enabled = false; + ddlMotivoCancelacion.Enabled = false; } } @@ -424,7 +424,7 @@ private void ActualizarDetalleProtocolo(GridViewRow row, int idLote = 0, int de oDeriva.IdMotivoCancelacion = MotivoCancelacion; //La observacion se cambia solo si es Alta, si se desasocia el lote, o si al modificar agrego una observacion - if (Request["Tipo"] == "Alta" || desasociaLote == 1 ||(Request["Tipo"] == "Modifica" && !string.IsNullOrEmpty(txt_observacion.Text))) + if (Request["Tipo"] == "Alta" || desasociaLote == 1 ||(Request["Tipo"] == "Modifica" && !string.IsNullOrEmpty(txtObservacion.Text))) { oDeriva.Observacion = observacion; } From 9aaa3ee3dac2fc4eb92bd59370cc5e374536cae1 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Thu, 16 Oct 2025 16:00:21 -0300 Subject: [PATCH 45/61] =?UTF-8?q?feature;=20en=20proceso=20Requerimiento?= =?UTF-8?q?=204:=20Recepci=C3=B3n=20de=20derivaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebLab/Protocolos/ProtocoloMensaje.aspx | 102 ++++++++++-------- WebLab/Protocolos/ProtocoloMensaje.aspx.cs | 31 +++--- .../ProtocoloMensaje.aspx.designer.cs | 33 ++++-- .../Protocolos/ProtocoloProductoEdit.aspx.cs | 8 +- 4 files changed, 101 insertions(+), 73 deletions(-) diff --git a/WebLab/Protocolos/ProtocoloMensaje.aspx b/WebLab/Protocolos/ProtocoloMensaje.aspx index 4f8d1e7..99508a1 100644 --- a/WebLab/Protocolos/ProtocoloMensaje.aspx +++ b/WebLab/Protocolos/ProtocoloMensaje.aspx @@ -1,52 +1,64 @@ <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProtocoloMensaje.aspx.cs" Inherits="WebLab.Protocolos.ProtocoloMensaje" MasterPageFile="~/Site1.Master" %> - - -

    -
    - -
    -
    -
    - - - -
    - -
    -
    - ALTA DE MUESTRA - -
    -
    - - -

    -
    -

    - - - - - - -
    - - -
    -
    - - -
    - + + +
    +
    +
    + +
    +
    +
    + + + +
    + +
    +
    + ALTA DE MUESTRA +
    +
    + + +

    +

    +
    +

    +

    + + + + + +
    + + +
    +
    + + +
    + diff --git a/WebLab/Protocolos/ProtocoloMensaje.aspx.cs b/WebLab/Protocolos/ProtocoloMensaje.aspx.cs index bdbdb59..c8d3623 100644 --- a/WebLab/Protocolos/ProtocoloMensaje.aspx.cs +++ b/WebLab/Protocolos/ProtocoloMensaje.aspx.cs @@ -20,9 +20,6 @@ namespace WebLab.Protocolos { public partial class ProtocoloMensaje : System.Web.UI.Page { - - - protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) @@ -44,25 +41,35 @@ protected void Page_Load(object sender, EventArgs e) Business.Data.Laboratorio.Muestra oM = new Business.Data.Laboratorio.Muestra(); oM = (Business.Data.Laboratorio.Muestra)oM.Get(typeof(Business.Data.Laboratorio.Muestra), oP.IdMuestra); lblDescripcion.Text = oM.Nombre.ToUpper() + " " + oP.DescripcionProducto; + + if (Request["idLote"] != null) + { + lnkRegresar.Visible = true; + lnkNuevo.Visible = false; + } } } - - } - - - - - protected void lnkRegresar_Click(object sender, EventArgs e) + } + protected void lnkNuevo_Click(object sender, EventArgs e) { Business.Data.Laboratorio.Protocolo oP = new Business.Data.Laboratorio.Protocolo(); oP = (Business.Data.Laboratorio.Protocolo)oP.Get(typeof(Business.Data.Laboratorio.Protocolo), int.Parse(Request["id"].ToString())); - if ((oP.IdTipoServicio.IdTipoServicio==3) || (oP.IdTipoServicio.IdTipoServicio == 5)) - Response.Redirect("ProtocoloProductoEdit.aspx?Operacion=Alta", false); + if ((oP.IdTipoServicio.IdTipoServicio == 3) || (oP.IdTipoServicio.IdTipoServicio == 5)) + Response.Redirect("ProtocoloProductoEdit.aspx?Operacion=Alta", false); if (oP.IdTipoServicio.IdTipoServicio == 6) Response.Redirect("Default2.aspx?idServicio=6&idUrgencia=0&idCaso=0", false); + } + protected void lnkRegresar_Click(object sender, EventArgs e) + { + if (Request["idLote"] != null) //Regreso a la recepcion de lotes de derivaciones + { + Response.Redirect("DerivacionMultiEfectorLote.aspx?idServicio=1&idEfectorSolicitante=" + Request["idEfectorSolicitante"].ToString() + "&idLote=" + Request["idLote"]); + } } + + } } diff --git a/WebLab/Protocolos/ProtocoloMensaje.aspx.designer.cs b/WebLab/Protocolos/ProtocoloMensaje.aspx.designer.cs index c743d7b..528e52e 100644 --- a/WebLab/Protocolos/ProtocoloMensaje.aspx.designer.cs +++ b/WebLab/Protocolos/ProtocoloMensaje.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace WebLab.Protocolos { - - - public partial class ProtocoloMensaje { - +namespace WebLab.Protocolos +{ + + + public partial class ProtocoloMensaje + { + /// /// error control. /// @@ -20,7 +22,7 @@ public partial class ProtocoloMensaje { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl error; - + /// /// lblError control. /// @@ -29,7 +31,7 @@ public partial class ProtocoloMensaje { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblError; - + /// /// altaMuestra control. /// @@ -38,7 +40,7 @@ public partial class ProtocoloMensaje { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl altaMuestra; - + /// /// pnlTitulo control. /// @@ -47,7 +49,7 @@ public partial class ProtocoloMensaje { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.HtmlControls.HtmlGenericControl pnlTitulo; - + /// /// lblTitulo control. /// @@ -56,7 +58,7 @@ public partial class ProtocoloMensaje { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblTitulo; - + /// /// lblDescripcion control. /// @@ -65,7 +67,16 @@ public partial class ProtocoloMensaje { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Label lblDescripcion; - + + /// + /// lnkRegresar control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton lnkRegresar; + /// /// lnkNuevo control. /// diff --git a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs index 9674d66..b8a4ac1 100644 --- a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs +++ b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs @@ -802,7 +802,7 @@ protected void btnGuardar_Click(object sender, EventArgs e) { ActualizarEstadoDerivacion(oRegistro); VerificacionEstadoLote(oRegistro); - Response.Redirect("DerivacionMultiEfectorLote.aspx?idEfectorSolicitante=" + Request["idEfectorSolicitante"].ToString() + "&idServicio=" + Request["idServicio"].ToString() + "&idLote=" + Request["idLote"]); + Response.Redirect("ProtocoloMensaje.aspx?id=" + oRegistro.IdProtocolo + "&idLote=" + Request["idLote"] + "&idEfectorSolicitante=" + Request["idEfectorSolicitante"], false); } } else @@ -1601,7 +1601,7 @@ protected void btnCancelar_Click(object sender, EventArgs e) { case "ProtocoloList": Response.Redirect("ProtocoloList.aspx?idServicio=" + Session["idServicio"].ToString() + "&Tipo=ListaProducto"); break; case "Control": Response.Redirect("ProtocoloList.aspx?idServicio=" + Session["idServicio"].ToString() + "&Tipo=Control"); break; - case "AltaDerivacionMultiEfectorLote": Response.Redirect("DerivacionMultiEfectorLote.aspx?idEfectorSolicitante=" + Request["idEfectorSolicitante"].ToString() + "&idServicio=" + Request["idServicio"].ToString() + "&idLote=" + Request["idLote"]); break; + case "AltaDerivacionMultiEfectorLote": Response.Redirect("DerivacionMultiEfectorLote.aspx?idEfectorSolicitante=" + Request["idEfectorSolicitante"].ToString() + "&idServicio=1&idLote=" + Request["idLote"]); break; } } @@ -2072,9 +2072,7 @@ private void CargarProtocoloDerivadoLote() btnCancelar.Text = "Cancelar"; btnCancelar.Width = Unit.Pixel(80); ddlMuestra.SelectedValue = oRegistro.IdMuestra.ToString(); - Muestra oMuestra = new Muestra(); - oMuestra = (Muestra)oMuestra.Get(typeof(Muestra), "IdMuestra", oRegistro.IdMuestra, "Baja", false); - txtCodigoMuestra.Text = oMuestra.Codigo; + #region CargaDeterminaciones From 0c80aeda33a84bbafee58608655ea9234f16c67e Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Fri, 17 Oct 2025 12:28:59 -0300 Subject: [PATCH 46/61] feature: Requerimiento 3: Adaptar PDF --- Business/Data/Laboratorio/LoteDerivacion.cs | 17 +++---- WebLab/App_Data/dsInformes.Designer.cs | 47 +++++++++++++++++++- WebLab/App_Data/dsInformes.xsd | 9 ++-- WebLab/App_Data/dsInformes.xss | 22 ++++----- WebLab/Informes/DerivacionLote.rpt | Bin 32768 -> 32768 bytes 5 files changed, 70 insertions(+), 25 deletions(-) diff --git a/Business/Data/Laboratorio/LoteDerivacion.cs b/Business/Data/Laboratorio/LoteDerivacion.cs index 2fa31ba..69c4d2c 100644 --- a/Business/Data/Laboratorio/LoteDerivacion.cs +++ b/Business/Data/Laboratorio/LoteDerivacion.cs @@ -96,14 +96,15 @@ public string Observacion { public static string derivacionPDF(int idLote) { - string m_strSQL = " SELECT numero, convert(varchar(10), fecha,103) as fecha, dni, determinacion, " + - " apellido + ' '+ nombre as paciente, efectorderivacion, fechaNacimiento as edad, unidadEdad, sexo, " + - " solicitante as especialista, idLote ," + - " CASE WHEN(len(idLote) < 9) " + - " THEN '00000' + CONVERT(VARCHAR, idLote) " + - " ELSE CONVERT(VARCHAR, idLote ) " + - " END as idLoteString " + - " FROM vta_LAB_Derivaciones WHERE idLote=" + idLote + " ORDER BY efectorDerivacion,numero "; + string m_strSQL = @"SELECT numero, convert(varchar(10), fecha,103) as fecha, dni, determinacion, + apellido + ' '+ nombre as paciente, efectorderivacion, fechaNacimiento as edad, unidadEdad, sexo, + solicitante as especialista, idLote , + CASE WHEN(len(idLote) < 9) + THEN '00000' + CONVERT(VARCHAR, idLote) + ELSE CONVERT(VARCHAR, idLote ) + END as idLoteString , + idTipoServicio + FROM vta_LAB_Derivaciones WHERE idLote= "+ idLote + " ORDER BY efectorDerivacion,numero "; return m_strSQL; } diff --git a/WebLab/App_Data/dsInformes.Designer.cs b/WebLab/App_Data/dsInformes.Designer.cs index e54301c..726b187 100644 --- a/WebLab/App_Data/dsInformes.Designer.cs +++ b/WebLab/App_Data/dsInformes.Designer.cs @@ -1535,6 +1535,8 @@ public partial class protocoloDataTable : global::System.Data.TypedTableBase diff --git a/WebLab/App_Data/dsInformes.xsd b/WebLab/App_Data/dsInformes.xsd index 0e927e8..8794fa2 100644 --- a/WebLab/App_Data/dsInformes.xsd +++ b/WebLab/App_Data/dsInformes.xsd @@ -72,7 +72,8 @@ - + + @@ -225,7 +226,7 @@ - + @@ -239,7 +240,7 @@ - + @@ -422,7 +423,7 @@ - + diff --git a/WebLab/App_Data/dsInformes.xss b/WebLab/App_Data/dsInformes.xss index 4ed68e1..e353c27 100644 --- a/WebLab/App_Data/dsInformes.xss +++ b/WebLab/App_Data/dsInformes.xss @@ -6,17 +6,17 @@ --> - - - - - - - - - - - + + + + + + + + + + + \ No newline at end of file diff --git a/WebLab/Informes/DerivacionLote.rpt b/WebLab/Informes/DerivacionLote.rpt index 3983b5258fd961c0a0eead3755e10929729d014e..db6795f8bb49d4204570a32d54309f66092d59aa 100644 GIT binary patch delta 9135 zcmV;gBT(FcfC7Mk0>Jou77<20096JEx0sRU2|F< zo+lfFv{i+cBa%OdlD+Q)-`QFJ+xI$PgC?o)&M4d>0Ni2FHM3kbq9PTaxEI|X9V&3Ej0Y1`3H>ZJQ>5FFH{SCf``9jCx31#oh6kF!3SxwLnTiftq#xs zZ&}4Mud)vFQiEsM3B(KFK@XYgIY0pWo2ugI6d=!qV(>1DzgiY^5_Enjzh}qx(i{JB z*S?!X-3zPkP$7jQx%HPyr+*nwSq>4ga4Qd&lHY`Ah}WY#L3@GIBAm93EP6`NZe%MnZF@=vp`j>;7ieg&RPQcx>3bvS7l; zn6Ra^g^ngU6k$q32zKyr~h6dqh*$|dy!jV&;Cm+Cgt$3lRfbz&CnMWL7cU2srS{e1EM|T|b zY{2D%Abr_kZ4Sl$$Qu5aGUGToPz=_&3OzLv%e7-MfbaO&hq=7rJ({3F&?AI#E`OvD zo5X$O1MFwZsL#CCa+V6->Jv}XuAfObzSyA(-DBMAy4si{Dj;O%UYdK5sUCt4fFyhC z@v_(4^PLXS+y!8pJE>-h6e3}snnjyV(mbRPANi@Dua(sc>KkuEz}?0Lx}(q_vNRq% zZ|qhU3Wk4lOv2w}zhTkHp8Kv%>Zypkc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v1)E~{8qlheyH+SO5*d{&jVm5g$2!A@K0~_U! z!p?b{7q*DOMWf!$BYhf=)xNp;dUs4_T!{YfK-u+axb(jk*^l@=#t%yvr92ia?%{oU zL;L>Z4i=5A(~*opLw3OzaO*})ESrDn98Q7kXVk1+QtTT)nT$U-%_+aJQOjT+rHcXi z;s&ylpwDK3<@EUM?BJ;AyvaR2lh=!di&N>lkV~ZgO9@J((k=;tgttq-G6gQwjT(POB;#Wg z@X;UN_J4+Y#?M-)iun7bmjg|J_%syD=?D&WN~Rxc2WVm~?@xJbGAk#UcCfr%wE~js zEk*4+Z>qA&f=J%nwZ&$aF+0kfgrFFzWj`5fNpxtdZZo9Vn=H>l4eFMk7eXem!{y*Qs)PQOjddATs2@ z>v_H+O!0Rx9f;-Tg}e4#I;m&6{7HoA;pj`o%fr2ovhn5`ht~HECfQA$mv57YYK?8X z^dcF@*Xqaoq0sw}__MR>$4dJBORe;wXR2R@Sg8RotZs51t$y>=jsbs5gz?42AR>*l z;EB|ww_KnTUnorq|9Q9R+P%LqVo%v6fXz$Q(b***ILjjHosHbWE8?PTZ_*XPzeuUD z+a#8F9>VCrBC8(@IjFX5#aAWR{WDUAmSHJUgFmF30XITUa`!Gpqd zAChTy9*L3_5qqy6YS%wBFKbDrx%~?p_C$XVNlWQktXLj9MKPwALrH!~x>F}~ zr7z^!U!+n2JHyBBbgQCEcsic5+}rcN_S*+0SZ@SmRCV8%EDae;TbL{KreJ*Bh6*mr zytIRSZmx4vnbp3Wgv`RSWmSb6Yg0!5 Date: Fri, 17 Oct 2025 15:53:33 -0300 Subject: [PATCH 47/61] fix: no derivar lotes sin determinaciones --- WebLab/Derivaciones/InformeLote.aspx.cs | 140 +++++++++++++++--------- 1 file changed, 91 insertions(+), 49 deletions(-) diff --git a/WebLab/Derivaciones/InformeLote.aspx.cs b/WebLab/Derivaciones/InformeLote.aspx.cs index 382a36e..761383f 100644 --- a/WebLab/Derivaciones/InformeLote.aspx.cs +++ b/WebLab/Derivaciones/InformeLote.aspx.cs @@ -301,17 +301,26 @@ protected void btnGuardar_Click(object sender, EventArgs e) { if (Session["idUsuario"] != null) { - if (Guardar()) + int idLote = verificarDeterminaciones(); + if (idLote == 0) //No trajo ningun id Lote con error { - ScriptManager.RegisterStartupScript(this, GetType(), "mensajeOk", "alert('✅ Se guardaron los cambios con exito');", true); + if (Guardar()) + { + ScriptManager.RegisterStartupScript(this, GetType(), "mensajeOk", "alert('✅ Se guardaron los cambios con exito');", true); + } + else + { + ScriptManager.RegisterStartupScript(this, GetType(), "mensajeOk", "alert('❌ ERROR: No se pudo guardar los datos.\\n Revisá los campos e intentá nuevamente');", true); + + } + CargarGrilla(); + limpiarForm(); } else - { - ScriptManager.RegisterStartupScript(this, GetType(), "mensajeOk", "alert('❌ ERROR: No se pudo guardar los datos\nRevisá los campos e intentá nuevamente');", true); - + { //Es el idLote con error + ScriptManager.RegisterStartupScript(this, GetType(), "mensajeOk", "alert('❌ ERROR: El lote Nro:"+idLote+" no se puede derivar, no tiene determinaciones asociadas.\\nDescarte el lote por falta de determinaciones o modifique el lote agregando determinaciones');", true); } - CargarGrilla(); - limpiarForm(); + } else { @@ -320,25 +329,53 @@ protected void btnGuardar_Click(object sender, EventArgs e) } + private int verificarDeterminaciones() + { + int tieneDeterminaciones = 0; + //Verificamos que en lote no se hayan descartados todas sus determinaciones asi no se Deriva vacio + if (Convert.ToInt32(ddlEstados.SelectedValue) == 2) + { + foreach (GridViewRow row in gvLista.Rows) + { + CheckBox a = ((CheckBox)(row.Cells[0].FindControl("CheckBox1"))); + if (a.Checked) + { + int idLote = Convert.ToInt32(row.Cells[2].Text); + string consultaSql = @"select top 1 1 from LAB_LoteDerivacion L with (nolock) + inner join LAB_Derivacion D with (nolock) ON D.idLote = L.idLoteDerivacion + where idLote =" + idLote; + DataTable dt = GetData(consultaSql); + if(dt.Rows.Count == 0) + return idLote; + + } + + } + + } + + return tieneDeterminaciones; + } private bool Guardar() { bool seGuardoEnBd = false; - - foreach (GridViewRow row in gvLista.Rows) + if(verificarDeterminaciones() == 0) //No trajo ningun id Lote con error { - CheckBox a = ((CheckBox)(row.Cells[0].FindControl("CheckBox1"))); - if (a.Checked) + foreach (GridViewRow row in gvLista.Rows) { + CheckBox a = ((CheckBox)(row.Cells[0].FindControl("CheckBox1"))); + if (a.Checked) + { - int idLote = Convert.ToInt32(row.Cells[2].Text); - int idUsuario = oUser.IdUsuario; - int estadoLote = Convert.ToInt32(ddlEstados.SelectedValue); - string resultadoDerivacion = estadoLote == 2 ? "Derivado: " + row.Cells[3].Text : "No Derivado. "; - //string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? rb_transportista.SelectedValue : ""); //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) - string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? ddlTransporte.SelectedValue : ""); - LoteDerivacion lote = new LoteDerivacion(); - lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); + int idLote = Convert.ToInt32(row.Cells[2].Text); + int idUsuario = oUser.IdUsuario; + int estadoLote = Convert.ToInt32(ddlEstados.SelectedValue); + string resultadoDerivacion = estadoLote == 2 ? "Derivado: " + row.Cells[3].Text : "No Derivado. "; + //string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? rb_transportista.SelectedValue : ""); //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) + string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? ddlTransporte.SelectedValue : ""); + LoteDerivacion lote = new LoteDerivacion(); + lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); //Se cambia el estado del lote LAB_LoteDerivacion lote.Estado = estadoLote; @@ -360,27 +397,27 @@ private bool Guardar() - foreach (Business.Data.Laboratorio.Derivacion oDeriva in lista) - { - #region Derivacion - //Cambia el estado de las derivaciones LAB_Derivacion - - /* - Estado del lote LAB_LoteDerivacionEstado (representa el estado del lote, no de la derivacion) - 1 : Creado - 2 : Derivado - 3 : Cancelado - - Estado de la derivacion LAB_DerivacionEstado - 0 : Pendiente de derivar - 1 : Enviado - 2 : No Enviado - 3 : Recibido - 4 : Pendiente para enviar - */ - oDeriva.Estado = (estadoLote == 2) ? 1 : 2; - oDeriva.Save(); - #endregion + foreach (Business.Data.Laboratorio.Derivacion oDeriva in lista) + { + #region Derivacion + //Cambia el estado de las derivaciones LAB_Derivacion + + /* + Estado del lote LAB_LoteDerivacionEstado (representa el estado del lote, no de la derivacion) + 1 : Creado + 2 : Derivado + 3 : Cancelado + + Estado de la derivacion LAB_DerivacionEstado + 0 : Pendiente de derivar + 1 : Enviado + 2 : No Enviado + 3 : Recibido + 4 : Pendiente para enviar + */ + oDeriva.Estado = (estadoLote == 2) ? 1 : 2; + oDeriva.Save(); + #endregion #region cambio_codificacion_a_derivacion @@ -403,18 +440,23 @@ Estado de la derivacion LAB_DerivacionEstado lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), idUsuario); // LAB-54 Sacar la palabra "Estado: xxxxx" lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Observacion", txtObservacion.Text); - if (estadoLote == 2) //Si deriva indica con que transportista fue, y que fecha y hora se retiro - { // lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", rb_transportista.SelectedValue); //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) - lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", ddlTransporte.SelectedValue); - DateTime f = new DateTime(Convert.ToInt16(txtFecha.Text.Substring(0, 4)), Convert.ToInt16(txtFecha.Text.Substring(5, 2)), Convert.ToInt16(txtFecha.Text.Substring(8, 2))); - lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Fecha", f.ToString("dd/MM/yyyy")); //que las fechas tengan el mismo formato - lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Hora", txtHora.Text); + if (estadoLote == 2) //Si deriva indica con que transportista fue, y que fecha y hora se retiro + { // lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", rb_transportista.SelectedValue); //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) + lote.GrabarAuditoriaLoteDerivacion(resultadoDerivacion, idUsuario, "Transportista", ddlTransporte.SelectedValue); + DateTime f = new DateTime(Convert.ToInt16(txtFecha.Text.Substring(0, 4)), Convert.ToInt16(txtFecha.Text.Substring(5, 2)), Convert.ToInt16(txtFecha.Text.Substring(8, 2))); + lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Fecha", f.ToString("dd/MM/yyyy")); //que las fechas tengan el mismo formato + lote.GrabarAuditoriaLoteDerivacion("Fecha y Hora retiro", idUsuario, "Hora", txtHora.Text); + } + + + seGuardoEnBd = true; } - - - seGuardoEnBd = true; } } + else + { + + } return seGuardoEnBd; } From 9095da69ab88ea0616994391548f342bcdc22bc2 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Tue, 21 Oct 2025 09:31:17 -0300 Subject: [PATCH 48/61] feature: se modifica el encabezado de la Derivacion para contemplar los casos de Muestras de No Pacientes --- Business/Data/Laboratorio/LoteDerivacion.cs | 8 +++- WebLab/App_Data/dsInformes.Designer.cs | 47 +++++++++++++++++++- WebLab/App_Data/dsInformes.xsd | 7 +-- WebLab/App_Data/dsInformes.xss | 12 ++--- WebLab/Informes/DerivacionLote.rpt | Bin 32768 -> 32768 bytes 5 files changed, 61 insertions(+), 13 deletions(-) diff --git a/Business/Data/Laboratorio/LoteDerivacion.cs b/Business/Data/Laboratorio/LoteDerivacion.cs index 69c4d2c..939a893 100644 --- a/Business/Data/Laboratorio/LoteDerivacion.cs +++ b/Business/Data/Laboratorio/LoteDerivacion.cs @@ -96,6 +96,9 @@ public string Observacion { public static string derivacionPDF(int idLote) { + + //agregar el tipo de muestra para NO PACIENTES idMuestra de LAB_Muestra con el idmuestra de protocolo + string m_strSQL = @"SELECT numero, convert(varchar(10), fecha,103) as fecha, dni, determinacion, apellido + ' '+ nombre as paciente, efectorderivacion, fechaNacimiento as edad, unidadEdad, sexo, solicitante as especialista, idLote , @@ -103,8 +106,9 @@ CASE WHEN(len(idLote) < 9) THEN '00000' + CONVERT(VARCHAR, idLote) ELSE CONVERT(VARCHAR, idLote ) END as idLoteString , - idTipoServicio - FROM vta_LAB_Derivaciones WHERE idLote= "+ idLote + " ORDER BY efectorDerivacion,numero "; + idTipoServicio , + TipoProducto + FROM vta_LAB_Derivaciones WHERE idLote= " + idLote + " ORDER BY efectorDerivacion,numero "; return m_strSQL; } diff --git a/WebLab/App_Data/dsInformes.Designer.cs b/WebLab/App_Data/dsInformes.Designer.cs index 726b187..e33dba7 100644 --- a/WebLab/App_Data/dsInformes.Designer.cs +++ b/WebLab/App_Data/dsInformes.Designer.cs @@ -1537,6 +1537,8 @@ public partial class protocoloDataTable : global::System.Data.TypedTableBase diff --git a/WebLab/App_Data/dsInformes.xsd b/WebLab/App_Data/dsInformes.xsd index 8794fa2..9526790 100644 --- a/WebLab/App_Data/dsInformes.xsd +++ b/WebLab/App_Data/dsInformes.xsd @@ -74,6 +74,7 @@ + @@ -226,7 +227,7 @@ - + @@ -240,7 +241,7 @@ - + @@ -423,7 +424,7 @@ - + diff --git a/WebLab/App_Data/dsInformes.xss b/WebLab/App_Data/dsInformes.xss index e353c27..ba3c7af 100644 --- a/WebLab/App_Data/dsInformes.xss +++ b/WebLab/App_Data/dsInformes.xss @@ -8,15 +8,15 @@ - - + + - - - - + + + + \ No newline at end of file diff --git a/WebLab/Informes/DerivacionLote.rpt b/WebLab/Informes/DerivacionLote.rpt index db6795f8bb49d4204570a32d54309f66092d59aa..955144e498bab2d3ffc64f8bb7c012d10ca670b9 100644 GIT binary patch delta 9108 zcmV;FBWv7%fC7Mk0h706+i$000000000006+i$01yHsQ-ea2VhOK*#sL5U0B63};IpF&-Zy{kbOvPn<7qKL4&NEd(b+u7>;14e})1e;9) z>-+1T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WM+v*+@zWEdd{5)KbFcl@ds2QR?K=@r-{Ft zzfV_@PUgqJY&O8)_=}@qPLeLdi5by`Um9+^*M6@%g!0iJq$PGw7u@%eQ)0CV zAL!2_dirYbVx5L75`BY>9Nq%r+n#eZq*Yw8mvd|c%|a%+sRB1}z6h`z zI8iq;;OflDk}^5Kvq6n`>bwwBTli@GWbJ>>Smy|<)o&J~nXIYiMZmsca|oN!I_g=! z?n5CCL6&TQ-(Ov6G|oU8DIA`3&&}~BTIDZS|0L7-l=db>+ zN%n%5BcC(7jNP8GXbkUdmTXfZF#smYcg}@S!C`jpMT{-bJXWQ9d1ow1G2RQ z^Me+!Sxz8^!^aaV{-K)|=C8fu< zLmVF_@-!)^b`)3)Ebmca*MW!@I_sW>yF2c;mLYeX%H!Zcbpu=1e_e;nW!~jE^4GI9 z!F=-g@;@)-AtvxK`ps47EKeHZ;z_xvA-^T+z#?->5K+!m^;%wyh>;T~?(CXCvtc-U n0g^gw4xkaGpKd?g0RsR406-O!dIWv}g_HR@{{d^W`8x+h=X9S? From bf95f80d519583475d8ef932a979289122d47aa2 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Tue, 21 Oct 2025 10:57:07 -0300 Subject: [PATCH 49/61] fix: a camelCase --- WebLab/Informes/Auditoria.aspx | 4 ++-- WebLab/Informes/Auditoria.aspx.cs | 7 ++++--- WebLab/Informes/Auditoria.aspx.designer.cs | 6 +++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/WebLab/Informes/Auditoria.aspx b/WebLab/Informes/Auditoria.aspx index 0e480ae..1883a3f 100644 --- a/WebLab/Informes/Auditoria.aspx +++ b/WebLab/Informes/Auditoria.aspx @@ -159,9 +159,9 @@
    - + + ControlToValidate="txtLote" ErrorMessage="*" ValidationGroup="0">  
    Efector Origen: - + Efector Destino:
    @@ -136,11 +136,14 @@ - + + + + + CommandName='<%# Eval("idEfectorOrigen") %>'> @@ -149,7 +152,7 @@ + CommandName='<%# Eval("idEfectorOrigen") %>'> diff --git a/WebLab/Derivaciones/LoteList.aspx.cs b/WebLab/Derivaciones/LoteList.aspx.cs index 303f470..9a5e0ae 100644 --- a/WebLab/Derivaciones/LoteList.aspx.cs +++ b/WebLab/Derivaciones/LoteList.aspx.cs @@ -164,7 +164,7 @@ INNER JOIN LAB_LoteDerivacion l (nolock) on l.idEfectorDestino = E.idEfector else return consulta + " and L.idEfectorOrigen= " + efectorOrigen + " ORDER BY E.nombre"; } - + private void CargarFiltros() { @@ -256,18 +256,20 @@ private DataTable GenerarGrilla() if (ddlEstado.SelectedValue != "0") str_condicion += " AND L.estado = " + ddlEstado.SelectedValue; - string str_sql = @"select idLoteDerivacion as numero, fechaRegistro, efOrigen.nombre as efectorOrigen, efOrigen.idEfector as idEfectorOrigen, - efDestino.nombre as efectorDestino, E.nombre AS estado, isnull(U.apellido, 'Automatico') as username - from LAB_LoteDerivacion L (nolock) - INNER JOIN LAB_LoteDerivacionEstado E(nolock) ON E.idEstado = L.estado - INNER JOIN Sys_Efector efOrigen (nolock) ON efOrigen.idEfector = L.idEfectorOrigen - INNER JOIN Sys_Efector efDestino (nolock) ON efDestino.idEfector = L.idEfectorDestino - INNER JOIN Sys_Usuario U (nolock) ON U.idUsuario = L.idUsuarioRegistro - where " + str_condicion; + DataSet Ds = new DataSet(); SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; - SqlDataAdapter adapter = new SqlDataAdapter(); - adapter.SelectCommand = new SqlCommand(str_sql, conn); + SqlDataAdapter adapter; + SqlCommand cmd = new SqlCommand(); + + cmd.CommandType = CommandType.StoredProcedure; + cmd.CommandText = "[LAB_ListaLotes]"; + cmd.Parameters.Add("@FiltroBusqueda", SqlDbType.NVarChar); + cmd.Parameters["@FiltroBusqueda"].Value = str_condicion; + cmd.Connection = conn; + + + adapter = new SqlDataAdapter(cmd); adapter.Fill(Ds); CantidadRegistros.Text = Ds.Tables[0].Rows.Count.ToString() + " registros encontrados"; @@ -350,7 +352,7 @@ inner join LAB_LoteDerivacion L with (nolock) on L.idLoteDerivacion= A.idLote //tengo que cargar la configuracion del efector Origen int efectorOrigen = Convert.ToInt32(((LinkButton)sender).CommandName); Efector ef = new Efector(); - ef = (Efector) ef.Get(typeof(Efector), "IdEfector", efectorOrigen); + ef = (Efector)ef.Get(typeof(Efector), "IdEfector", efectorOrigen); oC = new Configuracion(); oC = (Configuracion)oC.Get(typeof(Configuracion), "IdEfector", ef); } @@ -450,17 +452,20 @@ protected void lnkExcel_Click(object sender, EventArgs e) { if (gvLista.Rows.Count != 0) { - DataTable tabla = ViewState["Datos"] as DataTable; - + DataTable tabla = ViewState["Datos"] as DataTable; + if (tabla.Rows.Count > 0) { tabla.Columns.Remove("idEfectorOrigen"); tabla.Columns["numero"].ColumnName = "Nro."; - tabla.Columns["fechaRegistro"].ColumnName = "Fecha Generación"; + tabla.Columns["fechaRegistro"].ColumnName = "Fecha"; tabla.Columns["efectorOrigen"].ColumnName = "Efector Origen"; tabla.Columns["efectorDestino"].ColumnName = "Efector Destino"; tabla.Columns["estado"].ColumnName = "Estado"; - tabla.Columns["username"].ColumnName = "Usuario Generación"; + tabla.Columns["username"].ColumnName = "Usuario Gen."; + tabla.Columns["fechaGeneracion"].ColumnName = "Fecha Gen."; + tabla.Columns["fechaIngreso"].ColumnName = "Fecha Ing."; + tabla.Columns["fechaEnvio"].ColumnName = "Fecha Envio"; StringBuilder sb = new StringBuilder(); StringWriter sw = new StringWriter(sb); From e21d9606e045aafbb628bd283f1098f87fdd7ce7 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Thu, 16 Oct 2025 12:30:36 -0300 Subject: [PATCH 52/61] =?UTF-8?q?feature:=20Parte=20del=20Requerimiento=20?= =?UTF-8?q?4:=20Recepci=C3=B3n=20de=20derivaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs index b4d7f3a..8dd0a08 100644 --- a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs +++ b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs @@ -1604,6 +1604,11 @@ protected void btnCancelar_Click(object sender, EventArgs e) case "AltaDerivacionMultiEfectorLote": Response.Redirect("DerivacionMultiEfectorLote.aspx?idEfectorSolicitante=" + Request["idEfectorSolicitante"].ToString() + "&idServicio=1&idLote=" + Request["idLote"]); break; } } + } + + + + } @@ -2044,11 +2049,6 @@ private void MarcarTodasAreas(bool p) } - protected void btnArchivos_Click(object sender, EventArgs e) - { - Response.Redirect("ProtocoloAdjuntar.aspx?idProtocolo=" + Request["idProtocolo"].ToString() +"&desde=protocolo"); - } - private void CargarProtocoloDerivadoLote() { string numeroProtocolo = Request["numeroProtocolo"].ToString(); @@ -2148,5 +2148,10 @@ private void VerificacionEstadoLote(Protocolo oRegistro) } } } + protected void btnArchivos_Click(object sender, EventArgs e) + { + Response.Redirect("ProtocoloAdjuntar.aspx?idProtocolo=" + Request["idProtocolo"].ToString() +"&desde=protocolo"); + } + } } From 1b03d2a54763f9c4a13d12497cce8f9af089eb7c Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Fri, 17 Oct 2025 12:28:59 -0300 Subject: [PATCH 53/61] feature: Requerimiento 3: Adaptar PDF --- WebLab/App_Data/dsInformes.xsd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WebLab/App_Data/dsInformes.xsd b/WebLab/App_Data/dsInformes.xsd index 9526790..eb3d642 100644 --- a/WebLab/App_Data/dsInformes.xsd +++ b/WebLab/App_Data/dsInformes.xsd @@ -227,7 +227,7 @@ - + @@ -241,7 +241,7 @@ - + @@ -424,7 +424,7 @@ - + From b3dcb39e78aac448c88c3eee25cc3e9f5983c527 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Thu, 16 Oct 2025 12:30:36 -0300 Subject: [PATCH 54/61] =?UTF-8?q?feature:=20Parte=20del=20Requerimiento=20?= =?UTF-8?q?4:=20Recepci=C3=B3n=20de=20derivaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Protocolos/ProtocoloProductoEdit.aspx.cs | 127 ++++++++++++++++++ 1 file changed, 127 insertions(+) diff --git a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs index 8dd0a08..f923524 100644 --- a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs +++ b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs @@ -2152,6 +2152,133 @@ protected void btnArchivos_Click(object sender, EventArgs e) { Response.Redirect("ProtocoloAdjuntar.aspx?idProtocolo=" + Request["idProtocolo"].ToString() +"&desde=protocolo"); } + + private void CargarProtocoloDerivadoLote() + { + string numeroProtocolo = Request["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", int.Parse(numeroProtocolo)); + if (oRegistro != null) + { + lblTitulo.Visible = false; + lblServicio1.Visible = true; + lblServicio.Visible = true; + txtFecha.Value = DateTime.Now.ToShortDateString(); + txtFechaOrden.Value = oRegistro.FechaOrden.ToShortDateString(); + txtCodigoMuestra.Text = ""; + txtDescripcionProducto.Text = oRegistro.DescripcionProducto; + ddlConservacion.SelectedValue = oRegistro.IdConservacion.ToString(); + txtNumeroOrigen.Text = oRegistro.Numero.ToString(); + ddlEfector.SelectedValue = oRegistro.IdEfector.IdEfector.ToString(); + ddlSectorServicio.SelectedValue = oRegistro.IdSector.IdSectorServicio.ToString(); + txtObservacion.Text = oRegistro.Observacion; + pnlNavegacion.Visible = false; + btnCancelar.Text = "Cancelar"; + btnCancelar.Width = Unit.Pixel(80); + ddlMuestra.SelectedValue = oRegistro.IdMuestra.ToString(); + Muestra oMuestra = new Muestra(); + oMuestra = (Muestra)oMuestra.Get(typeof(Muestra), "IdMuestra", oRegistro.IdMuestra, "Baja", false); + txtCodigoMuestra.Text = oMuestra.Codigo; + + + #region CargaDeterminaciones + ////// ---------------------->Buscar las derivaciones que no han sido ingresadas + //el protocolo me da los protocolos detalles + //los protocolos detalles me dan las derivaciones + //la derivacion debe estar enviada + //la derivacion debe tener el mismo lote que el ingresado (no todos los analisis pueden haber sido enviados con el mismo lote) + + string m_strSQL = + //select distinct STRING_AGG(Det.idItem ,' | ') as Item ---> (No esta disponible en SQL 2014) + @" SELECT STUFF(( SELECT ' | ' + CAST(Det.idItem AS VARCHAR(20)) + from LAB_Derivacion D + inner join LAB_DetalleProtocolo as Det on Det.idDetalleProtocolo = D.idDetalleProtocolo + inner join LAB_Protocolo as P on P.idProtocolo = det.idProtocolo + inner join LAB_DerivacionEstado as LE on LE.idEstado = D.estado + inner join LAB_LoteDerivacion L on L.idLoteDerivacion = D.idLote + where P.baja = 0 + and D.estado in (1) ---------------------- Buscar las derivaciones que no han sido ingresadas + and L.idLoteDerivacion = " + Request["idLote"].ToString() + " and p.numero = " + numeroProtocolo + + " FOR XML PATH(''), TYPE ).value('.', 'NVARCHAR(MAX)'), 1, 3, '') AS Item; "; + + DataSet Ds = new DataSet(); + SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; + SqlDataAdapter adapter = new SqlDataAdapter(); + adapter.SelectCommand = new SqlCommand(m_strSQL, conn); + adapter.Fill(Ds); + + string analisis = Convert.ToString(Ds.Tables[0].Rows[0][0]); + CargarDeterminacionesDerivacion(analisis); + #endregion + } + } + + private void VerificacionEstadoLote(Protocolo oRegistro) + { + + if (Request["idLote"] != null) //Si no tiene Lote, no actualiza estado de Lote + { + int idLote = Convert.ToInt32(Request["idLote"]); + try + { + if (idLote != 0) + { + LoteDerivacion lote = new LoteDerivacion(); + lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); + + + if (lote.Estado == 4) //Pasa de Recibido a Ingresado + { + lote.Estado = 5; + lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); + } + + //Graba el ingreso del protocolo en el lote + lote.GrabarAuditoriaLoteDerivacion("Ingresa protocolo", oUser.IdUsuario, "Número Protocolo", oRegistro.Numero.ToString(), Request["numeroProtocolo"]); + + //Si al generar este nuevo protocolo se finalizo la carga del lote, cambiar estado a Completado + if (!lote.HayDerivacionesPendientes()) + { + lote.Estado = 6; //Pasa a Completado si no tiene más derivaciones pendientes + lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); + } + + lote.Save(); + } + } + catch (Exception) + { + } + } + } + private void ActualizarEstadoDerivacion(Protocolo oRegistro) + { + SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; + int idLote = Convert.ToInt32(Request["idLote"]); + + string query = + @"update LAB_Derivacion + set estado=3---recibido + ,idProtocoloDerivacion=" + oRegistro.IdProtocolo.ToString() + @" + from LAB_Derivacion D + inner join LAB_DetalleProtocolo Det on Det.idDetalleProtocolo= d.idDetalleProtocolo + inner join LAB_Protocolo P on P.idProtocolo= Det.idProtocolo + where P.numero=" + Request["numeroProtocolo"].ToString() + @" and idLote=" + idLote; + + 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 + Business.Data.Laboratorio.Protocolo oPOrigen = new Business.Data.Laboratorio.Protocolo(); + oPOrigen = (Business.Data.Laboratorio.Protocolo)oPOrigen.Get(typeof(Business.Data.Laboratorio.Protocolo), "Numero", int.Parse(Request["numeroProtocolo"].ToString())); + if (oPOrigen != null) + { + oPOrigen.GrabarAuditoriaDetalleProtocolo("Recepcion Derivacion", oUser.IdUsuario, "Lote " + idLote, "Protocolo " + oRegistro.Numero.ToString()); + } + + } + } } From caa0261c9a9071ec7af1bcea27bb740abf5eebc7 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Thu, 16 Oct 2025 16:00:21 -0300 Subject: [PATCH 55/61] =?UTF-8?q?feature;=20en=20proceso=20Requerimiento?= =?UTF-8?q?=204:=20Recepci=C3=B3n=20de=20derivaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs index f923524..7f92918 100644 --- a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs +++ b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs @@ -2176,9 +2176,7 @@ private void CargarProtocoloDerivadoLote() btnCancelar.Text = "Cancelar"; btnCancelar.Width = Unit.Pixel(80); ddlMuestra.SelectedValue = oRegistro.IdMuestra.ToString(); - Muestra oMuestra = new Muestra(); - oMuestra = (Muestra)oMuestra.Get(typeof(Muestra), "IdMuestra", oRegistro.IdMuestra, "Baja", false); - txtCodigoMuestra.Text = oMuestra.Codigo; + #region CargaDeterminaciones From 936cdae15cf60677031aefaef7861eecd229c3d7 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Tue, 21 Oct 2025 09:31:17 -0300 Subject: [PATCH 56/61] feature: se modifica el encabezado de la Derivacion para contemplar los casos de Muestras de No Pacientes --- WebLab/App_Data/dsInformes.xsd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WebLab/App_Data/dsInformes.xsd b/WebLab/App_Data/dsInformes.xsd index eb3d642..9526790 100644 --- a/WebLab/App_Data/dsInformes.xsd +++ b/WebLab/App_Data/dsInformes.xsd @@ -227,7 +227,7 @@ - + @@ -241,7 +241,7 @@ - + @@ -424,7 +424,7 @@ - + From 3e35a374744aa538af1f348d260776ffe04a7e6d Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Tue, 21 Oct 2025 11:00:55 -0300 Subject: [PATCH 57/61] fix: se pasa el metodo ActualizaEstadoLote a LoteDerivacion --- .../Protocolos/ProtocoloProductoEdit.aspx.cs | 50 +++++-------------- 1 file changed, 12 insertions(+), 38 deletions(-) diff --git a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs index 7f92918..fb09ee0 100644 --- a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs +++ b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs @@ -2211,44 +2211,7 @@ and D.estado in (1) ---------------------- Buscar las derivaciones que no han si } } - private void VerificacionEstadoLote(Protocolo oRegistro) - { - - if (Request["idLote"] != null) //Si no tiene Lote, no actualiza estado de Lote - { - int idLote = Convert.ToInt32(Request["idLote"]); - try - { - if (idLote != 0) - { - LoteDerivacion lote = new LoteDerivacion(); - lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); - - - if (lote.Estado == 4) //Pasa de Recibido a Ingresado - { - lote.Estado = 5; - lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); - } - - //Graba el ingreso del protocolo en el lote - lote.GrabarAuditoriaLoteDerivacion("Ingresa protocolo", oUser.IdUsuario, "Número Protocolo", oRegistro.Numero.ToString(), Request["numeroProtocolo"]); - - //Si al generar este nuevo protocolo se finalizo la carga del lote, cambiar estado a Completado - if (!lote.HayDerivacionesPendientes()) - { - lote.Estado = 6; //Pasa a Completado si no tiene más derivaciones pendientes - lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); - } - - lote.Save(); - } - } - catch (Exception) - { - } - } - } + private void ActualizarEstadoDerivacion(Protocolo oRegistro) { SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; @@ -2277,6 +2240,17 @@ from LAB_Derivacion D } + private void VerificacionEstadoLote(Protocolo oRegistro) + { + if (Request["idLote"] != null) //Si no tiene Lote, no actualiza estado de Lote + { + int idLote = Convert.ToInt32(Request["idLote"]); + LoteDerivacion lote = new LoteDerivacion(); + lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); + lote.ActualizaEstadoLote(oUser.IdUsuario, oRegistro.Numero.ToString(), Request["numeroProtocolo"]); + // ActualizaEstadoLote(idLote, oRegistro); + } + } } } From 76af59cb62ba892c7c0fbaafa95b83ec108ce01c Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Wed, 22 Oct 2025 12:09:27 -0300 Subject: [PATCH 58/61] fix: correciones luego de testeo --- WebLab/Derivaciones/InformeLote.aspx.cs | 24 +++++++++--------------- WebLab/Derivaciones/LoteList.aspx.cs | 4 +++- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/WebLab/Derivaciones/InformeLote.aspx.cs b/WebLab/Derivaciones/InformeLote.aspx.cs index 761383f..df5378a 100644 --- a/WebLab/Derivaciones/InformeLote.aspx.cs +++ b/WebLab/Derivaciones/InformeLote.aspx.cs @@ -291,6 +291,8 @@ private void GenerarPDF(string idLote) string nombrePDF = oUtil.CompletarNombrePDF("Derivaciones"+idLote); oCr.ReportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, true, nombrePDF); } + else + ScriptManager.RegisterStartupScript(this, GetType(), "mensajeOk", "alert('No se encontraron datos para el numero de lote ingresado');", true); } @@ -318,9 +320,9 @@ protected void btnGuardar_Click(object sender, EventArgs e) } else { //Es el idLote con error - ScriptManager.RegisterStartupScript(this, GetType(), "mensajeOk", "alert('❌ ERROR: El lote Nro:"+idLote+" no se puede derivar, no tiene determinaciones asociadas.\\nDescarte el lote por falta de determinaciones o modifique el lote agregando determinaciones');", true); + ScriptManager.RegisterStartupScript(this, GetType(), "mensajeError", "alert('No se puede derivar lote N° " + idLote + " no tiene determinaciones.\\nAgregue determinaciones o descarte el lote.');", true); } - + } else { @@ -341,19 +343,12 @@ private int verificarDeterminaciones() if (a.Checked) { int idLote = Convert.ToInt32(row.Cells[2].Text); - string consultaSql = @"select top 1 1 from LAB_LoteDerivacion L with (nolock) - inner join LAB_Derivacion D with (nolock) ON D.idLote = L.idLoteDerivacion - where idLote =" + idLote; - DataTable dt = GetData(consultaSql); - if(dt.Rows.Count == 0) + DataTable dt = GetData("select top 1 1 from vta_LAB_Derivaciones where idLote =" + idLote); + if(dt.Rows.Count == 0) return idLote; - } - } - } - return tieneDeterminaciones; } @@ -372,7 +367,6 @@ private bool Guardar() int idUsuario = oUser.IdUsuario; int estadoLote = Convert.ToInt32(ddlEstados.SelectedValue); string resultadoDerivacion = estadoLote == 2 ? "Derivado: " + row.Cells[3].Text : "No Derivado. "; - //string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? rb_transportista.SelectedValue : ""); //Vanesa: Cambio el radio button por un dropdownlist (asociado a tarea LAB-52) string observacion = txtObservacion.Text + " " + (estadoLote == 1 ? ddlTransporte.SelectedValue : ""); LoteDerivacion lote = new LoteDerivacion(); lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); @@ -380,9 +374,9 @@ private bool Guardar() //Se cambia el estado del lote LAB_LoteDerivacion lote.Estado = estadoLote; lote.Observacion = observacion; - lote.IdUsuarioEnvio = idUsuario; - //para Estado "Derivado" poner la fecha actual y para estado "Cancelado" no poner Fecha - string fecha_hora = txtFecha.Text + " " + txtHora.Text; + lote.IdUsuarioEnvio = (estadoLote == 2) ? idUsuario : 0; + //para Estado "Derivado" poner la fecha actual y para estado "Cancelado" no poner Fecha + string fecha_hora = txtFecha.Text + " " + txtHora.Text; lote.FechaEnvio = (estadoLote == 2) ? Convert.ToDateTime(fecha_hora) : DateTime.Parse("01/01/1900"); lote.Save(); diff --git a/WebLab/Derivaciones/LoteList.aspx.cs b/WebLab/Derivaciones/LoteList.aspx.cs index 9a5e0ae..3f06378 100644 --- a/WebLab/Derivaciones/LoteList.aspx.cs +++ b/WebLab/Derivaciones/LoteList.aspx.cs @@ -440,8 +440,10 @@ protected void lnkPDFImprimir_Command(object sender, CommandEventArgs e) oCr.ReportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, true, nombrePDF); } else - Response.Redirect("../FinSesion.aspx", false); + ScriptManager.RegisterStartupScript(this, GetType(), "mensajeOk", "alert('No se encontraron datos para el numero de lote ingresado');", true); + } + else Response.Redirect("../FinSesion.aspx", false); } protected void lnkExcel_Click(object sender, EventArgs e) From 6f19d5b6aa05578e3ae9ab43b17bf63fb015be2d Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Fri, 24 Oct 2025 14:23:16 -0300 Subject: [PATCH 59/61] fix: correcion de PR --- Business/Data/Laboratorio/Derivacion.cs | 54 ++++++- .../DerivacionMultiEfectorLote.aspx.cs | 6 +- WebLab/Protocolos/ProtocoloEdit2.aspx.cs | 143 ++++-------------- WebLab/Protocolos/ProtocoloMensaje.aspx | 5 - WebLab/Protocolos/ProtocoloMensaje.aspx.cs | 25 ++- .../ProtocoloMensaje.aspx.designer.cs | 9 -- .../Protocolos/ProtocoloProductoEdit.aspx.cs | 85 +++-------- 7 files changed, 113 insertions(+), 214 deletions(-) diff --git a/Business/Data/Laboratorio/Derivacion.cs b/Business/Data/Laboratorio/Derivacion.cs index 329480d..3eebb65 100644 --- a/Business/Data/Laboratorio/Derivacion.cs +++ b/Business/Data/Laboratorio/Derivacion.cs @@ -4,6 +4,8 @@ insert license info here using System; using System.Collections; using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; using NHibernate; namespace Business.Data.Laboratorio @@ -280,6 +282,56 @@ public static List DerivacionesByLote(int idLote) { 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) + { + ////// ---------------------->Buscar las derivaciones que no han sido ingresadas + //los protocolos detalles me dan las derivaciones + //la derivacion debe estar enviada + //la derivacion debe tener el mismo lote que el ingresado (no todos los analisis pueden haber sido enviados con el mismo lote) + + string m_strSQL = + //select distinct STRING_AGG(Det.idItem ,' | ') as Item ---> (No esta disponible en SQL 2014) + @" SELECT STUFF(( SELECT ' | ' + CAST(Det.idItem AS VARCHAR(20)) + from LAB_Derivacion D + inner join LAB_DetalleProtocolo as Det on Det.idDetalleProtocolo = D.idDetalleProtocolo + where + D.estado in (1) ---------------------- Buscar las derivaciones que no han sido ingresadas + and D.idLote = " + idLoteDerivacion + @" + and Det.idprotocolo = " + idProtocolo + + " FOR XML PATH(''), TYPE ).value('.', 'NVARCHAR(MAX)'), 1, 3, '') AS Item; "; + + DataSet Ds = new DataSet(); + SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; + SqlDataAdapter adapter = new SqlDataAdapter + { + SelectCommand = new SqlCommand(m_strSQL, conn) + }; + adapter.Fill(Ds); + return Convert.ToString(Ds.Tables[0].Rows[0][0]); + } } } diff --git a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.cs b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.cs index 36d6d50..6ff7151 100644 --- a/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.cs +++ b/WebLab/Protocolos/DerivacionMultiEfectorLote.aspx.cs @@ -320,13 +320,12 @@ private void GenerarNuevoProtocolo(int idProtocoloOrigen, int idPaciente) p = (Protocolo)p.Get(typeof(Protocolo), idProtocoloOrigen); s_idServicio = p.IdTipoServicio.IdTipoServicio.ToString(); - m_numero = p.Numero.ToString(); idLote = txtNumeroLote.Text; if(idPaciente > 0) { Response.Redirect("ProtocoloEdit2.aspx?idEfectorSolicitante=" + p.IdEfector.IdEfector + - "&numeroProtocolo=" + m_numero + + "&idProtocolo=" + idProtocoloOrigen + "&idServicio=" + s_idServicio + "&idLote=" + idLote + "&idPaciente=" + idPaciente + @@ -336,12 +335,11 @@ private void GenerarNuevoProtocolo(int idProtocoloOrigen, int idPaciente) { //Es Muestra No Pacientes Response.Redirect("ProtocoloProductoEdit.aspx?idEfectorSolicitante=" + p.IdEfector.IdEfector + - "&numeroProtocolo=" + m_numero + + "&idProtocolo=" + idProtocoloOrigen + "&idServicio=" + s_idServicio + "&idLote=" + idLote + "&Desde=AltaDerivacionMultiEfectorLote" + "&Operacion=AltaDerivacionMultiEfectorLote" , false); - //idprotocolo } } diff --git a/WebLab/Protocolos/ProtocoloEdit2.aspx.cs b/WebLab/Protocolos/ProtocoloEdit2.aspx.cs index d756620..65b1129 100644 --- a/WebLab/Protocolos/ProtocoloEdit2.aspx.cs +++ b/WebLab/Protocolos/ProtocoloEdit2.aspx.cs @@ -249,10 +249,11 @@ protected void Page_Load(object sender, EventArgs e) } if (Request["Operacion"].ToString() == "AltaDerivacionMultiEfector" ) { - - string numeroProtocolo= Request["numeroProtocolo"].ToString(); - string analisis= Request["analisis"].ToString(); - CargarProtocoloDerivado(numeroProtocolo, analisis); + 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); + string analisis = Request["analisis"].ToString(); + CargarProtocoloDerivado(oRegistro, analisis); } if (Request["Operacion"].ToString() == "AltaDerivacionMultiEfectorLote") { @@ -471,16 +472,12 @@ private void CargarDiagnosticoFicha(string Tipo_ficha) } - private void CargarProtocoloDerivado(string numeroProtocolo, string analisis) + private void CargarProtocoloDerivado(Protocolo oRegistro, string analisis) { - Utility oUtil = new Utility(); //Actualiza los datos de los objetos : alta o modificacion . - - Business.Data.Laboratorio.Protocolo oRegistro = new Business.Data.Laboratorio.Protocolo(); - oRegistro = (Business.Data.Laboratorio.Protocolo)oRegistro.Get(typeof(Business.Data.Laboratorio.Protocolo), "Numero", int.Parse(numeroProtocolo)); //oRegistro.GrabarAuditoriaProtocolo("Consulta", int.Parse(Session["idUsuario"].ToString())); - if (oRegistro != null) + if (oRegistro != null && !oRegistro.Baja) { hplActualizarPaciente.Visible = false; hplModificarPaciente.Visible = false; @@ -1829,11 +1826,13 @@ protected void btnGuardar_Click(object sender, EventArgs e) else { //if (Request["Operacion"].ToString() == "AltaDerivacion") - if (Request["Operacion"].ToString() == "AltaDerivacionMultiEfector" || - Request["Operacion"].ToString() == "AltaDerivacionMultiEfectorLote") + if (Request["Operacion"].ToString() == "AltaDerivacionMultiEfector" || Request["Operacion"].ToString() == "AltaDerivacionMultiEfectorLote") { - ActualizarEstadoDerivacion(oRegistro); - VerificacionEstadoLote(oRegistro); + Business.Data.Laboratorio.Protocolo oRegistroAnterior = new Business.Data.Laboratorio.Protocolo(); + oRegistroAnterior = (Business.Data.Laboratorio.Protocolo)oRegistroAnterior.Get(typeof(Protocolo), int.Parse(Request["idProtocolo"].ToString())); + ActualizarEstadoDerivacion(oRegistro, oRegistroAnterior); + VerificacionEstadoLote(oRegistro, oRegistroAnterior); + if(Request["Operacion"].ToString() == "AltaDerivacionMultiEfector") Response.Redirect("DerivacionMultiEfector.aspx?idEfectorSolicitante=" + Request["idEfectorSolicitante"].ToString() + "&idServicio=" + Session["idServicio"].ToString()); else @@ -1884,40 +1883,10 @@ protected void btnGuardar_Click(object sender, EventArgs e) } - private void ActualizarEstadoDerivacion(Protocolo oRegistro) + private void ActualizarEstadoDerivacion(Protocolo oRegistro, Protocolo oRegistroAnterior) { - SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; - int idLote = 0; - if (Request["idLote"] != null) //Si es nulo es un protocolo anterior a la gestion por lotes - idLote = Convert.ToInt32(Request["idLote"]); - - string query = - @"update LAB_Derivacion - set estado=3---recibido - ,idProtocoloDerivacion="+oRegistro.IdProtocolo.ToString()+@" - from LAB_Derivacion D - inner join LAB_DetalleProtocolo Det on Det.idDetalleProtocolo= d.idDetalleProtocolo - inner join LAB_Protocolo P on P.idProtocolo= Det.idProtocolo - where P.numero=" + Request["numeroProtocolo"].ToString() + @" and idLote=" + idLote; - - SqlCommand cmd = new SqlCommand(query, conn); - - ///grabar auditoria de - - int idRealizado = Convert.ToInt32(cmd.ExecuteScalar()); - - //Se indica en el protocolo de Origen que fue recibido en el destino - Business.Data.Laboratorio.Protocolo oPOrigen = new Business.Data.Laboratorio.Protocolo(); - oPOrigen = (Business.Data.Laboratorio.Protocolo)oPOrigen.Get(typeof(Business.Data.Laboratorio.Protocolo), "Numero", int.Parse(Request["numeroProtocolo"].ToString())); - if (oPOrigen != null) - { - if(idLote != 0 ) - oPOrigen.GrabarAuditoriaDetalleProtocolo("Recepcion Derivacion", oUser.IdUsuario, "Lote " +idLote , "Protocolo "+ oRegistro.Numero.ToString()); - else - oPOrigen.GrabarAuditoriaDetalleProtocolo("Recepcion Derivacion", oUser.IdUsuario, "Protocolo", oRegistro.Numero.ToString()); - } - - + Business.Data.Laboratorio.Derivacion oDerivacion = new Business.Data.Laboratorio.Derivacion(); + oDerivacion.MarcarComoRecibidas(oRegistroAnterior,oRegistro, oUser, Convert.ToInt32(Request["idLote"])); } private string getListaAreasCodigoBarras() @@ -5007,42 +4976,7 @@ private void GenerarResultadoSISA(DetalleProtocolo oDetalle, string idPruebaSISA } - //private void ActualizaEstadoLote(int idLote, Protocolo oRegistro) //SE PISO CON EL PR MantenimientoVarios (#15) - //{ - // try - // { - // if (idLote != 0) - // { - // LoteDerivacion lote = new LoteDerivacion(); - // lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); - - - // if (lote.Estado == 4) //Pasa de Recibido a Ingresado - // { - // lote.Estado = 5; - // lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); - // lote.FechaIngreso = DateTime.Now; - // } - - // //Graba el ingreso del protocolo en el lote - // lote.GrabarAuditoriaLoteDerivacion("Ingresa protocolo", oUser.IdUsuario, "Número Protocolo", oRegistro.Numero.ToString(), Request["numeroProtocolo"]); - - // //Si al generar este nuevo protocolo se finalizo la carga del lote, cambiar estado a Completado - // if (!lote.HayDerivacionesPendientes()) - // { - // lote.Estado = 6; //Pasa a Completado si no tiene más derivaciones pendientes - // lote.GrabarAuditoriaLoteDerivacion(lote.descripcionEstadoLote(), oUser.IdUsuario); - // } - - // lote.Save(); - // } - // } - // catch (Exception) - // { - // } - //} - - private void VerificacionEstadoLote(Protocolo oRegistro) + private void VerificacionEstadoLote(Protocolo oRegistro, Protocolo oRegistroAnterior) { if (Request["idLote"] != null) //Si no tiene Lote, no actualiza estado de Lote @@ -5050,49 +4984,24 @@ private void VerificacionEstadoLote(Protocolo oRegistro) int idLote = Convert.ToInt32(Request["idLote"]); LoteDerivacion lote = new LoteDerivacion(); lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); - lote.ActualizaEstadoLote(oUser.IdUsuario, oRegistro.Numero.ToString(), Request["numeroProtocolo"] ); - // ActualizaEstadoLote(idLote, oRegistro); + lote.ActualizaEstadoLote(oUser.IdUsuario, oRegistro.Numero.ToString(), oRegistroAnterior.Numero.ToString()); } } private void CargarProtocoloDerivadoLote() { - string numeroProtocolo = Request["numeroProtocolo"].ToString(); - int idLote = Convert.ToInt32(Request["idLote"]); - string analisis; - - ////// ---------------------->Buscar las derivaciones que no han sido ingresadas - //el protocolo me da los protocolos detalles - //los protocolos detalles me dan las derivaciones - //la derivacion debe estar enviada - //la derivacion debe tener el mismo lote que el ingresado (no todos los analisis pueden haber sido enviados con el mismo lote) - - string m_strSQL = - //select distinct STRING_AGG(Det.idItem ,' | ') as Item ---> (No esta disponible en SQL 2014) - @" SELECT STUFF(( SELECT ' | ' + CAST(Det.idItem AS VARCHAR(20)) - from LAB_Derivacion D - inner join LAB_DetalleProtocolo as Det on Det.idDetalleProtocolo = D.idDetalleProtocolo - inner join LAB_Protocolo as P on P.idProtocolo = det.idProtocolo - inner join LAB_DerivacionEstado as LE on LE.idEstado = D.estado - inner join LAB_LoteDerivacion L on L.idLoteDerivacion = D.idLote - where P.baja = 0 - and D.estado in (1) ---------------------- Buscar las derivaciones que no han sido ingresadas - and L.idLoteDerivacion = " + idLote + " and p.numero = " + numeroProtocolo + - " FOR XML PATH(''), TYPE ).value('.', 'NVARCHAR(MAX)'), 1, 3, '') AS Item; "; - - DataSet Ds = new DataSet(); - SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; - SqlDataAdapter adapter = new SqlDataAdapter + 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())); + if (oRegistro != null && !oRegistro.Baja) { - SelectCommand = new SqlCommand(m_strSQL, conn) - }; - adapter.Fill(Ds); - analisis = Convert.ToString(Ds.Tables[0].Rows[0][0]); - CargarProtocoloDerivado(numeroProtocolo, analisis); + Business.Data.Laboratorio.Derivacion oDerivacion = new Business.Data.Laboratorio.Derivacion(); + //Obtengo analisis + string analisis = oDerivacion.ObtenerItemsPendientes(Request["idLote"].ToString(), oRegistro.IdProtocolo.ToString()); + CargarProtocoloDerivado(oRegistro, analisis); + } } - } } diff --git a/WebLab/Protocolos/ProtocoloMensaje.aspx b/WebLab/Protocolos/ProtocoloMensaje.aspx index 99508a1..4a52b78 100644 --- a/WebLab/Protocolos/ProtocoloMensaje.aspx +++ b/WebLab/Protocolos/ProtocoloMensaje.aspx @@ -38,11 +38,6 @@
    - +
    -
    - - protected global::System.Web.UI.WebControls.Label lblDescripcion; - /// - /// lnkRegresar control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.LinkButton lnkRegresar; - /// /// lnkNuevo control. /// diff --git a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs index fb09ee0..7484b27 100644 --- a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs +++ b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs @@ -800,8 +800,10 @@ protected void btnGuardar_Click(object sender, EventArgs e) if (Request["Operacion"].ToString() == "AltaDerivacionMultiEfectorLote") { - ActualizarEstadoDerivacion(oRegistro); - VerificacionEstadoLote(oRegistro); + Business.Data.Laboratorio.Protocolo oRegistroAnterior = new Business.Data.Laboratorio.Protocolo(); + oRegistroAnterior = (Business.Data.Laboratorio.Protocolo) oRegistroAnterior.Get(typeof(Protocolo), int.Parse(Request["idProtocolo"].ToString())); + ActualizarEstadoDerivacion(oRegistro,oRegistroAnterior); + VerificacionEstadoLote(oRegistro, oRegistroAnterior); Response.Redirect("ProtocoloMensaje.aspx?id=" + oRegistro.IdProtocolo + "&idLote=" + Request["idLote"] + "&idEfectorSolicitante=" + Request["idEfectorSolicitante"], false); } } @@ -2155,9 +2157,9 @@ protected void btnArchivos_Click(object sender, EventArgs e) private void CargarProtocoloDerivadoLote() { - string numeroProtocolo = Request["numeroProtocolo"].ToString(); + string idProtocolo = Request["idProtocolo"].ToString(); Business.Data.Laboratorio.Protocolo oRegistro = new Business.Data.Laboratorio.Protocolo(); - oRegistro = (Business.Data.Laboratorio.Protocolo)oRegistro.Get(typeof(Business.Data.Laboratorio.Protocolo), "Numero", int.Parse(numeroProtocolo)); + oRegistro = (Business.Data.Laboratorio.Protocolo)oRegistro.Get(typeof(Business.Data.Laboratorio.Protocolo), int.Parse(idProtocolo)); if (oRegistro != null) { lblTitulo.Visible = false; @@ -2176,79 +2178,34 @@ private void CargarProtocoloDerivadoLote() btnCancelar.Text = "Cancelar"; btnCancelar.Width = Unit.Pixel(80); ddlMuestra.SelectedValue = oRegistro.IdMuestra.ToString(); - - - - #region CargaDeterminaciones - ////// ---------------------->Buscar las derivaciones que no han sido ingresadas - //el protocolo me da los protocolos detalles - //los protocolos detalles me dan las derivaciones - //la derivacion debe estar enviada - //la derivacion debe tener el mismo lote que el ingresado (no todos los analisis pueden haber sido enviados con el mismo lote) - - string m_strSQL = - //select distinct STRING_AGG(Det.idItem ,' | ') as Item ---> (No esta disponible en SQL 2014) - @" SELECT STUFF(( SELECT ' | ' + CAST(Det.idItem AS VARCHAR(20)) - from LAB_Derivacion D - inner join LAB_DetalleProtocolo as Det on Det.idDetalleProtocolo = D.idDetalleProtocolo - inner join LAB_Protocolo as P on P.idProtocolo = det.idProtocolo - inner join LAB_DerivacionEstado as LE on LE.idEstado = D.estado - inner join LAB_LoteDerivacion L on L.idLoteDerivacion = D.idLote - where P.baja = 0 - and D.estado in (1) ---------------------- Buscar las derivaciones que no han sido ingresadas - and L.idLoteDerivacion = " + Request["idLote"].ToString() + " and p.numero = " + numeroProtocolo + - " FOR XML PATH(''), TYPE ).value('.', 'NVARCHAR(MAX)'), 1, 3, '') AS Item; "; - - DataSet Ds = new DataSet(); - SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; - SqlDataAdapter adapter = new SqlDataAdapter(); - adapter.SelectCommand = new SqlCommand(m_strSQL, conn); - adapter.Fill(Ds); + - string analisis = Convert.ToString(Ds.Tables[0].Rows[0][0]); - CargarDeterminacionesDerivacion(analisis); - #endregion + if(!oRegistro.Baja) + { + Business.Data.Laboratorio.Derivacion oDerivacion = new Business.Data.Laboratorio.Derivacion(); + //Obtengo analisis + string analisis = oDerivacion.ObtenerItemsPendientes(Request["idLote"].ToString(), oRegistro.IdProtocolo.ToString()); + CargarDeterminacionesDerivacion(analisis); + } + } } - - - private void ActualizarEstadoDerivacion(Protocolo oRegistro) - { - SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; - int idLote = Convert.ToInt32(Request["idLote"]); - string query = - @"update LAB_Derivacion - set estado=3---recibido - ,idProtocoloDerivacion=" + oRegistro.IdProtocolo.ToString() + @" - from LAB_Derivacion D - inner join LAB_DetalleProtocolo Det on Det.idDetalleProtocolo= d.idDetalleProtocolo - inner join LAB_Protocolo P on P.idProtocolo= Det.idProtocolo - where P.numero=" + Request["numeroProtocolo"].ToString() + @" and idLote=" + idLote; - - 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 - Business.Data.Laboratorio.Protocolo oPOrigen = new Business.Data.Laboratorio.Protocolo(); - oPOrigen = (Business.Data.Laboratorio.Protocolo)oPOrigen.Get(typeof(Business.Data.Laboratorio.Protocolo), "Numero", int.Parse(Request["numeroProtocolo"].ToString())); - if (oPOrigen != null) - { - oPOrigen.GrabarAuditoriaDetalleProtocolo("Recepcion Derivacion", oUser.IdUsuario, "Lote " + idLote, "Protocolo " + oRegistro.Numero.ToString()); - } + 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"])); } - private void VerificacionEstadoLote(Protocolo oRegistro) + private void VerificacionEstadoLote(Protocolo oRegistro, Protocolo oAnterior) { if (Request["idLote"] != null) //Si no tiene Lote, no actualiza estado de Lote { int idLote = Convert.ToInt32(Request["idLote"]); LoteDerivacion lote = new LoteDerivacion(); lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); - lote.ActualizaEstadoLote(oUser.IdUsuario, oRegistro.Numero.ToString(), Request["numeroProtocolo"]); - // ActualizaEstadoLote(idLote, oRegistro); + lote.ActualizaEstadoLote(oUser.IdUsuario, oRegistro.Numero.ToString(), oAnterior.Numero.ToString()); } } } From 697787cd477f02606319c4fd4cdd02067832e2c5 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Mon, 3 Nov 2025 15:37:28 -0300 Subject: [PATCH 60/61] fix: de tarea LAB-181 --- WebLab/Derivaciones/InformeLote.aspx.cs | 37 ++++++++++++------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/WebLab/Derivaciones/InformeLote.aspx.cs b/WebLab/Derivaciones/InformeLote.aspx.cs index df5378a..ca82953 100644 --- a/WebLab/Derivaciones/InformeLote.aspx.cs +++ b/WebLab/Derivaciones/InformeLote.aspx.cs @@ -371,29 +371,26 @@ private bool Guardar() LoteDerivacion lote = new LoteDerivacion(); lote = (LoteDerivacion)lote.Get(typeof(LoteDerivacion), idLote); - //Se cambia el estado del lote LAB_LoteDerivacion - lote.Estado = estadoLote; - lote.Observacion = observacion; - lote.IdUsuarioEnvio = (estadoLote == 2) ? idUsuario : 0; + //Se cambia el estado del lote LAB_LoteDerivacion + lote.Estado = estadoLote; + lote.Observacion = observacion; + lote.IdUsuarioEnvio = (estadoLote == 2) ? idUsuario : 0; //para Estado "Derivado" poner la fecha actual y para estado "Cancelado" no poner Fecha string fecha_hora = txtFecha.Text + " " + txtHora.Text; - lote.FechaEnvio = (estadoLote == 2) ? Convert.ToDateTime(fecha_hora) : DateTime.Parse("01/01/1900"); - lote.Save(); + lote.FechaEnvio = (estadoLote == 2) ? Convert.ToDateTime(fecha_hora) : DateTime.Parse("01/01/1900"); + lote.Save(); - ISession m_session = NHibernateHttpModule.CurrentSession; - ICriteria crit = m_session.CreateCriteria(typeof(Business.Data.Laboratorio.Derivacion)); - crit.Add(Expression.Eq("Idlote", lote.IdLoteDerivacion)); - IList lista = crit.List(); - - - - - - - - foreach (Business.Data.Laboratorio.Derivacion oDeriva in lista) - { - #region Derivacion + ISession m_session = NHibernateHttpModule.CurrentSession; + ICriteria crit = m_session.CreateCriteria(typeof(Business.Data.Laboratorio.Derivacion)); + //crit.Add(Expression.Eq("Idlote", lote.IdLoteDerivacion)); + // Use '{alias}' instead of 'LAB_Derivacion' NHibernate will replace this placeholder with the actual alias it generates for the Derivacion entity. + string ssql_Protocolo = " IdLote=" + lote.IdLoteDerivacion + " and {alias}.IdDetalleProtocolo in (Select IdDetalleProtocolo From LAB_DetalleProtocolo where IdEfector=" + oUser.IdEfector.IdEfector + ")"; + crit.Add(Expression.Sql(ssql_Protocolo)); + IList lista = crit.List(); + + foreach (Business.Data.Laboratorio.Derivacion oDeriva in lista) + { + #region Derivacion //Cambia el estado de las derivaciones LAB_Derivacion /* From 91ba57f1ec67895c8ad998612b604526022ec5e8 Mon Sep 17 00:00:00 2001 From: Vanesa Rimada <80859025+vrimada@users.noreply.github.com> Date: Tue, 4 Nov 2025 08:31:34 -0300 Subject: [PATCH 61/61] fix: correcciones de conflictos --- .../Protocolos/ProtocoloProductoEdit.aspx.cs | 67 +------------------ 1 file changed, 3 insertions(+), 64 deletions(-) diff --git a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs index 7484b27..3d3d4b7 100644 --- a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs +++ b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs @@ -1606,12 +1606,7 @@ protected void btnCancelar_Click(object sender, EventArgs e) case "AltaDerivacionMultiEfectorLote": Response.Redirect("DerivacionMultiEfectorLote.aspx?idEfectorSolicitante=" + Request["idEfectorSolicitante"].ToString() + "&idServicio=1&idLote=" + Request["idLote"]); break; } } - } - - - - } - + @@ -2051,63 +2046,7 @@ private void MarcarTodasAreas(bool p) } - private void CargarProtocoloDerivadoLote() - { - string numeroProtocolo = Request["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", int.Parse(numeroProtocolo)); - if (oRegistro != null) - { - lblTitulo.Visible = false; - lblServicio1.Visible = true; - lblServicio.Visible = true; - txtFecha.Value = DateTime.Now.ToShortDateString(); - txtFechaOrden.Value = oRegistro.FechaOrden.ToShortDateString(); - txtCodigoMuestra.Text = ""; - txtDescripcionProducto.Text = oRegistro.DescripcionProducto; - ddlConservacion.SelectedValue = oRegistro.IdConservacion.ToString(); - txtNumeroOrigen.Text = oRegistro.Numero.ToString(); - ddlEfector.SelectedValue = oRegistro.IdEfector.IdEfector.ToString(); - ddlSectorServicio.SelectedValue = oRegistro.IdSector.IdSectorServicio.ToString(); - txtObservacion.Text = oRegistro.Observacion; - pnlNavegacion.Visible = false; - btnCancelar.Text = "Cancelar"; - btnCancelar.Width = Unit.Pixel(80); - ddlMuestra.SelectedValue = oRegistro.IdMuestra.ToString(); - - - - #region CargaDeterminaciones - ////// ---------------------->Buscar las derivaciones que no han sido ingresadas - //el protocolo me da los protocolos detalles - //los protocolos detalles me dan las derivaciones - //la derivacion debe estar enviada - //la derivacion debe tener el mismo lote que el ingresado (no todos los analisis pueden haber sido enviados con el mismo lote) - - string m_strSQL = - //select distinct STRING_AGG(Det.idItem ,' | ') as Item ---> (No esta disponible en SQL 2014) - @" SELECT STUFF(( SELECT ' | ' + CAST(Det.idItem AS VARCHAR(20)) - from LAB_Derivacion D - inner join LAB_DetalleProtocolo as Det on Det.idDetalleProtocolo = D.idDetalleProtocolo - inner join LAB_Protocolo as P on P.idProtocolo = det.idProtocolo - inner join LAB_DerivacionEstado as LE on LE.idEstado = D.estado - inner join LAB_LoteDerivacion L on L.idLoteDerivacion = D.idLote - where P.baja = 0 - and D.estado in (1) ---------------------- Buscar las derivaciones que no han sido ingresadas - and L.idLoteDerivacion = " + Request["idLote"].ToString() + " and p.numero = " + numeroProtocolo + - " FOR XML PATH(''), TYPE ).value('.', 'NVARCHAR(MAX)'), 1, 3, '') AS Item; "; - - DataSet Ds = new DataSet(); - SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; - SqlDataAdapter adapter = new SqlDataAdapter(); - adapter.SelectCommand = new SqlCommand(m_strSQL, conn); - adapter.Fill(Ds); - - string analisis = Convert.ToString(Ds.Tables[0].Rows[0][0]); - CargarDeterminacionesDerivacion(analisis); - #endregion - } - } + private void ActualizarEstadoDerivacion(Protocolo oRegistro) @@ -2149,7 +2088,7 @@ private void VerificacionEstadoLote(Protocolo oRegistro) // ActualizaEstadoLote(idLote, oRegistro); } } - } + protected void btnArchivos_Click(object sender, EventArgs e) { Response.Redirect("ProtocoloAdjuntar.aspx?idProtocolo=" + Request["idProtocolo"].ToString() +"&desde=protocolo");