XML versions of the ADL

In writing some code to parse the XML to populate my database I notice
there is not always a matching XML on subversion for a given ADL.

For example there is

http://svn.openehr.org/knowledge/archetypes/dev/adl/openehr/ehr/entry/observation/openEHR-EHR-OBSERVATION.blood_pressure.v1.adl

http://svn.openehr.org/knowledge/archetypes/dev/xml/openehr/ehr/entry/observation/openEHR-EHR-OBSERVATION.blood_pressure.v1.xml

but not an XML for

http://svn.openehr.org/knowledge/archetypes/dev/adl/openehr/ehr/entry/observation/openEHR-EHR-OBSERVATION.respiration.v1.adl

To get around this I started to use the LiU Archetype Editor but I
realize now it generates a different XML than on subversion. For
example the LiU editor generates nodes with type

<children xsi:type="at:C_QUANTITY">
   <rm_type_name>DvQuantity</rm_type_name>

but on subversion it has

<children xsi:type="C_DV_QUANTITY">
    <rm_type_name>QUANTITY</rm_type_name>

Is the XML unreliable such that I must use a Java ADL parser?

thanks!

Greg

Hi!

To get around this I started to use the LiU Archetype Editor but I
realize now it generates a different XML than on subversion. For
example the LiU editor generates nodes with type

<children xsi:type="at:C_QUANTITY">
   <rm_type_name>DvQuantity</rm_type_name>

but on subversion it has

<children xsi:type="C_DV_QUANTITY">
    <rm_type_name>QUANTITY</rm_type_name>

Is the XML unreliable such that I must use a Java ADL parser?

The XML-serialisation code used in the LiU editor is experimental and
has not been revised for several months. If anyone has interest in
updating it don't hesitate to have a go at it. Code patches are
welcome, we are currently focusing more on other related projects but
we don't mind releasing new builds when we get code contributions.

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

And that is fine of course, I am just wondering if there is an XML
conversion that can be considered the 'source of truth'. i.e. will
the XML committed to the svn repository always be in the same format
e.g. will OceanInformatics always use their converter?

The 'source of truth' is the openEHR specifications.

Ocean Informatics is a company that may / may not always adhere to the
standards/specifications established by the openEHR Foundation, much
like any other "company". While many of the same people may be involved
in a particular company as well as specification organizations(openEHR
Foundation); it does not mean that Ocean Informatics "sets" the
standards and policies for the openEHR Foundation. I believe this has
been made very clear in the organizational structures.

Regards,
Tim

Is anyone validating the non-draft XML committed to the repository
against the current specification and/or is there a certified upgrade
process to ensure the XML matches the current openEHR specification.

Just trying not to reinvent implementing the ADL-->XML conversion.

I see blood pressure and other ADLs converted to XML in the dev-nhs
directories, which seem consistent with the rest of the content. So
for now I will focus on uploading those into my database.

thanks

Greg

You are absolutely correct Tim.

Tim Cook wrote:

Greg,
I agree with Tim, that you can't always expect Ocean to provide these tools.
We just happen to be one of the main contributors to the openEHR foundation.
As Tim said, the openEHR specs are the normative artefacts including the XML
schemas provided at
http://svn.openehr.org/specification/TAGS/Release-1.0.1/ITS/XML-schema. As
for the archetypes, the ADL is probably the best source of truth but even
then there are some archetypes that have some errors left over from previous
versions of ADL and Editor tools.

The XML archetypes have been generated using the Ocean Archetype Editor
which is available free from
http://downloads.oceaninformatics.com/products/ArchetypeEditor. The XML
archetypes provided in
http://svn.openehr.org/knowledge/archetypes/dev/xml are currently manually
generated using an old version of the editor and committed to subversion.
This is why a complete set is not available. These XML archetypes are NOT
valid against the openEHR R1.0.1 archetype and openehrprofile XML schemas,
they do not even use the correct namespace. They have not been updated
since R1.0.1 was release.

Ocean has provided a auto-generation process for the NHS archetypes which
generate valid R1.0.1 XML and we will endeavour to provide this for the dev
archetypes as well. BTW, I have noticed an error in the term bindings XML
and will have this rectified ASAP.

You could use the Ocean Archetype Editor to produce the required XML
yourself. A similar error as mentioned above exists for term bindings but
more critical as it does not produce valid XML when an archetype includes
term bindings. Again I will have this rectified ASAP.

I will provide some background on the automated XML conversion process. The
ADL archetype is read using openEHR Eiffel ADL Parser reference
implementation which generates Archetype Object Model representation of the
archetype. Using the openEHR Archetype Model XML Schema based on the AOM we
simply serialise this AOM representation to XML.

One of the issues you have highlighted is in regard to namespace prefixes.
The Ocean serialiser uses the openEHR AM schema namespace as the default
namespace and hence does not require prefixes. The LiU Editor obviously
uses an at namespace prefix. Both are completely valid XML.

The second issue is the xsi:type of children. Look at the
openehrprofile.xsd and you will see that C_DV_QUANTITY is the correct type.
This is consistent with the openEHR profile specification.

Thirdly, both DvQuantity and QUANTITY are wrong in this case. It should be
DV_QUANTITY as per the openEHR RM. The Ocean Archetype Editor now produces
this correctly and the XML converter used to generate the NHS XML archetype
is working correctly in this case, see
http://svn.openehr.org/knowledge/archetypes/dev-uk-nhs/gen/xml/openehr/ehr/e
ntry/observation/openEHR-EHR-OBSERVATION.blood_pressure.v1.xml.

Hope this helps.

Regards

Heath

From: openehr-technical-bounces@openehr.org [mailto:openehr-technical-
bounces@openehr.org] On Behalf Of Greg Caulton
Sent: Tuesday, 6 November 2007 8:05 AM
To: For openEHR technical discussions
Subject: XML versions of the ADL

In writing some code to parse the XML to populate my database I notice
there is not always a matching XML on subversion for a given ADL.

For example there is

http://svn.openehr.org/knowledge/archetypes/dev/adl/openehr/ehr/entry/observ
at

ion/openEHR-EHR-OBSERVATION.blood_pressure.v1.adl

http://svn.openehr.org/knowledge/archetypes/dev/xml/openehr/ehr/entry/observ
at

ion/openEHR-EHR-OBSERVATION.blood_pressure.v1.xml

but not an XML for

http://svn.openehr.org/knowledge/archetypes/dev/adl/openehr/ehr/entry/observ
at

Right, I am sorry it came off that way - it was not intended as I
wrote it. As with all Open Source projects, I expect nothing but will
leverage anything :slight_smile:

Very helpful background and clarification - thank you!

Greg
http://www.patientos.org

Greg and others,
We have configured an auto-build process to convert the ADL archetypes to
XML located at http://svn.openehr.org/knowledge/archetypes/dev. They now
all exist and are valid against the RM 101 XML Schema. Let me know if you
find any issues with the XML content.

Regards

Heath

From: Heath Frankel [mailto:heath.frankel@oceaninformatics.com]
Sent: Wednesday, 7 November 2007 11:06 AM
To: 'For openEHR technical discussions'
Subject: RE: XML versions of the ADL

Greg,
I agree with Tim, that you can't always expect Ocean to provide these

tools.

We just happen to be one of the main contributors to the openEHR

foundation.

As Tim said, the openEHR specs are the normative artefacts including the

XML

schemas provided at http://svn.openehr.org/specification/TAGS/Release-
1.0.1/ITS/XML-schema. As for the archetypes, the ADL is probably the best
source of truth but even then there are some archetypes that have some

errors

left over from previous versions of ADL and Editor tools.

The XML archetypes have been generated using the Ocean Archetype Editor

which

is available free from
http://downloads.oceaninformatics.com/products/ArchetypeEditor. The XML
archetypes provided in
http://svn.openehr.org/knowledge/archetypes/dev/xml are currently manually
generated using an old version of the editor and committed to subversion.
This is why a complete set is not available. These XML archetypes are NOT
valid against the openEHR R1.0.1 archetype and openehrprofile XML schemas,
they do not even use the correct namespace. They have not been updated

since

R1.0.1 was release.

Ocean has provided a auto-generation process for the NHS archetypes which
generate valid R1.0.1 XML and we will endeavour to provide this for the

dev

archetypes as well. BTW, I have noticed an error in the term bindings XML

and

will have this rectified ASAP.

You could use the Ocean Archetype Editor to produce the required XML

yourself.

A similar error as mentioned above exists for term bindings but more

critical

as it does not produce valid XML when an archetype includes term bindings.
Again I will have this rectified ASAP.

I will provide some background on the automated XML conversion process.

The

ADL archetype is read using openEHR Eiffel ADL Parser reference

implementation

which generates Archetype Object Model representation of the archetype.

Using

the openEHR Archetype Model XML Schema based on the AOM we simply

serialise

this AOM representation to XML.

One of the issues you have highlighted is in regard to namespace prefixes.
The Ocean serialiser uses the openEHR AM schema namespace as the default
namespace and hence does not require prefixes. The LiU Editor obviously

uses

an at namespace prefix. Both are completely valid XML.

The second issue is the xsi:type of children. Look at the

openehrprofile.xsd

and you will see that C_DV_QUANTITY is the correct type. This is

consistent

with the openEHR profile specification.

Thirdly, both DvQuantity and QUANTITY are wrong in this case. It should

be

DV_QUANTITY as per the openEHR RM. The Ocean Archetype Editor now

produces

this correctly and the XML converter used to generate the NHS XML

archetype is

working correctly in this case, see
http://svn.openehr.org/knowledge/archetypes/dev-uk-
nhs/gen/xml/openehr/ehr/entry/observation/openEHR-EHR-
OBSERVATION.blood_pressure.v1.xml.

Hope this helps.

Regards

Heath

> From: openehr-technical-bounces@openehr.org [mailto:openehr-technical-
> bounces@openehr.org] On Behalf Of Greg Caulton
> Sent: Tuesday, 6 November 2007 8:05 AM
> To: For openEHR technical discussions
> Subject: XML versions of the ADL
>
> In writing some code to parse the XML to populate my database I notice
> there is not always a matching XML on subversion for a given ADL.
>
> For example there is
>
>

http://svn.openehr.org/knowledge/archetypes/dev/adl/openehr/ehr/entry/observ
at

> ion/openEHR-EHR-OBSERVATION.blood_pressure.v1.adl
>
>

http://svn.openehr.org/knowledge/archetypes/dev/xml/openehr/ehr/entry/observ
at

> ion/openEHR-EHR-OBSERVATION.blood_pressure.v1.xml
>
>
> but not an XML for
>
>

http://svn.openehr.org/knowledge/archetypes/dev/adl/openehr/ehr/entry/observ
at

Hello heath

In the examples you show,
" located at http://svn.openehr.org/knowledge/archetypes/dev. "

there is a french version pending and write?
This is that there are people interested in doing the job?

best regard's

Dr R LONJON
Clermont Fd - France

Selon Heath Frankel <heath.frankel@oceaninformatics.com>:

Looks good to me, The only issues I am hitting so far are due to the
original ADL

e.g. openEHR-EHR-OBSERVATION.dimensions.v1.adl defines

at0013 (Object: The object, axis or body part that is being measured)
as a DV_CODED_TEXT but without associated codes.

I don't know if it is helpful if I highlight those type of anomolies
(or perhaps not anonomolies, just my misunderstanding of the
definition).

thanks!

Greg
http://www.patientos.org

Greg,
I suspect that there are so many objects that are possible that it is too
difficult to identify them within the archetype. This should probably be an
external terminology rather than an internal terminology, but that is up to
the archetype developers (the clinicians) to say not me (a techie).

Heath

From: openehr-technical-bounces@openehr.org [mailto:openehr-technical-
bounces@openehr.org] On Behalf Of Greg Caulton
Sent: Wednesday, 7 November 2007 10:18 PM
To: For openEHR technical discussions
Subject: Re: XML versions of the ADL

Looks good to me, The only issues I am hitting so far are due to the
original ADL

e.g. openEHR-EHR-OBSERVATION.dimensions.v1.adl defines

at0013 (Object: The object, axis or body part that is being measured)
as a DV_CODED_TEXT but without associated codes.

I don't know if it is helpful if I highlight those type of anomolies
(or perhaps not anonomolies, just my misunderstanding of the
definition).

thanks!

Greg
http://www.patientos.org

> Greg and others,
> We have configured an auto-build process to convert the ADL archetypes

to

> XML located at http://svn.openehr.org/knowledge/archetypes/dev. They

now

> all exist and are valid against the RM 101 XML Schema. Let me know if

you

> find any issues with the XML content.
>
> Regards
>
> Heath
>
> > From: Heath Frankel [mailto:heath.frankel@oceaninformatics.com]
> > Sent: Wednesday, 7 November 2007 11:06 AM
> > To: 'For openEHR technical discussions'
> > Subject: RE: XML versions of the ADL
> >
> > Greg,
> > I agree with Tim, that you can't always expect Ocean to provide these
> tools.
> > We just happen to be one of the main contributors to the openEHR
> foundation.
> > As Tim said, the openEHR specs are the normative artefacts including

the

> XML
> > schemas provided at http://svn.openehr.org/specification/TAGS/Release-
> > 1.0.1/ITS/XML-schema. As for the archetypes, the ADL is probably the

best

> > source of truth but even then there are some archetypes that have some
> errors
> > left over from previous versions of ADL and Editor tools.
> >
> > The XML archetypes have been generated using the Ocean Archetype

Editor

> which
> > is available free from
> > http://downloads.oceaninformatics.com/products/ArchetypeEditor. The

XML

> > archetypes provided in
> > http://svn.openehr.org/knowledge/archetypes/dev/xml are currently

manually

> > generated using an old version of the editor and committed to

subversion.

> > This is why a complete set is not available. These XML archetypes are

NOT

> > valid against the openEHR R1.0.1 archetype and openehrprofile XML

schemas,

> > they do not even use the correct namespace. They have not been

updated

> since
> > R1.0.1 was release.
> >
> > Ocean has provided a auto-generation process for the NHS archetypes

which

> > generate valid R1.0.1 XML and we will endeavour to provide this for

the

> dev
> > archetypes as well. BTW, I have noticed an error in the term bindings

XML

> and
> > will have this rectified ASAP.
> >
> > You could use the Ocean Archetype Editor to produce the required XML
> yourself.
> > A similar error as mentioned above exists for term bindings but more
> critical
> > as it does not produce valid XML when an archetype includes term

bindings.

> > Again I will have this rectified ASAP.
> >
> > I will provide some background on the automated XML conversion

process.

> The
> > ADL archetype is read using openEHR Eiffel ADL Parser reference
> implementation
> > which generates Archetype Object Model representation of the

archetype.

> Using
> > the openEHR Archetype Model XML Schema based on the AOM we simply
> serialise
> > this AOM representation to XML.
> >
> > One of the issues you have highlighted is in regard to namespace

prefixes.

> > The Ocean serialiser uses the openEHR AM schema namespace as the

default

> > namespace and hence does not require prefixes. The LiU Editor

obviously

> uses
> > an at namespace prefix. Both are completely valid XML.
> >
> > The second issue is the xsi:type of children. Look at the
> openehrprofile.xsd
> > and you will see that C_DV_QUANTITY is the correct type. This is
> consistent
> > with the openEHR profile specification.
> >
> > Thirdly, both DvQuantity and QUANTITY are wrong in this case. It

should

> be
> > DV_QUANTITY as per the openEHR RM. The Ocean Archetype Editor now
> produces
> > this correctly and the XML converter used to generate the NHS XML
> archetype is
> > working correctly in this case, see
> > http://svn.openehr.org/knowledge/archetypes/dev-uk-
> > nhs/gen/xml/openehr/ehr/entry/observation/openEHR-EHR-
> > OBSERVATION.blood_pressure.v1.xml.
> >
> > Hope this helps.
> >
> > Regards
> >
> > Heath
> >
> >
> > > From: openehr-technical-bounces@openehr.org

[mailto:openehr-technical-

> > > bounces@openehr.org] On Behalf Of Greg Caulton
> > > Sent: Tuesday, 6 November 2007 8:05 AM
> > > To: For openEHR technical discussions
> > > Subject: XML versions of the ADL
> > >
> > > In writing some code to parse the XML to populate my database I

notice

> > > there is not always a matching XML on subversion for a given ADL.
> > >
> > > For example there is
> > >
> > >
> >
>

http://svn.openehr.org/knowledge/archetypes/dev/adl/openehr/ehr/entry/observ

> at
> > > ion/openEHR-EHR-OBSERVATION.blood_pressure.v1.adl
> > >
> > >
> >
>

http://svn.openehr.org/knowledge/archetypes/dev/xml/openehr/ehr/entry/observ

> at
> > > ion/openEHR-EHR-OBSERVATION.blood_pressure.v1.xml
> > >
> > >
> > > but not an XML for
> > >
> > >
> >
>

http://svn.openehr.org/knowledge/archetypes/dev/adl/openehr/ehr/entry/observ