From 4bc81c0e0c87878e3f6f67780dea76cf34347253 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Tue, 3 Mar 2020 07:39:41 +1100 Subject: [PATCH] Handle missing terminology server better --- .../java/org/hl7/fhir/r5/context/BaseWorkerContext.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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);