Combined queries premium
How do you find every patient who has condition A, is taking medication B, and hasn't had test C in the last 6 months?
This kind of question — the kind that drives population health management, proactive care, and clinical research cohort selection — is trivial to ask and extremely hard to answer in most systems. It requires correlating data across multiple record types, applying complex clinical criteria, and running it against every patient in the system.
Combined queries in Atomik are designed exactly for this. They compose existing queries into multi-condition filters that identify which patients meet all criteria simultaneously — with no custom SQL, no data warehouse, and no ETL pipeline.
How it works
A combined query takes a set of existing composition queries and uses them as conditions. If every individual query returns a result for a given patient record (EHR), that patient is included in the combined query result. Formally: if q1, q2, q3 all return non-empty results for the same ehr_id, that EHR is in the output.
Creating one is straightforward: give it a name and description, pick the composition queries to combine, and publish. The combined query is immediately available via REST API for any authorized client to execute or schedule. It can also be tested directly from the Web Console.
Use cases
Population health & statistics
Count how many patients in your repository have a specific combination of conditions, comorbidities, sex, and age — precisely. Because individual composition queries in Atomik support SNOMED CT semantic expressions, your combined criteria can match "any type of diabetes" or "any cardiovascular condition" without hardcoding code lists. The result: a hospital that genuinely understands its patient population and can adjust services accordingly.
Proactive clinical care
Instead of just counting records, feed combined query results into alert systems. Identify patients who match a complex risk profile — multiple chronic conditions, specific medications, overdue screenings — and surface that list to clinicians before the next appointment. The system acts; the clinician decides. Early detection, earlier intervention, measurable impact on outcomes.
Performance considerations
Combined queries are not designed for real-time execution. Each component query can be complex, and running all of them across every EHR in a large repository takes time even with parallel execution.
Recommended pattern: run combined queries as background jobs on a schedule (nightly, hourly, or as needed), and feed results asynchronously to the systems that consume them — alert dashboards, CDS integrations, reporting tools. This keeps your application responsive while the query runs at whatever pace the data requires.