This study investigated the potential of blockchain technology to transform Electronic Health Record (EHR) administration, integrity, and security. EHRs store vital health information such as medical history, diagnosis, prescriptions, and imaging findings, which may be shared with healthcare professionals to improve patient care. The existing EHR systems have a centralized framework. These centralized systems have a single point of failure, data management, integrity, and security concerns. Blockchain technology provides a solution to these problems by delivering benefits such as safety, privacy, secrecy, and decentralization. This study presents a framework for adopting blockchain technology in EHR systems, providing a comprehensive, modular, and straightforward approach. Our proposed framework addresses the constraints of existing EHR systems by providing a platform for connected and interoperable EHRs. The proposed blockchain-based patient health records management framework demonstrates the potential to address the limitations of current centralized health records systems. It offers benefits such as data privacy and security, interoperability, audibility, decentralization, and automation through the use of smart contracts. The proposed framework is implemented in Ethereum. The evaluation, i.e., cost and performance results, show that this solution is reasonable and may be used on any blockchain network, whether it is permissioned or permissionless.