I have a channel which reads xml from a file and transforms to hl7 using javascript like this
tmp['PID']['PID.5']['PID.5.1'] = msg['Patient']['lastName'].toString();
tmp['PID']['PID.5']['PID.5.2'] = msg['Patient']['firstName'].toString();
This works fine for a filereader but when I switch to a database reader using this SQL
select message from messages where processed = 'U'
I lose the ability to map and I lose my template. My Incoming Data template is replaced with this
<?xml version="1.0" encoding="UTF-8"?>
<result>
<message>value</message>
</result>
and the logger output shows the same wrapper xml
<result><message><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<IMessage><Patient>...blah...</Patient></IMessage>]]></message></result>
how to make it the same as a file reader? Perhaps there is a function I can apply to msg['message'].toString() but I dont see how I can get my mapper to stick?
tmp['PID']['PID.5']['PID.5.1'] = msg['Patient']['lastName'].toString();
tmp['PID']['PID.5']['PID.5.2'] = msg['Patient']['firstName'].toString();
This works fine for a filereader but when I switch to a database reader using this SQL
select message from messages where processed = 'U'
I lose the ability to map and I lose my template. My Incoming Data template is replaced with this
<?xml version="1.0" encoding="UTF-8"?>
<result>
<message>value</message>
</result>
and the logger output shows the same wrapper xml
<result><message><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<IMessage><Patient>...blah...</Patient></IMessage>]]></message></result>
how to make it the same as a file reader? Perhaps there is a function I can apply to msg['message'].toString() but I dont see how I can get my mapper to stick?
Comment