Pablo Pazos 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!
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 |
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 |
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).
http://www.openehr.org/mailarchives/openehr-technical/msg05419.html
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.
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:
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).
TBD
# |
Description |
Solution |
Status |
---|---|---|---|
1. |
Applying template and archetype changes without restarting framework |
Unload templates and/or archetypes (see above) |
|
TBD
TBD
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 themselves in 16 months. IMO this speaks for his programming skills, the good openEHR specs and the power of Grails.
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:
All other tables are mappings to OpenEHR RM Classes. Some tables store inheritance structures, the mapping is not always one class to one table.