diff --git a/src/app/app-modules/core/components/app-header/app-header.component.css b/src/app/app-modules/core/components/app-header/app-header.component.css index fa07879..cdacbb8 100644 --- a/src/app/app-modules/core/components/app-header/app-header.component.css +++ b/src/app/app-modules/core/components/app-header/app-header.component.css @@ -159,6 +159,12 @@ button.mat-button { } } +@media (min-width: 1200px) { + .hidden-lg { + display: inline-block !important; + } + } + /* ul li { border-radius: 30px; background-color: white !important; diff --git a/src/app/app-modules/nurse-doctor/case-sheet/general-case-sheet/doctor-diagnosis-case-sheet/doctor-diagnosis-case-sheet.component.html b/src/app/app-modules/nurse-doctor/case-sheet/general-case-sheet/doctor-diagnosis-case-sheet/doctor-diagnosis-case-sheet.component.html index d583a3a..7262824 100644 --- a/src/app/app-modules/nurse-doctor/case-sheet/general-case-sheet/doctor-diagnosis-case-sheet/doctor-diagnosis-case-sheet.component.html +++ b/src/app/app-modules/nurse-doctor/case-sheet/general-case-sheet/doctor-diagnosis-case-sheet/doctor-diagnosis-case-sheet.component.html @@ -370,8 +370,8 @@

{{current_language_set?.casesheet?.chiefComplaint}}:

-
-
+
+
{{current_language_set?.cdss}}: 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 b356c90..bb18496 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 @@ -28,6 +28,7 @@ import { SetLanguageComponent } from 'app/app-modules/core/components/set-langua import { MasterdataService } from 'app/app-modules/nurse-doctor/shared/services/masterdata.service'; import { environment } from 'environments/environment'; import { NurseService } from 'app/app-modules/nurse-doctor/shared/services'; +import { CDSSService } from 'app/app-modules/nurse-doctor/shared/services/cdss-service'; @Component({ selector: 'app-doctor-diagnosis-case-sheet', @@ -123,7 +124,8 @@ export class DoctorDiagnosisCaseSheetComponent implements OnInit { private registrarService: RegistrarService, private confirmationService: ConfirmationService, private masterdataService: MasterdataService, - private nurseService: NurseService + private nurseService: NurseService, + public cdssService: CDSSService ) { } ngOnInit() { @@ -450,8 +452,10 @@ export class DoctorDiagnosisCaseSheetComponent implements OnInit { this.casesheetData.nurseData.cdss.presentChiefComplaint.presentChiefComplaint !== null) )){ this.cdssFormDetails = this.casesheetData.nurseData.cdss; this.isCdssStatus = true; + this.cdssService.isCdssStatusForEnabling(true); }else{ this.isCdssStatus = false; + this.cdssService.isCdssStatusForEnabling(false); } this.downloadSign(); diff --git a/src/app/app-modules/nurse-doctor/case-sheet/general-case-sheet/general-case-sheet.component.ts b/src/app/app-modules/nurse-doctor/case-sheet/general-case-sheet/general-case-sheet.component.ts index 532091d..7763984 100644 --- a/src/app/app-modules/nurse-doctor/case-sheet/general-case-sheet/general-case-sheet.component.ts +++ b/src/app/app-modules/nurse-doctor/case-sheet/general-case-sheet/general-case-sheet.component.ts @@ -65,7 +65,8 @@ export class GeneralCaseSheetComponent implements OnInit { caseSheetVisitDetails: true, caseSheetTreatmentOnSideEffects: true, caseSheetCounsellingProvided: true, - caseSheetNeonatalAndInfant: true + caseSheetNeonatalAndInfant: true, + caseSheetCdss:true } current_language_set: any; @@ -220,6 +221,7 @@ export class GeneralCaseSheetComponent implements OnInit { this.printPagePreviewSelect.caseSheetTreatmentOnSideEffects = result.caseSheetTreatmentOnSideEffects; this.printPagePreviewSelect.caseSheetCounsellingProvided = result.caseSheetCounsellingProvided; this.printPagePreviewSelect.caseSheetNeonatalAndInfant = result.caseSheetNeonatalAndInfant; + this.printPagePreviewSelect.caseSheetCdss = result.caseSheetCdss; } }); } diff --git a/src/app/app-modules/nurse-doctor/print-page-select/print-page-select.component.html b/src/app/app-modules/nurse-doctor/print-page-select/print-page-select.component.html index 16922fc..10d8638 100644 --- a/src/app/app-modules/nurse-doctor/print-page-select/print-page-select.component.html +++ b/src/app/app-modules/nurse-doctor/print-page-select/print-page-select.component.html @@ -15,6 +15,9 @@

{{currentLanguageSet?.common?.selectPrintPage}}

{{currentLanguageSet?.historyData.history}}
+
+ {{currentLanguageSet?.cdss}} +
{{currentLanguageSet?.ExaminationData.examination}}
diff --git a/src/app/app-modules/nurse-doctor/print-page-select/print-page-select.component.ts b/src/app/app-modules/nurse-doctor/print-page-select/print-page-select.component.ts index 3dd6f49..ff707e0 100644 --- a/src/app/app-modules/nurse-doctor/print-page-select/print-page-select.component.ts +++ b/src/app/app-modules/nurse-doctor/print-page-select/print-page-select.component.ts @@ -23,6 +23,8 @@ import { Component, OnInit, Inject, DoCheck } from '@angular/core'; import { MdDialog, MdDialogRef, MD_DIALOG_DATA } from '@angular/material'; import { HttpServiceService } from 'app/app-modules/core/services/http-service.service'; import { SetLanguageComponent } from 'app/app-modules/core/components/set-language.component'; +import { CDSSService } from '../shared/services/cdss-service'; +import { Subscription } from 'rxjs'; @Component({ @@ -53,7 +55,8 @@ export class PrintPageSelectComponent implements OnInit, DoCheck { caseSheetTreatmentOnSideEffects: true, caseSheetCounsellingProvided: true, caseSheetNeonatalAndInfant: true, - caseSheetOralVitaminA: true + caseSheetOralVitaminA: true, + caseSheetCdss: true } @@ -61,13 +64,16 @@ export class PrintPageSelectComponent implements OnInit, DoCheck { currentLanguageSet: any; language_file_path: any = "./assets/"; language : any; + isCdssAvailable: boolean; + CdssSubcription: Subscription; constructor( public dialogRef: MdDialogRef, @Inject(MD_DIALOG_DATA) public data: any, - public httpServiceService: HttpServiceService) { } + public httpServiceService: HttpServiceService, public cdssService: CDSSService) { } ngOnInit() { + this.isCdssStatus(); if (this.data) { this.visitCategory = this.data.visitCategory; this.printPagePreviewSelect.caseSheetANC = this.data.printPagePreviewSelect.caseSheetANC; @@ -90,6 +96,7 @@ export class PrintPageSelectComponent implements OnInit, DoCheck { this.printPagePreviewSelect.caseSheetCounsellingProvided = this.data.printPagePreviewSelect.caseSheetCounsellingProvided; this.printPagePreviewSelect.caseSheetNeonatalAndInfant = this.data.printPagePreviewSelect.caseSheetNeonatalAndInfant; this.printPagePreviewSelect.caseSheetOralVitaminA = this.data.printPagePreviewSelect.caseSheetOralVitaminA; + this.printPagePreviewSelect.caseSheetCdss = this.data.printPagePreviewSelect.caseSheetCdss; } this.unCheckSelectAll(); this.setLanguage(); @@ -171,10 +178,10 @@ export class PrintPageSelectComponent implements OnInit, DoCheck { this.printPagePreviewSelect.caseSheetExtInvestigation = true; this.printPagePreviewSelect.caseSheetCurrentVitals = true; this.printPagePreviewSelect.caseSheetChiefComplaints = true; - this.printPagePreviewSelect.caseSheetClinicalObservations = true; + this.printPagePreviewSelect.caseSheetClinicalObservations = true; if(this.visitCategory != 'General OPD (QC)'){ - this.printPagePreviewSelect.caseSheetFindings = true; + this.printPagePreviewSelect.caseSheetFindings = true; } this.printPagePreviewSelect.caseSheetCovidVaccinationDetails = true; @@ -197,6 +204,7 @@ export class PrintPageSelectComponent implements OnInit, DoCheck { if(this.visitCategory.toLowerCase() == 'childhood & adolescent healthcare services'){ this.printPagePreviewSelect.caseSheetOralVitaminA = true; } + this.printPagePreviewSelect.caseSheetCdss = true; } @@ -206,6 +214,7 @@ export class PrintPageSelectComponent implements OnInit, DoCheck { } if(this.visitCategory == "PNC") { this.printPagePreviewSelect.caseSheetPNC = false; + this.printPagePreviewSelect.caseSheetCdss = false; } if(this.visitCategory != "General OPD (QC)") { @@ -247,6 +256,7 @@ export class PrintPageSelectComponent implements OnInit, DoCheck { if(this.visitCategory.toLowerCase() == 'childhood & adolescent healthcare services'){ this.printPagePreviewSelect.caseSheetOralVitaminA = false; } + this.printPagePreviewSelect.caseSheetCdss = false; } unCheckSelectAll(){ @@ -302,7 +312,7 @@ export class PrintPageSelectComponent implements OnInit, DoCheck { this.printPagePreviewSelect.caseSheetExtInvestigation && this.printPagePreviewSelect.caseSheetCurrentVitals && this.printPagePreviewSelect.caseSheetChiefComplaints && this.printPagePreviewSelect.caseSheetClinicalObservations && this.printPagePreviewSelect.caseSheetCovidVaccinationDetails && - this.printPagePreviewSelect.caseSheetCounsellingProvided) { + this.printPagePreviewSelect.caseSheetCounsellingProvided && this.printPagePreviewSelect.caseSheetCdss) { this.printPagePreviewSelect.selectAllCheckBox = true; } else { @@ -310,4 +320,20 @@ export class PrintPageSelectComponent implements OnInit, DoCheck { } } +isCdssStatus(){ + this.CdssSubcription = this.cdssService.isCdssAvailable$.subscribe((response) =>{ + if(response === true){ + this.isCdssAvailable = true; + + } + else{ + this.isCdssAvailable = false; + } + }); +} +ngOnDestroy() { + if (this.CdssSubcription) + this.CdssSubcription.unsubscribe(); +} + } \ No newline at end of file diff --git a/src/app/app-modules/nurse-doctor/shared/services/cdss-service.ts b/src/app/app-modules/nurse-doctor/shared/services/cdss-service.ts index aee4175..678de66 100644 --- a/src/app/app-modules/nurse-doctor/shared/services/cdss-service.ts +++ b/src/app/app-modules/nurse-doctor/shared/services/cdss-service.ts @@ -70,4 +70,14 @@ getDiseaseName() { .map((res) => res.json()); } +isCdssAvailable: boolean = false; +isCdssStatus = new BehaviorSubject(this.isCdssAvailable); +isCdssAvailable$ = this.isCdssStatus.asObservable(); + +isCdssStatusForEnabling(isCdssAvailable){ + this.isCdssStatus.next(isCdssAvailable); + + } + + } \ No newline at end of file diff --git a/src/app/app-modules/nurse-doctor/visit-details/visit-details/visit-details.component.html b/src/app/app-modules/nurse-doctor/visit-details/visit-details/visit-details.component.html index c997b8c..cb60286 100644 --- a/src/app/app-modules/nurse-doctor/visit-details/visit-details/visit-details.component.html +++ b/src/app/app-modules/nurse-doctor/visit-details/visit-details/visit-details.component.html @@ -233,7 +233,7 @@ visitCategory == 'NCD screening' " > - , @@ -68,6 +69,7 @@ export class HealthIdOtpGenerationComponent implements OnInit { this.enablehealthIdOTPForm = true; this.getHealthIdOtpForInitial(); } + this.loadMasterDataObservable(); } ngDoCheck() { this.assignSelectedLanguage(); @@ -226,6 +228,18 @@ export class HealthIdOtpGenerationComponent implements OnInit { this.enablehealthIdOTPForm = true; }) } + + masterDataSubscription: any; + loadMasterDataObservable() { + this.masterDataSubscription = this.registrarService.registrationMasterDetails$ + .subscribe(res => { + console.log('Registrar master data', res); + if (res != null) { + this.registrarMasterData = Object.assign({}, res); + console.log("master data",this.registrarMasterData); + } + }) + } posthealthIDButtonCall() { let dialogRefPass = this.dialog.open(SetPasswordForAbhaComponent, { @@ -253,6 +267,7 @@ export class HealthIdOtpGenerationComponent implements OnInit { this.registrarService.abhaGenerateData = res.data; this.registrarService.aadharNumberNew = this.aadharNum; this.registrarService.getabhaDetail(true); + let dialogRefSuccess = this.dialog.open(HealthIdOtpSuccessComponent, { height: '300px', width: '420px', @@ -261,10 +276,34 @@ export class HealthIdOtpGenerationComponent implements OnInit { }); this.showProgressBar = false; dialogRefSuccess.afterClosed().subscribe(result => { - + const dob = `${res.data.dayOfBirth}/${res.data.monthOfBirth}/${res.data.yearOfBirth}`; + let gender = ''; + if (res.data.gender === 'F') { + gender = 'Female'; + } else if (res.data.gender === 'M') { + gender = 'Male'; + } else { + gender = 'Transgender'; + } + + const filteredGender = this.registrarMasterData.genderMaster.filter(g => g.genderName === gender); + + let genderID = null; + let genderName = null; + if (filteredGender.length > 0) { + genderID = filteredGender[0].genderID; + genderName = filteredGender[0].genderName; + } + let dat = { "healthIdNumber": res.data.healthIdNumber, "healthId": res.data.healthId, + "firstName": res.data.firstName, + "lastName": res.data.lastName, + "phoneNo": res.data.mobile, + "dob": dob, + "gender": genderID, + "genderName": genderName }; this.registrarService.setHealthIdMobVerification(dat); this.dialogRef.close(dat); diff --git a/src/app/app-modules/registrar/registration/register-personal-details/register-personal-details.component.html b/src/app/app-modules/registrar/registration/register-personal-details/register-personal-details.component.html index 650c44b..7abdb55 100644 --- a/src/app/app-modules/registrar/registration/register-personal-details/register-personal-details.component.html +++ b/src/app/app-modules/registrar/registration/register-personal-details/register-personal-details.component.html @@ -227,7 +227,7 @@ - +
{ + if(response === true){ + this.MaritalStatus = true; + this.enableMaritalStatus = true; + this.onGenderSelected(); + } + else{ + this.MaritalStatus = false; + this.enableMaritalStatus = false; + } + }); + } /** * Phone Number Parent Relations diff --git a/src/app/app-modules/registrar/registration/registration.component.ts b/src/app/app-modules/registrar/registration/registration.component.ts index e3a329c..7c7be87 100644 --- a/src/app/app-modules/registrar/registration/registration.component.ts +++ b/src/app/app-modules/registrar/registration/registration.component.ts @@ -89,6 +89,9 @@ export class RegistrationComponent implements OnInit, AfterViewChecked, OnDestro consentGranted: any; externalSearchTerm: any; myText: any; + today: Date; + formattedDate: any; + enableMaritalStatus: boolean = false; constructor( private confirmationService: ConfirmationService, @@ -153,9 +156,54 @@ export class RegistrationComponent implements OnInit, AfterViewChecked, OnDestro setHealthIdAfterGeneration(result) { (this.beneficiaryRegistrationForm.controls['otherDetailsForm']).patchValue({ healthId: result.healthIdNumber }); (this.beneficiaryRegistrationForm.controls['otherDetailsForm']).patchValue({ healthIdNumber: result.healthIdNumber }); - + (this.beneficiaryRegistrationForm.controls['personalDetailsForm']).patchValue({ firstName: result.firstName }); + (this.beneficiaryRegistrationForm.controls['personalDetailsForm']).patchValue({ lastName: result.lastName }); + (this.beneficiaryRegistrationForm.controls['personalDetailsForm']).patchValue({ phoneNo: result.phoneNo }); + (this.beneficiaryRegistrationForm.controls['personalDetailsForm']).patchValue({gender : result.gender }); + (this.beneficiaryRegistrationForm.controls['personalDetailsForm']).patchValue({genderName : result.genderName }); (this.beneficiaryRegistrationForm.controls['otherDetailsForm']).controls['healthId'].disable(); // (this.beneficiaryRegistrationForm.controls['otherDetailsForm']).controls['healthIdNumber'].disable(); + + const parts = result.dob.split('/'); + const parsedDate = new Date(parseInt(parts[2]), parseInt(parts[1]) - 1, parseInt(parts[0])); + (this.beneficiaryRegistrationForm.controls['personalDetailsForm']).patchValue({dob : parsedDate }); + + if ( + result.dob && + (this.beneficiaryRegistrationForm.controls['personalDetailsForm']).controls["dob"].valid + ) { + const dateDiff = Date.now() - parsedDate.getTime(); + const age = new Date(dateDiff); + const yob = Math.abs(age.getFullYear() - 1970); + const mob = Math.abs(age.getMonth()); + const dob = Math.abs(age.getDate() - 1); + this.today = new Date(); + if (yob > 0) { + (this.beneficiaryRegistrationForm.controls['personalDetailsForm']).patchValue({ age: yob }); + (this.beneficiaryRegistrationForm.controls['personalDetailsForm']).patchValue({ ageUnit: "Years" }); + } else if (mob > 0) { + (this.beneficiaryRegistrationForm.controls['personalDetailsForm']).patchValue({ age: mob }); + (this.beneficiaryRegistrationForm.controls['personalDetailsForm']).patchValue({ ageUnit: "Months" }); + } else if (dob > 0) { + (this.beneficiaryRegistrationForm.controls['personalDetailsForm']).patchValue({ age: dob }); + (this.beneficiaryRegistrationForm.controls['personalDetailsForm']).patchValue({ ageUnit: "Days" }); + } + if (parsedDate.setHours(0, 0, 0, 0) == this.today.setHours(0, 0, 0, 0)) { + (this.beneficiaryRegistrationForm.controls['personalDetailsForm']).patchValue({ age: 1 }); + (this.beneficiaryRegistrationForm.controls['personalDetailsForm']).patchValue({ ageUnit: "Day" }); + } + } + let marriageAge : number = 12; + if ( + (this.beneficiaryRegistrationForm.controls['personalDetailsForm']).value.age >= marriageAge && + (this.beneficiaryRegistrationForm.controls['personalDetailsForm']).value.ageUnit == "Years" + ) { + this.enableMaritalStatus = true; + this.registrarService.isMarriageEnable(true); + } else { + this.enableMaritalStatus = false; + this.registrarService.isMarriageEnable(false); + } this.disableGenerateOTP=true; } diff --git a/src/app/app-modules/registrar/shared/services/registrar.service.ts b/src/app/app-modules/registrar/shared/services/registrar.service.ts index 8da31c4..8cacf18 100644 --- a/src/app/app-modules/registrar/shared/services/registrar.service.ts +++ b/src/app/app-modules/registrar/shared/services/registrar.service.ts @@ -96,6 +96,15 @@ export class RegistrarService { // this.benFamilyDetails = value; // } + maritalStatus: boolean = false; + isMarriageStatus = new BehaviorSubject(this.maritalStatus); + maritalStatus$ = this.isMarriageStatus.asObservable(); + + isMarriageEnable(maritalStatus){ + this.isMarriageStatus.next(maritalStatus); + + } + // GenerateOTPEnable: any; // GenerateOTP = new BehaviorSubject(this.GenerateOTPEnable); diff --git a/src/styles.css b/src/styles.css index 641021b..a9cad24 100644 --- a/src/styles.css +++ b/src/styles.css @@ -476,4 +476,10 @@ body md-icon.search-btn.cursorPointer.mat-icon.material-icons.ng-star-inserted { .mat-form-field-underline.mat-disabled { background-position: 0; background-color: transparent !important; +} + +@media (min-width: 1200px) { + .hidden-lg .hidden-md .hidden-sm { + display: inline-block !important; + } } \ No newline at end of file