Fix bug with value set imports not working
This commit is contained in:
parent
b68cf3ea4b
commit
3f219b7550
|
@ -923,13 +923,21 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
}
|
||||
} else {
|
||||
li.tx("Import all the codes that are contained in ");
|
||||
boolean first = true;
|
||||
for (UriType vs : inc.getValueSet()) {
|
||||
if (first)
|
||||
first = false;
|
||||
else
|
||||
li.tx(", ");
|
||||
AddVsRef(vs.asStringValue(), li);
|
||||
if (inc.getValueSet().size() < 4) {
|
||||
boolean first = true;
|
||||
for (UriType vs : inc.getValueSet()) {
|
||||
if (first)
|
||||
first = false;
|
||||
else
|
||||
li.tx(", ");
|
||||
AddVsRef(vs.asStringValue(), li);
|
||||
}
|
||||
} else {
|
||||
XhtmlNode xul = li.ul();
|
||||
for (UriType vs : inc.getValueSet()) {
|
||||
AddVsRef(vs.asStringValue(), xul.li());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return hasExtensions;
|
||||
|
|
|
@ -510,10 +510,31 @@ public class ValueSetExpanderSimple implements ValueSetExpander {
|
|||
if (!existsInParams(exp.getParameter(), p.getName(), p.getValue()))
|
||||
exp.getParameter().add(p);
|
||||
}
|
||||
copyExpansion(vso.getValueset().getExpansion().getContains());
|
||||
canBeHeirarchy = false; // if we're importing a value set, we have to be combining, so we won't try for a heirarchy
|
||||
return vso.getValueset();
|
||||
}
|
||||
|
||||
public void copyExpansion(List<ValueSetExpansionContainsComponent> list) {
|
||||
for (ValueSetExpansionContainsComponent cc : list) {
|
||||
ValueSetExpansionContainsComponent n = new ValueSet.ValueSetExpansionContainsComponent();
|
||||
n.setSystem(cc.getSystem());
|
||||
n.setCode(cc.getCode());
|
||||
n.setAbstract(cc.getAbstract());
|
||||
n.setInactive(cc.getInactive());
|
||||
n.setDisplay(cc.getDisplay());
|
||||
n.getDesignation().addAll(cc.getDesignation());
|
||||
|
||||
String s = key(n);
|
||||
if (!map.containsKey(s) && !excludeKeys.contains(s)) {
|
||||
codes.add(n);
|
||||
map.put(s, n);
|
||||
total++;
|
||||
}
|
||||
copyExpansion(cc.getContains());
|
||||
}
|
||||
}
|
||||
|
||||
private void addErrors(List<String> errs) {
|
||||
for (String s : errs) {
|
||||
if (!allErrors.contains(s)) {
|
||||
|
|
Loading…
Reference in New Issue