From d6e0821764b95abc6be508989d59e6deb9b87e9e Mon Sep 17 00:00:00 2001 From: henrykorir Date: Fri, 12 Jan 2024 16:05:36 +0300 Subject: [PATCH 1/7] POC-610: Fixed DQA filter to be a ALL by default --- .../chart-abstraction-patientlist.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/hiv-care-lib/dqa-reports/chart-abstraction-patientlist/chart-abstraction-patientlist.component.ts b/src/app/hiv-care-lib/dqa-reports/chart-abstraction-patientlist/chart-abstraction-patientlist.component.ts index 468271f78..4746b83bc 100644 --- a/src/app/hiv-care-lib/dqa-reports/chart-abstraction-patientlist/chart-abstraction-patientlist.component.ts +++ b/src/app/hiv-care-lib/dqa-reports/chart-abstraction-patientlist/chart-abstraction-patientlist.component.ts @@ -42,7 +42,7 @@ export class ChartAbstractionPatientlistComponent implements OnInit { startDate: this.params.startDate, endDate: this.params.endDate, patientType: this.params.patientType, - limit: this.params.limit ? this.params.limit : 10, + limit: this.params.limit ? this.params.limit : 'all', offset: 0 }; this.getPatientList(requestParams); From 2e6f851a1e75657262620e9cc5fb678bbc62d0f5 Mon Sep 17 00:00:00 2001 From: henrykorir Date: Mon, 15 Jan 2024 15:31:16 +0300 Subject: [PATCH 2/7] POC-610: Updated DQA Indicators --- ...chart-abstraction-patientlist.component.ts | 203 +++++++++++------- 1 file changed, 121 insertions(+), 82 deletions(-) diff --git a/src/app/hiv-care-lib/dqa-reports/chart-abstraction-patientlist/chart-abstraction-patientlist.component.ts b/src/app/hiv-care-lib/dqa-reports/chart-abstraction-patientlist/chart-abstraction-patientlist.component.ts index 4746b83bc..8486c8e90 100644 --- a/src/app/hiv-care-lib/dqa-reports/chart-abstraction-patientlist/chart-abstraction-patientlist.component.ts +++ b/src/app/hiv-care-lib/dqa-reports/chart-abstraction-patientlist/chart-abstraction-patientlist.component.ts @@ -71,36 +71,46 @@ export class ChartAbstractionPatientlistComponent implements OnInit { hide = false; } const extraColumns = { - birthdate: 'DOB', - sex_gender: 'Gender', + NUPI: 'NUPI', + sex_gender: 'Sex', + birthdate: 'Date of Birth', + hiv_start_date: 'Date Confirmed HIV Positive', + arv_first_regimen_start_date: 'Date of ART Initiation', + arv_start_date: 'Date of Current ART Initiation', drugs_given: 'Current ART Regimen', + cur_arv_med_basis: 'Current ART Regimen', drugs_duration: 'Drug dosage given (duration)', - weight: 'Weight', - height: 'Height', - muac: 'MUAC', - BMI: 'BMI', + height: 'Height at Last visit', + weight: 'Weight at Last visit', + BMI: 'BMI at Last visit', + muac: 'MUAC at Last visit', + tb_screened_this_visit: 'Was TB Screening done at last visit', + tb_screening_result: 'TB Screening outcomes', + last_ipt_start_date: 'IPT start date', + tpt_status: 'IPT status', + ipt_completion_date: 'IPT outcome date', + viral_load_validity: 'Does the client have a Valid Viral load result', + vl_suppression: 'Is the client virally suppressed', + cd4_1: 'Baseline screening for CD4', + has_cd4_1: 'Does this client have Baseline screening for CD4', + is_crag_screened: 'Does this client have Baseline screening for CrAG', + last_clinical_encounter: 'Last clinical encounter date', sysBP: 'Systolic BP', dysBP: 'Diastolic BP', nutrition: 'Nutrition Assessment Done', DSD: 'DSD Model', - hiv_start_date: 'Date Confirmed HIV Positive', - arv_start_date: 'Date of ART Initiation', - cd4_1: 'Baseline CD4 Test Result', - vl_1: 'Latest Valid VL', - tpt_status: 'IPT Status', + // cd4_1: 'Baseline CD4 Test Result', + // vl_1: 'Latest Valid VL', + vl_1: 'Does the client have a Valid viral load result', ovcid_id: 'OVCID', - last_ipt_start_date: 'IPT Start Date', ipt_stop_date: 'IPT Stop Date', - ipt_completion_date: 'IPT Completion Date', - last_clinical_encounter: 'Last Clinical Encounter', - last_appointment_date: 'Date of Last Appointment', - next_appointment: 'Date of Next Appointment ', + // last_clinical_encounter: 'Last Clinical Encounter', + // last_appointment_date: 'Date of Last Appointment', + next_appointment: 'Next appointment date', + // next_appointment: 'Date of Next Appointment ', visit_type: 'Visit Type', - tb_screened_this_visit: 'TB screening', - tb_screening_result: 'TB Screening Outcomes', status: 'Status', - is_crag_screened: 'Baseline CrAG Screened', - vl_suppression: 'VL Suppression', + // is_crag_screened: 'Baseline CrAG Screened', cur_who_stage: 'Current Who Stage' }; for (const indicator in extraColumns) { @@ -112,63 +122,75 @@ export class ChartAbstractionPatientlistComponent implements OnInit { } } this.overrideColumns.push( + { field: 'ccc_number', hide: true, pinned: true }, { field: 'birthdate', - cellRenderer: (column) => { - if (column.value != null) { - return moment(column.value).format('YYYY-MM-DD'); - } - }, + // cellRenderer: (column) => { + // if (column.value != null) { + // // return moment(column.value).format('YYYY-MM-DD'); + // return moment(column.value).format('DD-MMM-YYYY'); + // } + // return 'missing'; + // }, pinned: false }, { - field: 'last_appointment_date', - cellRenderer: (column) => { - if (column.value != null) { - return moment(column.value).format('DD-MM-YYYY'); - } - } + field: 'last_appointment_date' + // cellRenderer: (column) => { + // if (column.value != null) { + // return moment(column.value).format('DD-MM-YYYY'); + // } + // } + }, + { + field: 'arv_first_regimen_start_date' + // cellRenderer: (column) => { + // if (column.value != null) { + // return moment(column.value).format('DD-MM-YYYY'); + // } + // } }, { field: 'arv_start_date', - cellRenderer: (column) => { - if (column.value != null) { - return moment(column.value).format('DD-MM-YYYY'); - } - } + // cellRenderer: (column) => { + // if (column.value != null) { + // return moment(column.value).format('DD-MM-YYYY'); + // } + // }, + hide: true }, { - field: 'hiv_start_date', - cellRenderer: (column) => { - if (column.value != null) { - return moment(column.value).format('DD-MM-YYYY'); - } - } + field: 'hiv_start_date' + // cellRenderer: (column) => { + // if (column.value != null) { + // return moment(column.value).format('DD-MM-YYYY'); + // } + // } }, { - field: 'last_clinical_encounter', - cellRenderer: (column) => { - if (column.value != null) { - return moment(column.value).format('DD-MM-YYYY'); - } - } + field: 'last_clinical_encounter' + // cellRenderer: (column) => { + // if (column.value != null) { + // return moment(column.value).format('DD-MM-YYYY'); + // } + // } }, { - field: 'next_appointment', - cellRenderer: (column) => { - if (column.value != null) { - return moment(column.value).format('DD-MM-YYYY'); - } - } + field: 'next_appointment' + // cellRenderer: (column) => { + // if (column.value != null) { + // return moment(column.value).format('DD-MM-YYYY'); + // } + // } }, { field: 'tb_screened_this_visit', width: 150, cellRenderer: (column) => { if (column.value === 0) { - return 'NO'; + return 'N'; } - return 'YES'; + return 'Y'; } }, { @@ -179,7 +201,7 @@ export class ChartAbstractionPatientlistComponent implements OnInit { } return column.value; }, - hide: false + hide: true }, { field: 'nutrition', @@ -193,43 +215,36 @@ export class ChartAbstractionPatientlistComponent implements OnInit { }, { field: 'last_ipt_start_date', - cellRenderer: (column) => { - if (column.value != null) { - return moment(column.value).format('DD-MM-YYYY'); - } - }, + // cellRenderer: (column) => { + // if (column.value != null) { + // return moment(column.value).format('DD-MM-YYYY'); + // } + // }, hide: false }, { field: 'ipt_completion_date', - cellRenderer: (column) => { - if (column.value != null) { - return moment(column.value).format('DD-MM-YYYY'); - } - }, + // cellRenderer: (column) => { + // if (column.value != null) { + // return moment(column.value).format('DD-MM-YYYY'); + // } + // }, hide: false }, { field: 'ipt_stop_date', - cellRenderer: (column) => { - if (column.value != null) { - return moment(column.value).format('DD-MM-YYYY'); - } - }, + // cellRenderer: (column) => { + // if (column.value != null) { + // return moment(column.value).format('DD-MM-YYYY'); + // } + // }, hide: true, suppressToolPanel: true }, - { - field: 'arv_start_date', - cellRenderer: (column) => { - if (column.value != null) { - return moment(column.value).format('DD-MM-YYYY'); - } - } - }, { field: 'drugs_given', - width: 280 + width: 280, + hide: true }, { field: 'height', @@ -264,8 +279,20 @@ export class ChartAbstractionPatientlistComponent implements OnInit { width: 150, pinned: true }, + { + field: 'upi_number', + width: 150, + hide: true, + pinned: true, + suppressToolPanel: true + }, { field: 'drugs_given', + width: 280, + hide: true + }, + { + field: 'cur_arv_med_basis', width: 280 }, { @@ -298,7 +325,9 @@ export class ChartAbstractionPatientlistComponent implements OnInit { }, { field: 'age', - width: 150 + width: 150, + hide: true, + suppressToolPanel: true }, { field: 'sex_gender', @@ -361,6 +390,16 @@ export class ChartAbstractionPatientlistComponent implements OnInit { field: 'is_crag_screened', width: 150, hide: false + }, + { + field: 'status', + width: 150, + hide: true + }, + { + field: 'cd4_1', + width: 150, + hide: true } ); } From 1070ad36daaac6c2b509098622fca55998d2d528 Mon Sep 17 00:00:00 2001 From: henrykorir Date: Mon, 15 Jan 2024 17:47:41 +0300 Subject: [PATCH 3/7] POC-610: Updated DQA columns as per request from Mosoriot --- .../chart-abstraction-patientlist.component.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/app/hiv-care-lib/dqa-reports/chart-abstraction-patientlist/chart-abstraction-patientlist.component.ts b/src/app/hiv-care-lib/dqa-reports/chart-abstraction-patientlist/chart-abstraction-patientlist.component.ts index 8486c8e90..b2a276c3d 100644 --- a/src/app/hiv-care-lib/dqa-reports/chart-abstraction-patientlist/chart-abstraction-patientlist.component.ts +++ b/src/app/hiv-care-lib/dqa-reports/chart-abstraction-patientlist/chart-abstraction-patientlist.component.ts @@ -111,7 +111,8 @@ export class ChartAbstractionPatientlistComponent implements OnInit { visit_type: 'Visit Type', status: 'Status', // is_crag_screened: 'Baseline CrAG Screened', - cur_who_stage: 'Current Who Stage' + cur_who_stage: 'Current Who Stage', + category: 'Category' }; for (const indicator in extraColumns) { if (indicator) { @@ -146,7 +147,10 @@ export class ChartAbstractionPatientlistComponent implements OnInit { field: 'arv_first_regimen_start_date' // cellRenderer: (column) => { // if (column.value != null) { - // return moment(column.value).format('DD-MM-YYYY'); + // if (moment(column.value).isBefore('1900-01-01', 'year')){ + // return column.value; + // } + // return '' // } // } }, @@ -188,9 +192,9 @@ export class ChartAbstractionPatientlistComponent implements OnInit { width: 150, cellRenderer: (column) => { if (column.value === 0) { - return 'N'; + return 'No'; } - return 'Y'; + return 'Yes'; } }, { @@ -276,8 +280,8 @@ export class ChartAbstractionPatientlistComponent implements OnInit { }, { field: 'NUPI', - width: 150, - pinned: true + width: 150 + // pinned: true }, { field: 'upi_number', From 3d3fcd2c917962df95f56f58d2cdc7f2d3e91ac2 Mon Sep 17 00:00:00 2001 From: henrykorir Date: Mon, 15 Jan 2024 15:31:16 +0300 Subject: [PATCH 4/7] POC-610: Updated DQA Indicators --- ...chart-abstraction-patientlist.component.ts | 203 +++++++++++------- 1 file changed, 121 insertions(+), 82 deletions(-) diff --git a/src/app/hiv-care-lib/dqa-reports/chart-abstraction-patientlist/chart-abstraction-patientlist.component.ts b/src/app/hiv-care-lib/dqa-reports/chart-abstraction-patientlist/chart-abstraction-patientlist.component.ts index 4746b83bc..8486c8e90 100644 --- a/src/app/hiv-care-lib/dqa-reports/chart-abstraction-patientlist/chart-abstraction-patientlist.component.ts +++ b/src/app/hiv-care-lib/dqa-reports/chart-abstraction-patientlist/chart-abstraction-patientlist.component.ts @@ -71,36 +71,46 @@ export class ChartAbstractionPatientlistComponent implements OnInit { hide = false; } const extraColumns = { - birthdate: 'DOB', - sex_gender: 'Gender', + NUPI: 'NUPI', + sex_gender: 'Sex', + birthdate: 'Date of Birth', + hiv_start_date: 'Date Confirmed HIV Positive', + arv_first_regimen_start_date: 'Date of ART Initiation', + arv_start_date: 'Date of Current ART Initiation', drugs_given: 'Current ART Regimen', + cur_arv_med_basis: 'Current ART Regimen', drugs_duration: 'Drug dosage given (duration)', - weight: 'Weight', - height: 'Height', - muac: 'MUAC', - BMI: 'BMI', + height: 'Height at Last visit', + weight: 'Weight at Last visit', + BMI: 'BMI at Last visit', + muac: 'MUAC at Last visit', + tb_screened_this_visit: 'Was TB Screening done at last visit', + tb_screening_result: 'TB Screening outcomes', + last_ipt_start_date: 'IPT start date', + tpt_status: 'IPT status', + ipt_completion_date: 'IPT outcome date', + viral_load_validity: 'Does the client have a Valid Viral load result', + vl_suppression: 'Is the client virally suppressed', + cd4_1: 'Baseline screening for CD4', + has_cd4_1: 'Does this client have Baseline screening for CD4', + is_crag_screened: 'Does this client have Baseline screening for CrAG', + last_clinical_encounter: 'Last clinical encounter date', sysBP: 'Systolic BP', dysBP: 'Diastolic BP', nutrition: 'Nutrition Assessment Done', DSD: 'DSD Model', - hiv_start_date: 'Date Confirmed HIV Positive', - arv_start_date: 'Date of ART Initiation', - cd4_1: 'Baseline CD4 Test Result', - vl_1: 'Latest Valid VL', - tpt_status: 'IPT Status', + // cd4_1: 'Baseline CD4 Test Result', + // vl_1: 'Latest Valid VL', + vl_1: 'Does the client have a Valid viral load result', ovcid_id: 'OVCID', - last_ipt_start_date: 'IPT Start Date', ipt_stop_date: 'IPT Stop Date', - ipt_completion_date: 'IPT Completion Date', - last_clinical_encounter: 'Last Clinical Encounter', - last_appointment_date: 'Date of Last Appointment', - next_appointment: 'Date of Next Appointment ', + // last_clinical_encounter: 'Last Clinical Encounter', + // last_appointment_date: 'Date of Last Appointment', + next_appointment: 'Next appointment date', + // next_appointment: 'Date of Next Appointment ', visit_type: 'Visit Type', - tb_screened_this_visit: 'TB screening', - tb_screening_result: 'TB Screening Outcomes', status: 'Status', - is_crag_screened: 'Baseline CrAG Screened', - vl_suppression: 'VL Suppression', + // is_crag_screened: 'Baseline CrAG Screened', cur_who_stage: 'Current Who Stage' }; for (const indicator in extraColumns) { @@ -112,63 +122,75 @@ export class ChartAbstractionPatientlistComponent implements OnInit { } } this.overrideColumns.push( + { field: 'ccc_number', hide: true, pinned: true }, { field: 'birthdate', - cellRenderer: (column) => { - if (column.value != null) { - return moment(column.value).format('YYYY-MM-DD'); - } - }, + // cellRenderer: (column) => { + // if (column.value != null) { + // // return moment(column.value).format('YYYY-MM-DD'); + // return moment(column.value).format('DD-MMM-YYYY'); + // } + // return 'missing'; + // }, pinned: false }, { - field: 'last_appointment_date', - cellRenderer: (column) => { - if (column.value != null) { - return moment(column.value).format('DD-MM-YYYY'); - } - } + field: 'last_appointment_date' + // cellRenderer: (column) => { + // if (column.value != null) { + // return moment(column.value).format('DD-MM-YYYY'); + // } + // } + }, + { + field: 'arv_first_regimen_start_date' + // cellRenderer: (column) => { + // if (column.value != null) { + // return moment(column.value).format('DD-MM-YYYY'); + // } + // } }, { field: 'arv_start_date', - cellRenderer: (column) => { - if (column.value != null) { - return moment(column.value).format('DD-MM-YYYY'); - } - } + // cellRenderer: (column) => { + // if (column.value != null) { + // return moment(column.value).format('DD-MM-YYYY'); + // } + // }, + hide: true }, { - field: 'hiv_start_date', - cellRenderer: (column) => { - if (column.value != null) { - return moment(column.value).format('DD-MM-YYYY'); - } - } + field: 'hiv_start_date' + // cellRenderer: (column) => { + // if (column.value != null) { + // return moment(column.value).format('DD-MM-YYYY'); + // } + // } }, { - field: 'last_clinical_encounter', - cellRenderer: (column) => { - if (column.value != null) { - return moment(column.value).format('DD-MM-YYYY'); - } - } + field: 'last_clinical_encounter' + // cellRenderer: (column) => { + // if (column.value != null) { + // return moment(column.value).format('DD-MM-YYYY'); + // } + // } }, { - field: 'next_appointment', - cellRenderer: (column) => { - if (column.value != null) { - return moment(column.value).format('DD-MM-YYYY'); - } - } + field: 'next_appointment' + // cellRenderer: (column) => { + // if (column.value != null) { + // return moment(column.value).format('DD-MM-YYYY'); + // } + // } }, { field: 'tb_screened_this_visit', width: 150, cellRenderer: (column) => { if (column.value === 0) { - return 'NO'; + return 'N'; } - return 'YES'; + return 'Y'; } }, { @@ -179,7 +201,7 @@ export class ChartAbstractionPatientlistComponent implements OnInit { } return column.value; }, - hide: false + hide: true }, { field: 'nutrition', @@ -193,43 +215,36 @@ export class ChartAbstractionPatientlistComponent implements OnInit { }, { field: 'last_ipt_start_date', - cellRenderer: (column) => { - if (column.value != null) { - return moment(column.value).format('DD-MM-YYYY'); - } - }, + // cellRenderer: (column) => { + // if (column.value != null) { + // return moment(column.value).format('DD-MM-YYYY'); + // } + // }, hide: false }, { field: 'ipt_completion_date', - cellRenderer: (column) => { - if (column.value != null) { - return moment(column.value).format('DD-MM-YYYY'); - } - }, + // cellRenderer: (column) => { + // if (column.value != null) { + // return moment(column.value).format('DD-MM-YYYY'); + // } + // }, hide: false }, { field: 'ipt_stop_date', - cellRenderer: (column) => { - if (column.value != null) { - return moment(column.value).format('DD-MM-YYYY'); - } - }, + // cellRenderer: (column) => { + // if (column.value != null) { + // return moment(column.value).format('DD-MM-YYYY'); + // } + // }, hide: true, suppressToolPanel: true }, - { - field: 'arv_start_date', - cellRenderer: (column) => { - if (column.value != null) { - return moment(column.value).format('DD-MM-YYYY'); - } - } - }, { field: 'drugs_given', - width: 280 + width: 280, + hide: true }, { field: 'height', @@ -264,8 +279,20 @@ export class ChartAbstractionPatientlistComponent implements OnInit { width: 150, pinned: true }, + { + field: 'upi_number', + width: 150, + hide: true, + pinned: true, + suppressToolPanel: true + }, { field: 'drugs_given', + width: 280, + hide: true + }, + { + field: 'cur_arv_med_basis', width: 280 }, { @@ -298,7 +325,9 @@ export class ChartAbstractionPatientlistComponent implements OnInit { }, { field: 'age', - width: 150 + width: 150, + hide: true, + suppressToolPanel: true }, { field: 'sex_gender', @@ -361,6 +390,16 @@ export class ChartAbstractionPatientlistComponent implements OnInit { field: 'is_crag_screened', width: 150, hide: false + }, + { + field: 'status', + width: 150, + hide: true + }, + { + field: 'cd4_1', + width: 150, + hide: true } ); } From eb670c5ff75bb136f22314814c0a86d4d5cd2837 Mon Sep 17 00:00:00 2001 From: henrykorir Date: Mon, 15 Jan 2024 17:47:41 +0300 Subject: [PATCH 5/7] POC-610: Updated DQA columns as per request from Mosoriot --- .../chart-abstraction-patientlist.component.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/app/hiv-care-lib/dqa-reports/chart-abstraction-patientlist/chart-abstraction-patientlist.component.ts b/src/app/hiv-care-lib/dqa-reports/chart-abstraction-patientlist/chart-abstraction-patientlist.component.ts index 8486c8e90..b2a276c3d 100644 --- a/src/app/hiv-care-lib/dqa-reports/chart-abstraction-patientlist/chart-abstraction-patientlist.component.ts +++ b/src/app/hiv-care-lib/dqa-reports/chart-abstraction-patientlist/chart-abstraction-patientlist.component.ts @@ -111,7 +111,8 @@ export class ChartAbstractionPatientlistComponent implements OnInit { visit_type: 'Visit Type', status: 'Status', // is_crag_screened: 'Baseline CrAG Screened', - cur_who_stage: 'Current Who Stage' + cur_who_stage: 'Current Who Stage', + category: 'Category' }; for (const indicator in extraColumns) { if (indicator) { @@ -146,7 +147,10 @@ export class ChartAbstractionPatientlistComponent implements OnInit { field: 'arv_first_regimen_start_date' // cellRenderer: (column) => { // if (column.value != null) { - // return moment(column.value).format('DD-MM-YYYY'); + // if (moment(column.value).isBefore('1900-01-01', 'year')){ + // return column.value; + // } + // return '' // } // } }, @@ -188,9 +192,9 @@ export class ChartAbstractionPatientlistComponent implements OnInit { width: 150, cellRenderer: (column) => { if (column.value === 0) { - return 'N'; + return 'No'; } - return 'Y'; + return 'Yes'; } }, { @@ -276,8 +280,8 @@ export class ChartAbstractionPatientlistComponent implements OnInit { }, { field: 'NUPI', - width: 150, - pinned: true + width: 150 + // pinned: true }, { field: 'upi_number', From 16142b18695da44e94436f7e918141d8f478bea5 Mon Sep 17 00:00:00 2001 From: henrykorir Date: Tue, 16 Jan 2024 11:55:26 +0300 Subject: [PATCH 6/7] POC-610: Fixed documentation of TB Screening --- ...chart-abstraction-patientlist.component.ts | 138 +++++++++--------- 1 file changed, 68 insertions(+), 70 deletions(-) diff --git a/src/app/hiv-care-lib/dqa-reports/chart-abstraction-patientlist/chart-abstraction-patientlist.component.ts b/src/app/hiv-care-lib/dqa-reports/chart-abstraction-patientlist/chart-abstraction-patientlist.component.ts index b2a276c3d..006a5cc7a 100644 --- a/src/app/hiv-care-lib/dqa-reports/chart-abstraction-patientlist/chart-abstraction-patientlist.component.ts +++ b/src/app/hiv-care-lib/dqa-reports/chart-abstraction-patientlist/chart-abstraction-patientlist.component.ts @@ -74,6 +74,7 @@ export class ChartAbstractionPatientlistComponent implements OnInit { NUPI: 'NUPI', sex_gender: 'Sex', birthdate: 'Date of Birth', + age: 'Age', hiv_start_date: 'Date Confirmed HIV Positive', arv_first_regimen_start_date: 'Date of ART Initiation', arv_start_date: 'Date of Current ART Initiation', @@ -126,77 +127,75 @@ export class ChartAbstractionPatientlistComponent implements OnInit { { field: 'ccc_number', hide: true, pinned: true }, { field: 'birthdate', - // cellRenderer: (column) => { - // if (column.value != null) { - // // return moment(column.value).format('YYYY-MM-DD'); - // return moment(column.value).format('DD-MMM-YYYY'); - // } - // return 'missing'; - // }, - pinned: false + cellRenderer: (column) => { + if (column.value != null && column.value !== '') { + // return moment(column.value).format('YYYY-MM-DD'); + return moment(column.value).format('DD-MMM-YYYY'); + } + } + // pinned: false }, { - field: 'last_appointment_date' - // cellRenderer: (column) => { - // if (column.value != null) { - // return moment(column.value).format('DD-MM-YYYY'); - // } - // } + field: 'last_appointment_date', + cellRenderer: (column) => { + if (column.value != null && column.value !== '') { + return moment(column.value).format('DD-MMM-YYYY'); + } + } }, { - field: 'arv_first_regimen_start_date' - // cellRenderer: (column) => { - // if (column.value != null) { - // if (moment(column.value).isBefore('1900-01-01', 'year')){ - // return column.value; - // } - // return '' - // } - // } + field: 'arv_first_regimen_start_date', + cellRenderer: (column) => { + if (column.value != null && column.value !== '') { + return moment(column.value).format('DD-MMM-YYYY'); + } + } }, { field: 'arv_start_date', - // cellRenderer: (column) => { - // if (column.value != null) { - // return moment(column.value).format('DD-MM-YYYY'); - // } - // }, + cellRenderer: (column) => { + if (column.value != null && column.value !== '') { + return moment(column.value).format('DD-MMM-YYYY'); + } + }, hide: true }, { - field: 'hiv_start_date' - // cellRenderer: (column) => { - // if (column.value != null) { - // return moment(column.value).format('DD-MM-YYYY'); - // } - // } - }, - { - field: 'last_clinical_encounter' - // cellRenderer: (column) => { - // if (column.value != null) { - // return moment(column.value).format('DD-MM-YYYY'); - // } - // } + field: 'hiv_start_date', + cellRenderer: (column) => { + if (column.value != null && column.value !== '') { + return moment(column.value).format('DD-MMM-YYYY'); + } + } }, { - field: 'next_appointment' - // cellRenderer: (column) => { - // if (column.value != null) { - // return moment(column.value).format('DD-MM-YYYY'); - // } - // } + field: 'last_clinical_encounter', + cellRenderer: (column) => { + if (column.value != null && column.value !== '') { + return moment(column.value).format('DD-MMM-YYYY'); + } + } }, { - field: 'tb_screened_this_visit', - width: 150, + field: 'next_appointment', cellRenderer: (column) => { - if (column.value === 0) { - return 'No'; + if (column.value != null && column.value !== '') { + return moment(column.value).format('DD-MMM-YYYY'); } - return 'Yes'; } }, + { + field: 'tb_screened_this_visit' + // width: 150, + // cellRenderer: (column) => { + // if (column.value === 1) { + // return 'Yes'; + // } else if (column.value === 0) { + // return 'No'; + // } + // return 'Not Documented'; + // } + }, { field: 'vl_1', cellRenderer: (column) => { @@ -219,29 +218,29 @@ export class ChartAbstractionPatientlistComponent implements OnInit { }, { field: 'last_ipt_start_date', - // cellRenderer: (column) => { - // if (column.value != null) { - // return moment(column.value).format('DD-MM-YYYY'); - // } - // }, + cellRenderer: (column) => { + if (column.value != null && column.value !== '') { + return moment(column.value).format('DD-MMM-YYYY'); + } + }, hide: false }, { field: 'ipt_completion_date', - // cellRenderer: (column) => { - // if (column.value != null) { - // return moment(column.value).format('DD-MM-YYYY'); - // } - // }, + cellRenderer: (column) => { + if (column.value != null && column.value !== '') { + return moment(column.value).format('DD-MMM-YYYY'); + } + }, hide: false }, { field: 'ipt_stop_date', - // cellRenderer: (column) => { - // if (column.value != null) { - // return moment(column.value).format('DD-MM-YYYY'); - // } - // }, + cellRenderer: (column) => { + if (column.value != null && column.value !== '') { + return moment(column.value).format('DD-MMM-YYYY'); + } + }, hide: true, suppressToolPanel: true }, @@ -330,8 +329,7 @@ export class ChartAbstractionPatientlistComponent implements OnInit { { field: 'age', width: 150, - hide: true, - suppressToolPanel: true + hide: true }, { field: 'sex_gender', From e49dd7b69f88207d5c33500e85ccf783bc97dcce Mon Sep 17 00:00:00 2001 From: henrykorir Date: Wed, 17 Jan 2024 11:17:59 +0300 Subject: [PATCH 7/7] POC-610: Updated date formatting --- ...chart-abstraction-patientlist.component.ts | 120 +++++++++--------- 1 file changed, 60 insertions(+), 60 deletions(-) diff --git a/src/app/hiv-care-lib/dqa-reports/chart-abstraction-patientlist/chart-abstraction-patientlist.component.ts b/src/app/hiv-care-lib/dqa-reports/chart-abstraction-patientlist/chart-abstraction-patientlist.component.ts index 006a5cc7a..81d74daae 100644 --- a/src/app/hiv-care-lib/dqa-reports/chart-abstraction-patientlist/chart-abstraction-patientlist.component.ts +++ b/src/app/hiv-care-lib/dqa-reports/chart-abstraction-patientlist/chart-abstraction-patientlist.component.ts @@ -73,11 +73,11 @@ export class ChartAbstractionPatientlistComponent implements OnInit { const extraColumns = { NUPI: 'NUPI', sex_gender: 'Sex', - birthdate: 'Date of Birth', + birthdate: 'Date of Birth (DD/MM/YYYY)', age: 'Age', - hiv_start_date: 'Date Confirmed HIV Positive', - arv_first_regimen_start_date: 'Date of ART Initiation', - arv_start_date: 'Date of Current ART Initiation', + hiv_start_date: 'Date Confirmed HIV Positive (DD/MM/YYYY)', + arv_first_regimen_start_date: 'Date of ART Initiation (DD/MM/YYYY)', + arv_start_date: 'Date of Current ART Initiation (DD/MM/YYYY)', drugs_given: 'Current ART Regimen', cur_arv_med_basis: 'Current ART Regimen', drugs_duration: 'Drug dosage given (duration)', @@ -95,7 +95,7 @@ export class ChartAbstractionPatientlistComponent implements OnInit { cd4_1: 'Baseline screening for CD4', has_cd4_1: 'Does this client have Baseline screening for CD4', is_crag_screened: 'Does this client have Baseline screening for CrAG', - last_clinical_encounter: 'Last clinical encounter date', + last_clinical_encounter: 'Last clinical encounter date (DD/MM/YYYY)', sysBP: 'Systolic BP', dysBP: 'Diastolic BP', nutrition: 'Nutrition Assessment Done', @@ -104,10 +104,10 @@ export class ChartAbstractionPatientlistComponent implements OnInit { // vl_1: 'Latest Valid VL', vl_1: 'Does the client have a Valid viral load result', ovcid_id: 'OVCID', - ipt_stop_date: 'IPT Stop Date', + ipt_stop_date: 'IPT Stop Date (DD/MM/YYYY)', // last_clinical_encounter: 'Last Clinical Encounter', // last_appointment_date: 'Date of Last Appointment', - next_appointment: 'Next appointment date', + next_appointment: 'Next appointment date (DD/MM/YYYY)', // next_appointment: 'Date of Next Appointment ', visit_type: 'Visit Type', status: 'Status', @@ -126,63 +126,63 @@ export class ChartAbstractionPatientlistComponent implements OnInit { this.overrideColumns.push( { field: 'ccc_number', hide: true, pinned: true }, { - field: 'birthdate', - cellRenderer: (column) => { - if (column.value != null && column.value !== '') { - // return moment(column.value).format('YYYY-MM-DD'); - return moment(column.value).format('DD-MMM-YYYY'); - } - } + field: 'birthdate' + // cellRenderer: (column) => { + // if (column.value != null && column.value !== '') { + // // return moment(column.value).format('YYYY-MM-DD'); + // return moment(column.value).format('DD/MM/YYYY'); + // } + // }, // pinned: false }, { - field: 'last_appointment_date', - cellRenderer: (column) => { - if (column.value != null && column.value !== '') { - return moment(column.value).format('DD-MMM-YYYY'); - } - } + field: 'last_appointment_date' + // cellRenderer: (column) => { + // if (column.value != null && column.value !== '') { + // return moment(column.value).format('DD/MM/YYYY'); + // } + // } }, { - field: 'arv_first_regimen_start_date', - cellRenderer: (column) => { - if (column.value != null && column.value !== '') { - return moment(column.value).format('DD-MMM-YYYY'); - } - } + field: 'arv_first_regimen_start_date' + // cellRenderer: (column) => { + // if (column.value != null && column.value !== '') { + // return moment(column.value).format('DD/MM/YYYY'); + // } + // } }, { field: 'arv_start_date', cellRenderer: (column) => { if (column.value != null && column.value !== '') { - return moment(column.value).format('DD-MMM-YYYY'); + return moment(column.value).format('DD/MM/YYYY'); } }, hide: true }, { - field: 'hiv_start_date', - cellRenderer: (column) => { - if (column.value != null && column.value !== '') { - return moment(column.value).format('DD-MMM-YYYY'); - } - } + field: 'hiv_start_date' + // cellRenderer: (column) => { + // if (column.value != null && column.value !== '') { + // return moment(column.value)..format('DD/MM/YYYY');; + // } + // } }, { - field: 'last_clinical_encounter', - cellRenderer: (column) => { - if (column.value != null && column.value !== '') { - return moment(column.value).format('DD-MMM-YYYY'); - } - } + field: 'last_clinical_encounter' + // cellRenderer: (column) => { + // if (column.value != null && column.value !== '') { + // return moment(column.value)..format('DD/MM/YYYY');; + // } + // } }, { - field: 'next_appointment', - cellRenderer: (column) => { - if (column.value != null && column.value !== '') { - return moment(column.value).format('DD-MMM-YYYY'); - } - } + field: 'next_appointment' + // cellRenderer: (column) => { + // if (column.value != null && column.value !== '') { + // return moment(column.value)..format('DD/MM/YYYY');; + // } + // } }, { field: 'tb_screened_this_visit' @@ -217,28 +217,28 @@ export class ChartAbstractionPatientlistComponent implements OnInit { } }, { - field: 'last_ipt_start_date', - cellRenderer: (column) => { - if (column.value != null && column.value !== '') { - return moment(column.value).format('DD-MMM-YYYY'); - } - }, - hide: false + field: 'last_ipt_start_date' + // cellRenderer: (column) => { + // if (column.value != null && column.value !== '') { + // return moment(column.value)..format('DD/MM/YYYY');; + // } + // }, + // hide: false }, { - field: 'ipt_completion_date', - cellRenderer: (column) => { - if (column.value != null && column.value !== '') { - return moment(column.value).format('DD-MMM-YYYY'); - } - }, - hide: false + field: 'ipt_completion_date' + // cellRenderer: (column) => { + // if (column.value != null && column.value !== '') { + // return moment(column.value)..format('DD/MM/YYYY');; + // } + // }, + // hide: false }, { field: 'ipt_stop_date', cellRenderer: (column) => { if (column.value != null && column.value !== '') { - return moment(column.value).format('DD-MMM-YYYY'); + return moment(column.value).format('DD/MM/YYYY'); } }, hide: true,