...
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.
...
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 schema | 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 |
...
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).
Random information
Tips & Tricks
...
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.
...
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.
...
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 himself themselves in 16 months. IMO this speaks for his programming skills, the good openEHR specs and the power of Grails.
DB Schema
This attachment open_ehr_gen-41_tables.png 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.