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' >
<![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' />
<![CDATA[ //EVN SEGMENT]]></code>
<assign value='source.{EVN}' property='target.{EVN}' action='set' />
<![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' />
<![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' />
<![CDATA[ //TXA SEGMENT]]></code>
<assign value='source.{TXA}' property='target.{TXA}' action='set' />
<if condition='target.{TXA:DocumentType} = "EPDISCH^Discharge Summaries"' >
<assign value='"DS"' property='target.{TXA:DocumentType}' action='set' />
<if condition='target.{TXA:DocumentType} = "EPHIST^H\T\P"' >
<assign value=' "HP"' property='target.{TXA:DocumentType}' action='set' />
<if condition='target.{TXA:DocumentType} = "EPOPN^Op Note"' >
<assign value='"OP"' property='target.{TXA:DocumentType}' action='set' />
<if condition='target.{TXA:DocumentType} = "EPCONSLT^Consults"' >
<assign value='"CN"' property='target.{TXA:DocumentType}' action='set' />
<foreach property='source.{OBX()}' key='k1' >
<assign value='source.{OBX(k1)}' property='target.{OBXgrp(k1).OBX}' action='set' />

0 595
Discussion (8)1
Log in or sign up to continue

Hi Graham,

please try

<assign value='source.{PID:PatientIDInternalID(1).ID}_"^^^STLMC^MR"' property='target.{PID:3(1)}' action='set' />

I think the test function works differently than the right DTL
Please tell me if it has worked.

Otherwise, try this

with the PID:PatientIDInternal(1).ID did you set the PID:3.1 please append  value in the other subfields a second step. Like this:

<assign value='source.{PID:PatientIDInternalID(1).ID}' property='target.{PID:3(1)}' action='set' />

<assign value='"^^^STLMC^MR"' property='target.{PID:3(1)}' action='append' />


<assign value='source.{PID:3(1).1}' property='target.{PID:3(1).1}' action='set' />

<assign value='"STLMC"' property='target.{PID:3(1).4}' action='set' />

<assign value='"MR"' property='target.{PID:3(1).5}' action='set' />

Yep! That mapped the MRN over. Now I just can't seem to get the source OBXs into the OBXgrp() object. 

This works when I use the test tool but not when I call the DTL from the process and rule. 


<foreach property='source.{OBX()}' key='k1' >
<assign value='source.{OBX(k1)}' property='target.{OBXgrp(k1).OBX}' action='set' />

Check if the message schema category set on your Business Service matches the schema you chose for the DTL.

What is the error message displayed in the log?

Can you tell me the values of the EnsLib.HL7.Message of the initial message. (Messageviewer)
- DocType
- DocTypeCategory 
- DocTypeSecondary
- DocTypeName DFT_P03

There is no error message but I do get a warning saying document is missing (due to the OBX segments not being there)

- DocType: 2.5:MDM_T02
- DocTypeCategory: 


- DocTypeSecondary: MDM_T02
- DocTypeName: MDM_T02

this is the Value from the Source Message?


in a 2.5 message is no primary OBX Segment but a OBXgrp.OBX 


Try to set the MessageSchemaCategory from the Inbound Service on 2.3

Thanks Armin. This was the issue. The inbound process was set to 2.3 where we needed to be using 2.5.


Appreciate your help.


  It will certainly be that your OBX's aren't at OBX (probably at OBXgrp.OBX), this is easy to confirm, hover over the OBX segment in the trace view just before the HL7 goes to the router with the rule, this will show what name the OBX is actually under.