Skip to content

Merge release-3.6.1 into main#377

Closed
vanitha1822 wants to merge 16 commits intomainfrom
release-3.6.1
Closed

Merge release-3.6.1 into main#377
vanitha1822 wants to merge 16 commits intomainfrom
release-3.6.1

Conversation

@vanitha1822
Copy link
Member

@vanitha1822 vanitha1822 commented Mar 19, 2026

📋 Description

JIRA ID:

Please provide a summary of the change and the motivation behind it. Include relevant context and details.


✅ 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

Release Notes v3.6.1

  • New Features

    • Added health check endpoint for system monitoring.
    • Implemented Elasticsearch-powered beneficiary search functionality.
    • Added SMS template management and prescription drug tracking.
    • Enhanced form structure with state-based field filtering.
  • Improvements

    • Enhanced version information display.
    • Strengthened user authentication and authorization validations.
    • Improved error handling and logging across endpoints.
  • Chores

    • Updated project version to 3.6.1.

vanitha1822 and others added 16 commits December 18, 2025 12:44
* fix: implement functionality to search beneficiaries with Elasticsearch

* fix: remove unwanted import

* fix: update pom.xml

* fix: change the response code
* fix: cherry-pick commits for advanced search

* fix: cherry-pick commit for token issue - mobile application

* fix: add the missing properties

* fix: add function to retrieve userid

* fix: move the fetch Userid to jwtUtil
Fixing the Signature when doctor not available
* FLW-713 Remove All File Upload Options

* Fix UserServiceRoleRepo dependency issue and codeRabit comment

* fixed coderabit comment

* fix userMappingId issue
* Enable SMS Functionality in MMU App to Send Prescriptions  (#325)

* fix: sms template save and map mmu (#306)

* Vb/sms (#307)

* fix: sms template save and map mmu

* fix: enable mms for mmu prescription

* Enable SMS Functionality in MMU App to Send Prescriptions  (#325)

* fix: sms template save and map mmu (#306)

* Vb/sms (#307)

* fix: sms template save and map mmu

* fix: enable mms for mmu prescription

---------

Co-authored-by: Vishwanath Balkur <118195001+vishwab1@users.noreply.github.com>
* feat(health,version): update version and health endpoints and add advance check for database

* fix(health): normalize severity and fix slow query false positives

* fix(health): avoid false CRITICAL on single long-running MySQL transaction

* fix(health): enforce 3s DB connection timeout via HikariCP
* feat(health,version): update version and health endpoints and add advance check for database

* fix(health): normalize severity and fix slow query false positives

* fix(health): avoid false CRITICAL on single long-running MySQL transaction

* fix(health): enforce 3s DB connection timeout via HikariCP

* feat(health): add healthcontroller and fix versioncontroller issues
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 19, 2026

📝 Walkthrough

Walkthrough

The pull request updates the project version to 3.6.1 and adds comprehensive support for Elasticsearch-based beneficiary searches, health monitoring, SMS template management, MMU prescription handling, and JWT-based form field filtering. Configuration properties are updated, and new entities, services, and REST endpoints are introduced.

Changes

Cohort / File(s) Summary
Build & Configuration
pom.xml, .vscode/settings.json, src/main/environment/common_*.properties, src/main/resources/application.properties
Updated project version to 3.6.1, added git-commit-id-maven-plugin for version tracking, enabled Java null analysis, added tempFilePath property across all environments, introduced new Identity API Elasticsearch endpoints.
Health Check System
src/main/java/com/iemr/common/controller/health/HealthController.java, src/main/java/com/iemr/common/service/health/HealthService.java
Introduced new health check infrastructure: HealthController endpoint returns HTTP 200/503 based on system status, HealthService performs MySQL and Redis diagnostics with severity escalation, scheduled background checks, and graceful shutdown.
Elasticsearch Search & Beneficiary Lookup
src/main/java/com/iemr/common/controller/beneficiary/BeneficiaryRegistrationController.java, src/main/java/com/iemr/common/service/beneficiary/IEMRSearchUserService*, src/main/java/com/iemr/common/service/beneficiary/IdentityBeneficiaryService*
Added two new beneficiary search endpoints (searchUser, searchBeneficiaryES) with Elasticsearch integration, implemented ES-based search methods returning Map<String, Object>, added exception handling and JSON serialization.
SMS Template Management
src/main/java/com/iemr/common/dto/sms/SMSTemplateDTO.java, src/main/java/com/iemr/common/mapper/sms/SMSMapper.java, src/main/java/com/iemr/common/service/sms/SMSServiceImpl.java
Created SMSTemplateDTO with getter/setter accessors, added SMSMapper with date formatting, extended SMSServiceImpl to use DTO-based responses, introduced MMU prescription variable substitution for SMS templates.
MMU Prescription Data
src/main/java/com/iemr/common/data/mmuDrugHistory/PrescribedMMUDrugDetail.java, src/main/java/com/iemr/common/data/mmuDrugHistory/PrescriptionMMU.java, src/main/java/com/iemr/common/repository/mmuDrugHistory/PrescribedMMUDrugRepository.java
Introduced new JPA entities PrescribedMMUDrugDetail (mapped to t_prescribeddrug) and PrescriptionMMU (mapped to t_prescription) with comprehensive field mappings, added Spring Data repository interface with custom query methods.
User & Role Management
src/main/java/com/iemr/common/data/users/UserServiceRole.java, src/main/java/com/iemr/common/repository/users/UserServiceRoleRepo.java, src/main/java/com/iemr/common/repository/users/IEMRUserRepositoryCustom.java, src/main/java/com/iemr/common/service/users/IEMRAdminUserService*
Added new UserServiceRole entity with 30+ mapped fields from view v_userservicerolemapping, created repository with findByUserName query, added case-insensitive findUserName method and service-layer findUserIdByUserName method.
JWT & Security Enhancements
src/main/java/com/iemr/common/utils/JwtUtil.java, src/main/java/com/iemr/common/utils/JwtUserIdValidationFilter.java, src/main/java/com/iemr/common/utils/http/HTTPRequestInterceptor.java, src/main/java/com/iemr/common/utils/RestTemplateUtil.java
Added request-based JWT extraction methods (getUserIdFromRequest, getUsernameFromRequest), expanded filter skip conditions for /health and /version endpoints, enhanced HTTPRequestInterceptor with JwtUtil injection, added Cookie header population alongside JWT token headers.
Form Management & Dynamic Forms
src/main/java/com/iemr/common/data/dynamic_from/FormField.java, src/main/java/com/iemr/common/dto/dynamicForm/FieldResponseDTO.java, src/main/java/com/iemr/common/controller/dynamicForm/DynamicFormController.java, src/main/java/com/iemr/common/service/dynamicForm/FormMasterService*
Added isEditable and stateCode fields to form field tracking, updated getStructuredForm to accept JWT token, implemented state-based field filtering via UserServiceRoleRepo lookup, added support for additional translation languages ("as", "en").
API Endpoints & Admin Functions
src/main/java/com/iemr/common/controller/users/IEMRAdminController.java, src/main/java/com/iemr/common/controller/version/VersionController.java
Added checkUserDetails endpoint for username lookup, enhanced refreshToken with deletion and status validation, refactored VersionController to return JSON response with buildTimestamp, version, branch, commitHash fields via git.properties.
Supporting Services & Utilities
src/main/java/com/iemr/common/data/translation/Translation.java, src/main/java/com/iemr/common/service/kmfilemanager/KMFileManagerServiceImpl.java, src/main/java/com/iemr/common/service/users/EmployeeSignatureServiceImpl.java
Added assameseTranslation field to Translation entity, injected tempFilePath property into KMFileManagerServiceImpl, changed signature fetching to query via findOneByUserID without deleted flag filtering.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant BenefController as BeneficiaryRegistration<br/>Controller
    participant IEMRSearch as IEMRSearchUserService
    participant IdentityBenef as IdentityBeneficiaryService
    participant ElasticSearch as Elasticsearch
    
    Client->>BenefController: POST /beneficiary/searchBeneficiaryES<br/>(BeneficiaryModel, JWT)
    activate BenefController
    BenefController->>BenefController: Extract userID from JWT<br/>via JwtUtil
    BenefController->>IEMRSearch: findBeneficiaryES(model, userID, auth)
    activate IEMRSearch
    IEMRSearch->>IEMRSearch: Build IdentitySearchDTO<br/>from beneficiary model
    IEMRSearch->>IEMRSearch: Serialize DTO to JSON<br/>(Gson with date format)
    IEMRSearch->>IdentityBenef: searchBeneficiaryListES(json, auth, is1097)
    activate IdentityBenef
    IdentityBenef->>IdentityBenef: Build HTTP POST request<br/>with serialized DTO
    IdentityBenef->>ElasticSearch: POST /advancedSearchES
    activate ElasticSearch
    ElasticSearch-->>IdentityBenef: JSON response (data field)
    deactivate ElasticSearch
    IdentityBenef->>IdentityBenef: Parse response, validate statusCode
    IdentityBenef-->>IEMRSearch: Map<String, Object> data
    deactivate IdentityBenef
    IEMRSearch->>IEMRSearch: Serialize Map to JSON<br/>(Jackson ObjectMapper)
    IEMRSearch-->>BenefController: JSON String response
    deactivate IEMRSearch
    BenefController-->>Client: HTTP 200 with search results
    deactivate BenefController
Loading

Estimated Code Review Effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰 A health check hops in with springs so bright,
Elasticsearch dances through forms in flight,
SMSes bloom with templates so new,
MMU prescriptions in queries brew,
JWT tokens guide the way true! 🐇✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 7.94% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main objective: merging release-3.6.1 into main. It is concise, clear, and directly reflects the changeset's primary purpose.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch release-3.6.1
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
3.8% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@vanitha1822 vanitha1822 changed the title Move code from Release 3.6.1 to Main Merge release-3.6.1 into main Mar 19, 2026
@vanitha1822 vanitha1822 requested a review from drtechie March 19, 2026 09:41
@vanitha1822
Copy link
Member Author

Need to merge 3.8.0 as 3.6.1 is already available in 3.8.0

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.

7 participants