Repository with the source code and data to replicate and run our Mental Health Challenge demo for the Tigergraph Graph for All Hackathon.
See Devpost submission here for more details.
mentalhealthhero.mp4
Download the file mentalhealthhero.tar.gz from this repository.
On the Tigergraph console, import the mentalhealthhero.tar.gz file into your Tigergraph instance by clicking "Import an Existing Solution".
Please unzip the data.zip file to download all the CSVs to your comptuer, and then in Tigergraph on the "Map Data" section in Tigergraph, add all those files (with those exact filenames!).
You may need to publish the Design Schema and "Map Data to Graph" areas too.
In the "Load Data" section of Graphstudio, press the play icon to load the data.
Once the data is loaded, in the Explore Graph section, you can try selecting a few vertices to explore the graph.
Try using the vertex type Person, with Vertex id of "patient17" to see an example!
In the "Write queries" section, install the following queries:
- find_mental_health_recommendations
- find_similar_ad_hoc
- patient_journey_subgraph
Try putting in an example like patient17 for the "find_mental_health_recommendations" query to find similar patients, who can point to potential recommended treatment plans.
👉 Step 7 (optional): Connect our front-end to your instance! (cached demo site here)
You'll need to clone this repository down and do some configuration to get the frontend working live on localhost:
- Clone this repository and go into the
frontenddemo
folder - Copy the
configtemplate.json
into a new file calledconfig.json
in the same root level directory - In this
config.json file
change the following: a) replacetg_token
with your Tigergraph API token which you can get by following these instructions b) In Tigergraph Graphstudio, find your URL for the following queries and modify those in theconfig.json
file (do NOT include the params - seeconfigtemplate.json
for examples):- patient_journey_subgraph
- find_mental_health_recommendations
- find_similar_ad_hoc
c) Delete the comments in the
config.json
file!
- Run the following commands to install requirements and launch demo
cd MentalHealthHeros
cd frontenddemo
npm install && cd client && npm install
cd ..
npm start
// In new terminal window:
cd client
npm start
- The demo should be running at http://localhost:3000/