Added by Thilo Schuler, last edited by Thilo Schuler on 23-Dec-2010  (view change)

Labels:

gui gui Delete
generator generator Delete
framework framework Delete
web-application web-application Delete
Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.

Idea behind this page

Pablo recently announced the Open EHR-Gen framework, which he has been building with his friend Leandro as their degree project in Computer Engineering. As I have little experience with the dynamic Java-based web application framework Grails (realised a simple wedding registry), which is the basis for their framework, I have been enthusiastic to try it out. I will try to document my experience on this wiki page along the way.

And before I forget: Thank you Pablo and Leandro for sharing this major piece of work!

Overview and current status

The approach to this exploration is stepwise...

Step Aim Result (write-up) Last major revision Status
1. Setup, check out existing templates incl few test alterations, a technical peak at domain classes and the DB schema Setup, First run, Peek behind the scenes 03-12-2010 Done
2. Create own template(s) and experiment with available features     Ongoing
3. General principles behind GUI generation     Future
4. Performance issues     Future
5. Thoughts about potential and leverage for openEHR community, usage and future extensions     Future
6. Step-by-step tutorials     Maybe

Setup

On the the project website Pablo describes in Spanish what is needed to install his framework. Here is the automatic Google translation.

All went pretty smoothly except that it took me a while to convince my MacBook to use the JDK 1.6. This is the blog that helped me.

At first I used the in-memory database HSQLDB then I used MySQL. Both worked, but with MySQL I could have a peak behind the scenes (see DB schema below).

Tips & tricks and other random but useful information

Architecture and technology (for techos)

http://www.openehr.org/mailarchives/openehr-technical/msg05419.html

Template language

Open EHR-Gen uses a proprietary template language to allows to aggregate several archetypes and add a small set of GUI directives.

Pablo introduces the main concepts of the template language in another wiki article. Additionally it exists a longer PDF document about it.

Forced GUI re-generation

Templates and archetypes are cached. To force GUI re-generation after altering either of them the caches can be cleared via the templateManager and archetypeManager controllers. Just browse to:

Running the framework...

...with the existing templates

For the short time I clicked around the framework worked flawlessly as downloaded from the SVN repository.

After making changes in the templates I had to restart the app (can possibly be avoided by emptying the cache, but I haven't found it yet).

One thing I couldn't do properly and need to investigate further is to just display a subset of an archetype by only including certain paths in the template (similar to setting 'Zero Occurrence' in Ocean's Template Designer).

...with several self-created mini templates

TBD

Issues

#
Description Solution Status
1. Applying template and archetype changes without restarting framework Unload templates and/or archetypes (see above)

Performance

TBD

Future, ideas, how to leverage this work for the openEHR community

TBD

Peek behind the scenes (for techos)

I was curious what magic Pablo had done. Here is the result of the first explorations regarding domain classes and db schema. More will follow, e.g. the GUI generating process.

Domain classes

To get a better overview of the domain classes I generated a diagram with the Grails plugin class-diagram. To do that I temporarily copied the domain class files in a new Grails 1.3.5 project, installed the plugin, compiled and got an impressive domain class diagram (see attachment open_ehr_gen-classDiagram.pdf).

Unbelievable that Pablo and Leandro implemented almost the whole RM themselves in 16 months. IMO this speaks for his programming skills, the good openEHR specs and the power of Grails.

DB Schema

This attachment was generated with the tool SchemaSpy and shows what tables Grails generates from the domain classes.

Here some additional information regarding the purpose of certain tables:

  • authorization: stores login information.
  • cie10trauma: stores cie10 codes and descriptions
  • departamentosuy: stores political geographic divisions in my country Uruguay (UY)
  • emergencia_movil: stores information about emergency medical services companies
  • motivo_consulta: stores a list of consultation motives
  • tipo_identificador: stores a list of OIDs of "type of documents"

All other tables are mappings to OpenEHR RM Classes. Some tables store inheritance structures, the mapping is not always one class to one table.

Hi Thilo,

What a great description! I think we needed someone from outside the project to give his/her real opinion of what we have done (an to help us to do it better).

One small correction, I have developed this project with my friend Leandro (http://uy.linkedin.com/in/leandrocarrasco), this was our degree project in Computer Engeneering.

-Pablo.

Hi Thilo,

About the templates, you can select only some nodes of an archetype with the "field" tag. Look here: http://www.openehr.org/wiki/display/impl/GUI+directives+for+visualization+templates

-pablo.

I've corrected the translated document "template sintax and configuration", it can be found here: http://code.google.com/p/open-ehr-gen-framework/downloads/list

A comment about de DB schema tables:

authorization: stores login information.
cie10trauma: stores cie10 codes and descriptions
departamentosuy: stores political geographic divisions in my country Uruguay (UY)
emergencia_movil: stores information about emergency medical services companies
motivo_consulta: stores a list of consultation motives
tipo_identificador: stores a list of OIDs of "type of documents"

All other tables are mappings to OpenEHR RM Classes. Some tables store inheritance structures, the mapping is not always one class to one table.

Hi, i new here. I make my graduate work and use greate openEHR gen framework as part of system.

Here some problems which i got on my way:

Problem:
Application expects grails version 1.1.1
Solution:
edit application.properties and download quartz plugin

Problem:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
open-ehr-gen\src\groovy\binding\FactoryObjectRM.groovy: 858:
Enum constructor calls are only allowed inside the enum class
. At [858:16] @ line 858, column 16.
        return new ProportionKind()
               ^
Solution:
change "return new ProportionKind()" to "return ProportionKind"

p/s: sorry for my English)

Posted by Ivan at 28-Mar-2011 08:56 Updated by Ivan

Hi Ivan, here is the page of the project: http://code.google.com/p/open-ehr-gen-framework/

For the actual version of the project you have to install Grails 1.1.1 not 1.3.7. You can find it here: http://www.grails.org/download/archive/Grails

The ProportionKind problem do not appear with Grails 1.1.1, but it has been corrected for the new version of the framework (available in a few days from now).

I think you should wait for the new version to come.

Cheers,
Pablo.

Hi everyone!

We are happy to announce the release of a improved version of the Open EHR-Gen Framework, available here: http://code.google.com/p/open-ehr-gen-framework/

Cheers,
Pablo.