diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 7b06c6ab5..8ec3ae7aa 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -4,4 +4,4 @@ ## Other code changes -* no changes \ No newline at end of file +* kindling related fixes for terminology stability diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/BaseWorkerContext.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/BaseWorkerContext.java index fce726ef8..575e346c4 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/BaseWorkerContext.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/BaseWorkerContext.java @@ -129,6 +129,7 @@ import org.hl7.fhir.r5.terminologies.validation.VSCheckerException; import org.hl7.fhir.r5.terminologies.validation.ValueSetValidator; import org.hl7.fhir.r5.terminologies.ValueSetUtilities; import org.hl7.fhir.r5.terminologies.client.TerminologyClientManager; +import org.hl7.fhir.r5.terminologies.client.TerminologyClientR5; import org.hl7.fhir.r5.terminologies.client.TerminologyClientContext; import org.hl7.fhir.r5.utils.PackageHackerR5; import org.hl7.fhir.r5.utils.ResourceUtilities; @@ -231,7 +232,7 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte private Object lock = new Object(); // used as a lock for the data that follows protected String version; // although the internal resources are all R5, the version of FHIR they describe may not be - protected final TerminologyClientManager terminologyClientManager = new TerminologyClientManager(null, UUID.randomUUID().toString()); + protected final TerminologyClientManager terminologyClientManager = new TerminologyClientManager(new TerminologyClientR5.TerminologyClientR5Factory(), UUID.randomUUID().toString()); private boolean minimalMemory = false; private Map> allResourcesById = new HashMap>(); diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/expansion/ValueSetExpander.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/expansion/ValueSetExpander.java index febe4a4f9..73eeb9b8e 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/expansion/ValueSetExpander.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/expansion/ValueSetExpander.java @@ -255,7 +255,7 @@ public class ValueSetExpander extends ValueSetProcessBase { } } - if (expParams.getParameterBool("includeDesignations")) { + if (expParams.getParameterBool("includeDesignations") && designations != null) { for (ConceptDefinitionDesignationComponent t : designations) { if (t != pref && (t.hasLanguage() || t.hasUse()) && t.getValue() != null && passesDesignationFilter(t)) { @@ -882,6 +882,8 @@ public class ValueSetExpander extends ValueSetProcessBase { if (vso.getError() != null) { addErrors(vso.getAllErrors()); throw fail("Unable to expand imported value set "+vs.getUrl()+": " + vso.getError()); + } else if (vso.getValueset() == null) { + throw fail("Unable to expand imported value set "+vs.getUrl()+" but no error"); } if (vs.hasVersion() || REPORT_VERSION_ANYWAY) { UriType u = new UriType(vs.getUrl() + (vs.hasVersion() ? "|"+vs.getVersion() : ""));