Healthcare is one of the top priorities in modern society to provide better health facilities. Therefore, investments in health care systems increased rapidly, aligned with the population growth rate. Besides, the data generated from the health sectors is incomparable with the amount of data generated in other industries. Therefore, managing data processing and sharing between various healthcare stakeholders is essential. Blockchain is an emerging technology used heavily in various domains, including the healthcare sector, to facilitate secure data sharing. However, mapping the content requirements with the blockchain’s configuration was not addressed, especially when addressing security, delays, and cost in healthcare systems. This paper proposes a blockchain-based intelligent Healthcare system (BC-iHealth) to address the mapping between the blockchain entities’ needs with the blockchain’s configuration while maximizing the security and minimizing the overall delay and cost. The optimization model is formulated as a Markov Decision Process (MDP) and solved intelligently using a Deep Q-Learning approach. Simulation results confirm that the Deep Q-Learning optimizes the BC-iHealth system and outperforms two benchmark strategies: random selection and exhaustive search.