diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/BaseParser.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/BaseParser.java index 8b7fc92eb54..e892a0a9e12 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/BaseParser.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/BaseParser.java @@ -282,7 +282,7 @@ public abstract class BaseParser implements IParser { } return reference; } else { - if (!ref.hasResourceType() && theRef.getResource() != null) { + if (!ref.hasResourceType() && !ref.isLocal() && theRef.getResource() != null) { ref = ref.withResourceType(myContext.getResourceDefinition(theRef.getResource()).getName()); } if (isNotBlank(myServerBaseUrl) && StringUtils.equals(myServerBaseUrl, ref.getBaseUrl())) {