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
Original file line number Diff line number Diff line change
Expand Up @@ -577,20 +577,19 @@ export class DoctorDiagnosisCaseSheetComponent
return len > 0 ? new Array(len).join('0') + this : this;
}
downloadSign() {
if (this.beneficiaryDetails && this.beneficiaryDetails.tCSpecialistUserID) {
const tCSpecialistUserID = this.beneficiaryDetails.tCSpecialistUserID;
this.doctorService.downloadSign(tCSpecialistUserID).subscribe(
(response: any) => {
const blob = new Blob([response], { type: response.type });
this.showSign(blob);
},
(err: any) => {
console.log('error');
},
);
} else {
console.log('No tCSpecialistUserID found');
}
const userId =
this.beneficiaryDetails?.tCSpecialistUserID ??
this.sessionstorage.getItem('userID');

this.doctorService.downloadSign(userId).subscribe(
(response: any) => {
const blob = new Blob([response], { type: response.type });
this.showSign(blob);
},
(err: any) => {
console.error('Error downloading signature:', err);
},
);
}
showSign(blob: any) {
const reader = new FileReader();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3015,9 +3015,9 @@ export class DoctorService {
}
/* Doctor Signature download */
downloadSign(userID: any) {
return this.http
.get(environment.downloadSignUrl + userID, { responseType: 'blob' })
.pipe(map((res: any) => <Blob>res.blob()));
return this.http.get(environment.downloadSignUrl + userID, {
responseType: 'blob' as 'json',
});
}
getIDRSDetails(beneficiaryID: string, visitID: string): Observable<any> {
const visitCategory = this.sessionstorage.getItem('visitCategory');
Expand Down