web stats
Best Practice Question - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 07-18-2011, 07:25 AM
Bostad Bostad is offline
Level 85 Channel Wizard
 
Join Date: Mar 2009
Location: Stratford Ontario
Posts: 712
Bostad is an unknown quantity at this point
Default Best Practice Question

I'm writing a channel which will keep a light-weight Shadow EMPI that we want to use to maintain a downtime solution.

I'm only in the preliminary design phases and would like some feedback from the community as to opinions on best practices.

I'm planning on having a single destination with a javascript transformer per message type (I do 99% of my database work in javascript)

To avoid repeating a lot of code (and to make it easier for my non-programmer colleagues to troubleshoot if I'm not here) I've decided to put all my SQL Transactions into functions.

Right now I have these set up as global functions (under Code Templates).

My questions to the community are:

1) Do you think this is the right way to go about this? If not, why?

2) If you think functions are a good idea, do you think it would be better to move them into the deploy channel script and make them available only to the EMPI channel (as I don't think I'm going to be using them anywhere else)

Thanks.
Reply With Quote
  #2  
Old 07-18-2011, 10:56 AM
cgregory cgregory is offline
Mirth Newb
 
Join Date: Oct 2008
Posts: 6
cgregory
Default

I use functions for transformations whenever I'm likely to use a chunk of code multiple times. After the transformations, when writing to a database I usually call various stored procedures usually based on message type.

Honestly, I wouldn't worry too much about the coding setup yet if you are in the preliminary design phase. I found that documenting all your ADT messages types that could be coming and how you want to process them will give you a better idea of whether functions will work for you and which functions you will need. Documenting the ADT process and the resulting messages generated will give you your basic message flow and allow you to see any message types that perhaps shouldn't be there based on your hospital's official ADT process.

Willl you be pre-loading the database with patients or will you be starting from an empty database? Will you need A08 to act as A01 or A04 if the patient does not exist in your database or will you simply ignore the A08 in those situations? Some ADT systems generate the same ADT type for both merges and unmerges.
Reply With Quote
  #3  
Old 07-18-2011, 11:15 AM
Bostad Bostad is offline
Level 85 Channel Wizard
 
Join Date: Mar 2009
Location: Stratford Ontario
Posts: 712
Bostad is an unknown quantity at this point
Default

No pre-loads. I'm going to use an admit on A08 if there's no existing patient rule (provided that there is no discharge status).

I've got the processes mapped and thinking of writing stored procedures for some of the more complex stuff...account and patient merges.

The thing my boss stresses is the lack of support if I'm not around and something goes wrong so I have to keep my code as simple as possible.
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 12:47 AM.


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