fix mini-terminology server bugs around unknown systems
This commit is contained in:
parent
975f4fd28b
commit
ebfd70477c
|
@ -356,6 +356,9 @@ public class ValueSetValidator extends ValueSetProcessBase {
|
|||
res.setVersion(foundCoding.hasVersion() ? foundCoding.getVersion() : foundCoding.hasUserData("cs") ? ((CodeSystem) foundCoding.getUserData("cs")).getVersion() : null);
|
||||
res.setDisplay(cd.getDisplay());
|
||||
}
|
||||
if (info.getErr() != null) {
|
||||
res.setErrorClass(info.getErr());
|
||||
}
|
||||
res.setUnknownSystems(unknownSystems);
|
||||
res.addCodeableConcept(vcc);
|
||||
return res;
|
||||
|
@ -1309,6 +1312,7 @@ public class ValueSetValidator extends ValueSetProcessBase {
|
|||
}
|
||||
return res.isOk();
|
||||
} else {
|
||||
info.setErr(TerminologyServiceErrorClass.CODESYSTEM_UNSUPPORTED);
|
||||
if (unknownSystems != null) {
|
||||
if (version == null) {
|
||||
unknownSystems.add(system);
|
||||
|
|
|
@ -37,6 +37,7 @@ import org.hl7.fhir.r5.model.UriType;
|
|||
import org.hl7.fhir.r5.model.ValueSet;
|
||||
import org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionParameterComponent;
|
||||
import org.hl7.fhir.r5.terminologies.expansion.ValueSetExpansionOutcome;
|
||||
import org.hl7.fhir.r5.terminologies.utilities.TerminologyServiceErrorClass;
|
||||
import org.hl7.fhir.r5.terminologies.utilities.ValidationResult;
|
||||
import org.hl7.fhir.r5.test.utils.CompareUtilities;
|
||||
import org.hl7.fhir.r5.test.utils.TestingUtilities;
|
||||
|
@ -375,7 +376,7 @@ public class TerminologyServiceTests {
|
|||
}
|
||||
if (vm.getUnknownSystems() != null) {
|
||||
for (String s : vm.getUnknownSystems()) {
|
||||
res.addParameter("x-caused-by-unknown-system", new CanonicalType(s));
|
||||
res.addParameter(vm.getErrorClass() == TerminologyServiceErrorClass.CODESYSTEM_UNSUPPORTED ? "x-caused-by-unknown-system" : "x-unknown-system", new CanonicalType(s));
|
||||
}
|
||||
}
|
||||
if (vm.getIssues().size() > 0) {
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -20,7 +20,7 @@
|
|||
<properties>
|
||||
<guava_version>32.0.1-jre</guava_version>
|
||||
<hapi_fhir_version>6.4.1</hapi_fhir_version>
|
||||
<validator_test_case_version>1.4.27</validator_test_case_version>
|
||||
<validator_test_case_version>1.4.28-SNAPSHOT</validator_test_case_version>
|
||||
<jackson_version>2.16.0</jackson_version>
|
||||
<junit_jupiter_version>5.9.2</junit_jupiter_version>
|
||||
<junit_platform_launcher_version>1.8.2</junit_platform_launcher_version>
|
||||
|
|
Loading…
Reference in New Issue