A Neo4j Plugin for Handling HL7 FHIR Data
Updates to CyFHIR for upgrade version of Neo4j (4.2.x) and Neo4j's Apoc. Also changes to R5 versions of FHIR due to changes in the R5 resource naming
Minor Updates to bundle and resource loading logic regarding loose references. Previously references were only being made from (resource being loaded) -> (resource already in DB) but wasnt able to attach nodes already in the DB to the resource currently being loaded causing the order of resources to matter and they should not, at least in terms of creating references.
Before this update: You can see the resources aren't attached via references, but they should be . This is because of their loading order.
With this update: This result is repeated for any order of loading resources
Official 1.0.0 Release of the CyFHIR plugin! With this release comes extra stabilizations along with added FHIR resource validation for versions DSTU3, R4, and R5 of FHIR.
We are glad to be bringing CyFHIR into a somewhat production ready state to be used along side Neo4j and the FHIR standard.
Added ability to load and format a single resource, not only bundles of resources. Also changed some of the naming conventions of the functions and procedures
cyfhir.bundle.load()
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).Bundle.entry[i].resource.text.display
. This is necessary as there are escape chars hidden within the display that Neo4j cannot handle.cyfhir.resource.load()
CALL cyfhir.resource.load()
with the input being a FHIR Resource JSON that has been formatted as a string (adding escape chars to all double quotes in the JSON).Resource.text.display
. This is necessary as there are escape chars hidden within the display that Neo4j cannot handle.cyfhir.resource.expand()
cyfhir.resource.expand()
to expand out the full resource/entry to be able to pass it into an aggregating function like cyfhir.resource.format()
or cyfhir.bundle.format()
CALL cyfhir.resource.expand(entry) YIELD path
RETURN cyfhir.bundle.format(collect(path))
cyfhir.bundle.format()
UNWIND entryList AS entry
CALL cyfhir.resource.expand(entry) YIELD path
RETURN cyfhir.bundle.format(collect(path))
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.
cyfhir.resource.format()
cyfhir.bundle.format()
, this function will format a fully expanded resource, but only one. As part of some query to find a single Resource, you pass the Resource node into the expander,then pass the collected paths into the formatter to build your FHIR Resource.CALL cyfhir.resource.expand(resource) YIELD path
RETURN cyfhir.resource.format(collect(path))
Same code and functionality as Release 0.2.0, but is updated for Neo4j v4.1.x
For Neo4j version 4.0.x
Refactored code and procedure/function names
cyfhir.bundle.load()
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).Bundle.entry[i].resource.text.display
. This is necessary as there are escape chars hidden within the display that Neo4j cannot handle.cyfhir.resource.expand()
cyfhir.resource.expand()
to expand out the full resource to be able to pass it into an aggregating function like cyfhir.bundle.build()
CALL cyfhir.resource.expand(entry) YIELD path
RETURN cyfhir.bundle.build(collect(path))
cyfhir.bundle.build()
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.
0.1.0 is the first official public release of the CyFHIR plugin, in the future changes will be documented here for the plugin