web stats
issue with transformers - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 10-27-2008, 12:26 PM
setowmich setowmich is offline
What's HL7?
 
Join Date: Oct 2008
Posts: 4
setowmich
Default 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 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}
Reply With Quote
  #2  
Old 10-27-2008, 01:05 PM
jbartels jbartels is offline
Mirth Guru
 
Join Date: Oct 2006
Posts: 729
jbartels is on a distinguished road
Default 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.
Reply With Quote
  #3  
Old 10-28-2008, 04:11 AM
setowmich setowmich is offline
What's HL7?
 
Join Date: Oct 2008
Posts: 4
setowmich
Default Re:issue with transformers

Thanks for the reply. Attached is my channel. HL7_mirth.xml (88022 bytes)
Reply With Quote
  #4  
Old 10-28-2008, 04:28 AM
jbartels jbartels is offline
Mirth Guru
 
Join Date: Oct 2006
Posts: 729
jbartels is on a distinguished road
Default 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.
Reply With Quote
  #5  
Old 11-03-2008, 06:39 AM
setowmich setowmich is offline
What's HL7?
 
Join Date: Oct 2008
Posts: 4
setowmich
Default 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
Reply With Quote
  #6  
Old 11-03-2008, 07:53 AM
quimicefa quimicefa is offline
Mirth Guru
 
Join Date: Dec 2007
Location: Barcelona
Posts: 235
quimicefa is on a distinguished road
Default 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'];
}
..
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reuse transformers Alexander Support 2 04-14-2008 03:20 PM
Visualizing filters and transformers on channels feurer Support 0 07-02-2007 11:05 AM
converting transformers from 1.4 to 1.5 gsasquatch Support 4 06-19-2007 10:53 AM
A17 issue is980491 Support 0 02-02-2007 08:52 AM
LLP Issue Jack Support 3 09-19-2006 04:19 AM


All times are GMT -8. The time now is 12:04 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation