# Querying composer's identifiers for where condition **Category:** [AQL](https://discourse.openehr.org/c/aql/43) **Created:** 2022-12-24 12:15 UTC **Views:** 534 **Replies:** 3 **URL:** https://discourse.openehr.org/t/querying-composers-identifiers-for-where-condition/3405 --- ## Post #1 by @ardihikaru Hi all. Does anyone know how to query a value that's inside an Array List? In my case, I would like to get the value of `id`, `type`, `issuer`, and `assigner`. Here is the sniped composer data: ![image|690x475](upload://nXhStArLycCUYtPdj6FXRV4BllE.png) What can I achieve so far is this query below: ``` SELECT c0, c0/composer/identifiers FROM COMPOSITION c0[openEHR-EHR-COMPOSITION.encounter.v1] ... WHERE ... ``` With that query, I can only capture the value as an object, which is an array list. It will be easier if that composer has something like `archetype_node_id`, but sadly, it does not have it. The reason why I need this is that I want to use one of that values as one of the **Where** conditions once I know how to capture the value(s). Thanks for any advice! Ardi --- ## Post #2 by @pablo I think it depends on the implementation. Some implementations have the IN/matches operator which allows you to filter a list in the WHERE, though I don't know if it's possible to filter a list of structured data instead of a list of atomic data like List. Can you provide a data set and the expected result for the data retrieval from that data set? --- ## Post #3 by @ardihikaru Hi @pablo Sorry for late replying. here's the data when we get that: ``` "/composer|name": "some_random_name", "/composer|id": "cc12aaf6-7e94-455d-9352-e322b32db8c0", "/composer|id_namespace": "SOME_VALUE", "/composer|id_scheme": "UUID", ... "/composer/_identifier:0|id": "cc12aaf6-7e94-455d-9352-e322b32db8c0", "/composer/_identifier:0|issuer": "some_issuer", "/composer/_identifier:0|assigner": "SOME_VALUE", "/composer/_identifier:0|type": "SOME_VALUE", ``` please let me know if I need to provide more data here. thanks, Ardi --- ## Post #4 by @chunlan.ma [quote="ardihikaru, post:1, topic:3405"] ``` SELECT c0, c0/composer/identifiers FROM COMPOSITION c0[openEHR-EHR-COMPOSITION.encounter.v1] ... WHERE ... ``` [/quote] Hi @ardihikaru, it really depends on the actual implementation of AQL engien. However, it is worth of trying the following AQL statements. If the criteria is on the identifiers: SELECT c0, c0/composer/identifiers FROM COMPOSITION c0[openEHR-EHR-COMPOSITION.encounter.v1] ... WHERE EXISTS c0/composer/identifiers[id='xxx'] If you just want to retrieve the particular identifier with a particular type, you can do the following: SELECT c0, c0/composer/identifiers[type='xxx']/id, c0/composer/identifiers[type='xxx']/issuer FROM COMPOSITION c0[openEHR-EHR-COMPOSITION.encounter.v1] ... Hope it helps. Regards, Chunlan --- **Canonical:** https://discourse.openehr.org/t/querying-composers-identifiers-for-where-condition/3405 **Original content:** https://discourse.openehr.org/t/querying-composers-identifiers-for-where-condition/3405