Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3e19692
Req. 5. Edición de determinación - Evitar salto de pestaña.
vrimada Jun 25, 2026
8f85b22
Req. 6: Hoja de trabajo. Se sacr opción de seleccionar y de marcar en…
vrimada Jun 25, 2026
9f4b26c
Req. 7: Mejorar pantalla de consulta de resultados:
vrimada Jun 26, 2026
bb82a68
Req. 9: Mostrar pin rojo en la solapa observaciones si es que hay da…
vrimada Jun 29, 2026
e182b74
en informe HTrabajoProtocolo1Horizontal.rpt con-sin medico
vrimada Jun 30, 2026
ed22758
nuevo grafico en Historial por Analisis
vrimada Jun 30, 2026
061b2d3
cambios en GraficoChart para que tenga el %
vrimada Jun 30, 2026
b4ca504
en general poner un grafico al lado del otro para que se vea bien los %
vrimada Jun 30, 2026
40434d2
Grafico chart: radio de grafico pie y posicion de label de los grafi…
vrimada Jun 30, 2026
9cc8b00
En grafico de evolución, evitar que se repita en la visualización 2 v…
vrimada Jun 30, 2026
0ff623a
Grafico charts: que se vea el %
vrimada Jul 2, 2026
cad0b2b
% en label para pie. % en tooltip para pie y bar
vrimada Jul 2, 2026
464a176
Req. 9: Mostrar pin rojo en la solapa observaciones si es que hay da…
vrimada Jun 29, 2026
e4dea71
cambios en GraficoChart para que tenga el %
vrimada Jun 30, 2026
b2b3d50
Req. 9: Mostrar pin rojo en la solapa observaciones si es que hay da…
vrimada Jun 29, 2026
d55f7fb
cambios en GraficoChart para que tenga el %
vrimada Jun 30, 2026
d5d3ed8
En grafico de evolución, evitar que se repita en la visualización 2 v…
vrimada Jun 30, 2026
822bbdc
Grafico charts: que se vea el %
vrimada Jul 2, 2026
800988e
fix: label de %
vrimada Jul 3, 2026
d545e02
fix: decodificar el html con acentos
vrimada Jul 3, 2026
1bd1aa0
sacamos InfoSoftGlobal directorio para la dll de Fusion Charts
vrimada Jul 3, 2026
8f9af91
Req. 1: resultados no numéricos pero que están definidos como predefi…
vrimada Jul 6, 2026
cfccad0
Req. 4: Activar con el enter el ingresar el número de lote
vrimada Jul 7, 2026
4d6b3cf
Req. 5: Corregir error al ver el preliminar de hoja de trabajo:
vrimada Jul 7, 2026
8bb6add
mejora para graficos.
vrimada Jul 8, 2026
29634fb
incluir Helpers
vrimada Jul 16, 2026
e37bf80
fix: correcion al ingresar un numero muy alto en lote
vrimada Jul 17, 2026
a62e45d
correcion error al recibir un lote o ingresar un protocolo de un lote
vrimada Jul 21, 2026
042926d
Vuelta atras correcion req.4
vrimada Jul 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Business/Business.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@
<SubType>Code</SubType>
</Compile>
<Compile Include="GeneraCodigoQR.cs" />
<Compile Include="Helpers\CatalogoCache.cs" />
<Compile Include="Helpers\ComboCache.cs" />
<Compile Include="Moneda.cs" />
<Compile Include="NHibernateHttpModule.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
Expand Down
4 changes: 2 additions & 2 deletions Business/Data/Laboratorio/HojaTrabajo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ public bool IsChanged

public DataTable GetDataSet_HojaTrabajoPreeliminar()
{

// 'XX/XX/XXXX' AS fecha ==> CONVERT(varchar(10), GETDATE(), 103) AS fecha ; para evitar error de la formula 'CDate({ht.fecha})'
string m_strSQL = @" with lineas as (
select "+ this.IdHojaTrabajo.ToString()+ @" as idhojatrabajo, '01' as linea, 'p' as pac
union
Expand Down Expand Up @@ -575,7 +575,7 @@ public DataTable GetDataSet_HojaTrabajoPreeliminar()
SELECT TOP (100) PERCENT 'A' as letra, linea AS numero, '' as numeroOrigen,'___' as cantidad, HT.idHojaTrabajo,
CASE WHEN HT.imprimirPrioridad = 1 THEN 'R' ELSE '' END AS prioridad, '0' as antecedente ,
CASE WHEN HT.imprimirorigen = 1 THEN '-A' ELSE '' END AS origen, CHT.textoImprimir AS item, A.nombre AS area,
CHT.idDetalleHojaTrabajo AS ORDEN, 'XX/XX/XXXX' AS fecha, HT.responsable, HT.codigo AS codigoHT,
CHT.idDetalleHojaTrabajo AS ORDEN, CONVERT(varchar(10), GETDATE(), 103) AS fecha, HT.responsable, HT.codigo AS codigoHT,
CASE WHEN HT.imprimirApellidoNombre = 1 THEN '-Paciente' ELSE '' END +
CASE WHEN HT.imprimirDiagnostico = 1 then '-Diag' else '' end AS paciente,
CASE WHEN HT.imprimirEdad = 1 THEN '-0' ELSE '' END AS edad, CASE WHEN HT.imprimirSexo = 1 THEN '-F' ELSE '' END AS sexo,
Expand Down
1 change: 0 additions & 1 deletion WebLab/Estadisticas/Grafico.aspx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using InfoSoftGlobal;
using System.Web.Script.Serialization;

namespace WebLab.Estadisticas
Expand Down
117 changes: 110 additions & 7 deletions WebLab/Estadisticas/GraficoChart.ascx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="GraficoChart.ascx.cs" Inherits="WebLab.Estadisticas.GraficoChart" %>
<script type="text/javascript" src="../script/chart/chart.js"></script>

<canvas id="miGrafico" runat="server"></canvas>
<canvas id="miGrafico" runat="server" style="max-height: 420px; width: 100%;"></canvas>

<script type="text/javascript">
function arrayVacio(arr) {
Expand All @@ -10,7 +9,7 @@
}

var ctx = document.getElementById('<%= miGrafico.ClientID %>');
var labels = <%= string.IsNullOrEmpty(LabelsJson) ? "[]" : LabelsJson %>;
var labels = <%= string.IsNullOrEmpty(LabelsJsonDecoded) ? "[]" : LabelsJsonDecoded %>;
var datos = <%= string.IsNullOrEmpty(DatosJson) ? "[]" : DatosJson %>;
var datosOtros = <%= string.IsNullOrEmpty(DatosStringJson) ? "[]" : DatosStringJson %>;
var tieneDatos1 = true; tieneDatos2 = true;
Expand All @@ -34,6 +33,7 @@
var valorMinimo = <%= string.IsNullOrEmpty(minimo) ? "\"\"" : minimo %>;
var tituloX = <%= string.IsNullOrEmpty(tituloX) ? "\"\"" : tituloX %>;
var tituloY = <%= string.IsNullOrEmpty(tituloY) ? "\"\"" : tituloY %>;
var mostrarLabels = <%= string.IsNullOrEmpty(MostrarLabels) ? "true" : MostrarLabels %>;


var colores = [
Expand All @@ -45,8 +45,8 @@
];

var opciones = {
plugins: {

plugins: {
title: {
display: true,
text: titulo
Expand All @@ -72,14 +72,33 @@
x: { display: false },
y: { display: false }
};
opciones.radius = '85%';
opciones.maintainAspectRatio = false;
opciones.aspectRatio = 1.8;
opciones.responsive = true;
}

if (tipo === 'pie' || tipo === 'bar') {
// % en tooltip
opciones.plugins.tooltip = {
callbacks: {
label: function(context) {
var label = context.label || '';
var value = context.parsed;
var total = context.dataset.data.reduce(function(a, b) { return a + b; }, 0);
var pct = ((value / total) * 100).toFixed(1);
return label + ': ' + value + ' (' + pct + '%)';
}
}
};
}

//Si tiene valor minimo un escala, definimos la escala
if (valorMinimo !== null && valorMinimo !== undefined && valorMinimo !== '') {
opciones.scales = {
x: {
title: {
display: true, text: tituloX
display: true, text: tituloX
}
},
y: {
Expand All @@ -88,12 +107,94 @@
callback: function (value) { return Number(value).toFixed(2); } //para que tenga solo dos decimales despues de la coma
},
title: {
display: true, text: tituloY
display: true, text: tituloY
}
}
};
}

if (tipo === 'line') { //Usamos este tipo de grafico para evoluciones de analisis
opciones.plugins.legend = {
labels: {
boxWidth: 0,
boxHeight: 0
}
};
opciones.plugins.title.display = false; // oculta el titulo duplicado
}

if (tipo === 'pie' || tipo === 'bar') {

opciones.plugins.legend = {
position: 'right',
labels: {
generateLabels: function (chart) {

var datos = chart.data.datasets[0].data;
var total = datos.reduce(function (a, b) { return a + b; }, 0);

return chart.data.labels.map(function (label, i) {

var porcentaje = (datos[i] * 100 / total).toFixed(1);

return {
text: label + " " + porcentaje + "%",
fillStyle: chart.data.datasets[0].backgroundColor[i],
strokeStyle: chart.data.datasets[0].backgroundColor[i],
hidden: false,
index: i
};
});
}
}

}
}

if (tipo === 'line') { //Usamos este tipo de grafico para evoluciones de analisis
opciones.plugins.legend = {
labels: {
boxWidth: 0,
boxHeight: 0
}
};
opciones.plugins.title.display = false; // oculta el titulo duplicado
}

if (tipo === 'pie') {
//se agrega en los labels el % , y ademas la opcion que no muestre nada (para graficos con muchos items)
if (mostrarLabels === '' || mostrarLabels === true) {
opciones.plugins.legend = {
position: 'right',
labels: {
generateLabels: function (chart) {

var datos = chart.data.datasets[0].data;
var total = datos.reduce(function (a, b) { return a + b; }, 0);

return chart.data.labels.map(function (label, i) {

var porcentaje = (datos[i] * 100 / total).toFixed(1);

return {
text: label + " " + porcentaje + "%",
fillStyle: chart.data.datasets[0].backgroundColor[i],
strokeStyle: chart.data.datasets[0].backgroundColor[i],
hidden: false,
index: i
};
});
}
}

};
} else {
opciones.plugins.legend = {
display: false
};
}
}

new Chart(ctx, {
type: tipo,
data: {
Expand All @@ -109,4 +210,6 @@
options: opciones
});
}


</script>
57 changes: 57 additions & 0 deletions WebLab/Estadisticas/GraficoChart.ascx.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Script.Serialization;
using System.Web.UI;

namespace WebLab.Estadisticas
Expand Down Expand Up @@ -41,5 +45,58 @@ public partial class GraficoChart : System.Web.UI.UserControl
///
/// </summary>
public string tituloY { get; set; } //titulo de eje Y
/// <summary>
/// Controla si se muestran los labels en la leyenda (true por defecto)
/// </summary>
public string MostrarLabels { get; set; }

/*
* ASP.NET WebForms está llamando al Render del control dos veces durante
* el ciclo de vida de la página(algo común con master pages, dependiendo
* de cómo se estructura el árbol de controles). *
*/

/// <summary>
/// Banderas para que se ejecute una sola vez DecodeLabels
/// </summary>
private string labelsDecodificadas;
private bool seDecodificaronLabels;

/// <summary>
/// DecodeLabels: Retorna LabelsJson con entidades HTML decodificadas si MostrarLabels es true
/// Ej: Si recibo "Orina, obtenci&#243;n desconocido" lo transformo a "Orina, obtención desconocido"
/// </summary>
public string LabelsJsonDecoded
{
get
{
if (!seDecodificaronLabels)
{
labelsDecodificadas = DecodeLabels();
seDecodificaronLabels = true;
}
return labelsDecodificadas;
}
}

private string DecodeLabels()
{
if (!string.IsNullOrEmpty(LabelsJson))
{
bool mostrar = string.IsNullOrEmpty(MostrarLabels) ||
MostrarLabels.Equals("true", StringComparison.OrdinalIgnoreCase);
if (mostrar)
{
var js = new JavaScriptSerializer();
var labels = js.Deserialize<List<string>>(LabelsJson);
if (labels != null)
{
labels = labels.Select(l => HttpUtility.HtmlDecode(l)).ToList();
return js.Serialize(labels);
}
}
}
return LabelsJson;
}
}
}
27 changes: 19 additions & 8 deletions WebLab/Estadisticas/Reporte.aspx
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,25 @@
>Descargar Detalle Por Determinacion</asp:LinkButton>--%>

&nbsp;<asp:Panel ID="pnlGrafico" runat="server">
<div style="border: 1px solid #C0C0C0; width: 400px; " >

<uc:GraficoChart ID="miGrafico" runat="server" /> &nbsp &nbsp <uc:GraficoChart ID="miGrafico10" runat="server" />


<asp:Label ID="lblInforme" runat="server" Text="Label" Visible="False"></asp:Label>
<asp:Label ID="lblTipo" runat="server" Text="Label" Visible="False"></asp:Label>
</div>
<table >
<tr>
<td style="border: 1px solid #C0C0C0; vertical-align:auto;">
<div style=" width: 400px; " >
<uc:GraficoChart ID="miGrafico" runat="server" />
</div>

<asp:Label ID="lblInforme" runat="server" Text="Label" Visible="False"></asp:Label>
<asp:Label ID="lblTipo" runat="server" Text="Label" Visible="False"></asp:Label>
</td>
<td>&nbsp;</td>
<td style="vertical-align:auto;">
<div style="border: 1px solid #C0C0C0; width: 600px;" id="divGrafico2" runat="server" >
<uc:GraficoChart ID="miGrafico10" runat="server" />
</div>
</td>
</tr>
</table>

</asp:Panel>
</div>
<div class="panel-body">
Expand Down
7 changes: 5 additions & 2 deletions WebLab/Estadisticas/Reporte.aspx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
using Business;
using Business.Data.Laboratorio;
using CrystalDecisions.Shared;
using InfoSoftGlobal;
using System.IO;
using CrystalDecisions.Web;
using System.Text;
Expand Down Expand Up @@ -165,7 +164,11 @@ private void MostrarReporteGeneral()
/// Grafico 2
if (mostrarGrafico2)
{
CreateChart2(s_tituloChart);
CreateChart2(s_tituloChart);
}
else
{
divGrafico2.Visible = false;
}

if (!mostrarGrafico1 && !mostrarGrafico2)
Expand Down
8 changes: 8 additions & 0 deletions WebLab/Estadisticas/Reporte.aspx.designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions WebLab/Estadisticas/ReporteForense.aspx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
using Business.Data;
using CrystalDecisions.Shared;
using Business.Data.Laboratorio;
using InfoSoftGlobal;

namespace WebLab.Estadisticas
{
Expand Down Expand Up @@ -287,9 +286,9 @@ private string mostrarGrafico(int p)
// Response.Redirect("SinDatos.aspx", false);




return FusionCharts.RenderChart(s_tipografico, p.ToString(), strXML, "Sales"+p.ToString(), ancho, "200", false, false);

return "";// FusionCharts.RenderChart(s_tipografico, p.ToString(), strXML, "Sales"+p.ToString(), ancho, "200", false, false);
}


Expand Down
1 change: 0 additions & 1 deletion WebLab/Estadisticas/ReporteIncidencias.aspx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
using System.Text;
using System.IO;
using System.Web.UI.HtmlControls;
using InfoSoftGlobal;
using Business.Data.Laboratorio;
using Business.Data;
using System.Configuration;
Expand Down
1 change: 0 additions & 1 deletion WebLab/Estadisticas/ReporteMicrobiologia.aspx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
using CrystalDecisions.Shared;
using Business.Data.Laboratorio;
using System.Web.Script.Serialization;
using InfoSoftGlobal;
using System.Collections.Generic;

namespace WebLab.Estadisticas
Expand Down
Loading
Loading