From 7247b48a9a04f4ea7c4d051f06f35512a9bf1b9f Mon Sep 17 00:00:00 2001 From: kjefferson Date: Thu, 27 Jun 2024 11:37:26 -0400 Subject: [PATCH] combining conditional statements --- src/fhirtypes/common.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) 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 + ); } } }