Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize and implement hGraph #64

Open
atit-shah-tudip opened this issue Aug 20, 2014 · 8 comments
Open

Initialize and implement hGraph #64

atit-shah-tudip opened this issue Aug 20, 2014 · 8 comments

Comments

@atit-shah-tudip
Copy link

Hi,

While I have downloaded the hGraph library I am trying to build the graph,but I am not able to do so. I have tried by following the instructions given in the Setup Section of the https://github.com/goinvo/hGraph. There's no any graph displaying. Also I want to feed in the data dynamically to show the patient's health status. Can you please help me how this can be done at least by a demo graph? :)

@ericbenwa
Copy link
Contributor

Have you tried using the demo as a starting point?
http://demo.hgraph.org/
https://github.com/goinvo/hGraph/tree/master/examples/multiuser

Also, can you point us to your codebase?

@atit-shah-tudip
Copy link
Author

Hi,
The JSON file, used for building hGraph, is there any particular format or structure that has to be followed of JSON. As in example, metrics.json has various parameters. In order to build custom JSON, do we need to follow the same JSON structure (the key => value pair)?

@ericbenwa
Copy link
Contributor

For it to work in its current form you'll want to follow the same JSON structure. If you'd like to change the JSON structure then you'll just need to also edit the way you call for those key => value pairs (see https://github.com/goinvo/hGraph/blob/master/examples/multiuser/js/hData.js where the metrics.json is referenced). We're open to suggestions on improving.

@atit-shah-tudip
Copy link
Author

Thanks for replying,

The example changes the numbers in the hGraph on each refresh of the page.
So how could I keep the graph static based on the patient? i.e.
Each patient could have a particular number at a time. I hope you are
getting my question. :)

On Tue, Aug 26, 2014 at 8:50 PM, Eric Benoit notifications@github.com
wrote:

For it to work in its current form you'll want to follow the same JSON
structure. If you'd like to change the JSON structure then you'll just need
to also edit the way you call for those key => value pairs (see
https://github.com/goinvo/hGraph/blob/master/examples/multiuser/js/hData.js
where the metrics.json is referenced). We're open to suggestions on
improving.


Reply to this email directly or view it on GitHub
#64 (comment).

Regards,

Atit Shah
atit.shah@tudip.com atit.shah@tudip.com* | Skype: atitshah.tudip*
_www.tudip.blogspot.com http://www.tudip.blogspot.com/_\* |
*www.facebook.com/tudiptechnologies
http://www.facebook.com/tudiptechnologies *
*+91 20 4674 0881 | +1 408 216 8162

http://tudip.com/ | http://www.steersimple.com/

@ericbenwa
Copy link
Contributor

In this example the patient health data is static.
http://demo.hgraph.org/

Each patient's health data can found here.
https://github.com/goinvo/hGraph/tree/master/examples/multiuser/data/user-data

Is that what you are looking for?

@atit-shah-tudip
Copy link
Author

What does each of the parameter (keys) in JSON stand for? How are the
values calculated for each of the circle (red and gray) and hGraph score?

On Wed, Aug 27, 2014 at 10:32 AM, Eric Benoit notifications@github.com
wrote:

In this example the patient health data is static.
http://demo.hgraph.org/

Each patient's health data can found here.

https://github.com/goinvo/hGraph/tree/master/examples/multiuser/data/user-data

Is that what you are looking for?


Reply to this email directly or view it on GitHub
#64 (comment).

Regards,

Atit Shah
atit.shah@tudip.com atit.shah@tudip.com* | Skype: atitshah.tudip*
_www.tudip.blogspot.com http://www.tudip.blogspot.com/_\* |
*www.facebook.com/tudiptechnologies
http://www.facebook.com/tudiptechnologies *
*+91 20 4674 0881 | +1 408 216 8162

http://tudip.com/ | http://www.steersimple.com/

@ericbenwa
Copy link
Contributor

Which keys? File?

This JSON defines the bounds of "healthy". There is a minimum "healthy" value and a maximum "healthy" value for a health metric. A health metric is also weighted in terms of importance/impact on your overall health; 0-10 with 10 having the most impact on your overall health.
https://github.com/goinvo/hGraph/blob/master/examples/multiuser/data/metrics.json

Scoring and judging "healthy" happens here.
https://github.com/goinvo/hGraph/blob/master/examples/multiuser/js/hData.js

The scoring algorithm is rough and certainly not a solid v01. We need to work on it.

Poke around the codebase + start hacking to get a lay of the land.

@atit-shah-tudip
Copy link
Author

Hi, I have CCD (Continuity Care Document) of a patient I need to feed-in
the values to hGraph. Can you please tell how this can be done dynamically
to feed in the JSON?

We are able to generate the hGrpah when we pass the data in below JSON
format.

How the data for score,values,actual,weight etc can be given dynamically
from the CCD?

var graph;
window.onload = function(){
graph = new HGraph({
container : document.getElementById("graph_container"),
userdata : {factors :[{
label: "Glucose",
score: 80,
value: "158.74 mg/dl",
actual: 158.74,
weight: 92,
details : [{
label: "Blood
Pressure Systolic",
score: 85,

                                               weight: 5
                                                 }]
                                            },
                                             {
                                                 label: "Sleep",
                                                 score: 4,
                                                 value: "5 hours/night",
                                                 actual: 5,
                                                 weight: 39
                                              },{
                                                label: "LDL",
                                                score: 58,
                                                value: "168.74 mg/dl",
                                                actual: 128.74,
                                                weight: 39
                                             },

                                            {
                                                label: "HDL",
                                                score: 19,
                                                value: "358.74 mg/dl",
                                                actual: 458.74,
                                                weight: 19
                                             }]
            }
    });

On Thu, Aug 28, 2014 at 8:44 PM, Eric Benoit notifications@github.com
wrote:

Which keys? File?

This JSON defines the bounds of "healthy". There is a minimum "healthy"
value and a maximum "healthy" value for a health metric. A health metric is
also weighted in terms of importance/impact on your overall health; 0-10
with 10 having the most impact on your overall health.

https://github.com/goinvo/hGraph/blob/master/examples/multiuser/data/metrics.json

Scoring and judging "healthy" happens here.
https://github.com/goinvo/hGraph/blob/master/examples/multiuser/js/hData.js

The scoring algorithm is rough and certainly not a solid v01. We need to
work on it.

Poke around the codebase + start hacking to get a lay of the land.


Reply to this email directly or view it on GitHub
#64 (comment).

Regards,

Atit Shah
atit.shah@tudip.com atit.shah@tudip.com* | Skype: atitshah.tudip*
_www.tudip.blogspot.com http://www.tudip.blogspot.com/_\* |
*www.facebook.com/tudiptechnologies
http://www.facebook.com/tudiptechnologies *
*+91 20 4674 0881 | +1 408 216 8162

http://tudip.com/ | http://www.steersimple.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants