Validate and Translate Process

The ValidateAndTranslate example shows how to validate input data and translate it from one data format to another data format using three different methods of specifying validation guidelines and translation maps.

For more information about validating and translating data, see ValidateHL7 and TranslateHL7.

Example Process

The Validate and Translate process is illustrated here:

Process Definition

The process illustrates validation of an HL7 file and translation of the file to XML format using three different methods.

  • Validation and Translation directly assigning a guideline and map
  • Validation and Translation using a Callback to select a guideline and map by name
  • Validation and Translation using a Callback to select a guideline and map from memory

Validation and Translation directly assigning a guideline and map

This process performs the following operations:
  1. The FilePoller activity polls the file named VXR_V03_ascii.txt in the directory specified in the File Name field of the Configuration tab. If the file exists then the process starts.

    The VXR_V03_ascii.txt file is passed to the Validate_case1 activity.

  2. The Validate_case1 activity validates VXR_V03_ascii.txt file using the VXR_V03.std file. The VXR_V03.std file has been specified directly during configuration of the Validate_case1 activity, as shown here:

    The validated file is passed to the Translate_case1 activity.

  3. The Translate_case1 activity translates the validated file using the VXR_V03_VXR_V03_EX.map file.

    The VXR_V03_VXR_V03_EX.map file has been specified directly during configuration of the Translate_case1 activity, as shown here:

    Translate_case1 activity translates the input HL7 string into an XML format.

For more information about validating and translating data, see ValidateHL7 and TranslateHL7.

Validation and Translation using a CallBack to select a guideline and map by name

This process performs the following operations:
  1. The FilePoller activity polls the file named VXR_V03_ascii.txt in the directory specified in the File Name field of the Configuration tab. If the file exists then the process starts.

    The VXR_V03_ascii.txt file is passed to the Validate_case2 activity.

  2. The Validate_case2 activity validates VXR_V03_ascii.txt file using a guideline selected with a ValidateHL7 CallBack. ValidateHL7 CallBack allows you to select validation guidelines and validation profiles based on the contents of the input data by modifying Java code.

    In this case, the available guidelines exist on disk and the correct guideline is selected using a CallBack based on information contained in the input file header information. For example, if the input file header contains the value "X", the CallBack knows to select guideline "Y".

    For more information about validating data using CallBacks, see ValidateHL7 CallBack.

    The validated file is passed to the Translate_case2 activity.

  3. The Translate_case2 activity translates the validated file using a translation map specified with a TranslateHL7 CallBack. TranslateHL7 CallBack allows you to select a translation map based on the contents of the input data by modifying Java code.

    In this case, the available translation maps exist on disk and the correct map is selected using a CallBack based on information contained in the input file header information. For example, if the input file header contains the value "X", the CallBack knows to select translation map "Y".

    For more information about translating data using CallBacks, see TranslateHL7 CallBack.

    Translate_case2 activity translates the input HL7 string into an XML format.

Validation and Translation using a Callback to select a guideline and map from memory

This process performs the following operations:
  1. The FilePoller activity polls the file named VXR_V03_ascii.txt in the directory specified in the File Name field of the Configuration tab. If the file exists then the process starts.

    The VXR_V03_ascii.txt file is passed to the Validate_case3 activity.

  2. The Validate_case3 activity validates VXR_V03_ascii.txt file using the a guideline specified with a ValidateHL7 CallBack. ValidateHL7 CallBack allows you to select validation guidelines and validation profiles based on the contents of the input data by modifying Java code.

    In this case, the available guidelines exist in the memory buffer and the correct guideline is selected using a CallBack based on information contained in the input file header information. For example, if the input file header contains the value "X", the CallBack knows to select guideline "Y".

    For more information about validating data using CallBacks, see ValidateHL7 CallBack.

    The validated file is passed to the Translate_case3 activity.

  3. The Translate_case3 activity translates the validated file using a translation map specified with a TranslateHL7 CallBack. TranslateHL7 CallBack allows you to select a translation map based on the contents of the input data by modifying Java code.

    In this case, the available translation maps exist in the memory buffer and the correct map is selected using a CallBack based on information contained in the input file header information. For example, if the input file header contains the value "X", the CallBack knows to select translation map "Y".

    For more information about translating data using CallBacks, see TranslateHL7 CallBack.

    Translate_case3 activity translates the input HL7 string into an XML format.