From 4db00fa604579abe1b4b64695c6ffda6a1da25c4 Mon Sep 17 00:00:00 2001 From: ianmarshall Date: Mon, 17 Aug 2020 18:14:37 -0400 Subject: [PATCH] Fix broken test and cleanup. --- .../ca/uhn/fhir/jpa/api/config/DaoConfig.java | 35 ------------------- .../jpa/dao/FhirResourceDaoValueSetDstu2.java | 3 -- .../dstu3/FhirResourceDaoCodeSystemDstu3.java | 5 ++- .../dao/r4/FhirResourceDaoCodeSystemR4.java | 5 ++- .../dao/r5/FhirResourceDaoCodeSystemR5.java | 5 ++- .../uhn/fhir/jpa/term/TermLoaderSvcImpl.java | 2 +- .../FhirInstanceValidatorR4Test.java | 2 +- 7 files changed, 8 insertions(+), 49 deletions(-) diff --git a/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java b/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java index 85b6bb6b8ca..98f49f6ff2d 100644 --- a/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java +++ b/hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java @@ -227,11 +227,6 @@ public class DaoConfig { */ private boolean myPreloadBlobFromInputStream = false; - /** - * @since 5.1.0 - */ - private boolean myMultipleCodeSystemVersionsEnabled = false; - /** * Constructor */ @@ -2131,34 +2126,4 @@ public class DaoConfig { myPreloadBlobFromInputStream = thePreloadBlobFromInputStream; } - /** - *

- * This determines whether multiple code system versions will be enabled. If not enabled, existing code systems will be - * deleted when a new version is uploaded. - *

- *

- * The default value for this setting is {@code false}. - *

- * - * @since 5.1.0 - */ - public boolean isMultipleCodeSystemVersionsEnabled() { - return myMultipleCodeSystemVersionsEnabled; - } - - /** - *

- * This determines whether multiple code system versions will be enabled. If not enabled, existing code systems will be - * deleted when a new version is uploaded. - *

- *

- * The default value for this setting is {@code false}. - *

- * - * @since 5.1.0 - */ - public void setMultipleCodeSystemVersionsEnabled(Boolean theMultipleCodeSystemVersionsEnabled) { - myMultipleCodeSystemVersionsEnabled = theMultipleCodeSystemVersionsEnabled; - } - } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoValueSetDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoValueSetDstu2.java index c43d3e3d9c2..12cbd8fa2f5 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoValueSetDstu2.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoValueSetDstu2.java @@ -43,12 +43,10 @@ import ca.uhn.fhir.rest.param.TokenParam; import ca.uhn.fhir.rest.param.UriParam; import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; -import org.apache.commons.codec.binary.StringUtils; import org.hl7.fhir.common.hapi.validation.support.CachingValidationSupport; import org.hl7.fhir.common.hapi.validation.support.ValidationSupportChain; import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.instance.model.api.IPrimitiveType; -import org.jetbrains.annotations.NotNull; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; @@ -236,7 +234,6 @@ public class FhirResourceDaoValueSetDstu2 extends BaseHapiFhirResourceDao theCode, IPrimitiveType theSystem, CodingDt theCoding, IPrimitiveType theVersion, RequestDetails theRequestDetails) { throw new UnsupportedOperationException(); diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoCodeSystemDstu3.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoCodeSystemDstu3.java index 6d2cd77aa99..6a680ed97b8 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoCodeSystemDstu3.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoCodeSystemDstu3.java @@ -44,7 +44,6 @@ import org.hl7.fhir.dstu3.model.Coding; import org.hl7.fhir.instance.model.api.IBaseResource; import org.hl7.fhir.instance.model.api.IIdType; import org.hl7.fhir.instance.model.api.IPrimitiveType; -import org.jetbrains.annotations.NotNull; import org.springframework.beans.factory.annotation.Autowired; import javax.annotation.Nonnull; @@ -87,7 +86,7 @@ public class FhirResourceDaoCodeSystemDstu3 extends BaseHapiFhirResourceDao theCode, IPrimitiveType theSystem, Coding theCoding, RequestDetails theRequestDetails) { return lookupCode(theCode, theSystem, theCoding, null, theRequestDetails); @@ -121,7 +120,7 @@ public class FhirResourceDaoCodeSystemDstu3 extends BaseHapiFhirResourceDao theCode, IPrimitiveType theSystem, Coding theCoding, RequestDetails theRequestDetails) { return lookupCode(theCode, theSystem, theCoding, null, theRequestDetails); @@ -116,7 +115,7 @@ public class FhirResourceDaoCodeSystemR4 extends BaseHapiFhirResourceDao theCode, IPrimitiveType theSystem, Coding theCoding, RequestDetails theRequestDetails) { return lookupCode(theCode, theSystem, theCoding, null, theRequestDetails); } diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermLoaderSvcImpl.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermLoaderSvcImpl.java index 3fe945458a5..0068ba1ee11 100644 --- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermLoaderSvcImpl.java +++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermLoaderSvcImpl.java @@ -504,7 +504,7 @@ public class TermLoaderSvcImpl implements ITermLoaderSvc { retVal.setId("loinc-all"); retVal.setUrl("http://loinc.org/vs"); retVal.setVersion("1.0.0"); - retVal.setName("All LOINC codes"); + retVal.setName("Ø"); retVal.setStatus(Enumerations.PublicationStatus.ACTIVE); retVal.setDate(new Date()); retVal.setPublisher("Regenstrief Institute, Inc."); diff --git a/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/FhirInstanceValidatorR4Test.java b/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/FhirInstanceValidatorR4Test.java index 48d5cb31eb7..d5055423b05 100644 --- a/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/FhirInstanceValidatorR4Test.java +++ b/hapi-fhir-validation/src/test/java/org/hl7/fhir/r4/validation/FhirInstanceValidatorR4Test.java @@ -254,7 +254,7 @@ public class FhirInstanceValidatorR4Test extends BaseTest { return retVal; } }); - when(mockSupport.lookupCode(any(), any(), any())).thenAnswer(t -> { + when(mockSupport.lookupCode(any(), any(), any(), any())).thenAnswer(t -> { String system = t.getArgument(1, String.class); String code = t.getArgument(2, String.class); if (myValidConcepts.contains(system + "___" + code)) {