diff --git a/pom.xml b/pom.xml
index e42a83c..efa87c1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -186,39 +186,74 @@
com.fasterxml.jackson.core
jackson-core
- 2.14.2
+ 2.15.2
com.fasterxml.jackson.core
jackson-databind
- 2.14.2
+ 2.15.2
com.fasterxml.jackson.core
jackson-annotations
- 2.14.2
+ 2.15.2
-
+
ca.uhn.hapi.fhir
hapi-fhir-structures-r4
- 6.10.0
+ 8.4.0
-
+
+
+
+ ca.uhn.hapi.fhir
+ hapi-fhir-validation
+ 8.4.0
+
+
+
+
+ ca.uhn.hapi.fhir
+ hapi-fhir-structures-r4
+ 8.4.0
+
+
+
+
+
+ ca.uhn.hapi.fhir
+ hapi-fhir-caching-caffeine
+ 8.4.0
+
+
+
ca.uhn.hapi
hapi-base
2.6.0
-
+
ca.uhn.hapi.fhir
org.hl7.fhir.utilities
6.5.18
+
+
+ ca.uhn.hapi.fhir
+ hapi-fhir-validation-resources-r4
+ 8.4.0
+
+
org.projectlombok
@@ -363,7 +398,8 @@
${target-properties} and
${source-properties}
-
diff --git a/src/main/environment/common_ci.properties b/src/main/environment/common_ci.properties
index 75945e9..c9fbfaa 100644
--- a/src/main/environment/common_ci.properties
+++ b/src/main/environment/common_ci.properties
@@ -124,3 +124,5 @@ springdoc.swagger-ui.enabled=@env.SWAGGER_DOC_ENABLED@
spring.redis.host=@env.REDIS_HOST@
cors.allowed-origins=@env.CORS_ALLOWED_ORIGINS@
+
+systemUrl= @env.HIP_SYSTEM_URL@
diff --git a/src/main/environment/common_dev.properties b/src/main/environment/common_dev.properties
index e2c39d1..1fac23c 100644
--- a/src/main/environment/common_dev.properties
+++ b/src/main/environment/common_dev.properties
@@ -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
+
+hipSystemUrl=
\ No newline at end of file
diff --git a/src/main/environment/common_docker.properties b/src/main/environment/common_docker.properties
index 82239d6..9f183b0 100644
--- a/src/main/environment/common_docker.properties
+++ b/src/main/environment/common_docker.properties
@@ -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}
\ No newline at end of file
+spring.redis.host=${REDIS_HOST}
+
+hipSystemUrl= ${HIP_SYSTEM_URL}
\ No newline at end of file
diff --git a/src/main/environment/common_example.properties b/src/main/environment/common_example.properties
index 36cfb14..4e99ca7 100644
--- a/src/main/environment/common_example.properties
+++ b/src/main/environment/common_example.properties
@@ -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:*
\ No newline at end of file
+cors.allowed-origins=http://localhost:*
+
+hipSystemUrl=
\ No newline at end of file
diff --git a/src/main/environment/common_test.properties b/src/main/environment/common_test.properties
index e2c39d1..9584f0e 100644
--- a/src/main/environment/common_test.properties
+++ b/src/main/environment/common_test.properties
@@ -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
+
+hipSystemUrl=
diff --git a/src/main/java/com/wipro/fhir/controller/generateresource/ResourceRequestGateway.java b/src/main/java/com/wipro/fhir/controller/generateresource/ResourceRequestGateway.java
index 78ba1a5..e293ac7 100644
--- a/src/main/java/com/wipro/fhir/controller/generateresource/ResourceRequestGateway.java
+++ b/src/main/java/com/wipro/fhir/controller/generateresource/ResourceRequestGateway.java
@@ -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;
@@ -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;
/***
*
@@ -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) {
@@ -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) {
@@ -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) {
diff --git a/src/main/java/com/wipro/fhir/controller/test/Test.java b/src/main/java/com/wipro/fhir/controller/test/Test.java
index 719047c..8be0743 100644
--- a/src/main/java/com/wipro/fhir/controller/test/Test.java
+++ b/src/main/java/com/wipro/fhir/controller/test/Test.java
@@ -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;
@@ -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" })
@@ -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);
diff --git a/src/main/java/com/wipro/fhir/data/resource_model/ImmunizationDataModel.java b/src/main/java/com/wipro/fhir/data/resource_model/ImmunizationDataModel.java
new file mode 100644
index 0000000..e82fcbd
--- /dev/null
+++ b/src/main/java/com/wipro/fhir/data/resource_model/ImmunizationDataModel.java
@@ -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 getImmunizationList(List