Updated Architectural overview

The Architectural Overview document has been updated to include a better
explanation of how archetypes and templates work. See the home page
hotlinks section. The HTML view of the updated chapter is here -
http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/html/architecture/overview/Output/archetyping.html#1135484

As usual, all comments and feedback are welcome.

- thomas beale

Going back to this document, I confess that it's not at all clear to me what distinction you are introducing with the archetype concept, either from a software engineering point of view or mathematically. All of the examples of archetypes sound like just run of the mill classes (and I suppose templates would correspond to parametrized classes), so it's not really that clear what the two levels in two-level modeling are. I can *speculate* and guess that, say, SNOMED and LOINC are examples of controlled vocabularies, and I can readily imagine a range of concepts that specialize or generalize one another, but that's really a distinction of degree rather than a distinction of kind.

Thinking of examples from mathematics, the integers {0, 1, 2} under addition modulo 3 form an example of a cyclic group, which is a kind of Abelian (commutative) group, and that, in turn, is a kind of group. Those concepts (cyclic group, Abelian group, group) represent progressively more abstract concepts, but this distinction is not otherwise special. I could, on the other hand, say that groups are example of algebraic structures (or that the group concept is an example of an algebraic structure), and that algebraic structures are to be distinguished, say, from geometric structures. Now, whether that's a clearcut distinction is debatable (consider lattices or projective planes), but it is one we make in practice. More to the point though, when I say that this group is cyclic or Abelian, the adjective "cyclic" (resp. "Abelian") modifies a particular group or set. On the other hand, when I say groups are examples of algebraic structures, the adjective "algebraic" modifies
the concept of structure. This seems to be a genuinely different lind of thing, and not just another instance of the same basic category.

Greg,

if you would like some mathematics to look at, I suggest Michael Kifer's
F-logic paper - ftp://ftp.cs.sunysb.edu/pub/TechReports/kifer/flogic.pdf

An archetype is a synthesis of an F-logic query (formally: a constraint
on a complex structure) and terminology.

The main difference practically speaking is that:
a) the reference models is expressed as classes, and is directly in the
software
b) archetypes are expressed as constraints and are not in the software.

- thomas beale

Thanks. It will be my reading material on the train ride home.

Oh, and the example of groups was just what came to mind. I know it's not very medical, but it seemed (to me, at least) to clarify what it was that I had in mind. In general, I find OpenEHR documentation frustrating, and I rather suspect it is due to a "culture gap" (on my part) more than anything else.

Gregory
You appear to be a mathematician and I guess the ‘run of the mill cases’ that you describe are to an extent just that - the clinical information aggregates that have a meaning in health care. The reference model can be seen as a recording model. The archetype just expresses how to describe the ‘run of the mill’ clinical data set using the reference model classes. So, the schema is constant. Core software is based on the reference model - it does not depend on specific archetypes at all.

You can display data (not beautifully) using the reference model classes, share and send it, know who committed it, where it came from and many other properties of the information. If you want to know clinical facts about the person, the system will need to understand archetypes - as clinical queries and context dependent display are described in terms of archetypes.

The fact is that archetypes evolve - some are stable for years, others change quite quickly depending on the progress of medicine in that area. Whatever the rate of change of clinical medicine and therefore archetypes, the changes to the reference model (and therefore to core software) can be managed. Systems can receive data which is of unknown meaning (to the machine) and it is even possible to have data entry environments controlled by archetypes alone. Thus doctors involved in special research undertakings or with highly specialised clinical requirements can still enter data into their systems that is appropriately structured.

I hope this helps understand what we are doing - can’t express it in maths! Cheers, Sam

Not necessarily - and we can always do with advice on how to improve this.