Skip to content

Commit

Permalink
combining conditional statements
Browse files Browse the repository at this point in the history
  • Loading branch information
KaelynJefferson committed Jun 27, 2024
1 parent 0b69980 commit 7247b48
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/fhirtypes/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -981,13 +981,11 @@ export function replaceReferences<T extends AssignmentRule | CaretValueRule>(
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
);
}
}
}
Expand Down

0 comments on commit 7247b48

Please sign in to comment.