Re: [HAPI-devel] Problem with misplaced NTE segment

2009-08-07 Thread James Agnew
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

Re: [HAPI-devel] HL7 database question

2009-08-07 Thread Serbulent Unsal
On Wednesday 05 August 2009 05:00:59 pm James Agnew wrote: > Hi Serbulent, > Hi again, > > I thought that field value restrictions are supported with conformance >>profiles. > > > Beyond that regex definition of fields is also covered by conformance >>profiles but I don't know these are covered

Re: [HAPI-devel] Problem with misplaced NTE segment

2009-08-07 Thread Johnny2R
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 th

Re: [HAPI-devel] Problem with misplaced NTE segment

2009-08-07 Thread James Agnew
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 th

Re: [HAPI-devel] Problem with misplaced NTE segment

2009-08-07 Thread Johnny2R
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

Re: [HAPI-devel] Field validation against regex

2009-08-07 Thread Serbulent Unsal
On Friday 07 August 2009 01:34:27 am James Agnew wrote: > Hi Serbulent, > > Can you post the code you use to add the regex rule? > > Cheers, > James No :) Because as I said in my first mail I use Hapi's message validation example so I use DefaultValidationContext. I'm expecting working of rules