Skip to content

Bug/fix full immunization incentive#98

Merged
SauravBizbRolly merged 2 commits intoPSMRI:release-3.10.0from
toarunmishra:bug/fix_Full_Immunization_incentive
Nov 27, 2025
Merged

Bug/fix full immunization incentive#98
SauravBizbRolly merged 2 commits intoPSMRI:release-3.10.0from
toarunmishra:bug/fix_Full_Immunization_incentive

Conversation

@SauravBizbRolly
Copy link
Copy Markdown
Collaborator

@SauravBizbRolly SauravBizbRolly commented Nov 27, 2025

📋 Description

fix full immunization incentive bug

✅ Type of Change

  • 🐞 Bug fix (non-breaking change which resolves an issue)
  • New feature (non-breaking change which adds functionality)
  • 🔥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 🛠 Refactor (change that is neither a fix nor a new feature)
  • ⚙️ Config change (configuration file or build script updates)
  • 📚 Documentation (updates to docs or readme)
  • 🧪 Tests (adding new or updating existing tests)
  • 🎨 UI/UX (changes that affect the user interface)
  • 🚀 Performance (improves performance)
  • 🧹 Chore (miscellaneous changes that don't modify src or test files)

ℹ️ 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

  • Bug Fixes

    • Corrected vaccine count calculations for immunization tracking to improve data accuracy
  • Refactor

    • Updated internal data structure for visit identifiers

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Nov 27, 2025

Walkthrough

Two targeted modifications: ScreeningMalaria.visitId field type changed from Date to Long, and ChildVaccinationRepo SQL query adjusted to restrict immunization service IDs from 8 values to 5.

Changes

Cohort / File(s) Change Summary
Entity field type update
src/main/java/com/iemr/flw/domain/iemr/ScreeningMalaria.java
Field visitId type changed from Date to Long; @Column annotation retained.
Repository query modification
src/main/java/com/iemr/flw/repo/iemr/ChildVaccinationRepo.java
SQL query in getFirstYearVaccineCountForBenId restricted Currentimmunizationserviceid filter from (1,2,3,4,5,6,7,8) to (1,2,3,4,5).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify that visitId type change from Date to Long does not break serialization, deserialization, or comparisons elsewhere in the codebase
  • Confirm that the SQL restriction to 5 immunization service IDs is intentional and aligns with business requirements

Suggested reviewers

  • vishwab1

Poem

🐰 A visit ID transforms, from tick-tock to number so spry,
While vaccine codes narrow their focus up high,
Six become five, precision refined,
Data flows cleaner through fields redesigned! 💉

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Bug/fix full immunization incentive' is directly related to the main objective of the PR, which is to fix a full immunization incentive bug. The changes modify immunization-related logic in ChildVaccinationRepo and ScreeningMalaria, aligning with the title's intent.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3b0df69 and 29b59a1.

📒 Files selected for processing (2)
  • src/main/java/com/iemr/flw/domain/iemr/ScreeningMalaria.java (1 hunks)
  • src/main/java/com/iemr/flw/repo/iemr/ChildVaccinationRepo.java (1 hunks)
🔇 Additional comments (2)
src/main/java/com/iemr/flw/repo/iemr/ChildVaccinationRepo.java (1)

21-24: First‑year vaccine ID set looks consistent; confirm exclusion of IDs 6–8 is per spec

Restricting Currentimmunizationserviceid to (1,2,3,4,5) for getFirstYearVaccineCountForBenId now matches the global getFirstYearVaccineCount() and keeps IDs 7 and 8 with their dedicated queries, which aligns well with the surrounding design.

Please just double‑check with the domain spec that:

  • ID 6 is not part of the “full first‑year immunization” definition, and
  • no reporting/incentive logic elsewhere still assumes first‑year includes IDs 6–8.

If that’s confirmed, this query change looks correct and safe.

src/main/java/com/iemr/flw/domain/iemr/ScreeningMalaria.java (1)

136-140: Type change of visitId to Long matches ID semantics; verify DB column and callers

Switching visitId (column visit_Id) from Date to Long looks consistent with it being an identifier (especially with a separate visit_date field already present), and should make the mapping more accurate.

Please verify that:

  • The db_iemr.screening_malaria.visit_Id column is a numeric type compatible with Long, and
  • Any JPQL/native queries, DTO mappings, or service code that previously treated visitId as a Date have been updated to use Long (the Lombok‑generated getters/setters and equals/hashCode will now be Long‑based).

If those checks pass, this change is good.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@SauravBizbRolly
Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Nov 27, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@SauravBizbRolly SauravBizbRolly merged commit 3a40281 into PSMRI:release-3.10.0 Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant