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('MSG--> '+msg);
var i = 0;
var name;
while(msg['person'][i]!=null) {
tmp['SFT'][i]['SFT.3']=msg['person'][i]['name'];
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['person'][i]['name'] 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.
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('MSG--> '+msg);
var i = 0;
var name;
while(msg['person'][i]!=null) {
tmp['SFT'][i]['SFT.3']=msg['person'][i]['name'];
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['person'][i]['name'] 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.
Comment