import type { Coding, Encounter, Expression, FhirResource, Patient, Practitioner, QuestionnaireItem, ValueSet } from 'fhir/r4'; import type { FhirResourceString } from '../interfaces/populate.interface'; import type { VariableXFhirQuery } from '../interfaces/variables.interface'; import type { ProcessedValueSet, ValidateCodeResponse, ValueSetPromise } from '../interfaces/valueSet.interface'; export declare function getTerminologyServerUrl(qItem: QuestionnaireItem): string | undefined; export declare function getValueSetPromise(url: string, terminologyServerUrl: string): Promise; export declare function validateCodePromise(url: string, system: string, code: string, terminologyServerUrl: string): Promise; export declare function resolveValueSetPromises(valueSetPromises: Record): Promise>; /** * Sets an array of codings with the values from a valueSet * * @author Sean Fong */ export declare function getValueSetCodings(valueSet: ValueSet): Coding[]; /** * Evaluate valueSets in answerExpression with fhirpath * * @author Sean Fong */ export declare function evaluateAnswerExpressionValueSet(answerExpression: Expression, itemLevelVariables: Expression[], preprocessedCodings: Record): Coding[]; export declare function createValueSetToXFhirQueryVariableNameMap(variables: Record): Record; export declare function getResourceFromLaunchContext(resourceType: FhirResourceString, patient: Patient | null, user: Practitioner | null, encounter: Encounter | null, resolvedFhirContextReferences: Record | null): FhirResource | null; /** * Retrieves the codings for a given answer value set URL. * * This function attempts to resolve codings in the following order: * 1. If the URL is a contained reference (starts with `#`), return the cached contained codings. * 2. If a processed value set has an `updatableValueSetUrl`, use that URL. * 3. Attempt to retrieve codings from the cached queried value sets. */ export declare function getCodingsForAnswerValueSet(answerValueSetUrl: string | undefined, cachedValueSetCodings: Record, processedValueSets: Record): Coding[];