From e7e0feee31498e4dfab7d5785805ae1c257b2c0f Mon Sep 17 00:00:00 2001 From: Fabio-Ramirez Date: Thu, 29 Jan 2026 13:20:24 -0300 Subject: [PATCH 1/4] HUDS - Visualizar Derivaciones del COM --- src/app/modules/com/com.module.ts | 2 +- .../com/components/punto-inicio.component.ts | 2 +- .../ejecucion/hudsBusqueda.component.ts | 29 +++++- .../components/ejecucion/hudsBusqueda.html | 62 ++++++++++++ .../components/ejecucion/hudsBusqueda.scss | 8 ++ .../rup/components/ejecucion/vistaHuds.html | 4 + .../rup/components/huds/vistaDerivacion.html | 95 +++++++++++++++++++ .../rup/components/huds/vistaDerivacion.scss | 53 +++++++++++ .../rup/components/huds/vistaDerivacion.ts | 87 +++++++++++++++++ src/app/modules/rup/components/variables.scss | 2 + src/app/modules/rup/huds-lib.module.ts | 3 + src/app/modules/rup/services/huds.service.ts | 5 + src/app/services/com/derivaciones.service.ts | 4 +- .../puntoInicio}/punto-inicio.service.ts | 8 +- 14 files changed, 357 insertions(+), 7 deletions(-) create mode 100644 src/app/modules/rup/components/huds/vistaDerivacion.html create mode 100644 src/app/modules/rup/components/huds/vistaDerivacion.scss create mode 100644 src/app/modules/rup/components/huds/vistaDerivacion.ts rename src/app/{modules/com/services => services/puntoInicio}/punto-inicio.service.ts (93%) diff --git a/src/app/modules/com/com.module.ts b/src/app/modules/com/com.module.ts index def4f15cbf..e1d0d5b167 100644 --- a/src/app/modules/com/com.module.ts +++ b/src/app/modules/com/com.module.ts @@ -24,7 +24,7 @@ import { HistorialDerivacionComponent } from './components/historial-derivacion. import { NuevaDerivacionComponent } from './components/nueva-derivacion/nueva-derivacion.component'; import { ComPuntoInicioComponent } from './components/punto-inicio.component'; import { TipoTrasladoComponent } from './components/tipo-traslado/tipo-traslado'; -import { PuntoInicioService } from './services/punto-inicio.service'; +import { PuntoInicioService } from 'src/app/services/puntoInicio/punto-inicio.service'; export const COM_COMPONENTS = [ diff --git a/src/app/modules/com/components/punto-inicio.component.ts b/src/app/modules/com/components/punto-inicio.component.ts index 016bacbeae..863a4d64db 100644 --- a/src/app/modules/com/components/punto-inicio.component.ts +++ b/src/app/modules/com/components/punto-inicio.component.ts @@ -11,7 +11,7 @@ import { OrganizacionService } from '../../../services/organizacion.service'; import { SemaforoService } from '../../semaforo-priorizacion/service/semaforo.service'; import { IDerivacion } from '../interfaces/IDerivacion.interface'; import { DerivacionesService } from './../../../services/com/derivaciones.service'; -import { PuntoInicioService } from './../services/punto-inicio.service'; +import { PuntoInicioService } from 'src/app/services/puntoInicio/punto-inicio.service'; @Component({ selector: 'com-punto-inicio', diff --git a/src/app/modules/rup/components/ejecucion/hudsBusqueda.component.ts b/src/app/modules/rup/components/ejecucion/hudsBusqueda.component.ts index e6793d9811..34b3d5995f 100644 --- a/src/app/modules/rup/components/ejecucion/hudsBusqueda.component.ts +++ b/src/app/modules/rup/components/ejecucion/hudsBusqueda.component.ts @@ -21,6 +21,7 @@ import { HUDSService } from '../../services/huds.service'; import { PrestacionesService } from './../../services/prestaciones.service'; import { CDAService } from '../../services/CDA.service'; +import { PuntoInicioService } from 'src/app/services/puntoInicio/punto-inicio.service'; @Component({ selector: 'rup-hudsBusqueda', @@ -32,6 +33,7 @@ export class HudsBusquedaComponent implements AfterContentInit, OnInit, OnDestro laboratoriosFS: any; laboratorios: any = []; vacunas: any = []; + derivaciones: any = []; ordenDesc = true; searchTerm: string; hallazgosCronicosAux: any[]; @@ -116,6 +118,7 @@ export class HudsBusquedaComponent implements AfterContentInit, OnInit, OnDestro elementoderegistro: ['elemento de registro'], laboratorios: ['laboratorios'], vacunas: ['vacunas'], + com: ['com'] }; public prestacionesTotales; public registrosTotales = { @@ -163,7 +166,8 @@ export class HudsBusquedaComponent implements AfterContentInit, OnInit, OnDestro { key: 'recetas', titulo: 'recetas', icono: 'listado-receta' }, { key: 'producto', titulo: 'productos', icono: 'pildoras' }, { key: 'laboratorios', titulo: 'laboratorios', icono: 'recipiente' }, - { key: 'vacunas', titulo: 'vacunas', icono: 'vacuna' } + { key: 'vacunas', titulo: 'vacunas', icono: 'vacuna' }, + { key: 'com', titulo: 'com', icono: 'account-switch' } ]; public estadoReceta = { @@ -201,6 +205,7 @@ export class HudsBusquedaComponent implements AfterContentInit, OnInit, OnDestro private recetasService: RecetaService, private cdaService: CDAService, private profesionalService: ProfesionalService, + private puntoInicioService: PuntoInicioService ) { } @@ -214,6 +219,7 @@ export class HudsBusquedaComponent implements AfterContentInit, OnInit, OnDestro this.listarInternaciones(); this.listarPrestaciones(); this.listarConceptos(); + this.listarDerivaciones(); } this.token = this.huds.getHudsToken(); // Cuando se inicia una prestación debemos volver a consultar si hay CDA nuevos al ratito. @@ -402,6 +408,11 @@ export class HudsBusquedaComponent implements AfterContentInit, OnInit, OnDestro registro.tipo = 'solicitud'; registro.class = 'plan'; break; + case 'com': + gtag('huds-open', tipo, registro.organizacionOrigen.nombre, index); + registro = registro; + registro.class = 'com'; + break; case 'ficha-epidemiologica': gtag('huds-open', tipo, registro.prestacion.term, index); registro = registro.data; @@ -571,6 +582,16 @@ export class HudsBusquedaComponent implements AfterContentInit, OnInit, OnDestro }); } + listarDerivaciones() { + const query = { + paciente: `^${this.paciente.documento}` + }; + + this.puntoInicioService.get(query).subscribe((data) => { + this.derivaciones = data; + }); + } + private cargarSolicitudesMezcladas() { this.solicitudesMezcladas = this.solicitudes.concat(this.solicitudesTOP); @@ -727,6 +748,8 @@ export class HudsBusquedaComponent implements AfterContentInit, OnInit, OnDestro return this.laboratorios.length; case 'vacunas': return this.vacunas.length; + case 'com': + return this.derivaciones.length; case 'solicitudes': return this.solicitudesMezcladas.length; case 'recetas': @@ -888,6 +911,10 @@ export class HudsBusquedaComponent implements AfterContentInit, OnInit, OnDestro this.emitTabs(registro, (registro.evoluciones ? 'concepto' : 'solicitud'), index); } + clickDerivacion(registro, index) { + this.emitTabs(registro, 'com', index); + } + normalizarCadena(cadena) { return cadena .normalize('NFD').replace(/[\u0300-\u036f]/g, '').toLowerCase().replace(/\s+/g, ' ').trim(); diff --git a/src/app/modules/rup/components/ejecucion/hudsBusqueda.html b/src/app/modules/rup/components/ejecucion/hudsBusqueda.html index 1eadf80c4d..ebf0752acf 100644 --- a/src/app/modules/rup/components/ejecucion/hudsBusqueda.html +++ b/src/app/modules/rup/components/ejecucion/hudsBusqueda.html @@ -877,5 +877,67 @@
{{ getTitulo(filtroActual) | uppercas + + + +
    + +
  • +
    +
    +
    +
    +
    +
    +
    + +
    +
    + + {{ registro.organizacionOrigen.nombre }} +
    +
    +
    + Organización Destino: + + {{ registro.organizacionDestino?.nombre }} + + +
    + Profesional: + + {{ registro.profesionalSolicitante | + nombre }} + + + No existe + + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
  • +
    +
+
+
+
+ + +
+
+
\ No newline at end of file diff --git a/src/app/modules/rup/components/ejecucion/hudsBusqueda.scss b/src/app/modules/rup/components/ejecucion/hudsBusqueda.scss index 7b833ee6c2..80e1c209fe 100644 --- a/src/app/modules/rup/components/ejecucion/hudsBusqueda.scss +++ b/src/app/modules/rup/components/ejecucion/hudsBusqueda.scss @@ -132,6 +132,10 @@ @include card-estilo($vacuna); } + .com { + @include card-estilo($com); + } + .dominios { @include card-estilo($dominiosNac); } @@ -286,6 +290,10 @@ color: $vacuna } + &.com { + color: $com + } + &.dominios { color: $dominiosNac } diff --git a/src/app/modules/rup/components/ejecucion/vistaHuds.html b/src/app/modules/rup/components/ejecucion/vistaHuds.html index 42cab59a72..c64e810129 100644 --- a/src/app/modules/rup/components/ejecucion/vistaHuds.html +++ b/src/app/modules/rup/components/ejecucion/vistaHuds.html @@ -98,6 +98,10 @@ + + + diff --git a/src/app/modules/rup/components/huds/vistaDerivacion.html b/src/app/modules/rup/components/huds/vistaDerivacion.html new file mode 100644 index 0000000000..84cc754a05 --- /dev/null +++ b/src/app/modules/rup/components/huds/vistaDerivacion.html @@ -0,0 +1,95 @@ + + +
+ + + + {{registro.estado}} + + + {{registro.estado}} + + + {{registro.estado}} + +
+
+ + + + + + + + + + + + + + + + + + + + + + + {{registro.detalle}} + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + +
+
+
+
+ +
+ + +
+
+
\ No newline at end of file diff --git a/src/app/modules/rup/components/huds/vistaDerivacion.scss b/src/app/modules/rup/components/huds/vistaDerivacion.scss new file mode 100644 index 0000000000..9d9b7801ff --- /dev/null +++ b/src/app/modules/rup/components/huds/vistaDerivacion.scss @@ -0,0 +1,53 @@ +.titulo-badges { + display: flex; + column-gap: 5px; + align-items: center; +} + +.registros { + display: flex; + align-items: center; + grid-gap: 20px; + + .icon-info { + color: var(--nav-bar-color); + padding: 10px; + border: 1px solid var(--nav-bar-color); + border-radius: 100%; + width: 60px; + height: 60px; + align-items: center; + display: flex; + justify-content: center; + } + + .info-registro { + display: flex; + flex-direction: column; + + plex-badge { + margin-bottom: 10px; + } + + hr { + float: left; + margin: 0.75rem 0; + width: 35px; + border: solid 0.5px var(--nav-bar-color); + } + } +} + +.texto-detalle { + text-transform: capitalize; + font-size: 80%; + line-height: normal; +} + +.subtitulo { + font-size: 1.4em; + font-weight: 300; + margin-bottom: -5px; + text-transform: uppercase; + color: var(--nav-bar-color); +} \ No newline at end of file diff --git a/src/app/modules/rup/components/huds/vistaDerivacion.ts b/src/app/modules/rup/components/huds/vistaDerivacion.ts new file mode 100644 index 0000000000..55c2b4d402 --- /dev/null +++ b/src/app/modules/rup/components/huds/vistaDerivacion.ts @@ -0,0 +1,87 @@ +import { Component, OnInit, Input } from '@angular/core'; +import { Auth } from '@andes/auth'; +import { TurnoService } from '../../../../services/turnos/turno.service'; +import { HUDSService } from '../../services/huds.service'; +import { DocumentosService } from 'src/app/services/documentos.service'; +import { AdjuntosService } from '../../services/adjuntos.service'; +import { OrganizacionService } from 'src/app/services/organizacion.service'; +@Component({ + selector: 'vista-derivacion', + templateUrl: 'vistaDerivacion.html', + styleUrls: ['vistaDerivacion.scss'], +}) + +export class VistaDerivacionComponent implements OnInit { + + @Input() registro; + turno; + estado; + observaciones = ''; + organizacionOrigen; + public puedeDescargarInforme: boolean; + public requestInProgress: boolean; + public adjuntosUrl = []; + fileToken: string = null; + historialDerivaciones = []; + + constructor( + public servicioTurnos: TurnoService, + public huds: HUDSService, + private auth: Auth, + private documentosService: DocumentosService, + private adjuntosService: AdjuntosService, + private organizacionService: OrganizacionService + ) { } + + ngOnInit() { + this.puedeDescargarInforme = this.auth.check('huds:impresion'); + this.adjuntosUrl = this.registro.adjuntos.map((doc) => { + return { + ...doc, + url: this.adjuntosService.createUrl('drive', doc, this.fileToken) + }; + }); + this.organizacionOrigen = this.organizacionService.getById(this.registro.organizacionOrigen.id).subscribe(organizacion => { + this.organizacionOrigen = organizacion; + + this.historialDerivaciones = this.getHistorialDerivacion(this.organizacionOrigen, this.registro); + }); + + } + + abrirSolicitud() { + const tipo = 'rup'; + this.huds.toogle(this.registro, tipo); + } + + imprimirHistorial() { + this.requestInProgress = true; + const foo = () => this.requestInProgress = false; + this.documentosService.descargarHistorialDerivacion(this.registro._id, this.registro.paciente.apellido).subscribe(foo, foo); + } + + getHistorialDerivacion2() { + this.registro.historial.shift(); + const organizacion = this.registro.organizacionOrigen; + let historial = organizacion.esCOM ? this.registro.historial : this.registro.historial.filter((h) => h.createdBy.organizacion.id === organizacion.id); + historial = historial.filter(h => !h.eliminado); + historial.forEach(h => { + h.fechaCreacion = moment(h.createdAt).locale('es').format('DD/MM/YYYY HH:mm'); + h.reporteCOM = organizacion.esCOM; + h.esActualizacion = !h?.estado; + }); + return historial.sort((a, b) => b.createdAt - a.createdAt); + } + + getHistorialDerivacion(organizacion, derivacion) { + derivacion.historial.shift(); + let historial = organizacion.esCOM ? derivacion.historial : derivacion.historial.filter((h) => h.createdBy.organizacion.id === organizacion.id); + historial = historial.filter(h => !h.eliminado); + historial.forEach(h => { + h.fechaCreacion = moment(h.createdAt).locale('es').format('DD/MM/YYYY HH:mm'); + h.reporteCOM = organizacion.esCOM; + h.esActualizacion = !h?.estado; + }); + return historial.sort((a, b) => b.createdAt - a.createdAt); + } +} diff --git a/src/app/modules/rup/components/variables.scss b/src/app/modules/rup/components/variables.scss index 6a8ae79af3..53ed694e2a 100644 --- a/src/app/modules/rup/components/variables.scss +++ b/src/app/modules/rup/components/variables.scss @@ -20,6 +20,7 @@ $calificador: #660520; $laboratorio: #a0a0a0; $registro: #8bc43f; // elemento de registro $vacuna: #11910D; +$com: #7a1e2b; $dominiosNac: #11312D; $informacion: #00A8E0; $recetas: #7b2ff7; @@ -43,6 +44,7 @@ $rup_colors: ( 'medicamento.clínico': $producto, adjunto: $adjunto, vacuna: $vacuna, + com: $com, dominiosNac: $dominiosNac, elemento: $registro, elementoderegistro: $registro, diff --git a/src/app/modules/rup/huds-lib.module.ts b/src/app/modules/rup/huds-lib.module.ts index e445751369..1d042a2519 100644 --- a/src/app/modules/rup/huds-lib.module.ts +++ b/src/app/modules/rup/huds-lib.module.ts @@ -37,6 +37,7 @@ import { MotivosHudsService } from 'src/app/services/motivosHuds.service'; import { VistaLaboratorioComponent } from './components/ejecucion/laboratorios/vista-laboratorio.component'; import { VistaRecetaComponent } from './components/huds/vistaReceta'; import { SuspenderMedicacionComponent } from './components/ejecucion/recetas/suspenderMedicacion'; +import { VistaDerivacionComponent } from './components/huds/vistaDerivacion'; @NgModule({ imports: [ @@ -76,6 +77,7 @@ import { SuspenderMedicacionComponent } from './components/ejecucion/recetas/sus DetallePacienteComponent, VistaDetalleRegistroComponent, VistaAccesosHudsComponent, + VistaDerivacionComponent, VistaSolicitudTopComponent, VistaHistorialTurnosComponent, HudsBusquedaComponent, @@ -100,6 +102,7 @@ import { SuspenderMedicacionComponent } from './components/ejecucion/recetas/sus VistaDetalleRegistroComponent, VistaAccesosHudsComponent, VistaSolicitudTopComponent, + VistaDerivacionComponent, VistaHistorialTurnosComponent, HudsBusquedaComponent, ListadoInternacionHudsComponent, diff --git a/src/app/modules/rup/services/huds.service.ts b/src/app/modules/rup/services/huds.service.ts index c3871fae97..05069199fe 100644 --- a/src/app/modules/rup/services/huds.service.ts +++ b/src/app/modules/rup/services/huds.service.ts @@ -87,6 +87,11 @@ export class HUDSService { case 'cda': case 'dominio': case 'solicitud': + case 'com': + if (registro._id === _registro._id) { + return i; + } + break; case 'ficha-epidemiologica': if (registro.id === _registro.id || registro.data?.id === _registro.id) { return i; diff --git a/src/app/services/com/derivaciones.service.ts b/src/app/services/com/derivaciones.service.ts index 2f11fd6e7b..0c7144e8c5 100644 --- a/src/app/services/com/derivaciones.service.ts +++ b/src/app/services/com/derivaciones.service.ts @@ -2,7 +2,9 @@ import { ResourceBaseHttp, Server } from '@andes/shared'; import { Injectable } from '@angular/core'; import { environment } from 'src/environments/environment'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class DerivacionesService extends ResourceBaseHttp { protected url = '/modules/com/derivaciones'; constructor(protected server: Server) { super(server); } diff --git a/src/app/modules/com/services/punto-inicio.service.ts b/src/app/services/puntoInicio/punto-inicio.service.ts similarity index 93% rename from src/app/modules/com/services/punto-inicio.service.ts rename to src/app/services/puntoInicio/punto-inicio.service.ts index f1911c5d8e..09d797640a 100644 --- a/src/app/modules/com/services/punto-inicio.service.ts +++ b/src/app/services/puntoInicio/punto-inicio.service.ts @@ -1,10 +1,12 @@ import { Injectable } from '@angular/core'; import { BehaviorSubject, combineLatest, Observable } from 'rxjs'; import { map } from 'rxjs/operators'; -import { DerivacionesService } from 'src/app/services/com/derivaciones.service'; -import { IDerivacion } from '../interfaces/IDerivacion.interface'; +import { IDerivacion } from '../../modules/com/interfaces/IDerivacion.interface'; +import { DerivacionesService } from '../com/derivaciones.service'; -@Injectable() +@Injectable({ + providedIn: 'root' +}) export class PuntoInicioService { public derivacionesOrdenadas$: Observable; From 7cb7e64412564d844b7620090f54373f401f1bfa Mon Sep 17 00:00:00 2001 From: Fabio-Ramirez Date: Fri, 27 Feb 2026 15:26:08 -0300 Subject: [PATCH 2/4] Se suben correcciones --- src/app/modules/com/components/punto-inicio.component.ts | 2 +- src/styles.scss | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/modules/com/components/punto-inicio.component.ts b/src/app/modules/com/components/punto-inicio.component.ts index 863a4d64db..9886bb792b 100644 --- a/src/app/modules/com/components/punto-inicio.component.ts +++ b/src/app/modules/com/components/punto-inicio.component.ts @@ -11,7 +11,7 @@ import { OrganizacionService } from '../../../services/organizacion.service'; import { SemaforoService } from '../../semaforo-priorizacion/service/semaforo.service'; import { IDerivacion } from '../interfaces/IDerivacion.interface'; import { DerivacionesService } from './../../../services/com/derivaciones.service'; -import { PuntoInicioService } from 'src/app/services/puntoInicio/punto-inicio.service'; +import { PuntoInicioService } from './../../../services/puntoInicio/punto-inicio.service'; @Component({ selector: 'com-punto-inicio', diff --git a/src/styles.scss b/src/styles.scss index 916d753e02..26a7bcdba6 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -7,6 +7,7 @@ $trastorno: #ff4a1a; $hallazgo: #f4a03b; $procedimiento: #92278e; $solicitud: #0070cc; +$com: #7a1e2b; // $productos: #ef0993; $producto: #00bcb4; $adjunto: #b9c512; @@ -29,6 +30,7 @@ $plex-tabs-color-extend: ( regimen: $procedimiento, entidad: $procedimiento, solicitud: $solicitud, + com: $com, producto: $producto, adjunto: $adjunto, elementoderegistro: $registro, From 6296c3f3e0bb6f07f820ade39420a47c08e7c770 Mon Sep 17 00:00:00 2001 From: Fabio-Ramirez Date: Mon, 9 Mar 2026 08:26:46 -0300 Subject: [PATCH 3/4] Se agregan cambios de COM por RECC --- .../ejecucion/hudsBusqueda.component.ts | 12 +- .../components/ejecucion/hudsBusqueda.html | 11 +- .../components/ejecucion/hudsBusqueda.scss | 8 +- .../rup/components/ejecucion/vistaHuds.html | 4 +- .../rup/components/huds/vistaDerivacion.html | 128 +++++++++--------- .../rup/components/huds/vistaDerivacion.ts | 20 +-- src/app/modules/rup/components/variables.scss | 4 +- src/app/modules/rup/services/huds.service.ts | 2 +- src/styles.scss | 4 +- 9 files changed, 91 insertions(+), 102 deletions(-) diff --git a/src/app/modules/rup/components/ejecucion/hudsBusqueda.component.ts b/src/app/modules/rup/components/ejecucion/hudsBusqueda.component.ts index 34b3d5995f..559cb88d3c 100644 --- a/src/app/modules/rup/components/ejecucion/hudsBusqueda.component.ts +++ b/src/app/modules/rup/components/ejecucion/hudsBusqueda.component.ts @@ -118,7 +118,7 @@ export class HudsBusquedaComponent implements AfterContentInit, OnInit, OnDestro elementoderegistro: ['elemento de registro'], laboratorios: ['laboratorios'], vacunas: ['vacunas'], - com: ['com'] + recc: ['recc'] }; public prestacionesTotales; public registrosTotales = { @@ -167,7 +167,7 @@ export class HudsBusquedaComponent implements AfterContentInit, OnInit, OnDestro { key: 'producto', titulo: 'productos', icono: 'pildoras' }, { key: 'laboratorios', titulo: 'laboratorios', icono: 'recipiente' }, { key: 'vacunas', titulo: 'vacunas', icono: 'vacuna' }, - { key: 'com', titulo: 'com', icono: 'account-switch' } + { key: 'recc', titulo: 'recc', icono: 'account-switch' } ]; public estadoReceta = { @@ -408,10 +408,10 @@ export class HudsBusquedaComponent implements AfterContentInit, OnInit, OnDestro registro.tipo = 'solicitud'; registro.class = 'plan'; break; - case 'com': + case 'recc': gtag('huds-open', tipo, registro.organizacionOrigen.nombre, index); registro = registro; - registro.class = 'com'; + registro.class = 'recc'; break; case 'ficha-epidemiologica': gtag('huds-open', tipo, registro.prestacion.term, index); @@ -748,7 +748,7 @@ export class HudsBusquedaComponent implements AfterContentInit, OnInit, OnDestro return this.laboratorios.length; case 'vacunas': return this.vacunas.length; - case 'com': + case 'recc': return this.derivaciones.length; case 'solicitudes': return this.solicitudesMezcladas.length; @@ -912,7 +912,7 @@ export class HudsBusquedaComponent implements AfterContentInit, OnInit, OnDestro } clickDerivacion(registro, index) { - this.emitTabs(registro, 'com', index); + this.emitTabs(registro, 'recc', index); } normalizarCadena(cadena) { diff --git a/src/app/modules/rup/components/ejecucion/hudsBusqueda.html b/src/app/modules/rup/components/ejecucion/hudsBusqueda.html index ebf0752acf..c3f49ab46d 100644 --- a/src/app/modules/rup/components/ejecucion/hudsBusqueda.html +++ b/src/app/modules/rup/components/ejecucion/hudsBusqueda.html @@ -878,16 +878,17 @@
{{ getTitulo(filtroActual) | uppercas - - + +
  • -
    -
    +
    diff --git a/src/app/modules/rup/components/ejecucion/hudsBusqueda.scss b/src/app/modules/rup/components/ejecucion/hudsBusqueda.scss index 80e1c209fe..220c78af90 100644 --- a/src/app/modules/rup/components/ejecucion/hudsBusqueda.scss +++ b/src/app/modules/rup/components/ejecucion/hudsBusqueda.scss @@ -132,8 +132,8 @@ @include card-estilo($vacuna); } - .com { - @include card-estilo($com); + .recc { + @include card-estilo($recc); } .dominios { @@ -290,8 +290,8 @@ color: $vacuna } - &.com { - color: $com + &.recc { + color: $recc } &.dominios { diff --git a/src/app/modules/rup/components/ejecucion/vistaHuds.html b/src/app/modules/rup/components/ejecucion/vistaHuds.html index c64e810129..ee04058b76 100644 --- a/src/app/modules/rup/components/ejecucion/vistaHuds.html +++ b/src/app/modules/rup/components/ejecucion/vistaHuds.html @@ -98,8 +98,8 @@ - + diff --git a/src/app/modules/rup/components/huds/vistaDerivacion.html b/src/app/modules/rup/components/huds/vistaDerivacion.html index 84cc754a05..523cbe0833 100644 --- a/src/app/modules/rup/components/huds/vistaDerivacion.html +++ b/src/app/modules/rup/components/huds/vistaDerivacion.html @@ -19,77 +19,75 @@ - - - - - - - - - - - - - - - - +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    + + + +
    +
    +
    +
    +
    +
    +
    +
    + + + + +
    +
    +
    +
    +
    +
    +
    +
    {{registro.detalle}} - - - - - - -
    -
    - - - - - - - - - - - - - - - - - -
    -
    -
    -
    - -
    - - -
    -
    \ No newline at end of file diff --git a/src/app/modules/rup/components/huds/vistaDerivacion.ts b/src/app/modules/rup/components/huds/vistaDerivacion.ts index 55c2b4d402..12053992cf 100644 --- a/src/app/modules/rup/components/huds/vistaDerivacion.ts +++ b/src/app/modules/rup/components/huds/vistaDerivacion.ts @@ -22,7 +22,7 @@ export class VistaDerivacionComponent implements OnInit { public requestInProgress: boolean; public adjuntosUrl = []; fileToken: string = null; - historialDerivaciones = []; + fechaAceptada: string; constructor( public servicioTurnos: TurnoService, @@ -44,9 +44,8 @@ export class VistaDerivacionComponent implements OnInit { this.organizacionOrigen = this.organizacionService.getById(this.registro.organizacionOrigen.id).subscribe(organizacion => { this.organizacionOrigen = organizacion; - this.historialDerivaciones = this.getHistorialDerivacion(this.organizacionOrigen, this.registro); + this.fechaAceptada = this.getFechaAceptada(this.registro); }); - } abrirSolicitud() { @@ -60,19 +59,10 @@ export class VistaDerivacionComponent implements OnInit { this.documentosService.descargarHistorialDerivacion(this.registro._id, this.registro.paciente.apellido).subscribe(foo, foo); } - getHistorialDerivacion2() { - this.registro.historial.shift(); - const organizacion = this.registro.organizacionOrigen; - let historial = organizacion.esCOM ? this.registro.historial : this.registro.historial.filter((h) => h.createdBy.organizacion.id === organizacion.id); - historial = historial.filter(h => !h.eliminado); - historial.forEach(h => { - h.fechaCreacion = moment(h.createdAt).locale('es').format('DD/MM/YYYY HH:mm'); - h.reporteCOM = organizacion.esCOM; - h.esActualizacion = !h?.estado; - }); - return historial.sort((a, b) => b.createdAt - a.createdAt); + getFechaAceptada(derivacion) { + const aceptada = derivacion.historial.find(h => h.estado === 'aceptada'); + return aceptada ? aceptada.createdAt : null; } - getHistorialDerivacion(organizacion, derivacion) { derivacion.historial.shift(); let historial = organizacion.esCOM ? derivacion.historial : derivacion.historial.filter((h) => h.createdBy.organizacion.id === organizacion.id); diff --git a/src/app/modules/rup/components/variables.scss b/src/app/modules/rup/components/variables.scss index 53ed694e2a..f7f3da94a2 100644 --- a/src/app/modules/rup/components/variables.scss +++ b/src/app/modules/rup/components/variables.scss @@ -20,7 +20,7 @@ $calificador: #660520; $laboratorio: #a0a0a0; $registro: #8bc43f; // elemento de registro $vacuna: #11910D; -$com: #7a1e2b; +$recc: #7a1e2b; $dominiosNac: #11312D; $informacion: #00A8E0; $recetas: #7b2ff7; @@ -44,7 +44,7 @@ $rup_colors: ( 'medicamento.clínico': $producto, adjunto: $adjunto, vacuna: $vacuna, - com: $com, + recc: $recc, dominiosNac: $dominiosNac, elemento: $registro, elementoderegistro: $registro, diff --git a/src/app/modules/rup/services/huds.service.ts b/src/app/modules/rup/services/huds.service.ts index 05069199fe..1cfa1cbbef 100644 --- a/src/app/modules/rup/services/huds.service.ts +++ b/src/app/modules/rup/services/huds.service.ts @@ -87,7 +87,7 @@ export class HUDSService { case 'cda': case 'dominio': case 'solicitud': - case 'com': + case 'recc': if (registro._id === _registro._id) { return i; } diff --git a/src/styles.scss b/src/styles.scss index 26a7bcdba6..52d59844f3 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -7,7 +7,7 @@ $trastorno: #ff4a1a; $hallazgo: #f4a03b; $procedimiento: #92278e; $solicitud: #0070cc; -$com: #7a1e2b; +$recc: #7a1e2b; // $productos: #ef0993; $producto: #00bcb4; $adjunto: #b9c512; @@ -30,7 +30,7 @@ $plex-tabs-color-extend: ( regimen: $procedimiento, entidad: $procedimiento, solicitud: $solicitud, - com: $com, + recc: $recc, producto: $producto, adjunto: $adjunto, elementoderegistro: $registro, From 5533a224f7f3d02a2310b11fb0608bf316580e58 Mon Sep 17 00:00:00 2001 From: Fabio-Ramirez Date: Thu, 26 Mar 2026 10:14:27 -0300 Subject: [PATCH 4/4] Se agrega tarea COM-117 --- .../rup/components/ejecucion/hudsBusqueda.component.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/modules/rup/components/ejecucion/hudsBusqueda.component.ts b/src/app/modules/rup/components/ejecucion/hudsBusqueda.component.ts index 559cb88d3c..2f9d5c90e2 100644 --- a/src/app/modules/rup/components/ejecucion/hudsBusqueda.component.ts +++ b/src/app/modules/rup/components/ejecucion/hudsBusqueda.component.ts @@ -588,7 +588,10 @@ export class HudsBusquedaComponent implements AfterContentInit, OnInit, OnDestro }; this.puntoInicioService.get(query).subscribe((data) => { - this.derivaciones = data; + + if (data.length > 0) { + this.derivaciones = data.filter(d => d.estado === 'finalizada'); + } }); }