> At the moment we have not seen any need for multiple inheritance in 
> archetypes.

I see this as very similar to multiple inheritance in objects.
There is no *need*, but there is useful things that can be done.
The question is whether the price is justified.

The use case is relatively simple in concept - allowing multiple
inheritance would allow me to "cross-cut" concerns. I could write
an archetype that only dealt a narrow aspect of an information
structure, such as data integrity issues, and then use it across
multiple archetypes, letting them focus on the big picture, not
the minutiae of data integrity, which is mostly overlooked but
ubiquitiously present.

This would surely be useful for some things. The problem is the price.
How do you manage it, how would you use it, what does it mean to
allow "multiple inheritance". The archetype cannot allow anything
not allowed in all it's parents - so they have to "allow" some fairly
generic structures. To actually use it in an instance, the instance
is now making claims that become very much more difficult to
evaluate.

HL7 templates are an approach to solving this problem. HL7 static
models allow for multiple inheritance, though this can be
discovered (some controversy where discovery safe though). Actually,
given the similarity between static models and AOM, it's possible
that the algorithm that HL7 uses would be applicable to AOM too.
Because HL7 models allow multiple inheritance by discovery, it is
also necessary to represent the multiple applicable constraint
models in the instance, greatly complicating the instance and the
processing of the instance. However there are some interesting design
patterns that can arise, and that are arising, in the HL7 space as a
consequence of this.

So, resist any thought of multiple inheritance in openEHR - it will
greatly complicate matters. Let HL7 find out whether templates
represent a great big hole to fall into, or whether they will be
truly enabling. (btw what I have described is not all that
templates are in HL7, so the mere fact that templates are successful,
particularly in CDA, is not evidence that multiple inheritance can be
made to work)

Grahame


Reply via email to