Skip to content

dngferreira/adl-designer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adl Designer

ADL 2.0 designer (template designer, archetype editor,...)

Initial Setup

Prerequisites:

Clone adl-designer from GitHub:

git clone https://github.com/openEHR/adl-designer.git

Go to the newly created directory adl-designer. From there, go to src/main/resources and copy configuration template files to real configuration:

cp config.properties-TEMPLATE config.properties
cp log4j.properties-TEMPLATE log4j.properties

In config.properties, update:

  • archetype.repository.file.location - Path to the directory that contains archetype files. Directory must already exist. Any file with .adls extension in this directory and any subfolder will be loaded as an archetype. For a repository with existing archetypes, you can try using a directory with contents of CKM_2013_12_09 Reference archetypes: https://github.com/openEHR/adl-archetypes/tree/master/Reference/CKM_2013_12_09
  • template.repository.location - Path to the directory that contains template files. Directory must already exist.

Back at adl-designer directory, use Maven to build the project:

mvn clean install

This will generate a designer.war file in designer/target, which can be deployed into any java web application server.

For development purposes, you may also run the application with the embedded maven tomcat plugin. Go to directory adl-designer and run:

mvn tomcat7:run

This will deploy the application on http://localhost:8080/designer and the endpoint urls will be:

Archetype Editor

Part of the designer module, that is capable editing ADL2 archetypes. Can be accessed on the url /designer/archetype-editor.html

Architecture

Archetype Editor Architecture

Individual module descriptions:

Web Interface

The web interface is based on jquery and bootstrap3. Html is generated from templates (templates/*.hbs) using handlebars. Javascript code resides in js/archetype-editor/*.

Archetype Object Model

Code for manipulating of Archetype Object Model (AOM). Independent of the web interface. Location: js/am/*. Everything in this module can be accesed though a single global variable: AOM.

Some of the supported functionality:

  • AOM.ArchetypeModel - Wraps AOM of a single archetype, allowing for easier manipulation. In addition to functionality such as manipulating terminology, annotations, constraints, translations, bindings, it can also deal with specialized archetypes.
  • AOM.NodeId - models a single node id, such as id1.1.3.
  • AOM.RmPath - models a single rm path, such as /data[id3]/items[id4]/value
  • AOM.AmQuery - enables searching for cosntraints that match a particular rm path
  • AOM.createNewArchetype - Create a new archetype from scratch, with a provided basic structure based on the RM class
  • AOM.ReferenceModel - Provides reflection-like functionality for a reference model.

Reference Model

Contains special handling required for a particular reference model, for example rendering constraint for DV_TEXT. Resides in js/archetype-editor/module-*. Archetype designer currently only supports openEHR reference model, however the code is structured to allow easy addition of new models in the future.

Currently supported reference models:

  • module-primitive - support for primitive constraints, such as C_INTEGER and special AOM constrains, such as ARCHETYPE_SLOT.
  • module-openehr - support for openEHR reference model

Archetype Repository

Provides the functionality of an archetype repository, such as listing existing archetypes, load/save archetype. Accessible via REST interface.

Support

Supporting functionality, such as retrieving supported units.

Template Editor

Can be accessed on the url /designer/template-editor.html.

Architecture

Template Editor Architecture

Template Editor is built on top of the Archetype Editor. As such, it contains the same functionality (only the Web Interface is mostly rewritten), and has these additions:

Web Interface

Mostly rewritten for the Template Editor. Javascript code resides in /js/archetype-editor/template-editor*

Archetype Object Model

  • AOM.TemplateModel - Models a single template. Every archetype in the template is included as a specialized ArchetypeModel, so on archetype level it can do everything that Archetype Designer can. Additionaly, it provides functions for adding/removing archetypes from the template.

Template Repository

Provides functionality of a template repository, such as listing existing templates, load/save template. Accessible via REST interface

About

Web-based archetype and template design tools

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published