Patients' health and providing an optimal and appropriate solution have recently been considered by many researchers. With the advent of technologies such as cloud computing and 5G network, information can be exchanged faster and more securely. Using cloud computing in this process can significantly improve the monitoring of certain patients. Therefore, providing a favorable method in the medical industry and computer science to monitor the status of patients using connected sensors is very important. Thus, due to its optimal efficiency, speed, and accuracy of data processing and classification, the use of cloud computing to process the data collected from remote patient sensors and the Internet of Things (IoT) platform has been suggested. In this paper, a prioritization system is used to prioritize sensitive information in IoT, and in cloud computing, LSTM deep neural network is used to classify and monitor patients' condition remotely, which can be considered as an important innovative aspect of this paper. Sensor data in the IoT platform is sent to the cloud with the help of the 5th generation Internet. The core of cloud computing uses the LSTM deep neural network algorithm. Through simulating the proposed method and comparing the obtained results with other methods, it was observed that the accuracy of the proposed method has been improved significantly compared to other methods.