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 :
	- commons-io-2.4
	- commons-lang-2.6
    - dom4j-1.6.1
    - hamcrest-core-1.3
    - icu4j-2.6.1
    - jaxen-1.1.1
    - jdom-1.0
    - junit-4.12
    - log4j-over-slf4j-1.7.13
    - logback-classic-1.1.3
    - logback-core-1.1.3
    - probatron4j-0.7.4
    - saxon-dom-9.0
    - saxon-9.1.0.6j-SMALS
    - slf4j-api-1.7.13
    - xalan-2.6.0
    - xercesImpl-2.6.2
    - xml-apis-1.0.b2
    - xmlParserAPIs-2.6.2
    - xmlunit-1.6
    - 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 20161201 (v1.19.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

***********
* v.3.0.0 *
***********

- Updates
	- Integration of kmehr release 20180301 (v1.24.0)
	
- New features/improvements
	- Update of Sumehr v1 to v2
	
***********
* v.3.1.0 *
***********

- Updates
	- Integration of modulo89 for inami numbers
	- Integration of kmehr release 20190901 (v1.29.0)
	
***********
* v.3.2.0 *
***********

- Updates
	- Modified constraints on the author hcparty to allow specialization as last hcparty element
	- Added display of speciality in sumehr author
	
***********
* v.3.3.1 *
***********

- Updates
	- Integration of kmehr release 20210120 (v1.34.0)
	