This is incomplete preliminary information and subject to change.
This page will be completed upon release planned for August 2019
It is the main objective of this feature to generate Java code for a given ART-DECOR Document Template. ART-DECOR Document Templates are part of content profiles, such as IHE content profiles, Swiss exchange formats or Austrian implementation guides.
In Switzerland, content profiles are known as exchange format. The eHealth Connector provides java packages, representing Swiss exchange formats that base on HL7 CDA R2. Some of them are defined in the Federal Office of Public Health (FOPH) regulations for the Federal Act on the Electronic Patient Record (EPRO).
These exchange formats can be found in the following package:
Whereas <exchange format> is the TODO (abbreviation?) of the exchange format.
The Swiss exchange formats are modelled in ART-DECOR and fully documented in English:
Import the codegenerator as maven project into your Eclipse environment
Create a content profile configuration (see below for more details)
Generating the Java classes
Launch org.ehealth_connector.codegenerator.cda.ArtDecor2JavaCodeGenerator as Java application having the following args:
<eclipse> <workspace> <config>
eclipse: First parameter must be the full path and filename of your eclipse application
workspace: Second parameter must be the full path to your current workspace directory
config: Third parameter must be the full path to your configuration file
Note: Your workspace will be copied by the application into a temp folder and deleted there upon completion, as the current one is in use by Eclipse IDE.
Check console output
Add the newly created classes to Git, commit and push them to GitLab.
Build the eHealth Connector and Demo Applications (see TODO link).
Create an appropriate demo for the newly created content profile. It shall at least demonstrate:
Run the Demo to check whether the generated classes can successfully be used to create valid CDA documents and to consume them.
How-to configure the code generator for a content profile
The content profile configuration files are YAML files and they are located at codegenerator/ehealth_connector-codegenerator-gen/src/main/resources/cda.
The configuration files describe themselves. Look at the commented lines (#comment).
You also may create your own configuration files using the org.ehealth_connector.codegenerator.cda.ContentProfileConfig class and save it by org.ehealth_connector.codegenerator.cda.ArtDecor2JavaManager.saveContentProfileConfig()