From 26961f8ecabb677e64406a91f0fd054ea5efc870 Mon Sep 17 00:00:00 2001 From: Fabio-Ramirez Date: Thu, 29 Jan 2026 13:20:24 -0300 Subject: [PATCH 1/3] 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 | 117 ++++++++++++++---- .../components/ejecucion/hudsBusqueda.scss | 9 ++ .../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, 390 insertions(+), 30 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 6bda298998..c1d2162928 100644 --- a/src/app/modules/com/com.module.ts +++ b/src/app/modules/com/com.module.ts @@ -23,7 +23,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 0cc875df1a..fa05e2b4af 100644 --- a/src/app/modules/rup/components/ejecucion/hudsBusqueda.component.ts +++ b/src/app/modules/rup/components/ejecucion/hudsBusqueda.component.ts @@ -19,6 +19,7 @@ import { getSemanticClass } from '../../pipes/semantic-class.pipes'; import { EmitConcepto, RupEjecucionService } from '../../services/ejecucion.service'; import { HUDSService } from '../../services/huds.service'; import { PrestacionesService } from './../../services/prestaciones.service'; +import { PuntoInicioService } from 'src/app/services/puntoInicio/punto-inicio.service'; @Component({ selector: 'rup-hudsBusqueda', @@ -30,6 +31,7 @@ export class HudsBusquedaComponent implements AfterContentInit, OnInit { laboratoriosFS: any; laboratorios: any = []; vacunas: any = []; + derivaciones: any = []; ordenDesc = true; searchTerm: string; hallazgosCronicosAux: any[]; @@ -109,6 +111,7 @@ export class HudsBusquedaComponent implements AfterContentInit, OnInit { elementoderegistro: ['elemento de registro'], laboratorios: ['laboratorios'], vacunas: ['vacunas'], + com: ['com'] }; public prestacionesTotales; public registrosTotales = { @@ -156,7 +159,8 @@ export class HudsBusquedaComponent implements AfterContentInit, OnInit { { 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 = { @@ -191,6 +195,7 @@ export class HudsBusquedaComponent implements AfterContentInit, OnInit { private laboratorioService: LaboratorioService, private recetasService: RecetaService, private profesionalService: ProfesionalService, + private puntoInicioService: PuntoInicioService ) { } @@ -204,6 +209,7 @@ export class HudsBusquedaComponent implements AfterContentInit, OnInit { this.listarInternaciones(); this.listarPrestaciones(); this.listarConceptos(); + this.listarDerivaciones(); } const token = this.huds.getHudsToken(); // Cuando se inicia una prestación debemos volver a consultar si hay CDA nuevos al ratito. @@ -311,6 +317,11 @@ export class HudsBusquedaComponent implements AfterContentInit, OnInit { 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; @@ -480,6 +491,16 @@ export class HudsBusquedaComponent implements AfterContentInit, OnInit { }); } + 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); @@ -594,6 +615,8 @@ export class HudsBusquedaComponent implements AfterContentInit, OnInit { return this.laboratorios.length; case 'vacunas': return this.vacunas.length; + case 'com': + return this.derivaciones.length; case 'solicitudes': return this.solicitudesMezcladas.length; case 'recetas': @@ -755,6 +778,10 @@ export class HudsBusquedaComponent implements AfterContentInit, OnInit { 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 65f3f8aa0f..1fbd592ccc 100644 --- a/src/app/modules/rup/components/ejecucion/hudsBusqueda.html +++ b/src/app/modules/rup/components/ejecucion/hudsBusqueda.html @@ -67,15 +67,20 @@
{{ getTitulo(filtroActual) | uppercas (change)="seleccionarReceta($event, grupo.recetas, iReceta)">
-
- - Tratamiento prolongado: {{ (grupo.recetaVisible?.medicamento?.ordenTratamiento !== null && grupo.recetaVisible?.medicamento?.ordenTratamiento !== undefined) ? (grupo.recetaVisible.medicamento.ordenTratamiento + 1) : 0 }} de {{grupo.recetaVisible?.medicamento.tiempoTratamiento?.id}} -
-
+
+ + Tratamiento prolongado: {{ (grupo.recetaVisible?.medicamento?.ordenTratamiento !== + null && grupo.recetaVisible?.medicamento?.ordenTratamiento !== undefined) ? + (grupo.recetaVisible.medicamento.ordenTratamiento + 1) : 0 }} de + {{grupo.recetaVisible?.medicamento.tiempoTratamiento?.id}} +
+
+ [ngClass]="{'active': huds.isOpen(grupo, 'receta')}">
@@ -89,13 +94,14 @@
{{ getTitulo(filtroActual) | uppercas
Fecha de Registro: - {{ grupo.recetaVisible?.fechaRegistro | date:'short' }} - -
- Profesional: {{ - grupo.recetaVisible?.profesional.nombre }} {{ - grupo.recetaVisible?.profesional.apellido }} - + {{ grupo.recetaVisible?.fechaRegistro | + date:'short' }} + +
+ Profesional: {{ + grupo.recetaVisible?.profesional.nombre }} {{ + grupo.recetaVisible?.profesional.apellido }} +
@@ -105,15 +111,18 @@
{{ getTitulo(filtroActual) | uppercas
- - {{ grupo.recetaVisible?.estadoActual?.tipo.replace('-', ' ') }} - - - {{ grupo.recetaVisible?.estadoDispensaActual?.tipo.replace('-', ' ') - }} - + + {{ grupo.recetaVisible?.estadoActual?.tipo.replace('-', ' ') + }} + + + {{ + grupo.recetaVisible?.estadoDispensaActual?.tipo.replace('-', + ' ') + }} +
@@ -853,5 +862,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 29a41a7cd4..778f20217f 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 } @@ -349,6 +357,7 @@ font-size: 80%; } + .total { width: 100% !important; } diff --git a/src/app/modules/rup/components/ejecucion/vistaHuds.html b/src/app/modules/rup/components/ejecucion/vistaHuds.html index 19ee4a6cfc..3de1c73ea9 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 ffeae25370eca9660d4a4442560b6d67230e1c7e Mon Sep 17 00:00:00 2001 From: Fabio-Ramirez Date: Fri, 27 Feb 2026 15:26:08 -0300 Subject: [PATCH 2/3] 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 8fe41ce17e64372d5575ce72c015d2ebb2f4d3c4 Mon Sep 17 00:00:00 2001 From: Fabio-Ramirez Date: Mon, 9 Mar 2026 08:26:46 -0300 Subject: [PATCH 3/3] 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 fa05e2b4af..6f80857e7c 100644 --- a/src/app/modules/rup/components/ejecucion/hudsBusqueda.component.ts +++ b/src/app/modules/rup/components/ejecucion/hudsBusqueda.component.ts @@ -111,7 +111,7 @@ export class HudsBusquedaComponent implements AfterContentInit, OnInit { elementoderegistro: ['elemento de registro'], laboratorios: ['laboratorios'], vacunas: ['vacunas'], - com: ['com'] + recc: ['recc'] }; public prestacionesTotales; public registrosTotales = { @@ -160,7 +160,7 @@ export class HudsBusquedaComponent implements AfterContentInit, OnInit { { 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 = { @@ -317,10 +317,10 @@ export class HudsBusquedaComponent implements AfterContentInit, OnInit { 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); @@ -615,7 +615,7 @@ export class HudsBusquedaComponent implements AfterContentInit, OnInit { return this.laboratorios.length; case 'vacunas': return this.vacunas.length; - case 'com': + case 'recc': return this.derivaciones.length; case 'solicitudes': return this.solicitudesMezcladas.length; @@ -779,7 +779,7 @@ export class HudsBusquedaComponent implements AfterContentInit, OnInit { } 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 1fbd592ccc..a5295eb629 100644 --- a/src/app/modules/rup/components/ejecucion/hudsBusqueda.html +++ b/src/app/modules/rup/components/ejecucion/hudsBusqueda.html @@ -863,16 +863,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 778f20217f..07b3a705b9 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 3de1c73ea9..bcc0b73072 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,