Skip to content

neuronsong/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

Application is built as a war archive, but it also requires an external folder that holds the configuration and workspace (This folder will be referred to as APPHOME). The application comes with a template for APPHOME folder in adl-designer/apphome. To avoid committing your local configuration and workspace to github repository, do not use this folder directly. Instead, copy apphome to apphome-work, which is excluded in .gitignore:

cp -r apphome apphome-work

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. When deploying the application, you will need to specify ADL_DESIGNER_APPHOME environment variable that points to the APPHOME folder.

For development purposes, you may also run the application with the embedded maven tomcat plugin. This also assumes that your APPHOME folder is adl_designer/apphome-work, as previously described. Go to directory adl-designer/designer and run:

mvn tomcat7:run

This will deploy the application on http://localhost:8080/designer.

Running designer on a different host or port

For authenticating on GitHub, a GitHub application configuration is required. Template APPHOME is configured to use a development application that expects the adl-designer to run at http://localhost:8080/designer. If a different URl is needed, you will have to create a different GitHub application with a different callback url (Append /app/authorize to the root url, development application url is http://localhost:8080/designer/app/authorize).

In config.properties, you will need to change github.api.auth.client_id and github.api.auth.secret to the new application key.

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

Languages

  • JavaScript 69.8%
  • HTML 19.4%
  • CSS 5.6%
  • Java 5.0%
  • CMake 0.1%
  • Erlang 0.1%