diff --git a/src/fhirtypes/common.ts b/src/fhirtypes/common.ts index 98f9ffa31..84c6c9044 100644 --- a/src/fhirtypes/common.ts +++ b/src/fhirtypes/common.ts @@ -981,13 +981,11 @@ export function replaceReferences( clone = replaceReferences(clone, tank, fisher); } else if (type == null && id == null && value.reference) { // if the reference to an entity is provided but is unable to be resolved - if (!value.reference.startsWith('urn:')) { - if (!value.reference.includes('/')) { - logger.warn( - `Cannot find the entity referenced at ${value.reference}. The provided reference value will be used, but this reference does not conform to the FHIR Reference format.`, - rule.sourceInfo - ); - } + if (!(value.reference.startsWith('urn:') || value.reference.includes('/'))) { + logger.warn( + `Cannot find the entity referenced at ${value.reference}. The provided reference value will be used, but this reference does not conform to the FHIR Reference format.`, + rule.sourceInfo + ); } } }