From 256c494d91ba76e0ff4aa116814f4c2db30df8ae Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Thu, 9 May 2024 19:15:40 +1000 Subject: [PATCH] Fix bug using wrong message for value sets that are too costly to expand --- .../main/java/org/hl7/fhir/r5/renderers/ValueSetRenderer.java | 4 ++-- .../org/hl7/fhir/utilities/i18n/RenderingI18nContext.java | 1 + .../src/main/resources/rendering-phrases.properties | 1 + 3 files changed, 4 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 f7fd6fe29..a4a8d2552 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 @@ -207,7 +207,7 @@ public class ValueSetRenderer extends TerminologyRenderer { // } String msg = null; if (vs.getExpansion().getContains().isEmpty()) { - msg = context.formatMessage(RenderingContext.VALUE_SET_INF); // not sure that's true? + msg = context.formatMessage(RenderingContext.VALUE_SET_TOO_COSTLY); } else { msg = /*!#*/"This value set cannot be fully expanded, but a selection ("+countMembership(vs)+" codes) of the whole set of codes is shown here."; } @@ -487,7 +487,7 @@ public class ValueSetRenderer extends TerminologyRenderer { if (versions.size() == 1 && versions.get(s).size() == 1) { for (String v : versions.get(s)) { // though there'll only be one XhtmlNode p = x.para().style("border: black 1px dotted; background-color: #EEEEEE; padding: 8px; margin-bottom: 8px"); - p.tx(context.formatMessage(RenderingContext.VALUE_SET_EXPANSION)); + p.tx(context.formatMessage(RenderingContext.VALUE_SET_EXPANSION)+" "); expRef(p, s, v, vs); } } else { diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/i18n/RenderingI18nContext.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/i18n/RenderingI18nContext.java index 1bcb18ebe..23fd4a468 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/i18n/RenderingI18nContext.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/i18n/RenderingI18nContext.java @@ -575,6 +575,7 @@ public class RenderingI18nContext extends I18nBase { public static final String VALUE_SET_CONT = "VALUE_SET_CONT"; public static final String VALUE_SET_INF = "VALUE_SET_INF"; public static final String VALUE_SET_SEL = "VALUE_SET_SEL"; + public static final String VALUE_SET_TOO_COSTLY = "VALUE_SET_TOO_COSTLY"; public static final String VALUE_SET_LEVEL = "VALUE_SET_LEVEL"; public static final String VALUE_SET_CODE = "VALUE_SET_CODE"; public static final String VALUE_SET_SYSTEM = "VALUE_SET_SYSTEM"; diff --git a/org.hl7.fhir.utilities/src/main/resources/rendering-phrases.properties b/org.hl7.fhir.utilities/src/main/resources/rendering-phrases.properties index 0a2bd4bf6..83af7f3dc 100644 --- a/org.hl7.fhir.utilities/src/main/resources/rendering-phrases.properties +++ b/org.hl7.fhir.utilities/src/main/resources/rendering-phrases.properties @@ -582,6 +582,7 @@ TEST_PLAN_RESULT = Result VALUE_SET_CONT = Value Set Contents VALUE_SET_INF = This value set cannot be expanded because of the way it is defined - it has an infinite number of members. VALUE_SET_SEL = This value set has >1000 codes in it. In order to keep the publication size manageable, only a selection (1000 codes) of the whole set of codes is shown +VALUE_SET_TOO_COSTLY = This value set cannot be expanded because the terminology server(s) deemed it too costly to do so VALUE_SET_LEVEL = Level VALUE_SET_CODE = Code VALUE_SET_SYSTEM = System