Upgrade core library dependency version

This commit is contained in:
jamesagnew 2020-08-10 09:05:04 -04:00
parent e61b39fc30
commit f0ed640e24
8 changed files with 49 additions and 11 deletions

View File

@ -625,7 +625,7 @@ public class FhirResourceDaoR4ValidateTest extends BaseJpaR4Test {
" },\n" + " },\n" +
" \"text\": {\n" + " \"text\": {\n" +
" \"status\": \"generated\",\n" + " \"status\": \"generated\",\n" +
" \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"></div>\"\n" + " \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\">HELLO</div>\"\n" +
" },\n" + " },\n" +
" \"url\": \"https://foo/bb\",\n" + " \"url\": \"https://foo/bb\",\n" +
" \"name\": \"BBBehaviourType\",\n" + " \"name\": \"BBBehaviourType\",\n" +

View File

@ -33,6 +33,7 @@ import org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent;
import org.hl7.fhir.r5.terminologies.ValueSetExpander; import org.hl7.fhir.r5.terminologies.ValueSetExpander;
import org.hl7.fhir.r5.utils.IResourceValidator; import org.hl7.fhir.r5.utils.IResourceValidator;
import org.hl7.fhir.utilities.TranslationServices; import org.hl7.fhir.utilities.TranslationServices;
import org.hl7.fhir.utilities.cache.BasePackageCacheManager;
import org.hl7.fhir.utilities.cache.NpmPackage; import org.hl7.fhir.utilities.cache.NpmPackage;
import org.hl7.fhir.utilities.i18n.I18nBase; import org.hl7.fhir.utilities.i18n.I18nBase;
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity; import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity;
@ -171,6 +172,11 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
return validateCode(theOptions, system, code, display, theVs); return validateCode(theOptions, system, code, display, theVs);
} }
@Override
public void validateCodeBatch(ValidationOptions options, List<? extends CodingValidationRequest> codes, ValueSet vs) {
throw new UnsupportedOperationException();
}
@Override @Override
public ValidationResult validateCode(ValidationOptions theOptions, String theSystem, String theCode, String theDisplay) { public ValidationResult validateCode(ValidationOptions theOptions, String theSystem, String theCode, String theDisplay) {
IValidationSupport.CodeValidationResult result = myValidationSupport.validateCode(new ValidationSupportContext(myValidationSupport), convertConceptValidationOptions(theOptions), theSystem, theCode, theDisplay, null); IValidationSupport.CodeValidationResult result = myValidationSupport.validateCode(new ValidationSupportContext(myValidationSupport), convertConceptValidationOptions(theOptions), theSystem, theCode, theDisplay, null);
@ -406,7 +412,17 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
} }
@Override @Override
public void loadFromPackage(NpmPackage pi, IContextResourceLoader loader, String[] types) throws FHIRException { public int loadFromPackage(NpmPackage pi, IContextResourceLoader loader) throws FHIRException {
throw new UnsupportedOperationException();
}
@Override
public int loadFromPackage(NpmPackage pi, IContextResourceLoader loader, String[] types) throws FHIRException {
throw new UnsupportedOperationException();
}
@Override
public int loadFromPackageAndDependencies(NpmPackage pi, IContextResourceLoader loader, BasePackageCacheManager pcm) throws FHIRException {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }

View File

@ -29,6 +29,7 @@ import org.hl7.fhir.r5.model.ValueSet;
import org.hl7.fhir.r5.terminologies.ValueSetExpander; import org.hl7.fhir.r5.terminologies.ValueSetExpander;
import org.hl7.fhir.r5.utils.IResourceValidator; import org.hl7.fhir.r5.utils.IResourceValidator;
import org.hl7.fhir.utilities.TranslationServices; import org.hl7.fhir.utilities.TranslationServices;
import org.hl7.fhir.utilities.cache.BasePackageCacheManager;
import org.hl7.fhir.utilities.cache.NpmPackage; import org.hl7.fhir.utilities.cache.NpmPackage;
import org.hl7.fhir.utilities.i18n.I18nBase; import org.hl7.fhir.utilities.i18n.I18nBase;
import org.hl7.fhir.utilities.validation.ValidationMessage; import org.hl7.fhir.utilities.validation.ValidationMessage;
@ -56,8 +57,8 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
private static final FhirContext ourR5Context = FhirContext.forR5(); private static final FhirContext ourR5Context = FhirContext.forR5();
private final ValidationSupportContext myValidationSupportContext; private final ValidationSupportContext myValidationSupportContext;
private final IVersionTypeConverter myModelConverter; private final IVersionTypeConverter myModelConverter;
private volatile List<StructureDefinition> myAllStructures;
private final LoadingCache<ResourceKey, IBaseResource> myFetchResourceCache; private final LoadingCache<ResourceKey, IBaseResource> myFetchResourceCache;
private volatile List<StructureDefinition> myAllStructures;
private org.hl7.fhir.r5.model.Parameters myExpansionProfile; private org.hl7.fhir.r5.model.Parameters myExpansionProfile;
public VersionSpecificWorkerContextWrapper(ValidationSupportContext theValidationSupportContext, IVersionTypeConverter theModelConverter) { public VersionSpecificWorkerContextWrapper(ValidationSupportContext theValidationSupportContext, IVersionTypeConverter theModelConverter) {
@ -122,8 +123,18 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
} }
@Override @Override
public void loadFromPackage(NpmPackage pi, IContextResourceLoader loader, String[] types) throws FHIRException { public int loadFromPackage(NpmPackage pi, IContextResourceLoader loader) throws FileNotFoundException, IOException, FHIRException {
throw new UnsupportedOperationException();
}
@Override
public int loadFromPackage(NpmPackage pi, IContextResourceLoader loader, String[] types) throws FHIRException {
throw new UnsupportedOperationException();
}
@Override
public int loadFromPackageAndDependencies(NpmPackage pi, IContextResourceLoader loader, BasePackageCacheManager pcm) throws FileNotFoundException, IOException, FHIRException {
throw new UnsupportedOperationException();
} }
@Override @Override
@ -529,6 +540,14 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
return doValidation(convertedVs, validationOptions, system, code, display); return doValidation(convertedVs, validationOptions, system, code, display);
} }
@Override
public void validateCodeBatch(ValidationOptions options, List<? extends CodingValidationRequest> codes, ValueSet vs) {
for (CodingValidationRequest next : codes) {
ValidationResult outcome = validateCode(options, next.getCoding(), vs);
next.setResult(outcome);
}
}
@Nonnull @Nonnull
private ValidationResult doValidation(IBaseResource theValueSet, ConceptValidationOptions theValidationOptions, String theSystem, String theCode, String theDisplay) { private ValidationResult doValidation(IBaseResource theValueSet, ConceptValidationOptions theValidationOptions, String theSystem, String theCode, String theDisplay) {
IValidationSupport.CodeValidationResult result; IValidationSupport.CodeValidationResult result;

View File

@ -643,6 +643,9 @@ public class FhirInstanceValidatorDstu3Test {
ourLog.info("Skipping logical type: {}", next.getId()); ourLog.info("Skipping logical type: {}", next.getId());
continue; continue;
} }
if (sd.getUrl().equals("http://hl7.org/fhir/StructureDefinition/Resource")) {
continue;
}
} }
ourLog.info("Validating {}", next.getId()); ourLog.info("Validating {}", next.getId());
@ -762,7 +765,7 @@ public class FhirInstanceValidatorDstu3Test {
Patient resource = loadResource("/dstu3/nl/nl-core-patient-01.json", Patient.class); Patient resource = loadResource("/dstu3/nl/nl-core-patient-01.json", Patient.class);
ValidationResult results = myVal.validateWithResult(resource); ValidationResult results = myVal.validateWithResult(resource);
List<SingleValidationMessage> outcome = logResultsAndReturnNonInformationalOnes(results); List<SingleValidationMessage> outcome = logResultsAndReturnNonInformationalOnes(results);
assertThat(outcome.toString(), containsString("The Coding provided is not in the value set http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.20.5.1--20171231000000")); assertThat(outcome.toString(), containsString("The Coding provided (urn:oid:2.16.840.1.113883.2.4.4.16.34#6030) is not in the value set http://decor.nictiz.nl/fhir/ValueSet/2.16.840.1.113883.2.4.3.11.60.40.2.20.5.1--20171231000000"));
} }
private void loadNL() throws IOException { private void loadNL() throws IOException {

View File

@ -826,7 +826,7 @@ public class FhirInstanceValidatorR4Test extends BaseTest {
" \"resourceType\":\"Patient\"," + " \"resourceType\":\"Patient\"," +
" \"text\": {\n" + " \"text\": {\n" +
" \"status\": \"generated\",\n" + " \"status\": \"generated\",\n" +
" \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"> </div>\"\n" + " \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\">HELLO</div>\"\n" +
" },\n" + " },\n" +
" \"id\":\"123\"" + " \"id\":\"123\"" +
"}"; "}";
@ -842,7 +842,7 @@ public class FhirInstanceValidatorR4Test extends BaseTest {
"\"resourceType\":\"Patient\"," + "\"resourceType\":\"Patient\"," +
" \"text\": {\n" + " \"text\": {\n" +
" \"status\": \"generated\",\n" + " \"status\": \"generated\",\n" +
" \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"> </div>\"\n" + " \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\">HELLO</div>\"\n" +
" },\n" + " },\n" +
"\"id\":\"123\"," + "\"id\":\"123\"," +
"\"foo\":\"123\"" + "\"foo\":\"123\"" +

View File

@ -451,7 +451,7 @@ public class FhirInstanceValidatorR5Test {
" \"resourceType\":\"Patient\"," + " \"resourceType\":\"Patient\"," +
" \"text\": {\n" + " \"text\": {\n" +
" \"status\": \"generated\",\n" + " \"status\": \"generated\",\n" +
" \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"> </div>\"\n" + " \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\">HELLO</div>\"\n" +
" },\n" + " },\n" +
" \"id\":\"123\"" + " \"id\":\"123\"" +
"}"; "}";
@ -467,7 +467,7 @@ public class FhirInstanceValidatorR5Test {
"\"resourceType\":\"Patient\"," + "\"resourceType\":\"Patient\"," +
" \"text\": {\n" + " \"text\": {\n" +
" \"status\": \"generated\",\n" + " \"status\": \"generated\",\n" +
" \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"> </div>\"\n" + " \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\">HELLO</div>\"\n" +
" },\n" + " },\n" +
"\"id\":\"123\"," + "\"id\":\"123\"," +
"\"foo\":\"123\"" + "\"foo\":\"123\"" +

View File

@ -2,7 +2,7 @@
"resourceType": "Patient", "resourceType": "Patient",
"text": { "text": {
"status": "generated", "status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"> </div>" "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">HELLO</div>"
}, },
"extension": [ "extension": [
{ {

View File

@ -678,7 +678,7 @@
<properties> <properties>
<fhir_core_version>5.0.9</fhir_core_version> <fhir_core_version>5.0.22</fhir_core_version>
<ucum_version>1.0.2</ucum_version> <ucum_version>1.0.2</ucum_version>
<surefire_jvm_args>-Dfile.encoding=UTF-8 -Xmx2048m</surefire_jvm_args> <surefire_jvm_args>-Dfile.encoding=UTF-8 -Xmx2048m</surefire_jvm_args>