From 021e85cf39e244a056223da490e4cba380dbf987 Mon Sep 17 00:00:00 2001 From: Faith Kamau <121166087+hiqedme@users.noreply.github.com> Date: Tue, 28 Mar 2023 12:14:18 +0300 Subject: [PATCH 1/7] Eka 004 (#1565) * addedreported test date and result to family history * added reported test date and result to family history * Viral load enhancements * Viral load enhancements --- .../patients-requiring-vl-base.component.ts | 8 ++++++ .../hiv-program-snapshot.component.html | 8 ++++++ .../hiv-program-snapshot.component.ts | 26 ++++++++++++++++++- 3 files changed, 41 insertions(+), 1 deletion(-) diff --git a/src/app/hiv-care-lib/patients-requiring-vl/patients-requiring-vl-base.component.ts b/src/app/hiv-care-lib/patients-requiring-vl/patients-requiring-vl-base.component.ts index ccdf1034b..ee07e65b0 100644 --- a/src/app/hiv-care-lib/patients-requiring-vl/patients-requiring-vl-base.component.ts +++ b/src/app/hiv-care-lib/patients-requiring-vl/patients-requiring-vl-base.component.ts @@ -95,6 +95,14 @@ export class PatientsRequiringVLBaseComponent implements OnInit { cellStyle: { 'white-space': 'normal' } + }, + { + headerName: 'VL Category', + field: 'vl_category', + width: 170, + cellStyle: { + 'white-space': 'normal' + } } ]; } diff --git a/src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.html b/src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.html index 5ed78dea5..45a55b002 100644 --- a/src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.html +++ b/src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.html @@ -66,6 +66,14 @@ >

+
+ +

+ VL Category: {{ this.viralLoadCategory }} +

+

Last Encounter

diff --git a/src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.ts b/src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.ts index d4aa9e47a..ec2c30b5a 100644 --- a/src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.ts +++ b/src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.ts @@ -13,6 +13,7 @@ import { EncounterResourceService } from 'src/app/openmrs-api/encounter-resource import { UserDefaultPropertiesService } from '../../../user-default-properties/user-default-properties.service'; import { CervicalCancerScreeningSummaResourceService } from './../../../etl-api/cervical-cancer-screening-summary-resource.service'; import { Covid19ResourceService } from './../../../etl-api/covid-19-resource-service'; +import { lastDayOfISOWeek } from 'date-fns'; const mdtProgramUuid = 'c4246ff0-b081-460c-bcc5-b0678012659e'; const stdProgramUuid = '781d85b0-1359-11df-a1f1-0026b9348838'; @@ -75,6 +76,7 @@ export class HivProgramSnapshotComponent implements OnInit { public hasSubsequentClinicalEncounter = false; public resolvedCareStatus: any; public showCareStatus = true; + public viralLoadCategory: any = ''; public backgroundColor: any = { pink: '#FFC0CB', yellow: '#FFFF00' @@ -160,7 +162,7 @@ export class HivProgramSnapshotComponent implements OnInit { latestVlResult = this.getlatestVlResult(results); latestVlDate = latestVlResult.vl_1_date; latestVl = latestVlResult.vl_1; - latestVl = latestVlResult.vl_1; + this.patientCareStatus = results[0].patient_care_status; this.hivDisclosureStatus = results[0].hiv_status_disclosed === 1 ? 'Yes' : 'No'; @@ -234,6 +236,28 @@ export class HivProgramSnapshotComponent implements OnInit { ); } + public getViralLoadCategory(latestViralLoad: any) { + switch (true) { + case latestViralLoad < 50: + this.viralLoadCategory = 'LDL'; + + break; + case latestViralLoad >= 50 && latestViralLoad < 200: + this.viralLoadCategory = 'Low Risk Low Level Viremia'; + break; + case latestViralLoad >= 200 && latestViralLoad < 1000: + this.viralLoadCategory = 'High Risk Low Level Viremia'; + break; + case latestViralLoad >= 1000: + this.viralLoadCategory = 'Suspected Treatment Failure'; + break; + default: + this.viralLoadCategory = 'Undefined'; + console.log('no viral load ' + latestViralLoad); + break; + } + } + public getPatientCareStatus(care_status_id: any) { const translateMap = { '159': 'DECEASED', From 653e68e5b55a30b33c48365485618410f928adfb Mon Sep 17 00:00:00 2001 From: SharleenAwinja <105132006+SharleenAwinja@users.noreply.github.com> Date: Tue, 28 Mar 2023 15:20:49 +0300 Subject: [PATCH 2/7] adding VL categories (#1562) Co-authored-by: SharleenAwinja --- package-lock.json | 44 +++++++++---------- .../daily-schedule-appointments.component.ts | 5 +++ .../moh-731-patientlist.component.ts | 1 + ...-gains-and-loses-patient-list.component.ts | 4 +- 4 files changed, 29 insertions(+), 25 deletions(-) diff --git a/package-lock.json b/package-lock.json index 838117efe..6f52d9d83 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20131,6 +20131,15 @@ "long": "^3.2.0" } }, + "JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "requires": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + } + }, "abab": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/abab/-/abab-1.0.4.tgz", @@ -21329,9 +21338,9 @@ "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.1.0.tgz", "integrity": "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==", "requires": { + "JSONStream": "^1.0.3", "combine-source-map": "~0.8.0", "defined": "^1.0.0", - "JSONStream": "^1.0.3", "safe-buffer": "^5.1.1", "through2": "^2.0.0", "umd": "^3.0.0" @@ -21357,6 +21366,7 @@ "resolved": "https://registry.npmjs.org/browserify/-/browserify-16.5.2.tgz", "integrity": "sha512-TkOR1cQGdmXU9zW4YukWzWVSJwrxmNdADFbqbE3HFgQWe5wqZmOawqZ7J/8MPCwk/W8yY7Y0h+7mOtcZxLP23g==", "requires": { + "JSONStream": "^1.0.3", "assert": "^1.4.0", "browser-pack": "^6.0.1", "browser-resolve": "^2.0.0", @@ -21378,7 +21388,6 @@ "https-browserify": "^1.0.0", "inherits": "~2.0.1", "insert-module-globals": "^7.0.0", - "JSONStream": "^1.0.3", "labeled-stream-splicer": "^2.0.0", "mkdirp-classic": "^0.5.2", "module-deps": "^6.2.3", @@ -21444,6 +21453,7 @@ "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-6.2.3.tgz", "integrity": "sha512-fg7OZaQBcL4/L+AK5f4iVqf9OMbCclXfy/znXRxTVhJSeW5AIlS9AwheYwDaXM3lVW7OBeaeUEY3gbaC6cLlSA==", "requires": { + "JSONStream": "^1.0.3", "browser-resolve": "^2.0.0", "cached-path-relative": "^1.0.2", "concat-stream": "~1.6.0", @@ -21451,7 +21461,6 @@ "detective": "^5.2.0", "duplexer2": "^0.1.2", "inherits": "^2.0.1", - "JSONStream": "^1.0.3", "parents": "^1.0.0", "readable-stream": "^2.0.2", "resolve": "^1.4.0", @@ -25713,11 +25722,11 @@ "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.2.0.tgz", "integrity": "sha512-VE6NlW+WGn2/AeOMd496AHFYmE7eLKkUY6Ty31k4og5vmA3Fjuwe9v6ifH6Xx/Hz27QvdoMoviw1/pqWRB09Sw==", "requires": { + "JSONStream": "^1.0.3", "acorn-node": "^1.5.2", "combine-source-map": "^0.8.0", "concat-stream": "^1.6.1", "is-buffer": "^1.1.0", - "JSONStream": "^1.0.3", "path-is-absolute": "^1.0.1", "process": "~0.11.0", "through2": "^2.0.0", @@ -26675,22 +26684,13 @@ "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" }, - "JSONStream": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", - "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", - "requires": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" - } - }, "jspdf": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/jspdf/-/jspdf-1.5.3.tgz", "integrity": "sha512-J9X76xnncMw+wIqb15HeWfPMqPwYxSpPY8yWPJ7rAZN/ZDzFkjCSZObryCyUe8zbrVRNiuCnIeQteCzMn7GnWw==", "requires": { "canvg": "1.5.3", - "file-saver": "github:eligrey/FileSaver.js#1.3.8", + "file-saver": "file-saver@github:eligrey/FileSaver.js#1.3.8", "html2canvas": "1.0.0-alpha.12", "omggif": "1.0.7", "promise-polyfill": "8.1.0", @@ -32401,14 +32401,6 @@ } } }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - }, "string-argv": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", @@ -32447,6 +32439,14 @@ "es-abstract": "^1.17.5" } }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, "stringify-object": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz", diff --git a/src/app/clinic-schedule-lib/daily-schedule/daily-schedule-appointments.component.ts b/src/app/clinic-schedule-lib/daily-schedule/daily-schedule-appointments.component.ts index 658701ed3..59ab9a315 100644 --- a/src/app/clinic-schedule-lib/daily-schedule/daily-schedule-appointments.component.ts +++ b/src/app/clinic-schedule-lib/daily-schedule/daily-schedule-appointments.component.ts @@ -76,6 +76,11 @@ 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, diff --git a/src/app/hiv-care-lib/moh-731-report/moh-731-patientlist.component.ts b/src/app/hiv-care-lib/moh-731-report/moh-731-patientlist.component.ts index 3c67e3e35..dc4f1b9b1 100644 --- a/src/app/hiv-care-lib/moh-731-report/moh-731-patientlist.component.ts +++ b/src/app/hiv-care-lib/moh-731-report/moh-731-patientlist.component.ts @@ -247,6 +247,7 @@ export class Moh731PatientListComponent implements OnInit, OnChanges { 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', diff --git a/src/app/hiv-care-lib/patient-gains-and-loses/patient-gains-and-loses-patient-list/patient-gains-and-loses-patient-list.component.ts b/src/app/hiv-care-lib/patient-gains-and-loses/patient-gains-and-loses-patient-list/patient-gains-and-loses-patient-list.component.ts index d9b9dedf9..974913ef4 100644 --- a/src/app/hiv-care-lib/patient-gains-and-loses/patient-gains-and-loses-patient-list/patient-gains-and-loses-patient-list.component.ts +++ b/src/app/hiv-care-lib/patient-gains-and-loses/patient-gains-and-loses-patient-list/patient-gains-and-loses-patient-list.component.ts @@ -97,9 +97,7 @@ export class PatientGainsAndLosesPatientListComponent implements OnInit { } ); } - public extraColumns() { - return this.patientListCols; - } + private getPatientList(params: any) { this.patientGainLose .getPatientGainAndLosePatientList(params) From bcb335c903742075aef6017a8145ff9f93db6179 Mon Sep 17 00:00:00 2001 From: Faith Kamau <121166087+hiqedme@users.noreply.github.com> Date: Thu, 30 Mar 2023 12:25:29 +0300 Subject: [PATCH 3/7] Viral_load Category enhancements (#1568) --- .../family-testing/contact-list/contact-list.component.ts | 3 +-- .../program-snapshot/hiv-program-snapshot.component.html | 2 +- .../hiv/program-snapshot/hiv-program-snapshot.component.ts | 6 +++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/app/hiv-care-lib/family-testing/contact-list/contact-list.component.ts b/src/app/hiv-care-lib/family-testing/contact-list/contact-list.component.ts index ded634b2c..1ff8a54e7 100644 --- a/src/app/hiv-care-lib/family-testing/contact-list/contact-list.component.ts +++ b/src/app/hiv-care-lib/family-testing/contact-list/contact-list.component.ts @@ -50,9 +50,8 @@ export class ContactListComponent implements OnInit { headerName: 'Reported test date', width: 150 }, - { - field: 'modified_fm_status', + field: 'test_result_value', headerName: 'Current test results', width: 150 }, diff --git a/src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.html b/src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.html index 45a55b002..7a9a5f1c5 100644 --- a/src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.html +++ b/src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.html @@ -66,7 +66,7 @@ >

-
+

Date: Thu, 11 May 2023 13:16:45 +0300 Subject: [PATCH 4/7] New ART guidelines revisions --- .../clinic-lab-orders.component.ts | 5 ++ .../defaulter-list.component.ts | 5 ++ .../hiv-enhanced-program.component.ts | 5 ++ .../patient-status-change-list.component.ts | 5 ++ ...entry-statistics-patient-list.component.ts | 5 ++ .../ipt-report-patient-list.component.ts | 1 + .../moh-731-patientlist.component.ts | 1 + ...retention-report-patient-list.component.ts | 5 ++ .../patient-reminders.component.ts | 1 + .../patient-reminders.service.ts | 5 ++ .../hiv-summary-latest.component.html | 6 +- .../hiv-program-snapshot.component.html | 2 +- .../hiv-program-snapshot.component.ts | 66 +++++++++++++------ ...rogram-enrollent-patient-list.component.ts | 5 ++ .../patient-list/patient-list-columns.data.ts | 5 ++ 15 files changed, 98 insertions(+), 24 deletions(-) diff --git a/src/app/clinic-dashboard/general/clinic-lab-orders/clinic-lab-orders.component.ts b/src/app/clinic-dashboard/general/clinic-lab-orders/clinic-lab-orders.component.ts index f84d8b8ba..a0895a1a0 100644 --- a/src/app/clinic-dashboard/general/clinic-lab-orders/clinic-lab-orders.component.ts +++ b/src/app/clinic-dashboard/general/clinic-lab-orders/clinic-lab-orders.component.ts @@ -504,6 +504,11 @@ export class ClinicLabOrdersComponent implements OnInit, OnDestroy { width: 200, field: 'last_appointment' }, + { + headerName: 'Patient Category', + width: 150, + field: 'patient_category' + }, { headerName: 'Latest RTC Date', width: 150, diff --git a/src/app/clinic-dashboard/general/defaulter-list/defaulter-list.component.ts b/src/app/clinic-dashboard/general/defaulter-list/defaulter-list.component.ts index 99bbe31ab..b1a3b16b7 100644 --- a/src/app/clinic-dashboard/general/defaulter-list/defaulter-list.component.ts +++ b/src/app/clinic-dashboard/general/defaulter-list/defaulter-list.component.ts @@ -91,6 +91,11 @@ export class DefaulterListComponent implements OnInit { width: 200, field: 'last_appointment' }, + { + headerName: 'Patient Category', + width: 150, + field: 'patient_category' + }, { headerName: 'Latest RTC Date', width: 150, diff --git a/src/app/clinic-dashboard/hiv/hiv-enhanced-program/hiv-enhanced-program.component.ts b/src/app/clinic-dashboard/hiv/hiv-enhanced-program/hiv-enhanced-program.component.ts index 0aa313e35..25f745020 100644 --- a/src/app/clinic-dashboard/hiv/hiv-enhanced-program/hiv-enhanced-program.component.ts +++ b/src/app/clinic-dashboard/hiv/hiv-enhanced-program/hiv-enhanced-program.component.ts @@ -89,6 +89,11 @@ export class HivEnhancedComponent implements OnInit { width: 200, field: 'last_appointment_max' }, + { + headerName: 'Patient Category', + width: 150, + field: 'patient_category' + }, { headerName: 'Latest RTC Date', width: 150, diff --git a/src/app/clinic-dashboard/hiv/patient-status-change-visualization/patient-status-change-list.component.ts b/src/app/clinic-dashboard/hiv/patient-status-change-visualization/patient-status-change-list.component.ts index 6ecf9a026..4e004b144 100644 --- a/src/app/clinic-dashboard/hiv/patient-status-change-visualization/patient-status-change-list.component.ts +++ b/src/app/clinic-dashboard/hiv/patient-status-change-visualization/patient-status-change-list.component.ts @@ -28,6 +28,11 @@ export class PatientStatusChangeListComponent implements OnInit, OnDestroy { width: 200, field: 'last_appointment' }, + { + headerName: 'Patient Category', + width: 150, + field: 'patient_category' + }, { headerName: 'Latest RTC Date', width: 150, diff --git a/src/app/data-entry-statistics/data-entry-statistics-patient-list.component.ts b/src/app/data-entry-statistics/data-entry-statistics-patient-list.component.ts index c72f84a28..ee89aac79 100644 --- a/src/app/data-entry-statistics/data-entry-statistics-patient-list.component.ts +++ b/src/app/data-entry-statistics/data-entry-statistics-patient-list.component.ts @@ -103,6 +103,11 @@ export class DataEntryStatisticsPatientListComponent width: 200, field: 'last_appointment' }, + { + headerName: 'Patient Category', + width: 150, + field: 'patient_category' + }, { headerName: 'Latest RTC Date', width: 150, diff --git a/src/app/hiv-care-lib/ipt-report/ipt-report-patient-list.component.ts b/src/app/hiv-care-lib/ipt-report/ipt-report-patient-list.component.ts index 956507994..17f8d855b 100644 --- a/src/app/hiv-care-lib/ipt-report/ipt-report-patient-list.component.ts +++ b/src/app/hiv-care-lib/ipt-report/ipt-report-patient-list.component.ts @@ -41,6 +41,7 @@ export class IptReportPatientListComponent implements OnInit { phone_number: 'Phone Number', enrollment_date: 'Date Enrolled', last_appointment: 'Latest Appointment', + patient_category: 'Patient Category', latest_rtc_date: 'Latest RTC Date', days_since_rtc_date: 'Days Since RTC', status: 'Current Status', diff --git a/src/app/hiv-care-lib/moh-731-report/moh-731-patientlist.component.ts b/src/app/hiv-care-lib/moh-731-report/moh-731-patientlist.component.ts index dc4f1b9b1..9522b7ba9 100644 --- a/src/app/hiv-care-lib/moh-731-report/moh-731-patientlist.component.ts +++ b/src/app/hiv-care-lib/moh-731-report/moh-731-patientlist.component.ts @@ -252,6 +252,7 @@ export class Moh731PatientListComponent implements OnInit, OnChanges { 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', latest_vl_date: 'Latest VL Date', diff --git a/src/app/hiv-care-lib/retention-report/retention-report-patient-list.component.ts b/src/app/hiv-care-lib/retention-report/retention-report-patient-list.component.ts index 68c3b5051..b7102892b 100644 --- a/src/app/hiv-care-lib/retention-report/retention-report-patient-list.component.ts +++ b/src/app/hiv-care-lib/retention-report/retention-report-patient-list.component.ts @@ -98,6 +98,11 @@ export class RetentionReportPatientListComponent implements OnInit { field: 'visit_type', width: 200 }, + { + headerName: 'Patient Category', + width: 150, + field: 'patient_category' + }, { headerName: 'Latest RTC date', field: 'latest_rtc_date', diff --git a/src/app/patient-dashboard/common/patient-reminders/patient-reminders.component.ts b/src/app/patient-dashboard/common/patient-reminders/patient-reminders.component.ts index 524711bd5..2c879f7b5 100644 --- a/src/app/patient-dashboard/common/patient-reminders/patient-reminders.component.ts +++ b/src/app/patient-dashboard/common/patient-reminders/patient-reminders.component.ts @@ -98,6 +98,7 @@ export class PatientRemindersComponent implements OnInit, OnDestroy { this.errorMessage = error; } ); + this.patientReminderService.getVlEligible(); this.subscriptions.push(sub2); } } diff --git a/src/app/patient-dashboard/common/patient-reminders/patient-reminders.service.ts b/src/app/patient-dashboard/common/patient-reminders/patient-reminders.service.ts index 3bac9b47e..4326c660d 100644 --- a/src/app/patient-dashboard/common/patient-reminders/patient-reminders.service.ts +++ b/src/app/patient-dashboard/common/patient-reminders/patient-reminders.service.ts @@ -5,6 +5,7 @@ import { PatientReminderResourceService } from '../../../etl-api/patient-reminde @Injectable() export class PatientReminderService { + public vl_eligible: any; constructor( private patientReminderResourceService: PatientReminderResourceService ) {} @@ -19,6 +20,7 @@ export class PatientReminderService { personUuid: data.person_uuid, generatedReminders: data.reminders }; + this.vl_eligible = data.reminders; return remindersObj; } else { return {}; @@ -30,4 +32,7 @@ export class PatientReminderService { }) ); } + public getVlEligible(): string { + return this.vl_eligible; + } } diff --git a/src/app/patient-dashboard/hiv/hiv-summary/hiv-summary-latest.component.html b/src/app/patient-dashboard/hiv/hiv-summary/hiv-summary-latest.component.html index ed226e9e6..f2643515b 100644 --- a/src/app/patient-dashboard/hiv/hiv-summary/hiv-summary-latest.component.html +++ b/src/app/patient-dashboard/hiv/hiv-summary/hiv-summary-latest.component.html @@ -198,14 +198,14 @@ }}

  • - INH Prophylaxis Medication : {{ iptProphylaxisMedication }} + TPT Medication : {{ iptProphylaxisMedication }}
  • - INH Prophylaxis Start Date : + TPT Start Date : {{ hivSummary?.ipt_start_date | date: 'dd-MM-yyyy' }}
  • - INH Prophylaxis End Date : + TPT End Date : {{ hivSummary?.ipt_completion_date | date: 'dd-MM-yyyy' }}

    - VL Category: {{ this.viralLoadCategory }}

    diff --git a/src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.ts b/src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.ts index aa158a004..a3e8b4142 100644 --- a/src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.ts +++ b/src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.ts @@ -13,7 +13,8 @@ import { EncounterResourceService } from 'src/app/openmrs-api/encounter-resource import { UserDefaultPropertiesService } from '../../../user-default-properties/user-default-properties.service'; import { CervicalCancerScreeningSummaResourceService } from './../../../etl-api/cervical-cancer-screening-summary-resource.service'; import { Covid19ResourceService } from './../../../etl-api/covid-19-resource-service'; -import { lastDayOfISOWeek } from 'date-fns'; +import { PatientReminderService } from '../../common/patient-reminders/patient-reminders.service'; +// import { PatientReminderService } from 'src/app/patient-dashboard/common/patient-reminders/patient-reminders.service.ts'; const mdtProgramUuid = 'c4246ff0-b081-460c-bcc5-b0678012659e'; const stdProgramUuid = '781d85b0-1359-11df-a1f1-0026b9348838'; @@ -77,6 +78,7 @@ export class HivProgramSnapshotComponent implements OnInit { public resolvedCareStatus: any; public showCareStatus = true; public viralLoadCategory: any = ''; + public viralloadColor = ' '; public backgroundColor: any = { pink: '#FFC0CB', yellow: '#FFFF00' @@ -121,7 +123,8 @@ export class HivProgramSnapshotComponent implements OnInit { private locationResource: LocationResourceService, private userDefaultPropertiesService: UserDefaultPropertiesService, private cervicalCancerScreeningSummaryService: CervicalCancerScreeningSummaResourceService, - private covid19Service: Covid19ResourceService + private covid19Service: Covid19ResourceService, + private patientReminderService: PatientReminderService ) {} public ngOnInit() { @@ -142,6 +145,7 @@ export class HivProgramSnapshotComponent implements OnInit { 0, this.patient.uuid ); + this.getMoriskyScore(); } @@ -237,24 +241,46 @@ export class HivProgramSnapshotComponent implements OnInit { } public getViralLoadCategory(latestViralLoad: any) { - switch (true) { - case latestViralLoad < 50 && latestViralLoad != null: - this.viralLoadCategory = 'LDL'; - - break; - case latestViralLoad >= 50 && latestViralLoad < 200: - this.viralLoadCategory = 'Low Risk Low Level Viremia'; - break; - case latestViralLoad >= 200 && latestViralLoad < 1000: - this.viralLoadCategory = 'High Risk Low Level Viremia'; - break; - case latestViralLoad >= 1000: - this.viralLoadCategory = 'Suspected Treatment Failure'; - break; - default: - this.viralLoadCategory = 'N/A'; - - break; + const eligiblility = this.patientReminderService.vl_eligible; + let isEligible: any; + _.each(eligiblility, (vl_eligibiliy: any) => { + if (vl_eligibiliy.title === 'Viral Load Reminder') { + isEligible = 1; + } else { + isEligible = 2; + } + }); + if (isEligible) { + switch (true) { + case latestViralLoad < 50 && + latestViralLoad != null && + isEligible === 2: + this.viralLoadCategory = 'LDL'; + this.viralloadColor = 'green'; + break; + case latestViralLoad >= 50 && latestViralLoad < 200 && isEligible === 2: + this.viralLoadCategory = 'Low Risk Low Level Viremia'; + this.viralloadColor = 'yellowgreen'; + break; + case latestViralLoad >= 200 && + latestViralLoad < 1000 && + isEligible === 2: + this.viralLoadCategory = 'High Risk Low Level Viremia'; + this.viralloadColor = 'orange'; + break; + case latestViralLoad >= 1000 && isEligible === 2: + this.viralLoadCategory = 'Suspected Treatment Failure'; + this.viralloadColor = 'red'; + break; + case isEligible === 1: + this.viralLoadCategory = 'Missing VL'; + this.viralloadColor = 'purple'; + break; + default: + this.viralLoadCategory = 'N/A'; + this.viralloadColor = 'black'; + break; + } } } diff --git a/src/app/patients-program-enrollment/program-enrollent-patient-list.component.ts b/src/app/patients-program-enrollment/program-enrollent-patient-list.component.ts index d58cb2f40..1f5d81f0d 100644 --- a/src/app/patients-program-enrollment/program-enrollent-patient-list.component.ts +++ b/src/app/patients-program-enrollment/program-enrollent-patient-list.component.ts @@ -135,6 +135,11 @@ export class ProgramEnrollmentPatientListComponent width: 200, field: 'last_appointment' }, + { + headerName: 'Patient Category', + width: 150, + field: 'patient_category' + }, { headerName: 'Latest RTC Date', width: 150, diff --git a/src/app/shared/data-lists/patient-list/patient-list-columns.data.ts b/src/app/shared/data-lists/patient-list/patient-list-columns.data.ts index ae6e78968..a04f7b1c4 100644 --- a/src/app/shared/data-lists/patient-list/patient-list-columns.data.ts +++ b/src/app/shared/data-lists/patient-list/patient-list-columns.data.ts @@ -69,6 +69,11 @@ export class PatientListColumns { width: 200, field: 'last_appointment' }, + { + headerName: 'Patient Category', + width: 150, + field: 'patient_category' + }, { headerName: 'Visit Type', width: 200, From 8d3b94fc7aabed6310c9800d5575c97869507946 Mon Sep 17 00:00:00 2001 From: "Kipchumba C. Bett" Date: Tue, 16 May 2023 12:25:31 +0300 Subject: [PATCH 5/7] Update package-lock.json --- package-lock.json | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6f52d9d83..838117efe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20131,15 +20131,6 @@ "long": "^3.2.0" } }, - "JSONStream": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", - "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", - "requires": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" - } - }, "abab": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/abab/-/abab-1.0.4.tgz", @@ -21338,9 +21329,9 @@ "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.1.0.tgz", "integrity": "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==", "requires": { - "JSONStream": "^1.0.3", "combine-source-map": "~0.8.0", "defined": "^1.0.0", + "JSONStream": "^1.0.3", "safe-buffer": "^5.1.1", "through2": "^2.0.0", "umd": "^3.0.0" @@ -21366,7 +21357,6 @@ "resolved": "https://registry.npmjs.org/browserify/-/browserify-16.5.2.tgz", "integrity": "sha512-TkOR1cQGdmXU9zW4YukWzWVSJwrxmNdADFbqbE3HFgQWe5wqZmOawqZ7J/8MPCwk/W8yY7Y0h+7mOtcZxLP23g==", "requires": { - "JSONStream": "^1.0.3", "assert": "^1.4.0", "browser-pack": "^6.0.1", "browser-resolve": "^2.0.0", @@ -21388,6 +21378,7 @@ "https-browserify": "^1.0.0", "inherits": "~2.0.1", "insert-module-globals": "^7.0.0", + "JSONStream": "^1.0.3", "labeled-stream-splicer": "^2.0.0", "mkdirp-classic": "^0.5.2", "module-deps": "^6.2.3", @@ -21453,7 +21444,6 @@ "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-6.2.3.tgz", "integrity": "sha512-fg7OZaQBcL4/L+AK5f4iVqf9OMbCclXfy/znXRxTVhJSeW5AIlS9AwheYwDaXM3lVW7OBeaeUEY3gbaC6cLlSA==", "requires": { - "JSONStream": "^1.0.3", "browser-resolve": "^2.0.0", "cached-path-relative": "^1.0.2", "concat-stream": "~1.6.0", @@ -21461,6 +21451,7 @@ "detective": "^5.2.0", "duplexer2": "^0.1.2", "inherits": "^2.0.1", + "JSONStream": "^1.0.3", "parents": "^1.0.0", "readable-stream": "^2.0.2", "resolve": "^1.4.0", @@ -25722,11 +25713,11 @@ "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.2.0.tgz", "integrity": "sha512-VE6NlW+WGn2/AeOMd496AHFYmE7eLKkUY6Ty31k4og5vmA3Fjuwe9v6ifH6Xx/Hz27QvdoMoviw1/pqWRB09Sw==", "requires": { - "JSONStream": "^1.0.3", "acorn-node": "^1.5.2", "combine-source-map": "^0.8.0", "concat-stream": "^1.6.1", "is-buffer": "^1.1.0", + "JSONStream": "^1.0.3", "path-is-absolute": "^1.0.1", "process": "~0.11.0", "through2": "^2.0.0", @@ -26684,13 +26675,22 @@ "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" }, + "JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "requires": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + } + }, "jspdf": { "version": "1.5.3", "resolved": "https://registry.npmjs.org/jspdf/-/jspdf-1.5.3.tgz", "integrity": "sha512-J9X76xnncMw+wIqb15HeWfPMqPwYxSpPY8yWPJ7rAZN/ZDzFkjCSZObryCyUe8zbrVRNiuCnIeQteCzMn7GnWw==", "requires": { "canvg": "1.5.3", - "file-saver": "file-saver@github:eligrey/FileSaver.js#1.3.8", + "file-saver": "github:eligrey/FileSaver.js#1.3.8", "html2canvas": "1.0.0-alpha.12", "omggif": "1.0.7", "promise-polyfill": "8.1.0", @@ -32401,6 +32401,14 @@ } } }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, "string-argv": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", @@ -32439,14 +32447,6 @@ "es-abstract": "^1.17.5" } }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - }, "stringify-object": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz", From 303afe50ff356a37f9601adf580f05edd1f76608 Mon Sep 17 00:00:00 2001 From: "Kipchumba C. Bett" Date: Tue, 16 May 2023 12:49:34 +0300 Subject: [PATCH 6/7] Fix prettier formatting issues --- .../hiv/hiv-summary/hiv-summary-latest.component.html | 2 +- .../hiv/program-snapshot/hiv-program-snapshot.component.html | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/app/patient-dashboard/hiv/hiv-summary/hiv-summary-latest.component.html b/src/app/patient-dashboard/hiv/hiv-summary/hiv-summary-latest.component.html index f2643515b..4419d5242 100644 --- a/src/app/patient-dashboard/hiv/hiv-summary/hiv-summary-latest.component.html +++ b/src/app/patient-dashboard/hiv/hiv-summary/hiv-summary-latest.component.html @@ -201,7 +201,7 @@ TPT Medication : {{ iptProphylaxisMedication }}
  • - TPT Start Date : + TPT Start Date : {{ hivSummary?.ipt_start_date | date: 'dd-MM-yyyy' }}
  • diff --git a/src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.html b/src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.html index 5b89be217..a3a3bf8e1 100644 --- a/src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.html +++ b/src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.html @@ -66,10 +66,9 @@ >

  • -
    - +

    - VL Category: {{ this.viralLoadCategory }}

    From 6e2181a4de9a4ce6eb07a323bcc139bd6409bb99 Mon Sep 17 00:00:00 2001 From: Faith Kamau <121166087+hiqedme@users.noreply.github.com> Date: Tue, 16 May 2023 13:22:57 +0300 Subject: [PATCH 7/7] Update src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.ts --- .../hiv/program-snapshot/hiv-program-snapshot.component.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.ts b/src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.ts index a3e8b4142..4704060fd 100644 --- a/src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.ts +++ b/src/app/patient-dashboard/hiv/program-snapshot/hiv-program-snapshot.component.ts @@ -14,7 +14,6 @@ import { UserDefaultPropertiesService } from '../../../user-default-properties/u import { CervicalCancerScreeningSummaResourceService } from './../../../etl-api/cervical-cancer-screening-summary-resource.service'; import { Covid19ResourceService } from './../../../etl-api/covid-19-resource-service'; import { PatientReminderService } from '../../common/patient-reminders/patient-reminders.service'; -// import { PatientReminderService } from 'src/app/patient-dashboard/common/patient-reminders/patient-reminders.service.ts'; const mdtProgramUuid = 'c4246ff0-b081-460c-bcc5-b0678012659e'; const stdProgramUuid = '781d85b0-1359-11df-a1f1-0026b9348838';