From 14758663cffae4b2d2e522a596cbf2a80c935a48 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Thu, 22 Aug 2024 08:07:28 +0800 Subject: [PATCH] Fix wrong reference to CDA classes for unscoped class names --- .../main/java/org/hl7/fhir/r5/renderers/ResourceRenderer.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/ResourceRenderer.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/ResourceRenderer.java index b899fd8f1..ace526204 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/ResourceRenderer.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/ResourceRenderer.java @@ -578,14 +578,16 @@ public abstract class ResourceRenderer extends DataRenderer { protected void renderUri(RenderingStatus status, XhtmlNode x, ResourceWrapper uri) throws FHIRFormatError, DefinitionException, IOException { if (!renderPrimitiveWithNoValue(status, x, uri)) { String v = uri.primitiveValue(); + boolean local = false; if (context.getContextUtilities().isResource(v)) { v = "http://hl7.org/fhir/StructureDefinition/"+v; + local = true; } if (v.startsWith("mailto:")) { x.ah(v).addText(v.substring(7)); } else { - ResourceWithReference rr = resolveReference(uri); + ResourceWithReference rr = local ? resolveReference(uri.resource(), v, true) : resolveReference(uri); if (rr != null) { if (rr.getResource() == null) { x.ah(context.prefixLocalHref(rr.getWebPath())).addText(rr.getUrlReference());