From: Steve H. <ste...@gm...> - 2005-03-22 14:23:48
|
Sorry for my earlier reply. I didn't see this email with your HL7 message = text. An HL7 message generally should have several "segments," each of which appears on its own "line" (meaning they are separated by "\r"). Some segments are actually part of a "group" (groups may also be part of another group). You have provided only an MSH segment, which is the message header. Other segments are, I believe, required for an ORM O01 message (sorry, I don't have the code with me now). You may want to download the source code for the HL7 version you want to use (for example, 2.3.1 is here:=20 http://prdownloads.sourceforge.net/hl7api/hapi-0.4.3_source_v231.zip?downlo= ad). Under the "model.message" package (I think), you can find "ORM_O01" and see what is required for a valid ORM O01 message. This is defined when calling field constructors in the message's constructor, if I remember correctly. IMO, HL7 is a bit difficult to understand at first, but it should get easier if you stick to it. Good luck. -Steve On Tue, 22 Mar 2005 02:21:08 -0800 (PST), Praveen Kumar <pra...@ya...> wrote: > =20 > =20 >=20 > Hi ALL,=20 >=20 > I am using v2.3.1 .=20 >=20 > Even with the latest version of 0.4.3 I am getting same result as I have > mentioned earlier.=20 >=20 > Even I tried with ur input string also I am getting the same ouput .=20 >=20 > I am sending the program I used and the output along with it=20 >=20 > Please provide the needful solution for it.=20 >=20 > package org.srit.hl7;=20 >=20 > import ca.uhn.hl7v2.HL7Exception;=20 >=20 > import ca.uhn.hl7v2.model.Message;=20 >=20 > import ca.uhn.hl7v2.parser.EncodingNotSupportedException;=20 >=20 > import ca.uhn.hl7v2.parser.PipeParser;=20 >=20 > =20 >=20 > public class TestORM {=20 >=20 > =20 >=20 > public static void main(String[] args) {=20 >=20 > =20 >=20 > Message msg =3D null;=20 >=20 > PipeParser parser =3D new PipeParser();=20 >=20 > =20 >=20 > // String msgText =3D "MSH|^~\\&|||||||ORM^O01^ORM_O01|00613205|P|2.3.1||= \r"=20 >=20 > // +"PID|||xxxxx|00000|patienta^one||19230306|M||U||||||||493094";=20 >=20 > String msgText =3D > "MSH|^~\\&|REQUETE|6^CL|UNILAB||20040305110331||ORM^O01^ORM_O01|XXXX|T|2.= 3.1|||||||"; >=20 > =20 >=20 > =20 >=20 > try {=20 >=20 > msg =3D parser.parse(msgText);=20 >=20 > } catch (EncodingNotSupportedException e) {=20 >=20 > // TODO Auto-generated catch block=20 >=20 > e.printStackTrace();=20 >=20 > } catch (HL7Exception e) {=20 >=20 > =20 >=20 > e.printStackTrace();=20 >=20 > }=20 >=20 > =20 >=20 > System.out.println("Message is : " +msg.getName());=20 >=20 > =20 >=20 > }=20 >=20 > }=20 >=20 > OUTPUT=20 >=20 > Message is : RDO_O01 >=20 > Aris JAVIER RAMOS <Ari...@hc...> wrote:=20 > What version of HAPI are you using ?? >=20 > have you tryed with the last version of HAPI (version 0.4.3) ? >=20 > have you specifiyed the message structure to use in the MSH-9-3=20 >=20 > like this : > MSH|^~\&|REQUETE|6^CL|UNILAB||20040305110331||ORM^O01^ORM_O01|XXXX|T|2.3.= 1||||||| >=20 >=20 >=20 > Aris Javier Ramos > Analyste-Developpeur > H=F4pital Cantonal Universitaire de Gen=E8ve > Rue Micheli-du-Crest 24 > 1211 Gen=E8ve >=20 > >>> Praveen Kumar 03/22 7:11 >>> > Hi All, > I am a new member to this group.My Name is Praveen.=20 >=20 > I have one doubt. >=20 > I am parsing a ORM_O01 HL7 Message of HAPI v2.3.1=20 > After parsing of the messag,i am getting RDO_O01 Message Object. >=20 > this is wrong because after parsing ORM_O01 Message I need to get ORM_O01 > Message Object itself . >=20 > But My question is why I am geeting RDO_O01 Object af ter parsing ORM_O01 > Message?????? >=20 > The same persists for v2.3 also >=20 > For other versions of HAPI namely v2.2 and v2.4 I am getting the correct > result.ie I am getting ORM_O01 Object after parsing ORM_O01=20 >=20 >=20 > Is there any solution for this problem??? >=20 >=20 > Its bit urgent. >=20 > Hoping for eary reply for this message >=20 > Rgds > Praveen Kumar.A >=20 >=20 >=20 >=20 >=20 > --------------------------------- > Do you Yahoo!? > Yahoo! Small Business - Try our new resources site!=20 >=20 >=20 >=20 > ********************************************************************** > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. If you have received this email in error please notify > the system manager. >=20 > ********************************************************************** >=20 >=20 >=20 > __________________________________________________ > D o You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around=20 > http://mail.yahoo.com |