Skip to content

Commit

Permalink
feat(HUDS): agrega filtros de CDAs para exportar
Browse files Browse the repository at this point in the history
  • Loading branch information
ma7payne committed Sep 20, 2023
1 parent cae32ee commit 7207568
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,23 @@
</plex-button>
</plex-title>
<plex-wrapper>
<plex-datetime grow="auto" label="Desde" name="fechaDesde" [(ngModel)]="fechaDesde"
[disabled]="hudsCompleta" required>
</plex-datetime>
<plex-datetime grow="auto" label="Hasta" name="fechaHasta" [(ngModel)]="fechaHasta"
[disabled]="hudsCompleta" required>
</plex-datetime>
<plex-bool grow="auto" name="hudsCompleta" [(ngModel)]="hudsCompleta" label="HUDS Completa"
type="slide">
</plex-bool>
<div class="d-flex align-items-end" grow="full">
<plex-datetime grow="auto" label="Desde" name="fechaDesde" [(ngModel)]="fechaDesde"
[disabled]="hudsCompleta" required>
</plex-datetime>
<plex-datetime grow="auto" label="Hasta" name="fechaHasta" [(ngModel)]="fechaHasta"
[disabled]="hudsCompleta" required>
</plex-datetime>
<plex-bool grow="auto" name="hudsCompleta" [(ngModel)]="hudsCompleta" label="HUDS Completa"
type="slide" (change)="cambiarHudsCompleta()">
</plex-bool>
</div>
<div class="d-flex mt-3 {{ hudsCompleta ? 'disabled': '' }}">
<plex-bool type="checkbox" name="alergia" [(ngModel)]="excluirVacunas" label="Excluir vacunas">
</plex-bool>
<plex-bool type="checkbox" name="alergia" [(ngModel)]="excluirLaboratorio" label="Excluir Laboratorios">
</plex-bool>
</div>
<plex-select grow="full" label="Prestaciones" name="prestacion" idField="conceptId"
[(ngModel)]="prestacion" tmPrestaciones [preload]="true">
</plex-select>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { ModalMotivoAccesoHudsService } from 'src/app/modules/rup/components/hud

@Component({
selector: 'app-exportar-huds',
templateUrl: './exportar-huds.component.html'
templateUrl: './exportar-huds.component.html',
})

export class ExportarHudsComponent implements OnInit {
Expand All @@ -25,6 +25,8 @@ export class ExportarHudsComponent implements OnInit {
public completed = [];
public pending = [];
public turnosPrestaciones = false;
public excluirVacunas;
public excluirLaboratorio;


constructor(
Expand Down Expand Up @@ -85,13 +87,19 @@ export class ExportarHudsComponent implements OnInit {
}

exportar() {
const excluye = [];

if (this.excluirLaboratorio) { excluye.push('4241000179101'); }
if (this.excluirVacunas) { excluye.push('33879002'); }

const params = {
pacienteId: this.pacienteSelected.id,
pacienteNombre: this.pacienteSelected.nombreCompleto,
tipoPrestacion: this.prestacion ? this.prestacion.conceptId : null,
fechaDesde: this.fechaDesde,
fechaHasta: this.fechaHasta,
hudsCompleta: this.hudsCompleta
hudsCompleta: this.hudsCompleta,
excluye
};
this.exportHudsService.peticionHuds(params).subscribe((res) => {
if (res) {
Expand All @@ -107,4 +115,9 @@ export class ExportarHudsComponent implements OnInit {
this.exportHudsService.hud$.next(data);
});
}

cambiarHudsCompleta() {
this.excluirLaboratorio = false;
this.excluirVacunas = false;
}
}

0 comments on commit 7207568

Please sign in to comment.