From: Praveen K. <pra...@ya...> - 2005-03-23 07:49:08
|
Thanks Aris, Thanks a lot.It's working fine. Thanks Steven for ur suggestion. The Problem is resolved.I am If any body has latest source for HAPI hl7 v2.5 pls send it across to me or is there a way to access it.???If so Pls tell me How to do it??? Waiting for ur reply Regards Praveen Kumar.A Aris JAVIER RAMOS <Ari...@hc...> wrote: yes the archive is hapi-0.4.2.jar You must uncompress the entire archive before (with winzip letting the option user folder names). go to the file to modifie. and after modification compress it again, it will create à .zip file, you can change the .zip in .jar. have you let the line mapping ORM_O01 ORM_O01 uncommented ? regards Aris >>> Praveen Kumar 03/22 2:15 >>> Hi All, Iin which jar file i need to comment the lines. is it in hapi-0.4.2.jar???? I have changed 2.3.1 .properties in the jar file. After I changed the .properties file as per ur instructuions.it gave me that folder will be lost. After that I ran the same program which I had sent earlier . It is giving the following error. log4j:WARN No appenders could be found for logger (ca.uhn.hl7v2.parser.Parser). log4j:WARN Please initialize the log4j system properly. ca.uhn.hl7v2.HL7Exception: Couldn't create Message object of type ORM_O01 at ca.uhn.hl7v2.parser.PipeParser.parse(PipeParser.java:218) at org.srit.hl7.TestORM.main(TestORM.java:34) Caused by: ca.uhn.hl7v2.HL7Exception: No map found for version 2.3.1 at ca.uhn.hl7v2.parser.Parser.getMessageStructureForEvent(Parser.java:390) at ca.uhn.hl7v2.parser.Parser.findMessageClass(Parser.java:263) at ca.uhn.hl7v2.parser.PipeParser.parse(PipeParser.java:205) ... 1 more java.lang.NullPointerException at org.srit.hl7.TestORM.main(TestORM.java:43) Exception in thread "main" What is the correct way of modfiying the file. Please give me the proper steps t make the below changes . Hoping for a early Reply Regards Praveen Aris JAVIER RAMOS wrote: Hello, When I frist came to the Hapi distribution list, I had the same problem than you I was using the parse HAPI 0.4.2. To solve my problem I modified the jar archive of api. In thad jar i found à text file called ca/uhn/hl7v2/parser/eventmap/2.3.properties (I was using the 2.3 version of the HL7 norm) and i modified this sequence of line : ORM_O01 ORM_O01 ORM_O01 OMD_O01 ORM_O01 OMN_O01 ORM_O01 OMS_O01 ORM_O01 RDO_O01 <--- like this : ORM_O01 ORM_O01 #ORM_O01 OMD_O01 #ORM_O01 OMN_O01 #ORM_O01 OMS_O01 #ORM_O01 RDO_O01 and it worked good look. Aris PS if you are using 2.3.1 version, modifie the file "2.3.1.properties" and so on. Aris Javier Ramos Analyste-Developpeur Hôpital Cantonal Universitaire de Genève Rue Micheli-du-Crest 24 1211 Genève >>> Praveen Kumar 03/22 11:21 >>> Hi ALL, I am using v2.3.1 . Even with the latest version of 0.4.3 I am getting same result as I have mentioned earlier. Even I tried with ur input string also I am getting the same ouput . I am sending the program I used and the output along with it Please provide the needful solution for it. package org.srit.hl7; import ca.uhn.hl7v2.HL7Exception; import ca.uhn.hl7v2.model.Message; import ca.uhn.hl7v2.parser.EncodingNotSupportedException; import ca.uhn.hl7v2.parser.PipeParser; public class TestORM { public static void main(String[] args) { Message msg = null; PipeParser parser = new PipeParser(); // String msgText = "MSH|^~\\&|||||||ORM^O01^ORM_O01|00613205|P|2.3.1||\r" // +"PID|||xxxxx|00000|patienta^one||19230306|M||U||||||||493094"; String msgText = "MSH|^~\\&|REQUETE|6^CL|UNILAB||20040305110331||ORM^O01^ORM_O01|XXXX|T|2.3.1|||||||"; try { msg = parser.parse(msgText); } catch (EncodingNotSupportedException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (HL7Exception e) { e.printStackTrace(); } System.out.println("Message is : " +msg.getName()); } } OUTPUT Message is : RDO_O01 Aris JAVIER RAMOS wrote: What version of HAPI are you using ?? have you tryed with the last version of HAPI (version 0.4.3) ? have you specifiyed the message structure to use in the MSH-9-3 like this : MSH|^~\&|REQUETE|6^CL|UNILAB||20040305110331||ORM^O01^ORM_O01|XXXX|T|2.3.1||||||| Aris Javier Ramos Analyste-Developpeur Hôpital Cantonal Universitaire de Genève Rue Micheli-du-Crest 24 1211 Genève >>> Praveen Kumar 03/22 7:11 >>> Hi All, I am a new member to this group.My Name is Praveen. I have one doubt. I am parsing a ORM_O01 HL7 Message of HAPI v2.3.1 After parsing of the messag,i am getting RDO_O01 Message Object. this is wrong because after parsing ORM_O01 Message I need to get ORM_O01 Message Object itself . But My question is why I am geeting RDO_O01 Object after parsing ORM_O01 Message?????? The same persists for v2.3 also 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 Is there any solution for this problem??? Its bit urgent. Hoping for eary reply for this message Rgds Praveen Kumar.A --------------------------------- Do you Yahoo!? Yahoo! Small Business - Try our new resources site! ********************************************************************** 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. ********************************************************************** __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------- Do you Yahoo!? Yahoo! Small Business - Try our new resources site! |