web stats
How can i convert hl7 v2 to json - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 07-31-2018, 10:13 PM
FadiGh FadiGh is offline
What's HL7?
 
Join Date: Jul 2018
Posts: 4
FadiGh is on a distinguished road
Exclamation How can i convert hl7 v2 to json

Hi, i this hl7 message

Code:
MSH|^~\&|IMDLAB|BEFUND|KFHDI|LABOR|20171013155424||ORU^R01|21704245218_00001|P|2.5|||||||
PID|0001||SaDe1961111009Do||Tester^Detlef^^||19611110|M|||Dorfstr. 7^^Ort^12345^D||||||||||||||||||||||
PV1|0001||KFHDI|||||KfH Nierenzentrum - Dialyse 742^9991239^^KfH Kuratorium für Dialyse und^Ferdinand-Sauerbruch-Straße^17489^Greifswald||||||||||||||||||||||||||||||||||||||||||||
ORC|0001|07424945|4007424945||CM||||20170424184903|||||||||||||||||
OBR|0001|07424945|4007424945|GBB-EB^Großes Blutbild im EDTA-Blut:|||20170424184926|||||||20170424184903|KFHDI||||||||||F
OBX|0001|ST|GBB-EB^Großes Blutbild im EDTA-Blut:||Siehe unten|||N|||F||||||1||||||||||
OBR|0001|07424945|4007424945|LEUKO^Leukozyten|||20170424184926|||||||20170424184903|KFHDI||||||||||F
OBX|0001|NM|LEUKO^Leukozyten||7.62|GPt/l|3,91 - 9,81|N|||F||||||1||||||||3,919,81||
OBR|0001|07424945|4007424945|ERY^Erythrozyten|||20170424184926|||||||20170424184903|KFHDI||||||||||F
OBX|0001|NM|ERY^Erythrozyten||3.7|TPt/l|4,18 - 5,77|LL|||F||||||1||||||||4,185,77||
OBR|0001|07424945|4007424945|HB^Hämoglobin|||20170424184926|||||||20170424184903|KFHDI||||||||||F
OBX|0001|NM|HB^Hämoglobin||7.10|mmol/l|8,40 - 10,90|LL|||F||||||1||||||||8,410,9||
OBR|0001|07424945|4007424945|HK^Hämatokrit|||20170424184926|||||||20170424184903|KFHDI||||||||||F

and i tried to use XmlUtil.toJson(msg.valueOf()) but this not working and i need this to be json so i can loop over the message headers and do so data modification please any help and why this is so difficult in mirth!!!!
Reply With Quote
Reply

Tags
foreach, json

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 09:49 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation