web stats
table lookup - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 09-10-2014, 04:51 AM
johnjohn johnjohn is offline
OBX.1 Kenobi
 
Join Date: Aug 2014
Posts: 31
johnjohn is on a distinguished road
Default table lookup

I want to convert the provider from one value to another. What is the most efficient way to do it? (I have 600 providers to convert in different segments too) I am using Mirth 3.03. Thanks
Reply With Quote
  #2  
Old 09-10-2014, 07:04 AM
johnjohn johnjohn is offline
OBX.1 Kenobi
 
Join Date: Aug 2014
Posts: 31
johnjohn is on a distinguished road
Default

I think I am going to use the hashmap approach.
Reply With Quote
  #3  
Old 09-10-2014, 09:41 PM
glenn71 glenn71 is offline
OBX.3 Kenobi
 
Join Date: Nov 2010
Location: Sydney Australia
Posts: 129
glenn71 is on a distinguished road
Default

load your hashmap in the deploy script
Reply With Quote
  #4  
Old 09-11-2014, 08:13 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road
Default

In 3.1 you'll also be able to use the configuration map to do things like this. It's basically a map you can edit directly in the Administrator, or load from an external properties file. It's meant to replace having to load properties files into maps in deploy scripts, which I know a lot of users currently do.
__________________
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
  #5  
Old 09-22-2014, 04:19 AM
johnjohn johnjohn is offline
OBX.1 Kenobi
 
Join Date: Aug 2014
Posts: 31
johnjohn is on a distinguished road
Default

Can you walk me through how to build the configuration map in the administrator? Thanks,
Reply With Quote
  #6  
Old 09-22-2014, 07:33 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road
Default

Quote:
Originally Posted by johnjohn View Post
Can you walk me through how to build the configuration map in the administrator? Thanks,
That will only be available as of 3.1, which will be released soon. If you're a support customer you can view our demo of it here: http://www.mirthcorp.com/protected-c...eveloper-qa-72
__________________
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
  #7  
Old 05-11-2015, 01:33 PM
Klima Klima is offline
Mirth Newb
 
Join Date: Jan 2013
Posts: 16
Klima is on a distinguished road
Default

Quote:
Originally Posted by narupley View Post
In 3.1 you'll also be able to use the configuration map to do things like this. It's basically a map you can edit directly in the Administrator, or load from an external properties file. It's meant to replace having to load properties files into maps in deploy scripts, which I know a lot of users currently do.
Is there a limit? I need to perform a translation table for the insurance segments in our ADTs and we have something like 5,000 insurances.

I'm looking for the best way to accomplish this goal and this seems promising though we are currently on Mirth Connect Server 3.0.0.6931.

Matt
Reply With Quote
  #8  
Old 05-11-2015, 01:44 PM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road
Default

Quote:
Originally Posted by Klima View Post
Is there a limit? I need to perform a translation table for the insurance segments in our ADTs and we have something like 5,000 insurances.

I'm looking for the best way to accomplish this goal and this seems promising though we are currently on Mirth Connect Server 3.0.0.6931.

Matt
No limit per se, but unfortunately it may become cumbersome to manage when you have thousands of such values. There's an open issue to address that though: MIRTH-3459
__________________
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
  #9  
Old 05-12-2015, 08:33 AM
Klima Klima is offline
Mirth Newb
 
Join Date: Jan 2013
Posts: 16
Klima is on a distinguished road
Default

Quote:
Originally Posted by narupley View Post
No limit per se, but unfortunately it may become cumbersome to manage when you have thousands of such values. There's an open issue to address that though: MIRTH-3459

So if you had to translate the IN segments from one system to another (essentially rebuilding the entire IN1 segments):

begin e.g.

IN1|1|CP30|3002|...

IN1.3 is the insurance carrier ID in system A. I need to look up what 3002 = in system B and then rebuild the IN segments to reflect that information

end e.g.

would this be the way to do it? I understand there are some issues with it but ultimately it seems like the way to do this in Mirth.

Matt
Reply With Quote
  #10  
Old 05-12-2015, 09:04 AM
narupley's Avatar
narupley narupley is online now
Mirth Employee
 
Join Date: Oct 2010
Posts: 7,126
narupley is on a distinguished road
Default

Yes, so in that case you could create an entry in the configuration map with the key "3002" and the value of whatever it should be in System B.

However, when you're talking about a large amount of values like that, you may find it better and more maintainable in the long-run if you store that data in a database. Then in your global deploy script you can query that database and build up a map. Something like this:

Code:
var dbConn;
var result;

try {
	dbConn = DatabaseConnectionFactory.createDatabaseConnection('driver', 'address', 'username', 'password');
	result = dbConn.executeCachedQuery('expression');

	var map = new java.util.HashMap();
	// Populate map however you want with values from the result set
	globalMap.put('insuranceCodes', map);
} finally {
	if (dbConn) {
		dbConn.close();
	}
}
Obviously if and when MIRTH-3459 gets done then you can more easily use and maintain those values using the configuration map.
__________________
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 08:55 AM.


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