fix rendering of multiple imports in value sets

This commit is contained in:
Grahame Grieve 2024-05-12 22:27:54 +10:00
parent 248b8b1ac8
commit 3f236eb880
2 changed files with 13 additions and 8 deletions

View File

@ -1273,14 +1273,18 @@ public class ValueSetRenderer extends TerminologyRenderer {
renderExpansionRules(li, inc, index, definitions);
}
} else {
li.tx(context.formatMessage(RenderingContext.VALUE_SET_IMPORT)+" ");
if (inc.getValueSet().size() < 4) {
boolean first = true;
li.tx(context.formatMessagePlural(inc.getValueSet().size(), RenderingContext.VALUE_SET_IMPORT)+" ");
if (inc.getValueSet().size() <= 2) {
int i = 0;
for (UriType vs : inc.getValueSet()) {
if (first)
first = false;
else
li.tx(", ");
if (i > 0) {
if ( i < inc.getValueSet().size() - 1) {
li.tx(", ");
} else {
li.tx(" and ");
}
}
i++;
XhtmlNode wli = renderStatus(vs, li);
AddVsRef(vs.asStringValue(), wli, vsRes);
}

View File

@ -620,7 +620,8 @@ VALUE_SET_SPEC_NAME = Fully specified name
VALUE_SET_SYNONYM = Synonym
VALUE_SET_COMMA = ,
VALUE_SET_WHERE_CODES = , where the codes are contained in
VALUE_SET_IMPORT = Import all the codes that are contained in
VALUE_SET_IMPORT_one = Import all the codes that are contained in
VALUE_SET_IMPORT_other = Import all the codes that are contained in the intersection of
VALUE_SET_NOTE = Note: {0}
VALUE_SET_ERROR = Error Expanding ValueSet: {0}
VALUE_SET_NULL = null