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 5ce7fea59..3f427d3ed 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 @@ -1375,7 +1375,7 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte @Override public boolean isNoTerminologyServer() { - return noTerminologyServer; + return noTerminologyServer || txClient == null; } public void setNoTerminologyServer(boolean noTerminologyServer) { diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Element.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Element.java index 30ddff114..07c81b5d1 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Element.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/model/Element.java @@ -427,6 +427,8 @@ public abstract class Element extends Base implements IBaseHasExtensions, IBaseE return null; if (ext.size() > 1) throw new FHIRException("Multiple matching extensions found for extension '"+theUrl+"'"); + if (!ext.get(0).hasValue()) + return null; if (!ext.get(0).getValue().isPrimitive()) throw new FHIRException("Extension '"+theUrl+"' could not be converted to a string"); return ext.get(0).getValue().primitiveValue(); diff --git a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/StructureDefinitionValidator.java b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/StructureDefinitionValidator.java index 6dd459541..d5a392059 100644 --- a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/StructureDefinitionValidator.java +++ b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/StructureDefinitionValidator.java @@ -20,6 +20,7 @@ import org.hl7.fhir.r5.elementmodel.Element; import org.hl7.fhir.r5.elementmodel.Manager; import org.hl7.fhir.r5.elementmodel.Manager.FhirFormat; import org.hl7.fhir.r5.formats.IParser.OutputStyle; +import org.hl7.fhir.r5.model.Base; import org.hl7.fhir.r5.model.Coding; import org.hl7.fhir.r5.model.ElementDefinition; import org.hl7.fhir.r5.model.ExpressionNode; @@ -165,7 +166,10 @@ public class StructureDefinitionValidator extends BaseValidator { } String tc = type.getChildValue("code"); if (type.hasExtension(ToolingExtensions.EXT_FHIR_TYPE)) { - tc = type.getExtensionValue(ToolingExtensions.EXT_FHIR_TYPE).primitiveValue(); + Base tcv = type.getExtensionValue(ToolingExtensions.EXT_FHIR_TYPE); + if (tcv != null) { + tc = tcv.primitiveValue(); + } } if (Utilities.noString(tc) && type.hasChild("code")) { if (VersionUtilities.isR4Plus(context.getVersion())) {