Combined queries premium
A combined query is a query that uses many composition queries as conditions to match EHRs. If all composition queries in a combined query have a non-empty result for a given EHR, then that EHR will be included in the combined query result. In oder words, if q1, q2, q3 are composition queries, when all are evaluated with the same EHR ID have results, that would be an exression like: q1(ehr_id) AND q2(ehr_id) AND q3(ehr_id), then ehr_id will be in the combined query result.
Creating a combined query is really simple, and adminstrator will set a name and description to the query, then pick existing composition queries, and done. Then the new combined query will be available through the REST API for clients to discover and execute. A combined query can also be tested through the Web Console.
Note that combined queries are not designed to be real time queries, since each individual composition query can be complex, and even if all the queries are executed in multiple threads, having many queries will affect the performance. Also the number of EHRs in the repository will affect the overall performance of a combined query execution. That is why we suggest to run combined queries in background or in scheduled jobs, and feed the final result asynchronously to the system that will use the results.
Combined queries support multiple use cases, some statistical and some clinical.
On the statistical side, these queries allow to count EHRs that meet very complex conditions, like having multiple conditions and comorbidities, mixed with sex and age dimmensions. Remember that composition queries in Atomik can match, for instance, a diagnosis by using SNOMED CT expressions as semantic filters, and in combined queries you can use multiple composition queries that use SNOMED CT expressions inside, that way the client has enormous control over the data filters to match and count EHRs with very a complex and exact crtieria. That way, a hospital could understand better the reality of the patient population they provide care for, and they can adjust their services for that population.
On the clinical side, instead of just counting EHRs, it's very easy to create notifications based on the combined query results, which can be integrated with EMR and other clinical recording and management systems, allowing the clinicians to see alerts and recommendations for specific patients, based on their specific profile of risk factors, conditions, health problems, sex and age. This has the potentail of improving the proactiveness of the system and act to detect other potential problems earlier which also allows early treatment and control. Consider this can have a huge impact on the patient's health and quality of life, and with Atomik it could be done with a few clicks.