Announcement

Collapse

NextGen (Mirth) Connect 3.10.0 Released!

NextGen (Mirth) Connect 3.10.0 is now available as an appliance update and on our GitHub page. This release includes better SQL Server database support, security improvements through fixes and library updates, and improvements for the Advanced Clustering plugin with a focus on improving performance of many of the tasks that are carried out on a frequent interval. 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

Insurance array mapping wrong value

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

  • Insurance array mapping wrong value

    I have been working with different methods of sending repeating insurance segments to a SQL Server database. Since my segments all contain 2 IN1 segments, I thought I could just use a mapper step and map variables to the repeating segments like below.

    msg['ADT_A01.INSURANCE']['IN1']['IN1.8'][0]
    msg['ADT_A01.INSURANCE']['IN1']['IN1.8'][1]

    However, I have found that if a field is blank for IN1|1|... (Group Number in the example above) then the mapper actually uses the value in IN1|2|... to populate the first IN1 segment value and leaves the IN1|2|... field blank.

    In the example message below, the group number in the first insurance segment is blank and the group number in the second insurance segment is populated. If I try to map this with a mapper step, the group number from the second insurance segment is getting mapped to the first segment and the second (which should have a group number) is blank. If the values from both fields are populated Inbound_NEW.xml (12649 bytes) , it works fine.

    I attached my channel. Any ideas would be appreciated.

    MSH|^~\&|LASTWORD|01|MIK|97|||ADT^A04|200610161116 46012|P|2.3||||AL|
    EVN|A04|20061016111646|01|
    PID|||01234567||SMITH^John^J^SR^Mr||19500110|M||W| 123 MAIN CT^APT2^CINCINNATI^OH^45230||513-555-5555|513-555-5555||||123456789|123456789
    NK1|1|UNEMPLOYED||^^^^|||PTEMP|||||||||||||||||||| ||||||||
    PV1||I||||||^DOCTORLAST^DOCTORFIRST^MIDDLE^SUFFIX^ PREFIX|||||||||||||||||||||||||||||||01|||||||
    GT1||500|SMITH^John^J^SR^Mr||123 MAIN CT^APT2^CINCINNATI^OH^45230|513-555-5555|513-555-5555||||P|270525552||||UNEMPLOYED|123 Main Street^Suite 2^Cincinnati^OH^45206||
    IN1|1|0558|1|BLUE ACCESS*||||||||||C2XXX3||SMITH^Amy^M^SR^Mrs|02|200 00101||||||||||||||||||YRP123X45678||||||||||||||B |09142006|
    IN1|2|0001|2|Hospital BUSINESS CENT||||456||||||C2XXX3||SMITH^Amy^M^SR^Mrs|02|200 00101||||||||||||||||||9999999||||||||||||||B|0914 2006|

    Inbound_NEW.xml (12649 bytes)

  • #2
    Re:Insurance array mapping wrong value

    Solved my own problem...

    The [0] array increment needs to be as follows...

    msg['ADT_A01.INSURANCE'][0]['IN1']['IN1.8'].toString()
    msg['ADT_A01.INSURANCE'][1]['IN1']['IN1.8'].toString()

    Comment

    Working...
    X