You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(2) |
Feb
(1) |
Mar
|
Apr
(4) |
May
(5) |
Jun
(6) |
Jul
(3) |
Aug
(13) |
Sep
(28) |
Oct
(33) |
Nov
(8) |
Dec
(1) |
2003 |
Jan
(6) |
Feb
(2) |
Mar
|
Apr
(25) |
May
(21) |
Jun
(13) |
Jul
(12) |
Aug
(14) |
Sep
(6) |
Oct
(6) |
Nov
(16) |
Dec
(6) |
2004 |
Jan
(5) |
Feb
(7) |
Mar
(13) |
Apr
(17) |
May
(24) |
Jun
(14) |
Jul
(14) |
Aug
(8) |
Sep
(3) |
Oct
(8) |
Nov
(14) |
Dec
(26) |
2005 |
Jan
(18) |
Feb
(12) |
Mar
(29) |
Apr
(9) |
May
(4) |
Jun
(12) |
Jul
(17) |
Aug
(9) |
Sep
(12) |
Oct
|
Nov
(12) |
Dec
|
2006 |
Jan
(46) |
Feb
(18) |
Mar
(11) |
Apr
(13) |
May
(12) |
Jun
(27) |
Jul
(34) |
Aug
(45) |
Sep
(27) |
Oct
(13) |
Nov
(26) |
Dec
(22) |
2007 |
Jan
(21) |
Feb
(29) |
Mar
(32) |
Apr
(6) |
May
(11) |
Jun
(13) |
Jul
(14) |
Aug
(11) |
Sep
(15) |
Oct
(7) |
Nov
(30) |
Dec
(16) |
2008 |
Jan
(11) |
Feb
(14) |
Mar
(5) |
Apr
(18) |
May
(12) |
Jun
(11) |
Jul
(5) |
Aug
(12) |
Sep
(3) |
Oct
(2) |
Nov
(15) |
Dec
(2) |
2009 |
Jan
(18) |
Feb
(6) |
Mar
(9) |
Apr
(10) |
May
(29) |
Jun
(16) |
Jul
(44) |
Aug
(49) |
Sep
(14) |
Oct
(21) |
Nov
(11) |
Dec
(22) |
2010 |
Jan
(12) |
Feb
(13) |
Mar
(5) |
Apr
(6) |
May
(15) |
Jun
(15) |
Jul
(14) |
Aug
(20) |
Sep
(17) |
Oct
(36) |
Nov
(19) |
Dec
(7) |
2011 |
Jan
(8) |
Feb
(14) |
Mar
(21) |
Apr
(12) |
May
(6) |
Jun
(12) |
Jul
(17) |
Aug
(6) |
Sep
(13) |
Oct
(15) |
Nov
(26) |
Dec
(9) |
2012 |
Jan
(25) |
Feb
(13) |
Mar
(31) |
Apr
(10) |
May
(16) |
Jun
(21) |
Jul
(61) |
Aug
(38) |
Sep
(16) |
Oct
(13) |
Nov
(37) |
Dec
(26) |
2013 |
Jan
(20) |
Feb
(26) |
Mar
(34) |
Apr
(32) |
May
(27) |
Jun
(56) |
Jul
(16) |
Aug
(38) |
Sep
(35) |
Oct
(17) |
Nov
(11) |
Dec
(7) |
2014 |
Jan
(36) |
Feb
(13) |
Mar
(25) |
Apr
|
May
(27) |
Jun
(33) |
Jul
(34) |
Aug
|
Sep
(4) |
Oct
(11) |
Nov
(42) |
Dec
(2) |
2015 |
Jan
(5) |
Feb
(6) |
Mar
(11) |
Apr
(3) |
May
|
Jun
(1) |
Jul
(2) |
Aug
(5) |
Sep
(5) |
Oct
(5) |
Nov
(8) |
Dec
(19) |
2016 |
Jan
(8) |
Feb
(12) |
Mar
(6) |
Apr
(5) |
May
(5) |
Jun
(3) |
Jul
(1) |
Aug
|
Sep
(9) |
Oct
(1) |
Nov
(2) |
Dec
(5) |
2017 |
Jan
(2) |
Feb
|
Mar
(3) |
Apr
(6) |
May
(8) |
Jun
(7) |
Jul
(14) |
Aug
(10) |
Sep
(6) |
Oct
(2) |
Nov
|
Dec
|
2018 |
Jan
|
Feb
(9) |
Mar
(2) |
Apr
(3) |
May
(1) |
Jun
(1) |
Jul
(1) |
Aug
(8) |
Sep
(4) |
Oct
(3) |
Nov
(1) |
Dec
(1) |
2019 |
Jan
(10) |
Feb
(2) |
Mar
(6) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(5) |
Aug
|
Sep
(1) |
Oct
(1) |
Nov
|
Dec
|
2020 |
Jan
(9) |
Feb
|
Mar
|
Apr
(6) |
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
(9) |
Oct
(1) |
Nov
(11) |
Dec
|
2021 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(7) |
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2023 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
(2) |
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2024 |
Jan
|
Feb
(7) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(6) |
Nov
|
Dec
|
From: Niederlander A. <ani...@uu...> - 2013-09-25 10:12:09
|
Sorry, I forgot to tell you the version of HAPI that I use. This is the 0.5.1 Bests regards Alex Niederländer Support Manager GNT Suisse Rue Peillonnex, 39 CH-1225 Chêne-Bourg Tél +41 22 869 19 99 Fax +41 22 869 19 88 Le 23.09.2013 18:05, ld...@36... a écrit : > Hello, > > I think Christian was talking about the version of HAPI, not the HL7 > version you happen to parse out. > > > Sent from my BlackBerry 10 smartphone. > *From: *Niederlander Alex > *Sent: *Monday, September 23, 2013 10:49 > *To: *Christian Ohr > *Cc: *HAPI Devel List > *Subject: *Re: [HAPI-devel] String > ca.uhn.hl7v2.model.primitive.CommonTS.toHl7TSFormat(GregorianCalendar > arg0) > throws DataTypeException > > > Christian, > > First, thank you for your quick answer. > > I'm using the version 2.4 but the package of the CommonTS classe is : > ca.uhn.hl7v2.model.primitive > > The version is more explicit in other package i'm using, for exemple : > ca.uhn.hl7v2.model.v24.segment.OBX > > Did you have an other idea ? > > Bests regards > Alex Niederländer > Support Manager > > > > > > GNT Suisse > Rue Peillonnex, 39 > CH-1225 Chêne-Bourg > Tél +41 22 869 19 99 > Fax +41 22 869 19 88 > > Le 23.09.2013 17:38, Christian Ohr a écrit : >> Which version of HAPI are you using? >> There has been http://sourceforge.net/p/hl7api/bugs/157/ that was >> fixed in HAPI 2.1 >> >> cheers >> Christian >> >> >> 2013/9/23 Niederlander Alex <ani...@uu... >> <mailto:ani...@uu...>> >> >> Hello everyone, >> >> When I use the following function : >> >> Open Declaration String >> ca.uhn.hl7v2.model.primitive.CommonTS.toHl7TSFormat(GregorianCalendar >> arg0) throws DataTypeException >> >> >> The returned result takes into account the time zone but not in >> the summer time. >> >> Is there a solution? >> >> >> -- >> Bests regards >> Alex Niederländer >> Support Manager >> >> >> >> >> >> GNT Suisse >> Rue Peillonnex, 39 >> CH-1225 Chêne-Bourg >> Tél +41 22 869 19 99 <tel:%2B41%2022%20869%2019%2099> >> Fax +41 22 869 19 88 <tel:%2B41%2022%20869%2019%2088> >> >> >> ------------------------------------------------------------------------------ >> LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! >> 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, >> SharePoint >> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power >> Pack includes >> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. >> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk >> _______________________________________________ >> Hl7api-devel mailing list >> Hl7...@li... >> <mailto:Hl7...@li...> >> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >> >> > > |
From: Niederlander A. <ani...@uu...> - 2013-09-25 10:06:53
|
Hi, Thank you for the clarification and sorry for the misunderstood. hapi version I use is very old. Is it safe and easy to migrate to version 2.1? Thank you for your help. Bests regards Alex Niederländer Support Manager GNT Suisse Rue Peillonnex, 39 CH-1225 Chêne-Bourg Tél +41 22 869 19 99 Fax +41 22 869 19 88 Le 23.09.2013 18:05, ld...@36... a écrit : > Hello, > > I think Christian was talking about the version of HAPI, not the HL7 > version you happen to parse out. > > > Sent from my BlackBerry 10 smartphone. > *From: *Niederlander Alex > *Sent: *Monday, September 23, 2013 10:49 > *To: *Christian Ohr > *Cc: *HAPI Devel List > *Subject: *Re: [HAPI-devel] String > ca.uhn.hl7v2.model.primitive.CommonTS.toHl7TSFormat(GregorianCalendar > arg0) > throws DataTypeException > > > Christian, > > First, thank you for your quick answer. > > I'm using the version 2.4 but the package of the CommonTS classe is : > ca.uhn.hl7v2.model.primitive > > The version is more explicit in other package i'm using, for exemple : > ca.uhn.hl7v2.model.v24.segment.OBX > > Did you have an other idea ? > > Bests regards > Alex Niederländer > Support Manager > > > > > > GNT Suisse > Rue Peillonnex, 39 > CH-1225 Chêne-Bourg > Tél +41 22 869 19 99 > Fax +41 22 869 19 88 > > Le 23.09.2013 17:38, Christian Ohr a écrit : >> Which version of HAPI are you using? >> There has been http://sourceforge.net/p/hl7api/bugs/157/ that was >> fixed in HAPI 2.1 >> >> cheers >> Christian >> >> >> 2013/9/23 Niederlander Alex <ani...@uu... >> <mailto:ani...@uu...>> >> >> Hello everyone, >> >> When I use the following function : >> >> Open Declaration String >> ca.uhn.hl7v2.model.primitive.CommonTS.toHl7TSFormat(GregorianCalendar >> arg0) throws DataTypeException >> >> >> The returned result takes into account the time zone but not in >> the summer time. >> >> Is there a solution? >> >> >> -- >> Bests regards >> Alex Niederländer >> Support Manager >> >> >> >> >> >> GNT Suisse >> Rue Peillonnex, 39 >> CH-1225 Chêne-Bourg >> Tél +41 22 869 19 99 <tel:%2B41%2022%20869%2019%2099> >> Fax +41 22 869 19 88 <tel:%2B41%2022%20869%2019%2088> >> >> >> ------------------------------------------------------------------------------ >> LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! >> 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, >> SharePoint >> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power >> Pack includes >> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. >> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk >> _______________________________________________ >> Hl7api-devel mailing list >> Hl7...@li... >> <mailto:Hl7...@li...> >> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >> >> > > |
From: Andrew B. <And...@rc...> - 2013-09-25 04:24:29
|
Thanks Christian, That solved my problem but I'm still curious about overriding the default validation, is it possible to override the predicate that is set in the DefaultValidationWithoutTNBuilder? For example, for a specific segment, if I am interested in allowing a space in the TN field using the predicate matches(String), I find that the compiler continues to complain at the calling of the super. Eg. <code> public class newValidation extends DefaultValidationWithoutTNBuilder{ @Override protected void configure(){ super.configure(); forAllVersions().message("ADT","A01").terser("MSH-6",matches(".*")); }} </code> I get a compile time error about failing a primitive for date-time. Is there an easy way to override the default primitive? Many thanks for your help. Andrew From: Christian Ohr [mailto:chr...@gm...] Sent: Monday, 23 September 2013 5:22 PM To: Andrew Bowden Cc: hl7...@li... Subject: Re: [HAPI-devel] HAPI 2.1 and overriding validation Hi Andrew, note that there is only a (primitive) validation for TN, not for XTN, in DefaultValidationBuilder. And, there is the DefaultValidationWithoutTNBuilder for exactly the reason you mentioned. So subclass this builder instead. Hope this helps Christian 2013/9/23 Andrew Bowden <And...@rc...<mailto:And...@rc...>> Hi there, I have recently started using HAPI and am impressed by the amount of function in the toolkit. I have been struggling for about a week with the correct way to override the validation and am hoping that someone on this list can help me. I have a segment that fails validation for an XTN type (as I am out of the US), I would like to keep validation on but change the validation for this segment. I realize that I can turn off validation for the message but am curious as to the best way to approach this problem. I have tried the HAPI by example method of extending the DefaultValidationBuilder and overriding the configure method, however the first call to super overrides the rule that I have provided to the method. I have also seen an example of extending the ValidationContextImpl (http://osdir.com/ml/medical.hl7/2008-07/msg00003.html), but this appears to be an older approach to the problem. I would appreciate any help that can be provided to point me in the right direction. Andrew ------------------------------------------------------------------------------ LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk _______________________________________________ Hl7api-devel mailing list Hl7...@li...<mailto:Hl7...@li...> https://lists.sourceforge.net/lists/listinfo/hl7api-devel |
From: <ld...@36...> - 2013-09-23 16:18:04
|
------------------------------------------------------------------------------ LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk |
From: Niederlander A. <ani...@uu...> - 2013-09-23 15:49:16
|
Christian, First, thank you for your quick answer. I'm using the version 2.4 but the package of the CommonTS classe is : ca.uhn.hl7v2.model.primitive The version is more explicit in other package i'm using, for exemple : ca.uhn.hl7v2.model.v24.segment.OBX Did you have an other idea ? Bests regards Alex Niederländer Support Manager GNT Suisse Rue Peillonnex, 39 CH-1225 Chêne-Bourg Tél +41 22 869 19 99 Fax +41 22 869 19 88 Le 23.09.2013 17:38, Christian Ohr a écrit : > Which version of HAPI are you using? > There has been http://sourceforge.net/p/hl7api/bugs/157/ that was > fixed in HAPI 2.1 > > cheers > Christian > > > 2013/9/23 Niederlander Alex <ani...@uu... > <mailto:ani...@uu...>> > > Hello everyone, > > When I use the following function : > > Open Declaration String > ca.uhn.hl7v2.model.primitive.CommonTS.toHl7TSFormat(GregorianCalendar > arg0) throws DataTypeException > > > The returned result takes into account the time zone but not in > the summer time. > > Is there a solution? > > > -- > Bests regards > Alex Niederländer > Support Manager > > > > > > GNT Suisse > Rue Peillonnex, 39 > CH-1225 Chêne-Bourg > Tél +41 22 869 19 99 <tel:%2B41%2022%20869%2019%2099> > Fax +41 22 869 19 88 <tel:%2B41%2022%20869%2019%2088> > > > ------------------------------------------------------------------------------ > LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! > 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, > SharePoint > 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power > Pack includes > Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. > http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > <mailto:Hl7...@li...> > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > > |
From: Niederlander A. <ani...@uu...> - 2013-09-23 08:26:25
|
Hello everyone, When I use the following function : Open Declaration <eclipse-open:%E2%98%82=%5C%E2%98%83Jade%5C]%20Source%20Tempo/%5C/%5C%E2%98%83Jade%5C]%20External%20Libraries%5C/lib%5C/hl7%5C/hapi-0.5.1.jar%3Cca.uhn.hl7v2.model.primitive%28CommonTS.class%E2%98%83CommonTS%7EtoHl7TSFormat%7ELjava.util.GregorianCalendar;>String <eclipse-javadoc:%E2%98%82=%5C%E2%98%83Jade%5C]%20Source%20Tempo/%5C/%5C%E2%98%83Jade%5C]%20External%20Libraries%5C/lib%5C/hl7%5C/hapi-0.5.1.jar%3Cca.uhn.hl7v2.model.primitive%28CommonTS.class%E2%98%83CommonTS%7EtoHl7TSFormat%7ELjava.util.GregorianCalendar;%E2%98%82String> ca.uhn.hl7v2.model.primitive.CommonTS <eclipse-javadoc:%E2%98%82=%5C%E2%98%83Jade%5C]%20Source%20Tempo/%5C/%5C%E2%98%83Jade%5C]%20External%20Libraries%5C/lib%5C/hl7%5C/hapi-0.5.1.jar%3Cca.uhn.hl7v2.model.primitive%28CommonTS.class%E2%98%83CommonTS>.toHl7TSFormat(GregorianCalendar <eclipse-javadoc:%E2%98%82=%5C%E2%98%83Jade%5C]%20Source%20Tempo/%5C/%5C%E2%98%83Jade%5C]%20External%20Libraries%5C/lib%5C/hl7%5C/hapi-0.5.1.jar%3Cca.uhn.hl7v2.model.primitive%28CommonTS.class%E2%98%83CommonTS%7EtoHl7TSFormat%7ELjava.util.GregorianCalendar;%E2%98%82GregorianCalendar> arg0) throws DataTypeException <eclipse-javadoc:%E2%98%82=%5C%E2%98%83Jade%5C]%20Source%20Tempo/%5C/%5C%E2%98%83Jade%5C]%20External%20Libraries%5C/lib%5C/hl7%5C/hapi-0.5.1.jar%3Cca.uhn.hl7v2.model.primitive%28CommonTS.class%E2%98%83CommonTS%7EtoHl7TSFormat%7ELjava.util.GregorianCalendar;%E2%98%82DataTypeException> The returned result takes into account the time zone but not in the summer time. Is there a solution? -- Bests regards Alex Niederländer Support Manager GNT Suisse Rue Peillonnex, 39 CH-1225 Chêne-Bourg Tél +41 22 869 19 99 Fax +41 22 869 19 88 |
From: Christian O. <chr...@gm...> - 2013-09-23 07:22:27
|
Hi Andrew, note that there is only a (primitive) validation for TN, not for XTN, in DefaultValidationBuilder. And, there is the DefaultValidationWithoutTNBuilder for exactly the reason you mentioned. So subclass this builder instead. Hope this helps Christian 2013/9/23 Andrew Bowden <And...@rc...> > Hi there,**** > > ** ** > > I have recently started using HAPI and am impressed by the amount of > function in the toolkit. I have been struggling for about a week with the > correct way to override the validation and am hoping that someone on this > list can help me.**** > > ** ** > > I have a segment that fails validation for an XTN type (as I am out of the > US), I would like to keep validation on but change the validation for this > segment. I realize that I can turn off validation for the message but am > curious as to the best way to approach this problem. **** > > ** ** > > I have tried the HAPI by example method of extending the > DefaultValidationBuilder and overriding the configure method, however the > first call to super overrides the rule that I have provided to the method. > I have also seen an example of extending the ValidationContextImpl ( > http://osdir.com/ml/medical.hl7/2008-07/msg00003.html), but this appears > to be an older approach to the problem.**** > > ** ** > > I would appreciate any help that can be provided to point me in the right > direction.**** > > ** ** > > Andrew**** > > > ------------------------------------------------------------------------------ > LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! > 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, > SharePoint > 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack > includes > Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. > http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > > |
From: Andrew B. <And...@rc...> - 2013-09-23 07:03:14
|
Hi there, I have recently started using HAPI and am impressed by the amount of function in the toolkit. I have been struggling for about a week with the correct way to override the validation and am hoping that someone on this list can help me. I have a segment that fails validation for an XTN type (as I am out of the US), I would like to keep validation on but change the validation for this segment. I realize that I can turn off validation for the message but am curious as to the best way to approach this problem. I have tried the HAPI by example method of extending the DefaultValidationBuilder and overriding the configure method, however the first call to super overrides the rule that I have provided to the method. I have also seen an example of extending the ValidationContextImpl (http://osdir.com/ml/medical.hl7/2008-07/msg00003.html), but this appears to be an older approach to the problem. I would appreciate any help that can be provided to point me in the right direction. Andrew |
From: Suranga K. <sur...@gm...> - 2013-09-19 20:34:14
|
Hi Jens, Thank you for the response. Yes, you are right. In my case, I was trying to do something smart with Maven, and there were some dependency conflicts happening behind the scene. For the benefit of anyone who googles this, please check if your dependencies are not conflicting with each other. On Thu, Sep 19, 2013 at 4:03 PM, Jens Villadsen < jen...@gm...> wrote: > That sounds like your class path is kinda screwed. Are you running it from > a command line or from you IDE. I suggest that you take a look at "java.lang.NoSuchMethodError" > - this is a pretty common exception and you should be able to find a lot of > help regarding this - e.g. > http://stackoverflow.com/questions/5407250/causes-of-java-lang-nosuchmethoderror-main-exception-in-thread-main. > Are you new to Java? > > > On 19 September 2013 03:08, Suranga Kasthurirathne <sur...@gm...>wrote: > >> >> Hi James / all, >> >> I was trying out the example which James had kindly provided at ( >> http://hl7api.sourceforge.net/xref/ca/uhn/hl7v2/examples/HandlingMultipleVersions.html >> ). >> I tried it using HAPI 2.1, but I seem to be getting an error from the >> line "HapiContext context = new DefaultHapiContext();" >> >> The error message is, >> >> SLF4J: Class path contains multiple SLF4J bindings. >> SLF4J: Found binding in >> [jar:file:/C:/Users/HP/.m2/repository/org/slf4j/slf4j-log4j12/1.6.0/slf4j-log4j12-1.6.0.jar!/org/slf4j/impl/StaticLoggerBinder.class] >> SLF4J: Found binding in >> [jar:file:/C:/Users/HP/Downloads/hapi-dist-2.0-all/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] >> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an >> explanation. >> Exception in thread "main" java.lang.NoSuchMethodError: >> ca.uhn.hl7v2.validation.impl.ValidationContextFactory.defaultValidation()Lca/uhn/hl7v2/validation/ValidationContext; >> at ca.uhn.hl7v2.DefaultHapiContext.<init>(DefaultHapiContext.java:109) >> at ca.uhn.hl7v2.DefaultHapiContext.<init>(DefaultHapiContext.java:100) >> at org.openmrs.module.RegenstriefHl7Adapter.test.main(test.java:33) >> >> I tried googling, but unfortunately it doesn't seem to help. I was >> wondering if anyone could advise me on what the problem is :-( >> >> -- >> Best Regards, >> >> Suranga >> >> >> ------------------------------------------------------------------------------ >> LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! >> 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, >> SharePoint >> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack >> includes >> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. >> >> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk >> _______________________________________________ >> Hl7api-devel mailing list >> Hl7...@li... >> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >> >> > > > -- > > Med venlig hilsen / Kind regards > > *Jens Kristian Villadsen* > cand.polyt > > Stålhøjen 24 > 8240 Risskov > Denmark > > Mobile +4523373806 > jen...@gm... > jkiddo.dyndns.org > -- Best Regards, Suranga |
From: Jens V. <jen...@gm...> - 2013-09-19 20:04:03
|
That sounds like your class path is kinda screwed. Are you running it from a command line or from you IDE. I suggest that you take a look at "java.lang.NoSuchMethodError" - this is a pretty common exception and you should be able to find a lot of help regarding this - e.g. http://stackoverflow.com/questions/5407250/causes-of-java-lang-nosuchmethoderror-main-exception-in-thread-main. Are you new to Java? On 19 September 2013 03:08, Suranga Kasthurirathne <sur...@gm...>wrote: > > Hi James / all, > > I was trying out the example which James had kindly provided at ( > http://hl7api.sourceforge.net/xref/ca/uhn/hl7v2/examples/HandlingMultipleVersions.html > ). > I tried it using HAPI 2.1, but I seem to be getting an error from the line > "HapiContext context = new DefaultHapiContext();" > > The error message is, > > SLF4J: Class path contains multiple SLF4J bindings. > SLF4J: Found binding in > [jar:file:/C:/Users/HP/.m2/repository/org/slf4j/slf4j-log4j12/1.6.0/slf4j-log4j12-1.6.0.jar!/org/slf4j/impl/StaticLoggerBinder.class] > SLF4J: Found binding in > [jar:file:/C:/Users/HP/Downloads/hapi-dist-2.0-all/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] > SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an > explanation. > Exception in thread "main" java.lang.NoSuchMethodError: > ca.uhn.hl7v2.validation.impl.ValidationContextFactory.defaultValidation()Lca/uhn/hl7v2/validation/ValidationContext; > at ca.uhn.hl7v2.DefaultHapiContext.<init>(DefaultHapiContext.java:109) > at ca.uhn.hl7v2.DefaultHapiContext.<init>(DefaultHapiContext.java:100) > at org.openmrs.module.RegenstriefHl7Adapter.test.main(test.java:33) > > I tried googling, but unfortunately it doesn't seem to help. I was > wondering if anyone could advise me on what the problem is :-( > > -- > Best Regards, > > Suranga > > > ------------------------------------------------------------------------------ > LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! > 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, > SharePoint > 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack > includes > Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. > http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > > -- Med venlig hilsen / Kind regards *Jens Kristian Villadsen* cand.polyt Stålhøjen 24 8240 Risskov Denmark Mobile +4523373806 jen...@gm... jkiddo.dyndns.org |
From: Suranga K. <sur...@gm...> - 2013-09-19 01:08:10
|
Hi James / all, I was trying out the example which James had kindly provided at ( http://hl7api.sourceforge.net/xref/ca/uhn/hl7v2/examples/HandlingMultipleVersions.html ). I tried it using HAPI 2.1, but I seem to be getting an error from the line "HapiContext context = new DefaultHapiContext();" The error message is, SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/C:/Users/HP/.m2/repository/org/slf4j/slf4j-log4j12/1.6.0/slf4j-log4j12-1.6.0.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/Users/HP/Downloads/hapi-dist-2.0-all/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. Exception in thread "main" java.lang.NoSuchMethodError: ca.uhn.hl7v2.validation.impl.ValidationContextFactory.defaultValidation()Lca/uhn/hl7v2/validation/ValidationContext; at ca.uhn.hl7v2.DefaultHapiContext.<init>(DefaultHapiContext.java:109) at ca.uhn.hl7v2.DefaultHapiContext.<init>(DefaultHapiContext.java:100) at org.openmrs.module.RegenstriefHl7Adapter.test.main(test.java:33) I tried googling, but unfortunately it doesn't seem to help. I was wondering if anyone could advise me on what the problem is :-( -- Best Regards, Suranga |
From: Suranga K. <sur...@gm...> - 2013-09-18 18:26:21
|
Hi, I'm using HAPI 0.5 jar to try and parse a string (ER7 format) to an ORUR01 object. The string i'm using is, MSH|^~\&|FORMENTRY|LOCAL|HL7LISTENER|LOCAL|20080226102656||ORU^R01|JqnfhKKtouEz8kzTk6Zo|P|2.5|1||||||||16^LOCAL.FORMID PID|||3^^^^||John3^Doe^|| PV1|1|O|1^Unknown Location||||1^Super User (1-8)|||||||||||||||||||||||||||||||||||||20080212|||||||V ORC|RE||||||||20080226102537|1^Super User OBR|1|||1238^MEDICAL RECORD OBSERVATIONS^99DCT OBX|1|NM|5497^CD4, BY FACS^99DCT||450|||||||||20080206 OBX|2|DT|5096^RETURN VISIT DATE^99DCT||20080229|||||||||2008021 I parse this string into a ORUR01 message object using GenericParser as follows, Message message = parser.parse(hl7_String); The parsing completes successfully, but for some reason, HAPI is unable to identify the components of the newly created hl7 object. For example, the hl7 string (shown above) has a pid.3 segment, but i'm unable to capture them using the pid.getPatientIdentifierList() method. The same is true of the obx.getObservationIdentifier() method. Can someone please advise me as to what i'm doing wrong here ? I also tried with PipeParser, but i'm afraid that the results are the same. PS: I tried the same with an xml delimited message, and it works perfectly fine.... -- Best Regards, Suranga |
From: Thumu, K. S (GE Healthcare) <Kis...@ge...> - 2013-09-18 16:51:10
|
Hi, I'm using PipeParser and trying to encode in an highly concurrent scenario. I'm getting MSH-1 segment as null. I could resolve the issue by generating a new object every time. But is there a way I can make my encode(Object) method thread safe. I'm using Hapi 1.2 and camel 2.9.2 Thanks in advance. Thanks & Regards, Kishore |
From: vijayaratha v. <vij...@gm...> - 2013-09-17 16:41:54
|
Hi James, Any update on this MSH9 filed from InM team? Thanks -Ratha On 14 June 2013 20:47, vijayaratha vijayasingam <vij...@gm...>wrote: > Thanks Eugene, same solution also provided by James.. > Would like to know about the decision for the first point of James's, That > is , it is a bug or not, in that case, what would be the trigger event for > this type of messages.. > > Regards; > -Ratha > > > On 14 June 2013 18:31, Eugene Berman <eug...@mu...> wrote: > >> Folks, just FYI, I had a similar issue while working on some projects; >> however, Mule ESB provides a simple solution for this; you can intercept >> the ACK message before it is returned to the caller, and replace the MSH-9 >> with any value that client would expect, by using one of several available >> transformers that accept HL7 messages. Ratha, perhaps you can do the same >> thing in your solution, e.g. you could use HAPI Terser, e.g. >> terser.set("/MSH-9", "ACK"); etc. >> >> Regards, >> >> Eugene >> >> -- >> Eugene Berman >> Sr. Enterprise Solutions Architect >> ---- >> MuleSoft Inc. >> 77 Geary Street, Ste. 400 >> San Francisco, CA 94108 >> Office: 415 229 2063 >> Website: http://www.mulesoft.com <http://www.mulesoft.com/> >> --- >> Entia non sunt multiplicanda praeter necessitatem! >> >> >> >> On Jun 14, 2013, at 4:45 AM, James Agnew <ja...@ja...> wrote: >> >> > Hi Ratha, >> > >> > To be completely honest, I have no idea what the right answer is to >> this. Certainly you are right, the standard seems to indicate that the R22 >> trigger is not allowable in an ACK message, but the standard also doesn't >> seem to provide any indication on what would be an appropriate trigger for >> an ACK to an OUL^R22 message. >> > >> > I think there are a few courses of action here: >> > >> > 1. It might make sense to take the question of "what belongs as a >> trigger event on an ACK to an OUL^R22 message" over to the HL7 >> Infrastructure and Messaging (InM) mailing list for broader consideration. >> I'm curious now too, so if you didn't want to handle this I would be >> willing to do so. >> > >> > 2. If you wanted to file a bug report for HAPI, we could probably code >> in the ability for HAPI to not use a trigger event for ACKs to messages >> that shouldn't get one according to Table 0003. I'll be honest though, this >> will be somewhat painful to implement so it probably won't happen overnight >> (unless you or someone else wanted to give it a shot?) >> > >> > 3. As a fairly simple workaround, you could add custom logic to your >> application to clear MSH-9-2 as needed after you generate your ACK message. >> > >> > Cheers, >> > James >> > >> > >> > >> > >> > On Fri, Jun 14, 2013 at 3:18 AM, vijayaratha vijayasingam < >> vij...@gm...> wrote: >> > Hi James/all; >> > >> > Do you believe this as a BUG in Hapi or acceptable behavior? >> > >> > Thanks >> > >> > >> > >> > On 13 June 2013 14:45, vijayaratha vijayasingam <vij...@gm...> >> wrote: >> > Hi James; >> > Thanks for considering this. >> > Please find the following HL7 Data definition tables [1] .In table >> 0003 (page A-25) . The trigger event R22 can be associated only with the >> OUL event type (but NOT with an ACK event type) whereas the trigger event >> A01 can be associated with both ADT and ACK event type.[2,3] >> > >> > [1]http://www.hl7.org/special/committees/vocab/v26_appendix_a.pdf >> > >> > [1]0003 A01 ADT/ACK - Admit/visit notification >> > [2]0003 R22 OUL - Unsolicited Specimen Oriented Observation Message >> > >> > Does this help you? >> > >> > Thanks >> > -Ratha >> > >> > >> > On 13 June 2013 01:40, James Agnew <ja...@ja...> wrote: >> > Hi Ratha, >> > >> > While the HL7 standard doesn't seem to specifically mention whether or >> not the response for an OUL^R22 should have the R22 trigger event in it's >> ACK, the general pattern in processing HL7 v2 is that the trigger event >> will always be the same as the message being acknowledged. A quick scan of >> the standard for words to that effect has come up blank (but maybe I'm not >> looking in the right place- I checked Chapter 2 of the 2.6 standard at >> least) but this is definitely how basically every system I work with >> regularly behaves. >> > >> > What leads you to believe this is not desirable behaviour? Are you >> interfacing with a system that specifically rejects ACK messages with the >> R22 trigger? >> > >> > Cheers, >> > James >> > >> > >> > On Wed, Jun 12, 2013 at 11:34 AM, vijayaratha vijayasingam < >> vij...@gm...> wrote: >> > Oh..hapi generates this ack message, when i send OUL^R22 message.. >> > Others any clue?.. >> > Is this valid or bug? >> > >> > >> > On 12 June 2013 20:22, VIOT Yves <yve...@cs...> wrote: >> > Sorry, i never had to handle such triggers, but if i had to, i will >> produce an ACK - unless the sender doesn't need them. >> > In specs, there is no ACK^R22 following de OUL^R22 definition but i >> can't say it's a mistake or not. >> > >> > Le 12/06/2013 16:46, vijayaratha vijayasingam a écrit : >> >> Hi Viot; >> >> Sorry i sent different initial sample message ;Please check my later >> replies; >> >> Im getting following[1] ACK in MSH-9 filde fro my OUL^R22 message. Is >> that valid? >> >> ACK^R22^ACK| >> >> >> >> Thanks >> >> >> >> >> >> On 12 June 2013 17:11, VIOT Yves <yve...@cs...> wrote: >> >> Hi, >> >> This is valid >> >> Here is what you can find in the HL7 2.5 documentation, following the >> ADT^A01^ADT_A01 messages structure definition. >> >> ACK^A01^ACK >> >> To get rid of it just get the MSH-9-1 with the terser. >> >> >> >> Yves >> >> >> >> Le 12/06/2013 13:25, vijayaratha vijayasingam a écrit : >> >>> Hi all; >> >>> Anyone have clue..?:( >> >>> I badly need this to sort out.. >> >>> thanks >> >>> >> >>> >> >>> On 12 June 2013 15:31, vijayaratha vijayasingam < >> vij...@gm...> wrote: >> >>> Hi all; >> >>> Im using Hapi 2.1 version release an dit works perfect. But i have an >> issue with an error response which i get from Hapi. >> >>> My request is; >> >>> MSH|^~\&|||||20130612143324.392+0530||ADT^A01^ADT_A01|2601|T|2.5 >> >>> >> >>> And My response is; >> >>> MSH|^~\&|||||20130612152510.448+0530||ACK^A01^ACK|1623|T|2.5 >> >>> MSA|AE|2601 >> >>> ERR|||207^Application internal error^HL70357^^^^^^OOPS|E >> >>> >> >>> >> >>> In the above response , if you check the MSH-9 filed , it is; >> >>> >> >>> ACK^A01^ACK >> >>> >> >>> Shouldn't that be "|ACK". because it is additionaly adding "AO1" >> message to that filed, which is not valid. And i suspect that , it picks >> from that from original request. >> >>> >> >>> Can anybody help me on this? Ho w can i avoid that invalid segment? >> >>> Why Hapi additionally adds that filed in the MSH-9 filed? >> >>> >> >>> Thanks >> >>> -ratha >> >>> >> >>> >> >>> >> >>> >> >>> >> ------------------------------------------------------------------------------ >> >>> This SF.net email is sponsored by Windows: >> >>> >> >>> Build for Windows Store. >> >>> >> >>> >> >>> http://p.sf.net/sfu/windows-dev2dev >> >>> >> >>> >> >>> _______________________________________________ >> >>> Hl7api-devel mailing list >> >>> >> >>> Hl7...@li... >> >>> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >> >> >> >> >> >> >> ------------------------------------------------------------------------------ >> >> This SF.net email is sponsored by Windows: >> >> >> >> Build for Windows Store. >> >> >> >> http://p.sf.net/sfu/windows-dev2dev >> >> _______________________________________________ >> >> Hl7api-devel mailing list >> >> Hl7...@li... >> >> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >> >> >> >> >> > >> > >> > >> ------------------------------------------------------------------------------ >> > This SF.net email is sponsored by Windows: >> > >> > Build for Windows Store. >> > >> > http://p.sf.net/sfu/windows-dev2dev >> > _______________________________________________ >> > Hl7api-devel mailing list >> > Hl7...@li... >> > https://lists.sourceforge.net/lists/listinfo/hl7api-devel >> > >> > >> > >> > >> ------------------------------------------------------------------------------ >> > This SF.net email is sponsored by Windows: >> > >> > Build for Windows Store. >> > >> > http://p.sf.net/sfu/windows-dev2dev >> > _______________________________________________ >> > Hl7api-devel mailing list >> > Hl7...@li... >> > https://lists.sourceforge.net/lists/listinfo/hl7api-devel >> > >> > >> > >> > >> > >> > >> ------------------------------------------------------------------------------ >> > This SF.net email is sponsored by Windows: >> > >> > Build for Windows Store. >> > >> > >> http://p.sf.net/sfu/windows-dev2dev_______________________________________________ >> > Hl7api-devel mailing list >> > Hl7...@li... >> > https://lists.sourceforge.net/lists/listinfo/hl7api-devel >> >> > > > -- > -Ratha > http://vvratha.blogspot.com/ > -- -Ratha http://vvratha.blogspot.com/ |
From: Bartłomiej B. <b.b...@ph...> - 2013-09-17 10:47:42
|
Sorry that I didn't response for so long. The approach with two servers and two clients is understandable. But still I have one thing in my mind- as you said: "there is always data that flows back on that port, but it's an acknowledgement, or a response message if the original message was a query of some sort" so basically let's have a scenario: 1. We have a server created. 2. We use hapi-testpanel to connect with that sever. the hapi-testpanel "sending connection" is active - it's connected to the server. I can now from hapi-testpanel (client) send message and client will receive ACK message. As I understand hapi-testpanel (sending connection) is using in this situation: sendAndReceive(msg); but is there anyway that server can send msg to client (connection is established)? So it's like sending ACK but without previously receiving any message to server by client. If anyone know how this can be done - please let me know. Currently I'm using camel hl7 mina2 so maybe with mina2 it's even easier but if anyone knows a way to do this in hapi-hl7 or anything please share your knowledge. Bartłomiej Buczek On 08/27/2013 10:53 PM, James Agnew wrote: > Hi Bartłomiej, > > I have never heard of a situation where a single port is used to both > send and receive messages, at least not in the way that you describe. > HL7 v2 transactions are typically only one direction on a single port > (there is always data that flows back on that port, but it's an > acknowledgement, or a response message if the original message was a > query of some sort). > > It seems to me that this would be a problematic setup anyhow- If > either application was sending messages on the same port whenever they > wanted, you would have collisions and very unpredictable behaviour if > both applications decided to send a message at the same time. > > It would probably be worth confirming with the vendor of the other > system how they are expecting this to work. My guess is that if you > have an application that will sometimes send data to that system, and > at other times receive data from that system, you need to have one > client and one server on your system, and they will also have one > client and one server on theirs. This is how 99.9% of the HL7 v2 world > works. > > Cheers, > James > > > > On Tue, Aug 27, 2013 at 3:06 PM, Bartłomiej Buczek > <b.b...@ph... <mailto:b.b...@ph...>> wrote: > > James, > maybe I'm missing some knowledge about HL7 or I misunderstood it > but I though that there is one server through which applications > can communicate. In you example I would have to have two servers > that listens on different ports - am I right? > The problem of mine comes from that one of the clients that we try > to integrate requires from us address and port to which he will > connect and listen to messages as well as send messages and I have > no idea how exactly this should work on the same port. > > > 2013/8/27 James Agnew <ja...@ja... > <mailto:ja...@ja...>> > > Are you saying that you want to have your application open a > TCP port, accept a connection, receive A02 messages over that > connection, and then send A04 messages out over the same > connection? This is not a normal thing to do with HL7, so I'm > probably misunderstanding. > > Or do you just want your application to be able to open a > server socket and receive A02 messages over connections that > come in, but also to initiate a second client connection and > use that connection to send A04 messages? > > If it's the latter, you just need both parts of the example I > linked to. > > context.newClient(...) creates a client object that can be > used to connect to remote servers and send messages to them, > context.newServer(...) creates a server object that can be > started and will listen for incoming connections and receive > messages on them. > > Cheers, > James > > > On Tue, Aug 27, 2013 at 9:08 AM, Bartłomiej Buczek > <b.b...@ph... <mailto:b.b...@ph...>> wrote: > > Hi James, > not exactly. I want something like this: > 1. Server is already running. > 2. One application is connected to the server and is > sending messages of type ADT_A04 and can receive messages > of type ADT_A02. > 3. I want to create another application, connect it to the > server and make it listen ADT_A02 and send ADT_A04. > > So that those two applications can communicate through HL7 > using TCP/IP. > > > Bartłomiej Buczek > Phoenix Tecnologie Sp. z o.o. > ul. Wiosenna 14/2; 53-017 Wrocław, Poland > NIP: 899 258 73 59 > Tel.+48 71 338 65 64 <tel:%2B48%2071%20338%2065%2064>; Kom.+48 668 891 540 <tel:%2B48%20668%20891%20540> > Fax+48 71 338 65 55 <tel:%2B48%2071%20338%2065%2055> > b.b...@ph... <mailto:b.b...@ph...> > phxtecno.com <http://phxtecno.com> > > On 08/27/2013 02:48 PM, James Agnew wrote: >> Hi Bartłomiej, >> >> It sounds like you're probably looking to create a client >> as opposed to a server. You'll see an example of how to >> do that starting on line 145 here: >> http://hl7api.sourceforge.net/xref/ca/uhn/hl7v2/examples/SendAndReceiveAMessage.html >> >> Cheers, >> James >> >> >> On Tue, Aug 27, 2013 at 6:37 AM, Bartłomiej Buczek >> <b.b...@ph... <mailto:b.b...@ph...>> wrote: >> >> Really no one can help me with this? I'm waiting so >> long and simple no response... >> >> Bartłomiej Buczek >> Phoenix Tecnologie Sp. z o.o. >> ul. Wiosenna 14/2; 53-017 Wrocław, Poland >> NIP: 899 258 73 59 >> Tel.+48 71 338 65 64 <tel:%2B48%2071%20338%2065%2064>; Kom.+48 668 891 540 <tel:%2B48%20668%20891%20540> >> Fax+48 71 338 65 55 <tel:%2B48%2071%20338%2065%2055> >> b.b...@ph... <mailto:b.b...@ph...> >> phxtecno.com <http://phxtecno.com> >> >> On 07/12/2013 12:06 PM, Bartłomiej Buczek wrote: >>> Hi, >>> I was following example send multiple messages out >>> <http://hl7api.sourceforge.net/xref/ca/uhn/hl7v2/examples/SendLotsOfMessages.html> >>> and found out something like this: >>> >>> // Setup server to listen for incoming message >>> int port = 8813; >>> boolean useTls = false; >>> HapiContext context = new DefaultHapiContext(); >>> HL7Service server = context.newServer(port, useTls); >>> >>> >>> // We want to listen ADT^A01 messages >>> ReceivingApplication handler = >>> (ReceivingApplication) new ExampleReceiverApplication(); >>> server.registerApplication("ADT", "A01", handler); >>> >>> So I run the application and as far as I understand >>> I have setup server and a client application which >>> will listen for ADT^A01 messages. Now I want to >>> create another application (let's say another >>> client) which will connect with that already created >>> server and listen for ADT^A02 messages. >>> >>> I found on documentation something like that: >>> >>> "If you are wondering how to integrate HAPI into an >>> existing server application, this is probably the >>> place. Create a class that implements >>> ReceivingApplication, then look at HL7Server and >>> ApplicationRouter to see how to get HAPI to listen >>> for messages on a socket and pass them to your >>> ReceivingApplication." >>> >>> But how should I use HL7Server and ApplicationRouter >>> to connect with previously created server? Maybe I'm >>> missing something in the logic but let's consider >>> that one software already has running server and I >>> want to integrate with them to listen for messages >>> special for my application (like ADT^A02) - how to >>> do this? >>> >>> >>> -- >>> Bartłomiej Buczek >>> Phoenix Tecnologie Sp. z o.o. >>> ul. Wiosenna 14/2; 53-017 Wrocław, Poland >>> NIP: 899 258 73 59 >>> Tel.+48 71 338 65 64 <tel:%2B48%2071%20338%2065%2064>; Kom.+48 668 891 540 <tel:%2B48%20668%20891%20540> >>> Fax+48 71 338 65 55 <tel:%2B48%2071%20338%2065%2055> >>> b.b...@ph... <mailto:b.b...@ph...> >>> phxtecno.com <http://phxtecno.com> >> >> >> ------------------------------------------------------------------------------ >> Introducing Performance Central, a new site from >> SourceForge and >> AppDynamics. Performance Central is your source for >> news, insights, >> analysis and resources for efficient Application >> Performance Management. >> Visit us today! >> http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk >> _______________________________________________ >> Hl7api-devel mailing list >> Hl7...@li... >> <mailto:Hl7...@li...> >> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >> >> > > > > |
From: Thumu, K. S (GE Healthcare) <Kis...@ge...> - 2013-09-12 13:24:15
|
Sorry it was HAP 1.2 Thanks, Kishore From: Christian Ohr [mailto:chr...@gm...] Sent: Thursday, September 12, 2013 6:48 PM To: Thumu, Kishore S (GE Healthcare) Cc: hl7...@li... Subject: Re: [HAPI-devel] ER7 to XML format HAPI 2.5? - well, the most recent HAPI version is 2.1. Regarding Camel 2.5 (which is VERY old) - in Camel 2.11 you can inject a XMLParser into the DataFormat, but in Camel 2.5 you can't. So instead you need to write your own Camel processor or a POJO, which calls DefaultXMLParser#render on the Camel body and put back the XML result. regards Christian 2013/9/12 Thumu, Kishore S (GE Healthcare) <Kis...@ge...<mailto:Kis...@ge...>> Hi, I'm using HAPI v2.5. Thanks, Kishore From: Christian Ohr [mailto:chr...@gm...<mailto:chr...@gm...>] Sent: Thursday, September 12, 2013 1:32 PM To: Thumu, Kishore S (GE Healthcare) Cc: hl7...@li...<mailto:hl7...@li...> Subject: Re: [HAPI-devel] ER7 to XML format Looks like you are using the DataFormat of the camel-hl7 component that wraps HAPI parsers? Which version of Camel and HAPI are you using? Christian 2013/9/12 Thumu, Kishore S (GE Healthcare) <Kis...@ge...<mailto:Kis...@ge...>> Hi, Can someone help me with conversion ER7 data to XML data As of now I'm using DataFormat hl7 = new HL7DataFormat(); Can someone suggest me with an equivalent class for HL7DataFormat which would convert my data to XML rather than to ER7(Pipe seperated). Help would be highly appreciated. Thanks, Kishore ------------------------------------------------------------------------------ How ServiceNow helps IT people transform IT departments: 1. Consolidate legacy IT systems to a single system of record for IT 2. Standardize and globalize service processes across IT 3. Implement zero-touch automation to replace manual, redundant tasks http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk _______________________________________________ Hl7api-devel mailing list Hl7...@li...<mailto:Hl7...@li...> https://lists.sourceforge.net/lists/listinfo/hl7api-devel |
From: Christian O. <chr...@gm...> - 2013-09-12 13:17:42
|
HAPI 2.5? - well, the most recent HAPI version is 2.1. Regarding Camel 2.5 (which is VERY old) - in Camel 2.11 you can inject a XMLParser into the DataFormat, but in Camel 2.5 you can't. So instead you need to write your own Camel processor or a POJO, which calls DefaultXMLParser#render on the Camel body and put back the XML result. regards Christian 2013/9/12 Thumu, Kishore S (GE Healthcare) <Kis...@ge...> > Hi,**** > > I’m using HAPI v2.5.**** > > ** ** > > Thanks,**** > > Kishore**** > > ** ** > > *From:* Christian Ohr [mailto:chr...@gm...] > *Sent:* Thursday, September 12, 2013 1:32 PM > *To:* Thumu, Kishore S (GE Healthcare) > *Cc:* hl7...@li... > *Subject:* Re: [HAPI-devel] ER7 to XML format**** > > ** ** > > Looks like you are using the DataFormat of the camel-hl7 component that > wraps HAPI parsers?**** > > Which version of Camel and HAPI are you using? > > Christian**** > > ** ** > > 2013/9/12 Thumu, Kishore S (GE Healthcare) <Kis...@ge...>**** > > Hi,**** > > Can someone help me with conversion ER7 data to XML data**** > > **** > > As of now I’m using **** > > **** > > DataFormat hl7 = new HL7DataFormat();**** > > **** > > Can someone suggest me with an equivalent class for HL7DataFormat which > would convert my data to XML rather than to ER7(Pipe seperated).**** > > **** > > Help would be highly appreciated.**** > > **** > > Thanks,**** > > Kishore**** > > > > ------------------------------------------------------------------------------ > How ServiceNow helps IT people transform IT departments: > 1. Consolidate legacy IT systems to a single system of record for IT > 2. Standardize and globalize service processes across IT > 3. Implement zero-touch automation to replace manual, redundant tasks > http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > https://lists.sourceforge.net/lists/listinfo/hl7api-devel**** > > ** ** > |
From: Thumu, K. S (GE Healthcare) <Kis...@ge...> - 2013-09-12 08:26:41
|
Hi, I'm using HAPI v2.5. Thanks, Kishore From: Christian Ohr [mailto:chr...@gm...] Sent: Thursday, September 12, 2013 1:32 PM To: Thumu, Kishore S (GE Healthcare) Cc: hl7...@li... Subject: Re: [HAPI-devel] ER7 to XML format Looks like you are using the DataFormat of the camel-hl7 component that wraps HAPI parsers? Which version of Camel and HAPI are you using? Christian 2013/9/12 Thumu, Kishore S (GE Healthcare) <Kis...@ge...<mailto:Kis...@ge...>> Hi, Can someone help me with conversion ER7 data to XML data As of now I'm using DataFormat hl7 = new HL7DataFormat(); Can someone suggest me with an equivalent class for HL7DataFormat which would convert my data to XML rather than to ER7(Pipe seperated). Help would be highly appreciated. Thanks, Kishore ------------------------------------------------------------------------------ How ServiceNow helps IT people transform IT departments: 1. Consolidate legacy IT systems to a single system of record for IT 2. Standardize and globalize service processes across IT 3. Implement zero-touch automation to replace manual, redundant tasks http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk _______________________________________________ Hl7api-devel mailing list Hl7...@li...<mailto:Hl7...@li...> https://lists.sourceforge.net/lists/listinfo/hl7api-devel |
From: Christian O. <chr...@gm...> - 2013-09-12 08:01:53
|
Looks like you are using the DataFormat of the camel-hl7 component that wraps HAPI parsers? Which version of Camel and HAPI are you using? Christian 2013/9/12 Thumu, Kishore S (GE Healthcare) <Kis...@ge...> > Hi,**** > > Can someone help me with conversion ER7 data to XML data**** > > ** ** > > As of now I’m using **** > > ** ** > > DataFormat hl7 = new HL7DataFormat();**** > > ** ** > > Can someone suggest me with an equivalent class for HL7DataFormat which > would convert my data to XML rather than to ER7(Pipe seperated).**** > > ** ** > > Help would be highly appreciated.**** > > ** ** > > Thanks,**** > > Kishore**** > > > ------------------------------------------------------------------------------ > How ServiceNow helps IT people transform IT departments: > 1. Consolidate legacy IT systems to a single system of record for IT > 2. Standardize and globalize service processes across IT > 3. Implement zero-touch automation to replace manual, redundant tasks > http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > > |
From: Thumu, K. S (GE Healthcare) <Kis...@ge...> - 2013-09-12 07:33:19
|
Hi, Can someone help me with conversion ER7 data to XML data As of now I'm using DataFormat hl7 = new HL7DataFormat(); Can someone suggest me with an equivalent class for HL7DataFormat which would convert my data to XML rather than to ER7(Pipe seperated). Help would be highly appreciated. Thanks, Kishore |
From: Ian V. <Ian...@he...> - 2013-09-04 22:28:56
|
I grabbed this code from the on-line source. Pretty sure it is from Hapi 2.1, although I think I checked 2.0 and found this routine hadn't had changes. As to a pluggable version, for me if the proposal that "a single escape character on it's own does not constitute an escape sequence and should not be removed from the message" is accepted, I don't need a pluggable version. If however single escape characters continue to be removed from messages such that it cannot be determined that this has occurred, then I will need a pluggable version. The trickiest part from my end is that it's gone, and I can't tell. Nearly every other case I have encountered where delimiter characters are not escaped (and I have seen them all), there has been some way to tell (except maybe the field delimiter, that one sucks to figure out). In general I would recommend that there be test cases around the place (including bad behaviours) that decode then encode a message, segment or field, and compare the input to the output. If they don't match, try to figure out if it is possible to make them match. Some cases may indicate that a bad sender can really stuff things up, and there is no fixing it. These cases may be wise to mention in doco. I have an substantial amount of compensation code for various fields and data types to try to help with unescaped delimiters, principally to try to get the field to look like what the data on the senders application screen looked like, and pass it on correctly escaped. We seem to have a LOT of badly behaved vendors, and apparently no power to make them fix it. There are some big names on the list to. Thanks for your consideration. Ian >>> Christian Ohr <chr...@gm...> 05/09/13 2:08 >>> Yes, proper escaping is an endless source of joy ;-) What HAPI version are you using, btw? I'll take a look at your code in the next few days if time permits. When modifying existing functionality, we always face the problem of backwards compatibility. So for the past one or two releases, we rather added possibilities to plug in custom strategies of doing things while keeping the default, rather than changing existing behavior. So far, Escape is unfortunately very static, but for 2.2 we can think about making the escaping strategy pluggable just like other things in HAPI. Thoughts? cheers Christian 2013/9/4 Ian Vowles <Ian...@he...> I have sent mails to the general list about this issue before, and the advice has helped me progress. Then along comes another system that has slightly different behaviour. In this particular case a system correctly escapes the HL7 delimiters EXCEPT the escape delimiter. This allows it to send field content like this (from an address): 1 \ 24 Smith \T\ Wesson Road I was hopeful that since the single escape on it's own didn't form part of an escape sequence, that it might be preserved through the parse. This is not the case. The lone backslash is consumed in the process and disappears. I don't know how valid an argument it is to say it should be preserved, but if it isn't, I can't subsequently properly escape it to send to a downstream system. Given that I had been dealing with HL7 for some time before I found HAPI, I had done some work previously on an encode / unencode routine. My own code couldn't cope with this one either. I decided it was time to be brave, and dive into the HAPI code. Somewhere there had to be encode/unecode low level routines. Up until I looked in the source, I had been creating a new ST object, and using it's parse and encode methods. Once I looked into the source I found the Escape class. This updated version of Escape does the following: Preserves escape characters that do not form part of an escape sequence Permits the exceptional escape sequence case of \X000d\ to work when the escape character has been changed to something other than \ Adds extra HEX escaped code \X0D\ and \X0A\ because we see them here occasionally. Test case code is also included at the bottom, including my now infamous "HATER" example :-). Test cases with lots of > < are there because we often do transforms between HL7 and XML, so we often look at these in additional test cases of the XML output produced. What are my chances of this being adopted? If not, how can I get my version to override the existing one? Thanks Ian ---------- /** The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is "Escape.java". Description: "Handles "escaping" and "unescaping" of text according to the HL7 escape sequence rules defined in section 2.10 of the standard (version 2.4)" The Initial Developer of the Original Code is University Health Network. Copyright (C) 2001. All Rights Reserved. Contributor(s): Mark Lee (Skeva Technologies); Elmar Hinz Alternatively, the contents of this file may be used under the terms of the GNU General Public License (the ?GPL?), in which case the provisions of the GPL are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of the GPL and not to allow others to use your version of this file under the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the GPL License. If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. */ package ca.uhn.hl7v2.parser; import java.util.Collections; import java.util.LinkedHashMap; import java.util.Map; /** * Handles "escaping" and "unescaping" of text according to the HL7 escape * sequence rules defined in section 2.10 of the standard (version 2.4). * Currently, escape sequences for multiple character sets are unsupported. The * highlighting and locally defined escape sequences are also * unsupported. * The only hexademical escapes supported are X000d, X0D, X0A * * @author Bryan Tripp * @author Mark Lee (Skeva Technologies) * @author Elmar Hinz * @author Christian Ohr */ public class HL7Escape { /** Creates a new instance of Escape */ public Hl7Escape() { } /** * @param text string to be escaped * @return the escaped string * <p>Defaults the escape characters to the conventional values |^~\& */ public static String escape(String text) { return escape(text,"|^~\\&"); } /** * @param text string to be escaped * @param encChars encoding characters to be used in the order * <br>Field, Component, Repetition, Escape, Sub-component * @return the escaped string */ public static String escape(String text, String encChars) { EncLookup esc = getEscapeSequences(encChars); int textLength = text.length(); StringBuilder result = new StringBuilder(textLength); for (int i = 0; i < textLength; i++) { boolean charReplaced = false; char c = text.charAt(i); FORENCCHARS: for (int j = 0; j < 6; j++) { if (text.charAt(i) == esc.characters[j]) { // Formatting escape sequences such as \.br\ should be left alone if (j == 4) { if (i+1 < textLength) { // Check for \.br\ char nextChar = text.charAt(i + 1); switch (nextChar) { case '.': case 'C': case 'M': case 'X': case 'Z': { int nextEscapeIndex = text.indexOf(esc.characters[j], i + 1); if (nextEscapeIndex > 0) { result.append(text.substring(i, nextEscapeIndex + 1)); charReplaced = true; i = nextEscapeIndex; break FORENCCHARS; } break; } case 'H': case 'N': { if (i+2 < textLength && text.charAt(i+2) == '\\') { int nextEscapeIndex = i + 2; if (nextEscapeIndex > 0) { result.append(text.substring(i, nextEscapeIndex + 1)); charReplaced = true; i = nextEscapeIndex; break FORENCCHARS; } } break; } } } } result.append(esc.encodings[j]); charReplaced = true; break; } } if (!charReplaced) { result.append(c); } } return result.toString(); } /** * @param text string to be unescaped * @return the unescaped string * <p>Defaults the escape characters to the conventional values |^~\& */ public static String unescape(String text) { return unescape(text,"|^~\\&"); } /** * @param text string to be unescaped * @param encChars encoding characters to be used in the order * <br>Field, Component, Repetition, Escape, Sub-component * @return the unescaped string */ public static String unescape(String text, String encChars) { // If the escape char isn't found, we don't need to look for escape sequences char escapeChar = encChars.charAt(3); boolean foundEscapeChar = false; for (int i = 0; i < text.length(); i++) { if (text.charAt(i) == escapeChar) { foundEscapeChar = true; break; } } if (!foundEscapeChar) { return text; } int textLength = text.length(); StringBuilder result = new StringBuilder(textLength + 20); EncLookup esc = getEscapeSequences(encChars); char escape = esc.characters[3]; int encodingsCount = esc.characters.length; int i = 0; while (i < textLength) { char c = text.charAt(i); if (c != escape) { result.append(c); i++; } else { boolean foundEncoding = false; // Test against the standard encodings for (int j = 0; j < encodingsCount; j++) { String encoding = esc.encodings[j]; int encodingLength = encoding.length(); if ((i + encodingLength <= textLength) && text.substring(i, i + encodingLength) .equals(encoding)) { result.append(esc.characters[j]); i += encodingLength; foundEncoding = true; break; } } if (!foundEncoding) { // If we haven't found this, there is one more option. Escape sequences of /.XXXXX/ are // formatting codes. They should be left intact if (i + 1 < textLength) { char nextChar = text.charAt(i + 1); switch (nextChar) { case '.': case 'C': case 'M': case 'X': case 'Z': { int closingEscape = text.indexOf(escape, i + 1); if (closingEscape > 0) { String substring = text.substring(i, closingEscape + 1); result.append(substring); i += substring.length(); } else { i++; } break; } case 'H': case 'N': { int closingEscape = text.indexOf(escape, i + 1); if (closingEscape == i + 2) { String substring = text.substring(i, closingEscape + 1); result.append(substring); i += substring.length(); } else { i++; } break; } default: { // Preserve unescaped escape delimiter result.append(c); i++; } } } else { // Preserve unescaped escape delimiter result.append(c); i++; } } } } return result.toString(); } /** * Returns a HashTable with escape sequences as keys, and corresponding * Strings as values. * @param encChars * @return */ private static EncLookup getEscapeSequences(String encChars) { EncLookup escapeSequences = new EncLookup(encChars); return escapeSequences; } /** * A performance-optimized replacement for using when * mapping from HL7 special characters to their respective * encodings * * @author Christian Ohr */ private static class EncLookup { char[] characters = new char[8]; String[] encodings = new String[8]; EncLookup(String ec) { characters[0] = ec.charAt(0); characters[1] = ec.charAt(1); characters[2] = ec.charAt(2); characters[3] = ec.charAt(3); characters[4] = ec.charAt(4); characters[5] = '\r'; characters[6] = '\r'; characters[7] = '\n'; char escapeChar = ec.charAt(3); char[] codes = {'F', 'S', 'R', 'E', 'T'}; for (int i = 0; i < codes.length; i++) { StringBuilder seq = new StringBuilder(); seq.append(escapeChar); seq.append(codes[i]); seq.append(escapeChar); encodings[i] = seq.toString(); } // encodings[5] = "\\X000d\\"; encodings[5] = escapeChar + "X000d" + escapeChar; encodings[6] = escapeChar + "X0D" + escapeChar; encodings[7] = escapeChar + "X0A" + escapeChar; } } } ----- Test case: /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package ca.uhn.hl7v2.parser; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import static org.junit.Assert.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * * @author vowlesi */ public class SingleBackslashV3Test { private static final Logger log = LoggerFactory.getLogger(EscapeV2Test.class); private String encChars = "|^~\\&"; public SingleBackslashV3Test() { } @BeforeClass public static void setUpClass() { } @AfterClass public static void tearDownClass() { } @Before public void setUp() { } @After public void tearDown() { } /** * Test of unescape method, of class Escape. */ @Test public void testUnescapeSingleBackslash() { log.debug("unescape with single backslash"); String text = "1 \\ 24 Smith \\T\\ Wesson Road"; String expResult = "1 \\ 24 Smith & Wesson Road"; String result = Hl7Escape.unescape(text); log.debug("Input : " + text); log.debug("Result : " + result); log.debug("Expected : " + expResult); assertEquals(expResult, result); text = "\\H\\A\\T\\E\\R\\\\N\\<<\\S\\>>\"\\E\\''\\F\\Special test '\\XFFFFFFFFFFFFFFFFFFFF\\'"; expResult = "\\H\\A&E~\\N\\<<^>>\"\\''|Special test '\\XFFFFFFFFFFFFFFFFFFFF\\'"; result = Hl7Escape.unescape(text); log.debug("Input : " + text); log.debug("Result : " + result); log.debug("Expected : " + expResult); assertEquals(expResult, result); text = "\\H\\A\\T\\E\\R\\\\N\\<<\\S\\>>\"\\E\\''\\F\\Special test '\\X000d\\'"; expResult = "\\H\\A&E~\\N\\<<^>>\"\\''|Special test '\r\'"; result = Hl7Escape.unescape(text); log.debug("Input : " + text); log.debug("Result : " + result); log.debug("Expected : " + expResult); assertEquals(expResult, result); text = "\\\\\\\\\\\\\\\\\\\\"; expResult = "\\\\\\\\\\\\\\\\\\\\"; result = Hl7Escape.unescape(text); log.debug("Input : " + text); log.debug("Result : " + result); log.debug("Expected : " + expResult); assertEquals(expResult, result); text = "Ken\\n\\F\\edy"; expResult = "Ken\\E\\n\\F\\edy"; result = Hl7Escape.unescape(text); result = Hl7Escape.escape(result); log.debug("Input : " + text); log.debug("Result : " + result); log.debug("Expected : " + expResult); assertEquals(expResult, result); } } ******************************************************************************** This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/received in error. Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited. The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters. If you are not the intended recipient(s), or if you have received this email in error, you are asked to immediately notify the sender by telephone collect on Australia +61 1800 198 175 ( tel:%2B61%201800%20198%20175 ) or by return email. You should also delete this email, and any copies, from your computer system network and destroy any hard copies produced. If not an intended recipient of this email, you must not copy, distribute or take any action(s) that relies on it; any form of disclosure, modification, distribution and/or publication of this email is also prohibited. Although Queensland Health takes all reasonable steps to ensure this email does not contain malicious software, Queensland Health does not accept responsibility for the consequences if any person's computer inadvertently suffers any disruption to services, loss of information, harm or is infected with a virus, other malicious computer programme or code that may occur as a consequence of receiving this email. Unless stated otherwise, this email represents only the views of the sender and not the views of the Queensland Government. ********************************************************************************** ------------------------------------------------------------------------------ Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk _______________________________________________ Hl7api-devel mailing list Hl7...@li... https://lists.sourceforge.net/lists/listinfo/hl7api-devel ******************************************************************************** This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/received in error. Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited. The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters. If you are not the intended recipient(s), or if you have received this email in error, you are asked to immediately notify the sender by telephone collect on Australia +61 1800 198 175 or by return email. You should also delete this email, and any copies, from your computer system network and destroy any hard copies produced. If not an intended recipient of this email, you must not copy, distribute or take any action(s) that relies on it; any form of disclosure, modification, distribution and/or publication of this email is also prohibited. Although Queensland Health takes all reasonable steps to ensure this email does not contain malicious software, Queensland Health does not accept responsibility for the consequences if any person's computer inadvertently suffers any disruption to services, loss of information, harm or is infected with a virus, other malicious computer programme or code that may occur as a consequence of receiving this email. Unless stated otherwise, this email represents only the views of the sender and not the views of the Queensland Government. ********************************************************************************** |
From: Christian O. <chr...@gm...> - 2013-09-04 16:09:00
|
Yes, proper escaping is an endless source of joy ;-) What HAPI version are you using, btw? I'll take a look at your code in the next few days if time permits. When modifying existing functionality, we always face the problem of backwards compatibility. So for the past one or two releases, we rather added possibilities to plug in custom strategies of doing things while keeping the default, rather than changing existing behavior. So far, Escape is unfortunately very static, but for 2.2 we can think about making the escaping strategy pluggable just like other things in HAPI. Thoughts? cheers Christian 2013/9/4 Ian Vowles <Ian...@he...> > I have sent mails to the general list about this issue before, and the > advice has helped me progress. > > Then along comes another system that has slightly different behaviour. > > In this particular case a system correctly escapes the HL7 delimiters > EXCEPT the escape delimiter. This allows it to send field content like > this (from an address): > > 1 \ 24 Smith \T\ Wesson Road > > I was hopeful that since the single escape on it's own didn't form part of > an escape sequence, that it might be preserved through the parse. This is > not the case. The lone backslash > is consumed in the process and disappears. I don't know how valid an > argument it is to say it should be preserved, but if it isn't, I can't > subsequently properly escape it to send to > a downstream system. > > Given that I had been dealing with HL7 for some time before I found HAPI, > I had done some work previously on an encode / unencode routine. My own > code couldn't cope with this one > either. > > I decided it was time to be brave, and dive into the HAPI code. Somewhere > there had to be encode/unecode low level routines. > Up until I looked in the source, I had been creating a new ST object, and > using it's parse and encode methods. Once I looked into the source I found > the Escape class. > > This updated version of Escape does the following: > > Preserves escape characters that do not form part of an escape sequence > Permits the exceptional escape sequence case of \X000d\ to work when the > escape character has been changed to something other than \ > Adds extra HEX escaped code \X0D\ and \X0A\ because we see them here > occasionally. > > Test case code is also included at the bottom, including my now infamous > "HATER" example :-). Test cases with lots of > < are there because we often > do transforms between HL7 and XML, so we often look at these in additional > test cases of the XML output produced. > > What are my chances of this being adopted? > > If not, how can I get my version to override the existing one? > > Thanks > Ian > > ---------- > /** > The contents of this file are subject to the Mozilla Public License > Version 1.1 > (the "License"); you may not use this file except in compliance with the > License. > You may obtain a copy of the License at http://www.mozilla.org/MPL/ > Software distributed under the License is distributed on an "AS IS" basis, > WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License > for the > specific language governing rights and limitations under the License. > > The Original Code is "Escape.java". Description: > "Handles "escaping" and "unescaping" of text according to the HL7 escape > sequence rules > defined in section 2.10 of the standard (version 2.4)" > > The Initial Developer of the Original Code is University Health Network. > Copyright (C) > 2001. All Rights Reserved. > > Contributor(s): Mark Lee (Skeva Technologies); Elmar Hinz > > Alternatively, the contents of this file may be used under the terms of > the > GNU General Public License (the ?GPL?), in which case the provisions of > the GPL are > applicable instead of those above. If you wish to allow use of your > version of this > file only under the terms of the GPL and not to allow others to use your > version > of this file under the MPL, indicate your decision by deleting the > provisions above > and replace them with the notice and other provisions required by the GPL > License. > If you do not delete the provisions above, a recipient may use your > version of > this file under either the MPL or the GPL. > */ > package ca.uhn.hl7v2.parser; > > import java.util.Collections; > import java.util.LinkedHashMap; > import java.util.Map; > > /** > * Handles "escaping" and "unescaping" of text according to the HL7 escape > * sequence rules defined in section 2.10 of the standard (version 2.4). > * Currently, escape sequences for multiple character sets are > unsupported. The > * highlighting and locally defined escape sequences are also > * unsupported. > * The only hexademical escapes supported are X000d, X0D, X0A > * > * @author Bryan Tripp > * @author Mark Lee (Skeva Technologies) > * @author Elmar Hinz > * @author Christian Ohr > */ > public class HL7Escape { > > /** Creates a new instance of Escape */ > public Hl7Escape() { > } > > /** > * @param text string to be escaped > * @return the escaped string > * <p>Defaults the escape characters to the conventional values |^~\& > */ > public static String escape(String text) { > return escape(text,"|^~\\&"); > } > > /** > * @param text string to be escaped > * @param encChars encoding characters to be used in the order > * <br>Field, Component, Repetition, Escape, Sub-component > * @return the escaped string > */ > public static String escape(String text, String encChars) { > EncLookup esc = getEscapeSequences(encChars); > int textLength = text.length(); > > StringBuilder result = new StringBuilder(textLength); > for (int i = 0; i < textLength; i++) { > boolean charReplaced = false; > char c = text.charAt(i); > > FORENCCHARS: > for (int j = 0; j < 6; j++) { > if (text.charAt(i) == esc.characters[j]) { > > // Formatting escape sequences such as \.br\ should be left alone > if (j == 4) { > > if (i+1 < textLength) { > > // Check for \.br\ > char nextChar = text.charAt(i + 1); > switch (nextChar) { > case '.': > case 'C': > case 'M': > case 'X': > case 'Z': > { > int nextEscapeIndex = text.indexOf(esc.characters[j], i + 1); > if (nextEscapeIndex > 0) { > result.append(text.substring(i, nextEscapeIndex + 1)); > charReplaced = true; > i = nextEscapeIndex; > break FORENCCHARS; > } > break; > } > case 'H': > case 'N': > { > if (i+2 < textLength && text.charAt(i+2) == '\\') { > int nextEscapeIndex = i + 2; > if (nextEscapeIndex > 0) { > result.append(text.substring(i, nextEscapeIndex + 1)); > charReplaced = true; > i = nextEscapeIndex; > break FORENCCHARS; > } > } > break; > } > } > > } > > } > > result.append(esc.encodings[j]); > charReplaced = true; > break; > } > } > if (!charReplaced) { > result.append(c); > } > } > return result.toString(); > } > > /** > * @param text string to be unescaped > * @return the unescaped string > * <p>Defaults the escape characters to the conventional values |^~\& > */ > public static String unescape(String text) { > return unescape(text,"|^~\\&"); > } > > /** > * @param text string to be unescaped > * @param encChars encoding characters to be used in the order > * <br>Field, Component, Repetition, Escape, Sub-component > * @return the unescaped string > */ > public static String unescape(String text, String encChars) { > > // If the escape char isn't found, we don't need to look for > escape sequences > char escapeChar = encChars.charAt(3); > boolean foundEscapeChar = false; > for (int i = 0; i < text.length(); i++) { > if (text.charAt(i) == escapeChar) { > foundEscapeChar = true; > break; > } > } > if (!foundEscapeChar) { > return text; > } > > int textLength = text.length(); > StringBuilder result = new StringBuilder(textLength + 20); > EncLookup esc = getEscapeSequences(encChars); > char escape = esc.characters[3]; > int encodingsCount = esc.characters.length; > int i = 0; > while (i < textLength) { > char c = text.charAt(i); > if (c != escape) { > result.append(c); > i++; > } else { > boolean foundEncoding = false; > > // Test against the standard encodings > for (int j = 0; j < encodingsCount; j++) { > String encoding = esc.encodings[j]; > int encodingLength = encoding.length(); > if ((i + encodingLength <= textLength) && text.substring(i, i + > encodingLength) > .equals(encoding)) { > result.append(esc.characters[j]); > i += encodingLength; > foundEncoding = true; > break; > } > } > > if (!foundEncoding) { > > // If we haven't found this, there is one more option. Escape > sequences of /.XXXXX/ are > // formatting codes. They should be left intact > if (i + 1 < textLength) { > char nextChar = text.charAt(i + 1); > switch (nextChar) { > case '.': > case 'C': > case 'M': > case 'X': > case 'Z': > { > int closingEscape = text.indexOf(escape, i + 1); > if (closingEscape > 0) { > String substring = text.substring(i, closingEscape + 1); > result.append(substring); > i += substring.length(); > } else { > i++; > } > break; > } > case 'H': > case 'N': > { > int closingEscape = text.indexOf(escape, i + 1); > if (closingEscape == i + 2) { > String substring = text.substring(i, closingEscape + 1); > result.append(substring); > i += substring.length(); > } else { > i++; > } > break; > } > default: > { > // > Preserve unescaped escape delimiter > > result.append(c); > i++; > } > } > > } else { > // Preserve unescaped > escape delimiter > result.append(c); > i++; > } > } > > > } > } > return result.toString(); > } > > /** > * Returns a HashTable with escape sequences as keys, and corresponding > * Strings as values. > * @param encChars > * @return > */ > private static EncLookup getEscapeSequences(String encChars) { > EncLookup escapeSequences = new EncLookup(encChars); > return escapeSequences; > } > > > > > /** > * A performance-optimized replacement for using when > * mapping from HL7 special characters to their respective > * encodings > * > * @author Christian Ohr > */ > private static class EncLookup { > > char[] characters = new char[8]; > String[] encodings = new String[8]; > > EncLookup(String ec) { > characters[0] = ec.charAt(0); > characters[1] = ec.charAt(1); > characters[2] = ec.charAt(2); > characters[3] = ec.charAt(3); > characters[4] = ec.charAt(4); > characters[5] = '\r'; > characters[6] = '\r'; > characters[7] = '\n'; > char escapeChar = ec.charAt(3); > char[] codes = {'F', 'S', 'R', 'E', 'T'}; > for (int i = 0; i < codes.length; i++) { > StringBuilder seq = new StringBuilder(); > seq.append(escapeChar); > seq.append(codes[i]); > seq.append(escapeChar); > encodings[i] = seq.toString(); > } > // encodings[5] = "\\X000d\\"; > encodings[5] = escapeChar + "X000d" + escapeChar; > encodings[6] = escapeChar + "X0D" + escapeChar; > encodings[7] = escapeChar + "X0A" + escapeChar; > } > } > } > > ----- > > Test case: > > /* > * To change this template, choose Tools | Templates > * and open the template in the editor. > */ > package ca.uhn.hl7v2.parser; > > import org.junit.After; > import org.junit.AfterClass; > import org.junit.Before; > import org.junit.BeforeClass; > import org.junit.Test; > import static org.junit.Assert.*; > import org.slf4j.Logger; > import org.slf4j.LoggerFactory; > > /** > * > * @author vowlesi > */ > public class SingleBackslashV3Test { > > private static final Logger log = > LoggerFactory.getLogger(EscapeV2Test.class); > private String encChars = "|^~\\&"; > > public SingleBackslashV3Test() { > } > > @BeforeClass > public static void setUpClass() { > } > > @AfterClass > public static void tearDownClass() { > } > > @Before > public void setUp() { > } > > @After > public void tearDown() { > } > > /** > * Test of unescape method, of class Escape. > */ > @Test > public void testUnescapeSingleBackslash() { > log.debug("unescape with single backslash"); > String text = "1 \\ 24 Smith \\T\\ Wesson Road"; > String expResult = "1 \\ 24 Smith & Wesson Road"; > String result = Hl7Escape.unescape(text); > log.debug("Input : " + text); > log.debug("Result : " + result); > log.debug("Expected : " + expResult); > assertEquals(expResult, result); > text = "\\H\\A\\T\\E\\R\\\\N\\<<\\S\\>>\"\\E\\''\\F\\Special test > '\\XFFFFFFFFFFFFFFFFFFFF\\'"; > expResult = "\\H\\A&E~\\N\\<<^>>\"\\''|Special test > '\\XFFFFFFFFFFFFFFFFFFFF\\'"; > result = Hl7Escape.unescape(text); > log.debug("Input : " + text); > log.debug("Result : " + result); > log.debug("Expected : " + expResult); > assertEquals(expResult, result); > text = "\\H\\A\\T\\E\\R\\\\N\\<<\\S\\>>\"\\E\\''\\F\\Special test > '\\X000d\\'"; > expResult = "\\H\\A&E~\\N\\<<^>>\"\\''|Special test '\r\'"; > result = Hl7Escape.unescape(text); > log.debug("Input : " + text); > log.debug("Result : " + result); > log.debug("Expected : " + expResult); > assertEquals(expResult, result); > text = "\\\\\\\\\\\\\\\\\\\\"; > expResult = "\\\\\\\\\\\\\\\\\\\\"; > result = Hl7Escape.unescape(text); > log.debug("Input : " + text); > log.debug("Result : " + result); > log.debug("Expected : " + expResult); > assertEquals(expResult, result); > text = "Ken\\n\\F\\edy"; > expResult = "Ken\\E\\n\\F\\edy"; > result = Hl7Escape.unescape(text); > result = Hl7Escape.escape(result); > log.debug("Input : " + text); > log.debug("Result : " + result); > log.debug("Expected : " + expResult); > assertEquals(expResult, result); > } > } > > > > ******************************************************************************** > > This email, including any attachments sent with it, is confidential and > for the sole use of the intended recipient(s). This confidentiality is not > waived or lost, if you receive it and you are not the intended > recipient(s), or if it is transmitted/received in error. > > Any unauthorised use, alteration, disclosure, distribution or review of > this email is strictly prohibited. The information contained in this email, > including any attachment sent with it, may be subject to a statutory duty > of confidentiality if it relates to health service matters. > > If you are not the intended recipient(s), or if you have received this > email in error, you are asked to immediately notify the sender by telephone > collect on Australia +61 1800 198 175 or by return email. You should also > delete this email, and any copies, from your computer system network and > destroy any hard copies produced. > > If not an intended recipient of this email, you must not copy, distribute > or take any action(s) that relies on it; any form of disclosure, > modification, distribution and/or publication of this email is also > prohibited. > > Although Queensland Health takes all reasonable steps to ensure this email > does not contain malicious software, Queensland Health does not accept > responsibility for the consequences if any person's computer inadvertently > suffers any disruption to services, loss of information, harm or is > infected with a virus, other malicious computer programme or code that may > occur as a consequence of receiving this email. > > Unless stated otherwise, this email represents only the views of the > sender and not the views of the Queensland Government. > > > ********************************************************************************** > > > > > ------------------------------------------------------------------------------ > Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! > Discover the easy way to master current and previous Microsoft technologies > and advance your career. Get an incredible 1,500+ hours of step-by-step > tutorial videos with LearnDevNow. Subscribe today and save! > http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > > |
From: Ian V. <Ian...@he...> - 2013-09-04 00:14:00
|
I have sent mails to the general list about this issue before, and the advice has helped me progress. Then along comes another system that has slightly different behaviour. In this particular case a system correctly escapes the HL7 delimiters EXCEPT the escape delimiter. This allows it to send field content like this (from an address): 1 \ 24 Smith \T\ Wesson Road I was hopeful that since the single escape on it's own didn't form part of an escape sequence, that it might be preserved through the parse. This is not the case. The lone backslash is consumed in the process and disappears. I don't know how valid an argument it is to say it should be preserved, but if it isn't, I can't subsequently properly escape it to send to a downstream system. Given that I had been dealing with HL7 for some time before I found HAPI, I had done some work previously on an encode / unencode routine. My own code couldn't cope with this one either. I decided it was time to be brave, and dive into the HAPI code. Somewhere there had to be encode/unecode low level routines. Up until I looked in the source, I had been creating a new ST object, and using it's parse and encode methods. Once I looked into the source I found the Escape class. This updated version of Escape does the following: Preserves escape characters that do not form part of an escape sequence Permits the exceptional escape sequence case of \X000d\ to work when the escape character has been changed to something other than \ Adds extra HEX escaped code \X0D\ and \X0A\ because we see them here occasionally. Test case code is also included at the bottom, including my now infamous "HATER" example :-). Test cases with lots of > < are there because we often do transforms between HL7 and XML, so we often look at these in additional test cases of the XML output produced. What are my chances of this being adopted? If not, how can I get my version to override the existing one? Thanks Ian ---------- /** The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is "Escape.java". Description: "Handles "escaping" and "unescaping" of text according to the HL7 escape sequence rules defined in section 2.10 of the standard (version 2.4)" The Initial Developer of the Original Code is University Health Network. Copyright (C) 2001. All Rights Reserved. Contributor(s): Mark Lee (Skeva Technologies); Elmar Hinz Alternatively, the contents of this file may be used under the terms of the GNU General Public License (the ?GPL?), in which case the provisions of the GPL are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of the GPL and not to allow others to use your version of this file under the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the GPL License. If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the GPL. */ package ca.uhn.hl7v2.parser; import java.util.Collections; import java.util.LinkedHashMap; import java.util.Map; /** * Handles "escaping" and "unescaping" of text according to the HL7 escape * sequence rules defined in section 2.10 of the standard (version 2.4). * Currently, escape sequences for multiple character sets are unsupported. The * highlighting and locally defined escape sequences are also * unsupported. * The only hexademical escapes supported are X000d, X0D, X0A * * @author Bryan Tripp * @author Mark Lee (Skeva Technologies) * @author Elmar Hinz * @author Christian Ohr */ public class HL7Escape { /** Creates a new instance of Escape */ public Hl7Escape() { } /** * @param text string to be escaped * @return the escaped string * <p>Defaults the escape characters to the conventional values |^~\& */ public static String escape(String text) { return escape(text,"|^~\\&"); } /** * @param text string to be escaped * @param encChars encoding characters to be used in the order * <br>Field, Component, Repetition, Escape, Sub-component * @return the escaped string */ public static String escape(String text, String encChars) { EncLookup esc = getEscapeSequences(encChars); int textLength = text.length(); StringBuilder result = new StringBuilder(textLength); for (int i = 0; i < textLength; i++) { boolean charReplaced = false; char c = text.charAt(i); FORENCCHARS: for (int j = 0; j < 6; j++) { if (text.charAt(i) == esc.characters[j]) { // Formatting escape sequences such as \.br\ should be left alone if (j == 4) { if (i+1 < textLength) { // Check for \.br\ char nextChar = text.charAt(i + 1); switch (nextChar) { case '.': case 'C': case 'M': case 'X': case 'Z': { int nextEscapeIndex = text.indexOf(esc.characters[j], i + 1); if (nextEscapeIndex > 0) { result.append(text.substring(i, nextEscapeIndex + 1)); charReplaced = true; i = nextEscapeIndex; break FORENCCHARS; } break; } case 'H': case 'N': { if (i+2 < textLength && text.charAt(i+2) == '\\') { int nextEscapeIndex = i + 2; if (nextEscapeIndex > 0) { result.append(text.substring(i, nextEscapeIndex + 1)); charReplaced = true; i = nextEscapeIndex; break FORENCCHARS; } } break; } } } } result.append(esc.encodings[j]); charReplaced = true; break; } } if (!charReplaced) { result.append(c); } } return result.toString(); } /** * @param text string to be unescaped * @return the unescaped string * <p>Defaults the escape characters to the conventional values |^~\& */ public static String unescape(String text) { return unescape(text,"|^~\\&"); } /** * @param text string to be unescaped * @param encChars encoding characters to be used in the order * <br>Field, Component, Repetition, Escape, Sub-component * @return the unescaped string */ public static String unescape(String text, String encChars) { // If the escape char isn't found, we don't need to look for escape sequences char escapeChar = encChars.charAt(3); boolean foundEscapeChar = false; for (int i = 0; i < text.length(); i++) { if (text.charAt(i) == escapeChar) { foundEscapeChar = true; break; } } if (!foundEscapeChar) { return text; } int textLength = text.length(); StringBuilder result = new StringBuilder(textLength + 20); EncLookup esc = getEscapeSequences(encChars); char escape = esc.characters[3]; int encodingsCount = esc.characters.length; int i = 0; while (i < textLength) { char c = text.charAt(i); if (c != escape) { result.append(c); i++; } else { boolean foundEncoding = false; // Test against the standard encodings for (int j = 0; j < encodingsCount; j++) { String encoding = esc.encodings[j]; int encodingLength = encoding.length(); if ((i + encodingLength <= textLength) && text.substring(i, i + encodingLength) .equals(encoding)) { result.append(esc.characters[j]); i += encodingLength; foundEncoding = true; break; } } if (!foundEncoding) { // If we haven't found this, there is one more option. Escape sequences of /.XXXXX/ are // formatting codes. They should be left intact if (i + 1 < textLength) { char nextChar = text.charAt(i + 1); switch (nextChar) { case '.': case 'C': case 'M': case 'X': case 'Z': { int closingEscape = text.indexOf(escape, i + 1); if (closingEscape > 0) { String substring = text.substring(i, closingEscape + 1); result.append(substring); i += substring.length(); } else { i++; } break; } case 'H': case 'N': { int closingEscape = text.indexOf(escape, i + 1); if (closingEscape == i + 2) { String substring = text.substring(i, closingEscape + 1); result.append(substring); i += substring.length(); } else { i++; } break; } default: { // Preserve unescaped escape delimiter result.append(c); i++; } } } else { // Preserve unescaped escape delimiter result.append(c); i++; } } } } return result.toString(); } /** * Returns a HashTable with escape sequences as keys, and corresponding * Strings as values. * @param encChars * @return */ private static EncLookup getEscapeSequences(String encChars) { EncLookup escapeSequences = new EncLookup(encChars); return escapeSequences; } /** * A performance-optimized replacement for using when * mapping from HL7 special characters to their respective * encodings * * @author Christian Ohr */ private static class EncLookup { char[] characters = new char[8]; String[] encodings = new String[8]; EncLookup(String ec) { characters[0] = ec.charAt(0); characters[1] = ec.charAt(1); characters[2] = ec.charAt(2); characters[3] = ec.charAt(3); characters[4] = ec.charAt(4); characters[5] = '\r'; characters[6] = '\r'; characters[7] = '\n'; char escapeChar = ec.charAt(3); char[] codes = {'F', 'S', 'R', 'E', 'T'}; for (int i = 0; i < codes.length; i++) { StringBuilder seq = new StringBuilder(); seq.append(escapeChar); seq.append(codes[i]); seq.append(escapeChar); encodings[i] = seq.toString(); } // encodings[5] = "\\X000d\\ ( file://\X000d\ )"; encodings[5] = escapeChar + "X000d" + escapeChar; encodings[6] = escapeChar + "X0D" + escapeChar; encodings[7] = escapeChar + "X0A" + escapeChar; } } } ----- Test case: /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package ca.uhn.hl7v2.parser; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import static org.junit.Assert.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * * @author vowlesi */ public class SingleBackslashV3Test { private static final Logger log = LoggerFactory.getLogger(EscapeV2Test.class); private String encChars = "|^~\\&"; public SingleBackslashV3Test() { } @BeforeClass public static void setUpClass() { } @AfterClass public static void tearDownClass() { } @Before public void setUp() { } @After public void tearDown() { } /** * Test of unescape method, of class Escape. */ @Test public void testUnescapeSingleBackslash() { log.debug("unescape with single backslash"); String text = "1 \\ 24 Smith \\T\\ ( file://\T\ ) Wesson Road"; String expResult = "1 \\ 24 Smith & Wesson Road"; String result = Hl7Escape.unescape(text); log.debug("Input : " + text); log.debug("Result : " + result); log.debug("Expected : " + expResult); assertEquals(expResult, result); text = "\"\\E\\''\\F\\\\H\\A\\T\\E\\R\\\\N\\<<\\S\\>>\"\\E\\''\\F\\Special test '\\XFFFFFFFFFFFFFFFFFFFF\\'"; expResult = "\"\\\\H\\A&E~\\N\\<<^>>\"\\''|Special test '\\XFFFFFFFFFFFFFFFFFFFF\\'"; result = Hl7Escape.unescape(text); log.debug("Input : " + text); log.debug("Result : " + result); log.debug("Expected : " + expResult); assertEquals(expResult, result); text = "\"\\E\\''\\F\\\\H\\A\\T\\E\\R\\\\N\\<<\\S\\>>\"\\E\\''\\F\\Special test '\\X000d\\'"; expResult = "\"\\\\H\\A&E~\\N\\<<^>>\"\\''|Special test '\r\'"; result = Hl7Escape.unescape(text); log.debug("Input : " + text); log.debug("Result : " + result); log.debug("Expected : " + expResult); assertEquals(expResult, result); text = "\\\\\\\\\\\\\\\\\\\\"; expResult = "\\\\\\\\\\\\\\\\\\\\"; result = Hl7Escape.unescape(text); log.debug("Input : " + text); log.debug("Result : " + result); log.debug("Expected : " + expResult); assertEquals(expResult, result); text = "Ken\\n\\F\\edy"; expResult = "Ken\\E\\n\\F\\edy"; result = Hl7Escape.unescape(text); result = Hl7Escape.escape(result); log.debug("Input : " + text); log.debug("Result : " + result); log.debug("Expected : " + expResult); assertEquals(expResult, result); } } ******************************************************************************** This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/received in error. Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited. The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters. If you are not the intended recipient(s), or if you have received this email in error, you are asked to immediately notify the sender by telephone collect on Australia +61 1800 198 175 or by return email. You should also delete this email, and any copies, from your computer system network and destroy any hard copies produced. If not an intended recipient of this email, you must not copy, distribute or take any action(s) that relies on it; any form of disclosure, modification, distribution and/or publication of this email is also prohibited. Although Queensland Health takes all reasonable steps to ensure this email does not contain malicious software, Queensland Health does not accept responsibility for the consequences if any person's computer inadvertently suffers any disruption to services, loss of information, harm or is infected with a virus, other malicious computer programme or code that may occur as a consequence of receiving this email. Unless stated otherwise, this email represents only the views of the sender and not the views of the Queensland Government. ********************************************************************************** |
From: Michael L. <mic...@gm...> - 2013-09-03 23:21:04
|
I still do lurk here. :) The nule.org site had some issues with a malicious WordPress theme, but I'm planning on bringing the old site back up with all the information on LightHl7Lib in a bit. It definitely approaches the problem of working with HL7-like messages in a different manner than HAPI, but it suits my needs and may suit yours. You can email me directly if you try it and have issues. Mike On Sep 3, 2013 5:16 PM, "Rahul Somasunderam" <rs...@ce...> wrote: > Senthil, your solution is very similar to Nule.org's LightHl7Lib. > https://www.thot.us/svn/nule.org_LightHl7Lib/trunk/ > > This approach has some benefits, but HAPI tries to solve an entirely > different problem. > > R, > rahul > > On Aug 28, 2013, at 12:05 PM, Senthil Muthiah <vbs...@gm...> > wrote: > > Hi > > Please read this > http://emrpms.blogspot.in/2013/08/hl7-parsingmy-own-parser.html > > > > > On Tue, Aug 27, 2013 at 6:15 PM, Jens Villadsen < > jen...@gm...> wrote: > >> HAPI forum is indeed active - >> >> It just seems like you did not have the time to understand the API. >> >> >> On 27 August 2013 14:31, Senthil Muthiah <vbs...@gm...>wrote: >> >>> Completed my own parsing. It is simple, later today, i will write >>> article on my blog >>> >>> >>> >>> On Tue, Aug 27, 2013 at 5:51 PM, Bartłomiej Buczek < >>> b.b...@ph...> wrote: >>> >>>> And you switched to what? Is there any good alternative? >>>> >>>> Bartłomiej Buczek >>>> Phoenix Tecnologie Sp. z o.o. >>>> ul. Wiosenna 14/2; 53-017 Wrocław, Poland >>>> NIP: 899 258 73 59 >>>> Tel. +48 71 338 65 64; Kom. +48 668 891 540 >>>> Fax +48 71 338 65 55b...@ph... >>>> >>>> On 08/27/2013 02:20 PM, Senthil Muthiah wrote: >>>> >>>> Forum is not active, so i dropped using this HAPI >>>> >>>> >>>> On Tue, Aug 27, 2013 at 4:07 PM, Bartłomiej Buczek < >>>> b.b...@ph...> wrote: >>>> >>>>> Really no one can help me with this? I'm waiting so long and simple >>>>> no response... >>>>> >>>>> Bartłomiej Buczek >>>>> Phoenix Tecnologie Sp. z o.o. >>>>> ul. Wiosenna 14/2; 53-017 Wrocław, Poland >>>>> NIP: 899 258 73 59 >>>>> Tel. +48 71 338 65 64; Kom. +48 668 891 540 >>>>> Fax +48 71 338 65 55b...@ph... >>>>> >>>>> On 07/12/2013 12:06 PM, Bartłomiej Buczek wrote: >>>>> >>>>> Hi, >>>>> I was following example send multiple messages out<http://hl7api.sourceforge.net/xref/ca/uhn/hl7v2/examples/SendLotsOfMessages.html>and found out something like this: >>>>> >>>>> // Setup server to listen for incoming message >>>>> int port = 8813; >>>>> boolean useTls = false; >>>>> HapiContext context = new DefaultHapiContext(); >>>>> HL7Service server = context.newServer(port, useTls); >>>>> >>>>> >>>>> // We want to listen ADT^A01 messages >>>>> ReceivingApplication handler = (ReceivingApplication) new >>>>> ExampleReceiverApplication(); >>>>> server.registerApplication("ADT", "A01", handler); >>>>> So I run the application and as far as I understand I have setup >>>>> server and a client application which will listen for ADT^A01 messages. Now >>>>> I want to create another application (let's say another client) which will >>>>> connect with that already created server and listen for ADT^A02 messages. >>>>> >>>>> I found on documentation something like that: >>>>> >>>>> "If you are wondering how to integrate HAPI into an existing server >>>>> application, this is probably the place. Create a class that implements >>>>> ReceivingApplication, then look at HL7Server and ApplicationRouter to see >>>>> how to get HAPI to listen for messages on a socket and pass them to your >>>>> ReceivingApplication." >>>>> >>>>> But how should I use HL7Server and ApplicationRouter to connect with >>>>> previously created server? Maybe I'm missing something in the logic but >>>>> let's consider that one software already has running server and I want to >>>>> integrate with them to listen for messages special for my application (like >>>>> ADT^A02) - how to do this? >>>>> >>>>> -- >>>>> Bartłomiej Buczek >>>>> Phoenix Tecnologie Sp. z o.o. >>>>> ul. Wiosenna 14/2; 53-017 Wrocław, Poland >>>>> NIP: 899 258 73 59 >>>>> Tel. +48 71 338 65 64; Kom. +48 668 891 540 >>>>> Fax +48 71 338 65 55b...@ph... >>>>> >>>>> >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Introducing Performance Central, a new site from SourceForge and >>>>> AppDynamics. Performance Central is your source for news, insights, >>>>> analysis and resources for efficient Application Performance >>>>> Management. >>>>> Visit us today! >>>>> >>>>> http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk >>>>> _______________________________________________ >>>>> Hl7api-devel mailing list >>>>> Hl7...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >>>>> >>>>> >>>> >>>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Introducing Performance Central, a new site from SourceForge and >>> AppDynamics. Performance Central is your source for news, insights, >>> analysis and resources for efficient Application Performance Management. >>> Visit us today! >>> >>> http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk >>> _______________________________________________ >>> Hl7api-devel mailing list >>> Hl7...@li... >>> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >>> >>> >> >> >> -- >> >> Med venlig hilsen / Kind regards >> >> *Jens Kristian Villadsen* >> cand.polyt >> >> Stålhøjen 24 >> 8240 Risskov >> Denmark >> >> Mobile +4523373806 >> jen...@gm... >> jkiddo.dyndns.org >> > > > ------------------------------------------------------------------------------ > Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! > Discover the easy way to master current and previous Microsoft technologies > and advance your career. Get an incredible 1,500+ hours of step-by-step > tutorial videos with LearnDevNow. Subscribe today and save! > > http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk_______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > > > > > ------------------------------------------------------------------------------ > Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! > Discover the easy way to master current and previous Microsoft technologies > and advance your career. Get an incredible 1,500+ hours of step-by-step > tutorial videos with LearnDevNow. Subscribe today and save! > http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > > |
From: Ian V. <Ian...@he...> - 2013-09-03 22:06:28
|
I reckon we would all be in a lot of trouble if HAPI didn't parse out repeating segments and groups. So glad I took the time to learn about HAPI. By far the best adherence to the HL7 standard I have encountered in my interfacing career. Finding good how-to guides is sometimes challenging, particularly if you are trying to learn about the standard AND HAPI at the same time. I would also recommend having a go at parsing, as Rahul has, so that as you start to learn what terrible things sending and receiving systems that claim HL7 'compliance' can do. Then you will better understand the fantastic effort the HAPI developers have put into this API. Obviously, the first gotcha is people not escaping the delimiter characters, and the other is (heaven forbid) they use the standard feature and change the delimiters to something else. Happy parsing! Or should I say HAPI parsing? Ian >>> Rahul Somasunderam <rs...@ce...> 04/09/13 7:14 >>> Senthil, your solution is very similar to Nule.org's LightHl7Lib. https://www.thot.us/svn/nule.org_LightHl7Lib/trunk/ This approach has some benefits, but HAPI tries to solve an entirely different problem. R, rahul On Aug 28, 2013, at 12:05 PM, Senthil Muthiah <vbs...@gm...> wrote: Hi Please read this http://emrpms.blogspot.in/2013/08/hl7-parsingmy-own-parser.html On Tue, Aug 27, 2013 at 6:15 PM, Jens Villadsen <jen...@gm...> wrote: HAPI forum is indeed active - It just seems like you did not have the time to understand the API. On 27 August 2013 14:31, Senthil Muthiah <vbs...@gm...> wrote: Completed my own parsing. It is simple, later today, i will write article on my blog On Tue, Aug 27, 2013 at 5:51 PM, Bart*omiej Buczek <b.b...@ph...> wrote: And you switched to what? Is there any good alternative? Bart*omiej Buczek Phoenix Tecnologie Sp. z o.o. ul. Wiosenna 14/2; 53-017 Wroc*aw, Poland NIP: 899 258 73 ( tel:899%20258%2073 ) 59 Tel. +48 71 338 65 64 ( tel:%2B48%2071%20338%2065%2064 ); Kom. +48 668 891 540 ( tel:%2B48%20668%20891%20540 )Fax +48 71 338 65 55 ( tel:%2B48%2071%20338%2065%2055 )b.b...@ph... On 08/27/2013 02:20 PM, Senthil Muthiah wrote: Forum is not active, so i dropped using this HAPI On Tue, Aug 27, 2013 at 4:07 PM, Bart*omiej Buczek <b.b...@ph...> wrote: Really no one can help me with this? I'm waiting so long and simple no response... Bart*omiej Buczek Phoenix Tecnologie Sp. z o.o. ul. Wiosenna 14/2; 53-017 Wroc*aw, Poland NIP: 899 258 73 ( tel:899%20258%2073 ) 59 Tel. +48 71 338 65 64 ( tel:%2B48%2071%20338%2065%2064 ); Kom. +48 668 891 540 ( tel:%2B48%20668%20891%20540 )Fax +48 71 338 65 55 ( tel:%2B48%2071%20338%2065%2055 )b.b...@ph... On 07/12/2013 12:06 PM, Bart*omiej Buczek wrote: Hi, I was following example send multiple messages out ( http://hl7api.sourceforge.net/xref/ca/uhn/hl7v2/examples/SendLotsOfMessages.html ) and found out something like this: // Setup server to listen for incoming message int port = 8813; boolean useTls = false; HapiContext context = new DefaultHapiContext(); HL7Service server = context.newServer(port, useTls); // We want to listen ADT^A01 messages ReceivingApplication handler = (ReceivingApplication) new ExampleReceiverApplication(); server.registerApplication("ADT", "A01", handler); So I run the application and as far as I understand I have setup server and a client application which will listen for ADT^A01 messages. Now I want to create another application (let's say another client) which will connect with that already created server and listen for ADT^A02 messages. I found on documentation something like that: "If you are wondering how to integrate HAPI into an existing server application, this is probably the place. Create a class that implements ReceivingApplication, then look at HL7Server and ApplicationRouter to see how to get HAPI to listen for messages on a socket and pass them to your ReceivingApplication." But how should I use HL7Server and ApplicationRouter to connect with previously created server? Maybe I'm missing something in the logic but let's consider that one software already has running server and I want to integrate with them to listen for messages special for my application (like ADT^A02) - how to do this? -- Bart*omiej Buczek Phoenix Tecnologie Sp. z o.o. ul. Wiosenna 14/2; 53-017 Wroc*aw, Poland NIP: 899 258 73 ( tel:899%20258%2073 ) 59 Tel. +48 71 338 65 64 ( tel:%2B48%2071%20338%2065%2064 ); Kom. +48 668 891 540 ( tel:%2B48%20668%20891%20540 )Fax +48 71 338 65 55 ( tel:%2B48%2071%20338%2065%2055 )b.b...@ph... ------------------------------------------------------------------------------ Introducing Performance Central, a new site from SourceForge and AppDynamics. Performance Central is your source for news, insights, analysis and resources for efficient Application Performance Management. Visit us today! http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk _______________________________________________ Hl7api-devel mailing list Hl7...@li... https://lists.sourceforge.net/lists/listinfo/hl7api-devel ------------------------------------------------------------------------------ Introducing Performance Central, a new site from SourceForge and AppDynamics. Performance Central is your source for news, insights, analysis and resources for efficient Application Performance Management. Visit us today! http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk _______________________________________________ Hl7api-devel mailing list Hl7...@li... https://lists.sourceforge.net/lists/listinfo/hl7api-devel -- Med venlig hilsen / Kind regards Jens Kristian Villadsen cand.polyt Stålhøjen 24 8240 Risskov Denmark Mobile +4523373806 jen...@gm... jkiddo.dyndns.org ------------------------------------------------------------------------------ Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk_______________________________________________ Hl7api-devel mailing list Hl7...@li... https://lists.sourceforge.net/lists/listinfo/hl7api-devel ******************************************************************************** This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/received in error. Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited. The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters. If you are not the intended recipient(s), or if you have received this email in error, you are asked to immediately notify the sender by telephone collect on Australia +61 1800 198 175 or by return email. You should also delete this email, and any copies, from your computer system network and destroy any hard copies produced. If not an intended recipient of this email, you must not copy, distribute or take any action(s) that relies on it; any form of disclosure, modification, distribution and/or publication of this email is also prohibited. Although Queensland Health takes all reasonable steps to ensure this email does not contain malicious software, Queensland Health does not accept responsibility for the consequences if any person's computer inadvertently suffers any disruption to services, loss of information, harm or is infected with a virus, other malicious computer programme or code that may occur as a consequence of receiving this email. Unless stated otherwise, this email represents only the views of the sender and not the views of the Queensland Government. ********************************************************************************** |