ADL to XML Schema

Hello everybody,

We're working at University of Zaragoza (Spain) on a EHR system. We
want to conform to 13606 and make use of ADL-based archetypes. We are
just starting and we have lots of doubts about how to implement and
apply all concepts. These are our questions:

- How 13606 is applied to built ADL archetypes? Is it already possible?
- Is it possible to obtain a XML-Schema based on 13606 from an ADL file?
- Is ADL parser in openEHR site the only one to make use of it?

We hope that someone can show us the way... Thanks. Sorry for our "spanglish"!

Regards,

Alfonso Mata
University of Zaragoza, Spain

Hi Alfonso

I can answer one of your questions for certain and am not very sure about another one.

Alfonso Mata wrote:

- Is it possible to obtain a XML-Schema based on 13606 from an ADL file?

You can obtain an XML representation of the ADL Archetype from the Archetype Editor but not an XML Schema. Atleast not at the moment. However Im trying to write out a schema based on the UML Archetype Object Model. Its not proving to be an easy task is all I can say ! I've done one version of the schema but its far from perfect to generate a sensible XML. If you are interested in doing some work on this we could collaborate.

- Is ADL parser in openEHR site the only one to make use of it?

Making use of what ? Sorry didnt quite understand.

Rahil

Thanks Rahil,

I mean, is there another parser available with similar features?

Alfonso Mata
University of Zaragoza, Spain

Rahil Qamar wrote:

Hi Alfonso

I can answer one of your questions for certain and am not very sure about another one.

Alfonso Mata wrote:

- Is it possible to obtain a XML-Schema based on 13606 from an ADL file?

You can obtain an XML representation of the ADL Archetype from the Archetype Editor but not an XML Schema. Atleast not at the moment. However Im trying to write out a schema based on the UML Archetype Object Model. Its not proving to be an easy task is all I can say ! I've done one version of the schema but its far from perfect to generate a sensible XML. If you are interested in doing some work on this we could collaborate.

There are some less heavy ways of doing XML rule checking that
avoid most of the irrational intricacies of the W3C Schema.
Did you ever explore
Jim Clark's RelaxNG for schema validation of XML structures,
and
Schematron for rules involving Co-occurance relationships.

That might be a way to go.

Alfonso Mata wrote:

Thanks Rahil,

I mean, is there another parser available with similar features?

The ADL Parser is, as far as I am aware, the only one with parsing capabilities. I think there is some work being done by people in Sweden which might be close. However the official version is the ADL Parser released by the openEHR community.

Rahil

Gavin Brelstaff wrote:

Rahil Qamar wrote:

You can obtain an XML representation of the ADL Archetype from the Archetype Editor but not an XML Schema. Atleast not at the moment. However Im trying to write out a schema based on the UML Archetype Object Model. Its not proving to be an easy task is all I can say ! I've done one version of the schema but its far from perfect to generate a sensible XML. If you are interested in doing some work on this we could collaborate.

There are some less heavy ways of doing XML rule checking that
avoid most of the irrational intricacies of the W3C Schema.
Did you ever explore
Jim Clark's RelaxNG for schema validation of XML structures,
and
Schematron for rules involving Co-occurance relationships.

No I havent looked into this but it seems like some good stuff to look into.

Thanks
Rahil

Hi Rahil and Alfonso,

We have developed an ADL parser that generates instance of archetype model. The parser is based on javaCC and we use it to create archetypes for runtime use.

We plan to release it under open source license after our open source openehr kernel implementation is announced by openEHR together with new release of specifications. The reason is that the parser has some dependency to the kernel code.

Best regards,
Rong

Rong Chen
Acode HB, Sweden
http://www.acode.se

Rahil Qamar wrote:

I've been looking at schematron for doing the "equivalent" of archetype in
a more general situation, particularly since there as been no ADL parser
available in Java. Schematron seems to be reasonably popular for
enforcing rules for XML data structures and there is a variety of software
available for using it.

Dave

Hi Alfonso

Have just returned from an all-day meeting on archetypes and I think Ill be able to answer your first question as well now.

Alfonso Mata wrote:

- How 13606 is applied to built ADL archetypes? Is it already possible?

The latest draft of EN13606 archetypes is due to be reviewed by various standards bodies and then released as a standard by 2006. The archetypes being built at the moment conform to the CEN EHR model and are in ADL syntax. A place to look at for more reading material on the standards and where archetypes stand at the moment is http://www.openehr.org/standards/t_cen.htm . Im sure others on the mailing list might have more inputs on possible reading sources.

And yeah, its already possible. However older versions of arhcetypes are still being used in some applications. The way forward really is to work with the latest version of archetypes. Check out some sample archetypes on http://www.oceaninformatics.biz/ (browse through the section on 'Looking for archetypes?')

Hope this helps
Rahil

David W. Forslund

Good to see you sniffing around! The key issue for us in ADL is that Eiffel is not UNICODE compliant. There will be a number of Java parsers soon, and I hope a JAVA archetype editor.

I am interested in what you can do with Schematron as well as another implementation route....keep me up to speed.

Cheers, Sam

Dear Sam, etal,

I wonder if the specialised schema approach for archetypes is one that
openEHR should encourage. Not so much discourage the investigation but at
least indicate to those who are going down this route that previous work by
Ocean and DSTC has indicated that the approach is not workable in a dual
layer model approach. Perhaps the more useful task is to find a suitable
schema for ADL if this has not already been done for which archetype
definitions can be validated against, not instances.

Perhaps it should be encouraged to use some existing schema's such as OWL
but again this is representing the archetype definition not the archetype
instance.

Perhaps, the DSTC approach to represent archetypes using XML with a XML
schema for the Archetype Model should be endorsed by openEHR if this is the
preferred approach so people don't waste their time and develop a
proliferation of approaches which are likely to be incompatible or at least
require translation.

What would be better use of peoples time would be the investigation of an
archetype instance validating parser that uses the XML document representing
the archetype definition similar to an XML validating parser uses xml schema
(which is also an XML document).

The reason we need to have an XML document represent the archetype is
because of the dual layer model approach where the XML schema is used at the
reference model level and an xml instance can't have two associated schemas
for validation for each level. However, from my understanding (which is
limited), this is not an issue in some of these other schema systems like
Schematron and RelaxNG, so it might be useful for people to investigate
these if they really want to represent archetypes as XML schema's but
knowing that traditional parsers and XML tools will not support this due to
the dual layer model approach.

Regards

Heath

What I would like to do is automatically translate from an ADL description
to a schematron description. Hopefully, this is semantically possible.

Dave

Dave

I am not familiar with Schematron. I have had a look on the web, at some tutorials etc - and it is available in the Oxygen editor that I use. Generally the openEHR approach has been to apply archetypes to the reference model in memory. This works well and is proven.

What you are proposing, as far as I can see, might lead to a schema for a composition - where the schema met both the archetype constraints and the reference model schema.

It will be relatively easy to test this with something like the blood pressure archetype. At the moment I can only give you XML data that fit the RM schema - the archetype constraints are only expressed in our in memory objects. I enclose the archetype and data for your information.

If we could spit out a schema based on a template (a composition built from a set of archetypes) and express the constraints in the archetype, this would be well received. It would mean that standard compositions, like a discharge summary or a laboratory report, could be expressed as XML schema + Schematron.

I believe this is worth investigating.

Cheers, Sam

David W. Forslund wrote:

(attachments)

openEHR-EHR-OBSERVATION.blood_pressure.v1.adl (15.8 KB)
BloodPressure.xml (3.22 KB)

Sam Heard wrote:

Dave

I am not familiar with Schematron. I have had a look on the web, at some tutorials etc - and it is available in the Oxygen editor that I use. Generally the openEHR approach has been to apply archetypes to the reference model in memory. This works well and is proven.

What you are proposing, as far as I can see, might lead to a schema for a composition - where the schema met both the archetype constraints and the reference model schema.

It will be relatively easy to test this with something like the blood pressure archetype. At the moment I can only give you XML data that fit the RM schema - the archetype constraints are only expressed in our in memory objects. I enclose the archetype and data for your information.

If we could spit out a schema based on a template (a composition built from a set of archetypes) and express the constraints in the archetype, this would be well received. It would mean that standard compositions, like a discharge summary or a laboratory report, could be expressed as XML schema + Schematron.

I believe this is worth investigating.

I'll check into this as time permits but would appreciate it if others do the same. It seems to me that the Schematron could be used to express an ADL constraint although perhaps not quite as elegantly.

Dave

Hi,

without much knowledge of Schematron, I believe it is good for
expressing validation rules, but I wonder if it can actually be used to
express calculations, like the BMI or the Barthel Index (sum of the
score of 10 values).

I'm currently looking at XQuery that can do such things.

Bye, Helma

Schematron supports at least some calculations, but probably not elaborate ones. I'm not sure what
is needed here. The sume of the score of 10 values is something that it can do:
http://www.zvon.org/xxl/SchematronTutorial/Examples/Example13/example.html
although I'm not sure about floating point (which is added in XSL 2.0, I believe)

Dave
Linden H van der (MI) wrote:

Alfonso Mata wrote:

Hello everybody,

We're working at University of Zaragoza (Spain) on a EHR system. We
want to conform to 13606 and make use of ADL-based archetypes. We are
just starting and we have lots of doubts about how to implement and
apply all concepts. These are our questions:

- How 13606 is applied to built ADL archetypes? Is it already possible?
- Is it possible to obtain a XML-Schema based on 13606 from an ADL file?
- Is ADL parser in openEHR site the only one to make use of it?

It does not make any real sense to make archetypes literally based on CEN 13606. Archetypes have a very important requirement: to be targetted to an informatoin model which acts as a "base ontology". In openEHR we use the openEHR reference model fr this purpose. This is what allows you to write an archetype for somehting like "Apgar result", which needs to use concepts like OBSERVATION (with properties data, state and protocol), HISTORY (with properties events, origin), EVENT (property data), and varous data structure types, like TREE, LIST, TABLE and SINGLE.

EN 13606 is not designed directly to support archetyping; it is designed as a lowest-common denominator EHR data interoperability model, with support for transmitting archetyped information.

This is not the same as providing sufficient ontological definitoins to support the building or use of archetypes. If you were to use EN13606 literally for archetypes, you could only use ENTRY, CLUSTER and ELEMENT; you will see that trying to define most clinical concepts with such a weak ontology will be annoying difficult, error-prone, and ultimately will not engage clinical professionals.

So openEHR currently offers at least part of a base ontology for building archetypes, with concepts of sufficient strength to make higher-level clinical concepts easily expressible. In the near future, we intend to propose the creation of an agreed "base level ontology" reference model, expressed in UML, for use by everybody for buiulding archetypes. We will include the core of the openEHR reference model for this (from COMPOSITION down); but we want other organisations to think about what they need to see in this. There are other reference models such as the Danish G-EPJ which have clean concepts which may need to be in this base ontology; also ENV 13940 (continuity of care) models need to be analysed for possible contributions. We will propose this base ontology at the next CEN working group meeting. I believe people will agree in principle.

A data mapping is also being defined between openEHR (and later, the common base ontology) and EN13606. This wll enable 13606 to fulfull its purpose, which is to move data faithfully between EHR sites, including data which has been archetyped in those sites.

But please don't try to directly archteype 13606 information structures - you will be going down he wrong route!

- thomas beale

Rong Chen wrote:

Hi Rahil and Alfonso,

We have developed an ADL parser that generates instance of archetype model. The parser is based on javaCC and we use it to create archetypes for runtime use.

We plan to release it under open source license after our open source openehr kernel implementation is announced by openEHR together with new release of specifications. The reason is that the parser has some dependency to the kernel code.

Best regards,
Rong

in the next few days, so not too long to wait!

- thomas

Gavin Brelstaff wrote:

o generate a sensible XML. If you are interested in doing some work on this we could collaborate.

There are some less heavy ways of doing XML rule checking that
avoid most of the irrational intricacies of the W3C Schema.
Did you ever explore
Jim Clark's RelaxNG for schema validation of XML structures,
and
Schematron for rules involving Co-occurance relationships.

That might be a way to go.

our key requirement is that all schemas based on openEHR models are automatically generated from the source expressions, even if that is not literally true today. We nearly have a tool finished which generates an expression of the models as UML-2.0 tagged XML (but not XMI, which is bloated and qite hard to process); this XML will be published as a live 'built product' of openEHR, and we encourage developers in the community to write the next level of converters which turn it into various concrete expressions including XML-schema. If RelaxNG and Schematron can be generated, al the better; I am aware that both have more power in constraint expression than XML-schema, but leave it to the experts to work out the relative merits for openEHR. As soon as we have published the X-openEHR model tagged UML, you will be able to experiment.

- thomas beale

David W. Forslund wrote:

I've been looking at schematron for doing the "equivalent" of archetype in
a more general situation, particularly since there as been no ADL parser
available in Java. Schematron seems to be reasonably popular for
enforcing rules for XML data structures and there is a variety of software
available for using it.

there are currently two parsers in java, hopefully at least one of those will be very soon announced as open source. The reference parser is also java-wrapped, and I will upload both source and .jar ASAP. We are not quite up to speed with automatic building of these, apologies for the inconvenience.

- thomas