Skip to content
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
3814860
Abdm Facility fetch services changes
Sep 19, 2024
a2224b4
facility save after carecontext and patientcarecontextx update
Sep 26, 2024
1a28c2b
FacilityId save in mongo db and Variable declaration correction
Oct 8, 2024
fea418b
Mongo carecontext save query logic changes
Oct 8, 2024
9d30d46
ABHA Creation M1 V3 API changes
Oct 18, 2024
583594a
Abha V3 changes
Dec 9, 2024
8d206ef
resolved merge conflicts
Dec 9, 2024
4c76193
removed unused code
helenKaryamsetty Dec 9, 2024
c07d839
v3- verify auth by abdm API changes
Dec 12, 2024
d26eeda
Merge branch 'PSMRI:develop' into abdmV3
helenKaryamsetty Dec 12, 2024
5e93901
resolved merge conflicts
Dec 12, 2024
e669df1
fix pulled latest develop
helenKaryamsetty Oct 6, 2025
7a5c0d4
feat: Abdm M2 V3 changes
helenKaryamsetty Oct 6, 2025
43683a2
feat: mongo query change fetch for linktoken
helenKaryamsetty Oct 13, 2025
8ead599
Merge branch 'abdmV3' into abdmV3
helenKaryamsetty Oct 13, 2025
c1c5d38
fix: link carecontext authorization error
helenKaryamsetty Oct 14, 2025
497b3ff
Merge branch 'PSMRI:abdmV3' into abdmV3
helenKaryamsetty Oct 14, 2025
d748156
Merge branch 'abdmV3' of https://github.com/helenKaryamsetty/FHIR-API…
helenKaryamsetty Oct 14, 2025
811aef7
Merge branch 'PSMRI:abdmV3' into abdmV3
helenKaryamsetty Oct 31, 2025
945d874
feat: hiTypes addition
helenKaryamsetty Oct 31, 2025
c1c96f4
feat: version change for testing
helenKaryamsetty Oct 31, 2025
d267c17
fix: minor change for empty response
helenKaryamsetty Nov 4, 2025
49c97fa
fix: resolved merge conflicts
helenKaryamsetty Nov 4, 2025
6d5298f
Simplify queries in CareContextRepo interface
helenKaryamsetty Nov 4, 2025
23b4a20
fix: corrected response format
helenKaryamsetty Nov 6, 2025
db670fc
Merge branch 'abdmV3' of https://github.com/helenKaryamsetty/FHIR-API…
helenKaryamsetty Nov 6, 2025
5d6dd44
fix: minor logic change for care context linking
helenKaryamsetty Nov 19, 2025
1d9835a
Merge branch 'abdmV3' of https://github.com/helenKaryamsetty/FHIR-API…
helenKaryamsetty Nov 19, 2025
765d260
small correction in hiType and error message modification
helenKaryamsetty Dec 15, 2025
71c995d
Merge branch 'abdmV3' of https://github.com/helenKaryamsetty/FHIR-API…
helenKaryamsetty Dec 15, 2025
fec6064
modified error message
helenKaryamsetty Dec 15, 2025
fa7cf00
resolved merge conflicts
helenKaryamsetty Dec 15, 2025
7a21582
feat: new standard FHIR bundles creation
helenKaryamsetty Dec 22, 2025
09913fc
Merge branch 'abdmV3' of https://github.com/helenKaryamsetty/FHIR-API…
helenKaryamsetty Dec 22, 2025
8269c75
Fix environment variable for systemUrl
helenKaryamsetty Dec 22, 2025
055525e
Fix formatting of systemUrl property
helenKaryamsetty Dec 22, 2025
61506e6
fix: taken coderabbitai comments and minor changes
helenKaryamsetty Dec 23, 2025
a1df7fa
fix: resolved merge conflicts
helenKaryamsetty Dec 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 44 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -186,39 +186,74 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.14.2</version>
<version>2.15.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.14.2</version>
<version>2.15.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.14.2</version>
<version>2.15.2</version>
</dependency>

<!-- https://mvnrepository.com/artifact/ca.uhn.hapi.fhir/hapi-fhir-structures-r4 -->
<!--
https://mvnrepository.com/artifact/ca.uhn.hapi.fhir/hapi-fhir-structures-r4 -->
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-structures-r4</artifactId>
<version>6.10.0</version>
<version>8.4.0</version>
</dependency>
Comment on lines 204 to 208
Copy link
Contributor

@coderabbitai coderabbitai bot Dec 23, 2025

Choose a reason for hiding this comment

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

⚠️ Potential issue | πŸ”΄ Critical

Verify HAPI FHIR 8.4.0 compatibility with the codebase.

This is a major version upgrade from 6.10.0 to 8.4.0 with documented breaking changes. Notable API changes include package migration from javax.* to jakarta.*, removal of compatibility shims, changes to contained resource ID handling, and modifications to Device resource search parameter compartment rules. Ensure the codebase compiles and runs correctly with this update, particularly if using interceptors or custom search logic.

πŸ€– Prompt for AI Agents
In pom.xml around lines 204–208 you upgraded hapi-fhir-structures-r4 from 6.10.0
to 8.4.0 which contains breaking changes; verify and fix code to compile and run
against 8.4.0 by updating all Java EE imports from javax.* to jakarta.* (or add
appropriate migration/shaded artifacts), review and adapt any interceptor
implementations to the new interceptor APIs, adjust code that handles contained
resource IDs and Device search/compartment logic to match the new behavior, run
a full mvn clean compile/test/integration-test cycle to find errors, and either
fix call sites or pin to a compatible HAPI FHIR version if changes are too
invasive.

Copy link
Member Author

Choose a reason for hiding this comment

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

@coderabbitai these versions are completely aligned with codebase

Copy link
Contributor

Choose a reason for hiding this comment

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

@helenKaryamsetty, thank you for confirming! I appreciate you verifying that the HAPI FHIR 8.4.0 upgrade is compatible with the codebase.



<!--
https://mvnrepository.com/artifact/ca.uhn.hapi.fhir/hapi-fhir-validation -->
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-validation</artifactId>
<version>8.4.0</version>
</dependency>

<!--
https://mvnrepository.com/artifact/ca.uhn.hapi.fhir/hapi-fhir-structures-r4 -->
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-structures-r4</artifactId>
<version>8.4.0</version>
</dependency>


<!-- Choose a HAPI version that matches the rest of your modules -->
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-caching-caffeine</artifactId>
<version>8.4.0</version> <!-- example; align with your HAPI version -->
</dependency>


<dependency>
<groupId>ca.uhn.hapi</groupId>
<artifactId>hapi-base</artifactId>
<version>2.6.0</version>
</dependency>

<!-- https://mvnrepository.com/artifact/ca.uhn.hapi.fhir/org.hl7.fhir.utilities -->
<!--
https://mvnrepository.com/artifact/ca.uhn.hapi.fhir/org.hl7.fhir.utilities -->
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.utilities</artifactId>
<version>6.5.18</version>
</dependency>

<!--
https://mvnrepository.com/artifact/ca.uhn.hapi.fhir/hapi-fhir-validation-resources-r4 -->
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-validation-resources-r4</artifactId>
<version>8.4.0</version>
</dependency>

<!-- lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
Expand Down Expand Up @@ -363,7 +398,8 @@
${target-properties} and
${source-properties}
</echo>
<concat destfile="${target-properties}" append="yes"
<concat destfile="${target-properties}"
append="yes"
force="yes">
<fileset file="${source-properties}">
</fileset>
Expand Down
2 changes: 2 additions & 0 deletions src/main/environment/common_ci.properties
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,5 @@ [email protected]_DOC_ENABLED@
[email protected]_HOST@

[email protected]_ALLOWED_ORIGINS@

systemUrl= @env.HIP_SYSTEM_URL@
2 changes: 2 additions & 0 deletions src/main/environment/common_dev.properties
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,5 @@ logging.level.org.springframework.web=INFO
logging.level.org.hibernate=INFO
logging.level.com.iemr=DEBUG
logging.level.org.springframework=INFO

systemUrl= <Enter HIP request URL>
Copy link
Member

Choose a reason for hiding this comment

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

This variable is so ambiguous. 1 year later, nobody will know.
What "system"?

4 changes: 3 additions & 1 deletion src/main/environment/common_docker.properties
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,6 @@ springdoc.api-docs.enabled=${SWAGGER_DOC_ENABLED}
springdoc.swagger-ui.enabled=${SWAGGER_DOC_ENABLED}

# Redis IP
spring.redis.host=${REDIS_HOST}
spring.redis.host=${REDIS_HOST}

systemUrl= <Enter HIP request URL>
Copy link
Member

Choose a reason for hiding this comment

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

Please use {VARIABLE} here

4 changes: 3 additions & 1 deletion src/main/environment/common_example.properties
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,6 @@ jwt.secret=my-32-character-ultra-secure-and-ultra-long-secret
logging.path=logs/
logging.file.name=logs/fhir-api.log

cors.allowed-origins=http://localhost:*
cors.allowed-origins=http://localhost:*

systemUrl= <Enter HIP request URL>
2 changes: 2 additions & 0 deletions src/main/environment/common_test.properties
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,5 @@ logging.level.org.springframework.web=INFO
logging.level.org.hibernate=INFO
logging.level.com.iemr=DEBUG
logging.level.org.springframework=INFO

systemUrl= <Enter HIP request URL>
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
import org.springframework.web.bind.annotation.RestController;

import com.wipro.fhir.data.request_handler.ResourceRequestHandler;
import com.wipro.fhir.service.resource_gateway.DiagnosticReportRecord;
import com.wipro.fhir.service.resource_gateway.OPConsultRecordBundle;
import com.wipro.fhir.service.resource_gateway.PrescriptionRecordBundle;
import com.wipro.fhir.service.bundle_creation.DiagnosticRecordResourceBundle;
import com.wipro.fhir.service.bundle_creation.OPConsultResourceBundle;
import com.wipro.fhir.service.bundle_creation.PrescriptionResourceBundle;
import com.wipro.fhir.utils.exception.FHIRException;
import com.wipro.fhir.utils.response.OutputResponse;

Expand All @@ -55,11 +55,11 @@ public class ResourceRequestGateway {
private final Logger logger = LoggerFactory.getLogger(this.getClass().getName());

@Autowired
private OPConsultRecordBundle opConsultRecordBundle;
private OPConsultResourceBundle opConsultRecordBundle;
@Autowired
private PrescriptionRecordBundle prescriptionRecordBundle;
private PrescriptionResourceBundle prescriptionRecordBundle;
@Autowired
private DiagnosticReportRecord diagnosticReportRecord;
private DiagnosticRecordResourceBundle diagnosticReportRecord;

/***
*
Expand All @@ -78,7 +78,7 @@ public String getPatientResource(@RequestBody ResourceRequestHandler patientReso

OutputResponse response = new OutputResponse();
try {
String s = opConsultRecordBundle.getOPConsultRecordBundle(patientResourceRequest, null);
String s = opConsultRecordBundle.PopulateOPConsultRecordResourceBundle(patientResourceRequest, null);

response.setResponse(s);
} catch (FHIRException e) {
Expand All @@ -104,7 +104,7 @@ public String getDiagnosticReportRecord(@RequestBody ResourceRequestHandler pati

OutputResponse response = new OutputResponse();
try {
String s = diagnosticReportRecord.getDiagnosticReportRecordBundle(patientResourceRequest, null);
String s = diagnosticReportRecord.PopulateDiagnosticReportResourceBundle(patientResourceRequest, null);

response.setResponse(s);
} catch (FHIRException e) {
Expand All @@ -129,7 +129,7 @@ public String getPrescriptionRecord(@RequestBody ResourceRequestHandler patientR

OutputResponse response = new OutputResponse();
try {
String s = prescriptionRecordBundle.getPrescriptionRecordBundle(patientResourceRequest, null);
String s = prescriptionRecordBundle.PopulatePrescriptionResourceBundle(patientResourceRequest, null);

response.setResponse(s);
} catch (FHIRException e) {
Expand Down
8 changes: 3 additions & 5 deletions src/main/java/com/wipro/fhir/controller/test/Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@

import com.wipro.fhir.data.request_handler.ResourceRequestHandler;
import com.wipro.fhir.service.atoms.feed.bahmni.ClinicalFeedWorker;
import com.wipro.fhir.service.resource_gateway.OPConsultRecordBundle;
import com.wipro.fhir.service.resource_gateway.OPConsultRecordBundleImpl;
import com.wipro.fhir.service.resource_gateway.PrescriptionRecordBundleImpl;
import com.wipro.fhir.service.bundle_creation.OPConsultResourceBundleImpl;
import com.wipro.fhir.utils.http.HttpUtils;
import com.wipro.fhir.utils.response.OutputResponse;

Expand All @@ -50,7 +48,7 @@ public class Test {
private final Logger logger = LoggerFactory.getLogger(this.getClass().getName());

@Autowired
private OPConsultRecordBundleImpl oPConsultRecordBundleImpl;
private OPConsultResourceBundleImpl oPConsultRecordBundleImpl;

@Operation(summary = "Test parse ATOM Feeds")
@PostMapping(value = { "/parse/feed/ATOM" })
Expand All @@ -59,7 +57,7 @@ public String parseFeeds(@RequestBody ResourceRequestHandler resourceRequestHand
OutputResponse response = new OutputResponse();
String s = null;
try {
s = oPConsultRecordBundleImpl.getOPConsultRecordBundle(resourceRequestHandler, null);
s = oPConsultRecordBundleImpl.PopulateOPConsultRecordResourceBundle(resourceRequestHandler, null);
response.setResponse(s);
} catch (Exception e) {
logger.error("Unexpected error:" , e);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
package com.wipro.fhir.data.resource_model;

import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Component;

import lombok.Data;

@Data
@Component
public class ImmunizationDataModel {

private BigInteger id;
private BigInteger beneficiaryRegID;
private BigInteger visitCode;
private Integer providerServiceMapID;
private Integer vanID;
private String defaultReceivingAge;
private String vaccineName;
private Timestamp receivedDate;
private String receivedFacilityName;
private String sctcode;
private String sctTerm;
private Timestamp createdDate;
private String createdBy;

public ImmunizationDataModel() {
}

public ImmunizationDataModel(Object[] objArr) {
this.id = objArr[0] != null ? BigInteger.valueOf(((Number) objArr[0]).longValue()) : null;
this.beneficiaryRegID = objArr[1] != null ? BigInteger.valueOf(((Number) objArr[1]).longValue()) : null;
this.visitCode = objArr[2] != null ? BigInteger.valueOf(((Number) objArr[2]).longValue()) : null;
this.providerServiceMapID = objArr[3] != null ? ((Number) objArr[3]).intValue() : null;
this.vanID = objArr[4] != null ? ((Number) objArr[4]).intValue() : null;
this.defaultReceivingAge = objArr[5] != null ? (String) objArr[5] : null;
this.vaccineName = objArr[6] != null ? (String) objArr[6] : null;
this.receivedDate = objArr[7] != null ? (Timestamp) objArr[7] : null;
this.receivedFacilityName = objArr[8] != null ? (String) objArr[8] : null;
this.sctcode = objArr[9] != null ? (String) objArr[9] : null;
this.sctTerm = objArr[10] != null ? (String) objArr[10] : null;
this.createdDate = objArr[11] != null ? (Timestamp) objArr[11] : null;
this.createdBy = objArr[12] != null ? (String) objArr[12] : null;
}

public List<ImmunizationDataModel> getImmunizationList(List<Object[]> resultSetList) {
List<ImmunizationDataModel> out = new ArrayList<>();
if (resultSetList != null && !resultSetList.isEmpty()) {
for (Object[] objArr : resultSetList) {
out.add(new ImmunizationDataModel(objArr));
}
}
return out;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
package com.wipro.fhir.data.resource_model;

import java.io.Serializable;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Component;

import lombok.Data;


@Data
@Component
public class MedicalHistoryDataModel implements Serializable {

private static final long serialVersionUID = 1L;


private BigInteger id;
private BigInteger beneficiaryRegID;
private BigInteger visitCode;
private String currentMedication;
private Integer currentMedYear;
private String yearOfIllness;
private String finalIllnessType;
private String yearOfSurgery;
private String finalSurgeryType;
private Timestamp createdDate;
private String createdBy;
public MedicalHistoryDataModel() {
}

public MedicalHistoryDataModel(Object[] objArr) {
this.id = objArr[0] != null ? BigInteger.valueOf(((Number) objArr[0]).longValue()) : null;
this.beneficiaryRegID = objArr[1] != null ? BigInteger.valueOf(((Number) objArr[1]).longValue()) : null;
this.visitCode = objArr[2] != null ? BigInteger.valueOf(((Number) objArr[2]).longValue()) : null;
this.currentMedication = objArr[3] != null ? (String) objArr[3] : null;
this.currentMedYear = objArr[4] != null ? (Integer) objArr[4] : null;
this.yearOfIllness = objArr[5] != null ? (String) objArr[5] : null;
this.finalIllnessType = objArr[6] != null ? (String) objArr[6] : null;
this.yearOfSurgery = objArr[7] != null ? (String) objArr[7] : null;
this.finalSurgeryType = objArr[8] != null ? (String) objArr[8] : null;
this.createdDate = objArr[9] != null ? (Timestamp) objArr[9] : null;
this.createdBy = objArr[10] != null ? (String) objArr[10] : null;
}

public List<MedicalHistoryDataModel> getMedicalList(List<Object[]> resultSetList) {
MedicalHistoryDataModel medHistoryObj;
List<MedicalHistoryDataModel> medHistoryList = new ArrayList<MedicalHistoryDataModel>();
if (resultSetList != null && resultSetList.size() > 0) {
for (Object[] objArr : resultSetList) {
medHistoryObj = new MedicalHistoryDataModel(objArr);
medHistoryList.add(medHistoryObj);
}
}
return medHistoryList;
}

}
Loading
Loading