No announcement yet.

Transformation problem and LLP Sender

  • Filter
  • Time
  • Show
Clear All
new posts

  • Transformation problem and LLP Sender

    I'm using v 1.2 and am running across a problem where it looks like a destination configured as LLP Sender is only sending the raw data, not the transformed. When I set up the channel source, I establish a javascript transform that is something as simple as:

    // the gender is M, as a test, change it to 1
    msg['PID']['PID.16']['CE.1'] = '1';"MSG gender is" + msg['PID']['PID.16']['CE.1']);
    localMap.put('hl7_xml', msg);
    hl7_xml = msg;

    Note: I've tried a bunch of variations on this script -- this is the most sane.

    If I set up a file writer destination, then I can choose to write the transformed message. However, it appears that no matter what I tried (or have tried so far) only the original, raw, non-transformed message goes out via LLP. I have a process running a HAPI-based server that reads the message via LLP and writes out the gender, which is always the original 'M'. Any clues on what I am doing wrong or what I can try?

    I appreciate it.


  • #2
    Re: Transformation problem and LLP Sender

    1. The LLP Sender uses the MessageObject.encodedData variable.
    2. EncodedData is derived from the "Msg" variable.

    In your example, setting msg['PID']['PID.16']['CE.1'] = '1'; should be enough to get it to work.
    Chris Lang


    • #3
      Re: Transformation problem and LLP Sender

      Its good to know that simply setting the msg variable is all that is required. I'll dig into this a little more on Monday.


      • #4
        Re: Transformation problem and LLP Sender

        My mistake. I was transforming the gender incorrectly. It should be:

        msg['PID']['PID.8'] = '1';

        which works fine. Thanks for the help.