Validate and Translate Process

The ValidateAndTranslate example shows how to validate input data and translate it from one data format to another data format by 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 by using three different methods.

  • Validation and Translation directly assigning a guideline and map
  • Validation and Translation by using a Callback to select a guideline and map by name
  • Validation and Translation by 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 on 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 the VXR_V03_ascii.txt file by using the VXR_V03.std file. The VXR_V03.std file is 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 by using the VXR_V03_VXR_V03_EX.map file.

    The VXR_V03_VXR_V03_EX.map file is 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 by 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 on 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 by using a guideline selected with a ValidateHL7 CallBack. To select validation guidelines and validation profiles based on the contents of the input data use ValidateHL7 CallBack and modify the Java code.

    In this case, the available guidelines exist on disk and the correct guideline is selected by 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 by using CallBacks, see ValidateHL7 CallBack.

    The validated file is passed to the Translate_case2 activity.

  3. The Translate_case2 activity translates the validated file by using a translation map specified with a TranslateHL7 CallBack. To select a translation map based on the contents of the input data use TranslateHL7 CallBack and modify the Java code.

    In this case, the available translation maps exist on disk and the correct map is selected by 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 the translation map "Y".

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

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

Validation and Translation by 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 on 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 by using the guideline specified with a ValidateHL7 CallBack. To select validation guidelines and validation profiles based on the contents of the input data use ValidateHL7 CallBack and modify the Java code.

    In this case, the available guidelines exist in the memory buffer and the correct guideline is selected by 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 by using CallBacks, see ValidateHL7 CallBack.

    The validated file is passed to the Translate_case3 activity.

  3. The Translate_case3 activity translates the validated file by using a translation map specified with a TranslateHL7 CallBack. To select a translation map based on the contents of the input data use TranslateHL7 CallBack and modify the Java code.

    In this case, the available translation maps exist in the memory buffer and the correct map is selected by 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 the translation map "Y".

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

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