Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HUDS - Agrega filtro de CDAs al exportar HUDS #2919

Merged
merged 1 commit into from
Oct 18, 2023
Merged
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 @@ -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;
}
}
Loading