Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

cdss , generate abha, idrs changes #86

Merged
merged 4 commits into from
Mar 14, 2024
Merged
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 @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,8 @@ <h4> {{current_language_set?.casesheet?.chiefComplaint}}:</h4>
<!-- End of Chief complaints and description -->

<!-- CDSS -->
<div class="row m-t-10" >
<div class="col-xs-12" *ngIf="isCdssStatus">
<div class="row m-t-10">
<div class="col-xs-12" *ngIf="isCdssStatus && printPagePreviewSelect?.caseSheetCdss">
<fieldset>
<legend>{{current_language_set?.cdss}}:</legend>
<table class="table table-no-border casesheet-table" aria-describedby="cdssFormDetails">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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() {
Expand Down Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ <h3 class="title info">{{currentLanguageSet?.common?.selectPrintPage}}</h3>
<div class="col-xs-12 col-sm-6 col-md-6 m-t-15" *ngIf="visitCategory != 'General OPD (QC)'">
<md-checkbox (change)="unCheckSelectAll()" color='primary' class="" [(ngModel)]="printPagePreviewSelect.caseSheetHistory"> {{currentLanguageSet?.historyData.history}} </md-checkbox>
</div>
<div class="col-xs-12 col-sm-6 col-md-6 m-t-15" *ngIf="isCdssAvailable" >
<md-checkbox (change)="unCheckSelectAll()" color='primary' class="" [(ngModel)]="printPagePreviewSelect.caseSheetCdss"> {{currentLanguageSet?.cdss}} </md-checkbox>
</div>
<div class="col-xs-12 col-sm-6 col-md-6 m-t-15" *ngIf="visitCategory != 'NCD care' && visitCategory != 'General OPD (QC)' && visitCategory != 'COVID-19 Screening'">
<md-checkbox (change)="unCheckSelectAll()" color='primary' class="" [(ngModel)]="printPagePreviewSelect.caseSheetExamination"> {{currentLanguageSet?.ExaminationData.examination}} </md-checkbox>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -53,21 +55,25 @@ export class PrintPageSelectComponent implements OnInit, DoCheck {
caseSheetTreatmentOnSideEffects: true,
caseSheetCounsellingProvided: true,
caseSheetNeonatalAndInfant: true,
caseSheetOralVitaminA: true
caseSheetOralVitaminA: true,
caseSheetCdss: true

}

visitCategory: any;
currentLanguageSet: any;
language_file_path: any = "./assets/";
language : any;
isCdssAvailable: boolean;
CdssSubcription: Subscription;

constructor(
public dialogRef: MdDialogRef<PrintPageSelectComponent>,
@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;
Expand All @@ -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();
Expand Down Expand Up @@ -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;

Expand All @@ -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;
}


Expand All @@ -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)") {
Expand Down Expand Up @@ -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(){
Expand Down Expand Up @@ -302,12 +312,28 @@ 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 {
this.printPagePreviewSelect.selectAllCheckBox = false;
}
}

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();
}

}
10 changes: 10 additions & 0 deletions src/app/app-modules/nurse-doctor/shared/services/cdss-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,14 @@ getDiseaseName() {
.map((res) => res.json());
}

isCdssAvailable: boolean = false;
isCdssStatus = new BehaviorSubject<boolean>(this.isCdssAvailable);
isCdssAvailable$ = this.isCdssStatus.asObservable();

isCdssStatusForEnabling(isCdssAvailable){
this.isCdssStatus.next(isCdssAvailable);

}


}
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
visitCategory == 'NCD screening'
"
>
<md-radio-group
<md-radio-group *ngIf="isRadioGroupVisible"
formControlName="IdrsOrCbac"
(change)="enableHistoryScreenOnIdrs(IdrsOrCbac)"
[(ngModel)]="keyType"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export class VisitDetailsComponent implements OnInit {
subVisitCategory: any;
templateSubVisitCategories = [];
subVisitCategoryList = [];
isRadioGroupVisible : boolean = false;
constructor(
private masterdataService: MasterdataService,
private doctorService: DoctorService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export class HealthIdOtpGenerationComponent implements OnInit {
showProgressBar: Boolean = false;
password: any;
aadharNum: any;
registrarMasterData: any;
// mobileLinkedOtp: any;

constructor(private fb: FormBuilder,public dialogRef: MdDialogRef<HealthIdOtpGenerationComponent>,
Expand All @@ -68,6 +69,7 @@ export class HealthIdOtpGenerationComponent implements OnInit {
this.enablehealthIdOTPForm = true;
this.getHealthIdOtpForInitial();
}
this.loadMasterDataObservable();
}
ngDoCheck() {
this.assignSelectedLanguage();
Expand Down Expand Up @@ -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, {
Expand Down Expand Up @@ -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',
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@
</md-select>
</div>

<ng-container *ngIf="enableMaritalStatus">
<ng-container *ngIf="enableMaritalStatus && MaritalStatus">
<div class="col-xs-12 col-sm-6 col-md-3 col-lg-3 box">
<md-select
[style.width]="'100%'"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ export class RegisterPersonalDetailsComponent implements OnInit {

@ViewChild(BsDatepickerDirective) datepicker: BsDatepickerDirective;
personalDataOnHealthIDSubscription: Subscription;
maritalSubscription: Subscription;
MaritalStatus: boolean = false;

@HostListener("window:scroll")
onScrollEvent() {
Expand Down Expand Up @@ -103,6 +105,7 @@ export class RegisterPersonalDetailsComponent implements OnInit {
this.setDateLimits();
this.setDefaultAgeUnit();
this.loadMasterDataObservable();
this.isMaritalStatus();
this.setPhoneSelectionEnabledByDefault();
this.setImageChangeFlagToFalseByDefault();
this.setCalendarConfig();
Expand Down Expand Up @@ -157,6 +160,9 @@ export class RegisterPersonalDetailsComponent implements OnInit {
if (this.personalDataOnHealthIDSubscription) {
this.personalDataOnHealthIDSubscription.unsubscribe();
}
if (this.maritalSubscription){
this.maritalSubscription.unsubscribe();
}
}

setPhoneSelectionEnabledByDefault() {
Expand Down Expand Up @@ -496,8 +502,19 @@ export class RegisterPersonalDetailsComponent implements OnInit {
);
}
}


isMaritalStatus(){
this.maritalSubscription = this.registrarService.maritalStatus$.subscribe((response) =>{
if(response === true){
this.MaritalStatus = true;
this.enableMaritalStatus = true;
this.onGenderSelected();
}
else{
this.MaritalStatus = false;
this.enableMaritalStatus = false;
}
});
}

/**
* Phone Number Parent Relations
Expand Down
Loading
Loading