I'm working on a heath website and I need to suggest activities according to their health score. How to do it?

Hi guys,
as stated I’m working on a health site (currently my year 2 CS project). Currently the user needs to insert values for their blood pressure, LDL, HDL, HbA1c, waist measurement and if they smoke or not. Each of these measurements will give them up to 10 marks for a total of 60.
Let say a user insert 130 for his blood pressure, after the calculation he would obtain 8 as health score for blood pressure, now, for example, the site would suggest him either to eat less salty(this will give 3 points), or eat a balanced diet(this will give him 1 point) so as to raise its blood pressure score up to 10. He can’t get a score of more than 10. Another example, let say he inserted 1.4 for HDL, this will give 10 marks and the site will either grays out the activities that can raised it HDL or hide them completely.
My problem is I don’t know-how to suggest these activities in a php file.
Any websites, manuals, tutorials or videos will be of great help.

Here the link to the php file that will output his result -> https://drive.google.com/open?id=1y7O0hR260ZNgqEVRUxdztHwX–4BV55B

Here the link to the php file that will do the calculation -> https://drive.google.com/open?id=1rMoeIDSgZf8qCo4uidg0yi0RQoqg1i1m

Tutorials don’t exist for everything you want to do. A previous company did this exactly, and it’s called gamification. You need a rules engine, that you design and say what values mean what, because the program doesn’t know otherwise.

Work on a single part and build that out. Modularize the common code for reuse, like getting a particular score.

I don’t get what your problem is. You gather data from the user, put each value into a function and get a “score” as a result- Now what? What’s missing?

That part I had already done. The part that I don’t know how to implement is, according to their score I need to suggest them some healthy activities to raised their score.

Thanks for tip. I got a book on that you said. Checking if it might help me.

I suggested a book? When?

I did some digging on the internet and found a book called “Build gamified websites with php and jquery”

Ahh, that should help you with a rules engine then

Sponsor our Newsletter | Privacy Policy | Terms of Service