From: Tom C. <tc...@ex...> - 2017-08-03 12:22:39
|
https://github.com/hapifhir/hapi-hl7v2/pull/2 Tom On 03/08/17 12:27, James Agnew wrote: > Hi Tom, > > If you are able to, a pull request against the GitHub Project > <https://github.com/hapifhir/hapi-hl7v2> would be gratefully accepted. > > Cheers, > James > > On Thu, Aug 3, 2017 at 7:00 AM, Tom Chiverton <tc...@ex... > <mailto:tc...@ex...>> wrote: > > Here's a patch against the current trunk that adds this support. > > Using a modified version of the send and receive example with a > new build is easy: > > HL7Service server = context.newServer(4567, false, true); > // port, tls, accept all > > My server is now able to receive these unsolicited ACKs > > Tom > > > On 02/08/17 10:34, Jens Villadsen wrote: >> Unsolicited ACK's are a bit weird to receive. While I can agree >> that it would be nice if the behavior was configurable, it is >> currently not the case (as you found out). I guess the case where >> it makes sense would be in the case where your opposing system is >> supporting enhanced acknowledgements, which HAPI does not really >> support (the case where an acknowledgement is sent to you first >> as a transport ack, and then an application ack). HAPI only >> supports a single ack to each message. >> >> On 2 August 2017 at 11:09, Tom Chiverton <tc...@ex... >> <mailto:tc...@ex...>> wrote: >> >> I'm receiving this message from another server (I don't know >> why). We're building an interface between our app and a HL7 >> server, and the first step is just getting the HL7 messages >> off the wire and storing them. >> >> The Reciever implementation is making a hard coded policy >> decision that my application that's using it does not want to >> know about some HL7 messages. >> >> This should be configurable, at the very least ? >> >> I've had a rough delve through the code, and it seems because >> Reciever isn't an interface, you have to replace whole chunks >> of other classes as well - I think I ended up with over a >> half dozen cloned classes in my package because thing's were >> private or package and so I couldn't extend them easily. >> >> Maybe it would be easier to have a setting (in HapiContext) >> about what to do with them ? >> >> Tom >> >> On 02/08/17 10:02, Jens Villadsen wrote: >>> Why would you send an unexpected ACK back to the server? >>> >>> On 31 July 2017 at 17:00, Tom Chiverton <tc...@ex... >>> <mailto:tc...@ex...>> wrote: >>> >>> *AH HA*. >>> >>> There's a 3 year old bug with HAPI [1] where it throws >>> away messages if they are unexpected replies. >>> >>> I don't see a way to replace the Receiver instance in >>> use by SimpleServer ? >>> >>> Tom >>> >>> [1] >>> https://sourceforge.net/p/hl7api/feature-requests/88/?limit=25 >>> <https://sourceforge.net/p/hl7api/feature-requests/88/?limit=25> >>> >>> >>> On 31/07/17 14:51, Tom Chiverton wrote: >>>> >>>> Hi, >>>> >>>> Sorry I wasn't clear, but further down my >>>> RecivingApplication implementation I do have that : >>>> >>>> public Message processMessage(Message theMessage, >>>> Map<String, Object> theMetadata) throws >>>> ReceivingApplicationException, HL7Exception { >>>> String encodedMessage = new >>>> DefaultHapiContext().getPipeParser().encode(theMessage); >>>> System.out.println("Received message:\n" + >>>> encodedMessage + "\n\n"); >>>> >>>> } >>>> >>>> This never outputs. >>>> >>>> Tom >>>> >>>> >>>> On 31/07/17 14:46, Jens Villadsen wrote: >>>>> Take a look at the example found at >>>>> http://hl7api.sourceforge.net/xref/ca/uhn/hl7v2/examples/SendAndReceiveAMessage.html >>>>> <http://hl7api.sourceforge.net/xref/ca/uhn/hl7v2/examples/SendAndReceiveAMessage.html> >>>>> and >>>>> http://hl7api.sourceforge.net/xref/ca/uhn/hl7v2/examples/ExampleReceiverApplication.html >>>>> <http://hl7api.sourceforge.net/xref/ca/uhn/hl7v2/examples/ExampleReceiverApplication.html> >>>>> >>>>> >>>>> What you probably would like to look at is the >>>>> "processMessage" >>>>> >>>>> >>>>> >>>>> >>>>> On 31 July 2017 at 12:05, Tom Chiverton >>>>> <tc...@ex... <mailto:tc...@ex...>> wrote: >>>>> >>>>> Given >>>>> >>>>> >>>>> public class EvReceiverApplication implements >>>>> ReceivingApplication { >>>>> >>>>> public boolean canProcess(Message theIn) { >>>>> System.out.println("Received message: canProcess >>>>> true"); >>>>> return true; >>>>> } >>>>> >>>>> .... >>>>> >>>>> >>>>> I never see this output when a message is >>>>> received. So it's like the receiver is not >>>>> registered ? >>>>> >>>>> >>>>> I am doing >>>>> >>>>> >>>>> HL7Service server = context.newServer(port, useTls); >>>>> >>>>> ReceivingApplication handler = new >>>>> EvReceiverApplication(); >>>>> >>>>> server.registerApplication("*", "*", handler); >>>>> >>>>> server.startAndWait(); >>>>> >>>>> >>>>> Tom >>>>> >>>>> >>>>> On 31/07/17 10:24, Tom Chiverton wrote: >>>>>> >>>>>> I have used >>>>>> http://hl7api.sourceforge.net/xref/ca/uhn/hl7v2/examples/SendAndReceiveAMessage.html >>>>>> <http://hl7api.sourceforge.net/xref/ca/uhn/hl7v2/examples/SendAndReceiveAMessage.html> >>>>>> >>>>>> to build a simple app that should listen for all >>>>>> messages, and echo them to the console ( >>>>>> server.registerApplication("*", "*", handler); ). >>>>>> >>>>>> >>>>>> However, although I get a line from the >>>>>> connectionReceived method, and none from an >>>>>> output I added to the exceptionHandler, I do not >>>>>> get anything from my processMessage() code. >>>>>> >>>>>> >>>>>> Java 1.8 on Ubuntu Server, with the latest HAPI >>>>>> library. I can confirm I am getting a message >>>>>> (admittedly it's MSA is >>>>>> "MSA|AA|245635223|Failure") with a Wireshark >>>>>> packet capture. >>>>>> >>>>>> >>>>>> Any ideas what could be up ? >>>>>> >>>>>> -- >>>>>> *Tom Chiverton* >>>>>> Lead Developer >>>>>> e: tc...@ex... <mailto:tc...@ex...> >>>>>> p: 0161 817 2922 >>>>>> t: @extravision >>>>>> <http://www.twitter.com/extravision> >>>>>> w: www.extravision.com >>>>>> <http://www.extravision.com/> >>>>>> >>>>>> Extravision - email worth seeing >>>>>> <http://www.extravision.com/> >>>>>> Registered in the UK at: First floor, Tomorrow, >>>>>> MediaCityUK, Manchester, M50 2AB. >>>>>> Company Reg No: 05017214 VAT: GB 824 5386 19 >>>>>> <tel:24%2053%2086%2019> >>>>>> >>>>>> This e-mail is intended solely for the person to >>>>>> whom it is addressed and may contain confidential >>>>>> or privileged information. >>>>>> Any views or opinions presented in this e-mail >>>>>> are solely of the author and do not necessarily >>>>>> represent those of Extravision Ltd. >>>>>> >>>>>> >>>>>> ______________________________________________________________________ >>>>>> This email has been scanned by the Symantec Email >>>>>> Security.cloud service. >>>>>> For more information please visit >>>>>> http://www.symanteccloud.com >>>>>> ______________________________________________________________________ >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> Check out the vibrant tech community on one of the world's most >>>>>> engaging tech sites, Slashdot.org!http://sdm.link/slashdot >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Hl7api-devel mailing list >>>>>> Hl7...@li... >>>>>> <mailto:Hl7...@li...> >>>>>> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >>>>>> <https://lists.sourceforge.net/lists/listinfo/hl7api-devel> >>>>> >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Check out the vibrant tech community on one of the >>>>> world's most >>>>> engaging tech sites, Slashdot.org! >>>>> http://sdm.link/slashdot >>>>> _______________________________________________ >>>>> Hl7api-devel mailing list >>>>> Hl7...@li... >>>>> <mailto:Hl7...@li...> >>>>> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >>>>> <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 <tel:23%2037%2038%2006> >>>>> jen...@gm... >>>>> <mailto:jen...@gm...> >>>>> >>>>> >>>>> ______________________________________________________________________ >>>>> This email has been scanned by the Symantec Email >>>>> Security.cloud service. >>>>> For more information please visit >>>>> http://www.symanteccloud.com >>>>> ______________________________________________________________________ >>>> >>>> >>>> ______________________________________________________________________ >>>> This email has been scanned by the Symantec Email >>>> Security.cloud service. >>>> For more information please visit >>>> http://www.symanteccloud.com >>>> ______________________________________________________________________ >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Check out the vibrant tech community on one of the world's most >>>> engaging tech sites, Slashdot.org!http://sdm.link/slashdot >>>> >>>> >>>> _______________________________________________ >>>> Hl7api-devel mailing list >>>> Hl7...@li... >>>> <mailto:Hl7...@li...> >>>> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >>>> <https://lists.sourceforge.net/lists/listinfo/hl7api-devel> >>> >>> >>> ------------------------------------------------------------------------------ >>> Check out the vibrant tech community on one of the >>> world's most >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>> _______________________________________________ >>> Hl7api-devel mailing list >>> Hl7...@li... >>> <mailto:Hl7...@li...> >>> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >>> <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 <tel:23%2037%2038%2006> >>> jen...@gm... >>> <mailto:jen...@gm...> >>> >>> >>> ______________________________________________________________________ >>> This email has been scanned by the Symantec Email >>> Security.cloud service. >>> For more information please visit http://www.symanteccloud.com >>> ______________________________________________________________________ >> >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Hl7api-devel mailing list >> Hl7...@li... >> <mailto:Hl7...@li...> >> https://lists.sourceforge.net/lists/listinfo/hl7api-devel >> <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 <tel:+45%2023%2037%2038%2006> >> jen...@gm... >> <mailto:jen...@gm...> >> >> >> ______________________________________________________________________ >> This email has been scanned by the Symantec Email Security.cloud >> service. >> For more information please visit http://www.symanteccloud.com >> ______________________________________________________________________ > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Hl7api-devel mailing list > Hl7...@li... > <mailto:Hl7...@li...> > https://lists.sourceforge.net/lists/listinfo/hl7api-devel > <https://lists.sourceforge.net/lists/listinfo/hl7api-devel> > > > > ______________________________________________________________________ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > ______________________________________________________________________ |