From 5ea0c9334e4ab9bf4a84a24d690b010d22c9ebaf Mon Sep 17 00:00:00 2001 From: Caro Date: Tue, 4 Aug 2026 12:19:03 -0300 Subject: [PATCH] Mantenimiento Jilio2026_3 --- Business/Data/Laboratorio/DetalleProtocolo.cs | 4 +- Business/Data/Laboratorio/HojaTrabajo.cs | 14 +- Business/Data/Laboratorio/Protocolo.cs | 1 + WebLab/Derivaciones/Derivados2.aspx.cs | 17 +- WebLab/Derivaciones/LoteList.aspx.cs | 29 +- .../Estadisticas/ReporteIncidencias.aspx.cs | 1 + WebLab/HojasTrabajo/HTList.aspx.cs | 3 +- .../HTrabajoProtocolo4Horizontal.cs | 8 +- .../HTrabajoProtocolo4Microbiologia.cs | 8 +- ...rabajoProtocolo4MicrobiologiaHorizontal.cs | 8 +- .../HTrabajoProtocolo5Horizontal.rpt | Bin 32768 -> 32768 bytes WebLab/Informes/Informe.aspx | 8 +- WebLab/Informes/Informe.aspx.cs | 32 +- WebLab/Items/ItemEdit2.aspx | 2 +- WebLab/Principal.aspx | 2 + WebLab/Principal.aspx.cs | 4 +- WebLab/Principal2.aspx | 421 +++++++++++++ WebLab/Principal2.aspx.cs | 588 ++++++++++++++++++ WebLab/Principal2.aspx.designer.cs | 258 ++++++++ WebLab/Protocolos/Default2.aspx.cs | 28 +- WebLab/Protocolos/ProtocoloEdit2.aspx.cs | 19 +- WebLab/Protocolos/ProtocoloList.aspx | 10 +- WebLab/Protocolos/ProtocoloList.aspx.cs | 148 ++--- .../Protocolos/ProtocoloProductoEdit.aspx.cs | 36 +- .../Resultados/AntecedentesAnalisisView.aspx | 11 +- WebLab/Resultados/ObservacionesEdit.aspx.cs | 16 +- WebLab/Resultados/ResultadoBusqueda.aspx | 5 +- WebLab/Resultados/ResultadoBusqueda.aspx.cs | 14 +- WebLab/Resultados/ResultadoEdit2.aspx.cs | 145 ++--- WebLab/Resultados/ResultadoItemEdit.aspx.cs | 68 +- .../ResultadoNoPacienteView.aspx.cs | 311 +++++++-- WebLab/Site1.Master | 6 +- WebLab/Site1.Master.cs | 2 +- WebLab/Site1.Master.designer.cs | 9 - WebLab/Usuarios/UsuarioEdit.aspx.cs | 98 ++- WebLab/Usuarios/UsuarioList.aspx | 2 +- WebLab/Usuarios/UsuarioList.aspx.cs | 165 ++--- WebLab/WebLab.csproj | 206 ++---- WebLab/controldecambios.html | 131 +++- WebLab/loginSIL.ascx.cs | 157 ++++- 40 files changed, 2325 insertions(+), 670 deletions(-) create mode 100644 WebLab/Principal2.aspx create mode 100644 WebLab/Principal2.aspx.cs create mode 100644 WebLab/Principal2.aspx.designer.cs diff --git a/Business/Data/Laboratorio/DetalleProtocolo.cs b/Business/Data/Laboratorio/DetalleProtocolo.cs index c64632e0..e3197298 100644 --- a/Business/Data/Laboratorio/DetalleProtocolo.cs +++ b/Business/Data/Laboratorio/DetalleProtocolo.cs @@ -1205,7 +1205,9 @@ AND p.Estado > 0 AND p.IdPaciente = @idPaciente AND p.IdProtocolo < @idProtocoloActual AND dp.IdUsuarioValida > 0 - ORDER BY dp.IdDetalleProtocolo DESC"; + AND DP.conresultado=1 + -- ORDER BY dp.IdDetalleProtocolo DESC---no es necesario ordenar +"; Utility util = new Utility(); diff --git a/Business/Data/Laboratorio/HojaTrabajo.cs b/Business/Data/Laboratorio/HojaTrabajo.cs index 89466874..bf8d6841 100644 --- a/Business/Data/Laboratorio/HojaTrabajo.cs +++ b/Business/Data/Laboratorio/HojaTrabajo.cs @@ -51,11 +51,11 @@ public sealed class HojaTrabajo: Business.BaseDataAccess private bool m_mequiereTodasLasDeterminaciones; #endregion - #region Default ( Empty ) Class Constuctor - /// - /// default constructor - /// - public HojaTrabajo() + #region Default ( Empty ) Class Constuctor + /// + /// default constructor + /// + public HojaTrabajo() { m_idhojatrabajo = 0; m_idefector = new Efector(); @@ -536,7 +536,7 @@ public bool IsChanged { get { return m_isChanged; } } - + public bool RequiereTodasLasDeterminaciones { get @@ -549,7 +549,7 @@ public bool RequiereTodasLasDeterminaciones m_mequiereTodasLasDeterminaciones = value; } } - #endregion + #endregion diff --git a/Business/Data/Laboratorio/Protocolo.cs b/Business/Data/Laboratorio/Protocolo.cs index 197a8a1d..af08b00b 100644 --- a/Business/Data/Laboratorio/Protocolo.cs +++ b/Business/Data/Laboratorio/Protocolo.cs @@ -1170,6 +1170,7 @@ INNER JOIN LAB_Protocolo p2 with (nolock) AND p2.Estado > 0 AND p2.IdProtocolo < @idProtocoloActual AND dp2.IdUsuarioValida > 0 + and dp2.conResultado=1 ---agrego que solo traiga los antecedentes de las determinaciones del protocolo actual AND dp2.IdSubItem IN ( SELECT DISTINCT IdSubItem diff --git a/WebLab/Derivaciones/Derivados2.aspx.cs b/WebLab/Derivaciones/Derivados2.aspx.cs index 1f7ce61b..d6ebb82b 100644 --- a/WebLab/Derivaciones/Derivados2.aspx.cs +++ b/WebLab/Derivaciones/Derivados2.aspx.cs @@ -73,22 +73,33 @@ private void CargarListas() Usuario oUser = new Usuario(); oUser = (Usuario)oUser.Get(typeof(Usuario), int.Parse(Session["idUsuario"].ToString())); //oCon = (Configuracion)oCon.Get(typeof(Configuracion), "IdConfiguracion", 1, "IdEfector", oUser.IdEfector); + string connReady = ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString; ///Performance: conexion de solo lectura + string cacheKey = ""; Utility oUtil = new Utility(); ///Carga de combos de tipos de servicios string m_ssql = "select idTipoServicio, nombre from Lab_TipoServicio WHERE (baja = 0)"; - oUtil.CargarCombo(ddlServicio, m_ssql, "idTipoServicio", "nombre"); + cacheKey = "CAT_TipoServicio"; + Business.Helpers.ComboCache.CargarCombo(ddlServicio, cacheKey, m_ssql, "idTipoServicio", "nombre", connReady); + + //oUtil.CargarCombo(ddlServicio, m_ssql, "idTipoServicio", "nombre"); ddlServicio.Items.Insert(0, new ListItem("Todos", "0")); CargarArea(); ///Carga de combos de Origen m_ssql = "SELECT idOrigen, nombre FROM LAB_Origen WHERE (baja = 0)"; - oUtil.CargarCombo(ddlOrigen, m_ssql, "idOrigen", "nombre"); + cacheKey = "CAT_Origen"; + Business.Helpers.ComboCache.CargarCombo(ddlOrigen, cacheKey, m_ssql, "idOrigen", "nombre", connReady); + + //oUtil.CargarCombo(ddlOrigen, m_ssql, "idOrigen", "nombre"); ddlOrigen.Items.Insert(0, new ListItem("Todos", "0")); ///Carga de combos de Prioridad m_ssql = "SELECT idPrioridad, nombre FROM LAB_Prioridad WHERE (baja = 0)"; - oUtil.CargarCombo(ddlPrioridad, m_ssql, "idPrioridad", "nombre"); + cacheKey = "CAT_Prioridad"; + Business.Helpers.ComboCache.CargarCombo(ddlPrioridad, cacheKey, m_ssql, "idPrioridad", "nombre", connReady); + + //oUtil.CargarCombo(ddlPrioridad, m_ssql, "idPrioridad", "nombre"); ddlPrioridad.Items.Insert(0, new ListItem("Todos", "0")); diff --git a/WebLab/Derivaciones/LoteList.aspx.cs b/WebLab/Derivaciones/LoteList.aspx.cs index 1d537289..e96c93a5 100644 --- a/WebLab/Derivaciones/LoteList.aspx.cs +++ b/WebLab/Derivaciones/LoteList.aspx.cs @@ -49,7 +49,7 @@ protected void Page_Load(object sender, EventArgs e) VerificaPermisos("Lista de Lotes"); lblTitulo.Text = "LISTA DE LOTES"; habilitaOrdenarEfector(); - CargarFiltros(); + CargarListas(); } } else @@ -166,7 +166,7 @@ INNER JOIN LAB_LoteDerivacion l (nolock) on l.idEfectorDestino = E.idEfector } - private void CargarFiltros() + private void CargarListas() { if (Session["idUsuario"] != null) { @@ -471,30 +471,7 @@ protected void lnkExcel_Click(object sender, EventArgs e) Utility oUtil = new Utility(); Utility.ExportDataTableToXlsx(tabla, oUtil.CompletarNombrePDF("Lotes")); - //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 { diff --git a/WebLab/Estadisticas/ReporteIncidencias.aspx.cs b/WebLab/Estadisticas/ReporteIncidencias.aspx.cs index 4a303e49..069b5e85 100644 --- a/WebLab/Estadisticas/ReporteIncidencias.aspx.cs +++ b/WebLab/Estadisticas/ReporteIncidencias.aspx.cs @@ -11,6 +11,7 @@ using System.Text; using System.IO; using System.Web.UI.HtmlControls; + using Business.Data.Laboratorio; using Business.Data; using System.Configuration; diff --git a/WebLab/HojasTrabajo/HTList.aspx.cs b/WebLab/HojasTrabajo/HTList.aspx.cs index 41898342..f03ad7ab 100644 --- a/WebLab/HojasTrabajo/HTList.aspx.cs +++ b/WebLab/HojasTrabajo/HTList.aspx.cs @@ -223,8 +223,7 @@ private void Imprimir(object p) { nombre_reporte = "../Informes/HojasdeTrabajo/HTrabajoProtocolo5"; } break; - - } + } } //if (oRegistro.Formato == 1) //{ diff --git a/WebLab/Informes/HojasdeTrabajo/HTrabajoProtocolo4Horizontal.cs b/WebLab/Informes/HojasdeTrabajo/HTrabajoProtocolo4Horizontal.cs index 4709d1a5..40060a3f 100644 --- a/WebLab/Informes/HojasdeTrabajo/HTrabajoProtocolo4Horizontal.cs +++ b/WebLab/Informes/HojasdeTrabajo/HTrabajoProtocolo4Horizontal.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// Este código fue generado por una herramienta. +// Versión de runtime:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si +// se vuelve a generar el código. // //------------------------------------------------------------------------------ diff --git a/WebLab/Informes/HojasdeTrabajo/HTrabajoProtocolo4Microbiologia.cs b/WebLab/Informes/HojasdeTrabajo/HTrabajoProtocolo4Microbiologia.cs index c211ad17..ce91bcfc 100644 --- a/WebLab/Informes/HojasdeTrabajo/HTrabajoProtocolo4Microbiologia.cs +++ b/WebLab/Informes/HojasdeTrabajo/HTrabajoProtocolo4Microbiologia.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// Este código fue generado por una herramienta. +// Versión de runtime:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si +// se vuelve a generar el código. // //------------------------------------------------------------------------------ diff --git a/WebLab/Informes/HojasdeTrabajo/HTrabajoProtocolo4MicrobiologiaHorizontal.cs b/WebLab/Informes/HojasdeTrabajo/HTrabajoProtocolo4MicrobiologiaHorizontal.cs index 07f7f649..a762bc3c 100644 --- a/WebLab/Informes/HojasdeTrabajo/HTrabajoProtocolo4MicrobiologiaHorizontal.cs +++ b/WebLab/Informes/HojasdeTrabajo/HTrabajoProtocolo4MicrobiologiaHorizontal.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// Este código fue generado por una herramienta. +// Versión de runtime:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// Los cambios en este archivo podrían causar un comportamiento incorrecto y se perderán si +// se vuelve a generar el código. // //------------------------------------------------------------------------------ diff --git a/WebLab/Informes/HojasdeTrabajo/HTrabajoProtocolo5Horizontal.rpt b/WebLab/Informes/HojasdeTrabajo/HTrabajoProtocolo5Horizontal.rpt index fea50771669538751686d2045ba4d7b2ded51718..2891da8563ddcb9508c6e2cd11504d886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zki#>Mg2U8ql$Bz4@$f})c*?RhKAErLE}?&QH`Zbdh4Tdt_0iyF;v=^S!yGb1$3fRsuIB`2jJZ9{yvrOYR^%^rHUI;Spa#GA~Tc>Lgg4Y2%Ratv}%&^XEL2b${p zF4#&&HDWa*n?o7_JfuE_uj&#Eb7+HNRzT80x|XJ=%a7tV#11{$6!C;R&W!{+s84@O zKxjEN1h)LNo?JBfB7wL>K0~lGEdYS`+QT-hA}Yk3$^$GGp6UYpP-~wqmjEUZb$fg< zVH2x3w96t%>8Y5tf?wZA)w2C47Qv>0O@kMgdH=L!G>Rxw*<4Jc3+oQ3L9ksoe3@SG zFWoZ{Xi!(Q5^x
- + <%--     - + --%> @@ -400,7 +400,7 @@ - --%> diff --git a/WebLab/Informes/Informe.aspx.cs b/WebLab/Informes/Informe.aspx.cs index 2c654876..d5a78fc9 100644 --- a/WebLab/Informes/Informe.aspx.cs +++ b/WebLab/Informes/Informe.aspx.cs @@ -194,12 +194,15 @@ private void CargarListas() ddlPrioridad.Items.Insert(0, new ListItem("-- Todos --", "0")); - m_ssql = "SELECT idImpresora, nombre FROM LAB_Impresora with (nolock) where idEfector=" + oUser.IdEfector.IdEfector.ToString() + " order by nombre"; //MultiEfector - - oUtil.CargarCombo(ddlImpresoraCB, m_ssql, "nombre", "nombre", connReady); - - ddlImpresora.Items.Insert(0, new ListItem("Seleccione impresora", "0")); + if (Request["Tipo"].ToString() == "CodigoBarras") + { + m_ssql = "SELECT idImpresora, nombre FROM LAB_Impresora with (nolock) where idEfector=" + oUser.IdEfector.IdEfector.ToString() + " order by nombre"; //MultiEfector + cacheKey = $"CAT_ImpresoraEtiqueta_{oUser.IdEfector.IdEfector}"; + Business.Helpers.ComboCache.CargarCombo(ddlImpresoraCB, cacheKey, m_ssql, "nombre", "nombre", connReady); + // oUtil.CargarCombo(ddlImpresoraCB, m_ssql, "nombre", "nombre", connReady); + ddlImpresoraCB.Items.Insert(0, new ListItem("Seleccione impresora", "0")); + } if (Request["Tipo"].ToString() == "HojaTrabajo") ddlPrioridad.SelectedValue = "1";//rutina @@ -596,7 +599,6 @@ private void VistaPreeliminar(object p, string accion) nombre_reporte = "../Informes/HojasdeTrabajo/HTrabajoProtocolo5"; } break; - } } if (ddlServicio.SelectedValue == "3") //microbiolgoia @@ -689,9 +691,9 @@ private void ExportarExcel(DataTable dt, string nom) Response.End(); } + - - + private DataTable GetDataSet_HojaTrabajo(object p) @@ -699,18 +701,18 @@ private DataTable GetDataSet_HojaTrabajo(object p) string s_store = "LAB_GeneraHT"; DataSet Ds = new DataSet(); - SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; - // SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString); ///Performance: conexion de solo lectura + SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; + // SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString); ///Performance: conexion de solo lectura SqlCommand cmd = new SqlCommand(); cmd.CommandType = CommandType.StoredProcedure; // Configuracion oCon = new Configuracion(); oCon = (Configuracion)oCon.Get(typeof(Configuracion), 1); if (rdbHojaConResultados.SelectedValue == "0") - s_store = "LAB_GeneraHT"; - else - s_store = "LAB_GeneraHTconResultados"; - - + s_store = "LAB_GeneraHT"; + else + s_store = "LAB_GeneraHTconResultados"; + + if (ddlServicio.SelectedValue=="3") s_store = s_store + "Microbiologia"; if (ddlServicio.SelectedValue=="4") s_store = s_store + "Pesquisa"; diff --git a/WebLab/Items/ItemEdit2.aspx b/WebLab/Items/ItemEdit2.aspx index 934dcbe3..4868efcc 100644 --- a/WebLab/Items/ItemEdit2.aspx +++ b/WebLab/Items/ItemEdit2.aspx @@ -79,7 +79,7 @@
  • Mas opciones
  • Turnos
  • AutoAnalizadores
  • -
  • Observaciones Resultados
  • + <%--
  • Observaciones Resultados
  • --%>
    diff --git a/WebLab/Principal.aspx b/WebLab/Principal.aspx index 5818f350..3a7dfa70 100644 --- a/WebLab/Principal.aspx +++ b/WebLab/Principal.aspx @@ -46,6 +46,8 @@
    + +
    diff --git a/WebLab/Principal.aspx.cs b/WebLab/Principal.aspx.cs index dbefe54e..ebb85a38 100644 --- a/WebLab/Principal.aspx.cs +++ b/WebLab/Principal.aspx.cs @@ -46,7 +46,7 @@ protected void Page_Load(object sender, EventArgs e) // int i = calcularComodinDifProtocolo(); // Actualizarcomodin(i); //} - + // MostrarInfoLogin(oUser); if (oCon != null) { lblProximoProtocolo1.Visible = false; @@ -225,6 +225,8 @@ protected void Page_Load(object sender, EventArgs e) } + + private void CargarGrillaSISA() { DataSet Ds = new DataSet(); diff --git a/WebLab/Principal2.aspx b/WebLab/Principal2.aspx new file mode 100644 index 00000000..ff8ea8d3 --- /dev/null +++ b/WebLab/Principal2.aspx @@ -0,0 +1,421 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Principal2.aspx.cs" Inherits="WebLab.Principal" MasterPageFile="~/Site1.Master" %> + +<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ajx" %> +<%@ Register Src="~/PeticionList.ascx" TagPrefix="uc1" TagName="PeticionList" %> +<%@ Register Src="~/seguimientoCovid.ascx" TagPrefix="uc1" TagName="seguimientoCovid" %> + + + + + + + + + + + <%-- --%> + + + + + + + + + +
    + + +
    +
    +
    +
    +
    +

    ALERTA

    +

    +

    + + + + +
    + +
    +
    +
    + +
    +
    +
    + + + +
    +
    + + +
    + + +
    +
    +
    + +
    +

    Turnos

    +

    Genere desde esta opción los turnos programados.

    + + + + + + + +
    + +
    +
    +
    +
    +
    +
    + +
    +

    Recepción de Muestras

    + +

    Generación de Protocolos

    + + + +
    + Ver +
    + + + + Microbiología. + + +
    + + Pacientes con + turnos. Cargue desde acá los protocolos para los pacientes con turnos.
    +
    + + + +
    + +
    +
    +
    +
    + + +
    + +
    + + +
    + + + +
    + + +
    + + Capacitacion + Cambiar Efector +
    +
    + +
    + +
    + +
    + + + + + + + + + + + Mensajes Internos + + + + + + + + + + + + + + + + + + + + + + + + +
    + <%# DataBinder.Eval(Container.DataItem, "fechaHoraRegistro")%>         + runat="server">Eliminar +
    + De:<%# DataBinder.Eval(Container.DataItem, "remitente")%>
    + + + Para: <%# DataBinder.Eval(Container.DataItem, "destinatario")%> +
    + + + Mensaje:

    <%# DataBinder.Eval(Container.DataItem, "mensaje")%>

    +
    +
    + +
    + + <%-- --%> +
    + + + <%--
    + +
    +
    +
    + + +
    +

    Hojas de Trabajo

    +

    Genere desde acá las hojas de trabajo para las áreas de su laboratorio.

    + + + + + + + +
    + +
    +
    +
    + + +
    +
    +
    + + +
    +

    Carga de resultados de Microbiología

    +

    + + + + +
    + +
    +
    +
    + +
    +
    +
    + + +
    +

    Validación de Resultados

    +

    + + + + +
    + +
    +
    +
    + +
    + --%> + + + + + + + + + + <%-- +
    +
    --%> + <%-- +
    +
    +

    + Modulo de Urgencias + +

    +
    + Desde acá podrá cargar el protocolo, sus resultados, validar e imprimir de forma + rápida en un solo paso.
    +
    +
    +
    +
    --%> + + +
    + + <%--
    + +
    + +
    + +
    +

    Historial de Resultados: Consulte para un paciente los resultados obtenidos en el laboratorio.


    + +

    Para consultar resultados en la RED PROVINCIAL DE LABORATORIOS hacer clic aquí

    + +       Si tiene algun inconveniente para acceder a este link consultar con su soporte informático local.

    + +
    +
    --%> + + + + +
    + + +
    +
    + + Nuevo Usuario + + + +
    +
    + +
    + +
    +

    + Cierra sesión actual y permite abrir nueva sesión de usuario. +

    + +
    +
    + + + + <%-- +
    + +
    +

    + Exportación de datos para SIVILA

    +
    + Generación de archivos automaticos para el envío de datos a SIVILA. +
    +
    +
    +
    --%> + + + +
    + + + +
    + + + +
      +
    + + + <%--
    + + + + + + + + +
      Para acceder a gráficos generados por este sistema requiere instalar Adobe Flash Player.
    Descargar + +
    + +
      +
    --%> + + +
    +
    + + diff --git a/WebLab/Principal2.aspx.cs b/WebLab/Principal2.aspx.cs new file mode 100644 index 00000000..41be2b60 --- /dev/null +++ b/WebLab/Principal2.aspx.cs @@ -0,0 +1,588 @@ +using System; +using System.Collections; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.HtmlControls; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Xml.Linq; +using Business.Data.Laboratorio; +using Business; +using System.Data.SqlClient; +using Business.Data; +using System.IO; +using System.Drawing; + +namespace WebLab +{ + public partial class Principal2 : System.Web.UI.Page + { + + + protected void Page_Load(object sender, EventArgs e) + { + + if (!Page.IsPostBack) + { + if (Session["s_permiso"] == null)Response.Redirect("FinSesion.aspx"); + + Configuracion oCon = new Configuracion(); + Usuario oUser = new Usuario(); + Business.Data.Laboratorio.Protocolo oP = new Business.Data.Laboratorio.Protocolo(); + + + oUser = (Usuario)oUser.Get(typeof(Usuario), int.Parse(Session["idUsuario"].ToString())); + if (oUser!=null) + if (oUser.IdEfector.IdEfector != 227) + oCon = (Configuracion)oCon.Get(typeof(Configuracion), "IdEfector", oUser.IdEfector); + else + oCon = (Configuracion)oCon.Get(typeof(Configuracion), 1); + //if (oCon.NroProtocolo == -1) + //{ + // int i = calcularComodinDifProtocolo(); + // Actualizarcomodin(i); + //} + MostrarInfoLogin(oUser); + if (oCon != null) + { + lblProximoProtocolo1.Visible = false; + lnkUltimoNumeroSector.Visible = false; /// no tiene setnido mostrar el proximo numero true; + + /// saco esto para mejorar la performance + //switch (oCon.TipoNumeracionProtocolo ) + //{ + // case 0: ///autonumerico + // lblProximoProtocolo1.Text= oP.GenerarNumero().ToString(); break; + // case 1: //numero diario + // lblProximoProtocolo1.Text = oP.GenerarNumeroDiario(DateTime.Now.ToString("yyyyMMdd")).ToString(); break; + // case 2: // numero por sector + // { + // lblProximoProtocolo1.Visible = false; + // lnkUltimoNumeroSector.Visible = true; + // } break; + + // case 3: // numero por Tipo de Servicio + // { + // lblProximoProtocolo1.Visible = false; + // lnkUltimoNumeroSector.Visible = true; + // } break; + + + + //} + //lblProtocoloPendiente.Text = oP.GetPendientesImprimir().ToString(); + //lblResultadoPendiente.Text = oP.GetResultadosPendientes().ToString(); + + //lblValidaPendiente.Text = oP.GetPendientesValidar().ToString(); + divAlerta.Visible = false; + /* Caro saco alerta por performance + if (oUser.IdEfector.IdEfector != 227) + { ///caro :activar mas adelante + string s_alerta = GetAlerta(oCon); divAlerta.Visible = false; + if (s_alerta != "") divAlerta.Visible = true; + lblAlerta.Text = s_alerta; + } + */ + + + + pnlRecepcion.Visible = false; + + if (!oCon.Turno) + { + pnlTurno.Visible = false; + pnlTurnoRecepcion.Visible = false; + } + else + { + if (VerificaPermisos("Pacientes con turno") == 0) + pnlTurnoRecepcion.Visible = false; + else + pnlTurnoRecepcion.Visible = oCon.PrincipalRecepcion; + if (VerificaPermisos("Asignacion de turnos") == 0) + pnlTurno.Visible = false; + else + pnlTurno.Visible = oCon.PrincipalTurno; + } + + + if ((VerificaPermisos("Recepción de Pacientes") == 0) && (VerificaPermisos("Recepción de Muestras") == 0)) + pnlRecepcion.Visible = false; + else + pnlRecepcion.Visible = oCon.PrincipalRecepcion; + + + if (VerificaPermisos("Seguimiento") == 0) + pnlSeguimiento.Visible = false; + else + { + pnlSeguimiento.Visible = true; + seguimientoCovid.MostrarSeguimiento(); + } + + + + // else + // { + // if (VerificaPermisos("Pacientes con turno") == 0) + // pnlTurnoRecepcion.Visible = false; + // else + // pnlTurnoRecepcion.Visible = oCon.PrincipalRecepcion; + + // if (VerificaPermisos("Pacientes sin turno") == 0) + // pnlProtocolo.Visible = false; + // else + // pnlProtocolo.Visible = oCon.PrincipalRecepcion; + + + // } + + + + //Si no tiene permisos directamente no se muestra + //Si tiene permisos y si está habilitado el acceso directo se muestra + //if (VerificaPermisos("Hoja de Trabajo") == 0) + // pnlHojaTrabajo.Visible = false; + //else + // pnlHojaTrabajo.Visible = oCon.PrincipalImpresionHT; + + + //if (VerificaPermisos("Carga") == 0) pnlCargaResultado.Visible = false; + //else pnlCargaResultado.Visible = oCon.PrincipalCargaResultados; + + //if (VerificaPermisos("Validacion") == 0) pnlValidacion.Visible = false; + //else pnlValidacion.Visible = oCon.PrincipalValidacion; + + //if (VerificaPermisos("Impresión") == 0) pnlImpresion.Visible = false; + //else pnlImpresion.Visible = oCon.PrincipalImpresionResultados; + + + // ///Para que el usuario acceda al modulo urgencias deberá tener permisos a la carga de protocolo, + // ///carga de resultados y validacion. + // /// + + //if ((VerificaPermisos("Pacientes sin turno") == 2)&& (VerificaPermisos("Carga") == 2)&&(VerificaPermisos("Validacion") == 2)) ///Urgencias + // pnlUrgencia.Visible = oCon.PrincipalUrgencias; + //else + //pnlUrgencia.Visible = false; + + + + // ///Agregar tambien el acceso a evolucion por analisis e historial (solapa antecedentes de resultados) + //if (VerificaPermisos("Historial de Resultados") == 0) pnlResultados.Visible = false; + //else pnlResultados.Visible = oCon.PrincipalResultados; + + //if (VerificaPermisos("Exportacion para SIVILA") == 0) pnlSivila.Visible = false; + //else pnlSivila.Visible = true; + + if (VerificaPermisos("Mensajes Internos") != 0) + MostrarMensajes(); + else + mensajeria.Visible = false; + //if (VerificaPermisos("Historial Por Analisis") == 0) pnlResultadoAnalisis.Visible = false; + //else pnlResultadoAnalisis.Visible = oCon.PrincipalResultados; + + if ((oCon.PeticionElectronica) && (VerificaPermisos("Peticion Electronica") > 0)) + { + PeticionList1.CargarPeticiones(); + //divPeticion.Visible = true; + //CargarPeticiones(); + } + + lnkCambioEfector.Visible = false; + if (Session["idUsuario"] != null) + { + // oUser = (Usuario)oUser.Get(typeof(Usuario), int.Parse(Session["idUsuario"].ToString())); + + lnkCambioEfector.Visible = oUser.Administrador; + if (oUser.IdEfector.IdEfector == 227) + { + //CargarGrilla(); + //CargarGrillaSISA(); + gvProtocolosxEfector.Visible = oUser.Administrador; + btnProtocoloEfector.Visible = oUser.Administrador; + btnSISA.Visible = oUser.Administrador; + gvProtocolosxSISA.Visible = oUser.Administrador; + pnlRecepcion.Visible = false; + pnlTurno.Visible = false; + pnlTurnoRecepcion.Visible = false; + } + else + { + btnProtocoloEfector.Visible = false; + btnSISA.Visible = false; + } + } + + } + else + Response.Redirect("AccesoDenegado.aspx?mensaje=Efector no Habilitado. Verifique con el administrador.", false); + } + + } + + private void MostrarInfoLogin(Usuario oUser) + { + + string tipoLogin = oUser.TipoAutenticacion;// ""; + + //if (Session["TipoLogin"] != null) + // tipoLogin = Session["TipoLogin"].ToString(); + + + string fecha = ""; + + if (Session["FechaLogin"] != null) + fecha = Convert.ToDateTime(Session["FechaLogin"]) + .ToString("dd/MM/yyyy HH:mm"); + + + //string servidor = ""; + + //if (Session["ServidorLogin"] != null) + // servidor = Session["ServidorLogin"].ToString(); + + + //string mensaje = ""; + + //if (Session["MensajeLogin"] != null) + // mensaje = Session["MensajeLogin"].ToString(); + + + lblInfoLogin.Text = + "Usuario: " + oUser.Apellido + " " + oUser.Nombre + + "
    Efector: " + oUser.IdEfector.Nombre + + "
    Perfil: " + oUser.IdPerfil.Nombre + + "
    Autenticación: " + tipoLogin + + "
    Fecha ingreso: " + fecha+ + "
    Fecha Aceptacion de Terminos: " +oUser.FechaAceptaTerminosCondiciones.ToString("dd/MM/yyyy HH:mm"); ; + + + //if (!string.IsNullOrEmpty(mensaje)) + //{ + // pnlInfoLogin.Visible = true; + // lblInfoLogin.Text += + // "

    ⚠ Aviso: " + mensaje; + + // pnlInfoLogin.CssClass = "alert alert-warning"; + //} + //else + // pnlInfoLogin.Visible = false; + + + + } + + private void CargarGrillaSISA() + { + DataSet Ds = new DataSet(); + // SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; + SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString); ///Performance: conexion de solo lectura + SqlCommand cmd = new SqlCommand(); + cmd.CommandType = CommandType.StoredProcedure; + + string str_condicion = " and C.idEfector>0"; + + + cmd.CommandText = "[LAB_ResultadosASisa]"; + + cmd.Parameters.Add("@FiltroBusqueda", SqlDbType.NVarChar); + cmd.Parameters["@FiltroBusqueda"].Value = str_condicion; + + cmd.Parameters.Add("@idItem", SqlDbType.Int); + cmd.Parameters["@idItem"].Value = 0; //todos + + cmd.Parameters.Add("@Estado", SqlDbType.Int); + cmd.Parameters["@Estado"].Value = 0;//pendiente + + cmd.Parameters.Add("@agrupado", SqlDbType.Bit); + cmd.Parameters["@agrupado"].Value = 1;//agrupado por cantidad + + + + cmd.Connection = conn; + + + SqlDataAdapter da = new SqlDataAdapter(cmd); + + da.Fill(Ds); + + + gvProtocolosxSISA.DataSource = Ds; + gvProtocolosxSISA.DataBind(); + + + + conn.Close(); + conn.Dispose(); + conn = null; + + + } + + private string GetAlerta(Configuracion oCon) + { + string s_alerta = ""; + if (oCon.NotificarSISA == false) //si la notificacion no es automatica desde resultado + { + DataSet Ds = new DataSet(); + // SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; + SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString); ///Performance: conexion de solo lectura + SqlCommand cmd = new SqlCommand(); + cmd.CommandType = CommandType.StoredProcedure; + + string str_condicion = " and C.idEfector=" + oCon.IdEfector.IdEfector.ToString(); + + + cmd.CommandText = "[LAB_ResultadosASisa]"; + + cmd.Parameters.Add("@FiltroBusqueda", SqlDbType.NVarChar); + cmd.Parameters["@FiltroBusqueda"].Value = str_condicion; + + cmd.Parameters.Add("@idItem", SqlDbType.Int); + cmd.Parameters["@idItem"].Value = 0; //todos + + cmd.Parameters.Add("@Estado", SqlDbType.Int); + cmd.Parameters["@Estado"].Value = 0;//pendiente + + cmd.Parameters.Add("@agrupado", SqlDbType.Bit); + cmd.Parameters["@agrupado"].Value = 1;//agrupado por cantidad + + cmd.Connection = conn; + + + SqlDataAdapter da = new SqlDataAdapter(cmd); + + da.Fill(Ds); + + + conn.Close(); + conn.Dispose(); + conn = null; + //if (Ds.Tables[0].Rows.Count>0) + //s_alerta = "Hay " + Ds.Tables[0].Rows.Count.ToString() + " eventos pendientes de notificar a SISA. Notifique desde el menu Informes - Resultados a SISA"; + + s_alerta = "Hay " + Ds.Tables[0].Rows[0][1].ToString() + " eventos pendientes de notificar a SISA. Notifique desde el menu Informes - Resultados a SISA"; + + } + return s_alerta; + + } + + private void Actualizarcomodin(int dif) + { + + SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; + SqlDataAdapter da = new SqlDataAdapter(); + string m_ssql = @" update LAB_Configuracion set nroProtocolo=" + dif.ToString(); + SqlCommand cmdUpdate = new SqlCommand(m_ssql, conn); + da.InsertCommand = cmdUpdate; + da.InsertCommand.ExecuteNonQuery(); + conn.Close(); + conn.Dispose(); + } + + private int calcularComodinDifProtocolo() + { + int dif = 0; + string m_strSQL = "select top 1 idprotocolo - numero as dif from lab_protocolo order by idprotocolo 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); + + if (Ds.Tables[0].Rows.Count > 0) + dif =int.Parse( Ds.Tables[0].Rows[0][0].ToString()); + else + + dif = 0; + + return dif; + } + + //protected void UpdateTimer_Tick(object sender, EventArgs e) + //{ + // Configuracion oCon = new Configuracion(); oCon = (Configuracion)oCon.Get(typeof(Configuracion), 1); + // if (oCon.PeticionElectronica) + // { + // lblActualizacion.Text = "Datos actualizados al: " + DateTime.Now.ToLongTimeString(); + // CargarPeticiones(); + // } + + //} + + + //private void CargarPeticiones() + //{ + // DataList2.DataSource = LeerPeticiones(); + // DataList2.DataBind(); + //} + + //private object LeerPeticiones() + //{ + // DataSet Ds = new DataSet(); + // SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; + // SqlCommand cmd = new SqlCommand(); + // cmd.CommandType = CommandType.StoredProcedure; + + // cmd.CommandText = "[LAB_GetPeticionesPendientes]"; + + + // cmd.Connection = conn; + // SqlDataAdapter da = new SqlDataAdapter(cmd); + // da.Fill(Ds); + + + // return Ds.Tables[0]; + + + //} + + private object LeerProtocolosxEfector() + { + DataSet Ds = new DataSet(); + //SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; + SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString); ///Performance: conexion de solo lectura + SqlCommand cmd = new SqlCommand(); + cmd.CommandType = CommandType.StoredProcedure; + + cmd.CommandText = "[LAB_ProtocolosxEfector]"; + + + cmd.Connection = conn; + SqlDataAdapter da = new SqlDataAdapter(cmd); + da.Fill(Ds); + + // conn.Close(); + return Ds.Tables[0]; + + + } + protected void DataList1_ItemDataBound(object sender, DataListItemEventArgs e) + { + HyperLink oHplInfo = (HyperLink)e.Item.FindControl("hplMensajeEdit"); + if (oHplInfo != null) + { + string s_idMensaje = oHplInfo.NavigateUrl; + oHplInfo.NavigateUrl = "MensajeEdit.aspx?idMensaje=" + s_idMensaje + "&Operacion=Eliminar"; + + MensajeInterno oMensaje = new MensajeInterno(); + oMensaje = (MensajeInterno)oMensaje.Get(typeof(MensajeInterno), int.Parse(s_idMensaje)); + if (oMensaje.IdUsuarioRegistro.ToString() == Session["idUsuario"].ToString()) + oHplInfo.Visible = true; + else + oHplInfo.Visible = false; + } + } + + + //protected void DataList2_ItemDataBound(object sender, DataListItemEventArgs e) + //{ + // HyperLink oHplInfo = (HyperLink)e.Item.FindControl("hplPeticionEdit"); + // if (oHplInfo != null) + // { + // string s_idPeticion = oHplInfo.NavigateUrl; + // Peticion oMensaje = new Peticion(); + // oMensaje = (Peticion)oMensaje.Get(typeof(Peticion), int.Parse(s_idPeticion)); + + // oHplInfo.NavigateUrl = "Protocolos/ProtocoloEdit2.aspx?idPaciente=" + oMensaje.IdPaciente.IdPaciente.ToString() + "&Operacion=AltaPeticion&idServicio=" + oMensaje.IdTipoServicio.IdTipoServicio.ToString() + "&idPeticion=" + oMensaje.IdPeticion.ToString(); + + + // } + //} + private void MostrarMensajes() + { + BorrarMensajes(); + mensajeria.Visible = true; + // CargarGrilla(); + } + + private void BorrarMensajes() + { + SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; + SqlDataAdapter da = new SqlDataAdapter(); + string m_ssql = @" Delete from LAB_Mensaje where fechaHoraRegistro <'" + DateTime.Now.AddDays(-5).ToString("yyyyMMdd") + "'"; + SqlCommand cmdUpdate = new SqlCommand(m_ssql, conn); + da.InsertCommand = cmdUpdate; + da.InsertCommand.ExecuteNonQuery(); + // conn.Close(); + } + private void CargarGrilla() + { + + + DataList1.DataSource = LeerDatos(); + DataList1.DataBind(); + + gvProtocolosxEfector.DataSource = LeerProtocolosxEfector(); + gvProtocolosxEfector.DataBind(); + + } + + private object LeerDatos() + { + using (SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString)) + { + string m_strSQL = " SELECT TOP (10) idMensaje, fechaHoraRegistro, mensaje, destinatario, remitente " + + " FROM LAB_Mensaje (nolock) ORDER BY IDMENSAJE 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); + + conn.Close(); + conn.Dispose(); + return Ds.Tables[0]; + } + + } + + private int VerificaPermisos(string sObjeto) + { + int i_permiso = 0; + + Utility oUtil = new Utility(); + i_permiso = oUtil.VerificaPermisos((ArrayList)Session["s_permiso"], sObjeto); + return i_permiso; + + } + + protected void lnkUltimoNumeroSector_Click(object sender, EventArgs e) + { + Configuracion oCon = new Configuracion(); oCon = (Configuracion)oCon.Get(typeof(Configuracion), 1); + Response.Redirect("ProximoNumeroList.aspx?tipo="+ oCon.TipoNumeracionProtocolo.ToString(), false); + } + + protected void imgAgregarMensaje_Click(object sender, ImageClickEventArgs e) + { + Response.Redirect("MensajeEdit.aspx?Operacion=Alta", false); + + } + + protected void btnSeguimiento_Click(object sender, EventArgs e) + { + Response.Redirect("Seguimiento.aspx", false); + } + + protected void btnProtocoloEfector_Click(object sender, EventArgs e) + { CargarGrilla(); + //CargarGrillaSISA(); + gvProtocolosxEfector.Visible = true; ; + + } + + protected void btnSISA_Click(object sender, EventArgs e) + { CargarGrillaSISA(); + gvProtocolosxSISA.Visible = true; ; + + } + } +} diff --git a/WebLab/Principal2.aspx.designer.cs b/WebLab/Principal2.aspx.designer.cs new file mode 100644 index 00000000..49260d44 --- /dev/null +++ b/WebLab/Principal2.aspx.designer.cs @@ -0,0 +1,258 @@ +//------------------------------------------------------------------------------ +// +// 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 { + + + public partial class Principal2 { + + /// + /// ToolkitScriptManager1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::AjaxControlToolkit.ToolkitScriptManager ToolkitScriptManager1; + + /// + /// divAlerta control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl divAlerta; + + /// + /// lblAlerta control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblAlerta; + + /// + /// pnlInfoLogin control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel pnlInfoLogin; + + /// + /// lblInfoLogin control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblInfoLogin; + + /// + /// pnlTurno control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl pnlTurno; + + /// + /// pnlRecepcion control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl pnlRecepcion; + + /// + /// lblProximoProtocolo control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblProximoProtocolo; + + /// + /// lblProximoProtocolo1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblProximoProtocolo1; + + /// + /// lnkUltimoNumeroSector control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton lnkUltimoNumeroSector; + + /// + /// pnlProtocolo control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel pnlProtocolo; + + /// + /// pnlTurnoRecepcion control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel pnlTurnoRecepcion; + + /// + /// pnlSeguimiento control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl pnlSeguimiento; + + /// + /// seguimientoCovid control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebLab.seguimientoCovid seguimientoCovid; + + /// + /// Div1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl Div1; + + /// + /// btnProtocoloEfector control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnProtocoloEfector; + + /// + /// gvProtocolosxEfector control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.GridView gvProtocolosxEfector; + + /// + /// btnSISA control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnSISA; + + /// + /// gvProtocolosxSISA control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.GridView gvProtocolosxSISA; + + /// + /// Div2 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl Div2; + + /// + /// LinkButton1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton LinkButton1; + + /// + /// lnkCambioEfector control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton lnkCambioEfector; + + /// + /// mensajeria control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl mensajeria; + + /// + /// imgAgregarMensaje control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.ImageButton imgAgregarMensaje; + + /// + /// DataList1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.DataList DataList1; + + /// + /// pnlNuevoUsuario control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlGenericControl pnlNuevoUsuario; + + /// + /// PeticionList1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebLab.PeticionList PeticionList1; + } +} diff --git a/WebLab/Protocolos/Default2.aspx.cs b/WebLab/Protocolos/Default2.aspx.cs index 5eef41f4..02036277 100644 --- a/WebLab/Protocolos/Default2.aspx.cs +++ b/WebLab/Protocolos/Default2.aspx.cs @@ -654,20 +654,20 @@ protected void gvLista_RowCommand(object sender, GridViewCommandEventArgs e) else { // primero que valide renaper si es identificado y dsps al protocolo - Paciente oPac = new Paciente(); - oPac = (Paciente)oPac.Get(typeof(Paciente), int.Parse(e.CommandArgument.ToString())); - if ((oPac.IdEstado == 1) && (oC.ConectaRenaper)) //identificado - { - string m_sexo = ""; - switch (oPac.IdSexo) - { - case 1: m_sexo = "I"; break; - case 2: m_sexo = "F"; break; - case 3: m_sexo = "M"; break; - } - Response.Redirect("ProcesaRenaper.aspx?id=" + oPac.IdPaciente.ToString() + "&Tipo=" + ddlTipo.SelectedValue + "&dni=" + oPac.NumeroDocumento.ToString() + "&sexo=" + m_sexo + "&llamada=LaboProtocolo&idServicio=" + Request["idServicio"].ToString() + "&idUrgencia=" + Session["idUrgencia"].ToString()); - } - else + //Paciente oPac = new Paciente(); + //oPac = (Paciente)oPac.Get(typeof(Paciente), int.Parse(e.CommandArgument.ToString())); + //if ((oPac.IdEstado == 1) && (oC.ConectaRenaper)) //identificado + //{ + // string m_sexo = ""; + // switch (oPac.IdSexo) + // { + // case 1: m_sexo = "I"; break; + // case 2: m_sexo = "F"; break; + // case 3: m_sexo = "M"; break; + // } + // Response.Redirect("ProcesaRenaper.aspx?id=" + oPac.IdPaciente.ToString() + "&Tipo=" + ddlTipo.SelectedValue + "&dni=" + oPac.NumeroDocumento.ToString() + "&sexo=" + m_sexo + "&llamada=LaboProtocolo&idServicio=" + Request["idServicio"].ToString() + "&idUrgencia=" + Session["idUrgencia"].ToString()); + //} + //else Response.Redirect(s_pagina + "?idPaciente=" + e.CommandArgument + "&Operacion=Alta&idServicio=" + Request["idServicio"].ToString() + nrocaso); } diff --git a/WebLab/Protocolos/ProtocoloEdit2.aspx.cs b/WebLab/Protocolos/ProtocoloEdit2.aspx.cs index eaf27320..b9418962 100644 --- a/WebLab/Protocolos/ProtocoloEdit2.aspx.cs +++ b/WebLab/Protocolos/ProtocoloEdit2.aspx.cs @@ -1407,16 +1407,19 @@ private void CargarListas() ///Carga de grupos de numeración solo si el tipo de numeración es 2: por Grupos string str_condicion = ")"; + str_condicion = " and fechaDesde<=getdate() and (fechaHasta='19000101' or fechahasta>getdate()) ))"; if ((Request["Operacion"].ToString() == "Modifica") && (Request["idProtocolo"]!=null)) - str_condicion = " or exists (select 1 from LAB_Protocolo p WHERE p.idsector = s.idSectorServicio and idProtocolo = " + Request["idProtocolo"].ToString() + ")) "; - + str_condicion += " or exists (select 1 from LAB_Protocolo p WHERE p.idsector = s.idSectorServicio and idProtocolo = " + Request["idProtocolo"].ToString() + ") "; + + string m_ssql = @"SELECT s.idSectorServicio, s.prefijo + ' - ' + s.nombre as nombre FROM LAB_SectorServicio S with (nolock) WHERE (baja = 0) - and ( exists (select 1 from Lab_SectorServicioEfector SE where SE.idSectorServicio=S.idSectorServicio and se.idefector="+oUser.IdEfector.IdEfector.ToString()+@" )" + str_condicion +@" order by nombre"; + and ( exists (select 1 from Lab_SectorServicioEfector SE + where SE.idSectorServicio=S.idSectorServicio and se.idefector="+oUser.IdEfector.IdEfector.ToString()+ str_condicion +@" order by nombre"; //oUtil.CargarCombo(ddlSectorServicio, m_ssql, "idSectorServicio", "nombre", connReady); - cacheKey = $"CAT_Servicio_{oUser.IdEfector.IdEfector}_{Session["idServicio"]}"; + cacheKey = $"CAT_Servicio_{oUser.IdEfector.IdEfector}_{Request["idServicio"]}"; Business.Helpers.ComboCache.CargarCombo(ddlSectorServicio, cacheKey, m_ssql, "idSectorServicio", "nombre", connReady); ddlSectorServicio.Items.Insert(0, new ListItem("Seleccione", "0")); @@ -1442,8 +1445,9 @@ private void CargarListas() //oUtil.CargarCombo(ddlImpresora, m_ssql, "nombre", "nombre"); // oUtil.CargarCombo(ddlImpresoraEtiqueta, m_ssql, "nombre", "nombre", connReady); - - cacheKey = $"CAT_ImpresoraEtiqueta_{oUser.IdEfector.IdEfector}_{Session["idServicio"]}"; + + // cacheKey = $"CAT_ImpresoraEtiqueta_{oUser.IdEfector.IdEfector}_{Session["idServicio"]}"; + cacheKey = $"CAT_ImpresoraEtiqueta_{oUser.IdEfector.IdEfector}"; Business.Helpers.ComboCache.CargarCombo(ddlImpresoraEtiqueta, cacheKey, m_ssql, "nombre", "nombre", connReady); ddlImpresoraEtiqueta.Items.Insert(0, new ListItem("Seleccione impresora", "0")); @@ -2096,7 +2100,8 @@ private void EnviarEquipo(Protocolo oRegistro) { if ((oRegistro.IdTipoServicio.IdTipoServicio == 3) && (oRegistro.IdEfector.IdEfector == 205 || - oRegistro.IdEfector.IdEfector == 221)) + oRegistro.IdEfector.IdEfector == 221 || + oRegistro.IdEfector.IdEfector == 33)) { SqlConnection conn = (SqlConnection) diff --git a/WebLab/Protocolos/ProtocoloList.aspx b/WebLab/Protocolos/ProtocoloList.aspx index cefc3dc1..7133e563 100644 --- a/WebLab/Protocolos/ProtocoloList.aspx +++ b/WebLab/Protocolos/ProtocoloList.aspx @@ -455,7 +455,7 @@ onpageindexchanging="gvListaProducto_PageIndexChanging" onrowcommand="gvListaProducto_RowCommand" onrowdatabound="gvListaProducto_RowDataBound" PageSize="20" Width="100%" GridLines="Horizontal" BackColor="White"> - + @@ -538,17 +538,17 @@ - - + + - - + + diff --git a/WebLab/Protocolos/ProtocoloList.aspx.cs b/WebLab/Protocolos/ProtocoloList.aspx.cs index 357e5016..44182b7c 100644 --- a/WebLab/Protocolos/ProtocoloList.aspx.cs +++ b/WebLab/Protocolos/ProtocoloList.aspx.cs @@ -222,7 +222,7 @@ private void CargarListas() { Utility oUtil = new Utility(); string connReady = ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString; ///Performance: conexion de solo lectura - + string cacheKey = ""; if (Request["idServicio"] != null) Session["idServicio"] = Request["idServicio"].ToString(); @@ -268,11 +268,12 @@ private void CargarListas() if (Request["Tipo"].ToString() == "ListadoDiario") { ddlServicio.Items.Insert(0, new ListItem("-- Todos --", "0")); ddlServicio.Enabled = false; } - - m_ssql = "SELECT idArea, nombre FROM LAB_Area with (nolock) where baja=0 order by nombre "; - string cacheKey = "CAT_Area"; - Business.Helpers.ComboCache.CargarCombo(ddlArea, cacheKey, m_ssql, "idArea", "nombre", connReady); - + if (Request["Tipo"].ToString() != "ListaProducto") // si es no paciente no se cargan las areas + { + m_ssql = "SELECT idArea, nombre FROM LAB_Area with (nolock) where baja=0 order by nombre "; + cacheKey = "CAT_Area"; + Business.Helpers.ComboCache.CargarCombo(ddlArea, cacheKey, m_ssql, "idArea", "nombre", connReady); + } ///oUtil.CargarCombo(ddlArea, m_ssql, "idArea", "nombre", connReady); ddlArea.Items.Insert(0, new ListItem("--Todas--", "0")); @@ -280,29 +281,37 @@ private void CargarListas() ddlOrden.SelectedValue = oC.TipoOrdenProtocolo; + //////////////////////////Carga de combos de ObraSocial////////////////////////////////////////// - m_ssql = "select distinct nombreObraSocial as nombre from LAB_Protocolo with (nolock) where baja=0 and idEfector=" + oUser.IdEfector.IdEfector.ToString()+" order by nombreObraSocial "; - ///oUtil.CargarCombo(ddlObraSocial, m_ssql, "nombre", "nombre", connReady); - cacheKey = $"CAT_OS_{oUser.IdEfector.IdEfector}"; - Business.Helpers.ComboCache.CargarCombo(ddlObraSocial, cacheKey, m_ssql, "nombre", "nombre", connReady); + if (Request["Tipo"].ToString() != "ListaProducto") // si es no paciente no se cargan las obras sociales + { + m_ssql = "select distinct nombreObraSocial as nombre from LAB_Protocolo with (nolock) where baja=0 and idEfector=" + oUser.IdEfector.IdEfector.ToString() + " order by nombreObraSocial "; + ///oUtil.CargarCombo(ddlObraSocial, m_ssql, "nombre", "nombre", connReady); + cacheKey = $"CAT_OS_{oUser.IdEfector.IdEfector}"; + Business.Helpers.ComboCache.CargarCombo(ddlObraSocial, cacheKey, m_ssql, "nombre", "nombre", connReady); + + } ddlObraSocial.Items.Insert(0, new ListItem("--Todos--", "0")); ////////////////////////////////////////////////////////////////////////////////////////////////// - - ///Carga de combos de Origen - m_ssql = "SELECT idOrigen, nombre FROM LAB_Origen with (nolock) WHERE (baja = 0)"; - ///oUtil.CargarCombo(ddlOrigen, m_ssql, "idOrigen", "nombre", connReady); - cacheKey = "CAT_Origen"; - Business.Helpers.ComboCache.CargarCombo(ddlOrigen, cacheKey, m_ssql, "idOrigen", "nombre", connReady); - + if (Request["Tipo"].ToString() != "ListaProducto") // si es no paciente no se carga + { + ///Carga de combos de Origen + m_ssql = "SELECT idOrigen, nombre FROM LAB_Origen with (nolock) WHERE (baja = 0)"; + ///oUtil.CargarCombo(ddlOrigen, m_ssql, "idOrigen", "nombre", connReady); + cacheKey = "CAT_Origen"; + Business.Helpers.ComboCache.CargarCombo(ddlOrigen, cacheKey, m_ssql, "idOrigen", "nombre", connReady); + } ddlOrigen.Items.Insert(0, new ListItem("-- Todos --", "0")); - - ///Carga de combos de Prioridad - m_ssql = "SELECT idPrioridad, nombre FROM LAB_Prioridad with (nolock) WHERE (baja = 0)"; - //oUtil.CargarCombo(ddlPrioridad, m_ssql, "idPrioridad", "nombre", connReady); - cacheKey = "CAT_Prioridad"; - Business.Helpers.ComboCache.CargarCombo(ddlPrioridad, cacheKey, m_ssql, "idPrioridad", "nombre", connReady); + ///Carga de combos de Prioridad + if (Request["Tipo"].ToString() != "ListaProducto") // si es no paciente no se carga + { + m_ssql = "SELECT idPrioridad, nombre FROM LAB_Prioridad with (nolock) WHERE (baja = 0)"; + //oUtil.CargarCombo(ddlPrioridad, m_ssql, "idPrioridad", "nombre", connReady); + cacheKey = "CAT_Prioridad"; + Business.Helpers.ComboCache.CargarCombo(ddlPrioridad, cacheKey, m_ssql, "idPrioridad", "nombre", connReady); + } ddlPrioridad.Items.Insert(0, new ListItem("-- Todos --", "0")); if (Request["idServicio"].ToString() == "6") { lblPrioridad.Visible = false; @@ -320,15 +329,7 @@ private void CargarListas() Business.Helpers.ComboCache.CargarCombo(ddlEfectorSolicitante, cacheKey, m_ssql, "idEfector", "nombre", connReady); // oUtil.CargarCombo(ddlEfectorSolicitante, m_ssql, "idEfector", "nombre", connReady); ddlEfectorSolicitante.Items.Insert(0, new ListItem("-- Todos --", "0")); - - - - /////Carga de combos de Medicos Solicitantes - //m_ssql = "SELECT idProfesional, apellido + ' ' + nombre AS nombre FROM Sys_Profesional ORDER BY apellido, nombre "; - //oUtil.CargarCombo(ddlEspecialista, m_ssql, "idProfesional", "nombre"); - //ddlEspecialista.Items.Insert(0, new ListItem("-- Todos --", "0")); - - + if (Request["idServicio"].ToString() != "1")//microbiologia o pesquisa { @@ -370,30 +371,30 @@ private void CargarListas() if ((Request["Tipo"].ToString() == "ListadoOrdenado")|| (Request["Tipo"].ToString() == "ListadoDiario")) { - if (oC != null) - { - if (oC.esMultiEFector()) - { + //if (oC != null) + //{ + // if (oC.esMultiEFector()) + // { pnlImpresora.Visible = false; ddlImpresora.Visible = false; lnkImprimir.Visible = false; - } - else - { - m_ssql = "SELECT idImpresora, nombre FROM LAB_Impresora with (nolock) "; - oUtil.CargarCombo(ddlImpresora, m_ssql, "nombre", "nombre", connReady); - if (Session["Impresora"] != null) ddlImpresora.SelectedValue = Session["Impresora"].ToString(); - pnlImpresora.Visible = true; - - if (ddlImpresora.Items.Count == 0) - { - ddlImpresora.Visible = false; - lnkImprimir.Visible = false; - - - } - } - } + // } + // else + // { + // m_ssql = "SELECT idImpresora, nombre FROM LAB_Impresora with (nolock) "; + // oUtil.CargarCombo(ddlImpresora, m_ssql, "nombre", "nombre", connReady); + // if (Session["Impresora"] != null) ddlImpresora.SelectedValue = Session["Impresora"].ToString(); + // pnlImpresora.Visible = true; + + // if (ddlImpresora.Items.Count == 0) + // { + // ddlImpresora.Visible = false; + // lnkImprimir.Visible = false; + + + // } + // } + //} } /////////////////////////////////////// @@ -655,13 +656,12 @@ private string getListaItem() string m_lista = ""; for (int i = 0; i < lstItem.Items.Count; i++) { - //if (lstItem.Items[i].Selected) - //{ + if (m_lista == "") m_lista = lstItem.Items[i].Value; else m_lista += "," + lstItem.Items[i].Value; - //} + } @@ -1088,11 +1088,7 @@ private void ImprimirListado(string tipo) catch (Exception ex) { string exception = ""; - //while (ex != null) - //{ - // exception = ex.Message + "
    "; - - //} + string popupScript = ""; Page.RegisterStartupScript("PopupScript", popupScript); } @@ -1421,29 +1417,7 @@ private void dataTableAExcel(DataTable tabla, string nombreArchivo) { if (tabla.Rows.Count > 0) { - Utility.ExportDataTableToXlsx(tabla, nombreArchivo); - //StringBuilder sb = new StringBuilder(); - //StringWriter sw = new StringWriter(sb); - //HtmlTextWriter htw = new HtmlTextWriter(sw); - //Page pagina = new Page(); - //HtmlForm form = new HtmlForm(); - //GridView dg = new GridView(); - //dg.EnableViewState = false; - //dg.DataSource = tabla; - //dg.DataBind(); - //pagina.EnableEventValidation = false; - //pagina.DesignerInitialize(); - //pagina.Controls.Add(form); - //form.Controls.Add(dg); - //pagina.RenderControl(htw); - //Response.Clear(); - //Response.Buffer = true; - //Response.ContentType = "application/vnd.ms-excel"; - //Response.AddHeader("Content-Disposition", "attachment;filename=" + nombreArchivo + ".xls"); - //Response.Charset = "UTF-8"; - //Response.ContentEncoding = Encoding.Default; - //Response.Write(sb.ToString()); - //Response.End(); + Utility.ExportDataTableToXlsx(tabla, nombreArchivo); } } @@ -1582,11 +1556,7 @@ protected void gvListaProducto_RowDataBound(object sender, GridViewRowEventArgs CmdEliminar.Visible = false; CmdModificar.ToolTip = "Consultar"; } - //if (e.Row.Cells[16].Text == "1") // tiene Adjunto - // e.Row.Cells[15].BackColor = System.Drawing.Color.Green; - - //Configuracion oCon = new Configuracion(); oCon = (Configuracion)oCon.Get(typeof(Configuracion), 1); - //oCon = (Configuracion)oCon.Get(typeof(Configuracion), "IdConfiguracion", 1); + if (oC != null) { diff --git a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs index 2bdf6e4f..1e00bf49 100644 --- a/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs +++ b/WebLab/Protocolos/ProtocoloProductoEdit.aspx.cs @@ -460,17 +460,17 @@ private string VerEstado(Protocolo oRegistro) private void CargarListas() { Utility oUtil = new Utility(); - + int idServicio = 5; string connReady = ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString; ///Performance: conexion de solo lectura ///Carga de combos de tipos de servicios - TipoServicio oServicio = new TipoServicio(); oServicio =(TipoServicio) oServicio.Get(typeof(TipoServicio), 5); + TipoServicio oServicio = new TipoServicio(); oServicio =(TipoServicio) oServicio.Get(typeof(TipoServicio), idServicio); lblServicio.Text = oServicio.Nombre + " NUEVO PROTOCOLO " ; lblServicio1.Text = "PROTOCOLO DE " + oServicio.Nombre.ToUpper(); - - + + ///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); @@ -478,15 +478,21 @@ private void CargarListas() string str_condicion = ")"; + str_condicion = " and fechaDesde<=getdate() and (fechaHasta='19000101' or fechahasta>getdate()) ))"; if ((Request["Operacion"].ToString() == "Modifica") && (Request["idProtocolo"] != null)) - str_condicion = " or exists (select 1 from LAB_Protocolo p WHERE p.idsector = s.idSectorServicio and idProtocolo = " + Request["idProtocolo"].ToString() + ")) "; + str_condicion += " or exists (select 1 from LAB_Protocolo p with (nolock) WHERE p.idsector = s.idSectorServicio and idProtocolo = " + Request["idProtocolo"].ToString() + ") "; + string m_ssql = @"SELECT s.idSectorServicio, s.prefijo + ' - ' + s.nombre as nombre FROM LAB_SectorServicio S with (nolock) WHERE (baja = 0) - and ( exists (select 1 from Lab_SectorServicioEfector SE where SE.idSectorServicio=S.idSectorServicio and se.idefector=" + oUser.IdEfector.IdEfector.ToString() + @" )" + str_condicion + @" order by nombre"; + and ( exists (select 1 from Lab_SectorServicioEfector SE with (nolock) + where SE.idSectorServicio=S.idSectorServicio and se.idefector=" + oUser.IdEfector.IdEfector.ToString() + str_condicion + @" order by nombre"; + //oUtil.CargarCombo(ddlSectorServicio, m_ssql, "idSectorServicio", "nombre", connReady); + string cacheKey = $"CAT_Servicio_{oUser.IdEfector.IdEfector}_{idServicio}"; + Business.Helpers.ComboCache.CargarCombo(ddlSectorServicio, cacheKey, m_ssql, "idSectorServicio", "nombre", connReady); - oUtil.CargarCombo(ddlSectorServicio, m_ssql, "idSectorServicio", "nombre", connReady); + // oUtil.CargarCombo(ddlSectorServicio, m_ssql, "idSectorServicio", "nombre", connReady); ddlSectorServicio.Items.Insert(0, new ListItem("Seleccione", "0")); /////////////////////////////////////////////CODIGO DE BARRAS////////////////////////////////////////////////////////////////////// tab3Titulo.Visible = false; @@ -508,8 +514,10 @@ private void CargarListas() if (oConfiguracion.Habilitado) { m_ssql = "SELECT idImpresora, nombre FROM LAB_Impresora with (nolock) where idEfector=" + oUser.IdEfector.IdEfector.ToString() + " order by nombre"; //MultiEfector - //oUtil.CargarCombo(ddlImpresora, m_ssql, "nombre", "nombre"); - oUtil.CargarCombo(ddlImpresoraEtiqueta, m_ssql, "nombre", "nombre", connReady); + + cacheKey = $"CAT_ImpresoraEtiqueta_{oUser.IdEfector.IdEfector}"; + Business.Helpers.ComboCache.CargarCombo(ddlImpresoraEtiqueta, cacheKey, m_ssql, "nombre", "nombre", connReady); //oUtil.CargarCombo(ddlImpresora, m_ssql, "nombre", "nombre"); + // oUtil.CargarCombo(ddlImpresoraEtiqueta, m_ssql, "nombre", "nombre", connReady); ddlImpresoraEtiqueta.Items.Insert(0, new ListItem("Seleccione impresora", "0")); @@ -575,13 +583,14 @@ inner join lab_item P with (nolock) on dp.idsubitem = p.iditem ///Carga de conservacion m_ssql = " select idConservacion, descripcion from lab_conservacion with (nolock) where baja=0 order by descripcion"; - oUtil.CargarCombo(ddlConservacion, m_ssql, "idConservacion", "descripcion", connReady); + cacheKey = $"CAT_Conservacion"; + Business.Helpers.ComboCache.CargarCombo(ddlConservacion, cacheKey, m_ssql, "idConservacion", "descripcion", connReady); + ///oUtil.CargarCombo(ddlConservacion, m_ssql, "idConservacion", "descripcion", connReady); ddlConservacion.Items.Insert(0, new ListItem("Seleccione", "0")); ////////////Carga de combos de Efector ////////////Carga de combos de Efector m_ssql = "SELECT idEfector, nombre FROM sys_Efector E with (nolock) "; - //if (Request["Operacion"].ToString() != "Modifica") //alta m_ssql += " where exists (select 1 from LAB_EfectorRelacionado R with (nolock) where E.idEfector = R.idEfectorRel and R.idefector = " + oUser.IdEfector.IdEfector.ToString() + ") or (E.idEfector=" + oC.IdEfector.IdEfector.ToString() + @" )"; @@ -833,7 +842,8 @@ private void EnviarEquipo(Protocolo oRegistro) { if ((oRegistro.IdTipoServicio.IdTipoServicio ==5) && (oRegistro.IdEfector.IdEfector == 205 || - oRegistro.IdEfector.IdEfector == 221)) + oRegistro.IdEfector.IdEfector == 221 || + oRegistro.IdEfector.IdEfector == 33)) { SqlConnection conn = (SqlConnection) @@ -1087,7 +1097,7 @@ private bool Guardar(Business.Data.Laboratorio.Protocolo oRegistro) oRegistro.FechaTomaMuestra = DateTime.Parse("01/01/1900"); //DateTime.Parse(txtFechaEntrega.Value); oRegistro.IdEfectorSolicitante = (Efector)oEfector.Get(typeof(Efector), int.Parse(ddlEfector.SelectedValue)); - oRegistro.Notificarresultado = false; + // oRegistro.Notificarresultado = false; diff --git a/WebLab/Resultados/AntecedentesAnalisisView.aspx b/WebLab/Resultados/AntecedentesAnalisisView.aspx index 50330871..87f63b7a 100644 --- a/WebLab/Resultados/AntecedentesAnalisisView.aspx +++ b/WebLab/Resultados/AntecedentesAnalisisView.aspx @@ -33,23 +33,22 @@ -
    +
    - -
    + + -
    - -
    +
    +
    diff --git a/WebLab/Resultados/ObservacionesEdit.aspx.cs b/WebLab/Resultados/ObservacionesEdit.aspx.cs index 6d9da4d7..dfdebe2b 100644 --- a/WebLab/Resultados/ObservacionesEdit.aspx.cs +++ b/WebLab/Resultados/ObservacionesEdit.aspx.cs @@ -12,6 +12,7 @@ using NHibernate; using System.Collections; using NHibernate.Expression; +using System.Configuration; namespace WebLab.Resultados { @@ -24,6 +25,7 @@ protected void Page_Load(object sender, EventArgs e) if (!Page.IsPostBack) { + string connReady = ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString; ///Performance: conexion de solo lectura txtObservacionAnalisis.Focus(); string s_idDetalleProtocolo = Request["idDetalleProtocolo"].ToString(); DetalleProtocolo oDetalle = new DetalleProtocolo(); @@ -31,13 +33,19 @@ protected void Page_Load(object sender, EventArgs e) lblObservacionAnalisis.Text = oDetalle.IdSubItem.Nombre; Utility oUtil = new Utility(); - + string idServicio = Request["idTipoServicio"].ToString(); + string idServicioFiltro = idServicio; + if (idServicio == "5") + idServicioFiltro = "1,3"; + + string m_ssql = @" SELECT idObservacionResultado , codigo AS descripcion - FROM LAB_ObservacionResultado -with (nolock) where idTipoServicio=" + Request["idTipoServicio"].ToString()+" and baja=0 order by codigo " ; + FROM LAB_ObservacionResultado with (nolock) where idTipoServicio in (" + idServicioFiltro + ") and baja=0 order by codigo " ; + string cacheKey = $"CAT_Observ_{idServicio}"; + Business.Helpers.ComboCache.CargarCombo(ddlObservacionesCodificadas, cacheKey, m_ssql, "idObservacionResultado", "descripcion", connReady); - oUtil.CargarCombo(ddlObservacionesCodificadas, m_ssql, "idObservacionResultado", "descripcion"); + // oUtil.CargarCombo(ddlObservacionesCodificadas, m_ssql, "idObservacionResultado", "descripcion"); ddlObservacionesCodificadas.Items.Insert(0, new ListItem("", "0")); txtObservacionAnalisis.Text=oDetalle.Observaciones; diff --git a/WebLab/Resultados/ResultadoBusqueda.aspx b/WebLab/Resultados/ResultadoBusqueda.aspx index 3308c332..569f4cb6 100644 --- a/WebLab/Resultados/ResultadoBusqueda.aspx +++ b/WebLab/Resultados/ResultadoBusqueda.aspx @@ -197,10 +197,7 @@ - <%-- *--%> - + antecedentesDict = null; - - //if ((s_operacion == "Valida") || (s_operacion == "Control")) - //{ - // antecedentesDict = ObtenerAntecedentes( Ds.Tables[0], int.Parse(p)); - //} + // CARO PF: traer antecedentes anteriores de todos los subitems en una sola consulta string key = "ResultadosAnteriores_" + p; - Dictionary resultadosAnteriores = HttpContext.Current.Cache[key] as Dictionary; - if ((s_operacion == "Valida") || (s_operacion == "Control")) - { - if (resultadosAnteriores == null) + + + if (mostrarResultadosAnteriores) + ///if ((s_operacion == "Valida") || (s_operacion == "Control")) { - Protocolo oRegistro = new Protocolo(); - oRegistro = (Protocolo)oRegistro.Get(typeof(Business.Data.Laboratorio.Protocolo), int.Parse(p)); - resultadosAnteriores = oRegistro.ObtenerResultadosAnteriores(conexion); - HttpContext.Current.Cache.Insert( - key, - resultadosAnteriores, - null, - DateTime.Now.AddMinutes(15), - System.Web.Caching.Cache.NoSlidingExpiration); + if (resultadosAnteriores == null) + { + Protocolo oRegistro = new Protocolo(); + oRegistro = (Protocolo)oRegistro.Get(typeof(Business.Data.Laboratorio.Protocolo), int.Parse(p)); + resultadosAnteriores = oRegistro.ObtenerResultadosAnteriores(conexion); + HttpContext.Current.Cache.Insert( + key, + resultadosAnteriores, + null, + DateTime.Now.AddMinutes(15), + System.Web.Caching.Cache.NoSlidingExpiration); + } } - } + //Fin antecednetes for (int i = 0; i < Ds.Tables[0].Rows.Count; i++) @@ -1353,10 +1360,10 @@ Se graba en cache para evitar buscar los antecedentes en cad postback TableCell objCellPersona = new TableCell(); TableCell objCellObservaciones = new TableCell(); TableCell objCellImagenes = new TableCell(); - objCellResultadoAnterior.Width= Unit.Pixel(80); + objCellResultadoAnterior.Width= Unit.Pixel(100); objCellUnMedida.Width = Unit.Pixel(60); - objCellImagenes.Width = Unit.Pixel(60); - objCellObservaciones.Width = Unit.Pixel(60); + objCellImagenes.Width = Unit.Pixel(50); + objCellObservaciones.Width = Unit.Pixel(50); decimal x = 0; if ((m_hijo != m_titulo)&& (m_nombre!=m_titulo)) ///poner titulo de la practica { @@ -1557,10 +1564,11 @@ Se graba en cache para evitar buscar los antecedentes en cad postback txt1.ToolTip = Ds.Tables[0].Rows[i].ItemArray[4].ToString(); if (m_conResultado == "False") txt1.Text = m_resultadoDefecto; //////////////////// - if ((s_operacion == "Valida") || (s_operacion == "Control")) - { - if (s_idTiposervicio != "5") - { //Caro Performance: se comenta por defecto la busqueda del resultado anterior + //if ((s_operacion == "Valida") || (s_operacion == "Control")) + //{ + // if (s_idTiposervicio != "5") + if (mostrarResultadosAnteriores) + { //Caro Performance: se comenta por defecto la busqueda del resultado anterior string resultadoAnterior = "";// oDetalle.BuscarResultadoAnterior(oDetalle.IdSubItem, oDetalle.IdItem, true); // resultadoAnterior = oDetalle.BuscarResultadoAnterior(oDetalle.IdSubItem, oDetalle.IdItem, true); @@ -1584,7 +1592,7 @@ Se graba en cache para evitar buscar los antecedentes en cad postback objCellResultadoAnterior.Controls.Add(olblResultadoAnterior); } } - } + //} //Boton de desplegar y/o ocultar las opciones predefinidas para elegir. Anthem.ImageButton btnAddDetalle = new Anthem.ImageButton(); @@ -1737,10 +1745,11 @@ Se graba en cache para evitar buscar los antecedentes en cad postback ddl1.EnableViewState = false; objCellResultado.Controls.Add(ddl1); //////////////////// - if ((s_operacion == "Valida") || (s_operacion == "Control")) - { - if (s_idTiposervicio != "5") - { //Caro Performance: se comenta por defecto la busqueda del resultado anterior + //if ((s_operacion == "Valida") || (s_operacion == "Control")) + //{ + // if (s_idTiposervicio != "5") + if (mostrarResultadosAnteriores) + { //Caro Performance: se comenta por defecto la busqueda del resultado anterior string resultadoAnterior = "";// oDetalle.BuscarResultadoAnterior(oDetalle.IdSubItem, oDetalle.IdItem, true); //if (chkMostrarResultadosAnteriores.Checked) // resultadoAnterior = oDetalle.BuscarResultadoAnterior(oDetalle.IdSubItem, oDetalle.IdItem, true); @@ -1765,7 +1774,7 @@ Se graba en cache para evitar buscar los antecedentes en cad postback objCellResultadoAnterior.Controls.Add(olblResultadoAnterior); } } - } + //} ////Otra forma de observacion ImageButton btnObservacionDetalle2 = new ImageButton(); btnObservacionDetalle2.TabIndex = short.Parse("500"); @@ -1907,10 +1916,11 @@ Se graba en cache para evitar buscar los antecedentes en cad postback objCellResultado.Controls.Add(ochkFormula); } - if ((s_operacion == "Valida") || (s_operacion == "Control")) + //if ((s_operacion == "Valida") || (s_operacion == "Control")) + //{ + // if (s_idTiposervicio != "5") + if (mostrarResultadosAnteriores) { - if (s_idTiposervicio != "5") - { ///Caro Performance: sacar busqueda de resultado anterior en una version simplificada string resultadoAnterior = "";// oDetalle.BuscarResultadoAnterior(oDetalle.IdSubItem, oDetalle.IdItem, true); //if (chkMostrarResultadosAnteriores.Checked) @@ -1936,7 +1946,7 @@ Se graba en cache para evitar buscar los antecedentes en cad postback objCellResultadoAnterior.Controls.Add(olblResultadoAnterior); } } - } + //} RegularExpressionValidator oValidaNumero = new RegularExpressionValidator(); oValidaNumero.ValidationExpression = expresionControlDecimales; @@ -2141,10 +2151,11 @@ Se graba en cache para evitar buscar los antecedentes en cad postback objCellResultado.Controls.Add(olbl); } //////////////////// - if ((s_operacion == "Valida") || (s_operacion == "Control")) - { - if (s_idTiposervicio != "5") - { ///Caro Performance: sacar busqueda en modo simplificado + //if ((s_operacion == "Valida") || (s_operacion == "Control")) + //{ + // if (s_idTiposervicio != "5") + if (mostrarResultadosAnteriores) + { ///Caro Performance: sacar busqueda en modo simplificado string resultadoAnterior = ""; // oDetalle.BuscarResultadoAnterior(oDetalle.IdSubItem, oDetalle.IdItem, true); //if (chkMostrarResultadosAnteriores.Checked) // resultadoAnterior = oDetalle.BuscarResultadoAnterior(oDetalle.IdSubItem, oDetalle.IdItem, true); @@ -2169,7 +2180,7 @@ Se graba en cache para evitar buscar los antecedentes en cad postback objCellResultadoAnterior.Controls.Add(olblResultadoAnterior); } } - } + //} } // fin case break; @@ -2303,7 +2314,9 @@ Se graba en cache para evitar buscar los antecedentes en cad postback ///agrega a la fila cada una de las celdas objFila.Cells.Add(objCellAnalisis); objFila.Cells.Add(objCellResultado); - if ((s_operacion == "Valida") || (s_operacion == "Control")) objFila.Cells.Add(objCellResultadoAnterior); + if (mostrarResultadosAnteriores) //if ((s_operacion == "Valida") || (s_operacion == "Control")) + objFila.Cells.Add(objCellResultadoAnterior); + if (s_operacion != "HC") objFila.Cells.Add(objCellUnMedida); objFila.Cells.Add(objCellValoresReferencia); @@ -2342,9 +2355,11 @@ private void CargarListasObservaciones(string tipo) Utility oUtil = new Utility(); string connReady = ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString; ///Performance: conexion de solo lectura string idServicio = Request["idServicio"].ToString(); - + string idServiciofiltro = idServicio; + if (idServiciofiltro == "5") + idServiciofiltro = "1,3"; string m_ssql = @" SELECT idObservacionResultado , codigo AS descripcion - FROM LAB_ObservacionResultado with (nolock) where idTipoServicio=" + idServicio + " and baja=0 order by codigo " ; + FROM LAB_ObservacionResultado with (nolock) where idTipoServicio in (" + idServiciofiltro + ") and baja=0 order by codigo " ; if (tipo == "gral") @@ -3083,7 +3098,7 @@ private void Guardar(Protocolo oProtocolo, bool imprimir, bool todo) oProtocolo.Estado = 2; //validado total (cerrado); //oProtocolo.ActualizarResultados(Request["Operacion"].ToString(), int.Parse(Session["idUsuario"].ToString())); - if (!oProtocolo.Notificarresultado) + if ((!oProtocolo.Notificarresultado) && (oProtocolo.IdTipoServicio.IdTipoServicio!=5))//no aplica para no pacientes. oProtocolo.Estado = 3; //Acceso Restringido } else @@ -3101,7 +3116,7 @@ private void Guardar(Protocolo oProtocolo, bool imprimir, bool todo) oProtocolo.Estado = 2; //if (oProtocolo.IdTipoServicio.IdTipoServicio==3) oProtocolo.exportarDatos(); oProtocolo.GrabarAuditoriaProtocolo("Terminado", int.Parse(Session["idUsuario"].ToString())); // agrego auditoria de cierre de protocolo - if (!oProtocolo.Notificarresultado) + if ((!oProtocolo.Notificarresultado) && (oProtocolo.IdTipoServicio.IdTipoServicio != 5))//no aplica para no pacientes. oProtocolo.Estado = 3; //Acceso Restringido } @@ -3223,28 +3238,19 @@ private void GuardarResultado(string m_idItem, string valorItem , Protocolo oPro } if ((Request["Operacion"].ToString() == "Valida") && (!oDetalle.Informable)) //Validacion - { - - - + { if (oDetalle.ConResultado) { - string res = valorItem; - - oDetalle.IdUsuarioResultado = int.Parse(oUser.IdUsuario.ToString()); oDetalle.FechaResultado = DateTime.Now; - - - oDetalle.Save(); if (oDetalle.ConResultado) oDetalle.GrabarAuditoriaDetalleProtocolo("Carga", int.Parse(oUser.IdUsuario.ToString())); } } - if ((Request["Operacion"].ToString() == "Valida") && (oDetalle.Informable)) //Validacion - { string operacion = "Valida"; - + if ((Request["Operacion"].ToString() == "Valida") && (oDetalle.Informable)) //Validacion + { + string operacion = "Valida"; if (oDetalle.ConResultado) { @@ -3273,15 +3279,12 @@ private void GuardarResultado(string m_idItem, string valorItem , Protocolo oPro oDetalle.IdUsuarioImpresion = int.Parse(oUser.IdUsuario.ToString()); oDetalle.FechaImpresion = DateTime.Now; } - Notificar(oDetalle); - } } else - { - - oDetalle.IdUsuarioValida = int.Parse(oUser.IdUsuario.ToString()); + { + oDetalle.IdUsuarioValida = int.Parse(oUser.IdUsuario.ToString()); oDetalle.FechaValida = DateTime.Now; if (marcarImpresion) @@ -3291,7 +3294,7 @@ private void GuardarResultado(string m_idItem, string valorItem , Protocolo oPro } // if ((oDetalle.IdItem.Codigo == oCon.CodigoCovid) && (oDetalle.IdProtocolo.IdPaciente.IdPaciente > 0)) - Notificar(oDetalle); + Notificar(oDetalle); } oDetalle.Save(); @@ -4794,7 +4797,7 @@ protected void btnBorrarObsCodificadaGral_Click(object sender, EventArgs e) } - + protected void btnAgregarObsCodificadaGral_Click(object sender, EventArgs e) { if (ddlObsCodificadaGeneral.Text != "") diff --git a/WebLab/Resultados/ResultadoItemEdit.aspx.cs b/WebLab/Resultados/ResultadoItemEdit.aspx.cs index 20e53939..ebfaab7a 100644 --- a/WebLab/Resultados/ResultadoItemEdit.aspx.cs +++ b/WebLab/Resultados/ResultadoItemEdit.aspx.cs @@ -139,6 +139,9 @@ private void Inicializar() break; } + + if (Request["idServicio"].ToString() == "5") + btnMostrarResultados.Visible = false; //no se muestran resultados anteriores en no paciente } private void CargarObservaciones() @@ -172,7 +175,9 @@ private void LlenarTabla(string p) Item oItem = new Item(); oItem = (Item)oItem.Get(typeof(Item), int.Parse(p)); - + bool mostrarResultadoAnterior = + Request["Operacion"].ToString() == "Valida" && + Request["idServicio"].ToString() != "5"; /// bool hiv = oItem.CodificaHiv; DataTable dt = getDataSet(oItem.IdItem.ToString()); @@ -202,7 +207,10 @@ private void LlenarTabla(string p) objCellFecha_TITULO.Controls.Add(lblTituloFecha); Label lblTituloPaciente = new Label(); - lblTituloPaciente.Text = "PACIENTE"; + if (Request["idServicio"].ToString() != "5") + lblTituloPaciente.Text = "PACIENTE"; + else + lblTituloPaciente.Text = "DESCRIPCION"; objCellPaciente_TITULO.Controls.Add(lblTituloPaciente); Label lblTituloResultado = new Label(); @@ -213,10 +221,12 @@ private void LlenarTabla(string p) lblTituloObservacionesResultado.Text = "OBS."; objCellObservaciones_TITULO.Controls.Add(lblTituloObservacionesResultado); - Label lblResultadoAnterior = new Label(); - lblResultadoAnterior.Text = "R.ANTER."; - objCellResultadoAnterior_TITULO.Controls.Add(lblResultadoAnterior); - + if (mostrarResultadoAnterior) + { + Label lblResultadoAnterior = new Label(); + lblResultadoAnterior.Text = "R.ANTER."; + objCellResultadoAnterior_TITULO.Controls.Add(lblResultadoAnterior); + } Label lblTituloReferencia = new Label(); lblTituloReferencia.Text = "REFERENCIA|METODO"; objCellReferencia_TITULO.Controls.Add(lblTituloReferencia); @@ -237,7 +247,9 @@ private void LlenarTabla(string p) objFila_TITULO.Cells.Add(objCellPaciente_TITULO); objFila_TITULO.Cells.Add(objCellResultado_TITULO); - if (Request["Operacion"].ToString() == "Valida") objFila_TITULO.Cells.Add(objCellResultadoAnterior_TITULO); + //if (Request["Operacion"].ToString() == "Valida") + if (mostrarResultadoAnterior) + objFila_TITULO.Cells.Add(objCellResultadoAnterior_TITULO); objFila_TITULO.Cells.Add(objCellReferencia_TITULO); objFila_TITULO.Cells.Add(objCellPersona_TITULO); @@ -317,7 +329,8 @@ WHERE dp.IdDetalleProtocolo IN (:ids)") string apellido = ""; string nombre = ""; string s_paciente = ""; - if (oDetalle.IdProtocolo.IdPaciente.IdPaciente > 0) + int i_idpaciente = oDetalle.IdProtocolo.IdPaciente.IdPaciente; + if (i_idpaciente > 0) { if (oDetalle.IdProtocolo.IdPaciente.IdEstado == 2) numerodocumento = "(Temporal)"; else numerodocumento = oDetalle.IdProtocolo.IdPaciente.NumeroDocumento.ToString(); @@ -336,6 +349,16 @@ WHERE dp.IdDetalleProtocolo IN (:ids)") s_paciente = numerodocumento.ToUpper() + " - " + apellido.ToUpper() + " " + nombre.ToUpper(); //} } + if (i_idpaciente == -1) + { + if (oDetalle.IdProtocolo.IdMuestra > 0) + { + Muestra oMuestra = new Muestra(); + oMuestra = (Muestra)oMuestra.Get(typeof(Muestra), oDetalle.IdProtocolo.IdMuestra); + s_paciente = oMuestra.Nombre; + } + s_paciente += " " + oDetalle.IdProtocolo.DescripcionProducto; + } // string s_embarazada = oDetalle.IdProtocolo.GetDiagnostico(); string m_formato0 = dt.Rows[i].ItemArray[4].ToString(); string m_formato1 = dt.Rows[i].ItemArray[5].ToString(); @@ -417,7 +440,8 @@ WHERE dp.IdDetalleProtocolo IN (:ids)") TableCell objCellValida = new TableCell(); TableCell objCellPersona = new TableCell(); TableCell objCellObservaciones = new TableCell(); - TableCell objCellResultadoAnterior = new TableCell(); + + TableCell objCellResultadoAnterior = new TableCell(); Label olblProtocolo = new Label(); olblProtocolo.Font.Name = "Arial"; @@ -440,7 +464,8 @@ WHERE dp.IdDetalleProtocolo IN (:ids)") olblPaciente.Text = s_paciente; objCellPaciente.Controls.Add(olblPaciente); - if (Request["Operacion"].ToString() == "Valida") /// Solo en la validacion + // if (Request["Operacion"].ToString() == "Valida") /// Solo en la validacion + if (mostrarResultadoAnterior)/// Solo en la validacion y para servicio!=5 { ImageButton btnAddDiagnostico = new ImageButton(); btnAddDiagnostico.TabIndex = short.Parse("500"); @@ -467,7 +492,8 @@ WHERE dp.IdDetalleProtocolo IN (:ids)") objFila.Cells.Add(objCellPaciente); objFila.Cells.Add(objCellResultado); - if (Request["Operacion"].ToString() == "Valida") + // if (Request["Operacion"].ToString() == "Valida") + if (mostrarResultadoAnterior) objFila.Cells.Add(objCellResultadoAnterior); objFila.Cells.Add(objCellReferencia); @@ -502,8 +528,9 @@ WHERE dp.IdDetalleProtocolo IN (:ids)") objFila.Cells.Add(objCellPaciente); objFila.Cells.Add(objCellResultado); - if (Request["Operacion"].ToString() == "Valida") - objFila.Cells.Add(objCellResultadoAnterior); + //if (Request["Operacion"].ToString() == "Valida") + if (mostrarResultadoAnterior) + objFila.Cells.Add(objCellResultadoAnterior); objFila.Cells.Add(objCellReferencia); objFila.Cells.Add(objCellPersona); @@ -623,7 +650,7 @@ WHERE dp.IdDetalleProtocolo IN (:ids)") foreach (ResultadoItem oResultado in resultados) { ddl1.Items.Add(new ListItem( - oResultado.Resultado, + oResultado.Resultado.Trim(), oResultado.IdResultadoItem.ToString() )); @@ -635,11 +662,11 @@ WHERE dp.IdDetalleProtocolo IN (:ids)") if (s_conResultado == "0")// sin resultado { if (!string.IsNullOrEmpty(m_resultadoDefecto)) - ddl1.SelectedValue = m_resultadoDefecto; + ddl1.SelectedValue = m_resultadoDefecto.Trim(); } else { - var itemSel = ddl1.Items.FindByText(s_resultadoCar); + var itemSel = ddl1.Items.FindByText(s_resultadoCar.Trim()); if (itemSel != null) ddl1.SelectedValue = itemSel.Value; } @@ -776,7 +803,8 @@ WHERE dp.IdDetalleProtocolo IN (:ids)") objCellResultado.Controls.Add(oValidaNumero); /////////////////Resultado Anterior - if (Request["Operacion"].ToString() == "Valida") + if (mostrarResultadoAnterior) + ///if (Request["Operacion"].ToString() == "Valida") { string resultadoAnterior = "";// oDetalle.BuscarResultadoAnterior(oDetalle.IdSubItem, oDetalle.IdItem,true); /*if (resultadoAnterior != "") @@ -854,7 +882,7 @@ WHERE dp.IdDetalleProtocolo IN (:ids)") /////////////////Resultado Anterior - if (Request["Operacion"].ToString() == "Valida") + if (mostrarResultadoAnterior)// if (Request["Operacion"].ToString() == "Valida") { string resultadoAnterior = "";// oDetalle.BuscarResultadoAnterior(oDetalle.IdSubItem, oDetalle.IdItem, true); //if (resultadoAnterior != "") @@ -952,7 +980,9 @@ WHERE dp.IdDetalleProtocolo IN (:ids)") objFila.Cells.Add(objCellPaciente); objFila.Cells.Add(objCellResultado); - if (Request["Operacion"].ToString() == "Valida") objFila.Cells.Add(objCellResultadoAnterior); + //if (Request["Operacion"].ToString() == "Valida") + if (mostrarResultadoAnterior) + objFila.Cells.Add(objCellResultadoAnterior); objFila.Cells.Add(objCellReferencia); //objFila.Cells.Add(objCellValoresReferencia); objFila.Cells.Add(objCellPersona); if (Request["Operacion"].ToString() == "Valida") objFila.Cells.Add(objCellValida); diff --git a/WebLab/Resultados/ResultadoNoPacienteView.aspx.cs b/WebLab/Resultados/ResultadoNoPacienteView.aspx.cs index 1f870e6c..116de518 100644 --- a/WebLab/Resultados/ResultadoNoPacienteView.aspx.cs +++ b/WebLab/Resultados/ResultadoNoPacienteView.aspx.cs @@ -52,8 +52,10 @@ protected void Page_PreInit(object sender, EventArgs e) { oUser = (Usuario)oUser.Get(typeof(Usuario), int.Parse(Session["idUsuario"].ToString())); - LlenarTabla(Request["idProtocolo"].ToString()); - CargarListas(); + LlenarTabla(Request["idProtocolo"].ToString()); + //if (oRegistro.IdTipoServicio.IdTipoServicio == 3) + LlenarTablaATB(Request["idProtocolo"].ToString()); + //CargarListas(); } else Response.Redirect("../FinSesion.aspx", false); @@ -113,19 +115,19 @@ private void Inicializar() } - private void CargarListas() - { - Utility oUtil = new Utility(); + //private void CargarListas() + //{ + // Utility oUtil = new Utility(); - ///////////////Impresoras//////////////////////// + // ///////////////Impresoras//////////////////////// - string m_ssql = "SELECT idImpresora, nombre FROM LAB_Impresora "; - oUtil.CargarCombo(ddlImpresora, m_ssql, "nombre", "nombre"); - if (Session["Impresora"] != null) ddlImpresora.SelectedValue = Session["Impresora"].ToString(); + // string m_ssql = "SELECT idImpresora, nombre FROM LAB_Impresora "; + // oUtil.CargarCombo(ddlImpresora, m_ssql, "nombre", "nombre"); + // if (Session["Impresora"] != null) ddlImpresora.SelectedValue = Session["Impresora"].ToString(); - ///////////////Fin de Impresoras/////////////////// + // ///////////////Fin de Impresoras/////////////////// - } + //} @@ -206,10 +208,7 @@ private void MuestraDatos(string p) int len = oRegistro.FechaRegistro.ToString().Length - 11; lblHoraRegistro.Text = oRegistro.FechaRegistro.ToString().Substring(11, oRegistro.FechaRegistro.ToString().Length - 11); lblFecha.Text = oRegistro.Fecha.ToShortDateString(); - lblProtocolo.Text = oRegistro.GetNumero().ToString(); - - - + lblProtocolo.Text = oRegistro.Numero.ToString(); lblSector.Text = oRegistro.IdSector.Nombre; if (oRegistro.Sala != "") lblSector.Text += " Sala: " + oRegistro.Sala; if (oRegistro.Cama != "") lblSector.Text += " Cama: " + oRegistro.Cama; @@ -274,10 +273,10 @@ private void LlenarTabla(string p) objCellResultado_TITULO.Controls.Add(lblResultado); - Label lblResultadoAnterior = new Label(); - lblResultadoAnterior.Text = "R.ANTER."; + //Label lblResultadoAnterior = new Label(); + //lblResultadoAnterior.Text = "R.ANTER."; - objCellResultadoAnterior_TITULO.Controls.Add(lblResultadoAnterior); + //objCellResultadoAnterior_TITULO.Controls.Add(lblResultadoAnterior); if (Request["Operacion"].ToString() != "HC") @@ -314,7 +313,7 @@ private void LlenarTabla(string p) objFila_TITULO.Cells.Add(objCellResultado_TITULO); objFila_TITULO.Cells.Add(objCellValoresReferencia_TITULO); objFila_TITULO.Cells.Add(objCellPersona_TITULO); - objFila_TITULO.Cells.Add(objCellResultadoAnterior_TITULO); + //objFila_TITULO.Cells.Add(objCellResultadoAnterior_TITULO); objFila_TITULO.CssClass = "myLabelIzquierda"; objFila_TITULO.BackColor = Color.Gainsboro; @@ -398,7 +397,7 @@ private void LlenarTabla(string p) TableRow objFila = new TableRow(); TableCell objCellAnalisis = new TableCell(); TableCell objCellResultado = new TableCell(); - TableCell objCellResultadoAnterior = new TableCell(); + //TableCell objCellResultadoAnterior = new TableCell(); TableCell objCellUnMedida = new TableCell(); TableCell objCellValoresReferencia = new TableCell(); TableCell objCellValida = new TableCell(); @@ -550,8 +549,8 @@ private void LlenarTabla(string p) if (oDetalle != null) { - m_usuariovalida += " " + oDetalle.FechaValida.ToShortDateString(); - if (Observaciones != "") + m_usuariovalida += " " + oDetalle.FechaValida.ToString("dd/MM/yyyy HH:mm:ss");//.ToShortDateString(); + if (Observaciones != "") { if (m_conResultado == "False") { @@ -563,35 +562,35 @@ private void LlenarTabla(string p) if (oUser.FirmaValidacion == "") m_usuariovalida = oUser.Apellido + " " + oUser.Nombre; else m_usuariovalida = oUser.FirmaValidacion; - m_usuariovalida +=" " + oDetalle.FechaValida.ToShortDateString(); - } + m_usuariovalida +=" " + oDetalle.FechaValida.ToString("dd/MM/yyyy HH:mm:ss");//.ToShortDateString(); + } } else olbl.Text = olbl.Text + Observaciones; } - if (oDetalle.IdProtocolo.IdTipoServicio.IdTipoServicio!=5) - { - string resultadoAnterior = oDetalle.BuscarResultadoAnterior(oDetalle.IdSubItem, false, ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString);//.BuscarResultadoAnterior(oDetalle.IdSubItem, oDetalle.IdItem, false); - if (resultadoAnterior != "") - { - // hayAntecedente = true; - Label olblResultadoAnterior = new Label(); - olblResultadoAnterior.TabIndex = short.Parse("500"); - olblResultadoAnterior.Font.Size = FontUnit.Point(8); - olblResultadoAnterior.CssClass = "myLittleLink"; - olblResultadoAnterior.Attributes.Add("onClick", "javascript: AntecedenteView (" + oDetalle.IdSubItem.IdItem.ToString() + "," + oDetalle.IdProtocolo.IdPaciente.IdPaciente.ToString() + ",790,440); return false"); - olblResultadoAnterior.ToolTip = "Haga clic aqui para ver gráfico de evolución"; - olblResultadoAnterior.Width = Unit.Pixel(20); - olblResultadoAnterior.Text = resultadoAnterior; + //if (oDetalle.IdProtocolo.IdTipoServicio.IdTipoServicio!=5) + //{ + // string resultadoAnterior = oDetalle.BuscarResultadoAnterior(oDetalle.IdSubItem, false, ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString);//.BuscarResultadoAnterior(oDetalle.IdSubItem, oDetalle.IdItem, false); + // if (resultadoAnterior != "") + // { + // // hayAntecedente = true; + // Label olblResultadoAnterior = new Label(); + // olblResultadoAnterior.TabIndex = short.Parse("500"); + // olblResultadoAnterior.Font.Size = FontUnit.Point(8); + // olblResultadoAnterior.CssClass = "myLittleLink"; + // olblResultadoAnterior.Attributes.Add("onClick", "javascript: AntecedenteView (" + oDetalle.IdSubItem.IdItem.ToString() + "," + oDetalle.IdProtocolo.IdPaciente.IdPaciente.ToString() + ",790,440); return false"); + // olblResultadoAnterior.ToolTip = "Haga clic aqui para ver gráfico de evolución"; + // olblResultadoAnterior.Width = Unit.Pixel(20); + // olblResultadoAnterior.Text = resultadoAnterior; - objCellResultadoAnterior.Controls.Add(olblResultadoAnterior); + // objCellResultadoAnterior.Controls.Add(olblResultadoAnterior); - } + // } - } + //} if (oDetalle.VerificaValorReferencia(x)) olbl.ForeColor = Color.Black; @@ -658,24 +657,24 @@ private void LlenarTabla(string p) if (oDetalle != null) { - m_usuariovalida += " " + oDetalle.FechaValida.ToShortDateString(); - if (oDetalle.IdProtocolo.IdTipoServicio.IdTipoServicio != 5) - { - string resultadoAnterior = oDetalle.BuscarResultadoAnterior(oDetalle.IdSubItem, false, ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString); //oDetalle.BuscarResultadoAnterior(oDetalle.IdSubItem, oDetalle.IdItem, false); - if (resultadoAnterior != "") - { - // hayAntecedente = true; - Label olblResultadoAnterior = new Label(); - olblResultadoAnterior.TabIndex = short.Parse("500"); - olblResultadoAnterior.Font.Size = FontUnit.Point(8); - olblResultadoAnterior.Attributes.Add("onClick", "javascript: AntecedenteView (" + oDetalle.IdSubItem.IdItem.ToString() + "," + oDetalle.IdProtocolo.IdPaciente.IdPaciente.ToString() + ",790,300); return false"); - olblResultadoAnterior.ToolTip = "Haga clic aqui para ver más datos."; - olblResultadoAnterior.Width = Unit.Pixel(20); - olblResultadoAnterior.Text = resultadoAnterior; - objCellResultadoAnterior.Controls.Add(olblResultadoAnterior); + m_usuariovalida += " " + oDetalle.FechaValida.ToString("dd/MM/yyyy HH:mm:ss");//.ToShortDateString(); + //if (oDetalle.IdProtocolo.IdTipoServicio.IdTipoServicio != 5) + //{ + // string resultadoAnterior = oDetalle.BuscarResultadoAnterior(oDetalle.IdSubItem, false, ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString); //oDetalle.BuscarResultadoAnterior(oDetalle.IdSubItem, oDetalle.IdItem, false); + // if (resultadoAnterior != "") + // { + // // hayAntecedente = true; + // Label olblResultadoAnterior = new Label(); + // olblResultadoAnterior.TabIndex = short.Parse("500"); + // olblResultadoAnterior.Font.Size = FontUnit.Point(8); + // olblResultadoAnterior.Attributes.Add("onClick", "javascript: AntecedenteView (" + oDetalle.IdSubItem.IdItem.ToString() + "," + oDetalle.IdProtocolo.IdPaciente.IdPaciente.ToString() + ",790,300); return false"); + // olblResultadoAnterior.ToolTip = "Haga clic aqui para ver más datos."; + // olblResultadoAnterior.Width = Unit.Pixel(20); + // olblResultadoAnterior.Text = resultadoAnterior; + // objCellResultadoAnterior.Controls.Add(olblResultadoAnterior); - } - } + // } + //} if (oDetalle.tieneAdjuntoVisible())//tiene observaciones { @@ -736,7 +735,7 @@ private void LlenarTabla(string p) objFila.Cells.Add(objCellPersona); - objFila.Cells.Add(objCellResultadoAnterior); + //objFila.Cells.Add(objCellResultadoAnterior); ////// @@ -750,6 +749,200 @@ private void LlenarTabla(string p) //} } + private void LlenarTablaATB(string p) + { + //SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection; + SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString); ///Performance: conexion de solo lectura + DataSet Ds = new DataSet(); + SqlCommand cmd = new SqlCommand(); + cmd.CommandType = CommandType.StoredProcedure; + cmd.CommandText = "LAB_ResultadoViewATB"; + + cmd.Parameters.Add("@idProtocolo", SqlDbType.NVarChar); + cmd.Parameters["@idProtocolo"].Value = p; + cmd.Connection = conn; + + SqlDataAdapter da = new SqlDataAdapter(cmd); + + da.Fill(Ds); + + + string s = System.Globalization.CultureInfo.CurrentCulture.NumberFormat.CurrencyDecimalSeparator; + + + string m_titulo = ""; + string m_hijo = ""; + string m_nombre = ""; + + + + TableRow objFila_TITULO = new TableRow(); + TableCell objCellAnalisis_TITULO = new TableCell(); + TableCell objCellResultado_TITULO = new TableCell(); + // TableCell objCellResultadoAnterior_TITULO = new TableCell(); + TableCell objCellUnMedida_TITULO = new TableCell(); + TableCell objCellValoresReferencia_TITULO = new TableCell(); + TableCell objCellValida_TITULO = new TableCell(); + TableCell objCellPersona_TITULO = new TableCell(); + TableCell objCellObservaciones_TITULO = new TableCell(); + + int tablas = Ds.Tables.Count; + if (tablas > 0) + { + + + objFila_TITULO.Cells.Add(objCellAnalisis_TITULO); + objFila_TITULO.Cells.Add(objCellResultado_TITULO); + + + + + objFila_TITULO.Cells.Add(objCellValoresReferencia_TITULO); + + + objFila_TITULO.Cells.Add(objCellPersona_TITULO); + // objFila_TITULO.Cells.Add(objCellResultadoAnterior_TITULO); + + objFila_TITULO.CssClass = "myLabelIzquierda"; + objFila_TITULO.BackColor = Color.Gainsboro; + + Master.FindControl("ContentPlaceHolder1").FindControl("Panel1").Controls.Add(tContenido); + + //'añadimos la fila a la tabla + if (objFila_TITULO != null) tContenido.Controls.Add(objFila_TITULO);//.Rows.Add(objRow); + + string pivot_Area = ""; + + + for (int i = 0; i < Ds.Tables[0].Rows.Count; i++) + { + + int tiporesultado = (int.Parse(Ds.Tables[0].Rows[i].ItemArray[4].ToString())); + + string m_usuariovalida = Ds.Tables[0].Rows[i].ItemArray[5].ToString(); + + string m_area = "ATB";//Ds.Tables[0].Rows[i].ItemArray[30].ToString(); + + + + m_hijo = Ds.Tables[0].Rows[i].ItemArray[2].ToString(); + m_titulo = Ds.Tables[0].Rows[i].ItemArray[0].ToString(); + + TableRow objFila = new TableRow(); + TableCell objCellAnalisis = new TableCell(); + TableCell objCellResultado = new TableCell(); + // TableCell objCellResultadoAnterior = new TableCell(); + TableCell objCellUnMedida = new TableCell(); + TableCell objCellValoresReferencia = new TableCell(); + TableCell objCellValida = new TableCell(); + TableCell objCellPersona = new TableCell(); + TableCell objCellObservaciones = new TableCell(); + + + decimal x = 0; + + + + if (m_area != pivot_Area) ///poner titulo del area + { + TableRow objRow = new TableRow(); + TableCell objCell = new TableCell(); + Label lbl0 = new Label(); + lbl0.Text = m_area.ToUpper(); + lbl0.TabIndex = short.Parse("500"); + lbl0.Font.Bold = true; + + + Master.FindControl("ContentPlaceHolder1").FindControl("Panel1").Controls.Add(lbl0); + objCell.Controls.Add(lbl0); + objCell.ColumnSpan = 8; + + objRow.BackColor = Color.Beige; + objRow.HorizontalAlign = HorizontalAlign.Center; + objRow.Cells.Add(objCell); + tContenido.Controls.Add(objRow); + + pivot_Area = m_area; + } + + if ((m_hijo != m_titulo) && (m_nombre != m_titulo)) ///poner titulo de la practica + { + TableRow objRow = new TableRow(); + TableCell objCell = new TableCell(); + Label lbl0 = new Label(); + + lbl0.Text = Ds.Tables[0].Rows[i].ItemArray[1].ToString(); + lbl0.TabIndex = short.Parse("500"); + lbl0.Font.Bold = true; + + Master.FindControl("ContentPlaceHolder1").FindControl("Panel1").Controls.Add(lbl0); + objCell.Controls.Add(lbl0); + if (Request["Operacion"].ToString() == "HC") + objCell.ColumnSpan = 6; + else + objCell.ColumnSpan = 8; + + objRow.Cells.Add(objCell); + objRow.CssClass = "myLabelIzquierda"; + tContenido.Controls.Add(objRow); + + m_nombre = m_titulo; + + + } + + Label lbl1 = new Label(); + if (m_hijo == m_titulo) lbl1.Text = m_hijo; + else lbl1.Text = "   " + m_hijo; + + lbl1.TabIndex = short.Parse("500"); + lbl1.ForeColor = Color.Black; + lbl1.Font.Size = FontUnit.Point(9); + lbl1.Font.Bold = true; + lbl1.Font.Italic = true; + objCellAnalisis.ColumnSpan = 1; + + objCellAnalisis.Controls.Add(lbl1); + + Label olbl = new Label(); + olbl.Font.Bold = true; + olbl.Font.Size = FontUnit.Point(9); + olbl.Text = Ds.Tables[0].Rows[i].ItemArray[3].ToString(); + objCellResultado.Controls.Add(olbl); + m_usuariovalida += " "; //+ fefecha validad + + Label lblPersona = new Label(); + lblPersona.Text = m_usuariovalida; /// Ds.Tables[0].Rows[i].ItemArray[1].ToString(); + + lblPersona.Font.Size = FontUnit.Point(7); + lblPersona.Font.Italic = true; + lblPersona.Text = m_usuariovalida; + + objCellPersona.Controls.Add(lblPersona); + + ///Definir los anchos de las columnas + objCellAnalisis.Width = Unit.Percentage(30); + objCellResultado.Width = Unit.Percentage(30); + objCellValoresReferencia.Width = Unit.Percentage(20); + objCellPersona.Width = Unit.Percentage(20); + + /////////////////////// + ///agrega a la fila cada una de las celdas + objFila.Cells.Add(objCellAnalisis); + objFila.Cells.Add(objCellResultado); + objFila.Cells.Add(objCellValoresReferencia); + objFila.Cells.Add(objCellPersona); + // objFila.Cells.Add(objCellResultadoAnterior); + + ////// + Master.FindControl("ContentPlaceHolder1").FindControl("Panel1").Controls.Add(tContenido); + + //'añadimos la fila a la tabla + if (objFila != null) + tContenido.Controls.Add(objFila);//.Rows.Add(objRow); + } + } + } private void Imprimir(Protocolo oProtocolo, string tipo) diff --git a/WebLab/Site1.Master b/WebLab/Site1.Master index 56777628..45d1d3f0 100644 --- a/WebLab/Site1.Master +++ b/WebLab/Site1.Master @@ -175,8 +175,8 @@ document.onkeydown=checkKeyCode; src="~/App_Themes/default/images/icono_help.jpg" border="0" visible="false" runat="server" id="imgAyudaLinea" />--%> -  "> -    + <%--  "> +   --%> @@ -222,7 +222,7 @@ document.onkeydown=checkKeyCode; font-weight: normal; font-size: 14px; font-family: Arial; - text-align:center;">Versión MultiEfector Julio 2026-14." target="_blank" >Ver Cambios Version

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

    diff --git a/WebLab/Site1.Master.cs b/WebLab/Site1.Master.cs index c49f9a70..fd879819 100644 --- a/WebLab/Site1.Master.cs +++ b/WebLab/Site1.Master.cs @@ -31,7 +31,7 @@ protected void Page_Load(object sender, EventArgs e) //} //else //{ - imgPrincipal.Visible = false; + //imgPrincipal.Visible = false; lnkCerrar.NavigateUrl = "logout.aspx"; //} if (Session["idUsuario"] != null) diff --git a/WebLab/Site1.Master.designer.cs b/WebLab/Site1.Master.designer.cs index 1c70de1d..da362dcf 100644 --- a/WebLab/Site1.Master.designer.cs +++ b/WebLab/Site1.Master.designer.cs @@ -39,15 +39,6 @@ public partial class Site1 { /// protected global::System.Web.UI.WebControls.Label lblEfector; - /// - /// imgPrincipal control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl imgPrincipal; - /// /// lnkCerrar control. /// diff --git a/WebLab/Usuarios/UsuarioEdit.aspx.cs b/WebLab/Usuarios/UsuarioEdit.aspx.cs index e7c2d5a5..876e53a1 100644 --- a/WebLab/Usuarios/UsuarioEdit.aspx.cs +++ b/WebLab/Usuarios/UsuarioEdit.aspx.cs @@ -754,35 +754,93 @@ private void AgregarEfector() + //private void GuardarEfectores(Business.Data.Usuario oUsuario) + //{ + // ///Eliminar los efectores y volverlos a crear + // ISession m_session = NHibernateHttpModule.CurrentSession; + // ICriteria crit = m_session.CreateCriteria(typeof(UsuarioEfector)); + // crit.Add(Expression.Eq("IdUsuario", oUsuario)); + // IList lista = crit.List(); + + // HashSet yaTieneAuditoriaVincula = new HashSet(); + + // foreach (UsuarioEfector oUsuarioEfector in lista) + // { + // yaTieneAuditoriaVincula.Add(oUsuarioEfector.IdEfector.IdEfector); + // oUsuarioEfector.Delete(); + // } + + // //los genero nuevamente + // DataTable dt = ViewState["efectores"] as DataTable; + // if (dt != null || dt.Rows.Count > 0) + // { + // //instancio una sola vez el usuario auditor + // Usuario oAuditor = new Usuario(); + // oAuditor = (Usuario)oAuditor.Get(typeof(Usuario), int.Parse(Session["idUsuario"].ToString())); + // foreach (DataRow row in dt.Rows) + // { + // UsuarioEfector oRegistro = new UsuarioEfector(); + // int idEfector = int.Parse(row["idEfector"].ToString()); + // Efector oEfector = new Efector(); + // oEfector = (Efector)oEfector.Get(typeof(Efector), idEfector); + // oRegistro.IdUsuario = oUsuario; + // oRegistro.IdEfector = oEfector; + // oRegistro.Activo = true; + // oRegistro.IdPerfil = int.Parse(row["idPerfil"].ToString()); + // oRegistro.IdArea = int.Parse(row["idArea"].ToString()); + // oRegistro.IdEfectorDestino = int.Parse(row["idEfectorDestino"].ToString()); + // oRegistro.IdUsuarioRegistro = int.Parse(Session["idUsuario"].ToString()); + // oRegistro.FechaRegistro = DateTime.Now; + // oRegistro.Save(); + + // //solo genero auditoria la primera vez que vincula el efector + // if (!yaTieneAuditoriaVincula.Contains(idEfector)) + // oAuditor.GrabaAuditoria("Vincula " + oEfector.Nombre, oRegistro.IdUsuario.IdUsuario, oRegistro.IdUsuario.Username, "", "Perfil:" + row["Perfil"].ToString() + " Area:" + row["Area"].ToString()); + + // //actualizo el viewstate con los nuevos ID + // row[0] = oRegistro.IdUsuarioEfector; + + // } + // ViewState["efectores"] = dt; + // } + //} + + private void GuardarEfectores(Business.Data.Usuario oUsuario) { - ///Eliminar los efectores y volverlos a crear + ////Se guarda sin borrar los existentes ; ya que los existentes puden estar deshabilitados ISession m_session = NHibernateHttpModule.CurrentSession; + ICriteria crit = m_session.CreateCriteria(typeof(UsuarioEfector)); crit.Add(Expression.Eq("IdUsuario", oUsuario)); + IList lista = crit.List(); - HashSet yaTieneAuditoriaVincula = new HashSet(); + Dictionary efectoresExistentes = new Dictionary(); - foreach (UsuarioEfector oUsuarioEfector in lista) + foreach (UsuarioEfector ue in lista) { - yaTieneAuditoriaVincula.Add(oUsuarioEfector.IdEfector.IdEfector); - oUsuarioEfector.Delete(); + efectoresExistentes[ue.IdEfector.IdEfector] = ue; } - //los genero nuevamente DataTable dt = ViewState["efectores"] as DataTable; - if (dt != null || dt.Rows.Count > 0) + + if (dt != null && dt.Rows.Count > 0) { - //instancio una sola vez el usuario auditor - Usuario oAuditor = new Usuario(); - oAuditor = (Usuario)oAuditor.Get(typeof(Usuario), int.Parse(Session["idUsuario"].ToString())); + Usuario oAuditor = (Usuario)new Usuario().Get(typeof(Usuario), + int.Parse(Session["idUsuario"].ToString())); + foreach (DataRow row in dt.Rows) { - UsuarioEfector oRegistro = new UsuarioEfector(); int idEfector = int.Parse(row["idEfector"].ToString()); - Efector oEfector = new Efector(); - oEfector = (Efector)oEfector.Get(typeof(Efector), idEfector); + + // Si ya existe, no lo vuelvo a crear + if (efectoresExistentes.ContainsKey(idEfector)) + continue; + + Efector oEfector = (Efector)new Efector().Get(typeof(Efector), idEfector); + + UsuarioEfector oRegistro = new UsuarioEfector(); oRegistro.IdUsuario = oUsuario; oRegistro.IdEfector = oEfector; oRegistro.Activo = true; @@ -792,15 +850,17 @@ private void GuardarEfectores(Business.Data.Usuario oUsuario) oRegistro.IdUsuarioRegistro = int.Parse(Session["idUsuario"].ToString()); oRegistro.FechaRegistro = DateTime.Now; oRegistro.Save(); - - //solo genero auditoria la primera vez que vincula el efector - if (!yaTieneAuditoriaVincula.Contains(idEfector)) - oAuditor.GrabaAuditoria("Vincula " + oEfector.Nombre, oRegistro.IdUsuario.IdUsuario, oRegistro.IdUsuario.Username, "", "Perfil:" + row["Perfil"].ToString() + " Area:" + row["Area"].ToString()); - //actualizo el viewstate con los nuevos ID + oAuditor.GrabaAuditoria( + "Vincula " + oEfector.Nombre, + oRegistro.IdUsuario.IdUsuario, + oRegistro.IdUsuario.Username, + "", + "Perfil:" + row["Perfil"] + " Area:" + row["Area"]); + row[0] = oRegistro.IdUsuarioEfector; - } + ViewState["efectores"] = dt; } } diff --git a/WebLab/Usuarios/UsuarioList.aspx b/WebLab/Usuarios/UsuarioList.aspx index 84f5ba45..753cb5f5 100644 --- a/WebLab/Usuarios/UsuarioList.aspx +++ b/WebLab/Usuarios/UsuarioList.aspx @@ -133,7 +133,7 @@ 0) - { - Utility.ExportDataTableToXlsx(tabla, nombreArchivo); - //StringBuilder sb = new StringBuilder(); - //StringWriter sw = new StringWriter(sb); - //HtmlTextWriter htw = new HtmlTextWriter(sw); - //Page pagina = new Page(); - //HtmlForm form = new HtmlForm(); - //GridView dg = new GridView(); - //dg.EnableViewState = false; - //dg.DataSource = tabla; - //dg.DataBind(); - //pagina.EnableEventValidation = false; - //pagina.DesignerInitialize(); - //pagina.Controls.Add(form); - //form.Controls.Add(dg); - //pagina.RenderControl(htw); - //Response.Clear(); - //Response.Buffer = true; - //Response.ContentType = "application/vnd.ms-excel"; - //Response.AddHeader("Content-Disposition", "attachment;filename=" + nombreArchivo + ".xls"); - //Response.Charset = "UTF-8"; - //Response.ContentEncoding = Encoding.Default; - //Response.Write(sb.ToString()); - //Response.End(); - } + if (tabla.Rows.Count > 0) + Utility.ExportDataTableToXlsx(tabla, nombreArchivo); } protected void btnBuscar_Click(object sender, EventArgs e) diff --git a/WebLab/WebLab.csproj b/WebLab/WebLab.csproj index 88763718..b9421ddc 100644 --- a/WebLab/WebLab.csproj +++ b/WebLab/WebLab.csproj @@ -299,6 +299,19 @@ + + + + + + + + + + + + + @@ -1947,6 +1960,27 @@ + + + + + + + + + + + + + + + + + + + + + @@ -2444,6 +2478,7 @@ + @@ -2584,7 +2619,6 @@ - @@ -2655,7 +2689,6 @@ - @@ -4876,129 +4909,6 @@ HistorialPorUsuario.aspx - - True - True - HTrabajoProtocolo1.rpt - Component - - - True - True - HTrabajoProtocolo1Horizontal.rpt - Component - - - True - True - HTrabajoProtocolo1Microbiologia.rpt - Component - - - True - True - HTrabajoProtocolo1MicrobiologiaHorizontal.rpt - Component - - - Component - - - True - True - HTrabajoProtocolo2.rpt - Component - - - True - True - HTrabajoProtocolo2Horizontal.rpt - Component - - - True - True - HTrabajoProtocolo2Microbiologia.rpt - Component - - - True - True - HTrabajoProtocolo2MicrobiologiaHorizontal.rpt - Component - - - True - True - HTrabajoProtocolo3.rpt - Component - - - True - True - HTrabajoProtocolo3Horizontal.rpt - Component - - - True - True - HTrabajoProtocolo3Microbiologia.rpt - Component - - - True - True - HTrabajoProtocolo3MicrobiologiaHorizontal.rpt - Component - - - True - True - HTrabajoProtocolo4.rpt - Component - - - True - True - HTrabajoProtocolo4Horizontal.rpt - Component - - - True - True - HTrabajoProtocolo4Microbiologia.rpt - Component - - - True - True - HTrabajoProtocolo4MicrobiologiaHorizontal.rpt - Component - - - HTrabajoProtocolo5MicrobiologiaHorizontal.rpt - True - Component - True - - - HTrabajoProtocolo5Microbiologia.rpt - True - Component - True - - - HTrabajoProtocolo5Horizontal.rpt - True - Component - True - - - True - True - HTrabajoProtocolo5.rpt - Component - PacientesList.aspx ASPXCodeBehind @@ -5461,6 +5371,13 @@ PlacaResultadoMixta.aspx + + Principal2.aspx + ASPXCodeBehind + + + Principal2.aspx + PrincipalTurnos.aspx ASPXCodeBehind @@ -5768,13 +5685,6 @@ AntecedentesAnalisisView.aspx - - ObservacionesEditExt.aspx - ASPXCodeBehind - - - ObservacionesEditExt.aspx - PesquisaNeonatal.ascx ASPXCodeBehind @@ -6261,13 +6171,6 @@ UsuarioEdit.aspx - - UsuarioConsulta.aspx - ASPXCodeBehind - - - UsuarioConsulta.aspx - UsuarioList.aspx ASPXCodeBehind @@ -6371,6 +6274,15 @@ + + + + + + + + + @@ -6987,22 +6899,6 @@ CrystalDecisions.VSDesigner.CodeGen.ReportCodeGenerator HTrabajoProtocolo4PesquisaHorizontal.cs - - CrystalDecisions.VSDesigner.CodeGen.ReportCodeGenerator - HTrabajoProtocolo5MicrobiologiaHorizontal.cs - - - CrystalDecisions.VSDesigner.CodeGen.ReportCodeGenerator - HTrabajoProtocolo5Microbiologia.cs - - - CrystalDecisions.VSDesigner.CodeGen.ReportCodeGenerator - HTrabajoProtocolo5Horizontal.cs - - - CrystalDecisions.VSDesigner.CodeGen.ReportCodeGenerator - HTrabajoProtocolo51.cs - CrystalDecisions.VSDesigner.CodeGen.ReportCodeGenerator HTrabajoProtocoloLetra1.cs diff --git a/WebLab/controldecambios.html b/WebLab/controldecambios.html index 86e331bf..686fbbb1 100644 --- a/WebLab/controldecambios.html +++ b/WebLab/controldecambios.html @@ -121,18 +121,131 @@

    Lista de cambios en SIL2