Because archetypes and templates allow to use one or more instantiations depending on constraints, querying needs to be done on instantiations informed by the Template.
Gerard Freriks +31 620347088 [email protected] Kattensingel 20 2801 CA Gouda the Netherlands > On 19 Sep 2018, at 03:13, Pablo Pazos <[email protected]> wrote: > > @Thomas I realized we have a similar issue with multiple occurrences of > structured items. > > For instance, an OPT: > > ... > CLUSTER 0..* at1234 > - ELEMENT at1235 > - ELEMENT at1236 > > Could have an instance: > > ... > CLUSTER at1234 > - ELEMENT at1235 > - ELEMENT at1236 > CLUSTER at1234 > - ELEMENT at1235 > - ELEMENT at1236 > > Then querying for "SELECT .... WHERE ../path_to_at1235/value > X AND > .../path_to_1236/value = Y" will return data even if both ELEMENTs referenced > by the paths are contained in different CLUSTER instances. > > An AQL exercise would be how to get the CLUSTER which contains ELEMENTs that > comply with conditions on more than one ELEMENT inside them and there are > many occurrences of the same CLUSTER, so CLUSTER and children will have the > same paths. > > Not sure how to express that considering that depends on instances not on the > model. > > Maybe is something that should be handled by the CONTAINS operator? I believe > it was Ian that said the CONTAINS should be evaluated against instances, not > against the template. If that is the case, I think that will also solve the > issue explained on my first message. > > Any ideas?
signature.asc
Description: Message signed with OpenPGP
_______________________________________________ openEHR-technical mailing list [email protected] http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org

