According to the security breach level index, millions of records are stolen worldwide on every single day. Personal health records are the most targeted records on the internet, and they are considered sensitive, and valuable. Security and privacy are the most important parameters of cryptography and encryption. They reduce the availability of data on patients and healthcare to the appropriate personnel and ultimately lead to a barrier in the transfer of healthcare into a digital health system. Using a permission blockchain to share healthcare data can reduce security and privacy issues. According to the literature, most healthcare systems rely on a centralized system, which is more prone to security vulnerabilities. The existing blockchain-based healthcare schemes provide only a data-sharing framework, but they lack security and privacy. To cope with these kinds of security issues, we have designed a novel security algorithm that provides security as well as privacy with much better efficiency and a lower cost. Hence, in this research, we have proposed a patient healthcare framework that provides greater security, reliability, and authentication compared to existing blockchain-based access control.