When we talk about the Internet of Things, we are referring to the connecting of things to a1 physical network that is embedded with software, sensors, and other devices that allow information2 to be exchanged between devices. It is possible that the interconnection of devices will present3 issues in terms of security, trustworthiness, reliability, and confidentiality, among other things.4 The proposed approach is effective at detecting intrusions into the Internet of Things network.5 Initially, the privacy-preserving technology was deployed utilising a Blockchain-based methodology6 to ensure that personal information was protected. Patients’ health records (PHR) security is the7 most crucial component of encryption over the Internet because of the value and importance of these8 records, particularly in the context of the Internet of Medical Things (IoMT). The search terms access9 mechanism is one of the most common approaches used to access personal health records from a10 database, but it is vulnerable to a number of security flaws. However, while blockchain-enabled11 healthcare systems provide increased security, they may also introduce weaknesses into the current12 state of the art. Blockchain-enabled frameworks have been proposed in the literature as a means13 of resolving those challenges. These solutions, on the other hand, are primarily concerned with14 data storage, with Blockchain serving as a database. To enable secure search and keyword-based15 access to a distributed database, this study proposes the use of blockchain technology as a distributed16 database, together with a homomorphic encryption mechanism. Aside from that, the suggested17 system includes a secure key revocation mechanism that can be used to automatically update various18 policies.As a result, our proposed approach provides greater security, efficiency, and transparency19 while also being more cost-effective. We have compared the findings of our proposed models with20 those of the benchmark models, if appropriate. Our comparison research demonstrates that our21 suggested framework provides a more secure and searchable mechanism for the healthcare system22 than the current state of the art.