# AQL query builders **Category:** [Implementation](https://discourse.openehr.org/c/implem/39) **Created:** 2023-07-12 08:38 UTC **Views:** 931 **Replies:** 8 **URL:** https://discourse.openehr.org/t/aql-query-builders/4222 --- ## Post #1 by @yampeku There were some online tools in the past (mostly commercial tools) that allowed to create AQLs from a set of archetypes/templates, but they are no longer available as far as I know. Are there any available AQL editors? Any products, demos, or proof or concepts that could be used for editing AQL? (apart from the visual studio plugin) --- ## Post #2 by @birger.haarbrandt Hi Diego, we made an open source implementation of an AQL Editor backend which is being used for our national COVID-19 platform. It provides an AQL object model which can be used to define AQL queries in a web-based frontend and REST services to resolve this into AQL statements (and vice versa to some extend). Building a frontend for this should be relatively straight forward and I guess would be highly welcome in the community Please see here: https://github.com/ehrbase/aql-editor-backend --- ## Post #3 by @ian.mcnicoll Also https://github.com/better-care/better-ui-components/tree/master/projects/aql-builder Though it it only works with the Ehrscape /query. Work in progress in a wee fork to make this work with Canonical Rest /query --- ## Post #4 by @surfer Any update on this topic? Any free new tool on the horizon or a frontend for the two backend mentioned? @birger.haarbrandt about the EHRBase backend https://github.com/ehrbase/aql-editor-backend. I followed the instructions and compiled successfully obtaining a jar, but it is not runnable. It misses dependencies and main class. Any hint on how to fix the issue? @ian.mcnicoll about the the better aql builder https://github.com/better-care/better-ui-components/tree/aql-builder/projects/aql-builder Is it compulsory to buy a Better license for their CDR in order to use it or it works also without it ? --- ## Post #5 by @erik.sundvall [quote="birger.haarbrandt, post:2, topic:4222"] Building a frontend for this should be relatively straight forward and I guess would be highly welcome [/quote] I agree it would be very welcome with an opensource AQL editor. @birger.haarbrandt and @stefanspiska it looks like the swagger-ui link points to localhost, could you fix that to something browsable or illustrate the API some other way? It looks like the https://github.com/ehrbase/aql-editor-backend is in Java so perhaps the logic/validation could stay on the backend and a simple protpotype frontend could be whipped up via a combination of https://htmx.org/ in https://github.com/jstachio/jstachio templates sprinkled with some https://hyperscript.org/ where extra frontend event-logic is needed? Such a setup would be pretty easy for people to extend/experiment with. Perhaps a nice student/intern project for somebody? --- ## Post #6 by @ian.mcnicoll Hi Giovanni, It is not tied to the Better CDR from a technical or licensing POV but it does use the Better Ehrscape version of the upload /template call and /query call which are different from the canonical REST API equivalents. I had a look and it is pretty easy to write an adaptor to make that talk to a canonical REST /template POS but the /query call is more tricky as it uses a different Resultset format to power the visualisation of the response. I'm pretty sure that is also convertable but would need a smarter coder than my clinical hacker skills allow!! --- ## Post #7 by @surfer Thank you Ian To tell you the truth, I'm more interested in the query building than its actual execution and retrieval of the results. --- ## Post #8 by @joostholslag Probably not what you want. But there’s aql editors for visual studio code in its store. https://marketplace.visualstudio.com/items?itemName=NedapHealthcare.openehr-adl-lsp https://marketplace.visualstudio.com/items?itemName=DIPSAS.aql --- ## Post #9 by @surfer Thanks @joostholslag , but in fact I was aware of them and I have already those plugin installed in my visual studio code. I was looking for something more helpful in the building of the query. --- **Canonical:** https://discourse.openehr.org/t/aql-query-builders/4222 **Original content:** https://discourse.openehr.org/t/aql-query-builders/4222