CyFHIR Versions Save

A Neo4j Plugin for Handling HL7 FHIR Data

2.0.0

2 years ago

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

1.1.0

3 years ago

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: graph_before You can see the resources aren't attached via references, but they should be . This is because of their loading order.

With this update: graph_after This result is repeated for any order of loading resources

1.0.0

3 years ago

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.

0.4.0

3 years ago

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 Commands

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.
  • cyfhir.resource.load()
    • To load FHIR into Neo4J, you can easily do this by running 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).
    • 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: Resource.text.display. This is necessary as there are escape chars hidden within the display that Neo4j cannot handle.
  • cyfhir.resource.expand()
    • Pass either a Resource node or an Entry node into 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()
    • Example where "entry" is a previously queried node with label type "entry":
    CALL cyfhir.resource.expand(entry) YIELD path
    RETURN cyfhir.bundle.format(collect(path))
    
Functions
  • cyfhir.bundle.format()

    • Pass an array of expanded FHIR Resources as entries that were the result of some 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 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()

    • Just like 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))
    

0.3.0

3 years ago

Same code and functionality as Release 0.2.0, but is updated for Neo4j v4.1.x

0.2.0

3 years ago

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.
  • 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 like cyfhir.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))
    
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.

0.1.0

4 years ago

0.1.0 is the first official public release of the CyFHIR plugin, in the future changes will be documented here for the plugin