web stats
Testing and inserting for a segment - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 11-12-2008, 07:18 AM
hjohnson hjohnson is offline
OBX.1 Kenobi
 
Join Date: Dec 2006
Location: Little Rock, AR
Posts: 30
hjohnson
Default Testing and inserting for a segment

Would I use a step in a transformer or use the pre-processor to test for a missing PV1 segment?.
Our HL7 source generates PV1 segments only on select Results messages. I need to detect and generate PV1s on those without them.

Thanks,
Hugh
Little Rock, Ar
Reply With Quote
  #2  
Old 11-12-2008, 08:28 AM
jbartels jbartels is offline
Mirth Guru
 
Join Date: Oct 2006
Posts: 729
jbartels is on a distinguished road
Default Re:Testing and inserting for a segment

hjohnson wrote:
Quote:
Would I use a step in a transformer or use the pre-processor to test for a missing PV1 segment?.
Our HL7 source generates PV1 segments only on select Results messages. I need to detect and generate PV1s on those without them.

Thanks,
Hugh
Little Rock, Ar
You would actually want that in a FILTER. Your filter would simply check to see if msg['PV1'] is present. You should be able to do that with the filter builder and not need javascript.

Your channel would have two destinations:

1) If the message has a PV1 segment present where you would just pass the message on to some other system
2) If the message has no PV1 segment where you would build a PV1 and then send the message on.
__________________
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 11-13-2008, 07:06 AM
hjohnson hjohnson is offline
OBX.1 Kenobi
 
Join Date: Dec 2006
Location: Little Rock, AR
Posts: 30
hjohnson
Default Re:Testing and inserting for a segment

Jeez, I hate to appear a total nobb. I did get the message containing the PV1 segment to pass it to a folder and Filter the one that doesn't have the PV1 segment, but the second Destination is never hit.

Will keep experimenting.

I am using the latest greatest 1.80 RC2 Mirth.

Thanks,
Hugh
Reply With Quote
  #4  
Old 11-13-2008, 07:39 AM
jbartels jbartels is offline
Mirth Guru
 
Join Date: Oct 2006
Posts: 729
jbartels is on a distinguished road
Default Re:Testing and inserting for a segment

We all gotta start somewhere. Feel free to post your channel if you want a second opinion on it.
__________________
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-18-2008, 10:23 AM
hjohnson hjohnson is offline
OBX.1 Kenobi
 
Join Date: Dec 2006
Location: Little Rock, AR
Posts: 30
hjohnson
Default Re:Testing and inserting for a segment

Okay. I got it so I can filter and send or keep msgs based on the PV1 segment. I don't see how you can construct a PV1 segment if the needed info is embedded in the OBX segments. I can throw the msg to a folder and have another application extract the necessary data. What do you pros do.

hugh
Reply With Quote
  #6  
Old 11-24-2008, 02:21 PM
hjohnson hjohnson is offline
OBX.1 Kenobi
 
Join Date: Dec 2006
Location: Little Rock, AR
Posts: 30
hjohnson
Default Re:Testing and inserting for a segment

Okay, I got everything to work but I had to use an outbound msg template and javascript. Do you think that will slow things down in real life?
Reply With Quote
  #7  
Old 11-25-2008, 05:49 AM
jbartels jbartels is offline
Mirth Guru
 
Join Date: Oct 2006
Posts: 729
jbartels is on a distinguished road
Default Re:Testing and inserting for a segment

hjohnson wrote:
Quote:
Okay, I got everything to work but I had to use an outbound msg template and javascript. Do you think that will slow things down in real life?
There is always room for optimization, but I have channels with outbound templates and JS with a fairly nasty timing component* that handle 10k messages a day minimum.

If you are looking to optimize, most of that would likely be done in the JS and any DB queries. No different from classic development, tune your queries, make sure your loops are tight, and use well-tested libraries when they're available.

As usual feel free to post code snippets or channel exports.

*a call to Java sleep, don't ask.
__________________
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
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
SQLException while inserting message in derby level420 Support 1 09-30-2007 10:37 PM
HL7 testing tools. kevspett General Discussion 3 08-20-2007 03:13 PM
Testing Mirth Channels cord73 General Discussion 1 06-13-2007 09:57 AM
app for injecting data to LLP Listener for testing mcheck Development 3 01-23-2007 09:18 PM
Testing Mirth with bulk messages nshaik Support 5 09-26-2006 06:44 AM


All times are GMT -8. The time now is 03:20 AM.


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