From 3eb8ad3ab1fa141bddb94142dc2c790365d01adb Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Sun, 3 Dec 2023 20:04:25 +1100 Subject: [PATCH] minor vs logging fixes --- .../main/java/org/hl7/fhir/r5/renderers/ValueSetRenderer.java | 2 +- .../hl7/fhir/r5/terminologies/utilities/TerminologyCache.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/ValueSetRenderer.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/ValueSetRenderer.java index 91a530483..2fce36303 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/ValueSetRenderer.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/ValueSetRenderer.java @@ -1229,7 +1229,7 @@ public class ValueSetRenderer extends TerminologyRenderer { } else if ("concept".equals(f.getProperty()) && inc.hasSystem()) { wli.addText(f.getValue()); ValidationResult vr = getContext().getWorker().validateCode(getContext().getTerminologyServiceOptions(), inc.getSystem(), inc.getVersion(), f.getValue(), null); - if (vr.isOk()) { + if (vr.isOk() && vr.getDisplay() != null) { wli.tx(" ("+vr.getDisplay()+")"); } } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/utilities/TerminologyCache.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/utilities/TerminologyCache.java index 016e0b754..90ce12297 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/utilities/TerminologyCache.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/utilities/TerminologyCache.java @@ -750,7 +750,7 @@ public class TerminologyCache { } public String summary(Coding code) { - return code.getSystem()+"#"+code.getCode()+": \""+code.getDisplay()+"\""; + return code.getSystem()+"#"+code.getCode()+(code.hasDisplay() ? ": \""+code.getDisplay()+"\"" : ""); } public String summary(CodeableConcept code) {