0.2.0
Pre-release
Pre-release
For Neo4j version 4.0.x
Refactored code and procedure/function names
Procedures:
cyfhir.bundle.load()
- To load FHIR into Neo4J, you can easily do this by running
CALL cyfhir.bundle.load()
with the input being a FHIR Bundle JSON that has been formatted as a string (adding escape chars to all double quotes in the JSON). - Another thing to note is if you want to test this way with generated data, we recommend Synthea. BUT if you choose to use Synthea, you must remove the generated html in every resource of the bundle for all entries. The path to the field to remove is:
Bundle.entry[i].resource.text.display
. This is necessary as there are escape chars hidden within the display that Neo4j cannot handle.
- To load FHIR into Neo4J, you can easily do this by running
cyfhir.resource.expand()
- Pass an entry node into
cyfhir.resource.expand()
to expand out the full resource to be able to pass it into an aggregating function likecyfhir.bundle.build()
- Example where "entry" is a previously queried node with label type "entry":
CALL cyfhir.resource.expand(entry) YIELD path RETURN cyfhir.bundle.build(collect(path))
- Pass an entry node into
Functions
cyfhir.bundle.build()
- Pass an array of expanded, structured FHIR Resources that were the result of your query. To properly pass data into this function, the last few lines of your query will probably end up looking like this:
UNWIND entryList AS entry
CALL apoc.path.expand(entry, ">|relationship", "-entry", 0, 999) YIELD path
WITH collect(path) AS paths
RETURN cyfhir.buildBundle(paths)
The entryList variable above that gets unwound is the list of entry nodes that match a query that you've written above. This expands those entry nodes to get the full resource, converts that to a JSON/tree-like structure, then passes it to CyFHIR to build the bundle and enforce correct cardinality of resource properties.