Skip to content

Conversation

@vanitha1822
Copy link
Member

@vanitha1822 vanitha1822 commented Jul 7, 2025

πŸ“‹ Description

JIRA ID:
AMM-1414

The NumberOfWeeks field was not included in the entity and in the code to store and retrieve the data.

βœ… Type of Change

  • 🐞 Bug fix (non-breaking change which resolves an issue)

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

  • New Features

    • Added support for capturing and displaying "Number Per Week" for tobacco use in personal habit details.
  • Enhancements

    • Updated tobacco habit details to include weekly usage frequency alongside daily usage in relevant reports and data views.

@coderabbitai
Copy link

coderabbitai bot commented Jul 7, 2025

Walkthrough

A new field, numberperWeek, was added to the BenPersonalHabit class to track weekly usage alongside the existing daily usage. This field was integrated into constructors, persistence annotations, data population methods, JPQL queries, and service-layer data mapping. Related queries and service logic were updated to handle the new field.

Changes

File(s) Change Summary
.../BenPersonalHabit.java Added numberperWeek field, getter/setter, updated constructors and methods to handle weekly usage data.
.../BenPersonalHabitRepo.java Modified JPQL queries to select and return the new numberperWeek field in tobacco habit details.
.../CommonNurseServiceImpl.java Updated tobacco history method to include "Number Per Week" column and map the new field from query results.

Poem

A hop and a skip, a new field appears,
Counting habits by week, not just by years.
Queries and columns, all in a row,
Now track what the bunnies already know.
With every new field, our data grows neatβ€”
More carrots for thought, and code that’s complete! πŸ₯•

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

πŸ”§ ast-grep (0.38.1)
src/main/java/com/iemr/mmu/service/common/transaction/CommonNurseServiceImpl.java

πŸ“œ 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 744af58 and 0cc4cdc.

πŸ“’ Files selected for processing (3)
  • src/main/java/com/iemr/mmu/data/anc/BenPersonalHabit.java (9 hunks)
  • src/main/java/com/iemr/mmu/repo/nurse/anc/BenPersonalHabitRepo.java (2 hunks)
  • src/main/java/com/iemr/mmu/service/common/transaction/CommonNurseServiceImpl.java (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/main/java/com/iemr/mmu/repo/nurse/anc/BenPersonalHabitRepo.java
  • src/main/java/com/iemr/mmu/service/common/transaction/CommonNurseServiceImpl.java
  • src/main/java/com/iemr/mmu/data/anc/BenPersonalHabit.java
✨ Finishing Touches
  • πŸ“ Generate Docstrings

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
πŸͺ§ Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@vanitha1822 vanitha1822 self-assigned this Jul 7, 2025
@vanitha1822 vanitha1822 requested review from drtechie and vishwab1 July 7, 2025 10:13
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 7, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
13.9% Duplication on New Code (required ≀ 3%)

See analysis details on SonarQube Cloud

@vanitha1822 vanitha1822 changed the base branch from develop to release-3.6.0 July 14, 2025 08:34
Copy link
Member

@drtechie drtechie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vanitha1822 are these new columns? If yes, please raise PR to AMRIT-DB.

@vanitha1822
Copy link
Member Author

@vanitha1822 are these new columns? If yes, please raise PR to AMRIT-DB.

The column already present in AMRIT-DB (V1_DB_IEMR.sql). But it is not reflected in the db i used. May be the migration issue. Codewise the logic is not implemented so far. So i updated that.

@vanitha1822 vanitha1822 requested a review from drtechie July 16, 2025 10:05
@vanitha1822 vanitha1822 merged commit 458af67 into release-3.6.0 Jul 16, 2025
7 of 8 checks passed
@vanitha1822 vanitha1822 deleted the nd/vs/tobocco branch July 16, 2025 10:19
@coderabbitai coderabbitai bot mentioned this pull request Aug 25, 2025
10 tasks
snehar-nd pushed a commit that referenced this pull request Aug 25, 2025
* Fix the issue in retrieving the Casesheet Print Data for Cancer Screening (#96)

* fix: change the return type to object to get the details

* fix: remove commented lines

* fix: add the column for NumberperWeek to store and fetch the data (#94)

* Update version in pom.xml to 3.4.0

* chore: add Lombok @DaTa to BenClinicalObservations (#97)

* fix: add file path in cancer gynecological examination (#98)

* Fix the data sync issue  (#93)

* fix: Data Sync batch processing for large data

* fix: use parameterized query

* fix: revert the updated query

* fix: add token if it is missing while calling restTemplate

* fix: update the properties

* fix: sync group wise

* fix: enable logger in pom.xml

* fix: coderabbit comments

* fix: remove logger and replace the license

* fix: remove the logs

* fix: resolve code scanning alert

* fix: resolve code scanning alert

* fix: resolve code scanning alert

* fix: resolve code scanning alert

* fix: add comment for code violation

* fix: use syncuploaddataDigester class to load the deatils

* fix: add syncuploaddigestor in implementation file too

* fix: sonarcube comments

* fix: add functionality to save the file ID's uploaded from doctor screen (#99)

* story: amm-1668 task - 1754

* story: amm-1754 updated response including father name and phone no of the beneficiary (#102)

* fix: amm-1754 changing the query to get the expected response similar to hwc

* fix: amm-1754 compilation error fix

* fix: amm-1754 argument issue fix

* fix: amm-1754 argument issue fix

* fix: amm-1754 argument issue fix

* Save the files uploaded from Doctor Screen (#100)

* fix: add file path in cancer gynecological examination

* fix: save the files uploaded from the doctor portal

* fix: get file names in the response of gynecological examination

* fix: cherry-pick the commits from develop

* fix: cherry-pick commits from develop

* Fix the Download Masters issue (#103)

* fix: resolve the conflicts

* fix: fix the issue in download masters table

* fix: remove the validation (#105)

* fix: replace the old working code (#106)

* Fix the datasync upload issue (#107)

* fix: add the schemas

* fix: remove logger

* fix: revert the old code for repository

* Fixing the datasync from local to central (#110)

* fix: datasync from local to central

* fix: fix the token

* fix: remove the token for server authorization (#111)

* Fix the datasync Demographics Issue (#112)

* fix: remove condition for i_beneficiarydetails

* fix: add logs

* fix: add logs

* fix: remove db_iemr

* fix: add log for show column names too

* fix: add date-format condition

* fix: change valid column name

* fix: change valid column name

* fix: change valid column name

* fix: change valid column name

* fix: update insert query

* fix: update cleaned column list

* fix: date conversion

* fix: conversion date-time

* fix: add date conversion

* fix: logs added

* fix: new logger

* fix: revert the date condition

* fix: revert insert code

* fix: revert insert code

* fix: date format issue

* fix: logs add

* fix: log for group and group lsit

* fix: clean the code

---------

Co-authored-by: vishwab1 <vishwanath@navadhiti.com>

* Fix the token issue for Ben-gen id generation (#114)

* fix: update server authorization for bengen

* fix: update server authorization for bengen

* fix: replace authorization for local api call (#116)

* fix: add logs (#117)

* Fix the BenGen ID Issue (#118)

* fix: add logs to check the identity-api

* fix: add logs

* fix: add logs

---------

Co-authored-by: Vanitha S <116701245+vanitha1822@users.noreply.github.com>
Co-authored-by: Amoghavarsh <93114621+5Amogh@users.noreply.github.com>
Co-authored-by: 5Amogh <amoghavarsh@navadhiti.com>
Co-authored-by: Vanitha <vanitha@navadhiti.com>
vanitha1822 added a commit that referenced this pull request Sep 24, 2025
* Fix the issue in retrieving the Casesheet Print Data for Cancer Screening (#96)

* fix: change the return type to object to get the details

* fix: remove commented lines

* fix: add the column for NumberperWeek to store and fetch the data (#94)

* Update version in pom.xml to 3.4.0

* chore: add Lombok @DaTa to BenClinicalObservations (#97)

* fix: add file path in cancer gynecological examination (#98)

* Fix the data sync issue  (#93)

* fix: Data Sync batch processing for large data

* fix: use parameterized query

* fix: revert the updated query

* fix: add token if it is missing while calling restTemplate

* fix: update the properties

* fix: sync group wise

* fix: enable logger in pom.xml

* fix: coderabbit comments

* fix: remove logger and replace the license

* fix: remove the logs

* fix: resolve code scanning alert

* fix: resolve code scanning alert

* fix: resolve code scanning alert

* fix: resolve code scanning alert

* fix: add comment for code violation

* fix: use syncuploaddataDigester class to load the deatils

* fix: add syncuploaddigestor in implementation file too

* fix: sonarcube comments

* fix: add functionality to save the file ID's uploaded from doctor screen (#99)

* story: amm-1668 task - 1754

* story: amm-1754 updated response including father name and phone no of the beneficiary (#102)

* fix: amm-1754 changing the query to get the expected response similar to hwc

* fix: amm-1754 compilation error fix

* fix: amm-1754 argument issue fix

* fix: amm-1754 argument issue fix

* fix: amm-1754 argument issue fix

* Save the files uploaded from Doctor Screen (#100)

* fix: add file path in cancer gynecological examination

* fix: save the files uploaded from the doctor portal

* fix: get file names in the response of gynecological examination

* fix: cherry-pick the commits from develop

* fix: cherry-pick commits from develop

* Fix the Download Masters issue (#103)

* fix: resolve the conflicts

* fix: fix the issue in download masters table

* fix: remove the validation (#105)

* fix: replace the old working code (#106)

* Fix the datasync upload issue (#107)

* fix: add the schemas

* fix: remove logger

* fix: revert the old code for repository

* Fixing the datasync from local to central (#110)

* fix: datasync from local to central

* fix: fix the token

* fix: remove the token for server authorization (#111)

* Fix the datasync Demographics Issue (#112)

* fix: remove condition for i_beneficiarydetails

* fix: add logs

* fix: add logs

* fix: remove db_iemr

* fix: add log for show column names too

* fix: add date-format condition

* fix: change valid column name

* fix: change valid column name

* fix: change valid column name

* fix: change valid column name

* fix: update insert query

* fix: update cleaned column list

* fix: date conversion

* fix: conversion date-time

* fix: add date conversion

* fix: logs added

* fix: new logger

* fix: revert the date condition

* fix: revert insert code

* fix: revert insert code

* fix: date format issue

* fix: logs add

* fix: log for group and group lsit

* fix: clean the code

---------

Co-authored-by: vishwab1 <vishwanath@navadhiti.com>

* Fix the token issue for Ben-gen id generation (#114)

* fix: update server authorization for bengen

* fix: update server authorization for bengen

* fix: replace authorization for local api call (#116)

* fix: add logs (#117)

* Fix the BenGen ID Issue (#118)

* fix: add logs to check the identity-api

* fix: add logs

* fix: add logs

* fix: add logs

* fix: add logs for checking

* fix: update the prepare statement

* fix: add log

* fix: add log

* fix: add logs

* fix: add Sync Result

* fix: add logs

* fix: add syncResults

* fix: add syncResults

* fix: update processed flag

* fix: update the response

* fix: update the exception block

* fix: upload fix

* fix: address duplication issue

* fix: datasync issue

* fix: remove reason and add dataaccess exception

* fix: revert the server exception

* fix: remove unwanted code

* fix: exception message

* fix: fix the error message

* fix: update the version

---------

Co-authored-by: Amoghavarsh <93114621+5Amogh@users.noreply.github.com>
Co-authored-by: 5Amogh <amoghavarsh@navadhiti.com>
Co-authored-by: vishwab1 <vishwanath@navadhiti.com>
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.

3 participants