diff --git a/Common-UI b/Common-UI
index c15097e..d0d8d3b 160000
--- a/Common-UI
+++ b/Common-UI
@@ -1 +1 @@
-Subproject commit c15097e1698669ecb8310e6d65ef9a42b373dd0a
+Subproject commit d0d8d3b75a7813ac54eba59a02eb05e7d2c953fb
diff --git a/src/app/app-modules/core/components/common-dialog/common-dialog.component.html b/src/app/app-modules/core/components/common-dialog/common-dialog.component.html
index c467962..480befb 100644
--- a/src/app/app-modules/core/components/common-dialog/common-dialog.component.html
+++ b/src/app/app-modules/core/components/common-dialog/common-dialog.component.html
@@ -48,7 +48,12 @@
{{ message }}
-
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 865e31b..c9748b3 100644
--- a/src/app/app-modules/nurse-doctor/workarea/workarea.component.ts
+++ b/src/app/app-modules/nurse-doctor/workarea/workarea.component.ts
@@ -49,7 +49,6 @@ import {
import { CanComponentDeactivate } from '../../core/services/can-deactivate-guard.service';
import { SpecialistLoginComponent } from '../../core/components/specialist-login/specialist-login.component';
import { IdrsscoreService } from '../shared/services/idrsscore.service';
-import { RegistrarService } from '../../registrar/shared/services/registrar.service';
import { Observable, Subscription, of } from 'rxjs';
import { HttpServiceService } from '../../core/services/http-service.service';
import { MatSnackBar, MatSnackBarRef } from '@angular/material/snack-bar';
@@ -59,6 +58,7 @@ import { environment } from 'src/environments/environment';
import { HealthIdDisplayModalComponent } from '../../core/components/health-id-display-modal/health-id-display-modal.component';
import { OpenPreviousVisitDetailsComponent } from '../../core/components/open-previous-visit-details/open-previous-visit-details.component';
import { SchedulerComponent } from '../scheduler/scheduler.component';
+import { RegistrarService } from 'Common-UI/src/registrar/services/registrar.service';
@Component({
selector: 'app-workarea',
@@ -178,6 +178,8 @@ export class WorkareaComponent
isDoctorUpdate = false;
isDoctorSave = false;
serviceType: any;
+ abdmFacilityId = null;
+ abdmFacilityName = null;
ngOnInit() {
this.enableUpdateButtonInVitals = false;
this.enableCovidVaccinationSaveButton = false;
@@ -3221,6 +3223,7 @@ export class WorkareaComponent
}
/* Fetch health ID detaiuls to link the visit */
getHealthIDDetails(successResponseFromAPI: any) {
+ this.getMappedAbdmFacility();
this.confirmationService
.confirm(
'info',
@@ -3237,6 +3240,61 @@ export class WorkareaComponent
}
});
}
+
+ getMappedAbdmFacility() {
+ const locationData: any = localStorage.getItem('loginDataResponse');
+ const jsonLoccationData = JSON.parse(locationData);
+ let workLocationId: any;
+ if (jsonLoccationData?.previlegeObj[0]?.roles) {
+ const roles = jsonLoccationData?.previlegeObj[0]?.roles;
+ roles.find((item: any) => {
+ item.RoleName.toLowerCase() === 'doctor';
+ workLocationId = item.workingLocationID;
+ });
+ }
+ console.log('workLocationId', workLocationId);
+ this.registrarService.getMappedFacility(workLocationId).subscribe(
+ (res: any) => {
+ if (res.statusCode === 200 && res.data !== null) {
+ const data = res.data;
+ if (data.abdmFacilityID && data.abdmFacilityName) {
+ this.abdmFacilityId = data.abdmFacilityID;
+ this.abdmFacilityName = data.abdmFacilityName;
+ this.saveAbdmFacilityForVisit();
+ }
+ } else {
+ this.confirmationService.confirm(res.errorMessage, 'info');
+ this.abdmFacilityId = null;
+ this.abdmFacilityName = null;
+ this.saveAbdmFacilityForVisit();
+ }
+ },
+ (err: any) => {
+ this.confirmationService.alert(err.errorMessage, 'error');
+ this.saveAbdmFacilityForVisit();
+ },
+ );
+ }
+
+ saveAbdmFacilityForVisit() {
+ const reqObj = {
+ visitCode: localStorage.getItem('visitCode'),
+ abdmFacilityId: this.abdmFacilityId,
+ };
+ this.registrarService.saveAbdmFacilityForVisit(reqObj).subscribe(
+ (res: any) => {
+ if (res.statusCode === 200) {
+ console.log('Abdm saved successfully');
+ } else {
+ this.confirmationService.alert(res.errorMessage, 'error');
+ }
+ },
+ (err: any) => {
+ this.confirmationService.alert(err.errorMessage, 'error');
+ },
+ );
+ }
+
fetchHealthIDDetailsOnConfirmation() {
const data = {
beneficiaryID: this.beneficiary.beneficiaryID,
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index 80e7030..f902158 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -31,6 +31,8 @@ import { RegistrarModule } from './app-modules/registrar/registrar.module';
import { NgFor } from '@angular/common';
import { AudioRecordingService } from './app-modules/nurse-doctor/shared/services/audio-recording.service';
import { SharedModule } from './app-modules/core/components/shared/shared.module';
+import { RegistrarService } from 'Common-UI/src/registrar/services/registrar.service';
+import { RegistrationModule } from 'Common-UI/src/registrar/registration.module';
@NgModule({
declarations: [
@@ -58,10 +60,10 @@ import { SharedModule } from './app-modules/core/components/shared/shared.module
MatTooltipModule,
MatFormFieldModule,
NgFor,
- RegistrarModule,
CoreModule.forRoot(),
BrowserAnimationsModule,
SharedModule,
+ RegistrationModule,
],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
providers: [
@@ -74,6 +76,7 @@ import { SharedModule } from './app-modules/core/components/shared/shared.module
useClass: HttpInterceptorService,
multi: true,
},
+ RegistrarService,
],
bootstrap: [AppComponent],
})
diff --git a/src/assets/Assamese.json b/src/assets/Assamese.json
index 8773459..ba7c38e 100644
--- a/src/assets/Assamese.json
+++ b/src/assets/Assamese.json
@@ -1712,6 +1712,21 @@
"beneficaryConsent":"Beneficiary Consent",
"consentFormText": "To provide you with better service, we would,request your personal information. The information that you will providewill be kept confidential and will only be used for research and analysis.",
"mobile":"Mobile",
- "noRecordsFound":"No Records Found"
+ "noRecordsFound":"No Records Found",
+ "enterMobileNumberToBeLinkedWithAbha": "Enter Phone number to be linked with ABHA",
+ "doYouWantToVerifyMobileOtpForAbha": "Your provided mobile number is not linked with Aadhaar, Do you want to verify it?",
+ "abhaCardAlreadyExists": "ABHA already exists for the Aadhaar Number",
+ "enterABHANumberOrAadhar": "Enter Aadhaar Number Or ABHA Number Or ABHA Address",
+ "enterABHANumberOrMobile": "Enter Mobile Number Or ABHA Number Or ABHA Address",
+ "enterCorrectAuthIdForAuthMode": "Please Enter correct Authentication ID for choosen AuthMode",
+ "abhaAddressFound" : "ABHA Address Found:",
+ "searchAndDownloadAbha": "Search and Download ABHA",
+ "abhaSearchMode": "ABHA Search Mode*",
+ "verifyAbha": "Verify ABHA",
+ "issueInAbhaCard": "Issue in printing ABHA Card",
+ "fileUploadedSuccessfully": "File Uploaded successfully",
+ "verifyMobileOtp": "Verify Mobile OTP",
+ "enterMobileOtp": "Enter Mobile OTP",
+ "verify": "Verify"
}
}
diff --git a/src/assets/English.json b/src/assets/English.json
index 23cd35c..786b7ac 100644
--- a/src/assets/English.json
+++ b/src/assets/English.json
@@ -1719,8 +1719,22 @@
"beneficaryConsent":"Beneficiary Consent",
"consentFormText": "To provide you with better service, we would,request your personal information. The information that you will providewill be kept confidential and will only be used for research and analysis.",
"mobile":"Mobile",
- "noRecordsFound":"No Records Found"
-
+ "noRecordsFound":"No Records Found",
+ "enterMobileNumberToBeLinkedWithAbha": "Enter Phone number to be linked with ABHA",
+ "doYouWantToVerifyMobileOtpForAbha": "Your provided mobile number is not linked with Aadhaar, Do you want to verify it?",
+ "abhaCardAlreadyExists": "ABHA already exists for the Aadhaar Number",
+ "enterABHANumberOrAadhar": "Enter Aadhaar Number Or ABHA Number Or ABHA Address",
+ "enterABHANumberOrMobile": "Enter Mobile Number Or ABHA Number Or ABHA Address",
+ "enterCorrectAuthIdForAuthMode": "Please Enter correct Authentication ID for choosen AuthMode",
+ "abhaAddressFound" : "ABHA Address Found:",
+ "searchAndDownloadAbha": "Search and Download ABHA",
+ "abhaSearchMode": "ABHA Search Mode*",
+ "verifyAbha": "Verify ABHA",
+ "issueInAbhaCard": "Issue in printing ABHA Card",
+ "fileUploadedSuccessfully": "File Uploaded successfully",
+ "verifyMobileOtp": "Verify Mobile OTP",
+ "enterMobileOtp": "Enter Mobile OTP",
+ "verify": "Verify"
}
}
\ No newline at end of file
diff --git a/src/assets/Hindi.json b/src/assets/Hindi.json
index 989b392..2a8094f 100644
--- a/src/assets/Hindi.json
+++ b/src/assets/Hindi.json
@@ -1715,7 +1715,21 @@
"beneficaryConsent":"Beneficiary Consent",
"consentFormText": "To provide you with better service, we would,request your personal information. The information that you will providewill be kept confidential and will only be used for research and analysis.",
"mobile":"Mobile",
- "noRecordsFound":"No Records Found"
-
+ "noRecordsFound":"No Records Found",
+ "enterMobileNumberToBeLinkedWithAbha": "Enter Phone number to be linked with ABHA",
+ "doYouWantToVerifyMobileOtpForAbha": "Your provided mobile number is not linked with Aadhaar, Do you want to verify it?",
+ "abhaCardAlreadyExists": "ABHA already exists for the Aadhaar Number",
+ "enterABHANumberOrAadhar": "Enter Aadhaar Number Or ABHA Number Or ABHA Address",
+ "enterABHANumberOrMobile": "Enter Mobile Number Or ABHA Number Or ABHA Address",
+ "enterCorrectAuthIdForAuthMode": "Please Enter correct Authentication ID for choosen AuthMode",
+ "abhaAddressFound" : "ABHA Address Found:",
+ "searchAndDownloadAbha": "Search and Download ABHA",
+ "abhaSearchMode": "ABHA Search Mode*",
+ "verifyAbha": "Verify ABHA",
+ "issueInAbhaCard": "Issue in printing ABHA Card",
+ "fileUploadedSuccessfully": "File Uploaded successfully",
+ "verifyMobileOtp": "Verify Mobile OTP",
+ "enterMobileOtp": "Enter Mobile OTP",
+ "verify": "Verify"
}
}
diff --git a/src/environments/environment.dev.ts b/src/environments/environment.dev.ts
index ddf4255..07b610e 100644
--- a/src/environments/environment.dev.ts
+++ b/src/environments/environment.dev.ts
@@ -66,7 +66,7 @@ export const environment = {
RBSTest: `RBS Test`,
visualAcuityTest: `Visual Acuity Test`,
haemoglobinTest: `Haemoglobin Test`,
- abhaExtension: `@abdm`,
+ abhaExtension: `@sbx`,
parentAPI: `${TM_API}`,
INVENTORY_URL: `${inventoryUI_IP}/inventory/#/redirin?`,
diff --git a/src/environments/environment.development.ts b/src/environments/environment.development.ts
index ddf4255..07b610e 100644
--- a/src/environments/environment.development.ts
+++ b/src/environments/environment.development.ts
@@ -66,7 +66,7 @@ export const environment = {
RBSTest: `RBS Test`,
visualAcuityTest: `Visual Acuity Test`,
haemoglobinTest: `Haemoglobin Test`,
- abhaExtension: `@abdm`,
+ abhaExtension: `@sbx`,
parentAPI: `${TM_API}`,
INVENTORY_URL: `${inventoryUI_IP}/inventory/#/redirin?`,
diff --git a/src/environments/environment.ts b/src/environments/environment.ts
index a7d618f..8c246ab 100644
--- a/src/environments/environment.ts
+++ b/src/environments/environment.ts
@@ -69,7 +69,7 @@ export const environment = {
RBSTest: `RBS Test`,
visualAcuityTest: `Visual Acuity Test`,
haemoglobinTest: `Hemoglobin Test`,
- abhaExtension: `@abdm`,
+ abhaExtension: `@sbx`,
parentAPI: `${TM_API}`,