<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jon Herke</title>
    <description>The latest articles on DEV Community by Jon Herke (@jon_herke).</description>
    <link>https://dev.to/jon_herke</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F344218%2F7dd207be-d956-4be2-84ff-50d7a5412db6.jpeg</url>
      <title>DEV Community: Jon Herke</title>
      <link>https://dev.to/jon_herke</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jon_herke"/>
    <language>en</language>
    <item>
      <title>Dockerized Synthetic Healthcare Graph</title>
      <dc:creator>Jon Herke</dc:creator>
      <pubDate>Mon, 16 Nov 2020 21:07:41 +0000</pubDate>
      <link>https://dev.to/jon_herke/dockerized-synthetic-healthcare-graph-4m59</link>
      <guid>https://dev.to/jon_herke/dockerized-synthetic-healthcare-graph-4m59</guid>
      <description>&lt;h4&gt;
  
  
  TL;DR
&lt;/h4&gt;

&lt;p&gt;Adjust your Docker resources to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Min 4    CPUs
Min 8GB  Memory
Min 2GB  Swap
Min 50GB Disk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With Docker Desktop running execute this command (CLI):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wget https://bit.ly/tg_workshop -O deploy_ws.sh &amp;amp;&amp;amp; chmod +x deploy_ws.sh &amp;amp;&amp;amp; ./deploy_ws.sh 2

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Note: you should read this blog to set up your environment correctly or it might fail&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Context
&lt;/h2&gt;

&lt;p&gt;You might be thinking...&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What is this blog about?&lt;/li&gt;
&lt;li&gt;Why should this interest me? &lt;/li&gt;
&lt;li&gt;What is a graph database?&lt;/li&gt;
&lt;li&gt;What is Synthea?&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Note: skip to next to get started if you don't care about context&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let's answer those questions first before moving on to how you can launch your own healthcare graph solution.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is this blog about?
&lt;/h3&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why should this interest me?
&lt;/h3&gt;

&lt;p&gt;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. &lt;/p&gt;

&lt;h3&gt;
  
  
  What is a graph database?
&lt;/h3&gt;

&lt;p&gt;A database that uses graph structures for semantic queries with nodes, edges, and properties to represent and store data.[1] &lt;/p&gt;

&lt;p&gt;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. &lt;/p&gt;

&lt;p&gt;The relationships allow data in the store to be linked together directly and, in many cases, retrieved with one operation. &lt;/p&gt;

&lt;p&gt;Graph databases hold the relationships between data as a priority. Querying relationships is fast because they are perpetually stored in the database.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Synthea?
&lt;/h3&gt;

&lt;p&gt;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. &lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Pre-requirements
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;wget&lt;/li&gt;
&lt;li&gt;docker&lt;/li&gt;
&lt;li&gt;docker-compose&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  wget
&lt;/h4&gt;

&lt;p&gt;You will need to download &lt;code&gt;wget&lt;/code&gt; if it's not already installed. To do that go to the appropriate download instructions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.tecmint.com/install-wget-in-linux/"&gt;Linux&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://builtvisible.com/download-your-website-with-wget/"&gt;Windows&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.cyberciti.biz/faq/howto-install-wget-om-mac-os-x-mountain-lion-mavericks-snow-leopard/"&gt;Mac&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Docker
&lt;/h4&gt;

&lt;p&gt;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: &lt;a href="https://www.docker.com/products/docker-desktop"&gt;https://www.docker.com/products/docker-desktop&lt;/a&gt;. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Note: for this tutorial, we will be showing Docker Desktop screen captures&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Else, you can grab the Docker Engine and Compose separately with these links: &lt;a href="https://docs.docker.com/engine/install/"&gt;Docker&lt;/a&gt; &amp;amp; &lt;a href="https://docs.docker.com/compose/install/"&gt;Docker-Compose&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Note: you will want Version &amp;gt; 1.25 of Docker Compose&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Docker Configuration Settings
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Setup Resources
&lt;/h4&gt;

&lt;p&gt;Click the &lt;strong&gt;settings&lt;/strong&gt; button (top right of Docker Desktop). Next, click on &lt;strong&gt;Resources&lt;/strong&gt; and click &lt;strong&gt;Advanced&lt;/strong&gt;. You should be seeing a screen that looks similar to this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ehxGYf48--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/em0ekp0hcsjvbs7m0rf1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ehxGYf48--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/em0ekp0hcsjvbs7m0rf1.png" alt="Resources_Advanced" width="880" height="574"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To accommodate the resources need to run TigerGraph we will want to bump up the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Min 4    CPUs
Min 8GB  Memory
Min 2GB  Swap
Min 50GB Disk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, click &lt;strong&gt;Apply &amp;amp; Restart&lt;/strong&gt;. Your settings should look like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7uX_dF3h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/g2su6jscmc9bqe6rbhsl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7uX_dF3h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/g2su6jscmc9bqe6rbhsl.png" alt="Resources_Advanced_2" width="880" height="590"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Setup Bindings
&lt;/h4&gt;

&lt;p&gt;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.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MC8w7HcI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/13gubb78ydpg77ipx8eh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MC8w7HcI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/13gubb78ydpg77ipx8eh.png" alt="Resources_File_Sharing" width="880" height="456"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;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:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# 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
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, click the "&lt;strong&gt;+&lt;/strong&gt;" button and enter the path to the directory you're created. Once finished, hit &lt;em&gt;Apply &amp;amp; Restart&lt;/em&gt;. Here is an example of what the bindings would look like:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OmZ1umdB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/t8cro5jvmmtl3r4fpgym.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OmZ1umdB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/t8cro5jvmmtl3r4fpgym.png" alt="Resources_File_Sharing_2" width="880" height="402"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Run Installalation
&lt;/h3&gt;

&lt;p&gt;Now for the last step. With Docker Desktop running execute this command in the terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wget https://bit.ly/tg_workshop -O deploy_ws.sh &amp;amp;&amp;amp; chmod +x deploy_ws.sh &amp;amp;&amp;amp; ./deploy_ws.sh 2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;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:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tQzRQqZj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zq73qvs7brt339fw0chf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tQzRQqZj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zq73qvs7brt339fw0chf.png" alt="Alt Text" width="880" height="402"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, you will see that TigerGraph is running. Grab the URL &lt;a href="http://localhost:14240"&gt;http://localhost:14240&lt;/a&gt; and paste that in your browser&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fHn-TKvo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/7nt2sw1mwwf0vy8657e1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fHn-TKvo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/7nt2sw1mwwf0vy8657e1.png" alt="Alt Text" width="880" height="255"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you open up that URL and see the GraphStudio you will know your TigerGraph box is running properly:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--v9hcArUM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ov5n0dltv1dzddkhgq50.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--v9hcArUM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ov5n0dltv1dzddkhgq50.png" alt="Alt Text" width="880" height="505"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The next thing you will see in your Terminal is data files being added and the load will start&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QlvXc3GJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2nw0p2wfu0x2efwsvbwa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QlvXc3GJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2nw0p2wfu0x2efwsvbwa.png" alt="Alt Text" width="880" height="428"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Lastly, you will see some premade queries being installed:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1xxs0EgQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/tkl7gacxg8qsumfgytca.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1xxs0EgQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/tkl7gacxg8qsumfgytca.png" alt="Alt Text" width="880" height="393"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The whole process will take around 5-10 minutes. You can watch your data being loaded by going back to GraphStudio and clicking on &lt;strong&gt;Load Data&lt;/strong&gt;. On the right-hand side, you should notice numbers climbing up. &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VxRFsi3W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/rdlheal9a71npwxtervv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VxRFsi3W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/rdlheal9a71npwxtervv.png" alt="Alt Text" width="830" height="894"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Want to Learn More?
&lt;/h2&gt;

&lt;p&gt;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 &lt;a href="http://akashkaul.com/"&gt;Akash Kaul:&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://towardsdatascience.com/modeling-healthcare-data-with-graph-databases-3e3695bcae3c"&gt;Modeling Healthcare Data with Graph Databases&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;Using TigerGraph and Synthea to Create a Synthetic Healthcare System&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;a href="https://towardsdatascience.com/designing-a-3d-healthcare-network-graph-291e4f75e9a5"&gt;Designing a 3D Healthcare Network Graph&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;A Cool Way To Model Healthcare Data using TigerGraph, Python, and JavaScript&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resources&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://community.tigergraph.com"&gt;&lt;strong&gt;TG Community Forum&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://discord.gg/F2c9b9v"&gt;&lt;strong&gt;TG Community Chat&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.tigergraph.com"&gt;&lt;strong&gt;TG Developer Portal&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://reddit.com/r/tigergraph"&gt;&lt;strong&gt;Reddit&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://youtube.com/tigergraph"&gt;&lt;strong&gt;YouTube&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linkedin.com/company/tigergraph"&gt;&lt;strong&gt;LinkedIn&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/tigergraphdb"&gt;&lt;strong&gt;Twitter&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitch.tv/tigergraph"&gt;&lt;strong&gt;Twitch&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/tigergraph/ecosys"&gt;&lt;strong&gt;GitHub&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Citations&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;[1] &lt;em&gt;Nikolaos G. Bourbakis (1998). Artificial Intelligence and Automation. World Scientific. p. 381. ISBN 9789810226374. Retrieved 2018-04-20.&lt;/em&gt;&lt;br&gt;
[2] &lt;em&gt;&lt;a href="https://en.wikipedia.org/wiki/Graph_database"&gt;https://en.wikipedia.org/wiki/Graph_database&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>healthcare</category>
      <category>docker</category>
      <category>tigergraph</category>
      <category>synthea</category>
    </item>
  </channel>
</rss>
