dib0 / HL7Fuse

HL7Fuse is a "Swiss pocketknife" for your HL7 development needs in the .Net framework. HL7Fuse is based on SuperSocket in combination with NHapi and NHapiTools. This combination provides a powerful and solid base to build you HL7 application or HL7 test framework. In fact, if you use HL7Fuse as is, it can function as a mesasge hub, so you can receive one message and send this (using filters) to many client systems.
MIT License
78 stars 49 forks source link

HL7 MESSAGE #4

Closed Gehlot closed 9 years ago

Gehlot commented 9 years ago

Hello, Thanks for reply.

Please i have one confusion that is how to use HLFuse in my helth management project and how to send hl7 message and automatically get response. Your code is very useful but developers are want to use in project and any test application with HL7Fuse,your code is running with file session and file server but in project we send a string message not send a text file message. I have no idea whats changes for MLLP in your code and how to work MLLP. I hope you understand my problem and give any solution which is useful us.

Thanks,

dib0 commented 9 years ago

Hi!

No problem! :-)

I'm not sure what you exactly need to accomplish in your project, so I'm giving a more general explanation on HL7Fuse. I'm assuming that you know how HL7 messages work and how MLLP works. Did you read the documentation provided with the project?

First of all: HL7Fuse works, in case of TCP/IP, MLLP connections for the unsolicited HL7 messages. Sollicited is on the todo list, but not currently supported.

You can use HL7Fuse in two ways. One is receiving messages and adding specific logic to handle the message (and send an ACK message to the sending system). The other one is using HL7Fuse as a message hub. In the last case HL7Fuse uses the HL7Fuse.Hub to do the logic handling and is able to receive a message and send it, based on rules, to one or more other systems using various protocols. Also you can manipulate the message in between if needed.

HL7Fuse has both support for MLLP and/or File handling. You can enable or disable these using the configuration. The MLLPServer is fully functional, you don't need to change any code there.

My guess is that you need the first case: use HL7Fuse to receive a message and handle it with your own businesslogic, specific for your own system. And the send an ACK or NACK reply. If that is the case you can use the HL7Fuse binaries and create a project that has a class that implements the ICommand<MLLPSession, HL7RequestInfo> interface. (like the HL7Fuse.Hub project), take a look there to see how it works. Now if you configure that project (in the config) as a CommandAssembly, HL7Fuse will receive a message, parse is and invokes the class that implements the ICommand interface. There you can put all the logic you need for you own application.

The nice part of this is that your application specific logic is isolated in one project. There is no need to worry about MLLP or sending an ACK or NACK (In the original HL7 mode).

If you need to do the opposite: you are not receiving messages, but sending messages to other systems. In other words, if your application is the initiator to send messages to other systems, HL7Fuse can't help you. In that case take a look at NHapiTools. The class NHapiTool.Base.Net.SimpleMLLPClient provides a simple interface to send a message to another system and receive the reply.

I hope this helpes!

Gehlot commented 9 years ago

Hello, Thank u for explanation , you code is very useful for developer hand and thanks a lot of . I never change in your code and I will test my application use HL7Fuse binaries or the HL7Fuse.Hub project and check ack.