From c5ef9b7c516e046ae262348083ffba106fa6a5f2 Mon Sep 17 00:00:00 2001 From: Faith Kamau <121166087+hiqedme@users.noreply.github.com> Date: Tue, 18 Jun 2024 11:51:10 +0300 Subject: [PATCH] Poc 759 (#1758) * POC-759 added an extra check for PLHIV >18 months * POC-759 added an extra check for PLHIV >18 months --- .../lab-order-search/lab-order-search-post.component.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/app/lab-order-search/lab-order-search-post.component.ts b/src/app/lab-order-search/lab-order-search-post.component.ts index bcd6ca1c2..3a7c7366b 100644 --- a/src/app/lab-order-search/lab-order-search-post.component.ts +++ b/src/app/lab-order-search/lab-order-search-post.component.ts @@ -129,8 +129,15 @@ export class LabOrderSearchPostComponent implements OnInit, OnChanges { this.patientIdentifers = identifiers; }); this.patient = this.order.patient; + this.person = new Person(this.order.patient.person); - if (Moment().diff(Moment(this.person.birthdate), 'months') <= 18) { + if ( + Moment().diff(Moment(this.person.birthdate), 'months') <= 18 && + !( + this.patient.identifiers[0].identifierType.uuid === + this.cccIdentifierType + ) + ) { this.isHEIActive = true; } else { this.isHEIActive = false;