Here is a guide to help you installing CDAGenerator.
/usr/local/jboss7
To install those requirements you can refer to the documentation of installation of jboss : General Requirements JBOSS 7
mvn clean install
By default the CDA generator is using the folder /opt/CDAGenerator in order to store files and to access XSD and XSL files. The tar file to be installed is located here.
wget --no-check https://gazelle.ihe.net/files/cda-generator-init-files.tgz
mkdir /opt/CDAGenerator
cd /opt/CDAGenerator
tar zxvf cda-generator-init-files.tgz
The names of the databases are defined in the pom.xml file. Use the following commands :
su postgresql
psql
postgres=\# CREATE USER gazelle;
postgres=\# ALTER USER gazelle WITH ENCRYPTED PASSWORD 'password';
postgres=\# CREATE DATABASE "cda-generator" OWNER gazelle ENCODING UTF-8;
postgres=\# \\q
exit
To insert values you can connect to the database
psql -U gazelle cda-generator
Then copy paste the following script:
-- PostgreSQL database dump
--
SET statement\_timeout = 0;
SET client\_encoding = 'UTF8';
SET standard\_conforming\_strings = on;
SET check\_function\_bodies = false;
SET client\_min\_messages = warning;
SET search\_path = public, pg\_catalog;
--
-- Data for Name: cmn\_application\_preference; Type: TABLE DATA; Schema: public; Owner: gazelle
--
INSERT INTO cmn\_application\_preference VALUES (1, 'java.lang.Boolean', '', 'application\_database\_initialization\_flag', 'true');
INSERT INTO cmn\_application\_preference VALUES (2, 'java.lang.String', '', 'application\_name', 'CDAGenerator');
INSERT INTO cmn\_application\_preference VALUES (3, 'java.lang.String', '', 'application\_admin\_name', 'Eric Poiseau');
INSERT INTO cmn\_application\_preference VALUES (4, 'java.lang.String', '', 'application\_admin\_email', '[email protected]');
INSERT INTO cmn\_application\_preference VALUES (5, 'java.lang.String', '', 'application\_email\_account\_for\_history', '[email protected]');
INSERT INTO cmn\_application\_preference VALUES (6, 'java.lang.String', '', 'application\_issue\_tracker\_url', 'jira');
INSERT INTO cmn\_application\_preference VALUES (7, 'java.lang.String', '', 'application\_gazelle\_release\_notes\_url', '[*https://gazelle.ihe.net/jira/browse/CDAGEN*](https://gazelle.ihe.net/jira/browse/CDAGEN)\#selectedTab=com.atlassian.jira.plugin.system.project%3Achangelog-panel');
INSERT INTO cmn\_application\_preference VALUES (8, 'java.lang.String', '', 'time\_zone', 'time\_zone');
INSERT INTO cmn\_application\_preference VALUES (9, 'java.lang.String', '', 'application\_zone', 'dd');
INSERT INTO cmn\_application\_preference VALUES (10, 'java.lang.String', '', 'application\_profile', 'prod');
INSERT INTO cmn\_application\_preference VALUES (11, 'java.lang.String', '', 'application\_admin\_name', 'Eric Poiseau');
INSERT INTO cmn\_application\_preference VALUES (12, 'java.lang.String', '', 'dds\_ws\_endpoint', '[*https://gazelle.ihe.net/DDSWS/DemographicDataServerBean?wsdl*](https://gazelle.ihe.net/DDSWS/DemographicDataServerBean?wsdl)');
INSERT INTO cmn\_application\_preference VALUES (14, 'java.lang.String', '', 'schematron\_validator', '[*http://jumbo.irisa.fr:8080/SchematronValidator-SchematronValidator-ejb/GazelleObjectValidatorWS?wsdl*](http://jumbo.irisa.fr:8080/SchematronValidator-SchematronValidator-ejb/GazelleObjectValidatorWS?wsdl)');
INSERT INTO cmn\_application\_preference VALUES (15, 'java.lang.String', '', 'gazelle\_bin', '/opt/gazelle/bin');
INSERT INTO cmn\_application\_preference VALUES (16, 'java.lang.String', '', 'cda\_result\_detail', '[*https://gazelle.ihe.net/EVSClient/xsl/schematronResultStylesheet.xsl*](https://gazelle.ihe.net/EVSClient/xsl/schematronResultStylesheet.xsl)');
INSERT INTO cmn\_application\_preference VALUES (13, 'java.lang.String', '', 'xsl\_path', '[*https://gazelle.ihe.net/xsl/*](https://gazelle.ihe.net/xsl/)');
INSERT INTO cmn\_application\_preference VALUES (17, 'java.lang.String', '', 'sex\_oid', '1.3.6.1.4.1.21367.101.101');
INSERT INTO cmn\_application\_preference VALUES (18, 'java.lang.String', '', 'religion\_oid', '1.3.6.1.4.1.21367.101.122');
INSERT INTO cmn\_application\_preference VALUES (19, 'java.lang.String', '', 'race\_oid', '1.3.6.1.4.1.21367.101.102');
INSERT INTO cmn\_application\_preference VALUES (21, 'java.lang.String', '', 'application\_url', '[*https://gazelle.ihe.net/CDAGenerator*](https://gazelle.ihe.net/CDAGenerator)');
INSERT INTO cmn\_application\_preference VALUES (25, 'java.lang.String', '', 'evs\_url', '[*https://gazelle.ihe.net/EVSClient*](https://gazelle.ihe.net/EVSClient)');
INSERT INTO cmn\_application\_preference VALUES (23, 'java.lang.String', '', 'cda\_xsd', '/opt/CDAGenerator/xsd/ihe\_lab/infrastructure/cda/LabCDA.xsd');
INSERT INTO cmn\_application\_preference VALUES (24, 'java.lang.String', '', 'cdaepsos\_xsd', '/opt/CDAGenerator/xsd/cda\_epsos/CDA\_extended.xsd');
INSERT INTO cmn\_application\_preference VALUES (26, 'java.lang.String', '', 'doc\_path', '/opt/CDAGenerator/doc/');
INSERT INTO cmn\_application\_preference VALUES (22, 'java.lang.String', '', 'svs\_repository\_url', '[*https://gazelle.ihe.net*](https://gazelle.ihe.net)');
INSERT INTO cmn\_application\_preference VALUES (27, 'java.lang.String ', '', 'app\_documentation', '[*https://gazelle.ihe.net*](https://gazelle.ihe.net)');
INSERT INTO cmn\_application\_preference VALUES (31, 'java.lang.String', '', 'cdapharm\_xsd', '/opt/CDAGenerator/xsd/xsd-pharm-tiani/extendedschemas/CDA\_extended\_pharmacy.xsd');
INSERT INTO cmn\_application\_preference VALUES (35, 'java.lang.Boolean', 'Enable or Disable http security headers', 'security-policies', 'false');
INSERT INTO cmn\_application\_preference VALUES (36, 'java.lang.String', 'Sites can use this to avoid clickjacking attacks, by ensuring that their content is not embedded into other sites', 'X-Frame-Options', 'SAMEORIGIN');
INSERT INTO cmn\_application\_preference VALUES (34, 'java.lang.String', '', 'svs\_endpoint', '[*https://gazelle.ihe.net/SVSSimulator/rest/RetrieveValueSetForSimulator*](https://gazelle.ihe.net/SVSSimulator/rest/RetrieveValueSetForSimulator)');
INSERT INTO cmn\_application\_preference VALUES (37, 'java.lang.String', 'Application should return caching directives instructing browsers not to store local copies of any sensitive data.', 'Cache-Control', 'private, no-cache, no-store, must-revalidate, max-age=0');
INSERT INTO cmn\_application\_preference VALUES (38, 'java.lang.String', 'is a security feature that lets a web site tell browsers that it should only be communicated with using HTTPS, instead of using HTTP', 'Strict-Transport-Security', 'max-age=31536000 ; includeSubDomains');
INSERT INTO cmn\_application\_preference VALUES (39, 'java.lang.String', ' is an added layer of security that helps to detect and mitigate certain types of attacks, including Cross Site Scripting (XSS) and data injection attacks', 'X-Content-Security-Policy', '');
INSERT INTO cmn\_application\_preference VALUES (40, 'java.lang.String', 'Chrome flag, uses X-Content-Security-Policy values', 'X-WebKit-CSP', 'Use X-Content-Security-Policy values');
INSERT INTO cmn\_application\_preference VALUES (41, 'java.lang.String', 'Chrome flag, uses X-Content-Security-Policy-Report-Only values', 'X-WebKit-CSP-Report-Only', 'Use X-Content-Security-Policy-Report-Only values');
INSERT INTO cmn\_application\_preference VALUES (42, 'java.lang.String', 'Configuring Content Security Policy involves deciding what policies you want to enforce, and then configuring them and using X-Content-Security-Policy to establish your policy.', 'X-Content-Security-Policy-Report-Only', 'default-src ''self'' \*.ihe.net www.epsos.eu; script-src ''self'' ''unsafe-eval'' ''unsafe-inline''; style-src ''self'' ''unsafe-inline'';');
INSERT INTO cmn\_application\_preference VALUES (43, 'java.lang.Boolean', 'Enable or Disable Sql Injection filter', 'sql\_injection\_filter\_switch', 'false');
INSERT INTO cmn\_application\_preference VALUES (44, 'java.lang.String', '', 'assertion\_manager\_url', '[*https://gazelle.ihe.net/AssertionManager*](https://gazelle.ihe.net/AssertionManager)');
INSERT INTO cmn\_application\_preference VALUES (45, 'java.lang.String', '', 'svs\_simulator\_restful\_url', '[*https://gazelle.ihe.net/SVSSimulator/rest/RetrieveValueSetForSimulator*](https://gazelle.ihe.net/SVSSimulator/rest/RetrieveValueSetForSimulator)');
INSERT INTO cmn\_application\_preference VALUES (29, 'java.lang.String', '', 'ip\_login\_admin', '.\*');
INSERT INTO cmn\_application\_preference VALUES (28, 'java.lang.Boolean', '', 'ip\_login', 'f');
INSERT INTO cmn\_application\_preference VALUES (48, 'java.lang.Boolean', '', 'cas\_enabled', 'true');
INSERT INTO cmn\_application\_preference VALUES (47, 'java.lang.String', '', 'application\_works\_without\_cas', 'false');
INSERT INTO cmn\_application\_preference VALUES (46, 'java.lang.String', '', 'cas\_url', '[*https://gazelle.ihe.net/cas/*](https://gazelle.ihe.net/cas/)');
INSERT INTO cmn\_application\_preference VALUES (47, 'java.lang.String', ' ', 'bbr_folder', '/opt/CDAGenerator/BBR/');
INSERT INTO cmn\_application\_preference VALUES (48, 'scorecard_root_oid', 'An OID with trailing DOT (.)', 'java.lang.String', 'The root OID for identifying scorecards');
INSERT INTO cmn\_application\_preference VALUES (49, 'scorecard_next_index', '1', 'java.lang.Integer', 'The next index to be used for identifying scorecards');
variable | Description | type | default |
---|---|---|---|
app_documentation | link to documentation of the tool | java.lang.String | https://gazelle.ihe.net/content/cda-model-based-validation |
application_admin_email | email of the admin | java.lang.String | [email protected] |
application_admin_name | name of the admin | java.lang.String | Eric Poiseau |
application_database_initialization_flag | inserted by the application | java.lang.Boolean | true |
application_email_account_for_history | email of the admin | java.lang.String | [email protected] |
application_gazelle_release_notes_url | release notes’ url | java.lang.String | https://gazelle.ihe.net/jira/browse/CDAGEN#selectedTab=com.atlassian.jira.plugin.system.project%3Achangelog-panel |
application_issue_tracker_url | issue tracker url | java.lang.String | jira |
application_name | application’s name | java.lang.String | CDAGenerator |
application_profile | application’s profile (always prod) | java.lang.String | prod |
application_url | application’s URL | java.lang.String | https://gazelle.ihe.net/CDAGenerator |
application_works_without_cas | cas configuration | java.lang.Boolean | false |
application_zone | application zone | java.lang.String | GMT+1 |
assertion_manager_url | link to assertion manager | java.lang.String | https://gazelle.ihe.net/AssertionManagerGui |
Cache-Control | Application should return caching directives instructing browsers not to store local copies of any sensitive data. | java.lang.String | private, no-cache, no-store, must-revalidate, max-age=0 |
cas_enabled | Enables connecting using cas. If disabled, the application will use IP login if ip_login is set to true. |
java.lang.Boolean | true |
cas_url | cas url | java.lang.String | https://gazelle.ihe.net/cas |
cda_result_detail | link to cda stylesheet result | java.lang.String | https://gazelle.ihe.net/EVSClient/xsl/schematronResultStylesheet.xsl |
cda_xsd | path to schema | java.lang.String | /opt/CDAGenerator/xsd/ihe_lab/infrastructure/cda/LabCDA.xsd |
ip_login | Enables the connection by IP. This can only be activated if cas is disabled. | java.lang.String | /opt/CDAGenerator/xsd/ihe_lab/infrastructure/cda/LabCDA.xsd |
ip_login_admin | Regex IP needs to match to be connected to the application when IP login is enabled. Has no effect if cas is enabled. | java.lang.String | /opt/CDAGenerator/xsd/ihe_lab/infrastructure/cda/LabCDA.xsd |
Before compiling, go to the CDAGenerator’s project directory and edit the file pom.xml. Open this file and adapt the properties of profile ‘prod’ to your case :
jdbc.connection.url : jdbc:postgresql:cda-generator
jdbc.connection.user / jdbc.connection.password : credentials for database access
Then, create the EAR archive with the command line:
cd CDAGenerator
mvn clean package
The archive (EAR) and the distribution file are created and placed into CDAGenerator/CDAGenerator-ear/target directory.
Copy the CDAGenerator.ear into the “standalone/deployments” directory of your JBoss 7.2 server. Finally, start your server.
When the application is deployed, open a browser and go to http://yourserver/CDAGenerator.
If the deployment and the database initializations are successful, you should see the home page of the tool.
The administrator is able to configure the documentation of the validation constraints and rules
First, the user shall be logged in as an administrator.
Then, go to Administration > Constraints Management > Constraints-admin
The user shall then upload the XML file generated from the model of constraints into the tool using the button “Add” (see screenshot above).
After the upload process is complete, click on the button “Delete and Generate”. This button will delete all the constraints related to packages that are mentioned in the uploaded XML file. If there are some constraints related to other packages, there will not be deleted. All the informations of the XML document are inserted in the database of the tool.
This part is dedicated to administrators of CDAGenerator.
To access the BBR configuration pag,e you need to go to the menu Administration > Building Block Repository
A BBR is the export coming from ART-DECOR in HL7 Templates format. This tool allows to generate validators based on this export and using Gazelle ObjectsChecker technology. You can find in the paragraph references, some references to the documentation of both Gazelle ObjectsChecker and ART-DECOR.
The main idea regarding the definition of the BBRs in CDA is to compile them and to deploy them. You are able to create a new BBR using the button “Create BBR” :
You need to specify the name of your validation tool and the link to the BBR as well. You can provide the xml export as a file and upload it, or you can provide an URL to the BBR.
Example of URL : https://art-decor.ihe-europe.net/decor/services/RetrieveProject?prefix=IHE-EYE-SUM-&version=&mode=verbatim&language=en-US&download=true&format=xml
The checkbox “Is Active?” is used to expose the BBR for the validation or not.
In the table, we have six buttons in the “Actions” column :
We can filter BBRs using the filter part of the page :
The parameters used in filters are :
When a BBR is added, its name is used in the validation service in EVSClient (if it is active). The filtering of the BBR in EVSClient is based on the same principle of filtering as the other validators, if the name of the BBR contains a word coming from the referenced standard in EVSClient, it is proposed as a validator by CDAGenerator
Here is the process in the background for a user, how CDAGenerator works :
The workflow for the Administrator is described by this sequence diagram :
When you click on the button “Validate” the application executes on the server the generation of the validation tool based on the BBR uploaded in the tool. The default folder used in this case is /opt/CDAGenerator/BBR. You can customize this location by changing the preference of the application named “bbr_folder”. The architecture of this folder is described below:
BBR
├── generatedValidators
│ ├── archives
│ │ ├── 1
│ │ │ ├── iheeyegeecn-validator-app-0.0.1-SNAPSHOT-1.zip
│ │ ├── 2
│ │ └── ccdaadr11-validator-app-2.zip
│ ├── execs
│ ├── 1
│ ├── bin
│ │ ├── resources
│ │ ├── validator.bat
│ │ └── validator.sh
│ ├── documentation
│ │ └── iheeyegeecn-constraint.xml
│ └── repo
├── generator
│ ├── hl7templates-packager-app
│ ├── generateValidator.sh
│ ├── packager
│ │ ├── bin
│ │ │ ├── generator.bat
│ │ │ └── generator.sh
│ │ └── repo
│ │ ├── list jars
│ └── version.txt
The validators describer is a link between the documentation and the validators. This allows us to have an architecture of the validators.
To access this page you need to go to menu Administration > Validators Packages :
This page is for the administrators of the tool. It represents an association between validators and packages of documentation. For each association we have an id, the validator name, the list of the validator’s parents and the list of packages directly related to the validator. The complete list of packages related to a validator is the concatenation of the direct related packages, and the sum of all the packages list related to the parents, grand-parents (and so) of the validator. You can create a new validator association by clicking on the button “Create Validator association”.
The “Action” column contains three buttons : view, edit and delete. The edit page looks like this :
The view page for the ValidatorDescriber looks like this :
The validatorDescriber is used by CDAGenerator for the scoring of the validation results.