I just posted an article on LinkedIn but I’m posting most of it here for a more technical discussion.
AQL is a great technical achievement designed specifically for hierarchical health data ![]()
But let’s be honest: most developers and analysts outside the openEHR ecosystem have never heard of it. When onboarding new engineers to a health tech project, teaching them AQL from scratch is a massive bottleneck. Usually, they have to write or look at something like this just to get blood pressure data:
What if we could build an openEHR Clinical Data Repository (CDR) but let the users use the technologies they already know? They could even treat the CDR as a PostgreSQL database.
By leveraging ArcadeDB, we can enable polyglot querying over openEHR data structures. The developers and analysts can pick the exact query language that fits their background:
- SQL: Extended with graph traversal, full-text search, vector, and time-series functions.
- Cypher (openCypher): A drop-in replacement for Neo4j Cypher.
- Gremlin: Apache TinkerPop graph traversal.
- GraphQL: Schema-driven queries natively over HTTP.
- MongoDB QL: Document-oriented queries via the MongoDB protocol.
- GQL: Native Graph Query Language support coming soon.
The best part? Because ArcadeDB supports the PostgreSQL wire protocol, the users can use standard Postgres tools and drivers to connect to the server and run these queries. For advanced use cases, even more power can be unlocked directly via the Java API.
SQL and Cypher are particularly powerful for handling the deeply nested, interconnected nature of clinical models.
Here is how that exact same blood pressure AQL query looks when translated into SQL and Cypher, along with the clean JSON output you get back.
- The SQL Approach (Using ArcadeDB’s Extended SQL)
Resulting JSON:
- The Cypher Approach (Graph & List Comprehension)
For those that come from a Neo4j or graph background, they can use Cypher’s native pattern matching and projections to extract the exact schema they want:
We don’t have to force users to learn another query language just to use openEHR.
Moving from a working multi-model query proof-of-concept to building the official openEHR REST API layer is where this transforms from a cool database experiment into a production-ready, interoperable Clinical Data Repository (CDR).
Where the Project Stands Today (and What’s Next)
I have built a working proof of concept of an openEHR CDR using the Apache 2.0 licensed ArcadeDB. Currently, it can successfully load any openEHR COMPOSITION and make the data immediately available for multi-model querying.
Next up on the roadmap: Adding the official openEHR REST API layer on top of this engine to handle standardized EHR management and composition ingestion compliance.
Since ArcadeDB is already handling the heavy lifting of storing and querying the raw COMPOSITIONs via its multi-model engine, the REST API layer will essentially act as the compliance and translation gateway.
This approach is great for analyzing openEHR data. Could it be built into a full open source version CDR?
What do you think?



