Skip to content

Commit

Permalink
POC-155: Family testing module does not display elicited contacts on …
Browse files Browse the repository at this point in the history
…the form
  • Loading branch information
Alfred-Mutai committed Jul 19, 2024
1 parent 0e41563 commit 618892d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/app/etl-api/family-testing-resource.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export class FamilyTestingService {
isFamilyTestingEncounter: boolean
) {
const familyTestingEncounterTypeUuid = isFamilyTestingEncounter
? '975ae894-7660-4224-b777-468c2e710a2a'
? '3fbc8512-b37b-4bc2-a0f4-8d0ac7955127'
: '5a58f6f5-f5a6-47eb-a644-626abd83f83b';
return this.http.get(
`${this.amrsUrl()}encounter?patient=${patientUuid}&encounterType=${familyTestingEncounterTypeUuid}`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,19 +134,20 @@ export class PatientBannerComponent implements OnInit, OnDestroy, OnChanges {
}
});

if (!this.isFamilyTestingEncounter) {
this.familyTestingService
.getPatientEncounters(this.patient.uuid, false)
.subscribe((response: any) => {
if (response.results && response.results.length > 0) {
this.familyTestingEncounterUuid = _.first<any>(
response.results
);
}
});
}

this.getPatientEncounters(this.isFamilyTestingEncounter);
setTimeout(async () => {
if (!this.isFamilyTestingEncounter) {
this.familyTestingService
.getPatientEncounters(this.patient.uuid, false)
.subscribe((response: any) => {
if (response.results && response.results.length > 0) {
this.familyTestingEncounterUuid = _.first<any>(
response.results
);
}
});
}
this.getPatientEncounters(this.isFamilyTestingEncounter);
}, 4000);
} else {
this.searchIdentifiers = undefined;
this.birthdate = undefined;
Expand Down Expand Up @@ -368,7 +369,6 @@ export class PatientBannerComponent implements OnInit, OnDestroy, OnChanges {
this.displayContacts = false;
}
public updateContacts() {
console.log('this.patient.uuid ', this.patient.uuid);
const encounterUuid = _.first(this.patientEncounters).uuid;
const familyPartnerHistoryForm = `3fbc8512-b37b-4bc2-a0f4-8d0ac7955127`;
const url = `/patient-dashboard/patient/${this.patient.uuid}/general/general/formentry/${familyPartnerHistoryForm}`;
Expand Down

0 comments on commit 618892d

Please sign in to comment.