Mirth Community

Mirth Community (http://www.mirthcorp.com/community/forums/index.php)
-   Support (http://www.mirthcorp.com/community/forums/forumdisplay.php?f=6)
-   -   Reset a variable after use? (http://www.mirthcorp.com/community/forums/showthread.php?t=214896)

ferdinand 10-28-2015 02:17 AM

Reset a variable after use?
 
Hi to all
I have a channer which asks for demographics towards a webservice.

Before, I made a conversion, to remove some characters in the transformer:

var peide = new String($('PEIDE'))
for (var i = 0; i < peide.length; i++) {
var caracter = peide.charAt(i);
if (caracter == "X" || caracter == "x") {
var res = peide.substring(0, i);
globalChannelMap.put('res', res)

The problem is that from time to time I received the same demographics response for different pid's
My guess is that it is using the same variable 'res' for different patients.
żany advice?

Thanks in advance


All times are GMT -8. The time now is 06:10 PM.

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