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

POC-398 #1646

Merged
merged 11 commits into from
Aug 14, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ export class DefaulterListComponent implements OnInit {
width: 75,
field: 'latest_vl'
},
{
headerName: 'VL Category',
width: 150,
field: 'vl_category'
},
{
headerName: 'Latest VL Date',
width: 150,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ export class HivDifferentiatedCareComponent implements OnInit {
width: 100,
field: 'latest_vl'
},
{
headerName: 'VL Category',
width: 100,
field: 'vl_category'
},
{
headerName: 'Latest VL Date',
width: 150,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
[data]="dailyAppointmentsPatientList"
[extraColumns]="extraColumns"
[hivColumns]="true"
[excludecolumns]="true"
>
</patient-list>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,20 @@ export class DailyScheduleAppointmentsComponent implements OnInit, OnDestroy {
width: 100,
field: 'sms_receive_time'
},
{
headerName: 'VL Category',
width: 250,
field: 'vl_category'
},
{
headerName: 'SMS Delivery Status',
width: 100,
field: 'sms_delivery_status'
},
{
headerName: 'Latest VL',
width: 75,
field: 'latest_vl'
},
{
headerName: 'Latest VL Date',
width: 150,
field: 'latest_vl_date'
}
];
public errors: any[] = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,15 +246,13 @@ export class Moh731PatientListComponent implements OnInit, OnChanges {
cur_regimen_arv_start_date: 'Current ARV Regimen Start Date (edited)',
cur_arv_line: 'Current ARV Line (edited)',
cur_arv_meds: 'Current ARV Regimen',
vl_1: 'Viral Load',
vl_category: 'VL Category',
vl_1_date: 'Viral Load Date',
has_pending_vl_test: 'Pending Viral Load Test',
phone_number: 'Phone Number',
last_appointment: 'Latest Appointment',
patient_category: 'Patient Category',
latest_rtc_date: 'Latest RTC Date',
latest_vl: 'Latest VL',
vl_category: 'VL Category',
latest_vl_date: 'Latest VL Date',
previous_vl: 'Previous VL',
previous_vl_date: 'Previous VL Date',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ <h4>
[overrideColumns]="overrideColumns"
[data]="filteredData"
[hivColumns]="true"
[excludecolumns]="true"
></patient-list>
<div *ngIf="!isLoadingReport">
<p class="bg-info" style="padding: 4px">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class PatientsRequiringVLBaseComponent implements OnInit {
public extraColumns() {
return [
{
headerName: 'Most Recent VL',
headerName: 'Latest VL',
field: 'current_vl',
width: 110,
cellStyle: {
Expand All @@ -73,7 +73,7 @@ export class PatientsRequiringVLBaseComponent implements OnInit {
}
},
{
headerName: 'Most Recent VL Date',
headerName: 'Latest VL Date',
field: 'current_vl_date',
width: 140,
cellStyle: {
Expand All @@ -95,14 +95,6 @@ export class PatientsRequiringVLBaseComponent implements OnInit {
cellStyle: {
'white-space': 'normal'
}
},
{
headerName: 'VL Category',
field: 'vl_category',
width: 170,
cellStyle: {
'white-space': 'normal'
}
}
];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ export class PatientListColumns {

public static hivColumns() {
return [
{
headerName: 'VL Category',
width: 150,
field: 'vl_category'
},
{
headerName: 'Phone Number',
width: 150,
Expand Down Expand Up @@ -99,16 +104,6 @@ export class PatientListColumns {
width: 200,
field: 'cur_meds'
},
{
headerName: 'Latest VL',
width: 75,
field: 'latest_vl'
},
{
headerName: 'Latest VL Date',
width: 150,
field: 'latest_vl_date'
},
{
headerName: 'Previous VL',
width: 75,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export class PatientListComponent implements OnInit {
@Input() public overrideColumns: any;
@Input() public data: any = [];
@Input() public newList: any;
@Input() public excludecolumns: boolean;
public loadedTab: any;
@Input()
set options(value) {
Expand Down Expand Up @@ -58,6 +59,13 @@ export class PatientListComponent implements OnInit {
const loadHivColumns = PatientListColumns.hivColumns();
columns = _.concat(columns, loadHivColumns as Array<object>);
}

if (this.excludecolumns) {
const columnsToExclude = ['previous_vl', 'previous_vl_date'];
columns = _.filter(columns, (col) => {
return !_.includes(columnsToExclude, col['field']);
});
}
return columns;
}

Expand Down
Loading