diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/QuestionnaireRenderer.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/QuestionnaireRenderer.java index da40e77f2..ade9d92f1 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/QuestionnaireRenderer.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/QuestionnaireRenderer.java @@ -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"));