Queries
In Atomik, all queries are created and stored by using the Query Builder throw the Web Console. Once a query is stored, it can be discovered through the REST API. So when you create a query is like creating a whole new data service. This is a different approach than having queries hardcoded in an app, like it happens in most classic software development processes.
Query Builder
The Query Builder is a very simple and flexible openEHR data query authoring and testing tool that is an essential part of Atomik's Web Console. It allows to create queries with just a few clicks and test queries against live data. It also includes some data visualization tools for the query results.
In the Query Builder you can pick one of the query result types, for instance if you want clinical records as results, the query type will be composition, if you want just data points as results, you will pick datavalue as the query type. Atomik supports the following query types: composition, ehr_status, folder, actor, party_relationship and datavalue.
Then creating a query is really simple, for the query types that retrieve objects, the Query Builder has a criteria builder, that allows to define conditions over archetyped data, and the results will contain only objects that comply with the criteria. A criteria includes simple conditions like "systolic blood pressure > 140", and supports boolean operators NOT, AND and NOT.
SNOMED CT Expressions
Atomik query criteria allows using SNOMED CT expressions as semantic filters for coded data, which is a powerful querying mechanism that saves time and unleashes a huge semantic power for retrieving openEHR data.
For instance if you have an openEHR template that defines a diagnosis data point that is code by using the SNOMED CT terminology, you can use SNOMED CT expressions to match "any type of diabetes", which would be very complex to do by using just lists of codes to match all possible diagnoses. First because SNOMED CT has about 118 different types of diabetes, and second, becuase those types might change in the future.
So by using lists of codes in a query it would create a maintenance hell. With SNOMED CT expressions that doesn't happen since you can use << 73211009 | Diabetes mellitus (disorder) | as a filter in Atomik queries, and that expression is resolved at runtime, giving you the current list of matching codes of "any type of diabetes".
Query management
In Atomik queries can be created, modified and executed from the Web Console. Atomik also has Query Groups, a way of organizing queries into categories.