Hmm, I can see two ways of doing this.

The obvious one is to have the receiving application reencode the message:
String messageText = new PipeParser().encode(message);

The less obvious way, which I've used in the past, is to just use
MinLlpWriter and MinLlpReader directly. This method gives you loads of
control, since no parsing occurs at all, but you need to create your own
socket and then pass it's input and output streams to the respective reader
and writer. This method is a fairly big change and a bit more work, but
gives you great flexibility. I've used it in the past for situations where I
was crucially concerned with performance.

Thinking about this, it would probably be quite nice to allow a message
object to store its original text as a convenience. Maybe a getter and
setter could be added for getOriginalText, and the parser could add that in
there when available. I guess the documentation would need to be quite
explicit, since there is a chance people could call the setters on the
message and then expect the original text to change (i.e. confusing it with
a re-encode method). Thoughts anyone?

James


On Fri, Aug 7, 2009 at 10:18 AM, Johnny2R <[email protected]> wrote:

>
> Yes, makes good sense, thanks. What would be handiest, though, is if the
> raw
> message text could be passed to the registered handling application. How
> could that happen?
> --
> View this message in context:
> http://www.nabble.com/Problem-with-misplaced-NTE-segment-tp24808667p24865727.html
> Sent from the hl7api-devel mailing list archive at Nabble.com.
>
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Hl7api-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/hl7api-devel
>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to