EhValidationTool Quick Start Guide
----------------------------------

1. Purpose
2. Using the GUI
3. Using the library
4. External libraries
5. Versionning


1. Purpose
----------
The EhValidationTool is designed to help people from the medical world in creating valid Sumehr, SMF or PMF files. It will check the file against the Kmehr schema and the business rules as published on the Kmehr website (https://www.ehealth.fgov.be/standards/kmehr/).

2. Using the GUI
----------------
Make sure you've extracted the files and kept the folder structure intact. Double-click on the ehvalidator-gui-XXX.jar file (where XXX is the version number) to launch the Ehealth Validation Tool.
You can click the Browse button to select a file to validate. Some sample files are provided with this distribution.

3. Using the library
--------------------
The EhValidationTool also includes a library that can either be integrated in a java project (see javadoc for details) or used through the command-line. To launch it, go to the lib folder using your favourite command-line interpreter and enter the following command (where XXX is the version number):

	java -jar ehvalidator-core-XXX.jar <FILENAME>

This will produce the standard validation result to screen. You can redirect the output to file, and change the formatting from XML to HTML using command-line arguments. These arguments are described if you launch the tool without arguments :
	java -jar ehvalidator-core-XXX.jar.

Please note that, when run from the command line, the validation output (in HTML or XML format) are redirected to the Standard Output (STDOUT), whereas any error or information messages are redirected to the Standard Error (STDERR). This is useful if you are performing batch processing, because you can be certain that your XML file will either be correct, or empty in case an error occurred.

You could also redirect the output to a file, and the error to another file :
	java -jar ehvalidator-core-XXX.jar -request xmlreport sumehr.xml > result.xml 2> errors.log
If the validation report could be produced, it will be in result.xml, and any error messages can be found in the errors.log file.


4. External libraries
---------------
The EhValidationTool is bundled with the following libraries :
    - dom4j-1.6.1
    - icu4j-2.6.1
    - jaxen-1.1.1
    - jdom-1.0
    - log4j-1.2.13
    - probatron4j-0.7.4
    - xalan-2.6.0
    - xercesImpl-2.6.2
    - xml-apis-1.0.b2
    - xmlParserAPIs-2.6.2
    - xom-1.0

In order to guarantee integrity, eHealth has signed these libraries, so they will not match the md5 identifiers of the files downloaded from the internet. The relevant licenses can be found in the licenses directory. Note that all files from the Apache XML Project fall under the same Apache XML License.


5. Versionning
--------------

***********
* v.1.0.1 *
***********

- Bug fixing	
	- Full support of named namespaces 
	- Correct display of accented characters within GUI report table

- Updates
	- Rules revision according to the 2010-08-01 Sumehr specification (medication/vaccine items)
	- Visualisation adaptation with respect to those new rules

- New features/improvements
	- Help menu added in the main window
	


***********
* v.1.1.0 *
***********

- Updates
	- Rules revision according to the change request from Prorec and G19 : support of the  item 'patientwill'
	- Visualisation adaptation with respect to this new rule
	- Integration of kmehr 20100901

- New features/improvements
	- Integration of errors and warnings within the visualization	


***********
* v.2.0.0 *
***********

- Updates
- Integration of kmehr release 20110701 (v1.2.0)

- New features/improvements
- Integration of multilingualism. Some german error messages aren't translated yet, especially for the GP Software Migration Format (GPSMF). The multilingualism is not available for the visualisation of GPSMF.
- Integration of GPSMF in the tool

- Bug fixing 
- The logs now reports the correct number of errors and warnings
- The tool now supports accentuated characters in the filepath.

***********
* v.2.1.0 *
***********

- Updates
- Integration of kmehr release 20110701 (v1.2.2)

- New features/improvements
- The tool now accepts element boolean in patientwill for the GPSMF.

- Bug fixing 
- The tool doesn't count as error the use of a recent version of CD-ATC anymore.
- The tool now accepts more than one transactionreason in contactreport (GPSMF).

***********
* v.2.1.1 *
***********

- Updates
	- Integration of kmehr release 20131001 (v1.7.0)
	- All references to GPSMF were transformed in SMF

- New features/improvements
	- The tool now validates Patient Migration Format files.
	- The tool accepts now the use of a content(date) for a GMD manager (SMF-PMF)
	- The ID-KMEHR can now contains ehp format id's or be empty
	- When the tools is processing, an hourglass now appears
	- The sort on number columns in the gui is now numerical instead of alphabetical
	- The value of CD-MESSAGE must be 'gpsoftwaremigration' when validating a SMF and 'gppatientmigration' for a PMF,
		otherwise it will generate an error
	- Added 'notification', 'report', 'prescription' transactions for SMF/PMF validation

- Bug fixing 
	- The tool window doesn't disappear briefly anymore when switching language
	- The tool window keeps now the same size when switching language
	- The sorting of numerical columns was corrected
	- The check of the KMEHR-ID's was improved when using headings and items alternately

***********
* v.2.2.0 *
***********

- Updates
	- Integration of kmehr release 20151201 (v1.14.0)
	
- New features/improvements
	- The tool now accepts boolean content in a 'patientwill' item.
	- Removal of the function to open the xml file when clicking on a transaction name (other than clinicalsummary). Replaced by the a generic display of all the items of the transaction (only for accepted transactions)
	- Display of the info in SL/DN for the id's
	- Display errors of the transactions (other than clinical summary) up to transaction place instead of the top of the page
	- Display errors of the headings at the transaction/item up to transaction/item place instead of the top of the page
	- Display year/yearmonth in beginmoment/endmoment
	- Display of the lign number for errors outside data table
	
- Bug fixing 
	- Some items placed in headings of a clinicalsummary weren't displayed.
	- Improved display of content for generic item display (like unit or hcparty content)
	- Improved display of author/hcparty in generic transaction/item
	- Improved display of careplansubscription item in clinicalsummary
