The world is filled with exciting technologies and ideas; scientists build machines to avoid human intervention in completing work. It is highly challenging to complete the task without the artificial intelligence (AI) technology intervention. With technological development, specific processes or consultations are performed with doctors available worldwide. In this scenario, it could be noticed that health care is one of the world’s expected domains that require the most incredible attention in data security while performing data transfer. Nodes in the network are considered based on the weakest link to overcome the cyber attacker’s issues. Besides building the software for data storage, a better mechanism has to be incorporated to provide security to the stored data. This process is a delicate task for every network engineer. This paper will explain such concepts related to health prediction and health care by building the most robust network security systems. The proposed optimized neural network representation is differentiated with the available data conclusive process. From the outcomes, it is observed that the suggested representation achieves an accuracy of 98.89%, which is 4.76% higher than the existing model.