/** * Synchronous FHIRPath custom functions used by fhirpath.js constraints. * Cache misses return `[]` so callers report an undetermined constraint * instead of silently passing. */ export declare const ISO_3166_1_ALPHA2: Set; export declare const ISO_3166_1_ALPHA3: Set; /** * Context passed to `buildUserInvocationTable` so FHIRPath custom functions * can resolve references and check terminology without async I/O. */ export interface FHIRPathEvaluationContext { rootResource: any; bundle?: any; } /** * resolve() — Resolve a Reference to its target resource. * * Resolution order: * 1. Contained references (`#id` → `rootResource.contained`) * 2. Bundle-internal references (relative `ResourceType/id` or absolute * `fullUrl` match against `bundle.entry[]`) * 3. Empty array (unresolvable — constraint skips gracefully) */ export declare function resolveFunction(ctx: FHIRPathEvaluationContext): { fn: (inputs: any[]) => any[]; arity: { 0: never[]; }; }; export declare const hasValueFunction: { fn: (inputs: any[]) => boolean[]; arity: { 0: never[]; }; }; export declare const conformsToFunction: { fn: (inputs: any[], args: any[]) => boolean[]; arity: { 1: string[]; }; }; /** * memberOf() — Check if code is a member of a ValueSet. * * Resolution order: * 1. ISO-3166-1 Alpha-2 / Alpha-3 (hardcoded, no server needed) * 2. `valueSetCache.getExpandedCodes(url)` — every ValueSet previously * expanded by the TerminologyExecutor is available here. Checks both * `system|code` and bare `code` forms. * 3. `[]` (undetermined) — the constraint will log a * `profile-constraint-evaluation-error` warning and skip. */ export declare const memberOfFunction: { fn: (inputs: any[], args: any[]) => boolean[]; arity: { 0: never[]; 1: string[]; }; }; /** * subsumes() — Check if codeA subsumes codeB (SNOMED-CT hierarchy). * * This is a **synchronous best-effort** implementation. It checks the * `TerminologyHierarchyValidator` subsumption cache (populated during * previous validations or explicit $subsumes calls). When the pair is * not cached, returns `[]` (undetermined). * * The async SNOMED $subsumes call happens in the TerminologyExecutor; * FHIRPath constraints that rely on `subsumes()` should degrade * gracefully when the cache is cold. */ export declare const subsumesFunction: { fn: (inputs: any[], args: any[]) => boolean[]; arity: { 1: string[]; }; }; export declare const descendantsFunction: { fn: (inputs: any[]) => any[]; arity: { 0: never[]; }; }; export declare const aggregateFunction: { fn: (inputs: any[], args: any[]) => any[]; arity: { 1: string[]; 2: string[]; }; }; export declare const subsetOfFunction: { fn: (inputs: any[], args: any[]) => boolean[]; arity: { 1: string[]; }; }; export declare const supersetOfFunction: { fn: (inputs: any[], args: any[]) => boolean[]; arity: { 1: string[]; }; }; /** * Build the `userInvocationTable` for fhirpath.js `evaluate()` options. */ export declare function buildUserInvocationTable(rootResource: any, bundle?: any): { resolve: { fn: (inputs: any[]) => any[]; arity: { 0: never[]; }; }; hasValue: { fn: (inputs: any[]) => boolean[]; arity: { 0: never[]; }; }; conformsTo: { fn: (inputs: any[], args: any[]) => boolean[]; arity: { 1: string[]; }; }; memberOf: { fn: (inputs: any[], args: any[]) => boolean[]; arity: { 0: never[]; 1: string[]; }; }; subsumes: { fn: (inputs: any[], args: any[]) => boolean[]; arity: { 1: string[]; }; }; descendants: { fn: (inputs: any[]) => any[]; arity: { 0: never[]; }; }; aggregate: { fn: (inputs: any[], args: any[]) => any[]; arity: { 1: string[]; 2: string[]; }; }; subsetOf: { fn: (inputs: any[], args: any[]) => boolean[]; arity: { 1: string[]; }; }; supersetOf: { fn: (inputs: any[], args: any[]) => boolean[]; arity: { 1: string[]; }; }; }; //# sourceMappingURL=fhirpath-custom-functions.d.ts.map