Re: [HAPI-devel] HAPI v2.0

2014-06-05 Thread James Agnew
Hi Sara, The names of various fields changed between versions of HL7. Using a newer version of the structures is fine (although you need to be aware that some fields may have been added which will be incompatible with older versions of the standard). Because of these name changes though, the meth

Re: [HAPI-devel] HAPI v2.0

2014-06-04 Thread Sara Fatima
Hi James I tried with removing provided but still the error is there. What I realised that openmrs-core has already structures v25 and v26. So I tried changing my imports, and work with v25. (Earlier I was trying to add structure v24 dependency) import ca.uhn.hl7v2.model.v25.message.ADT_A01; > i

Re: [HAPI-devel] HAPI v2.0

2014-06-04 Thread James Agnew
I would try removing the provided from your dependencies. That means "use it to compile, but don't include it in the finished product" which is probably not wanted here. James On Wed, Jun 4, 2014 at 1:22 PM, Sara Fatima wrote: > Hi > > Which classpath are you referring to? I haven't set any cla

Re: [HAPI-devel] HAPI v2.0

2014-06-04 Thread Sara Fatima
Hi Which classpath are you referring to? I haven't set any classpath as of now. What class paths do I need to set? On 4 Jun 2014 22:49, "g3949" wrote: > > then your classpath is wrong... > HAPI doesn't find the hapi-jar files while trying do run the programm > > FP > > > On Wednesday, June 4,

Re: [HAPI-devel] HAPI v2.0

2014-06-04 Thread g3949
then your classpath is wrong... HAPI doesn't find the hapi-jar files while trying do run the programm FP On Wednesday, June 4, 2014 7:10 PM, Sara Fatima wrote: Hi Christian, I have added the below dependencies, >ca.uhn.hapi >hapi-base >2.0 >provided > > >org.slf4j >slf4j-api > > >log4j

Re: [HAPI-devel] HAPI v2.0

2014-06-04 Thread Sara Fatima
Hi Christian, I have added the below dependencies, > > ca.uhn.hapi > hapi-base > 2.0 > provided > > > org.slf4j > slf4j-api > > > log4j > log4j > > > > > ca.uhn.hapi > hapi-structures-v24 > 2.0 > provided > > But I am still facing the same problem. > An Internal Error has Occurred > >

Re: [HAPI-devel] HAPI v2.0

2014-06-04 Thread Christian Ohr
You need to add dependencies on the structure libraries. Please get started with http://hl7api.sourceforge.net/getting_started.html. Christian 2014-06-04 17:35 GMT+02:00 Sara Fatima : > Hi Christian, > > Thank you for the guidelines. I am trying the below code to create HL7 > message. > > ADT_

Re: [HAPI-devel] HAPI v2.0

2014-06-04 Thread Sara Fatima
Hi Christian, Thank you for the guidelines. I am trying the below code to create HL7 message. ADT_A01 adt = new ADT_A01(); MSH mshSegment = adt.getMSH(); mshSegment.getFieldSeparator().setValue("|"); mshSegment.getEncodingCharacters().setValue("^~\\&"); mshSegment.getDateTime

Re: [HAPI-devel] HAPI v2.0

2014-06-04 Thread Christian Ohr
Basically you instantiate an instance of PipeParser (or GenericParser) yourself instead of obtaining it from an HapiContext: ADT_A01 adt = new ADT_A01(); ... populate message ... Parser parser = new PipeParser(); String encodedMessage = parser.encode(adt); System.out.println("Printing ER7 Encod

[HAPI-devel] HAPI v2.0

2014-06-03 Thread Sara Fatima
Hi all, Since few weeks I am trying to work with HAPI. My aim here is to create a HL7 message and send it to an HIE over MLLP (using PAM profile). I need to include this feature in an OpenMRS module. HAPI is already embed in OpenMRS-core, but OpenMRS is supporting HAPI v2.0. I was using this exam