The application relates to a compound of formula (I), or a pharmaceutically acceptable salt, tautomer, prodrug, solvate, metabolite, polymorph, analog or the like, that modulates the activity of BTK. Derivatives, pharmaceutical compositions comprising compounds of formula (I) and methods for treating or preventing diseases involving BTK.本出願は、BTKの活性を調節する、式(I)の化合物、または薬学的に許容されるその塩、その互変異性体、プロドラッグ、溶媒和物、代謝産物、多形体、類似体もしくは誘導体、式(I)の化合物を含む薬学的組成物、およびBTKが関与する疾患を処置または予防する方法に関する。