diff --git a/src/app/app-modules/nurse-doctor/case-sheet/general-case-sheet/doctor-diagnosis-case-sheet/doctor-diagnosis-case-sheet.component.ts b/src/app/app-modules/nurse-doctor/case-sheet/general-case-sheet/doctor-diagnosis-case-sheet/doctor-diagnosis-case-sheet.component.ts index 7c73f544..fe07f51e 100644 --- a/src/app/app-modules/nurse-doctor/case-sheet/general-case-sheet/doctor-diagnosis-case-sheet/doctor-diagnosis-case-sheet.component.ts +++ b/src/app/app-modules/nurse-doctor/case-sheet/general-case-sheet/doctor-diagnosis-case-sheet/doctor-diagnosis-case-sheet.component.ts @@ -571,7 +571,9 @@ export class DoctorDiagnosisCaseSheetComponent ].join('/'); } - this.downloadSign(); + if (this.casesheetData?.BeneficiaryData?.doctorSignatureFlag) { + this.downloadSign(); + } this.getVaccinationTypeAndDoseMaster(); } } diff --git a/src/app/app-modules/nurse-doctor/shared/services/doctor.service.ts b/src/app/app-modules/nurse-doctor/shared/services/doctor.service.ts index c3064f79..84200ab6 100644 --- a/src/app/app-modules/nurse-doctor/shared/services/doctor.service.ts +++ b/src/app/app-modules/nurse-doctor/shared/services/doctor.service.ts @@ -178,6 +178,7 @@ export class DoctorService { otherDetails: any, tcRequest: any, isSpecialist: any, + doctorSignatureFlag: any, ) { const serviceLineDetails: any = this.sessionstorage.getItem('serviceLineDetails'); @@ -232,6 +233,7 @@ export class DoctorService { createdBy: this.sessionstorage.getItem('userName'), tcRequest: tcRequest, isSpecialist: isSpecialist, + doctorSignatureFlag: doctorSignatureFlag, }; console.log( @@ -350,6 +352,7 @@ export class DoctorService { consultationData: any, tcRequest: any, isSpecialist: any, + doctorSignatureFlag: any, ) { const serviceLineDetails: any = this.sessionstorage.getItem('serviceLineDetails'); @@ -372,6 +375,7 @@ export class DoctorService { vanID: vanID, tcRequest: tcRequest, isSpecialist: isSpecialist, + doctorSignatureFlag: doctorSignatureFlag, }; const quickConsultation = Object.assign( {}, @@ -389,6 +393,7 @@ export class DoctorService { consultationData: any, tcRequest: any, isSpecialist: any, + doctorSignatureFlag: any, ) { const serviceLineDetails: any = this.sessionstorage.getItem('serviceLineDetails'); @@ -411,6 +416,7 @@ export class DoctorService { vanID: vanID, tcRequest: tcRequest, isSpecialist: isSpecialist, + doctorSignatureFlag: doctorSignatureFlag, }; const quickConsultation = Object.assign( {}, @@ -541,6 +547,7 @@ export class DoctorService { otherDetails: any, tcRequest: any, isSpecialist: any, + doctorSignatureFlag: any, ) { const serviceLineDetails: any = this.sessionstorage.getItem('serviceLineDetails'); @@ -593,6 +600,7 @@ export class DoctorService { createdBy: this.sessionstorage.getItem('userName'), tcRequest: tcRequest, isSpecialist: isSpecialist, + doctorSignatureFlag: doctorSignatureFlag, }; console.log( @@ -682,6 +690,7 @@ export class DoctorService { otherDetails: any, tcRequest: any, isSpecialist: any, + doctorSignatureFlag: any, ) { const serviceLineDetails: any = this.sessionstorage.getItem('serviceLineDetails'); @@ -744,6 +753,7 @@ export class DoctorService { createdBy: this.sessionstorage.getItem('userName'), tcRequest: tcRequest, isSpecialist: isSpecialist, + doctorSignatureFlag: doctorSignatureFlag, }; console.log( @@ -770,6 +780,7 @@ export class DoctorService { otherDetails: any, tcRequest: any, isSpecialist: any, + doctorSignatureFlag: any, ) { const serviceLineDetails: any = this.sessionstorage.getItem('serviceLineDetails'); @@ -824,6 +835,7 @@ export class DoctorService { createdBy: this.sessionstorage.getItem('userName'), tcRequest: tcRequest, isSpecialist: isSpecialist, + doctorSignatureFlag: doctorSignatureFlag, }; console.log( @@ -2358,6 +2370,7 @@ export class DoctorService { otherDetails: any, tcRequest: any, isSpecialist: any, + doctorSignatureFlag: any, ) { const serviceLineDetails: any = this.sessionstorage.getItem('serviceLineDetails'); @@ -2409,6 +2422,7 @@ export class DoctorService { createdBy: this.sessionstorage.getItem('userName'), tcRequest: tcRequest, isSpecialist: isSpecialist, + doctorSignatureFlag: doctorSignatureFlag, }; console.log( @@ -2655,6 +2669,7 @@ export class DoctorService { visitCategory: any, otherDetails: any, tcRequest: any, + doctorSignatureFlag: any, ): Observable { const serviceLineDetails: any = this.sessionstorage.getItem('serviceLineDetails'); @@ -2718,6 +2733,7 @@ export class DoctorService { createdBy: this.sessionstorage.getItem('userName'), tcRequest: tcRequest, isSpecialist: otherDetails.isSpecialist, + doctorSignatureFlag: doctorSignatureFlag, }; console.log( @@ -2772,6 +2788,7 @@ export class DoctorService { visitCategory: any, otherDetails: any, tcRequest: any, + doctorSignatureFlag: any, ) { const serviceLineDetails: any = this.sessionstorage.getItem('serviceLineDetails'); @@ -2829,6 +2846,7 @@ export class DoctorService { createdBy: this.sessionstorage.getItem('userName'), tcRequest: tcRequest, isSpecialist: otherDetails.isSpecialist, + doctorSignatureFlag: doctorSignatureFlag, }; console.log( @@ -3443,6 +3461,7 @@ export class DoctorService { otherDetails: any, tcRequest: any, isSpecialist: any, + doctorSignatureFlag: any, ) { const serviceLineDetails: any = this.sessionstorage.getItem('serviceLineDetails'); @@ -3503,6 +3522,7 @@ export class DoctorService { createdBy: this.sessionstorage.getItem('userName'), tcRequest: tcRequest, isSpecialist: isSpecialist, + doctorSignatureFlag: doctorSignatureFlag, }; console.log( @@ -3542,6 +3562,7 @@ export class DoctorService { otherDetails: any, tcRequest: any, isSpecialist: any, + doctorSignatureFlag: any, ) { const serviceLineDetails: any = this.sessionstorage.getItem('serviceLineDetails'); @@ -3604,6 +3625,7 @@ export class DoctorService { createdBy: this.sessionstorage.getItem('userName'), tcRequest: tcRequest, isSpecialist: isSpecialist, + doctorSignatureFlag: doctorSignatureFlag, }; console.log( @@ -3622,6 +3644,7 @@ export class DoctorService { otherDetails: any, tcRequest: any, isSpecialist: any, + doctorSignatureFlag: any, ) { const serviceLineDetails: any = this.sessionstorage.getItem('serviceLineDetails'); @@ -3684,6 +3707,7 @@ export class DoctorService { createdBy: this.sessionstorage.getItem('userName'), tcRequest: tcRequest, isSpecialist: isSpecialist, + doctorSignatureFlag: doctorSignatureFlag, }; console.log( @@ -3703,6 +3727,7 @@ export class DoctorService { visitCategory: any, otherDetails: any, tcRequest: any, + doctorSignatureFlag: any, ): Observable { const serviceLineDetails: any = this.sessionstorage.getItem('serviceLineDetails'); @@ -3765,6 +3790,7 @@ export class DoctorService { createdBy: this.sessionstorage.getItem('userName'), tcRequest: tcRequest, isSpecialist: otherDetails.isSpecialist, + doctorSignatureFlag: doctorSignatureFlag, }; console.log( @@ -3783,6 +3809,7 @@ export class DoctorService { visitCategory: any, otherDetails: any, tcRequest: any, + doctorSignatureFlag: any, ) { const serviceLineDetails: any = this.sessionstorage.getItem('serviceLineDetails'); @@ -3845,6 +3872,7 @@ export class DoctorService { createdBy: this.sessionstorage.getItem('userName'), tcRequest: tcRequest, isSpecialist: otherDetails.isSpecialist, + doctorSignatureFlag: doctorSignatureFlag, }; console.log( @@ -3973,4 +4001,8 @@ export class DoctorService { getAssessmentDet(assessmentId: any) { return this.http.get(environment.getAssessmentUrl + '/' + assessmentId); } + + checkUsersignatureExist(userID: any) { + return this.http.get(environment.checkUsersignExistUrl + userID); + } } diff --git a/src/app/app-modules/nurse-doctor/workarea/workarea.component.ts b/src/app/app-modules/nurse-doctor/workarea/workarea.component.ts index ede188e4..9f7b321b 100644 --- a/src/app/app-modules/nurse-doctor/workarea/workarea.component.ts +++ b/src/app/app-modules/nurse-doctor/workarea/workarea.component.ts @@ -202,6 +202,7 @@ export class WorkareaComponent patientQuickConsultForm!: FormGroup; abdmFacilityId: any; abdmFacilityName: any; + doctorSignatureFlag = false; constructor( private router: Router, @@ -329,7 +330,16 @@ export class WorkareaComponent this.enableUpdateButtonOnDoctorInteraction(); this.enableUpdateButtonFamilyPlanning(); this.enableUpdateButtonBirthImmunizationHistory(); + + this.doctorService + .checkUsersignatureExist(this.sessionstorage.getItem('userID')) + .subscribe((res: any) => { + if (res.statusCode === 200 && res.data !== null) { + this.doctorSignatureFlag = res.data.signStatus; + } + }); } + setVitalsUpdateButtonValue() { this.enableVitalsButtonSubscription = this.doctorService.enableVitalsUpdateButton$.subscribe((response) => @@ -1666,9 +1676,11 @@ export class WorkareaComponent temp, ); } + submitDoctorDiagnosisForm() { this.disableSubmitButton = true; this.showProgressBar = true; + if (this.visitCategory === 'General OPD (QC)') this.submitQuickConsultDiagnosisForm(); @@ -1701,6 +1713,7 @@ export class WorkareaComponent this.submitChildAndAdolescentServiceDiagnosis(); } } + submitNCDScreeningDiagnosisForm() { if (this.checkNCDScreeningRequiredData(this.patientMedicalForm)) { const temp = { @@ -1718,6 +1731,7 @@ export class WorkareaComponent temp, this.schedulerData, this.isSpecialist, + this.doctorSignatureFlag, ) .subscribe( (res: any) => { @@ -1779,6 +1793,7 @@ export class WorkareaComponent temp, this.schedulerData, this.isSpecialist, + this.doctorSignatureFlag, ) .subscribe( (res: any) => { @@ -1818,6 +1833,7 @@ export class WorkareaComponent temp, this.schedulerData, this.isSpecialist, + this.doctorSignatureFlag, ) .subscribe( (res: any) => { @@ -1841,7 +1857,6 @@ export class WorkareaComponent } submitChildAndAdolescentServiceDiagnosis() { - console.log('patientMedicalForm', this.patientMedicalForm); if (this.checkNurseRequirements(this.patientMedicalForm)) { const temp = { beneficiaryRegID: this.beneficiaryRegID, @@ -1858,6 +1873,7 @@ export class WorkareaComponent temp, this.schedulerData, this.isSpecialist, + this.doctorSignatureFlag, ) .subscribe( (res: any) => { @@ -1927,6 +1943,7 @@ export class WorkareaComponent visitCategory, otherDetails, this.schedulerData, + this.doctorSignatureFlag, ) .subscribe( (res: any) => { @@ -1998,6 +2015,7 @@ export class WorkareaComponent visitCategory, otherDetails, this.schedulerData, + this.doctorSignatureFlag, ) .subscribe( (res: any) => { @@ -2056,6 +2074,7 @@ export class WorkareaComponent visitCategory, otherDetails, this.schedulerData, + this.doctorSignatureFlag, ) .subscribe( (res: any) => { @@ -2114,6 +2133,7 @@ export class WorkareaComponent visitCategory, otherDetails, this.schedulerData, + this.doctorSignatureFlag, ) .subscribe( (res: any) => { @@ -2169,6 +2189,7 @@ export class WorkareaComponent visitCategory, otherDetails, this.schedulerData, + this.doctorSignatureFlag, ) .subscribe( (res: any) => { @@ -3795,6 +3816,7 @@ export class WorkareaComponent { quickConsultation: patientQuickConsultFormValue }, this.schedulerData, this.isSpecialist, + this.doctorSignatureFlag, ) .subscribe( (res: any) => { @@ -3857,6 +3879,7 @@ export class WorkareaComponent { quickConsultation: patientQuickConsultDetails }, this.schedulerData, this.isSpecialist, + this.doctorSignatureFlag, ) .subscribe( (res: any) => { @@ -4022,6 +4045,7 @@ export class WorkareaComponent temp, this.schedulerData, this.isSpecialist, + this.doctorSignatureFlag, ) .subscribe( (res: any) => { @@ -4230,6 +4254,7 @@ export class WorkareaComponent temp, this.schedulerData, this.isSpecialist, + this.doctorSignatureFlag, ) .subscribe( (res: any) => { @@ -4525,6 +4550,7 @@ export class WorkareaComponent temp, this.schedulerData, this.isSpecialist, + this.doctorSignatureFlag, ) .subscribe( (res: any) => { @@ -4567,6 +4593,7 @@ export class WorkareaComponent temp, this.schedulerData, this.isSpecialist, + this.doctorSignatureFlag, ) .subscribe( (res: any) => { diff --git a/src/environments/environment.ci.ts.template b/src/environments/environment.ci.ts.template index 64428ec8..a375eefd 100644 --- a/src/environments/environment.ci.ts.template +++ b/src/environments/environment.ci.ts.template @@ -545,5 +545,7 @@ export const environment = { enableCaptcha: enableCaptcha, getUserId: `${COMMON_API}user/userName/`, + checkUsersignExistUrl: `${ADMIN_API}signature1/signexist/`, + };