import { ValueSetPackageLoader } from './valueset-package-loader'; type FhirVersion = 'R4' | 'R5' | 'R6'; export type MemberOfPrecheckResult = boolean | null; /** * Evaluates the common invariant shape: * where(path.memberOf('ValueSet')).exists() * * fhirpath.js exposes memberOf as an async function, which cannot run in our * synchronous compiled-expression path. For this simple shape, evaluate the * ValueSet membership directly against local package ValueSets instead of * skipping the constraint or producing false positives. */ export declare function evaluateSimpleMemberOfExists(expression: string, resource: any, resourceType: string, loader: ValueSetPackageLoader, fhirVersion?: FhirVersion): Promise; /** * Evaluates a boolean constraint ending in `.memberOf('')`, * e.g. `address.where(country = 'XX').country.memberOf('.../iso3166-1-2')`. * * fhirpath.js only exposes `memberOf` as an async function, which our * synchronous compiled-expression path rejects ("asynchronous function is not * allowed"). So we split off the trailing `.memberOf(url)`, evaluate the prefix * synchronously via fhirpath.js (everything before `.memberOf` is ordinary * FHIRPath), and apply the shared synchronous `memberOfFunction` (ISO-3166 * hardcoded sets + expanded-ValueSet cache) to each resulting value. * * Returns: * - `true` — every selected value is a member (or no values were selected, * which FHIRPath treats as vacuously satisfied) * - `false` — at least one selected value is a determinate non-member * - `null` — not a trailing-memberOf expression, or membership is * undeterminable (no ISO match, no cached expansion) — caller * falls back to its normal evaluation/skip path */ export declare function evaluateTrailingMemberOf(expression: string, resource: any, fhirVersion?: FhirVersion): MemberOfPrecheckResult; /** * Evaluates optional element membership constraints of the form: * * country.empty() or ( * country.memberOf('...iso3166-1-2') or * country.memberOf('...iso3166-1-3') * ) * * These constraints are often attached to a complex element such as * `Patient.address`, so the caller must pass the already-resolved element * context, not the resource root. */ export declare function evaluateOptionalMemberOfUnion(expression: string, context: any): MemberOfPrecheckResult; export {}; //# sourceMappingURL=fhirpath-memberof-precheck.d.ts.map