# Does aql support multiple ehrids?

**URL:** https://discourse.openehr.org/t/does-aql-support-multiple-ehrids/14364
**Category:** Technical (archive)
**Created:** [27 October 2017 06:20 UTC](https://discourse.openehr.org/t/does-aql-support-multiple-ehrids/14364 "2017-10-27T06:20:42Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![system](https://discourse.openehr.org/uploads/default/original/2X/f/f0a1dedb20c42747bddcafd6c7df9db5f34f003c.svg) [@system](https://discourse.openehr.org/u/system)
#### Post date: [27 October 2017 06:20 UTC](https://discourse.openehr.org/t/does-aql-support-multiple-ehrids/14364/1 "2017-10-27T06:20:42Z")

</div>

Hi,

I have tested aql with single ehr and across all ehrs(without any ehrid). Can we pass an array of ehrids in an aql to limit the query to selected ehrs?

regards

---

<div class="post-metadata">

### Author: ![system](https://discourse.openehr.org/uploads/default/original/2X/f/f0a1dedb20c42747bddcafd6c7df9db5f34f003c.svg) [@system](https://discourse.openehr.org/u/system)
#### Post date: [27 October 2017 09:40 UTC](https://discourse.openehr.org/t/does-aql-support-multiple-ehrids/14364/2 "2017-10-27T09:40:59Z")

</div>

Marand THinkEHR supports this …

WHERE e/ehr\_id/value MATCHES {

‘e241715b-3ca7-435e-a474-718579aadaa2’,

‘0e7ac1d6-2dc6-40ec-8259-ac9f9a9727d1’,

‘ed74f788-4bd6-4e47-ab98-211643cc4b0c’}

---

<div class="post-metadata">

### Author: ![system](https://discourse.openehr.org/uploads/default/original/2X/f/f0a1dedb20c42747bddcafd6c7df9db5f34f003c.svg) [@system](https://discourse.openehr.org/u/system)
#### Post date: [27 October 2017 09:52 UTC](https://discourse.openehr.org/t/does-aql-support-multiple-ehrids/14364/3 "2017-10-27T09:52:02Z")

</div>

Thanks Ian

Regards

Dileep V S  
Founder  
HealtheLife Ventures LLP  
+91 9632888113  
103, Innovation Centre, IIIT, Electronics City, Bangalore 560100, [healthelife.in](http://healthelife.in)

---

<div class="post-metadata">

### Author: ![system](https://discourse.openehr.org/uploads/default/original/2X/f/f0a1dedb20c42747bddcafd6c7df9db5f34f003c.svg) [@system](https://discourse.openehr.org/u/system)
#### Post date: [1 November 2017 20:38 UTC](https://discourse.openehr.org/t/does-aql-support-multiple-ehrids/14364/4 "2017-11-01T20:38:24Z")

</div>

There is a lot of use-cases involving multiple EHRs. The answer from Ian is defined in AQL specification.

In an upcoming version of the REST API I think population queries will be added to give client even more control on this kind of use-cases. We have already implemented this a while ago.

Vennlig hilsen  
Bjørn Næss  
Produktansvarlig  
DIPS ASA

Mobil +47 93 43 29 10
