Dear all,
as part of the ongoing work with archetypes in the openEHR community it has become clear that a change to the syntax would be desirable. The change is essentially to convert ADL archetypes from their somewhat idiosyncratic syntax to being regular dADL documents. The semantics would not change, but it would mean that parsers and serialisers could mechanically convert between ADL documents and AOM instance trees. “ADL” would thus cease to be a special syntax, and would instead denote dADL documents whose filenames end in “.adl” (note that I am likely to propose that the names of the subsyntaxes dADL and cADL change in the future as well).
These changes would have a number of benefits. Firstly, it would mean that parsing an ADL file is just parsing a dADL document, where one of the field types happens to be the curly-bracket syntax currently known as cADL. Since dADL is completely mappable to XML (in fact it is a completely regular abstract syntax for well-formed XML), the change will facilitate XML serialisation and deserialisation of archetypes.
It will even be possible in the future to use 100% dADL throughout the archetype, since the cADL section can be serialised as dADL syntax, although it will of course lose its readability as a constraint syntax. This kind of serialisation is what could be used as the first step to XML serialisation, and also coming from XML. (If this paragraph does not make sense to you now, don’t worry!)
Some detailed changes would then be possible in the archetype document structure, to make it match up properly with the Archetype Object Model; mainly to do with the top sections, the language sections (currently in the ontology section); and the revision history section.
Overall, this change will make ADL archetypes processible with simpler software, and easier to process in and out of XML. It will also align it to other syntaxes similar in nature to dADL, such as YATL.
What we would like to know is:
- general reactions to this proposed change
- how soon people would be prepared to have the change implemented. By preference, we would implemented it in the documents and archetypes tools within the next 8 weeks.
- whether there are enough archetypes already in existence to justify making a conversion tool, or whether people would be happy to make the changes by hand. These would admittedly be annoying, but it would allow us to upgrade the software faster, since we would not need the backward compatibility features.
To give a feel for the change, two example archetypes are available one in today’s syntax (http://www.openehr.org/repositories/archetype-dev/latest/adl/archetypes/openehr/ehr/entry/observation/openEHR-EHR-OBSERVATION.visual.v1.adl), and one in the proposed syntax (http://www.openehr.org/repositories/adl_ref_parser-dev/latest/openEHR-EHR-OBSERVATION.visual.new.adl). These links are available from the ADL reference parser project home page (http://www.openehr.org/repositories/adl_ref_parser-dev/latest/project_page.htm), which also contains details on the proposed changes.
Clearly it would have been nicer if we had worked this out in the beginning, but that is the nature of research: what is clear now has only been arrived at by experimenting with the initial creation. My expectation is that after this change, there will be very few changes required to the syntax indeed; those that are required (e.g. due to a new attribute in a class in the AOM) will have minimal impact on the software, since they will be processible with an already established syntax.
Lastly, human authors of archetypes do not have much to worry about: they will see only minor changes to the tools (e.g. due to the adjustment to the language and translation sections of archetypes), and should otherwise not notice any difference.
- thomas beale
- If you have any questions about using this list, please send a message to d.lloyd@openehr.org