- Encounter Date |
Encounter Type |
+ Encounter Date |
RTC Date |
+ Days Missed |
Medication Pick up Date |
- TB Treatment Start Date |
- TB Treatment End Date |
ARV Meds |
CD4 Count |
Viral Load |
WHO Stage |
+ Status |
EAC |
@@ -24,14 +24,24 @@
hivSummary.prev_rtc_date < hivSummary.encounter_datetime
}"
>
- {{ hivSummary.encounter_datetime | date: 'dd-MM-yyyy' }} |
{{ hivSummary.encounter_type_name }} |
+ {{ hivSummary.encounter_datetime | date: 'dd-MM-yyyy' }} |
{{ hivSummary.rtc_date | date: 'dd-MM-yyyy' }} |
+
+ {{
+ (hivSummary.encounter_datetime - hivSummary.prev_rtc_date) /
+ (1000 * 60 * 60 * 24) >
+ 0
+ ? (hivSummary.encounter_datetime - hivSummary.prev_rtc_date) /
+ (1000 * 60 * 60 * 24)
+ : 0
+ }}
+ |
{{ hivSummary.med_pickup_rtc_date | date: 'dd-MM-yyyy' }}
|
- {{ hivSummary?.tb_tx_start_date | date: 'dd-MM-yyyy' }} |
- {{ hivSummary?.tb_tx_end_date | date: 'dd-MM-yyyy' }} |
+
{{ hivSummary.cur_arv_meds }} |
{{ hivSummary.cd4_1 }}
@@ -51,6 +61,30 @@
|
{{ hivSummary.cur_who_stage }} |
{{ hivSummary.mdt_session_number }} |
+
+ {{
+ (hivSummary.encounter_datetime - hivSummary.prev_rtc_date) /
+ (1000 * 60 * 60 * 24) >
+ 0 &&
+ (hivSummary.encounter_datetime - hivSummary.prev_rtc_date) /
+ (1000 * 60 * 60 * 24) <=
+ 5
+ ? 'missed'
+ : (hivSummary.encounter_datetime - hivSummary.prev_rtc_date) /
+ (1000 * 60 * 60 * 24) >
+ 4 &&
+ (hivSummary.encounter_datetime - hivSummary.prev_rtc_date) /
+ (1000 * 60 * 60 * 24) <=
+ 28
+ ? 'defaulter'
+ : (hivSummary.encounter_datetime - hivSummary.prev_rtc_date) /
+ (1000 * 60 * 60 * 24) >
+ 28
+ ? 'LTFU'
+ : ''
+ }}
+ |
+
diff --git a/src/app/patient-dashboard/hiv/hiv-summary/hiv-summary-historical.component.ts b/src/app/patient-dashboard/hiv/hiv-summary/hiv-summary-historical.component.ts
index 962a0141b..438b5765f 100644
--- a/src/app/patient-dashboard/hiv/hiv-summary/hiv-summary-historical.component.ts
+++ b/src/app/patient-dashboard/hiv/hiv-summary/hiv-summary-historical.component.ts
@@ -1,11 +1,12 @@
/* tslint:disable:no-inferrable-types */
import { take } from 'rxjs/operators/take';
import { Component, OnInit, OnDestroy } from '@angular/core';
-
+import * as Moment from 'moment';
import { PatientService } from '../../services/patient.service';
import { HivSummaryService } from './hiv-summary.service';
import { Patient } from '../../../models/patient.model';
import { Subscription } from 'rxjs';
+import { result } from 'lodash';
@Component({
selector: 'hiv-summary-historical',
@@ -13,6 +14,7 @@ import { Subscription } from 'rxjs';
styleUrls: ['./hiv-summary.component.css']
})
export class HivSummaryHistoricalComponent implements OnInit, OnDestroy {
+ public isHEIActive = false;
public loadingHivSummary: boolean = false;
public hivSummaries: Array