But folder does not contain COMPOSITIONS, it contains object refs https://www.openehr.org/releases/RM/latest/docs/common/common.html#_folder_class
You need some aql semantics to resolve those refs to whatever they're pointing at, which does not exist as far as I know (q: what if object refs are pointing at different types ? :) ) Contains is only applicable to parent/child/../descendant relationship of object.property paths On Friday, August 17, 2018, Ian McNicoll <i...@freshehr.com> wrote: > Hi Seref, > > My understanding is that AQL can support FOLDER (assuming it is > implemented) with something like > > Select c > FROM EHR e CONTAINS FOLDER f CONTAINS COMPOSITION c > Where folder f.name = "My lovely encounters" > > but I may be wrong (both in principle and practice) > > Ian > > Dr Ian McNicoll > mobile +44 (0)775 209 7859 > office +44 (0)1536 414994 > skype: ianmcnicoll > email: i...@freshehr.com > twitter: @ianmcnicoll > > > Co-Chair, openEHR Foundation ian.mcnic...@openehr.org > Director, freshEHR Clinical Informatics Ltd. > Director, HANDIHealth CIC > Hon. Senior Research Associate, CHIME, UCL > > > On Fri, 17 Aug 2018 at 16:20, Seref Arikan <serefarikan@ > kurumsalteknoloji.com> wrote: > >> Hi Ian, >> >> When the fact that the Composition is associated to an encounter or >> episode of care is recorded by including a reference to that composition in >> a folder, some clinical context/information related to that composition is >> now stored outside the composition, by means of a refence in a folder >> >> Unless I'm missing an Aql feature that can help, you can no longer select >> those compositions via Aql (since Aql does not support/specify how to >> resolve refs) >> >> If you follow the encounter id approach you mentioned, then you could use >> Aql. >> >> In fact, if Ethercis had support for Folder, Dileep would still not be >> able to get those compositions with a singl query: he'd need to fetchs uids >> from a folder with one query, then perform a second query to get >> compositions in the way I suggested. >> >> I'm probably being unnecessarily picky here, just pointing at the >> difference between approaches and trying to put my finger on any downstream >> issues. I'm not doing a great job of it though :) >> >> On Friday, August 17, 2018, Ian McNicoll <i...@freshehr.com> wrote: >> >>> Hi Seref, >>> >>> I'm not sure I understand your concerns here. I think the use case is >>> where there is a need to group compositions by some other higher level >>> construct which usually reflect something like an admission, episode of >>> outpatient care or perhaps a community plan of care. >>> >>> As Dileep has indicated he probably would use folders if Ethercis >>> supported them. Another alternative is to create an Encounter ID for each >>> new encounter (which in Dileep's example, I think I would call an episode >>> of care, and simply tag each composition with that Encounter ID e.g create >>> a cluster archetype to hold this in every Composition/ other_context. I >>> have done that on other projects. So it is a case of looking of all >>> composition with EncounterId = x >>> Now I would probably go down the Folder route, if I could. >>> Ian >>> Dr Ian McNicoll >>> mobile +44 (0)775 209 7859 >>> office +44 (0)1536 414994 >>> skype: ianmcnicoll >>> email: i...@freshehr.com >>> twitter: @ianmcnicoll >>> >>> >>> Co-Chair, openEHR Foundation ian.mcnic...@openehr.org >>> Director, freshEHR Clinical Informatics Ltd. >>> Director, HANDIHealth CIC >>> Hon. Senior Research Associate, CHIME, UCL >>> >>> >>> On Fri, 17 Aug 2018 at 13:59, Seref Arikan <serefarikan@ >>> kurumsalteknoloji.com> wrote: >>> >>>> I'm used to thinking compositions as semantcally self contained units >>>> of information, at the very least using references to other means of >>>> expressing semantics (as in terminologies) >>>> >>>> What you're describing seems to take some clincal semantics out of the >>>> composion and if we have multiple ways of doing that, it may hurt >>>> reusability of queries and data. >>>> >>>> Do you think we can find a way of expressing this semantcs without >>>> losing its trace within the cmposition? >>>> >>>> (Sorry for the typos, on the phone..) >>>> >>>> On Friday, August 17, 2018, Thomas Beale <thomas.be...@openehr.org> >>>> wrote: >>>> >>>>> There is a bigger question of how best to model 'encounter' and >>>>> 'admission', which some implementers are doing with Folders, particularly >>>>> DIPS in Norway. I suspect that some version of using Folders (or else some >>>>> kind of tagging, which is semantically equivalent) will be the long term >>>>> approach to doing this. >>>>> >>>>> - thomas >>>>> >>>>> On 17/08/2018 10:54, Dileep V S wrote: >>>>> >>>>> Hi, >>>>> >>>>> Can you write an AQL to query only on a list of specific compositions? >>>>> Is there any sample for reference? >>>>> >>>>> I am trying to create the concept of clinical encounters and maintain >>>>> a collection of compositions per encounter. I am using AQL to retrieve >>>>> data >>>>> per encounter and need to pass the corresponding set of compositions. >>>>> >>>>> Thanks in advance >>>>> >>>>> regards >>>>> >>>>> >>>>> -- >>>>> Thomas Beale >>>>> Principal, Ars Semantica <http://www.arssemantica.com> >>>>> Consultant, ABD Project, Intermountain Healthcare >>>>> <https://intermountainhealthcare.org/> >>>>> Management Board, Specifications Program Lead, openEHR Foundation >>>>> <http://www.openehr.org> >>>>> Chartered IT Professional Fellow, BCS, British Computer Society >>>>> <http://www.bcs.org/category/6044> >>>>> Health IT blog <http://wolandscat.net/> | Culture blog >>>>> <http://wolandsothercat.net/> | The Objective Stance >>>>> <https://theobjectivestance.net/> >>>>> >>>> _______________________________________________ >>>> openEHR-technical mailing list >>>> openEHR-technical@lists.openehr.org >>>> http://lists.openehr.org/mailman/listinfo/openehr- >>>> technical_lists.openehr.org >>>> >>> _______________________________________________ >> openEHR-technical mailing list >> openEHR-technical@lists.openehr.org >> http://lists.openehr.org/mailman/listinfo/openehr- >> technical_lists.openehr.org >> >
_______________________________________________ openEHR-technical mailing list openEHR-technical@lists.openehr.org http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org