-
Notifications
You must be signed in to change notification settings - Fork 29
Add the current time stamp for high risk mother records #99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughA condition was added to two JPQL queries in the Changes
Sequence Diagram(s)sequenceDiagram
participant Service
participant OutboundCallsRepo
participant Database
Service->>OutboundCallsRepo: getMotherRecordsForMO()
OutboundCallsRepo->>Database: Query with callDateTo >= CURRENT_TIMESTAMP
Database-->>OutboundCallsRepo: Filtered mother call records
OutboundCallsRepo-->>Service: Return records
Service->>OutboundCallsRepo: getMotherUnAllocatedCountHR()
OutboundCallsRepo->>Database: Count query with callDateTo >= CURRENT_TIMESTAMP
Database-->>OutboundCallsRepo: Filtered count
OutboundCallsRepo-->>Service: Return count
Possibly related PRs
Suggested reviewers
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
π§Ή Nitpick comments (1)
src/main/java/com/iemr/ecd/repo/call_conf_allocation/OutboundCallsRepo.java (1)
248-262: Consider centralising thecallDateTo >= CURRENT_TIMESTAMPclauseThe same string literal is now duplicated in 25+ queries.
For maintainability:- ... AND t.callDateTo >= CURRENT_TIMESTAMP + ... AND t.callDateTo >= CURRENT_TIMESTAMP -- duplicated everywhereOptions:
- Introduce a database view that already applies the filter and query the view.
- Use a Spring Data
@EntityGraphor specification to append the predicate programmatically.Either approach removes duplication and future-proofs the code.
π 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(2 hunks)
β° Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: style-check / checkstyle
- GitHub Check: Build
- GitHub Check: Package-test
- GitHub Check: Analyze (java)
π Additional comments (5)
src/main/java/com/iemr/ecd/repo/call_conf_allocation/OutboundCallsRepo.java (5)
63-65: Verify impact of the newCURRENT_TIMESTAMPguard on ANM work-list windowThe extra predicate narrows the result set to future calls only, regardless of the
:fDate / :tDatewindow already supplied.
If callers occasionally request historical windows (e.g. back-dated reconciliation) those rows will now be silently dropped.Please double-check that this behavioural change is intentional for
getMotherRecordsForANM.
71-72: Same temporal guard applied to Associate work-list β confirm requirementThe logic change is identical to the ANM query. Make sure Associates are also expected to see only calls whose
callDateTois β₯ now.
93-94: High-risk MO list correctly restricted to current / upcoming callsThe added constraint directly addresses AMM-1495; no further issues spotted.
111-121: Low-risk counters now filtered byCURRENT_TIMESTAMPβ possible scope creepThe JIRA ticket mentions only high-risk mother records, yet the same condition has been added to low-risk mother/child counters.
Confirm that reporting dashboards relying on historical counts are not affected.
127-130: High-risk mother count safeguarded β looks goodChange is in line with the stated objective and mirrors the MO work-list update.
mo839639
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please test the functionality with new mother excel



π Description
JIRA ID: AMM-1495
Add current timestamp to filter the counts for high risk mother records
β Type of Change
Summary by CodeRabbit