Announcement

Collapse
No announcement yet.

Receive HL7 ack from javascript sender

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Receive HL7 ack from javascript sender

    Hey all!

    At it's most basic state, I have two channels:

    HL7 Caller
    HL7 Sender

    Caller routes a message to Sender as a JavaScript Writer
    Sender sends the HL7 message off to wherever it needs to go

    I'm trying to add code to Caller to receive and process the Ack from Sender, but the default response that I get is Null, with a status of "JavaScript evaluation Successful". I'm simply attempting to receive the Ack so that I can update our internal system as to whether or not the message was successfully sent.

    I know this method works with a channel writer, but I'd like to use a JavaScript writer if possible.

    Thanks!

  • #2
    You can create a new response. Something like this

    Code:
    channelResponse=new Response(text,STATUS);
    HL7v2.7 Certified Control Specialist!

    Comment


    • #3
      Originally posted by xzyragon View Post
      Hey all!
      I'm trying to add code to Caller to receive and process the Ack from Sender, but the default response that I get is Null, with a status of "JavaScript evaluation Successful". I'm simply attempting to receive the Ack so that I can update our internal system as to whether or not the message was successfully sent.
      Is your Sender channel set to return a response (i.e., something is set in its Source connector Response dropdown)?

      If so, the call to router.routeMessage() will return the response object from that channel.

      If you then want *that* response to become your JS Writer's response, you would need to return the Response returned by router.routeMessage() in your JS Writer's code:

      Code:
      return router.routeMessage(channelId, message);

      Comment

      Working...
      X