Skip to content

Commit

Permalink
feat(ficha-epidemio): vacunas
Browse files Browse the repository at this point in the history
  • Loading branch information
Pancho authored and sychus committed May 11, 2021
1 parent 6685836 commit c0e549a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@
[label]="field.label?field.label:field.key" grow="auto"
name="{{ field.key }}" [(ngModel)]="seccion.fields[field.key]"
[readonly]="!editFicha"
(change)="clearDependencias($event,'antecedentesEpidemiologicos',['vacunacionestado','fechadosis','nombrevacunacovid'])">
(change)="getVacunas(); clearDependencias($event,'antecedentesEpidemiologicos',['vacunacionestado','fechadosis','nombrevacunacovid'])">
</plex-bool>
<plex-select *ngIf="field.key==='vacunacionestado' && seccion.fields['vacunacioncovid']"
[label]="field.label?field.label:field.key" grow="auto"
Expand All @@ -407,11 +407,12 @@
name="{{ field.key }}" [(ngModel)]="seccion.fields[field.key]"
[required]="field.required" [readonly]="!editFicha">
</plex-datetime>
<plex-text *ngIf="field.key==='nombrevacunacovid' && seccion.fields['vacunacioncovid']"
[label]="field.label?field.label:field.key" grow="auto"
name="{{ field.key }}" [(ngModel)]="seccion.fields[field.key]"
[required]="field.required" [readonly]="!editFicha">
</plex-text>
<plex-select *ngIf="field.key==='nombrevacunacovid' && seccion.fields['vacunacioncovid']"
[label]="field.label?field.label:field.key" grow="auto"
name="{{ field.key }}" [(ngModel)]="seccion.fields[field.key]"
[required]="field.required" labelField="nombre" idField="_id"
[data]="vacunas$ | async" [readonly]="!editFicha">
</plex-select>
<plex-bool *ngIf="field.key==='sospechosoconantecedente'"
[label]="field.label?field.label:field.key" grow="auto"
name="{{ field.key }}" [(ngModel)]="seccion.fields[field.key]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { catchError, switchMap } from 'rxjs/operators';
import { PaisService } from 'src/app/services/pais.service';
import { map } from 'rxjs/operators';
import { NgForm } from '@angular/forms';
import { VacunasService } from 'src/app/services/vacunas.service';


@Component({
Expand Down Expand Up @@ -58,7 +59,7 @@ export class FichaEpidemiologicaCrudComponent implements OnInit, OnChanges {
];
public tipoInstitucion = [
{ id: 'residencia', nombre: 'Residencia de larga estadía' },
{ id: 'hogarMenores', nombre: 'Hogar de menores' },
{ id: 'hogarMenores', nombre: 'Hogar de niños, niñas y adolescentes' },
{ id: 'carcel', nombre: 'Carcel' }
];
public clasificacion = [
Expand Down Expand Up @@ -178,6 +179,7 @@ export class FichaEpidemiologicaCrudComponent implements OnInit, OnChanges {
public residencias$: Observable<any>;
public paises$: Observable<any>;
public organizacionesInternacion$: Observable<any>;
public vacunas$: Observable<any>;
public estaInternado = false;

constructor(
Expand All @@ -194,6 +196,7 @@ export class FichaEpidemiologicaCrudComponent implements OnInit, OnChanges {
public serviceInstitucion: InstitucionService,
public serviceHistory: FormsHistoryService,
private paisService: PaisService,
private vacunasService: VacunasService

) { }

Expand Down Expand Up @@ -325,7 +328,6 @@ export class FichaEpidemiologicaCrudComponent implements OnInit, OnChanges {
apellido: this.paciente.apellido,
fechaNacimiento: this.paciente.fechaNacimiento,
sexo: this.paciente.sexo,
genero: this.paciente.sexo,
estado: this.paciente.estado
},
zonaSanitaria: this.zonaSanitaria
Expand Down Expand Up @@ -589,4 +591,8 @@ export class FichaEpidemiologicaCrudComponent implements OnInit, OnChanges {
this.residencias$ = this.serviceInstitucion.get({ tipo: 'Residencia' });
}
}

getVacunas() {
this.vacunas$ = this.vacunasService.getNomivacVacunas({});
}
}

0 comments on commit c0e549a

Please sign in to comment.