diff --git a/hapi-deployable-pom/pom.xml b/hapi-deployable-pom/pom.xml
index 679ff78491f..e9d55ae1944 100644
--- a/hapi-deployable-pom/pom.xml
+++ b/hapi-deployable-pom/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-android/pom.xml b/hapi-fhir-android/pom.xml
index 89c2f61a330..54c9d3e9e5b 100644
--- a/hapi-fhir-android/pom.xml
+++ b/hapi-fhir-android/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-base/pom.xml b/hapi-fhir-base/pom.xml
index d5802222537..5a2c656cc57 100644
--- a/hapi-fhir-base/pom.xml
+++ b/hapi-fhir-base/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-bom/pom.xml b/hapi-fhir-bom/pom.xml
index bd01e1093be..d1d6c5e37f2 100644
--- a/hapi-fhir-bom/pom.xml
+++ b/hapi-fhir-bom/pom.xml
@@ -4,7 +4,7 @@
4.0.0
ca.uhn.hapi.fhir
hapi-fhir-bom
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
pom
HAPI FHIR BOM
@@ -12,7 +12,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-checkstyle/pom.xml b/hapi-fhir-checkstyle/pom.xml
index 3a1bed6568a..a7189caa9e5 100644
--- a/hapi-fhir-checkstyle/pom.xml
+++ b/hapi-fhir-checkstyle/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../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 fb87e32e19b..d7af4d92d1b 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
- 8.5.8-SNAPSHOT
+ 8.5.9-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 a7ad262cea2..516d8566214 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
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-cli/pom.xml b/hapi-fhir-cli/pom.xml
index d8ba38a3a8f..af4a1b3368a 100644
--- a/hapi-fhir-cli/pom.xml
+++ b/hapi-fhir-cli/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-client-apache-http5/pom.xml b/hapi-fhir-client-apache-http5/pom.xml
index 8c46eb2f5d9..cec442d3711 100644
--- a/hapi-fhir-client-apache-http5/pom.xml
+++ b/hapi-fhir-client-apache-http5/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-client-okhttp/pom.xml b/hapi-fhir-client-okhttp/pom.xml
index e4e6a31ff03..8fb698a4522 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
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-client/pom.xml b/hapi-fhir-client/pom.xml
index e4f1d87d2c2..0648ea91b72 100644
--- a/hapi-fhir-client/pom.xml
+++ b/hapi-fhir-client/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-converter/pom.xml b/hapi-fhir-converter/pom.xml
index a998003fafd..be917c96633 100644
--- a/hapi-fhir-converter/pom.xml
+++ b/hapi-fhir-converter/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-dist/pom.xml b/hapi-fhir-dist/pom.xml
index 4e6a187e41b..a294dcf213f 100644
--- a/hapi-fhir-dist/pom.xml
+++ b/hapi-fhir-dist/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-docs/pom.xml b/hapi-fhir-docs/pom.xml
index 0ac3501278a..e2c4e577e4f 100644
--- a/hapi-fhir-docs/pom.xml
+++ b/hapi-fhir-docs/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/8_6_0/7296-bulk-export-fails-with-string-resource-ids.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/8_6_0/7296-bulk-export-fails-with-string-resource-ids.yaml
new file mode 100644
index 00000000000..b274c7a3024
--- /dev/null
+++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/8_6_0/7296-bulk-export-fails-with-string-resource-ids.yaml
@@ -0,0 +1,5 @@
+---
+type: fix
+issue: 7296
+title: "Fixed an issue in bulk export with _includeHistory=true where history records failed to export for resources with client-assigned string IDs. History
+ is now gathered using PIDs rather than forced IDs."
diff --git a/hapi-fhir-jacoco/pom.xml b/hapi-fhir-jacoco/pom.xml
index b787bd10111..3d190190585 100644
--- a/hapi-fhir-jacoco/pom.xml
+++ b/hapi-fhir-jacoco/pom.xml
@@ -11,7 +11,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jaxrsserver-base/pom.xml b/hapi-fhir-jaxrsserver-base/pom.xml
index 223d60c8550..a7dfc93b6c5 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
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpa-hibernate-services/pom.xml b/hapi-fhir-jpa-hibernate-services/pom.xml
index 45b6941f7c2..fdd21f7a1c2 100644
--- a/hapi-fhir-jpa-hibernate-services/pom.xml
+++ b/hapi-fhir-jpa-hibernate-services/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpa/pom.xml b/hapi-fhir-jpa/pom.xml
index e2086c71153..769ec1ac97d 100644
--- a/hapi-fhir-jpa/pom.xml
+++ b/hapi-fhir-jpa/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 8.5.8-SNAPSHOT
+ 8.5.9-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 88128e1bfed..f1185a849ea 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
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/JpaConfig.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/JpaConfig.java
index c83230f0b8d..81778c0bc24 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/JpaConfig.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/config/JpaConfig.java
@@ -706,7 +706,7 @@ public PersistedJpaSearchFirstPageBundleProvider newPersistedJpaSearchFirstPageB
@Scope("prototype")
public PersistedJpaIdSearchBundleProvider newPersistedJpaIdSearchBundleProvider(
String theResourceType,
- List theResourceIds,
+ List> theResourceIds,
RequestPartitionId thePartitionId,
@Nullable Date theRangeStartInclusive,
@Nonnull Date theRangeEndInclusive) {
@@ -849,7 +849,7 @@ public HistoryBuilder newHistoryBuilder(
@Scope("prototype")
public HistoryBuilder newHistoryBuilderWithIds(
@Nonnull String theResourceType,
- @Nonnull List theResourceIds,
+ @Nonnull List> theResourceIds,
@Nullable Date theRangeStartInclusive,
@Nonnull Date theRangeEndInclusive) {
return new HistoryBuilder(theResourceType, theResourceIds, theRangeStartInclusive, theRangeEndInclusive);
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/HistoryBuilder.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/HistoryBuilder.java
index 681aaff8808..004408ac577 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/HistoryBuilder.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/HistoryBuilder.java
@@ -28,7 +28,7 @@
import ca.uhn.fhir.jpa.model.config.PartitionSettings;
import ca.uhn.fhir.jpa.model.dao.JpaPid;
import ca.uhn.fhir.jpa.model.entity.ResourceHistoryTable;
-import ca.uhn.fhir.model.primitive.IdDt;
+import ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId;
import ca.uhn.fhir.rest.param.HistorySearchStyleEnum;
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
import com.google.common.collect.ImmutableListMultimap;
@@ -69,7 +69,7 @@ public class HistoryBuilder {
private static final Logger ourLog = LoggerFactory.getLogger(HistoryBuilder.class);
private final String myResourceType;
private final JpaPid myResourceId;
- private final List myResourceIds;
+ private final List> myResourceIds;
private final Date myRangeStartInclusive;
private final Date myRangeEndInclusive;
@@ -108,7 +108,7 @@ public HistoryBuilder(
*/
public HistoryBuilder(
@Nonnull String theResourceType,
- @Nonnull List theResourceIds,
+ @Nonnull List> theResourceIds,
@Nullable Date theRangeStartInclusive,
@Nonnull Date theRangeEndInclusive) {
myResourceType = theResourceType;
@@ -275,14 +275,12 @@ private void addPredicatesToQuery(
}
private void addResourceIdsFiltering(
- @Nonnull List theResourceIds,
+ @Nonnull List> theResourceIds,
RequestPartitionId thePartitionId,
Root theFrom,
List predicates) {
- List ids = theResourceIds.stream()
- .map(id -> new IdDt(id).getIdPartAsLong())
- .toList();
+ List ids = theResourceIds.stream().map(id -> (Long) id.getId()).toList();
// Create a predicate to filter by resource IDs
if (!ids.isEmpty()) {
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/HistoryBuilderFactory.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/HistoryBuilderFactory.java
index 2d2e79b21a0..a2a7b0b1b83 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/HistoryBuilderFactory.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/HistoryBuilderFactory.java
@@ -21,6 +21,7 @@
import ca.uhn.fhir.jpa.config.JpaConfig;
import ca.uhn.fhir.jpa.model.dao.JpaPid;
+import ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId;
import jakarta.annotation.Nonnull;
import jakarta.annotation.Nullable;
import org.springframework.beans.factory.annotation.Autowired;
@@ -49,7 +50,7 @@ public HistoryBuilder newHistoryBuilder(
public HistoryBuilder newHistoryBuilder(
@Nonnull String theResourceType,
- @Nonnull List theResourceIds,
+ @Nonnull List> theResourceIds,
@Nullable Date theRangeStartInclusive,
@Nonnull Date theRangeEndInclusive) {
return (HistoryBuilder) myApplicationContext.getBean(
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/JpaBulkDataExportHistoryHelper.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/JpaBulkDataExportHistoryHelper.java
index 2330bd8da88..d8b26b61989 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/JpaBulkDataExportHistoryHelper.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/JpaBulkDataExportHistoryHelper.java
@@ -23,6 +23,7 @@
import ca.uhn.fhir.jpa.search.PersistedJpaBundleProviderFactory;
import ca.uhn.fhir.rest.api.server.IBundleProvider;
import ca.uhn.fhir.rest.api.server.bulk.IBulkDataExportHistoryHelper;
+import ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId;
import jakarta.annotation.Nonnull;
import jakarta.annotation.Nullable;
import org.springframework.beans.factory.annotation.Autowired;
@@ -38,7 +39,7 @@ public class JpaBulkDataExportHistoryHelper implements IBulkDataExportHistoryHel
@Override
public IBundleProvider fetchHistoryForResourceIds(
@Nonnull String theResourceType,
- @Nonnull List theIdList,
+ @Nonnull List> theIdList,
RequestPartitionId theRequestPartitionId,
@Nullable Date theRangeStartInclusive,
@Nonnull Date theRangeEndInclusive) {
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java
index 5ac5156124b..7e5b3901dfd 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/index/IdHelperService.java
@@ -667,6 +667,16 @@ public JpaPid newPid(Object thePid, Integer thePartitionId) {
return JpaPid.fromId((Long) thePid, thePartitionId);
}
+ /**
+ * Creates a new JpaPid from partition, PK, and resource name.
+ * The PK is passed as a String here, but this must parse as a long. Do not mistake this for the FHIR Id
+ * - aka forced-id/client-assigned-id.
+ *
+ * @param thePartitionId The partition ID
+ * @param thePid The persistent ID as a string
+ * @param theResourceName The resource type name
+ * @return A JpaPid with the associated resource ID populated
+ */
@Override
public JpaPid newPidFromStringIdAndResourceName(Integer thePartitionId, String thePid, String theResourceName) {
JpaPid retVal = JpaPid.fromId(Long.parseLong(thePid), thePartitionId);
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProviderFactory.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProviderFactory.java
index c506cde54b3..9e507587d78 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProviderFactory.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProviderFactory.java
@@ -29,6 +29,7 @@
import ca.uhn.fhir.jpa.search.builder.tasks.SearchTask;
import ca.uhn.fhir.rest.api.server.IBundleProvider;
import ca.uhn.fhir.rest.api.server.RequestDetails;
+import ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId;
import ca.uhn.fhir.rest.param.HistorySearchStyleEnum;
import jakarta.annotation.Nonnull;
import jakarta.annotation.Nullable;
@@ -124,7 +125,7 @@ public IBundleProvider history(
*/
public IBundleProvider historyFromResourceIds(
String theResourceType,
- @Nullable List theResourceIds,
+ @Nullable List> theResourceIds,
RequestPartitionId theRequestPartitionId,
@Nullable Date theRangeStartInclusive,
@Nonnull Date theRangeEndInclusive) {
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaIdSearchBundleProvider.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaIdSearchBundleProvider.java
index 3c4f65bd11f..12bfb41fde2 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaIdSearchBundleProvider.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaIdSearchBundleProvider.java
@@ -27,6 +27,7 @@
import ca.uhn.fhir.jpa.model.entity.ResourceHistoryTable;
import ca.uhn.fhir.model.primitive.InstantDt;
import ca.uhn.fhir.rest.api.server.IBundleProvider;
+import ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId;
import ca.uhn.fhir.rest.server.method.ResponsePage;
import jakarta.annotation.Nonnull;
import jakarta.annotation.Nullable;
@@ -50,7 +51,7 @@ public class PersistedJpaIdSearchBundleProvider implements IBundleProvider {
private final String myUuid;
private final @Nonnull String myResourceType;
- private final @Nonnull List myResourceIds;
+ private final @Nonnull List> myResourceIds;
private final RequestPartitionId myPartitionId;
private final Date myRangeStartInclusive;
private final @Nonnull Date myRangeEndInclusive;
@@ -66,7 +67,7 @@ public class PersistedJpaIdSearchBundleProvider implements IBundleProvider {
public PersistedJpaIdSearchBundleProvider(
@Nonnull String theResourceType,
- @Nonnull List theResourceIds,
+ @Nonnull List> theResourceIds,
RequestPartitionId thePartitionId,
@Nullable Date theRangeStartInclusive,
@Nonnull Date theRangeEndInclusive) {
diff --git a/hapi-fhir-jpaserver-elastic-test-utilities/pom.xml b/hapi-fhir-jpaserver-elastic-test-utilities/pom.xml
index 9b56a25d24f..0488443e899 100644
--- a/hapi-fhir-jpaserver-elastic-test-utilities/pom.xml
+++ b/hapi-fhir-jpaserver-elastic-test-utilities/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-hfql/pom.xml b/hapi-fhir-jpaserver-hfql/pom.xml
index eb2f54df9e3..d7f113da777 100644
--- a/hapi-fhir-jpaserver-hfql/pom.xml
+++ b/hapi-fhir-jpaserver-hfql/pom.xml
@@ -3,7 +3,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-ips/pom.xml b/hapi-fhir-jpaserver-ips/pom.xml
index 01b4ef820c2..90872888c6f 100644
--- a/hapi-fhir-jpaserver-ips/pom.xml
+++ b/hapi-fhir-jpaserver-ips/pom.xml
@@ -3,7 +3,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-mdm/pom.xml b/hapi-fhir-jpaserver-mdm/pom.xml
index f76af6ddcfe..b4d49c247b2 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
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-model/pom.xml b/hapi-fhir-jpaserver-model/pom.xml
index 1197c941cdf..93e882625d5 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
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-searchparam/pom.xml b/hapi-fhir-jpaserver-searchparam/pom.xml
index eb61dadfe0e..85272b6aedb 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
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-subscription/pom.xml b/hapi-fhir-jpaserver-subscription/pom.xml
index 2c5fe8d3fa3..dc241ec57a7 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
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-test-dstu2/pom.xml b/hapi-fhir-jpaserver-test-dstu2/pom.xml
index 04bdb8432e6..0b415a3a87f 100644
--- a/hapi-fhir-jpaserver-test-dstu2/pom.xml
+++ b/hapi-fhir-jpaserver-test-dstu2/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-test-dstu3/pom.xml b/hapi-fhir-jpaserver-test-dstu3/pom.xml
index 2ddc185a44a..bb5f234daa3 100644
--- a/hapi-fhir-jpaserver-test-dstu3/pom.xml
+++ b/hapi-fhir-jpaserver-test-dstu3/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-test-r4/pom.xml b/hapi-fhir-jpaserver-test-r4/pom.xml
index 703deaea669..6e020d27c1b 100644
--- a/hapi-fhir-jpaserver-test-r4/pom.xml
+++ b/hapi-fhir-jpaserver-test-r4/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/bulk/BulkExportUseCaseTest.java b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/bulk/BulkExportUseCaseTest.java
index 986796df553..06785e6071c 100644
--- a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/bulk/BulkExportUseCaseTest.java
+++ b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/bulk/BulkExportUseCaseTest.java
@@ -103,7 +103,7 @@
import static org.junit.jupiter.api.Assertions.fail;
-public class BulkExportUseCaseTest extends BaseResourceProviderR4Test {
+class BulkExportUseCaseTest extends BaseResourceProviderR4Test {
private static final Logger ourLog = LoggerFactory.getLogger(BulkExportUseCaseTest.class);
private static final String TEST_PATIENT_EID_SYS = "http://patient-eid-sys";
@@ -126,16 +126,16 @@ public class BulkExportUseCaseTest extends BaseResourceProviderR4Test {
private MdmExpandersHolder myMdmExpandersHolder;
@BeforeEach
- public void beforeEach() {
+ void beforeEach() {
myStorageSettings.setJobFastTrackingEnabled(false);
}
@Nested
- public class SpecConformanceTests {
+ class SpecConformanceTests {
@Test
- public void testBulkExportJobsAreMetaTaggedWithJobIdAndExportId() throws IOException {
+ void testBulkExportJobsAreMetaTaggedWithJobIdAndExportId() throws IOException {
//Given a patient exists
Patient p = new Patient();
p.setId("Pat-1");
@@ -159,8 +159,8 @@ public void testBulkExportJobsAreMetaTaggedWithJobIdAndExportId() throws IOExcep
BulkExportResponseJson result = JsonUtil.deserialize(responseContent, BulkExportResponseJson.class);
assertEquals(expectedOriginalUrl, result.getRequest());
assertThat(result.getOutput()).isNotEmpty();
- String binary_url = result.getOutput().get(0).getUrl();
- Binary binaryResource = myClient.read().resource(Binary.class).withUrl(binary_url).execute();
+ String binaryUrl = result.getOutput().get(0).getUrl();
+ Binary binaryResource = myClient.read().resource(Binary.class).withUrl(binaryUrl).execute();
List extension = binaryResource.getMeta().getExtension();
assertThat(extension).hasSize(3);
@@ -177,7 +177,7 @@ public void testBulkExportJobsAreMetaTaggedWithJobIdAndExportId() throws IOExcep
}
@Test
- public void testBatchJobsAreOnlyReusedIfInProgress() throws IOException {
+ void testBatchJobsAreOnlyReusedIfInProgress() throws IOException {
//Given a patient exists
Patient p = new Patient();
p.setId("Pat-1");
@@ -200,7 +200,7 @@ public void testBatchJobsAreOnlyReusedIfInProgress() throws IOException {
}
@Test
- public void testPollingLocationContainsAllRequiredAttributesUponCompletion() throws IOException {
+ void testPollingLocationContainsAllRequiredAttributesUponCompletion() throws IOException {
//Given a patient exists
Patient p = new Patient();
@@ -237,7 +237,7 @@ private String getJobIdFromPollingLocation(String pollingLocation) {
}
@Test
- public void export_shouldExportPatientResource_whenTypeParameterOmitted() throws IOException {
+ void export_shouldExportPatientResource_whenTypeParameterOmitted() throws IOException {
//Given a patient exists
Patient p = new Patient();
@@ -277,7 +277,7 @@ public void export_shouldExportPatientResource_whenTypeParameterOmitted() throws
}
@Test
- public void export_shouldExportPatientAndObservationAndEncounterResources_whenTypeParameterOmitted() throws IOException {
+ void export_shouldExportPatientAndObservationAndEncounterResources_whenTypeParameterOmitted() throws IOException {
Patient patient = new Patient();
patient.setId("Pat-1");
@@ -320,7 +320,7 @@ public void export_shouldExportPatientAndObservationAndEncounterResources_whenTy
}
@Test
- public void export_shouldNotExportBinaryResource_whenTypeParameterOmitted() throws IOException {
+ void export_shouldNotExportBinaryResource_whenTypeParameterOmitted() throws IOException {
Patient patient = new Patient();
patient.setId("Pat-1");
@@ -381,10 +381,10 @@ private String submitBulkExportForTypesWithExportId(String theExportId, String..
}
@Nested
- public class SystemBulkExportTests {
+ class SystemBulkExportTests {
@Test
- public void testBinariesAreStreamedWithRespectToAcceptHeader() throws IOException {
+ void testBinariesAreStreamedWithRespectToAcceptHeader() throws IOException {
int patientCount = 5;
for (int i = 0; i < patientCount; i++) {
Patient patient = new Patient();
@@ -449,7 +449,7 @@ public void testBinariesAreStreamedWithRespectToAcceptHeader() throws IOExceptio
}
@Test
- public void testResourceCountIsCorrect() {
+ void testResourceCountIsCorrect() {
int patientCount = 5;
for (int i = 0; i < patientCount; i++) {
Patient patient = new Patient();
@@ -505,7 +505,7 @@ public void testResourceCountIsCorrect() {
}
@Test
- public void testEmptyExport() {
+ void testEmptyExport() {
BulkExportJobParameters options = new BulkExportJobParameters();
options.setResourceTypes(Collections.singleton("Patient"));
options.setFilters(Collections.emptySet());
@@ -556,15 +556,15 @@ private void validateNdJsonResponse(Header[] headers, String response, int theEx
@Nested
- public class PatientBulkExportTests {
+ class PatientBulkExportTests {
@BeforeEach
- public void before() {
+ void before() {
myStorageSettings.setIndexMissingFields(JpaStorageSettings.IndexEnabledEnum.ENABLED);
}
@AfterEach
- public void after() {
+ void after() {
myStorageSettings.setIndexMissingFields(JpaStorageSettings.IndexEnabledEnum.DISABLED);
myStorageSettings.setBulkExportFileMaximumCapacity(JpaStorageSettings.DEFAULT_BULK_EXPORT_FILE_MAXIMUM_CAPACITY);
}
@@ -573,7 +573,7 @@ public void after() {
// Reenable when bulk exports that return no results work as expected
@Disabled
@Test
- public void testPatientExportIgnoresResourcesNotInPatientCompartment() {
+ void testPatientExportIgnoresResourcesNotInPatientCompartment() {
Patient patient = new Patient();
patient.setId("pat-1");
myPatientDao.update(patient, mySrd);
@@ -600,7 +600,7 @@ public void testPatientExportIgnoresResourcesNotInPatientCompartment() {
}
@Test
- public void testBulkExportWithLowMaxFileCapacity() {
+ void testBulkExportWithLowMaxFileCapacity() {
final int numPatients = 250;
myStorageSettings.setBulkExportFileMaximumCapacity(1);
myStorageSettings.setIndexMissingFields(JpaStorageSettings.IndexEnabledEnum.ENABLED);
@@ -654,7 +654,7 @@ public void testBulkExportWithLowMaxFileCapacity() {
}
@Test
- public void testExportEmptyResult() {
+ void testExportEmptyResult() {
BulkExportJobParameters options = new BulkExportJobParameters();
options.setResourceTypes(Sets.newHashSet("Patient"));
options.setExportStyle(BulkExportJobParameters.ExportStyle.PATIENT);
@@ -684,7 +684,7 @@ public void testExportEmptyResult() {
@Nested
- public class GroupBulkExportTests {
+ class GroupBulkExportTests {
@AfterEach
void tearDown() {
@@ -692,7 +692,7 @@ void tearDown() {
}
@Test
- public void testGroupExportSuccessfulyExportsPatientForwardReferences() {
+ void testGroupExportSuccessfulyExportsPatientForwardReferences() {
BundleBuilder bb = new BundleBuilder(myFhirContext);
Group group = new Group();
@@ -732,7 +732,7 @@ public void testGroupExportSuccessfulyExportsPatientForwardReferences() {
}
@Test
- public void testVeryLargeGroup() {
+ void testVeryLargeGroup() {
BundleBuilder bb = new BundleBuilder(myFhirContext);
@@ -767,7 +767,7 @@ public void testVeryLargeGroup() {
}
@Test
- public void testGroupBulkExportMembershipShouldNotExpandIntoOtherGroups() {
+ void testGroupBulkExportMembershipShouldNotExpandIntoOtherGroups() {
Patient patient = new Patient();
patient.setId("PING1");
patient.setGender(Enumerations.AdministrativeGender.FEMALE);
@@ -801,7 +801,7 @@ public void testGroupBulkExportMembershipShouldNotExpandIntoOtherGroups() {
}
@Test
- public void testDifferentTypesDoNotUseCachedResults() {
+ void testDifferentTypesDoNotUseCachedResults() {
Patient patient = new Patient();
patient.setId("PING1");
patient.setGender(Enumerations.AdministrativeGender.FEMALE);
@@ -846,7 +846,7 @@ public void testDifferentTypesDoNotUseCachedResults() {
@Test
- public void testGroupBulkExportNotInGroup_DoeNotShowUp() {
+ void testGroupBulkExportNotInGroup_DoeNotShowUp() {
// Create some resources
Patient patient = new Patient();
patient.setId("PING1");
@@ -877,7 +877,7 @@ public void testGroupBulkExportNotInGroup_DoeNotShowUp() {
}
@Test
- public void testTwoConsecutiveBulkExports() {
+ void testTwoConsecutiveBulkExports() {
// Create some resources
Patient patient = new Patient();
@@ -905,7 +905,7 @@ public void testTwoConsecutiveBulkExports() {
}
@Test
- public void testGroupExport_includesObservationsAndEncountersOfPatientsInExportedGroup_whenLuceneIdexingEnabled() {
+ void testGroupExport_includesObservationsAndEncountersOfPatientsInExportedGroup_whenLuceneIdexingEnabled() {
// Enable Lucene indexing
myStorageSettings.setAllowContainsSearches(true);
@@ -988,7 +988,7 @@ public void testGroupExport_includesObservationsAndEncountersOfPatientsInExporte
@Test
- public void testGroupExportPatientAndOtherResources() {
+ void testGroupExportPatientAndOtherResources() {
Patient patient = new Patient();
patient.setId("PING1");
patient.setGender(Enumerations.AdministrativeGender.FEMALE);
@@ -1032,9 +1032,54 @@ public void testGroupExportPatientAndOtherResources() {
assertThat(typeToContents.get("Observation")).contains("obs-included");
assertThat(typeToContents.get("Observation")).doesNotContain("obs-excluded");
}
+ @Test
+ void testGroupExportPatientAndOtherResources_withHistory() {
+ Patient patient = new Patient();
+ patient.setId("PING1");
+ patient.setGender(Enumerations.AdministrativeGender.FEMALE);
+ patient.setActive(true);
+ myClient.update().resource(patient).execute();
+
+ //Other patient not in group
+ Patient patient2 = new Patient();
+ patient2.setId("POG2");
+ patient2.setGender(Enumerations.AdministrativeGender.FEMALE);
+ patient2.setActive(true);
+ myClient.update().resource(patient2).execute();
+
+ Group group = new Group();
+ group.setId("Group/G2");
+ group.setActive(true);
+ group.addMember().getEntity().setReference("Patient/PING1");
+ myClient.update().resource(group).execute();
+
+ Observation o = new Observation();
+ o.setSubject(new Reference("Patient/PING1"));
+ o.setId("obs-included");
+ myClient.update().resource(o).execute();
+
+ Observation o2 = new Observation();
+ o2.setSubject(new Reference("Patient/POG2"));
+ o2.setId("obs-excluded");
+ myClient.update().resource(o2).execute();
+
+ HashSet resourceTypes = Sets.newHashSet("Observation", "Patient");
+ BulkExportJobResults bulkExportJobResults = startGroupBulkExportJobWithHistoryAndAwaitCompletion(resourceTypes, new HashSet<>(), "G2");
+
+ Map> typeToResources = convertJobResultsToResources(bulkExportJobResults);
+ assertThat(typeToResources.get("Patient")).hasSize(1);
+ assertThat(typeToResources.get("Observation")).hasSize(1);
+
+ Map typeToContents = convertJobResultsToStringContents(bulkExportJobResults);
+ assertThat(typeToContents.get("Patient")).contains("PING1");
+ assertThat(typeToContents.get("Patient")).doesNotContain("POG2");
+
+ assertThat(typeToContents.get("Observation")).contains("obs-included");
+ assertThat(typeToContents.get("Observation")).doesNotContain("obs-excluded");
+ }
@Test
- public void testGroupBulkExportWithTypeFilter_ReturnsOnlyResourcesInTypeFilter() {
+ void testGroupBulkExportWithTypeFilter_ReturnsOnlyResourcesInTypeFilter() {
// setup
IParser parser = myFhirContext.newJsonParser();
{
@@ -1184,7 +1229,7 @@ public void testGroupBulkExportWithTypeFilter_ReturnsOnlyResourcesInTypeFilter()
}
@Test
- public void testGroupBulkExportWithTypeFilter() {
+ void testGroupBulkExportWithTypeFilter() {
// Create some resources
Group g = createGroupWithPatients();
String groupId = g.getIdPart();
@@ -1215,7 +1260,7 @@ public void testGroupBulkExportWithTypeFilter() {
}
@Test
- public void testGroupExportOmitResourceTypesFetchesAll() {
+ void testGroupExportOmitResourceTypesFetchesAll() {
// Create some resources
Patient patient = new Patient();
patient.setId("PF");
@@ -1269,7 +1314,7 @@ public void testGroupExportOmitResourceTypesFetchesAll() {
}
@Test
- public void testGroupExportPatientOnly() {
+ void testGroupExportPatientOnly() {
Patient patient = new Patient();
patient.setId("PING1");
patient.setGender(Enumerations.AdministrativeGender.FEMALE);
@@ -1301,7 +1346,7 @@ public void testGroupExportPatientOnly() {
}
@Test
- public void testExportEmptyResult() {
+ void testExportEmptyResult() {
Group group = new Group();
group.setId("Group/G-empty");
group.setActive(true);
@@ -1316,7 +1361,7 @@ public void testExportEmptyResult() {
}
@Test
- public void testGroupBulkExportMultipleResourceTypes() {
+ void testGroupBulkExportMultipleResourceTypes() {
Patient patient = new Patient();
patient.setId("PING1");
patient.setGender(Enumerations.AdministrativeGender.FEMALE);
@@ -1359,7 +1404,7 @@ public void testGroupBulkExportMultipleResourceTypes() {
}
@Test
- public void testGroupBulkExportOverLargeDataset() {
+ void testGroupBulkExportOverLargeDataset() {
Patient patient = new Patient();
patient.setId("PING1");
patient.setGender(Enumerations.AdministrativeGender.FEMALE);
@@ -1404,7 +1449,7 @@ public void testGroupBulkExportOverLargeDataset() {
}
@Nested
- public class WithClientIdStrategyEnumANYTest {
+ class WithClientIdStrategyEnumANYTest {
@BeforeEach
void setUp() {
@@ -1417,7 +1462,7 @@ void tearDown() {
}
@Test
- public void testGroupExportPatientOnly() {
+ void testGroupExportPatientOnly() {
Patient patient = new Patient();
patient.setId("PING1");
patient.setGender(Enumerations.AdministrativeGender.FEMALE);
@@ -1454,7 +1499,7 @@ public void testGroupExportPatientOnly() {
class IncludeHistoryTests {
@Test
- public void testPatientBulkExport() {
+ void testPatientBulkExport() {
myStorageSettings.setIndexMissingFields(JpaStorageSettings.IndexEnabledEnum.ENABLED);
// versions list size indicate number of patients to create
@@ -1479,7 +1524,7 @@ public void testPatientBulkExport() {
}
@Test
- public void testGroupBulkExportMultipleResourceTypes() {
+ void testGroupBulkExportMultipleResourceTypes() {
Patient patient = new Patient();
patient.setId("PING1");
patient.setGender(Enumerations.AdministrativeGender.FEMALE);
@@ -1512,12 +1557,12 @@ public void testGroupBulkExportMultipleResourceTypes() {
BulkExportJobResults bulkExportJobResults = startGroupBulkExportJobAndAwaitCompletionForHistory(resourceTypes, new HashSet<>(), "G2", true);
Map>> typeToResourceVersionsMap = convertJobResultsToResourceVersionMap(bulkExportJobResults);
- assertThat(typeToResourceVersionsMap.get("Observation")).isEqualTo(observationVersionsMap);
- assertThat(typeToResourceVersionsMap.get("Coverage")).isEqualTo(coverageVersionsMap);
+ assertThat(typeToResourceVersionsMap).containsEntry("Observation", observationVersionsMap)
+ .containsEntry("Coverage", coverageVersionsMap);
}
@Test
- public void testSystemBulkExport() {
+ void testSystemBulkExport() {
// versions list size indicate number of patients to create
Map> patientVersionsMap = createPatientsWithHistory(List.of(3, 5, 2, 1, 2));
@@ -1541,7 +1586,7 @@ public void testSystemBulkExport() {
}
@Test
- public void testSystemBulkExport_withResourcesExceedingPageSizes() {
+ void testSystemBulkExport_withResourcesExceedingPageSizes() {
// given
int exportFileMaxCapacity = 27;
@@ -1590,7 +1635,7 @@ public void testSystemBulkExport_withResourcesExceedingPageSizes() {
}
@Test
- public void testShouldIncludeOnlyCurrentVersions() {
+ void testShouldIncludeOnlyCurrentVersions() {
// Given - Create a patient with multiple versions
Patient patient = new Patient();
patient.setId("Patient-NoHistory-Test");
@@ -1674,6 +1719,57 @@ void testBulkExportJobParametersBuilder_includeHistoryParameter_handlesNullParam
assertFalse(parameters.isIncludeHistory());
}
+ @Test
+ void testSystemBulkExportWithHistory_WithClientAssignedIds() {
+ // Given - Create patients with client-assigned IDs (forced IDs) and multiple versions
+ Patient patient1 = new Patient();
+ patient1.setId("Patient/client-assigned-id-1");
+ patient1.addName().setFamily("FamilyV1");
+ myClient.update().resource(patient1).execute();
+
+ // Create version 2
+ patient1.getNameFirstRep().setFamily("FamilyV2");
+ myClient.update().resource(patient1).execute();
+
+ // Create version 3
+ patient1.getNameFirstRep().setFamily("FamilyV3");
+ myClient.update().resource(patient1).execute();
+
+ Patient patient2 = new Patient();
+ patient2.setId("Patient/client-assigned-id-2");
+ patient2.addName().setFamily("SmithV1");
+ myClient.update().resource(patient2).execute();
+
+ // Create version 2
+ patient2.getNameFirstRep().setFamily("SmithV2");
+ myClient.update().resource(patient2).execute();
+
+ // When - Start bulk export with history
+ BulkExportJobParameters options = new BulkExportJobParameters();
+ options.setResourceTypes(Collections.singleton("Patient"));
+ options.setFilters(Collections.emptySet());
+ options.setExportStyle(BulkExportJobParameters.ExportStyle.SYSTEM);
+ options.setIncludeHistory(true);
+ options.setOutputFormat(Constants.CT_FHIR_NDJSON);
+
+ JobInstanceStartRequest startRequest = new JobInstanceStartRequest();
+ startRequest.setJobDefinitionId(Batch2JobDefinitionConstants.BULK_EXPORT);
+ startRequest.setParameters(options);
+ Batch2JobStartResponse job = myJobCoordinator.startInstance(mySrd, startRequest);
+ myBatch2JobHelper.awaitJobCompletion(job.getInstanceId(), 60);
+ ourLog.debug("Job status after awaiting - {}", myJobCoordinator.getInstance(job.getInstanceId()).getStatus());
+ waitForCompletion(job);
+
+ // Then - Verify all versions are exported for resources with forced IDs
+ Map> exportedPatientVersionsMap = extractExportedResourceVersionsByTypeMap(job).get("Patient");
+
+ assertThat(exportedPatientVersionsMap).containsKey("client-assigned-id-1");
+ assertThat(exportedPatientVersionsMap.get("client-assigned-id-1")).hasSize(3);
+
+ assertThat(exportedPatientVersionsMap).containsKey("client-assigned-id-2");
+ assertThat(exportedPatientVersionsMap.get("client-assigned-id-2")).hasSize(2);
+ }
+
}
@@ -1832,10 +1928,12 @@ private Map> createPatientsWithHistory(
private Map> createPatientsWithHistory(List versionCounts) {
Map> retVal = new HashMap<>();
+ for (int i = 0; i < versionCounts.size(); i++) {
+
- for (Integer theVersionCount : versionCounts) {
- IIdType id = createPatient();
- Set patientVersionIds = new HashSet<>();
+ Integer theVersionCount = versionCounts.get(i);
+ IIdType id = createPatient(i);
+ Set patientVersionIds = new HashSet<>();
retVal.put(id.getIdPart(), patientVersionIds);
// create indicated additional versions
@@ -1855,8 +1953,9 @@ private Map> createPatientsWithHistory(List version
return retVal;
}
- private IIdType createPatient() {
+ private IIdType createPatient(int i) {
Patient p = new Patient();
+ p.setId("pat-"+ i);
p.addName()
.setGiven(List.of(new StringType("given")))
.setFamily("lastname");
@@ -2019,7 +2118,9 @@ BulkExportJobResults startGroupBulkExportJobAndAwaitCompletionForHistory(HashSet
BulkExportJobResults startGroupBulkExportJobAndAwaitCompletion(HashSet theResourceTypes, HashSet theFilters, String theGroupId) {
return startBulkExportJobAndAwaitCompletion(BulkExportJobParameters.ExportStyle.GROUP, theResourceTypes, theFilters, theGroupId, false, false);
}
-
+ BulkExportJobResults startGroupBulkExportJobWithHistoryAndAwaitCompletion(HashSet theResourceTypes, HashSet theFilters, String theGroupId) {
+ return startBulkExportJobAndAwaitCompletion(BulkExportJobParameters.ExportStyle.GROUP, theResourceTypes, theFilters, theGroupId, false, true);
+ }
BulkExportJobResults startSystemBulkExportJobAndAwaitCompletion(Set theResourceTypes, Set theFilters) {
return startBulkExportJobAndAwaitCompletion(BulkExportJobParameters.ExportStyle.SYSTEM, theResourceTypes, theFilters, null, false, false);
}
diff --git a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/JpaBulkDataExportHistoryHelperTest.java b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/JpaBulkDataExportHistoryHelperTest.java
index b561ff43b9f..89a3d38255b 100644
--- a/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/JpaBulkDataExportHistoryHelperTest.java
+++ b/hapi-fhir-jpaserver-test-r4/src/test/java/ca/uhn/fhir/jpa/dao/JpaBulkDataExportHistoryHelperTest.java
@@ -3,14 +3,15 @@
// Created by Sonnet 4
import ca.uhn.fhir.interceptor.model.RequestPartitionId;
+import ca.uhn.fhir.jpa.model.dao.JpaPid;
import ca.uhn.fhir.jpa.search.PersistedJpaBundleProviderFactory;
+import ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
-import java.util.Arrays;
import java.util.Date;
import java.util.List;
@@ -32,7 +33,11 @@ class JpaBulkDataExportHistoryHelperTest {
void fetchHistoryForResourceIds_callsBundleProviderFactory() {
// Given
String resourceType = "Patient";
- List resourceIds = Arrays.asList("123", "456", "789");
+ List> resourceIds =List.of(
+ JpaPid.fromId(123L),
+ JpaPid.fromId(456L),
+ JpaPid.fromId(789L)
+ );
RequestPartitionId partitionId = RequestPartitionId.allPartitions();
// When
diff --git a/hapi-fhir-jpaserver-test-r4b/pom.xml b/hapi-fhir-jpaserver-test-r4b/pom.xml
index ae9d4b61d9c..10f3a673e98 100644
--- a/hapi-fhir-jpaserver-test-r4b/pom.xml
+++ b/hapi-fhir-jpaserver-test-r4b/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-test-r5/pom.xml b/hapi-fhir-jpaserver-test-r5/pom.xml
index fbb6b320a67..9fa06c056cb 100644
--- a/hapi-fhir-jpaserver-test-r5/pom.xml
+++ b/hapi-fhir-jpaserver-test-r5/pom.xml
@@ -6,7 +6,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 8.5.8-SNAPSHOT
+ 8.5.9-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 3606c9c2df4..45bf5082a66 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
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml
index 6f7d110fe8f..8cc4a924d16 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
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-repositories/pom.xml b/hapi-fhir-repositories/pom.xml
index feb4f00037b..bd47c2ef8f7 100644
--- a/hapi-fhir-repositories/pom.xml
+++ b/hapi-fhir-repositories/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-server-cds-hooks/pom.xml b/hapi-fhir-server-cds-hooks/pom.xml
index 28effcc22c8..0753bfc3f66 100644
--- a/hapi-fhir-server-cds-hooks/pom.xml
+++ b/hapi-fhir-server-cds-hooks/pom.xml
@@ -7,7 +7,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-server-mdm/pom.xml b/hapi-fhir-server-mdm/pom.xml
index 0c686670add..afc227dc2d0 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
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-server-openapi/pom.xml b/hapi-fhir-server-openapi/pom.xml
index b553bf998b2..1fc3c67f995 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
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-server/pom.xml b/hapi-fhir-server/pom.xml
index 9e59c9c854c..8cd00fd09cf 100644
--- a/hapi-fhir-server/pom.xml
+++ b/hapi-fhir-server/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/bulk/IBulkDataExportHistoryHelper.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/bulk/IBulkDataExportHistoryHelper.java
index a23ae1cae97..fb4ea38af13 100644
--- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/bulk/IBulkDataExportHistoryHelper.java
+++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/api/server/bulk/IBulkDataExportHistoryHelper.java
@@ -21,6 +21,7 @@
import ca.uhn.fhir.interceptor.model.RequestPartitionId;
import ca.uhn.fhir.rest.api.server.IBundleProvider;
+import ca.uhn.fhir.rest.api.server.storage.IResourcePersistentId;
import jakarta.annotation.Nonnull;
import jakarta.annotation.Nullable;
@@ -42,7 +43,7 @@ public interface IBulkDataExportHistoryHelper {
*/
IBundleProvider fetchHistoryForResourceIds(
@Nonnull String theResourceType,
- @Nonnull List theIdList,
+ @Nonnull List> theIdList,
RequestPartitionId theRequestPartitionId,
@Nullable Date theRangeStartInclusive,
@Nonnull Date theRangeEndInclusive);
diff --git a/hapi-fhir-serviceloaders/hapi-fhir-caching-api/pom.xml b/hapi-fhir-serviceloaders/hapi-fhir-caching-api/pom.xml
index df824f8c07a..cc8e7e9eea7 100644
--- a/hapi-fhir-serviceloaders/hapi-fhir-caching-api/pom.xml
+++ b/hapi-fhir-serviceloaders/hapi-fhir-caching-api/pom.xml
@@ -7,7 +7,7 @@
hapi-fhir-serviceloaders
ca.uhn.hapi.fhir
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-serviceloaders/hapi-fhir-caching-caffeine/pom.xml b/hapi-fhir-serviceloaders/hapi-fhir-caching-caffeine/pom.xml
index c7066838c95..a50b679e889 100644
--- a/hapi-fhir-serviceloaders/hapi-fhir-caching-caffeine/pom.xml
+++ b/hapi-fhir-serviceloaders/hapi-fhir-caching-caffeine/pom.xml
@@ -7,7 +7,7 @@
hapi-fhir-serviceloaders
ca.uhn.hapi.fhir
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../pom.xml
@@ -21,7 +21,7 @@
ca.uhn.hapi.fhir
hapi-fhir-caching-api
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
diff --git a/hapi-fhir-serviceloaders/hapi-fhir-caching-guava/pom.xml b/hapi-fhir-serviceloaders/hapi-fhir-caching-guava/pom.xml
index 76541cc77e7..daf5cc93797 100644
--- a/hapi-fhir-serviceloaders/hapi-fhir-caching-guava/pom.xml
+++ b/hapi-fhir-serviceloaders/hapi-fhir-caching-guava/pom.xml
@@ -7,7 +7,7 @@
hapi-fhir-serviceloaders
ca.uhn.hapi.fhir
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-serviceloaders/hapi-fhir-caching-testing/pom.xml b/hapi-fhir-serviceloaders/hapi-fhir-caching-testing/pom.xml
index 58a21730ea9..c98cb4acc77 100644
--- a/hapi-fhir-serviceloaders/hapi-fhir-caching-testing/pom.xml
+++ b/hapi-fhir-serviceloaders/hapi-fhir-caching-testing/pom.xml
@@ -7,7 +7,7 @@
hapi-fhir
ca.uhn.hapi.fhir
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../../pom.xml
diff --git a/hapi-fhir-serviceloaders/pom.xml b/hapi-fhir-serviceloaders/pom.xml
index 336d5289546..bda1afc4967 100644
--- a/hapi-fhir-serviceloaders/pom.xml
+++ b/hapi-fhir-serviceloaders/pom.xml
@@ -5,7 +5,7 @@
hapi-deployable-pom
ca.uhn.hapi.fhir
- 8.5.8-SNAPSHOT
+ 8.5.9-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 86cfff600f9..c8b996ec3c6 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
- 8.5.8-SNAPSHOT
+ 8.5.9-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 018042032dd..e2f7296f12b 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
- 8.5.8-SNAPSHOT
+ 8.5.9-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 ae6b01708d6..6609a9420dc 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
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
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 0244ab97041..d62cf6236d3 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
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
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 bc118dc1fed..0aa934a377d 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
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
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 a395f7a872b..2aa580e8f94 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
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-spring-boot/pom.xml b/hapi-fhir-spring-boot/pom.xml
index 0cf0482ba0b..3b4151ba87f 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
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-sql-migrate/pom.xml b/hapi-fhir-sql-migrate/pom.xml
index b4ef048867d..f192f9c5f1f 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
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage-batch2-jobs/pom.xml b/hapi-fhir-storage-batch2-jobs/pom.xml
index 3170b48c3f2..ac80ab57388 100644
--- a/hapi-fhir-storage-batch2-jobs/pom.xml
+++ b/hapi-fhir-storage-batch2-jobs/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage-batch2-jobs/src/main/java/ca/uhn/fhir/batch2/jobs/export/ExpandResourceAndWriteBinaryStep.java b/hapi-fhir-storage-batch2-jobs/src/main/java/ca/uhn/fhir/batch2/jobs/export/ExpandResourceAndWriteBinaryStep.java
index 87a22b8b1b3..d9e8a82c33a 100644
--- a/hapi-fhir-storage-batch2-jobs/src/main/java/ca/uhn/fhir/batch2/jobs/export/ExpandResourceAndWriteBinaryStep.java
+++ b/hapi-fhir-storage-batch2-jobs/src/main/java/ca/uhn/fhir/batch2/jobs/export/ExpandResourceAndWriteBinaryStep.java
@@ -222,7 +222,12 @@ public void processHistoryResources(
for (String resourceType : theTypeToIds.keySet()) {
List typePidJsonList = theTypeToIds.get(resourceType);
- List idList = convertToStringIds(theRequestPartitionId, resourceType, typePidJsonList);
+ List> idList = new ArrayList<>();
+ for (TypedPidJson typePid : typePidJsonList) {
+ @SuppressWarnings("unchecked")
+ IResourcePersistentId> persistentId = typePid.toPersistentId(myIdHelperService);
+ idList.add(persistentId);
+ }
consumeHistoryInBatches(
resourceType, idList, theRequestPartitionId, theJobParameters, theResourceListConsumer);
@@ -248,7 +253,7 @@ public void adjustJobParameters(
private void consumeHistoryInBatches(
String theResourceType,
- List theIdList,
+ List> theIdList,
RequestPartitionId theRequestPartitionId,
BulkExportJobParameters theJobParameters,
Consumer> theResourceListConsumer) {
@@ -389,7 +394,7 @@ private void processResources(
*/
private IBundleProvider searchForResourcesHistory(
String theResourceType,
- List theIdList,
+ List> theIdList,
RequestPartitionId theRequestPartitionId,
BulkExportJobParameters theJobParameters) {
diff --git a/hapi-fhir-storage-batch2-jobs/src/test/java/ca/uhn/fhir/batch2/jobs/export/ExpandResourceAndWriteBinaryStepIncludeHistoryTest.java b/hapi-fhir-storage-batch2-jobs/src/test/java/ca/uhn/fhir/batch2/jobs/export/ExpandResourceAndWriteBinaryStepIncludeHistoryTest.java
index 354005345b4..7a35e31e583 100644
--- a/hapi-fhir-storage-batch2-jobs/src/test/java/ca/uhn/fhir/batch2/jobs/export/ExpandResourceAndWriteBinaryStepIncludeHistoryTest.java
+++ b/hapi-fhir-storage-batch2-jobs/src/test/java/ca/uhn/fhir/batch2/jobs/export/ExpandResourceAndWriteBinaryStepIncludeHistoryTest.java
@@ -4,7 +4,6 @@
import ca.uhn.fhir.batch2.jobs.chunk.TypedPidJson;
import ca.uhn.fhir.interceptor.model.RequestPartitionId;
import ca.uhn.fhir.jpa.api.config.JpaStorageSettings;
-import ca.uhn.fhir.jpa.api.model.PersistentIdToForcedIdMap;
import ca.uhn.fhir.jpa.api.svc.IIdHelperService;
import ca.uhn.fhir.jpa.dao.tx.IHapiTransactionService;
import ca.uhn.fhir.jpa.dao.tx.NonTransactionalHapiTransactionService;
@@ -31,12 +30,7 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
-import java.util.Map;
-import java.util.Optional;
-import java.util.Set;
import java.util.function.Consumer;
-import java.util.function.Function;
-import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.Stream;
@@ -79,8 +73,16 @@ public class ExpandResourceAndWriteBinaryStepIncludeHistoryTest {
private final BulkExportJobParameters myJobParams = new BulkExportJobParameters();
@BeforeEach
- public void init() {
+ void init() {
myJobStep.setIdHelperServiceForUnitTest(myIdHelperService);
+
+ // Mock the ID helper service to convert TypedPidJson to IResourcePersistentId
+ when(myIdHelperService.newPidFromStringIdAndResourceName(any(), any(), any())).thenAnswer(invocation -> {
+ String pid = invocation.getArgument(1);
+ String resourceType = invocation.getArgument(2);
+ Long pidAsLong = Long.parseLong(pid);
+ return JpaPid.fromIdAndResourceType(pidAsLong, resourceType);
+ });
}
private ArrayListMultimap myTypeToIdsMap;
@@ -91,8 +93,6 @@ public void init() {
@BeforeEach
void setUp() {
myStorageSettings.setBulkExportFileMaximumCapacity(EXPORT_FILE_MAX_CAPACITY);
-
- setupIdHelperServiceMock();
}
@Test
@@ -123,15 +123,17 @@ void testHistoryPartitioningAlgorithm() {
private void setupExportHelperResultsMock(Consumer> theResourceVersionConsumer) {
when(myExportHelper.fetchHistoryForResourceIds(eq("Patient"), any(), any(), any(), any())).thenAnswer(invocation -> {
- List theResourceIdList = invocation.getArgument(1);
- List resourceList = getHistoryResourcesForResourceIds("Patient", theResourceIdList, PATIENT_RESOURCE_VERSIONS_COUNT);
+ List theResourceIdList = invocation.getArgument(1);
+ List resourceIdStrings = theResourceIdList.stream().map(JpaPid::toString).toList();
+ List resourceList = getHistoryResourcesForResourceIds("Patient", resourceIdStrings, PATIENT_RESOURCE_VERSIONS_COUNT);
theResourceVersionConsumer.accept(resourceList);
return new SimpleBundleProvider(resourceList);
});
when(myExportHelper.fetchHistoryForResourceIds(eq("Observation"), any(), any(), any(), any())).thenAnswer(invocation -> {
- List theResourceIdList = invocation.getArgument(1);
- List resourceList = getHistoryResourcesForResourceIds("Observation", theResourceIdList, OBSERVATION_RESOURCE_VERSIONS_COUNT);
+ List theResourceIdList = invocation.getArgument(1);
+ List resourceIdStrings = theResourceIdList.stream().map(JpaPid::toString).toList();
+ List resourceList = getHistoryResourcesForResourceIds("Observation", resourceIdStrings, OBSERVATION_RESOURCE_VERSIONS_COUNT);
theResourceVersionConsumer.accept(resourceList);
return new SimpleBundleProvider(resourceList);
});
@@ -170,25 +172,4 @@ private List getResourcesTypedPidJsonList(String theResourceType,
return IntStream.range(1, theCount+1).mapToObj(i -> new TypedPidJson(theResourceType, 1, String.valueOf(i))).toList();
}
- private void setupIdHelperServiceMock() {
- when(myIdHelperService.newPidFromStringIdAndResourceName(any(), any(), any())).thenAnswer(invocation -> {
- Integer thePartitionId = invocation.getArgument(0);
- String thePid = invocation.getArgument(1);
- String theResourceType = invocation.getArgument(2);
-
- JpaPid retVal = JpaPid.fromId(Long.parseLong(thePid), thePartitionId);
- retVal.setResourceType(theResourceType);
- return retVal;
- });
-
- when(myIdHelperService.translatePidsToForcedIds(any())).thenAnswer(invocation -> {
- Set theResourceIds = invocation.getArgument(0);
- Map> theMap = theResourceIds.stream().collect(Collectors.toMap(
- Function.identity(),
- jpaPid -> Optional.of(jpaPid.getResourceType() + jpaPid)
- ));
-
- return new PersistentIdToForcedIdMap<>(theMap);
- });
- }
}
diff --git a/hapi-fhir-storage-batch2-test-utilities/pom.xml b/hapi-fhir-storage-batch2-test-utilities/pom.xml
index 0c21cecfd7a..ef24a8fb795 100644
--- a/hapi-fhir-storage-batch2-test-utilities/pom.xml
+++ b/hapi-fhir-storage-batch2-test-utilities/pom.xml
@@ -7,7 +7,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage-batch2/pom.xml b/hapi-fhir-storage-batch2/pom.xml
index 3817936b8af..e1be0659072 100644
--- a/hapi-fhir-storage-batch2/pom.xml
+++ b/hapi-fhir-storage-batch2/pom.xml
@@ -7,7 +7,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage-mdm/pom.xml b/hapi-fhir-storage-mdm/pom.xml
index ae027c38878..b3cccb1da63 100644
--- a/hapi-fhir-storage-mdm/pom.xml
+++ b/hapi-fhir-storage-mdm/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage-test-utilities/pom.xml b/hapi-fhir-storage-test-utilities/pom.xml
index 6b3bb99a00a..99c2c3e0e50 100644
--- a/hapi-fhir-storage-test-utilities/pom.xml
+++ b/hapi-fhir-storage-test-utilities/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-storage/pom.xml b/hapi-fhir-storage/pom.xml
index 0599b812cd0..c59464709a4 100644
--- a/hapi-fhir-storage/pom.xml
+++ b/hapi-fhir-storage/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-dstu2.1/pom.xml b/hapi-fhir-structures-dstu2.1/pom.xml
index d9ba3b64ca3..f88cc79dc9d 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
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-dstu2/pom.xml b/hapi-fhir-structures-dstu2/pom.xml
index 6b069add218..91b585491cf 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
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-dstu3/pom.xml b/hapi-fhir-structures-dstu3/pom.xml
index 79217d2a7c0..23be709c377 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
- 8.5.8-SNAPSHOT
+ 8.5.9-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 52bcd3969a1..aa940d62810 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
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-r4/pom.xml b/hapi-fhir-structures-r4/pom.xml
index 28c0ba98305..e8a1d946b53 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
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-r4b/pom.xml b/hapi-fhir-structures-r4b/pom.xml
index 273baec9af1..f7035b677a9 100644
--- a/hapi-fhir-structures-r4b/pom.xml
+++ b/hapi-fhir-structures-r4b/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-structures-r5/pom.xml b/hapi-fhir-structures-r5/pom.xml
index 1ef12e56dad..f9712d90070 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
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-test-utilities/pom.xml b/hapi-fhir-test-utilities/pom.xml
index db1a7bab91f..c4cd67a465e 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
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-testpage-overlay/pom.xml b/hapi-fhir-testpage-overlay/pom.xml
index edb00022adf..2238abe336e 100644
--- a/hapi-fhir-testpage-overlay/pom.xml
+++ b/hapi-fhir-testpage-overlay/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../pom.xml
diff --git a/hapi-fhir-validation-resources-dstu2.1/pom.xml b/hapi-fhir-validation-resources-dstu2.1/pom.xml
index f6d68b49f9c..85051214607 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
- 8.5.8-SNAPSHOT
+ 8.5.9-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 ceb6ee51b88..963b26cb47f 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
- 8.5.8-SNAPSHOT
+ 8.5.9-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 82a54731783..2472e26646c 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
- 8.5.8-SNAPSHOT
+ 8.5.9-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 742cc287c46..813e6464b6f 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
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation-resources-r4b/pom.xml b/hapi-fhir-validation-resources-r4b/pom.xml
index b40ae34f3db..dd1e5f317e3 100644
--- a/hapi-fhir-validation-resources-r4b/pom.xml
+++ b/hapi-fhir-validation-resources-r4b/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 8.5.8-SNAPSHOT
+ 8.5.9-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 a8b26426667..f6e41d04a69 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
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-fhir-validation/pom.xml b/hapi-fhir-validation/pom.xml
index 00b3608d511..296f5f9252a 100644
--- a/hapi-fhir-validation/pom.xml
+++ b/hapi-fhir-validation/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-deployable-pom
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../hapi-deployable-pom/pom.xml
diff --git a/hapi-tinder-plugin/pom.xml b/hapi-tinder-plugin/pom.xml
index 4c0ab38850a..ffbe4ef923d 100644
--- a/hapi-tinder-plugin/pom.xml
+++ b/hapi-tinder-plugin/pom.xml
@@ -5,7 +5,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../pom.xml
diff --git a/hapi-tinder-test/pom.xml b/hapi-tinder-test/pom.xml
index 1263536b4d6..2d5ae9a778b 100644
--- a/hapi-tinder-test/pom.xml
+++ b/hapi-tinder-test/pom.xml
@@ -4,7 +4,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../pom.xml
diff --git a/pom.xml b/pom.xml
index ac659aac3fd..e356ffe60bf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,7 +7,7 @@
ca.uhn.hapi.fhir
hapi-fhir
pom
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
HAPI-FHIR
An open-source implementation of the FHIR specification in Java.
diff --git a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml
index a5323994717..59bc17eb2a9 100644
--- a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml
+++ b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml
@@ -7,7 +7,7 @@
ca.uhn.hapi.fhir
hapi-fhir
- 8.5.8-SNAPSHOT
+ 8.5.9-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 10c8975a889..9722b6b6528 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
- 8.5.8-SNAPSHOT
+ 8.5.9-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 09b8bcea390..991e1e027bc 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
- 8.5.8-SNAPSHOT
+ 8.5.9-SNAPSHOT
../../pom.xml