Re: [HAPI-devel] Checking for the existence of a segment or group

2013-07-07 Thread Ian Vowles
We have been finding the same, run time seems to be 1.5, but we have had some issues where generics have been used in imported libraries. I will have to conduct a set of tests. Given that you have managed to nail JCAPS, what did you use to implement queues/topics, guaranteed delivery and such

Re: [HAPI-devel] Checking for the existence of a segment or group

2013-07-05 Thread James Agnew
Hi Ian, Does the 2.1 JAR actually fail to work in your JCAPS install? We actually just finally put the last nail the coffin of our own JCAPS installation at UHN about 3 weeks ago oddly enough, but for years we were running 5.1.2 with HAPI embedded in it (the non JDK14 version). The edesigner does

Re: [HAPI-devel] Checking for the existence of a segment or group

2013-07-03 Thread James Agnew
Oops, looks like Christian beat me to it. :) James On Wed, Jul 3, 2013 at 7:41 AM, James Agnew wrote: > Hi Ian, > > The cleaner alternative, which was just added in HAPI 2.1 oddly enough is > as follows: > > if (!hl7Message.getINSURANCE(0).getIN1().isEmpty()) { > .. blah .. > } > > The

Re: [HAPI-devel] Checking for the existence of a segment or group

2013-07-03 Thread James Agnew
Hi Ian, The cleaner alternative, which was just added in HAPI 2.1 oddly enough is as follows: if (!hl7Message.getINSURANCE(0).getIN1().isEmpty()) { .. blah .. } There is also the somewhat uglier alternative which would work in older releases: if (!hl7Message.getINSURANCE(0).getAll("IN

Re: [HAPI-devel] Checking for the existence of a segment or group

2013-07-03 Thread Christian Ohr
Try if hl7Message.getINSURANCE(0).getIN1().isEmpty() works for you. And, have a look at the Validation framework in HAPI (some examples in http://hl7api.sourceforge.net/devbyexample.html) - basically you define your expectations as MessageRules and associate these rules to a ValidationContext. c