diff --git a/exec/pom.xml b/exec/pom.xml
index ec833b6..63327aa 100755
--- a/exec/pom.xml
+++ b/exec/pom.xml
@@ -4,7 +4,7 @@
org.smartregister
opensrp-gateway-plugin
- 2.0.2
+ 2.0.3
exec
@@ -70,7 +70,7 @@
org.smartregister
plugins
- 2.0.2
+ 2.0.3
diff --git a/plugins/pom.xml b/plugins/pom.xml
index 3e3c1d4..50f76e0 100644
--- a/plugins/pom.xml
+++ b/plugins/pom.xml
@@ -4,7 +4,7 @@
org.smartregister
opensrp-gateway-plugin
- 2.0.2
+ 2.0.3
plugins
diff --git a/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/LocationHierarchyEndpointHelper.java b/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/LocationHierarchyEndpointHelper.java
index 0475363..91bf38a 100644
--- a/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/LocationHierarchyEndpointHelper.java
+++ b/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/LocationHierarchyEndpointHelper.java
@@ -29,6 +29,7 @@
import com.google.fhir.gateway.ExceptionUtil;
import ca.uhn.fhir.context.FhirContext;
+import ca.uhn.fhir.rest.api.SearchStyleEnum;
import ca.uhn.fhir.rest.client.api.IGenericClient;
import ca.uhn.fhir.rest.gclient.IQuery;
import ca.uhn.fhir.rest.gclient.ReferenceClientParam;
@@ -134,7 +135,8 @@ public List getDescendants(
adminLevelArray));
}
- Bundle childLocationBundle = query.returnBundle(Bundle.class).execute();
+ Bundle childLocationBundle =
+ query.usingStyle(SearchStyleEnum.POST).returnBundle(Bundle.class).execute();
List allLocations = new ArrayList<>();
if (parentLocation != null) {
@@ -262,6 +264,7 @@ private String getSyncStrategy(String applicationId) {
client.search()
.forResource(Composition.class)
.where(Composition.IDENTIFIER.exactly().identifier(applicationId))
+ .usingStyle(SearchStyleEnum.POST)
.returnBundle(Bundle.class)
.execute();
diff --git a/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/PermissionAccessChecker.java b/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/PermissionAccessChecker.java
index 78e8d81..3c1d73b 100755
--- a/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/PermissionAccessChecker.java
+++ b/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/PermissionAccessChecker.java
@@ -36,6 +36,7 @@
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.rest.api.RequestTypeEnum;
+import ca.uhn.fhir.rest.api.SearchStyleEnum;
import ca.uhn.fhir.rest.client.api.IGenericClient;
import ca.uhn.fhir.rest.server.exceptions.AuthenticationException;
@@ -206,6 +207,7 @@ private Composition readCompositionResource(String applicationId, FhirContext fh
client.search()
.forResource(Composition.class)
.where(Composition.IDENTIFIER.exactly().identifier(applicationId))
+ .usingStyle(SearchStyleEnum.POST)
.returnBundle(Bundle.class)
.execute();
diff --git a/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/PractitionerDetailsEndpointHelper.java b/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/PractitionerDetailsEndpointHelper.java
index 61f734b..16865b2 100755
--- a/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/PractitionerDetailsEndpointHelper.java
+++ b/plugins/src/main/java/org/smartregister/fhir/gateway/plugins/PractitionerDetailsEndpointHelper.java
@@ -32,6 +32,7 @@
import org.smartregister.model.practitioner.PractitionerDetails;
import org.springframework.lang.Nullable;
+import ca.uhn.fhir.rest.api.SearchStyleEnum;
import ca.uhn.fhir.rest.client.api.IGenericClient;
import ca.uhn.fhir.rest.gclient.ReferenceClientParam;
@@ -200,6 +201,7 @@ private List getOrganizationIdsByLocationIds(List attributedLoca
.where(
OrganizationAffiliation.LOCATION.hasAnyOfIds(
attributedLocationsList))
+ .usingStyle(SearchStyleEnum.POST)
.returnBundle(Bundle.class)
.execute();
@@ -351,6 +353,7 @@ private Bundle getGroupsAssignedToPractitioner(String practitionerId) {
Group.CODE
.exactly()
.systemAndCode(HTTP_SNOMED_INFO_SCT, PRACTITIONER_GROUP_CODE))
+ .usingStyle(SearchStyleEnum.POST)
.returnBundle(Bundle.class)
.execute();
}
@@ -379,6 +382,7 @@ private Practitioner getPractitionerByIdentifier(String identifier) {
.search()
.forResource(Practitioner.class)
.where(Practitioner.IDENTIFIER.exactly().identifier(identifier))
+ .usingStyle(SearchStyleEnum.POST)
.returnBundle(Bundle.class)
.execute();
@@ -407,6 +411,7 @@ private List getCareTeamsByOrganizationIds(List organizationId
.FORWARD_SLASH
+ it)
.collect(Collectors.toList())))
+ .usingStyle(SearchStyleEnum.POST)
.returnBundle(Bundle.class)
.execute();
@@ -425,6 +430,7 @@ private Bundle getCareTeams(String practitionerId) {
Enumerations.ResourceType.PRACTITIONER.toCode()
+ org.smartregister.utils.Constants.FORWARD_SLASH
+ practitionerId))
+ .usingStyle(SearchStyleEnum.POST)
.returnBundle(Bundle.class)
.execute();
}
@@ -434,6 +440,7 @@ private Bundle getPractitionerRoles(String practitionerId) {
.search()
.forResource(PractitionerRole.class)
.where(PractitionerRole.PRACTITIONER.hasId(practitionerId))
+ .usingStyle(SearchStyleEnum.POST)
.returnBundle(Bundle.class)
.execute();
}
@@ -452,6 +459,7 @@ private Bundle getOrganizationsById(Set organizationIds) {
.where(
new ReferenceClientParam(BaseResource.SP_RES_ID)
.hasAnyOfIds(organizationIds))
+ .usingStyle(SearchStyleEnum.POST)
.returnBundle(Bundle.class)
.execute();
}
@@ -468,6 +476,7 @@ private Bundle getOrganizationsById(Set organizationIds) {
.where(
new ReferenceClientParam(BaseResource.SP_RES_ID)
.hasAnyOfIds(locationIds))
+ .usingStyle(SearchStyleEnum.POST)
.returnBundle(Bundle.class)
.execute();
@@ -495,6 +504,7 @@ private Bundle getOrganizationAffiliationsByOrganizationIdsBundle(Set or
.where(
OrganizationAffiliation.PRIMARY_ORGANIZATION.hasAnyOfIds(
organizationIds))
+ .usingStyle(SearchStyleEnum.POST)
.returnBundle(Bundle.class)
.execute();
}
diff --git a/plugins/src/test/java/org/smartregister/fhir/gateway/plugins/LocationHierarchyEndpointHelperTest.java b/plugins/src/test/java/org/smartregister/fhir/gateway/plugins/LocationHierarchyEndpointHelperTest.java
index 02af118..f96a02c 100644
--- a/plugins/src/test/java/org/smartregister/fhir/gateway/plugins/LocationHierarchyEndpointHelperTest.java
+++ b/plugins/src/test/java/org/smartregister/fhir/gateway/plugins/LocationHierarchyEndpointHelperTest.java
@@ -30,6 +30,7 @@
import com.auth0.jwt.interfaces.DecodedJWT;
+import ca.uhn.fhir.rest.api.SearchStyleEnum;
import ca.uhn.fhir.rest.client.api.IGenericClient;
import ca.uhn.fhir.rest.gclient.ICriterion;
import ca.uhn.fhir.rest.gclient.IQuery;
@@ -258,6 +259,7 @@ public void testGetDecendantsWithAdminLevelFiltersReturnsLocationsWithinAdminLev
Mockito.doReturn(queryMock).when(untypedQueryMock).forResource(Location.class);
Mockito.doReturn(queryMock).when(queryMock).where(any(ICriterion.class));
Mockito.doReturn(queryMock).when(queryMock).and(any(ICriterion.class));
+ Mockito.doReturn(queryMock).when(queryMock).usingStyle(SearchStyleEnum.POST);
Mockito.doReturn(queryMock).when(queryMock).returnBundle(Bundle.class);
Mockito.doReturn(firstBundleMock, secondBundleMock).when(queryMock).execute();
diff --git a/plugins/src/test/java/org/smartregister/fhir/gateway/plugins/PractitionerDetailsEndpointHelperTest.java b/plugins/src/test/java/org/smartregister/fhir/gateway/plugins/PractitionerDetailsEndpointHelperTest.java
index 49af459..487ace0 100644
--- a/plugins/src/test/java/org/smartregister/fhir/gateway/plugins/PractitionerDetailsEndpointHelperTest.java
+++ b/plugins/src/test/java/org/smartregister/fhir/gateway/plugins/PractitionerDetailsEndpointHelperTest.java
@@ -21,6 +21,7 @@
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.parser.IParser;
+import ca.uhn.fhir.rest.api.SearchStyleEnum;
import ca.uhn.fhir.rest.client.api.IGenericClient;
import ca.uhn.fhir.rest.gclient.ICriterion;
@@ -43,6 +44,7 @@ public void testGetPractitonerDetailsByKeycloakIdNotFound() {
client.search()
.forResource(eq(Practitioner.class))
.where(any(ICriterion.class))
+ .usingStyle(SearchStyleEnum.POST)
.returnBundle(any())
.execute();
@@ -61,6 +63,7 @@ public void testGetPractitonerDetailsByKeycloakIdReturnsCorrectPractitioner() {
client.search()
.forResource(eq(Practitioner.class))
.where(any(ICriterion.class))
+ .usingStyle(SearchStyleEnum.POST)
.returnBundle(any())
.execute();
when(whenPractitionerSearch).thenReturn(getPractitionerBundle());
diff --git a/pom.xml b/pom.xml
index 1c4db79..3fbc386 100755
--- a/pom.xml
+++ b/pom.xml
@@ -11,7 +11,7 @@
org.smartregister
opensrp-gateway-plugin
- 2.0.2
+ 2.0.3
pom