Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Say you have a text file with a bunch of HL7 messages. Each segment ends with \r. And each message ends with \r\n. Here’s the file attached:

View file
namemessages.hl7

You could use the simulator component - but honestly it’s probably easier to write you own little component.

Expand
titleUse

Expand
titleUse a custom field for the input file name

See Custom Fields

Image Added

You access that with:

Code Block
local FileName = component.fields()
Expand
titleRead in the file using the FIL library with FILread

The FIL library makes it really easy to inhale the file:

Code Block
local Content = FILread("main.lua");
Expand
titleThen we split the file using \r\n

You can look at the file in

that have a custom field for filename, can read in the messages, split them and push them into a queue.

...