diff --git "a/web/diagnosis.html" "b/web/diagnosis.html" --- "a/web/diagnosis.html" +++ "b/web/diagnosis.html" @@ -6,7 +6,7 @@ - Dashboard + Diagnóstico IA @@ -19,22 +19,191 @@ + + - +
+ + +
-
-
-
-
-
-
- - - -
-
-

Total Pacientes

- 0 -
-
-
-
-
-
-
-
-
-
- - - -
-
-

Con Retinopatía

- 0 -
-
-
-
+ +
+
+

+ + Diagnóstico con Inteligencia Artificial +

+

Diagnostico de retinopatía diabética mediante análisis de imágenes

-
-
-
-
-
- - - -
-
-

Sin Retinopatía

- 0 -
-
+
+ + +
+
+
+
+
+ Cargar Imágenes para Análisis +
-
-
-
-
-
-
- - - +
+ +
+
Ojo Derecho
+ + + + + +
+ +
Arrastra una imagen aquí o haz clic para seleccionar
+

Formatos soportados: JPG, PNG, JPEG (Máx. 10MB)

+
+ + + + + +
-
-

Tasa Positividad

- 0% + + +
+
Ojo Izquierdo
+ + + + + +
+ +
Arrastra una imagen aquí o haz clic para seleccionar
+

Formatos soportados: JPG, PNG, JPEG (Máx. 10MB)

+
+ + + + + +
-
-
-
-
-
-
-
-
Estadísticas de Consultas
-
-
-
-
-
-
- -
-
-
+ +
+
- - Rangos de Edad con Retinopatía + Información del Paciente y Consulta
-
-
-
+
+ -
-
-

Promedio

-
-
-

años

+ + -
-
-
-
- Consultas Recientes -
-
- - - - - - - - - - - - - - -
FechaPacienteResultadoConfianza
- Cargando consultas... -
-
-
-
-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - - - - - - api.getDashboardStats().then(function(response) { - if (response && response.success) { - const stats = response.detailed_analysis.statistics; - const summary = data.summary; + - if (summary.most_affected_range) { - $('#mostAffectedRange').text(summary.most_affected_range[0] + ' años'); - $('#mostAffectedCount').text(summary.most_affected_range[1] + ' pacientes'); - } - const tbody = $('#ageDistributionTable tbody'); - tbody.empty(); - - const total = data.chart_data.total; - Object.entries(data.filtered_ranges).forEach(([range, count]) => { - const percentage = ((count / total) * 100).toFixed(1); - const barWidth = Math.max((count / total) * 100, 5); - - tbody.append(` - - ${range} años - ${count} - ${percentage}% - -
-
-
- - - `); - }); - } - }); - } - function updateAgeStatistics(data) { - if (!data || !data.success) return; - api.getDashboardStats().then(function(response) { - if (response && response.success && response.detailed_analysis) { - const stats = response.detailed_analysis.statistics; - $('#avgAge').text(stats.avg_age || '-'); - $('#ageRange').text(stats.min_age && stats.max_age ? - stats.min_age + '-' + stats.max_age : '-'); - $('#totalPatientsAge').text(stats.total_patients || '-'); - } - }); - } - function generateAgeRangeColors(count) { - const baseColors = [ - '#E3F2FD', //(0-10) - '#BBDEFB', //(11-20) - '#90CAF9', //(21-30) - '#64B5F6', //(31-40) - '#42A5F5', //(41-50) - '#2196F3', //(51-60) - '#1E88E5', //(61-70) - '#1976D2', //(71-80) - '#1565C0', //(81-90) - '#0D47A1' //(91+) - ]; - - return baseColors.slice(0, count); - } + - $('body').append(modal); - $('#analysisModal').modal('show'); - $('#analysisModal').on('hidden.bs.modal', function() { - $(this).remove(); - }); - } - window.updateChartData = updateChartData; - }); - - - - + if (usersNavItem) { + const navItemContainer = usersNavItem.closest('li.nav-item'); - + } + + // Llamar tambien a updateUserInfo al cargar + $(document).ready(function() { + setTimeout(() => { + updateUserInfo(); + }, 200); + }); + + + + \ No newline at end of file