Good to hear!
If you want access to the raw string for some kind of pre-processing as you
mention (like reordering an out of place segment for instance), one easy way
to do this is to subclass PipeParser and override the parse(String) method.
You can then modify the string that is passed in and then pass your modified
string to the super.parse(String) implementation.
You can then instantiate your parser subclass and pass it to the
connectionhub, server, or whatever you are using to receive messages.
Make sense?
Cheers,
James
On Fri, Aug 7, 2009 at 5:30 AM, Johnny2R <[email protected]> wrote:
>
> James,
>
> Thanks for that, it's really useful to know how it works. I established in
> the end that the segment was in fact in the right place, I had just been
> misinformed about it in the spec (it was part of the patient group, not an
> order level NTE), so it's probably just as well I didn't find a way to
> successfully relocate it!
>
> But in fact one of the things which was frustrating me was that I could
> ever
> so easily have retrieved the value by simple Java string parsing (regex,
> etc), if I had had access to the raw text of the message. But I have not
> found a means in HAPI to actually get the raw message text. You suggest I
> save the contents of my message in a text file, but how do I do that? I'm
> using SimpleServer, and the message is handed off to my handler application
> ready-parsed.
> --
> View this message in context:
> http://www.nabble.com/Problem-with-misplaced-NTE-segment-tp24808667p24861650.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