get Allocate call count user API logic change#74
get Allocate call count user API logic change#74devikasuresh20 merged 5 commits intoPSMRI:developfrom
Conversation
WalkthroughTwo repository query methods were updated to filter results by an additional condition: only records where further calls are required ( Changes
Poem
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
There was a problem hiding this comment.
Actionable comments posted: 0
🔭 Outside diff range comments (1)
src/main/java/com/iemr/ecd/repo/call_conf_allocation/OutboundCallsRepo.java (1)
166-178: 💡 Verification agent🧩 Analysis chain
Consider applying the same filter to related methods for consistency.
The methods
getAllocatedRecordsCountMotherUserAssociateWithPreferredLanguageandgetAllocatedRecordsCountMotherUserAssociateperform similar counting operations but don't include theisFurtherCallRequired != 0filter. Consider whether these methods should also be updated for consistency.Run the following script to identify all count methods that might need the same filter:
🏁 Script executed:
#!/bin/bash # Description: Find all count methods in the repository to check for consistency # Expected: List of count methods that may need the same filter rg -A 10 "getAllocatedRecordsCount.*User" --type javaLength of output: 18510
Apply
isFurtherCallRequired != 0filter to all count queries for consistencySeveral of the
getAllocatedRecordsCount…User…methods inOutboundCallsRepo.javainclude theisFurtherCallRequired != 0clause (e.g.getAllocatedRecordsCountMotherUser,getAllocatedRecordsCountMotherUserANM), but others do not. To ensure all “allocated records” counts consistently exclude calls where no further action is required, add the same filter to the queries below:• src/main/java/com/iemr/ecd/repo/call_conf_allocation/OutboundCallsRepo.java
– getAllocatedRecordsCountMotherUserAssociateWithPreferredLanguage(...)
– getAllocatedRecordsCountMotherUserAssociate(...)
– getAllocatedRecordsCountChildUser(...)
– getAllocatedRecordsCountChildUserANM(...)
– getAllocatedRecordsCountChildUserAssociate(...)Example diff for the “mother associate” variants:
@Query(value = "… AND t.phoneNumberType=:phoneNoType AND t.childId IS NULL AND t.motherId IS NOT NULL") - int getAllocatedRecordsCountMotherUserAssociate(...) + int getAllocatedRecordsCountMotherUserAssociate( /* add: */ + " AND t.isFurtherCallRequired != 0")@Query(value = "… mv.preferredLanguage = :preferredLanguage") - int getAllocatedRecordsCountMotherUserAssociateWithPreferredLanguage(...) + int getAllocatedRecordsCountMotherUserAssociateWithPreferredLanguage( /* add: */ + " AND t.isFurtherCallRequired != 0")Apply similar additions to the child-user methods above.
🧹 Nitpick comments (1)
src/main/java/com/iemr/ecd/repo/call_conf_allocation/OutboundCallsRepo.java (1)
159-164: Fix formatting inconsistency and verify impact.The query logic is correct, but there's a formatting inconsistency:
!=0should be!= 0to match the style used in the previous method (line 154).Apply this diff to fix the formatting:
- + " AND t.phoneNumberType=:phoneNoType AND t.childId IS NULL AND t.motherId IS NOT NULL AND mv.preferredLanguage = :preferredLanguage AND t.isFurtherCallRequired !=0 ") + + " AND t.phoneNumberType=:phoneNoType AND t.childId IS NULL AND t.motherId IS NOT NULL AND mv.preferredLanguage = :preferredLanguage AND t.isFurtherCallRequired != 0 ")
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/main/java/com/iemr/ecd/repo/call_conf_allocation/OutboundCallsRepo.java(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Analyze (java)
🔇 Additional comments (1)
src/main/java/com/iemr/ecd/repo/call_conf_allocation/OutboundCallsRepo.java (1)
152-157:Details
❓ Verification inconclusive
Verify the impact of the new filter condition.
The addition of
AND t.isFurtherCallRequired != 0will change the behavior of this count method by excluding records where further calls are not required. This could impact dashboards, reports, or business logic that depends on these counts.Please verify that this behavioral change is intentional and test all dependent components. Run the following script to identify potential dependencies:
🏁 Script executed:
#!/bin/bash # Description: Find usages of the modified method to assess impact # Expected: List of files that call this method rg -A 5 "getAllocatedRecordsCountMotherUser" --type javaLength of output: 7967
Confirm consistent application of
isFurtherCallRequiredfilterThe new clause
AND t.isFurtherCallRequired != 0in
getAllocatedRecordsCountMotherUserwill exclude calls marked as “no further call required.” We located its usages and similar methods—please verify intent and consistency:• Usages of the modified method in
src/main/java/com/iemr/ecd/service/call_conf_allocation/CallAllocationImpl.java
– getAllocatedRecordsCountMotherUser(...)
– getAllocatedRecordsCountMotherUserANM(...)
– getAllocatedRecordsCountMotherUserAssociateWithPreferredLanguage(...)
– getAllocatedRecordsCountMotherUserAssociate(...)• Review the following repository methods and confirm whether each should also include
AND t.isFurtherCallRequired != 0for uniform behavior:
- getAllocatedRecordsCountMotherUserANM
- getAllocatedRecordsCountMotherUserAssociateWithPreferredLanguage
- getAllocatedRecordsCountMotherUserAssociate
• Run integration and service-layer tests covering all call-allocation roles (ANM, Associate, MotherUser) to ensure dashboards, reports, and business logic reflect the intended filtered counts.



📋 Description
JIRA ID:
Please provide a summary of the change and the motivation behind it. Include relevant context and details.
✅ Type of Change
ℹ️ Additional Information
Please describe how the changes were tested, and include any relevant screenshots, logs, or other information that provides additional context.
Summary by CodeRabbit