";
diff --git a/WebLab/Informes/Auditoria.aspx.cs b/WebLab/Informes/Auditoria.aspx.cs
index b1e2c999..e7f53358 100644
--- a/WebLab/Informes/Auditoria.aspx.cs
+++ b/WebLab/Informes/Auditoria.aspx.cs
@@ -124,11 +124,11 @@ private void CargarListas()
string m_ssql = @" select idusuario, apellido + ' ' +nombre as nombre
from sys_usuario u with (nolock)
- where activo = 1
+ where activo = 1 and username <>'adminapi'
and exists (select 1 from sys_usuarioefector e (nolock) where e.idusuario = u.idusuario and e.idEfector = " + oUser.IdEfector.IdEfector.ToString() + @") order by apellido, nombre";
if (oUser.Administrador)
{
- m_ssql = @" select idusuario, apellido + ' ' +nombre as nombre from sys_usuario u with (nolock) where activo = 1 order by apellido, nombre";
+ m_ssql = @" select idusuario, apellido + ' ' +nombre as nombre from sys_usuario u with (nolock) where activo = 1 and username <>'adminapi' order by apellido, nombre";
}
oUtil.CargarCombo(ddlUsuario, m_ssql, "idusuario", "nombre", connReady);
oUtil.CargarCombo(ddlUsuario2, m_ssql, "idusuario", "nombre", connReady);
diff --git a/WebLab/Informes/AuditoriaUser.cs b/WebLab/Informes/AuditoriaUser.cs
new file mode 100644
index 00000000..011b0ace
--- /dev/null
+++ b/WebLab/Informes/AuditoriaUser.cs
@@ -0,0 +1,176 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace WebLab.Informes {
+ using System;
+ using System.ComponentModel;
+ using CrystalDecisions.Shared;
+ using CrystalDecisions.ReportSource;
+ using CrystalDecisions.CrystalReports.Engine;
+
+
+ public class AuditoriaUser : ReportClass {
+
+ public AuditoriaUser() {
+ }
+
+ public override string ResourceName {
+ get {
+ return "AuditoriaUser.rpt";
+ }
+ set {
+ // Do nothing
+ }
+ }
+
+ public override bool NewGenerator {
+ get {
+ return true;
+ }
+ set {
+ // Do nothing
+ }
+ }
+
+ public override string FullResourceName {
+ get {
+ return "WebLab.Informes.AuditoriaUser.rpt";
+ }
+ set {
+ // Do nothing
+ }
+ }
+
+ [Browsable(false)]
+ [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
+ public CrystalDecisions.CrystalReports.Engine.Section Section1 {
+ get {
+ return this.ReportDefinition.Sections[0];
+ }
+ }
+
+ [Browsable(false)]
+ [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
+ public CrystalDecisions.CrystalReports.Engine.Section Section2 {
+ get {
+ return this.ReportDefinition.Sections[1];
+ }
+ }
+
+ [Browsable(false)]
+ [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
+ public CrystalDecisions.CrystalReports.Engine.Section Section3 {
+ get {
+ return this.ReportDefinition.Sections[2];
+ }
+ }
+
+ [Browsable(false)]
+ [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
+ get {
+ return this.ReportDefinition.Sections[3];
+ }
+ }
+
+ [Browsable(false)]
+ [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
+ public CrystalDecisions.CrystalReports.Engine.Section Section3 {
+ get {
+ return this.ReportDefinition.Sections[4];
+ }
+ }
+
+ [Browsable(false)]
+ [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
+ public CrystalDecisions.Shared.IParameterField Parameter_encabezado1 {
+ get {
+ return this.DataDefinition.ParameterFields[0];
+ }
+ }
+
+ [Browsable(false)]
+ [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
+ public CrystalDecisions.Shared.IParameterField Parameter_encabezado2 {
+ get {
+ return this.DataDefinition.ParameterFields[1];
+ }
+ }
+
+ [Browsable(false)]
+ [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
+ public CrystalDecisions.Shared.IParameterField Parameter_encabezado3 {
+ get {
+ return this.DataDefinition.ParameterFields[2];
+ }
+ }
+ }
+
+ [System.Drawing.ToolboxBitmapAttribute(typeof(CrystalDecisions.Shared.ExportOptions), "report.bmp")]
+ public class CachedAuditoriaUser : Component, ICachedReport {
+
+ public CachedAuditoriaUser() {
+ }
+
+ [Browsable(false)]
+ [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
+ public virtual bool IsCacheable {
+ get {
+ return true;
+ }
+ set {
+ //
+ }
+ }
+
+ [Browsable(false)]
+ [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
+ public virtual bool ShareDBLogonInfo {
+ get {
+ return false;
+ }
+ set {
+ //
+ }
+ }
+
+ [Browsable(false)]
+ [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
+ public virtual System.TimeSpan CacheTimeOut {
+ get {
+ return CachedReportConstants.DEFAULT_TIMEOUT;
+ }
+ set {
+ //
+ }
+ }
+
+ public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
+ AuditoriaUser rpt = new AuditoriaUser();
+ rpt.Site = this.Site;
+ return rpt;
+ }
+
+ public virtual string GetCustomizedCacheKey(RequestContext request) {
+ String key = null;
+ // // The following is the code used to generate the default
+ // // cache key for caching report jobs in the ASP.NET Cache.
+ // // Feel free to modify this code to suit your needs.
+ // // Returning key == null causes the default cache key to
+ // // be generated.
+ //
+ // key = RequestContext.BuildCompleteCacheKey(
+ // request,
+ // null, // sReportFilename
+ // this.GetType(),
+ // this.ShareDBLogonInfo );
+ return key;
+ }
+ }
+}
diff --git a/WebLab/Informes/AuditoriaUser.rpt b/WebLab/Informes/AuditoriaUser.rpt
new file mode 100644
index 00000000..1e957ad7
Binary files /dev/null and b/WebLab/Informes/AuditoriaUser.rpt differ
diff --git a/WebLab/Informes/AuditoriaUsuario.aspx.cs b/WebLab/Informes/AuditoriaUsuario.aspx.cs
index afb4eff7..225967c0 100644
--- a/WebLab/Informes/AuditoriaUsuario.aspx.cs
+++ b/WebLab/Informes/AuditoriaUsuario.aspx.cs
@@ -68,7 +68,7 @@ private void CargarListas()
{
Utility oUtil = new Utility();
///Carga de combos de tipos de servicios
- string m_ssql = "select idusuario, apellido + ' ' +nombre as nombre from sys_usuario order by apellido, nombre";
+ string m_ssql = "select idusuario, apellido + ' ' +nombre as nombre from sys_usuario where username<>'adminapi' order by apellido, nombre";
oUtil.CargarCombo(ddlUsuarioModificado, m_ssql, "idusuario", "nombre");
oUtil.CargarCombo(ddlUsuarioABM, m_ssql, "idusuario", "nombre");
diff --git a/WebLab/Informes/HistoriaClinica.aspx.cs b/WebLab/Informes/HistoriaClinica.aspx.cs
index d1f36f04..ad26db10 100644
--- a/WebLab/Informes/HistoriaClinica.aspx.cs
+++ b/WebLab/Informes/HistoriaClinica.aspx.cs
@@ -24,17 +24,26 @@ namespace WebLab.Informes
public partial class HistoriaClinica : System.Web.UI.Page
{
Paciente oPaciente = new Paciente();
-
+ Configuracion oCon = new Configuracion();
public CrystalReportSource oCr = new CrystalReportSource();
-
+ public Usuario oUser = new Usuario();
protected void Page_PreInit(object sender, EventArgs e)
{
oCr.Report.FileName = "";
oCr.CacheDuration = 0;
oCr.EnableCaching = false;
+ if (Session["idUsuario"] != null)
+ {
+
+ oUser = (Usuario)oUser.Get(typeof(Usuario), int.Parse(Session["idUsuario"].ToString()));
+ oCon = (Configuracion)oCon.Get(typeof(Configuracion), "IdEfector", oUser.IdEfector);
- }
+ }
+ else
+ Response.Redirect("SinDatos.aspx", false);
+
+ }
protected void Page_Load(object sender, EventArgs e)
{
@@ -131,7 +140,8 @@ private void MostrarPaciente()
private DataTable LlenarDatos()
{
DataSet Ds = new DataSet();
- SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection;
+ string conexion = ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString;
+ SqlConnection conn = new SqlConnection(conexion); ///Performance: conexion de solo lectura
SqlCommand cmd = new SqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
@@ -186,16 +196,25 @@ private void ExportarPDF()
dt =LlenarDatos();
if (dt.Rows.Count > 0)
{
- Configuracion oCon = new Configuracion(); oCon = (Configuracion)oCon.Get(typeof(Configuracion), 1);
+ /// Configuracion oCon = new Configuracion(); oCon = (Configuracion)oCon.Get(typeof(Configuracion), 1);
+ string enc1 = "SUBSECRETARIA DE SALUD";
+ string enc2 = "SISTEMA INFORMATICO PROVINCIAL DE LABORATORIO";
+ string enc3 = "";
+ if (oUser.IdEfector.IdEfector != 227)
+ {
+ enc1= oCon.EncabezadoLinea1;
+ enc2 = oCon.EncabezadoLinea2;
+ enc3 = oCon.EncabezadoLinea3;
+ }
ParameterDiscreteValue encabezado1 = new ParameterDiscreteValue();
- encabezado1.Value = oCon.EncabezadoLinea1;
+ encabezado1.Value = enc1;// oCon.EncabezadoLinea1;
ParameterDiscreteValue encabezado2 = new ParameterDiscreteValue();
- encabezado2.Value = oCon.EncabezadoLinea2;
+ encabezado2.Value = enc2; // oCon.EncabezadoLinea2;
ParameterDiscreteValue encabezado3 = new ParameterDiscreteValue();
- encabezado3.Value = oCon.EncabezadoLinea3;
+ encabezado3.Value = enc3;// oCon.EncabezadoLinea3;
ParameterDiscreteValue encabezado4 = new ParameterDiscreteValue();
encabezado4.Value = lblAnalisis.Text;
@@ -244,15 +263,7 @@ private void ExportarPDF()
oCr.DataBind();
oCr.ReportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, true, "Historial_Resultados.pdf");
- //MemoryStream oStream; // using System.IO
- //oStream = (MemoryStream)oCr.ReportDocument.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
- //Response.Clear();
- //Response.Buffer = true;
- //Response.ContentType = "application/pdf";
- //Response.AddHeader("Content-Disposition", "attachment;filename=Historial_Resultados.pdf");
-
- //Response.BinaryWrite(oStream.ToArray());
- //Response.End();
+
}
else
Response.Redirect("SinDatos.aspx", false);
diff --git a/WebLab/Informes/HojasdeTrabajo/HTrabajoProtocolo2Horizontal.cs b/WebLab/Informes/HojasdeTrabajo/HTrabajoProtocolo2Horizontal.cs
new file mode 100644
index 00000000..da616cbc
--- /dev/null
+++ b/WebLab/Informes/HojasdeTrabajo/HTrabajoProtocolo2Horizontal.cs
@@ -0,0 +1,217 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace WebLab.Informes.HojasdeTrabajo {
+ using System;
+ using System.ComponentModel;
+ using CrystalDecisions.Shared;
+ using CrystalDecisions.ReportSource;
+ using CrystalDecisions.CrystalReports.Engine;
+
+
+ public class HTrabajoProtocolo2Horizontal : ReportClass {
+
+ public HTrabajoProtocolo2Horizontal() {
+ }
+
+ public override string ResourceName {
+ get {
+ return "HTrabajoProtocolo2Horizontal.rpt";
+ }
+ set {
+ // Do nothing
+ }
+ }
+
+ public override bool NewGenerator {
+ get {
+ return true;
+ }
+ set {
+ // Do nothing
+ }
+ }
+
+ public override string FullResourceName {
+ get {
+ return "WebLab.Informes.HojasdeTrabajo.HTrabajoProtocolo2Horizontal.rpt";
+ }
+ set {
+ // Do nothing
+ }
+ }
+
+ [Browsable(false)]
+ [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
+ public CrystalDecisions.CrystalReports.Engine.Section Section1 {
+ get {
+ return this.ReportDefinition.Sections[0];
+ }
+ }
+
+ [Browsable(false)]
+ [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
+ public CrystalDecisions.CrystalReports.Engine.Section Section2 {
+ get {
+ return this.ReportDefinition.Sections[1];
+ }
+ }
+
+ [Browsable(false)]
+ [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
+ public CrystalDecisions.CrystalReports.Engine.Section GroupHeaderSection1 {
+ get {
+ return this.ReportDefinition.Sections[2];
+ }
+ }
+
+ [Browsable(false)]
+ [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
+ public CrystalDecisions.CrystalReports.Engine.Section GroupHeaderSection2 {
+ get {
+ return this.ReportDefinition.Sections[3];
+ }
+ }
+
+ [Browsable(false)]
+ [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
+ public CrystalDecisions.CrystalReports.Engine.Section Section3 {
+ get {
+ return this.ReportDefinition.Sections[4];
+ }
+ }
+
+ [Browsable(false)]
+ [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
+ public CrystalDecisions.CrystalReports.Engine.Section GroupFooterSection2 {
+ get {
+ return this.ReportDefinition.Sections[5];
+ }
+ }
+
+ [Browsable(false)]
+ [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
+ public CrystalDecisions.CrystalReports.Engine.Section GroupFooterSection1 {
+ get {
+ return this.ReportDefinition.Sections[6];
+ }
+ }
+
+ [Browsable(false)]
+ [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
+ public CrystalDecisions.CrystalReports.Engine.Section Section4 {
+ get {
+ return this.ReportDefinition.Sections[7];
+ }
+ }
+
+ [Browsable(false)]
+ [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
+ public CrystalDecisions.CrystalReports.Engine.Section Section5 {
+ get {
+ return this.ReportDefinition.Sections[8];
+ }
+ }
+
+ [Browsable(false)]
+ [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
+ public CrystalDecisions.Shared.IParameterField Parameter_encabezado1 {
+ get {
+ return this.DataDefinition.ParameterFields[0];
+ }
+ }
+
+ [Browsable(false)]
+ [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
+ public CrystalDecisions.Shared.IParameterField Parameter_encabezado2 {
+ get {
+ return this.DataDefinition.ParameterFields[1];
+ }
+ }
+
+ [Browsable(false)]
+ [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
+ public CrystalDecisions.Shared.IParameterField Parameter_encabezado3 {
+ get {
+ return this.DataDefinition.ParameterFields[2];
+ }
+ }
+
+ [Browsable(false)]
+ [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
+ public CrystalDecisions.Shared.IParameterField Parameter_imprimirFechaHora {
+ get {
+ return this.DataDefinition.ParameterFields[3];
+ }
+ }
+ }
+
+ [System.Drawing.ToolboxBitmapAttribute(typeof(CrystalDecisions.Shared.ExportOptions), "report.bmp")]
+ public class CachedHTrabajoProtocolo2Horizontal : Component, ICachedReport {
+
+ public CachedHTrabajoProtocolo2Horizontal() {
+ }
+
+ [Browsable(false)]
+ [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
+ public virtual bool IsCacheable {
+ get {
+ return true;
+ }
+ set {
+ //
+ }
+ }
+
+ [Browsable(false)]
+ [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
+ public virtual bool ShareDBLogonInfo {
+ get {
+ return false;
+ }
+ set {
+ //
+ }
+ }
+
+ [Browsable(false)]
+ [DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)]
+ public virtual System.TimeSpan CacheTimeOut {
+ get {
+ return CachedReportConstants.DEFAULT_TIMEOUT;
+ }
+ set {
+ //
+ }
+ }
+
+ public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
+ HTrabajoProtocolo2Horizontal rpt = new HTrabajoProtocolo2Horizontal();
+ rpt.Site = this.Site;
+ return rpt;
+ }
+
+ public virtual string GetCustomizedCacheKey(RequestContext request) {
+ String key = null;
+ // // The following is the code used to generate the default
+ // // cache key for caching report jobs in the ASP.NET Cache.
+ // // Feel free to modify this code to suit your needs.
+ // // Returning key == null causes the default cache key to
+ // // be generated.
+ //
+ // key = RequestContext.BuildCompleteCacheKey(
+ // request,
+ // null, // sReportFilename
+ // this.GetType(),
+ // this.ShareDBLogonInfo );
+ return key;
+ }
+ }
+}
diff --git a/WebLab/Informes/HojasdeTrabajo/HTrabajoProtocolo2Horizontal.rpt b/WebLab/Informes/HojasdeTrabajo/HTrabajoProtocolo2Horizontal.rpt
index 61d55423..5beb3223 100644
Binary files a/WebLab/Informes/HojasdeTrabajo/HTrabajoProtocolo2Horizontal.rpt and b/WebLab/Informes/HojasdeTrabajo/HTrabajoProtocolo2Horizontal.rpt differ
diff --git a/WebLab/Informes/Informe.aspx b/WebLab/Informes/Informe.aspx
index 9cf9458a..a6c55f61 100644
--- a/WebLab/Informes/Informe.aspx
+++ b/WebLab/Informes/Informe.aspx
@@ -271,7 +271,7 @@
-
+
diff --git a/WebLab/Informes/Informe.aspx.cs b/WebLab/Informes/Informe.aspx.cs
index 45443b99..de25e7f7 100644
--- a/WebLab/Informes/Informe.aspx.cs
+++ b/WebLab/Informes/Informe.aspx.cs
@@ -628,12 +628,7 @@ private void VistaPreeliminar(object p, string accion)
}
if (accion == "PDF")
{
-
- oCr.ReportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, true, nombrePDF);
-
- //oCr.ReportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, true, nombrePDF+".pdf");
-
-
+ oCr.ReportDocument.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, true, nombrePDF);
}
else
{
diff --git a/WebLab/Pacientes/PacienteEdit2.aspx.cs b/WebLab/Pacientes/PacienteEdit2.aspx.cs
index 7fc1495e..bfb7f930 100644
--- a/WebLab/Pacientes/PacienteEdit2.aspx.cs
+++ b/WebLab/Pacientes/PacienteEdit2.aspx.cs
@@ -80,13 +80,7 @@ protected void Page_Load(object sender, EventArgs e)
{
try
{
- //IntAutenticacion.AutenticacionClient cliente =
- // new IntAutenticacion.AutenticacionClient();
-
- //TicketUsuario = cliente.LoginPecas(SistemaCliente, PasswordSistemaCliente);
-
- //if (TicketUsuario != "")
- //{
+
if (oCon.ConectaRenaper)
{
diff --git a/WebLab/Protocolos/ProcesaRenaper.aspx.cs b/WebLab/Protocolos/ProcesaRenaper.aspx.cs
index ca2083d8..b9031bc8 100644
--- a/WebLab/Protocolos/ProcesaRenaper.aspx.cs
+++ b/WebLab/Protocolos/ProcesaRenaper.aspx.cs
@@ -12,7 +12,7 @@
using System.Web.Script.Serialization;
using Business.Data;
using NHibernate;
-using Business.Data.Laboratorio;
+using Business.Data.Laboratorio;
using NHibernate.Expression;
using System.Collections;
using System.Data;
@@ -24,6 +24,7 @@
using System.Net.Http;
using System.Security.Cryptography.X509Certificates;
using System.Security.Cryptography;
+using Newtonsoft.Json;
namespace WebLab.Protocolos
{
@@ -280,7 +281,8 @@ protected void Page_Load(object sender, EventArgs e)
if (!conOK)// si no funcionó la conexion con renaper se fija se está activado MPI
if (oCon.ConectaMPI)
{
- conOK = SolicitarServicioMPI();
+ // conOK = SolicitarServicioMPI();
+ conOK = ConectarMPIXRoad();
if (!conOK)
HabilitaCargaManual();
}
@@ -289,7 +291,8 @@ protected void Page_Load(object sender, EventArgs e)
{
if (oCon.ConectaMPI)
{
- conOK = SolicitarServicioMPI();
+ conOK = ConectarMPIXRoad();
+ ///conOK = SolicitarServicioMPI();
if (!conOK)
HabilitaCargaManual();
}
@@ -767,6 +770,158 @@ private bool SolicitarServicio()
return ok;
}
+ private bool ConectarMPIXRoad()
+ {
+ bool ok = false;
+ try
+ {
+ string tipo = "MPI";
+ imgAndes.Visible = false;
+ imgRenaper.Visible = false; lblFechaDomicilio.Visible = false;
+ GrabarLogAcceso(tipo, Request["dni"].ToString());
+
+ long nrodocumento = long.Parse(Request["dni"].ToString());
+ // string sexo = Request["sexo"].ToString();
+
+ string rutaCert = ConfigurationManager.AppSettings["RutaCert"].ToString();
+ string BaseUrl = "https://xroadss.andes.gob.ar/r1/OPTIC/GOB/GOB00008/GP-SALUD/MPI";///ConfigurationManager.AppSettings["BaseUrlXroad"].ToString();
+ string Serv = "?identifier=http://www.renaper.gob.ar;";// GP-RENAPER/WS_RENAPER_DOCUMENTO/";
+ string clie = "OPTIC/GOB/GOB00008/GP-SALUD";//ConfigurationManager.AppSettings["ClienteXroad"].ToString();//"OPTIC/GOB/GOB00008/GP-SALUD/MPI";//
+ string param = nrodocumento.ToString(); ///+ "/" + sexo.ToUpper();
+ string host = BaseUrl + Serv + param;
+
+ ServicePointManager.Expect100Continue = true;
+ ServicePointManager.ServerCertificateValidationCallback = (snder, cert, chain, error) => true;
+ // ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
+ ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
+
+ HttpWebRequest req = (HttpWebRequest)WebRequest.Create(host);
+
+ //certificado
+ X509Certificate certificate = new X509Certificate(rutaCert, "", X509KeyStorageFlags.Exportable | X509KeyStorageFlags.MachineKeySet
+ | X509KeyStorageFlags.PersistKeySet);
+
+ req.ClientCertificates = new X509CertificateCollection() { certificate };
+ req.ContentType = "application/json";
+ req.AllowAutoRedirect = true;
+ req.Timeout = 10 * 1000;
+ req.Method = "GET";
+ req.Headers.Add("X-Road-Client", clie);
+
+
+
+
+ using (WebResponse response = req.GetResponse())
+ {
+ JavaScriptSerializer jsonSerializer = new JavaScriptSerializer();
+
+ using (Stream strReader = response.GetResponseStream())
+ {
+
+ using (StreamReader objReader = new StreamReader(strReader))
+ {
+
+ string responseBody = objReader.ReadToEnd();
+
+ var lista = JsonConvert.DeserializeObject>(responseBody);
+ var resultado2 = lista?.FirstOrDefault();
+
+ if (resultado2 != null)
+ {
+ lblValidador.Visible = true;
+ lblValidador.Text = "Paciente VALIDADO POR " + tipo;
+ ok = true;
+
+ txtDNI.Text = Request["dni"]?.ToString();
+
+ // Nombre y apellido
+ var nombreData = resultado2.Name?.FirstOrDefault();
+ txtApellido.Text = nombreData?.Family?.FirstOrDefault()?.ToUpper() ?? "";
+ txtNombre.Text = string.Join(" ", nombreData?.Given ?? new List()).ToUpper();
+
+ // Fecha nacimiento
+ txtFechaNacimiento.Value = resultado2.BirthDate.ToString("dd/MM/yyyy");
+
+ // Domicilio (toma el primero)
+ var direccion = resultado2.Address?.FirstOrDefault();
+
+ txtCalle.Value = direccion?.Line?.FirstOrDefault() ?? "SIN DATOS";
+ txtCiudad.Value = string.IsNullOrEmpty(direccion?.City) ? "SIN DATOS" : direccion.City;
+ txtProvincia.Value = string.IsNullOrEmpty(direccion?.State) ? "SIN DATOS" : direccion.State;
+ txtPais.Value = string.IsNullOrEmpty(direccion?.Country) ? "SIN DATOS" : direccion.Country;
+ txtCodigoPostal.Value = string.IsNullOrEmpty(direccion?.PostalCode) ? "SIN DATOS" : direccion.PostalCode;
+
+ // CUIL
+ txtCuil.Value = resultado2.Identifier?
+ .FirstOrDefault(x => x.System.Contains("cuil"))?.Value ?? "";
+
+ // Campos que ya no existen en este JSON
+ txtBarrio.Value = "SIN DATOS";
+ fallecimiento.Text = "";
+ fechaDomicilio.Text = "";
+
+ txtTelefono.Value = resultado2.Telecom?
+ .Where(x => x.System == "phone")
+ .OrderBy(x => x.Rank)
+ .FirstOrDefault()
+ ?.Value ?? "SIN DATOS";
+
+ var sexo = resultado2.Gender?.ToLower();
+
+ if (sexo == "female")
+ {
+ txtSexo.Value = "FEMENINO";
+ ddlSexo.SelectedValue = "2";
+ }
+ else if (sexo == "male")
+ {
+ txtSexo.Value = "MASCULINO";
+ ddlSexo.SelectedValue = "3";
+ }
+ else if (sexo == "other")
+ {
+ txtSexo.Value = "X";
+ ddlSexo.SelectedValue = "0";
+ }
+ else
+ {
+ txtSexo.Value = "SIN DATOS";
+ ddlSexo.SelectedValue = "0";
+ }
+ /// traer al paciente si no es nuevo, es modificacion
+ int id = Convert.ToInt32(Request.QueryString["id"]);
+ //datos del Paciente
+ Paciente pac = new Paciente();
+ if (id != 0) pac = (Paciente)pac.Get(typeof(Paciente), id);
+ txtTelefono.Value = pac.InformacionContacto;
+
+
+ }
+ else
+ ok = false;
+
+
+
+ }
+ response.Close();
+ }
+
+ }
+
+
+ }
+ catch (WebException ex)
+ {
+ ok = false;
+ string mensaje = ex.ToString();
+
+ }
+
+
+ return ok;
+
+ }
+
public void GrabarLogAcceso(string servicio, string dni)
{
try
@@ -792,6 +947,83 @@ INSERT INTO LAB_LogAccesoServicio
{ }
}
+ public class ResultadoMPIModel
+ {
+ [JsonProperty("resourceType")]
+ public string ResourceType { get; set; }
+
+ [JsonProperty("identifier")]
+ public List Identifier { get; set; }
+
+ [JsonProperty("active")]
+ public bool Active { get; set; }
+
+ [JsonProperty("name")]
+ public List Name { get; set; }
+
+ [JsonProperty("telecom")]
+ public List Telecom { get; set; }
+
+ [JsonProperty("gender")]
+ public string Gender { get; set; }
+
+ [JsonProperty("birthDate")]
+ public DateTime BirthDate { get; set; }
+
+ [JsonProperty("address")]
+ public List Address { get; set; }
+ }
+ public class IdentifierRenaper
+ {
+ [JsonProperty("system")]
+ public string System { get; set; }
+
+ [JsonProperty("value")]
+ public string Value { get; set; }
+ }
+ public class NameRenaper
+ {
+ [JsonProperty("use")]
+ public string Use { get; set; }
+
+ [JsonProperty("text")]
+ public string Text { get; set; }
+
+ [JsonProperty("family")]
+ public List Family { get; set; }
+
+ [JsonProperty("given")]
+ public List Given { get; set; }
+ }
+ public class TelecomRenaper
+ {
+ [JsonProperty("system")]
+ public string System { get; set; } // phone, email
+
+ [JsonProperty("value")]
+ public string Value { get; set; }
+
+ [JsonProperty("rank")]
+ public int Rank { get; set; }
+ }
+ public class AddressRenaper
+ {
+ [JsonProperty("line")]
+ public List Line { get; set; }
+
+ [JsonProperty("city")]
+ public string City { get; set; }
+
+ [JsonProperty("state")]
+ public string State { get; set; }
+
+ [JsonProperty("postalCode")]
+ public string PostalCode { get; set; }
+
+ [JsonProperty("country")]
+ public string Country { get; set; }
+ }
+
protected void btnConfirmar_Click(object sender, EventArgs e)
{
if (validadatos())
@@ -799,15 +1031,10 @@ protected void btnConfirmar_Click(object sender, EventArgs e)
{
if (validamail())
{
- //Configuracion oC = new Configuracion();
-
- //oC = (Configuracion)oC.Get(typeof(Configuracion), 1); // "IdEfector", oUser.IdEfector);
-
+
Utility oUtil = new Utility();
- ////instancio el usuario
- //Usuario us = new Usuario();
- //us = (Usuario)us.Get(typeof(Usuario), int.Parse(Session["idUsuario"].ToString()));
+
int id = Convert.ToInt32(Request.QueryString["id"]);
//datos del Paciente
diff --git a/WebLab/Protocolos/ProtocoloEdit2.aspx b/WebLab/Protocolos/ProtocoloEdit2.aspx
index d633a85c..cb97b304 100644
--- a/WebLab/Protocolos/ProtocoloEdit2.aspx
+++ b/WebLab/Protocolos/ProtocoloEdit2.aspx
@@ -303,15 +303,9 @@
| :
+
|
-
- |
- |
-
diff --git a/WebLab/Protocolos/ProtocoloEdit2.aspx.cs b/WebLab/Protocolos/ProtocoloEdit2.aspx.cs
index e3942200..cc2c6513 100644
--- a/WebLab/Protocolos/ProtocoloEdit2.aspx.cs
+++ b/WebLab/Protocolos/ProtocoloEdit2.aspx.cs
@@ -1593,6 +1593,7 @@ inner join lab_item P with (nolock) on dp.idsubitem = p.iditem
ddlOrigen.SelectedValue = oC.IdOrigenUrgencia.ToString(); //Origen: Guardia
ddlSectorServicio.SelectedValue = oC.IdSectorUrgencia.ToString(); // sector de urgencia
ddlPrioridad.SelectedValue = "2"; // Prioridad: Urgencia
+ chkRecordarPractica.Visible = false;
}
else
{
@@ -3649,71 +3650,7 @@ private void SelectedEfector()
}
- //private void CargarSolicitantesInternos()
- //{
- // Utility oUtil = new Utility();
- // ///Carga de combos de Medicos Solicitantes
- // string 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("No identificado", "0"));
- // ddlEspecialista.UpdateAfterCallBack = true;
- // //imgCrearSolicitante.Visible = false;
- // //imgCrearSolicitante.UpdateAfterCallBack = true;
- //}
-
- //private void CargarSolicitantesExternos(string m_solicitante)
- //{
- // Utility oUtil = new Utility();
-
- // ///Carga de combos de solicitantes expertos
- // string m_ssql = "select idSolicitanteExterno, apellido + ', ' + nombre as nombre from Lab_SolicitanteExterno where baja=0 order by apellido, nombre";
- // oUtil.CargarCombo(ddlEspecialista, m_ssql, "idSolicitanteExterno", "nombre");
- // ddlEspecialista.Items.Insert(0, new ListItem("No identificado", "0"));
- // if (m_solicitante != "") ddlEspecialista.SelectedValue = m_solicitante;
- // ddlEspecialista.UpdateAfterCallBack = true;
- // //imgCrearSolicitante.Visible = true;
- // //imgCrearSolicitante.UpdateAfterCallBack = true;
- //}
-
- //protected void btnGuardarSolicitante_Click(object sender, EventArgs e)
- //{
- // if (Page.IsValid)
- // {
- // GuardarSolicitanteExterno();
-
- // LimpiarDatosSolicitante();
- // //Panel1.Visible = false;
- // //Panel1.UpdateAfterCallBack = true;
- // }
- //}
-
- //private void GuardarSolicitanteExterno()
- //{
- // Usuario oUser = new Usuario();
- // SolicitanteExterno oRegistro = new SolicitanteExterno();
- // Configuracion oC = new Configuracion(); oC = (Configuracion)oC.Get(typeof(Configuracion), "IdConfiguracion", 1);
- // oRegistro.IdEfector = oC.IdEfector;
- // oRegistro.Matricula = txtMatricula.Text;
- // oRegistro.Apellido = txtApellidoSolicitante.Text;
- // oRegistro.Nombre = txtNombreSolicitante.Text;
- // oRegistro.IdUsuarioRegistro = (Usuario)oUser.Get(typeof(Usuario), int.Parse(Session["idUsuario"].ToString()));
- // oRegistro.FechaRegistro = DateTime.Now;
- // oRegistro.Save();
- // CargarSolicitantesExternos(oRegistro.IdSolicitanteExterno.ToString());
- //}
-
- //protected void btnCancelarSolicitante_Click(object sender, EventArgs e)
- //{
- // LimpiarDatosSolicitante();
-
- //}
-
- //private void LimpiarDatosSolicitante()
- //{
- // txtMatricula.Text = "";
- // txtApellidoSolicitante.Text = "";
- // txtNombreSolicitante.Text = "";
- //}
+
protected void gvLista_SelectedIndexChanged(object sender, EventArgs e)
{
@@ -3859,18 +3796,7 @@ private void BuscarNombreDiagnostico()
ISession m_session = NHibernateHttpModule.CurrentSession;
if (oC.NomencladorDiagnostico == 0)
{
- //ICriteria crit = m_session.CreateCriteria(typeof(Cie10));
- //crit.Add(Expression.Sql(" Nombre like '%" + txtNombreDiagnostico.Text + "%' order by Nombre"));
-
- //IList items = crit.List();
-
- //foreach (Cie10 oDiagnostico in items)
- //{
- // ListItem oDia = new ListItem();
- // oDia.Text = oDiagnostico.Codigo + " - " + oDiagnostico.Nombre;
- // oDia.Value = oDiagnostico.Id.ToString();
- // lstDiagnosticos.Items.Add(oDia);
- //}
+
string m_strSQL = @"select id, codigo + ' -' + nombre from sys_cie10 (nolock) where tipo='DIAG' and Nombre like '%" + txtNombreDiagnostico.Text.Trim() + "%' order by Nombre";
@@ -4618,17 +4544,7 @@ private bool VerificaObligatoriedadFIS()
}
- //private bool VerificarFechaPacienteMuestra()
- //{
- // Paciente oPaciente = new Paciente();
- // oPaciente = (Paciente)oPaciente.Get(typeof(Paciente), int.Parse(HFIdPaciente.Value));
-
- // string tieneingreso = oPaciente.GetFechaProtocolosReciente(Request["idServicio"].ToString(),ddlMuestra.SelectedValue);
- // if (tieneingreso==txtFecha.Value) return false;
- // else return true;
- //}
-
-
+
private bool VerificarAnalisisComplejosContenidos(string listaCodigo)
@@ -4666,17 +4582,6 @@ private bool VerificarAnalisisComplejosContenidos(string listaCodigo)
- //protected void lnkReimprimirComprobante_Click(object sender, EventArgs e)
- //{
- // Business.Data.Laboratorio.Protocolo oRegistro = new Business.Data.Laboratorio.Protocolo();
- // oRegistro = (Business.Data.Laboratorio.Protocolo)oRegistro.Get(typeof(Business.Data.Laboratorio.Protocolo), int.Parse(Request["idProtocolo"].ToString()));
-
- // ////Imprimir Comprobante para el paciente
- // Imprimir(oRegistro);
-
-
-
- //}
protected void lnkReimprimirCodigoBarras_Click(object sender, EventArgs e)
{
@@ -4752,15 +4657,7 @@ private void Avanzar(int avance)
}
}
- }
- //if (avance == 1)
- //{
- // ProtocoloNuevo = ProtocoloActual+1;
- //}
- //else //retrocede
- // ProtocoloNuevo = ProtocoloActual - 1;
-
-
+ }
ISession m_session = NHibernateHttpModule.CurrentSession;
ICriteria crit = m_session.CreateCriteria(typeof(Protocolo));
diff --git a/WebLab/Resultados/ResultadoBusqueda.aspx b/WebLab/Resultados/ResultadoBusqueda.aspx
index 06d8bd7a..4bb0fd69 100644
--- a/WebLab/Resultados/ResultadoBusqueda.aspx
+++ b/WebLab/Resultados/ResultadoBusqueda.aspx
@@ -349,7 +349,7 @@
-
+
diff --git a/WebLab/Resultados/ResultadoEdit2.aspx b/WebLab/Resultados/ResultadoEdit2.aspx
index 63d0c042..dbeda29e 100644
--- a/WebLab/Resultados/ResultadoEdit2.aspx
+++ b/WebLab/Resultados/ResultadoEdit2.aspx
@@ -728,7 +728,7 @@
-
+
diff --git a/WebLab/Resultados/ResultadoNoPacienteView.aspx.cs b/WebLab/Resultados/ResultadoNoPacienteView.aspx.cs
index 70b78d97..98dbfe20 100644
--- a/WebLab/Resultados/ResultadoNoPacienteView.aspx.cs
+++ b/WebLab/Resultados/ResultadoNoPacienteView.aspx.cs
@@ -28,9 +28,9 @@ public partial class ResultadoNoPacienteView : System.Web.UI.Page
{
CrystalReportSource oCr = new CrystalReportSource();
- bool hayAntecedente = false;
+
Configuracion oCon = new Configuracion();
- DataTable dtProtocolo;
+
public Usuario oUser = new Usuario();
@@ -85,21 +85,12 @@ protected void Page_Unload(object sender, EventArgs e)
}
private void Inicializar()
{
- //CargarGrilla();
+
- pnlAntecedentes.Visible = false;
-
- pnlHC.Visible = true;
- //if (Request["validado"].ToString() == "1")
- // lblTitulo.Text = "HISTORIAL DE RESULTADOS";
- //else
- // lblTitulo.Text = "CONSULTA DE RESULTADOS";
-
+ pnlAntecedentes.Visible = false;
+ pnlHC.Visible = true;
pnlReferencia.Visible = true;
-
MuestraDatos(Request["idProtocolo"].ToString());
-
-
if (Request["desde"] == "Urgencia")
hypRegresar.NavigateUrl = "../Urgencia/UrgenciaList.aspx";
else
@@ -187,12 +178,7 @@ private void MuestraDatos(string p)
oConservacion = (Conservacion)oConservacion.Get(typeof(Conservacion), oRegistro.IdConservacion);
lblConservacion.Text = oConservacion.Descripcion;
}
- //lblServicio.Text = oRegistro.IdTipoServicio.Nombre.ToUpper();
-
-
-
-
- //Master.FindControl("ContentPlaceHolder1").FindControl("Panel1").Controls.Add(tContenido);
+
Control control1 = Master.FindControl("ContentPlaceHolder1").FindControl("Panel1").FindControl("tContenido");
Table tablaContenido = (Table)control1;
int cantidadFilas =0;
@@ -222,83 +208,14 @@ private void MuestraDatos(string p)
lblFecha.Text = oRegistro.Fecha.ToShortDateString();
lblProtocolo.Text = oRegistro.GetNumero().ToString();
- //hplProtocolo.NavigateUrl = "../Protocolos/ProtocoloEdit2.aspx?idServicio=" + oRegistro.IdTipoServicio.IdTipoServicio.ToString()+ "&Operacion=Modifica&idProtocolo=" +oRegistro.IdProtocolo.ToString();
-
- //if (oRegistro.IdEfector == oRegistro.IdEfectorSolicitante)
- // lblOrigen.Text = oRegistro.IdOrigen.Nombre;
- //else
- // lblOrigen.Text = oRegistro.IdEfectorSolicitante.Nombre;
-
- //if ((oRegistro.IdEspecialistaSolicitante > 0) && (oRegistro.IdEfectorSolicitante == oRegistro.IdEfector))
- //{
- // try
- // {
- // Profesional oMedico = new Profesional();
- // oMedico = (Profesional)oMedico.Get(typeof(Profesional), oRegistro.IdEspecialistaSolicitante);
- // if (oMedico != null)
- // lblMedico.Text = oMedico.Apellido + " " + oMedico.Nombre;
- // }
- // catch (Exception ex)
- // {
- // lblMedico.Text = ""; string exception = "";
- // //while (ex != null)
- // //{
- // // exception = ex.Message + " ";
-
- // //}
- // }
- //}
- //else
- // lblMedico.Text = "";
- //lblPrioridad.Text = oRegistro.IdPrioridad.Nombre;
- //if (oRegistro.IdPrioridad.Nombre == "URGENTE")
- //{
- // lblPrioridad.ForeColor = Color.Red;
- // lblPrioridad.Font.Bold = true;
- //}
+
lblSector.Text = oRegistro.IdSector.Nombre;
if (oRegistro.Sala != "") lblSector.Text += " Sala: " + oRegistro.Sala;
if (oRegistro.Cama != "") lblSector.Text += " Cama: " + oRegistro.Cama;
- //HFIdPaciente.Value = oRegistro.IdPaciente.IdPaciente.ToString();
-
- ///Datos del Paciente
- //if (oRegistro.IdPaciente.IdEstado == 2) lblDni.Text = "(Sin DU Temporal)";
- //else lblDni.Text = oRegistro.IdPaciente.NumeroDocumento.ToString();
- //lblPaciente.Text = oRegistro.IdPaciente.Apellido.ToUpper() + " " + oRegistro.IdPaciente.Nombre.ToUpper();
- //lblSexo.Text = oRegistro.IdPaciente.getSexo();
- //lblFechaNacimiento.Text = oRegistro.IdPaciente.FechaNacimiento.ToShortDateString();
- //lblEdad.Text = oRegistro.Edad.ToString();
- //switch (oRegistro.UnidadEdad)
- //{
- // case 0: lblEdad.Text += " años"; break;
- // case 1: lblEdad.Text += " meses"; break;
- // case 2: lblEdad.Text += " días"; break;
- //}
lblNumeroOrigen.Text = oRegistro.NumeroOrigen;
-
- ////////////////////////////////////////
- //string embarazada="";
- //ISession m_session = NHibernateHttpModule.CurrentSession;
- //ICriteria crit = m_session.CreateCriteria(typeof(ProtocoloDiagnostico));
- //crit.Add(Expression.Eq("IdProtocolo", oRegistro));
- //IList lista = crit.List();
- //if (lista.Count > 0)
- //{
- // foreach (ProtocoloDiagnostico oDiag in lista)
- // {
- // Cie10 oD = new Cie10();
- // oD = (Cie10)oD.Get(typeof(Cie10), oDiag.IdDiagnostico);
- // if ( lblDiagnostico.Text=="") lblDiagnostico.Text = oD.Nombre;
- // else lblDiagnostico.Text += " - " + oD.Nombre;
- // if (oD.Codigo=="Z32.1") embarazada="E";
-
- // }
- //}
-
- //lblCodigoPaciente.Text = oRegistro.getCodificaHiv(embarazada); // lblSexo.Text.Substring(0, 1) + oRegistro.IdPaciente.Nombre.Substring(0, 2) + oRegistro.IdPaciente.Apellido.Substring(0, 2) + lblFechaNacimiento.Text.Replace("/", "") + embarazada;
lblPedidoOriginal.Text = oRegistro.GetPracticasPedidas();
@@ -324,11 +241,7 @@ private void LlenarTabla(string p)
da.Fill(Ds);
-
- //int cantidadResultadosValidados = Ds.Tables[0].Rows.Count;
- //if (cantidadResultadosValidados > 0)
-
- //{
+
string s = System.Globalization.CultureInfo.CurrentCulture.NumberFormat.CurrencyDecimalSeparator;
@@ -391,31 +304,15 @@ private void LlenarTabla(string p)
objCellValida_TITULO.Controls.Add(lblValida);
Label lblCargadoPor = new Label();
- if ((Request["Operacion"].ToString() == "HC") && (Request["validado"].ToString() == "1"))
- {
- lblCargadoPor.Text = "VALIDADO POR";
- // Panel1.ScrollBars = ScrollBars.None;
- }
+ if ((Request["Operacion"].ToString() == "HC") && (Request["validado"].ToString() == "1"))
+ lblCargadoPor.Text = "VALIDADO POR";
else
lblCargadoPor.Text = "ESTADO";
- objCellPersona_TITULO.Controls.Add(lblCargadoPor);
-
-
- /////observaciones
- //if (Request["Operacion"].ToString() == "Valida")
- //{
-
-
+ objCellPersona_TITULO.Controls.Add(lblCargadoPor);
objFila_TITULO.Cells.Add(objCellAnalisis_TITULO);
- objFila_TITULO.Cells.Add(objCellResultado_TITULO);
-
-
-
-
- objFila_TITULO.Cells.Add(objCellValoresReferencia_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);
@@ -432,6 +329,34 @@ private void LlenarTabla(string p)
int tablas = Ds.Tables.Count;
if (tablas > 0)
{
+ ////Caro PF: Cache de resultado item
+
+ ISession session = NHibernateHttpModule.CurrentSession;
+ ///CARO PF: traer detalleprotocolos y derivaciones antes del for para no ir a la base N veces
+ var idsDetallesList = Ds.Tables[0].AsEnumerable()
+ .Select(r => r.Field("idDetalleProtocolo"))
+ .ToList();
+
+ var detallesList = session.CreateCriteria(typeof(DetalleProtocolo))
+ .Add(Expression.In("IdDetalleProtocolo", idsDetallesList.ToArray()))
+ .List()
+ .Cast()
+ .ToList();
+
+ var detallesDict = detallesList
+ .ToDictionary(d => d.IdDetalleProtocolo);
+
+ // Traer todas las Derivaciones juntas
+ var derivacionesList = session.CreateCriteria(typeof(Derivacion))
+ .CreateAlias("IdDetalleProtocolo", "dp")
+ .Add(Expression.In("dp.IdDetalleProtocolo", idsDetallesList.ToArray()))
+ .List()
+ .Cast()
+ .ToList();
+
+ var derivacionesDict = derivacionesList
+ .ToDictionary(d => d.IdDetalleProtocolo.IdDetalleProtocolo);
+ /// CARO PF : fin
for (int i = 0; i < Ds.Tables[0].Rows.Count; i++)
{
//decimal m_minimoReferencia=-1;
@@ -465,12 +390,7 @@ private void LlenarTabla(string p)
string m_estadoObservacion = Ds.Tables[0].Rows[i].ItemArray[29].ToString();
string m_area = Ds.Tables[0].Rows[i].ItemArray[30].ToString();
- //if (m_codificaPaciente == "True")
- //{
- // lblPaciente.Visible = false;
- // lblCodigoPaciente.Visible = true;
- //}
-
+
m_hijo = Ds.Tables[0].Rows[i].ItemArray[1].ToString();
m_titulo = Ds.Tables[0].Rows[i].ItemArray[0].ToString();
@@ -494,24 +414,20 @@ private void LlenarTabla(string p)
{
TableRow objRow = new TableRow();
TableCell objCell = new TableCell();
- Label lbl0 = new Label();
- //lbl0.ForeColor = Color
+ 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);
- //if (Request["Operacion"].ToString() == "HC")
- // objCell.ColumnSpan = 8;
- //else
+ objCell.Controls.Add(lbl0);
objCell.ColumnSpan = 8;
objRow.BackColor = Color.Beige;
objRow.HorizontalAlign = HorizontalAlign.Center;
objRow.Cells.Add(objCell);
- // objRow.CssClass = "myLabelIzquierda";
+
tContenido.Controls.Add(objRow);
pivot_Area = m_area;
@@ -539,10 +455,16 @@ private void LlenarTabla(string p)
tContenido.Controls.Add(objRow);
m_nombre = m_titulo;
+ if (m_trajoMuestra == "No")
+ {
+ Label lblSinMuestra = new Label();
+ lblSinMuestra.TabIndex = short.Parse("500");
+ lblSinMuestra.Text = "Sin Muestra";// +oItem.IdEfectorDerivacion.Nombre; /// Ds.Tables[0].Rows[i].ItemArray[1].ToString();
+ lblSinMuestra.Font.Italic = true;
+ lblSinMuestra.ForeColor = Color.Blue;
+ objCellResultado.Controls.Add(lblSinMuestra);
+ }
}
-
-
-
Label lbl1 = new Label();
if (m_hijo == m_titulo) lbl1.Text = m_hijo;
else lbl1.Text = " " + m_hijo;
@@ -562,60 +484,27 @@ private void LlenarTabla(string p)
objCellAnalisis.Controls.Add(lbl1);
- Item oItem = new Item();
- oItem = (Item)oItem.Get(typeof(Item), m_idItem);
-
- //DetalleProtocolo oDetalle = new DetalleProtocolo();
- //oDetalle = (DetalleProtocolo)oDetalle.Get(typeof(DetalleProtocolo), i_iddetalleProtocolo);
+ DetalleProtocolo oDetalle;
+ detallesDict.TryGetValue(i_iddetalleProtocolo, out oDetalle);
+ Derivacion oDeriva;
+ derivacionesDict.TryGetValue(i_iddetalleProtocolo, out oDeriva);
+ //fin
+ Item oItem = new Item();
+ oItem = oDetalle.IdSubItem; // (Item)oItem.Get(typeof(Item), m_idItem);
- // bool es_Bacteriologia = false;
- string observacionesDetalle = "";
+
///Antes de mostrar el control verifica si está derivado
- if (oItem.IdEfectorDerivacion != oItem.IdEfector) //es derivado
+ if (oDeriva != null) /// esta pendiente
{
Label lblDerivacion = new Label();
lblDerivacion.Font.Italic = true;
- lblDerivacion.TabIndex = short.Parse("500");
- //Verifica el estado de la derivacion
- string estadoDerivacion = "";
-
- if (i_iddetalleProtocolo != 0)
- {
- DetalleProtocolo oDetalle = new DetalleProtocolo();
- oDetalle = (DetalleProtocolo)oDetalle.Get(typeof(DetalleProtocolo), i_iddetalleProtocolo);
-
- observacionesDetalle = oDetalle.Observaciones;
-
- Derivacion oDeriva = new Derivacion();
- oDeriva = (Derivacion)oDeriva.Get(typeof(Derivacion), "IdDetalleProtocolo", oDetalle);
- if (oDeriva == null) /// esta pendiente
- {
- estadoDerivacion = "Pendiente de Derivacion";
- lblDerivacion.ForeColor = Color.Red;
- }
- else
- {
- //if (oDeriva.Estado == 0) /// pendiente
- //{
- // estadoDerivacion = "Pendiente de Derivacion";
- // lblDerivacion.ForeColor = Color.Red;
- //}
- //if (oDeriva.Estado == 1) /// enviado
- // estadoDerivacion = "Derivado: " + oItem.IdEfectorDerivacion.Nombre;
- //if (oDeriva.Estado == 2) /// no enviado
- // estadoDerivacion = " No Derivado. " + oDeriva.Observacion;
-
- lblDerivacion.Font.Bold = true;
- estadoDerivacion = oDetalle.ResultadoCar; //Para todos los estados
- if (oDeriva.Resultado != "")
- estadoDerivacion += " - Resultado Informado: " + oDeriva.Resultado;
-
- }
-
- }
- lblDerivacion.Text = estadoDerivacion;
-
+ lblDerivacion.TabIndex = short.Parse("500");
+ string estadoDerivacion = "";
+ estadoDerivacion = oDetalle.ResultadoCar;
+ if (oDeriva.Resultado != "")
+ estadoDerivacion += " - Resultado Informado: " + oDeriva.Resultado;
+ lblDerivacion.Text = estadoDerivacion;
objCellResultado.ColumnSpan = 1;
objCellResultado.Controls.Add(lblDerivacion);
}
@@ -658,13 +547,10 @@ private void LlenarTabla(string p)
else
olbl.Text = x.ToString(System.Globalization.CultureInfo.InvariantCulture) + " " + unMedida;
- if (i_iddetalleProtocolo != 0)
+ if (oDetalle != null)
{
- if (i_iddetalleProtocolo != 9999999)
- {
- DetalleProtocolo oDetalle = new DetalleProtocolo();
- oDetalle = (DetalleProtocolo)oDetalle.Get(typeof(DetalleProtocolo), i_iddetalleProtocolo);
-
+
+ m_usuariovalida += " " + oDetalle.FechaValida.ToShortDateString();
if (Observaciones != "")
{
if (m_conResultado == "False")
@@ -674,7 +560,10 @@ private void LlenarTabla(string p)
{
Usuario oUser = new Usuario();
oUser = (Usuario)oUser.Get(typeof(Usuario), oDetalle.IdUsuarioValidaObservacion);
- if (oUser.FirmaValidacion == "") m_usuariovalida = oUser.Apellido + " " + oUser.Nombre; else m_usuariovalida = oUser.FirmaValidacion;
+ if (oUser.FirmaValidacion == "") m_usuariovalida = oUser.Apellido + " " + oUser.Nombre;
+ else m_usuariovalida = oUser.FirmaValidacion;
+
+ m_usuariovalida +=" " + oDetalle.FechaValida.ToShortDateString();
}
}
else
@@ -684,31 +573,26 @@ private void LlenarTabla(string p)
if (oDetalle.IdProtocolo.IdTipoServicio.IdTipoServicio!=5)
{
- string resultadoAnterior = 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.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.ForeColor = Color.Green;
- olblResultadoAnterior.Width = Unit.Pixel(20);
- olblResultadoAnterior.Text = resultadoAnterior;
+ string resultadoAnterior = 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.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);
- //Button oB = new Button();
- //oB.Text = "R.ANT";
- //oB.OnClientClick = "javascript: AntecedenteView (" + oDetalle.IdSubItem.IdItem.ToString() + "," + oDetalle.IdProtocolo.IdPaciente.IdPaciente.ToString() + "); return false";
- //objCellResultadoAnterior.Controls.Add(oB);
- }
+ }
}
- // if (VerificaValorReferencia(m_minimoReferencia, m_maximoReferencia, x, m_tipoValorReferencia))
+
if (oDetalle.VerificaValorReferencia(x))
olbl.ForeColor = Color.Black;
else
@@ -721,48 +605,28 @@ private void LlenarTabla(string p)
lblValorCritico.TabIndex = short.Parse("500");
lblValorCritico.Text = " VALOR CRITICO";
lblValorCritico.Font.Bold = true;
- lblValorCritico.ForeColor = Color.OrangeRed;
- // objCellResultado.ColumnSpan = 5;
+ lblValorCritico.ForeColor = Color.OrangeRed;
- }
-
- ///IMAGENES ADJUNTAS
-
-
-
+ }
if (oDetalle.tieneAdjuntoVisible())//tiene observaciones
{
btnImagen.TabIndex = short.Parse("500");
btnImagen.ID = "IMG" + oDetalle.IdDetalleProtocolo.ToString();
btnImagen.ImageUrl = "~/App_Themes/default/images/obs_validado.png";
-
btnImagen.ToolTip = "Adjunto imprimible para " + lbl1.Text.Replace(" ", "");
-
-
btnImagen.Attributes.Add("onClick", "javascript: AdjuntoEdit (" + oDetalle.IdDetalleProtocolo.ToString() + "," + oDetalle.IdProtocolo.IdTipoServicio.IdTipoServicio.ToString() + ",'" + Request["Operacion"].ToString() + "'); return false");
-
}
else
- btnImagen.Visible = false;
-
- // fin de imagenes adjuntas
- }
+ btnImagen.Visible = false;
}
objCellResultado.Controls.Add(olbl);
objCellResultado.Controls.Add(btnImagen);
///etiqueta de unidad de medida
Label olblUM = new Label();
-
-
- // olblUM.ID = "UM" + m_idItem.ToString();
olblUM.Font.Size = FontUnit.Point(7);
- olblUM.Text = unMedida;
-
-
-
-
+ olblUM.Text = unMedida;
objCellResultado.Controls.Add(olblUM);
olblUM.Visible = false;
@@ -791,33 +655,25 @@ private void LlenarTabla(string p)
}
objCellResultado.Controls.Add(olbl);
- if ((i_iddetalleProtocolo != 0) )
+ if (oDetalle != null)
{
- if (i_iddetalleProtocolo != 9999999)
- {
- DetalleProtocolo oDetalle = new DetalleProtocolo();
- oDetalle = (DetalleProtocolo)oDetalle.Get(typeof(DetalleProtocolo), i_iddetalleProtocolo);
+
+ m_usuariovalida += " " + oDetalle.FechaValida.ToShortDateString();
if (oDetalle.IdProtocolo.IdTipoServicio.IdTipoServicio != 5)
{
string resultadoAnterior = oDetalle.BuscarResultadoAnterior(oDetalle.IdSubItem, oDetalle.IdItem, false);
if (resultadoAnterior != "")
{
- hayAntecedente = true;
+ // hayAntecedente = true;
Label olblResultadoAnterior = new Label();
olblResultadoAnterior.TabIndex = short.Parse("500");
- olblResultadoAnterior.Font.Size = FontUnit.Point(8);
- //olblResultadoAnterior.CssClass = "myLink";
+ 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.ForeColor = Color.Green;
+ olblResultadoAnterior.ToolTip = "Haga clic aqui para ver más datos.";
olblResultadoAnterior.Width = Unit.Pixel(20);
olblResultadoAnterior.Text = resultadoAnterior;
-
objCellResultadoAnterior.Controls.Add(olblResultadoAnterior);
- //Button oB = new Button();
- //oB.Text = "R.ANT";
- //oB.OnClientClick = "javascript: AntecedenteView (" + oDetalle.IdSubItem.IdItem.ToString() + "," + oDetalle.IdProtocolo.IdPaciente.IdPaciente.ToString() + "); return false";
- //objCellResultadoAnterior.Controls.Add(oB);
+
}
}
@@ -835,47 +691,31 @@ private void LlenarTabla(string p)
objCellResultado.Controls.Add(btnImagen);
}
}
- }
+
} // fin case 1
break;
-
-
}//fin swicth
-
- Label lblPersona = new Label();
- // lblPersona.TabIndex = short.Parse("500");
+ 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);
-
-
+ objCellPersona.Controls.Add(lblPersona);
}
- Label lblValoresReferencia = new Label();
-
- // lblValoresReferencia.ID = "VR" + m_idItem.ToString();
+ Label lblValoresReferencia = new Label();
lblValoresReferencia.Font.Italic = true;
lblValoresReferencia.Font.Size = FontUnit.Point(8);
if (valorReferencia != "")
{// muestra el valor guardado
lblValoresReferencia.Text = valorReferencia;
- if (m_metodo != "")
- // lblValoresReferencia.Text += " |Método:" + m_metodo;
+ if (m_metodo != "")
lblValoresReferencia.Text += Environment.NewLine + m_metodo;
- }
- //else
- // lblValoresReferencia.Text = oDetalle.CalcularValoresReferencia();
+ }
objCellValoresReferencia.Controls.Add(lblValoresReferencia);
}
@@ -885,27 +725,19 @@ private void LlenarTabla(string p)
///Definir los anchos de las columnas
objCellAnalisis.Width = Unit.Percentage(30);
objCellResultado.Width = Unit.Percentage(30);
- objCellValoresReferencia.Width = Unit.Percentage(20);
- // objCellValida.Width = Unit.Percentage(5);
+ 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);
-
- //if (Request["Operacion"].ToString() != "HC") objFila.Cells.Add(objCellUnMedida);
-
- objFila.Cells.Add(objCellValoresReferencia);
+ objFila.Cells.Add(objCellResultado);
- //if ((Request["Operacion"].ToString() == "Valida") || (Request["Operacion"].ToString() == "Control")) objFila.Cells.Add(objCellValida);
+ objFila.Cells.Add(objCellValoresReferencia);
objFila.Cells.Add(objCellPersona);
objFila.Cells.Add(objCellResultadoAnterior);
- //if (Request["Operacion"].ToString() != "HC") objFila.Cells.Add(objCellObservaciones);
+
//////
Master.FindControl("ContentPlaceHolder1").FindControl("Panel1").Controls.Add(tContenido);
@@ -1076,48 +908,7 @@ private void Imprimir(Protocolo oProtocolo, string tipo)
}
- //protected void gvLista_RowCommand(object sender, GridViewCommandEventArgs e)
- //{
- // if (e.CommandName == "Ingresar")
- // {
- // dtProtocolo = (System.Data.DataTable)(Session["Tabla1"]);
- // if (dtProtocolo != null)
- // {
- // for (int i = 0; i < dtProtocolo.Rows.Count; i++)
- // {
- // // dtProtocolo.Rows[i].Delete();
- // if (dtProtocolo.Rows[i][0].ToString() == e.CommandArgument.ToString()) CurrentIndexGrilla = i;
- // }
- // CurrentPageIndex = int.Parse( e.CommandArgument.ToString());
- // Response.Redirect("ResultadoView.aspx?idServicio=" + Request["idServicio"].ToString() + "&Operacion=" + Request["Operacion"].ToString() + "&idProtocolo=" + e.CommandArgument + "&Index=" + CurrentIndexGrilla + "&idArea=" + Request["idArea"].ToString() + "&validado=" + Request["validado"].ToString() + "&modo=" + Request["modo"].ToString(), false);
- // }
- // else
- // Response.Redirect("../FinSesion.aspx", false);
- // }
-
- //}
-
- //protected void gvLista_RowDataBound(object sender, GridViewRowEventArgs e)
- //{
- // if (e.Row.RowType == DataControlRowType.DataRow)
- // {
- // ImageButton CmdModificar = (ImageButton)e.Row.Cells[2].Controls[1];
- // CmdModificar.CommandArgument = gvLista.DataKeys[e.Row.RowIndex].Value.ToString();
- // CmdModificar.CommandName = "Ingresar";
-
-
- // string idProtocolo= this.gvLista.DataKeys[e.Row.RowIndex].Value.ToString();
- // string s_detalle = e.Row.Cells[0].Text + ": " + getDetalleProtocolo(idProtocolo);
-
- // e.Row.Cells[0].ToolTip = s_detalle;
- // e.Row.Cells[1].ToolTip = s_detalle;
-
- // CmdModificar.ToolTip = s_detalle;
- // }
-
-
- //}
-
+
protected void cvValidaControles_ServerValidate(object source, ServerValidateEventArgs args)
{
//if ( (ValidaControlesSuperior()) && (ValidaControlesInferior()) )
@@ -1153,65 +944,7 @@ private bool estaVisibleControl(string idarea)
- protected void btnSiguiente_Click(object sender, EventArgs e)
- {
-
- }
-
- //private void Avanzar(int avance)
- //{
- // //try
- // //{
-
- // if (Session["Tabla1"] != null)
- // {
- // if (CurrentIndexGrilla <= UltimaPageIndex)
- // {
- // if (avance == 1)
- // {
- // if (CurrentIndexGrilla < UltimaPageIndex) CurrentIndexGrilla += 1; //avanza
- // }
- // else //retrocede
- // CurrentIndexGrilla = CurrentIndexGrilla - 1; //retrocede
-
- // if (CurrentIndexGrilla > -1)
- // {
- // dtProtocolo = (System.Data.DataTable)(Session["Tabla1"]);
- // CurrentPageIndex = int.Parse(dtProtocolo.Rows[CurrentIndexGrilla][0].ToString());
-
- // Response.Redirect("ResultadoView.aspx?idServicio=" + Request["idServicio"].ToString() + "&Operacion=" + Request["Operacion"].ToString() + "&idProtocolo=" + CurrentPageIndex + "&Index=" + CurrentIndexGrilla + "&idArea=" + Request["idArea"].ToString() + "&validado=" + Request["validado"].ToString() + "&modo=" + Request["modo"].ToString(), false);
- // }
- // }
- // else
- // if (Request["Operacion"].ToString() == "HC")
- // Response.Redirect("../Informes/HistoriaClinicaFiltro.aspx?Tipo=Paciente", false);
- // else
- // Response.Redirect("ResultadoBusqueda.aspx?idServicio=" + Request["idServicio"].ToString() + "&Operacion=" + Request["Operacion"].ToString() + "&modo=" + Request["modo"].ToString(), false);
-
- // }
- // else Response.Redirect("../FinSesion.aspx", false);
-
-
-
- //}
-
- protected void lnkPosterior_Click(object sender, EventArgs e)
- {
- //Avanzar(1);
- }
-
- protected void lnkAnterior_Click(object sender, EventArgs e)
- {
- //Avanzar(-1);
- }
-
-
- protected void lnkAuditoria_Click(object sender, EventArgs e)
- {
-
- }
-
-
+
protected void imgPdf_Click(object sender, ImageClickEventArgs e)
{
@@ -1226,75 +959,7 @@ protected void imgPdf_Click(object sender, ImageClickEventArgs e)
}
-
- protected void lnkMarcar_Click(object sender, EventArgs e)
- {
-
- Marcar(true);
-
- }
-
- private void Marcar(bool p)
- {
-
- CheckBox chk;
-
-
- if (Page.Master != null)
- {
- foreach (Control control in Page.Master.Controls)
- {
- if (control is HtmlForm)
- {
- foreach (Control controlform in control.Controls)
- {
- if (controlform is ContentPlaceHolder)
- {
- foreach (Control control1 in controlform.Controls)
- {
- if (control1 is Panel)
- foreach (Control control2 in control1.Controls)
- {
- if (control2 is Table)
- foreach (Control control3 in control2.Controls)
- {
-
- if (control3 is TableRow)
- foreach (Control control4 in control3.Controls)
- {
-
- if (control4 is TableCell)
- foreach (Control control5 in control4.Controls)
- {
-
- if (control5 is CheckBox)
- {
- chk = (CheckBox)control5;
- chk.Checked = p;
-
-
-
- }
-
-
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-
- }
-
- protected void lnkDesmarcar_Click(object sender, EventArgs e)
- {
- Marcar(false);
- }
-
+
protected void btnVerAntecendente_Click(object sender, EventArgs e)
{
//if (ddlItem.SelectedValue != "0")
@@ -1330,34 +995,7 @@ protected void btnPeticion_Click(object sender, EventArgs e)
}
- private string getDetalleProtocolo(string idProtocolo)
- {
- string dev = ""; int i = 0;
- Protocolo oRegistro = new Protocolo();
- oRegistro = (Protocolo)oRegistro.Get(typeof(Protocolo), int.Parse(idProtocolo));
-
- ISession m_session = NHibernateHttpModule.CurrentSession;
- ICriteria crit = m_session.CreateCriteria(typeof(DetalleProtocolo));
- crit.Add(Expression.Eq("IdProtocolo", oRegistro));
- IList items = crit.List();
- foreach (DetalleProtocolo oDet in items)
- {
- i += 1;
- if (dev == "")
- dev = oDet.IdItem.Nombre;
- else
- {
- if (dev.IndexOf(oDet.IdItem.Nombre) == -1)
- dev = dev + " - " + oDet.IdItem.Nombre;
- }
- }
- //return i.ToString() + ": " + dev;
- return dev;
- }
- protected void btnArchivos_Click(object sender, EventArgs e)
- {
- Response.Redirect("../Protocolos/ProtocoloAdjuntar.aspx?idProtocolo=" + Request["idProtocolo"].ToString() + "&desde=resultado");
- }
+
protected void imgPdf_Click1(object sender, EventArgs e)
{
if (Session["idUsuario"] != null)
diff --git a/WebLab/Resultados/ResultadoView.aspx b/WebLab/Resultados/ResultadoView.aspx
index d9fb1dce..80b242d0 100644
--- a/WebLab/Resultados/ResultadoView.aspx
+++ b/WebLab/Resultados/ResultadoView.aspx
@@ -336,8 +336,11 @@
|
-
-
+ |
+
+
+
+
|
@@ -354,6 +357,8 @@
>
|
+
+
@@ -368,10 +373,10 @@
-
+ <%--
-
+ --%>
@@ -380,7 +385,7 @@
-
+
@@ -448,8 +453,8 @@
-
+ <%-- --%>
|
diff --git a/WebLab/Resultados/ResultadoView.aspx.cs b/WebLab/Resultados/ResultadoView.aspx.cs
index 1f0eb12c..f0884e4e 100644
--- a/WebLab/Resultados/ResultadoView.aspx.cs
+++ b/WebLab/Resultados/ResultadoView.aspx.cs
@@ -88,11 +88,7 @@ protected void Page_PreInit(object sender, EventArgs e)
}
}
- //protected void Page_UnLoad(object sender, EventArgs e)
- //{
- // oCr.Dispose();
- //}
-
+
protected void Page_Load(object sender, EventArgs e)
{
@@ -115,7 +111,7 @@ private void Inicializar()
pnlAntecedentes.Visible = false;
- pnlHC.Visible = true;
+ // pnlHC.Visible = true;
if (Session["validado"].ToString() == "1")
lblTitulo.Text = "HISTORIAL DE RESULTADOS";
else
@@ -206,14 +202,9 @@ private void CargarGrilla()
if (Request["Operacion"].ToString() == "HC")
m_strSQL += " order by idProtocolo desc "; // desde el mas reciente al mas antiguo.
- else
- {
- // Configuracion oC = new Configuracion(); oC = (Configuracion)oC.Get(typeof(Configuracion), "IdConfiguracion", 1);
- //if (oC.TipoNumeracionProtocolo == 0)
- m_strSQL += " order by idProtocolo ";
- //if (oC.TipoNumeracionProtocolo == 1) m_strSQL += " order by numerodiario ";
- //if (oC.TipoNumeracionProtocolo == 2) m_strSQL += " order by prefijosector, numerosector ";
- }
+ else
+ m_strSQL += " order by idProtocolo ";
+
DataSet Ds = new DataSet();
@@ -273,18 +264,16 @@ private void MuestraDatos(string p)
if (oRegistro != null)
{
- //Configuracion oCon = new Configuracion();
- //oCon = (Configuracion)oCon.Get(typeof(Configuracion), "IdEfector", oRegistro.IdEfector);
- //Image1.= oRegistro.getQRResultados(oCon);
-
+
HFIdProtocolo.Value = p;
//Actualiza los datos de los objetos : alta o modificacion .
lblEfector.Text = oRegistro.IdEfector.Nombre;
oRegistro.GrabarAuditoriaProtocolo("Consulta", int.Parse(Session["idUsuario"].ToString()));
- if (oRegistro.tieneAdjuntoProtocoloVisible())
- { imgAdjunto.Visible = true; spanadjunto.Visible = true; }
- else
- { imgAdjunto.Visible = false; spanadjunto.Visible = false; }
+
+
+ bool tieneAdjunto = oRegistro.tieneAdjuntoProtocoloVisible();
+ imgAdjunto.Visible = tieneAdjunto;
+ spanadjunto.Visible = tieneAdjunto;
if ((oRegistro.IdTipoServicio.IdTipoServicio == 3) || (oRegistro.IdTipoServicio.IdTipoServicio == 5)) //Microbiologia
@@ -313,7 +302,7 @@ private void MuestraDatos(string p)
lblCovid.Visible = true;
Caracter oCaracter = new Caracter();
oCaracter = (Caracter)oCaracter.Get(typeof(Caracter), oRegistro.IdCaracter);
- lblCovid.Text = "Clasificación Covid-19: " + oCaracter.Nombre;
+ lblCovid.Text = "Clasificación SNVS: " + oCaracter.Nombre;
if (oRegistro.FechaInicioSintomas.Year != 1900)
lblCovid.Text = lblCovid.Text + " - F. Inicio Síntomas: " + oRegistro.FechaInicioSintomas.ToShortDateString();
@@ -368,28 +357,17 @@ private void MuestraDatos(string p)
lblUsuario.Text = oRegistro.IdUsuarioRegistro.Apellido;
lblFechaRegistro.Text = oRegistro.FechaRegistro.ToShortDateString() + " " + oRegistro.FechaRegistro.ToShortTimeString();
- //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.Numero.ToString();
- //hplProtocolo.NavigateUrl = "../Protocolos/ProtocoloEdit2.aspx?idServicio=" + oRegistro.IdTipoServicio.IdTipoServicio.ToString()+ "&Operacion=Modifica&idProtocolo=" +oRegistro.IdProtocolo.ToString();
-
- //if (oRegistro.IdEfector == oRegistro.IdEfectorSolicitante)
- lblOrigen.Text = oRegistro.IdOrigen.Nombre;
+ lblOrigen.Text = oRegistro.IdOrigen.Nombre;
//else
lblSolicitante.Text = oRegistro.IdEfectorSolicitante.Nombre;
if (oRegistro.MatriculaEspecialista != "-1")
lblMedico.Text = oRegistro.Especialista + " MP:" + oRegistro.MatriculaEspecialista;
-
- //lblPrioridad.Text = oRegistro.IdPrioridad.Nombre;
- // if (oRegistro.IdPrioridad.Nombre == "URGENTE")
- // {
- // lblPrioridad.ForeColor = Color.Red;
- // lblPrioridad.Font.Bold = true;
- // }
-
- //lblSector.Text = oRegistro.IdSector.Nombre;
+
+
if (oRegistro.Sala != "") lblOrigen.Text += " Sala: " + oRegistro.Sala;
if (oRegistro.Cama != "") lblOrigen.Text += " Cama: " + oRegistro.Cama;
@@ -448,14 +426,12 @@ private void MuestraDatos(string p)
}
-
-
-
+
private void LlenarTabla(string p)
{
- // SqlConnection conn = (SqlConnection)NHibernateHttpModule.CurrentSession.Connection;
- SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString); ///Performance: conexion de solo lectura
+ string conexion = ConfigurationManager.ConnectionStrings["SIL_ReadOnly"].ConnectionString;
+ SqlConnection conn = new SqlConnection(conexion); ///Performance: conexion de solo lectura
DataSet Ds = new DataSet();
SqlCommand cmd = new SqlCommand();
cmd.CommandType = CommandType.StoredProcedure;
@@ -467,13 +443,8 @@ private void LlenarTabla(string p)
SqlDataAdapter da = new SqlDataAdapter(cmd);
- da.Fill(Ds);
-
-
- //int cantidadResultadosValidados = Ds.Tables[0].Rows.Count;
- //if (cantidadResultadosValidados > 0)
-
- //{
+ da.Fill(Ds);
+
string s = System.Globalization.CultureInfo.CurrentCulture.NumberFormat.CurrencyDecimalSeparator;
@@ -544,26 +515,12 @@ private void LlenarTabla(string p)
else
lblCargadoPor.Text = "ESTADO";
- objCellPersona_TITULO.Controls.Add(lblCargadoPor);
-
-
- /////observaciones
- //if (Request["Operacion"].ToString() == "Valida")
- //{
-
-
+ objCellPersona_TITULO.Controls.Add(lblCargadoPor);
objFila_TITULO.Cells.Add(objCellAnalisis_TITULO);
- objFila_TITULO.Cells.Add(objCellResultado_TITULO);
-
-
-
-
- objFila_TITULO.Cells.Add(objCellValoresReferencia_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;
@@ -576,7 +533,41 @@ private void LlenarTabla(string p)
int tablas = Ds.Tables.Count;
if (tablas > 0)
- {
+ {
+
+ ////Caro PF: Cache de resultado item
+
+ ISession session = NHibernateHttpModule.CurrentSession;
+ ///CARO PF: traer detalleprotocolos y derivaciones antes del for para no ir a la base N veces
+ var idsDetallesList = Ds.Tables[0].AsEnumerable()
+ .Select(r => r.Field("idDetalleProtocolo"))
+ .ToList();
+
+ var detallesList = session.CreateCriteria(typeof(DetalleProtocolo))
+ .Add(Expression.In("IdDetalleProtocolo", idsDetallesList.ToArray()))
+ .List()
+ .Cast()
+ .ToList();
+
+ var detallesDict = detallesList
+ .ToDictionary(d => d.IdDetalleProtocolo);
+
+ // Traer todas las Derivaciones juntas
+ var derivacionesList = session.CreateCriteria(typeof(Derivacion))
+ .CreateAlias("IdDetalleProtocolo", "dp")
+ .Add(Expression.In("dp.IdDetalleProtocolo", idsDetallesList.ToArray()))
+ .List()
+ .Cast()
+ .ToList();
+
+ var derivacionesDict = derivacionesList
+ .ToDictionary(d => d.IdDetalleProtocolo.IdDetalleProtocolo);
+ /// CARO PF : fin
+
+ Protocolo oRegistro = new Protocolo();
+ oRegistro = (Protocolo)oRegistro.Get(typeof(Business.Data.Laboratorio.Protocolo), int.Parse(p));
+ var resultadosAnteriores = oRegistro.ObtenerResultadosAnteriores(conexion);
+
for (int i = 0; i < Ds.Tables[0].Rows.Count; i++)
{
//decimal m_minimoReferencia=-1;
@@ -630,35 +621,24 @@ private void LlenarTabla(string p)
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.ForeColor = Color
+ 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);
- //if (Request["Operacion"].ToString() == "HC")
- // objCell.ColumnSpan = 8;
- //else
objCell.ColumnSpan = 8;
-
objRow.BackColor = Color.Beige;
objRow.HorizontalAlign = HorizontalAlign.Center;
- objRow.Cells.Add(objCell);
- // objRow.CssClass = "myLabelIzquierda";
+ objRow.Cells.Add(objCell);
tContenido.Controls.Add(objRow);
-
pivot_Area = m_area;
}
@@ -691,20 +671,14 @@ private void LlenarTabla(string p)
lblSinMuestra.TabIndex = short.Parse("500");
lblSinMuestra.Text = "Sin Muestra";// +oItem.IdEfectorDerivacion.Nombre; /// Ds.Tables[0].Rows[i].ItemArray[1].ToString();
lblSinMuestra.Font.Italic = true;
- lblSinMuestra.ForeColor = Color.Blue;
- // objCellResultado.ColumnSpan = 5;
+ lblSinMuestra.ForeColor = Color.Blue;
objCellResultado.Controls.Add(lblSinMuestra);
}
}
-
-
-
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);
@@ -717,6 +691,21 @@ private void LlenarTabla(string p)
objCellAnalisis.Controls.Add(lbl1);
+
+ /* var row = Ds.Tables[0].Rows[i];
+ int idDetalle = Convert.ToInt32(row["idDetalleProtocolo"]);
+ */
+ DetalleProtocolo oDetalle;
+ detallesDict.TryGetValue(i_iddetalleProtocolo, out oDetalle);
+
+ Derivacion oDeriva;
+ derivacionesDict.TryGetValue(i_iddetalleProtocolo, out oDeriva);
+ //fin
+ Item oItem = new Item();
+ oItem = oDetalle.IdSubItem; // (Item)oItem.Get(typeof(Item), m_idItem);
+
+
+ /*antes /
DetalleProtocolo oDetalle = new DetalleProtocolo();
oDetalle = (DetalleProtocolo)oDetalle.Get(typeof(DetalleProtocolo), i_iddetalleProtocolo);
@@ -725,7 +714,7 @@ private void LlenarTabla(string p)
//DetalleProtocolo oDetalle = new DetalleProtocolo();
//oDetalle = (DetalleProtocolo)oDetalle.Get(typeof(DetalleProtocolo), i_iddetalleProtocolo);
-
+ fin antes*/
// bool es_Bacteriologia = false;
string observacionesDetalle = "";
@@ -733,11 +722,12 @@ private void LlenarTabla(string p)
///
observacionesDetalle = oDetalle.Observaciones;
// m_usuariovalida += " " + oDetalle.FechaValida.ToShortDateString();
+
+ /*antes
Derivacion oDeriva = new Derivacion();
oDeriva = (Derivacion)oDeriva.Get(typeof(Derivacion), "IdDetalleProtocolo", oDetalle);
- if (oDeriva != null) /// esta pendiente
-
- //if (oItem.IdEfectorDerivacion != oItem.IdEfector) //es derivado
+ fin antes*/
+ if (oDeriva != null) /// esta pendiente
{
Label lblDerivacion = new Label();
lblDerivacion.Font.Italic = true;
@@ -745,41 +735,11 @@ private void LlenarTabla(string p)
//Verifica el estado de la derivacion
string estadoDerivacion = "";
- //if (i_iddetalleProtocolo != 0)
- //{
- // DetalleProtocolo oDetalle = new DetalleProtocolo();
- // oDetalle = (DetalleProtocolo)oDetalle.Get(typeof(DetalleProtocolo), i_iddetalleProtocolo);
-
-
-
- // observacionesDetalle = oDetalle.Observaciones;
- // m_usuariovalida += " " + oDetalle.FechaValida.ToShortDateString();
- // Derivacion oDeriva = new Derivacion();
- // oDeriva = (Derivacion)oDeriva.Get(typeof(Derivacion), "IdDetalleProtocolo", oDetalle);
- // if (oDeriva == null) /// esta pendiente
- // {
- // estadoDerivacion = "Pendiente de Derivacion";
- // lblDerivacion.ForeColor = Color.Red;
- // }
- // else
- // {
- /* if (oDeriva.Estado == 0) /// pendiente
- {
- estadoDerivacion = "Pendiente de Derivacion";
- lblDerivacion.ForeColor = Color.Red;
- }
- if (oDeriva.Estado == 1) /// enviado
- estadoDerivacion = oDetalle.ResultadoCar; // "Derivado: " + oItem.GetEfectorDerivacion(oCon.IdEfector);
- if (oDeriva.Estado == 2) /// no enviado
- estadoDerivacion = oDetalle.ResultadoCar; //" No Derivado. " + oDeriva.Observacion;
- lblDerivacion.Font.Bold = true;*/
+
estadoDerivacion = oDetalle.ResultadoCar;
if (oDeriva.Resultado != "")
estadoDerivacion += " - Resultado Informado: " + oDeriva.Resultado;
-
- //}
-
- //}
+
lblDerivacion.Text = estadoDerivacion;
objCellResultado.ColumnSpan = 1;
@@ -810,9 +770,7 @@ private void LlenarTabla(string p)
//if (Request["Operacion"].ToString() != "HC")
if (m_conResultado!= "False")
{
- // DetalleProtocolo oDetalle = new DetalleProtocolo();
- // oDetalle = (DetalleProtocolo)oDetalle.Get(typeof(DetalleProtocolo), i_iddetalleProtocolo);
-
+
Anthem.GridView Gd1 = new Anthem.GridView();
Gd1.ID = m_idItem.ToString();
ProtocoloLuminex oFusion = new ProtocoloLuminex();
@@ -846,11 +804,8 @@ private void LlenarTabla(string p)
if (i_iddetalleProtocolo != 0)
{
- if (i_iddetalleProtocolo != 9999999)
- {
- //DetalleProtocolo oDetalle = new DetalleProtocolo();
- //oDetalle = (DetalleProtocolo)oDetalle.Get(typeof(DetalleProtocolo), i_iddetalleProtocolo);
-
+ //if (i_iddetalleProtocolo != 9999999)
+ //{
m_usuariovalida += " " + oDetalle.FechaValida.ToShortDateString();
if (Observaciones != "")
{
@@ -874,31 +829,32 @@ private void LlenarTabla(string p)
if (oDetalle.IdProtocolo.IdTipoServicio.IdTipoServicio!=5)
{
- string resultadoAnterior = oDetalle.BuscarResultadoAnterior(oDetalle.IdSubItem, oDetalle.IdItem, false);
- if (resultadoAnterior != "")
- {
+ //string resultadoAnterior = oDetalle.BuscarResultadoAnterior(oDetalle.IdSubItem, oDetalle.IdItem, false);
+
+ string resultadoAnterior = "";
+
+ if (resultadosAnteriores.ContainsKey(oDetalle.IdSubItem.IdItem))
+ {
+ resultadoAnterior = resultadosAnteriores[oDetalle.IdSubItem.IdItem];
+ }
+
+ 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,540); return false");
- olblResultadoAnterior.ToolTip = "Haga clic aqui para ver gráfico de evolución";
- //olblResultadoAnterior.ForeColor = Color.Green;
- olblResultadoAnterior.Width = Unit.Pixel(20);
+ olblResultadoAnterior.ToolTip = "Haga clic aqui para ver gráfico de evolución";
+ olblResultadoAnterior.Width = Unit.Pixel(30);
olblResultadoAnterior.Text = resultadoAnterior;
-
objCellResultadoAnterior.Controls.Add(olblResultadoAnterior);
- //Button oB = new Button();
- //oB.Text = "R.ANT";
- //oB.OnClientClick = "javascript: AntecedenteView (" + oDetalle.IdSubItem.IdItem.ToString() + "," + oDetalle.IdProtocolo.IdPaciente.IdPaciente.ToString() + "); return false";
- //objCellResultadoAnterior.Controls.Add(oB);
- }
+ }
- }
- // if (VerificaValorReferencia(m_minimoReferencia, m_maximoReferencia, x, m_tipoValorReferencia))
+ }
if (oDetalle.VerificaValorReferencia(x))
olbl.ForeColor = Color.Black;
else
@@ -924,7 +880,7 @@ private void LlenarTabla(string p)
- if (oDetalle.tieneAdjuntoVisible())//tiene observaciones
+ if (oDetalle.tieneAdjuntoVisible())//Caro: falta mejorar esto
{
imgAdj = true;
btnImagen.TabIndex = short.Parse("500");
@@ -942,22 +898,15 @@ private void LlenarTabla(string p)
- }
+ //}
}
objCellResultado.Controls.Add(olbl);
if (imgAdj)objCellResultado.Controls.Add(btnImagen);
///etiqueta de unidad de medida
- Label olblUM = new Label();
-
-
- // olblUM.ID = "UM" + m_idItem.ToString();
+ Label olblUM = new Label();
olblUM.Font.Size = FontUnit.Point(7);
- olblUM.Text = unMedida;
-
-
-
-
+ olblUM.Text = unMedida;
objCellResultado.Controls.Add(olblUM);
olblUM.Visible = false;
@@ -986,11 +935,7 @@ private void LlenarTabla(string p)
}
- ///IMAGENES ADJUNTAS
-
-
-
-
+ ///IMAGENES ADJUNTAS
// fin de imagenes adjuntas
@@ -998,15 +943,22 @@ private void LlenarTabla(string p)
if ((i_iddetalleProtocolo != 0) )
{
- if (i_iddetalleProtocolo != 9999999)
- {
+ //if (i_iddetalleProtocolo != 9999999)
+ //{
//DetalleProtocolo oDetalle = new DetalleProtocolo();
//oDetalle = (DetalleProtocolo)oDetalle.Get(typeof(DetalleProtocolo), i_iddetalleProtocolo);
m_usuariovalida += " " + oDetalle.FechaValida.ToShortDateString();
if (oDetalle.IdProtocolo.IdTipoServicio.IdTipoServicio != 5)
{
- string resultadoAnterior = oDetalle.BuscarResultadoAnterior(oDetalle.IdSubItem, oDetalle.IdItem, false);
+ //string resultadoAnterior = oDetalle.BuscarResultadoAnterior(oDetalle.IdSubItem, oDetalle.IdItem, false);
+ string resultadoAnterior = "";
+
+ if (resultadosAnteriores.ContainsKey(oDetalle.IdSubItem.IdItem))
+ {
+ resultadoAnterior = resultadosAnteriores[oDetalle.IdSubItem.IdItem];
+ }
+
if (resultadoAnterior != "")
{
hayAntecedente = true;
@@ -1017,32 +969,25 @@ private void LlenarTabla(string p)
olblResultadoAnterior.Attributes.Add("onClick", "javascript: AntecedenteView (" + oDetalle.IdSubItem.IdItem.ToString() + "," + oDetalle.IdProtocolo.IdPaciente.IdPaciente.ToString() + ",790,450); return false");
olblResultadoAnterior.ToolTip = "Haga clic aqui para ver más datos.";
//olblResultadoAnterior.ForeColor = Color.Green;
- olblResultadoAnterior.Width = Unit.Pixel(20);
+ olblResultadoAnterior.Width = Unit.Pixel(30);
olblResultadoAnterior.Text = resultadoAnterior;
-
objCellResultadoAnterior.Controls.Add(olblResultadoAnterior);
- //Button oB = new Button();
- //oB.Text = "R.ANT";
- //oB.OnClientClick = "javascript: AntecedenteView (" + oDetalle.IdSubItem.IdItem.ToString() + "," + oDetalle.IdProtocolo.IdPaciente.IdPaciente.ToString() + "); return false";
- //objCellResultadoAnterior.Controls.Add(oB);
+
}
}
if (oDetalle.tieneAdjuntoVisible())//tiene observaciones
- {
- // ImageButton btnImagen = new ImageButton();
+ {
btnImagen.TabIndex = short.Parse("500");
btnImagen.ID = "IMG" + oDetalle.IdDetalleProtocolo.ToString();
btnImagen.ImageUrl = "~/App_Themes/default/images/obs_validado.png";
-
btnImagen.ToolTip = "Adjunto imprimible para " + lbl1.Text.Replace(" ", "");
-
btnImagen.Attributes.Add("onClick", "javascript: AdjuntoEdit (" + oDetalle.IdDetalleProtocolo.ToString() + "," + oDetalle.IdProtocolo.IdTipoServicio.IdTipoServicio.ToString() + ",'" + Request["Operacion"].ToString() + "'); return false");
objCellResultado.Controls.Add(btnImagen);
}
}
- }
+ //}
} // fin case 1
break;
@@ -1050,39 +995,26 @@ private void LlenarTabla(string p)
}//fin swicth
-
-
- Label lblPersona = new Label();
- // lblPersona.TabIndex = short.Parse("500");
- lblPersona.Text = m_usuariovalida; /// Ds.Tables[0].Rows[i].ItemArray[1].ToString();
-
-
+ Label lblPersona = new Label();
+ lblPersona.Text = m_usuariovalida;
///
lblPersona.Font.Size = FontUnit.Point(7);
lblPersona.Font.Italic = true;
lblPersona.Text = m_usuariovalida ;
-
- objCellPersona.Controls.Add(lblPersona);
-
-
+ objCellPersona.Controls.Add(lblPersona);
}
- Label lblValoresReferencia = new Label();
-
- // lblValoresReferencia.ID = "VR" + m_idItem.ToString();
+ Label lblValoresReferencia = new Label();
lblValoresReferencia.Font.Italic = true;
lblValoresReferencia.Font.Size = FontUnit.Point(8);
if (valorReferencia != "")
{// muestra el valor guardado
lblValoresReferencia.Text = valorReferencia;
- if (m_metodo != "")
- // lblValoresReferencia.Text += " |Método:" + m_metodo;
+ if (m_metodo != "")
lblValoresReferencia.Text += Environment.NewLine + m_metodo;
- }
- //else
- // lblValoresReferencia.Text = oDetalle.CalcularValoresReferencia();
+ }
objCellValoresReferencia.Controls.Add(lblValoresReferencia);
}
@@ -1091,30 +1023,21 @@ private void LlenarTabla(string p)
///Definir los anchos de las columnas
objCellAnalisis.Width = Unit.Percentage(30);
- objCellResultado.Width = Unit.Percentage(30);
+ objCellResultado.Width = Unit.Percentage(25);
objCellValoresReferencia.Width = Unit.Percentage(20);
// objCellValida.Width = Unit.Percentage(5);
- objCellPersona.Width = Unit.Percentage(20);
-
+ objCellPersona.Width = Unit.Percentage(15);
+ objCellResultadoAnterior.Width = Unit.Percentage(10);
///////////////////////
///agrega a la fila cada una de las celdas
objFila.Cells.Add(objCellAnalisis);
- objFila.Cells.Add(objCellResultado);
-
- //if (Request["Operacion"].ToString() != "HC") objFila.Cells.Add(objCellUnMedida);
-
- objFila.Cells.Add(objCellValoresReferencia);
-
- //if ((Request["Operacion"].ToString() == "Valida") || (Request["Operacion"].ToString() == "Control")) objFila.Cells.Add(objCellValida);
-
+ objFila.Cells.Add(objCellResultado);
+ objFila.Cells.Add(objCellValoresReferencia);
objFila.Cells.Add(objCellPersona);
-
objFila.Cells.Add(objCellResultadoAnterior);
- //if (Request["Operacion"].ToString() != "HC") objFila.Cells.Add(objCellObservaciones);
-
- //////
+ //////
Master.FindControl("ContentPlaceHolder1").FindControl("Panel1").Controls.Add(tContenido);
//'añadimos la fila a la tabla
@@ -1142,11 +1065,7 @@ private void LlenarTablaATB(string p)
da.Fill(Ds);
-
- //int cantidadResultadosValidados = Ds.Tables[0].Rows.Count;
- //if (cantidadResultadosValidados > 0)
-
- //{
+
string s = System.Globalization.CultureInfo.CurrentCulture.NumberFormat.CurrencyDecimalSeparator;
@@ -1196,43 +1115,13 @@ private void LlenarTablaATB(string p)
for (int i = 0; i < Ds.Tables[0].Rows.Count; i++)
{
- //decimal m_minimoReferencia=-1;
- //decimal m_maximoReferencia=-1;
- // string valorReferencia = Ds.Tables[0].Rows[i].ItemArray[11].ToString();
- // int m_idItem = int.Parse(Ds.Tables[0].Rows[i].ItemArray[2].ToString());
- // int m_idMecanismo = int.Parse(Ds.Tables[0].Rows[i].ItemArray[3].ToString());
- // string unMedida = Ds.Tables[0].Rows[i].ItemArray[8].ToString();
- // string Observaciones = Ds.Tables[0].Rows[i].ItemArray[5].ToString();
+
int tiporesultado = (int.Parse(Ds.Tables[0].Rows[i].ItemArray[4].ToString()));
- // int tipodeterminacion = int.Parse(Ds.Tables[0].Rows[i].ItemArray[6].ToString());
- // int estado = int.Parse(Ds.Tables[0].Rows[i].ItemArray[9].ToString());
- // string m_metodo = Ds.Tables[0].Rows[i].ItemArray[10].ToString();
-
- // string m_observacionReferencia = Ds.Tables[0].Rows[i].ItemArray[13].ToString();
- // string m_usuarioCarga = Ds.Tables[0].Rows[i].ItemArray[14].ToString();
- // string m_trajoMuestra = Ds.Tables[0].Rows[i].ItemArray[15].ToString();
- // string m_tipoValorReferencia = Ds.Tables[0].Rows[i].ItemArray[16].ToString();
- // string m_conResultado = Ds.Tables[0].Rows[i].ItemArray[17].ToString();
- // string m_formatoDecimal = Ds.Tables[0].Rows[i].ItemArray[18].ToString();
- //string m_formato0 = Ds.Tables[0].Rows[i].ItemArray[19].ToString();
- //string m_formato1 = Ds.Tables[0].Rows[i].ItemArray[20].ToString();
- //string m_formato2 = Ds.Tables[0].Rows[i].ItemArray[21].ToString();
- //string m_formato3 = Ds.Tables[0].Rows[i].ItemArray[22].ToString();
- //string m_formato4 = Ds.Tables[0].Rows[i].ItemArray[23].ToString();
- //string m_resultadoDefecto = Ds.Tables[0].Rows[i].ItemArray[24].ToString();
- // string m_usuariocontrol = Ds.Tables[0].Rows[i].ItemArray[25].ToString();
+
string m_usuariovalida = Ds.Tables[0].Rows[i].ItemArray[5].ToString();
- // int i_iddetalleProtocolo = int.Parse(Ds.Tables[0].Rows[i].ItemArray[26].ToString());
- //string m_codificaPaciente = Ds.Tables[0].Rows[i].ItemArray[27].ToString();
-
- // string m_estadoObservacion = Ds.Tables[0].Rows[i].ItemArray[29].ToString();
+
string m_area = "ATB";//Ds.Tables[0].Rows[i].ItemArray[30].ToString();
-
- //if (m_codificaPaciente == "True")
- //{
- // lblPaciente.Visible = false;
- // lblCodigoPaciente.Visible = true;
- //}
+
m_hijo = Ds.Tables[0].Rows[i].ItemArray[2].ToString();
@@ -1257,24 +1146,19 @@ private void LlenarTablaATB(string p)
{
TableRow objRow = new TableRow();
TableCell objCell = new TableCell();
- Label lbl0 = new Label();
- //lbl0.ForeColor = Color
+ 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);
- //if (Request["Operacion"].ToString() == "HC")
- // objCell.ColumnSpan = 8;
- //else
+ objCell.Controls.Add(lbl0);
objCell.ColumnSpan = 8;
objRow.BackColor = Color.Beige;
objRow.HorizontalAlign = HorizontalAlign.Center;
- objRow.Cells.Add(objCell);
- // objRow.CssClass = "myLabelIzquierda";
+ objRow.Cells.Add(objCell);
tContenido.Controls.Add(objRow);
pivot_Area = m_area;
@@ -1317,45 +1201,26 @@ private void LlenarTablaATB(string p)
lbl1.TabIndex = short.Parse("500");
lbl1.ForeColor = Color.Black;
lbl1.Font.Size = FontUnit.Point(9);
- //if (tipodeterminacion != 0)
- //{
+
lbl1.Font.Bold = true;
lbl1.Font.Italic = true;
objCellAnalisis.ColumnSpan = 1;
- //}
+
objCellAnalisis.Controls.Add(lbl1);
-
- //if (tipodeterminacion == 0) // si es una determinacion simple
- //{
Label olbl = new Label();
olbl.Font.Bold = true;
olbl.Font.Size = FontUnit.Point(9);
- //if (m_conResultado == "0")
- // olbl.Text = "";
- //else
olbl.Text = Ds.Tables[0].Rows[i].ItemArray[3].ToString();
- //if (Observaciones != "")
- //{
- // if (olbl.Text == "")
- // olbl.Text += Observaciones;
- // else
- // olbl.Text += Environment.NewLine + " " + Observaciones;
-
- //}
-
objCellResultado.Controls.Add(olbl);
-
- //DetalleProtocolo oDetalle = new DetalleProtocolo();
- //oDetalle = (DetalleProtocolo)oDetalle.Get(typeof(DetalleProtocolo), i_iddetalleProtocolo);
-
+
m_usuariovalida += " "; //+ fefecha validad
@@ -1364,8 +1229,7 @@ private void LlenarTablaATB(string p)
- Label lblPersona = new Label();
- // lblPersona.TabIndex = short.Parse("500");
+ Label lblPersona = new Label();
lblPersona.Text = m_usuariovalida; /// Ds.Tables[0].Rows[i].ItemArray[1].ToString();
@@ -1378,27 +1242,7 @@ private void LlenarTablaATB(string p)
objCellPersona.Controls.Add(lblPersona);
-
-
- ///no se usa valor referencia con los ATB
- //Label lblValoresReferencia = new Label();
-
- //// lblValoresReferencia.ID = "VR" + m_idItem.ToString();
- //lblValoresReferencia.Font.Italic = true;
- //lblValoresReferencia.Font.Size = FontUnit.Point(8);
- //if (valorReferencia != "")
- //{// muestra el valor guardado
- // lblValoresReferencia.Text = valorReferencia;
- // if (m_metodo != "")
- // // lblValoresReferencia.Text += " |Método:" + m_metodo;
- // lblValoresReferencia.Text += Environment.NewLine + m_metodo;
- //}
- ////else
- //// lblValoresReferencia.Text = oDetalle.CalcularValoresReferencia();
-
- //objCellValoresReferencia.Controls.Add(lblValoresReferencia);
- //}
-
+
///Definir los anchos de las columnas
@@ -1447,10 +1291,6 @@ private void Imprimir(Protocolo oProtocolo, string tipo)
Configuracion oCon = new Configuracion();
oCon = (Configuracion)oCon.Get(typeof(Configuracion),"IdEfector", oProtocolo.IdEfector);
- // CrystalReportSource oCr = new CrystalReportSource();
- //oCr.Report.FileName = "";
- //oCr.CacheDuration =10000;
- //oCr.EnableCaching = true;
string parametroPaciente = "";
string parametroProtocolo = "";
@@ -1672,7 +1512,7 @@ protected void gvLista_RowDataBound(object sender, GridViewRowEventArgs e)
string idProtocolo= this.gvLista.DataKeys[e.Row.RowIndex].Value.ToString();
- string s_detalle = e.Row.Cells[0].Text + ": " + getDetalleProtocolo(idProtocolo);
+ string s_detalle = e.Row.Cells[0].Text;// + ": " + getDetalleProtocolo(idProtocolo);
e.Row.Cells[0].ToolTip = s_detalle;
e.Row.Cells[1].ToolTip = s_detalle;
@@ -1699,22 +1539,7 @@ private bool AnalizarLimites(string p)
throw new NotImplementedException();
}
- private bool estaVisibleControl(string idarea)
- {
- bool visible=true;
- //if (HidArea.Value == "0")
- // visible = true;
- //else
- //{
- // if (idarea == HidArea.Value)
- // visible = true;
- // else
- // visible = false;
- //}
- return visible;
-
- }
-
+
@@ -1784,84 +1609,8 @@ protected void lnkAuditoria_Click(object sender, EventArgs e)
- protected void lnkMarcar_Click(object sender, EventArgs e)
- {
-
- Marcar(true);
-
- }
-
- private void Marcar(bool p)
- {
-
- CheckBox chk;
-
-
- if (Page.Master != null)
- {
- foreach (Control control in Page.Master.Controls)
- {
- if (control is HtmlForm)
- {
- foreach (Control controlform in control.Controls)
- {
- if (controlform is ContentPlaceHolder)
- {
- foreach (Control control1 in controlform.Controls)
- {
- if (control1 is Panel)
- foreach (Control control2 in control1.Controls)
- {
- if (control2 is Table)
- foreach (Control control3 in control2.Controls)
- {
-
- if (control3 is TableRow)
- foreach (Control control4 in control3.Controls)
- {
-
- if (control4 is TableCell)
- foreach (Control control5 in control4.Controls)
- {
-
- if (control5 is CheckBox)
- {
- chk = (CheckBox)control5;
- chk.Checked = p;
-
-
-
- }
-
-
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-
- }
-
- protected void lnkDesmarcar_Click(object sender, EventArgs e)
- {
- Marcar(false);
- }
-
- protected void btnVerAntecendente_Click(object sender, EventArgs e)
- {
- //if (ddlItem.SelectedValue != "0")
- //{
- // Protocolo oProtocolo = new Protocolo();
- // oProtocolo = (Protocolo)oProtocolo.Get(typeof(Protocolo), CurrentPageIndex);//int.Parse(Request["idProtocolo"].ToString()));r();
- // CargarGrillaAntecedentes(oProtocolo);
- // SetSelectedTab(TabIndex.THREE);
- //}
- }
+
+
@@ -1887,35 +1636,35 @@ protected void btnPeticion_Click(object sender, EventArgs e)
}
- private string getDetalleProtocolo(string idProtocolo)
- {
- string dev = ""; int i = 0;
- Protocolo oRegistro = new Protocolo();
- oRegistro = (Protocolo)oRegistro.Get(typeof(Protocolo), int.Parse(idProtocolo));
-
- ISession m_session = NHibernateHttpModule.CurrentSession;
- ICriteria crit = m_session.CreateCriteria(typeof(DetalleProtocolo));
- crit.Add(Expression.Eq("IdProtocolo", oRegistro));
- IList items = crit.List();
- foreach (DetalleProtocolo oDet in items)
- {
- i += 1;
- if (dev == "")
- dev = oDet.IdItem.Nombre;
- else
- {
- if (dev.IndexOf(oDet.IdItem.Nombre) == -1)
- dev = dev + " - " + oDet.IdItem.Nombre;
- }
- }
- //return i.ToString() + ": " + dev;
- return dev;
- }
+ //private string getDetalleProtocolo(string idProtocolo)
+ //{
+ // string dev = ""; int i = 0;
+ // Protocolo oRegistro = new Protocolo();
+ // oRegistro = (Protocolo)oRegistro.Get(typeof(Protocolo), int.Parse(idProtocolo));
+
+ // ISession m_session = NHibernateHttpModule.CurrentSession;
+ // ICriteria crit = m_session.CreateCriteria(typeof(DetalleProtocolo));
+ // crit.Add(Expression.Eq("IdProtocolo", oRegistro));
+ // IList items = crit.List();
+ // foreach (DetalleProtocolo oDet in items)
+ // {
+ // i += 1;
+ // if (dev == "")
+ // dev = oDet.IdItem.Nombre;
+ // else
+ // {
+ // if (dev.IndexOf(oDet.IdItem.Nombre) == -1)
+ // dev = dev + " - " + oDet.IdItem.Nombre;
+ // }
+ // }
+ // //return i.ToString() + ": " + dev;
+ // return dev;
+ //}
- protected void btnArchivos_Click(object sender, EventArgs e)
- {
- Response.Redirect("../Protocolos/ProtocoloAdjuntar.aspx?idProtocolo=" + Session["idProtocolo"].ToString()+"&desde=resultado");
- }
+ //protected void btnArchivos_Click(object sender, EventArgs e)
+ //{
+ // Response.Redirect("../Protocolos/ProtocoloAdjuntar.aspx?idProtocolo=" + Session["idProtocolo"].ToString()+"&desde=resultado");
+ //}
protected void imgPdf_Click(object sender, EventArgs e)
{
diff --git a/WebLab/Resultados/ResultadoView.aspx.designer.cs b/WebLab/Resultados/ResultadoView.aspx.designer.cs
index 2bcb64d5..091f5509 100644
--- a/WebLab/Resultados/ResultadoView.aspx.designer.cs
+++ b/WebLab/Resultados/ResultadoView.aspx.designer.cs
@@ -283,49 +283,40 @@ public partial class ResultadoView {
protected global::System.Web.UI.WebControls.Label lblDiagnostico;
///
- /// lblNroSISA control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Label lblNroSISA;
-
- ///
- /// lblPedidoOriginal control.
+ /// lblCovid control.
///
///
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::System.Web.UI.WebControls.Label lblPedidoOriginal;
+ protected global::System.Web.UI.WebControls.Label lblCovid;
///
- /// HFCurrTabIndex control.
+ /// lblNroSISA control.
///
///
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::System.Web.UI.WebControls.HiddenField HFCurrTabIndex;
+ protected global::System.Web.UI.WebControls.Label lblNroSISA;
///
- /// pnlHC control.
+ /// lblPedidoOriginal control.
///
///
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::System.Web.UI.WebControls.Panel pnlHC;
+ protected global::System.Web.UI.WebControls.Label lblPedidoOriginal;
///
- /// lblCovid control.
+ /// HFCurrTabIndex control.
///
///
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
///
- protected global::System.Web.UI.WebControls.Label lblCovid;
+ protected global::System.Web.UI.WebControls.HiddenField HFCurrTabIndex;
///
/// lblMuestra control.
@@ -435,15 +426,6 @@ public partial class ResultadoView {
///
protected global::System.Web.UI.WebControls.DropDownList ddlItem;
- ///
- /// btnVerAntecendente control.
- ///
- ///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
- ///
- protected global::System.Web.UI.WebControls.Button btnVerAntecendente;
-
///
/// gvAntecedente control.
///
diff --git a/WebLab/Site1.Master b/WebLab/Site1.Master
index 0b042a64..8ab1782a 100644
--- a/WebLab/Site1.Master
+++ b/WebLab/Site1.Master
@@ -222,7 +222,7 @@ document.onkeydown=checkKeyCode;
font-weight: normal;
font-size: 14px;
font-family: Arial;
- text-align:center;">Versión MultiEfector Abril 2026-22." target="_blank" >Ver Cambios Version
+ text-align:center;">Versión MultiEfector Mayo 2026-11." target="_blank" >Ver Cambios Version