Make reference extractor more reusable (#4205)
* Refactor * Make reference extractor more reusable * Test fix * Test fix * Headers * Small refactor
This commit is contained in:
parent
d8dd42ced5
commit
7a39f8cbaf
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-bom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>HAPI FHIR BOM</name>
|
||||
|
||||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-cli</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../../hapi-deployable-pom</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -397,7 +397,7 @@ public class JpaBulkExportProcessor implements IBulkExportProcessor {
|
|||
// }
|
||||
Map<String, String> sourceResourceIdToGoldenResourceIdMap = new HashMap<>();
|
||||
goldenResourceToSourcePidMap.forEach((key, value) -> {
|
||||
String goldenResourceId = myIdHelperService.translatePidIdToForcedIdWithCache(new ResourcePersistentId(key)).orElse(key.toString());
|
||||
String goldenResourceId = myIdHelperService.translatePidIdToForcedIdWithCache(key).orElse(key.toString());
|
||||
PersistentIdToForcedIdMap pidsToForcedIds = myIdHelperService.translatePidsToForcedIds(value);
|
||||
|
||||
Set<String> sourceResourceIds = pidsToForcedIds.getResolvedResourceIds();
|
||||
|
|
|
@ -137,7 +137,6 @@ import javax.annotation.Nonnull;
|
|||
import javax.annotation.Nullable;
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.persistence.NoResultException;
|
||||
import javax.persistence.Parameter;
|
||||
import javax.persistence.TypedQuery;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
@ -514,30 +513,6 @@ public abstract class BaseHapiFhirResourceDao<T extends IBaseResource> extends B
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a base method outcome for a delete request for the provided ID.
|
||||
* <p>
|
||||
* Additional information may be set on the outcome.
|
||||
*
|
||||
* @param theId - the id of the object being deleted. Eg: Patient/123
|
||||
*/
|
||||
private DaoMethodOutcome createMethodOutcomeForDelete(String theId, String theKey) {
|
||||
DaoMethodOutcome outcome = new DaoMethodOutcome();
|
||||
|
||||
IIdType id = getContext().getVersion().newIdType();
|
||||
id.setValue(theId);
|
||||
outcome.setId(id);
|
||||
|
||||
IBaseOperationOutcome oo = OperationOutcomeUtil.newInstance(getContext());
|
||||
String message = getContext().getLocalizer().getMessage(BaseStorageDao.class, theKey, id);
|
||||
String severity = "information";
|
||||
String code = "informational";
|
||||
OperationOutcomeUtil.addIssue(getContext(), oo, severity, message, null, code);
|
||||
outcome.setOperationOutcome(oo);
|
||||
|
||||
return outcome;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DaoMethodOutcome delete(IIdType theId,
|
||||
DeleteConflictList theDeleteConflicts,
|
||||
|
@ -554,7 +529,7 @@ public abstract class BaseHapiFhirResourceDao<T extends IBaseResource> extends B
|
|||
// if not found, return an outcome anyways.
|
||||
// Because no object actually existed, we'll
|
||||
// just set the id and nothing else
|
||||
DaoMethodOutcome outcome = createMethodOutcomeForDelete(theId.getValue(), "deleteResourceNotExisting");
|
||||
DaoMethodOutcome outcome = createMethodOutcomeForResourceId(theId.getValue(), MESSAGE_KEY_DELETE_RESOURCE_NOT_EXISTING);
|
||||
return outcome;
|
||||
}
|
||||
|
||||
|
@ -564,7 +539,7 @@ public abstract class BaseHapiFhirResourceDao<T extends IBaseResource> extends B
|
|||
|
||||
// Don't delete again if it's already deleted
|
||||
if (isDeleted(entity)) {
|
||||
DaoMethodOutcome outcome = createMethodOutcomeForDelete(entity.getIdDt().getValue(), "deleteResourceAlreadyDeleted");
|
||||
DaoMethodOutcome outcome = createMethodOutcomeForResourceId(entity.getIdDt().getValue(), MESSAGE_KEY_DELETE_RESOURCE_ALREADY_DELETED);
|
||||
|
||||
// used to exist, so we'll set the persistent id
|
||||
outcome.setPersistentId(new ResourcePersistentId(entity.getResourceId()));
|
||||
|
|
|
@ -209,7 +209,7 @@ public class IdHelperService implements IIdHelperService {
|
|||
// is a forced id
|
||||
// we must resolve!
|
||||
if (myDaoConfig.isDeleteEnabled()) {
|
||||
retVal = new ResourcePersistentId(resolveResourceIdentity(theRequestPartitionId, theResourceType, id, theExcludeDeleted).getResourceId());
|
||||
retVal = resolveResourceIdentity(theRequestPartitionId, theResourceType, id, theExcludeDeleted).getPersistentId();
|
||||
retVals.put(id, retVal);
|
||||
} else {
|
||||
// fetch from cache... adding to cache if not available
|
||||
|
@ -248,6 +248,7 @@ public class IdHelperService implements IIdHelperService {
|
|||
*
|
||||
* @throws ResourceNotFoundException If the ID can not be found
|
||||
*/
|
||||
@Override
|
||||
public ResourcePersistentId resolveResourcePersistentIds(@Nonnull RequestPartitionId theRequestPartitionId, String theResourceType, String theId, boolean theExcludeDeleted){
|
||||
Validate.notNull(theId, "theId must not be null");
|
||||
|
||||
|
@ -578,13 +579,13 @@ public class IdHelperService implements IIdHelperService {
|
|||
.stream()
|
||||
.map(t -> new ResourceLookup((String) t[0], (Long) t[1], (Date) t[2]))
|
||||
.forEach(t -> {
|
||||
String id = t.getResourceId().toString();
|
||||
String id = t.getPersistentId().toString();
|
||||
if (!theTargets.containsKey(id)) {
|
||||
theTargets.put(id, new ArrayList<>());
|
||||
}
|
||||
theTargets.get(id).add(t);
|
||||
if (!myDaoConfig.isDeleteEnabled()) {
|
||||
String nextKey = Long.toString(t.getResourceId());
|
||||
String nextKey = t.getPersistentId().toString();
|
||||
myMemoryCacheService.putAfterCommit(MemoryCacheService.CacheEnum.RESOURCE_LOOKUP, nextKey, t);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -33,6 +33,7 @@ import ca.uhn.fhir.jpa.dao.BaseStorageDao;
|
|||
import ca.uhn.fhir.jpa.dao.MatchResourceUrlService;
|
||||
import ca.uhn.fhir.jpa.dao.data.IResourceIndexedComboStringUniqueDao;
|
||||
import ca.uhn.fhir.jpa.model.config.PartitionSettings;
|
||||
import ca.uhn.fhir.jpa.model.cross.IBasePersistedResource;
|
||||
import ca.uhn.fhir.jpa.model.entity.BaseResourceIndexedSearchParam;
|
||||
import ca.uhn.fhir.jpa.model.entity.ResourceIndexedComboStringUnique;
|
||||
import ca.uhn.fhir.jpa.model.entity.ResourceIndexedComboTokenNonUnique;
|
||||
|
@ -354,10 +355,10 @@ public class SearchParamWithInlineReferencesExtractor {
|
|||
ResourcePersistentId match;
|
||||
if (matches.isEmpty()) {
|
||||
|
||||
Optional<ResourceTable> placeholderOpt = myDaoResourceLinkResolver.createPlaceholderTargetIfConfiguredToDoSo(matchResourceType, nextRef, null, theRequest, theTransactionDetails);
|
||||
Optional<IBasePersistedResource> placeholderOpt = myDaoResourceLinkResolver.createPlaceholderTargetIfConfiguredToDoSo(matchResourceType, nextRef, null, theRequest, theTransactionDetails);
|
||||
if (placeholderOpt.isPresent()) {
|
||||
match = new ResourcePersistentId(placeholderOpt.get().getResourceId());
|
||||
match.setAssociatedResourceId(placeholderOpt.get().getIdType(myContext));
|
||||
match = placeholderOpt.get().getPersistentId();
|
||||
match.setAssociatedResourceId(placeholderOpt.get().getIdDt());
|
||||
theTransactionDetails.addResolvedMatchUrl(nextIdText, match);
|
||||
myMemoryCacheService.putAfterCommit(MemoryCacheService.CacheEnum.MATCH_URL, nextIdText, match);
|
||||
} else {
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.jpa.util;
|
|||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR Storage api
|
||||
* HAPI FHIR JPA Server
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2022 Smile CDR, Inc.
|
||||
* %%
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -21,19 +21,13 @@ package ca.uhn.fhir.jpa.model.cross;
|
|||
*/
|
||||
|
||||
import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId;
|
||||
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||
import org.hl7.fhir.instance.model.api.IIdType;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public interface IBasePersistedResource {
|
||||
public interface IBasePersistedResource extends IResourceLookup {
|
||||
|
||||
IIdType getIdDt();
|
||||
|
||||
/**
|
||||
* If the resource is deleted, returns the date/time that the resource was deleted at. Otherwise, returns <code>null</code>
|
||||
*/
|
||||
Date getDeleted();
|
||||
|
||||
ResourcePersistentId getPersistentId();
|
||||
|
||||
}
|
||||
|
|
|
@ -20,12 +20,18 @@ package ca.uhn.fhir.jpa.model.cross;
|
|||
* #L%
|
||||
*/
|
||||
|
||||
import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public interface IResourceLookup {
|
||||
String getResourceType();
|
||||
|
||||
Long getResourceId();
|
||||
|
||||
/**
|
||||
* If the resource is deleted, returns the date/time that the resource was deleted at. Otherwise, returns <code>null</code>
|
||||
*/
|
||||
Date getDeleted();
|
||||
|
||||
ResourcePersistentId getPersistentId();
|
||||
|
||||
}
|
||||
|
|
|
@ -20,6 +20,8 @@ package ca.uhn.fhir.jpa.model.cross;
|
|||
* #L%
|
||||
*/
|
||||
|
||||
import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class ResourceLookup implements IResourceLookup {
|
||||
|
@ -38,13 +40,13 @@ public class ResourceLookup implements IResourceLookup {
|
|||
return myResourceType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getResourceId() {
|
||||
return myResourcePid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getDeleted() {
|
||||
return myDeletedAt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourcePersistentId getPersistentId() {
|
||||
return new ResourcePersistentId(myResourcePid);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -525,7 +525,7 @@ public class SearchParamExtractorService {
|
|||
}
|
||||
|
||||
String targetResourceType = targetResource.getResourceType();
|
||||
Long targetResourcePid = targetResource.getResourceId();
|
||||
Long targetResourcePid = targetResource.getPersistentId().getIdAsLong();
|
||||
String targetResourceIdPart = theNextId.getIdPart();
|
||||
Long targetVersion = theNextId.getVersionIdPartAsLong();
|
||||
return ResourceLink.forLocalReference(nextPathAndRef.getPath(), theEntity, targetResourceType, targetResourcePid, targetResourceIdPart, theUpdateTime, targetVersion);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -85,13 +85,13 @@ public class IdHelperServiceTest {
|
|||
|
||||
Object[] redView = new Object[] {
|
||||
"Patient",
|
||||
new Long(123l),
|
||||
123l,
|
||||
"RED",
|
||||
new Date()
|
||||
};
|
||||
Object[] blueView = new Object[] {
|
||||
"Patient",
|
||||
new Long(456l),
|
||||
456l,
|
||||
"BLUE",
|
||||
new Date()
|
||||
};
|
||||
|
@ -124,8 +124,8 @@ public class IdHelperServiceTest {
|
|||
patientIdsToResolve.add("RED");
|
||||
patientIdsToResolve.add("BLUE");
|
||||
|
||||
ResourcePersistentId red = new ResourcePersistentId("Patient", new Long(123l));
|
||||
ResourcePersistentId blue = new ResourcePersistentId("Patient", new Long(456l));
|
||||
ResourcePersistentId red = new ResourcePersistentId("Patient", 123l);
|
||||
ResourcePersistentId blue = new ResourcePersistentId("Patient", 456l);
|
||||
|
||||
// we will pretend the lookup value is in the cache
|
||||
when(myMemoryCacheService.getThenPutAfterCommit(any(MemoryCacheService.CacheEnum.class),
|
||||
|
@ -167,7 +167,7 @@ public class IdHelperServiceTest {
|
|||
|
||||
IResourceLookup result = myHelperService.resolveResourceIdentity(partitionId, resourceType, resourceForcedId);
|
||||
assertEquals(forcedIdView[0], result.getResourceType());
|
||||
assertEquals(forcedIdView[1], result.getResourceId());
|
||||
assertEquals(forcedIdView[1], result.getPersistentId().getId());
|
||||
assertEquals(forcedIdView[3], result.getDeleted());
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ package ca.uhn.fhir.mdm.rules.matcher;
|
|||
*/
|
||||
|
||||
import ca.uhn.fhir.context.FhirContext;
|
||||
import ca.uhn.fhir.mdm.util.CanonicalIdentifier;
|
||||
import ca.uhn.fhir.util.CanonicalIdentifier;
|
||||
import ca.uhn.fhir.mdm.util.IdentifierUtil;
|
||||
import ca.uhn.fhir.model.primitive.StringDt;
|
||||
import org.hl7.fhir.instance.model.api.IBase;
|
||||
|
|
|
@ -24,6 +24,7 @@ import ca.uhn.fhir.i18n.Msg;
|
|||
import ca.uhn.fhir.context.FhirContext;
|
||||
import ca.uhn.fhir.mdm.model.CanonicalEID;
|
||||
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
|
||||
import ca.uhn.fhir.util.CanonicalIdentifier;
|
||||
import org.hl7.fhir.instance.model.api.IBase;
|
||||
|
||||
public final class IdentifierUtil {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -50,6 +50,7 @@ public class ResourcePersistentId {
|
|||
*/
|
||||
public ResourcePersistentId(Object theId, Long theVersion) {
|
||||
assert !(theId instanceof Optional);
|
||||
assert !(theId instanceof ResourcePersistentId);
|
||||
myId = theId;
|
||||
myVersion = theVersion;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-spring-boot-samples</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>hapi-fhir-spring-boot-sample-client-apache</artifactId>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-spring-boot-samples</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>hapi-fhir-spring-boot-sample-client-okhttp</artifactId>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-spring-boot-samples</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>hapi-fhir-spring-boot-sample-server-jersey</artifactId>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-spring-boot</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>hapi-fhir-spring-boot-samples</artifactId>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -90,6 +90,9 @@ public abstract class BaseStorageDao {
|
|||
public static final String OO_SEVERITY_WARN = "warning";
|
||||
private static final String PROCESSING_SUB_REQUEST = "BaseStorageDao.processingSubRequest";
|
||||
|
||||
protected static final String MESSAGE_KEY_DELETE_RESOURCE_NOT_EXISTING = "deleteResourceNotExisting";
|
||||
protected static final String MESSAGE_KEY_DELETE_RESOURCE_ALREADY_DELETED = "deleteResourceAlreadyDeleted";
|
||||
|
||||
@Autowired
|
||||
protected ISearchParamRegistry mySearchParamRegistry;
|
||||
@Autowired
|
||||
|
@ -367,6 +370,30 @@ public abstract class BaseStorageDao {
|
|||
return oo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a base method outcome for a delete request for the provided ID.
|
||||
* <p>
|
||||
* Additional information may be set on the outcome.
|
||||
*
|
||||
* @param theResourceId - the id of the object being deleted. Eg: Patient/123
|
||||
*/
|
||||
protected DaoMethodOutcome createMethodOutcomeForResourceId(String theResourceId, String theMessageKey) {
|
||||
DaoMethodOutcome outcome = new DaoMethodOutcome();
|
||||
|
||||
IIdType id = getContext().getVersion().newIdType();
|
||||
id.setValue(theResourceId);
|
||||
outcome.setId(id);
|
||||
|
||||
IBaseOperationOutcome oo = OperationOutcomeUtil.newInstance(getContext());
|
||||
String message = getContext().getLocalizer().getMessage(BaseStorageDao.class, theMessageKey, id);
|
||||
String severity = "information";
|
||||
String code = "informational";
|
||||
OperationOutcomeUtil.addIssue(getContext(), oo, severity, message, null, code);
|
||||
outcome.setOperationOutcome(oo);
|
||||
|
||||
return outcome;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
protected ResourceGoneException createResourceGoneException(IBasePersistedResource theResourceEntity) {
|
||||
StringBuilder b = new StringBuilder();
|
||||
|
|
|
@ -2,7 +2,7 @@ package ca.uhn.fhir.jpa.dao.index;
|
|||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR JPA Server
|
||||
* HAPI FHIR Storage api
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2022 Smile CDR, Inc.
|
||||
* %%
|
||||
|
@ -32,10 +32,10 @@ import ca.uhn.fhir.jpa.api.config.DaoConfig;
|
|||
import ca.uhn.fhir.jpa.api.dao.DaoRegistry;
|
||||
import ca.uhn.fhir.jpa.api.dao.IFhirResourceDao;
|
||||
import ca.uhn.fhir.jpa.api.svc.IIdHelperService;
|
||||
import ca.uhn.fhir.jpa.model.cross.IBasePersistedResource;
|
||||
import ca.uhn.fhir.jpa.model.cross.IResourceLookup;
|
||||
import ca.uhn.fhir.jpa.model.entity.ResourceTable;
|
||||
import ca.uhn.fhir.jpa.searchparam.extractor.IResourceLinkResolver;
|
||||
import ca.uhn.fhir.mdm.util.CanonicalIdentifier;
|
||||
import ca.uhn.fhir.util.CanonicalIdentifier;
|
||||
import ca.uhn.fhir.rest.api.server.RequestDetails;
|
||||
import ca.uhn.fhir.rest.api.server.storage.ResourcePersistentId;
|
||||
import ca.uhn.fhir.rest.api.server.storage.TransactionDetails;
|
||||
|
@ -57,9 +57,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.PersistenceContext;
|
||||
import javax.persistence.PersistenceContextType;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
@ -67,8 +64,6 @@ import java.util.Optional;
|
|||
|
||||
public class DaoResourceLinkResolver implements IResourceLinkResolver {
|
||||
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(DaoResourceLinkResolver.class);
|
||||
@PersistenceContext(type = PersistenceContextType.TRANSACTION)
|
||||
protected EntityManager myEntityManager;
|
||||
@Autowired
|
||||
private DaoConfig myDaoConfig;
|
||||
@Autowired
|
||||
|
@ -99,7 +94,7 @@ public class DaoResourceLinkResolver implements IResourceLinkResolver {
|
|||
}
|
||||
} catch (ResourceNotFoundException e) {
|
||||
|
||||
Optional<ResourceTable> createdTableOpt = createPlaceholderTargetIfConfiguredToDoSo(theType, theReference, idPart, theRequest, theTransactionDetails);
|
||||
Optional<IBasePersistedResource> createdTableOpt = createPlaceholderTargetIfConfiguredToDoSo(theType, theReference, idPart, theRequest, theTransactionDetails);
|
||||
if (!createdTableOpt.isPresent()) {
|
||||
|
||||
if (myDaoConfig.isEnforceReferentialIntegrityOnWrite() == false) {
|
||||
|
@ -114,9 +109,9 @@ public class DaoResourceLinkResolver implements IResourceLinkResolver {
|
|||
resolvedResource = createdTableOpt.get();
|
||||
}
|
||||
|
||||
ourLog.trace("Resolved resource of type {} as PID: {}", resolvedResource.getResourceType(), resolvedResource.getResourceId());
|
||||
ourLog.trace("Resolved resource of type {} as PID: {}", resolvedResource.getResourceType(), resolvedResource.getPersistentId());
|
||||
if (!theResourceType.equals(resolvedResource.getResourceType())) {
|
||||
ourLog.error("Resource with PID {} was of type {} and wanted {}", resolvedResource.getResourceId(), theResourceType, resolvedResource.getResourceType());
|
||||
ourLog.error("Resource with PID {} was of type {} and wanted {}", resolvedResource.getPersistentId(), theResourceType, resolvedResource.getResourceType());
|
||||
throw new UnprocessableEntityException(Msg.code(1095) + "Resource contains reference to unknown resource ID " + theSourceResourceId.getValue());
|
||||
}
|
||||
|
||||
|
@ -126,9 +121,11 @@ public class DaoResourceLinkResolver implements IResourceLinkResolver {
|
|||
}
|
||||
|
||||
if (persistentId == null) {
|
||||
persistentId = new ResourcePersistentId(resolvedResource.getResourceId());
|
||||
persistentId = new ResourcePersistentId(resolvedResource.getPersistentId().getId());
|
||||
persistentId.setAssociatedResourceId(theSourceResourceId);
|
||||
theTransactionDetails.addResolvedResourceId(theSourceResourceId, persistentId);
|
||||
if (theTransactionDetails != null) {
|
||||
theTransactionDetails.addResolvedResourceId(theSourceResourceId, persistentId);
|
||||
}
|
||||
}
|
||||
|
||||
if (!theSearchParam.hasTargets() && theSearchParam.getTargets().contains(theResourceType)) {
|
||||
|
@ -141,8 +138,8 @@ public class DaoResourceLinkResolver implements IResourceLinkResolver {
|
|||
/**
|
||||
* @param theIdToAssignToPlaceholder If specified, the placeholder resource created will be given a specific ID
|
||||
*/
|
||||
public <T extends IBaseResource> Optional<ResourceTable> createPlaceholderTargetIfConfiguredToDoSo(Class<T> theType, IBaseReference theReference, @Nullable String theIdToAssignToPlaceholder, RequestDetails theRequest, TransactionDetails theTransactionDetails) {
|
||||
ResourceTable valueOf = null;
|
||||
public <T extends IBaseResource> Optional<IBasePersistedResource> createPlaceholderTargetIfConfiguredToDoSo(Class<T> theType, IBaseReference theReference, @Nullable String theIdToAssignToPlaceholder, RequestDetails theRequest, TransactionDetails theTransactionDetails) {
|
||||
IBasePersistedResource valueOf = null;
|
||||
|
||||
if (myDaoConfig.isAutoCreatePlaceholderReferenceTargets()) {
|
||||
RuntimeResourceDefinition missingResourceDef = myContext.getResourceDefinition(theType);
|
||||
|
@ -162,13 +159,13 @@ public class DaoResourceLinkResolver implements IResourceLinkResolver {
|
|||
|
||||
if (theIdToAssignToPlaceholder != null) {
|
||||
newResource.setId(resName + "/" + theIdToAssignToPlaceholder);
|
||||
valueOf = ((ResourceTable) placeholderResourceDao.update(newResource, theRequest).getEntity());
|
||||
valueOf = placeholderResourceDao.update(newResource, theRequest).getEntity();
|
||||
} else {
|
||||
valueOf = ((ResourceTable) placeholderResourceDao.create(newResource, theRequest).getEntity());
|
||||
valueOf = placeholderResourceDao.create(newResource, theRequest).getEntity();
|
||||
}
|
||||
|
||||
ResourcePersistentId persistentId = new ResourcePersistentId(valueOf.getResourceId(), 1L);
|
||||
persistentId.setAssociatedResourceId(valueOf.getIdType(myContext));
|
||||
ResourcePersistentId persistentId = new ResourcePersistentId(valueOf.getPersistentId().getId(), 1L);
|
||||
persistentId.setAssociatedResourceId(valueOf.getIdDt());
|
||||
theTransactionDetails.addResolvedResourceId(persistentId.getAssociatedResourceId(), persistentId);
|
||||
}
|
||||
|
||||
|
@ -301,14 +298,14 @@ public class DaoResourceLinkResolver implements IResourceLinkResolver {
|
|||
return myPersistentId.getAssociatedResourceId().getResourceType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getResourceId() {
|
||||
return myPersistentId.getIdAsLong();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date getDeleted() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourcePersistentId getPersistentId() {
|
||||
return myPersistentId;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
package ca.uhn.fhir.mdm.util;
|
||||
package ca.uhn.fhir.util;
|
||||
|
||||
/*-
|
||||
* #%L
|
||||
* HAPI FHIR - Master Data Management
|
||||
* HAPI FHIR Storage api
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2022 Smile CDR, Inc.
|
||||
* %%
|
|
@ -1,6 +1,6 @@
|
|||
package ca.uhn.fhir.jpa.dao.index;
|
||||
|
||||
import ca.uhn.fhir.mdm.util.CanonicalIdentifier;
|
||||
import ca.uhn.fhir.util.CanonicalIdentifier;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-deployable-pom</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../hapi-deployable-pom/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@ -65,42 +65,42 @@
|
|||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-dstu3</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-hl7org-dstu2</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-r4</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-r4b</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-structures-r5</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-validation-resources-dstu2</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-validation-resources-dstu3</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-validation-resources-r4</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
4
pom.xml
4
pom.xml
|
@ -6,7 +6,7 @@
|
|||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<name>HAPI-FHIR</name>
|
||||
<description>An open-source implementation of the FHIR specification in Java.</description>
|
||||
<url>https://hapifhir.io</url>
|
||||
|
@ -1998,7 +1998,7 @@
|
|||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-checkstyle</artifactId>
|
||||
<!-- Remember to bump this when you upgrade the version -->
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir</artifactId>
|
||||
<version>6.2.0-PRE17-SNAPSHOT</version>
|
||||
<version>6.2.0-PRE18-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
Loading…
Reference in New Issue