From ac986ca789f78e524aee298fe90860aa1fca1247 Mon Sep 17 00:00:00 2001 From: Mint Thompson Date: Fri, 4 Aug 2023 11:44:45 -0400 Subject: [PATCH] Use regular metadata fishing when we remove the version --- src/fhirtypes/common.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/fhirtypes/common.ts b/src/fhirtypes/common.ts index 0da61acf0..83b61fcde 100644 --- a/src/fhirtypes/common.ts +++ b/src/fhirtypes/common.ts @@ -35,7 +35,7 @@ import { } from '../fshtypes'; import { FSHTank } from '../import'; import { Type, Fishable, Metadata } from '../utils/Fishable'; -import { fishForMetadataBestVersion, fishInTankBestVersion, logger } from '../utils'; +import { fishInTankBestVersion, logger } from '../utils'; import { buildSliceTree, calculateSliceTreeCounts } from './sliceTree'; import { InstanceExporter } from '../export'; import { MismatchedTypeError } from '../errors'; @@ -955,12 +955,7 @@ export function replaceReferences( // the version on a CodeSystem resource is not the same as the system's actual version out in the world. // so, they don't need to match. const baseSystem = value.system?.split('|')[0]; - const codeSystemMeta = fishForMetadataBestVersion( - fisher, - baseSystem, - rule.sourceInfo, - Type.CodeSystem - ); + const codeSystemMeta = fisher.fishForMetadata(baseSystem, Type.CodeSystem); if (codeSystemMeta) { clone = cloneDeep(rule); const assignedCode = getRuleValue(clone) as FshCode;