Remove \X02\ from OBX in outbound HL7 message

41 views
Skip to first unread message

janelle w

unread,
Jan 14, 2016, 11:03:28 AM1/14/16
to InterSystems: Ensemble in Healthcare
I am fairly new to Ensemble, and have an issue where Ensemble is receiving characters (that cannot be seen in the HL7 format) and passing them onto the downstream system.  

The segment as we receive it is:
OBX|6|TX|TXT^TEXT|6|     Ambulatory pH Monitoring||||||F||||||||

The segment we pass from Ensemble appears like this in downstream system (Epic):
OBX|6|TX|&GDT|T245-0|\X02\     Ambulatory pH Monitoring

I have tried using the function 'replace string' without any success.  Is my syntax off?  Or is there a better way to remove such characters?
 ..ReplaceStr(source.{PIDgrpgrp(1).ORCgrp(1).OBXgrp(k1).OBX:ObservationValue()},"/\0x2/","")

Thank you,

Janelle Walter 

David Loveluck

unread,
Jan 14, 2016, 1:34:43 PM1/14/16
to Ensemble-in...@googlegroups.com

Janelle

 

I guess that the downstream system displays the non-printable characters as \X02 but you need to correctly specify that in your replacestr call.

 

Try

 

..ReplaceStr(source.{PIDgrpgrp(1).ORCgrp(1).OBXgrp(k1).OBX:ObservationValue()}, $c(2), "")

 

dave

--
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare Community" group.
To post to this group, send email to Ensemble-in...@googlegroups.com
To unsubscribe from this group, send email to Ensemble-in-Healt...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/Ensemble-in-Healthcare?hl=en
---
You received this message because you are subscribed to the Google Groups "InterSystems: Ensemble in Healthcare" group.
To unsubscribe from this group and stop receiving emails from it, send an email to Ensemble-in-Healt...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lawrence Harris

unread,
Jan 14, 2016, 6:10:37 PM1/14/16
to InterSystems: Ensemble in Healthcare

I would appear that the ObservationValue field has text with embedded control characters.  I would first try to find out why there are any non printable characters in the data stream, talk to whoever is sending you this data and try to have it fixed it at the source.  HL7 does not support embedded non printable and has some very specific escapes for the characters used as delimiters and for formatting ‘formatted text’ data.  That said if you can’t fix the immediate source then at the earliest point you have access to the raw text put a ..Strip(<text value>,”*C”) which will remove any control characters from the text.  It’s much simpler than trying to use the ..RepalceStr() function and will do the trick nicely.

So in DTL something like:

<assign property='tempStr' value='..Strip(source.{PIDgrpgrp(1).ORCgrp(1).OBXgrp(k1).OBX:ObservationValue()},”*C")' action='set’/>

Lawrence

janelle w

unread,
Jan 15, 2016, 7:36:32 AM1/15/16
to Ensemble-in...@googlegroups.com
Thanks Dave.  
Looks like it works just fine! 

You received this message because you are subscribed to a topic in the Google Groups "InterSystems: Ensemble in Healthcare" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/Ensemble-in-Healthcare/F3AGDGmzJtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to Ensemble-in-Healt...@googlegroups.com.

janelle w

unread,
Jan 15, 2016, 8:09:08 AM1/15/16
to Ensemble-in...@googlegroups.com
Since our vendor was unable to remove the unwanted characters, we were left to clean up their record.  Thanks for the direction, it works great!  We will probably incorporate this function to cover ANY control character that they might slip in.

Thanks again,
janelle  

--
Reply all
Reply to author
Forward
0 new messages