From: Tripp, B. <Bry...@uh...> - 2003-09-18 17:50:27
|
Hi Vishal, Messages/segments/fields in an oracle database. Does that make sense? Yes, that's a very common use of HAPI. server but I will probably extend Class Parser and implement my own parser that would actually save the parsed I suggest implementing ca.uhn.hl7v2.app.Application instead of extending Parser. The TCP/IP server will parse messages for you, and send them to your Application's processMessage(Message) method, where you can put the code that writes to the database. See the HL7Service javadocs for information on registering your application with the server (it's easy -- you make a file with a line that identifies the message types and trigger events that you handle, and the name of your application class). Another thing I noticed that HAPI is restricted to start with '\u000b' and end with '\u001c' + '\r'. Most of the people I work with, they have random message delimiters but consistent within their facility, I mean they never follow standards Wow. I guess that shouldn't be surprising, but HAPI is almost 2 years old and you're the first one to mention this. Maybe the practice varies regionally. Where are you located? How many times have you seen non-standard message delimiters? Bryan 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. |
From: Tripp, B. <Bry...@uh...> - 2003-09-18 20:33:36
|
Hi Vishal, Yes, people put messages in files in all kinds of wierd ways. How about scanning the file using some kind of regular expression that will find messages amid arbitrary content. Like this maybe: MSH(.).*\r\n?([A-Z]{3}\1.*\r\n?)* (I don't know if that one will work -- just trying to illustrate). Or you could hack the MLLP code to use delimiters that you set at run time. I think I did that once. If I remember correctly there was some trick to using escape sequences outside of Java source (you would want to do this so you could easily type them into a config file or on the command line using characters you have on your keyboard). Nope, it's not coming to me. Bryan -----Original Message----- From: Vishal Abrol [mailto:va...@ve...] Sent: September 18, 2003 6:18 AM To: 'Tripp, Bryan' Subject: RE: [HAPI-devel] New HAPI user Yes, messages in the file. Whenever we develop interface for somebody, usually they send us the files as a specification. Would that be different? Vishal -----Original Message----- From: Tripp, Bryan [mailto:Bry...@uh...] Sent: Thursday, September 18, 2003 10:56 PM To: 'Vishal Abrol' Subject: RE: [HAPI-devel] New HAPI user Hi Vishal, Vishal Answer: Really? I am actually surprised. Since yesterday I collected six sets of HL messages from some from our customers ( real time data,5-10 messages) and actually one of the files have standard start message character '\u000b' but most of the time message end varies with '0D 1C OA' ,'0D 0A 1C 0D 0A',atleast '1C' is usually consistent . One of the sets had only '0D' as start and end with '0D' again. I have been dealing with customer all over US and yes, we did have problems with our HL7 parsing usually ended up in custom fixes. This is one of the reasons; I need to develop a standard solution. So far, I have been pre processing the messages to prefix-suffix proper delimiters before I send it to my parser for parsing. Segment delimiters are usually limited to '0A','0D','0D 0A' and '0A 0D'.I work in CA,USA and had a lot of interaction with Hospitals since 2-3 years. Hopefully you will be able to address this issue ? Oh! I thought you were talking about the minimal lower layer protocol. Do you mean messages in files? Bryan 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. 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. |
From: Vishal A. <va...@ve...> - 2003-09-18 20:37:21
|
Thanks for your help. I will try to implement this. I plan to give the user flexibility to = define the delimiters in a XML config file. I probably have to hack the MLLP = code to read those delimiters from file .will let u know once I am successful = in this. Thanks =20 -----Original Message----- From: Tripp, Bryan [mailto:Bry...@uh...]=20 Sent: Thursday, September 18, 2003 11:33 PM To: 'Vishal Abrol'; hl7...@li... Subject: RE: [HAPI-devel] New HAPI user =20 Hi Vishal,=20 =20 Yes, people put messages in files in all kinds of wierd ways. How about scanning the file using some kind of regular expression that will find messages amid arbitrary content. Like this maybe: MSH(.).*\r\n?([A-Z]{3}\1.*\r\n?)* (I don't know if that one will work = -- just trying to illustrate). =20 =20 Or you could hack the MLLP code to use delimiters that you set at run = time. I think I did that once. If I remember correctly there was some trick = to using escape sequences outside of Java source (you would want to do this = so you could easily type them into a config file or on the command line = using characters you have on your keyboard). Nope, it's not coming to me. =20 Bryan=20 -----Original Message----- From: Vishal Abrol [mailto:va...@ve...] Sent: September 18, 2003 6:18 AM To: 'Tripp, Bryan' Subject: RE: [HAPI-devel] New HAPI user Yes, messages in the file. Whenever we develop interface for somebody, usually they send us the files as a specification. =20 Would that be different? Vishal =20 -----Original Message----- From: Tripp, Bryan [mailto:Bry...@uh...]=20 Sent: Thursday, September 18, 2003 10:56 PM To: 'Vishal Abrol' Subject: RE: [HAPI-devel] New HAPI user =20 Hi Vishal,=20 Vishal Answer: Really? I am actually surprised. Since yesterday I = collected six sets of HL messages from some from our customers ( real time = data,5-10 messages) and actually one of the files have standard start message character '\u000b' but most of the time message end varies with '0D = 1C OA' ,'0D 0A 1C 0D 0A',atleast '1C' is usually consistent . One of the = sets had only '0D' as start and end with '0D' again. I have been dealing with customer all over US and yes, we did have problems with our HL7 parsing usually ended up in custom fixes. This is one of the reasons; I need to develop a standard solution. So far, I have been pre processing the = messages to prefix-suffix proper delimiters before I send it to my parser for parsing. Segment delimiters are usually limited to '0A','0D','0D 0A' and = '0A 0D'.I work in CA,USA and had a lot of interaction with Hospitals since = 2-3 years. Hopefully you will be able to address this issue ? Oh! I thought you were talking about the minimal lower layer protocol. = Do you mean messages in files? =20 =20 Bryan=20 =20 =20 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. =20 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. |
From: Vishal A. <va...@ve...> - 2003-09-18 18:11:53
|
Bryan,=20 =20 That was a very quick response. Appreciate it.=20 =20 server but I will probably extend Class Parser and implement my own = parser that would actually save the parsed=20 I suggest implementing ca.uhn.hl7v2.app.Application instead of extending Parser. The TCP/IP server will parse messages for you, and send them to your Application's processMessage(Message) method, where you can put the code that writes to the database. See the HL7Service javadocs for information on registering your application with the server (it's easy = -- you make a file with a line that identifies the message types and = trigger events that you handle, and the name of your application class). =20 =20 Vishal Answer: Yep, thanks, I saw that and probably will do that . Only reason I was trying to extend Parser because of having hard time understanding API structures and actually parsing/retrieving values from = the messages using HAPI API's . Do you have sample parsing routines and how = to access values from Hl7 messages? I noticed few in the API DOCS but still unclear. I guess I will play around with it more. But advantage of extending the parser is that I have control on raw message in the class = file and I could just call my API to start sending the segments/fields = during parsing to HAPI structures. =20 =20 Another thing I noticed that HAPI is restricted to start with '\u000b' = and end with '\u001c' + '\r'. Most of the people I work with, they have = random message delimiters but consistent within their facility, I mean they = never follow standards=20 Wow. I guess that shouldn't be surprising, but HAPI is almost 2 years = old and you're the first one to mention this. Maybe the practice varies regionally. Where are you located? How many times have you seen non-standard message delimiters? =20 =20 =20 Vishal Answer: Really? I am actually surprised. Since yesterday I = collected six sets of HL messages from some from our customers ( real time = data,5-10 messages) and actually one of the files have standard start message character '\u000b' but most of the time message end varies with '0D = 1C OA' ,'0D 0A 1C 0D 0A',atleast '1C' is usually consistent . One of the = sets had only '0D' as start and end with '0D' again. I have been dealing with customer all over US and yes, we did have problems with our HL7 parsing usually ended up in custom fixes. This is one of the reasons; I need to develop a standard solution. So far, I have been pre processing the = messages to prefix-suffix proper delimiters before I send it to my parser for parsing. Segment delimiters are usually limited to '0A','0D','0D 0A' and = '0A 0D'.I work in CA,USA and had a lot of interaction with Hospitals since = 2-3 years. Hopefully you will be able to address this issue ? =20 Thank you for your input. Vishal =20 =20 =20 =20 =20 -----Original Message----- From: Tripp, Bryan [mailto:Bry...@uh...]=20 Sent: Thursday, September 18, 2003 8:49 PM To: 'Vishal Abrol'; hl7...@li... Subject: RE: [HAPI-devel] New HAPI user =20 Hi Vishal,=20 Messages/segments/fields in an oracle database. Does that make sense? =20 Yes, that's a very common use of HAPI. =20 server but I will probably extend Class Parser and implement my own = parser that would actually save the parsed=20 I suggest implementing ca.uhn.hl7v2.app.Application instead of extending Parser. The TCP/IP server will parse messages for you, and send them to your Application's processMessage(Message) method, where you can put the code that writes to the database. See the HL7Service javadocs for information on registering your application with the server (it's easy = -- you make a file with a line that identifies the message types and = trigger events that you handle, and the name of your application class). =20 Another thing I noticed that HAPI is restricted to start with '\u000b' = and end with '\u001c' + '\r'. Most of the people I work with, they have = random message delimiters but consistent within their facility, I mean they = never follow standards=20 Wow. I guess that shouldn't be surprising, but HAPI is almost 2 years = old and you're the first one to mention this. Maybe the practice varies regionally. Where are you located? How many times have you seen non-standard message delimiters? =20 =20 Bryan=20 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. |