Question
· Aug 5, 2020

Converting XLT (XML) into DTL (XML)

Greeting IRIS Community,

I need some help converting XLT (XML) into DTL (XML) pragmatically using COS or any other available options in IRIS for health.
It is for HL7-TO-nonHL7 translation. 

See the following xlt content as an example that i have in XML Format.
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="../../server/stylesheet/xltconfig.xsl"?>
<xltconfig name="accenture-1.xlt" site="thac">
<input>
<description>HL7 2.2/2.2 ADT_A16</description>
<href>thmaster/formats/hl7/2.2/22/index.xml</href>
</input>
<output>
<description>pendingDischarge.vrl</description>
<href>thmaster/formats/variable/ADT_Pending.vrl.xml</href>
</output>
<actions>
<action op="CONCAT" level="1" icon="CONCAT.gif" activated="true">
<pre></pre>
<post></post>
<in>=&apos; 0(0).MSH(0).#10(0).[0] =&apos;</in>
<out>PROPERTY1</out>
<err handling="0" description="Skip"/>
<default></default>
<separator></separator>
</action>
<action op="CONCAT" level="1" icon="CONCAT.gif" activated="true">
<pre></pre>
<post></post>
<in>=&apos; 0(0).MSH(0).#9(0).[0] =_ 0(0).EVN(0).#1(0).[0] =&apos;</in>
<out>PROPERTY2</out>
<err handling="0" description="Skip"/>
<default></default>
<separator></separator>
</action>
<action op="CONCAT" level="1" icon="CONCAT.gif" activated="true">
<pre></pre>
<post></post>
<in>0(0).MSH(0).#4(0).[0] 0(0).PV1(0).#2(0).[0]</in>
<out>PROPERTY3</out>
<err handling="0" description="Skip"/>
<default></default>
<separator></separator>
</action>
...
......
.......
.........

Expected Results in DTL 

Expected conversion should be like this in DTL (XML) format.

DTL <?xml version="1.0" encoding="UTF-8"?> <Export ts="2020-01-09 01:01:00" zv="IRIS for Windows (x86-64) 2020.1 (Build 217_1U)" version="26" generator="IRIS">
<Class name="Mypackage.Myclass"> <Super>Ens.DataTransformDTL</Super> <TimeChanged>62323,43489.390656</TimeChanged> <TimeCreated>62323,42706.863977</TimeCreated> <DependsOn>EnsLib.HL7.Message,MyRecordMap.test</DependsOn>
<Parameter name="IGNOREMISSINGSOURCE"> <Default>1</Default> </Parameter>
<Parameter name="REPORTERRORS"> <Default>1</Default> </Parameter>
<Default>0</Default> </Parameter>
<XData name="DTL"> <XMLNamespace>http://www.intersystems.com/dtl</XMLNamespace>
<Data> <![CDATA[
<transform sourceClass='EnsLib.HL7.Message' targetClass='MyRecordMap.test' sourceDocType='2.2:ADT_A16' create='new' language='objectscript' >
<assign value='source.{MSH:MessageControlID}' property='target.PROPERTY1' action='set' />
<assign value='source.{MSH:RecevingFaciltyID}' property='target.PROPERTY2' action='set' />
<assign value='source.{MSH:SendingFacilityID}' property='target.PROPERTY3' action='set' />
.....
........
..........
The above content is just an example.
All the <action> tag from VRL XML should be converted to <assign> tag in DTL XML.

any help in this matter would be really appreciated.

Thanks in Advance!!

Discussion (4)1
Log in or sign up to continue