Heart failure is a long-term condition of great concern which calls for health care services in cycles. This significantly hampers quality of life for patients and increases costs for the healthcare systems. If the worsening of heart failure could be detected early, the intervention to prevent readmission could be employed, such that readmission would be avoided, enhancing the quality of life for the patient. Accordingly, the paper explains how such a model to predict the worsening of heart failure in patients who are at high risk of this condition has been developed. The model uses information gathered from the Electronic Health Records (EHRs) (Clinical Variables, Vitals, Test Results, and Demographics) to make accurate predictions on patients. As an effective and efficient approach towards achieving this goal, comparison of different algorithms such as random forests, support vector machines and gradient boosting has been employed towards the building of the final model. At this stage, the model is embedded into a user-friendly self-monitoring device, allowing the chronic heart failure patients to assess health indices on the fly with the help of the mobile app and wearable devices. This secondary prevention strategy makes patients more responsible for their health and decreases the number of patients readmitted to the hospital by increasing their functioning and well-being. The paper further projects the future development of other forms of treatment for chronic heart failure, especially at the first line, focusing primarily on the timing and succession.