import type { ValueSetPackageLoader } from './valueset-package-loader'; import { type FhirVersion } from './valueset-expansion-cache-key'; import type { TerminologyResolutionConfig } from './valueset-types'; import { type TwoPhaseLookupResult } from './terminology-two-phase-expansion'; /** * Shadow/enforce evaluator for two-phase terminology expansion. * * Extracted from valueset-validator.ts. Owns the install-time expansion * instance plus the shadow-comparison statistics and mismatch logging, so the * validator can run two-phase lookups alongside its authoritative resolution * and (in `enforce` mode) substitute the install-time result. */ export interface TwoPhaseShadowStats { lookups: number; hits: number; misses: number; unknown: number; mismatches: number; enforced: number; } type TwoPhaseConfig = TerminologyResolutionConfig['twoPhaseExpansion']; export declare class TwoPhaseShadowEvaluator { private expansion; private config; private stats; private mismatchLogs; private static readonly MISMATCH_LOG_LIMIT; constructor(packageLoader: ValueSetPackageLoader, config: TwoPhaseConfig); setConfig(config: TwoPhaseConfig): void; getStats(): TwoPhaseShadowStats; clearExpansion(): void; lookup(code: string, system: string | undefined, valueSetUrl: string, fhirVersion?: FhirVersion): Promise; /** * In `enforce` mode with complete coverage, the install-time result is * authoritative; returns the boolean to use, or undefined to defer to the * validator's own resolution. */ getEnforcedResult(result: TwoPhaseLookupResult | undefined): boolean | undefined; /** * Records (and rate-limit-logs) a shadow mismatch between the two-phase * result and the validator's authoritative result, then returns the * authoritative result unchanged. */ finish(result: TwoPhaseLookupResult | undefined, finalResult: boolean, context: { code: string; system?: string; valueSetUrl: string; }): boolean; } export {}; //# sourceMappingURL=valueset-two-phase-shadow.d.ts.map