[HAPI-devel] generateACK and CanonicalMCF

2012-01-16 Thread James Agnew
Hi All, I'm definitely leaning towards the idea that we should fix this as proposed. While it's true that the docs mention this behaviour, ultimately it boils down to the fact that Message#generateAck() isn't respecting the ModelClassFactory assigned to the message, which is weird. The fix is actu

Re: [HAPI-devel] generateACK and CanonicalMCF

2012-01-16 Thread Jens Kristian Villadsen
I'm perfectly aware of the need to include multiple structure libraries and I can also see the extra management it produces/need to provide generic code. However, the generateACK seems to be spec'ed that way and in that scope, it cannot be an error, but rather a 'feature request'. 2012/1/16 christ

Re: [HAPI-devel] generateACK and CanonicalMCF

2012-01-16 Thread Jens Kristian Villadsen
But I agree in that it would be very useful if the implementation was changed as already proposed. 2012/1/16 christian ohr > > The problem in this case is that you are required to include the 2.4 > structures libraries into your classpath. And, if you don't know the > version(s) of the received

Re: [HAPI-devel] generateACK and CanonicalMCF

2012-01-16 Thread christian ohr
The problem in this case is that you are required to include the 2.4 structures libraries into your classpath. And, if you don't know the version(s) of the received messages in advance (and that's one good reason to use the CanonicalModelClassfactory 2.6) you would be required to include all struc

Re: [HAPI-devel] generateACK and CanonicalMCF

2012-01-14 Thread Jens Kristian Villadsen
Where is the problem? If you look at http://hl7api.sourceforge.net/base/apidocs/ca/uhn/hl7v2/model/Message.html#generateACK%28%29, you will see that the following is stated: The ACK generated will be of the same version as the value of MSH-12 in this message (as opposed to the version of the messa

Re: [HAPI-devel] generateACK and CanonicalMCF

2012-01-11 Thread Rahul Somasunderam
The bug Id is 3471571. On Jan 9, 2012, at 4:42 PM, James Agnew wrote: > Hi Rahul, > > Looks like you have uncovered a bug in HAPI. I tried it locally and I see the > same thing as you: Basically, the "generateACK()" method is not actually > honoring your ModelClassFactory, so it's trying to in

Re: [HAPI-devel] generateACK and CanonicalMCF

2012-01-09 Thread James Agnew
Hi Rahul, Looks like you have uncovered a bug in HAPI. I tried it locally and I see the same thing as you: Basically, the "generateACK()" method is not actually honoring your ModelClassFactory, so it's trying to instantiate the 2.4 version of the structure. The easiest workaround is probably to c

Re: [HAPI-devel] generateACK and CanonicalMCF

2012-01-09 Thread Rahul Somasunderam
sunderam [mailto:[email protected]] > Sent: Monday, January 09, 2012 10:36 AM > To: [email protected] > Subject: [HAPI-devel] generateACK and CanonicalMCF > > Hi, > > I'm using Canonical MCF to parse a message. Then I'm using generateACK on

Re: [HAPI-devel] generateACK and CanonicalMCF

2012-01-09 Thread Sharma, Niranjan K (GE Healthcare)
Rahul, Do you have structure classes in your path? CMCF will look for 2.6 structure. Thanks. Regards -Niranjan. From: Rahul Somasunderam [mailto:[email protected]] Sent: Monday, January 09, 2012 10:36 AM To: [email protected] Subject: [HAPI-devel] generateACK and

[HAPI-devel] generateACK and CanonicalMCF

2012-01-09 Thread Rahul Somasunderam
Hi, I'm using Canonical MCF to parse a message. Then I'm using generateACK on the message. This causes a ClassNotFoundException. I'm using HAPI 1.2, if that matters. This is my code (in Groovy) def messageString = context.messageContent def cmcf = new CanonicalModelClassFactory("2.6")