Re: AQL on specific list of compositions

2018-09-02 Thread Karsten Hilbert
On Sun, Sep 02, 2018 at 10:25:23AM +0100, Ian McNicoll wrote: > Very helpful. I'd suggest one other minor tweak to differentiate 'episode' > which is one or more encounters associated with a particular problem or > issue, and 'period of care' which is administrative idea that > roughly equates to

Re: AQL on specific list of compositions

2018-09-02 Thread Ian McNicoll
Thanks Karsten, Very helpful. I'd suggest one other minor tweak to differentiate 'episode' which is one or more encounters associated with a particular problem or issue, and 'period of care' which is administrative idea that roughly equates to an admission or series of outpatient appointments. In

Holistic view, was :AQL on specific list of compositions

2018-09-01 Thread Bert Verhees
Contsys will update some definitions. They are now the base of their thinking, but I am sure that will change soon. Thanks, Gérard, for giving me the opportunity to make my point again. :-) We don't call war a peace problem. So why do we call illness a health problem? Normally I would not

Re: AQL on specific list of compositions

2018-09-01 Thread Karsten Hilbert
Thomas, sorry for the late reply. > Out of interest, is there a diagram or other GNUmed documentation / > explanation of all this. It's pretty close to what I think openEHR is or > should be doing; you have formalised more of this than we have so far, so > it's good to have some reference points

Re: AQL on specific list of compositions

2018-08-21 Thread Birger Haarbrandt
Hi Thomas, Am 21.08.2018 um 20:38 schrieb Thomas Beale: That would be the case if only the AQL spec were used for conformance testing. But conformance also relies on the RM, ADL and other specs, as you can see here

Re: AQL on specific list of compositions

2018-08-21 Thread Seref Arikan
CIC >>> Hon. Senior Research Associate, CHIME, UCL >>> >>> >>> On Tue, 21 Aug 2018 at 08:54, Bjørn Næss wrote: >>> >>>> @ian – we have implemented the query you wrote: >>>> >>>> >>>> >>>>

Re: AQL on specific list of compositions

2018-08-21 Thread Thomas Beale
That would be the case if only the AQL spec were used for conformance testing. But conformance also relies on the RM, ADL and other specs, as you can see here . If you go to 6.2.2

Re: AQL on specific list of compositions

2018-08-21 Thread Pablo Pazos
That is one of the issues with AQL, one thing is to support the syntax, another thing is to have compatible query engine implementations, even if the semantics are correctly interpreted for each operator, data results might differ. But we are also having different interpretations of the operators,

Re: AQL on specific list of compositions

2018-08-21 Thread Birger Haarbrandt
Hi Thomas, from my perspective, this approach (by not being explicit about the RM classes (and semantics) that need to be supported by the Contains keyword) led to a situation in which two vendors (Marand and DIPS) can claim that they have a valid implementation of openEHR but are not

Re: AQL on specific list of compositions

2018-08-21 Thread Birger Haarbrandt
mandag 20. august 2018 11:22 *To:* For openEHR technical discussions mailto:openehr-technical@lists.openehr.org>> *Subject:* Re: AQL on specific list of compositions Yup but AQL is so cool for this kind of thing :) I still want to

AW: AQL on specific list of compositions

2018-08-21 Thread Sebastian Garde
(in whatever way) Regards, Sebastian G. Von: openEHR-technical Im Auftrag von Seref Arikan Gesendet: Dienstag, 21. August 2018 17:43 An: For openEHR technical discussions Betreff: Re: AQL on specific list of compositions Hi Sebastian, Sure, that is another way of dealing with the requirement

Re: AQL on specific list of compositions

2018-08-21 Thread Pablo Pazos
>>> We made a restriction such that the COMPOSITION c MUST be referenced in >>> FOLDER f and not any sub-folder. This was needed to avoid circular >>> references and explosion in the result set. >>> >>> >>> >>> >>> >>&g

Re: AQL on specific list of compositions

2018-08-21 Thread Bert Verhees
r openEHR technical discussions mailto:openehr-technical@lists.openehr.org>> *Subject:* Re: AQL on specific list of compositions Yup but AQL is so cool for this kind of thing :) I still want to do Select c FROM EHR Contains fold

Re: AQL on specific list of compositions

2018-08-21 Thread Thomas Beale
Karsten, Out of interest, is there a diagram or other GNUmed documentation / explanation of all this. It's pretty close to what I think openEHR is or should be doing; you have formalised more of this than we have so far, so it's good to have some reference points available. - thomas On

Re: AQL on specific list of compositions

2018-08-21 Thread Thomas Beale
And I meant to say: can you check if it has a PR, and if not, add one? In either case, you or Seref might add the text from his proposal as well. - thomas On 21/08/2018 16:25, Sebastian Iancu wrote: Hi Seref, Thomas, On the last SEC meeting, another proposed idea (besides the one from

Re: AQL on specific list of compositions

2018-08-21 Thread Thomas Beale
I had forgotten this, but I think it will turn out to be a syntax equivalent to Seref's proposal. It is probably the kind of syntax man people would like to use, so we should certainly consider it; it maybe that both mechanisms should be put in, and respective users can then argue over who

Re: AQL on specific list of compositions

2018-08-21 Thread Seref Arikan
t;> >>> On Tue, 21 Aug 2018 at 08:54, Bjørn Næss wrote: >>> >>>> @ian – we have implemented the query you wrote: >>>> >>>> >>>> >>>> “select c from EHR e contains FOLDER f contains COMPOSITION c where >>>> c…..” &g

Re: AQL on specific list of compositions

2018-08-21 Thread Sebastian Iancu
*Sent:* mandag 20. august 2018 11:22 *To:* For openEHR technical discussions mailto:openehr-technical@lists.openehr.org>> *Subject:* Re: AQL on specific list of compositions Yup but AQL is so cool for this kind of thing :)

Re: AQL on specific list of compositions

2018-08-21 Thread Seref Arikan
gt; >>> >>> >>> “select c from EHR e contains FOLDER f contains FOLDER child_folder >>> contains COMPOSITION c where c…..” >>> >>> >>> >>> >>> >>> We made a restriction such that the COMPOSITION c MUST be referenc

Re: AQL on specific list of compositions

2018-08-21 Thread Thomas Beale
Hi Birger, Note that no openEHR RM types (COMPOSITION etc) are part of the AQL spec - they are just used in examples. AQL doesn't actually know anytthing about particular types. Seref's intention is that it stays this way, and his proposed function, or some other equivalent resolver mechanism

Re: AQL on specific list of compositions

2018-08-21 Thread Birger Haarbrandt
*Sent:* mandag 20. august 2018 11:22 *To:* For openEHR technical discussions mailto:openehr-technical@lists.openehr.org>> *Subject:* Re: AQL on specific list of compositions Yup but AQL is so cool for this kind of thing :) I still want to do

Re: AQL on specific list of compositions

2018-08-21 Thread Seref Arikan
any sub-folder. This was needed to avoid circular >> references and explosion in the result set. >> >> >> >> >> >> Vennlig hilsen >> Bjørn Næss >> Product owner >> DIPS ASA >> >> Mobil +47 93 43 29 10 <+47%2093%204

Re: AQL on specific list of compositions

2018-08-21 Thread Ian McNicoll
Product owner > DIPS ASA > > Mobil +47 93 43 29 10 <+47%2093%2043%2029%2010> > > > > *From:* openEHR-technical *On > Behalf Of *Ian McNicoll > *Sent:* mandag 20. august 2018 11:22 > *To:* For openEHR technical discussions < > openehr-technical@lists.openehr.org>

Re: AQL on specific list of compositions

2018-08-21 Thread GF
Hi, There is ample reason to reconsider the use and need for folders. There is a need for holding/collecting structures. The RM has several places where data can be collected: - Folder - Composition - Section - Entry - Cluster For what purposes? What contributes to the meaning, the semantics?

RE: AQL on specific list of compositions

2018-08-21 Thread Bjørn Næss
:22 To: For openEHR technical discussions Subject: Re: AQL on specific list of compositions Yup but AQL is so cool for this kind of thing :) I still want to do Select c FROM EHR Contains folder x contains composition c since logically folder x contains compositions. Ian Dr Ian McNicoll mobile

Re: AQL on specific list of compositions

2018-08-20 Thread Thomas Beale
that would be possible if we modify the meaning of the CONTAINS operator to mean contains-by-value (like ENTRYs inside a COMPOSITION) /or /contains-by-reference, which is the FOLDERs case - as you have long argued ;) Not hard technically as far as I can see - but it does mean a

Re: AQL on specific list of compositions

2018-08-20 Thread Karsten Hilbert
On Mon, Aug 20, 2018 at 10:04:45AM +0100, Thomas Beale wrote: > Some of these Contsys definitions are problematic: > > ENCOUNTER > > > > But there is an encounter when the HcP interacts with the EHR without a > > Patient (Virtually) present. > > that would certainly be a subversion of the

Re: AQL on specific list of compositions

2018-08-20 Thread Seref Arikan
You're (unintentionally) circling back to discussions re AQL in the last SEC meeting in Slovenia (I was sitting in remotely) What you're asking for can be accomplished in a number of ways at the AQL level, all of which would require changes to AQL specs and implementations. I'm always happy to

Re: AQL on specific list of compositions

2018-08-20 Thread Ian McNicoll
Yup but AQL is so cool for this kind of thing :) I still want to do Select c FROM EHR Contains folder x contains composition c since logically folder x contains compositions. Ian Dr Ian McNicoll mobile +44 (0)775 209 7859 office +44 (0)1536 414994 skype: ianmcnicoll email: i...@freshehr.com

Re: AQL on specific list of compositions

2018-08-20 Thread Ian McNicoll
@Gerard - I have always assumed that Contsys 'Health Issue' equates to problem. https://github.com/openehr-clinical/shn-contsys 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

Re: AQL on specific list of compositions

2018-08-20 Thread Thomas Beale
Well if you have access to a Folder, you don't need to do an AQL query, you can just retrieve the Folder structure and recurse through it, picking up direct refs to VERSIONED_COMPOSITIONs. Creating Folders from the data on the other hand requires writing some queries that look for admissions

Re: AQL on specific list of compositions

2018-08-20 Thread Ian McNicoll
Thanks Thomas, What are your thoughts on the AQL example I foolishly guessed at :( and that Seref quite correctly rejected!! How would/should we do... Select all compositions referenced by Folder x. How else might we meet Dileep's use-case with AQL? Dr Ian McNicoll mobile +44 (0)775 209 7859

Re: AQL on specific list of compositions

2018-08-20 Thread Thomas Beale
Some of these Contsys definitions are problematic: On 20/08/2018 09:13, GF wrote: Hi Karsten, ISO System of Concepts for Continuity of Care (ContSys) defines all kinds of concepts related to care and its documentation. It would be. a good thing to harmonise terms we use. More info via:

Re: AQL on specific list of compositions

2018-08-20 Thread Thomas Beale
This is how I understand it as well, just in the interests of avoiding confusion, so a Folder solution as described above is for episodes of care, within an institution, or something that functions like an institution, and where there is internal continuity of care, e.g. an integrated area or

Re: AQL on specific list of compositions

2018-08-20 Thread Thomas Beale
On 18/08/2018 07:56, Bert Verhees wrote: I cannot imagine how a folder structure can get lost except by data corruption. In that case anything is lost anyway and a rollback from a backup is needed. It's a thought experiment, not a serious proposition about a real system. But it partially

Re: AQL on specific list of compositions

2018-08-20 Thread Karsten Hilbert
Hello Gerard, > ISO System of Concepts for Continuity of Care (ContSys) defines all kinds of > concepts related to care and its documentation. I (GNUmed, that is) agree with the definitions you refer to. I was answering to Ian's input: > As Dileep has indicated he probably would use folders

Re: AQL on specific list of compositions

2018-08-20 Thread GF
Hi Karsten, ISO System of Concepts for Continuity of Care (ContSys) defines all kinds of concepts related to care and its documentation. It would be. a good thing to harmonise terms we use. More info via: https://contsys.org ContSys is NOT a Data model but a way to define

Re: AQL on specific list of compositions

2018-08-19 Thread Karsten Hilbert
On Fri, Aug 17, 2018 at 03:36:23PM +0100, Ian McNicoll wrote: > 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

Re: AQL on specific list of compositions

2018-08-18 Thread Bert Verhees
As far as I understand, and I also implemented it like that, there should never be functionality to delete data. Accidental deletion can only occur when you pass the software and hack on the database directly. That should never occur and if it does, the database should be restored to a safe

Re: AQL on specific list of compositions

2018-08-18 Thread Bert Verhees
I cannot imagine how a folder structure can get lost except by data corruption. In that case anything is lost anyway and a rollback from a backup is needed. In fact there should not be a folderstructure in the database. There are folder objects which contain a list of references (data) to

Re: AQL on specific list of compositions

2018-08-17 Thread Dileep V S
Very interesting discussion that has helped us get some of our thoughts clarified. We have started building a virtual folder as a service outside Ethercis to cover our requirements and are hoping to migrate the structure into the EHR server at a later date. The plan is to cover both the things

Re: AQL on specific list of compositions

2018-08-17 Thread Thomas Beale
The easiest way to think about this question is: if someone trashed the Folder structure, could we (some admin app) rebuild it? The answer is interesting. It should normally be possible to rebuild the Folder / Composition association structure (it's not containment, just referencing), but of

Re: AQL on specific list of compositions

2018-08-17 Thread Seref Arikan
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

Re: AQL on specific list of compositions

2018-08-17 Thread Ian McNicoll
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

Re: AQL on specific list of compositions

2018-08-17 Thread Seref Arikan
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

Re: AQL on specific list of compositions

2018-08-17 Thread Seref Arikan
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

Re: AQL on specific list of compositions

2018-08-17 Thread Dileep V S
We are working on the same lines. As Ethecis does not have folder concept currently, we are doing this minimally outside as a different service. thanks for the pointer Regards On Fri 17 Aug, 2018, 5:28 PM Thomas Beale, wrote: > There is a bigger question of how best to model 'encounter' and

Re: AQL on specific list of compositions

2018-08-17 Thread Thomas Beale
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

Re: AQL on specific list of compositions

2018-08-17 Thread Dileep V S
thanks Ian, Seref regards On Fri 17 Aug, 2018, 4:25 PM Ian McNicoll, wrote: > Beat me to it :( > > 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

Re: AQL on specific list of compositions

2018-08-17 Thread Ian McNicoll
Beat me to it :( 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

Re: AQL on specific list of compositions

2018-08-17 Thread Seref Arikan
Modifying Ian's example for a/uid/value and using uid values instead of names should do the trick On Friday, August 17, 2018, Dileep V S wrote: > Thanks Ian, > > However my requirement is different. I seem to have confused you with the > way my question was framed. > > What I meant by

Re: AQL on specific list of compositions

2018-08-17 Thread Dileep V S
Thanks Ian, However my requirement is different. I seem to have confused you with the way my question was framed. What I meant by composition ID was in fact Composition UID. I want to query the same template (/name/value), but limited to specific commits (compositionUIDs). I hope that helps

Re: AQL on specific list of compositions

2018-08-17 Thread Ian McNicoll
Hi Dileep, I do this by querying on the name attribute of the root composition archetype - see the examples in https://github.com/RippleOSI/Ripple-openEHR/blob/master/docs/bindings/Current%20Ripple%20Headings/Clinical%20notes/clinical_notes.md You can of course query on multiple names. where

AQL on specific list of compositions

2018-08-17 Thread Dileep V S
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