Machine learning (ML) and cloud computing have now evolved to the point where they are able to be used effectively. Further improvement, however, is required when both of these technologies are combined to reap maximum benefits. A way of improving the system is by enabling healthcare workers to select appropriate machine learning algorithms for prediction and, secondly, by preserving the privacy of patient data so that it cannot be misused. The purpose of this paper is to combine these promising technologies to maintain the privacy of patient data during the disease prediction process. Treatment of heart failure may be improved and expedited with this framework. We used the following machine learning algorithms to make predictions: Logistic Regression (LR), Naive Bayes (NB), K-Nearest Neighbors (KNN), Decision Tree (DT) and Support Vector Machines (SVM). These techniques, combined with cloud computing services, improved the process of deciding whether to treat a patient with cardiac disease. Using our classifiers, we classified cardiac patients according to their features, which are grouped into single features, combinations of selected features, and all features. In experiments using all clinical features, machine learning classifiers SVM, DT, and KNN outperformed the rest, whereas in experiments using minimal clinical features, SVM and KNN were the most accurate. Internet of Things (IoT) devices allow family physicians to share diagnostic reports on the cloud in a secure manner. Ring signatures are particularly useful for verifying the integrity of data exchange. Our system keeps the physician's identity confidential from all authorized users, who can still access medical reports publicly. Our proposed mechanism has been shown to be both effective and efficient when it comes to obtaining patient reports from cloud storage.