Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export class DarTurnosComponent implements OnInit {
nroCarpetaOriginal: string;
public lenNota = 140;
public nota = '';
public videoConferencia = false;
public link: String = '';
public changeCarpeta = false;
public financiador;
Expand Down Expand Up @@ -581,7 +582,6 @@ export class DarTurnosComponent implements OnInit {
this.plex.info('warning', 'Esta agenda ya no está disponible.');
return false;
} else {

this.alternativas = [];
// Se filtran los bloques segun el filtro tipoPrestacion

Expand Down Expand Up @@ -767,8 +767,10 @@ export class DarTurnosComponent implements OnInit {
this.turno.tipoPrestacion = this.opciones.tipoPrestacion;
this.turnoTipoPrestacion = this.opciones.tipoPrestacion;
}

this.habilitarTurnoDoble();
this.nota = this.turno.nota;
this.videoConferencia = this.turno.videoConferencia;
this.buscarTurnosFuturos();
} else {
this.plex.info('warning', 'Debe seleccionar un paciente');
Expand Down Expand Up @@ -1083,6 +1085,7 @@ export class DarTurnosComponent implements OnInit {
idAgenda: this.agenda.id,
estadoFacturacion: this.estadoFacturacion,
emitidoPor: (this.turnoTelefonico) ? 'turno telefonico' : null,
videoConferencia: this.videoConferencia,
link: this.link
};
this.serviceTurno.saveDinamica(datosTurno).subscribe({
Expand Down Expand Up @@ -1123,6 +1126,7 @@ export class DarTurnosComponent implements OnInit {
motivoConsulta: this.motivoConsulta,
estadoFacturacion: this.estadoFacturacion,
emitidoPor: (this.turnoTelefonico) ? 'turno telefonico' : null,
videoConferencia: this.videoConferencia,
link: this.link
};

Expand Down
184 changes: 93 additions & 91 deletions src/app/components/turnos/dar-turnos/dar-turnos.html

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,8 @@ export class PlanificarAgendaComponent implements OnInit {
estado: 'disponible',
horaInicio: this.combinarFechas(this.fecha, new Date(bloque.horaInicio.getTime() + i * bloque.duracionTurno * 60000)),
tipoTurno: undefined,
auditable: !bloque.tipoPrestaciones.some(p => !p.auditable)
auditable: !bloque.tipoPrestaciones.some(p => !p.auditable),
videoConferencia: bloque.tipoPrestaciones.some(p => p.videoConferencia === true)
};
if (bloque.pacienteSimultaneos) {
for (let j = 0; j < bloque.cantidadSimultaneos; j++) {
Expand Down Expand Up @@ -955,7 +956,8 @@ export class PlanificarAgendaComponent implements OnInit {
estado: 'disponible',
horaInicio: b.horaInicio,
tipoPrestacion: b.tipoPrestaciones[0],
tipoTurno: undefined
tipoTurno: undefined,
videoConferencia: b.tipoPrestaciones.some((p: any) => p.videoConferencia === true)
}];
});
}
Expand Down
1 change: 1 addition & 0 deletions src/app/interfaces/ITipoPrestacion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ export interface ITipoPrestacion {
ambito?: Array<string>;
queries?: String[];
auditable?: Boolean;
videoConferencia?: boolean;
}
5 changes: 5 additions & 0 deletions src/app/interfaces/turnos/ITurno.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,9 @@ export interface ITurno {
enum: ['pendiente', 'no enviado', 'enviado', 'fallido'];
};
notificar: boolean;
videoConferencia?: boolean;
webexLinks?: {
patientLink: string;
professionalLink: string;
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import { ConceptObserverService } from './../../services/conceptObserver.service
import { ElementosRUPService } from './../../services/elementosRUP.service';
import { PrestacionesService } from './../../services/prestaciones.service';
import { RecetaService } from 'src/app/services/receta.service';
import { TurnoService } from '../../../../services/turnos/turno.service';
import { ITurno } from '../../../../interfaces/turnos/ITurno';

@Component({
selector: 'rup-prestacionEjecucion',
Expand All @@ -38,6 +40,7 @@ export class PrestacionEjecucionComponent implements OnInit, OnDestroy {

// prestacion actual en ejecucion
public prestacion: IPrestacion;
public turno: ITurno;
public paciente: IPaciente;
public elementoRUP: IElementoRUP;
public prestacionesValidadas = [];
Expand Down Expand Up @@ -119,7 +122,8 @@ export class PrestacionEjecucionComponent implements OnInit, OnDestroy {
public ps: PlantillasService,
public ejecucionService: RupEjecucionService,
public constantesService: ConstantesService,
public recetaService: RecetaService
public recetaService: RecetaService,
private turnoService: TurnoService,
) { }

/**
Expand Down Expand Up @@ -250,6 +254,12 @@ export class PrestacionEjecucionComponent implements OnInit, OnDestroy {
}
}

if (this.prestacion.solicitud.turno) {
this.turnoService.get({ id: this.prestacion.solicitud.turno }).subscribe(turnos => {
this.turno = turnos?.[0]?.bloques?.[0]?.turnos?.[0];
});
}

this.ejecucionService.actualizar('inicializar');
}, (err) => {
if (err) {
Expand All @@ -274,6 +284,37 @@ export class PrestacionEjecucionComponent implements OnInit, OnDestroy {
});
}

onVideoConferencia() {
if (this.turno?.webexLinks?.professionalLink) {
const identificador = this.meetingId;
const link = this.turno.webexLinks.professionalLink;
const message = `
<div class="text-center">
<b>Datos de la videollamada:</b><br>
<b>Enlace:</b> <a href="${link}" target="_blank">${link}</a><br>
<b>Identificador:</b> ${identificador}
</div>
<br>
¿Desea iniciar la videollamada ahora?
`;

this.plex.confirm(message, 'Acceso a Teleconsulta').then((resultado) => {
if (resultado) {
window.open(link, '_blank');
}
});
}
}

get meetingId() {
const link = this.turno?.webexLinks?.professionalLink;
if (link) {
const parts = link.split('/');
return parts[parts.length - 1];
}
return null;
}

cargarPrestacionAsociada() {
this.servicioPrestacion.getByPaciente(this.paciente.id, false).subscribe(prestaciones => {
const validadas = prestaciones.filter(p => p.estados[p.estados.length - 1].tipo === 'validada');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
</plex-help>
</ng-container>

<plex-button *ngIf="activeIndex === 0 && turno?.videoConferencia" icon="monitor" type="success"
size="sm" title="Acceder a Teleconsulta" titlePosition="left"
(click)="onVideoConferencia()">

</plex-button>

<ng-container ngProjectAs="plex-button" *ngIf="activeIndex === 0">
<help-solicitud [solicitud]='prestacion.solicitud'></help-solicitud>
</ng-container>
Expand Down Expand Up @@ -141,7 +147,8 @@

<plex-button *ngIf="!existe(registro.concepto);" size="sm" type="danger"
icon="delete"
(click)="confirmarEliminarRegistro(registro, 'card')" [disabled]="!puedeEliminar(registro)">
(click)="confirmarEliminarRegistro(registro, 'card')"
[disabled]="!puedeEliminar(registro)">
</plex-button>
</div>
</div>
Expand Down Expand Up @@ -308,9 +315,9 @@
</plex-tab>

<plex-tab *ngIf="registro.tipo === 'laboratorio'" [allowClose]="true"
label="Informe de Laboratorio">
<vista-laboratorio [protocolo]="registro"></vista-laboratorio>
</plex-tab>
label="Informe de Laboratorio">
<vista-laboratorio [protocolo]="registro"></vista-laboratorio>
</plex-tab>

<plex-tab *ngIf="registro.tipo === 'receta'" color="receta" class="tab-receta"
[allowClose]="true" [label]="recetaService.getLabel(registro.data.recetas)">
Expand Down
Loading