web stats
Newbie seeks help debugging - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 10-17-2014, 09:12 AM
ahart ahart is offline
OBX.2 Kenobi
 
Join Date: Oct 2014
Posts: 56
ahart is on a distinguished road
Question Newbie seeks help debugging

I am a Java programmer, weak JavaScript skills, and absolute newbie to HL7 and Mirth who has inherited a big project right during the middle of SIT testing and staging. We are using Mirth 2.2.3.6825.

A24 and A37 messages (link/unlink) are not being processed correctly. In researching it, it turned out that the previous developer had missed loading a channel, then deleted some destination connectors in a different channel that referenced the missing channel because he thought it was dead code. So, I restored the missing channel and the connectors manually by examining earlier versions of the xml channel file, then importing it.

Here's how it's supposed to work:

A channel, "TC2", looks for *.HDP messages in an input folder. The FileReader source connector has a transformer with several steps. The second step sets a channelMap variable called tc2Type using this mapping:

Code:
msg['MSH']['MSH.9']['MSH.9.2'].toString()
It then has a few other steps extracting data from the message and putting them into other channelMap variables.

Now, there are several Destination connectors. The first one, which I restored, is a JavaScript Writer called "Determine if Message is to be Skipped" and it has a filter:

Code:
Accept message if "$('tc2Type')"="A24" or "A37"
and then, in the JavaScript Writer it has:

Code:
channelMap.put('skipMessage', true);
(Now, I'm not really sure why they did it that way, as a destination. Seems to me they could have just set skipMessage in the source transformer they way they did everything else, but that's how it is.)

Ok, so the second destination connector that I restored is a Channel Writer called "Send Skipped Message" which has this filter:

Code:
Accept message if"$('skipMessage')" equals "true"
And, so if the message is supposed to be skipped it will write it to this channel that I also restored called "TC2 Pass Through Messages".

Now, the remaining destinations do some other things. One invokes a web service to get some info, the next parses the result from the web service, and then the remaining three route the transformed messages somewhere. All of these destinations have filters that look (more or less) like this:

Code:
Accept message if "$(disCallErrorDesc')" does not equal "RBSQUEUE" or "RBS_NO_EDIPN"
AND Accept message if "$('skipMessage')" does not exist
the point being that they should all filter out messages if the skipMessage channelMap variable is defined.

The problem is that they are not. In one of the channels (for which I listed the filter above) I am getting an error thrown from the transformer to the effect of "TypeError: Assignment to lists with more than one item is not supported", which I take to be because these are A24 and A37 messages with multiple PID segments. But I shouldn't be getting these errors because these message should be filtered out by the logic I restored which would just route them on unchanged and ignoring them in the channel that is throwing the error.

So, the first thing I did was examine the HL7 message which entailed understanding how it was constructed, what the delimiting characters are, etc, and the bottom line is that they look OK. I mean I loaded them up in a utility I found, HL7Browser, in field 9 I have the value "ADT\A37", for example. If I understand how the MSH segment defines delimiters correctly, the backslash should be separating field components.

Ok, so my question is this: what is the best way to debug, step through this process. Is there a way to see what my channelMap variables are being set to. Can I, say, add logging statements to anywhere that will show me how the filters for each destination are being evaluated?

Lastly, how does one go about becoming a Mirth "guru"? I am having a very difficult time finding any documentation at all, so it seems like every little thing will have to be googled independently which will make for a very long hard slog through a dark jungle. I think we have purchased "Named Platinum Support", but of course I'm not one of the people named and, in typical corporate disarray, I don't think anyone is sure who exactly is named or how to go about using this support they have purchased.

And, if I could be permitted one tiny little rant, this whole trend toward a business model that I call "VagueWare", where the product is free, but poorly documented (or not at all), e.g., SoapUi et al, just makes me want to tear out what little hair I have left. Yes, they're talking of sending me to cla$$es and becoming "certified", but doesn't help me with the deadlines I have now.

P.S. UPDATE: Ok, I have discovered that I can see the messages in the dashboard, view "Mappings", all very helpful. It looks like tc2Type is being set properly, I don't see anything for the "skipMessage", so perhaps it's not making it into the channelMap.

Last edited by ahart; 10-17-2014 at 09:53 AM. Reason: update
Reply With Quote
  #2  
Old 10-17-2014, 09:56 AM
narupley's Avatar
narupley narupley is offline
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,115
narupley is on a distinguished road
Default

This will probably help:

http://www.mirthcorp.com/webinars/mi...ect-screencast
http://www.mirthcorp.com/featured-we...t-30-beta-demo

Also since you have a valid support contract, you should be able to view any of our past developer Q&A webinars: http://www.mirthcorp.com/products/mi...stions-answers. If you can't login, contact the help desk and they'll get you sorted out. Also ask to be put on the invite list for future webinars, where you can ask questions live and we'll answer them.

We also have a complete Mirth Connect user guide in the customer portal (under documentation): http://www.mirthcorp.com/community/customer-portal
__________________
Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

Nicholas Rupley
Work: 949-237-6069
Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


- How do I foo?
- You just bar.
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


All times are GMT -8. The time now is 02:24 PM.


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