Hi Athanasios,
On 27/06/2012 17:33, Athanasios Anastasiou wrote: > 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 { ....} ... } } > > 2) 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 <imap://tb015k8416 at imap.blueyonder.co.uk:993/fetch%3EUID%3E/%5BGmail%5D/All%20Mail%3E4694/;section=2.2?part=1.2.2&filename=adl1.5.pdf> are clear enough on this. In the example above, occurrences lets you individually control how many of ELEMENT[at0002], ELEMENT[at0003] etc. * * - thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.openehr.org/pipermail/openehr-technical_lists.openehr.org/attachments/20120627/8e78157e/attachment.html>

