Re: [HAPI-devel] Parse HL7 v2.3 REF message with local customizations

2014-10-29 Thread Chandan Datta
Thanks Ian, Yep, that snippet works fine with v2.3. I will update with some more examples of the HL7 and the corresponding XML I seek. On Thu, Oct 30, 2014 at 3:56 PM, Chandan Datta wrote: > Hi Ian, > > I want to just transform a HL7 segment to a XML. Is it possible to disable > the validation i

Re: [HAPI-devel] Parse HL7 v2.3 REF message with local customizations

2014-10-29 Thread Chandan Datta
Hi Ian, I want to just transform a HL7 segment to a XML. Is it possible to disable the validation in the parser for that and create a XML representation out of it? On Thu, Oct 30, 2014 at 3:11 PM, Ian Vowles wrote: > Here is a snippet of code which is in use here: > > > > HapiContext ha

Re: [HAPI-devel] Parse HL7 v2.3 REF message with local customizations

2014-10-29 Thread Ian Vowles
Here is a snippet of code which is in use here: HapiContext hapiContext = new DefaultHapiContext(); hapiContext.setModelClassFactory(new CanonicalModelClassFactory(hl7Version)); hapiContext.setValidationRuleBuilder(new NoValidationBuilder()); final PipeParser pipe

[HAPI-devel] Custom XML output

2014-10-29 Thread Chandan Datta
Hi HAPI devs, Is it possible to generate custom XML for a HL7 message using HAPI. For example, Input: HL7 v2.4 header segment MSH|^~\&|SPM|boulcott||acceartp|2011092200|PKI|REF^I12|20110922091157|P|2.3 *|* *^~\*& *SPM*

[HAPI-devel] Parse HL7 v2.3 REF message with local customizations

2014-10-29 Thread Chandan Datta
Hi all, ​​ I am trying parse a HL7 REF I12 message with local customization(NZ). When I tried using the GenericParser, I keep getting Validation exceptions. For example for the segment below, I keep get the output ca.uhn.hl7v2.validation.ValidationException: Validation failed: Primitive value '(08

[HAPI-devel] How to extract the incoming message received from connection listener

2014-10-29 Thread Birsan, Dan
Hello HAPI users, The SendAndReceiveAMessage sample is extremely helpfull but it doesn't really explain how we can actually extract the incoming message on port 1011. I can send messages from en external source and I see the debuggin info listing the message I've sent but when I actually try to