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 6f6437b41..14e7deb92 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 @@ -669,7 +669,12 @@ public abstract class BaseWorkerContext implements IWorkerContext { if (expParameters == null) throw new Error("No ExpansionProfile provided"); pin.addParameter().setName("profile").setResource(expParameters); - txLog.clearLastId(); + if (txLog != null) { + txLog.clearLastId(); + } + if (txClient == null) { + throw new FHIRException("Attempt to use Terminology server when no Terminology server is available"); + } Parameters pOut; if (vs == null) pOut = txClient.validateCS(pin);