From: Tripp, B. <Bry...@uh...> - 2004-06-30 14:21:27
|
Certainly, thanks for bringing this to our attention. Bryan -----Original Message----- From: Kelley, Peter (DHS) To: 'Kenneth Beaton'; hl7...@li... Sent: 30/06/2004 3:03 AM Subject: RE: [HAPI-devel] HL7 version 2.3.1 and ^ characters I just finished writing some very similar code :) Can we get this included in the next release please? > -----Original Message----- > From: Kenneth Beaton [mailto:Ken...@ka...] > Sent: Wednesday, 30 June 2004 16:28 > To: 'Kelley, Peter (DHS)'; hl7...@li... > Subject: RE: [HAPI-devel] HL7 version 2.3.1 and ^ characters > > In my opinion it is. I ran into exactly the same problem when I was > trying > to use the Austrlaian standard (|2.3.1^AU|). > > > In PipeParser.java I modified getVersion to only return the firt part: > > > > public String getVersion(String message) throws HL7Exception { > int startMSH = message.indexOf("MSH"); > int endMSH = message.indexOf(PipeParser.segDelim, startMSH); > if (endMSH < 0) > endMSH = message.length(); > String msh = message.substring(startMSH, endMSH); > String fieldSep = null; > if (msh.length() > 3) { > fieldSep = String.valueOf(msh.charAt(3)); > } > else { > throw new HL7Exception("Can't find field separator in MSH: " + > msh, HL7Exception.UNSUPPORTED_VERSION_ID); > } > > String[] fields = split(msh, fieldSep); > String componentSep = null; > if (fields.length >= 2) { > componentSep = String.valueOf(fields[1].charAt(0)); > } > else { > throw new HL7Exception( > "Can't find Encoding Characters - MSH has only " + > fields.length + " fields.", > HL7Exception.REQUIRED_FIELD_MISSING); > } > > String version = null; > if (fields.length >= 12) { > version = split(fields[11], componentSep)[0]; > } > else { > throw new HL7Exception( > "Can't find version ID - MSH has only " + fields.length + " > fields.", > HL7Exception.REQUIRED_FIELD_MISSING); > } > return version; > } > > Kenneth Beaton > > -----Original Message----- > From: Kelley, Peter (DHS) [mailto:pet...@dh...] > Sent: Wednesday, 30 June 2004 4:43 PM > To: hl7...@li... > Subject: [HAPI-devel] HL7 version 2.3.1 and ^ characters > > > Hi, > > I'm trying to parse an acknowledgement message that looks like the > following: > > MSH|^~\&|OACIS&&&&&^^|DHS&&&&&^^|RAD&&&&&^^|RAH&&&&&^^|200406301604^||OR R^ > O0 > 1||P&&&&&^|2.3.1^^^^^|||AL^^^^^|NE^^^^^|61^^^^^|| > MSA|AA^^^^^|536702032716052845|||F| > > From what I can see the 2.3.1 spec allows extra information in the version > field but the pipe parser is blowing up with the message: > > ca.uhn.hl7v2.HL7Exception: Can't process message of version '2.3.1^^^^^' - > version not recognized > > Is this a bug? > > Regards, > Peter Kelley > > > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & Training. > Attend Black Hat Briefings & Training, Las Vegas July 24-29 - > digital self defense, top technical experts, no vendor pitches, > unmatched networking opportunities. Visit www.blackhat.com > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > > > "Legal Notice - confidentiality, viruses and opinions - This email and any > files transmitted with it are confidential and solely for the intended > recipient. If you are not the intended recipient please notify the sender > immediately; delete this email from your system; and do not read, > distribute, print, store or copy this email or take any action in reliance > on its contents. KAZ Group Limited ACN 002 124 405 and its related bodies > corporate KAZ Technology Services accept no liability for any damage > caused by any virus transmitted with this email. Any views or opinions > contained in this email are solely those of the author and do not > represent those of KAZ unless expressly otherwise stated." ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com _______________________________________________ Hl7api-devel mailing list Hl7...@li... https://lists.sourceforge.net/lists/listinfo/hl7api-devel This e-mail may contain confidential and/or privileged information for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies. Opinions, conclusions or other information contained in this e-mail may not be that of the organization. |