web stats
Convert string to HL7 - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 09-11-2013, 01:14 AM
CasperSHO CasperSHO is offline
OBX.1 Kenobi
 
Join Date: Jan 2012
Location: Netherlands
Posts: 38
CasperSHO is on a distinguished road
Default 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
Reply With Quote
  #2  
Old 09-11-2013, 09:00 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,124
narupley is on a distinguished road
Default

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.
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
Reply With Quote
  #3  
Old 09-11-2013, 09:44 AM
CasperSHO CasperSHO is offline
OBX.1 Kenobi
 
Join Date: Jan 2012
Location: Netherlands
Posts: 38
CasperSHO is on a distinguished road
Default

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!
Reply With Quote
Reply

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 01:10 PM.


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