How to generate an opt 1.4?

Hello,

I’m still new to openEHR and I’m trying to figure out how to generate an opt programmatically.

I know that there are some xsd files in the specification repo and that those files should be used to generate an opt (please correct me if I’m wrong). But it’s not clear to me how to actually do it.

If anyone can point me in the right direction? I would really appreciate it!

Thanks!

I assume the best way to get started is to look at the RM/AM implementation here : GitHub - openEHR/archie: OpenEHR library implementing ADL 2, AOM 2, BMM, RM 1.0.4 and many tools

It depends a bit on what you actually are trying to do. The tools.openehr.org also have a REST API which might be used if you use this for the design of clinical models.

Hi Anas,

I would echo Bjorn’s response. As an ‘external developer’ I really would not want to get into the business of generating .opts (appreciate the immediate frustration with the AD bug).

You might be able to use the Ocean Template Designer Template Designer - Ocean Health Systems though it expects the same .oet format used by CKM so converting from the AD native json will be a bit of a faff. The opt generated is identical.

If you do really want to get into .opt generation, not just as a short term fix, the Archie library is definitely your friend but this is quite specialist stuff and if all you really want is to get an .opt generated, TBH I think I would just wait impatiently for AD to be fixed. (I am in that position!!)

The Archie library can only generate OPT 2, not 1.4.

However, it is very easy to do so: Just install visual studio code and open an ADL file. It will offer to install an extension. If you install it, now you can right click anywhere in the ADL file, click source actions and generate an OPT 2 in the editor, in JSON, XML or ADL format. If it is an ADL 1.4 archetype you will need to convert it to ADL 2 first - the command to do so is in the same source actions menu.

If you need opt 1.4, then you need other tools such as the ocean template designer or archetype designer.

@bna @ian.mcnicoll @pieterbos
Thank you!

As @pieterbos confirmed archie generates OPT2 which is fundamentally different from OPT1.4 so I can’t really use it.

Also, I don’t like to be dependent on a third party service/product. It is either not guaranteed to work when I need it (AD for example), or it’s hard/impossible to integrate in a pipline of tools programmatically.

So I decided to build this myself, since there are no open source tools available.

My impression so far is that opt1.4 is the default portable format being used across openEHR tools. Opt2, however, is easier to generate but lacks the support opt1.4 has.

So as a developer, I think that opt1.4 generation is a missing piece that should be available with an open source implementation. If I succeed in this, I will share it with everyone, but it’s not clear how to start and what to use.

2 Likes

LinkEHR should be able to edit OPT 1.4, and even export it to OPT2 (it uses archie for that purpose)

You have an OPT 1.4 to OPT 2 converter? A publicly available one is one of the last things missing for a full adl 1.4 to 2 conversion.

2 Likes