- cardinality of attributes: the underlying UML model might have an attribute CLUSTER.items with cardinality 0..*; an archetype might limit this to 1..4. In UML there is no way to override an existing cardinality.
- existence of attributes: the underlying UML model might have an attribute ELEMENT.value with cardinality 0..1; an archetype might limit this to 1..1 (i.e. mandatory). In UML there is no way to override an existing cardinality.
- NB: UML actually doesn't correct distinguish between existence and cardinality. Existence means: is there an object? Cardinality means (for containers only): how many items can be in this container. There is no accepted way in UML to force the container to be there, but allow it to be empty. For this, you need to add an OCL statement.
- number of occurrences of data items matching a given child in a container in an archetype. For example, you might make a container item called 'systolic pressure' in a container that also has 'distolic pressure' etc. You can set the occurrences of each such element individually. Usually these ones would be set to 1..1 or 0..1 (two systolics in one measurement doesn't normally make sense). BUt a data element marked 'differential diagnosis' could have occurrences set to 1..* for example, or 1..3 or whatever. 'Occurrences' is not a UML concept per se, because it is to do with numbers of instances in data matching a specific pattern, not numbers of possible instances of any kind in a container.
- type; e.g. ELEMENT.value (see here ) could be restricted to say DV_QUANTITY, DV_COUNT and DV_TEXT.
- value range: any primitive valued field (this includes coded items and dates and times in ADL) can be restricted to a specific range or set of possible values
- any coded text (HL7-speak: CD, CV, CS) can be restricted to an internal code, an external code, or a value from a referenced ref-set
Simulating this would require some kind of OCL statement in the source archetype that makes some statement to do with a value field in the target classes, e.g. self.items->forAll (i:ITEM | TerminologyService.valid (i.some_coded_attr.code + "<<" + "|0394856|biochemistry panel code")).
- NB: this assumes a terminology service is available (and inherited someway into the model) and that there is a service function for testing subsumption.... maybe doable in some very esoteric environment, but no UML tool today can do this.
Archetypes have a rule section allowing declarations similar to OCL, but based on paths. Some expressions are not available in OCL, e.g. access to outside variables.