// check.cypher: run after loading (cypher-shell -u neo4j -p -f check.cypher). Read-only. // It prints what to compare with manifest.json by eye: that shows which build was loaded, not that every property is // unchanged (for a database made only from signed files, use import.sh). // 1. The build the database holds: build_hash and output_sha256, to compare with manifest.json's. MATCH (g:GraphBuild) RETURN g.id AS build, g.build_hash AS build_hash, g.output_sha256 AS output_sha256, g.review_signed_off AS rows_signed_off; // 2. Nodes per label and edges per type, to compare with manifest.json's "nodes" and "edges". MATCH (n) RETURN labels(n)[0] AS label, count(*) AS nodes ORDER BY label; MATCH ()-[r]->() RETURN type(r) AS type, count(*) AS edges ORDER BY type; // 3. Laboratory tests, those linked to what they measure and the links (173 of 242 in this build, by 266 HAS_ANALYTE edges). MATCH (b:Biomarker) WITH b, count { (b)-[:HAS_ANALYTE]->() } AS links RETURN count(b) AS tests, sum(CASE WHEN links > 0 THEN 1 ELSE 0 END) AS tests_linked, sum(links) AS has_analyte_edges;