The application relates to a compound of Formula (I): or a pharmaceutically acceptable salt, hydrate, solvate, prodrug, stereoisomer, or tautomer thereof, which modulates the activity of BTK, a pharmaceutical composition comprising a compound of Formula (I), and a method of treating or preventing a disease in which BTK plays a role.本申請案係關於一種調節BTK活性之式(I)化合物或其醫藥上可接受之鹽、水合物、溶劑合物、前藥、立體異構物、或互變異構物, 一種包含式(I)化合物之醫藥組成物,以及一種治療或預防其中BTK扮演角色之疾病的方法。