Skip to content

Commit

Permalink
POC-386: Datim Feedback (#1641)
Browse files Browse the repository at this point in the history
* POC-386: Datim Feedback

* POC-386: updated github workflow

* POC-386: Datim Feedback

---------

Co-authored-by: Drizzentic <[email protected]>
  • Loading branch information
Alfred-Mutai and drizzentic authored Aug 2, 2023
1 parent 0bbe7de commit eaa29aa
Show file tree
Hide file tree
Showing 9 changed files with 109 additions and 246 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ <h4 *ngIf="!statusError">
[sectionDefs]="columnDefs"
(CellSelection)="onIndicatorSelected($event)"
[reportDetails]="params"
[reportHeader]="reportName"
></app-tx-ml-report-view>
</p-tabPanel>
</p-tabView>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ <h4 *ngIf="!statusError">
[sectionDefs]="columnDefs"
(CellSelection)="onIndicatorSelected($event)"
[reportDetails]="params"
[reportHeader]="reportName"
></app-tx-ml-report-view>
</p-tabPanel>
</p-tabView>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export class TxMlReportPatientListComponent implements OnInit {
) {}

ngOnInit() {
this.addExtraColumns();
this.route.queryParams.subscribe(
(params) => {
if (params && params.sDate) {
Expand All @@ -42,6 +41,7 @@ export class TxMlReportPatientListComponent implements OnInit {
console.error('Error', error);
}
);
this.addExtraColumns();
}

private getPatientList(params: any) {
Expand Down Expand Up @@ -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({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="btn-group pull-right">
<button
class="btn btn-primary"
(click)="downloadPdf()"
(click)="downloadCSV()"
[disabled]="!gridOptions"
>
<i class="fa fa-download"> </i> Export to CSV
Expand Down Expand Up @@ -108,7 +108,7 @@
></th>
</tr>
</ng-container>
<ng-container *ngIf="a !== 0 && i < 16">
<ng-container *ngIf="a !== 0 && i < 15">
<tr>
<td
style="min-width: 150px"
Expand Down Expand Up @@ -146,7 +146,7 @@
</td>
</tr>
</ng-container>
<ng-container *ngIf="i === 16 && a !== 0">
<ng-container *ngIf="i === 15 && a !== 0">
<tr>
<td style="min-width: 150px"><b>Sub Total</b></td>
<ng-container *ngFor="let val of col.value">
Expand All @@ -168,7 +168,7 @@
<td *ngIf="sectionIndicatorsValues.length > 1"></td>
</tr>
</ng-container>
<ng-container *ngIf="i === 17 && a !== 0">
<ng-container *ngIf="i === 16 && a !== 0">
<tr>
<td style="min-width: 150px"><b>Facility Total</b></td>
<ng-container *ngFor="let val of col.value">
Expand Down
Loading

0 comments on commit eaa29aa

Please sign in to comment.