Reference for operators and analysts using the workbench Cypher Console (Power tier). Open it from Workbench → Cypher Console. This page is printable and shareable.
The console executes read-only Cypher against the canonical Apache AGE graph care_intel_graph. You type plain Cypher (e.g. MATCH (p:Provider) RETURN p LIMIT 25); the Monitor API wraps and runs it through AGE and enforces all safety constraints server-side. Results render as a table and can be exported to CSV.
SELECT * FROM cypher(...) wrapper — just the Cypher body. Run with the Run button or Ctrl/Cmd + Enter.LIMIT while exploring to keep results fast.Biolink is the primary semantic layer; UMLS CUIs, SNOMED, ICD, RxNorm, LOINC and NPI live as attributes on nodes. Common node labels:
| Label | Represents | Useful properties |
|---|---|---|
Provider | Clinician / NPI | kg_id, name, npi, state, specialty |
Hospital | Facility | kg_id, name, state |
Drug | Drug / product | kg_id, name, rxnorm, ndc |
Condition | Disease / disorder | kg_id, name, icd_code |
ClinicalConcept | UMLS/SNOMED concept | kg_id, umls_cui, snomed_concept_id |
ClinicalTrial | Trial | kg_id, nct_id, title |
Gene | Gene | kg_id, symbol |
MsspAco, ReachAco | ACO entities | kg_id, name |
MAPS_TO, IS_A, LOCATED_IN, LOCATED_AT, PRACTICES_AT, SPECIALIZES_IN, AFFILIATED_WITH, PRESCRIBES, TREATS, HAS_FINDING_SITE, SERVES_COUNTY, NARROW_MATCH, COMPONENT. Edges carry biolink_predicate and source_table for provenance.
Copy any of these straight into the console.
MATCH (n) RETURN count(n) AS nodes
MATCH ()-[r]->() RETURN count(r) AS edges
MATCH (n) RETURN labels(n) AS label, count(*) AS n ORDER BY n DESC LIMIT 50
MATCH ()-[r]->() RETURN type(r) AS rel_type, count(*) AS n ORDER BY n DESC LIMIT 50
MATCH (p:Provider) RETURN p.kg_id AS kg_id, p.name AS name, p.npi AS npi, p.state AS state, p.specialty AS specialty LIMIT 25
MATCH (p:Provider) WHERE p.state = 'CA' AND p.specialty CONTAINS 'Cardio' RETURN p.name AS name, p.npi AS npi, p.specialty AS specialty LIMIT 50
MATCH (p:Provider)-[:PRACTICES_AT]->(f) RETURN p.name AS provider, labels(f) AS facility_label, f.name AS facility LIMIT 50
MATCH (c:Condition)-[:MAPS_TO]->(k:ClinicalConcept) RETURN c.name AS condition, c.icd_code AS icd, k.umls_cui AS cui, k.snomed_concept_id AS snomed LIMIT 50
MATCH (a:ClinicalConcept)-[:IS_A]->(b:ClinicalConcept) RETURN a.snomed_concept_id AS child, b.snomed_concept_id AS parent LIMIT 50
MATCH (t:ClinicalTrial)-[r]->(c:Condition) RETURN t.nct_id AS nct, t.title AS title, type(r) AS rel, c.name AS condition LIMIT 50
MATCH (n)-[r]-() RETURN labels(n) AS label, n.name AS name, count(r) AS degree ORDER BY degree DESC LIMIT 25
MATCH ()-[r]->() RETURN r.source_table AS source, type(r) AS rel_type, count(*) AS n ORDER BY n DESC LIMIT 50
Cypher reads like a sentence describing a path of nodes and relationships. Compose new queries from these building blocks:
MATCH (p:Provider) — variable p, label Provider.WHERE p.state = 'TX', WHERE p.name CONTAINS 'Heart', WHERE p.npi IS NOT NULL.(a)-[:TREATS]->(b) (directed) or (a)-[r]-(b) (any type/direction).(a)-[:IS_A*1..3]->(b) walks 1–3 hops.RETURN a.name AS name, count(*) AS n; aggregate with count, collect, avg.ORDER BY n DESC LIMIT 50 — always cap while exploring.MATCH (d:Drug)-[r:TREATS]->(c:Condition) WHERE c.name CONTAINS 'diabetes' RETURN d.name AS drug, c.name AS condition, r.source_table AS evidence ORDER BY drug LIMIT 50
Start from the census queries (#3, #4) to confirm which labels and edge types actually exist, pick the ones you need, then add filters and a return shape. If a query returns nothing, loosen the filter or check the label/edge name against the census output.
CREATE, MERGE, SET, DELETE, REMOVE) are rejected. Graph building is done by the pipeline/agents, never here.WHERE + LIMIT.kg_id, npi, nct_id.