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);
|
||||
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
|
||||
|
|
|
@ -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.ConceptSetComponent;
|
||||
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.ValidationContextCarrier;
|
||||
import org.hl7.fhir.utilities.TimeTracker;
|
||||
|
@ -163,7 +163,7 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
|
|||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
|
||||
|
@ -180,7 +180,7 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
|
|||
severity = IssueSeverity.fromCode(result.getSeverityCode());
|
||||
}
|
||||
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
|
||||
|
@ -199,7 +199,7 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
|
|||
ConceptDefinitionComponent definition = new ConceptDefinitionComponent();
|
||||
definition.setCode(theCode);
|
||||
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[" +
|
||||
|
@ -223,17 +223,17 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
|
|||
}
|
||||
|
||||
@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));
|
||||
}
|
||||
|
||||
@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();
|
||||
input.getCompose().setInactive(!theNoInactive); //TODO GGG/DO is this valid?
|
||||
input.getCompose().addInclude(theInc);
|
||||
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
|
||||
|
@ -368,7 +368,7 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
|
|||
|
||||
|
||||
@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));
|
||||
}
|
||||
|
||||
|
@ -476,4 +476,15 @@ public final class HapiWorkerContext extends I18nBase implements IWorkerContext
|
|||
public PEBuilder getProfiledElementBuilder(PEBuilder.PEElementPropertiesPolicy thePEElementPropertiesPolicy, boolean theB) {
|
||||
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.ValueSet;
|
||||
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.ValidationContextCarrier;
|
||||
import org.hl7.fhir.utilities.TimeTracker;
|
||||
|
@ -239,15 +241,16 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
|
|||
if (theResult != null) {
|
||||
String code = theResult.getCode();
|
||||
String display = theResult.getDisplay();
|
||||
|
||||
String issueSeverity = theResult.getSeverityCode();
|
||||
String message = theResult.getMessage();
|
||||
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)
|
||||
.setDisplay(display),
|
||||
null);
|
||||
} 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
|
||||
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;
|
||||
try {
|
||||
convertedSource = myVersionCanonicalizer.valueSetFromValidatorCanonical(source);
|
||||
|
@ -279,18 +282,18 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
|
|||
}
|
||||
|
||||
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
|
||||
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));
|
||||
}
|
||||
|
||||
@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));
|
||||
}
|
||||
|
||||
|
@ -464,7 +467,7 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
|
|||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
|
||||
|
@ -643,6 +646,17 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
|
|||
VersionCanonicalizer versionCanonicalizer = new VersionCanonicalizer(theValidationSupport.getFhirContext());
|
||||
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).getMessage());
|
||||
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
|
||||
|
|
|
@ -1040,7 +1040,7 @@ public class FhirInstanceValidatorR4Test extends BaseTest {
|
|||
ourLog.info(output.getMessages().get(0).getLocationString());
|
||||
ourLog.info(output.getMessages().get(0).getMessage());
|
||||
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(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).getMessage());
|
||||
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(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.ValueSet;
|
||||
import org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionComponent;
|
||||
import org.hl7.fhir.r5.terminologies.ValueSetExpander;
|
||||
import org.hl7.fhir.r5.utils.validation.IResourceValidator;
|
||||
import org.hl7.fhir.r5.terminologies.expansion.ValueSetExpander;;
|
||||
import org.hl7.fhir.r5.terminologies.expansion.ValueSetExpansionOutcome;
|
||||
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;
|
||||
|
@ -150,7 +150,7 @@ public class FhirInstanceValidatorR5Test {
|
|||
|
||||
ValueSet valueset = new ValueSet();
|
||||
valueset.setExpansion(retVal);
|
||||
return new ValueSetExpander.ValueSetExpansionOutcome(valueset);
|
||||
return new ValueSetExpansionOutcome(valueset);
|
||||
});
|
||||
when(myMockSupport.isCodeSystemSupported(any(), nullable(String.class))).thenAnswer(new Answer<Boolean>() {
|
||||
@Override
|
||||
|
@ -624,7 +624,7 @@ public class FhirInstanceValidatorR5Test {
|
|||
ourLog.info(output.getMessages().get(0).getLocationString());
|
||||
ourLog.info(output.getMessages().get(0).getMessage());
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue