Bump core version to 6.1.2 (#5317)

* WIP Fix compile errors

* Fix compile errors 2

* Fix test fails due to new Validation messages

* Ignore validation issues

Ignore two validation issues:

Two 'side is inherently a collection' warnings are now thrown for the following expressions:

NamingSystem nsd-1 uniqueId.type = 'uuid'
Observation obs-7 code != component.code

There is also a general error ignored because the StructureDefinition for StructureDefinition is actually for FHIR 3.0.1, and contains an invalid expression in constraint sdf-9. This is remedied in the expression used in 3.0.2, but a full update of all profile structure definitions is out of scope for this PR.

* Fix property name

* Add changelog
This commit is contained in:
dotasek 2023-09-19 14:26:20 -04:00 committed by GitHub
parent 8d4f07c56e
commit 9f9aeb980c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
26 changed files with 60 additions and 75 deletions

View File

@ -9,4 +9,7 @@
<li>Logback (All): 1.4.4 -&gt; 1.4.7</li>
<li>H2 Database (JPA): 2.1.214 -&gt; 2.2.220</li>
<li>Thymeleaf (Testpage Overlay): 3.0.14.RELEASE -&gt; 3.1.2.RELEASE</li>
<li>xpp3 (All): 1.1.4c.0 -&gt; 1.1.6</li>
<li>HtmlUnit (All): 2.67.0 -&gt; 2.70.0</li>
<li>org.hl7.fhir.core (All): 6.0.22.2 -&gt; 6.1.2</li>
</ul>"

View File

@ -26,21 +26,13 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
<!-- remove xpp3 fat jar and replace it with non-bundled versions -->
<exclusion>
<groupId>xpp3</groupId>
<artifactId>xpp3</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- This dependency replaces the version of xpp3 that's bundled with Ucum with one that's Java 9+ compatible -->
<dependency>
<groupId>org.codelibs</groupId>
<artifactId>xpp3</artifactId>
<version>1.1.4c.0</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>

View File

@ -39,6 +39,7 @@ import org.hl7.fhir.r4.model.ResourceType;
import org.hl7.fhir.r4.model.TypeDetails;
import org.hl7.fhir.r4.model.ValueSet;
import org.hl7.fhir.r4.utils.FHIRPathEngine;
import org.hl7.fhir.r4.utils.FHIRPathUtilityClasses.FunctionDetails;
import java.util.Collections;
import java.util.HashMap;

View File

@ -39,6 +39,7 @@ import org.hl7.fhir.r4b.model.ResourceType;
import org.hl7.fhir.r4b.model.TypeDetails;
import org.hl7.fhir.r4b.model.ValueSet;
import org.hl7.fhir.r4b.utils.FHIRPathEngine;
import org.hl7.fhir.r4b.utils.FHIRPathUtilityClasses.FunctionDetails;
import java.util.Collections;
import java.util.HashMap;

View File

@ -38,6 +38,7 @@ import org.hl7.fhir.r5.model.ResourceType;
import org.hl7.fhir.r5.model.TypeDetails;
import org.hl7.fhir.r5.model.ValueSet;
import org.hl7.fhir.r5.utils.FHIRPathEngine;
import org.hl7.fhir.r5.utils.FHIRPathUtilityClasses.FunctionDetails;
import java.util.Collections;
import java.util.HashMap;

View File

@ -60,20 +60,11 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
<!-- remove xpp3 fat jar and replace it with non-bundled versions -->
<exclusion>
<groupId>xpp3</groupId>
<artifactId>xpp3</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- These two dependencies replaces the version of xpp3 that's bundled with Ucum with one that's Java 9+ compatible -->
<dependency>
<groupId>org.codelibs</groupId>
<artifactId>xpp3</artifactId>
<version>1.1.4c.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>

View File

@ -19,7 +19,7 @@
<properties>
<org.antlr-version>4.10.1</org.antlr-version>
<org.codelibs.xpp3-version>1.1.4c.0</org.codelibs.xpp3-version>
<xpp3-version>1.1.6</xpp3-version>
<spring-security-core.version>5.7.8</spring-security-core.version>
</properties>
@ -40,16 +40,6 @@
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-validation</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>xpp3</groupId>
<artifactId>xpp3_min</artifactId>
</exclusion>
<exclusion>
<groupId>xmlpull</groupId>
<artifactId>xmlpull</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
@ -169,9 +159,9 @@
</dependency>
<dependency>
<groupId>org.codelibs</groupId>
<groupId>org.ogce</groupId>
<artifactId>xpp3</artifactId>
<version>${org.codelibs.xpp3-version}</version>
<version>${xpp3-version}</version>
</dependency>
<dependency>

View File

@ -86,7 +86,8 @@ public class ValidatorResourceFetcher implements IValidatorResourceFetcher {
}
@Override
public boolean resolveURL(IResourceValidator iResourceValidator, Object o, String s, String s1, String s2)
public boolean resolveURL(
IResourceValidator iResourceValidator, Object o, String s, String s1, String s2, boolean isCanonical)
throws IOException, FHIRException {
return true;
}

View File

@ -176,7 +176,7 @@
<optional>true</optional>
</dependency>
<dependency>
<groupId>xpp3</groupId>
<groupId>org.ogce</groupId>
<artifactId>xpp3</artifactId>
<optional>true</optional>
</dependency>

View File

@ -12,6 +12,7 @@ import org.hl7.fhir.dstu3.model.ExpressionNode;
import org.hl7.fhir.dstu3.model.IdType;
import org.hl7.fhir.dstu3.model.TypeDetails;
import org.hl7.fhir.dstu3.utils.FHIRPathEngine;
import org.hl7.fhir.dstu3.utils.FHIRPathUtilityClasses.FunctionDetails;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.exceptions.PathEngineException;
import org.hl7.fhir.instance.model.api.IBase;

View File

@ -71,7 +71,7 @@
</dependency>
<dependency>
<groupId>xpp3</groupId>
<groupId>org.ogce</groupId>
<artifactId>xpp3</artifactId>
<optional>true</optional>
</dependency>

View File

@ -78,7 +78,7 @@
<optional>true</optional>
</dependency>
<dependency>
<groupId>xpp3</groupId>
<groupId>org.ogce</groupId>
<artifactId>xpp3</artifactId>
<optional>true</optional>
</dependency>

View File

@ -16,6 +16,7 @@ import org.hl7.fhir.r4.model.IdType;
import org.hl7.fhir.r4.model.TypeDetails;
import org.hl7.fhir.r4.model.ValueSet;
import org.hl7.fhir.r4.utils.FHIRPathEngine;
import org.hl7.fhir.r4.utils.FHIRPathUtilityClasses.FunctionDetails;
import java.util.List;
import java.util.Optional;

View File

@ -70,7 +70,7 @@
<optional>true</optional>
</dependency>
<dependency>
<groupId>xpp3</groupId>
<groupId>org.ogce</groupId>
<artifactId>xpp3</artifactId>
<optional>true</optional>
</dependency>

View File

@ -16,6 +16,7 @@ import org.hl7.fhir.r4b.model.IdType;
import org.hl7.fhir.r4b.model.TypeDetails;
import org.hl7.fhir.r4b.model.ValueSet;
import org.hl7.fhir.r4b.utils.FHIRPathEngine;
import org.hl7.fhir.r4b.utils.FHIRPathUtilityClasses.FunctionDetails;
import java.util.List;
import java.util.Optional;

View File

@ -67,7 +67,7 @@
<optional>true</optional>
</dependency>
<dependency>
<groupId>xpp3</groupId>
<groupId>org.ogce</groupId>
<artifactId>xpp3</artifactId>
<optional>true</optional>
</dependency>

View File

@ -162,6 +162,12 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
throw new UnsupportedOperationException(Msg.code(209));
}
@Override
public void validateCodeBatchByRef(
ValidationOptions validationOptions, List<? extends CodingValidationRequest> list, String s) {
throw new UnsupportedOperationException(Msg.code(2430));
}
@Override
public ValueSetExpansionOutcome expandVS(
ValueSet theValueSet, boolean cacheOk, boolean heiarchical, boolean incompleteOk) {

View File

@ -16,6 +16,7 @@ import org.hl7.fhir.r5.model.IdType;
import org.hl7.fhir.r5.model.TypeDetails;
import org.hl7.fhir.r5.model.ValueSet;
import org.hl7.fhir.r5.utils.FHIRPathEngine;
import org.hl7.fhir.r5.utils.FHIRPathUtilityClasses.FunctionDetails;
import java.util.List;
import java.util.Optional;

View File

@ -79,19 +79,11 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
</exclusion>
<exclusion>
<groupId>xpp3</groupId>
<artifactId>xpp3</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- These two dependencies replaces the version of xpp3 that's bundled with Ucum with one that's Java 9+ compatible -->
<dependency>
<groupId>org.codelibs</groupId>
<artifactId>xpp3</artifactId>
<version>1.1.4c.0</version>
</dependency>
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
@ -103,10 +95,6 @@
<groupId>org.fhir</groupId>
<artifactId>ucum</artifactId>
<exclusions>
<exclusion>
<groupId>xpp3</groupId>
<artifactId>xpp3</artifactId>
</exclusion>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>

View File

@ -13,6 +13,7 @@ import org.hl7.fhir.r5.model.Base;
import org.hl7.fhir.r5.model.TypeDetails;
import org.hl7.fhir.r5.model.ValueSet;
import org.hl7.fhir.r5.utils.FHIRPathEngine;
import org.hl7.fhir.r5.utils.FHIRPathUtilityClasses.FunctionDetails;
import org.hl7.fhir.r5.utils.validation.IValidationPolicyAdvisor;
import org.hl7.fhir.r5.utils.validation.IValidatorResourceFetcher;
import org.hl7.fhir.r5.utils.validation.constants.BestPracticeWarningLevel;

View File

@ -613,6 +613,13 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
}
}
@Override
public void validateCodeBatchByRef(
ValidationOptions validationOptions, List<? extends CodingValidationRequest> list, String s) {
ValueSet valueSet = fetchResource(ValueSet.class, s);
validateCodeBatch(validationOptions, list, valueSet);
}
@Nonnull
private ValidationResult doValidation(
IBaseResource theValueSet,

View File

@ -91,6 +91,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.nullable;
import static org.mockito.Mockito.anyString;
import static org.mockito.Mockito.mock;
@ -682,8 +683,10 @@ public class FhirInstanceValidatorDstu3Test {
} else if (t.getMessage().contains("sdf-15") && t.getMessage().contains("The name 'kind' is not valid for any of the possible types")) {
// Find constraint sdf-15 fails with stricter core validation.
return false;
}
else {
} else if (t.getMessage().contains("side is inherently a collection") && t.getMessage().endsWith("may fail or return false if there is more than one item in the content being evaluated")) {
// Some DSTU3 FHIRPath expressions now produce warnings if a singleton is compared to a collection that potentially has > 1 elements
return false;
} else {
return true;
}
})
@ -1338,7 +1341,7 @@ public class FhirInstanceValidatorDstu3Test {
myInstanceVal.setValidatorPolicyAdvisor(policyAdvisor);
myVal.validateWithResult(input);
verify(fetcher, times(3)).resolveURL(any(), any(), anyString(), anyString(), anyString());
verify(fetcher, times(3)).resolveURL(any(), any(), anyString(), anyString(), anyString(), anyBoolean());
verify(policyAdvisor, times(4)).policyForReference(any(), any(), anyString(), anyString());
verify(fetcher, times(4)).fetch(any(), any(), anyString());
}

View File

@ -110,6 +110,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.nullable;
import static org.mockito.Mockito.mock;
@ -1273,7 +1274,7 @@ public class FhirInstanceValidatorR4Test extends BaseTest {
ValidationResult output = myFhirValidator.validateWithResult(input);
logResultsAndReturnAll(output);
assertEquals(
"The value provided ('notvalidcode') is not in the value set 'ObservationStatus' (http://hl7.org/fhir/ValueSet/observation-status|4.0.1), and a code is required from this value set) (error message = Unknown code 'notvalidcode' for in-memory expansion of ValueSet 'http://hl7.org/fhir/ValueSet/observation-status')",
"The value provided ('notvalidcode') is not in the value set 'ObservationStatus' (http://hl7.org/fhir/ValueSet/observation-status|4.0.1), and a code is required from this value set (error message = Unknown code 'notvalidcode' for in-memory expansion of ValueSet 'http://hl7.org/fhir/ValueSet/observation-status')",
output.getMessages().get(0).getMessage());
}
@ -1516,7 +1517,7 @@ public class FhirInstanceValidatorR4Test extends BaseTest {
myInstanceVal.setValidatorPolicyAdvisor(policyAdvisor);
myFhirValidator.validateWithResult(encoded);
verify(resourceFetcher, times(12)).resolveURL(any(), any(), anyString(), anyString(), anyString());
verify(resourceFetcher, times(12)).resolveURL(any(), any(), anyString(), anyString(), anyString(), anyBoolean());
verify(policyAdvisor, times(12)).policyForContained(any(), any(), any(), any(), any(), any(), any());
}

View File

@ -77,6 +77,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.nullable;
import static org.mockito.Mockito.mock;
@ -1177,7 +1178,7 @@ public class FhirInstanceValidatorR4BTest extends BaseTest {
ValidationResult output = myFhirValidator.validateWithResult(input);
logResultsAndReturnAll(output);
assertEquals(
"The value provided ('notvalidcode') is not in the value set 'ObservationStatus' (http://hl7.org/fhir/ValueSet/observation-status|4.3.0), and a code is required from this value set) (error message = Unknown code 'notvalidcode' for in-memory expansion of ValueSet 'http://hl7.org/fhir/ValueSet/observation-status')",
"The value provided ('notvalidcode') is not in the value set 'ObservationStatus' (http://hl7.org/fhir/ValueSet/observation-status|4.3.0), and a code is required from this value set (error message = Unknown code 'notvalidcode' for in-memory expansion of ValueSet 'http://hl7.org/fhir/ValueSet/observation-status')",
output.getMessages().get(0).getMessage());
}
@ -1382,7 +1383,7 @@ public class FhirInstanceValidatorR4BTest extends BaseTest {
myInstanceVal.setValidatorPolicyAdvisor(policyAdvisor);
myFhirValidator.validateWithResult(encoded);
verify(resourceFetcher, times(12)).resolveURL(any(), any(), anyString(), anyString(), anyString());
verify(resourceFetcher, times(12)).resolveURL(any(), any(), anyString(), anyString(), anyString(), anyBoolean());
verify(policyAdvisor, times(12)).policyForContained(any(), any(), any(), any(), any(), any(), any());
}
@ -1433,7 +1434,7 @@ public class FhirInstanceValidatorR4BTest extends BaseTest {
ValidationResult output = myFhirValidator.validateWithResult(input);
List<SingleValidationMessage> errors = logResultsAndReturnNonInformationalOnes(output);
assertEquals(1, errors.size(), errors.toString());
assertThat(errors.get(0).getMessage(), containsString("The value provided ('BLAH') is not in the value set 'CurrencyCode' (http://hl7.org/fhir/ValueSet/currencies|4.3.0), and a code is required from this value set) (error message = Unknown code 'BLAH' for in-memory expansion of ValueSet 'http://hl7.org/fhir/ValueSet/currencies')"));
assertThat(errors.get(0).getMessage(), containsString("The value provided ('BLAH') is not in the value set 'CurrencyCode' (http://hl7.org/fhir/ValueSet/currencies|4.3.0), and a code is required from this value set (error message = Unknown code 'BLAH' for in-memory expansion of ValueSet 'http://hl7.org/fhir/ValueSet/currencies')"));
}

View File

@ -874,7 +874,7 @@ public class FhirInstanceValidatorR5Test {
logResultsAndReturnAll(output);
assertThat(
output.getMessages().get(0).getMessage(),
containsString("The value provided ('notvalidcode') is not in the value set 'Observation Status' (http://hl7.org/fhir/ValueSet/observation-status|5.0.0), and a code is required from this value set) (error message = Unknown code 'notvalidcode' for in-memory expansion of ValueSet 'http://hl7.org/fhir/ValueSet/observation-status')")
containsString("The value provided ('notvalidcode') is not in the value set 'Observation Status' (http://hl7.org/fhir/ValueSet/observation-status|5.0.0), and a code is required from this value set (error message = Unknown code 'notvalidcode' for in-memory expansion of ValueSet 'http://hl7.org/fhir/ValueSet/observation-status')")
);
}

16
pom.xml
View File

@ -897,12 +897,10 @@
</licenses>
<properties>
<fhir_core_version>6.0.22.2</fhir_core_version>
<fhir_core_version>6.1.2</fhir_core_version>
<spotless_version>2.37.0</spotless_version>
<ucum_version>1.0.3</ucum_version>
<surefire_jvm_args>-Dfile.encoding=UTF-8 -Xmx2048m</surefire_jvm_args>
<ucum_version>1.0.3</ucum_version>
<!-- configure timestamp in MANIFEST.MF for maven-war-provider -->
<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss'Z'</maven.build.timestamp.format>
@ -982,6 +980,7 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<ebay_cors_filter_version>1.0.1</ebay_cors_filter_version>
<elastic_apm_version>1.28.4</elastic_apm_version>
<ucum_version>1.0.8</ucum_version>
<!-- CQL Support -->
<clinical-reasoning.version>3.0.0-PRE5</clinical-reasoning.version>
@ -1396,7 +1395,7 @@
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<version>2.67.0</version>
<version>2.70.0</version>
<exclusions>
<exclusion>
<!-- Don't let HTMLUnit bring in Jetty 9 -->
@ -2190,14 +2189,9 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>xpp3</groupId>
<groupId>org.ogce</groupId>
<artifactId>xpp3</artifactId>
<version>1.1.4c</version>
</dependency>
<dependency>
<groupId>xpp3</groupId>
<artifactId>xpp3_xpath</artifactId>
<version>1.1.4c</version>
<version>1.1.6</version>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>