Announcement

Collapse

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

Looping thru OBRs and OBXs to modify segments

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

  • Looping thru OBRs and OBXs to modify segments

    I need some guidance from the gurus with a transformer.

    The objective of the transformer is to copy OBX:3.5 to the OBX:3.2 on all OBX segments in the message.

    This is what I have come up with, but it does not work. I have also attached the entire channel.

    Thanks in advance!

    Code:
    var OBXnumber = 0;
    
    while (msg['OBX']['OBX.3']['OBX.3.5'][OBXnumber] !=null) {
    
     tmp['OBX']['OBX.3']['OBX.3.2'][OBXnumber] = msg['OBX']['OBX.3']['OBX.3.5'][OBXnumber];
    
    OBXnumber++;
    }
    FILE_to_FILE_Transform.xml (9089 bytes)

  • #2
    same problem

    Did you ever get this code to work?

    Comment


    • #3
      if you are wanting to copy each OBX3.5 to OBX3.2 then you could use something like this:

      for each (seg in msg..OBX) {
      seg['OBX.3']['OBX.3.2'] = seg['OBX.3']['OBX.3.5'].toString();
      }

      Hope this helps,
      Chad

      Comment

      Working...
      X