Dear all

I am coming back to an earlier question 
(http://lists.openehr.org/pipermail/openehr-technical_lists.openehr.org/2012q2/007100.html)
 
because i am reaching the point where i am performing validation and i 
really need to verify (now rather than later) how some things are 
supposed to be working.

I am noticing that C_OBJECTs have "occurrences" and C_ATTRIBUTEs have 
"existence" and "cardinality" but i don't understand what does that mean 
for ITEM_STRUCTURE and also when you put them together.

My questions therefore are as follows:

1) When creating an archetype for some RM entity that contains some form 
of archetypeable "items" attribute (list, set) then the cardinality 
constraint refers to that List<ITEM_STRUCTURE> that constitutes the 
"items" attribute). For example, if i define an ordered CLUSTER with two 
fields and max cardinality 8 (0..7 lower included), then i expect 
"items" to contain UP TO 8 pairs of these fields. Is that correct? (I 
think so)

2) Why then is there a "cardinality" on an ITEM_STRUCTURE AND an 
"occurrence" on each of its contents at the same time?

For example, i can define an ordered CLUSTER of cardinality 4, 
containing one DV_TEXT (as an example) with up to 15 occurrences....The 
way i understand this is that i have just defined a list of 4 items each 
of which is a CLUSTER that contains one text field that itself is a list 
of 45 entries. I don't think that this agrees with the RM definition 
though because an ELEMENT's "value" can hold just ONE DATA_VALUE....What 
does this "occurrence" means then?

This is getting a bit confusing when you consider what happens with 
CLUSTERs containing CLUSTERs (either nested or linked through SLOTs)

In this case, i can have a CLUSTER (that will have a cardinality of its 
own) containing another CLUSTER with (occurrence.max>1 AND a 
cardinality.max>1) :-?

If you have CLUSTERs with high cardinalities you can already define a 
tree (CLUSTER.items[0].items[1].items[3].items[4]....), so how do 
occurrences fit in there as well?

Looking forward to hearing from you
Athanasios Anastasiou


Reply via email to