Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AMM-1055 Family History Diabetes Mellitus info message changes #44

Merged
merged 6 commits into from
Nov 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 @@ -17,7 +17,7 @@
<mat-icon class="md-18">history</mat-icon>
</button>
</div>
<div *ngIf="visitType === 'NCD screening' && age >= 30">
<div *ngIf="visitType === 'NCD screening' && age >= 30 && !diabetesPresent">
<span style="color: red"
>*{{
currentLanguageSet?.historyData?.ancHistory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export class FamilyHistoryNcdscreeningComponent
beneficiaryDetailSubscription: any;
age: any;
currentLanguageSet: any;
diabetesPresent = false;

constructor(
private fb: FormBuilder,
Expand Down Expand Up @@ -291,13 +292,16 @@ export class FamilyHistoryNcdscreeningComponent
}

console.log('diseaseForm', familyDiseaseForm);
let diabetesPresent = false;
this.diabetesPresent = false;
tempArray.forEach((element: any) => {
if (element.diseaseType.diseaseType === 'Diabetes Mellitus') {
diabetesPresent = true;
if (
element?.diseaseType?.diseaseType === 'Diabetes Mellitus' &&
element?.deleted === false
) {
this.diabetesPresent = true;
}
});
if (!diabetesPresent) {
if (!this.diabetesPresent) {
this.idrsscore.setIDRSFamilyScore(0);
}

Expand Down Expand Up @@ -380,7 +384,7 @@ export class FamilyHistoryNcdscreeningComponent
removedValue !== null &&
removedValue.diseaseType === 'Diabetes Mellitus'
) {
this.idrsscore.setIDRSFamilyScore(0);
this.resetDiabeticState();
}
familyDiseaseList.push(this.initFamilyDiseaseList());
this.diseaseSelectList.push(this.diseaseMasterData);
Expand All @@ -392,7 +396,7 @@ export class FamilyHistoryNcdscreeningComponent
removedValue !== null &&
removedValue.diseaseType === 'Diabetes Mellitus'
) {
this.idrsscore.setIDRSFamilyScore(0);
this.resetDiabeticState();
}
}
} else {
Expand All @@ -411,7 +415,7 @@ export class FamilyHistoryNcdscreeningComponent
removedValue !== null &&
removedValue.diseaseType === 'Diabetes Mellitus'
) {
this.idrsscore.setIDRSFamilyScore(0);
this.resetDiabeticState();
}
if (familyDiseaseList.value[i].ID !== null) {
familyDiseaseList.value[i].deleted = true;
Expand Down Expand Up @@ -441,6 +445,11 @@ export class FamilyHistoryNcdscreeningComponent
});
}

resetDiabeticState() {
this.diabetesPresent = false;
this.idrsscore.setIDRSFamilyScore(0);
}

getPreviousFamilyHistory() {
const benRegID = localStorage.getItem('beneficiaryRegID');
this.nurseService
Expand Down
1 change: 0 additions & 1 deletion src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

.odd {
background-color: #f0f5f5;
border-bottom: 1px solid #ddd;
}

.action-btn-container {
Expand Down
Loading