diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/BundleRenderer.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/BundleRenderer.java index 2765f08bc..044a1ddcf 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/BundleRenderer.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/BundleRenderer.java @@ -104,7 +104,7 @@ public class BundleRenderer extends ResourceRenderer { xn.para().b().tx("Exception generating narrative: "+e.getMessage()); } } - root.blockquote().addChildren(xn); + root.blockquote().para().addChildren(xn); } } } @@ -156,7 +156,7 @@ public class BundleRenderer extends ResourceRenderer { List sections = section.children("section"); for (BaseWrapper child : sections) { if (nested) { - addSection(x.blockquote(), child, level+1, true); + addSection(x.blockquote().para(), child, level+1, true); } else { addSection(x, child, level+1, true); } @@ -241,7 +241,7 @@ public class BundleRenderer extends ResourceRenderer { List sections = section.getSection(); for (SectionComponent child : sections) { if (nested) { - addSection(x.blockquote(), child, level+1, true); + addSection(x.blockquote().para(), child, level+1, true); } else { addSection(x, child, level+1, true); } @@ -300,7 +300,7 @@ public class BundleRenderer extends ResourceRenderer { xn = makeExceptionXhtml(e, "generating narrative"); } } - root.blockquote().getChildNodes().addAll(checkInternalLinks(b, xn.getChildNodes())); + root.blockquote().para().getChildNodes().addAll(checkInternalLinks(b, xn.getChildNodes())); } } } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/CodeSystemRenderer.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/CodeSystemRenderer.java index cf647b1a2..ef3309e8e 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/CodeSystemRenderer.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/CodeSystemRenderer.java @@ -51,7 +51,7 @@ public class CodeSystemRenderer extends TerminologyRenderer { h.addText(cs.hasTitle() ? cs.getTitle() : cs.getName()); addMarkdown(x, cs.getDescription()); if (cs.hasCopyright()) - generateCopyright(x, cs); + generateCopyright(x, cs ); } generateProperties(x, cs); @@ -245,7 +245,7 @@ public class CodeSystemRenderer extends TerminologyRenderer { if (cs == null) { return false; } - return CodeSystemUtilities.hasCode(cs, code); + return code == null ? false : CodeSystemUtilities.hasCode(cs, code); } return false; } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/PatientRenderer.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/PatientRenderer.java index 2c08b10ab..3115055cd 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/PatientRenderer.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/PatientRenderer.java @@ -223,7 +223,7 @@ public class PatientRenderer extends ResourceRenderer { @Override public boolean render(XhtmlNode x, ResourceWrapper r) throws FHIRFormatError, DefinitionException, IOException { - describe(x, r); + describe(x.para(), r); return false; } } \ No newline at end of file diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/QuestionnaireResponseRenderer.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/QuestionnaireResponseRenderer.java index 2a765f651..65f2d4b3e 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/QuestionnaireResponseRenderer.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/QuestionnaireResponseRenderer.java @@ -168,10 +168,12 @@ public class QuestionnaireResponseRenderer extends ResourceRenderer { r.getCells().add(gen.new Cell(null, context.getDefinitionsTarget() == null ? "" : context.getDefinitionsTarget()+"#item."+linkId, linkId, null, null)); r.getCells().add(gen.new Cell(null, null, text, null, null)); r.getCells().add(gen.new Cell(null, null, null, null, null)); - if (answers.size() == 0) { + if (answers == null || answers.size() == 0) { r.getCells().add(gen.new Cell(null, null, null, null, null)); - for (BaseWrapper si : items) { - renderTreeItem(gen, r.getSubRows(), q, si); + if (items != null) { + for (BaseWrapper si : items) { + renderTreeItem(gen, r.getSubRows(), q, si); + } } } else if (answers.size() == 1) { BaseWrapper ans = answers.get(0);