The immense improvements in the latest internet inventions encouraged the adaptation of technology within the healthcare sector. The healthcare systems storing highly sensitive information can be targeted by attackers aiming to insert, delete, or modify the data stored. These malicious activities may cause serious harm to the database accessibility and lead to catastrophic long-term harm to the patients' health. Since the adaptation of the most advanced security paradigm does not guarantee a full protection. Also, it is possible that the attack is not directly detected. Hence, this highlights the need for an algorithm that is capable of assessing the widespread damage scale before starting the repair of the inconsistent medical database. Within the scope of the damage assessment and recovery, several matrix based, cluster based, and graph based models were introduced. We propose a new hash based technique that is capable of correctly assessing the damage and recovering the database within a suitable time frame and efficient utilization of memory. Finally, the experimental results prove the improvements provided by our hash based algorithm over previously suggested models.