hgraph-os / hGraph

hGraph is an open source javascript library for visualizing health data.

Home Page:http://www.hgraph.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Initialize and implement hGraph

atit-shah-tudip opened this issue · comments

commented

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? :)

commented

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?

commented

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)?

commented

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.

commented

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/

commented

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?

commented

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/

commented

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.

commented

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/