Mirth Community

Mirth Community (http://www.mirthcorp.com/community/forums/index.php)
-   Support (http://www.mirthcorp.com/community/forums/forumdisplay.php?f=6)
-   -   Convert string to HL7 (http://www.mirthcorp.com/community/forums/showthread.php?t=9278)

CasperSHO 09-11-2013 01:14 AM

Convert string to HL7
 
Hi,

I have a database with one column which contains a complete HL7 message as a string. I set up a database reader to retrieve this message and I need to sent this through HL7 LLP. So I need to convert this string (XML) to HL72.x. Can anyone push me in the right direction how to handle this?

<result>
<tber_bericht>MSH|^~\&amp;|TELEFORM|TELE|COV||2013 0823135054||QRY^A19|0265210011|P|2.4|QRD|201308231 35054|R|I|1|||1^RD|111111VDO001^123456789^^1911010 1^1234AB^136|APN|""|||</tber_bericht>
</result>

Regards

Casper

narupley 09-11-2013 09:00 AM

Assuming you have a transformer, your inbound data type is XML, and your outbound data type is HL7 v2.x:

Code:

msg = new XML(SerializerFactory.getHL7Serializer().toXML(msg.tber_bericht.toString()));
However it looks like there's a problem with the actual data stored in your database. There's no carriage return between segments, so it'll be parsed as a single segment.

CasperSHO 09-11-2013 09:44 AM

well, the cariage returns also exists as ascii character within the string but I removed them in the preprocessor :-) So now when I removed the code from my preprocessor and also use your transformer step it works!


All times are GMT -8. The time now is 05:14 PM.

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