From 84fc25efa3a6617b044872036b8d7bd50a17603e Mon Sep 17 00:00:00 2001 From: Lloyd McKenzie Date: Tue, 16 Jul 2024 21:35:41 -0600 Subject: [PATCH] Fix issue with rendering OperationOutcomes that don't have 'detail' --- .../org/hl7/fhir/r5/renderers/OperationOutcomeRenderer.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/OperationOutcomeRenderer.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/OperationOutcomeRenderer.java index b725fa17f..8e9e8ef6b 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/OperationOutcomeRenderer.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/OperationOutcomeRenderer.java @@ -88,8 +88,9 @@ public class OperationOutcomeRenderer extends ResourceRenderer { d = true; td.addText(s.primitiveValue()); } - tr.td().addText(getTranslatedCode(i.child("code"))); - tr.td().addText(i.child("details").primitiveValue("text")); + tr.td().addText(getTranslatedCode(i.child("code"))); + if (i.has("details")) + tr.td().addText(i.child("details").primitiveValue("text")); smartAddText(tr.td(), i.primitiveValue("diagnostics")); if (hasSource) { ResourceWrapper ext = i.extension(ToolingExtensions.EXT_ISSUE_SOURCE);