web stats
X12 Help - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 04-09-2012, 07:38 AM
Haider Ali Haider Ali is offline
What's HL7?
 
Join Date: Mar 2012
Posts: 4
Haider Ali is on a distinguished road
Default X12 Help

Hi, i want to ask as im generating HL7 message form db same as i will generate X12 837 message using sample x12 outbound message template , and one more thing where can i get Mirth ref. guide

thanks
Reply With Quote
  #2  
Old 04-09-2012, 07:43 AM
narupley's Avatar
narupley narupley is offline
Mirth Employee
 
Join Date: Oct 2010
Posts: 4,789
narupley is on a distinguished road
Default

Exactly what help do you need? Are you stuck on anything specifically?

As far as a reference guide goes, Mirth does have one, but I believe it's only given out to those who attend training. The wiki, forums, source code, and IRC channel are great reference guides too though...
Reply With Quote
  #3  
Old 04-09-2012, 08:11 AM
Haider Ali Haider Ali is offline
What's HL7?
 
Join Date: Mar 2012
Posts: 4
Haider Ali is on a distinguished road
Default

Great
I did not start yet, im just exploring Mirth.

But how can I perform iteration in x12 loops (1000, 2000 etc), or add/modify/delete segments ???



thanks
Reply With Quote
  #4  
Old 04-09-2012, 08:35 AM
narupley's Avatar
narupley narupley is offline
Mirth Employee
 
Join Date: Oct 2010
Posts: 4,789
narupley is on a distinguished road
Default

Here's an example of iterating through every PID segment in the message:

Code:
for each (pid in msg.PID)
	logger.info(pid['PID.05']['PID.05.1'].toString());
And an example of adding a new PID segment to the message:

Code:
var pid = <PID/>;
pid['PID.05']['PID.05.1'] = 'test';
msg.appendChild(pid);
It's very much the same thing as HL7 2.x... Mirth just pads the X12 element index with a zero (PID.05 rather than PID.5). Other than that, it really just comes down to using JavaScript and E4X efficiently, with which the links I provided earlier will help!
Reply With Quote
  #5  
Old 04-10-2012, 03:54 AM
Haider Ali Haider Ali is offline
What's HL7?
 
Join Date: Mar 2012
Posts: 4
Haider Ali is on a distinguished road
Default

very nice. it means i have to write lot of JavaScript for manipulation of x12 segments...

Could you please describe a little bit about the objects like msg, tmp, messageObject etc. when i use javascript/E4X

thanks

Last edited by Haider Ali; 04-10-2012 at 03:58 AM.
Reply With Quote
  #6  
Old 04-10-2012, 04:25 AM
narupley's Avatar
narupley narupley is offline
Mirth Employee
 
Join Date: Oct 2010
Posts: 4,789
narupley is on a distinguished road
Default

Quote:
Originally Posted by Haider Ali View Post
very nice. it means i have to write lot of JavaScript for manipulation of x12 segments...

Could you please describe a little bit about the objects like msg, tmp, messageObject etc. when i use javascript/E4X

thanks
For each connector, msg is your inbound E4X XML object, tmp is your outbound E4X XML object, and messageObject is a Java MessageObject that contains everything related to a unique message and position in the channel (source/destination connectors). Look here for more info:

http://www.mirthcorp.com/community/f...ead.php?t=6433
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 05:52 PM.


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