web stats
ORU to database sample - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 04-12-2012, 05:57 PM
sarcophyton sarcophyton is offline
OBX.1 Kenobi
 
Join Date: Jan 2012
Posts: 37
sarcophyton is on a distinguished road
Default ORU to database sample

Does anyone have an ORU message to database writer channel that they wouldn't mind sharing? Just looking for a head start.
Reply With Quote
  #2  
Old 04-13-2012, 07:37 AM
mdehoog mdehoog is offline
OBX.3 Kenobi
 
Join Date: Mar 2011
Location: Apeldoorn the Netherlands
Posts: 113
mdehoog is on a distinguished road
Send a message via Skype™ to mdehoog
Default SIU to db

I've got a SIU to database (MSSQL) for you.

it does some other things also.
Attached Files
File Type: xml MCA-SIU15todb-MSSQL.xml (53.5 KB, 84 views)
__________________
Chateau de Roqueperlic
Noailhac Tarn France
http://www.roqueperlic.com
Reply With Quote
  #3  
Old 04-13-2012, 07:50 AM
upstart33 upstart33 is offline
Mirth Guru
 
Join Date: Dec 2010
Location: Chicago, IL.
Posts: 416
upstart33 is on a distinguished road
Default

I would recommend checking out this:

http://www.mirthcorp.com/webinars/mi...ect-screencast

It will give you a good basis and how to do it, amongst other things.
Reply With Quote
  #4  
Old 04-13-2012, 08:31 AM
sarcophyton sarcophyton is offline
OBX.1 Kenobi
 
Join Date: Jan 2012
Posts: 37
sarcophyton is on a distinguished road
Default

Thanks for the quick replies! I am just being lazy, hoping for an some sample code which already slogs through the possible multiple OBR, OBX, NTE segments.
Reply With Quote
  #5  
Old 04-13-2012, 12:03 PM
Bostad Bostad is offline
Level 85 Channel Wizard
 
Join Date: Mar 2009
Location: Stratford Ontario
Posts: 679
Bostad is an unknown quantity at this point
Default

Code:
for each (seg in msg..OBR)  {

//code here

}  

//repeat "for each" for each segment type you need
__________________
I can be reached through gmail and Google Talk using davidrothbauer at gmail dot com
http://www.linkedin.com/pub/david-rothbauer/5/923/518
hl7coders.wordpress.com

Test all my code suggestions prior to implementation
Reply With Quote
  #6  
Old 04-15-2012, 05:43 PM
glenn71 glenn71 is offline
OBX.2 Kenobi
 
Join Date: Nov 2010
Location: Sydney Australia
Posts: 93
glenn71 is on a distinguished road
Default

Hey Sarco,

Did you get what you need? Can you supply the sql that you need to use?

In my case I had multiple stored procs that I had to build (e.g. one for each OBX & slightly different sproc for 'FT' OBX results)

In summary:
1. Build a dest transformer - iterated through the segments and built an array of SQL statements.
2. In the "DB Writer" connector - loop through the SQL array and execute each SQL statement.

The approach will differ depending on the SQL statements that you need to create.
Reply With Quote
  #7  
Old 04-18-2012, 07:35 AM
sarcophyton sarcophyton is offline
OBX.1 Kenobi
 
Join Date: Jan 2012
Posts: 37
sarcophyton is on a distinguished road
Default

Yes, I have the code that I need. We are just trying to figure out how much we can flatten the database without losing anything essential.
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 -7. The time now is 08:35 AM.


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