Correctly update versions on transactipn update
This commit is contained in:
parent
ddc0abe4ed
commit
333aa0afde
|
@ -378,12 +378,13 @@ public abstract class BaseDateTimeDt extends BasePrimitive<Date> {
|
||||||
*
|
*
|
||||||
* @throws DataFormatException
|
* @throws DataFormatException
|
||||||
*/
|
*/
|
||||||
public void setPrecision(TemporalPrecisionEnum thePrecision) throws DataFormatException {
|
public BaseDateTimeDt setPrecision(TemporalPrecisionEnum thePrecision) throws DataFormatException {
|
||||||
if (thePrecision == null) {
|
if (thePrecision == null) {
|
||||||
throw new NullPointerException("Precision may not be null");
|
throw new NullPointerException("Precision may not be null");
|
||||||
}
|
}
|
||||||
myPrecision = thePrecision;
|
myPrecision = thePrecision;
|
||||||
updateStringValue();
|
updateStringValue();
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
private BaseDateTimeDt setTimeZone(String theWholeValue, String theValue) {
|
private BaseDateTimeDt setTimeZone(String theWholeValue, String theValue) {
|
||||||
|
|
|
@ -369,7 +369,7 @@ public abstract class BaseHapiFhirResourceDao<T extends IBaseResource> extends B
|
||||||
}
|
}
|
||||||
|
|
||||||
// Perform actual DB update
|
// Perform actual DB update
|
||||||
updateEntity(theResource, entity, null, thePerformIndexing, true, theUpdateTime);
|
updateEntity(theResource, entity, null, thePerformIndexing, thePerformIndexing, theUpdateTime);
|
||||||
theResource.setId(entity.getIdDt());
|
theResource.setId(entity.getIdDt());
|
||||||
|
|
||||||
// Notify JPA interceptors
|
// Notify JPA interceptors
|
||||||
|
@ -1080,7 +1080,7 @@ public abstract class BaseHapiFhirResourceDao<T extends IBaseResource> extends B
|
||||||
}
|
}
|
||||||
|
|
||||||
// Perform update
|
// Perform update
|
||||||
ResourceTable savedEntity = updateEntity(theResource, entity, null, thePerformIndexing, true, new Date());
|
ResourceTable savedEntity = updateEntity(theResource, entity, null, thePerformIndexing, thePerformIndexing, new Date());
|
||||||
|
|
||||||
// Notify interceptors
|
// Notify interceptors
|
||||||
if (theRequestDetails != null) {
|
if (theRequestDetails != null) {
|
||||||
|
|
|
@ -185,10 +185,12 @@ public abstract class BaseHapiFhirSystemDao<T, MT> extends BaseHapiFhirDao<IBase
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IBundleProvider history(Date theSince, Date theUntil, RequestDetails theRequestDetails) {
|
public IBundleProvider history(Date theSince, Date theUntil, RequestDetails theRequestDetails) {
|
||||||
// Notify interceptors
|
if (theRequestDetails != null) {
|
||||||
ActionRequestDetails requestDetails = new ActionRequestDetails(theRequestDetails);
|
// Notify interceptors
|
||||||
notifyInterceptors(RestOperationTypeEnum.HISTORY_SYSTEM, requestDetails);
|
ActionRequestDetails requestDetails = new ActionRequestDetails(theRequestDetails);
|
||||||
|
notifyInterceptors(RestOperationTypeEnum.HISTORY_SYSTEM, requestDetails);
|
||||||
|
}
|
||||||
|
|
||||||
StopWatch w = new StopWatch();
|
StopWatch w = new StopWatch();
|
||||||
IBundleProvider retVal = super.history(null, null, theSince, theUntil);
|
IBundleProvider retVal = super.history(null, null, theSince, theUntil);
|
||||||
ourLog.info("Processed global history in {}ms", w.getMillisAndRestart());
|
ourLog.info("Processed global history in {}ms", w.getMillisAndRestart());
|
||||||
|
|
|
@ -29,6 +29,7 @@ import java.util.Collections;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.HashSet;
|
||||||
import java.util.IdentityHashMap;
|
import java.util.IdentityHashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
||||||
|
@ -39,6 +40,7 @@ import java.util.Set;
|
||||||
import javax.persistence.TypedQuery;
|
import javax.persistence.TypedQuery;
|
||||||
|
|
||||||
import org.apache.http.NameValuePair;
|
import org.apache.http.NameValuePair;
|
||||||
|
import org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent;
|
||||||
import org.hl7.fhir.instance.model.api.IBaseResource;
|
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||||
import org.hl7.fhir.instance.model.api.IIdType;
|
import org.hl7.fhir.instance.model.api.IIdType;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -315,7 +317,9 @@ public class FhirSystemDaoDstu2 extends BaseHapiFhirSystemDao<Bundle, MetaDt> {
|
||||||
|
|
||||||
List<IIdType> deletedResources = new ArrayList<IIdType>();
|
List<IIdType> deletedResources = new ArrayList<IIdType>();
|
||||||
List<DeleteConflict> deleteConflicts = new ArrayList<DeleteConflict>();
|
List<DeleteConflict> deleteConflicts = new ArrayList<DeleteConflict>();
|
||||||
|
Map<Entry, ResourceTable> entriesToProcess = new IdentityHashMap<Entry, ResourceTable>();
|
||||||
|
Set<ResourceTable> nonUpdatedEntities = new HashSet<ResourceTable>();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Loop through the request and process any entries of type
|
* Loop through the request and process any entries of type
|
||||||
* PUT, POST or DELETE
|
* PUT, POST or DELETE
|
||||||
|
@ -381,6 +385,10 @@ public class FhirSystemDaoDstu2 extends BaseHapiFhirSystemDao<Bundle, MetaDt> {
|
||||||
DaoMethodOutcome outcome;
|
DaoMethodOutcome outcome;
|
||||||
outcome = resourceDao.create(res, nextReqEntry.getRequest().getIfNoneExist(), false, theRequestDetails);
|
outcome = resourceDao.create(res, nextReqEntry.getRequest().getIfNoneExist(), false, theRequestDetails);
|
||||||
handleTransactionCreateOrUpdateOutcome(idSubstitutions, idToPersistedOutcome, nextResourceId, outcome, nextRespEntry, resourceType, res);
|
handleTransactionCreateOrUpdateOutcome(idSubstitutions, idToPersistedOutcome, nextResourceId, outcome, nextRespEntry, resourceType, res);
|
||||||
|
entriesToProcess.put(nextRespEntry, outcome.getEntity());
|
||||||
|
if (outcome.getCreated() == false) {
|
||||||
|
nonUpdatedEntities.add(outcome.getEntity());
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DELETE: {
|
case DELETE: {
|
||||||
|
@ -426,6 +434,7 @@ public class FhirSystemDaoDstu2 extends BaseHapiFhirSystemDao<Bundle, MetaDt> {
|
||||||
}
|
}
|
||||||
|
|
||||||
handleTransactionCreateOrUpdateOutcome(idSubstitutions, idToPersistedOutcome, nextResourceId, outcome, nextRespEntry, resourceType, res);
|
handleTransactionCreateOrUpdateOutcome(idSubstitutions, idToPersistedOutcome, nextResourceId, outcome, nextRespEntry, resourceType, res);
|
||||||
|
entriesToProcess.put(nextRespEntry, outcome.getEntity());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -474,7 +483,8 @@ public class FhirSystemDaoDstu2 extends BaseHapiFhirSystemDao<Bundle, MetaDt> {
|
||||||
|
|
||||||
InstantDt deletedInstantOrNull = ResourceMetadataKeyEnum.DELETED_AT.get(nextResource);
|
InstantDt deletedInstantOrNull = ResourceMetadataKeyEnum.DELETED_AT.get(nextResource);
|
||||||
Date deletedTimestampOrNull = deletedInstantOrNull != null ? deletedInstantOrNull.getValue() : null;
|
Date deletedTimestampOrNull = deletedInstantOrNull != null ? deletedInstantOrNull.getValue() : null;
|
||||||
updateEntity(nextResource, nextOutcome.getEntity(), deletedTimestampOrNull, true, false, updateTime);
|
boolean shouldUpdate = !nonUpdatedEntities.contains(nextOutcome.getEntity());
|
||||||
|
updateEntity(nextResource, nextOutcome.getEntity(), deletedTimestampOrNull, true, shouldUpdate, updateTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
myEntityManager.flush();
|
myEntityManager.flush();
|
||||||
|
@ -578,6 +588,11 @@ public class FhirSystemDaoDstu2 extends BaseHapiFhirSystemDao<Bundle, MetaDt> {
|
||||||
ourLog.info("Flushing context after {}", theActionName);
|
ourLog.info("Flushing context after {}", theActionName);
|
||||||
myEntityManager.flush();
|
myEntityManager.flush();
|
||||||
|
|
||||||
|
for (java.util.Map.Entry<Entry, ResourceTable> nextEntry : entriesToProcess.entrySet()) {
|
||||||
|
nextEntry.getKey().getResponse().setLocation(nextEntry.getValue().getIdDt().toUnqualified().getValue());
|
||||||
|
nextEntry.getKey().getResponse().setEtag(nextEntry.getValue().getIdDt().getVersionIdPart());
|
||||||
|
}
|
||||||
|
|
||||||
long delay = System.currentTimeMillis() - start;
|
long delay = System.currentTimeMillis() - start;
|
||||||
int numEntries = theRequest.getEntry().size();
|
int numEntries = theRequest.getEntry().size();
|
||||||
long delayPer = delay / numEntries;
|
long delayPer = delay / numEntries;
|
||||||
|
@ -606,8 +621,6 @@ public class FhirSystemDaoDstu2 extends BaseHapiFhirSystemDao<Bundle, MetaDt> {
|
||||||
} else {
|
} else {
|
||||||
newEntry.getResponse().setStatus(toStatusString(Constants.STATUS_HTTP_200_OK));
|
newEntry.getResponse().setStatus(toStatusString(Constants.STATUS_HTTP_200_OK));
|
||||||
}
|
}
|
||||||
newEntry.getResponse().setLocation(outcome.getId().toUnqualified().getValue());
|
|
||||||
newEntry.getResponse().setEtag(outcome.getId().getVersionIdPart());
|
|
||||||
newEntry.getResponse().setLastModified(ResourceMetadataKeyEnum.UPDATED.get(theRes));
|
newEntry.getResponse().setLastModified(ResourceMetadataKeyEnum.UPDATED.get(theRes));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@ import java.util.Iterator;
|
||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Map.Entry;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import javax.persistence.TypedQuery;
|
import javax.persistence.TypedQuery;
|
||||||
|
@ -264,9 +265,11 @@ public class FhirSystemDaoDstu3 extends BaseHapiFhirSystemDao<Bundle, Meta> {
|
||||||
@Transactional(propagation = Propagation.REQUIRED)
|
@Transactional(propagation = Propagation.REQUIRED)
|
||||||
@Override
|
@Override
|
||||||
public Bundle transaction(RequestDetails theRequestDetails, Bundle theRequest) {
|
public Bundle transaction(RequestDetails theRequestDetails, Bundle theRequest) {
|
||||||
ActionRequestDetails requestDetails = new ActionRequestDetails(theRequestDetails, theRequest, "Bundle", null);
|
if (theRequestDetails != null) {
|
||||||
notifyInterceptors(RestOperationTypeEnum.TRANSACTION, requestDetails);
|
ActionRequestDetails requestDetails = new ActionRequestDetails(theRequestDetails, theRequest, "Bundle", null);
|
||||||
|
notifyInterceptors(RestOperationTypeEnum.TRANSACTION, requestDetails);
|
||||||
|
}
|
||||||
|
|
||||||
String actionName = "Transaction";
|
String actionName = "Transaction";
|
||||||
return transaction((ServletRequestDetails) theRequestDetails, theRequest, actionName);
|
return transaction((ServletRequestDetails) theRequestDetails, theRequest, actionName);
|
||||||
}
|
}
|
||||||
|
@ -329,6 +332,8 @@ public class FhirSystemDaoDstu3 extends BaseHapiFhirSystemDao<Bundle, Meta> {
|
||||||
|
|
||||||
Set<String> deletedResources = new HashSet<String>();
|
Set<String> deletedResources = new HashSet<String>();
|
||||||
List<DeleteConflict> deleteConflicts = new ArrayList<DeleteConflict>();
|
List<DeleteConflict> deleteConflicts = new ArrayList<DeleteConflict>();
|
||||||
|
Map<BundleEntryComponent, ResourceTable> entriesToProcess = new IdentityHashMap<BundleEntryComponent, ResourceTable>();
|
||||||
|
Set<ResourceTable> nonUpdatedEntities = new HashSet<ResourceTable>();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Loop through the request and process any entries of type
|
* Loop through the request and process any entries of type
|
||||||
|
@ -392,6 +397,11 @@ public class FhirSystemDaoDstu3 extends BaseHapiFhirSystemDao<Bundle, Meta> {
|
||||||
DaoMethodOutcome outcome;
|
DaoMethodOutcome outcome;
|
||||||
outcome = resourceDao.create(res, nextReqEntry.getRequest().getIfNoneExist(), false, theRequestDetails);
|
outcome = resourceDao.create(res, nextReqEntry.getRequest().getIfNoneExist(), false, theRequestDetails);
|
||||||
handleTransactionCreateOrUpdateOutcome(idSubstitutions, idToPersistedOutcome, nextResourceId, outcome, nextRespEntry, resourceType, res);
|
handleTransactionCreateOrUpdateOutcome(idSubstitutions, idToPersistedOutcome, nextResourceId, outcome, nextRespEntry, resourceType, res);
|
||||||
|
entriesToProcess.put(nextRespEntry, outcome.getEntity());
|
||||||
|
if (outcome.getCreated() == false) {
|
||||||
|
nonUpdatedEntities.add(outcome.getEntity());
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DELETE: {
|
case DELETE: {
|
||||||
|
@ -426,10 +436,10 @@ public class FhirSystemDaoDstu3 extends BaseHapiFhirSystemDao<Bundle, Meta> {
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
IFhirResourceDao resourceDao = getDaoOrThrowException(res.getClass());
|
IFhirResourceDao resourceDao = getDaoOrThrowException(res.getClass());
|
||||||
|
|
||||||
DaoMethodOutcome outcome;
|
|
||||||
|
|
||||||
String url = extractTransactionUrlOrThrowException(nextReqEntry, verb);
|
String url = extractTransactionUrlOrThrowException(nextReqEntry, verb);
|
||||||
|
|
||||||
|
DaoMethodOutcome outcome;
|
||||||
UrlParts parts = UrlUtil.parseUrl(url);
|
UrlParts parts = UrlUtil.parseUrl(url);
|
||||||
if (isNotBlank(parts.getResourceId())) {
|
if (isNotBlank(parts.getResourceId())) {
|
||||||
res.setId(new IdType(parts.getResourceType(), parts.getResourceId()));
|
res.setId(new IdType(parts.getResourceType(), parts.getResourceId()));
|
||||||
|
@ -440,6 +450,7 @@ public class FhirSystemDaoDstu3 extends BaseHapiFhirSystemDao<Bundle, Meta> {
|
||||||
}
|
}
|
||||||
|
|
||||||
handleTransactionCreateOrUpdateOutcome(idSubstitutions, idToPersistedOutcome, nextResourceId, outcome, nextRespEntry, resourceType, res);
|
handleTransactionCreateOrUpdateOutcome(idSubstitutions, idToPersistedOutcome, nextResourceId, outcome, nextRespEntry, resourceType, res);
|
||||||
|
entriesToProcess.put(nextRespEntry, outcome.getEntity());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -481,6 +492,8 @@ public class FhirSystemDaoDstu3 extends BaseHapiFhirSystemDao<Bundle, Meta> {
|
||||||
IdType newId = idSubstitutions.get(nextId);
|
IdType newId = idSubstitutions.get(nextId);
|
||||||
ourLog.info(" * Replacing resource ref {} with {}", nextId, newId);
|
ourLog.info(" * Replacing resource ref {} with {}", nextId, newId);
|
||||||
nextRef.setReference(newId.getValue());
|
nextRef.setReference(newId.getValue());
|
||||||
|
} else if (nextId.getValue().startsWith("urn:")) {
|
||||||
|
throw new InvalidRequestException("Unable to satisfy placeholder ID: " + nextId.getValue());
|
||||||
} else {
|
} else {
|
||||||
ourLog.debug(" * Reference [{}] does not exist in bundle", nextId);
|
ourLog.debug(" * Reference [{}] does not exist in bundle", nextId);
|
||||||
}
|
}
|
||||||
|
@ -488,7 +501,8 @@ public class FhirSystemDaoDstu3 extends BaseHapiFhirSystemDao<Bundle, Meta> {
|
||||||
|
|
||||||
IPrimitiveType<Date> deletedInstantOrNull = ResourceMetadataKeyEnum.DELETED_AT.get((IAnyResource) nextResource);
|
IPrimitiveType<Date> deletedInstantOrNull = ResourceMetadataKeyEnum.DELETED_AT.get((IAnyResource) nextResource);
|
||||||
Date deletedTimestampOrNull = deletedInstantOrNull != null ? deletedInstantOrNull.getValue() : null;
|
Date deletedTimestampOrNull = deletedInstantOrNull != null ? deletedInstantOrNull.getValue() : null;
|
||||||
updateEntity(nextResource, nextOutcome.getEntity(), deletedTimestampOrNull, true, false, updateTime);
|
boolean shouldUpdate = !nonUpdatedEntities.contains(nextOutcome.getEntity());
|
||||||
|
updateEntity(nextResource, nextOutcome.getEntity(), deletedTimestampOrNull, shouldUpdate, shouldUpdate, updateTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
myEntityManager.flush();
|
myEntityManager.flush();
|
||||||
|
@ -589,6 +603,11 @@ public class FhirSystemDaoDstu3 extends BaseHapiFhirSystemDao<Bundle, Meta> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (Entry<BundleEntryComponent, ResourceTable> nextEntry : entriesToProcess.entrySet()) {
|
||||||
|
nextEntry.getKey().getResponse().setLocation(nextEntry.getValue().getIdDt().toUnqualified().getValue());
|
||||||
|
nextEntry.getKey().getResponse().setEtag(nextEntry.getValue().getIdDt().getVersionIdPart());
|
||||||
|
}
|
||||||
|
|
||||||
long delay = System.currentTimeMillis() - start;
|
long delay = System.currentTimeMillis() - start;
|
||||||
ourLog.info(theActionName + " completed in {}ms", new Object[] { delay });
|
ourLog.info(theActionName + " completed in {}ms", new Object[] { delay });
|
||||||
|
|
||||||
|
@ -615,8 +634,6 @@ public class FhirSystemDaoDstu3 extends BaseHapiFhirSystemDao<Bundle, Meta> {
|
||||||
} else {
|
} else {
|
||||||
newEntry.getResponse().setStatus(toStatusString(Constants.STATUS_HTTP_200_OK));
|
newEntry.getResponse().setStatus(toStatusString(Constants.STATUS_HTTP_200_OK));
|
||||||
}
|
}
|
||||||
newEntry.getResponse().setLocation(outcome.getId().toUnqualified().getValue());
|
|
||||||
newEntry.getResponse().setEtag(outcome.getId().getVersionIdPart());
|
|
||||||
newEntry.getResponse().setLastModified(((Resource)theRes).getMeta().getLastUpdated());
|
newEntry.getResponse().setLastModified(((Resource)theRes).getMeta().getLastUpdated());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,6 +72,11 @@ public class ResourceHistoryTable extends BaseHasResource implements Serializabl
|
||||||
@OneToMany(mappedBy = "myResourceHistory", cascade = CascadeType.ALL, fetch = FetchType.LAZY, orphanRemoval = true)
|
@OneToMany(mappedBy = "myResourceHistory", cascade = CascadeType.ALL, fetch = FetchType.LAZY, orphanRemoval = true)
|
||||||
private Collection<ResourceHistoryTag> myTags;
|
private Collection<ResourceHistoryTag> myTags;
|
||||||
|
|
||||||
|
public ResourceHistoryTable() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void addTag(ResourceHistoryTag theTag) {
|
public void addTag(ResourceHistoryTag theTag) {
|
||||||
for (ResourceHistoryTag next : getTags()) {
|
for (ResourceHistoryTag next : getTags()) {
|
||||||
if (next.getTag().equals(theTag)) {
|
if (next.getTag().equals(theTag)) {
|
||||||
|
|
|
@ -16,6 +16,7 @@ import javax.persistence.EntityManager;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.hibernate.search.jpa.Search;
|
import org.hibernate.search.jpa.Search;
|
||||||
import org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent;
|
import org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent;
|
||||||
|
import org.hl7.fhir.dstu3.model.Resource;
|
||||||
import org.hl7.fhir.instance.model.api.IBaseBundle;
|
import org.hl7.fhir.instance.model.api.IBaseBundle;
|
||||||
import org.hl7.fhir.instance.model.api.IBaseResource;
|
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||||
import org.hl7.fhir.instance.model.api.IIdType;
|
import org.hl7.fhir.instance.model.api.IIdType;
|
||||||
|
@ -78,6 +79,14 @@ public abstract class BaseJpaTest {
|
||||||
return theSearch.getResources(0, theSearch.size());
|
return theSearch.getResources(0, theSearch.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected org.hl7.fhir.dstu3.model.Bundle toBundle(IBundleProvider theSearch) {
|
||||||
|
org.hl7.fhir.dstu3.model.Bundle bundle = new org.hl7.fhir.dstu3.model.Bundle();
|
||||||
|
for (IBaseResource next : theSearch.getResources(0, theSearch.size())) {
|
||||||
|
bundle.addEntry().setResource((Resource) next);
|
||||||
|
}
|
||||||
|
return bundle;
|
||||||
|
}
|
||||||
|
|
||||||
protected abstract FhirContext getContext();
|
protected abstract FhirContext getContext();
|
||||||
|
|
||||||
protected List<String> toUnqualifiedVersionlessIdValues(IBaseBundle theFound) {
|
protected List<String> toUnqualifiedVersionlessIdValues(IBaseBundle theFound) {
|
||||||
|
|
|
@ -1262,13 +1262,15 @@ public class FhirSystemDaoDstu2Test extends BaseJpaDstu2SystemTest {
|
||||||
|
|
||||||
Bundle resp = mySystemDao.transaction(mySrd, request);
|
Bundle resp = mySystemDao.transaction(mySrd, request);
|
||||||
assertEquals(2, resp.getEntry().size());
|
assertEquals(2, resp.getEntry().size());
|
||||||
|
|
||||||
|
ourLog.info(myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(resp));
|
||||||
|
|
||||||
Entry nextEntry = resp.getEntry().get(0);
|
Entry nextEntry = resp.getEntry().get(0);
|
||||||
assertEquals("200 OK", nextEntry.getResponse().getStatus());
|
assertEquals("200 OK", nextEntry.getResponse().getStatus());
|
||||||
assertThat(nextEntry.getResponse().getLocation(), not(containsString("test")));
|
assertThat(nextEntry.getResponse().getLocation(), not(containsString("test")));
|
||||||
assertEquals(id.toVersionless(), p.getId().toVersionless());
|
assertEquals(id.toVersionless(), p.getId().toVersionless());
|
||||||
assertNotEquals(id, p.getId());
|
|
||||||
assertThat(p.getId().toString(), endsWith("/_history/2"));
|
assertThat(p.getId().toString(), endsWith("/_history/2"));
|
||||||
|
assertNotEquals(id, p.getId());
|
||||||
|
|
||||||
nextEntry = resp.getEntry().get(0);
|
nextEntry = resp.getEntry().get(0);
|
||||||
assertEquals(Constants.STATUS_HTTP_200_OK + " OK", nextEntry.getResponse().getStatus());
|
assertEquals(Constants.STATUS_HTTP_200_OK + " OK", nextEntry.getResponse().getStatus());
|
||||||
|
|
|
@ -24,6 +24,8 @@ import java.io.UnsupportedEncodingException;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.mail.Quota.Resource;
|
||||||
|
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.hl7.fhir.dstu3.model.Appointment;
|
import org.hl7.fhir.dstu3.model.Appointment;
|
||||||
import org.hl7.fhir.dstu3.model.Bundle;
|
import org.hl7.fhir.dstu3.model.Bundle;
|
||||||
|
@ -98,7 +100,59 @@ public class FhirSystemDaoDstu3Test extends BaseJpaDstu3SystemTest {
|
||||||
ourLog.info(myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(mo));
|
ourLog.info(myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(mo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testTransactionDoesNotAllowDanglingTemporaryIds() throws Exception {
|
||||||
|
String input = IOUtils.toString(getClass().getResourceAsStream("/cdr-bundle.json"), StandardCharsets.UTF_8);
|
||||||
|
Bundle bundle = myFhirCtx.newJsonParser().parseResource(Bundle.class, input);
|
||||||
|
|
||||||
|
BundleEntryComponent entry = bundle.addEntry();
|
||||||
|
Patient p = new Patient();
|
||||||
|
p.getManagingOrganization().setReference("urn:uuid:30ce60cf-f7cb-4196-961f-cadafa8b7ff5");
|
||||||
|
entry.setResource(p);
|
||||||
|
entry.getRequest().setMethod(HTTPVerb.POST);
|
||||||
|
entry.getRequest().setUrl("Patient");
|
||||||
|
|
||||||
|
try {
|
||||||
|
mySystemDao.transaction(mySrd, bundle);
|
||||||
|
fail();
|
||||||
|
} catch (InvalidRequestException e) {
|
||||||
|
assertEquals("Unable to satisfy placeholder ID: urn:uuid:30ce60cf-f7cb-4196-961f-cadafa8b7ff5", e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testTransactionDoesNotLeavePlaceholderIds() throws Exception {
|
||||||
|
String input = IOUtils.toString(getClass().getResourceAsStream("/cdr-bundle.json"), StandardCharsets.UTF_8);
|
||||||
|
Bundle bundle = myFhirCtx.newJsonParser().parseResource(Bundle.class, input);
|
||||||
|
mySystemDao.transaction(mySrd, bundle);
|
||||||
|
|
||||||
|
IBundleProvider history = mySystemDao.history(null, null, null);
|
||||||
|
Bundle list = toBundle(history);
|
||||||
|
ourLog.info(myFhirCtx.newJsonParser().setPrettyPrint(true).encodeResourceToString(list));
|
||||||
|
|
||||||
|
assertEquals(6, list.getEntry().size());
|
||||||
|
|
||||||
|
Patient p = find(list, Patient.class, 0);
|
||||||
|
assertTrue(p.getIdElement().isIdPartValidLong());
|
||||||
|
assertTrue(p.getGeneralPractitionerFirstRep().getReferenceElement().isIdPartValidLong());
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
private <T extends org.hl7.fhir.dstu3.model.Resource> T find(Bundle theBundle, Class<T> theType, int theIndex) {
|
||||||
|
int count = 0;
|
||||||
|
for (BundleEntryComponent nextEntry : theBundle.getEntry()) {
|
||||||
|
if (nextEntry.getResource() != null && theType.isAssignableFrom(nextEntry.getResource().getClass())) {
|
||||||
|
if (count == theIndex) {
|
||||||
|
T t = (T) nextEntry.getResource();
|
||||||
|
return t;
|
||||||
|
}
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fail();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testTransactionFromBundle2() throws Exception {
|
public void testTransactionFromBundle2() throws Exception {
|
||||||
String input = IOUtils.toString(getClass().getResourceAsStream("/transaction-bundle.xml"), StandardCharsets.UTF_8);
|
String input = IOUtils.toString(getClass().getResourceAsStream("/transaction-bundle.xml"), StandardCharsets.UTF_8);
|
||||||
|
|
|
@ -0,0 +1,319 @@
|
||||||
|
{
|
||||||
|
"resourceType": "Bundle",
|
||||||
|
"entry": [
|
||||||
|
{
|
||||||
|
"fullUrl": "urn:uuid:7079b926-3bc9-4848-874b-da066b3b0ceb",
|
||||||
|
"resource": {
|
||||||
|
"resourceType": "Practitioner",
|
||||||
|
"identifier": [
|
||||||
|
{
|
||||||
|
"system": "http://acme.org/clinicians",
|
||||||
|
"value": "777"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": [
|
||||||
|
{
|
||||||
|
"family": [
|
||||||
|
"Jones"
|
||||||
|
],
|
||||||
|
"given": [
|
||||||
|
"Lisa",
|
||||||
|
"Frances"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"telecom": [
|
||||||
|
{
|
||||||
|
"system": "phone",
|
||||||
|
"value": "1(837)555-1978",
|
||||||
|
"use": "work"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"address": [
|
||||||
|
{
|
||||||
|
"use": "work",
|
||||||
|
"line": [
|
||||||
|
"123 Brewer Street"
|
||||||
|
],
|
||||||
|
"city": "Buffalo",
|
||||||
|
"state": "NY",
|
||||||
|
"postalCode": "98765",
|
||||||
|
"country": "USA"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"request": {
|
||||||
|
"method": "PUT",
|
||||||
|
"url": "/Practitioner?identifier=http%253A%252F%252Facme.org%252Fclinicians%257C777"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fullUrl": "urn:uuid:47521791-e0f9-4eb4-b65d-be4ec2b602bf",
|
||||||
|
"resource": {
|
||||||
|
"resourceType": "Patient",
|
||||||
|
"identifier": [
|
||||||
|
{
|
||||||
|
"use": "official",
|
||||||
|
"type": {
|
||||||
|
"coding": [
|
||||||
|
{
|
||||||
|
"system": "http://hl7.org/fhir/v2/0203",
|
||||||
|
"code": "MR"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"system": "http://acme.org/mrns",
|
||||||
|
"value": "7000135"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"use": "secondary",
|
||||||
|
"type": {
|
||||||
|
"coding": [
|
||||||
|
{
|
||||||
|
"system": "http://hl7.org/fhir/v2/0203",
|
||||||
|
"code": "SB"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"system": "http://acme.org/secondaryIds",
|
||||||
|
"value": "01238638267"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": [
|
||||||
|
{
|
||||||
|
"use": "official",
|
||||||
|
"family": [
|
||||||
|
"Smith"
|
||||||
|
],
|
||||||
|
"given": [
|
||||||
|
"John",
|
||||||
|
"Q"
|
||||||
|
],
|
||||||
|
"suffix": [
|
||||||
|
"Jr"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"telecom": [
|
||||||
|
{
|
||||||
|
"system": "phone",
|
||||||
|
"value": "1(333)555-1234",
|
||||||
|
"use": "home"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"gender": "male",
|
||||||
|
"birthDate": "1965-03-22",
|
||||||
|
"deceasedBoolean": false,
|
||||||
|
"address": [
|
||||||
|
{
|
||||||
|
"use": "home",
|
||||||
|
"line": [
|
||||||
|
"342 Evergreen Terrace",
|
||||||
|
"2nd Floor"
|
||||||
|
],
|
||||||
|
"city": "Springfield",
|
||||||
|
"state": "NI",
|
||||||
|
"postalCode": "12345",
|
||||||
|
"country": "USA"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"generalPractitioner": [
|
||||||
|
{
|
||||||
|
"reference": "urn:uuid:7079b926-3bc9-4848-874b-da066b3b0ceb"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"request": {
|
||||||
|
"method": "PUT",
|
||||||
|
"url": "/Patient?identifier=http%253A%252F%252Facme.org%252Fmrns%257C7000135"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fullUrl": "urn:uuid:fd42a622-66ce-4a76-bbb6-573c018e29ed",
|
||||||
|
"resource": {
|
||||||
|
"resourceType": "Encounter",
|
||||||
|
"identifier": [
|
||||||
|
{
|
||||||
|
"use": "official",
|
||||||
|
"type": {
|
||||||
|
"coding": [
|
||||||
|
{
|
||||||
|
"system": "http://hl7.org/fhir/v2/0203",
|
||||||
|
"code": "VN"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"system": "http://acme.org/visitNumbers",
|
||||||
|
"value": "4736455"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"class": {
|
||||||
|
"system": "http://hl7.org/fhir/v3/ActCode",
|
||||||
|
"code": "IMP",
|
||||||
|
"display": "Inpatient"
|
||||||
|
},
|
||||||
|
"patient": {
|
||||||
|
"reference": "urn:uuid:47521791-e0f9-4eb4-b65d-be4ec2b602bf"
|
||||||
|
},
|
||||||
|
"participant": [
|
||||||
|
{
|
||||||
|
"type": [
|
||||||
|
{
|
||||||
|
"coding": [
|
||||||
|
{
|
||||||
|
"system": "http://hl7.org/fhir/v3/ParticipationType",
|
||||||
|
"code": "ADM",
|
||||||
|
"display": "admitter"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"individual": {
|
||||||
|
"reference": "urn:uuid:5e0a848f-0b14-4068-8618-aa3c08c242ab"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": [
|
||||||
|
{
|
||||||
|
"coding": [
|
||||||
|
{
|
||||||
|
"system": "http://hl7.org/fhir/v3/ParticipationType",
|
||||||
|
"code": "ATND",
|
||||||
|
"display": "attender"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"individual": {
|
||||||
|
"reference": "urn:uuid:2cc6e9d3-0abb-4544-9b8e-3892f22b533b"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"period": {
|
||||||
|
"start": "2016-01-22T09:44:30-04:00",
|
||||||
|
"end": "2016-01-22T09:44:31-04:00"
|
||||||
|
},
|
||||||
|
"location": [
|
||||||
|
{
|
||||||
|
"location": {
|
||||||
|
"reference": "urn:uuid:76f243bc-49f2-40da-9064-379fcbc151d2"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"request": {
|
||||||
|
"method": "PUT",
|
||||||
|
"url": "/Encounter?identifier=http%253A%252F%252Facme.org%252FvisitNumbers%257C4736455"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fullUrl": "urn:uuid:76f243bc-49f2-40da-9064-379fcbc151d2",
|
||||||
|
"resource": {
|
||||||
|
"resourceType": "Location",
|
||||||
|
"identifier": [
|
||||||
|
{
|
||||||
|
"system": "http://acme.org/beds",
|
||||||
|
"value": "124 6"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "6",
|
||||||
|
"description": "124 Bed 6"
|
||||||
|
},
|
||||||
|
"request": {
|
||||||
|
"method": "POST",
|
||||||
|
"url": "/Location",
|
||||||
|
"ifNoneExist": "Location?name=6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fullUrl": "urn:uuid:5e0a848f-0b14-4068-8618-aa3c08c242ab",
|
||||||
|
"resource": {
|
||||||
|
"resourceType": "Practitioner",
|
||||||
|
"identifier": [
|
||||||
|
{
|
||||||
|
"system": "http://acme.org/clinicians",
|
||||||
|
"value": "3622"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": [
|
||||||
|
{
|
||||||
|
"family": [
|
||||||
|
"Hawkins"
|
||||||
|
],
|
||||||
|
"given": [
|
||||||
|
"Finnie"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"telecom": [
|
||||||
|
{
|
||||||
|
"system": "phone",
|
||||||
|
"value": "1(837)555-2133",
|
||||||
|
"use": "work"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"address": [
|
||||||
|
{
|
||||||
|
"use": "work",
|
||||||
|
"line": [
|
||||||
|
"20 Canal St"
|
||||||
|
],
|
||||||
|
"city": "Buffalo",
|
||||||
|
"state": "NY",
|
||||||
|
"postalCode": "98222",
|
||||||
|
"country": "USA"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"request": {
|
||||||
|
"method": "PUT",
|
||||||
|
"url": "/Practitioner?identifier=http%253A%252F%252Facme.org%252Fclinicians%257C3622"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fullUrl": "urn:uuid:2cc6e9d3-0abb-4544-9b8e-3892f22b533b",
|
||||||
|
"resource": {
|
||||||
|
"resourceType": "Practitioner",
|
||||||
|
"identifier": [
|
||||||
|
{
|
||||||
|
"system": "http://acme.org/clinicians",
|
||||||
|
"value": "7452"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": [
|
||||||
|
{
|
||||||
|
"family": [
|
||||||
|
"May"
|
||||||
|
],
|
||||||
|
"given": [
|
||||||
|
"Sadie"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"telecom": [
|
||||||
|
{
|
||||||
|
"system": "phone",
|
||||||
|
"value": "1(837)555-6624",
|
||||||
|
"use": "work"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"address": [
|
||||||
|
{
|
||||||
|
"use": "work",
|
||||||
|
"line": [
|
||||||
|
"313 Fleet Street"
|
||||||
|
],
|
||||||
|
"city": "Cheektowaga",
|
||||||
|
"state": "NY",
|
||||||
|
"postalCode": "28366",
|
||||||
|
"country": "USA"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"request": {
|
||||||
|
"method": "PUT",
|
||||||
|
"url": "/Practitioner?identifier=http%253A%252F%252Facme.org%252Fclinicians%257C7452"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -0,0 +1,95 @@
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
|
||||||
|
org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
|
||||||
|
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
|
||||||
|
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
|
||||||
|
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
|
||||||
|
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
|
||||||
|
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.deadCode=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.deprecation=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.nullReference=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
|
@ -649,7 +649,7 @@ public class FluentPathEngine {
|
||||||
ExpressionNode node = group;
|
ExpressionNode node = group;
|
||||||
focus = group.getOpNext();
|
focus = group.getOpNext();
|
||||||
if (focus != null) {
|
if (focus != null) {
|
||||||
while (focus == null && !ops.contains(focus.getOperation())) {
|
while (focus != null && !ops.contains(focus.getOperation())) {
|
||||||
node = focus;
|
node = focus;
|
||||||
focus = focus.getOpNext();
|
focus = focus.getOpNext();
|
||||||
}
|
}
|
||||||
|
|
|
@ -690,7 +690,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
|
||||||
else if (fixed == null && focus != null)
|
else if (fixed == null && focus != null)
|
||||||
rule(errors, IssueType.VALUE, focus.line(), focus.col(), path, false, "Unexpected element " + focus.getName());
|
rule(errors, IssueType.VALUE, focus.line(), focus.col(), path, false, "Unexpected element " + focus.getName());
|
||||||
else if (fixed != null && focus == null)
|
else if (fixed != null && focus == null)
|
||||||
rule(errors, IssueType.VALUE, focus.line(), focus.col(), path, false, "Mising element " + propName);
|
rule(errors, IssueType.VALUE, 0, 0, path, false, "Mising element " + propName);
|
||||||
else {
|
else {
|
||||||
String value = focus.primitiveValue();
|
String value = focus.primitiveValue();
|
||||||
if (fixed instanceof org.hl7.fhir.dstu3.model.BooleanType)
|
if (fixed instanceof org.hl7.fhir.dstu3.model.BooleanType)
|
||||||
|
|
|
@ -1,10 +1,103 @@
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
|
org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
|
||||||
|
org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
|
||||||
|
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
|
||||||
|
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
|
||||||
|
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
|
||||||
|
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
|
||||||
|
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||||
|
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.deadCode=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.deprecation=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
|
||||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.nullReference=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
||||||
|
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
||||||
org.eclipse.jdt.core.compiler.source=1.6
|
org.eclipse.jdt.core.compiler.source=1.6
|
||||||
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
|
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
|
||||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
|
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
|
||||||
|
|
|
@ -464,7 +464,7 @@ public class InstanceValidator extends BaseValidator implements IResourceValidat
|
||||||
else if (fixed == null && focus != null)
|
else if (fixed == null && focus != null)
|
||||||
rule(errors, IssueType.VALUE, focus.line(), focus.col(), path, false, "Unexpected element " + focus.getName());
|
rule(errors, IssueType.VALUE, focus.line(), focus.col(), path, false, "Unexpected element " + focus.getName());
|
||||||
else if (fixed != null && focus == null)
|
else if (fixed != null && focus == null)
|
||||||
rule(errors, IssueType.VALUE, focus.line(), focus.col(), path, false, "Mising element " + propName);
|
rule(errors, IssueType.VALUE, 0, 0, path, false, "Mising element " + propName);
|
||||||
else {
|
else {
|
||||||
String value = focus.getAttribute("value");
|
String value = focus.getAttribute("value");
|
||||||
if (fixed instanceof org.hl7.fhir.instance.model.BooleanType)
|
if (fixed instanceof org.hl7.fhir.instance.model.BooleanType)
|
||||||
|
|
|
@ -210,6 +210,13 @@
|
||||||
Parser failed to parse resources containing an extension with a value type of
|
Parser failed to parse resources containing an extension with a value type of
|
||||||
"id". Thanks to Raphael Mäder for reporting!
|
"id". Thanks to Raphael Mäder for reporting!
|
||||||
</action>
|
</action>
|
||||||
|
<action type="fix">
|
||||||
|
When committing a transaction in JPA server
|
||||||
|
where the transaction contained placeholder IDs
|
||||||
|
for references between bundles, the placeholder
|
||||||
|
IDs were not substituted with viewing
|
||||||
|
resources using the _history operation
|
||||||
|
</action>
|
||||||
</release>
|
</release>
|
||||||
<release version="1.6" date="2016-07-07">
|
<release version="1.6" date="2016-07-07">
|
||||||
<action type="fix">
|
<action type="fix">
|
||||||
|
|
Loading…
Reference in New Issue