TL;DR
Adjust your Docker resources to:
Min 4 CPUs
Min 8GB Memory
Min 2GB Swap
Min 50GB Disk
With Docker Desktop running execute this command (CLI):
wget https://bit.ly/tg_workshop -O deploy_ws.sh && chmod +x deploy_ws.sh && ./deploy_ws.sh 2
Note: you should read this blog to set up your environment correctly or it might fail
Context
You might be thinking...
- What is this blog about?
- Why should this interest me?
- What is a graph database?
- What is Synthea?
Note: skip to next to get started if you don't care about context
Let's answer those questions first before moving on to how you can launch your own healthcare graph solution.
What is this blog about?
A walkthrough of deploying a synthetic healthcare graph that mimics what a real healthcare graph solution would be modeled like using Docker, Gradle, and TigerGraph.
Why should this interest me?
You might have heard of graph databases, but didn't know where to start. This project will help you with building a fully scripted graph solution. You can use this project as a template for building your own graph solutions.
What is a graph database?
A database that uses graph structures for semantic queries with nodes, edges, and properties to represent and store data.[1]
A key concept of the system is the graph (or edge or relationship). The graph relates the data items in the store to a collection of nodes and edges, the edges representing the relationships between the nodes.
The relationships allow data in the store to be linked together directly and, in many cases, retrieved with one operation.
Graph databases hold the relationships between data as a priority. Querying relationships is fast because they are perpetually stored in the database.
What is Synthea?
Synthea is an open-source, synthetic patient generator that models the medical history of synthetic patients. The aim is to provide high-quality, synthetic, realistic but not real, patient data and associated health records covering every aspect of healthcare.
Getting Started
Pre-requirements
- wget
- docker
- docker-compose
wget
You will need to download wget
if it's not already installed. To do that go to the appropriate download instructions:
Docker
If, you're looking for the easiest way to get docker running with a nice GUI interface is fetching the latest version of the Docker Desktop which you can download here: https://www.docker.com/products/docker-desktop.
Note: for this tutorial, we will be showing Docker Desktop screen captures
Else, you can grab the Docker Engine and Compose separately with these links: Docker & Docker-Compose
Note: you will want Version > 1.25 of Docker Compose
Docker Configuration Settings
Setup Resources
Click the settings button (top right of Docker Desktop). Next, click on Resources and click Advanced. You should be seeing a screen that looks similar to this:
To accommodate the resources need to run TigerGraph we will want to bump up the following:
Min 4 CPUs
Min 8GB Memory
Min 2GB Swap
Min 50GB Disk
Next, click Apply & Restart. Your settings should look like this:
Setup Bindings
Let's add some binding. Here is an example of what the default bindings look like. For this project, we will also add our new directory to the bindings.
It's recommended that you have a dedicated directory that this project will reside. If you don't have a directory built follow these few steps:
# Choose the appropriate location
# For this example we will just use a directory of the user
# Open Terminal and run the following:
$ cd
$ mkdir workspace
# cd workspace
#If you plan to do a few different builds you can make separate project folders in your new directory. Ex:
$ mkdir synthea
Next, click the "+" button and enter the path to the directory you're created. Once finished, hit Apply & Restart. Here is an example of what the bindings would look like:
Run Installalation
Now for the last step. With Docker Desktop running execute this command in the terminal:
wget https://bit.ly/tg_workshop -O deploy_ws.sh && chmod +x deploy_ws.sh && ./deploy_ws.sh 2
Here is what you will start to see. The shell script starts to execute, download the latest TigerGraph image and boot it up before building the Healthcare Graph Solution:
Next, you will see that TigerGraph is running. Grab the URL http://localhost:14240 and paste that in your browser
Once you open up that URL and see the GraphStudio you will know your TigerGraph box is running properly:
The next thing you will see in your Terminal is data files being added and the load will start
Lastly, you will see some premade queries being installed:
The whole process will take around 5-10 minutes. You can watch your data being loaded by going back to GraphStudio and clicking on Load Data. On the right-hand side, you should notice numbers climbing up.
Want to Learn More?
This concludes the project build. If you are looking for a deep-dive into how the Sythea solution was developed, I highly suggest you check out these two blogs by Akash Kaul:
Modeling Healthcare Data with Graph Databases
Using TigerGraph and Synthea to Create a Synthetic Healthcare System
Designing a 3D Healthcare Network Graph
A Cool Way To Model Healthcare Data using TigerGraph, Python, and JavaScript
Resources
- TG Community Forum
- TG Community Chat
- TG Developer Portal
- YouTube
- Twitch
- GitHub
Citations
[1] Nikolaos G. Bourbakis (1998). Artificial Intelligence and Automation. World Scientific. p. 381. ISBN 9789810226374. Retrieved 2018-04-20.
[2] https://en.wikipedia.org/wiki/Graph_database
Top comments (0)