Created
May 25, 2018 01:12
-
-
Save deevis/24f7492e0ba0ce5bd8d6ee6a8bb7bff6 to your computer and use it in GitHub Desktop.
NEO4J CQL Query
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
match (npi:Registration{label:'NPI:1407098122'}), (m) where (m:Sanction or m:License or m:Registration or m:Ssn) with npi,m match p=allShortestPaths((npi)-[:FOUND_IN*0..6]-(m)) where NONE( x in nodes(p) where labels(x) = ['ExternalDatum'] and x.source = 'piidat' and x.source_id <> '61474244') unwind (nodes(p)) as node match(node)-[found_in:FOUND_IN]->(datum) where not (node:ExternalDatum) return distinct labels(node), node, collect(distinct found_in.payload) order by labels(node) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment