tHL7Output - 6.3

Talend Open Studio for Big Data Components Reference Guide

EnrichVersion
6.3
EnrichProdName
Talend Open Studio for Big Data
task
Data Governance
Data Quality and Preparation
Design and Development
EnrichPlatform
Talend Studio

Note that this component is deprecated.

Function

Writes an HL7 structured file and inserts the data row by row.

Purpose

This component writes an HL7 structured file according to the HL7 standards.

tHL7Output Properties

Component family

Business > Healthcare /Unstructured > HL7

 

Basic settings

Property Type

Either Built-In or Repository.

 

 

Built-in: No property data stored centrally.

 

 

Repository: Select the Repository file where the properties are stored. The fields that follow are completed automatically using fetched data.

 

Schema(s)

Schema: Enter the node on which the data from the parent row is to be stored.

Parent row: The data flow source.

 

File Name/Output Stream

Browse to where you want to store the file generated.

 

Configure HL7 Tree

Opens the interface in which you can set up the HL7 mapping.

 

HL7 Version

Select your HL7 version from the list.

Advanced settings

Create directory only if it does not exist

This check box is selected by default. This creates a folder for the output file if there isn't one already.

 

Encoding

Select the encoding type from the list or select Custom and define it manually. This field is compulsory.

 

tStatCatcher Statistics

Select this check box to gather the Job processing metadata at a Job level as well as at each component level.

Global Variables

ERROR_MESSAGE: the error message generated by the component when an error occurs. This is an After variable and it returns a string. This variable functions only if the Die on error check box is cleared, if the component has this check box.

A Flow variable functions during the execution of a component while an After variable functions after the execution of the component.

To fill up a field or expression with a variable, press Ctrl + Space to access the variable list and choose the variable to use from it.

For further information about variables, see Talend Studio User Guide.

Usage

Used as an output component. An Input component is required.

Limitation

The name of each input link must be the same as the name of the relevant HL7 message segment.

Scenario: Generating an HL7 Acknowledgment message

This scenario describes a three-component Job which generates an HL7 Acknowledgment (ACK) message.

Dropping and linking the components

  1. Drop two tFixedFlowInput components and one tHL7Output component onto the workspace.

  2. Rename the two tFixedFlowInput components as MSH and MSA respectively.

  3. Link MSH and MSA to tHL7Output using a Row > Main connection.

  4. Rename the link between MSH and tHL7Output to MSH.

  5. Rename the link between MSA and tHL7Output to MSA.

Configuring the components

  1. Click tHL7Output to open its Basic settings view.

    In the File Name/Output Stream field, specify the full output directory of the HL7 ACK message.

    From the HL7 Version drop-down list, select your HL7 version, 2.3 in this example.

  2. Click the Configure HL7 Tree button to open the HL7 tree editor.

    Right-click the rootTag node in the Linker Target panel and select import HL7 Structure from the pop-up contextual menu.

  3. In the [Open] window, select the file that contains the following HL7 ACK message.

     MSH|^~\&|CATH|StJohn|AcmeHIS|StJohn|20130808||ACK|MSGID8|P|2.3
     MSA|AA|MSGID8

    For details about HL7 ACK messages, see http://www.hl7standards.com/blog/2007/02/01/ack-message-original-mode-acknowledgement/.

    Click the Open button to import the structure of this file.

    Then click Ok to close HL7 tree editor. Two rows row_MSH_1 and row_MSA_1 are added in the Schema(s) table in Basic settings view of tHL7Output.

  4. In the Schema(s) table, click in the Parent row field for row_MSH_1 and select MSH from the drop-down list.

    Do the same to select MSA from the drop-down list in Parent row column for row_MSA_1.

  5. In the Schema(s) table, select the cell row_MSH_1 and click the [...] button in the cell to open the schema editor.

    Click the button and then click OK in the pop-up dialog box to copy all MSH segment columns from the output schema to the input schema.

    Do the same to the cell row_MSA_1 and copy all MSA segment columns from the output schema to the input schema.

    This way, you do not have to define the input schemas column by column manually.

  6. Double-click the MSH component to open its Basic settings view.

    Select the Use Single Table option in the Mode area, and fill the Value field for each column:

    • MSH_1_1__1_1_ST_: "|"

    • MSH_2_1__1_1_ST_: "^~\\&", be sure to use the escape character before \ in Use Single Table or Use Inline Table mode

    • MSH_9_1__1_1_ID_: "ACK"

    • MSH_10_1__1_1_ST_: "MSGID66"

    • MSH_11_1__1_1_ST_: "P"

    • MSH_12_1__1_1_ID_: "2.3"

    The columns above must have specific values for the MSH segment. For details, see http://www.hl7.org/documentcenter/public_temp_194525B1-1C23-BA17-0C3D37E51D9F8BA0/wg/conf/HL7MSH.htm. Fill the value fields for the other columns with "".

  7. Double-click the MSA component to open its Basic settings view.

    Select Use Single Table in the Mode area, and fill the Value field for each column:

    • MSA_1_1__1_1_ID_: "AA"

    • MSA_2_1__1_1_ST_: "MSGID66"

    The columns above must have specific values for the MSA segment. For details, see http://www.hl7standards.com/blog/2007/02/01/ack-message-original-mode-acknowledgement/.

Executing the Job

  1. Press Ctrl + S to save the Job.

  2. Press F6 to run the Job.

    As shown above, the Job has been executed successfully.

  3. Open the generated HL7 ACK message: