From aed27120c1401f9738332318fdf9b5514719291e Mon Sep 17 00:00:00 2001 From: Alfred Mutai <124869802+Alfred-Mutai@users.noreply.github.com> Date: Mon, 5 Feb 2024 16:24:33 +0300 Subject: [PATCH 1/3] Could not generate Jan datim reports for those doing comparison with previous month (#1709) --- .../datim-reports/tx-rtt-report.component.ts | 19 +++++++------------ .../tx-ml-report/tx-ml-report.component.ts | 19 +++++++------------ 2 files changed, 14 insertions(+), 24 deletions(-) diff --git a/src/app/data-analytics-dashboard/hiv/datim-reports/tx-rtt-report.component.ts b/src/app/data-analytics-dashboard/hiv/datim-reports/tx-rtt-report.component.ts index 919da8913..359d27c78 100644 --- a/src/app/data-analytics-dashboard/hiv/datim-reports/tx-rtt-report.component.ts +++ b/src/app/data-analytics-dashboard/hiv/datim-reports/tx-rtt-report.component.ts @@ -58,7 +58,7 @@ export class TxRttReportComponent this.errorMessage = 'Locations are required!'; } } - public getDates(currentEndDate) { + public getDates(currentEndDate: string) { // Convert the currentEndDate string to a Date object const currentDate = new Date(currentEndDate); @@ -67,24 +67,19 @@ export class TxRttReportComponent const currentYear = currentDate.getFullYear(); // Calculate the previous month's last date + const previousMonth = currentMonth === 0 ? 11 : currentMonth - 1; // Adjust for January + const previousYear = currentMonth === 0 ? currentYear - 1 : currentYear; // Subtract one year if current month is January const previousMonthLastDate = new Date( - currentYear, - currentMonth, - 0 - ).getDate(); - - // Calculate the current month's end date - const currentMonthEndDate = new Date( - currentYear, - currentMonth + 1, + previousYear, + previousMonth + 1, 0 ).getDate(); // Format the dates as strings in the "YYYY-MM-DD" format const previousMonthLastDateString = - currentYear + + previousYear + '-' + - currentMonth.toString().padStart(2, '0') + + (previousMonth + 1).toString().padStart(2, '0') + '-' + previousMonthLastDate.toString().padStart(2, '0'); const currentMonthEndDateString = currentEndDate; diff --git a/src/app/data-analytics-dashboard/hiv/tx-ml-report/tx-ml-report.component.ts b/src/app/data-analytics-dashboard/hiv/tx-ml-report/tx-ml-report.component.ts index feae967a4..66bf1e26e 100644 --- a/src/app/data-analytics-dashboard/hiv/tx-ml-report/tx-ml-report.component.ts +++ b/src/app/data-analytics-dashboard/hiv/tx-ml-report/tx-ml-report.component.ts @@ -121,7 +121,7 @@ export class TxMlReportComponent }; } - public getDates(currentEndDate) { + public getDates(currentEndDate: string) { // Convert the currentEndDate string to a Date object const currentDate = new Date(currentEndDate); @@ -130,24 +130,19 @@ export class TxMlReportComponent const currentYear = currentDate.getFullYear(); // Calculate the previous month's last date + const previousMonth = currentMonth === 0 ? 11 : currentMonth - 1; // Adjust for January + const previousYear = currentMonth === 0 ? currentYear - 1 : currentYear; // Subtract one year if current month is January const previousMonthLastDate = new Date( - currentYear, - currentMonth, - 0 - ).getDate(); - - // Calculate the current month's end date - const currentMonthEndDate = new Date( - currentYear, - currentMonth + 1, + previousYear, + previousMonth + 1, 0 ).getDate(); // Format the dates as strings in the "YYYY-MM-DD" format const previousMonthLastDateString = - currentYear + + previousYear + '-' + - currentMonth.toString().padStart(2, '0') + + (previousMonth + 1).toString().padStart(2, '0') + '-' + previousMonthLastDate.toString().padStart(2, '0'); const currentMonthEndDateString = currentEndDate; From cb44ba3d0f249becadec52ad0bed951b22b53a7d Mon Sep 17 00:00:00 2001 From: Alfred Mutai <124869802+Alfred-Mutai@users.noreply.github.com> Date: Wed, 7 Feb 2024 14:04:22 +0300 Subject: [PATCH 2/3] POC-649: Update DATIM patient list to meet new requirements (#1713) * Update DATIM patient list to meet new requirements * Update DATIM patient list to meet new requirements --- .../tx-curr-report-patient-list.component.ts | 3 +++ .../tx-ml-report-patient-list.component.ts | 3 +++ .../tx-mmd-report-patient-list.component.ts | 3 +++ .../tx-new-report-patient-list.component.ts | 3 +++ .../tx-rtt-report-patient-list.component.ts | 3 +++ 5 files changed, 15 insertions(+) diff --git a/src/app/hiv-care-lib/tx-curr-report/tx-curr-report-patient-list/tx-curr-report-patient-list.component.ts b/src/app/hiv-care-lib/tx-curr-report/tx-curr-report-patient-list/tx-curr-report-patient-list.component.ts index 44018923b..c8e8a0f4c 100644 --- a/src/app/hiv-care-lib/tx-curr-report/tx-curr-report-patient-list/tx-curr-report-patient-list.component.ts +++ b/src/app/hiv-care-lib/tx-curr-report/tx-curr-report-patient-list/tx-curr-report-patient-list.component.ts @@ -56,12 +56,15 @@ export class TxCurrReportPatientListComponent implements OnInit { public addExtraColumns() { const extraColumns = { + weight: 'Weight', phone_number: 'Phone', enrollment_date: 'Enrolment Date', last_appointment: 'Last Appointment', latest_rtc_date: 'Latest RTC Date', days_since_rtc_date: 'Days since RTC', arv_first_regimen: 'ARV first regimen', + cd4_1: 'CD4', + cd4_1_date: 'CD4 Date', arv_first_regimen_start_date: 'First ARV start date', cur_meds: 'Current Regimen', cur_arv_line: 'Current ARV Line', 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 b489dc493..5cc0afd57 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 @@ -54,12 +54,15 @@ export class TxMlReportPatientListComponent implements OnInit { public addExtraColumns() { const extraColumns = { + weight: 'Weight', phone_number: 'Phone', enrollment_date: 'Enrolment Date', last_appointment: 'Last Appointment', latest_rtc_date: 'Latest RTC Date', days_since_rtc_date: 'Days since RTC', arv_first_regimen: 'ARV first regimen', + cd4_1: 'CD4', + cd4_1_date: 'CD4 Date', arv_first_regimen_start_date: 'First ARV start date', cur_meds: 'Current Regimen', cur_arv_line: 'Current ARV Line', diff --git a/src/app/hiv-care-lib/tx-mmd-report/tx-mmd-report-patient-list/tx-mmd-report-patient-list.component.ts b/src/app/hiv-care-lib/tx-mmd-report/tx-mmd-report-patient-list/tx-mmd-report-patient-list.component.ts index 1baa46394..726eb925a 100644 --- a/src/app/hiv-care-lib/tx-mmd-report/tx-mmd-report-patient-list/tx-mmd-report-patient-list.component.ts +++ b/src/app/hiv-care-lib/tx-mmd-report/tx-mmd-report-patient-list/tx-mmd-report-patient-list.component.ts @@ -54,12 +54,15 @@ export class TxMmdReportPatientListComponent implements OnInit { public addExtraColumns() { const extraColumns = { + weight: 'Weight', phone_number: 'Phone', enrollment_date: 'Enrolment Date', last_appointment: 'Last Appointment', latest_rtc_date: 'Latest RTC Date', days_since_rtc_date: 'Days since RTC', arv_first_regimen: 'ARV first regimen', + cd4_1: 'CD4', + cd4_1_date: 'CD4 Date', arv_first_regimen_start_date: 'First ARV start date', cur_meds: 'Current Regimen', cur_arv_line: 'Current ARV Line', diff --git a/src/app/hiv-care-lib/tx-new-report/tx-new-report-patient-list/tx-new-report-patient-list.component.ts b/src/app/hiv-care-lib/tx-new-report/tx-new-report-patient-list/tx-new-report-patient-list.component.ts index d86698cf0..557c3cea0 100644 --- a/src/app/hiv-care-lib/tx-new-report/tx-new-report-patient-list/tx-new-report-patient-list.component.ts +++ b/src/app/hiv-care-lib/tx-new-report/tx-new-report-patient-list/tx-new-report-patient-list.component.ts @@ -54,12 +54,15 @@ export class TxNewReportPatientListComponent implements OnInit { public addExtraColumns() { const extraColumns = { + weight: 'Weight', phone_number: 'Phone', enrollment_date: 'Enrolment Date', last_appointment: 'Last Appointment', latest_rtc_date: 'Latest RTC Date', days_since_rtc_date: 'Days since RTC', arv_first_regimen: 'ARV first regimen', + cd4_1: 'CD4', + cd4_1_date: 'CD4 Date', arv_first_regimen_start_date: 'First ARV start date', cur_meds: 'Current Regimen', cur_arv_line: 'Current ARV Line', diff --git a/src/app/hiv-care-lib/tx-rtt-report/tx-rtt-report-patient-list/tx-rtt-report-patient-list.component.ts b/src/app/hiv-care-lib/tx-rtt-report/tx-rtt-report-patient-list/tx-rtt-report-patient-list.component.ts index d813f7e9a..9346a5fb5 100644 --- a/src/app/hiv-care-lib/tx-rtt-report/tx-rtt-report-patient-list/tx-rtt-report-patient-list.component.ts +++ b/src/app/hiv-care-lib/tx-rtt-report/tx-rtt-report-patient-list/tx-rtt-report-patient-list.component.ts @@ -54,12 +54,15 @@ export class TxRttReportPatientListComponent implements OnInit { public addExtraColumns() { const extraColumns = { + weight: 'Weight', phone_number: 'Phone', enrollment_date: 'Enrolment Date', last_appointment: 'Last Appointment', latest_rtc_date: 'Latest RTC Date', days_since_rtc_date: 'Days since RTC', arv_first_regimen: 'ARV first regimen', + cd4_1: 'CD4', + cd4_1_date: 'CD4 Date', arv_first_regimen_start_date: 'First ARV start date', cur_meds: 'Current Regimen', cur_arv_line: 'Current ARV Line', From 401de18f672e7321314137cc5695454beb44763b Mon Sep 17 00:00:00 2001 From: Henry Korir <5462699+henrykorir@users.noreply.github.com> Date: Wed, 14 Feb 2024 10:29:29 +0300 Subject: [PATCH 3/3] POC-651: Enhancement of DQA Report (#1714) POC-651: Enhancement of DQA Report POC-651: Enhancement of DQA Report POC-651: Enhancement of DQA Report --- ...chart-abstraction-patientlist.component.ts | 205 +++++++++--------- 1 file changed, 102 insertions(+), 103 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 86c445237..e29f65ac9 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,25 +73,28 @@ export class ChartAbstractionPatientlistComponent implements OnInit { const extraColumns = { NUPI: 'NUPI', sex_gender: 'Sex', + height: 'Height', + weight: 'Weight', birthdate: 'Date of Birth (DD/MM/YYYY)', hiv_start_date: 'Date Confirmed HIV Positive (DD/MM/YYYY)', arv_first_regimen_start_date: 'Date of ART Initiation (DD/MM/YYYY)', + cd4_1: 'Baseline CD4', + vl_1: 'Viral Load Results', arv_start_date: 'Date of Current ART Initiation (DD/MM/YYYY)', - drugs_given: 'Current ART Regimen', - cur_arv_med_basis: 'Current ART Regimen', + drugs_given: 'Current Regimen', + cur_arv_med_basis: 'Current ART Regimen Basis', drugs_duration: 'Drug dosage given (duration)', - 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', + pcp_prophylaxis: 'PCP Prophylaxis', + ctx_dispensed: 'CTX Dispensed', tb_screening_result: 'TB Screening outcomes', last_ipt_start_date: 'IPT start date (DD/MM/YYYY)', tpt_status: 'IPT status', ipt_completion_date: 'IPT outcome date (DD/MM/YYYY)', 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 (DD/MM/YYYY)', @@ -99,20 +102,16 @@ export class ChartAbstractionPatientlistComponent implements OnInit { dysBP: 'Diastolic BP', nutrition: 'Nutrition Assessment Done', DSD: 'DSD Model', - // 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', 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 (DD/MM/YYYY)', - // next_appointment: 'Date of Next Appointment ', visit_type: 'Visit Type', status: 'Status', - // is_crag_screened: 'Baseline CrAG Screened', cur_who_stage: 'Current Who Stage', - category: 'Category' + category: 'Category', + delivery_method: 'Delivery Method', + pregnancy_outcome: 'Pregnancy Outcome', + svd_and_live_birth: 'SVD Livebirth' }; for (const indicator in extraColumns) { if (indicator) { @@ -123,79 +122,39 @@ export class ChartAbstractionPatientlistComponent implements OnInit { } } this.overrideColumns.push( - { field: 'ccc_number', hide: true, pinned: true }, + { field: 'ccc_number', hide: false, 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'; - // }, + hide: true, pinned: false }, { - field: 'last_appointment_date' - // cellRenderer: (column) => { - // if (column.value != null) { - // return moment(column.value).format('DD-MM-YYYY'); - // } - // } + field: 'last_appointment_date', + hide: true }, { - 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', + hide: false }, { field: 'arv_start_date', - // 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', + hide: true }, { - field: 'last_clinical_encounter' - // cellRenderer: (column) => { - // if (column.value != null) { - // return moment(column.value).format('DD-MM-YYYY'); - // } - // } + field: 'last_clinical_encounter', + hide: true }, { - field: 'next_appointment' - // cellRenderer: (column) => { - // if (column.value != null) { - // return moment(column.value).format('DD-MM-YYYY'); - // } - // } + field: 'next_appointment', + hide: true }, { - field: 'tb_screened_this_visit' - // width: 150, - // cellRenderer: (column) => { - // if (column.value === 0) { - // return 'No'; - // } - // return 'Yes'; - // } + field: 'tb_screened_this_visit', + hide: true }, { field: 'vl_1', @@ -205,7 +164,7 @@ export class ChartAbstractionPatientlistComponent implements OnInit { } return column.value; }, - hide: true + hide: false }, { field: 'nutrition', @@ -215,41 +174,22 @@ export class ChartAbstractionPatientlistComponent implements OnInit { return 'YES'; } return 'NO'; - } + }, + hide: true }, { field: 'last_ipt_start_date', - // 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'); - // } - // }, hide: false }, { field: 'ipt_stop_date', - // cellRenderer: (column) => { - // if (column.value != null) { - // return moment(column.value).format('DD-MM-YYYY'); - // } - // }, hide: true, suppressToolPanel: true }, - { - field: 'drugs_given', - width: 280, - hide: true - }, { field: 'height', width: 100 @@ -260,7 +200,8 @@ export class ChartAbstractionPatientlistComponent implements OnInit { }, { field: 'muac', - width: 100 + width: 100, + hide: true }, { field: 'visit_type', @@ -280,8 +221,9 @@ export class ChartAbstractionPatientlistComponent implements OnInit { }, { field: 'NUPI', - width: 150 - // pinned: true + width: 150, + hide: true, + pinned: true }, { field: 'upi_number', @@ -293,7 +235,7 @@ export class ChartAbstractionPatientlistComponent implements OnInit { { field: 'drugs_given', width: 280, - hide: true + hide: false }, { field: 'cur_arv_med_basis', @@ -330,8 +272,7 @@ export class ChartAbstractionPatientlistComponent implements OnInit { { field: 'age', width: 150, - hide: true, - suppressToolPanel: true + hide: false }, { field: 'sex_gender', @@ -358,14 +299,12 @@ export class ChartAbstractionPatientlistComponent implements OnInit { { field: 'dysBP', width: 150, - hide: true, - suppressToolPanel: true + hide: true }, { field: 'nutrition', width: 150, - hide: true, - suppressToolPanel: true + hide: true }, { field: 'DSD', @@ -382,18 +321,17 @@ export class ChartAbstractionPatientlistComponent implements OnInit { { field: 'cur_who_stage', width: 150, - hide: true, - suppressToolPanel: true + hide: true }, { field: 'vl_suppression', width: 150, - hide: false + hide: true }, { field: 'is_crag_screened', width: 150, - hide: false + hide: true }, { field: 'status', @@ -403,7 +341,68 @@ export class ChartAbstractionPatientlistComponent implements OnInit { { field: 'cd4_1', width: 150, + hide: false + }, + { + field: 'category', + width: 150, hide: true + }, + { + field: 'has_cd4_1', + width: 150, + hide: true + }, + { + field: 'BMI', + width: 150, + hide: true + }, + { + field: 'tpt_status', + width: 150, + hide: true + }, + { + field: 'ipt_start_date', + width: 150, + hide: true + }, + { + field: 'last_ipt_start_date', + hide: true + }, + { + field: 'ipt_completion_date', + hide: true + }, + { + field: 'cur_arv_med_basis', + hide: true + }, + { + field: 'vl_suppression', + hide: true + }, + { + field: 'viral_load_validity', + hide: true + }, + { + field: 'pcp_prophylaxis', + hide: true + }, + { + field: 'delivery_method', + hide: true + }, + { + field: 'pregnancy_outcome', + hide: true + }, + { + field: 'svd_and_live_birth', + hide: false } ); }