Scenario: Generating an HL7 Acknowledgment message - 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

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: