Update web/patients.html
Browse files- web/patients.html +4 -6
web/patients.html
CHANGED
|
@@ -574,7 +574,6 @@
|
|
| 574 |
|
| 575 |
loadPatientsList();
|
| 576 |
loadRiskFactors();
|
| 577 |
-
loadStatistics();
|
| 578 |
|
| 579 |
setupEventListeners();
|
| 580 |
}
|
|
@@ -610,6 +609,7 @@
|
|
| 610 |
filteredPatients = [...allPatients];
|
| 611 |
displayPatients(filteredPatients);
|
| 612 |
updatePatientStats();
|
|
|
|
| 613 |
console.log('Pacientes cargados:', allPatients.length);
|
| 614 |
} else {
|
| 615 |
console.log('Error cargando pacientes');
|
|
@@ -628,11 +628,9 @@
|
|
| 628 |
}
|
| 629 |
|
| 630 |
function loadStatistics() {
|
| 631 |
-
|
| 632 |
-
|
| 633 |
-
|
| 634 |
-
}
|
| 635 |
-
});
|
| 636 |
}
|
| 637 |
|
| 638 |
function displayPatients(patients) {
|
|
|
|
| 574 |
|
| 575 |
loadPatientsList();
|
| 576 |
loadRiskFactors();
|
|
|
|
| 577 |
|
| 578 |
setupEventListeners();
|
| 579 |
}
|
|
|
|
| 609 |
filteredPatients = [...allPatients];
|
| 610 |
displayPatients(filteredPatients);
|
| 611 |
updatePatientStats();
|
| 612 |
+
loadStatistics(); // llamar aquí para tener allPatients ya disponible
|
| 613 |
console.log('Pacientes cargados:', allPatients.length);
|
| 614 |
} else {
|
| 615 |
console.log('Error cargando pacientes');
|
|
|
|
| 628 |
}
|
| 629 |
|
| 630 |
function loadStatistics() {
|
| 631 |
+
// El total real de pacientes se toma directamente de la lista completa
|
| 632 |
+
// ya cargada, no del dashboard (que filtra solo por diagnosticados)
|
| 633 |
+
$('#totalPatients').text(allPatients.length);
|
|
|
|
|
|
|
| 634 |
}
|
| 635 |
|
| 636 |
function displayPatients(patients) {
|