Regarding the "occurence" and "existence" attributes

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

Hi Athanasios,

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)

I think you may be over-complicating things here. In the example below, the cardinality constraint means that the data instances can have 1 - 8 objects in the ‘items’ property - these could be instances conforming to the ELEMENTs or CLUSTERs defining inside the ‘items’ attribute.

CLUSTER[at0001] matches {
items cardinality matches {1..8} matches {
ELEMENT[at0002] matches { …}
ELEMENT[at0003] matches { …}
CLUSTER[at0004] matches { …}

}
}

  1. Why then is there a “cardinality” on an ITEM_STRUCTURE AND an “occurrence” on each of its contents at the same time?

hopefully pages 50 & 51 of the ADL 1.5 draft are clear enough on this. In the example above, occurrences lets you individually control how many of ELEMENT[at0002], ELEMENT[at0003] etc.

  • thomas

They are, thank you very much for this Thomas, i was focusing on the "Constraint Model Package" (Chapter 5) in the documentation of the AOM (pp 29-37).

So, there is after all an extra set implied in there because the "groupings" are two. One because of the container and one because of the multiplicity of each item in the container.
(That is probably coming handy in AQL later).

All the best
Athanasios Anastasiou