The compounds provided are heteropyridol and azapidan, which can be used to inhibit Btk quinasa and to treat immune disorders such as Btk quinasa induced inflammation. The methods for in vitro, in-situ and in-situ diagnosis and treatment of this disorder or related disorder in mammalian cells with formula compound (1) are listed in the table. Claim 1: a compound selected from formula (1) or its stereoisomer, tautometer or pharmaceutically acceptable salts: X1 is CR1 or N; X2 is CR2 or N; X3 is CR3 or N; X1 or X1 is one or two,X2 and X3 are n, R1,R2 and R3 were selected from h, F, Cl and - nh832222, respectively;-NHCH₃,-N (CH)-Oh, oc832323,-8 832283;-OCH₂CH₂OH, and C₁₋₃ alkyl;R se selecciona de H F Cl CN -CH OH -CH (CH) OH -C (CH) OH -CH (CF) OH -CH F -CHF-CH₂CHF₂,-CF8323,-C (O) NH-C (O) NHCH-C (O) N (CH)-NH832222,-NHCH₃,-N (CH)-NHC (O) CH-Oh, oc832323,-8 832283;-OCH₂CH₂OH, cyclopropyl, cyclopropylmethyl, 1-hydroxycyclopropyl, imidazolyl, pyrazolyl, 3-hydroxy-oxetan-3-yl, oxetan-3-yl and azetidin-1-yl; R⁵ is optionally substituted aryl C₆₋₂₀, C₃₋₁₂ carbocyclyl,C₂₋₂₀ heterocyclyl,C₁₋₂₀ heteroaryl,- (C₆₋₂₀ aryl) - (C₂₋₂₀ heterocyclyl),- (C₁₋₂₀ heteroaryl) - (C₂₋₂₀ heterocyclyl),- (C₁₋₂₀ heteroaryl) - (C₂₋₂₀ heterocyclyl) - (C₂₋₂₀ heterocyclyl),- (C₁₋₂₀ heteroaryl) - (C₂₋₂₀ heterocyclyl) - (C₁₋₆ alkyl),- (C₁₋₂₀ heteroaryl) - (C₁₋₆ alkyl),- (C₂₋₂₀ heterocyclyl) - (C₁₋₆ alkyl),- (C₂₋₂₀ heterocyclyl) - (C₃₋₁₂ carbocyclyl),- (C₁₋₂₀ heteroaryl) - (C₃₋₁₂ carbocyclyl) or - (C₁₋₂₀ heteroaryl) -C (= O) - (C₂₋₂₀ heterocyclyl);R⁶ is H, -CH₃,-CH₂CH₃,-CH₂CH₂OH, -CHF₂,-Nh-8322u-oh; r831111 was selected from the preparation group structure (2),Where the wavy line represents the connection point; Y 1 and y 2 are independently selected from CH and N, where 1 and 2 are not n; where tar, carbohydrate, isopropene, arilo and isopropene can be replaced by one or more substitutes, which can be independently selected from F, Cl, Br, i-cn. -CH8323,-CH₂CH₃,-CH (CH)-CH CH (CH)-CH₂OH, -CH₂OCH₃,-CH