Announcement

Collapse
No announcement yet.

Help replacing a test name

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

  • Help replacing a test name

    Hello, I have to change the name of a OBR.
    When I receive "cbase(b)", I have to change it to "ABE".

    I have made an approach, but doesn't work



    for each (seg in msg.children()) {
    var i=0;
    if (seg.name().toString() == "OBX") {
    if ( msg['OBX'][i]['OBX.3']['OBX.3.2'].toString().equals('cBase(B)'))
    {

    tmp['OBX'][i]['OBX.3']['OBX.3.2']='ABE';
    logger.info("entro en comparacion");
    logger.info(msg['OBX']['OBX.3']['OBX.3.2'].toString());
    }



    }
    }

    Any help would be apreciated, thanks.

  • #2
    I see you are doing tmp['OBX'][i]['OBX.3']['OBX.3.2']='ABE';

    Should that be msg['OBX'][i]['OBX.3']['OBX.3.2']='ABE'; instead?

    Comment


    • #3
      Originally posted by rigved View Post
      I see you are doing tmp['OBX'][i]['OBX.3']['OBX.3.2']='ABE';

      Should that be msg['OBX'][i]['OBX.3']['OBX.3.2']='ABE'; instead?

      What I want to change is the output, btw, it doesn't work on that way (i tried)

      Comment


      • #4
        PHP Code:
        for each(obx in msg.OBX)
        {
            if(
        obx['OBX.3']['OBX.3.2'].toString() == 'cBase(B)')
            {
                
        obx['OBX.3']['OBX.3.2'] = 'ABE';   
                
        logger.info("entro en comparacion");
                
        logger.info(obx['OBX.3']['OBX.3.2'].toString());
            }

        Comment


        • #5
          thanks!!!!!

          Comment

          Working...
          X