Published on InterSystems Developer Community (https://community.intersystems.com)

Home > Why does my DTL test tool work perfectly but my DTL only half works when used by the process?

Question
Graham Uricchio · Apr 4, 2017

Why does my DTL test tool work perfectly but my DTL only half works when used by the process?

I created a DTL to do HL7 mapping. The test function in the tools works the DTL perfectly but when used by the rule in my business process, the OBX segments are stripped and the MRN is gone. The assigning authority and ID type are added into the PID but the actual patient MRN is blank (3.1 value).

 

Here is the source code. 

 

<transform sourceClass='EnsLib.HL7.Message' targetClass='EnsLib.HL7.Message' sourceDocType='2.3:MDM_T02' targetDocType='2.5:MDM_T02' create='new' language='objectscript' >
<code>
<![CDATA[ //MSH SEGMENT]]></code>
<assign value='source.{MSH}' property='target.{MSH}' action='set' />
<assign value='"STLMC"' property='target.{MSH:SendingFacility}' action='set' />
<assign value='"2.5"' property='target.{MSH:VersionID}' action='set' />
<code>
<![CDATA[ //EVN SEGMENT]]></code>
<assign value='source.{EVN}' property='target.{EVN}' action='set' />
<code>
<![CDATA[ //PID SEGMENT]]></code>
<assign value='source.{PID}' property='target.{PID}' action='set' />
<assign value='source.{PID:PatientIDInternalID().ID}_"^^^STLMC^MR"' property='target.{PID:3()}' action='set' />
<code>
<![CDATA[ //PV1 Segment]]></code>
<assign value='source.{PV1}' property='target.{PV1}' action='set' />
<assign value='..Lookup("GHHC_STLMCPatientClass",source.{PV1:PatientClass})' property='target.{PV1:PatientClass}' action='set' />
<code>
<![CDATA[ //TXA SEGMENT]]></code>
<assign value='source.{TXA}' property='target.{TXA}' action='set' />
<if condition='target.{TXA:DocumentType} = "EPDISCH^Discharge Summaries"' >
<true>
<assign value='"DS"' property='target.{TXA:DocumentType}' action='set' />
</true>
</if>
<if condition='target.{TXA:DocumentType} = "EPHIST^H\T\P"' >
<true>
<assign value=' "HP"' property='target.{TXA:DocumentType}' action='set' />
</true>
</if>
<if condition='target.{TXA:DocumentType} = "EPOPN^Op Note"' >
<true>
<assign value='"OP"' property='target.{TXA:DocumentType}' action='set' />
</true>
</if>
<if condition='target.{TXA:DocumentType} = "EPCONSLT^Consults"' >
<true>
<assign value='"CN"' property='target.{TXA:DocumentType}' action='set' />
</true>
</if>
<foreach property='source.{OBX()}' key='k1' >
<assign value='source.{OBX(k1)}' property='target.{OBXgrp(k1).OBX}' action='set' />
</foreach>
</transform>

#Business Process (BPL) #Business Rules #DTL #Mapping #Ensemble

Source URL:https://community.intersystems.com/post/why-does-my-dtl-test-tool-work-perfectly-my-dtl-only-half-works-when-used-process