Thanks everybody for the clarification.

regards

Dileep V S
*Founder*
HealtheLife Ventures LLP
m: +91 9632888113
a: 103, Innovation Centre, IIIT, Electronics City, Bangalore 560100
w: healthelife.in  e: [email protected]

On Thu, Nov 2, 2017 at 10:43 PM, Pablo Pazos <[email protected]>
wrote:

>
>
> On Fri, Oct 27, 2017 at 3:15 AM, Dileep V S <[email protected]> wrote:
>
>> Hi,
>>
>> What is the expected response to AQL on a node with multiple occurrences?
>> Does it return all the occurrences or only the first one?
>>
>>
> If the query matches multiple occurrences of data defined by the same
> archetype node, then all the matched occurrences should be returned. It
> doesn't make sense to return the first occurrence since each occurrence
> contains different clinical data.
>
>
>> If it is expected to return all occurrences, what is the structure of the
>> response? will the occurrences be returned as an array?
>>
>
> IMO the result will have the structure of the items in the SELECT, if the
> query projection is a COMPOSITION, then the result will be a list of
> compositions, and those might contain multiple occurrences of a node. On
> this context, the match in the WHERE might be that exists a node at certain
> path that contains certain value, that path might have multiple occurrences
> of a node, and the resulting compositions will be returned if any of those
> occurrences have that value.
>
> If the SELECT has a projection for the matched nodes that might have
> multiple occurrences, a list of those nodes will be returned, and those
> might be from many COMPOSITIONs. If the results are just a plain list, it
> will be difficult to know which occurrences have the same context
> (contained on the same composition), I prefer to return the composition uid
> alongside with the data and a timestamp.
>
>
>>
>> If only the first one is returned, how do we get all the occurrences?
>> Adding multiple select lines in aql may not be practical as the number of
>> occurrences can vary.
>>
>
> I don't think this is an issue of AQL, but an implementations issue on not
> supporting multiple occurrences of nodes on query results. Multiple
> occurrences is a basic part of the openEHR spec IMO and very common in
> clinical records, like having more than one diagnosis on the same document.
>
> As Thomas said, the query should return anything that matches, multiple
> occurrences included.
>
>
>>
>> Can nay body give a select statement syntax for this?
>>
>> regards
>>
>> Dileep V S
>> *Founder*
>> HealtheLife Ventures LLP
>> m: +91 9632888113 <+91%2096328%2088113>
>> a: 103, Innovation Centre, IIIT, Electronics City, Bangalore 560100
>> w: healthelife.in  e: [email protected]
>>
>> _______________________________________________
>> openEHR-technical mailing list
>> [email protected]
>> http://lists.openehr.org/mailman/listinfo/openehr-technical_
>> lists.openehr.org
>>
>
>
>
> --
> Ing. Pablo Pazos Gutiérrez
> e: [email protected]
> p: +598 99 043 145
> skype: cabolabs
> <http://cabolabs.com/>
> http://www.cabolabs.com
> https://cloudehrserver.com
> Subscribe to our newsletter <http://eepurl.com/b_w_tj>
>
> _______________________________________________
> openEHR-technical mailing list
> [email protected]
> http://lists.openehr.org/mailman/listinfo/openehr-
> technical_lists.openehr.org
>
_______________________________________________
openEHR-technical mailing list
[email protected]
http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org

Reply via email to