Hello,

HL7 defines character sequences to represent ’special’ characters not otherwise permitted in HL7 messages.
These sequences begin and end with the message’s Escape character (usually ‘\’), and contain an identifying character, followed by 0 or more characters.
The most common use of these escape sequences is to escape the HL7 defined delimiter characters.
These delimiter or separator characters are defined in MSH-1 and MSH-2 of the HL7 message.

The table below shows the HL7 Escape sequences, and how they are converted:

Character Description Conversion
\Cxxyy\ Single-byte character set escape sequence with two hexadecimal values not converted
\E\ Escape character converted to escape character (e.g., ‘\’)
\F\ Field separator converted to field separator character (e.g., ‘|’)
\H\ Start highlighting not converted
\Mxxyyzz\ Multi-byte character set escape sequence with two or three hexadecimal values (zz is optional) not converted
\N\ Normal text (end highlighting) not converted
\R\ Repetition separator converted to repetition separator character (e.g., ‘~’)
\S\ Component separator converted to component separator character (e.g., ‘^’)
\T\ Subcomponent separator converted to subcomponent separator character (e.g., ‘&’)
\Xdd…\ Hexadecimal data (dd must be hexadecimal characters) converted to the characters identified by each pair of digits
\Zdd…\ Locally defined escape sequence not converted

For example i have this message:

MSH|^~\&|G2|Insiel|RIS|Syncromed|200910211144||ORM^O01|G2090000008570747600|P|2.3.1
PID|||0000001||XXXXXXX^YYYYYYYY^^^^^L||194312300000|M|||VIA PROVA 12^PROVA^036015^^41043^^L^41043~VIA PROVA 12^PROVA^036015^^41043^^M^41043|||||||CF|44740355||||000216|||100
PV1||I|||||901149\X000d\^XXXX^YYYYY^^^^^^^^^^11^&&L|^^^^^^^^^^^^^&&L||SPL01S01||||01|||||8406681|10||||15||||||||||||||||||SBA82|SBA82E01|200910191632|||||0||V|SPL01
ORC|NW|00000001||00000001|||^^20^200910211148||200910211144|^XXXXX|||||||SPL01|BGD11|||SPL01
OBR|1|80000001||RX00840^^^0673.000|01||||||||DSA ev PTA periferica||||||||||||||^^10^200910211148|||CART|DSA ev PTA periferica


In the PV1 segment i have the escape sequence \X000d\, which represents the carriage return.

I parse this message with the pipeparser and then parse it into xml with XMLParser.
I would expect that the HL7 escape sequence would have been translated to the XML representation of carriage return which is "
"
, but in fact the parser just copies the HL7 sequence in the node text. This automatic translation of escape sequences would be a nice feature to have.

Greetings,
Fabio
--



Fabio Daprile

via Galilei, 2 39100 Bolzano (BZ) - Italy Mobile +39 3491204973 tel. +39.0471065901 fax. +39.0471065919 e-mail fabio.dapr...@syncromed.it

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to