
Component family |
Business > Healthcare /Unstructured > HL7 |
|
Function |
Writes an HL7 structured file and inserts the data row by |
|
Purpose |
This component writes an HL7 structured file according to the HL7 |
|
Basic settings |
Property Type |
Either Built-In or Repository. |
|
|
Built-in: No property data stored |
|
|
Repository: Select the Repository |
|
Schema(s) |
Schema: Enter the node on which Parent row: The data flow |
|
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 |
|
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 |
|
Encoding |
Select the encoding type from the list or select Custom and define it manually. This field |
|
tStatCatcher Statistics |
Select this check box to gather the Job processing metadata at a |
Global Variables |
ERROR_MESSAGE: the error message generated by the A Flow variable functions during the execution of a component while an After variable To fill up a field or expression with a variable, press Ctrl + For further information about variables, see Talend Studio |
|
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 |
This scenario describes a three-component Job which generates an HL7 Acknowledgment
(ACK) message.

-
Drop two tFixedFlowInput components and
one tHL7Output component onto the
workspace. -
Rename the two tFixedFlowInput components
as MSH and MSA respectively. -
Link MSH and MSA to tHL7Output using a
Row > Main connection. -
Rename the link between MSH and tHL7Output to MSH.
-
Rename the link between MSA and tHL7Output to MSA.
-
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. -
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. -
In the [Open] window, select the file
that contains the following HL7 ACK message.12MSH|^~&|CATH|StJohn|AcmeHIS|StJohn|20130808||ACK|MSGID8|P|2.3MSA|AA|MSGID8For 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. -
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. -
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. -
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
beforein 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""
. -
-
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/. -
For a related use case, see Scenario: Retrieving information about patients and events from an HL7 file.