The importance of safeguarding the confidentiality and security of information becomes crucial as the amount of sensitive patient data increases, with the rise in digitalization of healthcare facilities. Conventional healthcare systems have faced challenges in safeguarding data from tampering, breaches and unauthorized access. Blockchain technology emerges as a solution to enhance data security and privacy within the healthcare sector leveraging its immutable nature. In efforts to uphold patient privacy and ensure data integrity the diagnosed conditions were diabetes mellitus and hypertension. Various machine learning techniques, such as Random Forest, Support Vector Machines, Decision Tree, Naïve Bayes and K Nearest Neighbors were utilized for illness identification. This study demonstrates how blockchain technology can be leveraged to establish a tamper framework for storing and transmitting sensitive diagnostic forecasts along with newly acquired patient data. Furthermore the management of predicted outcomes and collected patient details is overseen by smart contracts and algorithms to restrict access solely to authorized individuals like healthcare professionals. The primary goal of this research is to enhance disease detection efficiency, in healthcare analytics while placing emphasis on safeguarding information confidentiality and security.