Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions src/main/java/com/iemr/ecd/service/associate/CallClosureImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,22 @@ 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);
}
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);
}
}


outboundCallsRepo.save(callObj);
} else
throw new ECDException(
Expand Down