Im working with a Mirth Channel.
Source is a Database Reader, Destination currently is a File Writter.
Im attempting to get a xml message from the database, transform it to HL7 and store it on a flat file. Each HL7 message needs to be stored on a separate flat file.
So far mirth gets the xml, transforms it into HL7 but it stores all the messages in the same flat file.
Any tips on what should i try? Should i use JavaScript writter instead of a File Writter?
In light of your response that the format of the file name is not important, this is a simple solution. Just drag-and-drop "Message ID" from the destination Mappings box to the File Name box. Every message for this channel will have a unique message id.
Alternatively, you can type ${message.messageId}
into the File Name box.
The file writer destination has two fields to be filled the directory and file name. In this case, I suggest combining string literals with a couple of global or system variables such as count, date, rawdata etc. (check the bottom right pane of the destination transformer for this). In the below example, I am using the count feature to serialize messages that are converted to HL7 in addition to the system date variable which will show the date a message is processed.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.