web stats
extra text in transformed field - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 09-29-2017, 04:24 AM
ccollins550 ccollins550 is offline
OBX.1 Kenobi
 
Join Date: May 2011
Posts: 27
ccollins550 is on a distinguished road
Unhappy extra text in transformed field

Can anyone tell me why this is happening? I am not doing anything different on the 6 other transformers I have in the channel, but the PID 3 field is being populated as shown below:

PID|1|PPP|PPP<PID.3><PID.3.1>PPP000000</PID.3.1></PID.3>|000-00-0000

I am just looking for it to be PPPPPP000000

This is my transformer script:

var _patientIdentification_patientId = Lists.list();

var _patientIdentification_patientIdentifierList = Lists.list();

for (var p = 0; p < getArrayOrXmlLength(msg['PID']); p++) {

for (var n = 0; n < getArrayOrXmlLength(msg['PID'][p]['PID.2']); n++) {

var mapping;

try {
mapping = msg['PID'][p]['PID.2'][n] = 'PPP' + msg['PID']['PID.2'][n].toString();
} catch (e) {
logger.error(e);
mapping = '';
}

_patientIdentification_patientId.add(validate(mapp ing, '', new Array()));

}


for (var o = 0; o < getArrayOrXmlLength(msg['PID'][p]['PID.3']); o++) {

var mapping;

try {
mapping = msg['PID'][p]['PID.3'][o] = 'PPP' + msg['PID']['PID.3'][o].toString();
} catch (e) {
logger.error(e);
mapping = '';
}

_patientIdentification_patientIdentifierList.add(v alidate(mapping, '', new Array()));

}


}
channelMap.put('patientIdentification_patientId', _patientIdentification_patientId.toArray());

channelMap.put('patientIdentification_patientIdent ifierList', _patientIdentification_patientIdentifierList.toArr ay());


Thanks for any help you can provide! I really appreciate it.
Reply With Quote
  #2  
Old 09-29-2017, 06:28 AM
ccollins550 ccollins550 is offline
OBX.1 Kenobi
 
Join Date: May 2011
Posts: 27
ccollins550 is on a distinguished road
Default Indesperate need

Hello,

Just wondering if there is anyone out there is anyone out there who can help with this. Reallllly stuck on how this is happening.
Reply With Quote
  #3  
Old 10-01-2017, 12:07 PM
jackwhaines jackwhaines is offline
 
Join Date: May 2011
Location: Kansas City, Missouri
Posts: 181
jackwhaines is on a distinguished road
Send a message via Skype™ to jackwhaines
Default

I think I addressed this in the other submission, but if you still need help, let me know!
__________________

-= Jack Haines : Founder/CEO of Healthcare Integrations, LLC
-= jack.haines@HealthcareIntegrations.com
-= Mirth Connect (Advanced)-certified
-= Gold member of HL7.org
-= Available for Mirth Connect channel development and consultation! Schedule a FREE call with me at https://calendly.com/jackhaines
Reply With Quote
Reply

Tags
edit pid, pid, prepend, transformer

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:14 AM.


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