This is the response I sent to one list on this topic...

I don't feel so bad with this large size post, since I already have to
compete with Greg;-) The following looks technical, but if you have the
patience to follow the links, most people should get it (having 2
screens like I do nowdays helps!).

I'll have to go through the maths below when I have a little more time,
but it isn't the basis for archetypes as such (there might be
congruencies). The formal basis (as it turns out) for the constraint
part of an archetype is Frame logic queries. These are passingly
described in Michael Kifer's Frame Logic paper of 1995. However, we also
combine an ontology and interpolation of coded terms into the archetype
nodes to give them meanings beyond the meanings possible purely from the
underlying class model.

If you have a look at an example archetype like a simple goal archetype:
human readable HTML expression:
http://oceaninformatics.biz/archetypes/openEHR-EHR-EVALUATION.goal.v1.html
ADL computable expression:
http://oceaninformatics.biz/archetypes/ADL/openEHR-EHR-EVALUATION.goal.v1.adl

You can see that  in the ADL expression in the "definition" section a
lot of statements of the form TYPE_NAME matches {} and attribute_name
matches {}. These define the instance spaces of objects (conforming to
TYPE_NAME) in terms of the instance spaces of their attributes,
recursively. All the TYPE_NAMEs and attributes names are from the
reference model (in this case, the underlying model is the openEHR
reference model, see
http://svn.openehr.org/specification/TRUNK/publishing/architecture/computable/UML/uml_start_view.html)
 
<http://svn.openehr.org/specification/TRUNK/publishing/architecture/computable/UML/uml_start_view.html%29>

The whole definition section is a constraint statement, defining a
boundary in the instance space of the outermost type, in the case of
this example, EVALUATION (see
http://www.openehr.org/uml/Browsable/_9_0_76d0249_1109249648736_872559_12384Report.html).
 
<http://www.openehr.org/uml/Browsable/_9_0_76d0249_1109249648736_872559_12384Report.html%29.>
 

Now, since there is a lot of optionality in archetypes (0..1, 0..* etc),
an archetype actually defines a family of boundaries in instance space.
This is similar to an F-logic query, because it acts like a filter - you
apply it to a database, and if you find instances "inside" the
boundaries, you have found something that "matches" the query. Note that
the use of coded terms to give nodes domain-level meaning multiplies up
the possibilities vastly. (What I mean by this can fairly easily be
understood by looking at
http://my.openehr.org/wsvn/knowledge/archetypes/dev/adl/openehr/ehr/entry/observation/openEHR-EHR-OBSERVATION.blood_gases.v1.html?op=file&rev=0&sc=0
 
<http://my.openehr.org/wsvn/knowledge/archetypes/dev/adl/openehr/ehr/entry/observation/openEHR-EHR-OBSERVATION.blood_gases.v1.html?op=file&rev=0&sc=0>
 

- in this archetype, if you get down into the middle of it, you will see
the type name ELEMENT and CLUSTER a lot; just after each reference, you
see a code in []; the corresponding meaning of the code in English is
given in teh comment at the end of the same line. So you can see that
the "meaning" of the ELEMENT with [at0004] is "PaO2", whereas the
ELEMENT with [at0005] is "PaCO2".)

Now, given this, what can be said about a detail like units in
quantities is the same that can be said about any detail: it depends on
what is in the reference model. In the openEHR reference model, the part
that models Quantity is here:
http://www.openehr.org/uml/Browsable/_9_0_76d0249_1109599337877_94556_1510Report.html
You can see that in this model it is the class DV_MEASURABLE that adds
units. The most common type of thing with units is a DV_QUANTITY.

Now here is a test archetype constraint QUANTITYs (we don't bother with
the DV_ in archetypes - this is just a cosmetic thing):
http://my.openehr.org/wsvn/knowledge/archetypes/dev/adl/test/clinical_types/adl-test-entry.c_quantity.draft.html?op=file&rev=0&sc=0
 
<http://my.openehr.org/wsvn/knowledge/archetypes/dev/adl/test/clinical_types/adl-test-entry.c_quantity.draft.html?op=file&rev=0&sc=0>
You can see that the first attribute of SOME_TYPE, called
standard_quantity_attr, constrains a QUANTITY to be either >= 4oC or
 >=40oF. There are other alternatives as well, as you can see below
that. he explanation of how this works is too long to go into here, but
is in the ADL manual
(http://svn.openehr.org/specification/TRUNK/publishing/architecture/am/adl.pdf).
 
<http://svn.openehr.org/specification/TRUNK/publishing/architecture/am/adl.pdf%29.>
 

A real archetype full of quantities was the blood gases one from just above.

Now if anyone is still with me, the next thing to say is that archetypes
are completely generic with respect to object models, so constraining
things like units is no different from constraining anything else; it
depends on what you put in the object model to be constrained. As far as
units go, you can see in archetypes like
http://my.openehr.org/wsvn/knowledge/archetypes/dev/adl/openehr/ehr/entry/observation/openEHR-EHR-OBSERVATION.cbc.v1.html?op=file&rev=0&sc=0
 
<http://my.openehr.org/wsvn/knowledge/archetypes/dev/adl/openehr/ehr/entry/observation/openEHR-EHR-OBSERVATION.cbc.v1.html?op=file&rev=0&sc=0>
 

that a "en-us" translation would most likely add in a few unit
additions, to allow for SI and non SI, e.g. for concentrations etc
(actually, I don't think this is cleanly a US/non-US thing, most of
these kinds of analytes are measured in a metric fashion everywhere, but
there are different variants like mks and cgs, and other details like
moles versus g/l etc).

Following are some starting links for archetypes:
- mind map entry:
http://oceaninformatics.biz/archetypes/MindMap/ArchetypeMap.html
- search engine:
http://www.dualitysystems.com.au/archetypefinder/archetypefinder
- static page with human readable HTML and ADL archetypes:
http://oceaninformatics.biz/archetypes/

hope this demystifies a few things....

- thomas beale





------------------------------------------------------------------------
YAHOO! GROUPS LINKS

    *  Visit your group "openhealth
      <http://groups.yahoo.com/group/openhealth>" on the web.
       
    *  To unsubscribe from this group, send an email to:
       openhealth-unsubscribe at yahoogroups.com
      <mailto:openhealth-unsubscribe at yahoogroups.com?subject=Unsubscribe>
       
    *  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
      Service <http://docs.yahoo.com/info/terms/>.


------------------------------------------------------------------------



Reply via email to