UNPKG

fhir-snapshot-generator

Version:
22 lines 1.16 kB
/** * © Copyright Outburn Ltd. 2022-2025 All Rights Reserved * Project name: fhir-snapshot-generator */ import { ILogger } from 'fhir-package-explorer'; import { DefinitionFetcher } from '..'; import { ElementDefinition } from '../../../types'; /** * Takes a parent node and a child id, and ensures that the child exists in the working snapshot array. * If the child does not exist, it will be created by expanding the parent or creating the slice. * @param elements working snapshot array * @param parentId the full path of the parent node to look for the child in * @param childId the last segment of the child element id to look for, e.g "identifier:foo" or "system" * @param fetcher the definition fetcher to use for expanding the node * @param logger the logger to use for logging messages * @returns the updated element array after child was added */ export declare const ensureChild: (elements: ElementDefinition[], parentId: string, childId: string, fetcher: DefinitionFetcher, logger: ILogger, pathRewriteMap: Map<string, { id: string; path: string; }>) => Promise<ElementDefinition[]>; //# sourceMappingURL=ensureChild.d.ts.map