carriage return line feeds in an OBX 5 field

180 views
Skip to first unread message

sue

unread,
Mar 8, 2011, 10:58:40 AM3/8/11
to InterSystems: Ensemble in Healthcare
Hello,

Users are managing to get hex 0A0D into an OBX5 5 field and we need to
remove then before passing the value into the radiology system. They
are doing this by cutting and pasting from a previous report.

In the data transformation ensemble seems to chop the field at the
first hex 0A0D forgetting about the rest.

Does anyone have any ideas how I can remove them and keep the rest of
the data..

Thanks for your help.

William Casey

unread,
Mar 8, 2011, 11:15:10 AM3/8/11
to ensemble-in...@googlegroups.com
I'd be interested in suggestions on this too. 
 
I was thinking of the following:
 
1. Replace all cr/lf<SegID> in the message with something like ###<SegID>
2. Replace cr/lf in the messages with single space.
3. Replace ###<SegID> with cr/lf
 
- Bill C.


--
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



--
William C. Casey

912-660-4176 (Primary phone)

Ted Peck

unread,
Mar 8, 2011, 11:15:20 AM3/8/11
to ensemble-in...@googlegroups.com
Unfortunately I think the parser is probably discarding the remainder of
the segment because x0D is the segment terminator and the remaining
fragment is not in the form of a valid segment.

I might be mistaken about this, but are you sure the data is still there
by the time it gets to the data transformation input?

Ted

On 3/8/2011 10:58 AM, sue wrote:
> Hello,
>
> Users are managing to get hex 0A0D into an OBX5 5 field and we need to

> remove them before passing the value into the radiology system. They

sue

unread,
Mar 8, 2011, 11:24:32 AM3/8/11
to InterSystems: Ensemble in Healthcare
Ted,

I don't know but I suspect you are correct and the rest of the data I
not there as I cannot see it or get it to display in any field.

I assume this means that the subsequent data is lost?

Regards
Sue
> > Thanks for your help.- Hide quoted text -
>
> - Show quoted text -

David Loveluck

unread,
Mar 8, 2011, 11:50:23 AM3/8/11
to ensemble-in...@googlegroups.com
If the message arrives through a business service, I think the message will be chopped up in to segments at the 0D boundary and whatever is left in the field after that is taken as a new segment name. Beyond that the structure appears invalid because the bogus segment and a data transformation based on the schema will probably stop copying segments at that point.

I guess you could stitch the segments back together, but you would have to figure out which segments were bogus.

Look at the message content being passed from the BS to the message router (or whatever design you are using)

This sounds like a good case for correcting the behavior rather than correcting the message :-(

Dave

Ted,

Regards
Sue

--

sue

unread,
Mar 9, 2011, 5:14:49 AM3/9/11
to InterSystems: Ensemble in Healthcare
We have had a further incident this morning where the user copied in a
blank line resulting in two CRLF one after the other as below

'exam request

exam reason'

In this case the following errors were generated,

36 1777 2011-03-09
09:33:44.969 Warning 3776 iCMReceive EnsLib.HL7.Adapter
.TCPInboundAdapter.Disconnect() Discarding leftover input ''
37 1776 2011-03-09
09:33:44.969 Error 3776 iCMReceive EnsLib.HL7.Adapter
.TCPInboundAdapter.OnConnected() Disconnecting due to ERROR
<EnsEDIHL7>ErrEndBlock: Received unexpected EndBlock 'lr' in input
"lr", expected 'er, on |TCP|5037|3776'
38 1775 2011-03-09
09:33:44.969 Warning 3776 iCMReceive
EnsLib.HL7.Parser.ParseIOStream() Returning unused unexpected 1-char
segment 'l' interpreted as End-of-Message for current message

and then the connection drops.

If there is one CRLF it flags as a warning and ignores the rest of the
invalid segment(s) but if there are two together and therefore a
segment with no data it causes the connection to drop.

Is there any way we can catch it before these erros occur and 'fix' it
by replacing them with spaces.

Thanks

On Mar 8, 4:50 pm, David Loveluck <David.Lovel...@intersystems.com>
wrote:
> For more options, visit this group athttp://groups.google.com/group/Ensemble-in-Healthcare?hl=en- Hide quoted text -

Lawrence Harris

unread,
Mar 9, 2011, 12:52:31 PM3/9/11
to <ensemble-in-healthcare@googlegroups.com>, InterSystems: Ensemble in Healthcare
If these are coming in via TCP or a SOAP service you might be able to use a generic one and fix the stream before passing on to the HL7 processing.

Lawrence

Sent from my iPhone

Reply all
Reply to author
Forward
0 new messages