I am new to Mirth and have recently installed v1.4. All of the tutorials that I have found are specific to previous versions of Mirth and I am having trouble creating some simple transformers. Currently, I have a source and destination file reader that reads and writes an HL7 file from one directory to another. I would like to make some modifications to the data as it comes across this channel, but I am having trouble doing so. Does anyone have v1.4 example/tutorial of creating a transformer that changes a single field in a message? My sample message is an A01 admit patient.
Announcement
Collapse
No announcement yet.
Assistance creating transformer in v1.4
Collapse
X
-
Re: Assistance creating transformer in v1.4
I appreciate the links, but they do not give me the answer I am looking for. I would like to know how to migrate field data from one location to another. A specific example would be overwriting PID-5.2 with the value found in PID-5.1. My test message follows:
MSH|^~\&|SYM|TEST|COMPANY|ADT|200701081422||ADT^A0 1|CHPFXFER|P|2.3
EVN||20070416143000
PID|||9000||Jackson^Janet^^^^^L||19600206|F||||||| |A||9000
PV1|0001|I|^400^1||||||||||||||||000002278929||||| ||||||||||||||||||||200701081000
I have a simple file reader to file writer setup, so if someone could paste the above listed channel, I would greatly appreciate it.
Comment
-
Re: Assistance creating transformer in v1.4
Refer to the sample in Wiki. This sample worked fine for Mirth 1.x but not sure about Mirth 1.4. But it does give a general idea about replacing a segment with another.
Sample From Wiki
[orange]
Modifying HL7 Messages
[/orange]
[hr]
The one I tried in Mirth 1.x was for Hl7 message DFT^P03, "copy segment 7 to segment 25":
Code:// Copy segment 7 to 25 msg['DFT_P03.FINANCIAL']['FT1']['FT1.25']['CE.1'] = msg['DFT_P03.FINANCIAL']['FT1']['FT1.7']['CE.1']; //put the modified message back to the map hl7_xml = msg;
Comment
-
Re: Assistance creating transformer in v1.4
I have a REALLY simple file to file V1.4 channel that reads in an HL7 message from a file, moves selected MSH and PID fields from the inbound message to the outbound message structure, and outputs only the newly created MSH and PID segments to another file.
I'll be happy to send you the exported channel (xml file) if you e-mail me at [email protected].
Bob D.Bob Dilworth
University of Toledo Medical Center
Toledo, Ohio
Comment
-
Re: Assistance creating transformer in v1.4
Here's the sample code for Mirth 1.4:
Transformer Step:
Code:// Copy financial segment 7 to 25 msg['DFT_P03.FINANCIAL']['FT1']['FT1.25']['CE.1'] = msg['DFT_P03.FINANCIAL']['FT1']['FT1.7']['CE.1'];
Template: ${message.rawData}
Comment
Comment