enhancements to questionnaire renderer

This commit is contained in:
Grahame Grieve 2020-06-24 17:27:08 +10:00
parent 37bd445ed4
commit a85adcf88d
1 changed files with 13 additions and 2 deletions

View File

@ -136,8 +136,19 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
}
if (i.hasEnableWhen()) {
if (!defn.getPieces().isEmpty()) defn.addPiece(gen.new Piece("br"));
defn.getPieces().add(gen.new Piece(null, "Enable When: ", null));
defn.getPieces().add(gen.new Piece(null, "todo", null));
Piece p = gen.new Piece(null, "Enable When: ", null);
defn.getPieces().add(p);
if (i.getEnableWhen().size() == 0) {
XhtmlNode x = new XhtmlNode(NodeType.Element, "span");
p.getChildren().add(x);
renderEnableWhen(x, i.getEnableWhenFirstRep());
} else {
XhtmlNode x = new XhtmlNode(NodeType.Element, "ul");
p.getChildren().add(x);
for (QuestionnaireItemEnableWhenComponent qi : i.getEnableWhen()) {
renderEnableWhen(x.li(), qi);
}
}
}
if (i.hasAnswerValueSet()) {
if (!defn.getPieces().isEmpty()) defn.addPiece(gen.new Piece("br"));