Hi Nick!

PipeParser pp = new PipeParser();
// create a new SimpleServer that listens on port 1234
SimpleServer ss = new SimpleServer(1234, LowerLayerProtocol.makeLLP(), pp);
// create and register some class that implements
// ca.uhn.hl7v2.app.Application to handle incoming messages (ORU in
// this example)
ss.registerApplication("ORU", "*", new OruProcessor());

In your "OruProcessor" class the method

public Message processMessage(Message in)
{
   // do something with "in"

   // send response
   return new ACK();
}

receives the incoming message. Ajust/implement to your needs.

More info in the JavaDocs as usual ;-)

Greets

Torben

GHH schrieb:
Hi there,
I'm very new to this HL7 stuff so please bear with me!

We're trying to write a piece of code which simply sits on our server in a
loop, waiting to receive HL7 (ORU_01) messages, and when it receives them it
sends an ACK back to the sender.
But from the example code on the HAPI site it only shows how to send a
message *first* and then get the response afterwards, using the
'sendAndReceive' call.

How can I go about doing it the other way round?

Many thanks for your help,

Nick.

Senior Software Developer,
Good Hope Hospital NHS Trust.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to