The COVID-19 pandemic has had a terrible effect on human health, and computer-aided diagnostic (CAD) systems for chest computed tomography have emerged as a potential alternative for COVID-19 diagnosis. Yet, since the cost of data annotation may be excessively costly in the medical area, there is a shortage of data that has been annotated. A considerable quantity of labelled data is required in order to train a CAD system to a high level of accuracy. The study aims to describe an automatic and precise COVID-19 diagnostic method that utilizes a restricted amount of labelled CT images to solve this problem. The framework of the system is known as Qualified Contrastive Machine Learning (QCML), and the improvements that we have made may be summed up as follows: 1) In order to make use of all of the image's characteristics, we combine features with a two-dimensional discrete wavelet transform. 2) We employ the COVID-Net encoder with a redesign that focuses on the efficiency of learning and the task specificity of the data. 3) In order to strengthen our capacity to generalize, we have implemented a novel pertaining technique that is based on Qualified Contrastive Machine Learning. 4) In order to get better categorization results, we have included an extra auxiliary work. The application of Qualified Contrastive Machine Learning methodology for infectious disease diagnosis in CT images offers an accuracy of 93.55%, a recall of 91.59%, a precision of 96.92%, and an F1-score of 94.18%, demonstrating the potential for accurate and efficient COVID-19 diagnosis with limited labelled data.