import type { ValidationIssue } from '../types'; import type { Binding } from '../core/structure-definition-types'; import type { TerminologyResolutionConfig, CodeBindingOutcome, TerminologyDiagnostics } from './valueset-types'; import { type BindingStrength } from './valueset-display-utils'; import { type FhirVersion } from './valueset-expansion-cache-key'; import { type CodeSystemValidationResult } from './terminology-api-client'; import { type ValidateBindingOptions } from './valueset-binding-validator'; export type { TerminologyResolutionStrategy, TerminologyResolutionConfig, ValueSet, CodeSystem } from './valueset-types'; export declare class ValueSetValidator { private resolutionConfig; private cache; private apiClient; private packageLoader; private twoPhaseShadow; private terminologyDiagnostics; private bindingResolutions; static readonly EXTERNAL_CODE_SYSTEMS: Set; constructor(); /** * Configure the terminology resolution strategy */ setResolutionConfig(config: Partial): void; /** * Get current resolution config */ getResolutionConfig(): TerminologyResolutionConfig; /** * Check if a CodeSystem requires external validation */ isExternalCodeSystem(system: string): boolean; private resolveServerForSystem; private hasTerminologyServer; private validateCodeViaTerminologyServer; /** * Validate a coded element against its binding */ validateBinding(code: any, binding: Binding | undefined, elementPath: string, options?: ValidateBindingOptions): Promise; private bindingValidationDeps; isCodeValidForBinding(code: string, system: string | undefined, valueSetUrl: string, bindingStrength: BindingStrength, fhirVersion?: FhirVersion): Promise; /** * Tri-state variant of {@link isCodeValidForBinding}. Distinguishes * `unverified` (could not confirm) from `valid`, so callers can surface a * visible informational issue instead of silently failing open (gap P-3). */ resolveCodeBindingForBinding(code: string, system: string | undefined, valueSetUrl: string, bindingStrength: BindingStrength, fhirVersion?: FhirVersion, elementPath?: string): Promise; private resolveCodeBindingSafely; /** * Validate a code directly against a CodeSystem using tx.fhir.org */ validateCodeInCodeSystem(code: string, system: string, display?: string, fhirVersion?: FhirVersion): Promise; /** * Validate against an installed CodeSystem only. This is used by the deep * Coding walk for datatype children that are not expanded into a resource * StructureDefinition snapshot. It must never trigger a remote terminology * request merely because a nested Coding exists. */ validateCodeInLocalCodeSystemOnly(code: string, system: string, display?: string, fhirVersion?: FhirVersion): Promise; private validateCodeInLocalCodeSystem; /** * Check if a code is in a value set */ isCodeInValueSet(code: string, system: string | undefined, valueSetUrl: string, fhirVersion?: FhirVersion): Promise; clearCache(): void; getCacheStats(): { valueSetCount: number; codeSystemCount: number; validateCodeResultCount: number; subsumesResultCount: number; terminologyDiagnostics: TerminologyDiagnostics; twoPhaseExpansion?: { lookups: number; hits: number; misses: number; unknown: number; mismatches: number; enforced: number; }; }; /** * Preload common value sets */ preloadCommonValueSets(): Promise; /** * Tri-state code-vs-binding check. `valid`/`invalid` are authoritative; * `unverified` means the code is not known to be wrong but could not be * confirmed (no local expansion, terminology-server-only filters, or empty * expansion). Callers fail open on `unverified` but may surface it as an * informational issue (gap P-3). */ private resolveCodeBinding; private isCodeInValueSetStrict; private getExpandedValueSet; } //# sourceMappingURL=valueset-validator.d.ts.map