fix bug rendering by profile

This commit is contained in:
Grahame Grieve 2020-05-29 17:44:36 +10:00
parent c4185492a5
commit 112b09d00d
1 changed files with 19 additions and 13 deletions

View File

@ -213,6 +213,7 @@ public class ProfileDrivenRenderer extends ResourceRenderer {
boolean firstElement = true;
boolean last = false;
for (PropertyWrapper p : res.children()) {
if (!ignoreProperty(p)) {
ElementDefinition child = getElementDefinition(profile.getSnapshot().getElement(), path+"."+p.getName(), p);
if (p.getValues().size() > 0 && p.getValues().get(0) != null && child != null && isPrimitive(child) && includeInSummary(child)) {
if (firstElement)
@ -232,8 +233,13 @@ public class ProfileDrivenRenderer extends ResourceRenderer {
}
}
}
}
private boolean ignoreProperty(PropertyWrapper p) {
return Utilities.existsInList(p.getName(), "contained");
}
private boolean includeInSummary(ElementDefinition child) {
if (child.getIsModifier())
return true;