Announcement

Collapse
No announcement yet.

extra text in transformed field

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

  • #2
    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.

    Comment


    • #3
      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
      -= [email protected]
      -= 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

      Comment

      Working...
      X