# Hand coding templates in ADL 1.4 **Category:** [Technical (archive)](https://discourse.openehr.org/c/technical-archive/156) **Created:** 2017-02-12 08:43 UTC **Views:** 2 **Replies:** 6 **URL:** https://discourse.openehr.org/t/hand-coding-templates-in-adl-1-4/15471 --- ## Post #1 by @system Hi, We are exploring OpenEHR as part of a public health management pilot project in India and have some questions that I am unable to find proper answers. After studying the available libraries, tools and opensource server implementations, ADL 1.4 seems to be more widely supported than the newer ADL 2.0. The shared archetype repository (CKM) still contains only 1.4 version archetypes. In light of this, I am assuming that for anybody planning to adopt OpenEHR, it will be advisable to stick to ADL1.4 for now. Further I have learned the following wrt. ADL 1.4 standards File formats for 1.4 version - Archetypes - ADL 1.4 - Templates - OET - Operational template - OPT 1.4 Modelling tools - Archetype editor, template designer I am stuck with trying to answer the following questions. It would be great if somebody can help. 1. Can we hand create templates that are not supported by the template designer? For example demographics? 1. If yes how do we convert the hand coded OETs to OPTs? 1. Where do we get more details on OET file syntax? Thanks --- ## Post #2 by @yampeku Hello Dileep, If you stick with ADL 1.4 then you could use LinkEHR Studio ([http://linkehr.com](http://linkehr.com)) to create templates from other RM such as demographic model. The same tool can be used to import OET and export OPT for any given RM. Regards --- ## Post #3 by @system The editing tools for adl 2 are still limited\. However the template editing by hand is easier in adl 2 than the earlier template xml formats because it's the same adl with a few extra language constructs for templates\. And you can convert the ckm to adl 2 quite easily\. Pieter Bos --- ## Post #4 by @system Thanks Pieter/ Diego, and hi Dileep. AFAIK Demographics archetypes/ templates are currently only handled by LinkEhr and Tom Beale's ADL workshop tool. This is partly because , to-date, (at least publicly) only a couple of companies have made use of the openEHR Demographics service - Code24 and Ocean. Hopefully with the upcoming release of the latest Marand ADL tools and others, we are quickly reaching a point where we can start the transition to ADL2. The first step, in my view, is to make sure that ADL-based tools can readily create ADL 1.4 .opt files, as virtual all of the current, publicly available back-end CDR's use this. The real advantages of ADL2 are in the design-time space with relatively little impact on back-end, so we can probably live with ADL 1.4 .opt for a while until the tools settle down.As Pieter has said, moving from .oet to ADL 2 will actually make life easier since we use ADL2 fpr templates too. The quicker we can make that jump the better. .oet in an internal Ocean format, and I'm not sure if there are any normal published specs but a few people ... LinkEHR, Marand and others appear to support .oet parsing. The upcoming Marand tools, are I understand open-source so that should provide you with some practical guidance but my own intention is to move to ADL2 templates for projects ASAP. Kind regards, Ian --- ## Post #5 by @system Hi! Great to hear about your project! Please tell us a bit more if you have time, what are the pilot use-cases? (I am curious since we are planning some tests in Sweden too...) It is true that adl 1.4 is currently more used, but for new projects it is good to track the ADL 2 development. There are tools to automatically convert archetypes between 1.4 and 2.0, so it is possible to set up workflows starting from the either the 1.4 or 2.0 end. The ADL 2 tools are moving forward, so if your modellers will want to use web-based tools, then plan for 2.0 fairly soon. I hope you have seen : - [https://openehr.atlassian.net/wiki/display/dev/Online+archetype+and+template+tools](https://openehr.atlassian.net/wiki/display/dev/Online+archetype+and+template+tools) and - [https://twitter.com/marandlab/status/826832144672686081](https://twitter.com/marandlab/status/826832144672686081) --- ## Post #6 by @system Hi, Thank you all for the quick responses. We will try some of the other tools mentioned in the replies and see if they will work for us. Overall what I have gathered is as below (please correct if I am wrong) 1. It will be better to stick to ADL 1.4 OPT for some more time 1. documentation on oet is not widely distributed as it is a proprietary format. So manual coding with oet may not work 1. An open source ADL 2.0 modelling tool is expected to be released soon (Any schedule of when it is expected?). 1. Till the new tool comes out, the options are to use ocean & LinkEHR tools 1. ADL 1.4 can be converted to ADL 2.0 easily. I assume this is using the ADL workbench. Not sure what happens after that as we still do not have tools to create 2.0 templates and export them to ADL 1.4 opt. We work with EHRC ([http://ehrc.iiitb.ac.in/work.html](http://ehrc.iiitb.ac.in/work.html)) as a technical partner in their public health initiatives. Access to health in rural India still faces many challenges. Indian govt. plans to cover 60% of the population (mostly rural and less resourceful) in the public health programs, which given the enormity of the work, will only be possible with highly innovative approaches leveraging technology. We believe that information should be the backbone of any large scale innovation in healthcare delivery in India and are working on defining some common models that can be deployed widely across a large country like India. Standards in EHR are very nascent in India and a lot of work needs to be done in this area. At this point we are in the process of modelling some simple use cases to build capability to do more serious stuff as things evolve. One question that we are trying to answer is whether we should use OpenEHR approach for demographics or use traditional modelling, since the demographic data model is fairly stable. Some idea of how others have done this before will help us as shorten our learning curve. regards --- ## Post #7 by @system The main differences between ADL 14. and ADL 2: - ADL 2 properly supports specialisation, i.e. inheritance - In ADL 2, a template is just another ADL 2 archetype (with 'template' keyword) - special syntax types for Quantity, Coded text and Ordinals are replaced with a standard 'tuple' construct - internal value sets are better represented - proper versioning rules and identifiers it depends on what you want to use the OPT for. The ADL 2 OPT has a draft specification, and the ADL Workbench generates it as it is defined today. It is more powerful and consistent than the ADL 1.4 OPT. well, .oet is a trivial XML structure, and there is an XSD for it. There is however no other documentation. It's not proprietary in any sense other than being the format of the Ocean Template Designer tool. it already exists, but is being upgraded - its called . I would suggest determining your intended workflow first. You may start with existing ADL 1.4 archetypes. Both the ADL Workbench and adl-designer will convert these to ADL2 archetypes. adl-designer will create an ADL 2 template, but I am not sure if it has all facilities as of today. there are demographic models visible in CKM, which may be of help, mostly based on ISO 22220 which may be helpful - thomas --- **Canonical:** https://discourse.openehr.org/t/hand-coding-templates-in-adl-1-4/15471 **Original content:** https://discourse.openehr.org/t/hand-coding-templates-in-adl-1-4/15471