Announcement

Collapse

Mirth Connect 4.3.0 Released!

Mirth Connect 4.3.0 is now available as an appliance update and on our GitHub page.

This is a major release containing new features like adding new functionality to the Mirth Connect Setup Wizard, adding the ability for resource and channel-specific classloaders to load child-first or parent-first, and added a default implementation of the getObjectsForSwaggerExamples() method in the ServicePlugin class. This release also contains enhancements for the Mirth Connect Administrator Launcher, the Mirth Connect Docker images, and several bug fixes and security improvements.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

tmp['SFT'][i]['SFT.3']=msg['person'][i]['name'] don´t work

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

  • tmp['SFT'][i]['SFT.3']=msg['person'][i]['name'] don´t work

    I have a soap listener/ soap sender outbound channel. I receive a xml message (how we can see on raw message). I transform this
    message to send a hl7 message with soap sender. I think that the transformation don´t work fine. These are the input and output data:


    HL7 Message Template

    MSH|^~\&|||||19861020205658||QBP^Q22^QBP_Q21|FGDFG 6540RGE|D^R|2.5^8&&CDCA&&&IUPC^4&&FDK&&&LB|1654465 42132156||NE|AL|MWI|8859/3~8859/6~8859/3|23^^ICDO^^^NDC||11^CANNS~4^CANMB
    SFT|b^A^^3^M11^^EN^^A|t|d|Q||19991019221045
    SFT|b^A^^3^M11^^EN^^A|t|d|Q||19991019221045
    QPD|12^^W2^^^E6|VCFJFRTHBSRT56462H1TJD6G48HTS6FH
    RCP|D|56^&&&&&HOT|T^^JC8^^^MEDR|19931025005717|M|i ^AN
    DSC||F



    RAW Message:

    <data><person><name>Name1</name></person><person><name>Name2</name></person></data>


    Transformer:

    logger.info(&#039;MSG--> &#039;+msg);

    var i = 0;
    var name;

    while(msg[&#039;person&#039;][i]!=null) {
    tmp[&#039;SFT&#039;][i][&#039;SFT.3&#039;]=msg[&#039;person&#039;][i][&#039;name&#039;];


    i++;
    }

    LOG Console:

    INFO 2007-01-31 15:37:13,043 [_httpConnector#22765846.http:Mirth.receiver.2] ou
    tbound-transformation: MSG--> <data xmlns="urn:hl7-org:v2xml"><person><name>Name
    1</name></person><person><name>Name2</name></person></data>
    INFO 2007-01-31 15:37:13,090 [_httpConnector#22765846.http:Mirth.receiver.2] ou
    tbound-transformation: VALUE--> Name1
    INFO 2007-01-31 15:37:13,106 [_httpConnector#22765846.http:Mirth.receiver.2] ou
    tbound-transformation: VALUE--> Name2


    This is a stract from the transformed message

    <SFT>
    <SFT.1>
    <XON.1>b</XON.1>
    <XON.2>A</XON.2>
    <XON.4>3</XON.4>
    <XON.5>M11</XON.5>
    <XON.7>EN</XON.7>
    <XON.9>A</XON.9>
    </SFT.1>
    <SFT.2>t</SFT.2>
    <name>Name1</name>
    <SFT.4>Q</SFT.4>
    <SFT.6>
    <TS.1>19991019221045</TS.1>
    </SFT.6>
    </SFT>
    <SFT>

    And this is the encoded data:

    MSH|^~\&|||||19861020205658||QBP^Q22^QBP_Q21|FGDFG 6540RGE|D^R|2.5^8&&CDCA&&&IUPC^4&&FDK&&&LB|1654465 42132156||NE|AL|MWI|8859/3~8859/6~8859/3|23^^ICDO^^^NDC||11^CANNS~4^CANMB
    SFT|b^A^^3^M11^^EN^^A|t||Q||19991019221045
    SFT|b^A^^3^M11^^EN^^A|t||Q||19991019221045
    QPD|12^^W2^^^E6|VCFJFRTHBSRT56462H1TJD6G48HTS6FH
    RCP|D|56^&&&&&HOT|T^^JC8^^^MEDR|19931025005717|M|i ^AN
    DSC||F


    How It can see in the log, the value of msg[&#039;person&#039;][i][&#039;name&#039;] is Name1 and Name2, but in the transformed message the value appear how
    <name>Name1</name> and in the encoded data, the value is missing.

  • #2
    Re: tmp[&#039;SFT&#039;][i][&#039;SFT.3&#039;]=msg[&#039;person&#039;][i][&a

    Code:
    tmp[&#039;SFT&#039;][i][&#039;SFT.3&#039;]=msg[&#039;person&#039;][i][&#039;name&#039;].toString();
    Chris Lang

    Comment


    • #3
      Re: tmp[&#039;SFT&#039;][i][&#039;SFT.3&#039;]=msg[&#039;person&#039;][i][&a

      Ok, thanks.

      Best Regards.

      Comment

      Working...
      X