No announcement yet.

Question about Routing Raw Data

  • Filter
  • Time
  • Show
Clear All
new posts

  • Question about Routing Raw Data

    Forgive the Newbie question:

    I am currently sotring two HL7 Feeds into a SQL Database then parsing through them in order to filter out Facility specific messages. Then I dump the message I need into an outbound table. My questions is I just want to query that table and send the ADTs out the facility I filtered. The reason for not using a filter in the inbound message is I can not given latency of the second inbound feed. Thus the SQL Database. My Question is what do I need to setup on the Outbound Channel for transformation if all I am going to do is read a Text Field in of the RAW Input Message? Do I even need a tranformation template?

    Any help would be greatly appreciated.

  • #2
    Re: Question about Routing Raw Data

    Assuming your database table name is InboundMessage, alter the table and add a new column called Status (bit field wih default 0).

    When the incoming messages are saved in the table, the status would be 0 (default value for the status column should take care).

    Let's assume the status codes to be:

    0 - Not processed
    1 - Processed

    Create a new outbound channel (say, Database to File Writer). Sample SELECT and UPDATE statements would be like:

    SELECT MessageID, ERMessageText AS ER7RawData
    FROM InboundMessage
    WHERE Status = 0
    AND ...(other conditions to filter out the messages)


    UPDATE InboundMessage
    SET Status = 1
    WHERE MessageID = ${messageid}

    NOTE: MessageID is the primary key column in the InboundMessage table

    Create a JavaScript Transformer Step

    Try this JavaScript code:

    var outputMessage = msg['eR7rawdata'].toString();
    localMap.put('er7', outputMessage);

    In the Destination Tab

    Template: ${er7}

    In the destination tab the contents of er7 local variable is sent as outbound message.

    This should send the messages out. Hope it helps!


    • #3
      Re: Question about Routing Raw Data

      I got the File Writer working but I am at a loss for understating how to map ${er7} to an LLP? Do I have to build a separat HL7 Template. The reason I ask is when you specify File Writer as a destination it then allows for a Template Window. But when you select LLP there is no template window.


      • #4
        Re: Question about Routing Raw Data

        I guess is the best way to put this is I have raw messages in a database text(blob) field I want to read the blob to a variable and send the variable to a LLP end point. I have the file writer example working fine, but I am recieving NAKs when I connec LLP to the endpoint. I tried creating a dummy HL7 Message Segment and only placing the Local Var in the Mapping section, but still this seems to mangle the message and I get NAKs back. Any help greatly appreciated.