diff --git a/src/app/hiv-care-lib/tx-curr-report/tx-curr-report-base/tx-curr-report-base.component.html b/src/app/hiv-care-lib/tx-curr-report/tx-curr-report-base/tx-curr-report-base.component.html
index 1e734b6d5..43e11b6f6 100644
--- a/src/app/hiv-care-lib/tx-curr-report/tx-curr-report-base/tx-curr-report-base.component.html
+++ b/src/app/hiv-care-lib/tx-curr-report/tx-curr-report-base/tx-curr-report-base.component.html
@@ -47,6 +47,7 @@
[sectionDefs]="columnDefs"
(CellSelection)="onIndicatorSelected($event)"
[reportDetails]="params"
+ [reportHeader]="reportName"
>
diff --git a/src/app/hiv-care-lib/tx-ml-report/tx-ml-report-base/tx-ml-report-base.component.html b/src/app/hiv-care-lib/tx-ml-report/tx-ml-report-base/tx-ml-report-base.component.html
index 39898c8e1..1252618ea 100644
--- a/src/app/hiv-care-lib/tx-ml-report/tx-ml-report-base/tx-ml-report-base.component.html
+++ b/src/app/hiv-care-lib/tx-ml-report/tx-ml-report-base/tx-ml-report-base.component.html
@@ -49,6 +49,7 @@
[sectionDefs]="columnDefs"
(CellSelection)="onIndicatorSelected($event)"
[reportDetails]="params"
+ [reportHeader]="reportName"
>
diff --git a/src/app/hiv-care-lib/tx-ml-report/tx-ml-report-patient-list/tx-ml-report-patient-list.component.ts b/src/app/hiv-care-lib/tx-ml-report/tx-ml-report-patient-list/tx-ml-report-patient-list.component.ts
index a2f020d06..b489dc493 100644
--- a/src/app/hiv-care-lib/tx-ml-report/tx-ml-report-patient-list/tx-ml-report-patient-list.component.ts
+++ b/src/app/hiv-care-lib/tx-ml-report/tx-ml-report-patient-list/tx-ml-report-patient-list.component.ts
@@ -28,7 +28,6 @@ export class TxMlReportPatientListComponent implements OnInit {
) {}
ngOnInit() {
- this.addExtraColumns();
this.route.queryParams.subscribe(
(params) => {
if (params && params.sDate) {
@@ -42,6 +41,7 @@ export class TxMlReportPatientListComponent implements OnInit {
console.error('Error', error);
}
);
+ this.addExtraColumns();
}
private getPatientList(params: any) {
@@ -69,12 +69,20 @@ export class TxMlReportPatientListComponent implements OnInit {
latest_vl_date: 'Latest VL Date',
previous_vl: 'Previous VL',
previous_vl_date: 'Previous VL Date',
- ovcid_id: 'OVCID',
- transfer_out_date_v1: 'Transfer out date',
- death_date: 'Death Date',
- cause_of_death: 'Cause of Death'
+ ovcid_id: 'OVCID'
};
+ const status = this.selectedIndicatorGender.split(' - ')[0];
+ if (status === 'Died') {
+ Object.assign(extraColumns, {
+ death_date: 'Death Date',
+ cause_of_death: 'Cause of Death'
+ });
+ } else if (status === 'Transferred Out') {
+ Object.assign(extraColumns, {
+ transfer_out_date_v1: 'Transfer out date'
+ });
+ }
for (const indicator in extraColumns) {
if (indicator) {
this.extraColumns.push({
diff --git a/src/app/hiv-care-lib/tx-ml-report/tx-ml-report-view/tx-ml-report-view.component.html b/src/app/hiv-care-lib/tx-ml-report/tx-ml-report-view/tx-ml-report-view.component.html
index 80d95e476..3ca23b89a 100644
--- a/src/app/hiv-care-lib/tx-ml-report/tx-ml-report-view/tx-ml-report-view.component.html
+++ b/src/app/hiv-care-lib/tx-ml-report/tx-ml-report-view/tx-ml-report-view.component.html
@@ -7,7 +7,7 @@