Skip to content
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

Hlm 5011 be usage of common models in project service #651

Closed

Conversation

syed-egov
Copy link
Contributor

@syed-egov syed-egov commented Feb 27, 2024

Summary by CodeRabbit

  • New Features
    • Introduced total count for households and a new client reference ID for household members.
    • Enhanced inventory flow for last-mile delivery with QR code functionality.
    • Launched health facility referral management, including bulk operations and search functionalities.
    • Added Downsync feature for improved data synchronization.
  • Bug Fixes
    • Modified field validation criteria to be more inclusive.
  • Documentation
    • Updated changelogs for health-services/household, health-services-models, project, and stock modules.
  • Refactor
    • Improved code organization through updated import statements and better package structure alignment.
    • Changed staffId type to accommodate lists of strings.
  • Tests
    • Enhanced test coverage for project entity search and controller functionalities.

Copy link
Contributor

coderabbitai bot commented Feb 27, 2024

Walkthrough

The recent updates across the health-services ecosystem focus on enhancing functionality and improving data handling. Key changes include adding a total count for households, refining the client reference ID for household members, adjusting field validation criteria, and introducing new classes for health facility referrals. Additionally, project beneficiary tagging, inventory flow enhancements via QR code functionality, and database updates for referral management have been implemented. These modifications aim to streamline operations and increase the efficiency of health services management.

Changes

Files Change Summary
health-services/household/CHANGELOG.md
health-services/libraries/health-services-models/CHANGELOG.md
Added client reference ID for household members; reverted a change in household search.
health-services/libraries/.../models/facility/Field.java
health-services/libraries/.../models/(household|individual|product|project|stock)/Field.java
Adjusted @Size annotation parameters; fixed duplicate imports.
health-services/libraries/.../models/project/(ProjectBeneficiarySearch|ProjectFacilitySearch|ProjectResourceSearch|ProjectSearch|ProjectStaffSearch).java Added @Table annotation; changed staffId type.
health-services/libraries/.../models/referralmanagement.hfreferral/... Introduced classes for HF referral handling.
health-services/project/CHANGELOG.md
health-services/stock/CHANGELOG.md
Added tag in project beneficiary; enhanced inventory flow with QR code functionality.
health-services/project/src/main/java/org.egov.project/service/...
health-services/project/src/main/java/org.egov.project/validator/beneficiary/...
health-services/project/src/main/java/org.egov.project/web/controllers/...
health-services/project/src/test/java/org.egov.project/service/...
health-services/project/src/test/java/org.egov.project/web/controllers/...
Updated imports and functionalities for better organization and test coverage.
health-services/referralmanagement/CHANGELOG.md
health-services/referralmanagement/src/main/java/org.egov.referralmanagement/...
health-services/referralmanagement/src/main/resources/...
Introduced Downsync feature; added functionalities for HF referral management and database updates.

Poem

"In the realm of code, where changes abound,
A rabbit hopped in, making hardly a sound.
🐇✨ With each leap and bound, it weaved magic so bright,
Enhancing the health services, into the night.
Fields validated, with QR codes gleamed,
In the dance of updates, the rabbit beamed.
'To improve and refine,' it whispered with glee,
'Is the goal of my journey, as far as I 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>.
    • Generate unit-tests for this file.
  • 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 tests 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 generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

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

Review Status

Actionable comments generated: 14

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 1c034e3 and 373abd4.
Files ignored due to path filters (4)
  • build/build-config.yml is excluded by: !**/*.yml
  • health-services/libraries/health-services-models/pom.xml is excluded by: !**/*.xml
  • health-services/project/pom.xml is excluded by: !**/*.xml
  • health-services/referralmanagement/pom.xml is excluded by: !**/*.xml
Files selected for processing (57)
  • health-services/household/CHANGELOG.md (1 hunks)
  • health-services/libraries/health-services-models/CHANGELOG.md (1 hunks)
  • health-services/libraries/health-services-models/src/main/java/org/egov/common/models/facility/Field.java (3 hunks)
  • health-services/libraries/health-services-models/src/main/java/org/egov/common/models/household/Field.java (3 hunks)
  • health-services/libraries/health-services-models/src/main/java/org/egov/common/models/household/HouseholdSearch.java (1 hunks)
  • health-services/libraries/health-services-models/src/main/java/org/egov/common/models/individual/Field.java (3 hunks)
  • health-services/libraries/health-services-models/src/main/java/org/egov/common/models/product/Field.java (3 hunks)
  • health-services/libraries/health-services-models/src/main/java/org/egov/common/models/project/Field.java (3 hunks)
  • health-services/libraries/health-services-models/src/main/java/org/egov/common/models/project/ProjectBeneficiarySearch.java (2 hunks)
  • health-services/libraries/health-services-models/src/main/java/org/egov/common/models/project/ProjectFacilitySearch.java (2 hunks)
  • health-services/libraries/health-services-models/src/main/java/org/egov/common/models/project/ProjectResourceSearch.java (2 hunks)
  • health-services/libraries/health-services-models/src/main/java/org/egov/common/models/project/ProjectSearch.java (2 hunks)
  • health-services/libraries/health-services-models/src/main/java/org/egov/common/models/project/ProjectStaffSearch.java (3 hunks)
  • health-services/libraries/health-services-models/src/main/java/org/egov/common/models/referralmanagement/hfreferral/HFReferral.java (1 hunks)
  • health-services/libraries/health-services-models/src/main/java/org/egov/common/models/referralmanagement/hfreferral/HFReferralBulkRequest.java (1 hunks)
  • health-services/libraries/health-services-models/src/main/java/org/egov/common/models/referralmanagement/hfreferral/HFReferralBulkResponse.java (1 hunks)
  • health-services/libraries/health-services-models/src/main/java/org/egov/common/models/referralmanagement/hfreferral/HFReferralRequest.java (1 hunks)
  • health-services/libraries/health-services-models/src/main/java/org/egov/common/models/referralmanagement/hfreferral/HFReferralResponse.java (1 hunks)
  • health-services/libraries/health-services-models/src/main/java/org/egov/common/models/referralmanagement/hfreferral/HFReferralSearch.java (1 hunks)
  • health-services/libraries/health-services-models/src/main/java/org/egov/common/models/referralmanagement/hfreferral/HFReferralSearchRequest.java (1 hunks)
  • health-services/libraries/health-services-models/src/main/java/org/egov/common/models/stock/Field.java (3 hunks)
  • health-services/project/CHANGELOG.md (1 hunks)
  • health-services/project/src/main/java/org/egov/project/service/ProjectBeneficiaryService.java (2 hunks)
  • health-services/project/src/main/java/org/egov/project/service/ProjectFacilityService.java (2 hunks)
  • health-services/project/src/main/java/org/egov/project/service/ProjectResourceService.java (2 hunks)
  • health-services/project/src/main/java/org/egov/project/service/ProjectStaffService.java (2 hunks)
  • health-services/project/src/main/java/org/egov/project/validator/beneficiary/PbVoucherTagUniqueForCreateValidator.java (1 hunks)
  • health-services/project/src/main/java/org/egov/project/validator/beneficiary/PbVoucherTagUniqueForUpdateValidator.java (3 hunks)
  • health-services/project/src/main/java/org/egov/project/web/controllers/ProjectApiController.java (3 hunks)
  • health-services/project/src/main/java/org/egov/project/web/controllers/ProjectResourceApiController.java (3 hunks)
  • health-services/project/src/test/java/org/egov/project/service/ProjectBeneficiaryServiceSearchTest.java (1 hunks)
  • health-services/project/src/test/java/org/egov/project/service/ProjectFacilityServiceSearchTest.java (1 hunks)
  • health-services/project/src/test/java/org/egov/project/service/ProjectStaffServiceSearchTest.java (2 hunks)
  • health-services/project/src/test/java/org/egov/project/web/controllers/ProjectBeneficiaryApiControllerTest.java (2 hunks)
  • health-services/project/src/test/java/org/egov/project/web/controllers/ProjectFacilityApiControllerTest.java (2 hunks)
  • health-services/project/src/test/java/org/egov/project/web/controllers/ProjectStaffApiControllerTest.java (1 hunks)
  • health-services/referralmanagement/CHANGELOG.md (1 hunks)
  • health-services/referralmanagement/src/main/java/org/egov/referralmanagement/Constants.java (1 hunks)
  • health-services/referralmanagement/src/main/java/org/egov/referralmanagement/config/ReferralManagementConfiguration.java (1 hunks)
  • health-services/referralmanagement/src/main/java/org/egov/referralmanagement/consumer/HFReferralConsumer.java (1 hunks)
  • health-services/referralmanagement/src/main/java/org/egov/referralmanagement/repository/HFReferralRepository.java (1 hunks)
  • health-services/referralmanagement/src/main/java/org/egov/referralmanagement/repository/rowmapper/HFReferralRowMapper.java (1 hunks)
  • health-services/referralmanagement/src/main/java/org/egov/referralmanagement/service/DownsyncService.java (10 hunks)
  • health-services/referralmanagement/src/main/java/org/egov/referralmanagement/service/HFReferralService.java (1 hunks)
  • health-services/referralmanagement/src/main/java/org/egov/referralmanagement/service/enrichment/HFReferralEnrichmentService.java (1 hunks)
  • health-services/referralmanagement/src/main/java/org/egov/referralmanagement/validator/hfreferral/HfrIsDeletedValidator.java (1 hunks)
  • health-services/referralmanagement/src/main/java/org/egov/referralmanagement/validator/hfreferral/HfrNonExistentEntityValidator.java (1 hunks)
  • health-services/referralmanagement/src/main/java/org/egov/referralmanagement/validator/hfreferral/HfrNullIdValidator.java (1 hunks)
  • health-services/referralmanagement/src/main/java/org/egov/referralmanagement/validator/hfreferral/HfrProjectFacilityIdValidator.java (1 hunks)
  • health-services/referralmanagement/src/main/java/org/egov/referralmanagement/validator/hfreferral/HfrProjectIdValidator.java (1 hunks)
  • health-services/referralmanagement/src/main/java/org/egov/referralmanagement/validator/hfreferral/HfrRowVersionValidator.java (1 hunks)
  • health-services/referralmanagement/src/main/java/org/egov/referralmanagement/validator/hfreferral/HfrUniqueEntityValidator.java (1 hunks)
  • health-services/referralmanagement/src/main/java/org/egov/referralmanagement/web/controllers/HFReferralApiController.java (1 hunks)
  • health-services/referralmanagement/src/main/resources/application.properties (2 hunks)
  • health-services/referralmanagement/src/main/resources/db/migration/main/V20231214113400__hf_referral_create_ddl.sql (1 hunks)
  • health-services/referralmanagement/src/main/resources/db/migration/main/V20240103142200__hf_referral_project_facility_rename_ddl.sql (1 hunks)
  • health-services/stock/CHANGELOG.md (1 hunks)
Files skipped from review due to trivial changes (2)
  • health-services/referralmanagement/CHANGELOG.md
  • health-services/referralmanagement/src/main/resources/db/migration/main/V20240103142200__hf_referral_project_facility_rename_ddl.sql
Additional comments: 60
health-services/household/CHANGELOG.md (1)
  • 3-6: The updates to the CHANGELOG, including the addition of a total count for households and the introduction of a clientReferenceId field for HouseholdMember, are well-documented and align with the PR's objectives of improving data handling and consistency.
health-services/project/CHANGELOG.md (1)
  • 3-3: The documentation of the addition of a tag in the project beneficiary for version 1.1.1 is clear and aligns with the PR's objectives of enhancing project service functionalities.
health-services/stock/CHANGELOG.md (1)
  • 3-4: The update enhancing inventory flow for last-mile delivery with QR code functionality, documented under version 1.1.1, is specific and aligns with the PR's objectives of optimizing existing functionalities.
health-services/libraries/health-services-models/CHANGELOG.md (1)
  • 3-3: The documentation of the addition of a client reference ID for members of the household and the revert of a previous change related to household search in version 1.0.11 is clear and aligns with the PR's objectives of refining health services models.
health-services/referralmanagement/src/main/java/org/egov/referralmanagement/Constants.java (1)
  • 8-9: The addition of the SET_HF_REFERRALS and GET_HF_REFERRALS constants aligns with the existing naming convention and the PR's objectives of enhancing referral management functionalities.
health-services/libraries/health-services-models/src/main/java/org/egov/common/models/project/ProjectStaffSearch.java (3)
  • 10-10: Adding the Table import statement is necessary for the subsequent annotation of the class to link it with the corresponding database table. This change is correctly implemented.
  • 28-28: The addition of the @Table(name="project_staff") annotation correctly associates the ProjectStaffSearch class with the project_staff database table. This is a good practice for clarity and maintainability.
  • 40-40: Changing the type of staffId from String to List<String> in ProjectStaffSearch is a significant modification. This change implies that the search functionality now supports querying by multiple staff IDs, which could enhance the flexibility of the search operation. Ensure that all usages of staffId in the codebase are updated to reflect this change in type.
health-services/libraries/health-services-models/src/main/java/org/egov/common/models/project/ProjectBeneficiarySearch.java (2)
  • 10-10: The import statement for Table is correctly added to support the annotation of the ProjectBeneficiarySearch class. This is necessary for the ORM mapping.
  • 28-28: Annotating the ProjectBeneficiarySearch class with @Table(name="project_beneficiary") correctly maps this class to the project_beneficiary database table. This change is essential for database operations related to project beneficiaries and enhances code readability.
health-services/libraries/health-services-models/src/main/java/org/egov/common/models/project/ProjectSearch.java (2)
  • 9-9: The import statement for Table is correctly added, enabling the use of the @Table annotation in the ProjectSearch class. This is a necessary step for ORM mapping.
  • 25-25: Annotating the ProjectSearch class with @Table(name="project") is a correct and necessary change to map this class to the project database table. This enhances the clarity and maintainability of the ORM mapping.
health-services/referralmanagement/src/main/java/org/egov/referralmanagement/service/enrichment/HFReferralEnrichmentService.java (3)
  • 26-33: The create method in HFReferralEnrichmentService correctly generates UUIDs for new HFReferrals and enriches them with generated IDs. The use of logging to trace the enrichment process is a good practice for debugging and monitoring.
  • 40-44: The update method enriches HFReferrals for update operations by mapping entity IDs to objects and applying enrichment logic. The logging statements provide useful insights into the enrichment process. Ensure that the enrichment logic aligns with the business requirements for updating HFReferrals.
  • 52-55: The delete method enriches HFReferrals for deletion, marking them as deleted based on the request information. The logging statements help in tracking the enrichment process. This method should ensure that it aligns with the business logic for handling deletions, especially regarding the handling of related data.
health-services/referralmanagement/src/main/java/org/egov/referralmanagement/validator/hfreferral/HfrUniqueEntityValidator.java (1)
  • 26-45: The validate method in HfrUniqueEntityValidator correctly identifies duplicate HFReferral entities based on their IDs. The use of logging to trace the validation process is good practice. However, ensure that the logic for identifying duplicates accurately reflects the business requirements for uniqueness within the system.
health-services/libraries/health-services-models/src/main/java/org/egov/common/models/referralmanagement/hfreferral/HFReferral.java (1)
  • 18-85: The HFReferral model is correctly defined with appropriate properties, validation annotations, and serialization annotations. The use of @Size and @NotNull annotations ensures that the data conforms to expected constraints. The inclusion of AuditDetails and AdditionalFields supports comprehensive data tracking and flexibility for additional information. This model definition aligns well with best practices for data modeling and validation.
health-services/referralmanagement/src/main/java/org/egov/referralmanagement/validator/hfreferral/HfrRowVersionValidator.java (1)
  • 41-60: The validate method in HfrRowVersionValidator correctly identifies HFReferral entities with mismatched row versions, indicating potential concurrent modification issues. The use of reflection to access entity IDs and row versions is a flexible approach, but ensure that it does not introduce performance issues or complexity that could be avoided with simpler solutions. The logging and error handling are appropriately implemented.
health-services/referralmanagement/src/main/java/org/egov/referralmanagement/repository/rowmapper/HFReferralRowMapper.java (1)
  • 24-60: The mapRow method in HFReferralRowMapper correctly maps database rows to HFReferral entities, including handling of AuditDetails and deserialization of JSON fields into AdditionalFields. The use of ObjectMapper for JSON deserialization is appropriate. Ensure that all fields are correctly mapped and that the JSON deserialization logic aligns with the structure of AdditionalFields.
health-services/referralmanagement/src/main/java/org/egov/referralmanagement/validator/hfreferral/HfrNonExistentEntityValidator.java (1)
  • 47-68: The validate method in HfrNonExistentEntityValidator correctly identifies non-existent HFReferral entities based on their IDs. The use of reflection to access entity IDs is a flexible approach, but ensure that it does not introduce unnecessary complexity. The logging and error handling are appropriately implemented. This validation step is crucial for ensuring data integrity.
health-services/referralmanagement/src/main/java/org/egov/referralmanagement/config/ReferralManagementConfiguration.java (1)
  • 64-90: The addition of properties related to HFReferral Kafka topics (createHFReferralTopic, updateHFReferralTopic, deleteHFReferralTopic, etc.) and project search URLs (projectFacilitySearchUrl, projectSearchUrl) in ReferralManagementConfiguration is correctly implemented. These properties are essential for configuring the application's interaction with Kafka and external services. Ensure that the property values are correctly configured in the application's properties files.
health-services/referralmanagement/src/main/java/org/egov/referralmanagement/consumer/HFReferralConsumer.java (1)
  • 35-72: The HFReferralConsumer class correctly implements Kafka listeners for bulk create, update, and delete operations on HFReferrals. The use of @KafkaListener annotations with dynamic topic names from configuration properties is a good practice. The deserialization of consumer records into HFReferralBulkRequest objects and the subsequent handling of these requests by the HFReferralService are correctly implemented. The error handling and logging provide useful diagnostics in case of exceptions. Ensure that the Kafka topics are correctly configured and that the consumer group settings align with the application's scalability and fault tolerance requirements.
health-services/project/src/test/java/org/egov/project/service/ProjectBeneficiaryServiceSearchTest.java (2)
  • 5-7: The addition of imports for BeneficiarySearchRequest and ProjectBeneficiarySearch from org.egov.common.models.project is appropriate and aligns with the PR's objective to utilize common models across various modules. This change enhances consistency and maintainability within the project.
  • 2-14: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [33-67]

The test cases within ProjectBeneficiaryServiceSearchTest are well-structured and follow best practices for unit testing. Each test case has a clear purpose, uses meaningful test data, and appropriate assertions to validate the behavior of the ProjectBeneficiaryService. This contributes to the maintainability and reliability of the project.

health-services/project/src/test/java/org/egov/project/service/ProjectStaffServiceSearchTest.java (3)
  • 7-8: The update of import statements for ProjectStaffSearch and ProjectStaffSearchRequest to org.egov.common.models.project is appropriate and aligns with the PR's objective of utilizing common models across various modules. This enhances consistency and maintainability within the project.
  • 53-53: Modifying the staffId field in ProjectStaffSearch to accept a list of staff IDs instead of a single ID is a significant improvement. It increases the flexibility and functionality of staff searches, allowing for more complex queries. This change is well-aligned with the objectives of enhancing the project service's capabilities.
  • 50-56: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [33-93]

The test cases within ProjectStaffServiceSearchTest are well-structured and adhere to best practices for unit testing. Each test case has a clear objective, uses meaningful test data, and employs appropriate assertions to validate the behavior of the ProjectStaffService. This contributes positively to the project's maintainability and reliability.

health-services/referralmanagement/src/main/java/org/egov/referralmanagement/repository/HFReferralRepository.java (1)
  • 1-94: The changes in HFReferralRepository.java demonstrate a thoughtful approach to constructing dynamic SQL queries and handling parameters securely using NamedParameterJdbcTemplate. The implementation of caching strategies for HFReferral entities is noted, though the specifics of cache handling are not visible in this snippet. It's recommended to ensure that the caching strategy aligns with best practices for cache usage and invalidation to avoid stale data issues.
health-services/referralmanagement/src/main/java/org/egov/referralmanagement/validator/hfreferral/HfrProjectIdValidator.java (1)
  • 1-108: The HfrProjectIdValidator class implements a robust validation mechanism for verifying the existence of projects associated with HFReferral entities. The use of batch fetching by tenant ID and detailed error handling for invalid entities are notable strengths of this implementation. It's recommended to ensure that the external service calls made by ServiceRequestClient are resilient to failures and timeouts, enhancing the reliability of the validation process.
health-services/project/src/test/java/org/egov/project/service/ProjectFacilityServiceSearchTest.java (2)
  • 5-9: The update of import statements for ProjectFacilitySearch and ProjectFacilitySearchRequest to org.egov.common.models.project is appropriate and aligns with the PR's objective of utilizing common models across various modules. This enhances consistency and maintainability within the project.
  • 2-12: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [33-93]

The test cases within ProjectFacilityServiceSearchTest are well-structured and adhere to best practices for unit testing. Each test case has a clear objective, uses meaningful test data, and employs appropriate assertions to validate the behavior of the ProjectFacilityService. This contributes positively to the project's maintainability and reliability.

health-services/project/src/main/java/org/egov/project/validator/beneficiary/PbVoucherTagUniqueForCreateValidator.java (2)
  • 14-14: The change to import ProjectBeneficiarySearch from org.egov.common.models.project is appropriate and aligns with the PR's objective of utilizing common models across various modules. This enhances consistency and maintainability within the project.
  • 1-25: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [33-108]

The implementation of the PbVoucherTagUniqueForCreateValidator class provides a robust mechanism for ensuring the uniqueness of voucher tags among ProjectBeneficiary entities. The approach to fetching existing entities based on voucher tags and populating detailed errors for duplicates is commendable, contributing to the integrity and reliability of the data validation process.

health-services/referralmanagement/src/main/resources/application.properties (2)
  • 100-105: The addition of new project service URLs (egov.project.host, egov.search.project.url, egov.search.project.task.url, egov.search.project.beneficiary.url, egov.search.project.staff.url, egov.search.project.facility.url) is a significant enhancement. Ensure that these URLs are correctly configured in the environment where the application will be deployed to avoid runtime errors.
  • 125-132: The configuration of Kafka topics for HF referrals (referralmanagement.hfreferral.kafka.create.topic, referralmanagement.hfreferral.kafka.update.topic, referralmanagement.hfreferral.kafka.delete.topic, referralmanagement.hfreferral.consumer.bulk.create.topic, referralmanagement.hfreferral.consumer.bulk.update.topic, referralmanagement.hfreferral.consumer.bulk.delete.topic) is crucial for the system's event-driven architecture. Verify that these topics are created and properly configured in the Kafka cluster to ensure smooth operation and data integrity.
health-services/project/src/main/java/org/egov/project/web/controllers/ProjectResourceApiController.java (1)
  • 18-18: The import of ProjectResourceSearchRequest from the org.egov.common.models.project package is a positive change towards standardizing request models. Ensure that all references to ProjectResourceSearchRequest in this class and related classes are updated accordingly to avoid compilation errors or runtime issues.
health-services/project/src/main/java/org/egov/project/validator/beneficiary/PbVoucherTagUniqueForUpdateValidator.java (1)
  • 12-12: The update to import ProjectBeneficiarySearch from the org.egov.common.models.project package in the PbVoucherTagUniqueForUpdateValidator class is a step towards standardizing models across the application. Ensure that this change is reflected in all relevant parts of the application to maintain consistency.
health-services/referralmanagement/src/main/java/org/egov/referralmanagement/web/controllers/HFReferralApiController.java (2)
  • 83-90: The bulk creation method referralBulkV1CreatePost is implemented correctly. It sets the API ID in the request info and uses the producer to push the request to a Kafka topic. Ensure that the Kafka topic configured in referralManagementConfiguration.getCreateHFReferralBulkTopic() is correctly set up and monitored for processing these requests.
  • 165-172: The bulk delete method referralV1BulkDeletePost uses the producer to push the request to a Kafka topic for processing. As with the bulk create method, ensure that the Kafka topic is correctly set up and that there are consumers processing these deletion requests efficiently.
health-services/project/src/main/java/org/egov/project/service/ProjectResourceService.java (2)
  • 17-17: The change in the import statement for ProjectResourceSearchRequest aligns with the objective of using common models across various modules. Ensure that the new package org.egov.common.models.project correctly contains the ProjectResourceSearchRequest class and that all references to this class in the codebase have been updated accordingly.
  • 1-20: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [1-174]

Overall, the ProjectResourceService class is well-structured and follows good practices in terms of error handling, validation, and separation of concerns. However, ensure that all external dependencies, such as Kafka topics and database interactions, are properly configured and tested to handle the operations defined in this service.

health-services/project/src/main/java/org/egov/project/service/ProjectStaffService.java (2)
  • 15-15: The change in the import statement for ProjectStaffSearchRequest is consistent with the objective of resolving conflicts and ensuring consistency in the use of common models. Verify that the new package correctly contains the ProjectStaffSearchRequest class and that all references to this class in the codebase have been updated accordingly.
  • 1-18: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [1-174]

The ProjectStaffService class is implemented well, with clear separation of concerns, proper error handling, and validation logic. As with the ProjectResourceService, ensure that all external dependencies, such as Kafka topics and database interactions, are properly configured and tested to handle the operations defined in this service.

health-services/project/src/main/java/org/egov/project/service/ProjectFacilityService.java (1)
  • 15-15: The change in the import path for ProjectFacilitySearchRequest aligns with the PR's objective to utilize common models across various modules. This should improve code organization and maintainability.
health-services/project/src/test/java/org/egov/project/web/controllers/ProjectBeneficiaryApiControllerTest.java (2)
  • 8-8: The addition of BeneficiarySearchRequest from org.egov.common.models.project is consistent with the PR's objective to standardize the use of common models, including in test cases.
  • 21-21: Replacing BeneficiarySearchRequest with ProjectBeneficiarySearch from org.egov.common.models.project in the test cases aligns with the effort to use common models across the project. This should help maintain consistency and facilitate easier updates in the future.
health-services/referralmanagement/src/main/java/org/egov/referralmanagement/service/HFReferralService.java (1)
  • 1-237: The HFReferralService class is well-structured and follows best practices for service layer implementation, including dependency injection, separation of concerns, and clear method responsibilities. The use of predicates for validator applicability is a notable practice for maintainability. This class contributes to the PR's objectives by enhancing the referral management module with structured and maintainable code.
health-services/project/src/main/java/org/egov/project/service/ProjectBeneficiaryService.java (1)
  • 14-14: The addition of BeneficiarySearchRequest import statement is aligned with the PR objectives of enhancing project service functionalities. Removing duplicate imports is a good practice for maintaining code clarity.
health-services/project/src/test/java/org/egov/project/web/controllers/ProjectFacilityApiControllerTest.java (2)
  • 10-10: The addition of the ProjectFacilitySearch import statement supports the enhancement of project facility search functionalities in the test suite.
  • 23-23: Updating the import for ProjectFacilitySearchRequest aligns with the PR objectives of optimizing existing functionalities and improving data validation and search capabilities.
health-services/referralmanagement/src/main/java/org/egov/referralmanagement/service/DownsyncService.java (6)
  • 140-140: The appendUrlParams method is now called with null, null for offset and limit parameters in the searchHouseholds method. This change implies that the default offset and limit defined in DownsyncCriteria will be used. Ensure that this behavior aligns with the intended functionality and that the default values are appropriately set in all use cases.
  • 177-177: The appendUrlParams method is called with 0 for offset and individualIds.size() for limit in the searchIndividuals method. This change suggests that pagination starts from the beginning for every call and the limit is dynamically set based on the size of individualIds. Confirm that this approach is suitable for the expected volume of data and does not introduce performance issues.
  • 210-210: In the searchMembers method, the appendUrlParams method is called with 0 for offset and householdIds.size() for limit. Similar to the previous comment, ensure that this dynamic setting of limit based on householdIds.size() is intended and evaluate its impact on performance.
  • 249-249: The appendUrlParams method is called with 0 for offset and individualClientRefIds.size() for limit in the searchBeneficiaries method. This consistent use of dynamic limits based on the size of input lists should be carefully reviewed for its impact on performance and correctness in all scenarios.
  • 301-301: In the searchTasks method, the appendUrlParams method is called with 0 for offset and taskIds.size() for limit. As with previous comments, ensure this dynamic limit setting is appropriate and does not negatively affect performance.
  • 401-421: The appendUrlParams method has been modified to accept offset and limit parameters. This is a significant change as it directly affects how pagination is handled in various search methods. Ensure that:
  • The method correctly handles null values for offset and limit, falling back to criteria.getLimit() and criteria.getOffset() as defaults.
  • The inclusion of limit and offset parameters in the URL is correctly formatted and does not introduce syntax errors in the constructed URL.
  • This change is consistently applied across all relevant method calls within the class to ensure uniform handling of pagination.
health-services/project/src/main/java/org/egov/project/web/controllers/ProjectApiController.java (4)
  • 4-10: The imports section is well-organized, and all necessary imports for handling HTTP requests, validation, and JSON mapping are present. However, without seeing the specific changes to the imports for BeneficiarySearchRequest, ProjectFacilitySearchRequest, ProjectStaffSearchRequest, it's difficult to assess the direct impact of those changes. Ensure that any removed imports are not in use elsewhere in the code to avoid compilation errors.
  • 18-34: The presence of imports related to project models (BeneficiarySearchRequest, ProjectFacilitySearchRequest, ProjectStaffSearchRequest, etc.) suggests that these classes are utilized within the controller. Given the AI-generated summary's mention of adding and removing these imports, it's crucial to verify that the current usage aligns with the latest model definitions and that any modifications to these models do not break the existing functionality.
Verification successful

The verification process has confirmed that BeneficiarySearchRequest, ProjectFacilitySearchRequest, and ProjectStaffSearchRequest are used within the ProjectApiController in a manner that aligns with their latest definitions. The controller methods correctly utilize these models with the required annotations (@Valid), ensuring that the data is validated according to the constraints defined in the models. There's no indication from the provided context or the script output that recent changes to these models would break existing functionality within the controller. Therefore, the initial review comment concern about verifying the compatibility of these models with their usage in the controller has been addressed.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the latest versions of BeneficiarySearchRequest, ProjectFacilitySearchRequest, and ProjectStaffSearchRequest are compatible with their usage in this controller.

Length of output: 0



Script:

#!/bin/bash
# Search for usages of BeneficiarySearchRequest, ProjectFacilitySearchRequest, and ProjectStaffSearchRequest within ProjectApiController.
echo "Searching for BeneficiarySearchRequest usage:"
rg "BeneficiarySearchRequest" -- "health-services/project/src/main/java/org/egov/project/web/controllers/ProjectApiController.java"

echo "Searching for ProjectFacilitySearchRequest usage:"
rg "ProjectFacilitySearchRequest" -- "health-services/project/src/main/java/org/egov/project/web/controllers/ProjectApiController.java"

echo "Searching for ProjectStaffSearchRequest usage:"
rg "ProjectStaffSearchRequest" -- "health-services/project/src/main/java/org/egov/project/web/controllers/ProjectApiController.java"

# View the latest definitions of these models.
echo "Viewing BeneficiarySearchRequest definition:"
fd "BeneficiarySearchRequest.java" --exec cat {}

echo "Viewing ProjectFacilitySearchRequest definition:"
fd "ProjectFacilitySearchRequest.java" --exec cat {}

echo "Viewing ProjectStaffSearchRequest definition:"
fd "ProjectStaffSearchRequest.java" --exec cat {}

Length of output: 7977

* 1-37: > 📝 **NOTE** > This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [11-57]

The constructor for ProjectApiController correctly injects all necessary services and configurations. This is a good practice for dependency injection, promoting testability and modularity. Ensure that any new services introduced in the PR are also properly injected and utilized within the controller methods.

  • 1-37: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [1086-1122]

The methods related to project creation, search, update, and deletion at the end of the controller demonstrate a clear and consistent approach to handling these operations. The inclusion of pagination, tenantId, and filtering parameters in search operations is a good practice for scalable APIs. Ensure that the logic for enriching requests and processing search criteria is thoroughly tested, especially with the integration of common models as mentioned in the PR objectives.

Comment on lines 64 to 73
public ResponseEntity<HFReferralResponse> referralV1CreatePost(@ApiParam(value = "Capture details of HFReferral", required = true) @Valid @RequestBody HFReferralRequest request) {

HFReferral hfReferral = hfReferralService.create(request);
HFReferralResponse response = HFReferralResponse.builder()
.hfReferral(hfReferral)
.responseInfo(ResponseInfoFactory
.createResponseInfo(request.getRequestInfo(), true))
.build();

return ResponseEntity.status(HttpStatus.ACCEPTED).body(response);
Copy link
Contributor

Choose a reason for hiding this comment

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

The method referralV1CreatePost correctly handles the creation of a health facility referral. It uses appropriate annotations and constructs the response well. However, consider adding logging at the beginning and end of the method for better traceability and debugging.

+ log.info("Creating HFReferral with details: {}", request);
...
+ log.info("HFReferral created successfully with ID: {}", hfReferral.getId());

Comment on lines 104 to 115
public ResponseEntity<HFReferralBulkResponse> referralV1SearchPost(@ApiParam(value = "HFReferral Search.", required = true) @Valid @RequestBody HFReferralSearchRequest request,
@NotNull @Min(0) @Max(1000) @ApiParam(value = "Pagination - limit records in response", required = true) @Valid @RequestParam(value = "limit", required = true) Integer limit,
@NotNull @Min(0) @ApiParam(value = "Pagination - offset from which records should be returned in response", required = true) @Valid @RequestParam(value = "offset", required = true) Integer offset,
@NotNull @ApiParam(value = "Unique id for a tenant.", required = true) @Valid @RequestParam(value = "tenantId", required = true) String tenantId,
@ApiParam(value = "epoch of the time since when the changes on the object should be picked up. Search results from this parameter should include both newly created objects since this time as well as any modified objects since this time. This criterion is included to help polling clients to get the changes in system since a last time they synchronized with the platform. ") @Valid @RequestParam(value = "lastChangedSince", required = false) Long lastChangedSince,
@ApiParam(value = "Used in search APIs to specify if (soft) deleted records should be included in search results.", defaultValue = "false") @Valid @RequestParam(value = "includeDeleted", required = false, defaultValue = "false") Boolean includeDeleted) throws Exception {

List<HFReferral> hfReferrals = hfReferralService.search(request, limit, offset, tenantId, lastChangedSince, includeDeleted);
HFReferralBulkResponse response = HFReferralBulkResponse.builder().responseInfo(ResponseInfoFactory
.createResponseInfo(request.getRequestInfo(), true)).hfReferrals(hfReferrals).build();

return ResponseEntity.status(HttpStatus.OK).body(response);
Copy link
Contributor

Choose a reason for hiding this comment

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

The search method referralV1SearchPost correctly implements pagination, tenant ID filtering, and optional parameters for lastChangedSince and includeDeleted. It's good practice to validate the tenantId against a list of allowed tenant IDs if such a list exists to prevent unauthorized access to data from other tenants.

+ // Example validation (adjust according to actual tenant ID validation logic)
+ if (!allowedTenantIds.contains(tenantId)) {
+     throw new ResponseStatusException(HttpStatus.FORBIDDEN, "Access to the requested tenant's data is not allowed.");
+ }

Comment on lines 124 to 133
public ResponseEntity<HFReferralResponse> referralV1UpdatePost(@ApiParam(value = "Capture details of Existing HFReferral", required = true) @Valid @RequestBody HFReferralRequest request) {
HFReferral hfReferral = hfReferralService.update(request);

HFReferralResponse response = HFReferralResponse.builder()
.hfReferral(hfReferral)
.responseInfo(ResponseInfoFactory
.createResponseInfo(request.getRequestInfo(), true))
.build();

return ResponseEntity.status(HttpStatus.ACCEPTED).body(response);
Copy link
Contributor

Choose a reason for hiding this comment

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

The update method referralV1UpdatePost follows a similar pattern to the create method and is implemented correctly. As with the create method, consider adding logging for better traceability.

+ log.info("Updating HFReferral with details: {}", request);
...
+ log.info("HFReferral updated successfully with ID: {}", hfReferral.getId());

Comment on lines 151 to 161
@RequestMapping(value = "/v1/_delete", method = RequestMethod.POST)
public ResponseEntity<HFReferralResponse> referralV1DeletePost(@ApiParam(value = "Capture details of Existing HFReferral", required = true) @Valid @RequestBody HFReferralRequest request) {
HFReferral hfReferral = hfReferralService.delete(request);

HFReferralResponse response = HFReferralResponse.builder()
.hfReferral(hfReferral)
.responseInfo(ResponseInfoFactory
.createResponseInfo(request.getRequestInfo(), true))
.build();

return ResponseEntity.status(HttpStatus.ACCEPTED).body(response);
Copy link
Contributor

Choose a reason for hiding this comment

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

The delete method referralV1DeletePost is implemented correctly, but it's important to ensure that the deletion logic within the service layer properly handles soft deletes (if applicable) to maintain data integrity and historical data for audit purposes.

referralmanagement.hfreferral.consumer.bulk.create.topic=save-hfreferral-bulk-topic
referralmanagement.hfreferral.consumer.bulk.update.topic=update-hfreferral-bulk-topic
referralmanagement.hfreferral.consumer.bulk.delete.topic=delete-hfreferral-bulk-topic

Copy link
Contributor

Choose a reason for hiding this comment

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

Setting the search.api.limit to 1000 is a significant configuration that impacts the system's performance and usability. Ensure that this limit aligns with the expected usage patterns and does not lead to performance degradation or resource exhaustion.

Consider evaluating the impact of this limit on the system's performance and adjust it based on empirical data or usage patterns.

Comment on lines +19 to +20
import org.egov.common.models.project.ProjectStaffSearch;
import org.egov.common.models.project.ProjectStaffSearchRequest;
Copy link
Contributor

Choose a reason for hiding this comment

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

The update to import ProjectStaffSearch and ProjectStaffSearchRequest from the org.egov.common.models.project package in the ProjectStaffApiControllerTest class is a good practice for maintaining consistency across the application. Ensure that the test cases are updated accordingly and that they cover all relevant scenarios to guarantee the correctness of the API.

Consider enhancing test coverage to include edge cases and failure scenarios for a more robust test suite.

Comment on lines 140 to 150
* @param entity The ProjectBeneficiary entity to check.
* @param existingProjectBeneficiaryVoucherTagMap The map containing existing ProjectBeneficiary entities
* indexed by their voucher tags.
* @return true if the entity is invalid, false otherwise.
*/
private boolean isInvalid(ProjectBeneficiary entity, List<String> existingVoucherTags) {
private boolean isInvalid(ProjectBeneficiary entity, Map<String, ProjectBeneficiary> existingProjectBeneficiaryVoucherTagMap) {
String id = entity.getId();
String tag = entity.getTag();

// Check if an entity with the same ID exists in the map and has a different tag
return existingVoucherTags.contains(tag);
return existingProjectBeneficiaryVoucherTagMap.keySet().contains(tag) && !existingProjectBeneficiaryVoucherTagMap.get(tag).getId().equals(id);
Copy link
Contributor

Choose a reason for hiding this comment

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

The isInvalid method has been refined to check the uniqueness of voucher tags more effectively. This is crucial for maintaining data integrity. Ensure that this logic correctly handles all edge cases, including null or empty tags, to prevent any data inconsistencies.

Consider adding more comprehensive unit tests to cover various scenarios, including duplicate tags, null tags, and tags with different cases (upper vs. lower).

Comment on lines 160 to 172
private boolean isUpdated(ProjectBeneficiary entity, Map<String, ProjectBeneficiary> existingProjectBeneficiaryMap) {
String id = entity.getId();
String tag = entity.getTag();

// Retrieve the existing ProjectBeneficiary object to compare
ProjectBeneficiary projectBeneficiaryFromSearch = existingProjectBeneficiaryMap.get(id);

// check if existing ProjectBeneficiary Tag is null or not and if it is null whether it is updated or not
if(projectBeneficiaryFromSearch.getTag() == null) return tag != null;

// Check if the tag of the current entity is equal to the tag of the existing entity
return ( !projectBeneficiaryFromSearch.getTag().equals(tag)
|| ( tag != null && !tag.equals(projectBeneficiaryFromSearch.getTag()) ));
Copy link
Contributor

Choose a reason for hiding this comment

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

The isUpdated method checks if a ProjectBeneficiary entity's tag has been updated. This method is key to determining whether validation should be applied. Ensure that the comparison logic accurately identifies updates to prevent false positives or negatives.

Refine the logic to handle edge cases, such as when the existing tag is null but the new tag is an empty string, which should not be considered an update.

Comment on lines 56 to 61
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.List;

@javax.annotation.Generated(value = "org.egov.codegen.SpringBootCodegen", date = "2022-12-14T20:57:07.075+05:30")
@Controller
@RequestMapping("")
Copy link
Contributor

Choose a reason for hiding this comment

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

📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [58-242]

All endpoint methods in ProjectApiController use appropriate HTTP status codes and wrap their responses in ResponseEntity, which is a good practice for RESTful API design. The use of @Valid annotations for request body validation is commendable, ensuring that incoming requests meet the API's expected format before processing. However, consider adding more detailed API documentation comments for each endpoint to improve the API's usability and maintainability.

Comment on lines 1 to 37
package org.egov.project.web.controllers;


import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.databind.ObjectMapper;
import io.swagger.annotations.ApiParam;
import org.egov.common.contract.response.ResponseInfo;
import org.egov.common.models.project.BeneficiaryBulkRequest;
import org.egov.common.models.project.BeneficiaryBulkResponse;
import org.egov.common.models.project.BeneficiaryRequest;
import org.egov.common.models.project.BeneficiaryResponse;
import org.egov.common.models.project.BeneficiarySearchRequest;
import org.egov.common.models.project.Project;
import org.egov.common.models.project.ProjectBeneficiary;
import org.egov.common.models.project.ProjectFacility;
import org.egov.common.models.project.ProjectFacilityBulkRequest;
import org.egov.common.models.project.ProjectFacilityBulkResponse;
import org.egov.common.models.project.ProjectFacilityRequest;
import org.egov.common.models.project.ProjectFacilityResponse;
import org.egov.common.models.project.ProjectFacilitySearchRequest;
import org.egov.common.models.project.ProjectRequest;
import org.egov.common.models.project.ProjectResponse;
import org.egov.common.models.project.ProjectStaff;
import org.egov.common.models.project.ProjectStaffBulkRequest;
import org.egov.common.models.project.ProjectStaffBulkResponse;
import org.egov.common.models.project.ProjectStaffRequest;
import org.egov.common.models.project.ProjectStaffResponse;
import org.egov.common.models.project.ProjectStaffSearchRequest;
import org.egov.common.models.project.Task;
import org.egov.common.models.project.TaskBulkRequest;
import org.egov.common.models.project.TaskBulkResponse;
Copy link
Contributor

Choose a reason for hiding this comment

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

📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [243-1085]

The controller methods are consistent in their structure and error handling, using ResponseInfoFactory to create standardized responses. This consistency is crucial for maintaining a coherent API. However, ensure that all possible error scenarios are handled gracefully, returning appropriate HTTP status codes and error messages to the client. For methods that might throw exceptions (e.g., database access issues, validation failures), consider adding exception handling mechanisms if not already present elsewhere in the codebase.

@syed-egov syed-egov changed the base branch from master to hlm-4501-smc-referral-flow February 27, 2024 12:06
@syed-egov syed-egov closed this Feb 27, 2024
@syed-egov syed-egov reopened this Feb 27, 2024
@syed-egov syed-egov changed the base branch from hlm-4501-smc-referral-flow to dev February 27, 2024 12:23
jagankumar-egov pushed a commit that referenced this pull request May 27, 2024
Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>
kavi-egov pushed a commit that referenced this pull request May 29, 2024
* Updated the error logging logic and other utils

* added validation toast after file check (#533)

* Removed other unwanted logs ::cleaned up the code

* campaign search by type fix (#538)

* upload draft fixes

* campaign type search fix

---------

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* Added basic Loggers to  know the API Behaviours

* Added     In Progress to show in mycamapign screen

* updated version (#541)

* Hlm 5855 (#544)

* upload draft fixes

* campaign type search fix

* fixes

---------

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* Feat : added today's date logic in search

* Revert kafka changes

* Added campaignsIncludesDates in schema

* Refactored

* Feat : added today's date logic in search (#546)

* Feat : added today's date logic in search

* Revert kafka changes

* Added campaignsIncludesDates in schema

* Refactored

* formatted and corrected few logs

* Added localisation on create of boundary data

* HLM-5830 refreshing page is retaining values (#547)

* target validation (#548)

Co-authored-by: nitiman7765 <nitishkumar75500@gmail.com>

* selecting boudaries fixes

* Feat : added campaign mapping check

* summary date format fix (#550)

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* Update campaignUtils.ts

* HLM 5848 (#553)

* summary date format fix

* product error fix, draft calls fix

---------

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* added upcoming tab in my campaign (#555)

* summary date format fix

* product error fix, draft calls fix

* added upcoming tab in my campaign

---------

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* fixed selection from the draft issue (#556)

* Updated the loggers logic

* validate upload data in summary (#557)

* summary date format fix

* product error fix, draft calls fix

* added upcoming tab in my campaign

* validate upload data in summary

---------

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* Feat : added codes and mapping check (#559)

* added log level environment config

* fixed HLM-5879 toast message (#561)

* Feat : user mapping for all boundaries (#562)

* no of cycle and deivery drafted changes (#564)

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* changes for boundary bulk localization HLM-5874 (#560)

Co-authored-by: nitiman7765 <nitishkumar75500@gmail.com>

* made toast message time longer (#566)

* Fixed the project mapping issue during campaign create

* retaining api message (#567)

* HLM 5791 (#569)

* no of cycle and deivery drafted changes

* fixes

---------

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* add localisation code for boundaries (#570)

* no of cycle and deivery drafted changes

* fixes

* add localisation code for boundaries

* fixes

* fixes

---------

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* made the delivery conditions as dynamic

* fixed message in target upload (#572)

* fixed HLM-5871 selection of children (#571)

* fixed HLM-5871 selection of children

* corrected includeAllChildren

* Update SelectingBoundaries.js

* Added health master

* Feat : added validations and keys reorder

* Differenttab (#574)

* changes for boundary bulk localization HLM-5874

* localized boundary tab on which split happens

* config

---------

Co-authored-by: nitiman7765 <nitishkumar75500@gmail.com>

* changed filters to true (#575)

* Patch 1 (#578)

* changes for boundary bulk localization HLM-5874

* localized generateDifferentTabsOnBasisOf

---------

Co-authored-by: nitiman7765 <nitishkumar75500@gmail.com>

* Bhavya filter (#577)

* changed filters to true

* fixed includeAllChildren for the lowest

* Update micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/components/SelectingBoundaries.js

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Project type object key updated for condition

* API Error localisation change, Gender localisation in summary (#579)

* no of cycle and deivery drafted changes

* fixes

* add localisation code for boundaries

* fixes

* fixes

* Value localise in summary screen, api error change

---------

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* HLM 5791 (#581)

* no of cycle and deivery drafted changes

* fixes

* add localisation code for boundaries

* fixes

* fixes

* Value localise in summary screen, api error change

* fixes

---------

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* Fixed the boundary filtered logic for different types of data injestions (#583)

* making generate api to fetch filters from campaign id

commit ca425591b1d1ec91a05facb6e2bdf9b5100e9570
Merge: 3ba4c5ddac b491428
Author: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com>
Date:   Wed May 15 16:13:32 2024 +0530

    Merge branch 'campaign' into boundary-upload-bulk

commit 3ba4c5ddac8a9d13145892bfd7c772a8853d6e7b
Author: nitiman7765 <nitishkumar75500@gmail.com>
Date:   Tue May 14 12:24:53 2024 +0530

    COMMIT

commit f775e17aa68cffa622a038b22119082486f064fe
Author: nitiman7765 <nitishkumar75500@gmail.com>
Date:   Mon May 13 18:36:28 2024 +0530

    changes for boundary bulk localization HLM-5874

* Fixed the boundary filtered logic for different types of data injestions

* updated comments

* Readme config (#582)

* Feat : initialised readme

* Feat : added readme

* Feat : added readMe Config for target

* Feat : added localisation for sheetName

* Feat : updated columnwidth in boundary

---------

Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com>

* Bhavya check (#585)

* changes

* Update UploadData.js

* Generate API call fix (#584)

* no of cycle and deivery drafted changes

* fixes

* add localisation code for boundaries

* fixes

* fixes

* Value localise in summary screen, api error change

* fixes

* genarate api call fix

* font size change for summary

* login css change

---------

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* Capital error (#586)

* Feat : initialised readme

* Feat : added readme

* Feat : added readMe Config for target

* Feat : added localisation for sheetName

* Feat : updated columnwidth in boundary

* Feat : capital name in error

* Target (#587)

* changes for boundary bulk localization HLM-5874

* refactored localization logic

---------

Co-authored-by: nitiman7765 <nitishkumar75500@gmail.com>

* generate api fixes, user generate fixes (#588)

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* Updated the status in camapign API

* added info card (#589)

* changes in card (#593)

* Corrected the project type condition logic

* generate api call fix (#595)

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* Update campaignMappingUtils.ts

* Update genericApis.ts

* Fixed the conditions logic for delivery

* Update genericUtils.ts (#599)

* Update genericUtils.ts

* Update constants.ts

* HLM 5872 (#600)

* generate api fix, user generate file fix

* remove console

---------

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* updated the condition logic according to the parsing logic

* HLM 5872 (#601)

* generate api fix, user generate file fix

* remove console

* downlaod pop up fixes

---------

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* addded toast for extra parent (#603)

* HLM 5872 (#604)

* generate api fix, user generate file fix

* remove console

* downlaod pop up fixes

* localisation update

---------

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* updated info css and fetching according to type (#605)

* Target nitish (#607)

* upated target validaton

* updated target vaidation

* Update utilities/project-factory/src/server/utils/validators/campaignValidators.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update utilities/project-factory/src/server/utils/validators/campaignValidators.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update utilities/project-factory/src/server/utils/validators/campaignValidators.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* upated target validaton

* updated target vaidation

* added one condition for target

* added some chage in condition for valdiate target

* Feat : added boundary code mandatory

* download with filename fixes (#610)

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* fixed localistion (#611)

* Update campaignValidators.ts

* Update campaignValidators.ts

* core/css version update & revert filedownload changes (#614)

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* Update campaignValidators.ts

* HLM-5908 Genrate issue fix (#616)

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* change && to and (#620)

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* toast back issue fix (#621)

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* toast error fix (#622)

* toast back issue fix

* version update

---------

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* localization logic update

* Update campaignValidators.ts

* Update campaignValidators.ts

* core/css version update & revert filedownload changes (#614)

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* Update campaignValidators.ts

* HLM-5908 Genrate issue fix (#616)

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* change && to and (#620)

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* toast back issue fix (#621)

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* toast error fix (#622)

* toast back issue fix

* version update

---------

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* fixed random error (#626)

* download file in summary screen fix (#627)

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* fix rerender (#628)

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* Fixed the boundary localisation issue in user and facility generation, Added few logs

* Added few logs in boundary generation

* Update genericApis.ts

* generate fix (#629)

* fix rerender

* generate api and download error fix

---------

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* localisation fetch logic updated and made singleton class

* remove filter from boudary (#632)

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* Removed filter validation in the generate API

* toast message fix (#635)

* Cleaned up few file structures

* updated the loggers

* Updated the campaign cycles conditions for App Integration

* Service layer (#631)

* Feat : service layer implementation

* Feat : service layer implementation

* Feat : refactor

* updated

---------

Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com>

* Changed imports of kafka

* Feat : updated kafka name (#637)

* Generate API response time reduced and optimized

* Update campaignValidators.ts (#639)

* page size fix to 10 (#638)

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* summary to back screen redirection fix

* summary to back screen redirection fix (#640)

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* preview params fix

* formatted the code and removed few loggers

* auto redirection fix & auto uploaded deleted file fix (#642)

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* Generationlogic (#630)

* changes for boundary bulk localization HLM-5874

* commit for bulk boundary

* commiting the changes fot boundary code generation

* upated target validaton

* updated target vaidation

* commmit

* code generation

* updary boundary bulk upload logic

* generate fix (#629)

* fix rerender

* generate api and download error fix

---------

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* localisation fetch logic updated and made singleton class

* updated logic for update boundary data

* remove filter from boudary (#632)

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* Removed filter validation in the generate API

* toast message fix (#635)

* Cleaned up few file structures

* updated the loggers

* Updated the campaign cycles conditions for App Integration

* Service layer (#631)

* Feat : service layer implementation

* Feat : service layer implementation

* Feat : refactor

* updated

---------

Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com>

* Changed imports of kafka

* Feat : updated kafka name (#637)

* Generate API response time reduced and optimized

* Update campaignValidators.ts (#639)

* page size fix to 10 (#638)

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* summary to back screen redirection fix

* preview params fix

* commit suggested by jagan

---------

Co-authored-by: nitiman7765 <nitishkumar75500@gmail.com>
Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com>
Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>
Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com>
Co-authored-by: Bhavya-egov <137176879+Bhavya-egov@users.noreply.github.com>
Co-authored-by: ashish-egov <137176738+ashish-egov@users.noreply.github.com>
Co-authored-by: ashish-egov <ashish.tiwari@egovernments.org>

* Updates the delivery rules logic for gender

* * info message for status creating (#644)

* success message if user cred sheet
* send id with key resourceid
* Send variant in sku also

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* Feat : added boundary validation (#643)

Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com>

* Update campaignValidators.ts (#645)

* added delay in download (#646)

* Update campaignValidators.ts (#647)

* fixes (#649)

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* fixed header validation (#648)

* change in filter recursive (#650)

* Update genericUtils.ts (#652)

* fix (#651)

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* updated lowest level hierarchy validation for target HLM -5948 (#654)

* Update campaignValidators.ts (#655)

* fixes-> cyclenumber issue, hover issue, dropdown height issue,

* css

* fixes-> cyclenumber issue, hover issue, dropdown height issue, (#656)

* fixes-> cyclenumber issue, hover issue, dropdown height issue,

* css

---------

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* Update campaignUtils.ts

* fixed HLM-5970

* Feat : added boundary validation at data level

* fixes

* local add

* Added boundary validation

* Refactor

* fixed HLM-5935 and HLM-5749

* Refactor

* Feat : updated table

* change campaignid in payload

* Feat : added campaignId

* Update campaignApis.ts

* Update campaignValidators.ts

* refactored

* Refactor

* assigned campaignId

* Refactor

* updated createRequest Schema

* Feat : invalid Status Persist

* status fix

* version-fix

* Update CODEOWNERS

* core version updated and css fix for language dropdown

* refactor (#676)

* Uat signoff (#678)

* change in filter recursive

* lowest level

* added validation related to target sheet headers

* HLM-5916

* download button fixes in summary (#682)

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* Hlm 5927 (#687)

* change in filter recursive

* lowest level

* added validation for boundary codes to be invalid other than that selected from UI in target upload

* Added Delivery and cycle config for LLIN and SMC both (#688)

* no of cycle and deivery drafted changes

* fixes

* add localisation code for boundaries

* fixes

* fixes

* Value localise in summary screen, api error change

* fixes

* genarate api call fix

* font size change for summary

* login css change

* HLM-5718: SMC delivery config enhancement

* config update

* added config for in between

* fix config for llin

* added mdms integration

---------

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* Fixed HLM-5988_warning message (#689)

Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com>

* download filename fixes (#693)

* download button fixes in summary

* download filename with custom name changes added

---------

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* download filename fixes (#694)

* download button fixes in summary

* download filename with custom name changes added

* config fix for llin

---------

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* successful toast message is fixed (#695)

* successful toast message is fixed

* Update UploadData.js

* HLM-5991: Alert Pop UP CR (#696)

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* HLM-5718 changes (#703)

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* Localization cache (#706)

* change in filter recursive

* lowest level

* refactored  localization cache logic

* Update README.md (#707)

* Update README.md

* Update README.md

* Update utilities/project-factory/README.md

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update README.md

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* HLM-5985_made lowest level changes (#708)

* HLM-5985_made lowest level changes

* resolved codeRabbit comments

* Create LOCALSETUP.md (#709)

* Create LOCALSETUP.md

* Refactored config

* Update LOCALSETUP.md

* Update utilities/project-factory/LOCALSETUP.md

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update utilities/project-factory/LOCALSETUP.md

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update utilities/project-factory/LOCALSETUP.md

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update utilities/project-factory/LOCALSETUP.md

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update LOCALSETUP.md

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* updated the localisation module config

* Refactor config (#713)

* Refactor config

* Update utilities/project-factory/src/server/validators/campaignValidators.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update utilities/project-factory/src/server/validators/campaignValidators.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update utilities/project-factory/src/server/validators/campaignValidators.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update postman_collection.json (#714)

* Update postman_collection.json

* Update postman_collection.json

* Delete utilities/project-factory/project_factory_swagger.yml (#715)

* Feat : removed campaignId validation for boundary upload (#718)

* updated the delay for boundary relationship

* added logger for request TODO TEST

will be reverted

* Revert "added logger for request TODO TEST"

This reverts commit d5c2bf5.

* Schema validation (#719)

* Feat : removed campaignId validation for boundary upload

* Feat : added schema validation

* Fixed mdms host

* updated the logger messages

* updated the loggers

* delivery new changes, toast fix, error fix (#716)

* delivery new changes, toast fix, error fix

* new fixes

* fixes

* change text component to field component

* added hierarchy

* fix

* fix

* fix

* fix

* passing hierarchy from props

---------

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* Schema validation2 (#721)

* Feat : removed campaignId validation for boundary upload

* Feat : added schema validation

* Fixed mdms host

* Feat : added boundary validation

* Feat : optimized product search

* Fix : project mapping fixed (#722)

* Fixed project search (#723)

* smc fixes (#724)

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* Feat : added boundary confirmation (#727)

* Fix: fixed processing boundary

* Refactor

* fixed HLM-6109 (#729)

* gate fixes validation, ui ux (#731)

Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>

* integrated panelcard component (#732)

* integrated panelcard component

* Update micro-ui/web/micro-ui-internals/packages/modules/campaign-manager/src/pages/employee/Response.js

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: Jagankumar <53823168+jagankumar-egov@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update genericUtils.ts (#733)

* updated the folder structure

* Create CHANGELOG.md (#717)

* updated the versions

---------

Co-authored-by: Bhavya-egov <137176879+Bhavya-egov@users.noreply.github.com>
Co-authored-by: nabeelmd-eGov <94039229+nabeelmd-eGov@users.noreply.github.com>
Co-authored-by: nabeelmd-eGov <nabeel.md@egovernments.com>
Co-authored-by: ashish-egov <ashish.tiwari@egovernments.org>
Co-authored-by: ashish-egov <137176738+ashish-egov@users.noreply.github.com>
Co-authored-by: nitish-egov <137176807+nitish-egov@users.noreply.github.com>
Co-authored-by: nitiman7765 <nitishkumar75500@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: admin1 <nitish@egovernments.org>
Co-authored-by: Bhavya-egov <bhavya.mangal@egovernments.org>
Co-authored-by: Swathi-eGov <137176788+Swathi-eGov@users.noreply.github.com>
@Harish-egov Harish-egov deleted the branch dev July 10, 2024 08:31
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