2
votes

I am trying to learn a mirth system with a channel that is pulling from a database for its source and outputting hl7 messages for its destination(s). The SQL query pulls the correct data from the source--but Mirth does not output all of the data in the right spots in the HL7 message. The destinations show that it is outputting Template:${message.encodedData}. What does that mean? Where can I see the template that it using. The destinations don'y have any filters or transformers so I am confused.

2

2 Answers

4
votes

message.encodedData is the fully transformed message - after any transformation steps.

The transformer is also where you can specify the output template for how you want the data to look. Simply load up a sample template message in the output template of the transformer (message template tab in the transformer) and then create a series of message builder steps. Your output message will be in the variable tmp, and your sql results will be in the variable msg.

So, if your first column is patientID (Select patientiD as patientID ...), you would create a message builder steps along the lines of

mapped segment: tmp['PID']['PID.3']['PID.3.2'] mapping: msg['patientID'];

I don't have exact syntax in front of me right now, but that's the basic idea.

1
votes

I think "transformed" is the status of the message right after the transformers are executed and "encoded" message is the status after the message that comes from the transformers is encoded into the specified channel outbound datatype. In some cases those messages will be the same but not in all the cases.

Also, is very difficult to find updated and comprehensive Mirth documentation.