hl7v2-transmit-flatfile command may be used to load a flat file containing HL7 v2.x messages; it then passes the flat file's contents into a Smile CDR endpoint (e.g. a HL7 v2.x Listening Endpoint module).
bin/smileutil hl7v2-transmit-flatfile -f "messages.hl7" -h "somehost.acme.org" -p 8888
In the example above,
messages.hl7 is a text file containing one or more raw HL7 v2.x messages. These messages will be sent to
somehost.acme.org on port
8888 using the MLLP protocol.
-f [filename or directory](or
--filename) – This argument should point to an individual file or to a directory (in which case all files in the directory will be processed). Note that any files with an extension ending in
.bz2will be expanded during processing.
--host) – The target hostname.
--port) – The target port number.
-b [control ID](or
--begin-at-id) – (optional) If set, all messages in the stream will be skipped until the one with the given control ID.
--count) – (optional) If set, this option specifies a maximum count of messages to send before exiting.
-m [message types](or
--msgtypes) – (optional) If set, this option specifies the message type(s) to send in a comma-separated list. Wildcards are accepted (e.g.
--multiplex-on-field [path]– (optional) If set, this option specifies the path to the field which will be used for multiplexing. See note on Multiplex Paths below.
--multiplex-thread-count [threads]– (optional) If set, transmission will be spread across the specified number of threads.
--retry-count) – (optional) If set, this option specifies the number of times to retry a failing message before giving up. The default is 0.
--stop-on-error) – (optional) If set, the command will stop upon receiving a non-successful code from the receiving system in an ACK.
--timeout) – (optional) If set, this option specifies the number of seconds for the ACK timeout.
--print-failing-structure– (optional) If this argument is provided, upon any failure the entire structure and contents of the failed message will be printed to the console. Use with care as this may print PHI to the console.
Multiplexing paths may be in either the form
PATH/TO/SEGMENT/SEG-N-N or in the form
If the path is explicitly stated, the multiplexer will look for the specific segment within the specified path within the message. If the path is not specified, the multiplexer will look for the first segment in the message with the given name.