/** * Constraint Validator * * Validates FHIRPath constraints (invariants) defined in StructureDefinitions * Uses fhirpath.js for expression evaluation */ import type { ValidationIssue } from '../types'; import type { ElementDefinition } from '../core/structure-definition-types'; type FHIRPathConstraintSkipReason = 'async-function' | 'disallowed-function' | 'unsupported-engine-capability'; export interface FHIRPathConstraintSkipSample { reason: FHIRPathConstraintSkipReason; constraintKey: string; profileUrl: string; path: string; expression: string; errorMessage: string; } export interface FHIRPathConstraintDiagnostics { skippedConstraints: { total: number; byReason: Record; byConstraintKey: Record; byProfile: Record; samples: FHIRPathConstraintSkipSample[]; }; } export declare class ConstraintValidator { private timeout; private memberOfValueSetLoader; private diagnostics; validate(resource: any, elements: ElementDefinition[], profileUrl: string, options?: { strictMode?: boolean; fhirVersion?: 'R4' | 'R5' | 'R6'; bundle?: any; }): Promise; private logRootCoreConstraints; /** * Validate a single FHIRPath constraint */ private validateConstraint; private shouldSkipGenericConstraint; private buildConstraintViolationIssue; private evaluateFHIRPath; /** Check if FHIRPath constraint result indicates success */ private checkConstraintResult; setTimeout(timeout: number): void; getDiagnostics(): FHIRPathConstraintDiagnostics; clearDiagnostics(): void; private recordSkippedConstraint; static getCacheStats(): { hits: number; misses: number; compileErrors: number; hitRate: string; size: number; }; static clearCache(): void; } export declare function getFHIRPathCacheStats(): { hits: number; misses: number; compileErrors: number; hitRate: string; size: number; }; export declare function clearFHIRPathCache(): void; /** * Get combined FHIRPath cache stats from both ConstraintValidator and SDFHIRPathExecutor. * Returns per-cache and aggregate hit rates. */ export declare function getCombinedFHIRPathCacheStats(): { constraint: import("./fhirpath-expression-cache-core").FHIRPathExpressionCacheStats; sdExecutor: import("./fhirpath-expression-cache-core").FHIRPathExpressionCacheStats; combined: { hits: number; misses: number; compileErrors: number; hitRate: string; size: number; }; }; export {}; //# sourceMappingURL=constraint-validator.d.ts.map