Fix bug using wrong message for value sets that are too costly to expand

This commit is contained in:
Grahame Grieve 2024-05-09 19:15:40 +10:00
parent d63e66fa0b
commit 256c494d91
3 changed files with 4 additions and 2 deletions

View File

@ -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 {

View File

@ -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";

View File

@ -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