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 @@
+ 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; + } }