From 2020ffd1858f84228dc451882794543d22797e8e Mon Sep 17 00:00:00 2001 From: SR20290919 Date: Mon, 19 May 2025 18:00:34 +0530 Subject: [PATCH 1/3] adding changes for HRP conditions --- .../service/associate/CallClosureImpl.java | 30 ++++++++++++++----- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/iemr/ecd/service/associate/CallClosureImpl.java b/src/main/java/com/iemr/ecd/service/associate/CallClosureImpl.java index 7ad1e88..21ab721 100644 --- a/src/main/java/com/iemr/ecd/service/associate/CallClosureImpl.java +++ b/src/main/java/com/iemr/ecd/service/associate/CallClosureImpl.java @@ -210,15 +210,31 @@ public String closeCall(CallClosureDTO request) { callObj.setCallAttemptNo(0); callObj.setAllocationStatus(Constants.UNALLOCATED); } +// if (request.getIsHrp() != null) { +// callObj.setIsHighRisk(request.getIsHrp()); +// if(obj.getReceivedRoleName().equalsIgnoreCase(Constants.ANM)){ +// callObj.setCallStatus(Constants.OPEN); +// callObj.setAllocatedUserId(null); +// callObj.setAllocationStatus(Constants.UNALLOCATED); +// callObj.setCallAttemptNo(0); +// } +// } + if (request.getIsHrp() != null) { - callObj.setIsHighRisk(request.getIsHrp()); - if(obj.getReceivedRoleName().equalsIgnoreCase(Constants.ANM)){ - callObj.setCallStatus(Constants.OPEN); - callObj.setAllocatedUserId(null); - callObj.setAllocationStatus(Constants.UNALLOCATED); - callObj.setCallAttemptNo(0); - } + boolean isHrp = request.getIsHrp(); + callObj.setIsHighRisk(isHrp); + + // Check if the role should be changed to MO + if (isHrp && obj.getReceivedRoleName().equalsIgnoreCase(Constants.ANM)) { + callObj.setCallStatus(Constants.OPEN); + callObj.setAllocatedUserId(null); + callObj.setAllocationStatus(Constants.UNALLOCATED); + callObj.setCallAttemptNo(0); + // callObj.setRole(Constants.MO); + } } + + outboundCallsRepo.save(callObj); } else throw new ECDException( From 98e3d8697f28a2ed100a204b9f0dd85246177425 Mon Sep 17 00:00:00 2001 From: SR20290919 Date: Mon, 19 May 2025 18:40:28 +0530 Subject: [PATCH 2/3] Removing commented code --- .../iemr/ecd/service/associate/CallClosureImpl.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/main/java/com/iemr/ecd/service/associate/CallClosureImpl.java b/src/main/java/com/iemr/ecd/service/associate/CallClosureImpl.java index 21ab721..0b4b2a5 100644 --- a/src/main/java/com/iemr/ecd/service/associate/CallClosureImpl.java +++ b/src/main/java/com/iemr/ecd/service/associate/CallClosureImpl.java @@ -210,15 +210,7 @@ public String closeCall(CallClosureDTO request) { callObj.setCallAttemptNo(0); callObj.setAllocationStatus(Constants.UNALLOCATED); } -// if (request.getIsHrp() != null) { -// callObj.setIsHighRisk(request.getIsHrp()); -// if(obj.getReceivedRoleName().equalsIgnoreCase(Constants.ANM)){ -// callObj.setCallStatus(Constants.OPEN); -// callObj.setAllocatedUserId(null); -// callObj.setAllocationStatus(Constants.UNALLOCATED); -// callObj.setCallAttemptNo(0); -// } -// } + if (request.getIsHrp() != null) { boolean isHrp = request.getIsHrp(); From 326ec34941b77efb835708a2e5484884f43f1623 Mon Sep 17 00:00:00 2001 From: SR20290919 Date: Mon, 19 May 2025 18:50:29 +0530 Subject: [PATCH 3/3] removing commented code --- .../java/com/iemr/ecd/service/associate/CallClosureImpl.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/com/iemr/ecd/service/associate/CallClosureImpl.java b/src/main/java/com/iemr/ecd/service/associate/CallClosureImpl.java index 0b4b2a5..fdfdb37 100644 --- a/src/main/java/com/iemr/ecd/service/associate/CallClosureImpl.java +++ b/src/main/java/com/iemr/ecd/service/associate/CallClosureImpl.java @@ -222,7 +222,6 @@ public String closeCall(CallClosureDTO request) { callObj.setAllocatedUserId(null); callObj.setAllocationStatus(Constants.UNALLOCATED); callObj.setCallAttemptNo(0); - // callObj.setRole(Constants.MO); } }