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

Repeating Sections - Problem

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

  • Repeating Sections - Problem

    I am trying to create a message which has a repeating PID.3 field. As highlighted in my message template below.

    MSH|^~\@|||||||ADT^A31||P|2.3||
    EVN|A31||||^^^^^^^^^^^^^^
    PID||^^^^^|^~^~^|^^^^|^^^^^^|^^^^^^|||^^^^^^||^^^^^^^^^||^^^^^^^^| ^^^^^^^^|^^^^^|||^^^^^|^^^^^|^^|^^^^^||||||^^^^^|^ ^^^^||

    I am using the code below to loop through my resultset and assign values to PID.3 field.

    var count = 0; //Variable for indexing
    while(result.next())
    {

    tmp['PID']['PID.3'][count]['PID.3.1'] = result.getString("OTHER_NO").trim();
    tmp['PID']['PID.3'][count]['PID.3.2'] = count;
    count++;
    }

    If I have more than the 3 results from my resultset to go into the highlighted section in my template. I get an error because I don't have enough fields defined in my template. Is there anyway to get around this so I don't have to define a template with a large number of repeating fields. Before anyone asks I have the handle repetitions property turned on.
Working...
X