Skip to content

download reports#124

Merged
helenKaryamsetty merged 1 commit intoPSMRI:developfrom
ravishanigarapu:develop
Sep 30, 2024
Merged

download reports#124
helenKaryamsetty merged 1 commit intoPSMRI:developfrom
ravishanigarapu:develop

Conversation

@ravishanigarapu
Copy link
Copy Markdown
Contributor

@ravishanigarapu ravishanigarapu commented Sep 27, 2024

📋 Description

JIRA ID: AMM-898

1097 reports download


✅ 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

  • New Features

    • Updated SQL queries for various reports to streamline access and improve performance.
    • Changed schema references for specific stored procedures to enhance data retrieval efficiency.
  • Bug Fixes

    • Corrected method signatures to reflect the updated stored procedure calls, ensuring accurate report generation.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Sep 27, 2024

Walkthrough

The changes involve modifications to SQL query strings in the CallReportSecondaryRepo.java file. The db_iemr. prefix has been removed from several stored procedure calls, indicating a transition to a different schema or simplification of the query syntax. The Pr_1097calltypeReport procedure has been updated to reference the db_reporting schema. The method signatures for various public methods have been adjusted accordingly, but the overall structure of the methods remains unchanged.

Changes

File Path Change Summary
src/main/java/com/iemr/common/secondary/repository/callreport/CallReportSecondaryRepo.java Updated SQL query strings by removing the db_iemr. prefix from stored procedures Pr_1097Sexualorientation, Pr_1097LanguageDistribution, Pr_1097AgegroupDistribution, and Pr_1097GenderDistribution. Changed schema for Pr_1097calltypeReport to db_reporting. Adjusted method signatures accordingly.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant CallReportSecondaryRepo
    participant Database

    Client->>CallReportSecondaryRepo: Request report by sexual orientation
    CallReportSecondaryRepo->>Database: Call Pr_1097Sexualorientation()
    Database-->>CallReportSecondaryRepo: Return report data
    CallReportSecondaryRepo-->>Client: Send report data

    Client->>CallReportSecondaryRepo: Request language distribution report
    CallReportSecondaryRepo->>Database: Call Pr_1097LanguageDistribution()
    Database-->>CallReportSecondaryRepo: Return report data
    CallReportSecondaryRepo-->>Client: Send report data

    Client->>CallReportSecondaryRepo: Request age group report
    CallReportSecondaryRepo->>Database: Call Pr_1097AgegroupDistribution()
    Database-->>CallReportSecondaryRepo: Return report data
    CallReportSecondaryRepo-->>Client: Send report data

    Client->>CallReportSecondaryRepo: Request gender report
    CallReportSecondaryRepo->>Database: Call Pr_1097GenderDistribution()
    Database-->>CallReportSecondaryRepo: Return report data
    CallReportSecondaryRepo-->>Client: Send report data

    Client->>CallReportSecondaryRepo: Request call type report
    CallReportSecondaryRepo->>Database: Call db_reporting.Pr_1097calltypeReport()
    Database-->>CallReportSecondaryRepo: Return report data
    CallReportSecondaryRepo-->>Client: Send report data
Loading

Poem

🐇 In the code where queries play,
A little change has come our way.
No more prefixes to slow the pace,
Just clean calls in a simpler space.
Hopping through reports with glee,
A brighter path for all to see! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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 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.

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a 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

🧹 Outside diff range and nitpick comments (1)
src/main/java/com/iemr/common/secondary/repository/callreport/CallReportSecondaryRepo.java (1)

Update Database Configuration Files

References to db_iemr are still present in the following properties files:

  • src/main/environment/common_example.properties
  • src/main/environment/common_dev.properties

Please update the spring.datasource.url in these files to reflect the new schema (db_reporting or the appropriate schema name) to ensure consistency across the application.

🔗 Analysis chain

Line range hint 104-108: LGTM. Verify database configuration.

The removal of the db_iemr. prefix from the stored procedure call is consistent with other changes in this file. This change looks good, but it's important to ensure that the database configuration has been updated accordingly.

Please confirm that the database configuration has been updated to reflect this change in schema reference. Run the following script to check for any remaining references to db_iemr in the project:


Please use the corrected script below to search for any remaining references to db_iemr in Java, XML, and properties files:

[/run_scripts]

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any remaining references to db_iemr in the project
rg --type java --type xml --type properties 'db_iemr'

Length of output: 470


Script:

#!/bin/bash
# Search for any remaining references to db_iemr in the project
rg --type java --type xml -g '*.properties' 'db_iemr'

Length of output: 327


Script:

#!/bin/bash
# Search for any remaining references to db_iemr in the project
rg --type java --type xml -g '*.properties' 'db_iemr'

Length of output: 327

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 0c9f8b3 and 39f8f15.

📒 Files selected for processing (1)
  • src/main/java/com/iemr/common/secondary/repository/callreport/CallReportSecondaryRepo.java (2 hunks)
🔇 Additional comments (5)
src/main/java/com/iemr/common/secondary/repository/callreport/CallReportSecondaryRepo.java (5)

135-139: LGTM. Change is consistent.

The removal of the db_iemr. prefix from the stored procedure call is consistent with other changes in this file. This change looks good and doesn't introduce any apparent issues.


142-145: LGTM. Change is consistent.

The removal of the db_iemr. prefix from the stored procedure call is consistent with other changes in this file. This change looks good and doesn't introduce any apparent issues.


Line range hint 153-157: LGTM. Change is consistent.

The removal of the db_iemr. prefix from the stored procedure call is consistent with other changes in this file. This change looks good and doesn't introduce any apparent issues.


147-151: LGTM, but please provide more context on the schema change.

The change from db_iemr. to db_reporting. for the Pr_1097calltypeReport procedure is noted. While this change looks good, it differs from the pattern of simply removing the schema prefix seen in other methods.

Could you please provide more information on:

  1. The reason for moving this specific procedure to the db_reporting schema?
  2. Whether this change is part of a larger database reorganization?
  3. If there are any potential impacts on other parts of the system that might be expecting this procedure to be in the db_iemr schema?

To ensure this change doesn't introduce any inconsistencies, please run the following script to check for any other references to this procedure:

#!/bin/bash
# Search for any other references to Pr_1097calltypeReport in the project
rg --type java --type xml --type properties 'Pr_1097calltypeReport'

Line range hint 104-157: Overall changes look good, but please verify database configuration and provide additional context.

The changes in this file consistently remove the db_iemr. prefix from stored procedure calls, with one exception changing to db_reporting.. While these changes look good, they may have implications for the database configuration and connections.

To ensure the smooth integration of these changes:

  1. Please verify that the database configuration has been updated to reflect these changes in schema references.
  2. Provide more context on the decision to move the Pr_1097calltypeReport procedure to the db_reporting schema, as this differs from the pattern seen in other methods.
  3. Confirm that these changes are part of a planned database reorganization and that all necessary adjustments have been made throughout the system.

Consider documenting these schema changes in the project's database migration scripts or changelog to ensure consistency across different environments and to make the deployment process smoother.

Run the following script to perform a final check for any remaining references to db_iemr or inconsistent references to the changed procedures:

#!/bin/bash
# Search for any remaining references to db_iemr and the changed procedures
echo "Checking for db_iemr references:"
rg --type java --type xml --type properties 'db_iemr'
echo "Checking for changed procedure references:"
rg --type java --type xml --type properties 'Pr_1097Sexualorientation|Pr_1097LanguageDistribution|Pr_1097AgegroupDistribution|Pr_1097calltypeReport|Pr_1097GenderDistribution'

@helenKaryamsetty helenKaryamsetty merged commit dc851c5 into PSMRI:develop Sep 30, 2024
@coderabbitai coderabbitai Bot mentioned this pull request Oct 1, 2024
10 tasks
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.

2 participants