From 7c5782689a46fae659ac73985f195296c28ed374 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Thu, 18 Aug 2022 09:38:44 +1000 Subject: [PATCH] Fix NPE issue rendering resources without ids --- .../java/org/hl7/fhir/r5/renderers/ProfileDrivenRenderer.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/ProfileDrivenRenderer.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/ProfileDrivenRenderer.java index b79a4f61a..686b6a936 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/ProfileDrivenRenderer.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/ProfileDrivenRenderer.java @@ -108,7 +108,9 @@ public class ProfileDrivenRenderer extends ResourceRenderer { XhtmlNode p = x.para(); if (context.isAddGeneratedNarrativeHeader()) { p.b().tx("Generated Narrative: "+r.fhirType()); - p.an(r.getId()); + if (!Utilities.noString(r.getId())) { + p.an(r.getId()); + } idDone = true; } if (context.isTechnicalMode() && !context.isContained()) {