fix bug rendering by profile
This commit is contained in:
parent
c4185492a5
commit
112b09d00d
|
@ -213,20 +213,22 @@ public class ProfileDrivenRenderer extends ResourceRenderer {
|
||||||
boolean firstElement = true;
|
boolean firstElement = true;
|
||||||
boolean last = false;
|
boolean last = false;
|
||||||
for (PropertyWrapper p : res.children()) {
|
for (PropertyWrapper p : res.children()) {
|
||||||
ElementDefinition child = getElementDefinition(profile.getSnapshot().getElement(), path+"."+p.getName(), p);
|
if (!ignoreProperty(p)) {
|
||||||
if (p.getValues().size() > 0 && p.getValues().get(0) != null && child != null && isPrimitive(child) && includeInSummary(child)) {
|
ElementDefinition child = getElementDefinition(profile.getSnapshot().getElement(), path+"."+p.getName(), p);
|
||||||
if (firstElement)
|
if (p.getValues().size() > 0 && p.getValues().get(0) != null && child != null && isPrimitive(child) && includeInSummary(child)) {
|
||||||
firstElement = false;
|
if (firstElement)
|
||||||
else if (last)
|
firstElement = false;
|
||||||
x.tx("; ");
|
|
||||||
boolean first = true;
|
|
||||||
last = false;
|
|
||||||
for (BaseWrapper v : p.getValues()) {
|
|
||||||
if (first)
|
|
||||||
first = false;
|
|
||||||
else if (last)
|
else if (last)
|
||||||
x.tx(", ");
|
x.tx("; ");
|
||||||
last = displayLeaf(res, v, child, x, p.getName(), showCodeDetails) || last;
|
boolean first = true;
|
||||||
|
last = false;
|
||||||
|
for (BaseWrapper v : p.getValues()) {
|
||||||
|
if (first)
|
||||||
|
first = false;
|
||||||
|
else if (last)
|
||||||
|
x.tx(", ");
|
||||||
|
last = displayLeaf(res, v, child, x, p.getName(), showCodeDetails) || last;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -234,6 +236,10 @@ public class ProfileDrivenRenderer extends ResourceRenderer {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private boolean ignoreProperty(PropertyWrapper p) {
|
||||||
|
return Utilities.existsInList(p.getName(), "contained");
|
||||||
|
}
|
||||||
|
|
||||||
private boolean includeInSummary(ElementDefinition child) {
|
private boolean includeInSummary(ElementDefinition child) {
|
||||||
if (child.getIsModifier())
|
if (child.getIsModifier())
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue