Difference between revisions of "Edi Lenient Mode"

From FMR Knowledge Base
Jump to navigation Jump to search
Line 20: Line 20:
  
 
<code>
 
<code>
SET JAVA_OPTS=-Djson.legacy.enabled=true
+
SET JAVA_OPTS=-Dedi.lenient.enabled=true
 
</code>
 
</code>
 
''(For Windows systems)''
 
''(For Windows systems)''
  
 
<code>
 
<code>
export JAVA_OPTS=-Djson.legacy.enabled=true
+
export JAVA_OPTS=-Dedi.lenient.enabled=true
 
</code>
 
</code>
 
''(For Unix systems)''
 
''(For Unix systems)''

Revision as of 01:29, 22 April 2020

Fusion Registry may be run in "EDI Lenient" mode. When running in this mode certain aspects of EDI which are enforced by the EDI standard are ignored.

Structures

EDI does not permit a structure to reference another structure belonging to a different Agency. When running in EDI Leniency mode, this restriction is disabled and the structures will all be stated as belonging to the same agency. For example, a Data Structure Definition in Agency 1 if it refers to a Codelist in Agency 2 cannot strictly be converted into EDI since EDI cannot express that the DSD and Codelist are in different agencies. In EDI Leniency mode, the outputted EDI file would state that both are owned by Agency1. The EDI standard does not support uncoded dimensions in a Data Structure. All dimensions must be explicitly coded. When running in EDI Leniency mode, Data Structures with uncoded dimensions may be read or written without an exception being thrown.

Data

EDI enforces the following limits on a data file:

  • The Observation Value is limited to a maximum of 15 characters
  • The Observation Attribute “OBS_STATUS” is limited to a maximum of 35 characters
  • The Observation Attribute “OBS_CONF” is limited to a maximum of 35 characters
  • The Observation Attribute “OBS_PRE_BREAK” is limited to a maximum of 15 characters

When running in EDI Leniency mode, none of the above restrictions apply when reading or writing a data file.

Enabling EDI Leniency Mode

To run the Registry in EDI Lenience Mode, the Registry must be started and a Java System variable called "edi.lenient.enabled" must be specified and set to "true". This is supplied via the -D parameter thus: -Dedi.lenient.enabled=true

When using Apache Tomcat, the simplest way to perform this is by modifying the setenv.bat or setenv.sh file. To illustrate this:

SET JAVA_OPTS=-Dedi.lenient.enabled=true (For Windows systems)

export JAVA_OPTS=-Dedi.lenient.enabled=true (For Unix systems)