diff --git a/hapi-deployable-pom/pom.xml b/hapi-deployable-pom/pom.xml index b78f2610b0a..a341c9477b1 100644 --- a/hapi-deployable-pom/pom.xml +++ b/hapi-deployable-pom/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-android/pom.xml b/hapi-fhir-android/pom.xml index 03fb806379f..eac71d52182 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-base/pom.xml b/hapi-fhir-base/pom.xml index 9f950a9f42c..af2f200f083 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-bom/pom.xml b/hapi-fhir-bom/pom.xml index 7726fc7198b..5115fc49cdc 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT pom HAPI FHIR BOM ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-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 6c7599ba5d8..0526bb76355 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-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 fedc3ab12cf..3c4f732f362 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-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 3a4f1a69e0d..e91a6006e27 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../../hapi-deployable-pom diff --git a/hapi-fhir-cli/pom.xml b/hapi-fhir-cli/pom.xml index 5a7e5fb4a75..bf256b18666 100644 --- a/hapi-fhir-cli/pom.xml +++ b/hapi-fhir-cli/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-client-okhttp/pom.xml b/hapi-fhir-client-okhttp/pom.xml index af07f89d206..a764a8338dc 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-client/pom.xml b/hapi-fhir-client/pom.xml index 9b80dcfc050..ce79a788494 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-converter/pom.xml b/hapi-fhir-converter/pom.xml index c6fde35a95f..117c40e5d8f 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-dist/pom.xml b/hapi-fhir-dist/pom.xml index 740c5fbd51e..c80e074b76a 100644 --- a/hapi-fhir-dist/pom.xml +++ b/hapi-fhir-dist/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-docs/pom.xml b/hapi-fhir-docs/pom.xml index 904dbaad99d..8b67cd911d1 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_5_0/2741-fix-history-paging.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_5_0/2741-fix-history-paging.yaml new file mode 100644 index 00000000000..af208c88146 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/5_5_0/2741-fix-history-paging.yaml @@ -0,0 +1,5 @@ +--- +type: fix +issue: 2741 +title: "A regression caused the JPA Server History operation to not return paging links in responses. This + has been corrected." diff --git a/hapi-fhir-jacoco/pom.xml b/hapi-fhir-jacoco/pom.xml index 91086c4e661..dbf55d3c96c 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jaxrsserver-base/pom.xml b/hapi-fhir-jaxrsserver-base/pom.xml index ca13ac36381..c0bc2a89836 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jaxrsserver-example/pom.xml b/hapi-fhir-jaxrsserver-example/pom.xml index 9259b74dfdb..0869d53877f 100644 --- a/hapi-fhir-jaxrsserver-example/pom.xml +++ b/hapi-fhir-jaxrsserver-example/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-jpaserver-api/pom.xml b/hapi-fhir-jpaserver-api/pom.xml index 5a8f35f6464..97307edbc5f 100644 --- a/hapi-fhir-jpaserver-api/pom.xml +++ b/hapi-fhir-jpaserver-api/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirResourceDao.java b/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirResourceDao.java index 4dd821fede5..b0e1b0db28c 100644 --- a/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirResourceDao.java +++ b/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirResourceDao.java @@ -120,9 +120,9 @@ public interface IFhirResourceDao extends IDao { Class getResourceType(); - IBundleProvider history(Date theSince, Date theUntil, RequestDetails theRequestDetails); + IBundleProvider history(Date theSince, Date theUntil, Integer theOffset, RequestDetails theRequestDetails); - IBundleProvider history(IIdType theId, Date theSince, Date theUntil, RequestDetails theRequestDetails); + IBundleProvider history(IIdType theId, Date theSince, Date theUntil, Integer theOffset, RequestDetails theRequestDetails); /** * Not supported in DSTU1! diff --git a/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirSystemDao.java b/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirSystemDao.java index 00b2ffb8027..049e460294b 100644 --- a/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirSystemDao.java +++ b/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/dao/IFhirSystemDao.java @@ -22,6 +22,7 @@ package ca.uhn.fhir.jpa.api.dao; import ca.uhn.fhir.jpa.api.model.ExpungeOptions; import ca.uhn.fhir.jpa.api.model.ExpungeOutcome; +import ca.uhn.fhir.rest.annotation.Offset; import ca.uhn.fhir.rest.api.server.IBundleProvider; import ca.uhn.fhir.rest.api.server.RequestDetails; import org.hl7.fhir.instance.model.api.IBaseBundle; @@ -52,7 +53,7 @@ public interface IFhirSystemDao extends IDao { Map getResourceCountsFromCache(); - IBundleProvider history(Date theDate, Date theUntil, RequestDetails theRequestDetails); + IBundleProvider history(Date theDate, Date theUntil, Integer theOffset, RequestDetails theRequestDetails); /** * Not supported for DSTU1 diff --git a/hapi-fhir-jpaserver-base/pom.xml b/hapi-fhir-jpaserver-base/pom.xml index b63bf859954..b57f03e094c 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java index 381493d8997..4ff003396da 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java @@ -467,11 +467,12 @@ public abstract class BaseHapiFhirDao extends BaseStora return retVal; } - protected IBundleProvider history(RequestDetails theRequest, String theResourceType, Long theResourcePid, Date theRangeStartInclusive, Date theRangeEndInclusive) { + protected IBundleProvider history(RequestDetails theRequest, String theResourceType, Long theResourcePid, Date theRangeStartInclusive, Date theRangeEndInclusive, Integer theOffset) { String resourceName = defaultIfBlank(theResourceType, null); Search search = new Search(); + search.setOffset(theOffset); search.setDeleted(false); search.setCreated(new Date()); search.setLastUpdated(theRangeStartInclusive, theRangeEndInclusive); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java index e3bbf194245..af0c0c77b15 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirResourceDao.java @@ -831,20 +831,20 @@ public abstract class BaseHapiFhirResourceDao extends B @Override @Transactional - public IBundleProvider history(Date theSince, Date theUntil, RequestDetails theRequestDetails) { + public IBundleProvider history(Date theSince, Date theUntil, Integer theOffset, RequestDetails theRequestDetails) { // Notify interceptors ActionRequestDetails requestDetails = new ActionRequestDetails(theRequestDetails); notifyInterceptors(RestOperationTypeEnum.HISTORY_TYPE, requestDetails); StopWatch w = new StopWatch(); - IBundleProvider retVal = super.history(theRequestDetails, myResourceName, null, theSince, theUntil); + IBundleProvider retVal = super.history(theRequestDetails, myResourceName, null, theSince, theUntil, theOffset); ourLog.debug("Processed history on {} in {}ms", myResourceName, w.getMillisAndRestart()); return retVal; } @Override @Transactional - public IBundleProvider history(final IIdType theId, final Date theSince, Date theUntil, RequestDetails theRequest) { + public IBundleProvider history(final IIdType theId, final Date theSince, Date theUntil, Integer theOffset, RequestDetails theRequest) { if (theRequest != null) { // Notify interceptors ActionRequestDetails requestDetails = new ActionRequestDetails(theRequest, getResourceName(), theId); @@ -856,7 +856,7 @@ public abstract class BaseHapiFhirResourceDao extends B IIdType id = theId.withResourceType(myResourceName).toUnqualifiedVersionless(); BaseHasResource entity = readEntity(id, theRequest); - IBundleProvider retVal = super.history(theRequest, myResourceName, entity.getId(), theSince, theUntil); + IBundleProvider retVal = super.history(theRequest, myResourceName, entity.getId(), theSince, theUntil, theOffset); ourLog.debug("Processed history on {} in {}ms", id, w.getMillisAndRestart()); return retVal; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirSystemDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirSystemDao.java index 086c2228bf0..32d37758dde 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirSystemDao.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirSystemDao.java @@ -1,6 +1,5 @@ package ca.uhn.fhir.jpa.dao; -import ca.uhn.fhir.jpa.api.config.DaoConfig; import ca.uhn.fhir.jpa.api.dao.IFhirSystemDao; import ca.uhn.fhir.jpa.api.model.ExpungeOptions; import ca.uhn.fhir.jpa.api.model.ExpungeOutcome; @@ -93,7 +92,7 @@ public abstract class BaseHapiFhirSystemDao extends B } @Override - public IBundleProvider history(Date theSince, Date theUntil, RequestDetails theRequestDetails) { + public IBundleProvider history(Date theSince, Date theUntil, Integer theOffset, RequestDetails theRequestDetails) { if (theRequestDetails != null) { // Notify interceptors ActionRequestDetails requestDetails = new ActionRequestDetails(theRequestDetails); @@ -101,7 +100,7 @@ public abstract class BaseHapiFhirSystemDao extends B } StopWatch w = new StopWatch(); - IBundleProvider retVal = super.history(theRequestDetails, null, null, theSince, theUntil); + IBundleProvider retVal = super.history(theRequestDetails, null, null, theSince, theUntil, theOffset); ourLog.info("Processed global history in {}ms", w.getMillisAndRestart()); return retVal; } 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 e4b16d91d0e..215df4a34f5 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 @@ -95,7 +95,7 @@ public class HistoryBuilder { } @SuppressWarnings("OptionalIsPresent") - public List fetchEntities(RequestPartitionId thePartitionId, int theFromIndex, int theToIndex) { + public List fetchEntities(RequestPartitionId thePartitionId, Integer theOffset, int theFromIndex, int theToIndex) { CriteriaBuilder cb = myEntityManager.getCriteriaBuilder(); CriteriaQuery criteriaQuery = cb.createQuery(ResourceHistoryTable.class); Root from = criteriaQuery.from(ResourceHistoryTable.class); @@ -108,7 +108,12 @@ public class HistoryBuilder { TypedQuery query = myEntityManager.createQuery(criteriaQuery); - query.setFirstResult(theFromIndex); + int startIndex = theFromIndex; + if (theOffset != null) { + startIndex += theOffset; + } + query.setFirstResult(startIndex); + query.setMaxResults(theToIndex - theFromIndex); List tables = query.getResultList(); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/Search.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/Search.java index 604116f2907..e4c063cb2bc 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/Search.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/Search.java @@ -30,6 +30,7 @@ import javax.persistence.SequenceGenerator; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; +import javax.persistence.Transient; import javax.persistence.UniqueConstraint; import javax.persistence.Version; import java.io.Serializable; @@ -143,6 +144,13 @@ public class Search implements ICachedSearchDetails, Serializable { @Column(name = "SEARCH_PARAM_MAP", nullable = true) private byte[] mySearchParameterMap; + /** + * This isn't currently persisted in the DB as it's only used for history. We could + * change this if needed in the future. + */ + @Transient + private Integer myOffset; + /** * Constructor */ @@ -388,6 +396,14 @@ public class Search implements ICachedSearchDetails, Serializable { mySearchQueryStringHash = null; } + public void setOffset(Integer theOffset) { + myOffset = theOffset; + } + + public Integer getOffset() { + return myOffset; + } + @Nonnull public static String createSearchQueryStringForStorage(@Nonnull String theSearchQueryString, @Nonnull RequestPartitionId theRequestPartitionId) { String searchQueryString = theSearchQueryString; diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProvider.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProvider.java index 180286159f5..5ffbabdaeed 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProvider.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaResourceProvider.java @@ -32,6 +32,7 @@ import ca.uhn.fhir.rest.annotation.Create; import ca.uhn.fhir.rest.annotation.Delete; import ca.uhn.fhir.rest.annotation.History; import ca.uhn.fhir.rest.annotation.IdParam; +import ca.uhn.fhir.rest.annotation.Offset; import ca.uhn.fhir.rest.annotation.Operation; import ca.uhn.fhir.rest.annotation.OperationParam; import ca.uhn.fhir.rest.annotation.Patch; @@ -107,6 +108,7 @@ public abstract class BaseJpaResourceProvider extends B @History public IBundleProvider getHistoryForResourceInstance( HttpServletRequest theRequest, + @Offset Integer theOffset, @IdParam IIdType theId, @Since Date theSince, @At DateRangeParam theAt, @@ -115,7 +117,7 @@ public abstract class BaseJpaResourceProvider extends B startRequest(theRequest); try { DateRangeParam sinceOrAt = processSinceOrAt(theSince, theAt); - return myDao.history(theId, sinceOrAt.getLowerBoundAsInstant(), sinceOrAt.getUpperBoundAsInstant(), theRequestDetails); + return myDao.history(theId, sinceOrAt.getLowerBoundAsInstant(), sinceOrAt.getUpperBoundAsInstant(), theOffset, theRequestDetails); } finally { endRequest(theRequest); } @@ -124,13 +126,14 @@ public abstract class BaseJpaResourceProvider extends B @History public IBundleProvider getHistoryForResourceType( HttpServletRequest theRequest, + @Offset Integer theOffset, @Since Date theSince, @At DateRangeParam theAt, RequestDetails theRequestDetails) { startRequest(theRequest); try { DateRangeParam sinceOrAt = processSinceOrAt(theSince, theAt); - return myDao.history(sinceOrAt.getLowerBoundAsInstant(), sinceOrAt.getUpperBoundAsInstant(), theRequestDetails); + return myDao.history(sinceOrAt.getLowerBoundAsInstant(), sinceOrAt.getUpperBoundAsInstant(), theOffset, theRequestDetails); } finally { endRequest(theRequest); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaSystemProvider.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaSystemProvider.java index 1c8d23ab0d8..768cf9eef35 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaSystemProvider.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/BaseJpaSystemProvider.java @@ -27,6 +27,7 @@ import ca.uhn.fhir.jpa.model.util.JpaConstants; import ca.uhn.fhir.jpa.search.reindex.IResourceReindexingSvc; import ca.uhn.fhir.rest.annotation.At; import ca.uhn.fhir.rest.annotation.History; +import ca.uhn.fhir.rest.annotation.Offset; import ca.uhn.fhir.rest.annotation.Operation; import ca.uhn.fhir.rest.annotation.OperationParam; import ca.uhn.fhir.rest.annotation.Since; @@ -90,11 +91,16 @@ public class BaseJpaSystemProvider extends BaseJpaProvider implements IJp } @History - public IBundleProvider historyServer(HttpServletRequest theRequest, @Since Date theDate, @At DateRangeParam theAt, RequestDetails theRequestDetails) { + public IBundleProvider historyServer( + HttpServletRequest theRequest, + @Offset Integer theOffset, + @Since Date theDate, + @At DateRangeParam theAt, + RequestDetails theRequestDetails) { startRequest(theRequest); try { DateRangeParam range = super.processSinceOrAt(theDate, theAt); - return myDao.history(range.getLowerBoundAsInstant(), range.getUpperBoundAsInstant(), theRequestDetails); + return myDao.history(range.getLowerBoundAsInstant(), range.getUpperBoundAsInstant(), theOffset, theRequestDetails); } finally { endRequest(theRequest); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java index fba72b3bb37..9ad22b391c4 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java @@ -147,12 +147,12 @@ public class PersistedJpaBundleProvider implements IBundleProvider { /** * Perform a history search */ - private List doHistoryInTransaction(int theFromIndex, int theToIndex) { + private List doHistoryInTransaction(Integer theOffset, int theFromIndex, int theToIndex) { HistoryBuilder historyBuilder = myHistoryBuilderFactory.newHistoryBuilder(mySearchEntity.getResourceType(), mySearchEntity.getResourceId(), mySearchEntity.getLastUpdatedLow(), mySearchEntity.getLastUpdatedHigh()); RequestPartitionId partitionId = getRequestPartitionId(); - List results = historyBuilder.fetchEntities(partitionId, theFromIndex, theToIndex); + List results = historyBuilder.fetchEntities(partitionId, theOffset, theFromIndex, theToIndex); List retVal = new ArrayList<>(); for (ResourceHistoryTable next : results) { @@ -321,7 +321,7 @@ public class PersistedJpaBundleProvider implements IBundleProvider { switch (mySearchEntity.getSearchType()) { case HISTORY: - return template.execute(theStatus -> doHistoryInTransaction(theFromIndex, theToIndex)); + return template.execute(theStatus -> doHistoryInTransaction(mySearchEntity.getOffset(), theFromIndex, theToIndex)); case SEARCH: case EVERYTHING: default: diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2Test.java index b145aebcabe..a301fbb49d0 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirResourceDaoDstu2Test.java @@ -627,8 +627,8 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test { ourLog.info("***** About to perform search"); found = toUnqualifiedVersionlessIds(myOrganizationDao.search(map)); - runInTransaction(()->{ - ourLog.info("Resources:\n * {}", myResourceTableDao.findAll().stream().map(t->t.toString()).collect(Collectors.joining("\n * "))); + runInTransaction(() -> { + ourLog.info("Resources:\n * {}", myResourceTableDao.findAll().stream().map(t -> t.toString()).collect(Collectors.joining("\n * "))); }); assertThat(found.toString(), found, contains(orgId, patId)); @@ -655,7 +655,7 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test { public void testDeleteResource() { myDaoConfig.setHistoryCountMode(HistoryCountModeEnum.COUNT_ACCURATE); - int initialHistory = myPatientDao.history(null, null, mySrd).size(); + int initialHistory = myPatientDao.history(null, null, null, mySrd).size(); IIdType id1; IIdType id2; @@ -697,7 +697,7 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test { // good } - IBundleProvider history = myPatientDao.history(null, null, mySrd); + IBundleProvider history = myPatientDao.history(null, null, null, mySrd); assertEquals(4 + initialHistory, history.sizeOrThrowNpe()); List resources = history.getResources(0, 4); assertNotNull(ResourceMetadataKeyEnum.DELETED_AT.get((IResource) resources.get(0))); @@ -800,7 +800,7 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test { // ok } - IBundleProvider history = myPatientDao.history(id, null, null, mySrd); + IBundleProvider history = myPatientDao.history(id, null, null, null, mySrd); assertEquals(2, history.size().intValue()); assertNotNull(ResourceMetadataKeyEnum.DELETED_AT.get((IResource) history.getResources(0, 1).get(0))); @@ -1030,7 +1030,7 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test { ourLog.info("Forced IDs:\n{}", myForcedIdDao.findAll().stream().map(t -> t.toString()).collect(Collectors.joining("\n"))); }); - List patients = toList(myPatientDao.history(idv1.toVersionless(), null, null, mySrd)); + List patients = toList(myPatientDao.history(idv1.toVersionless(), null, null, null, mySrd)); assertTrue(patients.size() == 2); // Newest first assertEquals("Patient/testHistoryByForcedId/_history/2", patients.get(0).getId().toUnqualified().getValue()); @@ -1070,7 +1070,7 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test { } // By instance - IBundleProvider history = myPatientDao.history(id, null, null, mySrd); + IBundleProvider history = myPatientDao.history(id, null, null, null, mySrd); assertEquals(fullSize + 1, history.size().intValue()); for (int i = 0; i < fullSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); @@ -1079,7 +1079,7 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test { } // By type - history = myPatientDao.history(null, null, mySrd); + history = myPatientDao.history(null, null, null, mySrd); assertEquals(fullSize + 1, history.size().intValue()); for (int i = 0; i < fullSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); @@ -1088,7 +1088,7 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test { } // By server - history = mySystemDao.history(null, null, mySrd); + history = mySystemDao.history(null, null, null, mySrd); assertEquals(fullSize + 1, history.size().intValue()); for (int i = 0; i < fullSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); @@ -1101,7 +1101,7 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test { */ // By instance - history = myPatientDao.history(id, middleDate, null, mySrd); + history = myPatientDao.history(id, middleDate, null, null, mySrd); assertEquals(halfSize, history.size().intValue()); for (int i = 0; i < halfSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); @@ -1110,7 +1110,7 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test { } // By type - history = myPatientDao.history(middleDate, null, mySrd); + history = myPatientDao.history(middleDate, null, null, mySrd); assertEquals(halfSize, history.size().intValue()); for (int i = 0; i < halfSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); @@ -1119,7 +1119,7 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test { } // By server - history = mySystemDao.history(middleDate, null, mySrd); + history = mySystemDao.history(middleDate, null, null, mySrd); assertEquals(halfSize, history.size().intValue()); for (int i = 0; i < halfSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); @@ -1137,7 +1137,7 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test { halfSize++; // By instance - history = myPatientDao.history(id, null, null, mySrd); + history = myPatientDao.history(id, null, null, null, mySrd); for (int i = 0; i < fullSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); String actual = history.getResources(i, i + 1).get(0).getIdElement().getValue(); @@ -1146,7 +1146,7 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test { assertEquals(fullSize + 1, history.size().intValue(), log(history)); // By type - history = myPatientDao.history(null, null, mySrd); + history = myPatientDao.history(null, null, null, mySrd); for (int i = 0; i < fullSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); String actual = history.getResources(i, i + 1).get(0).getIdElement().getValue(); @@ -1157,7 +1157,7 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test { assertEquals(fullSize + 1, history.size().intValue(), log(history)); // fails? // By server - history = mySystemDao.history(null, null, mySrd); + history = mySystemDao.history(null, null, null, mySrd); for (int i = 0; i < fullSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); String actual = history.getResources(i, i + 1).get(0).getIdElement().getValue(); @@ -1170,7 +1170,7 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test { */ // By instance - history = myPatientDao.history(id, middleDate, null, mySrd); + history = myPatientDao.history(id, middleDate, null, null, mySrd); for (int i = 0; i < halfSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); String actual = history.getResources(i, i + 1).get(0).getIdElement().getValue(); @@ -1179,7 +1179,7 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test { assertEquals(halfSize, history.size().intValue()); // By type - history = myPatientDao.history(middleDate, null, mySrd); + history = myPatientDao.history(middleDate, null, null, mySrd); for (int i = 0; i < halfSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); String actual = history.getResources(i, i + 1).get(0).getIdElement().getValue(); @@ -1188,7 +1188,7 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test { assertEquals(halfSize, history.size().intValue()); // By server - history = mySystemDao.history(middleDate, null, mySrd); + history = mySystemDao.history(middleDate, null, null, mySrd); for (int i = 0; i < halfSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); String actual = history.getResources(i, i + 1).get(0).getIdElement().getValue(); @@ -1210,7 +1210,7 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test { patient.setId(id); myPatientDao.update(patient, mySrd); - IBundleProvider history = myPatientDao.history(id, null, null, mySrd); + IBundleProvider history = myPatientDao.history(id, null, null, null, mySrd); assertEquals(3, history.size().intValue()); List entries = history.getResources(0, 3); ourLog.info("" + ResourceMetadataKeyEnum.UPDATED.get((IResource) entries.get(0))); @@ -2068,7 +2068,7 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test { @Test() public void testSortByComposite() { - + IIdType pid0; IIdType oid1; IIdType oid2; @@ -2086,55 +2086,55 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test { obs.getSubject().setReference(pid0); obs.getCode().addCoding().setCode("2345-7").setSystem("http://loinc.org"); obs.setValue(new StringDt("200")); - + oid1 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); - + ourLog.info("Observation: \n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); } - + { Observation obs = new Observation(); obs.addIdentifier().setSystem("urn:system").setValue("FOO"); obs.getSubject().setReference(pid0); obs.getCode().addCoding().setCode("2345-7").setSystem("http://loinc.org"); obs.setValue(new StringDt("300")); - + oid2 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); - + ourLog.info("Observation: \n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); } - + { Observation obs = new Observation(); obs.addIdentifier().setSystem("urn:system").setValue("FOO"); obs.getSubject().setReference(pid0); obs.getCode().addCoding().setCode("2345-7").setSystem("http://loinc.org"); obs.setValue(new StringDt("150")); - + oid3 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); - + ourLog.info("Observation: \n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); } - + { Observation obs = new Observation(); obs.addIdentifier().setSystem("urn:system").setValue("FOO"); obs.getSubject().setReference(pid0); obs.getCode().addCoding().setCode("2345-7").setSystem("http://loinc.org"); obs.setValue(new StringDt("250")); - + oid4 = myObservationDao.create(obs, mySrd).getId().toUnqualifiedVersionless(); - + ourLog.info("Observation: \n" + myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(obs)); } SearchParameterMap pm = new SearchParameterMap(); pm.setSort(new SortSpec(Observation.SP_CODE_VALUE_STRING)); - - + + IBundleProvider found = myObservationDao.search(pm); - + List list = toUnqualifiedVersionlessIds(found); assertEquals(4, list.size()); assertEquals(oid3, list.get(0)); @@ -2142,6 +2142,7 @@ public class FhirResourceDaoDstu2Test extends BaseJpaDstu2Test { assertEquals(oid4, list.get(2)); assertEquals(oid2, list.get(3)); } + @Test public void testSortByDate() { Patient p = new Patient(); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirSystemDaoDstu2Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirSystemDaoDstu2Test.java index c37fe62278b..0859e16d514 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirSystemDaoDstu2Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu2/FhirSystemDaoDstu2Test.java @@ -723,7 +723,7 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest { // ok } - IBundleProvider history = myPatientDao.history(id, null, null, mySrd); + IBundleProvider history = myPatientDao.history(id, null, null, null, mySrd); assertEquals(2, history.size().intValue()); assertNotNull(ResourceMetadataKeyEnum.DELETED_AT.get((IResource) history.getResources(0, 1).get(0))); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirDaoConcurrencyDstu3Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirDaoConcurrencyDstu3Test.java index abc7e7162e9..5f6f58ed4b0 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirDaoConcurrencyDstu3Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirDaoConcurrencyDstu3Test.java @@ -2,7 +2,6 @@ package ca.uhn.fhir.jpa.dao.dstu3; import ca.uhn.fhir.rest.api.server.IBundleProvider; import ca.uhn.fhir.util.StopWatch; -import ca.uhn.fhir.util.TestUtil; import org.apache.commons.collections4.comparators.ReverseComparator; import org.apache.commons.dbcp2.BasicDataSource; import org.hl7.fhir.dstu3.model.Bundle; @@ -12,7 +11,6 @@ import org.hl7.fhir.dstu3.model.IdType; import org.hl7.fhir.dstu3.model.Organization; import org.hl7.fhir.dstu3.model.Patient; import org.hl7.fhir.instance.model.api.IBaseResource; -import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -124,7 +122,7 @@ public class FhirDaoConcurrencyDstu3Test extends BaseJpaDstu3SystemTest { Long currentVersion = currentPatient.getIdElement().getVersionIdPartAsLong(); ourLog.info("Current version: {}", currentVersion); - IBundleProvider historyBundle = myPatientDao.history(new IdType("Patient/PID"),null,null,mySrd); + IBundleProvider historyBundle = myPatientDao.history(new IdType("Patient/PID"), null, null, null, mySrd); List resources = historyBundle.getResources(0, 1000); List versions = new ArrayList<>(); for (IBaseResource next : resources) { @@ -144,5 +142,4 @@ public class FhirDaoConcurrencyDstu3Test extends BaseJpaDstu3SystemTest { } - } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3Test.java index d440693ecfc..e543d2310f7 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoDstu3Test.java @@ -899,7 +899,7 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test { public void testDeleteResource() { myDaoConfig.setHistoryCountMode(HistoryCountModeEnum.COUNT_ACCURATE); - int initialHistory = myPatientDao.history(null, null, mySrd).size(); + int initialHistory = myPatientDao.history(null, null, null, mySrd).size(); IIdType id1; IIdType id2; @@ -942,7 +942,7 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test { // good } - IBundleProvider history = myPatientDao.history(null, null, mySrd); + IBundleProvider history = myPatientDao.history(null, null, null, mySrd); assertEquals(4 + initialHistory, history.size().intValue()); List resources = history.getResources(0, 4); assertNotNull(ResourceMetadataKeyEnum.DELETED_AT.get((IAnyResource) resources.get(0))); @@ -1051,7 +1051,7 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test { // ok } - IBundleProvider history = myPatientDao.history(id, null, null, mySrd); + IBundleProvider history = myPatientDao.history(id, null, null, null, mySrd); assertEquals(2, history.size().intValue()); assertNotNull(ResourceMetadataKeyEnum.DELETED_AT.get((IAnyResource) history.getResources(0, 1).get(0))); @@ -1275,7 +1275,7 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test { idv2 = myPatientDao.update(patient, mySrd).getId(); } - List patients = toList(myPatientDao.history(idv1.toVersionless(), null, null, mySrd)); + List patients = toList(myPatientDao.history(idv1.toVersionless(), null, null, null, mySrd)); assertTrue(patients.size() == 2); // Newest first assertEquals("Patient/testHistoryByForcedId/_history/2", patients.get(0).getIdElement().toUnqualified().getValue()); @@ -1310,7 +1310,7 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test { } // By instance - IBundleProvider history = myPatientDao.history(id, null, null, mySrd); + IBundleProvider history = myPatientDao.history(id, null, null, null, mySrd); assertEquals(fullSize + 1, history.size().intValue()); for (int i = 0; i < fullSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); @@ -1319,7 +1319,7 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test { } // By type - history = myPatientDao.history(null, null, mySrd); + history = myPatientDao.history(null, null, null, mySrd); assertEquals(fullSize + 1, history.size().intValue()); for (int i = 0; i < fullSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); @@ -1328,7 +1328,7 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test { } // By server - history = mySystemDao.history(null, null, mySrd); + history = mySystemDao.history(null, null, null, mySrd); assertEquals(fullSize + 1, history.size().intValue()); for (int i = 0; i < fullSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); @@ -1341,7 +1341,7 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test { */ // By instance - history = myPatientDao.history(id, middleDate, null, mySrd); + history = myPatientDao.history(id, middleDate, null, null, mySrd); assertEquals(halfSize, history.size().intValue()); for (int i = 0; i < halfSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); @@ -1350,7 +1350,7 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test { } // By type - history = myPatientDao.history(middleDate, null, mySrd); + history = myPatientDao.history(middleDate, null, null, mySrd); assertEquals(halfSize, history.size().intValue()); for (int i = 0; i < halfSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); @@ -1359,7 +1359,7 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test { } // By server - history = mySystemDao.history(middleDate, null, mySrd); + history = mySystemDao.history(middleDate, null, null, mySrd); assertEquals(halfSize, history.size().intValue()); for (int i = 0; i < halfSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); @@ -1377,7 +1377,7 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test { halfSize++; // By instance - history = myPatientDao.history(id, null, null, mySrd); + history = myPatientDao.history(id, null, null, null, mySrd); assertEquals(fullSize + 1, history.size().intValue()); for (int i = 0; i < fullSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); @@ -1386,7 +1386,7 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test { } // By type - history = myPatientDao.history(null, null, mySrd); + history = myPatientDao.history(null, null, null, mySrd); assertEquals(fullSize + 1, history.size().intValue()); for (int i = 0; i < fullSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); @@ -1395,7 +1395,7 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test { } // By server - history = mySystemDao.history(null, null, mySrd); + history = mySystemDao.history(null, null, null, mySrd); assertEquals(fullSize + 1, history.size().intValue()); for (int i = 0; i < fullSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); @@ -1408,7 +1408,7 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test { */ // By instance - history = myPatientDao.history(id, middleDate, null, mySrd); + history = myPatientDao.history(id, middleDate, null, null, mySrd); assertEquals(halfSize, history.size().intValue()); for (int i = 0; i < halfSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); @@ -1417,7 +1417,7 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test { } // By type - history = myPatientDao.history(middleDate, null, mySrd); + history = myPatientDao.history(middleDate, null, null, mySrd); assertEquals(halfSize, history.size().intValue()); for (int i = 0; i < halfSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); @@ -1426,7 +1426,7 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test { } // By server - history = mySystemDao.history(middleDate, null, mySrd); + history = mySystemDao.history(middleDate, null, null, mySrd); assertEquals(halfSize, history.size().intValue()); for (int i = 0; i < halfSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); @@ -1445,7 +1445,7 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test { inPatient.getMeta().addProfile("http://example.com/1"); IIdType id = myPatientDao.create(inPatient, mySrd).getId().toUnqualifiedVersionless(); - IBundleProvider history = myPatientDao.history(null, null, mySrd); + IBundleProvider history = myPatientDao.history(null, null, null, mySrd); assertEquals(1, history.size().intValue()); Patient outPatient = (Patient) history.getResources(0, 1).get(0); assertEquals("version1", inPatient.getName().get(0).getFamily()); @@ -1459,7 +1459,7 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test { inPatient.getMeta().addProfile("http://example.com/2"); myPatientDao.metaAddOperation(id, inPatient.getMeta(), mySrd); - history = myPatientDao.history(null, null, mySrd); + history = myPatientDao.history(null, null, null, mySrd); assertEquals(1, history.size().intValue()); outPatient = (Patient) history.getResources(0, 1).get(0); assertEquals("version1", inPatient.getName().get(0).getFamily()); @@ -1475,7 +1475,7 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test { inPatient.getName().get(0).setFamily("version2"); myPatientDao.update(inPatient, mySrd); - history = myPatientDao.history(null, null, mySrd); + history = myPatientDao.history(null, null, null, mySrd); assertEquals(2, history.size().intValue()); outPatient = (Patient) history.getResources(0, 2).get(0); assertEquals("version2", outPatient.getName().get(0).getFamily()); @@ -1501,7 +1501,7 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test { patient.setId(id); myPatientDao.update(patient, mySrd); - IBundleProvider history = myPatientDao.history(id, null, null, mySrd); + IBundleProvider history = myPatientDao.history(id, null, null, null, mySrd); List entries = history.getResources(0, 3); ourLog.info(entries.get(0).getIdElement() + " - " + entries.get(0).getMeta().getLastUpdated()); ourLog.info(entries.get(1).getIdElement() + " - " + entries.get(1).getMeta().getLastUpdated()); @@ -1545,13 +1545,13 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test { List idValues; - idValues = toUnqualifiedIdValues(myPatientDao.history(id, preDates.get(0), preDates.get(3), mySrd)); + idValues = toUnqualifiedIdValues(myPatientDao.history(id, preDates.get(0), preDates.get(3), null, mySrd)); assertThat(idValues, contains(ids.get(2), ids.get(1), ids.get(0))); - idValues = toUnqualifiedIdValues(myPatientDao.history(preDates.get(0), preDates.get(3), mySrd)); + idValues = toUnqualifiedIdValues(myPatientDao.history(preDates.get(0), preDates.get(3), null, mySrd)); assertThat(idValues, contains(ids.get(2), ids.get(1), ids.get(0))); - idValues = toUnqualifiedIdValues(mySystemDao.history(preDates.get(0), preDates.get(3), mySrd)); + idValues = toUnqualifiedIdValues(mySystemDao.history(preDates.get(0), preDates.get(3), null, mySrd)); assertThat(idValues, contains(ids.get(2), ids.get(1), ids.get(0))); } @@ -1572,7 +1572,7 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test { // No since - IBundleProvider history = myPatientDao.history(null, null, mySrd); + IBundleProvider history = myPatientDao.history(null, null, null, mySrd); assertEquals(1, history.size().intValue()); Patient outPatient = (Patient) history.getResources(0, 1).get(0); assertEquals("version1", inPatient.getName().get(0).getFamily()); @@ -1581,7 +1581,7 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test { // Before since - history = myPatientDao.history(before, null, mySrd); + history = myPatientDao.history(before, null, null, mySrd); assertEquals(1, history.size().intValue()); outPatient = (Patient) history.getResources(0, 1).get(0); assertEquals("version1", inPatient.getName().get(0).getFamily()); @@ -1590,7 +1590,7 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test { // After since - history = myPatientDao.history(after, null, mySrd); + history = myPatientDao.history(after, null, null, mySrd); assertEquals(0, history.size().intValue()); } @@ -1598,7 +1598,7 @@ public class FhirResourceDaoDstu3Test extends BaseJpaDstu3Test { @Test public void testHistoryWithInvalidId() throws Exception { try { - myPatientDao.history(new IdType("Patient/FOOFOOFOO"), null, null, mySrd); + myPatientDao.history(new IdType("Patient/FOOFOOFOO"), null, null, null, mySrd); fail(); } catch (ResourceNotFoundException e) { assertEquals("Resource Patient/FOOFOOFOO is not known", e.getMessage()); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirSystemDaoDstu3Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirSystemDaoDstu3Test.java index a879980e9f5..fc330a0e49d 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirSystemDaoDstu3Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/dstu3/FhirSystemDaoDstu3Test.java @@ -1340,7 +1340,7 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest { // ok } - IBundleProvider history = myPatientDao.history(id, null, null, mySrd); + IBundleProvider history = myPatientDao.history(id, null, null, null, mySrd); assertEquals(2, history.size().intValue()); assertNotNull(ResourceMetadataKeyEnum.DELETED_AT.get((IAnyResource) history.getResources(0, 1).get(0))); @@ -1437,7 +1437,7 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest { Bundle bundle = myFhirCtx.newJsonParser().parseResource(Bundle.class, input); mySystemDao.transaction(mySrd, bundle); - IBundleProvider history = mySystemDao.history(null, null, null); + IBundleProvider history = mySystemDao.history(null, null, null, null); Bundle list = toBundle(history); ourLog.info(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(list)); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ConsentEventsDaoR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ConsentEventsDaoR4Test.java index 975850a733f..e927da93ee1 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ConsentEventsDaoR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/ConsentEventsDaoR4Test.java @@ -315,7 +315,7 @@ public class ConsentEventsDaoR4Test extends BaseJpaR4SystemTest { // Perform a history SearchParameterMap map = new SearchParameterMap(); map.setSort(new SortSpec(Observation.SP_IDENTIFIER, SortOrderEnum.ASC)); - IBundleProvider outcome = myObservationDao.history(null, null, mySrd); + IBundleProvider outcome = myObservationDao.history(null, null, null, mySrd); ourLog.info("Search UUID: {}", outcome.getUuid()); // Fetch the first 10 (don't cross a fetch boundary) diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4ConcurrentWriteTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4ConcurrentWriteTest.java index 6e86e02e6b1..f547044b7ba 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4ConcurrentWriteTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4ConcurrentWriteTest.java @@ -54,7 +54,7 @@ import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -@SuppressWarnings({"unchecked", "deprecation", "Duplicates"}) +@SuppressWarnings({"deprecation", "Duplicates"}) @DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS) public class FhirResourceDaoR4ConcurrentWriteTest extends BaseJpaR4Test { @@ -267,7 +267,7 @@ public class FhirResourceDaoR4ConcurrentWriteTest extends BaseJpaR4Test { ourLog.info("Future produced success"); } catch (Exception e) { ourLog.info("Future produced exception: {}", e.toString()); - throw new AssertionError("Failed with message: " + e.toString(), e); + throw new AssertionError("Failed with message: " + e, e); } } @@ -397,7 +397,7 @@ public class FhirResourceDaoR4ConcurrentWriteTest extends BaseJpaR4Test { ourLog.info("Future produced success"); } catch (Exception e) { ourLog.info("Future produced exception: {}", e.toString()); - throw new AssertionError("Failed with message: " + e.toString(), e); + throw new AssertionError("Failed with message: " + e, e); } } @@ -449,12 +449,12 @@ public class FhirResourceDaoR4ConcurrentWriteTest extends BaseJpaR4Test { ourLog.info("Future produced success"); } catch (Exception e) { ourLog.info("Future produced exception: {}", e.toString()); - throw new AssertionError("Failed with message: " + e.toString(), e); + throw new AssertionError("Failed with message: " + e, e); } } // Make sure we saved the object - IBundleProvider patient = myPatientDao.history(patientId, null, null, null); + IBundleProvider patient = myPatientDao.history(patientId, null, null, null, null); assertThat(patient.sizeOrThrowNpe(), greaterThanOrEqualTo(3)); } @@ -485,8 +485,8 @@ public class FhirResourceDaoR4ConcurrentWriteTest extends BaseJpaR4Test { // this is expected since we're not retrying ourLog.info("Version conflict (expected): {}", e.getCause().toString()); } else { - ourLog.info("Future produced exception: {}", e.toString()); - throw new AssertionError("Failed with message: " + e.toString(), e); + ourLog.info("Future produced exception: {}", e); + throw new AssertionError("Failed with message: " + e, e); } } } @@ -521,8 +521,8 @@ public class FhirResourceDaoR4ConcurrentWriteTest extends BaseJpaR4Test { // this is expected since we're not retrying ourLog.info("Version conflict (expected): {}", e.getCause().toString()); } else { - ourLog.info("Future produced exception: {}", e.toString()); - throw new AssertionError("Failed with message: " + e.toString(), e); + ourLog.info("Future produced exception: {}", e); + throw new AssertionError("Failed with message: " + e, e); } } } @@ -561,8 +561,8 @@ public class FhirResourceDaoR4ConcurrentWriteTest extends BaseJpaR4Test { // this is expected since we're not retrying ourLog.info("Version conflict (expected): {}", e.getCause().toString()); } else { - ourLog.info("Future produced exception: {}", e.toString()); - throw new AssertionError("Failed with message: " + e.toString(), e); + ourLog.info("Future produced exception: {}", e); + throw new AssertionError("Failed with message: " + e, e); } } } @@ -616,7 +616,7 @@ public class FhirResourceDaoR4ConcurrentWriteTest extends BaseJpaR4Test { ourLog.info("Future produced success"); } catch (Exception e) { ourLog.info("Future produced exception: {}", e.toString()); - throw new AssertionError("Failed with message: " + e.toString(), e); + throw new AssertionError("Failed with message: " + e, e); } } @@ -668,7 +668,7 @@ public class FhirResourceDaoR4ConcurrentWriteTest extends BaseJpaR4Test { ourLog.info("Future produced success"); } catch (Exception e) { ourLog.info("Future produced exception: {}", e.toString()); - throw new AssertionError("Failed with message: " + e.toString(), e); + throw new AssertionError("Failed with message: " + e, e); } } @@ -726,7 +726,7 @@ public class FhirResourceDaoR4ConcurrentWriteTest extends BaseJpaR4Test { ourLog.info("Future produced success"); } catch (Exception e) { ourLog.info("Future produced exception: {}", e.toString()); - throw new AssertionError("Failed with message: " + e.toString(), e); + throw new AssertionError("Failed with message: " + e, e); } } diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4QueryCountTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4QueryCountTest.java index d420c556889..17d99f5dde1 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4QueryCountTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4QueryCountTest.java @@ -439,7 +439,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseJpaR4Test { myCaptureQueriesListener.clear(); runInTransaction(() -> { - IBundleProvider history = mySystemDao.history(null, null, null); + IBundleProvider history = mySystemDao.history(null, null, null, null); assertEquals(3, history.getResources(0, 99).size()); }); myCaptureQueriesListener.logSelectQueriesForCurrentThread(); @@ -456,7 +456,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseJpaR4Test { // Second time should leverage forced ID cache myCaptureQueriesListener.clear(); runInTransaction(() -> { - IBundleProvider history = mySystemDao.history(null, null, null); + IBundleProvider history = mySystemDao.history(null, null, null, null); assertEquals(3, history.getResources(0, 99).size()); }); myCaptureQueriesListener.logSelectQueriesForCurrentThread(); @@ -503,7 +503,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseJpaR4Test { myCaptureQueriesListener.clear(); runInTransaction(() -> { - IBundleProvider history = mySystemDao.history(null, null, null); + IBundleProvider history = mySystemDao.history(null, null, null, null); assertEquals(3, history.getResources(0, 3).size()); }); myCaptureQueriesListener.logSelectQueriesForCurrentThread(); @@ -519,7 +519,7 @@ public class FhirResourceDaoR4QueryCountTest extends BaseJpaR4Test { // Second time should leverage forced ID cache myCaptureQueriesListener.clear(); runInTransaction(() -> { - IBundleProvider history = mySystemDao.history(null, null, null); + IBundleProvider history = mySystemDao.history(null, null, null, null); assertEquals(3, history.getResources(0, 3).size()); }); myCaptureQueriesListener.logSelectQueriesForCurrentThread(); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4TagsTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4TagsTest.java index ee1ff16af4c..b51cec41164 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4TagsTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4TagsTest.java @@ -17,7 +17,7 @@ import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.junit.jupiter.api.Assertions.assertEquals; -@SuppressWarnings({"unchecked", "deprecation", "Duplicates"}) +@SuppressWarnings({"Duplicates"}) public class FhirResourceDaoR4TagsTest extends BaseJpaR4Test { private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirResourceDaoR4TagsTest.class); @@ -86,7 +86,7 @@ public class FhirResourceDaoR4TagsTest extends BaseJpaR4Test { public void testStoreAndRetrieveVersionedTags_History() { initializeVersioned(); - IBundleProvider history = myPatientDao.history(null, null, mySrd); + IBundleProvider history = myPatientDao.history(null, null, null, mySrd); // Version 1 Patient patient = (Patient) history.getResources(0, 999).get(1); @@ -104,7 +104,7 @@ public class FhirResourceDaoR4TagsTest extends BaseJpaR4Test { public void testStoreAndRetrieveNonVersionedTags_History() { initializeNonVersioned(); - IBundleProvider history = myPatientDao.history(null, null, mySrd); + IBundleProvider history = myPatientDao.history(null, null, null, mySrd); // Version 1 Patient patient = (Patient) history.getResources(0, 999).get(1); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4Test.java index 100f9988c01..969c47a30ce 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4Test.java @@ -1373,7 +1373,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test { public void testDeleteResource() { myDaoConfig.setHistoryCountMode(HistoryCountModeEnum.COUNT_ACCURATE); - int initialHistory = myPatientDao.history(null, null, mySrd).size(); + int initialHistory = myPatientDao.history(null, null, null, mySrd).size(); IIdType id1; IIdType id2; @@ -1416,7 +1416,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test { // good } - IBundleProvider history = myPatientDao.history(null, null, mySrd); + IBundleProvider history = myPatientDao.history(null, null, null, mySrd); assertEquals(4 + initialHistory, history.size().intValue()); List resources = history.getResources(0, 4); assertNotNull(ResourceMetadataKeyEnum.DELETED_AT.get((IAnyResource) resources.get(0))); @@ -1591,7 +1591,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test { // ok } - IBundleProvider history = myPatientDao.history(id, null, null, mySrd); + IBundleProvider history = myPatientDao.history(id, null, null, null, mySrd); assertEquals(2, history.size().intValue()); assertNotNull(ResourceMetadataKeyEnum.DELETED_AT.get((IAnyResource) history.getResources(0, 1).get(0))); @@ -1838,7 +1838,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test { idv2 = myPatientDao.update(patient, mySrd).getId(); } - List patients = toList(myPatientDao.history(idv1.toVersionless(), null, null, mySrd)); + List patients = toList(myPatientDao.history(idv1.toVersionless(), null, null, null, mySrd)); assertTrue(patients.size() == 2); // Newest first assertEquals("Patient/testHistoryByForcedId/_history/2", patients.get(0).getIdElement().toUnqualified().getValue()); @@ -1872,7 +1872,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test { } // By instance - IBundleProvider history = myPatientDao.history(id, null, null, mySrd); + IBundleProvider history = myPatientDao.history(id, null, null, null, mySrd); assertEquals(fullSize + 1, history.size().intValue()); for (int i = 0; i < fullSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); @@ -1881,7 +1881,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test { } // By type - history = myPatientDao.history(null, null, mySrd); + history = myPatientDao.history(null, null, null, mySrd); assertEquals(fullSize + 1, history.size().intValue()); for (int i = 0; i < fullSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); @@ -1890,7 +1890,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test { } // By server - history = mySystemDao.history(null, null, mySrd); + history = mySystemDao.history(null, null, null, mySrd); assertEquals(fullSize + 1, history.size().intValue()); for (int i = 0; i < fullSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); @@ -1903,7 +1903,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test { */ // By instance - history = myPatientDao.history(id, middleDate, null, mySrd); + history = myPatientDao.history(id, middleDate, null, null, mySrd); assertEquals(halfSize, history.size().intValue()); for (int i = 0; i < halfSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); @@ -1912,7 +1912,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test { } // By type - history = myPatientDao.history(middleDate, null, mySrd); + history = myPatientDao.history(middleDate, null, null, mySrd); assertEquals(halfSize, history.size().intValue()); for (int i = 0; i < halfSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); @@ -1921,7 +1921,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test { } // By server - history = mySystemDao.history(middleDate, null, mySrd); + history = mySystemDao.history(middleDate, null, null, mySrd); assertEquals(halfSize, history.size().intValue()); for (int i = 0; i < halfSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); @@ -1939,7 +1939,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test { halfSize++; // By instance - history = myPatientDao.history(id, null, null, mySrd); + history = myPatientDao.history(id, null, null, null, mySrd); assertEquals(fullSize + 1, history.size().intValue()); for (int i = 0; i < fullSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); @@ -1948,7 +1948,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test { } // By type - history = myPatientDao.history(null, null, mySrd); + history = myPatientDao.history(null, null, null, mySrd); assertEquals(fullSize + 1, history.size().intValue()); for (int i = 0; i < fullSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); @@ -1957,7 +1957,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test { } // By server - history = mySystemDao.history(null, null, mySrd); + history = mySystemDao.history(null, null, null, mySrd); assertEquals(fullSize + 1, history.size().intValue()); for (int i = 0; i < fullSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); @@ -1970,7 +1970,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test { */ // By instance - history = myPatientDao.history(id, middleDate, null, mySrd); + history = myPatientDao.history(id, middleDate, null, null, mySrd); assertEquals(halfSize, history.size().intValue()); for (int i = 0; i < halfSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); @@ -1979,7 +1979,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test { } // By type - history = myPatientDao.history(middleDate, null, mySrd); + history = myPatientDao.history(middleDate, null, null, mySrd); assertEquals(halfSize, history.size().intValue()); for (int i = 0; i < halfSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); @@ -1988,7 +1988,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test { } // By server - history = mySystemDao.history(middleDate, null, mySrd); + history = mySystemDao.history(middleDate, null, null, mySrd); assertEquals(halfSize, history.size().intValue()); for (int i = 0; i < halfSize; i++) { String expected = id.withVersion(Integer.toString(fullSize + 1 - i)).getValue(); @@ -2007,7 +2007,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test { inPatient.getMeta().addProfile("http://example.com/1"); IIdType id = myPatientDao.create(inPatient, mySrd).getId().toUnqualifiedVersionless(); - IBundleProvider history = myPatientDao.history(null, null, mySrd); + IBundleProvider history = myPatientDao.history(null, null, null, mySrd); assertEquals(1, history.size().intValue()); Patient outPatient = (Patient) history.getResources(0, 1).get(0); assertEquals("version1", inPatient.getName().get(0).getFamily()); @@ -2021,7 +2021,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test { inPatient.getMeta().addProfile("http://example.com/2"); myPatientDao.metaAddOperation(id, inPatient.getMeta(), mySrd); - history = myPatientDao.history(null, null, mySrd); + history = myPatientDao.history(null, null, null, mySrd); assertEquals(1, history.size().intValue()); outPatient = (Patient) history.getResources(0, 1).get(0); assertEquals("version1", inPatient.getName().get(0).getFamily()); @@ -2037,7 +2037,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test { inPatient.getName().get(0).setFamily("version2"); myPatientDao.update(inPatient, mySrd); - history = myPatientDao.history(null, null, mySrd); + history = myPatientDao.history(null, null, null, mySrd); assertEquals(2, history.size().intValue()); outPatient = (Patient) history.getResources(0, 2).get(0); assertEquals("version2", outPatient.getName().get(0).getFamily()); @@ -2063,7 +2063,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test { patient.setId(id); myPatientDao.update(patient, mySrd); - IBundleProvider history = myPatientDao.history(id, null, null, mySrd); + IBundleProvider history = myPatientDao.history(id, null, null, null, mySrd); List entries = history.getResources(0, 3); ourLog.info(entries.get(0).getIdElement() + " - " + entries.get(0).getMeta().getLastUpdated()); ourLog.info(entries.get(1).getIdElement() + " - " + entries.get(1).getMeta().getLastUpdated()); @@ -2107,13 +2107,13 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test { List idValues; - idValues = toUnqualifiedIdValues(myPatientDao.history(id, preDates.get(0), preDates.get(3), mySrd)); + idValues = toUnqualifiedIdValues(myPatientDao.history(id, preDates.get(0), preDates.get(3), null, mySrd)); assertThat(idValues, contains(ids.get(2), ids.get(1), ids.get(0))); - idValues = toUnqualifiedIdValues(myPatientDao.history(preDates.get(0), preDates.get(3), mySrd)); + idValues = toUnqualifiedIdValues(myPatientDao.history(preDates.get(0), preDates.get(3), null, mySrd)); assertThat(idValues, contains(ids.get(2), ids.get(1), ids.get(0))); - idValues = toUnqualifiedIdValues(mySystemDao.history(preDates.get(0), preDates.get(3), mySrd)); + idValues = toUnqualifiedIdValues(mySystemDao.history(preDates.get(0), preDates.get(3), null, mySrd)); assertThat(idValues, contains(ids.get(2), ids.get(1), ids.get(0))); } @@ -2134,7 +2134,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test { // No since - IBundleProvider history = myPatientDao.history(null, null, mySrd); + IBundleProvider history = myPatientDao.history(null, null, null, mySrd); assertEquals(1, history.size().intValue()); Patient outPatient = (Patient) history.getResources(0, 1).get(0); assertEquals("version1", inPatient.getName().get(0).getFamily()); @@ -2143,7 +2143,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test { // Before since - history = myPatientDao.history(before, null, mySrd); + history = myPatientDao.history(before, null, null, mySrd); assertEquals(1, history.size().intValue()); outPatient = (Patient) history.getResources(0, 1).get(0); assertEquals("version1", inPatient.getName().get(0).getFamily()); @@ -2152,7 +2152,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test { // After since - history = myPatientDao.history(after, null, mySrd); + history = myPatientDao.history(after, null, null, mySrd); assertEquals(0, history.size().intValue()); } @@ -2160,7 +2160,7 @@ public class FhirResourceDaoR4Test extends BaseJpaR4Test { @Test public void testHistoryWithInvalidId() { try { - myPatientDao.history(new IdType("Patient/FOOFOOFOO"), null, null, mySrd); + myPatientDao.history(new IdType("Patient/FOOFOOFOO"), null, null, null, mySrd); fail(); } catch (ResourceNotFoundException e) { assertEquals("Resource Patient/FOOFOOFOO is not known", e.getMessage()); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4UpdateTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4UpdateTest.java index 110c4177aed..dac628e1146 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4UpdateTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4UpdateTest.java @@ -538,7 +538,7 @@ public class FhirResourceDaoR4UpdateTest extends BaseJpaR4Test { * Get history */ - IBundleProvider historyBundle = myPatientDao.history(outcome.getId(), null, null, mySrd); + IBundleProvider historyBundle = myPatientDao.history(outcome.getId(), null, null, null, mySrd); assertEquals(2, historyBundle.size().intValue()); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java index 24bd38d0eb3..7c753d06320 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirSystemDaoR4Test.java @@ -2065,7 +2065,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest { // ok } - IBundleProvider history = myPatientDao.history(id, null, null, mySrd); + IBundleProvider history = myPatientDao.history(id, null, null, null, mySrd); assertEquals(2, history.size().intValue()); assertNotNull(ResourceMetadataKeyEnum.DELETED_AT.get((IAnyResource) history.getResources(0, 1).get(0))); @@ -2162,7 +2162,7 @@ public class FhirSystemDaoR4Test extends BaseJpaR4SystemTest { Bundle bundle = myFhirCtx.newJsonParser().parseResource(Bundle.class, input); mySystemDao.transaction(mySrd, bundle); - IBundleProvider history = mySystemDao.history(null, null, null); + IBundleProvider history = mySystemDao.history(null, null, null, null); Bundle list = toBundleR4(history); ourLog.info(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(list)); diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/JpaHistoryR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/JpaHistoryR4Test.java index 13750e8a2f6..8c9ec09fda1 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/JpaHistoryR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/JpaHistoryR4Test.java @@ -48,7 +48,7 @@ public class JpaHistoryR4Test extends BaseJpaR4SystemTest { */ myCaptureQueriesListener.clear(); - IBundleProvider history = myPatientDao.history(null, null, new SystemRequestDetails()); + IBundleProvider history = myPatientDao.history(null, null, null, new SystemRequestDetails()); // Simulate the server requesting the Bundle.total value assertEquals(null, history.size()); @@ -75,7 +75,7 @@ public class JpaHistoryR4Test extends BaseJpaR4SystemTest { */ myCaptureQueriesListener.clear(); - IBundleProvider history = myPatientDao.history(null, null, new SystemRequestDetails()); + IBundleProvider history = myPatientDao.history(null, null, null, new SystemRequestDetails()); // Simulate the server requesting the Bundle.total value assertEquals(20, history.sizeOrThrowNpe()); @@ -95,7 +95,7 @@ public class JpaHistoryR4Test extends BaseJpaR4SystemTest { */ myCaptureQueriesListener.clear(); - history = myPatientDao.history(null, null, new SystemRequestDetails()); + history = myPatientDao.history(null, null, null, new SystemRequestDetails()); // Simulate the server requesting the Bundle.total value assertEquals(20, history.sizeOrThrowNpe()); @@ -121,7 +121,7 @@ public class JpaHistoryR4Test extends BaseJpaR4SystemTest { */ myCaptureQueriesListener.clear(); - IBundleProvider history = myPatientDao.history(null, null, new SystemRequestDetails()); + IBundleProvider history = myPatientDao.history(null, null, null, new SystemRequestDetails()); // Simulate the server requesting the Bundle.total value assertEquals(20, history.sizeOrThrowNpe()); @@ -143,7 +143,7 @@ public class JpaHistoryR4Test extends BaseJpaR4SystemTest { */ myCaptureQueriesListener.clear(); - history = myPatientDao.history(null, null, new SystemRequestDetails()); + history = myPatientDao.history(null, null, null, new SystemRequestDetails()); // Simulate the server requesting the Bundle.total value assertEquals(20, history.sizeOrThrowNpe()); @@ -171,7 +171,7 @@ public class JpaHistoryR4Test extends BaseJpaR4SystemTest { */ myCaptureQueriesListener.clear(); - IBundleProvider history = myPatientDao.history(null, new Date(), new SystemRequestDetails()); + IBundleProvider history = myPatientDao.history(null, new Date(), null, new SystemRequestDetails()); // No count since there is an offset assertEquals(null, history.size()); @@ -196,7 +196,7 @@ public class JpaHistoryR4Test extends BaseJpaR4SystemTest { */ myCaptureQueriesListener.clear(); - IBundleProvider history = mySystemDao.history(null, null, new SystemRequestDetails()); + IBundleProvider history = mySystemDao.history(null, null, null, new SystemRequestDetails()); // Simulate the server requesting the Bundle.total value assertEquals(20, history.sizeOrThrowNpe()); @@ -218,7 +218,7 @@ public class JpaHistoryR4Test extends BaseJpaR4SystemTest { */ myCaptureQueriesListener.clear(); - history = mySystemDao.history(null, null, new SystemRequestDetails()); + history = mySystemDao.history(null, null, null, new SystemRequestDetails()); // Simulate the server requesting the Bundle.total value assertEquals(20, history.sizeOrThrowNpe()); @@ -244,7 +244,7 @@ public class JpaHistoryR4Test extends BaseJpaR4SystemTest { ExecutorService threadPool = Executors.newFixedThreadPool(20); try { Runnable task = () -> { - IBundleProvider history = mySystemDao.history(null, null, new SystemRequestDetails()); + IBundleProvider history = mySystemDao.history(null, null, null, new SystemRequestDetails()); assertEquals(20, history.sizeOrThrowNpe()); assertEquals(20, history.getResources(0, 999).size()); }; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/PartitioningSqlR4Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/PartitioningSqlR4Test.java index fb94fee9e53..c613c40e7a6 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/PartitioningSqlR4Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/PartitioningSqlR4Test.java @@ -2754,7 +2754,7 @@ public class PartitioningSqlR4Test extends BasePartitioningR4Test { addReadPartition(1); myCaptureQueriesListener.clear(); - IBundleProvider results = myPatientDao.history(id, null, null, mySrd); + IBundleProvider results = myPatientDao.history(id, null, null, null, mySrd); assertEquals(2, results.sizeOrThrowNpe()); List ids = toUnqualifiedIdValues(results); assertThat(ids, contains(id.withVersion("2").getValue(), id.withVersion("1").getValue())); @@ -2791,7 +2791,7 @@ public class PartitioningSqlR4Test extends BasePartitioningR4Test { addReadPartition(2); try { - myPatientDao.history(id, null, null, mySrd); + myPatientDao.history(id, null, null, null, mySrd); fail(); } catch (ResourceNotFoundException e) { // good @@ -2811,7 +2811,7 @@ public class PartitioningSqlR4Test extends BasePartitioningR4Test { addReadDefaultPartition(); myCaptureQueriesListener.clear(); - IBundleProvider results = myPatientDao.history(id, null, null, mySrd); + IBundleProvider results = myPatientDao.history(id, null, null, null, mySrd); assertEquals(2, results.sizeOrThrowNpe()); List ids = toUnqualifiedIdValues(results); assertThat(ids, contains(id.withVersion("2").getValue(), id.withVersion("1").getValue())); @@ -2847,7 +2847,7 @@ public class PartitioningSqlR4Test extends BasePartitioningR4Test { addReadAllPartitions(); myCaptureQueriesListener.clear(); - IBundleProvider results = myPatientDao.history(id, null, null, mySrd); + IBundleProvider results = myPatientDao.history(id, null, null, null, mySrd); assertEquals(2, results.sizeOrThrowNpe()); List ids = toUnqualifiedIdValues(results); assertThat(ids, contains(id.withVersion("2").getValue(), id.withVersion("1").getValue())); @@ -2857,7 +2857,7 @@ public class PartitioningSqlR4Test extends BasePartitioningR4Test { public void testHistory_Server() { addReadAllPartitions(); try { - mySystemDao.history(null, null, mySrd).size(); + mySystemDao.history(null, null, null, mySrd).size(); fail(); } catch (InvalidRequestException e) { assertEquals("Type- and Server- level history operation not supported across partitions on partitioned server", e.getMessage()); @@ -2876,7 +2876,7 @@ public class PartitioningSqlR4Test extends BasePartitioningR4Test { addReadPartition(1); myCaptureQueriesListener.clear(); - IBundleProvider results = mySystemDao.history(null, null, mySrd); + IBundleProvider results = mySystemDao.history(null, null, null, mySrd); assertEquals(2, results.sizeOrThrowNpe()); List ids = toUnqualifiedIdValues(results); assertThat(ids, contains(id1B.withVersion("1").getValue(), id1A.withVersion("1").getValue())); @@ -2908,7 +2908,7 @@ public class PartitioningSqlR4Test extends BasePartitioningR4Test { addReadDefaultPartition(); myCaptureQueriesListener.clear(); - IBundleProvider results = mySystemDao.history(null, null, mySrd); + IBundleProvider results = mySystemDao.history(null, null, null, mySrd); assertEquals(2, results.sizeOrThrowNpe()); List ids = toUnqualifiedIdValues(results); assertThat(ids, contains(id1B.withVersion("1").getValue(), id1A.withVersion("1").getValue())); @@ -2945,7 +2945,7 @@ public class PartitioningSqlR4Test extends BasePartitioningR4Test { { addReadPartition(2, null); myCaptureQueriesListener.clear(); - IBundleProvider results = mySystemDao.history(null, null, mySrd); + IBundleProvider results = mySystemDao.history(null, null, null, mySrd); assertEquals(4, results.sizeOrThrowNpe()); List ids = toUnqualifiedVersionlessIdValues(results); assertThat(ids, contains(id22, id21, idNull2, idNull1)); @@ -2955,7 +2955,7 @@ public class PartitioningSqlR4Test extends BasePartitioningR4Test { { addReadPartition(2, 3); myCaptureQueriesListener.clear(); - IBundleProvider results = mySystemDao.history(null, null, mySrd); + IBundleProvider results = mySystemDao.history(null, null, null, mySrd); assertEquals(4, results.sizeOrThrowNpe()); List ids = toUnqualifiedVersionlessIdValues(results); assertThat(ids, contains(id32, id22, id31, id21)); @@ -2967,7 +2967,7 @@ public class PartitioningSqlR4Test extends BasePartitioningR4Test { public void testHistory_Type_AllPartitions() { addReadAllPartitions(); try { - myPatientDao.history(null, null, mySrd).size(); + myPatientDao.history(null, null, null, mySrd).size(); fail(); } catch (InvalidRequestException e) { assertEquals("Type- and Server- level history operation not supported across partitions on partitioned server", e.getMessage()); @@ -2986,7 +2986,7 @@ public class PartitioningSqlR4Test extends BasePartitioningR4Test { addReadPartition(1); myCaptureQueriesListener.clear(); - IBundleProvider results = myPatientDao.history(null, null, mySrd); + IBundleProvider results = myPatientDao.history(null, null, null, mySrd); assertEquals(2, results.sizeOrThrowNpe()); List ids = toUnqualifiedIdValues(results); assertThat(ids, contains(id1B.withVersion("1").getValue(), id1A.withVersion("1").getValue())); @@ -3018,7 +3018,7 @@ public class PartitioningSqlR4Test extends BasePartitioningR4Test { addReadDefaultPartition(); myCaptureQueriesListener.clear(); - IBundleProvider results = myPatientDao.history(null, null, mySrd); + IBundleProvider results = myPatientDao.history(null, null, null, mySrd); assertEquals(2, results.sizeOrThrowNpe()); List ids = toUnqualifiedIdValues(results); assertThat(ids, contains(id1B.withVersion("1").getValue(), id1A.withVersion("1").getValue())); 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 fad640a3c32..73233bd5e84 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 @@ -2734,6 +2734,106 @@ public class ResourceProviderR4Test extends BaseResourceProviderR4Test { } } + @Test + public void testHistoryPaging() { + + Patient patient = new Patient(); + patient.setId("Patient/A"); + patient.setActive(true); + myClient.update().resource(patient).execute(); + patient.setActive(false); + myClient.update().resource(patient).execute(); + + sleepAtLeast(100); + Date midDate = new Date(); + sleepAtLeast(100); + + patient.setActive(true); + myClient.update().resource(patient).execute(); + patient.setActive(false); + myClient.update().resource(patient).execute(); + patient.setActive(true); + myClient.update().resource(patient).execute(); + patient.setActive(false); + myClient.update().resource(patient).execute(); + + Bundle history = myClient + .history() + .onInstance("Patient/A") + .returnBundle(Bundle.class) + .prettyPrint() + .count(2) + .execute(); + + assertThat(toUnqualifiedIdValues(history).toString(), toUnqualifiedIdValues(history), contains( + "Patient/A/_history/6", + "Patient/A/_history/5" + )); + + history = myClient + .loadPage() + .next(history) + .execute(); + + assertThat(toUnqualifiedIdValues(history).toString(), toUnqualifiedIdValues(history), contains( + "Patient/A/_history/4", + "Patient/A/_history/3" + )); + + history = myClient + .loadPage() + .next(history) + .execute(); + + assertThat(toUnqualifiedIdValues(history).toString(), toUnqualifiedIdValues(history), contains( + "Patient/A/_history/2", + "Patient/A/_history/1" + )); + + history = myClient + .loadPage() + .next(history) + .execute(); + + assertEquals(0, history.getEntry().size()); + + /* + * Try with a date offset + */ + + history = myClient + .history() + .onInstance("Patient/A") + .returnBundle(Bundle.class) + .since(midDate) + .prettyPrint() + .count(2) + .execute(); + + assertThat(toUnqualifiedIdValues(history).toString(), toUnqualifiedIdValues(history), contains( + "Patient/A/_history/6", + "Patient/A/_history/5" + )); + + history = myClient + .loadPage() + .next(history) + .execute(); + + assertThat(toUnqualifiedIdValues(history).toString(), toUnqualifiedIdValues(history), contains( + "Patient/A/_history/4", + "Patient/A/_history/3" + )); + + history = myClient + .loadPage() + .next(history) + .execute(); + + assertEquals(0, history.getEntry().size()); + + } + // private void delete(String theResourceType, String theParamName, String theParamValue) { // Bundle resources; // do { diff --git a/hapi-fhir-jpaserver-batch/pom.xml b/hapi-fhir-jpaserver-batch/pom.xml index 81bae492c0d..a4b3209addc 100644 --- a/hapi-fhir-jpaserver-batch/pom.xml +++ b/hapi-fhir-jpaserver-batch/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-cql/pom.xml b/hapi-fhir-jpaserver-cql/pom.xml index 11b191a82fd..b0546558bba 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-mdm/pom.xml b/hapi-fhir-jpaserver-mdm/pom.xml index e4400ce6f15..8dec0d074d2 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-migrate/pom.xml b/hapi-fhir-jpaserver-migrate/pom.xml index 57a8359900e..a64c35e1897 100644 --- a/hapi-fhir-jpaserver-migrate/pom.xml +++ b/hapi-fhir-jpaserver-migrate/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 5.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-model/pom.xml b/hapi-fhir-jpaserver-model/pom.xml index 04cf917ab2c..e1990391db6 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-searchparam/pom.xml b/hapi-fhir-jpaserver-searchparam/pom.xml index 8f31f6381f8..27cbd49dc0b 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-subscription/pom.xml b/hapi-fhir-jpaserver-subscription/pom.xml index 2186d5df5c0..537b12ba6d9 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-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 78dd1bcb6a6..5018f4db8f0 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml index c13bbe12e31..5a1f3d439a0 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-server-mdm/pom.xml b/hapi-fhir-server-mdm/pom.xml index 52cf5f3899f..bf1e50dd9e9 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-server-openapi/pom.xml b/hapi-fhir-server-openapi/pom.xml index 9bb7968fc01..6dbd96f48be 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-server/pom.xml b/hapi-fhir-server/pom.xml index 68ba1c603b4..50ca33467f1 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/BaseResourceReturningMethodBinding.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/BaseResourceReturningMethodBinding.java index 59e9a790e1b..584ec7aab19 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/BaseResourceReturningMethodBinding.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/BaseResourceReturningMethodBinding.java @@ -161,7 +161,7 @@ public abstract class BaseResourceReturningMethodBinding extends BaseMethodBindi } numToReturn = pageSize; - if (requestOffset != null) { + if (requestOffset != null && !isOffsetModeHistory()) { // When offset query is done theResult already contains correct amount (+ their includes etc.) so return everything resourceList = theResult.getResources(0, Integer.MAX_VALUE); } else if (numToReturn > 0) { @@ -238,7 +238,7 @@ public abstract class BaseResourceReturningMethodBinding extends BaseMethodBindi BundleLinks links = new BundleLinks(theRequest.getFhirServerBase(), theIncludes, RestfulServerUtils.prettyPrintResponse(theServer, theRequest), theBundleType); links.setSelf(theLinkSelf); - if (requestOffset != null || (!theServer.canStoreSearchResults() && !isEverythingOperation(theRequest))) { + if (requestOffset != null || (!theServer.canStoreSearchResults() && !isEverythingOperation(theRequest)) || isOffsetModeHistory()) { int offset = requestOffset != null ? requestOffset : 0; // Paging without caching // We're doing requestOffset pages @@ -288,6 +288,10 @@ public abstract class BaseResourceReturningMethodBinding extends BaseMethodBindi } + protected boolean isOffsetModeHistory() { + return false; + } + private boolean isEverythingOperation(RequestDetails theRequest) { return (theRequest.getRestOperationType() == RestOperationTypeEnum.EXTENDED_OPERATION_TYPE || theRequest.getRestOperationType() == RestOperationTypeEnum.EXTENDED_OPERATION_INSTANCE) diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/HistoryMethodBinding.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/HistoryMethodBinding.java index ad88a6fc1ff..945defe9416 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/HistoryMethodBinding.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/method/HistoryMethodBinding.java @@ -103,6 +103,11 @@ public class HistoryMethodBinding extends BaseResourceReturningMethodBinding { return ReturnTypeEnum.BUNDLE; } + @Override + protected boolean isOffsetModeHistory() { + return true; + } + // ObjectUtils.equals is replaced by a JDK7 method.. @Override public MethodMatchEnum incomingServerRequestMatchesMethod(RequestDetails theRequest) { 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 124954e445b..ddddf2f6945 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-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 d1df21bac90..bc8b52dda18 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-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 68c411f9cc5..6648b8bfa16 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-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 9d45c6dac8c..63013992f4b 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-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 144916dbd79..f81e0914b05 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-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 c0a5a7c6d3d..7e8c6140e02 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-spring-boot/pom.xml b/hapi-fhir-spring-boot/pom.xml index 54cf20ae841..2b6d680a11d 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-structures-dstu2.1/pom.xml b/hapi-fhir-structures-dstu2.1/pom.xml index 20b6cd93ed4..edb8a60d62b 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-dstu2/pom.xml b/hapi-fhir-structures-dstu2/pom.xml index e48e2c9e47e..0857d2ad25c 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-dstu3/pom.xml b/hapi-fhir-structures-dstu3/pom.xml index 3f948893107..2e33baf3495 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-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 25c97f5cfe0..397925bccf6 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-r4/pom.xml b/hapi-fhir-structures-r4/pom.xml index 2bc4e431011..349894dc928 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-r5/pom.xml b/hapi-fhir-structures-r5/pom.xml index f4983fe0d63..d656094f02a 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-test-utilities/pom.xml b/hapi-fhir-test-utilities/pom.xml index ec8f238dc9e..c43cc47ccd8 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/RequestDetailsHelper.java b/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/RequestDetailsHelper.java index 2412c460644..ebb288a40fa 100644 --- a/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/RequestDetailsHelper.java +++ b/hapi-fhir-test-utilities/src/main/java/ca/uhn/fhir/test/utilities/RequestDetailsHelper.java @@ -1,5 +1,25 @@ package ca.uhn.fhir.test.utilities; +/*- + * #%L + * HAPI FHIR Test Utilities + * %% + * Copyright (C) 2014 - 2021 Smile CDR, Inc. + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + import ca.uhn.fhir.rest.api.server.RequestDetails; import ca.uhn.fhir.rest.server.RestfulServer; import ca.uhn.fhir.rest.server.servlet.ServletRequestDetails; diff --git a/hapi-fhir-testpage-overlay/pom.xml b/hapi-fhir-testpage-overlay/pom.xml index 9ba02267e32..0a6d845d572 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-validation-resources-dstu2.1/pom.xml b/hapi-fhir-validation-resources-dstu2.1/pom.xml index 48cc834ff1b..a58fc372368 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-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 47b0f5f2d2f..52125a86ff3 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-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 55584a21476..640ad528800 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-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 7ed3b447043..0631cd45e38 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-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 91aae22767a..3d92ecb11f3 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation/pom.xml b/hapi-fhir-validation/pom.xml index b11b46214d1..40728163aac 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-tinder-plugin/pom.xml b/hapi-tinder-plugin/pom.xml index 786006b36fd..6fb6706789a 100644 --- a/hapi-tinder-plugin/pom.xml +++ b/hapi-tinder-plugin/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../pom.xml @@ -58,37 +58,37 @@ ca.uhn.hapi.fhir hapi-fhir-structures-dstu3 - 5.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-structures-hl7org-dstu2 - 5.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-structures-r4 - 5.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-structures-r5 - 5.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-validation-resources-dstu2 - 5.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-validation-resources-dstu3 - 5.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ca.uhn.hapi.fhir hapi-fhir-validation-resources-r4 - 5.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT org.apache.velocity diff --git a/hapi-tinder-test/pom.xml b/hapi-tinder-test/pom.xml index 52d69dfa389..c51d1816e68 100644 --- a/hapi-tinder-test/pom.xml +++ b/hapi-tinder-test/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index acdec26591a..ecbed745db8 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-fhir pom - 5.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT HAPI-FHIR An open-source implementation of the FHIR specification in Java. https://hapifhir.io diff --git a/restful-server-example/pom.xml b/restful-server-example/pom.xml index 76d703ea123..17b9a02b40c 100644 --- a/restful-server-example/pom.xml +++ b/restful-server-example/pom.xml @@ -8,7 +8,7 @@ ca.uhn.hapi.fhir hapi-fhir - 5.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../pom.xml diff --git a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml index f73795c8c93..ea34beb93b4 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-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 fb63855c3b9..ed069dbf27a 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-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 f4e8adc2d2b..5ad0f2d0a38 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.5.0-PRE4-SNAPSHOT + 5.5.0-PRE5-SNAPSHOT ../../pom.xml