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 8aedd4481..e86086ac1 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 @@ -2626,7 +2626,8 @@ public class ProfileUtilities extends TranslatingUtilities { c.addPiece(checkForNoChange(fallback.getShortElement(), gen.new Piece(null, gt(fallback.getShortElement()), null))); } if (url != null) { - if (!c.getPieces().isEmpty()) c.addPiece(gen.new Piece("br")); + if (!c.getPieces().isEmpty()) + c.addPiece(gen.new Piece("br")); String fullUrl = url.startsWith("#") ? baseURL+url : url; StructureDefinition ed = context.fetchResource(StructureDefinition.class, url); String ref = null; @@ -2831,7 +2832,8 @@ public class ProfileUtilities extends TranslatingUtilities { c.getPieces().add(checkForNoChange(definition.getFixed(), gen.new Piece(null, "\""+buildJson(definition.getFixed())+"\"", null).addStyle("color: darkgreen"))); } else { if (url != null) { - if (!c.getPieces().isEmpty()) c.addPiece(gen.new Piece("br")); + if (!c.getPieces().isEmpty()) + c.addPiece(gen.new Piece("br")); String fullUrl = url.startsWith("#") ? baseURL+url : url; StructureDefinition ed = context.fetchResource(StructureDefinition.class, url); String ref = null; diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/BaseWorkerContext.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/BaseWorkerContext.java index cbf40a2e4..ffc6c22b8 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/BaseWorkerContext.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/BaseWorkerContext.java @@ -681,6 +681,10 @@ public abstract class BaseWorkerContext implements IWorkerContext { if (uri.startsWith("http:") || uri.startsWith("https:")) { String version = null; + if (uri.contains("|")) { + version = uri.substring(uri.lastIndexOf("|")+1); + uri = uri.substring(0, uri.lastIndexOf("|")); + } if (uri.contains("#")) uri = uri.substring(0, uri.indexOf("#")); if (class_ == Resource.class || class_ == null) {