Respiratory diseases are a major cause of death worldwide, affecting a significant proportion of the population with lung function abnormalities that can lead to respiratory illnesses. Early detection and prevention are critical to effective management of these disorders. Deep learning algorithms offer a promising approach for analyzing complex medical data and aiding in early disease detection. While transformer-based models for sequence classification have proven effective for tasks like sentiment analysis, topic classification, etc., their potential for respiratory disease classification remains largely unexplored. This paper proposes a classifier utilizing the transformer-encoder block, which can capture complex patterns and dependencies in medical data. The proposed model is trained and evaluated on a large dataset from the International Conference on Biomedical Health Informatics 2017, achieving state-of-the-art results with a mean sensitivity of 70.53%, mean specificity of 84.10%, mean average score of 77.32%, and mean harmonic score of 76.10%. These results demonstrate the model's effectiveness in diagnosing respiratory diseases while taking up minimal computational resources.