cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Parsing a JSON file in the HL7 FHIR format to create a Neo4j Graph

Hello,

For my current project I need to load JSON files to Neo4j and parse them to create a graph. The JSON files are in the HL7 FHIR format and are synthesized using Synthea (https://github.com/synthetichealth/synthea) the synthetic patient generator. In the following repository you can find a sample patient JSON file: Patient-Synthea.json.

I need the graph to have a similar structure as the example picture from CyFHIR. CyFHIR seemed like a perfect solution, but I ran into problems running it as it is over a year without updates. I’ve tried a few options using the Python Neo4j driver but have not come up with a suitable solution for the recursive parsing of the JSON files and loading the data in the desired graph format.

Any suggestions would be appreciated!

1 REPLY 1

You will need the data model that is represented in the graph. Once you have that, you can try using APOC json.path to extract each piece of data to build the graph.

https://neo4j.com/labs/apoc/4.4/overview/apoc.json/

I was able to download the plugin and install it in my local database. I was also able to download the Synth jar and generate some data. I didn't spend time figuring out how to import the data with the CyFHIR plugin, but it all seemed to work.