In general, health records include important information like the patient's history, findings of examinations and assessments, diagnosis reports, documentation of consent, and treatment plans. Sharing this information has grown to be a challenge concerning data security, as it could result in compromising patient privacy. Therefore, the patient's information should not be misused or tampered with. In this paper, a full process of storing and retrieving medical records is proposed using a decentralized system through the integration of two emerging technologies: Blockchain and Inter-Planetary File System (IPFS). The system provides solutions for the major security concerns associated with medical files, including authentication and authorization, database breaches, data integrity of local and cloud storage, and data availability. The obtained results indicate a high level of safety by adding security layers such as confidentiality, authentication, authorization and access control, based on different factors. All these aspects contribute to reaching the aim of the proposed system, which is storing and retrieving medical records in a decentralized and safe manner.