|
#1
|
|||
|
|||
|
OK, I am attempting to De-Identify Messages for testing purposes. So any sensitive msg elements (ei: PID.3.1) need to be changed to fictional data.
So what is the easiest way to accomplish this ? It doesn't look like the Message Builder "String Replacement" will work . . . so what J-Script code will do this. If PID.3.1 is NOT equal to BLANKS then fill with "XXXXXXXX" where "XXXXXXXX" is anything I want it to be .
|
|
#2
|
|||
|
|||
|
I would create a variable containing a number on the globalMap (for example called anon)
Then, for every message going through my channel, i'd set PID.3.1 with "ANON" + anon, and increment anon before going to the next message. To make it nicer, you could even left-pad the variable up to the number of positions you need. This would give you contents like ANON00001, ANON00002 etc. in you PID.3.1
__________________
JJ Mouris FFE Luxembourg IT-Department |
|
#3
|
|||
|
|||
|
Basically, it would go something like this:
Code:
if (msg.PID['PID.3']['PID.3.1'].toString()) msg.PID['PID.3']['PID.3.1'] = 'XXXXXXXX'; |
![]() |
| Thread Tools | |
| Display Modes | |
|
|