How to export templates in opt or xml formate

Hi,

I am new to openEHR system. We are using archetype designer for our research. I have created some template using “https://tools.openehr.org/designer”. I would like to export these template in XML or OPT format, so that I can use these templates at “https://toolkit.cabolabs.com/app/free_tools”.
I can see opt format option available, but it is giving message like “Cannot export embedded template to OPT.”

Could you please help me with exporting template in opt or xml formate?

Regards.
–Yogesh

Hi,
The archetype designer has a very straightforward export option that allows you to export your template to OPT. Once you have opened a template, you can click on the export menu on the top bar. In the pop up you can click on the export button to get a dropdown of the available options. When you select any option in the drop down list, you get an option to save what you have exported.

I have attached a screenshot for your reference
regards

1 Like

Thanks @Dileep_V_S, I saw that option, but it is giving error like " Cannot export embedded template to OPT".
Also, do yo know, can you help me with exporting template in XML as well.

Hi,
Not sure what that error means. If you can share the template files, I can take a look.

As for exporting to XML, OPT is XML

regards

Hi @Dileep_V_S,

I am creating a template here itself “https://tools.openehr.org/designer”. I exported it in native format(JSON). Please see if you can export that in opt file.

~Yogesh
This text will be hidden

bp_temp.t.json (3.07 KB)

Hi Yogesh,

The problem here is that you are creating a template based on an ENTRY archetype - specifically and OBSERVATION. You can only create operational templates on Composition-based templates as these are whatare used to validate the composition instances that are stored in the openEHR CDRs. All openEHR data must be commited as part of a composition.

What you have created is what we would call an embedded template - it is a fragment that can be pre-constrained and then shared between multiple composition templates.

THe best next step is just to create a new Composition-based template then add your blood pressure embedded template into it under content. You should see it along with the list of applicable archetypes. THen export the composition .opt -> it will include your embedded template fragment.

1 Like

Adding to that, toolkit.cabolabs.com only accepts OPTs for COMPOSITIONs.

Hi @ian.mcnicoll,

Thank you very much for the inputs. I am able to export the composition based template in OPT format !!!
I am new to this system, Could you please point me the documentation where I can get details of terminologies like composition, observation, evaluations .

Regards

Hi,
A good place to start will be this https://specifications.openehr.org/releases/RM/latest/ehr.html. You can also look at the related documents mentioned

regards

We have published a bunch of training presentations at https://freshehr.com/resources/ that you might find helpful. They are a wee bit out of date but most of it still applies.

Presentations

Introduction to 2-day workshop

Anatomy of an eHealth app

Why is eHealth so hard?

What is openEHR

Introduction to Archetypes and Templates

Interoperability: Managing Healthcare Diversity

openEHR in context: integration, terminology and querying

openEHR Templates in detail

openEHR Archetypes: Classes Overview

openEHR Archetypes: Observations

openEHR Archetypes: Clusters

openEHR Archetypes: Specialisations

openEHR Archetypes: Instructions and Actions

Introduction to the openEHR Reference Model

1 Like

Thank You @ian.mcnicoll @Dileep_V_S for your help.