This paper presents an innovative framework that leverages cutting-edge technologies to revolutionize healthcare systems, focusing on data security, privacy, and efficient medical diagnosis. Our approach integrates distributed ledger technology (DLT), artificial intelligence (AI), and edge computing to create a robust and dependable medical ecosystem. In our proposed system, patients' health data is securely managed using a combination of elliptic curve cryptography-based identity-based cryptosystems and edge nodes, ensuring both privacy and integrity. These edge nodes, designed for lowpower and short-range communication, play a pivotal role in in-vivo data collection and monitoring within the human body.The DLT model at the core of our framework utilizes peer-to-peer networks, enabling seamless information exchange while eliminating the need for centralized servers. We emphasize public edge DLTs, such as Ethereum, to ensure accessibility and data ownership for all stakeholders. Furthermore, our system incorporates a hybrid machine learning model for early detection and prediction of security threats, enhancing overall system efficiency. Our findings demonstrate a remarkable 99.7% accuracy in classification using this approach. In conclusion, this framework's multidisciplinary approach bridges the gap between healthcare, edge computing, and DLT, promising real-time data processing, enhanced security, and privacy preservation. With the rise of the Internet of Things, this innovation holds the potential to transform the future of healthcare technology.