Sorry, I first replied to Pieter Bos only, now to the list. Pieter already replied to me that the question was not about XSD to check datasets was .

So, read my reply, for those interested in easy validating datasets:

It is possible to have an XSD to describe the AOM, but you cannot have an XSD to describe an archetype and check a dataset with it.

Archetypes can have logical constructs which are not allowed in XSD. It has to do with elements with the same name on the same level, that is not allowed in XSD, even not when there are different attributes.

You can use Schematron to check an archetyped XML dataset. I believe the LinkEHR editor generates such Schematrons.

I also found Schematron validator for JSON, I think that this is very interesting for some kernel software developers, because XML is slowly becoming something of an previous era.

Good luck with it.


On 12-11-18 09:30, Pieter Bos wrote:
Hello George,

If you are looking for something to handle ADL 2 archetypes - the most recent version -, have a look at . It is a java library that can parse archetypes, flatten and validate  them, create operational  templates and more.

Are you using the openehr reference model, or something else like fihr?

Although Archie can parse and serialize archetypes in XML, archetypes are usually stored as ADL. This is a custom more readable format. Of course you can then easily convert it to XML or Json to work with them in other tools where you do not have an ADL parser ready.

Note that for ADL 2 as far as I know there is no official XSD released yet, so it is possible you run into compatibility problems with XML. For ADL 1.4 this is not a problem.


Pieter Bos

Op 12 nov. 2018 09:18 schreef Georg Fette <>:
For a project we want to create a generic mechanism to transform
archetypes into FHIR Logical Models, so we can store, retrieve and query
archetype instance with FHIR tools (CQL, FHIR-REST-API-query). At the
moment we just want to read/write archetypes and not archetype
instances. We are looking for existing components to parse and process
archetypes. I have some questions I encountered related to these issues:
- I have found several projects that store openEHR-data (archetypes as
well as archetype instances) into different data substrates (Neo4J, ARM
(archetype relational mapping), EtherCIS). Although I have not yet
looked at the code of these projects I assume that they take an
archetype XML-file, parse it and thus create a runtime object of the
archetype. That runtime object can then be given as a parameter to a
persistence layer (e.g. JOOQ, Hibernate, etc.). In order to reuse
something from already existing projects I am looking for a parser that
creates a runtime object from an archetype-XML-String, so we can write
our own components that transform it into a FHIR runtime object. The
component we are looking for should preferably be written in Java, as
this is our language of choice in our project.
- I am not ye sure if we are looking for a method to transform
archetypes, templates or operational templates into FHIR related
structures, as I am not yet that familiar with which data structure is
preferably used for which kind of task. Therefore, component that,
instead of archetypes, parse templates or operational templates would be
appreciated as well.

Dipl.-Inf. Georg Fette      Raum: B001
Universität Würzburg        Tel.: +49-(0)931-31-85516
Am Hubland                  Fax.: +49-(0)931-31-86732
97074 Würzburg              mail:

openEHR-technical mailing list

openEHR-technical mailing list

*Bert Verhees*
Software developer, architect


Email: <>
Mobile: +31 06 28050294
openEHR-technical mailing list

Reply via email to