From 88a5b892f8456a6cf51db1c3d6ee3b5bae9b7160 Mon Sep 17 00:00:00 2001 From: henrykorir Date: Fri, 26 Jan 2024 16:52:55 +0300 Subject: [PATCH] POC-633: Display the Total abdominal hysterectomy on the patient dashboard. Concept ID 5276 --- .../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; + } }