diff --git a/hapi-deployable-pom/pom.xml b/hapi-deployable-pom/pom.xml
index 4d05d26522a..a0d256a2f6c 100644
--- a/hapi-deployable-pom/pom.xml
+++ b/hapi-deployable-pom/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-android/pom.xml b/hapi-fhir-android/pom.xml
index c84644e796a..9c5b661a25d 100644
--- a/hapi-fhir-android/pom.xml
+++ b/hapi-fhir-android/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-base/pom.xml b/hapi-fhir-base/pom.xml
index f0faecc992e..a8f8a17e2e4 100644
--- a/hapi-fhir-base/pom.xml
+++ b/hapi-fhir-base/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/Constants.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/Constants.java
index 87e0f340ad4..27431bc7fd8 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/Constants.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/Constants.java
@@ -153,6 +153,7 @@ public class Constants {
public static final String OPENSEARCH_NS_OLDER = "http://purl.org/atompub/tombstones/1.0";
public static final String PARAM_ASYNC = "async"; //Used in messaging
public static final String PARAM_AT = "_at";
+ public static final String PARAM_ID= "_id";
/**
* Used in paging links
*/
diff --git a/hapi-fhir-batch/pom.xml b/hapi-fhir-batch/pom.xml
index fef7df9872a..d2a9f3aa438 100644
--- a/hapi-fhir-batch/pom.xml
+++ b/hapi-fhir-batch/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-bom/pom.xml b/hapi-fhir-bom/pom.xml
index 9f51d2c848c..d4f0986e17c 100644
--- a/hapi-fhir-bom/pom.xml
+++ b/hapi-fhir-bom/pom.xml
@@ -3,14 +3,14 @@
4.0.0
ca.uhn.hapi.fhir
hapi-fhir-bom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
pom
HAPI FHIR BOM
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml
index fc4f24ccb4c..03468efb502 100644
--- a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml
+++ b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml
index 3a0d9f26e7e..1ce0d135728 100644
--- a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml
+++ b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-fhir-cli
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml
index 94da10760a8..7b493d6cb99 100644
--- a/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml
+++ b/hapi-fhir-cli/hapi-fhir-cli-jpaserver/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../../hapi-deployable-pom
diff --git a/hapi-fhir-cli/pom.xml b/hapi-fhir-cli/pom.xml
index 332ec5b1911..ccb209b92fa 100644
--- a/hapi-fhir-cli/pom.xml
+++ b/hapi-fhir-cli/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-client-okhttp/pom.xml b/hapi-fhir-client-okhttp/pom.xml
index bc7290edb76..2ee4ddbb6fc 100644
--- a/hapi-fhir-client-okhttp/pom.xml
+++ b/hapi-fhir-client-okhttp/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-client/pom.xml b/hapi-fhir-client/pom.xml
index a89dcc8dc7a..84575b1941d 100644
--- a/hapi-fhir-client/pom.xml
+++ b/hapi-fhir-client/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-converter/pom.xml b/hapi-fhir-converter/pom.xml
index c843e6d4ba2..cacf2b3ad6f 100644
--- a/hapi-fhir-converter/pom.xml
+++ b/hapi-fhir-converter/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-dist/pom.xml b/hapi-fhir-dist/pom.xml
index 302fb6ff4bc..2030fac2bef 100644
--- a/hapi-fhir-dist/pom.xml
+++ b/hapi-fhir-dist/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-docs/pom.xml b/hapi-fhir-docs/pom.xml
index a4c64321f69..ffc1ab747eb 100644
--- a/hapi-fhir-docs/pom.xml
+++ b/hapi-fhir-docs/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/3071-support-patient-id-in-type-everything.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/3071-support-patient-id-in-type-everything.yaml
new file mode 100644
index 00000000000..41d3eb22ac4
--- /dev/null
+++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_6_0/3071-support-patient-id-in-type-everything.yaml
@@ -0,0 +1,6 @@
+---
+type: add
+jira: SMILE-3097
+issue: 3071
+title: "A new parameter, `_id` has been added to the `Patient/$everything` type-level operation. This allows you to pass in multiple patients as arguments, e.g. `[base]/Patient/$everything?_id=1,2,3`.
+This call would retrieve everything for patients with IDs 1,2, and 3."
diff --git a/hapi-fhir-jacoco/pom.xml b/hapi-fhir-jacoco/pom.xml
index 9f82e1f1ca6..6c7fdf1a3d2 100644
--- a/hapi-fhir-jacoco/pom.xml
+++ b/hapi-fhir-jacoco/pom.xml
@@ -11,7 +11,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jaxrsserver-base/pom.xml b/hapi-fhir-jaxrsserver-base/pom.xml
index fde8c4d0577..1020019e2b9 100644
--- a/hapi-fhir-jaxrsserver-base/pom.xml
+++ b/hapi-fhir-jaxrsserver-base/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpa/pom.xml b/hapi-fhir-jpa/pom.xml
index 6b86d7b9874..af8a94d5205 100644
--- a/hapi-fhir-jpa/pom.xml
+++ b/hapi-fhir-jpa/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
4.0.0
diff --git a/hapi-fhir-jpaserver-base/pom.xml b/hapi-fhir-jpaserver-base/pom.xml
index af443f90f6f..fb8187d03d8 100644
--- a/hapi-fhir-jpaserver-base/pom.xml
+++ b/hapi-fhir-jpaserver-base/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoPatientDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoPatientDstu2.java
index 77cb1ab0741..e8a32f90884 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoPatientDstu2.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoPatientDstu2.java
@@ -33,9 +33,7 @@ import ca.uhn.fhir.rest.api.RestOperationTypeEnum;
import ca.uhn.fhir.rest.api.SortSpec;
import ca.uhn.fhir.rest.api.server.IBundleProvider;
import ca.uhn.fhir.rest.api.server.RequestDetails;
-import ca.uhn.fhir.rest.param.DateRangeParam;
-import ca.uhn.fhir.rest.param.StringAndListParam;
-import ca.uhn.fhir.rest.param.StringParam;
+import ca.uhn.fhir.rest.param.*;
import ca.uhn.fhir.rest.server.interceptor.IServerInterceptor.ActionRequestDetails;
import org.hl7.fhir.instance.model.api.IIdType;
import org.hl7.fhir.instance.model.api.IPrimitiveType;
@@ -53,7 +51,7 @@ public class FhirResourceDaoPatientDstu2 extends BaseHapiFhirResourceDao theCount, IPrimitiveType theOffset, DateRangeParam theLastUpdated, SortSpec theSort, StringAndListParam theContent, StringAndListParam theNarrative, StringAndListParam theFilter, RequestDetails theRequest) {
+ private IBundleProvider doEverythingOperation(TokenOrListParam theId, IPrimitiveType theCount, IPrimitiveType theOffset, DateRangeParam theLastUpdated, SortSpec theSort, StringAndListParam theContent, StringAndListParam theNarrative, StringAndListParam theFilter, RequestDetails theRequest) {
SearchParameterMap paramMap = new SearchParameterMap();
if (theCount != null) {
paramMap.setCount(theCount.getValue());
@@ -72,7 +70,7 @@ public class FhirResourceDaoPatientDstu2 extends BaseHapiFhirResourceDao theCount, IPrimitiveType theOffset, DateRangeParam theLastUpdated, SortSpec theSort, StringAndListParam theContent, StringAndListParam theNarrative, StringAndListParam theFilter, RequestDetails theRequestDetails) {
+ public IBundleProvider patientTypeEverything(HttpServletRequest theServletRequest, IPrimitiveType theCount, IPrimitiveType theOffset, DateRangeParam theLastUpdated, SortSpec theSort, StringAndListParam theContent, StringAndListParam theNarrative, StringAndListParam theFilter, RequestDetails theRequestDetails, TokenOrListParam theIds) {
// Notify interceptors
ActionRequestDetails requestDetails = new ActionRequestDetails(theRequestDetails, getResourceName(), null);
notifyInterceptors(RestOperationTypeEnum.EXTENDED_OPERATION_TYPE, requestDetails);
- return doEverythingOperation(null, theCount, theOffset, theLastUpdated, theSort, theContent, theNarrative, theFilter, theRequestDetails);
+ return doEverythingOperation(theIds, theCount, theOffset, theLastUpdated, theSort, theContent, theNarrative, theFilter, theRequestDetails);
}
}
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/LegacySearchBuilder.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/LegacySearchBuilder.java
index ad92b0fa2bc..2f3aa1424d4 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/LegacySearchBuilder.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/LegacySearchBuilder.java
@@ -52,6 +52,7 @@ import ca.uhn.fhir.jpa.model.search.StorageProcessingMessage;
import ca.uhn.fhir.jpa.search.DatabaseBackedPagingProvider;
import ca.uhn.fhir.jpa.search.lastn.IElasticsearchSvc;
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
+import ca.uhn.fhir.rest.param.TokenParam;
import ca.uhn.fhir.rest.server.util.ISearchParamRegistry;
import ca.uhn.fhir.jpa.searchparam.util.Dstu3DistanceHelper;
import ca.uhn.fhir.jpa.searchparam.util.LastNParameterHelper;
@@ -369,8 +370,14 @@ public class LegacySearchBuilder implements ISearchBuilder {
From, ResourceLink> join = myQueryStack.createJoin(SearchBuilderJoinEnum.REFERENCE, null);
if (myParams.get(IAnyResource.SP_RES_ID) != null) {
- StringParam idParam = (StringParam) myParams.get(IAnyResource.SP_RES_ID).get(0).get(0);
- ResourcePersistentId pid = myIdHelperService.resolveResourcePersistentIds(myRequestPartitionId, myResourceName, idParam.getValue());
+ ResourcePersistentId pid = null;
+ if (myParams.get(IAnyResource.SP_RES_ID) instanceof StringParam) {
+ StringParam idParam = (StringParam) myParams.get(IAnyResource.SP_RES_ID).get(0).get(0);
+ pid = myIdHelperService.resolveResourcePersistentIds(myRequestPartitionId, myResourceName, idParam.getValue());
+ } else {
+ TokenParam tokenParam = (TokenParam) myParams.get(IAnyResource.SP_RES_ID).get(0).get(0);
+ pid = myIdHelperService.resolveResourcePersistentIds(myRequestPartitionId, myResourceName, tokenParam.getValue());
+ }
if (myAlsoIncludePids == null) {
myAlsoIncludePids = new ArrayList<>(1);
}
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoPatientDstu3.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoPatientDstu3.java
index bedc37a3998..76f5825d9a9 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoPatientDstu3.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoPatientDstu3.java
@@ -32,15 +32,14 @@ import ca.uhn.fhir.rest.api.Constants;
import ca.uhn.fhir.rest.api.SortSpec;
import ca.uhn.fhir.rest.api.server.IBundleProvider;
import ca.uhn.fhir.rest.api.server.RequestDetails;
-import ca.uhn.fhir.rest.param.DateRangeParam;
-import ca.uhn.fhir.rest.param.StringAndListParam;
-import ca.uhn.fhir.rest.param.StringParam;
+import ca.uhn.fhir.rest.param.*;
import org.hl7.fhir.dstu3.model.Patient;
import org.hl7.fhir.instance.model.api.IIdType;
import org.hl7.fhir.instance.model.api.IPrimitiveType;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
+import java.util.Arrays;
import java.util.Collections;
public class FhirResourceDaoPatientDstu3 extends BaseHapiFhirResourceDao implements IFhirResourceDaoPatient {
@@ -48,7 +47,7 @@ public class FhirResourceDaoPatientDstu3 extends BaseHapiFhirResourceDao theCount, IPrimitiveType theOffset, DateRangeParam theLastUpdated, SortSpec theSort, StringAndListParam theContent, StringAndListParam theNarrative, StringAndListParam theFilter, RequestDetails theRequest) {
+ private IBundleProvider doEverythingOperation(TokenOrListParam theId, IPrimitiveType theCount, IPrimitiveType theOffset, DateRangeParam theLastUpdated, SortSpec theSort, StringAndListParam theContent, StringAndListParam theNarrative, StringAndListParam theFilter, RequestDetails theRequest) {
SearchParameterMap paramMap = new SearchParameterMap();
if (theCount != null) {
paramMap.setCount(theCount.getValue());
@@ -67,7 +66,13 @@ public class FhirResourceDaoPatientDstu3 extends BaseHapiFhirResourceDao param.setMdmExpand(true));
+ }
+ }
+ paramMap.add("_id", theId);
}
if (!isPagingProviderDatabaseBacked(theRequest)) {
@@ -80,12 +85,12 @@ public class FhirResourceDaoPatientDstu3 extends BaseHapiFhirResourceDao theCount, IPrimitiveType theOffset, DateRangeParam theLastUpdated, SortSpec theSort, StringAndListParam theContent, StringAndListParam theNarrative, StringAndListParam theFilter, RequestDetails theRequestDetails) {
- return doEverythingOperation(theId, theCount, theOffset, theLastUpdated, theSort, theContent, theNarrative, theFilter, theRequestDetails);
+ TokenOrListParam id = new TokenOrListParam().addOr(new TokenParam(theId.getIdPart()));
+ return doEverythingOperation(id, theCount, theOffset, theLastUpdated, theSort, theContent, theNarrative, theFilter, theRequestDetails);
}
@Override
- public IBundleProvider patientTypeEverything(HttpServletRequest theServletRequest, IPrimitiveType theCount, IPrimitiveType theOffset, DateRangeParam theLastUpdated, SortSpec theSort, StringAndListParam theContent, StringAndListParam theNarrative, StringAndListParam theFilter, RequestDetails theRequestDetails) {
- return doEverythingOperation(null, theCount, theOffset, theLastUpdated, theSort, theContent, theNarrative, theFilter, theRequestDetails);
+ public IBundleProvider patientTypeEverything(HttpServletRequest theServletRequest, IPrimitiveType theCount, IPrimitiveType theOffset, DateRangeParam theLastUpdated, SortSpec theSort, StringAndListParam theContent, StringAndListParam theNarrative, StringAndListParam theFilter, RequestDetails theRequestDetails, TokenOrListParam theId) {
+ return doEverythingOperation(theId, theCount, theOffset, theLastUpdated, theSort, theContent, theNarrative, theFilter, theRequestDetails);
}
-
}
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoPatientR4.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoPatientR4.java
index a69da66af9f..79154d2c693 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoPatientR4.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoPatientR4.java
@@ -32,9 +32,7 @@ import ca.uhn.fhir.rest.api.Constants;
import ca.uhn.fhir.rest.api.SortSpec;
import ca.uhn.fhir.rest.api.server.IBundleProvider;
import ca.uhn.fhir.rest.api.server.RequestDetails;
-import ca.uhn.fhir.rest.param.DateRangeParam;
-import ca.uhn.fhir.rest.param.StringAndListParam;
-import ca.uhn.fhir.rest.param.StringParam;
+import ca.uhn.fhir.rest.param.*;
import org.hl7.fhir.instance.model.api.IIdType;
import org.hl7.fhir.instance.model.api.IPrimitiveType;
import org.hl7.fhir.r4.model.Patient;
@@ -49,7 +47,7 @@ public class FhirResourceDaoPatientR4 extends BaseHapiFhirResourceDaoim
@Autowired
private IRequestPartitionHelperSvc myPartitionHelperSvc;
- private IBundleProvider doEverythingOperation(IIdType theId,
+ private IBundleProvider doEverythingOperation(TokenOrListParam theIds,
IPrimitiveType theCount,
IPrimitiveType theOffset,
DateRangeParam theLastUpdated,
@@ -72,18 +70,17 @@ public class FhirResourceDaoPatientR4 extends BaseHapiFhirResourceDaoim
paramMap.add(Constants.PARAM_TEXT, theNarrative);
}
paramMap.setIncludes(Collections.singleton(IResource.INCLUDE_ALL.asRecursive()));
- paramMap.setEverythingMode(theId != null ? EverythingModeEnum.PATIENT_INSTANCE : EverythingModeEnum.PATIENT_TYPE);
+ paramMap.setEverythingMode(theIds != null && theIds.getValuesAsQueryTokens().size() == 1 ? EverythingModeEnum.PATIENT_INSTANCE : EverythingModeEnum.PATIENT_TYPE);
paramMap.setSort(theSort);
paramMap.setLastUpdated(theLastUpdated);
- if (theId != null) {
- StringParam idParam = new StringParam(theId.getIdPart());
+ if (theIds != null) {
if (theRequest.getParameters().containsKey("_mdm")) {
String[] paramVal = theRequest.getParameters().get("_mdm");
if (Arrays.asList(paramVal).contains("true")) {
- idParam.setMdmExpand(true);
+ theIds.getValuesAsQueryTokens().stream().forEach(param -> param.setMdmExpand(true));
}
}
- paramMap.add("_id", idParam);
+ paramMap.add("_id", theIds);
}
if (!isPagingProviderDatabaseBacked(theRequest)) {
@@ -101,12 +98,13 @@ public class FhirResourceDaoPatientR4 extends BaseHapiFhirResourceDaoim
@Override
public IBundleProvider patientInstanceEverything(HttpServletRequest theServletRequest, IIdType theId, IPrimitiveType theCount, IPrimitiveType theOffset, DateRangeParam theLastUpdated, SortSpec theSort, StringAndListParam theContent, StringAndListParam theNarrative, StringAndListParam theFilter, RequestDetails theRequestDetails) {
- return doEverythingOperation(theId, theCount, theOffset, theLastUpdated, theSort, theContent, theNarrative, theFilter, theRequestDetails);
+ TokenOrListParam id = new TokenOrListParam().add(new TokenParam(theId.getIdPart()));
+ return doEverythingOperation(id, theCount, theOffset, theLastUpdated, theSort, theContent, theNarrative, theFilter, theRequestDetails);
}
@Override
- public IBundleProvider patientTypeEverything(HttpServletRequest theServletRequest, IPrimitiveType theCount, IPrimitiveType theOffset, DateRangeParam theLastUpdated, SortSpec theSort, StringAndListParam theContent, StringAndListParam theNarrative, StringAndListParam theFilter, RequestDetails theRequestDetails) {
- return doEverythingOperation(null, theCount, theOffset, theLastUpdated, theSort, theContent, theNarrative, theFilter, theRequestDetails);
+ public IBundleProvider patientTypeEverything(HttpServletRequest theServletRequest, IPrimitiveType theCount, IPrimitiveType theOffset, DateRangeParam theLastUpdated, SortSpec theSort, StringAndListParam theContent, StringAndListParam theNarrative, StringAndListParam theFilter, RequestDetails theRequestDetails, TokenOrListParam theId) {
+ return doEverythingOperation(theId, theCount, theOffset, theLastUpdated, theSort, theContent, theNarrative, theFilter, theRequestDetails);
}
}
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/FhirResourceDaoPatientR5.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/FhirResourceDaoPatientR5.java
index c5b4d39ba70..627b1c191f6 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/FhirResourceDaoPatientR5.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/r5/FhirResourceDaoPatientR5.java
@@ -31,9 +31,7 @@ import ca.uhn.fhir.rest.api.Constants;
import ca.uhn.fhir.rest.api.SortSpec;
import ca.uhn.fhir.rest.api.server.IBundleProvider;
import ca.uhn.fhir.rest.api.server.RequestDetails;
-import ca.uhn.fhir.rest.param.DateRangeParam;
-import ca.uhn.fhir.rest.param.StringAndListParam;
-import ca.uhn.fhir.rest.param.StringParam;
+import ca.uhn.fhir.rest.param.*;
import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.instance.model.api.IIdType;
import org.hl7.fhir.instance.model.api.IPrimitiveType;
@@ -41,6 +39,7 @@ import org.hl7.fhir.r5.model.Patient;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
+import java.util.Arrays;
import java.util.Collections;
public class FhirResourceDaoPatientR5 extends BaseHapiFhirResourceDao implements IFhirResourceDaoPatient {
@@ -48,7 +47,7 @@ public class FhirResourceDaoPatientR5 extends BaseHapiFhirResourceDao i
@Autowired
private IRequestPartitionHelperSvc myPartitionHelperSvc;
- private IBundleProvider doEverythingOperation(IIdType theId, IPrimitiveType theCount, IPrimitiveType theOffset, DateRangeParam theLastUpdated, SortSpec theSort, StringAndListParam theContent, StringAndListParam theNarrative, RequestDetails theRequest) {
+ private IBundleProvider doEverythingOperation(TokenOrListParam theId, IPrimitiveType theCount, IPrimitiveType theOffset, DateRangeParam theLastUpdated, SortSpec theSort, StringAndListParam theContent, StringAndListParam theNarrative, RequestDetails theRequest) {
SearchParameterMap paramMap = new SearchParameterMap();
if (theCount != null) {
paramMap.setCount(theCount.getValue());
@@ -67,7 +66,13 @@ public class FhirResourceDaoPatientR5 extends BaseHapiFhirResourceDao i
paramMap.setSort(theSort);
paramMap.setLastUpdated(theLastUpdated);
if (theId != null) {
- paramMap.add("_id", new StringParam(theId.getIdPart()));
+ if (theRequest.getParameters().containsKey("_mdm")) {
+ String[] paramVal = theRequest.getParameters().get("_mdm");
+ if (Arrays.asList(paramVal).contains("true")) {
+ theId.getValuesAsQueryTokens().stream().forEach(param -> param.setMdmExpand(true));
+ }
+ }
+ paramMap.add("_id", theId);
}
if (!isPagingProviderDatabaseBacked(theRequest)) {
@@ -80,12 +85,12 @@ public class FhirResourceDaoPatientR5 extends BaseHapiFhirResourceDao i
@Override
public IBundleProvider patientInstanceEverything(HttpServletRequest theServletRequest, IIdType theId, IPrimitiveType theCount, IPrimitiveType theOffset, DateRangeParam theLastUpdated, SortSpec theSort, StringAndListParam theContent, StringAndListParam theNarrative, StringAndListParam theFilter, RequestDetails theRequestDetails) {
- return doEverythingOperation(theId, theCount, theOffset, theLastUpdated, theSort, theContent, theNarrative, theRequestDetails);
+ TokenOrListParam id = new TokenOrListParam().add(new TokenParam(theId.getIdPart()));
+ return doEverythingOperation(id, theCount, theOffset, theLastUpdated, theSort, theContent, theNarrative, theRequestDetails);
}
@Override
- public IBundleProvider patientTypeEverything(HttpServletRequest theServletRequest, IPrimitiveType theCount, IPrimitiveType theOffset, DateRangeParam theLastUpdated, SortSpec theSort, StringAndListParam theContent, StringAndListParam theNarrative, StringAndListParam theFilter, RequestDetails theRequestDetails) {
- return doEverythingOperation(null, theCount, theOffset, theLastUpdated, theSort, theContent, theNarrative, theRequestDetails);
+ public IBundleProvider patientTypeEverything(HttpServletRequest theServletRequest, IPrimitiveType theCount, IPrimitiveType theOffset, DateRangeParam theLastUpdated, SortSpec theSort, StringAndListParam theContent, StringAndListParam theNarrative, StringAndListParam theFilter, RequestDetails theRequestDetails, TokenOrListParam theId) {
+ return doEverythingOperation(theId, theCount, theOffset, theLastUpdated, theSort, theContent, theNarrative, theRequestDetails);
}
-
}
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderPatientDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderPatientDstu2.java
index 0cb3627f18d..749b54c6a5c 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderPatientDstu2.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProviderPatientDstu2.java
@@ -4,6 +4,7 @@ import ca.uhn.fhir.jpa.api.dao.IFhirResourceDaoPatient;
import ca.uhn.fhir.jpa.model.util.JpaConstants;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.dstu2.resource.Patient;
+import ca.uhn.fhir.model.primitive.IdDt;
import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.model.valueset.BundleTypeEnum;
import ca.uhn.fhir.rest.annotation.IdParam;
@@ -18,7 +19,11 @@ import ca.uhn.fhir.rest.param.DateRangeParam;
import ca.uhn.fhir.rest.param.StringAndListParam;
import ca.uhn.fhir.rest.param.StringOrListParam;
import ca.uhn.fhir.rest.param.StringParam;
+import ca.uhn.fhir.rest.param.TokenOrListParam;
+import ca.uhn.fhir.rest.param.TokenParam;
+import org.hl7.fhir.r4.model.IdType;
+import java.util.Arrays;
import java.util.List;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
@@ -126,6 +131,10 @@ public class BaseJpaResourceProviderPatientDstu2 extends JpaResourceProviderDstu
@OperationParam(name = Constants.PARAM_FILTER, min = 0, max = OperationParam.MAX_UNLIMITED)
List theFilter,
+ @Description(shortDefinition = "Filter the resources to return based on the patient ids provided.")
+ @OperationParam(name = Constants.PARAM_ID, min = 0, max = OperationParam.MAX_UNLIMITED)
+ List theId,
+
@Sort
SortSpec theSortSpec,
@@ -134,13 +143,31 @@ public class BaseJpaResourceProviderPatientDstu2 extends JpaResourceProviderDstu
startRequest(theServletRequest);
try {
- return ((IFhirResourceDaoPatient) getDao()).patientTypeEverything(theServletRequest, theCount, theOffset, theLastUpdated, theSortSpec, toStringAndList(theContent), toStringAndList(theNarrative), toStringAndList(theFilter), theRequestDetails);
+ return ((IFhirResourceDaoPatient) getDao()).patientTypeEverything(theServletRequest, theCount, theOffset, theLastUpdated, theSortSpec, toStringAndList(theContent), toStringAndList(theNarrative), toStringAndList(theFilter), theRequestDetails, toFlattenedPatientIdTokenParamList(theId));
} finally {
endRequest(theServletRequest);
}
}
+ /**
+ * Given a list of string types, return only the ID portions of any parameters passed in.
+ */
+ private TokenOrListParam toFlattenedPatientIdTokenParamList(List theId) {
+ TokenOrListParam retVal = new TokenOrListParam();
+ if (theId != null) {
+ for (IdDt next : theId) {
+ if (isNotBlank(next.getValue())) {
+ String[] split = next.getValueAsString().split(",");
+ Arrays.stream(split).map(IdDt::new).forEach(id -> {
+ retVal.addOr(new TokenParam(id.getIdPart()));
+ });
+ }
+ }
+ }
+ return retVal.getValuesAsQueryTokens().isEmpty() ? null: retVal;
+ }
+
private StringAndListParam toStringAndList(List theNarrative) {
StringAndListParam retVal = new StringAndListParam();
if (theNarrative != null) {
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderPatientDstu3.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderPatientDstu3.java
index 94cbab18b2f..0c17b944606 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderPatientDstu3.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/dstu3/BaseJpaResourceProviderPatientDstu3.java
@@ -16,11 +16,14 @@ import ca.uhn.fhir.rest.param.DateRangeParam;
import ca.uhn.fhir.rest.param.StringAndListParam;
import ca.uhn.fhir.rest.param.StringOrListParam;
import ca.uhn.fhir.rest.param.StringParam;
+import ca.uhn.fhir.rest.param.TokenOrListParam;
+import ca.uhn.fhir.rest.param.TokenParam;
import org.hl7.fhir.dstu3.model.IdType;
import org.hl7.fhir.dstu3.model.Patient;
import org.hl7.fhir.dstu3.model.StringType;
import org.hl7.fhir.dstu3.model.UnsignedIntType;
+import java.util.Arrays;
import java.util.List;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
@@ -128,21 +131,42 @@ public class BaseJpaResourceProviderPatientDstu3 extends JpaResourceProviderDstu
@OperationParam(name = Constants.PARAM_FILTER, min = 0, max = OperationParam.MAX_UNLIMITED)
List theFilter,
+ @Description(shortDefinition = "Filter the resources to return based on the patient ids provided.")
+ @OperationParam(name = Constants.PARAM_ID, min = 0, max = OperationParam.MAX_UNLIMITED)
+ List theId,
+
@Sort
SortSpec theSortSpec,
RequestDetails theRequestDetails
) {
-
startRequest(theServletRequest);
try {
- return ((IFhirResourceDaoPatient) getDao()).patientTypeEverything(theServletRequest, theCount, theOffset, theLastUpdated, theSortSpec, toStringAndList(theContent), toStringAndList(theNarrative), toStringAndList(theFilter), theRequestDetails);
+ return ((IFhirResourceDaoPatient) getDao()).patientTypeEverything(theServletRequest, theCount, theOffset, theLastUpdated, theSortSpec, toStringAndList(theContent), toStringAndList(theNarrative), toStringAndList(theFilter), theRequestDetails, toFlattenedPatientIdTokenParamList(theId));
} finally {
endRequest(theServletRequest);
}
-
}
+ /**
+ * Given a list of string types, return only the ID portions of any parameters passed in.
+ */
+ private TokenOrListParam toFlattenedPatientIdTokenParamList(List theId) {
+ TokenOrListParam retVal = new TokenOrListParam();
+ if (theId != null) {
+ for (IdType next: theId) {
+ if (isNotBlank(next.getValue())) {
+ String[] split = next.getValueAsString().split(",");
+ Arrays.stream(split).map(IdType::new).forEach(id -> {
+ retVal.addOr(new TokenParam(id.getIdPart()));
+ });
+ }
+ }
+ }
+ return retVal.getValuesAsQueryTokens().isEmpty() ? null: retVal;
+ }
+
+
private StringAndListParam toStringAndList(List theNarrative) {
StringAndListParam retVal = new StringAndListParam();
if (theNarrative != null) {
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderPatientR4.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderPatientR4.java
index 63969b7e2f9..6f655f6ac86 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderPatientR4.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderPatientR4.java
@@ -16,11 +16,14 @@ import ca.uhn.fhir.rest.param.DateRangeParam;
import ca.uhn.fhir.rest.param.StringAndListParam;
import ca.uhn.fhir.rest.param.StringOrListParam;
import ca.uhn.fhir.rest.param.StringParam;
+import ca.uhn.fhir.rest.param.TokenOrListParam;
+import ca.uhn.fhir.rest.param.TokenParam;
import org.hl7.fhir.r4.model.IdType;
import org.hl7.fhir.r4.model.Patient;
import org.hl7.fhir.r4.model.StringType;
import org.hl7.fhir.r4.model.UnsignedIntType;
+import java.util.Arrays;
import java.util.List;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
@@ -128,6 +131,10 @@ public class BaseJpaResourceProviderPatientR4 extends JpaResourceProviderR4 theFilter,
+ @Description(shortDefinition = "Filter the resources to return based on the patient ids provided.")
+ @OperationParam(name = Constants.PARAM_ID, min = 0, max = OperationParam.MAX_UNLIMITED)
+ List theId,
+
@Sort
SortSpec theSortSpec,
@@ -136,13 +143,31 @@ public class BaseJpaResourceProviderPatientR4 extends JpaResourceProviderR4) getDao()).patientTypeEverything(theServletRequest, theCount, theOffset, theLastUpdated, theSortSpec, toStringAndList(theContent), toStringAndList(theNarrative), toStringAndList(theFilter), theRequestDetails);
+ return ((IFhirResourceDaoPatient) getDao()).patientTypeEverything(theServletRequest, theCount, theOffset, theLastUpdated, theSortSpec, toStringAndList(theContent), toStringAndList(theNarrative), toStringAndList(theFilter), theRequestDetails, toFlattenedPatientIdTokenParamList(theId));
} finally {
endRequest(theServletRequest);
}
}
+ /**
+ * Given a list of string types, return only the ID portions of any parameters passed in.
+ */
+ private TokenOrListParam toFlattenedPatientIdTokenParamList(List theId) {
+ TokenOrListParam retVal = new TokenOrListParam();
+ if (theId != null) {
+ for (IdType next: theId) {
+ if (isNotBlank(next.getValue())) {
+ String[] split = next.getValueAsString().split(",");
+ Arrays.stream(split).map(IdType::new).forEach(id -> {
+ retVal.addOr(new TokenParam(id.getIdPart()));
+ });
+ }
+ }
+ }
+ return retVal.getValuesAsQueryTokens().isEmpty() ? null: retVal;
+ }
+
private StringAndListParam toStringAndList(List theNarrative) {
StringAndListParam retVal = new StringAndListParam();
if (theNarrative != null) {
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderPatientR5.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderPatientR5.java
index bd34287aef0..7a1ab694551 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderPatientR5.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r5/BaseJpaResourceProviderPatientR5.java
@@ -16,11 +16,14 @@ import ca.uhn.fhir.rest.param.DateRangeParam;
import ca.uhn.fhir.rest.param.StringAndListParam;
import ca.uhn.fhir.rest.param.StringOrListParam;
import ca.uhn.fhir.rest.param.StringParam;
+import ca.uhn.fhir.rest.param.TokenOrListParam;
+import ca.uhn.fhir.rest.param.TokenParam;
import org.hl7.fhir.r5.model.IdType;
import org.hl7.fhir.r5.model.Patient;
import org.hl7.fhir.r5.model.StringType;
import org.hl7.fhir.r5.model.UnsignedIntType;
+import java.util.Arrays;
import java.util.List;
import static org.apache.commons.lang3.StringUtils.isNotBlank;
@@ -128,6 +131,10 @@ public class BaseJpaResourceProviderPatientR5 extends JpaResourceProviderR5 theFilter,
+ @Description(shortDefinition = "Filter the resources to return based on the patient ids provided.")
+ @OperationParam(name = Constants.PARAM_ID, min = 0, max = OperationParam.MAX_UNLIMITED)
+ List theId,
+
@Sort
SortSpec theSortSpec,
@@ -136,13 +143,32 @@ public class BaseJpaResourceProviderPatientR5 extends JpaResourceProviderR5) getDao()).patientTypeEverything(theServletRequest, theCount, theOffset, theLastUpdated, theSortSpec, toStringAndList(theContent), toStringAndList(theNarrative), toStringAndList(theFilter), theRequestDetails);
+ return ((IFhirResourceDaoPatient) getDao()).patientTypeEverything(theServletRequest, theCount, theOffset, theLastUpdated, theSortSpec, toStringAndList(theContent), toStringAndList(theNarrative), toStringAndList(theFilter), theRequestDetails, toFlattenedPatientIdTokenParamList(theId));
} finally {
endRequest(theServletRequest);
}
}
+ /**
+ * Given a list of string types, return only the ID portions of any parameters passed in.
+ */
+ private TokenOrListParam toFlattenedPatientIdTokenParamList(List theId) {
+ TokenOrListParam retVal = new TokenOrListParam();
+ if (theId != null) {
+ for (IdType next: theId) {
+ if (isNotBlank(next.getValue())) {
+ String[] split = next.getValueAsString().split(",");
+ Arrays.stream(split).map(IdType::new).forEach(id -> {
+ retVal.addOr(new TokenParam(id.getIdPart()));
+ });
+ }
+ }
+ }
+
+ return retVal.getValuesAsQueryTokens().isEmpty() ? null: retVal;
+ }
+
private StringAndListParam toStringAndList(List theNarrative) {
StringAndListParam retVal = new StringAndListParam();
if (theNarrative != null) {
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/SearchBuilder.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/SearchBuilder.java
index 7ddaf011b17..a9790afb11a 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/SearchBuilder.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/SearchBuilder.java
@@ -83,6 +83,7 @@ import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId;
import ca.uhn.fhir.rest.param.DateRangeParam;
import ca.uhn.fhir.rest.param.ReferenceParam;
import ca.uhn.fhir.rest.param.StringParam;
+import ca.uhn.fhir.rest.param.TokenParam;
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails;
import ca.uhn.fhir.rest.server.util.CompositeInterceptorBroadcaster;
@@ -389,10 +390,11 @@ public class SearchBuilder implements ISearchBuilder {
if (param instanceof StringParam) {
// we expect all _id values to be StringParams
ids.add(((StringParam) param).getValue());
- }
- else {
+ } else if (param instanceof TokenParam) {
+ ids.add(((TokenParam)param).getValue());
+ } else {
// we do not expect the _id parameter to be a non-string value
- throw new IllegalArgumentException("_id parameter must be a StringParam");
+ throw new IllegalArgumentException("_id parameter must be a StringParam or TokenParam");
}
}
}
diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2SearchFtTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2SearchFtTest.java
index eaea5763de5..49bc47dda1b 100644
--- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2SearchFtTest.java
+++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2SearchFtTest.java
@@ -228,11 +228,11 @@ public class FhirResourceDaoDstu2SearchFtTest extends BaseJpaDstu2Test {
param = new StringAndListParam();
param.addAnd(new StringOrListParam().addOr(new StringParam("obsvalue1")));
- actual = toUnqualifiedVersionlessIds(myPatientDao.patientTypeEverything(request, null, null, null, null, param, null, null, mySrd));
+ actual = toUnqualifiedVersionlessIds(myPatientDao.patientTypeEverything(request, null, null, null, null, param, null, null, mySrd, null));
assertThat(actual, containsInAnyOrder(ptId1, obsId1, devId1));
request = mock(HttpServletRequest.class);
- actual = toUnqualifiedVersionlessIds(myPatientDao.patientTypeEverything(request, null, null, null, null, null, null, null, mySrd));
+ actual = toUnqualifiedVersionlessIds(myPatientDao.patientTypeEverything(request, null, null, null, null, null, null, null, mySrd, null));
assertThat(actual, containsInAnyOrder(ptId1, obsId1, obsId2, devId1, ptId2, obsId3));
/*
@@ -248,7 +248,7 @@ public class FhirResourceDaoDstu2SearchFtTest extends BaseJpaDstu2Test {
param = new StringAndListParam();
param.addAnd(new StringOrListParam().addOr(new StringParam("obsvalue1")));
- actual = toUnqualifiedVersionlessIds(myPatientDao.patientTypeEverything(request, null, null, null, null, param, null, null, mySrd));
+ actual = toUnqualifiedVersionlessIds(myPatientDao.patientTypeEverything(request, null, null, null, null, param, null, null, mySrd, null));
assertThat(actual, containsInAnyOrder(ptId2, ptId1, obsId1, obsId4, devId1));
/*
@@ -264,7 +264,7 @@ public class FhirResourceDaoDstu2SearchFtTest extends BaseJpaDstu2Test {
param = new StringAndListParam();
param.addAnd(new StringOrListParam().addOr(new StringParam("obsvalue1")));
- actual = toUnqualifiedVersionlessIds(myPatientDao.patientTypeEverything(request, null, null, null, null, param, null, null, mySrd));
+ actual = toUnqualifiedVersionlessIds(myPatientDao.patientTypeEverything(request, null, null, null, null, param, null, null, mySrd, null));
assertThat(actual, containsInAnyOrder(ptId1, obsId4));
}
diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2SearchNoFtTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2SearchNoFtTest.java
index 62360eff750..fd7a7d53bbe 100644
--- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2SearchNoFtTest.java
+++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2SearchNoFtTest.java
@@ -120,7 +120,7 @@ public class FhirResourceDaoDstu2SearchNoFtTest extends BaseJpaDstu2Test {
IIdType moId = myMedicationOrderDao.create(mo, mySrd).getId().toUnqualifiedVersionless();
HttpServletRequest request = mock(HttpServletRequest.class);
- IBundleProvider resp = myPatientDao.patientTypeEverything(request, null, null, null, null, null, null, null, mySrd);
+ IBundleProvider resp = myPatientDao.patientTypeEverything(request, null, null, null, null, null, null, null, mySrd, null);
assertThat(toUnqualifiedVersionlessIds(resp), containsInAnyOrder(orgId, medId, patId, moId, patId2));
request = mock(HttpServletRequest.class);
diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchFtTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchFtTest.java
index f46c2612526..cc7b6b60bc3 100644
--- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchFtTest.java
+++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchFtTest.java
@@ -325,11 +325,11 @@ public class FhirResourceDaoDstu3SearchFtTest extends BaseJpaDstu3Test {
param = new StringAndListParam();
param.addAnd(new StringOrListParam().addOr(new StringParam("obsvalue1")));
- actual = toUnqualifiedVersionlessIdValues(myPatientDao.patientTypeEverything(request, null, null, null, null, param, null, null, mockSrd()));
+ actual = toUnqualifiedVersionlessIdValues(myPatientDao.patientTypeEverything(request, null, null, null, null, param, null, null, mockSrd(), null));
assertThat(actual, containsInAnyOrder(toValues(ptId1, obsId1, devId1)));
request = mock(HttpServletRequest.class);
- actual = toUnqualifiedVersionlessIdValues(myPatientDao.patientTypeEverything(request, null, null, null, null, null, null, null, mockSrd()));
+ actual = toUnqualifiedVersionlessIdValues(myPatientDao.patientTypeEverything(request, null, null, null, null, null, null, null, mockSrd(), null));
assertThat(actual, containsInAnyOrder(toValues(ptId1, obsId1, obsId2, devId1, ptId2, obsId3)));
/*
@@ -345,7 +345,7 @@ public class FhirResourceDaoDstu3SearchFtTest extends BaseJpaDstu3Test {
param = new StringAndListParam();
param.addAnd(new StringOrListParam().addOr(new StringParam("obsvalue1")));
- actual = toUnqualifiedVersionlessIdValues(myPatientDao.patientTypeEverything(request, null, null, null, null, param, null, null, mockSrd()));
+ actual = toUnqualifiedVersionlessIdValues(myPatientDao.patientTypeEverything(request, null, null, null, null, param, null, null, mockSrd(), null));
assertThat(actual, containsInAnyOrder(toValues(ptId1, ptId2, obsId1, obsId4, devId1)));
/*
@@ -361,7 +361,7 @@ public class FhirResourceDaoDstu3SearchFtTest extends BaseJpaDstu3Test {
param = new StringAndListParam();
param.addAnd(new StringOrListParam().addOr(new StringParam("obsvalue1")));
- actual = toUnqualifiedVersionlessIdValues(myPatientDao.patientTypeEverything(request, null, null, null, null, param, null, null, mockSrd()));
+ actual = toUnqualifiedVersionlessIdValues(myPatientDao.patientTypeEverything(request, null, null, null, null, param, null, null, mockSrd(), null));
assertThat(actual, containsInAnyOrder(toValues(ptId1, obsId4)));
}
diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchNoFtTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchNoFtTest.java
index 1d1dd15e1e4..beff9c92c6f 100644
--- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchNoFtTest.java
+++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3SearchNoFtTest.java
@@ -250,7 +250,7 @@ public class FhirResourceDaoDstu3SearchNoFtTest extends BaseJpaDstu3Test {
IIdType moId = myMedicationRequestDao.create(mo, mySrd).getId().toUnqualifiedVersionless();
HttpServletRequest request = mock(HttpServletRequest.class);
- IBundleProvider resp = myPatientDao.patientTypeEverything(request, null, null, null, null, null, null, null, mySrd);
+ IBundleProvider resp = myPatientDao.patientTypeEverything(request, null, null, null, null, null, null, null, mySrd, null);
assertThat(toUnqualifiedVersionlessIds(resp), containsInAnyOrder(orgId, medId, patId, moId, patId2));
request = mock(HttpServletRequest.class);
diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4LegacySearchBuilderTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4LegacySearchBuilderTest.java
index 9ee4b3bd884..2bccb9a04f1 100644
--- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4LegacySearchBuilderTest.java
+++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4LegacySearchBuilderTest.java
@@ -924,7 +924,7 @@ public class FhirResourceDaoR4LegacySearchBuilderTest extends BaseJpaR4Test {
HttpServletRequest request = mock(HttpServletRequest.class);
myCaptureQueriesListener.clear();
myCaptureQueriesListener.setCaptureQueryStackTrace(true);
- IBundleProvider resp = myPatientDao.patientTypeEverything(request, null, null, null, null, null, null, null, mySrd);
+ IBundleProvider resp = myPatientDao.patientTypeEverything(request, null, null, null, null, null, null, null, mySrd, null);
List actual = toUnqualifiedVersionlessIds(resp);
myCaptureQueriesListener.logSelectQueriesForCurrentThread();
assertThat(actual, containsInAnyOrder(orgId, medId, patId, moId, patId2));
diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchFtTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchFtTest.java
index 80ca3ad0769..b566ebb4f98 100644
--- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchFtTest.java
+++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchFtTest.java
@@ -304,11 +304,11 @@ public class FhirResourceDaoR4SearchFtTest extends BaseJpaR4Test {
param = new StringAndListParam();
param.addAnd(new StringOrListParam().addOr(new StringParam("obsvalue1")));
- actual = toUnqualifiedVersionlessIdValues(myPatientDao.patientTypeEverything(request, null, null, null, null, param, null, null, mockSrd()));
+ actual = toUnqualifiedVersionlessIdValues(myPatientDao.patientTypeEverything(request, null, null, null, null, param, null, null, mockSrd(), null));
assertThat(actual, containsInAnyOrder(toValues(ptId1, obsId1, devId1)));
request = mock(HttpServletRequest.class);
- actual = toUnqualifiedVersionlessIdValues(myPatientDao.patientTypeEverything(request, null, null, null, null, null, null, null, mockSrd()));
+ actual = toUnqualifiedVersionlessIdValues(myPatientDao.patientTypeEverything(request, null, null, null, null, null, null, null, mockSrd(), null));
assertThat(actual, containsInAnyOrder(toValues(ptId1, obsId1, obsId2, devId1, ptId2, obsId3)));
/*
@@ -324,7 +324,7 @@ public class FhirResourceDaoR4SearchFtTest extends BaseJpaR4Test {
param = new StringAndListParam();
param.addAnd(new StringOrListParam().addOr(new StringParam("obsvalue1")));
- actual = toUnqualifiedVersionlessIdValues(myPatientDao.patientTypeEverything(request, null, null, null, null, param, null, null, mockSrd()));
+ actual = toUnqualifiedVersionlessIdValues(myPatientDao.patientTypeEverything(request, null, null, null, null, param, null, null, mockSrd(), null));
assertThat(actual, containsInAnyOrder(toValues(ptId1, ptId2, obsId1, obsId4, devId1)));
/*
@@ -340,7 +340,7 @@ public class FhirResourceDaoR4SearchFtTest extends BaseJpaR4Test {
param = new StringAndListParam();
param.addAnd(new StringOrListParam().addOr(new StringParam("obsvalue1")));
- actual = toUnqualifiedVersionlessIdValues(myPatientDao.patientTypeEverything(request, null, null, null, null, param, null, null, mockSrd()));
+ actual = toUnqualifiedVersionlessIdValues(myPatientDao.patientTypeEverything(request, null, null, null, null, param, null, null, mockSrd(), null));
assertThat(actual, containsInAnyOrder(toValues(ptId1, obsId4)));
}
diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoFtTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoFtTest.java
index e2dff6b14c3..4bdf3c5e141 100644
--- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoFtTest.java
+++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoFtTest.java
@@ -803,7 +803,7 @@ public class FhirResourceDaoR4SearchNoFtTest extends BaseJpaR4Test {
HttpServletRequest request = mock(HttpServletRequest.class);
myCaptureQueriesListener.clear();
myCaptureQueriesListener.setCaptureQueryStackTrace(true);
- IBundleProvider resp = myPatientDao.patientTypeEverything(request, null, null, null, null, null, null, null, mySrd);
+ IBundleProvider resp = myPatientDao.patientTypeEverything(request, null, null, null, null, null, null, null, mySrd, null);
List actual = toUnqualifiedVersionlessIds(resp);
myCaptureQueriesListener.logSelectQueriesForCurrentThread();
assertThat(actual, containsInAnyOrder(orgId, medId, patId, moId, patId2));
diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoHashesTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoHashesTest.java
index 71e8ec2341d..05761715da7 100644
--- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoHashesTest.java
+++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchNoHashesTest.java
@@ -381,7 +381,7 @@ public class FhirResourceDaoR4SearchNoHashesTest extends BaseJpaR4Test {
IIdType moId = myMedicationRequestDao.create(mo, mySrd).getId().toUnqualifiedVersionless();
HttpServletRequest request = mock(HttpServletRequest.class);
- IBundleProvider resp = myPatientDao.patientTypeEverything(request, null, null, null, null, null, null, null, mySrd);
+ IBundleProvider resp = myPatientDao.patientTypeEverything(request, null, null, null, null, null, null, null, mySrd, null);
assertThat(toUnqualifiedVersionlessIds(resp), containsInAnyOrder(orgId, medId, patId, moId, patId2));
request = mock(HttpServletRequest.class);
diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderDstu3Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderDstu3Test.java
index 6053e227382..fe8c5d3d576 100644
--- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderDstu3Test.java
+++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/ResourceProviderDstu3Test.java
@@ -1621,9 +1621,9 @@ public class ResourceProviderDstu3Test extends BaseResourceProviderDstu3Test {
assertThat(ids.toString(), containsString("Patient/"));
assertThat(ids.toString(), containsString("Condition/"));
-
}
+
@Test
public void testEverythingPatientOperation() {
String methodName = "testEverythingOperation";
diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4Test.java
index 98fbd540de1..e6790ec70c4 100644
--- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4Test.java
+++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/r4/ResourceProviderR4Test.java
@@ -1,6 +1,7 @@
package ca.uhn.fhir.jpa.provider.r4;
import ca.uhn.fhir.jpa.api.config.DaoConfig;
+import ca.uhn.fhir.jpa.api.model.DaoMethodOutcome;
import ca.uhn.fhir.jpa.config.TestR4Config;
import ca.uhn.fhir.jpa.dao.data.ISearchDao;
import ca.uhn.fhir.jpa.entity.Search;
@@ -25,6 +26,7 @@ import ca.uhn.fhir.rest.client.api.IGenericClient;
import ca.uhn.fhir.rest.client.api.IHttpRequest;
import ca.uhn.fhir.rest.client.api.IHttpResponse;
import ca.uhn.fhir.rest.client.interceptor.CapturingInterceptor;
+import ca.uhn.fhir.rest.gclient.IGetPageUntyped;
import ca.uhn.fhir.rest.gclient.StringClientParam;
import ca.uhn.fhir.rest.param.DateRangeParam;
import ca.uhn.fhir.rest.param.NumberParam;
@@ -1741,7 +1743,6 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
int newSize = client.search().forResource(DocumentManifest.class).returnBundle(Bundle.class).execute().getEntry().size();
assertEquals(1, newSize - initialSize);
-
}
/**
@@ -1812,9 +1813,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
p.getManagingOrganization().setReferenceElement(orgId1);
IIdType patientId = myClient.create().resource(p).execute().getId().toUnqualifiedVersionless();
- Organization org2 = new Organization();
- org2.setName(methodName + "1");
- IIdType orgId2 = myClient.create().resource(org2).execute().getId().toUnqualifiedVersionless();
+ IIdType orgId2 = createOrganization(methodName, "1");
Device dev = new Device();
dev.setManufacturer(methodName);
@@ -1876,9 +1875,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
p.getManagingOrganization().setReferenceElement(orgId1);
IIdType patientId = myClient.create().resource(p).execute().getId().toUnqualifiedVersionless();
- Organization org2 = new Organization();
- org2.setName(methodName + "1");
- IIdType orgId2 = myClient.create().resource(org2).execute().getId().toUnqualifiedVersionless();
+ IIdType orgId2 = createOrganization(methodName, "1");
Device dev = new Device();
dev.setManufacturer(methodName);
@@ -2118,9 +2115,7 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
p.getManagingOrganization().setReferenceElement(orgId1);
IIdType patientId = myClient.create().resource(p).execute().getId().toUnqualifiedVersionless();
- Organization org2 = new Organization();
- org2.setName(methodName + "1");
- IIdType orgId2 = myClient.create().resource(org2).execute().getId().toUnqualifiedVersionless();
+ IIdType orgId2 = createOrganization(methodName, "1");
Device dev = new Device();
dev.setManufacturer(methodName);
@@ -2148,32 +2143,16 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
public void testEverythingPatientType() {
String methodName = "testEverythingPatientType";
- Organization o1 = new Organization();
- o1.setName(methodName + "1");
- IIdType o1Id = myClient.create().resource(o1).execute().getId().toUnqualifiedVersionless();
- Organization o2 = new Organization();
- o2.setName(methodName + "2");
- IIdType o2Id = myClient.create().resource(o2).execute().getId().toUnqualifiedVersionless();
+ IIdType o1Id = createOrganization(methodName, "1");
+ IIdType o2Id = createOrganization(methodName, "2");
- Patient p1 = new Patient();
- p1.addName().setFamily(methodName + "1");
- p1.getManagingOrganization().setReferenceElement(o1Id);
- IIdType p1Id = myClient.create().resource(p1).execute().getId().toUnqualifiedVersionless();
- Patient p2 = new Patient();
- p2.addName().setFamily(methodName + "2");
- p2.getManagingOrganization().setReferenceElement(o2Id);
- IIdType p2Id = myClient.create().resource(p2).execute().getId().toUnqualifiedVersionless();
+ IIdType p1Id = createPatientWithIndexAtOrganization(methodName, "1" , o1Id);
+ IIdType c1Id = createConditionForPatient(methodName, "1", p1Id);
- Condition c1 = new Condition();
- c1.getSubject().setReferenceElement(p1Id);
- IIdType c1Id = myClient.create().resource(c1).execute().getId().toUnqualifiedVersionless();
- Condition c2 = new Condition();
- c2.getSubject().setReferenceElement(p2Id);
- IIdType c2Id = myClient.create().resource(c2).execute().getId().toUnqualifiedVersionless();
+ IIdType p2Id = createPatientWithIndexAtOrganization(methodName, "2", o2Id);
+ IIdType c2Id = createConditionForPatient(methodName, "2", p2Id);
- Condition c3 = new Condition();
- c3.addIdentifier().setValue(methodName + "3");
- IIdType c3Id = myClient.create().resource(c3).execute().getId().toUnqualifiedVersionless();
+ IIdType c3Id = createConditionForPatient(methodName, "3", null);
Parameters output = myClient.operation().onType(Patient.class).named("everything").withNoParameters(Parameters.class).execute();
Bundle b = (Bundle) output.getParameter().get(0).getResource();
@@ -2185,6 +2164,179 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
assertThat(ids, not(containsInRelativeOrder(c3Id)));
}
+
+ @Test
+ public void testEverythingPatientTypeWithIdParameter() {
+ String methodName = "testEverythingPatientTypeWithIdParameter";
+
+ //Patient 1 stuff.
+ IIdType o1Id = createOrganization(methodName, "1");
+ IIdType p1Id = createPatientWithIndexAtOrganization(methodName, "1", o1Id);
+ IIdType c1Id = createConditionForPatient(methodName, "1", p1Id);
+
+ //Patient 2 stuff.
+ IIdType o2Id = createOrganization(methodName, "2");
+ IIdType p2Id = createPatientWithIndexAtOrganization(methodName, "2", o2Id);
+ IIdType c2Id = createConditionForPatient(methodName, "2", p2Id);
+
+ //Patient 3 stuff.
+ IIdType o3Id = createOrganization(methodName, "3");
+ IIdType p3Id = createPatientWithIndexAtOrganization(methodName, "3", o3Id);
+ IIdType c3Id = createConditionForPatient(methodName, "3", p3Id);
+
+ //Patient 4 stuff.
+ IIdType o4Id = createOrganization(methodName, "4");
+ IIdType p4Id = createPatientWithIndexAtOrganization(methodName, "4", o4Id);
+ IIdType c4Id = createConditionForPatient(methodName, "4", p4Id);
+
+ //No Patient Stuff
+ IIdType c5Id = createConditionForPatient(methodName, "4", null);
+
+
+ {
+ //Test for only one patient
+ Parameters parameters = new Parameters();
+ parameters.addParameter("_id", p1Id.getIdPart());
+
+ Parameters output = myClient.operation().onType(Patient.class).named("everything").withParameters(parameters).execute();
+ Bundle b = (Bundle) output.getParameter().get(0).getResource();
+
+ assertEquals(BundleType.SEARCHSET, b.getType());
+ List ids = toUnqualifiedVersionlessIds(b);
+
+ assertThat(ids, containsInAnyOrder(o1Id, p1Id, c1Id));
+ assertThat(ids, not((o2Id)));
+ assertThat(ids, not(contains(c2Id)));
+ assertThat(ids, not(contains(p2Id)));
+ }
+
+ {
+ // Test for Patient 1 and 2
+ // e.g. _id=1&_id=2
+ Parameters parameters = new Parameters();
+ parameters.addParameter("_id", p1Id.getIdPart());
+ parameters.addParameter("_id", p2Id.getIdPart());
+
+ Parameters output = myClient.operation().onType(Patient.class).named("everything").withParameters(parameters).execute();
+ Bundle b = (Bundle) output.getParameter().get(0).getResource();
+
+ assertEquals(BundleType.SEARCHSET, b.getType());
+ List ids = toUnqualifiedVersionlessIds(b);
+
+ assertThat(ids, containsInAnyOrder(o1Id, p1Id, c1Id, o2Id, c2Id, p2Id));
+ }
+
+ {
+ // Test for both patients using orList
+ // e.g. _id=1,2
+ Parameters parameters = new Parameters();
+ parameters.addParameter("_id", p1Id.getIdPart() + "," + p2Id.getIdPart());
+
+ Parameters output = myClient.operation().onType(Patient.class).named("everything").withParameters(parameters).execute();
+ Bundle b = (Bundle) output.getParameter().get(0).getResource();
+
+ assertEquals(BundleType.SEARCHSET, b.getType());
+ List ids = toUnqualifiedVersionlessIds(b);
+
+ assertThat(ids, containsInAnyOrder(o1Id, p1Id, c1Id, o2Id, c2Id, p2Id));
+ assertThat(ids, not(contains(c5Id)));
+ }
+
+ {
+ // Test combining 2 or-listed params
+ // e.g. _id=1,2&_id=3,4
+ Parameters parameters = new Parameters();
+ parameters.addParameter("_id", "Patient/" +p1Id.getIdPart() + "," + p2Id.getIdPart());
+ parameters.addParameter("_id", p3Id.getIdPart() + "," + p4Id.getIdPart());
+ parameters.addParameter(new Parameters.ParametersParameterComponent().setName("_count").setValue(new UnsignedIntType(20)));
+
+ Parameters output = myClient.operation().onType(Patient.class).named("everything").withParameters(parameters).execute();
+ Bundle b = (Bundle) output.getParameter().get(0).getResource();
+
+ assertEquals(BundleType.SEARCHSET, b.getType());
+ List ids = toUnqualifiedVersionlessIds(b);
+
+ assertThat(ids, containsInAnyOrder(o1Id, p1Id, c1Id, o2Id, c2Id, p2Id, p3Id, o3Id, c3Id, p4Id, c4Id, o4Id));
+ assertThat(ids, not(contains(c5Id)));
+ }
+
+ {
+ // Test paging works.
+ // There are 12 results, lets make 2 pages of 6.
+ Parameters parameters = new Parameters();
+ parameters.addParameter("_id", "Patient/" +p1Id.getIdPart() + "," + p2Id.getIdPart());
+ parameters.addParameter("_id", p3Id.getIdPart() + "," + p4Id.getIdPart());
+ parameters.addParameter(new Parameters.ParametersParameterComponent().setName("_count").setValue(new UnsignedIntType(6)));
+
+ Parameters output = myClient.operation().onType(Patient.class).named("everything").withParameters(parameters).execute();
+ Bundle bundle = (Bundle) output.getParameter().get(0).getResource();
+
+ String next = bundle.getLink("next").getUrl();
+ Bundle nextBundle= myClient.loadPage().byUrl(next).andReturnBundle(Bundle.class).execute();
+ assertEquals(BundleType.SEARCHSET, bundle.getType());
+
+ assertThat(bundle.getEntry(), hasSize(6));
+ assertThat(nextBundle.getEntry(), hasSize(6));
+
+ List firstBundle = toUnqualifiedVersionlessIds(bundle);
+ List secondBundle = toUnqualifiedVersionlessIds(nextBundle);
+ List allresults = new ArrayList<>();
+ allresults.addAll(firstBundle);
+ allresults.addAll(secondBundle);
+
+ assertThat(allresults, containsInAnyOrder(o1Id, p1Id, c1Id, o2Id, c2Id, p2Id, p3Id, o3Id, c3Id, p4Id, c4Id, o4Id));
+ assertThat(allresults, not(contains(c5Id)));
+ }
+ }
+
+ @Test
+ public void testEverythingPatientWorksWithForcedId() {
+ String methodName = "testEverythingPatientType";
+
+ //Given
+ IIdType o1Id = createOrganization(methodName, "1");
+ //Patient ABC stuff.
+ Patient patientABC = new Patient();
+ patientABC.setId("abc");
+ patientABC.setManagingOrganization(new Reference(o1Id));
+ IIdType pabcId = myPatientDao.update(patientABC).getId().toUnqualifiedVersionless();
+ IIdType c1Id = createConditionForPatient(methodName, "1", pabcId);
+
+ //Patient DEF stuff.
+ IIdType o2Id = createOrganization(methodName, "2");
+ Patient patientDEF = new Patient();
+ patientDEF.setId("def");
+ patientDEF.setManagingOrganization(new Reference(o2Id));
+ IIdType pdefId= myPatientDao.update(patientDEF).getId().toUnqualifiedVersionless();
+ IIdType c2Id = createConditionForPatient(methodName, "2", pdefId);
+
+ IIdType c3Id = createConditionForPatient(methodName, "2", null);
+
+ {
+ Parameters parameters = new Parameters();
+ parameters.addParameter("_id", "Patient/abc,Patient/def");
+
+ //When
+ Parameters output = myClient.operation().onType(Patient.class).named("everything").withParameters(parameters).execute();
+ Bundle b = (Bundle) output.getParameter().get(0).getResource();
+
+ //Then
+ assertEquals(BundleType.SEARCHSET, b.getType());
+ List ids = toUnqualifiedVersionlessIds(b);
+ assertThat(ids, containsInAnyOrder(o1Id, pabcId, c1Id, pdefId, o2Id, c2Id));
+ assertThat(ids, not(contains(c3Id)));
+ }
+
+
+
+ }
+
+ private IIdType createOrganization(String methodName, String s) {
+ Organization o1 = new Organization();
+ o1.setName(methodName + s);
+ return myClient.create().resource(o1).execute().getId().toUnqualifiedVersionless();
+ }
+
// retest
@Test
public void testEverythingPatientWithLastUpdatedAndSort() throws Exception {
@@ -6462,4 +6614,22 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test {
}
+ public IIdType createPatientWithIndexAtOrganization(String theMethodName, String theIndex, IIdType theOrganizationId) {
+ Patient p1 = new Patient();
+ p1.addName().setFamily(theMethodName + theIndex);
+ p1.getManagingOrganization().setReferenceElement(theOrganizationId);
+ IIdType p1Id = myClient.create().resource(p1).execute().getId().toUnqualifiedVersionless();
+ return p1Id;
+ }
+
+ public IIdType createConditionForPatient(String theMethodName, String theIndex, IIdType thePatientId) {
+ Condition c = new Condition();
+ c.addIdentifier().setValue(theMethodName + theIndex);
+ if (thePatientId != null) {
+ c.getSubject().setReferenceElement(thePatientId);
+ }
+ IIdType cId = myClient.create().resource(c).execute().getId().toUnqualifiedVersionless();
+ return cId;
+ }
+
}
diff --git a/hapi-fhir-jpaserver-cql/pom.xml b/hapi-fhir-jpaserver-cql/pom.xml
index 7a78e59a35c..25692b78c47 100644
--- a/hapi-fhir-jpaserver-cql/pom.xml
+++ b/hapi-fhir-jpaserver-cql/pom.xml
@@ -7,7 +7,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-mdm/pom.xml b/hapi-fhir-jpaserver-mdm/pom.xml
index 4590023a107..39f12f4b4ef 100644
--- a/hapi-fhir-jpaserver-mdm/pom.xml
+++ b/hapi-fhir-jpaserver-mdm/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-model/pom.xml b/hapi-fhir-jpaserver-model/pom.xml
index 5aab9996f95..577a6ac1b9e 100644
--- a/hapi-fhir-jpaserver-model/pom.xml
+++ b/hapi-fhir-jpaserver-model/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-searchparam/pom.xml b/hapi-fhir-jpaserver-searchparam/pom.xml
index 5fabf865512..88121ba2772 100755
--- a/hapi-fhir-jpaserver-searchparam/pom.xml
+++ b/hapi-fhir-jpaserver-searchparam/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-subscription/pom.xml b/hapi-fhir-jpaserver-subscription/pom.xml
index f9786000b79..2b76fb15d0f 100644
--- a/hapi-fhir-jpaserver-subscription/pom.xml
+++ b/hapi-fhir-jpaserver-subscription/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-test-utilities/pom.xml b/hapi-fhir-jpaserver-test-utilities/pom.xml
index 7a76a819782..b1ee321a477 100644
--- a/hapi-fhir-jpaserver-test-utilities/pom.xml
+++ b/hapi-fhir-jpaserver-test-utilities/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml
index 5b153bbe166..9e74e685e5e 100644
--- a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml
+++ b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-server-mdm/pom.xml b/hapi-fhir-server-mdm/pom.xml
index 0e644957122..2d8ca2ce9dd 100644
--- a/hapi-fhir-server-mdm/pom.xml
+++ b/hapi-fhir-server-mdm/pom.xml
@@ -7,7 +7,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-server-openapi/pom.xml b/hapi-fhir-server-openapi/pom.xml
index 42abfc7bea8..83dea2a82f5 100644
--- a/hapi-fhir-server-openapi/pom.xml
+++ b/hapi-fhir-server-openapi/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-server/pom.xml b/hapi-fhir-server/pom.xml
index 5432e34a868..35374fb5742 100644
--- a/hapi-fhir-server/pom.xml
+++ b/hapi-fhir-server/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml
index c154f1259da..26e3accc0e7 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml
index 8f8811fe54c..a7611f4e20f 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir-spring-boot-samples
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
hapi-fhir-spring-boot-sample-client-apache
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml
index 80094ca6e20..95e6c77ff2b 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir-spring-boot-samples
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
hapi-fhir-spring-boot-sample-client-okhttp
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml
index 73105a4f627..1a4be12362d 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir-spring-boot-samples
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
hapi-fhir-spring-boot-sample-server-jersey
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml
index 4b3ab491c93..2b596c473aa 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir-spring-boot
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
hapi-fhir-spring-boot-samples
diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml
index 827773fe064..1d83c441811 100644
--- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml
+++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-spring-boot/pom.xml b/hapi-fhir-spring-boot/pom.xml
index eb7904c93f5..02b7c9c70ab 100644
--- a/hapi-fhir-spring-boot/pom.xml
+++ b/hapi-fhir-spring-boot/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-sql-migrate/pom.xml b/hapi-fhir-sql-migrate/pom.xml
index 01ee02da174..1915e0e2fec 100644
--- a/hapi-fhir-sql-migrate/pom.xml
+++ b/hapi-fhir-sql-migrate/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage/pom.xml b/hapi-fhir-storage/pom.xml
index 44d221a18d9..47858af060e 100644
--- a/hapi-fhir-storage/pom.xml
+++ b/hapi-fhir-storage/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirResourceDaoPatient.java b/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirResourceDaoPatient.java
index 072d84e1da2..3094dad08cf 100644
--- a/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirResourceDaoPatient.java
+++ b/hapi-fhir-storage/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirResourceDaoPatient.java
@@ -5,6 +5,7 @@ import ca.uhn.fhir.rest.api.server.IBundleProvider;
import ca.uhn.fhir.rest.api.server.RequestDetails;
import ca.uhn.fhir.rest.param.DateRangeParam;
import ca.uhn.fhir.rest.param.StringAndListParam;
+import ca.uhn.fhir.rest.param.TokenOrListParam;
import org.hl7.fhir.instance.model.api.IBaseResource;
import org.hl7.fhir.instance.model.api.IIdType;
import org.hl7.fhir.instance.model.api.IPrimitiveType;
@@ -35,7 +36,7 @@ public interface IFhirResourceDaoPatient extends IFhirR
IBundleProvider patientInstanceEverything(HttpServletRequest theServletRequest, IIdType theId, IPrimitiveType theCount, IPrimitiveType theOffset, DateRangeParam theLastUpdate, SortSpec theSort, StringAndListParam theContent, StringAndListParam theNarrative, StringAndListParam theFilter, RequestDetails theRequestDetails);
- IBundleProvider patientTypeEverything(HttpServletRequest theServletRequest, IPrimitiveType theCount, IPrimitiveType theOffset, DateRangeParam theLastUpdated, SortSpec theSortSpec, StringAndListParam theContent, StringAndListParam theNarrative, StringAndListParam theFilter, RequestDetails theRequestDetails);
+ IBundleProvider patientTypeEverything(HttpServletRequest theServletRequest, IPrimitiveType theCount, IPrimitiveType theOffset, DateRangeParam theLastUpdated, SortSpec theSortSpec, StringAndListParam theContent, StringAndListParam theNarrative, StringAndListParam theFilter, RequestDetails theRequestDetails, TokenOrListParam theId);
}
diff --git a/hapi-fhir-structures-dstu2.1/pom.xml b/hapi-fhir-structures-dstu2.1/pom.xml
index 27d0d3e4662..6d15280a911 100644
--- a/hapi-fhir-structures-dstu2.1/pom.xml
+++ b/hapi-fhir-structures-dstu2.1/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-dstu2/pom.xml b/hapi-fhir-structures-dstu2/pom.xml
index 592fdade7ef..338e7f30005 100644
--- a/hapi-fhir-structures-dstu2/pom.xml
+++ b/hapi-fhir-structures-dstu2/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-dstu3/pom.xml b/hapi-fhir-structures-dstu3/pom.xml
index 20cb535ef91..5936bc83a7c 100644
--- a/hapi-fhir-structures-dstu3/pom.xml
+++ b/hapi-fhir-structures-dstu3/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-hl7org-dstu2/pom.xml b/hapi-fhir-structures-hl7org-dstu2/pom.xml
index ed714304624..2b91109904b 100644
--- a/hapi-fhir-structures-hl7org-dstu2/pom.xml
+++ b/hapi-fhir-structures-hl7org-dstu2/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-r4/pom.xml b/hapi-fhir-structures-r4/pom.xml
index f5e4b00dfab..9c66b58c4ed 100644
--- a/hapi-fhir-structures-r4/pom.xml
+++ b/hapi-fhir-structures-r4/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-r5/pom.xml b/hapi-fhir-structures-r5/pom.xml
index 4d7d372dceb..b7e0a379ed0 100644
--- a/hapi-fhir-structures-r5/pom.xml
+++ b/hapi-fhir-structures-r5/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-test-utilities/pom.xml b/hapi-fhir-test-utilities/pom.xml
index b19c0a5c383..59793c806c0 100644
--- a/hapi-fhir-test-utilities/pom.xml
+++ b/hapi-fhir-test-utilities/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-testpage-overlay/pom.xml b/hapi-fhir-testpage-overlay/pom.xml
index d65f9f501a3..ebc456d9fd6 100644
--- a/hapi-fhir-testpage-overlay/pom.xml
+++ b/hapi-fhir-testpage-overlay/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-validation-resources-dstu2.1/pom.xml b/hapi-fhir-validation-resources-dstu2.1/pom.xml
index 0a9a9935152..9b34f51547c 100644
--- a/hapi-fhir-validation-resources-dstu2.1/pom.xml
+++ b/hapi-fhir-validation-resources-dstu2.1/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation-resources-dstu2/pom.xml b/hapi-fhir-validation-resources-dstu2/pom.xml
index 34939357e60..9aaaf263a41 100644
--- a/hapi-fhir-validation-resources-dstu2/pom.xml
+++ b/hapi-fhir-validation-resources-dstu2/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation-resources-dstu3/pom.xml b/hapi-fhir-validation-resources-dstu3/pom.xml
index d7f597439c8..fd45e42905b 100644
--- a/hapi-fhir-validation-resources-dstu3/pom.xml
+++ b/hapi-fhir-validation-resources-dstu3/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation-resources-r4/pom.xml b/hapi-fhir-validation-resources-r4/pom.xml
index f12d0188e10..b5026ad07b2 100644
--- a/hapi-fhir-validation-resources-r4/pom.xml
+++ b/hapi-fhir-validation-resources-r4/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation-resources-r5/pom.xml b/hapi-fhir-validation-resources-r5/pom.xml
index c03e6fe433e..f0f04833cc9 100644
--- a/hapi-fhir-validation-resources-r5/pom.xml
+++ b/hapi-fhir-validation-resources-r5/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation/pom.xml b/hapi-fhir-validation/pom.xml
index 3b040540713..73738c69e4d 100644
--- a/hapi-fhir-validation/pom.xml
+++ b/hapi-fhir-validation/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-tinder-plugin/pom.xml b/hapi-tinder-plugin/pom.xml
index e6ef6f1f41c..e7373d8297c 100644
--- a/hapi-tinder-plugin/pom.xml
+++ b/hapi-tinder-plugin/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../pom.xml
@@ -58,37 +58,37 @@
ca.uhn.hapi.fhir
hapi-fhir-structures-dstu3
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
ca.uhn.hapi.fhir
hapi-fhir-structures-hl7org-dstu2
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
ca.uhn.hapi.fhir
hapi-fhir-structures-r4
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
ca.uhn.hapi.fhir
hapi-fhir-structures-r5
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
ca.uhn.hapi.fhir
hapi-fhir-validation-resources-dstu2
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
ca.uhn.hapi.fhir
hapi-fhir-validation-resources-dstu3
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
ca.uhn.hapi.fhir
hapi-fhir-validation-resources-r4
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
org.apache.velocity
diff --git a/hapi-tinder-test/pom.xml b/hapi-tinder-test/pom.xml
index bbbf8e21171..3e08df9d745 100644
--- a/hapi-tinder-test/pom.xml
+++ b/hapi-tinder-test/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../pom.xml
diff --git a/pom.xml b/pom.xml
index 084d1fac5c4..63e2d24c24e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-fhir
pom
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
HAPI-FHIR
An open-source implementation of the FHIR specification in Java.
https://hapifhir.io
diff --git a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml
index a53d32c11c2..2c250892bad 100644
--- a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml
+++ b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../../pom.xml
diff --git a/tests/hapi-fhir-base-test-mindeps-client/pom.xml b/tests/hapi-fhir-base-test-mindeps-client/pom.xml
index 19483111b52..86ee770ac17 100644
--- a/tests/hapi-fhir-base-test-mindeps-client/pom.xml
+++ b/tests/hapi-fhir-base-test-mindeps-client/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../../pom.xml
diff --git a/tests/hapi-fhir-base-test-mindeps-server/pom.xml b/tests/hapi-fhir-base-test-mindeps-server/pom.xml
index 4c3b338a5b9..7e5f43d4fd1 100644
--- a/tests/hapi-fhir-base-test-mindeps-server/pom.xml
+++ b/tests/hapi-fhir-base-test-mindeps-server/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 5.6.0-PRE8-SNAPSHOT
+ 5.6.0-PRE9-SNAPSHOT
../../pom.xml