Skip to content

Commit 67724ff

Browse files
authored
[Eka hackathon] : Remove viremia alert (#1612)
* removed viremia alert * removed viremia alert
1 parent 0b5ab00 commit 67724ff

File tree

4 files changed

+0
-67
lines changed

4 files changed

+0
-67
lines changed

src/app/patient-dashboard/hiv/hiv-summary/hiv-summary.component.html

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
<h4 class="component-title">
22
<span class="fa fa-medkit"></span> HIV Summary
3-
<span
4-
*ngIf="viremiaAlert"
5-
[ngClass]="{
6-
label: true,
7-
'label-danger': highViremia,
8-
'label-warning': lowViremia
9-
}"
10-
>{{ viremiaAlert }}</span
11-
>
123

134
<span *ngIf="gbvScreeningResult" class="hiv-alert" style="background: orange"
145
>{{ gbvScreeningLabel }}: {{ gbvScreeningResult }}</span

src/app/patient-dashboard/hiv/hiv-summary/hiv-summary.component.ts

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ const mdtProgramUuid = 'c4246ff0-b081-460c-bcc5-b0678012659e';
1111
styleUrls: ['./hiv-summary.component.css']
1212
})
1313
export class HivSummaryComponent implements OnInit, OnDestroy {
14-
viremiaAlert: string;
15-
showViremiaAlert: boolean;
1614
lowViremia: boolean;
1715
highViremia: boolean;
1816
patientUuid: string;
@@ -30,13 +28,6 @@ export class HivSummaryComponent implements OnInit, OnDestroy {
3028
public ngOnInit() {
3129
this.loadHivSummary();
3230
this.getPatient();
33-
this.route.url.subscribe((url) => {
34-
if (url[1]) {
35-
if (url[1].path === mdtProgramUuid) {
36-
this.showViremiaAlert = true;
37-
}
38-
}
39-
});
4031
}
4132

4233
public getPatient() {
@@ -66,30 +57,10 @@ export class HivSummaryComponent implements OnInit, OnDestroy {
6657
const gbvScreeningResult =
6758
data.length > 0 ? data[0].gbv_screening_result : '';
6859
this.gbvScreeningResult = this.checkGbvScreening(gbvScreeningResult);
69-
for (const summary of data) {
70-
if (summary.is_clinical_encounter === 1 && this.showViremiaAlert) {
71-
this.checkViremia(summary.vl_1);
72-
break;
73-
}
74-
}
7560
}
7661
});
7762
}
7863

79-
public checkViremia(viralLoad) {
80-
let alert;
81-
if (viralLoad >= 401 && viralLoad <= 999) {
82-
this.lowViremia = true;
83-
alert = 'Low Viremia';
84-
} else if (viralLoad >= 1000) {
85-
this.highViremia = true;
86-
alert = 'High Viremia';
87-
}
88-
if (alert) {
89-
this.viremiaAlert = alert;
90-
}
91-
}
92-
9364
public checkGbvScreening(screeningResult) {
9465
if (screeningResult === 1 ? true : false) {
9566
return 'POSITIVE';

src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.html

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,6 @@
1111
</div>
1212
<div *ngIf="!hasError && hasData && displayProgram">
1313
<div class="row">
14-
<div *ngIf="viremiaAlert" style="display: inline-block">
15-
<p
16-
class="hiv-alert"
17-
[ngClass]="{
18-
label: true,
19-
'label-danger': highViremia,
20-
'label-warning': lowViremia
21-
}"
22-
>
23-
<span class="hiv-alert">{{ viremiaAlert }} Viremia</span>
24-
</p>
25-
</div>
2614
<div *ngIf="gbvScreeningResult" style="display: inline-block">
2715
<p>
2816
<span class="hiv-alert" style="background: orange"

src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ export class HivProgramSnapshotComponent implements OnInit {
4949
this.patientPrograms = enrolledProgrames;
5050
}
5151
@Input() public set program(program) {
52-
this.showViremiaAlert = program.uuid === mdtProgramUuid ? true : false;
5352
this.hasMoriskyScore = program.uuid === stdProgramUuid ? true : false;
5453
this.curProgram = program;
5554
_.each(HivNegativesProgram, (p) => {
@@ -82,8 +81,6 @@ export class HivProgramSnapshotComponent implements OnInit {
8281
pink: '#FFC0CB',
8382
yellow: '#FFFF00'
8483
};
85-
public viremiaAlert: string;
86-
public showViremiaAlert: boolean;
8784
public lowViremia: boolean;
8885
public highViremia: boolean;
8986
public currentPatientSub: Subscription;
@@ -170,9 +167,6 @@ export class HivProgramSnapshotComponent implements OnInit {
170167
this.hivDisclosureStatus =
171168
results[0].hiv_status_disclosed === 1 ? 'Yes' : 'No';
172169

173-
if (this.showViremiaAlert) {
174-
this.checkViremia(latestVl);
175-
}
176170
this.gbvScreeningResult = this.checkGbvScreening(
177171
results[0].gbv_screening_result
178172
);
@@ -437,17 +431,6 @@ export class HivProgramSnapshotComponent implements OnInit {
437431
});
438432
}
439433

440-
private checkViremia(latestVl) {
441-
if (latestVl >= 1 && latestVl <= 999) {
442-
this.lowViremia = true;
443-
this.viremiaAlert = 'Low';
444-
}
445-
if (latestVl >= 1000) {
446-
this.highViremia = true;
447-
this.viremiaAlert = 'High';
448-
}
449-
}
450-
451434
private checkGbvScreening(screeningResult) {
452435
if (
453436
screeningResult === 1 &&

0 commit comments

Comments
 (0)