Apart from the healthcare application there are other functionalities and applications that run in smart phone that consume more energy. For high risk patients the reception of the data from the sensor is more frequent than the low risk patients. For the low risk patients the data will be transmitted data to the central database server when the memory gets full or during the reception of a warning level. For a high risk patients the Energy consumption will change based on the energy required to transmit the data to the central database server and also the amount of energy required to transmit the warning message. The state transition diagram of the Energy optimization algorithm is in the Fig 2. The state transition diagram of the Active state is shown in the Fig 3.