Smartphone-Based Self Management System for Type-2 Diabetes Patients