Hi Dileep, Yes, this is expected. The behaviour was first noticed about 10 years ago, and initially it was reported as a bug. After some thought we realised that it’s the correct behaviour. I found it incredibly annoying too!
My memory of the exact reasoning is poor, after all of these years; but I think it’s something like this: Initially, the name of the archetype node is unconstrained. As a consequence, any name would be valid for this node. Therefore, there’s an unlimited number of unique paths to the data that could be stored at this node’s path: for example, at1234[name = “a”], at1234[name = “b”], at1234[name = “c”], etc. In the template, when you constrain the archetype node to a single specific name, there is only one possible path to the the node: for example, at1234[name=“whatever name you’ve constrained it to”]. There’s only one possible unique path to this. Therefore, the maximum occurrences possible is 1. Essentially, this arises because there has to be one unique path to each node in the data. This is important so that each data node can be identified unambiguously within the EHR. There is a workaround, however. (But again, my memory may be inaccurate, so please forgive me if this isn’t quite right or complete.) To allow multiple occurrences, you need to clone the node. Then you can rename the clone. Although the renamed clone will be single-occurrence, this will retain the original node as multiple occurrences. Or at least I think this is how it works — it’s been quite a few years! I have an even vaguer recollection that ADL 2.0 may have resolved this in a more satisfactory way. Perhaps Thomas or someone can elucidate. Hope this helps, Peter > On 19 Aug 2018, at 20:24, Dileep V S <[email protected]> wrote: > > Hi, > > I am observing a strange behavior in the template designer and whated to > check if this is the expected behavior and if not how to manage it. > > In any template, when ever I rename any archetypes, their occurrence gets set > to [0..1] automatically (single occurrence). The options for selecting > multiple occurrences is no more available. > > Have anybody else noticed this problem? Is there any way to work around this > as some of these archetypes need to be multiple occurrences > > Please see screenshots attached for reference > > regards
_______________________________________________ openEHR-technical mailing list [email protected] http://lists.openehr.org/mailman/listinfo/openehr-technical_lists.openehr.org

