Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
8ac8f54
fixed 7269 bulk export history failure with client-assigned string IDs
rob-caruso Oct 14, 2025
5058bd5
fixed 7269 bulk export history failure with client-assigned string IDs
rob-caruso Oct 15, 2025
d4b7b70
Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/8…
robcaruso Oct 15, 2025
f467a90
changed string ids to IResourcePersistentId
rob-caruso Oct 21, 2025
593acd2
Merge branch 'master' into rc-20251010-bulk-export-fails-with-string-…
rob-caruso Oct 21, 2025
06af86a
changed string ids to IResourcePersistentId
rob-caruso Oct 23, 2025
be08680
batch2 jobs that are cancelled will not be returned when requesting a…
TipzCM Oct 23, 2025
40f1128
Bump to 8 7 (#7322)
jdar8 Oct 24, 2025
5d32bb2
Merge branch 'master' into rc-20251010-bulk-export-fails-with-string-…
rob-caruso Oct 24, 2025
3e105cd
Update hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/ind…
robcaruso Oct 24, 2025
e6e97bc
fixed with spotless
rob-caruso Oct 24, 2025
df6df74
Merge remote-tracking branch 'origin/rel_8_6' into rc-20251010-bulk-e…
rob-caruso Oct 24, 2025
afcbb31
Revert "Bump to 8 7 (#7322)"
rob-caruso Oct 24, 2025
7b6a9e2
Revert "changed string ids to IResourcePersistentId"
rob-caruso Oct 24, 2025
e450613
Revert "batch2 jobs that are cancelled will not be returned when requ…
rob-caruso Oct 24, 2025
0980f08
changed string ids to IResourcePersistentId
rob-caruso Oct 24, 2025
df090b1
fixed with spotless
rob-caruso Oct 24, 2025
41019f6
Bumped version number
rob-caruso Oct 24, 2025
e35e69d
Merge branch 'rel_8_6' into rc-20251010-bulk-export-fails-with-string…
robcaruso Oct 27, 2025
b439442
Merge branch 'rel_8_6' into rc-20251010-bulk-export-fails-with-string…
robcaruso Oct 27, 2025
934765c
adding missing change to fix build
rob-caruso Oct 28, 2025
b696117
Merge branch 'rel_8_6' into rc-20251010-bulk-export-fails-with-string…
robcaruso Oct 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hapi-deployable-pom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId>
<version>8.5.8-SNAPSHOT</version>
<version>8.5.9-SNAPSHOT</version>

<relativePath>../pom.xml</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-android/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>8.5.8-SNAPSHOT</version>
<version>8.5.9-SNAPSHOT</version>

<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>8.5.8-SNAPSHOT</version>
<version>8.5.9-SNAPSHOT</version>

<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent>
Expand Down
4 changes: 2 additions & 2 deletions hapi-fhir-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
<modelVersion>4.0.0</modelVersion>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-bom</artifactId>
<version>8.5.8-SNAPSHOT</version>
<version>8.5.9-SNAPSHOT</version>

<packaging>pom</packaging>
<name>HAPI FHIR BOM</name>

<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>8.5.8-SNAPSHOT</version>
<version>8.5.9-SNAPSHOT</version>

<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-checkstyle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId>
<version>8.5.8-SNAPSHOT</version>
<version>8.5.9-SNAPSHOT</version>

<relativePath>../pom.xml</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-cli/hapi-fhir-cli-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>8.5.8-SNAPSHOT</version>
<version>8.5.9-SNAPSHOT</version>

<relativePath>../../hapi-deployable-pom/pom.xml</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-cli/hapi-fhir-cli-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-cli</artifactId>
<version>8.5.8-SNAPSHOT</version>
<version>8.5.9-SNAPSHOT</version>

<relativePath>../pom.xml</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId>
<version>8.5.8-SNAPSHOT</version>
<version>8.5.9-SNAPSHOT</version>

<relativePath>../pom.xml</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-client-apache-http5/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>8.5.8-SNAPSHOT</version>
<version>8.5.9-SNAPSHOT</version>

<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-client-okhttp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>8.5.8-SNAPSHOT</version>
<version>8.5.9-SNAPSHOT</version>

<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>8.5.8-SNAPSHOT</version>
<version>8.5.9-SNAPSHOT</version>

<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-converter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>8.5.8-SNAPSHOT</version>
<version>8.5.9-SNAPSHOT</version>

<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId>
<version>8.5.8-SNAPSHOT</version>
<version>8.5.9-SNAPSHOT</version>

<relativePath>../pom.xml</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>8.5.8-SNAPSHOT</version>
<version>8.5.9-SNAPSHOT</version>

<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent>
Expand Down
Original file line number Diff line number Diff line change
@@ -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."
2 changes: 1 addition & 1 deletion hapi-fhir-jacoco/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>8.5.8-SNAPSHOT</version>
<version>8.5.9-SNAPSHOT</version>

<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-jaxrsserver-base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>8.5.8-SNAPSHOT</version>
<version>8.5.9-SNAPSHOT</version>

<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-jpa-hibernate-services/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>8.5.8-SNAPSHOT</version>
<version>8.5.9-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-jpa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>8.5.8-SNAPSHOT</version>
<version>8.5.9-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-jpaserver-base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>8.5.8-SNAPSHOT</version>
<version>8.5.9-SNAPSHOT</version>

<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ public PersistedJpaSearchFirstPageBundleProvider newPersistedJpaSearchFirstPageB
@Scope("prototype")
public PersistedJpaIdSearchBundleProvider newPersistedJpaIdSearchBundleProvider(
String theResourceType,
List<String> theResourceIds,
List<IResourcePersistentId<?>> theResourceIds,
RequestPartitionId thePartitionId,
@Nullable Date theRangeStartInclusive,
@Nonnull Date theRangeEndInclusive) {
Expand Down Expand Up @@ -849,7 +849,7 @@ public HistoryBuilder newHistoryBuilder(
@Scope("prototype")
public HistoryBuilder newHistoryBuilderWithIds(
@Nonnull String theResourceType,
@Nonnull List<String> theResourceIds,
@Nonnull List<IResourcePersistentId<?>> theResourceIds,
@Nullable Date theRangeStartInclusive,
@Nonnull Date theRangeEndInclusive) {
return new HistoryBuilder(theResourceType, theResourceIds, theRangeStartInclusive, theRangeEndInclusive);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<String> myResourceIds;
private final List<IResourcePersistentId<?>> myResourceIds;
private final Date myRangeStartInclusive;
private final Date myRangeEndInclusive;

Expand Down Expand Up @@ -108,7 +108,7 @@ public HistoryBuilder(
*/
public HistoryBuilder(
@Nonnull String theResourceType,
@Nonnull List<String> theResourceIds,
@Nonnull List<IResourcePersistentId<?>> theResourceIds,
@Nullable Date theRangeStartInclusive,
@Nonnull Date theRangeEndInclusive) {
myResourceType = theResourceType;
Expand Down Expand Up @@ -275,14 +275,12 @@ private void addPredicatesToQuery(
}

private void addResourceIdsFiltering(
@Nonnull List<String> theResourceIds,
@Nonnull List<IResourcePersistentId<?>> theResourceIds,
RequestPartitionId thePartitionId,
Root<ResourceHistoryTable> theFrom,
List<Predicate> predicates) {

List<Long> ids = theResourceIds.stream()
.map(id -> new IdDt(id).getIdPartAsLong())
.toList();
List<Long> ids = theResourceIds.stream().map(id -> (Long) id.getId()).toList();

// Create a predicate to filter by resource IDs
if (!ids.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -49,7 +50,7 @@ public HistoryBuilder newHistoryBuilder(

public HistoryBuilder newHistoryBuilder(
@Nonnull String theResourceType,
@Nonnull List<String> theResourceIds,
@Nonnull List<IResourcePersistentId<?>> theResourceIds,
@Nullable Date theRangeStartInclusive,
@Nonnull Date theRangeEndInclusive) {
return (HistoryBuilder) myApplicationContext.getBean(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -38,7 +39,7 @@ public class JpaBulkDataExportHistoryHelper implements IBulkDataExportHistoryHel
@Override
public IBundleProvider fetchHistoryForResourceIds(
@Nonnull String theResourceType,
@Nonnull List<String> theIdList,
@Nonnull List<IResourcePersistentId<?>> theIdList,
RequestPartitionId theRequestPartitionId,
@Nullable Date theRangeStartInclusive,
@Nonnull Date theRangeEndInclusive) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -124,7 +125,7 @@ public IBundleProvider history(
*/
public IBundleProvider historyFromResourceIds(
String theResourceType,
@Nullable List<String> theResourceIds,
@Nullable List<IResourcePersistentId<?>> theResourceIds,
RequestPartitionId theRequestPartitionId,
@Nullable Date theRangeStartInclusive,
@Nonnull Date theRangeEndInclusive) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -50,7 +51,7 @@ public class PersistedJpaIdSearchBundleProvider implements IBundleProvider {

private final String myUuid;
private final @Nonnull String myResourceType;
private final @Nonnull List<String> myResourceIds;
private final @Nonnull List<IResourcePersistentId<?>> myResourceIds;
private final RequestPartitionId myPartitionId;
private final Date myRangeStartInclusive;
private final @Nonnull Date myRangeEndInclusive;
Expand All @@ -66,7 +67,7 @@ public class PersistedJpaIdSearchBundleProvider implements IBundleProvider {

public PersistedJpaIdSearchBundleProvider(
@Nonnull String theResourceType,
@Nonnull List<String> theResourceIds,
@Nonnull List<IResourcePersistentId<?>> theResourceIds,
RequestPartitionId thePartitionId,
@Nullable Date theRangeStartInclusive,
@Nonnull Date theRangeEndInclusive) {
Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-jpaserver-elastic-test-utilities/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>8.5.8-SNAPSHOT</version>
<version>8.5.9-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-jpaserver-hfql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>8.5.8-SNAPSHOT</version>
<version>8.5.9-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-jpaserver-ips/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>8.5.8-SNAPSHOT</version>
<version>8.5.9-SNAPSHOT</version>

<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-jpaserver-mdm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>8.5.8-SNAPSHOT</version>
<version>8.5.9-SNAPSHOT</version>
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-jpaserver-model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>8.5.8-SNAPSHOT</version>
<version>8.5.9-SNAPSHOT</version>

<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent>
Expand Down
2 changes: 1 addition & 1 deletion hapi-fhir-jpaserver-searchparam/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-deployable-pom</artifactId>
<version>8.5.8-SNAPSHOT</version>
<version>8.5.9-SNAPSHOT</version>

<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
</parent>
Expand Down
Loading
Loading