Smile CDR v2024.05.PRE
On this page:

42.6.1smileutil: HL7 v2.x Transmit Flat File

 

The 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).

42.6.2Usage

 
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.

42.6.3Options

 
  • -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 .gz or .bz2 will be expanded during processing.
  • -h [hostname] (or --host) – The target hostname. Note again that this command utilizes MLLP for transmission, and as such, the inclusion of the http(s):// prefix is unnecessary (and erroneous).
  • -p [port] (or --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.
  • -c [maximum] (or --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. ADT^A01,ADT^A03 or ADT^*).
  • --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.
  • -r [attempts] (or --retry-count) – (optional) If set, this option specifies the number of times to retry a failing message before giving up. The default is 0.
  • -s (or --stop-on-error) – (optional) If set, the command will stop upon receiving a non-successful code from the receiving system in an ACK.
  • -t [seconds] (or --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.

42.6.4Multiplex Paths

 

Multiplexing paths may be in either the form PATH/TO/SEGMENT/SEG-N-N or in the form SEG-N-N.

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.