No announcement yet.

Fixing "broken" OBX records

  • Filter
  • Time
  • Show
Clear All
new posts

  • Fixing "broken" OBX records

    Been trying to figure this out with no luck so far...

    A reference lab which will go unnamed has started sending ORU^R01 messages that are occasionally missing the [OBX.3][CE.2] test name. One of the applications that receives these messages requires a non-null value for the test name. Figured I'd fix it with Mirth..

    I created a transformer rule that identifies the missing fields, inserts "N/A" in the right place, and logs the repaired OBX segment, but I can't figure out how to actually get it put back into message.transformedData.

    var testname;

    for each (obx in msg..OBX) {

    testname = obx['OBX.3']['CE.2'];

    if (testname.length() == 0) {"fix 3");
    obx['OBX.3']['CE.2'] = "n/a";;


    (Yea, that code does nothing to the message itself - just illustrates what I'm trying to fix.)

    Any suggestions?

    Thanks - mike

  • #2
    Re: Fixing "broken" OBX records

    That actually should work. The transformedData will have the value when the transformer is completed. Your destination should send out the proper message.
    Chris Lang


    • #3
      Re: Fixing "broken" OBX records

      Oh, my....

      After looking at things again, it was working after all - I was looking in the wrong place.

      I have the channel set as a file writer - the file created was correct - I was just looking at the raw message in the message browser, which wasn't the correct thing to do.... The encoded message in the browser shows the corrected OBX lines.

      Duh... I is dumm...

      Thanks - mike