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 fea50771..2891da85 100644
Binary files a/WebLab/Informes/HojasdeTrabajo/HTrabajoProtocolo5Horizontal.rpt and b/WebLab/Informes/HojasdeTrabajo/HTrabajoProtocolo5Horizontal.rpt differ
diff --git a/WebLab/Informes/Informe.aspx b/WebLab/Informes/Informe.aspx
index 92a7c434..92b1fc9e 100644
--- a/WebLab/Informes/Informe.aspx
+++ b/WebLab/Informes/Informe.aspx
@@ -382,12 +382,12 @@
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" %>
+
+
+
+
+
+
+
+
+
+
+ <%-- --%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Turnos
+
Genere desde esta opción los turnos programados.
+
+
+
+
+ Turno
+
+
+
+
+
+
+
+
+
+
+
+
+
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")%>
+
+
+
+
+
+
+
+
+ <%--
--%>
+
+
+
+ <%--
+
+
+
+
+
+
+
+
+
Genere desde acá las hojas de trabajo para las áreas de su laboratorio.
+
+
+
+
+ HT
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Carga de resultados de Microbiología
+
+
+
+ HT
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Validación de Resultados
+
+
+
+
+
+
+
+
+
+
+
+
+ --%>
+
+
+
+
+
+
+
+
+
+ <%--
+
+
+
+
+
+ --%>
+ <%--
+
+
+
+
+ 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.
+
+
+
--%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Cierra sesión actual y permite abrir nueva sesión de usuario.
+
+
+
+
+
+
+
+ <%--
+
+
+
+
+
+ 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