diff --git a/src/sections/Internaciones.tsx b/src/sections/Internaciones.tsx index cae53c9..2c134df 100644 --- a/src/sections/Internaciones.tsx +++ b/src/sections/Internaciones.tsx @@ -504,15 +504,56 @@ export function Internaciones({ {paciente?.dni || '-'} - {internacion.activa ? ( - - Activa - - ) : ( - - Alta - - )} + {(() => { + if (internacion.activa) { + return ( + + Activa + + ); + } + const motivo = internacion.motivoEgreso; + if (motivo === 'Alta médica') { + return ( + + Alta + + ); + } + if (motivo === 'Egreso Voluntario') { + return ( + + Egreso Voluntario + + ); + } + if (motivo === 'Obito') { + return ( + + Óbito + + ); + } + if (motivo === 'Pase servicio') { + return ( + + Pase Servicio + + ); + } + if (motivo === 'Derivación') { + return ( + + Derivación + + ); + } + return ( + + Alta + + ); + })()} {fechaIng}