Re: Unique paths for slots problem if slots are filled with same archetype

2018-11-06 Thread Erik Sundvall
Hi all!

The issue (and some possible solutions/workarounds) is now described at 
https://openehr.atlassian.net/browse/SPECPR-279

Feel free to add information, comments etc there.

//Erik Sundvall


3 nov. 2018 kl. 15:12 skrev GF mailto:gf...@luna.nl>>:

Either it is solve using standardised basic Archetypes or via the RM.
The RM route is the preferred one.

When thinking about it, then…
Data in any Patient Record is either:
- de novo data stored at a session
- re-used pre-existing data (Reported data, used data in processes, etc.) This 
data is pre-existing data that is re-used. When querying for a concept it must 
be possible to restrict it to new data and/or re-used data.
Again this can be solved via standardised basic Archetypes or the RM.
The RM is the best option.

Gerard   Freriks
+31 620347088
  gf...@luna.nl

Kattensingel  20
2801 CA Gouda
the Netherlands

On 3 Nov 2018, at 12:23, Thomas Beale 
mailto:thomas.be...@openehr.org>> wrote:


I've just been thinking more about this problem. I agree we need to fix it, and 
it seems fairly likely adjusted rules for forming paths and storing archetype 
markers in data will be needed.

But... the archetype structure mentioned is a hack for getting around the lack 
of order-tracking attributes in the RM. We've had a look at this before (e.g. 
here)
 but I would suggest we need to think soon about additions to the ENTRY class 
or package to properly model requester and receiver meta-data.

- thomas

___
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


Re: Unique paths for slots problem if slots are filled with same archetype

2018-11-03 Thread GF
Either it is solve using standardised basic Archetypes or via the RM.
The RM route is the preferred one.

When thinking about it, then…
Data in any Patient Record is either:
- de novo data stored at a session
- re-used pre-existing data (Reported data, used data in processes, etc.) This 
data is pre-existing data that is re-used. When querying for a concept it must 
be possible to restrict it to new data and/or re-used data.
Again this can be solved via standardised basic Archetypes or the RM.
The RM is the best option.

Gerard   Freriks
+31 620347088
  gf...@luna.nl

Kattensingel  20
2801 CA Gouda
the Netherlands

> On 3 Nov 2018, at 12:23, Thomas Beale  wrote:
> 
> I've just been thinking more about this problem. I agree we need to fix it, 
> and it seems fairly likely adjusted rules for forming paths and storing 
> archetype markers in data will be needed.
> 
> But... the archetype structure mentioned is a hack for getting around the 
> lack of order-tracking attributes in the RM. We've had a look at this before 
> (e.g. here 
> )
>  but I would suggest we need to think soon about additions to the ENTRY class 
> or package to properly model requester and receiver meta-data.
> 
> - thomas

___
openEHR-technical mailing list
openEHR-technical@lists.openehr.org
http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org


Re: Unique paths for slots problem if slots are filled with same archetype

2018-11-03 Thread Thomas Beale
I've just been thinking more about this problem. I agree we need to fix 
it, and it seems fairly likely adjusted rules for forming paths and 
storing archetype markers in data will be needed.


But... the archetype structure mentioned is a hack for getting around 
the lack of order-tracking attributes in the RM. We've had a look at 
this before (e.g. here 
) 
but I would suggest we need to think soon about additions to the ENTRY 
class or package to properly model requester and receiver meta-data.


- thomas

On 19/10/2018 09:56, Sebastian Garde wrote:


Hi all,

We have encountered an interesting issue with how to construct unique 
paths for slots when there is more than one slot on the same level, 
and both slots are filled with the same archetype.


In this case, the resulting paths for both seem to be the same in OPT 
and thus in the data. (The at/id code of the slot are not part of the 
path for a filled slot.)


Likewise, you cannot apply an annotation to only one of them, because 
they share the same path.


This seems to be a general problem, but let me explain it in more 
detail using a concrete example:


The problem manifests itself for example when you start using the 
Service Request Archetype in CKM 
(https://ckm.openehr.org/ckm/#showArchetype_1013.1.614).


In the archetype’s protocol (see screenshot below), there are various 
slots, most importantly let’s look at the _Requester_ and the 
_Receiver_ Slot.


In a template (see 2^nd screenshot), both slots can be filled with the 
same archetype, technically, and it also seems reasonable from a 
content point of view to use the same archetype for both slots.


The problem is that this means that the paths are no longer unique – 
there is no way to differentiate between the Requester and Receiver 
information anymore as far as we can see in the OPT, and consequently 
in the data.


Also, if annotations are used on a path like this, these annotations 
would automatically be applied to both Requester and Receiver.


For example, the path for BOTH the Requester and Receiver, once filled 
with a service_request_information CLUSTER archetype is:


[openEHR-EHR-INSTRUCTION.service_request.v1]/protocol[at0008]/items[openEHR-EHR-CLUSTER.service_request_information.v1]

Is anybody already using this archetype (or a similar one) in their 
systems and is encountering this issue? Is anybody using workarounds 
for this?


One way this issue could be avoided/dodged is if the archetype wraps 
these slots in additional clusters, so that the resulting path is 
unique even if the same archetype is used inside slots on the same level.


It seems perfectly reasonable to me to construct archetypes the way 
this one has been constructed, but I am not sure if the implications 
are clear.


Is this something the SEC needs to have a look at if this is something 
that needs to be addressed somehow…or are we simply missing something?


Maybe at0141 for Requester / at0142 for Receiver need to be included 
in the path somehow (even if it is ugly)…




___
openEHR-technical mailing list
openEHR-technical@lists.openehr.org
http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org


Re: Unique paths for slots problem if slots are filled with same archetype

2018-10-22 Thread Thomas Beale
I need to study this problem a bit more, but having read the posts here, 
I think the solution would potentially to allow the /optional addition/ 
of a '::at' appended to an archetype id at a root point. This means 
that all current systems and data remain valid. It is better if it is 
appended rather than prepended because it means the string id always 
starts with the archetype id (= the case today) and may have something 
on the end, and that would only be the case for this fairly rare use 
case. It would also be a fairly simple code upgrade to existing systems.


So I would agree with Diego's syntax below, but say that it is optional, 
and only required when needed, which appears to be this one edge case. 
If we can convince ourselves of this, this is a pretty easy change to 
the relevant template tools and also ADL2.


thoughts?

- thomas


On 19/10/2018 10:44, Diego Boscá wrote:
While I believe we have reproduced this behavior in the OPT management 
to be compatible with existing tooling, in our typical slot solving 
methodology (non-template mode) the original archetype slot node_id 
ends in the new object node_id. Information about which slot was 
solved in this node ended in a new attribute in the term definitions 
(we called that attribute 'DCM', but you get the idea). We modified 
the AOM model to have references to both current archetype and solved 
archetype in order to avoid node_id collisions in archetype definition 
time.



I think we have talked before about the need of splitting the 
archetype_node_id attribute into node_id / archetype_id, which I think 
would solve these problems. Another solution would be to include 
always the node id in the node id, even if you are using it to store 
the archetype_id, so paths would look like

[openEHR-EHR-INSTRUCTION.service_request.v1::at]/protocol[at0008]/items[openEHR-EHR-CLUSTER.service_request_information.v1::at0141]



___
openEHR-technical mailing list
openEHR-technical@lists.openehr.org
http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org


Re: Unique paths for slots problem if slots are filled with same archetype

2018-10-19 Thread Diego Boscá
Discussing this with David we have another solution to this problem: one
thing you could do and would completely work without breaking anything is
to specify some kind of empty specializations of the include archetype, and
giving as the name of the specialization the node_id code. something like
this

[openEHR-EHR-INSTRUCTION.service_request-at.v1]/protocol[at0008]/items[openEHR-EHR-CLUSTER.service_request_information-at0141.v1]

This won't break current systems and will probably solve the original
problem

Regards

El vie., 19 oct. 2018 a las 13:10, Ian McNicoll ()
escribió:

> Hi Sebastian,
>
> This is 'known issue' but not one that we had really thought too carefully
> about. We 'solve' it right now by renaming the slotted in archetype root
> node at template level but others have already pointed out that this is
> less than ideal.
>
> Adding an intermediate cluster would solve things but feels clunky.
>
> I understand Thomas had some ideas about this re ADL2 but I like the ideas
> from Heath / Diego also.
>
> It is probably less of a practical issue than might seem the case as we
> tend not to have too many situations where the meaning needs to 'inherit'
> from the Slot name, and where those adjacent slot names differ for
> identical slot fills but agree it needs fixed.
>
> Ian
>
>
> @Diego - thanks for that input
> 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, 19 Oct 2018 at 10:44, Diego Boscá  wrote:
>
>> While I believe we have reproduced this behavior in the OPT management to
>> be compatible with existing tooling, in our typical slot solving
>> methodology (non-template mode) the original archetype slot node_id ends in
>> the new object node_id. Information about which slot was solved in this
>> node ended in a new attribute in the term definitions (we called that
>> attribute 'DCM', but you get the idea). We modified the AOM model to have
>> references to both current archetype and solved archetype in order to avoid
>> node_id collisions in archetype definition time.
>>
>>
>> I think we have talked before about the need of splitting the
>> archetype_node_id attribute into node_id / archetype_id, which I think
>> would solve these problems. Another solution would be to include always the
>> node id in the node id, even if you are using it to store the archetype_id,
>> so paths would look like
>>
>> [openEHR-EHR-INSTRUCTION.service_request.v1::at]/protocol[at0008]/items[openEHR-EHR-CLUSTER.service_request_information.v1::at0141]
>>
>> Regards
>>
>> El vie., 19 oct. 2018 a las 10:57, Sebastian Garde (<
>> sebastian.ga...@oceaninformatics.com>) escribió:
>>
>>> Hi all,
>>>
>>>
>>>
>>> We have encountered an interesting issue with how to construct unique
>>> paths for slots when there is more than one slot on the same level, and
>>> both slots are filled with the same archetype.
>>>
>>> In this case, the resulting paths for both seem to be the same in OPT
>>> and thus in the data. (The at/id code of the slot are not part of the path
>>> for a filled slot.)
>>>
>>> Likewise, you cannot apply an annotation to only one of them, because
>>> they share the same path.
>>>
>>>
>>>
>>> This seems to be a general problem, but let me explain it in more detail
>>> using a concrete example:
>>>
>>> The problem manifests itself for example when you start using the
>>> Service Request Archetype in CKM (
>>> https://ckm.openehr.org/ckm/#showArchetype_1013.1.614).
>>>
>>>
>>>
>>> In the archetype’s protocol (see screenshot below), there are various
>>> slots, most importantly let’s look at the *Requester* and the *Receiver*
>>> Slot.
>>>
>>> In a template (see 2nd screenshot), both slots can be filled with the
>>> same archetype, technically, and it also seems reasonable from a content
>>> point of view to use the same archetype for both slots.
>>>
>>>
>>>
>>> The problem is that this means that the paths are no longer unique –
>>> there is no way to differentiate between the Requester and Receiver
>>> information anymore as far as we can see in the OPT, and consequently in
>>> the data.
>>>
>>> Also, if annotations are used on a path like this, these annotations
>>> would automatically be applied to both Requester and Receiver.
>>>
>>>
>>>
>>> For example, the path for BOTH the Requester and Receiver, once filled
>>> with a service_request_information CLUSTER archetype is:
>>>
>>>
>>> [openEHR-EHR-INSTRUCTION.service_request.v1]/protocol[at0008]/items[openEHR-EHR-CLUSTER.service_request_information.v1]
>>>
>>>
>>>
>>> Is anybody already using this archetype (or a similar one) in their
>>> systems and is encountering this issue? Is anybody using workarounds for
>>> this?
>>>
>>> One way this issue could be avoided/dodged 

Re: Unique paths for slots problem if slots are filled with same archetype

2018-10-19 Thread Ian McNicoll
Hi Sebastian,

This is 'known issue' but not one that we had really thought too carefully
about. We 'solve' it right now by renaming the slotted in archetype root
node at template level but others have already pointed out that this is
less than ideal.

Adding an intermediate cluster would solve things but feels clunky.

I understand Thomas had some ideas about this re ADL2 but I like the ideas
from Heath / Diego also.

It is probably less of a practical issue than might seem the case as we
tend not to have too many situations where the meaning needs to 'inherit'
from the Slot name, and where those adjacent slot names differ for
identical slot fills but agree it needs fixed.

Ian


@Diego - thanks for that input
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, 19 Oct 2018 at 10:44, Diego Boscá  wrote:

> While I believe we have reproduced this behavior in the OPT management to
> be compatible with existing tooling, in our typical slot solving
> methodology (non-template mode) the original archetype slot node_id ends in
> the new object node_id. Information about which slot was solved in this
> node ended in a new attribute in the term definitions (we called that
> attribute 'DCM', but you get the idea). We modified the AOM model to have
> references to both current archetype and solved archetype in order to avoid
> node_id collisions in archetype definition time.
>
>
> I think we have talked before about the need of splitting the
> archetype_node_id attribute into node_id / archetype_id, which I think
> would solve these problems. Another solution would be to include always the
> node id in the node id, even if you are using it to store the archetype_id,
> so paths would look like
>
> [openEHR-EHR-INSTRUCTION.service_request.v1::at]/protocol[at0008]/items[openEHR-EHR-CLUSTER.service_request_information.v1::at0141]
>
> Regards
>
> El vie., 19 oct. 2018 a las 10:57, Sebastian Garde (<
> sebastian.ga...@oceaninformatics.com>) escribió:
>
>> Hi all,
>>
>>
>>
>> We have encountered an interesting issue with how to construct unique
>> paths for slots when there is more than one slot on the same level, and
>> both slots are filled with the same archetype.
>>
>> In this case, the resulting paths for both seem to be the same in OPT and
>> thus in the data. (The at/id code of the slot are not part of the path for
>> a filled slot.)
>>
>> Likewise, you cannot apply an annotation to only one of them, because
>> they share the same path.
>>
>>
>>
>> This seems to be a general problem, but let me explain it in more detail
>> using a concrete example:
>>
>> The problem manifests itself for example when you start using the Service
>> Request Archetype in CKM (
>> https://ckm.openehr.org/ckm/#showArchetype_1013.1.614).
>>
>>
>>
>> In the archetype’s protocol (see screenshot below), there are various
>> slots, most importantly let’s look at the *Requester* and the *Receiver*
>> Slot.
>>
>> In a template (see 2nd screenshot), both slots can be filled with the
>> same archetype, technically, and it also seems reasonable from a content
>> point of view to use the same archetype for both slots.
>>
>>
>>
>> The problem is that this means that the paths are no longer unique –
>> there is no way to differentiate between the Requester and Receiver
>> information anymore as far as we can see in the OPT, and consequently in
>> the data.
>>
>> Also, if annotations are used on a path like this, these annotations
>> would automatically be applied to both Requester and Receiver.
>>
>>
>>
>> For example, the path for BOTH the Requester and Receiver, once filled
>> with a service_request_information CLUSTER archetype is:
>>
>>
>> [openEHR-EHR-INSTRUCTION.service_request.v1]/protocol[at0008]/items[openEHR-EHR-CLUSTER.service_request_information.v1]
>>
>>
>>
>> Is anybody already using this archetype (or a similar one) in their
>> systems and is encountering this issue? Is anybody using workarounds for
>> this?
>>
>> One way this issue could be avoided/dodged is if the archetype wraps
>> these slots in additional clusters, so that the resulting path is unique
>> even if the same archetype is used inside slots on the same level.
>>
>> It seems perfectly reasonable to me to construct archetypes the way this
>> one has been constructed, but I am not sure if the implications are clear.
>>
>>
>>
>> Is this something the SEC needs to have a look at if this is something
>> that needs to be addressed somehow…or are we simply missing something?
>>
>> Maybe at0141 for Requester / at0142 for Receiver need to be included in
>> the path somehow (even if it is ugly)…
>>
>>
>>
>> Regards,
>>
>> Sebastian
>>
>>
>>
>>
>>
>>
>> ___
>>