GUI-hints in openEHR templates? (Was: PatientOS archetype to form demo (of sorts))

I am with you on that layers are important and keep the approach more
simple in the long time. As Heather pointed out, we have to be very
careful not to distract the clinicians with GUI fluff from clean
modelling. But for review and testing there is no doubt, that a real
GUI is of value. At the moment the Ocean Template Desinger does both
using the "one tool, two artefacts" approach, and as Thomas wrote it
will become better based on the NHS CUI project. The "one tool, two
artefacts" approach is good as it lets clinicians build and adapt
runnable GUIs from their authored templates, but also shows that there
can be many possible GUIs created from one template.

Having a set of core template tags and several extensions (for
GUI/message/... hints) is more a technical design choice for better
manageability and doesn't interfere with the layers (separation is
done via namespaces). Templates are mostly local artefacts and GUIs
even more so. So, as Rong said, theses markup-extensions will only be
there to ease local implementation. E.g. Ocean could have used such an
extension to create the previously mentioned Hide_in_GUI-Hint in a
clean way separated from the core template model.

Regarding Greg's comment on problems with the visibility of a certain
field: IMHO openEHR should not try to standardise GUIs (meaning
sharing GUI hints or presentation artefacts). This is a huge task and
we have enough problems solving what we are working on right now. But
I can picture a system that scaffolds a basic editable GUI based on
unknown openEHR data (provided it has access to the underlying
archetypes). This scaffolded view could then be adapted by the local
user, and the next time this user tries to access similar openEHR data
(meaning same archetypes in the same structure/order) the local system
remembers it and the customised view is used to display and edit the
data. Customisation could even go as far as choosing certain GUI
components (per archetype or per aggregated archetypes) from a
(shared!) library... But this is still all implementation specific and
not part of the openEHR specs.

Cheers, Thilo

As counsel for a trade group many years ago, I watched a committee work
long, earnestly, and hard to develop a proposal for a standardized set
of paper forms for claim notices. When that committee subsequently was
asked to review the adequacy of a set of draft EDIFACT messages to
communicate the same information content, they had a very difficult
time separating the information from its presentation.

They were neither stupid nor uncommitted to the effort; their input
was both indispensable to success and immediately useful for the
developers. But for them, IT was something of a single cloud. It took a
while for them to distinguish between the separate problems of (a)
signing off on inter-company data sufficiency and (b) implementing and
presenting that data on their respective internal systems. And while
these people were volunteers in a sense, getting this done was part of
their jobs and had the full backing of their employers. But if their
input governed the back-end design and development, there would have
been no progress. It was successful (or not) project management to get
their involvement in the right amounts at the right times.

Without any qualifications whatsoever to offer a judgment on this, I
see a development interplay among three groups: the clinicians, the
developers of the underlying structure, and the designers of
implementing systems. (My guess is that's an obvious and seriously
non-profound observation.) Aside from a long anecdote, it strikes me
that UI decisions should be kept as separate as possible from any of
the underlying structure; that presumption could be rebutted where an
identified UI need can't otherwise be satisfied. Of course, at some
level that's a nullity because the UI needs really define the structure
design.

As simple as possible can be quite complex. It's amazing what's been
accomplished.

Greg Harris

Hi All,
This extension idea is used in XForms in a similar manner. In fact this
extension mechanism is actually something that I played with 18 months ago
to represent AOM constraints of data associated with each form control
expressed in XForms. I shelved this approach due to the complexity of
implement this approach. I would be interested in revisiting this again
with the aid of the community.

However, Rong is proposing the opposite, having form extensions within the
template. This could be viable.

The other consideration I had when I objected internally to the Hide-on-form
attribute provided by the Ocean Template Designer, was to have a separate
section within the template for form definition details. This again is
borrowed from XForms where it has the multiple sections including the Model
(similar to template definition but in an instance form, although you can
also reference an XML schema in XForms I believe), and View (form
definition).

Heath

From: openehr-technical-bounces@openehr.org [mailto:openehr-technical-
bounces@openehr.org] On Behalf Of Thilo Schuler
Sent: Friday, 27 June 2008 10:12 PM
To: For openEHR technical discussions
Subject: Re: GUI-hints in openEHR templates? (Was: PatientOS archetype to

form

demo (of sorts))

Very interesting - maybe we could have seperate namespaces for the
core tags and extensions. Could be a good compromise! While I see the
advantages of keeping GUI stuff out of the template, I also see that
this more and more complicated as we add additional abstraction
layers.

> Hi all,
>
> My thoughts on this is so far our experience with templates are mostly
> related to screen forms and GUI widgets. It's probably easiest to relate

to

> screens when engage clinicians for templates reviewing, hence the need

for

> visual presentation of templates from the NHS work.
>
> We also want to reuse the semantics in templates to generate messages,
> reports etc. The question is how much 'generic' semantics can be reused

from

> the templates built for specific purpose - screen templates, message
> templates and report templates. Surely the content for all types of
> templates will be quite different and we probably would like to have

special

> syntax to support GUI hints, but do we need special syntax to support

other

> uses? How about indicators for decision support, clinical research data

and

> information lifecycle management?
>
> I am thinking about an extendable markup language that can be plugged

into

> the core template language as a way to add extensions to templates if

there

> is any application specific meta-data required. I am also in favour of

the

> idea to store these extra meta-data inside the templates to ease the
> maintenance. When passing these templates around, the template engines

can

> ignore the extended markup and only process the standard part if they

don't

> recognize the extended syntax.
>
> Something like
>
> <gui_markup_plugin>
> <hide_in_GUI path="..."/>
> <hide_in_GUI path="..."/>
> </gui_markup_plugin>
>
>
> Cheers,
> Rong
>
>
>>
>> Would also want GUI things like "hide_in_GUI" to be in a separate
>> artifact on top of a template. It is good to hear that Ocean only did
>> that as quick fix to meet customers requirements, which is very
>> plausible.
>>
>> As mentioned before templates are great to initially SCAFFOLD a GUI,
>> which has to be further adapted by humans for the best possible
>> usability results (use-case and device specific). This allows
>> verification of the templates and archetypes from a user point of view
>> and is very important as Richard pointed out.
>>
>> I can understand Josinas comments about clinicians not caring about
>> the difference between semantics and GUI stuff, so a tool like the
>> Template Designer should hide this important separation, where
>> appropriate.
>>
>> Thilo
>>
>> > Hi Erik
>> >
>> > Personally, I don't think that templates should contain GUI rendering
>> > hints
>> > as they should remain purely about the semantics. There are others

that

>> > don't agree with me. The "hide on form" function in the Template
>> > designer
>> > was partly to meet requirements for documentation of the templates

for

>> > some
>> > groups using this technology. I am not sure if the hide_in_ui

parameter

>> > is
>> > going to make it into the final template spec - Tom will have

something

>> > to
>> > say about that.
>> >
>> > Personally, I think that there should be some other artifact that
>> > details
>> > GUI specs - if we mix up the two things, then the purpose of the
>> > template
>> > becomes confused. Templates can be used for everything from GUI, to
>> > data
>> > instance, persistance and query. If we add a whole lot of parameters
>> > around
>> > GUI, then we will also probably need to add specific things for these
>> > other
>> > uses and it might get very messy.
>> >
>> > regards Hugh
>> >
>> > Erik Sundvall wrote:
>> >
>> > Hi!
>> >
>> >
>> >
>> > Thanks to the java reference implementation I have a demo of

importing

>> > archetypes to auto generate forms which have the references to the
>> > archetype.
>> >
>> >
>> > Nice. Keep up the good work.
>> >
>> >
>> >
>> > One thing I noticed in the conversion that I don't have any way of
>> > distinguishing between a line of text and multiline text in the
>> > archetype (I would generate an appropriate pane in the latter case).
>> > Perhaps not a big deal.
>> >
>> >
>> > This might be a useful requirement for the current template
>> > specification currently being worked on, or possibly a new kind of
>> > related specification.
>> >
>> > I first thought that templates so far had been considered as purely
>> > specifying semantics and that they were not supposed to give hints
>> > regarding GUI rendering. But now I see a parameter "hide_in_ui" in

the

>> > class T_COMPLEX_OBJECT found in the draft template specification. (A
>> > similar function is present in the Template Designer tool from Ocean
>> > Informatics there is an option to "hide" elements instead of
>> > constraining them to zero occurrence, in the output file this is
>> > persisted as hide_on_form="true".) Could anybody detail it's intended
>> > use a bit more?
>> >
>> > I think GUI rendering hints can be appropriate to specify at the same
>> > point in time as template design is taking place. If the hints are to
>> > be persisted in the template file or in a separate file I guess could
>> > be discussed, keeping it in the file could have maintenance
>> > advantages, but probably has some disadvantages too. Thoughts? (And
>> > no, GUI hints are not appropriate in Archetypes since they are meant
>> > to have a wider reuse and the use cases are not known in the same
>> > detail as for templates.)
>> >
>> > In some of our implementation experiments and in discussions with
>> > clinicians a possible need for specifying detail levels in templates
>> > have surfaced. Some elements from archetypes are easy to completely
>> > dismiss or include for the specific use case in mind when designing a
>> > template clinicians will say things like "this will always be needed"
>> > or "this will never be needed". Other things could be conditional and
>> > trickier "you can't have all these details om the form - users would
>> > go crazy - let them show up if i click a plus-button or if i tick
>> > value x was true".
>> >
>> > The requirement to use GUI screen area optimally is even more

pressing

>> > when using small input devices such as PDAs.
>> >
>> > If there was some way of specifying detail level in the template
>> > perhaps using a simple integer (0=default, 1..n=deeper detail with
>> > increasing number) then the same template could better support
>> > automated or semi-automated design of entry forms different screen
>> > sizes etc. One naive/simple but useful way of using the integer could
>> > be to add a "plus-button" for things with detail level 1 and within
>> > that subform have further plus buttons for level 2 and so on.
>> >
>> > The "conditional" requirements are trickier and probably needs more
>> > experimentation and evaluation than can be allowed if a first

template

>> > specification should be completed and released within reasonable time
>> > (we all want that). The conditions might also in some cases better be
>> > specified in decision support or workflow than in templates. Also a
>> > look at the previous work with gradually expanding forms in
>> > Clinergy/Pen&Pad should be considered, I believe they were partly

auto

Hi Thilo,
It is interesting you have talked about the idea of scaffolding a GUI. This
is exactly the work Ocean is doing at present. We have redeveloped our Web
Forms engine to work based on this principle. From a template developed
using the Ocean template Designer, we now generate a Form Definition file
based on that template using a basic (and modifiable) presentation
transformation. This assumes nothing about layout and only specifies the
existence of controls within groups and incorporate the AOM constraints for
the corresponding data bound object from the reference model. This gives
forms engine all the information it needs to generate a basic form at
runtime straight from a template. The advantage of having this form
definition over simply creating a form straight from the template/archetype
as demonstrated by Greg is that we can use the same artefact to customise
the layout of the form using an editor. The forms engine can then process
both designed (after initial scaffolding) and auto-generated forms as
required. The Forms Definition format we are currently using is
proprietary, but I would be interested give some time and reason to see how
we can import/export into a standard format such as XForms. However, I am
sceptical about the use of XForms unless we utilise extensions significantly
otherwise we lose way too much information available in the AOM constraints.

Heath

From: openehr-technical-bounces@openehr.org [mailto:openehr-technical-
bounces@openehr.org] On Behalf Of Thilo Schuler
Sent: Friday, 27 June 2008 8:00 PM
To: For openEHR technical discussions
Subject: Re: GUI-hints in openEHR templates? (Was: PatientOS archetype to

form

demo (of sorts))

Would also want GUI things like "hide_in_GUI" to be in a separate
artifact on top of a template. It is good to hear that Ocean only did
that as quick fix to meet customers requirements, which is very
plausible.

As mentioned before templates are great to initially SCAFFOLD a GUI,
which has to be further adapted by humans for the best possible
usability results (use-case and device specific). This allows
verification of the templates and archetypes from a user point of view
and is very important as Richard pointed out.

I can understand Josinas comments about clinicians not caring about
the difference between semantics and GUI stuff, so a tool like the
Template Designer should hide this important separation, where
appropriate.

Thilo

> Hi Erik
>
> Personally, I don't think that templates should contain GUI rendering

hints

> as they should remain purely about the semantics. There are others that
> don't agree with me. The "hide on form" function in the Template

designer

> was partly to meet requirements for documentation of the templates for

some

> groups using this technology. I am not sure if the hide_in_ui parameter

is

> going to make it into the final template spec - Tom will have something

to

> say about that.
>
> Personally, I think that there should be some other artifact that

details

> GUI specs - if we mix up the two things, then the purpose of the

template

> becomes confused. Templates can be used for everything from GUI, to

data

> instance, persistance and query. If we add a whole lot of parameters

around

> GUI, then we will also probably need to add specific things for these

other

Hi!

Thanks for a lot of interesting response regarding "GUI-hints" and other things.

Please excuse a little left-to-right analogy below:
There seems too be a scale or spectrum of detail level and use case
specificity going from...
Left: purely semantic (maximum data set) models = archetypes
...via the nearby...
openEHR templates (still purely semantic if we skip the "hide_in_ui"
to keep the template artifacts)
...further far away to...
Right: actual GUI in an implemented system with specific widgets positioning etc

Currently openEHR specifications describe artifacts at the "left" side
of the spectrum. This discussion has interestingly been broadened
further to the "right" than I was thinking of in my initial questions.
If we look at a tool like the Template Designer from Ocean Informatics
there is an immediate jump from templates (close to the left) to
detailed GUI layout (far right), that jump could be divided into more
steps (possibly with some steps persisted and reusable) as suggested
by some in this discussion.

I don't think that templates should contain GUI rendering hints
as they should remain purely about the semantics.

...

Personally, I think that there should be some other artifact that details
GUI specs - if we mix up the two things, then the purpose of the template
becomes confused. Templates can be used for everything from GUI, to data
instance, persistance and query.

I agree with Hugh - I would push back very strongly on the concept of
UI hints in the template definitions.

*I think it will be one tool that writes two artefacts, one of which is
GUI 'hints'.

These comments seem very reasonable, could we then conclude that the
"hide_in_ui" and similar GUI-hints should not be in the template spec
and that we instead can continue discussion regarding other artifacts
with GUI-related information that might be reusable between
implementations.

I'd make the point that everyone always thinks that given enough hints
computers will be able to intelligently lay out interface components (not
just in openehr world - I have seen this in many UI projects). Invariably,
the autogenerated interfaces are the exception rather than the rule - by
that, I mean that the autogenerated interfaces can be made useful but
most real users end up preferring an interface layout designed explicitly
by a human being.

I agree (except to "everyone always"). In most cases explicitly
layouted interfaces will be preferred, due to aesthetics, optimal use
of screen real estate etc. That's why I wrote "automated or
_semi-automated_ design".

Consider a use case where you at a national level want to standardize
parts of the information capture in for example yearly diabetes
check-up visits in primary care in order to do statistics, data mining
etc. Also consider that a couple of parts will be added or modified on
approximately a yearly basis to improve the follow up process and
incorporate new treatments etc. Add to this that you have five openEHR
compliant vendors with hundreds of separate system installations
across the nation.

The openEHR approach with archetypes and templates facilitate the
semantic parts of the above scenario very well and the yearly updates
of archetypes and templates can be loaded into the (purely semantic
part) system more or less with the push of a button. But what happens
on the GUI side of things? Will that always have to wait for manual
layout before the new archetypes and templates can start to be used in
clinical practice? How fast will that happen? Some vendors and
customers will certainly have the resources to swiftly incorporate the
changes but many others will experience considerable delay and would
in the meantime have to resort to either keep using the old forms and
semantics (thus loosing ability to capture data using the new national
standars) or use general GUIs based on templates only (probably not so
nice and efficient - driving clinicians crazy).

Maybe this was just a way of restating Sebastians comment...

in my opinion it is
i) important to have some form of "GUI layout descriptions" that really enable
smart GUI generation in the long run. If not, the whole automatic process
stops just before the GUI, which is not really the best we can do in the long
run I think.

When manually designing the GUIs, the designers (from every vendor)
need to capture the user requirements in discussions with users, this
is often done in several iterations of discussion and redesign. If we
could capture at least some the common clinical GUI-related
requirements in a machine readable form at an early stage we could
achieve some benefits:
1. You could get a better "scaffolding" as a start in design tools
than you would get from templates only, thus decreasing the manual
design time needed in the scenario above.
2. You might be able to reduce the number of cycles of discussion and
redesign above.
3. For cases where you would need to resort to automated GUI
generation in the scenario (e.g. awaiting manual design or for very
unusual things that your organisation does want to pay manual design
for) you would be able to auto-generate a somewhat better GUI than
using templates only (thus driving clinicians slightly less crazy).

Machine readable requirements for some parts of course do not exclude
usage of narrative forms GUI-requirement documents (or possibly
included comments in some other artifact as suggested by Josina)
coordinated at a national level and some of the listed benefits above
could be achieved with narrative descriptions also. And yes some local
GUI-adaptation/optimization and workflow integration will still be
needed and can not all be done at a national level.

Some good points regarding the risk of confusion when mixing
discussions about semantics and layout were given:

The clinicians
creating templates (as with archetypes) need to have training and a
special understanding of what is at stake.

If the clinicians designing archetypes/templates do not care about the
difference between semantics and GUI stuff then they are they wrong
clinicians to be designing archetypes and templates.

In designing a website we know that if you want input about navigation, then
don't have any meaningful content or GUI hints available or almost certainly
all the feedback will be about the size or color of the button and the font
and position of the heading.

(ES: I believe we mean different things when using the term "GUI hints".)

Similarly my concern in designing templates and getting the content reviewed
appropriately is that as soon as you add interface/GUI features to make it
more 'intuitive' to the clinicians their focus goes immediately to that
which is more familiar. That is, the feedback tends to be related to their
user interface experience (naturally gained from their day-to-day use of
their current clinical system) rather than actually critiquing which
archetypes have been used, which data fields are presented, and all their
associated attributes, cardinality, constraints and related metadata etc
etc.

So my preferred response (and from positive experience) is to spend a
relatively small amount of time to educate the clinicians on how to feedback
appropriately and meaningfully on the pure archetypes and templates - we
have done this successfully, but I suggest it is probably optimal if a
clinician involved in the design (perhaps a health informatician with a leg
in 'both camps') to walk them thru the models and to make it a sensible
conversation. It is my opinion that the GUI design and review should be
completely separate to the content design and review - mixing the two gets
very confusing.

Interesting observations. Is this the same when working with templates
as with archetypes? When trying to capture the essential semantics of
a maximum dataset during archetype design I fully understand the above
reasoning and experiences. Thoughts about GUIs are just distracting
then.

I obviously did not explain clearly what I meant by GUI-hints. What I
was thinking of was a bit more towards the "left" side of the spectrum
trying to capture some some of the "semantics" of the
human-computer-interaction when entering the things described by
templates. I was not thinking of colors, fonts, detailed component
placement etc. Instead I'm thinking of things like:
- Greg's suggestion that one could specify whether a text node in a
template will likely be short (e.g. a name) or if it is more likely to
be a paragraph that would benefit from a multiline-type of text entry
widget.
- In a long template that also includes a section about "tobacco use"
you might want to specify that the detailed parts regarding amount of
consumption don't need to be shown if the person has been documented
with the status "Never used". (I.e. implemented using simple
conditional statements).
- In the a particular use case in mind you might want to assign the
the subtree "Consumption, Amount of substance" a higher priority in
GUIs than the "Previous attempts to quit smoking" subtree so that the
latter gets pushed to a normally hidden collapsed/hidden subform if
there is a lack of space. (I.e. using a detail level mechanism)
- Mechanisms like "hide_in_ui" to skip intermediate things that are
meaningful in information modelling but are distracting or unnecessary
in a GUI.

As you can see these things have a bit of a semantic touch also, but
maybe a different kind of semantics than we usually refer to as
semantics in this community.

When it comes to template design it would be interesting to know if
the clinicians always are comfortable only having the on/off (set zero
occurrence) of templates (or are there more restrictions available)?
Don't you get a lot of "it depends"-answers whether to include
something in a template or not? Do you believe that answers what to
"kill" from (for the use case) overly detailed archetypes templates
would be different if the clinicians are aware of the possibilities to
change priorities, set conditional statements etc?

I don't suggest that these hints necessarily should be created
simultaneously with the template editing, but I guess that the very
same clinical experts that design the template would be also good
candidates to give some GUI-hints after the template creation.
Thoughts?

When it comes to what I call GUI-hints above I believe it would be
useful to specify a model (like the with the AM) and one or many
serialization formats of it rather than going straight for a markup
language. Artifacts built using that model could then be used for auto
generation of GUIs (whenever that is necessary) and as input to other
steps specifying things more to the "right" in the spectrum like
dealing with specific widgets, component positioning etc. for example
as more intelligent scaffolding in manual editing environments than
pure templates would be. More towards that right side one of the ways
could be to go for markup-things such as xforms. To dig deper into
such a more specific layer at the same time as researching a more
general GUI-hint-layer might be a good idea. (I guess the interrelated
AM and RM have been researched simultaneously for example in order to
find good boundaries...)

ii) However, it is important to keep this separate from templates. For
example, to be able to display what is in a template on different devices
ranging from normal to computers via PDAs to potentially your mobile phone,
different GUI principles may apply. So essentially to me this sound like it is
1 template to n "GUI layout descriptions".

The 1 template to n GUI-hint-artifacts principle seems reasonable. (A
side note regarding different GUI principles: it would be interesting
to see if/how the GUI-"semantic" hints like the ones above could map
to different principles/paradigms)

I am with you on that layers are important and keep the approach more
simple in the long time.

Yes.

Regarding Greg's comment on problems with the visibility of a certain
field: IMHO openEHR should not try to standardise GUIs (meaning
sharing GUI hints or presentation artefacts). This is a huge task and
we have enough problems solving what we are working on right now.

The value of what to start experiments regarding how to "standardise"
right now depends on what one happens to be working on right now :slight_smile: I
don't suggest that for example Ocean Informatics would need to be
pioneering everything if they have other important things to focus on.
I do believe that there right now might be an interesting time for
some of us in the community to start investigating the possibilities
to share some kind(s) of artifacts assisting in GUI creation and
maintenance across system implementations.

Something that makes this task less "huge" than it would be in a
general software setting is that we're dealing with a fixed AM and RM
and a specific application area.

One last thing...

... there are more semantic indicators being built
into the template designer, some based on the NHS CUI project, that will
provide good hints on GUI generation, including some temporal workflow
aspects.

Are these things or the principles behind them something you can and
would like to like detail a bit more or share with the community when
time permits?

Best regards,
Erik Sundvall
Linköping University, Sweden
erisu@imt.liu.se http://www.imt.liu.se/~erisu/ Tel: +46-13-227579

My spectrum:

  • Archetypes (generic documentation patterns)
  • Templates (context dependent documentation patterns)
  • Generic User Interfaces (generic presentation patterns)
  • User Interface (context dependent presentation patterns)

Gerard

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

T: +31 252544896
M: +31 620347088
E: gfrer@luna.nl

Those who would give up essential Liberty, to purchase a little temporary
Safety, deserve neither Liberty nor Safety. Benjamin Franklin 11 Nov 1755

Is it true that there are two types of templates: generic ones like 'lab
request' (which contains a combination of several archetypes), and a
further constrained version for local usage?
If so, this might mean that clinicians that are trained in openEHR could
design the first kind of templates (like Heather Leslie proposed); while
'local' clinicians will decide in (I believe, but correct me if I'm
wrong: preferably) one and the same session about the local template and
UI features.
Or, are templates generally speaking too specific to local practice (so
that each template has to be designed locally) to make the above
distinction?

Josina

Gerard Freriks schreef:

The Generic User Interfaces, i.e. the GUI_hints that are a bit more towards the “left” side of the spectrum described by Eric Sundvall, would be archetype specific rather than template specific. I personally think these generic GUI-hints should be processed by a generic form engine that understands archetypes only. For example, if tobacco use status value is “Never used”, which is local coded text in the substance_use archetype, the “Method” cluster can be hidden from the form. This generic GUI_hint can be applied to all templates or user interfaces. A more specific form engine is required for context specific user interfaces.

Cheers,

Chunlan

Hi Josina,

My comments about 'pure' and 'pragmatic' modelling were regarding archetypes
rather than templates.

It is the archetypes that need governance to support interoperability, and
in general for this we need a 'purer' approach. But there are times when an
archetype can be built for a specific local purpose for which there is no
need to share, or something practical and purpose-driven like the (now
famous) example of the Barthel index - utilizing a more pragmatic approach.

Templates don't need governance in quite the same way. It is true that
anyone can build any template for any purpose, and as long as they use
widely accepted/agreed archetypes then the template can achieve its purpose.
Hence governance for archetypes is the key.

But in a practical sense, a discharge summary and a prescription and an
antenatal consultation all have very similar component archetypes wherever
they might be used. It would make sense that we don't have every ward in
every hospital in every country create a discharge summary template from
scratch. That would be duplicating work in a hugely inefficient way. So
templates - so that a hospital might take an existing discharge summary
template and then each ward or consultant can use this as the basis for
their own preferred way of representing patient discharge data.

I definitely don't think we will get agreement on 'THE discharge summary
template' - and we will not be seeking to do so. However I will be seeking
to collect examples of 'good' templates in use from diverse use-cases,
domains and geographical locations so that these can potentially be shared
and adapted for local use. This is proposed as (not too far in the) future
functionality for the openEHR knowledge repository.

Hope this helps

Heather

[mailto:openehr-technical-bounces@openehr.org] On Behalf Of J.P. Freriks

Thats a really good summary Erik - can we get this on the wiki?

Erik Sundvall wrote:

Erik Sundvall wrote:

I obviously did not explain clearly what I meant by GUI-hints. What I
was thinking of was a bit more towards the "left" side of the spectrum
trying to capture some some of the "semantics" of the
human-computer-interaction when entering the things described by
templates. I was not thinking of colors, fonts, detailed component
placement etc. Instead I'm thinking of things like:
- Greg's suggestion that one could specify whether a text node in a
template will likely be short (e.g. a name) or if it is more likely to
be a paragraph that would benefit from a multiline-type of text entry
widget.
- In a long template that also includes a section about "tobacco use"
you might want to specify that the detailed parts regarding amount of
consumption don't need to be shown if the person has been documented
with the status "Never used". (I.e. implemented using simple
conditional statements).
- In the a particular use case in mind you might want to assign the
the subtree "Consumption, Amount of substance" a higher priority in
GUIs than the "Previous attempts to quit smoking" subtree so that the
latter gets pushed to a normally hidden collapsed/hidden subform if
there is a lack of space. (I.e. using a detail level mechanism)
- Mechanisms like "hide_in_ui" to skip intermediate things that are
meaningful in information modelling but are distracting or unnecessary
in a GUI.
  
most of the above are part of the CUI design ideas in the NHS, and I
agree, are more 'semantic'. I think of them as 'workflow' semantics,
rather than data semantics. They are a logical concept that could be
implemented in presentation in more than one way. The conditionality
idea (Erik's 2nd point above) is included in the new template /
specialised archetype specification. Some things like the priority have
not yet been considered (even by the CUI group) but probably need to be.
As you can see these things have a bit of a semantic touch also, but
maybe a different kind of semantics than we usually refer to as
semantics in this community.

When it comes to template design it would be interesting to know if
the clinicians always are comfortable only having the on/off (set zero
occurrence) of templates (or are there more restrictions available)?
Don't you get a lot of "it depends"-answers whether to include
something in a template or not? Do you believe that answers what to
"kill" from (for the use case) overly detailed archetypes templates
would be different if the clinicians are aware of the possibilities to
change priorities, set conditional statements etc?
  
hence the need to add conditionality to the template spec;-)

I don't suggest that these hints necessarily should be created
simultaneously with the template editing, but I guess that the very
same clinical experts that design the template would be also good
candidates to give some GUI-hints after the template creation.
Thoughts?

When it comes to what I call GUI-hints above I believe it would be
useful to specify a model (like the with the AM) and one or many
serialization formats of it rather than going straight for a markup
language.

some of these hints will be covered by the new specialised archetype /
template model. but some are not yet. I wonder if we can construct a
definitive list?

Artifacts built using that model could then be used for auto
generation of GUIs (whenever that is necessary) and as input to other
steps specifying things more to the "right" in the spectrum like
dealing with specific widgets, component positioning etc. for example
  

I think this is true as well...

One last thing...

... there are more semantic indicators being built
into the template designer, some based on the NHS CUI project, that will
provide good hints on GUI generation, including some temporal workflow
aspects.
    
Are these things or the principles behind them something you can and
would like to like detail a bit more or share with the community when
time permits?
  
as far as I know the CUI group's work is not secret; we have been given
a list of about 10 things they want to see in a GUI, but I have to admit
I have not even checked to see if this is on the relevant website. We
need to find that out and make it public if it is not.

- thomas beale

See short note inline

Hi!

Thanks for a lot of interesting response regarding "GUI-hints" and other things.

Please excuse a little left-to-right analogy below:
There seems too be a scale or spectrum of detail level and use case
specificity going from...
Left: purely semantic (maximum data set) models = archetypes
...via the nearby...
openEHR templates (still purely semantic if we skip the "hide_in_ui"
to keep the template artifacts)
...further far away to...
Right: actual GUI in an implemented system with specific widgets positioning etc

Currently openEHR specifications describe artifacts at the "left" side
of the spectrum. This discussion has interestingly been broadened
further to the "right" than I was thinking of in my initial questions.
If we look at a tool like the Template Designer from Ocean Informatics
there is an immediate jump from templates (close to the left) to
detailed GUI layout (far right), that jump could be divided into more
steps (possibly with some steps persisted and reusable) as suggested
by some in this discussion.

I don't think that templates should contain GUI rendering hints
as they should remain purely about the semantics.

...

Personally, I think that there should be some other artifact that details
GUI specs - if we mix up the two things, then the purpose of the template
becomes confused. Templates can be used for everything from GUI, to data
instance, persistance and query.

I agree with Hugh - I would push back very strongly on the concept of
UI hints in the template definitions.

*I think it will be one tool that writes two artefacts, one of which is
GUI 'hints'.

These comments seem very reasonable, could we then conclude that the
"hide_in_ui" and similar GUI-hints should not be in the template spec
and that we instead can continue discussion regarding other artifacts
with GUI-related information that might be reusable between
implementations.

I'd make the point that everyone always thinks that given enough hints
computers will be able to intelligently lay out interface components (not
just in openehr world - I have seen this in many UI projects). Invariably,
the autogenerated interfaces are the exception rather than the rule - by
that, I mean that the autogenerated interfaces can be made useful but
most real users end up preferring an interface layout designed explicitly
by a human being.

I agree (except to "everyone always"). In most cases explicitly
layouted interfaces will be preferred, due to aesthetics, optimal use
of screen real estate etc. That's why I wrote "automated or
_semi-automated_ design".

Consider a use case where you at a national level want to standardize
parts of the information capture in for example yearly diabetes
check-up visits in primary care in order to do statistics, data mining
etc. Also consider that a couple of parts will be added or modified on
approximately a yearly basis to improve the follow up process and
incorporate new treatments etc. Add to this that you have five openEHR
compliant vendors with hundreds of separate system installations
across the nation.

The openEHR approach with archetypes and templates facilitate the
semantic parts of the above scenario very well and the yearly updates
of archetypes and templates can be loaded into the (purely semantic
part) system more or less with the push of a button. But what happens
on the GUI side of things? Will that always have to wait for manual
layout before the new archetypes and templates can start to be used in
clinical practice? How fast will that happen? Some vendors and
customers will certainly have the resources to swiftly incorporate the
changes but many others will experience considerable delay and would
in the meantime have to resort to either keep using the old forms and
semantics (thus loosing ability to capture data using the new national
standars) or use general GUIs based on templates only (probably not so
nice and efficient - driving clinicians crazy).

Maybe this was just a way of restating Sebastians comment...

in my opinion it is
i) important to have some form of "GUI layout descriptions" that really enable
smart GUI generation in the long run. If not, the whole automatic process
stops just before the GUI, which is not really the best we can do in the long
run I think.

When manually designing the GUIs, the designers (from every vendor)
need to capture the user requirements in discussions with users, this
is often done in several iterations of discussion and redesign. If we
could capture at least some the common clinical GUI-related
requirements in a machine readable form at an early stage we could
achieve some benefits:
1. You could get a better "scaffolding" as a start in design tools
than you would get from templates only, thus decreasing the manual
design time needed in the scenario above.
2. You might be able to reduce the number of cycles of discussion and
redesign above.
3. For cases where you would need to resort to automated GUI
generation in the scenario (e.g. awaiting manual design or for very
unusual things that your organisation does want to pay manual design
for) you would be able to auto-generate a somewhat better GUI than
using templates only (thus driving clinicians slightly less crazy).

Machine readable requirements for some parts of course do not exclude
usage of narrative forms GUI-requirement documents (or possibly
included comments in some other artifact as suggested by Josina)
coordinated at a national level and some of the listed benefits above
could be achieved with narrative descriptions also. And yes some local
GUI-adaptation/optimization and workflow integration will still be
needed and can not all be done at a national level.

Some good points regarding the risk of confusion when mixing
discussions about semantics and layout were given:

The clinicians
creating templates (as with archetypes) need to have training and a
special understanding of what is at stake.

If the clinicians designing archetypes/templates do not care about the
difference between semantics and GUI stuff then they are they wrong
clinicians to be designing archetypes and templates.

In designing a website we know that if you want input about navigation, then
don't have any meaningful content or GUI hints available or almost certainly
all the feedback will be about the size or color of the button and the font
and position of the heading.

(ES: I believe we mean different things when using the term "GUI hints".)

Similarly my concern in designing templates and getting the content reviewed
appropriately is that as soon as you add interface/GUI features to make it
more 'intuitive' to the clinicians their focus goes immediately to that
which is more familiar. That is, the feedback tends to be related to their
user interface experience (naturally gained from their day-to-day use of
their current clinical system) rather than actually critiquing which
archetypes have been used, which data fields are presented, and all their
associated attributes, cardinality, constraints and related metadata etc
etc.

So my preferred response (and from positive experience) is to spend a
relatively small amount of time to educate the clinicians on how to feedback
appropriately and meaningfully on the pure archetypes and templates - we
have done this successfully, but I suggest it is probably optimal if a
clinician involved in the design (perhaps a health informatician with a leg
in 'both camps') to walk them thru the models and to make it a sensible
conversation. It is my opinion that the GUI design and review should be
completely separate to the content design and review - mixing the two gets
very confusing.

Interesting observations. Is this the same when working with templates
as with archetypes? When trying to capture the essential semantics of
a maximum dataset during archetype design I fully understand the above
reasoning and experiences. Thoughts about GUIs are just distracting
then.

I obviously did not explain clearly what I meant by GUI-hints. What I
was thinking of was a bit more towards the "left" side of the spectrum
trying to capture some some of the "semantics" of the
human-computer-interaction when entering the things described by
templates. I was not thinking of colors, fonts, detailed component
placement etc. Instead I'm thinking of things like:
- Greg's suggestion that one could specify whether a text node in a
template will likely be short (e.g. a name) or if it is more likely to
be a paragraph that would benefit from a multiline-type of text entry
widget.
- In a long template that also includes a section about "tobacco use"
you might want to specify that the detailed parts regarding amount of
consumption don't need to be shown if the person has been documented
with the status "Never used". (I.e. implemented using simple
conditional statements).
- In the a particular use case in mind you might want to assign the
the subtree "Consumption, Amount of substance" a higher priority in
GUIs than the "Previous attempts to quit smoking" subtree so that the
latter gets pushed to a normally hidden collapsed/hidden subform if
there is a lack of space. (I.e. using a detail level mechanism)
- Mechanisms like "hide_in_ui" to skip intermediate things that are
meaningful in information modelling but are distracting or unnecessary
in a GUI.

As you can see these things have a bit of a semantic touch also, but
maybe a different kind of semantics than we usually refer to as
semantics in this community.

When it comes to template design it would be interesting to know if
the clinicians always are comfortable only having the on/off (set zero
occurrence) of templates (or are there more restrictions available)?
Don't you get a lot of "it depends"-answers whether to include
something in a template or not? Do you believe that answers what to
"kill" from (for the use case) overly detailed archetypes templates
would be different if the clinicians are aware of the possibilities to
change priorities, set conditional statements etc?

I don't suggest that these hints necessarily should be created
simultaneously with the template editing, but I guess that the very
same clinical experts that design the template would be also good
candidates to give some GUI-hints after the template creation.
Thoughts?

When it comes to what I call GUI-hints above I believe it would be
useful to specify a model (like the with the AM) and one or many
serialization formats of it rather than going straight for a markup
language. Artifacts built using that model could then be used for auto
generation of GUIs (whenever that is necessary) and as input to other
steps specifying things more to the "right" in the spectrum like
dealing with specific widgets, component positioning etc. for example
as more intelligent scaffolding in manual editing environments than
pure templates would be. More towards that right side one of the ways
could be to go for markup-things such as xforms. To dig deper into
such a more specific layer at the same time as researching a more
general GUI-hint-layer might be a good idea. (I guess the interrelated
AM and RM have been researched simultaneously for example in order to
find good boundaries...)

ii) However, it is important to keep this separate from templates. For
example, to be able to display what is in a template on different devices
ranging from normal to computers via PDAs to potentially your mobile phone,
different GUI principles may apply. So essentially to me this sound like it is
1 template to n "GUI layout descriptions".

The 1 template to n GUI-hint-artifacts principle seems reasonable. (A
side note regarding different GUI principles: it would be interesting
to see if/how the GUI-"semantic" hints like the ones above could map
to different principles/paradigms)

I am with you on that layers are important and keep the approach more
simple in the long time.

Yes.

Regarding Greg's comment on problems with the visibility of a certain
field: IMHO openEHR should not try to standardise GUIs (meaning
sharing GUI hints or presentation artefacts). This is a huge task and
we have enough problems solving what we are working on right now.

The value of what to start experiments regarding how to "standardise"
right now depends on what one happens to be working on right now :slight_smile: I
don't suggest that for example Ocean Informatics would need to be
pioneering everything if they have other important things to focus on.
I do believe that there right now might be an interesting time for
some of us in the community to start investigating the possibilities
to share some kind(s) of artifacts assisting in GUI creation and
maintenance across system implementations.

Something that makes this task less "huge" than it would be in a
general software setting is that we're dealing with a fixed AM and RM
and a specific application area.

Great post Erik.

Don't get me wrong, I would love to have standardised rightish
artifacts and you argumented well regarding their advantages.

The reson I was sceptical is that if we want to solve too many things
generically it gets very complicated and not much will happen at all.
Therefore your suggestion: fixed RM and AM plus a specific (relatively
small) application area or set of use cases is a good simplified
starting point.

-Thilo

The advantage of deriving generic user interfaces only from data
instances and the underlying archetypes (without knowing the template)
is the possibility to edit unknown openEHR data, although the GUI
would be simple. Thus, I agree with Chunlan on the position of a
generic GUIs on Erik's spectrum.

-Thilo

This was an strategy we used in our implementation and it worked very
well: associate GUI-hints to archetypes and allow for someone to
override the hints on specific templates, if needed.

We decided to do that because, after observing the hints that field
specialists associated to the same archetype in different templates, we
realized that most of the time the hints were the same and could be reused.

So, I agree with your position.

Fabiane

Thilo Schuler wrote:

Hi all,

As some of you know I am interested in XForms and would love to be
part of this community effort if and when it starts.

Currently I am co-supervising two thesis students working on a project
the uses XForms, Grails, and IBM DB2 similar to this
http://www.ibm.com/developerworks/xml/library/x-xformsruby1/index.html
(but Grails instead of Rails). The goal of the project is to have a
generic form-based documentation framework for medical data. Obviously
in the longterm I have openEHR data in mind. I don't think we will get
as far as auto-generating XForms GUIs for openEHR data, but I hope we
can hand-code a XForms GUI for the chronic wound use case I have been
building several archetypes and one template for.

To speed up the XForms hand-coding I plan to use the IBM XForms
Generator (http://www.alphaworks.ibm.com/tech/xfg) to scaffold an
initial form, which obviously needs to be customised a lot to
respresent as many of the archetype and template constraints as
possible. After submission of the instance it will be additionally
checked against the whole template data schema (TDS) on the
server-side.

I did a first test of this generator. For more details look on the
wiki: http://www.openehr.org/wiki/display/dev/IBM+XForms+Generator+Test

Cheers, Thilo