Simplify: Lab results colors - green for normal, red for abnormal
This commit is contained in:
@@ -635,9 +635,7 @@ function SeccionLaboratorios({ lab, patientId, add, update, del, addAcidoBase }:
|
||||
const getEstadoColor = (estado: ResultadoLaboratorio['estado']) => {
|
||||
switch (estado) {
|
||||
case 'Normal': return 'bg-green-100 text-green-800';
|
||||
case 'Alto': return 'bg-amber-100 text-amber-800';
|
||||
case 'Bajo': return 'bg-blue-100 text-blue-800';
|
||||
case 'Crítico': return 'bg-red-100 text-red-800';
|
||||
case 'Alto': case 'Bajo': 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 r = l.resultados.find(r => r.parametro === param);
|
||||
if (!r) return '';
|
||||
if (r.estado === 'Crítico') return 'text-red-600 font-bold';
|
||||
if (r.estado === 'Alto') return 'text-amber-600';
|
||||
if (r.estado === 'Bajo') return 'text-blue-600';
|
||||
return 'text-green-600';
|
||||
if (r.estado === 'Normal') return 'text-green-600 font-medium';
|
||||
return 'text-red-600 font-bold';
|
||||
};
|
||||
|
||||
const buildResultados = (): ResultadoLaboratorio[] => {
|
||||
|
||||
Reference in New Issue
Block a user