Mirth Connect 3.12.0 Released!

Mirth Connect 3.12.0 is now available as an appliance update and on our GitHub page. This release includes database performance improvements, improves visual HL7 representation, message pruning, keystore handling, PDF generation, community contributions, and fixes several security vulnerabilities. This release also contains many improvements to commercial extensions. See the release notes for the list of fixes and updates.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

adding addtional OBX lines

  • Filter
  • Time
  • Show
Clear All
new posts

  • adding addtional OBX lines

    I have radiology reports that the text of the report are in OBX lines. What I need to do is take what's in OBR 32.2 and 32.3 and put them in an OBX line at the end of the messages.
    ie if I have 30 OBX lines, I want an OBX 31 line to be "Some custom text:" + msg[OBR][OBR32][OBR32.2]

  • #2
    Re:adding addtional OBX lines

    Have you tried any of the createSegment functions?

    createSegment('segmentName', msg)


    • #3
      Re:adding addtional OBX lines

      assuming you want the resulting text in OBX.5.1:

      var newOBX = new XML('<OBX></OBX>');
      newOBX['OBX.5']['OBX.5.1'] = "some custom text" + msg['OBR']['OBR.32']['OBR.32.1'].toString() + msg['OBR']['OBR.33']['OBR.33.1'].toString();
      msg['OBX'][msg['OBX'].length()] += newOBX;
      Daniel Svanstedt
      Software Engineer
      Mirth Corporation

      Want professional services, support, and enterprise or virtual appliances? It's all available from the Mirth Corporation:
      Mirth Support | Mirth Training | Mirth Appliances | Online Training | Developer Q&A

      Don't forget, Mirth Support gives you access to all of our online training videos, and silver support gives you access to developer Q&As!