Electronic Health Records (EHRs) store sensitive and critical patient information, necessitating stringent access control and sharing mechanisms to uphold data security and comply with privacy regulations such as the General Data Protection Regulation (GDPR). In this paper, we propose a comprehensive architecture and a suite of efficient protocols that leverage the synergistic capabilities of blockchain and Interplanetary File System (IPFS) technologies to enable secure access control and sharing of EHRs. Our approach is based on a private blockchain, wherein smart contracts are deployed to enforce control exclusively by patients. By granting patients exclusive control over their EHRs, our solution ensures compliance with personal data protection laws and empowers individuals to manage their health information autonomously. Notably, our proposed architecture seamlessly integrates with existing health provider information systems, facilitating interoperability and effectively addressing security and data heterogeneity challenges. To exhibit the effectiveness of our approach, we developed a prototype implementation utilizing the Ethereum platform, enabling the simulation of diverse scenarios involving access control and health data sharing among healthcare practitioners. Our experimental results demonstrate the scalability, recovery mechanisms, and revocation procedures embedded within our solution, thereby substantiating its efficacy and robustness in real-world healthcare settings. Overall, our study provides a significant contribution towards a secure and interoperable framework for EHR access control and sharing, leveraging patient-centric control mechanisms.