Simplify: Lab results colors - green for normal, red for abnormal

This commit is contained in:
2026-04-21 09:48:23 -03:00
parent fb3867d620
commit 006b0c7a50
+3 -7
View File
@@ -635,9 +635,7 @@ function SeccionLaboratorios({ lab, patientId, add, update, del, addAcidoBase }:
const getEstadoColor = (estado: ResultadoLaboratorio['estado']) => { const getEstadoColor = (estado: ResultadoLaboratorio['estado']) => {
switch (estado) { switch (estado) {
case 'Normal': return 'bg-green-100 text-green-800'; case 'Normal': return 'bg-green-100 text-green-800';
case 'Alto': return 'bg-amber-100 text-amber-800'; case 'Alto': case 'Bajo': case 'Crítico': return 'bg-red-100 text-red-800';
case 'Bajo': return 'bg-blue-100 text-blue-800';
case 'Crítico': return 'bg-red-100 text-red-800';
} }
}; };
@@ -654,10 +652,8 @@ function SeccionLaboratorios({ lab, patientId, add, update, del, addAcidoBase }:
const getValorStyle = (l: Laboratorio, param: string) => { const getValorStyle = (l: Laboratorio, param: string) => {
const r = l.resultados.find(r => r.parametro === param); const r = l.resultados.find(r => r.parametro === param);
if (!r) return ''; if (!r) return '';
if (r.estado === 'Crítico') return 'text-red-600 font-bold'; if (r.estado === 'Normal') return 'text-green-600 font-medium';
if (r.estado === 'Alto') return 'text-amber-600'; return 'text-red-600 font-bold';
if (r.estado === 'Bajo') return 'text-blue-600';
return 'text-green-600';
}; };
const buildResultados = (): ResultadoLaboratorio[] => { const buildResultados = (): ResultadoLaboratorio[] => {