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:
You could use the simulator component - but honestly it’s probably easier to write you own little component.
Expand |
---|
title | Use a custom field for the input file name |
---|
|
See Custom Fields Image AddedYou access that with: Code Block |
---|
local FileName = component.fields() |
|
Expand |
---|
title | Read 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 |
---|
title | Then 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.
...