user1889775
user1889775

Reputation: 9

Error Reading Multiple Segments from Mirthconnect

I am trying to read multiple segments (OBR) from HL7 message to database using Mirthconnect. The message is going through fine and Mirthconnect recording as Database write success, however I cannot see the data in the database. Can anyone please tell me how can I debug Mirthconnect connection with a database.

HL7 Message:

MSH|^~\&|AA|AA1|MSFT|AA1|20121203104758||OMG^O19|861232|T|2.4|||KA
PID|||P1563626|W981189|TEST^TEST^""^^MISS||20120910|F|||||||||||||||||||||""|L
PV1|||HOSP1||||||V2567697 ORC|WT|2R000112|||SD||||||||HOSP1 OBR|1|2R000112||TEST 1
ORC|WT|2R000445|||SD||||||||HOSP1 OBR|1|2R000445||TEST 2 ORC|WT|2R000399|||SD
||||||||HOSP1 OBR|1|2R000399||TEST 3

Upvotes: 0

Views: 863

Answers (1)

Samavarti
Samavarti

Reputation: 11

Start off by creating a Javascript Transformer in your Mirth Channel. Copy your HL7 in the Source Transformer Message Translator window. YOu can create java script that would allow you to go through and iterate through the OBR segments.

var observation = {};
for each (obr in msg.OBR) {
 observation.type = obr['OBR.2'].toString();
}

Try the above mentioned and let us know.

Upvotes: 1

Related Questions