LinkEHR add archetype to template

I’m trying to create a template in LinkEHR using an archetype I have defined and some other archetypes taken from the openEHR repository, however I am struggling to work out how to include these in my template. I have tried “Export ADL for openEHR editor/ Template Designer”, using a archetype slot and just dragging and dropping but I am having no luck.

Is there something obvious I am missing?

Hello Savas,

To correctly define templates, linkEHR must be in “template mode”. This can be achieved by importing an OPT, creating a new template from the menu, or by selecting ‘using as template’ option from the local repository panel. Were you using any of these? In any case you should be able to export it to OPT or even OET. The option you mentioned would export to an ADL that can be used by the Template Designer

I am in template mode, I selected “New Template” from the menu.

I have also tried exporting to OPT and am still unable to import it into my template. The template tree screen just goes blank when I do this.

I have had a bit more luck with resolving an archetype slot when running LinkEHR in a Windows VM. Must be a problem with the Linux version.

Oh, good catch. I’ll take a look at it. See if you can send us the error log from the Linux version, it probably can tell us what’s going on. /home/savas/Downloads\openEHR-EHR-OBSERVATION.apgar.v2.adl (No such file or directory)
    at Method)
    at org.acode.adlparser.ADLParser.<init>(Unknown Source)
    at Source)
    at Source)
    at arbolDefinicion.views.GenericTree$
    at org.eclipse.jface.action.Action.runWithEvent(
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(
    at org.eclipse.jface.action.ActionContributionItem.lambda$4(
    at org.eclipse.swt.widgets.EventTable.sendEvent(
    at org.eclipse.swt.widgets.Display.sendEvent(
    at org.eclipse.swt.widgets.Widget.sendEvent(
    at org.eclipse.swt.widgets.Display.runDeferredEvents(
    at org.eclipse.swt.widgets.Display.readAndDispatch(
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(
    at org.eclipse.ui.internal.Workbench.lambda$3(
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(
    at linkEHR_RCP.Application.start(
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
    at java.lang.reflect.Method.invoke(
    at org.eclipse.equinox.launcher.Main.invokeFramework(
    at org.eclipse.equinox.launcher.Main.basicRun(
    at org.eclipse.equinox.launcher.Main.main(

The file is there with read permissions for all - although that backslash is a little suspicious.

Yes, definetly is caused by that. Shouldn’t be hard to fix in any case