The article analyzes the relationship between the immune system and cognitive patterns. The theoretical part discusses the theory of schemes, with a special focus on the theoretical model of J. E. Young, which was used in the psychoneuroimunological study. The article presents some of the results of this study.