/** * Element Context Resolver * * Resolves the correct FHIRPath evaluation context for each element path * in a StructureDefinition. This is critical for HAPI parity because * constraints must be evaluated in the context of their specific element, * not just the root resource. * * Key Features: * - Resolves nested paths (Patient.contact.name) * - Handles arrays with proper indexing * - Supports choice types (value[x]) * - Returns all matching contexts for array elements */ export interface ElementContext { /** The element value(s) to evaluate constraints on */ value: any; /** Full path including indices */ fullPath: string; /** Whether this is an array element */ isArray: boolean; /** Index if array element */ index?: number; } export declare class ElementContextResolver { /** * Resolve all contexts for an element path * Returns multiple contexts for array elements */ resolveContexts(resource: any, elementPath: string, resourceType: string): ElementContext[]; /** * Recursively traverse path and collect all matching contexts */ private traversePath; /** * Check if an element exists at the given path */ elementExists(resource: any, elementPath: string, resourceType: string): boolean; /** * Get all values at a path (flattened) */ getValuesAtPath(resource: any, elementPath: string, resourceType: string): any[]; } export declare const elementContextResolver: ElementContextResolver; //# sourceMappingURL=element-context-resolver.d.ts.map