export interface SubsumptionResult { /** * Relationship outcome. `'unknown'` is returned when the terminology * server could not be reached — callers MUST check `checkable` before * treating `'not-subsumed'` as authoritative. */ outcome: 'subsumes' | 'subsumed-by' | 'equivalent' | 'not-subsumed' | 'unknown'; related: boolean; /** * Whether this result is authoritative. `false` when the terminology * server returned an error or was unreachable — `outcome` will be * `'unknown'` in that case and `error` will carry the reason. */ checkable: boolean; error?: string; } export interface HierarchyInfo { code: string; system: string; display?: string; parents?: string[]; children?: string[]; ancestors?: string[]; descendants?: string[]; } export interface HierarchyValidationResult { /** * True if the code belongs to the required hierarchy. * * When `checkable === false` this field is meaningless and should be * treated as "unverified" rather than "invalid" — the validator could * not reach the terminology server to make the determination. Without * this distinction the validator produces false negatives during * tx.fhir.org outages. */ isValid: boolean; /** * Whether the underlying subsumption check was authoritative. * `false` means the terminology server was unreachable or returned * an error; callers should degrade gracefully instead of failing * validation. */ checkable: boolean; message?: string; hierarchyInfo?: HierarchyInfo; } export declare class TerminologyHierarchyValidator { private serverUrl; private timeout; private subsumptionCache; private hierarchyCache; constructor(options?: { serverUrl?: string; timeout?: number; }); setServerUrl(url: string): void; checkSnomedSubsumption(codeA: string, codeB: string): Promise; isSnomedDescendantOf(code: string, ancestorCode: string): Promise; validateSnomedHierarchy(code: string, requiredAncestor: string, ancestorName?: string): Promise; validateIcd10Hierarchy(code: string, options?: { allowBillable?: boolean; requiredCategory?: string; }): Promise; private icd10CategoryMatch; getHierarchyInfo(code: string, system: string): Promise; getCacheStats(): { subsumption: number; hierarchy: number; }; clearCaches(): void; } export declare function getHierarchyValidator(): TerminologyHierarchyValidator; export declare function resetHierarchyValidator(): void; //# sourceMappingURL=terminology-hierarchy-validator.d.ts.map