Mombu the Microsoft Forum sponsored links

Go Back   Mombu the Microsoft Forum > Microsoft > How to handle &
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 25th June 10:24
garyš¯b±Ë¬²*²hœ®‹(~×(
External User
 
Posts: 1
Default How to handle &



Hi All,

I am trying to map a message which is failing on serialization in the send
pipeline. It is failing with the following error:

Error # 1
Segment Id: PID_PatientIdentification
Sequence Number: 1
Field Number: 11
Error Number: 102
Error Description: Data type error
Encoding System: HL7nnnn

Now, I am guessing that this is because there is an ampersand in
<XAD_3_StateOrProvince>. The record initially has an ampersand and when I
check the failed message it has been converted to &

Does anyone know how to handle this, I guess it is pretty common, apart from
replacing it with "and" using a scripting functoid in the map.

I don't understand why this is failing here as I am not validating the body
segments on serialization, but the BTAHL7 Configuration settings do not seem
to be effective on messages being sent out.

Cheers,
Gary
  Reply With Quote


  sponsored links


2 2nd July 00:53
garyš¯b±Ë¬²*²hœ®‹(~×(
External User
 
Posts: 1
Default How to handle &



Okay, I tried replacing both & and &amp; in the map with "and" but neither
worked. I am guessing it's because it is not valid in xml - I may be wrong
here though.

So, is the only way to handle an ampersand by changing it before it hits
BizTalk i.e. in the receive pipeline etc?

Cheers,
Gary
  Reply With Quote
3 2nd July 00:53
eric stott
External User
 
Posts: 1
Default How to handle &


If you want to add in a non ASCII character (&), you would have to type
\Xhh\ where hh is the hex value for that character.

You will need to code for this in your map.
Eric
http://stottcreations.com/blog
  Reply With Quote
4 2nd July 00:53
garyš¯b±Ë¬²*²hœ®‹(~×(
External User
 
Posts: 1
Default How to handle &


Thanks Eric
  Reply With Quote
5 2nd July 00:54
tom canter - neudesic
External User
 
Posts: 1
Default How to handle &


Gary,
Eric has quoted the general rule on how to escape any value, but the
value you have selected can be escaped
First is that the subcomponent seperator character... delimiter 4 in
the MSH defines the subcojmponen seperator character, which is
generally the & - ampersand.

Secondly, any reserved character in the delimiters list default defined
as:
Field Seperator - |
Component Seperator - ^
Repetition Seperator - ~ (tilde)
Escape Character - \
Subcomponent Seperator - &

If these values need to be placed in the message, they can be displayed
as the following escape sequences (remember that the Escape Character
is defined in the MSH, but is \ by default). The values should only
appear in "Text" fields of data types TX, FT and CF per the spec, but I
have seen them in other fields.

\F\ field separator
\S\ component separator
\T\ subcomponent separator
\R\ repetition separator
\E\ escape character
\Xdddd...\ hexadecimal data

So, you must have the & defined as the SubComponent Seperator in your
MSH.
You have two choices to encode that value, as Eric has stated:
\X26\ using the generic hexadecimal data
Or the specific Subcomponent escape sequence:
\T\

Specifically, you cannot have the MSH Delimiters appear in the message
anywhere other than used as a delimiter.

Also be very careful, some receivers have not implemented HL7 escape
rules at all. Make sure through testing that they can decode the escape
sequences correctly.

Thanks,
Tom
Neudesic
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666