Data transparency, flexible access, immutability, privacy, audit, traceability, data provenance, trust, and security are fundamental issues for modern healthcare data management systems. As a promising new technology, block chain has the potential to enhance healthcare data management functions by boosting data efficiency and guaranteeing trust. The present research looked into the benefits of block chain technology in healthcare and the challenges that have prevented its widespread implementation so far. Healthcare organisations around the world are using a variety of methods to modernise into more effective, coordinated and user-cantered structures. There is an increase in both human effort and security risks when dealing with massive amounts of data, such as reports and images for each individual. Internet of Things (IoT) solutions in healthcare aim to address these problems by enhancing patient care while reducing costs through more effective use of healthcare resources. However, many different types of intrusion can pose serious risks to IoT devices. In some cases, doctors will insist that their patients use only certain labs or pharmacies, regardless of the quality of the services they provide, simply to increase the doctor's bottom line. Because of this, protecting data is essential when discussing the Internet of Things. To solve these problems, Blockchain technology has emerged as the most reliable method for protecting the privacy of control systems in real time. In this paper, we will introduce a CNN-based healthcare data security framework using the blockchain technique by generating the hash of each data point, which will alert all users of the blockchain network to any unauthorised changes to data or breaches in the supply of medicines.