-
Notifications
You must be signed in to change notification settings - Fork 31
ABDM Abdm HiTypes addition in linktoken #115
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
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. β¨ Finishing touchesπ§ͺ Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the ABDM (Ayushman Bharat Digital Mission) integration to support multiple health information types when linking care contexts. The key changes include determining applicable HI types dynamically based on visit data and updating the context root for deployment.
- Dynamically determines applicable health information (HI) types based on visit code and category
- Refactors care context generation to create separate contexts for each HI type
- Adds repository methods to query for presence of different medical record types
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| src/main/webapp/WEB-INF/jboss-web.xml | Updates the application context root from /fhir-api to /fhir-api-abdm |
| src/main/java/com/wipro/fhir/service/v3/careContext/CareContextLinkingServiceImpl.java | Refactors care context linking to support multiple HI types, adds findHiTypes method, and fixes variable scope issue in checkRecordExisits |
| src/main/java/com/wipro/fhir/repo/v3/careContext/CareContextRepo.java | New repository interface with native queries to check for presence of vitals, prescriptions, lab tests, and vaccine details |
π‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/main/java/com/wipro/fhir/service/v3/careContext/CareContextLinkingServiceImpl.java
Outdated
Show resolved
Hide resolved
| CareContexts careContexts = new CareContexts(); | ||
| PatientCareContext patient = new PatientCareContext(); | ||
| ArrayList<PatientCareContext> pcc = new ArrayList<PatientCareContext>(); | ||
|
|
||
| ArrayList<CareContexts> cc = new ArrayList<CareContexts>(); | ||
| careContexts.setReferenceNumber(addCareContextRequest.getVisitCode()); | ||
| careContexts.setDisplay(addCareContextRequest.getDisplay()); | ||
| cc.add(careContexts); | ||
| for (String hiType : hiTypes) { | ||
| PatientCareContext patient = new PatientCareContext(); | ||
|
|
||
| ArrayList<PatientCareContext> pcc = new ArrayList<PatientCareContext>(); | ||
| patient.setReferenceNumber(addCareContextRequest.getVisitCode()); | ||
| patient.setDisplay(addCareContextRequest.getDisplay()); | ||
| patient.setDisplay(addCareContextRequest.getDisplay()); | ||
| patient.setCount(1); | ||
| patient.setCareContexts(cc); | ||
| pcc.add(patient); | ||
| ArrayList<CareContexts> cc = new ArrayList<CareContexts>(); | ||
| careContexts.setReferenceNumber(addCareContextRequest.getVisitCode()); | ||
| careContexts.setDisplay(addCareContextRequest.getVisitCategory()); | ||
| cc.add(careContexts); |
Copilot
AI
Oct 31, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The careContexts object is instantiated outside the loop but modified and reused inside the loop. This will cause all PatientCareContext objects to share the same CareContexts instance, resulting in incorrect data. Each iteration should create a new CareContexts object. Move the new CareContexts() instantiation inside the loop at line 258.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot open a new pull request to apply changes based on this feedback
src/main/java/com/wipro/fhir/repo/v3/careContext/CareContextRepo.java
Outdated
Show resolved
Hide resolved
src/main/java/com/wipro/fhir/service/v3/careContext/CareContextLinkingServiceImpl.java
Show resolved
Hide resolved
src/main/java/com/wipro/fhir/service/v3/careContext/CareContextLinkingServiceImpl.java
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|



π Description
JIRA ID: AMM-1307
Please provide a summary of the change and the motivation behind it. Include relevant context and details.
β Type of Change
βΉοΈ Additional Information
Please describe how the changes were tested, and include any relevant screenshots, logs, or other information that provides additional context.