From 51d4206fe36255f53a17148c9a893194014713fb Mon Sep 17 00:00:00 2001 From: Henry Korir <5462699+henrykorir@users.noreply.github.com> Date: Wed, 14 Feb 2024 16:15:56 +0300 Subject: [PATCH] POC-633: Display the Total abdominal hysterectomy on the patient dashboard. Concept ID 5276 (#1707) --- .../hiv-program-snapshot.component.html | 15 ++++++++++++++- .../hiv-program-snapshot.component.ts | 17 +++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) 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 838eaba9c..aa82882d0 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 @@ -244,7 +244,20 @@

Last Encounter

-
+
+

+ Cervical Cancer Screening : + {{ reason_cacx_not_done }} +

+
+

Cervical Cancer Screening : 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 d4150513d..1ebccf526 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 @@ -128,6 +128,7 @@ export class HivProgramSnapshotComponent implements OnInit { public last_pcr_status: string; public last_pcr_date: string; public infant_feeding_method: string; + public reason_cacx_not_done: string = null; constructor( private hivSummaryResourceService: HivSummaryResourceService, @@ -656,6 +657,9 @@ export class HivProgramSnapshotComponent implements OnInit { this.cervicalScreeningSummary = result; if (result.length > 0) { this.latestCervicalScreeningSummary = result[0]; + this.reason_cacx_not_done = this.reasonCaCxNotDone( + result[0].reason + ); } } }, @@ -819,4 +823,17 @@ export class HivProgramSnapshotComponent implements OnInit { return INFANT_FEEDING_METHODS[this.patientData.infant_feeding_method]; } + + public reasonCaCxNotDone(reasons: string): string { + if (reasons.includes('=5276')) { + return 'Not Done: Total Abdominal Hysterectomy'; + } else if (reasons.includes('12110=12109')) { + return 'Not Done: Cervix Not Accessible'; + } else if (reasons.includes('12110=5989')) { + return 'Not Done: Menstruating'; + } else if (reasons.includes('12110=1504')) { + return 'Not Done: Patient Refusal'; + } + return null; + } }