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

issue with transformers

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

  • issue with transformers

    Hello all,

    A newbie here, I'm trying to perform a simple insert transaction from a HL7 message into my MySQL DB. I crated a channel with two destinations, the first destination is to a demographics table which works perfectly. I'm trying to insert some insurance info to a table in the second destination however, I'm running into the following errors:

    ERROR(transformer:?): TypeError: Cannot read property "IN1.8" from undefined
    ERROR(transformer:?): TypeError: Cannot read property "IN1.36" from undefined
    ERROR(transformer:?): TypeError: Cannot read property "IN1.4" from undefined

    I used the same method to map the demographics & insurance variables. Why isn't my insurance destination working. What am I NOT doing? Thank you for your time.

    I"m using Windows with 1.8 RC2 build 3946.
    I'm not using Java
    Below is my simple insert statement.

    Code:
    INSERT IGNORE INTO insurance 
    SET 
    sid=${mrn},
    insurance_company=${insurance_company},
    medicare_num=${medicare_num},
    policy_num=${policy_num},
    insurance_group_id=${insurance_group_id}
    ON DUPLICATE KEY UPDATE 
    insurance_company=${insurance_company},
    medicare_num=${medicare_num},
    policy_num=${policy_num},
    insurance_group_id=${insurance_group_id}

  • #2
    Re:issue with transformers

    Can you post your whole channel? (Channels -> Export Channel)
    Jon Bartels

    Zen is hiring!!!!
    http://consultzen.com/careers/
    Talented healthcare IT professionals wanted. Engineers to sales to management.
    Good benefits, great working environment, genuinely interesting work.

    Comment


    • #3
      Re:issue with transformers

      Thanks for the reply. Attached is my channel. HL7_mirth.xml (88022 bytes)

      Comment


      • #4
        Re:issue with transformers

        Well looking at your channel you're seeing the errors because there is a try/catch block in the mapper that copes with not having an IN1.8 segment, its not related to your query.

        Are there any other errors? Does your query actually insert data if you substitute the mappings for static values.
        Jon Bartels

        Zen is hiring!!!!
        http://consultzen.com/careers/
        Talented healthcare IT professionals wanted. Engineers to sales to management.
        Good benefits, great working environment, genuinely interesting work.

        Comment


        • #5
          Re:issue with transformers

          Thanks for the reply. I figured out that my issue was with empty transformer segments. Now my problem is with multiple IN1 segments. Is there a way to loop thru the IN1s without using Java?

          Thanks

          Comment


          • #6
            Re:issue with transformers

            Using javascript in a transformer, take a look to "Iterate over segment":

            Code:
            for each (seg in msg..IN1)
            {
            	var sample_value = seg['IN1.1']['IN1.1.1'];
            }
            ..

            Comment

            Working...
            X