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
9 changes: 9 additions & 0 deletions src/app/modules/com/components/punto-inicio.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ export class ComPuntoInicioComponent implements OnInit {
public fechaDesde;
public fechaHasta;
public hoy = new Date();
public rangoEtario: any;
public opcionesRangoEtario = [
{ id: 'pediatrico', nombre: 'Pediátrico' },
{ id: 'adultos', nombre: 'Adolescentes y Adultos' }
];

constructor(
private derivacionesService: DerivacionesService,
Expand Down Expand Up @@ -159,6 +164,9 @@ export class ComPuntoInicioComponent implements OnInit {
if (this.paciente) {
query.paciente = `^${this.paciente}`;
}
if (this.rangoEtario) {
query.rangoEtario = this.rangoEtario.id;
}

let rangoFecha;
let desde;
Expand Down Expand Up @@ -237,6 +245,7 @@ export class ComPuntoInicioComponent implements OnInit {
this.organizacionOrigen = null;
this.organizacionDestino = null;
this.paciente = null;
this.rangoEtario = null;
this.tabIndex = index;
this.ocultarSidebars();
this.cargarDerivaciones();
Expand Down
10 changes: 8 additions & 2 deletions src/app/modules/com/components/punto-inicio.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
</plex-select>
<plex-text [(ngModel)]="paciente" name="paciente" (change)="cargarDerivaciones()"
label="Buscar paciente" debounce="400"></plex-text>
<plex-select [(ngModel)]="rangoEtario" name="rangoEtario" [data]="opcionesRangoEtario"
label="Rango Etario" placeholder="Todos" (change)="cargarDerivaciones()">
</plex-select>
<plex-select [(ngModel)]="estado" (change)="cargarDerivaciones()" [data]="estados" name="estado"
label="Estado">
</plex-select>
Expand Down Expand Up @@ -134,6 +137,9 @@
</plex-select>
<plex-text [(ngModel)]="paciente" name="paciente" (change)="cargarDerivaciones()"
label="Buscar paciente" debounce="400"></plex-text>
<plex-select [(ngModel)]="rangoEtario" name="rangoEtario" [data]="opcionesRangoEtario"
label="Rango Etario" placeholder="Todos" (change)="cargarDerivaciones()">
</plex-select>
<plex-select [(ngModel)]="estado" (change)="cargarDerivaciones()" [data]="estados" name="estado"
label="Estado">
</plex-select>
Expand Down Expand Up @@ -197,11 +203,11 @@
<div>
<plex-label *ngIf="derivacion.prioridad && esCOM"
titulo="{{ derivacion.paciente | nombre }}"
subtitulo="{{ derivacion | documento }}">
subtitulo="{{ derivacion.paciente | documento }}">
</plex-label>
<plex-label *ngIf="!esCOM || !derivacion.prioridad"
titulo="{{ derivacion.paciente | nombre }}"
subtitulo="{{ derivacion | documento }}">
subtitulo="{{ derivacion.paciente | documento }}">
</plex-label>
</div>
<plex-button *ngIf="derivacion.estado === 'solicitada'" type="danger" size="sm"
Expand Down