diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java index 1eb379360..b58ff56e2 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java @@ -6485,5 +6485,9 @@ public class ProfileUtilities extends TranslatingUtilities { public static boolean isMustSupport(CanonicalType profile) { return "true".equals(ToolingExtensions.readStringExtension(profile, ToolingExtensions.EXT_MUST_SUPPORT)); } + + public ElementDefinitionResolution resolveContentRef(StructureDefinition structure, ElementDefinition element) { + return getElementById(structure, structure.getSnapshot().getElement(), element.getContentReference()); + } } \ No newline at end of file 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 d27ee059a..2765f08bc 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 @@ -119,7 +119,7 @@ public class BundleRenderer extends ResourceRenderer { // * The subject resource Narrative // * The Composition resource Narrative // * The section.text Narratives - ResourceWrapper comp = (ResourceWrapper) entries.get(0).getChildByName("resource").getValues().get(0); + ResourceWrapper comp = (ResourceWrapper) entries.get(0).getChildByName("resource").getAsResource(); ResourceWrapper subject = resolveReference(entries, comp.get("subject")); if (subject != null) { if (subject.hasNarrative()) { @@ -175,7 +175,7 @@ public class BundleRenderer extends ResourceRenderer { if (entry.has("fullUrl")) { String fu = entry.get("fullUrl").primitiveValue(); if (ref.equals(fu)) { - return (ResourceWrapper) entry.getChildByName("resource").getValues().get(0); + return (ResourceWrapper) entry.getChildByName("resource").getAsResource(); } } }