Archetype questions

Hi,

I’m currently working in a group that has been evaluating archetypes and they found out that there in archetypes may be needed to add external nodes from other archetypes instead of only adding complete archetypes as slots. Does the current ADL specification allow that external parts from other archetypes can be included? I think the openEHR templates allow to cut off parts in a slot, but I’m not sure if they can exclude everything except a single item.

The group also found out that there is a need to deduct certain answers depending on previously answered questions. For example if we previously answered that the blood pressure was above 160, then another question about hypertension should be answered automatically. Is this possible to do in archetypes?

Another issue is about computation. For example we could want a quantifiable magnitude to be the result of two previously entered values. Is this possible to do in archetypes? Perhaps in the declaration section or the invariant section? I’ve seen that these sections should contain some kind of first-order predicate logic, but I’m not sure of the scope and limitations/possibilities of these ADL sections. Also, the declaration section is actually not even described in the ADL 1.4 document, it is only shown in an example overview figure.

Another feature is value reporting, which should work when we use several archetypes in an openEHR template. For example if some question was answered in one archetype, then another archetype that has the same question should get the value reported from the previous archetype. Is this possible? I guess this has to do with external references as I mentioned in my first question.

We would also like to ask if there is a way of specifying validity for questions depending on previously answered questions. E.g. if a certain answer was given from a multiple alternative question (coded_text), then and only then, some other group of questions will be valid. Is this possible to do in archetypes? Perhaps it’s possible with invariants?

Finally is there a way of specifying the relevance of answers in archetypes. Say for example that if some laboratory results are too old, could an archetype contain some restrictions that make it illegal to answer certain questions because the material that the answers are based upon is too old? I’m not sure if this is related to DSS or something else.

Regards,

Mattias, via the Linköping Team.

Hello Mattias,

these are exactly the questions, issues I have been working on for 3 years now. All I can specify in the HL7 v3 Care Provion Domain model, that is basically why I apply this method for the time being, waiting for a better tool to do this. Below specific answers after each question.

Hi,

I'm currently working in a group that has been evaluating archetypes and
they found out that there in archetypes may be needed to add external nodes
from other archetypes instead of only adding complete archetypes as slots.

I agree, in the care provision we therefore have included the organizer class that allows you to start with atomic items, link them via an organiser code to a higher level item (e.g. blood pressure is part of vital signs, mobility is part of activities of daily living, potasium is part of electrolytes etc.). I work bottom up because of another question of you below.
This is possible in ADL I believe / am told, but have not seen operationalised yet. However the template specifier does this, but I am not sure how the formal links work. In organiser we can code the higher level rubrics.

Does the current ADL specification allow that external parts from other
archetypes can be included? I think the openEHR templates allow to cut off
parts in a slot, but I'm not sure if they can exclude everything except a
single item.

We break down such care information models in two parts if there are use cases where only a part is used. So we make 2 slots instead of one.

The group also found out that there is a need to deduct certain answers
depending on previously answered questions. For example if we previously
answered that the blood pressure was above 160, then another question about
hypertension should be answered automatically. Is this possible to do in
archetypes?

We can relate HL7 obs classes to each other, including if a value of Obs 1 > 160, then Obs gets default hypertension.
However, there is no agreed formalism in HL7 v3 to do this. Arden syntax an d Gello are often named in this area, but I have no examples. I just use plain english for the time being.

Another issue is about computation. For example we could want a quantifiable
magnitude to be the result of two previously entered values. Is this
possible to do in archetypes?

We apply this a lot in the HL v3 care information models. Basically most scales have a kind of sum up feature of say 10 observations (Barthel) each gets a numeric score and obs 11 is for the total score. In the method section we define: total score, but again, there is no formalism used, just plain English.
Similarly this would work with basic calculations such as average scores, or the formula for the body mass index etc.

Perhaps in the declaration section or the

invariant section? I've seen that these sections should contain some kind of
first-order predicate logic, but I'm not sure of the scope and
limitations/possibilities of these ADL sections. Also, the declaration
section is actually not even described in the ADL 1.4 document, it is only
shown in an example overview figure.

It is perfectly possible to express your rules in predicate logic and if only it would be included as a comment text part, it will be clear that the system needs to be able to do such operations on the variables.

Another feature is value reporting, which should work when we use several
archetypes in an openEHR template. For example if some question was answered
in one archetype, then another archetype that has the same question should
get the value reported from the previous archetype. Is this possible? I
guess this has to do with external references as I mentioned in my first
question.

If the first observation is coded appropriately (tracable and identifyable) then the second one could refer to this codes variable. It would work so that the variable in question and addressed from 2 archetypes, would have the same code and both archetypes should allow entering the value and presenting the value. But again, I would prefer a bottom up approach. Given that this variable is used in 2 archetypes for me would imply it can be better an atomic archetype in itself, where the other more molecular ones include this atomic archetype.
This goes back to your earlier question: the bottom up approach which we currently apply in the Care Provision modelling works such that you can do what you ask for here.

We would also like to ask if there is a way of specifying validity for
questions depending on previously answered questions. E.g. if a certain
answer was given from a multiple alternative question (coded_text), then and
only then, some other group of questions will be valid. Is this possible to
do in archetypes? Perhaps it's possible with invariants?

I understand your question, we have similar use cases, e.g. for questions related to being eligible for types of care or treatment or facilities.
We currently work in the care information models (www.zorginformatiemodel.nl) in which we summarize the clinical background of the content of the 'archetype', list the variables, explain the mathematical, logical or decision style requirements as you have asked about above, then specify the HL7 artifact, then specify the technical implementation things (e.g. datatype, code, cardinality etc. ). The latter can easily be included in ADL.

Finally is there a way of specifying the relevance of answers in archetypes.
Say for example that if some laboratory results are too old, could an
archetype contain some restrictions that make it illegal to answer certain
questions because the material that the answers are based upon is too old?
I'm not sure if this is related to DSS or something else.

In the HL7 v3 Care Provision Care Planning specification this can be done: each care information model can be in definition mood. This is the guideline representation. It is possible to specify the time limits e.g. by defining the IVL of the effective time of an event of an observation.

Regards,

Mattias, via the Linköping Team.

Hope this helps,

William

I believe that in answering this series of questions one has to distinguish
among:
1. what archetypes do - they define valid data based on the constraints of a
clinical concept model;
2. what needs to be done by decision support systems that rely on archetypes,
that is, to make sense of results recorded using archetypes; and
3. what a template builder can do using archetypes to introduce business logic
and dependenices into the template one needs for specific purposes.

As you can see, archetypes do not address all the issues listed in 1-3.

Ogi Pishev

P.S. As for the ...v3 stuff, I'd like to see computing systems that machine
process those... (And I don't mean Excel).

Quoting Williamtfgoossen@cs.com:

Read below.

It is interesting to read what you try to do.
This is work (R&D in the 7th Frame Work) for the near future, I expect.

Gerard

– –
Gerard Freriks, arts
Huigsloterdijk 378
2158 LR Buitenkaag
The Netherlands

T: +31 252 544896
M: +31 653 108732

Hi,

I’m currently working in a group that has been evaluating archetypes and they found out that there in archetypes may be needed to add external nodes from other archetypes instead of only adding complete archetypes as slots. Does the current ADL specification allow that external parts from other archetypes can be included? I think the openEHR templates allow to cut off parts in a slot, but I’m not sure if they can exclude everything except a single item.

It is the template where constraints on selected/collected archetypes can be made in any level of detail.

The group also found out that there is a need to deduct certain answers depending on previously answered questions. For example if we previously answered that the blood pressure was above 160, then another question about hypertension should be answered automatically. Is this possible to do in archetypes?

At this moment Archetypes are there to represent data and information that needs to be stored, retrieved and exchanged.
Archetypes/templates are not designed, so far, to store, retrieve and exchange knowledge.

It is a matter of R&D to be done in the near future to make it possible. We need this to use Archetypes/Templates in clinical pathways, case management and workflow.

Another issue is about computation. For example we could want a quantifiable magnitude to be the result of two previously entered values. Is this possible to do in archetypes? Perhaps in the declaration section or the invariant section? I’ve seen that these sections should contain some kind of first-order predicate logic, but I’m not sure of the scope and limitations/possibilities of these ADL sections. Also, the declaration section is actually not even described in the ADL 1.4 document, it is only shown in an example overview figure.

At this point in time ADL is NOT a specification for computation. This is R&D.

Another feature is value reporting, which should work when we use several archetypes in an openEHR template. For example if some question was answered in one archetype, then another archetype that has the same question should get the value reported from the previous archetype. Is this possible? I guess this has to do with external references as I mentioned in my first question.

You are describing functionality that resides in the business logic part of the EHR-system. This is (at present) outside of the scope of CEN/tc251 EN13606 or OpenEHR.

We would also like to ask if there is a way of specifying validity for questions depending on previously answered questions. E.g. if a certain answer was given from a multiple alternative question (coded_text), then and only then, some other group of questions will be valid. Is this possible to do in archetypes? Perhaps it’s possible with invariants?

You are investigating across the limits of the defined scopes as published.

Finally is there a way of specifying the relevance of answers in archetypes. Say for example that if some laboratory results are too old, could an archetype contain some restrictions that make it illegal to answer certain questions because the material that the answers are based upon is too old? I’m not sure if this is related to DSS or something else.

vide supra,

2006/11/3, ognian.pishev@oceaninformatics.biz <ognian.pishev@oceaninformatics.biz >:

I believe that in answering this series of questions one has to distinguish
among:

  1. what archetypes do - they define valid data based on the constraints of a
    clinical concept model;
  2. what needs to be done by decision support systems that rely on archetypes,
    that is, to make sense of results recorded using archetypes; and
  3. what a template builder can do using archetypes to introduce business logic
    and dependenices into the template one needs for specific purposes.

As you can see, archetypes do not address all the issues listed in 1-3.

Hi Ognian,

These are exactly the points I have tried to explain to the group I am working with, I just needed to verify them on this list since there are more experienced people here. The group have been comparing “templates”, in their sense meaning archetypes from openEHR and templates based on the HL7 RIM, but they are hard to compare since not archetypes alone can address all issues.

Many of the points the group has come up with in their evaluation are in openEHRs case more about what a template builder can do, rather than what an archetype editor can do. There were also many requirements on doing computations and decision support like things in archetypes. I find that there may exist some basic computation and DSS in archetypes but it is part of R&D as Gerard pointed out.

Regards,

Mattias

Hi Mattias

I’m currently working in a group that has been evaluating archetypes and they found out that there in archetypes may be needed to add external nodes from other archetypes instead of only adding complete archetypes as slots.

Not sure what you mean = only parts of archetypes e,g, Hb only from Blood count?

Does the current ADL specification allow that external parts from other archetypes can be included?

This is done in templates at present = need some examples

I think the openEHR templates allow to cut off parts in a slot, but I’m not sure if they can exclude everything except a single item.

You can exclude all archetypes - again need more specificity!

The group also found out that there is a need to deduct certain answers depending on previously answered questions. For example if we previously answered that the blood pressure was above 160, then another question about hypertension should be answered automatically. Is this possible to do in archetypes?

I think this is application space - I do not think you can express this in an archetype…probably better if there is more detail.

Another issue is about computation. For example we could want a quantifiable magnitude to be the result of two previously entered values.

We see this as a application issue = the archetype can limit it to be the computation of two other values if they are present.

Is this possible to do in archetypes? Perhaps in the declaration section or the invariant section? I’ve seen that these sections should contain some kind of first-order predicate logic, but I’m not sure of the scope and limitations/possibilities of these ADL sections. Also, the declaration section is actually not even described in the ADL 1.4 document, it is only shown in an example overview figure.

We are not using this feature much as yet = it is worthwhile and will become important with time.

Another feature is value reporting, which should work when we use several archetypes in an openEHR template. For example if some question was answered in one archetype, then another archetype that has the same question should get the value reported from the previous archetype. Is this possible? I guess this has to do with external references as I mentioned in my first question.

Again difficult to know what you mean = sounds like application space though.

We would also like to ask if there is a way of specifying validity for questions depending on previously answered questions. E.g. if a certain answer was given from a multiple alternative question (coded_text), then and only then, some other group of questions will be valid. Is this possible to do in archetypes? Perhaps it’s possible with invariants?

Perhaps = but we see this as application space unless it is an absolute fact - then it the other values could become mandatory based on the value of another value.

Finally is there a way of specifying the relevance of answers in archetypes. Say for example that if some laboratory results are too old, could an archetype contain some restrictions that make it illegal to answer certain questions because the material that the answers are based upon is too old? I’m not sure if this is related to DSS or something else.

Decision support or application.

It sounds as though you are starting to think about applications and decision support - it is tempting to push too much back into the information space at first but there are clear boundaries that arise from experience.

Cheers, Sam

I also think there is a need to support cacluated fields based on other fields in the archetype. It’s possible to express that with assertation, but it’s just for validation purpose. It would be nice to have the possibility to specify a node whose value is cacluated by a given algorithm on other exsiting values for presentation. Maybe it could be something for templates?

Cheers,
Rong

In een bericht met de datum 6-11-2006 15:57:47 West-Europa (standaardtijd), schrijft rong.acode@gmail.com:

I also think there is a need to support cacluated fields based on other fields in the archetype. It’s possible to express that with assertation, but it’s just for validation purpose. It would be nice to have the possibility to specify a node whose value is cacluated by a given algorithm on other exsiting values for presentation. Maybe it could be something for templates?

Cheers,
Rong

I believe that this is an important work in the area of OpenEHR and HL7 v3 harmonization. Many of the requested things can be organised in V3 spec and could contribute to OpenEHR materials vice versa.

William Goossen

2006/11/6, Sam Heard <sam.heard@oceaninformatics.biz>:

Hi Mattias

I’m currently working in a group that has been evaluating archetypes and they found out that there in archetypes may be needed to add external nodes from other archetypes instead of only adding complete archetypes as slots.

Not sure what you mean = only parts of archetypes e,g, Hb only from Blood count?

Hi Sam,

I will provide you with some examples from one of the group members.

Reusing nodes: It would be reusing single nodes from archetypes, as your example above, and here are two more examples.

Example 1. If the blood pressure measurement archetype allowed recording average 12h blood pressure (protocol) it would be important to be able to record the arousal state of the patient during the measurements (awake or asleep). This node (“state of arousal: awake / asleep”) would also be useful in an archetype for electroencephalographic results, and hence one could want to reuse it.

Example 2. If there is a blood pressure measurement observation archetype without the current treatment in the patients state, there must be another observation archetype to record the current treatment, because this information is mandatory to interpret blood pressure results. In this “current treatment” archetype, one could wish to record the pharmacological class of each hypertensive drug (quite long list). This list could be reused in a “treatment history” evaluation archetype, that would record when every drug has been started and stopped and why.

Is it possible, by one way or another, to reuse a single node defined in a first archetype when building another archetype? when building a template?

Does the current ADL specification allow that external parts from other archetypes can be included?

This is done in templates at present = need some examples

So I need to know if we could remove everything but a single node (ELEMENT) from for example an OBSERVATION slot.

I think the openEHR templates allow to cut off parts in a slot, but I’m not sure if they can exclude everything except a single item.

You can exclude all archetypes - again need more specificity!

Vide supra

The group also found out that there is a need to deduct certain answers depending on previously answered questions. For example if we previously answered that the blood pressure was above 160, then another question about hypertension should be answered automatically. Is this possible to do in archetypes?

I think this is application space - I do not think you can express this in an archetype…probably better if there is more detail.

Example:
If the blood creatine value is included an archetype, it could be useful to state that if the result is more than a given upper value, then the default value to the following boolean node “renal failure” has to be “yes”.

It might be that this always is in application space and probably a task of a template builder (user-interface business logic building).

Another feature is value reporting, which should work when we use several archetypes in an openEHR template. For example if some question was answered in one archetype, then another archetype that has the same question should get the value reported from the previous archetype. Is this possible? I guess this has to do with external references as I mentioned in my first question.
Again difficult to know what you mean = sounds like application space though.

Example:
In an observation archetype having the body weight as one of its nodes, it could be useful to state that the default value for this node is the last previously entered value through this same archetype or even through another archetype.

The latter might be easier to achieve in the runtime system if there could be some way of having external references (pointers) but archetypes could more easily be broken if they reference non-existing items. Anyway, this shall be dealt with on the user-interface level. For example, values could be linked together by some value map that has the related archetype paths that share values which allows the user-interface to know if values have been previously added (and when).

We would also like to ask if there is a way of specifying validity for questions depending on previously answered questions. E.g. if a certain answer was given from a multiple alternative question (coded_text), then and only then, some other group of questions will be valid. Is this possible to do in archetypes? Perhaps it’s possible with invariants?

Perhaps = but we see this as application space unless it is an absolute fact - then it the other values could become mandatory based on the value of another value.

Example:
It could be useful to state that the cluster node “smoking habits” is not valid (and not displayed to the user) if the value of the node (which doesn’t neccessarily have to reside within the cluster) “current smoker” is No.

Again, this can probably be considered as application space, but there seems to be a fine line between archetypes and application space for certain examples, such as this.

It sounds as though you are starting to think about applications and decision support - it is tempting to push too much back into the information space at first but there are clear boundaries that arise from experience.

Okay, thanks

Mattias

I’ll just provide some formal answers below.

Mattias Forss wrote:

Hi,

I’m currently working in a group that has been evaluating archetypes and they found out that there in archetypes may be needed to add external nodes from other archetypes instead of only adding complete archetypes as slots. Does the current ADL specification allow that external parts from other archetypes can be included? I think the openEHR templates allow to cut off parts in a slot, but I’m not sure if they can exclude everything except a single item.

  • by the use of slots, which you already know about. Use this when you want to define reusable semantic units (i.e. more archetypes). Archetypes and slots can be defined at any level - including at low levels. However, the downside is potentially “too many little archetypes” for effective management and governance
  • in some cases, most likely what is really needed is to be able to reduce the work required to build archetypes in the authoring tool environment - in other words cut and paste, or smarter things than that. So - what is smarter than cut and paste? We can consider that there are “archetype fragments” which are stored and indexed in a sophisticated authoring environment. These would not be separate archetypes as such - just pieces of archetypes that have been identified as re-usable in the authoring environment, but otherwise not sensible self-standing semantic units. Think about it this way - in some cases, you are not after another archetype, you just want to make sure that you build the little piece of the current archetype inn the same way as you did last time, without missing a term.

The group also found out that there is a need to deduct certain answers depending on previously answered questions. For example if we previously answered that the blood pressure was above 160, then another question about hypertension should be answered automatically. Is this possible to do in archetypes?

what can be theoretically be said in archetypes is statements of the following kind (using smaller paths than the real ones):

(exists (/path/to/bp/systolic/value) and /path/to/bp/systolic/value > 160) implies exists(/path/to/the/other/hypertension/data)

the first “exists” is only needed if the systolic value node is optional; the above statement in a real archetype would not necessarily be exactly as above, but the idea is clear. HOWEVER: in clinical terms, this sort of condition may not be considered as globally applicable as the rest of the archetype - it might only apply in your hospital. In this case, the same kind of statement should be added to a template instead.

Another issue is about computation. For example we could want a quantifiable magnitude to be the result of two previously entered values. Is this possible to do in archetypes? Perhaps in the declaration section or the invariant section?

this can also be done in the invariant section using a statement of the form:

exists(/path1/value) and exists(/path2/value) implies /path3/value = /path1/value + /path2/value

I’ve seen that these sections should contain some kind of first-order predicate logic, but I’m not sure of the scope and limitations/possibilities of these ADL sections. Also, the declaration section is actually not even described in the ADL 1.4 document, it is only shown in an example overview figure.

we are still considering how best to define this. No archetypes so far have needed it, but we expect they will.

Another feature is value reporting, which should work when we use several archetypes in an openEHR template. For example if some question was answered in one archetype, then another archetype that has the same question should get the value reported from the previous archetype. Is this possible? I guess this has to do with external references as I mentioned in my first question.

you normally would not allow this in the template if the values were meant to refer to the same thing (i.e. only entered once by the user); if this is not the case, you could add an invariant to the template.

We would also like to ask if there is a way of specifying validity for questions depending on previously answered questions. E.g. if a certain answer was given from a multiple alternative question (coded_text), then and only then, some other group of questions will be valid. Is this possible to do in archetypes? Perhaps it’s possible with invariants?

same general form as the first one, where the exists() quantifier can be used with operators like “implies” to state the required conditions.

Finally is there a way of specifying the relevance of answers in archetypes. Say for example that if some laboratory results are too old, could an archetype contain some restrictions that make it illegal to answer certain questions because the material that the answers are based upon is too old? I’m not sure if this is related to DSS or something else.

this sounds more like an application or DSS area. However, it would not be impossible to create invariants to do what you want - a typical example would be for microbiology test samples - the invariant could state that the sample date/time has to be within X days of $today. We don’t quite have all the variables defined for this yet, but it is not far off.

  • thomas beale

Hi Thomas,

Thank you very much for your answers. They were quite clear and easy to understand as they often are. I have some more questions below…

2006/11/7, Thomas Beale < Thomas.Beale@oceaninformatics.biz>:

I’ll just provide some formal answers below.

Mattias Forss wrote:

Hi,

I’m currently working in a group that has been evaluating archetypes and they found out that there in archetypes may be needed to add external nodes from other archetypes instead of only adding complete archetypes as slots. Does the current ADL specification allow that external parts from other archetypes can be included? I think the openEHR templates allow to cut off parts in a slot, but I’m not sure if they can exclude everything except a single item.

  • by the use of slots, which you already know about. Use this when you want to define reusable semantic units (i.e. more archetypes). Archetypes and slots can be defined at any level - including at low levels. However, the downside is potentially “too many little archetypes” for effective management and governance

Yes, too many small archetypes would probably make the archetypes hard to maintain etc.

  • in some cases, most likely what is really needed is to be able to reduce the work required to build archetypes in the authoring tool environment - in other words cut and paste, or smarter things than that. So - what is smarter than cut and paste? We can consider that there are “archetype fragments” which are stored and indexed in a sophisticated authoring environment. These would not be separate archetypes as such - just pieces of archetypes that have been identified as re-usable in the authoring environment, but otherwise not sensible self-standing semantic units. Think about it this way - in some cases, you are not after another archetype, you just want to make sure that you build the little piece of the current archetype inn the same way as you did last time, without missing a term.

Agree, but shouldn’t there be some way to link the “copies” with each other, because they will not be the same data if they don’t have the same archetype path? How should we know if we already entered similar values in another archetype, possibly even found in another template than the current one? There should be some way of linking values together. Can it be done at the template level or must it be done at an even higher level, i.e. in business logic of the GUI in the EHR system?

I will probably make it possible in the Java archetype editor to copy definition nodes between different instances of the program, but that is just a start. The ideal would be to support imports of nodes found in the definition of several selected archetypes…

the first “exists” is only needed if the systolic value node is optional; the above statement in a real archetype would not necessarily be exactly as above, but the idea is clear. HOWEVER: in clinical terms, this sort of condition may not be considered as globally applicable as the rest of the archetype - it might only apply in your hospital. In this case, the same kind of statement should be added to a template instead.

Yes, this condition would of course only be added in the template since it is not a global requirement (however there may be such also), but the invariants seem to have a lot of potential and would significantly aid decision support.

Another issue is about computation. For example we could want a quantifiable magnitude to be the result of two previously entered values. Is this possible to do in archetypes? Perhaps in the declaration section or the invariant section?

this can also be done in the invariant section using a statement of the form:

exists(/path1/value) and exists(/path2/value) implies /path3/value = /path1/value + /path2/value

Though it certainly is useful, this is only to constrain the allowed value and not to compute it. Some business logic in the EHR system would have to use the invariant to compute the allowed value so that the clinician doesn’t have to do that (and risk to enter the wrong value and break the data entry process if the value is invalid according to the archetype).

I also noticed that archetypes may become ambiguous by using invariants. For example if the cADL says that the value must be > 10 and the invariant says that the value is 5. I guess there is a need for an archetype validator that checks all kinds of things, conformance to RM class names and attributes, existing codes in the ontology section, invariants conforming to cADL, etc, etc.

Another feature is value reporting, which should work when we use several archetypes in an openEHR template. For example if some question was answered in one archetype, then another archetype that has the same question should get the value reported from the previous archetype. Is this possible? I guess this has to do with external references as I mentioned in my first question.

you normally would not allow this in the template if the values were meant to refer to the same thing (i.e. only entered once by the user); if this is not the case, you could add an invariant to the template.

What if the values should refer to the same thing across different templates, that uses different archetypes? How should the values be linked then, can invariants still solve that?

We would also like to ask if there is a way of specifying validity for questions depending on previously answered questions. E.g. if a certain answer was given from a multiple alternative question (coded_text), then and only then, some other group of questions will be valid. Is this possible to do in archetypes? Perhaps it’s possible with invariants?

same general form as the first one, where the exists() quantifier can be used with operators like “implies” to state the required conditions.

Does this mean that the invariant allows something like “path/to/coded_text/defining_code = at0003 implies /some/path[atNNNN] occurrences.min = 1” can be used for the group of questions (cluster) we want to be valid?

Finally is there a way of specifying the relevance of answers in archetypes. Say for example that if some laboratory results are too old, could an archetype contain some restrictions that make it illegal to answer certain questions because the material that the answers are based upon is too old? I’m not sure if this is related to DSS or something else.

this sounds more like an application or DSS area. However, it would not be impossible to create invariants to do what you want - a typical example would be for microbiology test samples - the invariant could state that the sample date/time has to be within X days of $today. We don’t quite have all the variables defined for this yet, but it is not far off.

Okay, it seems to me that many invariants could be added at a local template level to aid basic decision support. This is quite interesting.

Regards,

Mattias

2006/11/8, Mattias Forss <mattias.forss@gmail.com>:

We would also like to ask if there is a way of specifying validity for questions depending on previously answered questions. E.g. if a certain answer was given from a multiple alternative question (coded_text), then and only then, some other group of questions will be valid. Is this possible to do in archetypes? Perhaps it’s possible with invariants?

same general form as the first one, where the exists() quantifier can be used with operators like “implies” to state the required conditions.

Does this mean that the invariant allows something like “path/to/coded_text/defining_code = at0003 implies /some/path[atNNNN] occurrences.min = 1” can be used for the group of questions (cluster) we want to be valid?

Oops, I meant it probably should be something like:

invariant
exists(/some/path[atNNNN]) implies path/to/coded_text/defining_code = at0003

//Mattias

Mattias Forss wrote:

        * in some cases, most likely what is really needed is to be
          able to reduce the work required to build archetypes in the
          authoring tool environment - in other words cut and paste,
          or smarter things than that. So - what is smarter than cut
          and paste? We can consider that there are "archetype
          fragments" which are stored and indexed in a sophisticated
          authoring environment. These would not be separate
          archetypes as such - just pieces of archetypes that have
          been identified as re-usable in the authoring environment,
          but otherwise not sensible self-standing semantic units.
          Think about it this way - in some cases, you are not after
          another archetype, you just want to make sure that you build
          the little piece of the current archetype inn the same way
          as you did last time, without missing a term.

Agree, but shouldn't there be some way to link the "copies" with each
other, because they _will not_ be the same data if they don't have the
same archetype path? How should we know if we already entered similar
values in another archetype, possibly even found in another template
than the current one? There should be some way of linking values
together. Can it be done at the template level or must it be done at
an even higher level, i.e. in business logic of the GUI in the EHR system?

not sure what you mean here. If I make a copy of a piece of an archetype
that is in some "archetype fragment library" into archetype A and
archetype B, these two archetypes will have the correct archetype paths
according to where the fragment was put. When you say "data" and
"values" are you talking about when the archetypes are used at runtime
to create EHR data?

I will probably make it possible in the Java archetype editor to copy
definition nodes between different instances of the program, but that
is just a start. The ideal would be to support imports of nodes found
in the definition of several selected archetypes...

it might - but I wouldn't rush with too much new functionality. There
are other priorities in my opinion, such as:

    * getting a testing programme going, and getting user feedback
    * connecting the editor to openEHR and other terminologies (such as
      an instance of the Ocean Terminology Server, designed specifically
      for archetype linking to Snomed and other terminologies)

    the first "exists" is only needed if the systolic value node is
    optional; the above statement in a real archetype would not
    necessarily be exactly as above, but the idea is clear. HOWEVER:
    in clinical terms, this sort of condition may not be considered as
    globally applicable as the rest of the archetype - it might only
    apply in your hospital. In this case, the same kind of statement
    should be added to a template instead.

Yes, this condition would of course only be added in the template
since it is not a global requirement (however there may be such also),
but the invariants seem to have a lot of potential and would
significantly aid decision support.

they will, but they are harder to process - we need to get more people
using the tools for now with the basic functionality, and invariants
developing more slowly as the user community starts to understand what
it really wants to do with them.

    Another issue is about computation. For example we could want a
    quantifiable magnitude to be the result of two previously entered
    values. Is this possible to do in archetypes? Perhaps in the
    declaration section or the invariant section?

    this can also be done in the invariant section using a statement
    of the form:

        exists(/path1/value) and exists(/path2/value) implies
    /path3/value = /path1/value + /path2/value

Though it certainly is useful, this is only to constrain the allowed
value and not to compute it. Some business logic in the EHR system
would have to use the invariant to compute the allowed value so that
the clinician doesn't have to do that (and risk to enter the wrong
value and break the data entry process if the value is invalid
according to the archetype).

this is usually correct.

I also noticed that archetypes may become ambiguous by using
invariants. For example if the cADL says that the value must be > 10
and the invariant says that the value is 5. I guess there is a need
for an archetype validator that checks all kinds of things,
conformance to RM class names and attributes, existing codes in the
ontology section, invariants conforming to cADL, etc, etc.

it just means that there cannot be mutually incompatible constraints on
a given node - which is one reason why invariants require more careful
implementation.

Another feature is value reporting, which should work when we use
several archetypes in an openEHR template. For example if some
question was answered in one archetype, then another archetype that
has the same question should get the value reported from the previous
archetype. Is this possible? I guess this has to do with external
references as I mentioned in my first question.

    you normally would not allow this in the template if the values
    were meant to refer to the same thing (i.e. only entered once by
    the user); if this is not the case, you could add an invariant to
    the template.

What if the values should refer to the same thing across different
templates, that uses different archetypes? How should the values be
linked then, can invariants still solve that?

I think the application will have to solve this, possibly by keeping
track of which template paths have already had values entered for them...

    We would also like to ask if there is a way of specifying
    validity for questions depending on previously answered
    questions. E.g. if a certain answer was given from a multiple
    alternative question (coded_text), then and only then, some other
    group of questions will be valid. Is this possible to do in
    archetypes? Perhaps it's possible with invariants?

    same general form as the first one, where the exists() quantifier
    can be used with operators like "implies" to state the required
    conditions.

Does this mean that the invariant allows something like
"path/to/coded_text/defining_code = at0003 implies /some/path[atNNNN]
occurrences.min = 1" can be used for the group of questions (cluster)
we want to be valid?

yes, although the predicate logic would be more like:
path/to/coded_text_attr/defining_code = [local::at0003] implies exists
(/some/path[atNNNN])

    Finally is there a way of specifying the relevance of answers in
    archetypes. Say for example that if some laboratory results are
    too old, could an archetype contain some restrictions that make
    it illegal to answer certain questions because the material that
    the answers are based upon is too old? I'm not sure if this is
    related to DSS or something else.

    this sounds more like an application or DSS area. However, it
    would not be impossible to create invariants to do what you want -
    a typical example would be for microbiology test samples - the
    invariant could state that the sample date/time has to be within X
    days of $today. We don't quite have all the variables defined for
    this yet, but it is not far off.

Okay, it seems to me that many invariants could be added at a local
template level to aid basic decision support. This is quite interesting.

it is the pandora's box of archetypes :wink:

- thomas

Hi Thomas,

2006/11/12, Thomas Beale <Thomas.Beale@oceaninformatics.biz>:

Mattias Forss wrote:

  • in some cases, most likely what is really needed is to be
    able to reduce the work required to build archetypes in the
    authoring tool environment - in other words cut and paste,
    or smarter things than that. So - what is smarter than cut
    and paste? We can consider that there are “archetype
    fragments” which are stored and indexed in a sophisticated
    authoring environment. These would not be separate
    archetypes as such - just pieces of archetypes that have
    been identified as re-usable in the authoring environment,
    but otherwise not sensible self-standing semantic units.
    Think about it this way - in some cases, you are not after
    another archetype, you just want to make sure that you build
    the little piece of the current archetype inn the same way
    as you did last time, without missing a term.

Agree, but shouldn’t there be some way to link the “copies” with each
other, because they will not be the same data if they don’t have the
same archetype path? How should we know if we already entered similar
values in another archetype, possibly even found in another template
than the current one? There should be some way of linking values
together. Can it be done at the template level or must it be done at
an even higher level, i.e. in business logic of the GUI in the EHR system?
not sure what you mean here. If I make a copy of a piece of an archetype
that is in some “archetype fragment library” into archetype A and
archetype B, these two archetypes will have the correct archetype paths
according to where the fragment was put. When you say “data” and
“values” are you talking about when the archetypes are used at runtime
to create EHR data?

Archetype A and archetype B will have ‘correct archetype paths according to where the fragment was put’, but will they refer to the same paths? When I talked about data I meant what was stored in the EHR system and when I talked about values I meant what was entered in the template.

I tried to ask if there is some way to make two or more archetypes manipulate exactly the same data in an EHR system, meaning that the archetypes probably must refer to the same paths - otherwise the data will be manipulated at different places and the system must know that the data at the different places are actually the same. Consider this example:

Archetype A is used in a template to create data about a patient’s weight and archetype B is used in another template and will also create data about the weight. However, if the weight data was already entered in the EHR system, is there a way (to create archetypes) which make the system know that it deals with the same data no matter if it came from archetype A or archetype B and fetch the last entered value to any of the templates that need the weight information?

I will probably make it possible in the Java archetype editor to copy
definition nodes between different instances of the program, but that
is just a start. The ideal would be to support imports of nodes found
in the definition of several selected archetypes…
it might - but I wouldn’t rush with too much new functionality. There
are other priorities in my opinion, such as:

  • getting a testing programme going, and getting user feedback
  • connecting the editor to openEHR and other terminologies (such as
    an instance of the Ocean Terminology Server, designed specifically
    for archetype linking to Snomed and other terminologies)

Yes, of course there are more important things like these to prioritise first.

Yes, this condition would of course only be added in the template
since it is not a global requirement (however there may be such also),
but the invariants seem to have a lot of potential and would
significantly aid decision support.
they will, but they are harder to process - we need to get more people
using the tools for now with the basic functionality, and invariants
developing more slowly as the user community starts to understand what
it really wants to do with them.

Agree. I also must point out that I meant data entry support above, and not decision support.

Another feature is value reporting, which should work when we use
several archetypes in an openEHR template. For example if some
question was answered in one archetype, then another archetype that
has the same question should get the value reported from the previous
archetype. Is this possible? I guess this has to do with external
references as I mentioned in my first question.

you normally would not allow this in the template if the values
were meant to refer to the same thing (i.e. only entered once by
the user); if this is not the case, you could add an invariant to
the template.

I meant if we use two different templates, i.e. values are not entered in the same template. Please see the weight example above.

Regards,

Mattias

Hi Thomas,

2006/11/12, Thomas Beale <Thomas.Beale@oceaninformatics.biz >:

Mattias Forss wrote:

  • in some cases, most likely what is really needed is to be
    able to reduce the work required to build archetypes in the
    authoring tool environment - in other words cut and paste,
    or smarter things than that. So - what is smarter than cut
    and paste? We can consider that there are “archetype
    fragments” which are stored and indexed in a sophisticated
    authoring environment. These would not be separate
    archetypes as such - just pieces of archetypes that have
    been identified as re-usable in the authoring environment,
    but otherwise not sensible self-standing semantic units.
    Think about it this way - in some cases, you are not after
    another archetype, you just want to make sure that you build
    the little piece of the current archetype inn the same way
    as you did last time, without missing a term.

Agree, but shouldn’t there be some way to link the “copies” with each
other, because they will not be the same data if they don’t have the
same archetype path? How should we know if we already entered similar
values in another archetype, possibly even found in another template
than the current one? There should be some way of linking values
together. Can it be done at the template level or must it be done at
an even higher level, i.e. in business logic of the GUI in the EHR system?
not sure what you mean here. If I make a copy of a piece of an archetype
that is in some “archetype fragment library” into archetype A and
archetype B, these two archetypes will have the correct archetype paths
according to where the fragment was put. When you say “data” and
“values” are you talking about when the archetypes are used at runtime
to create EHR data?

Archetype A and archetype B will have ‘correct archetype paths according to where the fragment was put’, but will they refer to the same paths? When I talked about data I meant what was stored in the EHR system and when I talked about values I meant what was entered in the template.

I tried to ask if there is some way to make two or more archetypes manipulate exactly the same data in an EHR system, meaning that the archetypes probably must refer to the same paths - otherwise the data will be manipulated at different places and the system must know that the data at the different places are actually the same. Consider this example:

Archetype A is used in a template to create data about a patient’s weight and archetype B is used in another template and will also create data about the weight. However, if the weight data was already entered in the EHR system, is there a way (to create archetypes) which make the system know that it deals with the same data no matter if it came from archetype A or archetype B and fetch the last entered value to any of the templates that need the weight information?

I am not sure if it’s safe to allow cross-use of internal archetype nodes for data entering. A better approach in my view is to separate the common archetype node into a standalone archetype and include it in other archetype or template.

For read-only purpose, DV_EHR_URI is perhaps a solution.

Cheers,
Rong

Mattias

I’m currently working in a group that has been evaluating archetypes and they found out that there in archetypes may be needed to add external nodes from other archetypes instead of only adding complete archetypes as slots.

Not sure what you mean = only parts of archetypes e,g, Hb only from Blood count?

Hi Sam,

I will provide you with some examples from one of the group members.

Reusing nodes: It would be reusing single nodes from archetypes, as your example above, and here are two more examples.

Example 1. If the blood pressure measurement archetype allowed recording average 12h blood pressure (protocol) it would be important to be able to record the arousal state of the patient during the measurements (awake or asleep). This node (“state of arousal: awake / asleep”) would also be useful in an archetype for electroencephalographic results, and hence one could want to reuse it.

These state data (not protocol) are probably reusable although highly specific at times - so that the idea of awake or asleep for BP might change to a lot of different states for EEG.

Example 2. If there is a blood pressure measurement observation archetype without the current treatment in the patients state, there must be another observation archetype to record the current treatment, because this information is mandatory to interpret blood pressure results. In this “current treatment” archetype, one could wish to record the pharmacological class of each hypertensive drug (quite long list). This list could be reused in a “treatment history” evaluation archetype, that would record when every drug has been started and stopped and why.

Medication orders are recorded using the Instruction class - administration using the Action class. These provide the attributes you seek and are not state variables for BP. They need to be displayed with the BP if someone wants to see what the impact of treatment is.

Is it possible, by one way or another, to reuse a single node defined in a first archetype when building another archetype? when building a template?

It is possible to archetype an element and reuse it, although we are trying to minimise this approach. The problem is, when such an element is used in a number of places, more specific requirements may well arise in different places and so the element is changed - this may have major implications for all archetypes using the element. If all findings with the state set to sleeping needed to be found, then we could argue that reuse had major benefits - if not, then it is unlikely to be the case.

Does the current ADL specification allow that external parts from other archetypes can be included?

This is done in templates at present = need some examples

So I need to know if we could remove everything but a single node (ELEMENT) from for example an OBSERVATION slot.

The archetype editor(s) do not allow a single element to be archetyped at present - when it is required we can do this. It will mean we have to add slots to the archetype using this element.

I think the openEHR templates allow to cut off parts in a slot, but I’m not sure if they can exclude everything except a single item.

You can exclude all archetypes - again need more specificity!

Vide supra

The group also found out that there is a need to deduct certain answers depending on previously answered questions. For example if we previously answered that the blood pressure was above 160, then another question about hypertension should be answered automatically. Is this possible to do in archetypes?

I think this is application space - I do not think you can express this in an archetype…probably better if there is more detail.

Example:
If the blood creatine value is included an archetype, it could be useful to state that if the result is more than a given upper value, then the default value to the following boolean node “renal failure” has to be “yes”.

This is decision support - I do not believe such knowledge should be expressed in an archetype. I think you are trying to do too much with archetypes!

It might be that this always is in application space and probably a task of a template builder (user-interface business logic building).

Another feature is value reporting, which should work when we use several archetypes in an openEHR template. For example if some question was answered in one archetype, then another archetype that has the same question should get the value reported from the previous archetype. Is this possible? I guess this has to do with external references as I mentioned in my first question.
Again difficult to know what you mean = sounds like application space though.

Example:
In an observation archetype having the body weight as one of its nodes, it could be useful to state that the default value for this node is the last previously entered value through this same archetype or even through another archetype.

Again, I would leave this to the application space - such practices will definitely lead to inaccuracies!

The latter might be easier to achieve in the runtime system if there could be some way of having external references (pointers) but archetypes could more easily be broken if they reference non-existing items. Anyway, this shall be dealt with on the user-interface level. For example, values could be linked together by some value map that has the related archetype paths that share values which allows the user-interface to know if values have been previously added (and when).

Agree

We would also like to ask if there is a way of specifying validity for questions depending on previously answered questions. E.g. if a certain answer was given from a multiple alternative question (coded_text), then and only then, some other group of questions will be valid. Is this possible to do in archetypes? Perhaps it’s possible with invariants?

Perhaps = but we see this as application space unless it is an absolute fact - then it the other values could become mandatory based on the value of another value.

Example:
It could be useful to state that the cluster node “smoking habits” is not valid (and not displayed to the user) if the value of the node (which doesn’t neccessarily have to reside within the cluster) “current smoker” is No.

Again I would see this as behaviour and not archetype domain knowledge. We have a number of requests for this sort of behaviour and are experimenting with this at the level of data entry forms.

Again, this can probably be considered as application space, but there seems to be a fine line between archetypes and application space for certain examples, such as this.

There is a fine line - behaviours are not archetypes in my view - probably not templates either. Time will tell us more, though when you only have archetypes it is tempting to push too much into this space.

Cheers, Sam

Hi Matiass,

Mattias Forss wrote:

Archetype A and archetype B will have 'correct archetype paths
according to where the fragment was put', but will they refer to the
same paths? When I talked about data I meant what was stored in the
EHR system and when I talked about values I meant what was entered in
the template.

I tried to ask if there is some way to make two or more archetypes
manipulate exactly the same data in an EHR system, meaning that the
archetypes probably must refer to the same paths - otherwise the data
will be manipulated at different places and the system must know that
the data at the different places are actually the same. Consider this
example:

Archetype A is used in a template to create data about a patient's
weight and archetype B is used in another template and will also
create data about the weight. However, if the weight data was already
entered in the EHR system, is there a way (to create archetypes) which
make the system know that it deals with the same data no matter if it
came from archetype A or archetype B and fetch the last entered value
to any of the templates that need the weight information?

Ah, I understand where you are coming from now. Archetypes and templates
don't know anything about which data instances they have created; it is
the other way round. A given template could be used to create 20
measurements of weight of the patient, which might be reasonable if the
patient happens to be an infant, the measurements might be every few
weeks from birth for say 18 months. The data of each of those 20
measurements (Observations inside distinct Compositions) knows that such
and such an archetype and template was used to create the data. So if
the application retrieves one of the older measurements, the kernel will
know which archetypes and template to apply, However, this would not
occur unless someone was correcting wrongly entered values; normally
previous data are just viewed, e.g. in a graph or similar, which doesn't
require the kernel, just archetype-aware display components.

There is also a question of whether certain data could be compatible
with more than one template or archetype. It can certainly be compatible
with more than one template, since templates re-use archetypes. It can
also be used with parents of specialised archetypes. We have already
tested ,more generic archetypes (and no archetypes) being used with data
archetyped with specific specialised archetypes, and it works fine for
display.

does this help?

- thomas

2006/11/13, Rong Chen <rong.acode@gmail.com>:

I am not sure if it’s safe to allow cross-use of internal archetype nodes for data entering. A better approach in my view is to separate the common archetype node into a standalone archetype and include it in other archetype or template.

For read-only purpose, DV_EHR_URI is perhaps a solution.

Good answer Rong. There should probably only exist one archetype for data creation of specific nodes and URIs can be used to get certain values if needed, for example if the BMI is entered with another template that uses weight data of a patient. However, some archetype authors might not understand this idea and must probably be trained in archetype modeling. The higher quality archetypes there exist, the better the EHR systems will perform.

Mattias

2006/11/13, Thomas Beale <Thomas.Beale@oceaninformatics.biz>:

Hi Matiass,

Mattias Forss wrote:

Archetype A and archetype B will have ‘correct archetype paths
according to where the fragment was put’, but will they refer to the
same paths? When I talked about data I meant what was stored in the
EHR system and when I talked about values I meant what was entered in
the template.

I tried to ask if there is some way to make two or more archetypes
manipulate exactly the same data in an EHR system, meaning that the
archetypes probably must refer to the same paths - otherwise the data
will be manipulated at different places and the system must know that
the data at the different places are actually the same. Consider this
example:

Archetype A is used in a template to create data about a patient’s
weight and archetype B is used in another template and will also
create data about the weight. However, if the weight data was already
entered in the EHR system, is there a way (to create archetypes) which
make the system know that it deals with the same data no matter if it
came from archetype A or archetype B and fetch the last entered value
to any of the templates that need the weight information?
Ah, I understand where you are coming from now. Archetypes and templates
don’t know anything about which data instances they have created; it is
the other way round. A given template could be used to create 20
measurements of weight of the patient, which might be reasonable if the
patient happens to be an infant, the measurements might be every few
weeks from birth for say 18 months. The data of each of those 20
measurements (Observations inside distinct Compositions) knows that such
and such an archetype and template was used to create the data. So if
the application retrieves one of the older measurements, the kernel will
know which archetypes and template to apply, However, this would not
occur unless someone was correcting wrongly entered values; normally
previous data are just viewed, e.g. in a graph or similar, which doesn’t
require the kernel, just archetype-aware display components.

Yes, I knew that. There seems to be some options when archetypes need to reference the same kind of information to be entered in an EHR, e.g . slots, specialisations, etc. Some EHR data should probably be limited to be created in only one archetype if it’s concerning the same finding context in a domain. In addition, if data spreads over several areas of findings, single nodes from archetypes should probably not be reused and instead they should exist in several archetypes since finding procedures may change in certain domains and make the originally referenced nodes incompatible.

Regards,

Mattias

Mattias Forss wrote:

Yes, I knew that. There seems to be some options when archetypes need
to reference the same kind of information to be entered in an EHR, e.g
. slots, specialisations, etc. Some EHR data should probably be
limited to be created in only one archetype if it's concerning the
same finding context in a domain. In addition, if data spreads over
several areas of findings, single nodes from archetypes should
probably not be reused and instead they should exist in several
archetypes since finding procedures may change in certain domains and
make the originally referenced nodes incompatible.

this is our experience so far, and we have to learn (as technical
people) to really trust the experience of clinical people, not think we
know too much about real archetypes. The vision of archetypes is really
about empowering domain users, and sometimes it can feel odd to be told
we engineers don't quite know what we are talking about. I see it as a
sign of a successful future for information systems development.

- thomas