HL7 File Writer

HL7 file-writer handler writes output records to a specified path, with various output options.

Purpose

The HL7 File Writer handler writes its output records into a file. In addition to specifying the output path, additional options are available for creating the output file if it does not already exist, including creating the file hourly or daily, or one for every output record, by specifying the “export mode” parameter. Valid export-modes are –

  • PER_DAY
  • PER_HOUR
  • PER_RECORD

Note, on start, the handler will attempt to create the specified output path if it does not exist, while giving a warning in the log.

Parameters

The following three parameters can be configured through the handler’s config file.

NameValuesRemark
target-pathA path string
export-modeOne of the predefined constant values. (see above)If this parameter is missing invalid, the output file will be created as one file per container.

Config Example

In the HL7FileWriter handler’s config in this example, it writes its output records to path ‘C:\Temp’ creating one separate file per record.

  <Handler>HL7FileWriter</Handler>
  <Parameters>
    <Parameter>
	  <!-- PER_RECORD, PER_HOUR, PER_DAY, or default "per container source" -->  
	  <Name>export-mode</Name>
	  <Value>PER_RECORD</Value>
	</Parameter> 
	<Parameter>
	  <Name>target-path</Name>
	  <Value>C:\Temp</Value>
	</Parameter>
  </Parameters>

See Also

The HL7 File Reader handler.