Bump org.hl7.fhir.core dependency to 6.0.8 (#4942)
* Bump core, fix compilation errors * Match pattern in kindling for use of version Match the pattern used by Grahame in this update of kindling:f765642470
* Bump core, fix compilation errors * Match pattern in kindling for use of version Match the pattern used by Grahame in this update of kindling:f765642470
* Bump core to 6.0.5, fix compilation errors * Bump to core version 6.0.8 * Individual message code for exception * Bump core to 6.0.10 * Fix test message
This commit is contained in:
parent
e068a2f32b
commit
34f4c90eb9
|
@ -953,7 +953,7 @@ public class FhirResourceDaoR4ValidateTest extends BaseJpaR4Test {
|
||||||
OperationOutcome oo = validateAndReturnOutcome(vs);
|
OperationOutcome oo = validateAndReturnOutcome(vs);
|
||||||
ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
|
ourLog.debug(myFhirContext.newJsonParser().setPrettyPrint(true).encodeResourceToString(oo));
|
||||||
|
|
||||||
assertEquals("The code 123 is not valid in the system https://bb", oo.getIssue().get(0).getDiagnostics());
|
assertEquals("The code '123' is not valid in the system https://bb", oo.getIssue().get(0).getDiagnostics());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -29,7 +29,7 @@ import org.hl7.fhir.r5.model.StructureDefinition;
|
||||||
import org.hl7.fhir.r5.model.ValueSet;
|
import org.hl7.fhir.r5.model.ValueSet;
|
||||||
import org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent;
|
import org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent;
|
||||||
import org.hl7.fhir.r5.profilemodel.PEBuilder;
|
import org.hl7.fhir.r5.profilemodel.PEBuilder;
|
||||||
import org.hl7.fhir.r5.terminologies.ValueSetExpander;
|
import org.hl7.fhir.r5.terminologies.expansion.ValueSetExpansionOutcome;
|
||||||
import org.hl7.fhir.r5.utils.validation.IResourceValidator;
|
import org.hl7.fhir.r5.utils.validation.IResourceValidator;
|
||||||
import org.hl7.fhir.r5.utils.validation.ValidationContextCarrier;
|
import org.hl7.fhir.r5.utils.validation.ValidationContextCarrier;
|
||||||
import org.hl7.fhir.utilities.TimeTracker;
|
import org.hl7.fhir.utilities.TimeTracker;
|
||||||
|
@ -163,7 +163,7 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ValueSetExpander.ValueSetExpansionOutcome expandVS(ValueSet theValueSet, boolean cacheOk, boolean heiarchical, boolean incompleteOk) {
|
public ValueSetExpansionOutcome expandVS(ValueSet theValueSet, boolean cacheOk, boolean heiarchical, boolean incompleteOk) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -180,7 +180,7 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
|
||||||
severity = IssueSeverity.fromCode(result.getSeverityCode());
|
severity = IssueSeverity.fromCode(result.getSeverityCode());
|
||||||
}
|
}
|
||||||
ConceptDefinitionComponent definition = new ConceptDefinitionComponent().setCode(result.getCode());
|
ConceptDefinitionComponent definition = new ConceptDefinitionComponent().setCode(result.getCode());
|
||||||
return new ValidationResult(severity, result.getMessage(), theSystem, definition, null, null);
|
return new ValidationResult(severity, result.getMessage(), theSystem, theVersion, definition, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -199,7 +199,7 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
|
||||||
ConceptDefinitionComponent definition = new ConceptDefinitionComponent();
|
ConceptDefinitionComponent definition = new ConceptDefinitionComponent();
|
||||||
definition.setCode(theCode);
|
definition.setCode(theCode);
|
||||||
definition.setDisplay(outcome.getDisplay());
|
definition.setDisplay(outcome.getDisplay());
|
||||||
return new ValidationResult(theSystem, definition, null);
|
return new ValidationResult(theSystem, theVersion, definition, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new ValidationResult(IssueSeverity.ERROR, "Unknown code[" + theCode + "] in system[" +
|
return new ValidationResult(IssueSeverity.ERROR, "Unknown code[" + theCode + "] in system[" +
|
||||||
|
@ -223,17 +223,17 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ValueSetExpander.ValueSetExpansionOutcome expandVS(ValueSet theSource, boolean theCacheOk, boolean theHierarchical) {
|
public ValueSetExpansionOutcome expandVS(ValueSet theSource, boolean theCacheOk, boolean theHierarchical) {
|
||||||
throw new UnsupportedOperationException(Msg.code(2128));
|
throw new UnsupportedOperationException(Msg.code(2128));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ValueSetExpander.ValueSetExpansionOutcome expandVS(ConceptSetComponent theInc, boolean theHierarchical, boolean theNoInactive) throws TerminologyServiceException {
|
public ValueSetExpansionOutcome expandVS(ConceptSetComponent theInc, boolean theHierarchical, boolean theNoInactive) throws TerminologyServiceException {
|
||||||
ValueSet input = new ValueSet();
|
ValueSet input = new ValueSet();
|
||||||
input.getCompose().setInactive(!theNoInactive); //TODO GGG/DO is this valid?
|
input.getCompose().setInactive(!theNoInactive); //TODO GGG/DO is this valid?
|
||||||
input.getCompose().addInclude(theInc);
|
input.getCompose().addInclude(theInc);
|
||||||
IValidationSupport.ValueSetExpansionOutcome output = myValidationSupport.expandValueSet(new ValidationSupportContext(myValidationSupport), null, input);
|
IValidationSupport.ValueSetExpansionOutcome output = myValidationSupport.expandValueSet(new ValidationSupportContext(myValidationSupport), null, input);
|
||||||
return new ValueSetExpander.ValueSetExpansionOutcome((ValueSet) output.getValueSet(), output.getError(), null);
|
return new ValueSetExpansionOutcome((ValueSet) output.getValueSet(), output.getError(), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -368,7 +368,7 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ValueSetExpander.ValueSetExpansionOutcome expandVS(Resource src,ElementDefinitionBindingComponent theBinding, boolean theCacheOk, boolean theHierarchical) throws FHIRException {
|
public ValueSetExpansionOutcome expandVS(Resource src,ElementDefinitionBindingComponent theBinding, boolean theCacheOk, boolean theHierarchical) throws FHIRException {
|
||||||
throw new UnsupportedOperationException(Msg.code(230));
|
throw new UnsupportedOperationException(Msg.code(230));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -476,4 +476,15 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
|
||||||
public PEBuilder getProfiledElementBuilder(PEBuilder.PEElementPropertiesPolicy thePEElementPropertiesPolicy, boolean theB) {
|
public PEBuilder getProfiledElementBuilder(PEBuilder.PEElementPropertiesPolicy thePEElementPropertiesPolicy, boolean theB) {
|
||||||
throw new UnsupportedOperationException(Msg.code(2261));
|
throw new UnsupportedOperationException(Msg.code(2261));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isForPublication() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setForPublication(boolean b) {
|
||||||
|
throw new UnsupportedOperationException(Msg.code(2350));
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,9 @@ import org.hl7.fhir.r5.model.Resource;
|
||||||
import org.hl7.fhir.r5.model.StructureDefinition;
|
import org.hl7.fhir.r5.model.StructureDefinition;
|
||||||
import org.hl7.fhir.r5.model.ValueSet;
|
import org.hl7.fhir.r5.model.ValueSet;
|
||||||
import org.hl7.fhir.r5.profilemodel.PEBuilder;
|
import org.hl7.fhir.r5.profilemodel.PEBuilder;
|
||||||
import org.hl7.fhir.r5.terminologies.ValueSetExpander;
|
|
||||||
|
import org.hl7.fhir.r5.terminologies.expansion.ValueSetExpansionOutcome;
|
||||||
|
import org.hl7.fhir.r5.terminologies.utilities.TerminologyServiceErrorClass;
|
||||||
import org.hl7.fhir.r5.utils.validation.IResourceValidator;
|
import org.hl7.fhir.r5.utils.validation.IResourceValidator;
|
||||||
import org.hl7.fhir.r5.utils.validation.ValidationContextCarrier;
|
import org.hl7.fhir.r5.utils.validation.ValidationContextCarrier;
|
||||||
import org.hl7.fhir.utilities.TimeTracker;
|
import org.hl7.fhir.utilities.TimeTracker;
|
||||||
|
@ -239,15 +241,16 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
|
||||||
if (theResult != null) {
|
if (theResult != null) {
|
||||||
String code = theResult.getCode();
|
String code = theResult.getCode();
|
||||||
String display = theResult.getDisplay();
|
String display = theResult.getDisplay();
|
||||||
|
|
||||||
String issueSeverity = theResult.getSeverityCode();
|
String issueSeverity = theResult.getSeverityCode();
|
||||||
String message = theResult.getMessage();
|
String message = theResult.getMessage();
|
||||||
if (isNotBlank(code)) {
|
if (isNotBlank(code)) {
|
||||||
retVal = new ValidationResult(theSystem, new org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionComponent()
|
retVal = new ValidationResult(theSystem, null, new org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionComponent()
|
||||||
.setCode(code)
|
.setCode(code)
|
||||||
.setDisplay(display),
|
.setDisplay(display),
|
||||||
null);
|
null);
|
||||||
} else if (isNotBlank(issueSeverity)) {
|
} else if (isNotBlank(issueSeverity)) {
|
||||||
retVal = new ValidationResult(ValidationMessage.IssueSeverity.fromCode(issueSeverity), message, ValueSetExpander.TerminologyServiceErrorClass.UNKNOWN, null);
|
retVal = new ValidationResult(ValidationMessage.IssueSeverity.fromCode(issueSeverity), message, TerminologyServiceErrorClass.UNKNOWN, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -260,7 +263,7 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ValueSetExpander.ValueSetExpansionOutcome expandVS(org.hl7.fhir.r5.model.ValueSet source, boolean cacheOk, boolean Hierarchical) {
|
public ValueSetExpansionOutcome expandVS(org.hl7.fhir.r5.model.ValueSet source, boolean cacheOk, boolean Hierarchical) {
|
||||||
IBaseResource convertedSource;
|
IBaseResource convertedSource;
|
||||||
try {
|
try {
|
||||||
convertedSource = myVersionCanonicalizer.valueSetFromValidatorCanonical(source);
|
convertedSource = myVersionCanonicalizer.valueSetFromValidatorCanonical(source);
|
||||||
|
@ -279,18 +282,18 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
|
||||||
}
|
}
|
||||||
|
|
||||||
String error = expanded.getError();
|
String error = expanded.getError();
|
||||||
ValueSetExpander.TerminologyServiceErrorClass result = null;
|
TerminologyServiceErrorClass result = null;
|
||||||
|
|
||||||
return new ValueSetExpander.ValueSetExpansionOutcome(convertedResult, error, result);
|
return new ValueSetExpansionOutcome(convertedResult, error, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ValueSetExpander.ValueSetExpansionOutcome expandVS(Resource src, org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionBindingComponent binding, boolean cacheOk, boolean Hierarchical) {
|
public ValueSetExpansionOutcome expandVS(Resource src, org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionBindingComponent binding, boolean cacheOk, boolean Hierarchical) {
|
||||||
throw new UnsupportedOperationException(Msg.code(663));
|
throw new UnsupportedOperationException(Msg.code(663));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ValueSetExpander.ValueSetExpansionOutcome expandVS(ValueSet.ConceptSetComponent inc, boolean hierarchical, boolean noInactive) throws TerminologyServiceException {
|
public ValueSetExpansionOutcome expandVS(ValueSet.ConceptSetComponent inc, boolean hierarchical, boolean noInactive) throws TerminologyServiceException {
|
||||||
throw new UnsupportedOperationException(Msg.code(664));
|
throw new UnsupportedOperationException(Msg.code(664));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -464,7 +467,7 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ValueSetExpander.ValueSetExpansionOutcome expandVS(ValueSet source, boolean cacheOk, boolean heiarchical, boolean incompleteOk) {
|
public ValueSetExpansionOutcome expandVS(ValueSet source, boolean cacheOk, boolean heiarchical, boolean incompleteOk) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -643,6 +646,17 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
|
||||||
VersionCanonicalizer versionCanonicalizer = new VersionCanonicalizer(theValidationSupport.getFhirContext());
|
VersionCanonicalizer versionCanonicalizer = new VersionCanonicalizer(theValidationSupport.getFhirContext());
|
||||||
return new VersionSpecificWorkerContextWrapper(new ValidationSupportContext(theValidationSupport), versionCanonicalizer);
|
return new VersionSpecificWorkerContextWrapper(new ValidationSupportContext(theValidationSupport), versionCanonicalizer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isForPublication() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setForPublication(boolean b) {
|
||||||
|
throw new UnsupportedOperationException(Msg.code(2351));
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -980,7 +980,7 @@ public class FhirInstanceValidatorDstu3Test {
|
||||||
ourLog.info(output.getMessages().get(0).getLocationString());
|
ourLog.info(output.getMessages().get(0).getLocationString());
|
||||||
ourLog.info(output.getMessages().get(0).getMessage());
|
ourLog.info(output.getMessages().get(0).getMessage());
|
||||||
assertEquals("/f:Patient", output.getMessages().get(0).getLocationString());
|
assertEquals("/f:Patient", output.getMessages().get(0).getLocationString());
|
||||||
assertEquals("Undefined element 'foo'", output.getMessages().get(0).getMessage());
|
assertEquals("Undefined element 'foo' at /f:Patient", output.getMessages().get(0).getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -1040,7 +1040,7 @@ public class FhirInstanceValidatorR4Test extends BaseTest {
|
||||||
ourLog.info(output.getMessages().get(0).getLocationString());
|
ourLog.info(output.getMessages().get(0).getLocationString());
|
||||||
ourLog.info(output.getMessages().get(0).getMessage());
|
ourLog.info(output.getMessages().get(0).getMessage());
|
||||||
assertEquals("/f:Patient", output.getMessages().get(0).getLocationString());
|
assertEquals("/f:Patient", output.getMessages().get(0).getLocationString());
|
||||||
assertEquals("Undefined element 'foo'", output.getMessages().get(0).getMessage());
|
assertEquals("Undefined element 'foo' at /f:Patient", output.getMessages().get(0).getMessage());
|
||||||
assertEquals(28, output.getMessages().get(0).getLocationCol().intValue());
|
assertEquals(28, output.getMessages().get(0).getLocationCol().intValue());
|
||||||
assertEquals(4, output.getMessages().get(0).getLocationLine().intValue());
|
assertEquals(4, output.getMessages().get(0).getLocationLine().intValue());
|
||||||
}
|
}
|
||||||
|
|
|
@ -985,7 +985,7 @@ public class FhirInstanceValidatorR4BTest extends BaseTest {
|
||||||
ourLog.info(output.getMessages().get(0).getLocationString());
|
ourLog.info(output.getMessages().get(0).getLocationString());
|
||||||
ourLog.info(output.getMessages().get(0).getMessage());
|
ourLog.info(output.getMessages().get(0).getMessage());
|
||||||
assertEquals("/f:Patient", output.getMessages().get(0).getLocationString());
|
assertEquals("/f:Patient", output.getMessages().get(0).getLocationString());
|
||||||
assertEquals("Undefined element 'foo'", output.getMessages().get(0).getMessage());
|
assertEquals("Undefined element 'foo' at /f:Patient", output.getMessages().get(0).getMessage());
|
||||||
assertEquals(28, output.getMessages().get(0).getLocationCol().intValue());
|
assertEquals(28, output.getMessages().get(0).getLocationCol().intValue());
|
||||||
assertEquals(4, output.getMessages().get(0).getLocationLine().intValue());
|
assertEquals(4, output.getMessages().get(0).getLocationLine().intValue());
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,8 +42,8 @@ import org.hl7.fhir.r5.model.StringType;
|
||||||
import org.hl7.fhir.r5.model.StructureDefinition;
|
import org.hl7.fhir.r5.model.StructureDefinition;
|
||||||
import org.hl7.fhir.r5.model.ValueSet;
|
import org.hl7.fhir.r5.model.ValueSet;
|
||||||
import org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionComponent;
|
import org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionComponent;
|
||||||
import org.hl7.fhir.r5.terminologies.ValueSetExpander;
|
import org.hl7.fhir.r5.terminologies.expansion.ValueSetExpander;;
|
||||||
import org.hl7.fhir.r5.utils.validation.IResourceValidator;
|
import org.hl7.fhir.r5.terminologies.expansion.ValueSetExpansionOutcome;
|
||||||
import org.hl7.fhir.r5.utils.validation.IValidationPolicyAdvisor;
|
import org.hl7.fhir.r5.utils.validation.IValidationPolicyAdvisor;
|
||||||
import org.hl7.fhir.r5.utils.validation.IValidatorResourceFetcher;
|
import org.hl7.fhir.r5.utils.validation.IValidatorResourceFetcher;
|
||||||
import org.hl7.fhir.r5.utils.validation.constants.BestPracticeWarningLevel;
|
import org.hl7.fhir.r5.utils.validation.constants.BestPracticeWarningLevel;
|
||||||
|
@ -150,7 +150,7 @@ public class FhirInstanceValidatorR5Test {
|
||||||
|
|
||||||
ValueSet valueset = new ValueSet();
|
ValueSet valueset = new ValueSet();
|
||||||
valueset.setExpansion(retVal);
|
valueset.setExpansion(retVal);
|
||||||
return new ValueSetExpander.ValueSetExpansionOutcome(valueset);
|
return new ValueSetExpansionOutcome(valueset);
|
||||||
});
|
});
|
||||||
when(myMockSupport.isCodeSystemSupported(any(), nullable(String.class))).thenAnswer(new Answer<Boolean>() {
|
when(myMockSupport.isCodeSystemSupported(any(), nullable(String.class))).thenAnswer(new Answer<Boolean>() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -624,7 +624,7 @@ public class FhirInstanceValidatorR5Test {
|
||||||
ourLog.info(output.getMessages().get(0).getLocationString());
|
ourLog.info(output.getMessages().get(0).getLocationString());
|
||||||
ourLog.info(output.getMessages().get(0).getMessage());
|
ourLog.info(output.getMessages().get(0).getMessage());
|
||||||
assertEquals("/f:Patient", output.getMessages().get(0).getLocationString());
|
assertEquals("/f:Patient", output.getMessages().get(0).getLocationString());
|
||||||
assertEquals("Undefined element 'foo'", output.getMessages().get(0).getMessage());
|
assertEquals("Undefined element 'foo' at /f:Patient", output.getMessages().get(0).getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -893,7 +893,7 @@
|
||||||
</licenses>
|
</licenses>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<fhir_core_version>6.0.1</fhir_core_version>
|
<fhir_core_version>6.0.10</fhir_core_version>
|
||||||
<ucum_version>1.0.3</ucum_version>
|
<ucum_version>1.0.3</ucum_version>
|
||||||
<surefire_jvm_args>-Dfile.encoding=UTF-8 -Xmx2048m</surefire_jvm_args>
|
<surefire_jvm_args>-Dfile.encoding=UTF-8 -Xmx2048m</surefire_jvm_args>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue