About the project
Heart disease is the leading cause of death in India, but most people never read their BP, cholesterol and ECG values together. This heart disease risk prediction Android project turns those routine values into an early warning. The patient enters 11 clinical values, and a trained neural network inside the app predicts the chance of heart disease in under a second - even without internet. The app explains which values raise the risk, builds a personal plan, and connects the patient with a verified doctor.
How it works
- Patient registers and fills a 3-step heart check: age, sex, chest pain type, fasting sugar, resting BP, cholesterol, max heart rate, ST depression, exercise angina, resting ECG and ST slope
- The on-device ML model (neural network 16-16-8-1) gives the risk % with Low / Moderate / High level
- The app shows "what is raising your risk" - each abnormal value with its share of the risk
- A personal heart plan and lifestyle tips are created from the result
- Results are saved with Volley to PHP + MySQL and shown as history, trend charts and a PDF report
- Patient books a doctor slot with the report attached; the doctor accepts, reviews the trend and sends advice with medicines
- Patient downloads the e-prescription PDF and rates the doctor
Users
- Patient: heart risk check, explained result, PDF report, history, trends, daily vitals, goals with streak and badges, heart quiz, doctor booking
- Doctor: request accept / decline, patient risk trend and alerts, advice and e-prescription, high-risk patient list
- Admin: doctor approval, patients, specializations, risk records, consultations, tips, quiz, notices, printable reports, settings
Highlights
- 3 roles, 24 Android screens, 12 admin pages, 32 PHP APIs, 13 MySQL tables
- Machine learning project: 86.3% test accuracy, 87.1% recall, compared with logistic regression, random forest, KNN and decision tree
- Prediction runs offline inside the app (model weights in a JSON asset)
- Two PDF outputs: heart risk report and doctor e-prescription
- Validation on every form in the app and again on the server (email, 10-digit mobile, ranges, duplicates)
- Hashed passwords, prepared SQL, role checks, CSRF-protected admin panel
- Sample data with 28 patients, 6 doctors, 74 risk checks and ready demo logins
What you get
- Complete Android Studio source code (Java) and PHP web panel source code
- MySQL database file with sample data
- Python training scripts, dataset, model and accuracy charts
- Project report (Word, 54 pages) with DFD, ER and UML diagrams
- Project abstract (2 pages), project explanation with 25 viva questions
- Installation / setup guide and setup help
Who can use this project
Ideal as a final year project for BE / B.Tech, MCA, BCA and Diploma students of Computer Engineering, IT and allied departments. A good choice if you need a machine learning Android project with source code, a healthcare Android project with admin panel, or a heart disease prediction project with documentation and report.
Frequently asked questions
Does the prediction need internet? No. The neural network runs inside the app; internet (local Wi-Fi) is used only to save results and for doctor features.
Can I train the model again with the Kaggle heart dataset? Yes. Put heart.csv in the ML_Training folder and run train_model.py; it creates a new heart_model.json for the app.
Will it run on my laptop for the college demo? Yes. It needs only XAMPP and Android Studio; the setup guide covers every step, including the "Use JVM 21" popup.
Can I explain the ML part in viva? Yes. The model is plain Java maths with comments, and the explanation document has 25 viva questions with answers.