On 06/01/2013 20:29, Bert Verhees wrote:
> On 01/06/2013 08:44 PM, Thomas Beale wrote:
>>
>> Hi Bert,
>>
>> existence is a property of CAttribute (multiple or single). It
>> indicates if the attribute value (i.e. some object) must exists or
>> can be null.
>>
>
> How about this:
>
> Since its function in CSingleAttribute is also done by
> CObject-attribute occurences, it could be removed from the
> CSingleAttribute. This would make tools that check this superfluous.
Hi Bert,
it can't really, because you can have CAttributes that have no CObject
children. Setting the existence to {1} for example on such an attribute
says that there have to be values, but says nothing further about them.
On the other hand, if there are child CObjects, these CObjects could
each have occurrences set to {0..1} (e.g. if they are alternatives).
so it's not quite as simple as it seems. There probably is a
simplification available in the future, but my suggestion for now,
assuming you are using the Java library and existing openEHR archetypes,
is to stick with the way the library works at the moment - I assume it
does sensible things...
- thomas