6 Followers · 241 Posts

Ensemble supports Data Transformation Language (DTL) for describing data transformations. DTL is an XML language. Ensemble provides wizards and graphical tools for creating, editing, and testing DTL transformations. A data transformation is a Caché class like the following. If you prefer you can use Studio to edit the class definition directly and bypass the wizards and graphical tools.

Documentation.

Question Marcus West · Feb 3, 2022

I'm required to do a transformation around patient physical addresses.  If (for whatever reason) a patient has multiple addresses, I want to move the home address to the first iteration of PID:11 and remove all other iterations.  I've accomplished the first bit using DTL, but for patients who have multiple addresses they are left with empty trailing iterations.  Here is an example I mocked up:

How can I remove those trailing iterations?

This is part of the DTL I've written to do my transformation:

<foreach property='target.{PID:PatientAddress()}' key='i' >
<if condition='source.{PID:Patien

2
0 411
Article prashanth ponugoti · Jan 26, 2022 2m read

Requirement: Transform source XML message to target JSON.

step1: First create json equivalent xml from any online tool.

step2: use add in  studio utility create persistent classes from json equivalent xml and compile it , now target persistent classes are ready

step3: Do the above step for source xml or xsd and generate persistent classes for source and compile it

step4: complete the DTL by selecting root node from source, target persistent classes and complete the mappings and compile it

step5: use the below code to apply Transformation on source XML string and create Target JSON

Assume










0
0 454
Question prashanth ponugoti · Jan 24, 2022

Hi Community,

I have created persistent classes for source, target XSDs and completed DTL. When I tested in DTL window by passing source xml it is generating below target xml as result.

DTL result:

<root>
  <CaptureSource>2</CaptureSource>
  <Document>
    <Description>1235@TEST.COM.Message.ReportType</Description>
    <EventDate>1489@TEST.COM.Message.EventDateZ</EventDate>
    <ExternalSystemId>1213@TEST.COM.Message.ReportID</ExternalSystemId>
    <FileContent>1142@TEST.COM.Message.TextBlock</FileContent>
  </Document>
</root>
 

Here I am expecting value of source xml , but it is showing reference

1
0 204
Question Jonathan Anglin · Jan 6, 2022

Problem to Solve: When an HL7 message hits a particular Process, I need to use the placer order number therein to query the messages that came in over the last 24 hours on a particular Service and grab discrete pieces of data that came in the latest message that has that placer order number.

The code I'm (currently) using looks like this:

<assign property='FullMessage'     action='set' value='"PID||TEST"' />
<sql>
    <![CDATA[SELECT Full_Message INTO :FullMessage, head.ID As ID, {fn RIGHT(%EXTERNAL(head.TimeCreated),999 )} As TimeCreated,
head.SessionId As Session,
head.Status As Status
4
0 791
Question prashanth ponugoti · Jan 6, 2022

Hi Friends ,

We have requirement to convert source hl7 message to target json message using dtl.

Currently I have created persistent cls for json and completed the dtl.

DTL giving output as json equivalent xml.

Now how to convert DTL result xml object to json?

set oStream = ##class(%Stream.GlobalCharacter).%New()
set json = pResDTLresponseXml.%ToJSON()
set tSC = ##class("%ZEN.Auxiliary.altJSONProvider").%WriteJSONFromObject(pResDTLresponseXml,.json)
set tSC = oStream.Write(json)
if $$$ISERR(tSC) $$$LOGERROR("Error convert dynamic object to JSON stream: "_$System.Status.GetOneStatusText(tSC))
$

1
0 630
Article Brendan Batchelder · Jun 8, 2016 2m read

DTL Transformations and GetValueAt/SetValueAt calls on HL7 messages will truncate any fields longer than 32K.  To avoid this, the methods GetFieldStreamRaw and StoreFieldStreamRaw must be used when dealing with fields that might be larger than 32K.  OBX:5 is a frequent example.  These methods have some subtleties and must be used carefully.

This can't be done by simply dragging from left to right in a DTL.  It must be done with a code action.  Also, the StoreFieldStreamRaw call must be the last edit made to the segment because the segment becomes immutable after that.

StoreFieldStreamRaw tak

6
6 2945
Question Scott Roth · May 20, 2021

We are seeing ERROR #5002: Cache error: <MAXSTRING>zSaveData+14 ^EnsLib.HL7.Segment.1 come up on a Routing rule when we are trying to Encoded PDF's through a DTL. In the DTL we are copying source to target. Is there a limitation on trying to copy source to target? 

At the bottom of the DTL you are see that we commented out converting the Encoded PDF to a Stream, is it recommended that we always use %Stream anytime we are dealing with PDF's?

Thanks

Scott

4
0 914
Question Adam Trahan · Nov 8, 2021

I have an incoming data partner who occasionally passes a non-ASCII character in some free text fields which is causing some downstream systems to be unable to accept the message. Ideally I'm looking for some way to just process the entire message as a data transformation applied in the business rule, as we already have a pre-processor transform to remove the PD1 segment. 

ClassMethod Transform(pRequest As EnsLib.HL7.Message, Output pResponse As EnsLib.HL7.Message) As %Status
{Set $ZT="Trap",tSC=$$$OK
  Set pResponse = pRequest.%ConstructClone()
 
//Clearing PD1 segment from the message
set ind

4
1 949
Question Chip Gore · Oct 29, 2021

In specifying a "WHEN" condition statement, I don't seem to be able call a function directly from this declaration, as the generator seems to get confused

In the graphical editor:

%request.GetValue("MRN"))=123453

(%request.GetValue("MRN"))=123453)

In the DTL directly: 

<when condition="(%request.GetValue(&quot;MRN&quot;))=123453)">

<when condition="(%request.GetValue&#40;&quot;MRN&quot;&#41;)=123453)">

But they all fail at the same point, where the opening "(" of the method call completely confuses the generator, and these all throw the same error:

ErrParsingExpression: Error parsin

2
1 424
Question Sylvie Greverend · Jun 30, 2021

Data transformations can be changed in Management portal, but the modifications are not synced with visual studio code. Classes are synced from VSCode to Iris. VSCode can take care of the git repository.

I am curious to know how people are developing data transformations on Iris with VSCode? Are you editing the DT classes with VSCode and forget about the UI? Are you exporting from management portal the files to VSCode directory? Are you using a source control hook?

Thank you

1
0 730
Question Warren Oyco · May 20, 2021

I am working on tweaking our current patient load process. The roster input is in text pipe delimited format, parsed out and transforms it to a standard HS.Message.PatientSearchRequest, and send to business process for patient matching. Result is transformed into a standard ADT HL7 message using EnsLib.HL.Message class. I would like to know if there is another class I can use that will transform my output to a text flat file pipe delimited instead of HL7 format? any advice on how to do this is greatly appreciated.

Thanks!

2
0 528
Question Otto Medin · May 27, 2021

Hi all,

I'm looking for a user-friendly way to make a method library available in DTL, and by user-friendly I mean via '..MyMethod()' or '$$$MyMacro()' rather than  '##class(MyPackage.MyClassName).MyMethod()'.

Does anybody know of a way to add a second superclass or a set of macros to a DTL ... or some other trick?

Cheers,

Otto

2
0 265
Question xiong shizheng · May 24, 2021

您好,我想问一下为什么我无法通过Iris中的内置转换模板将从HAPI-FHIR服务器下载的患者资源转换为SDA格式。它总是表明缺少某个默认值,或者这就是我们需要更改格式吗?我想问一下我们如何快速创建自己的映射,以及如何通过json将所需的数据转换为sda并将其存储在iris中,然后我们可以通过齐柏林飞艇进行调用,非常感谢您解决我的问题问题

Transaltion for the question:

Hello, I would like to ask why I am unable to convert patient resources downloaded from the HAPI-FHIR server to SDA format via the built-in conversion template in IRIS. It always indicates that some default value is missing, or is this the format we need to change? I would like to ask how we can quickly create our own mapping and how we can convert the required data to sda via json and store

1
0 374
Question Mary George · Apr 1, 2021

Does anyone know how to disable the auto-refresh in Healthshare, especially for Message viewer , Business process designer, DTL editor pages?  

These pages in management portal refresh every 15min( i.e. as per the session time out setting) . I tried to  set the following two configs to disable the auto refresh but both had no impact. 

set ^EnsPortal("DisableInactivityTimeout","Portal") = 1
set ^%SYS("Portal","EnableAutoRefresh") = 1

 

Thank you for your help. 

Mary

8
0 948
Question Martin Browne · Feb 3, 2021

Hi,

I have a PV1 repeating field that can contain multiple or a single value. I'd like to always pull the last value in the field but am not sure how to configure this in my DTL.

The repeating field is in PV1:50().1

Could somebody shed some light on this?

Examples:

|15081942~15081951~15108961~15280550|

|15081947|

|15081939~15081940|

Thanks

5
0 453
Question Scott Roth · Jan 13, 2021

I have a case where our EMR is sending data, but not all the values needed for the Ancillary are valued properly and causes that message to error/halt processing on the Ancillary system, not ideal but its what they do. I would expect them to still process the message except that 1 field, but they don't.

I want to add validation to make sure certain fields are valued correctly for the Vendor. 

So I add some statements to take those items that don't pass this validation out to a batch file with headers.

But I want to email out that batch file. How could I have the Email Operation validate tha

9
0 1124
Question Scott Roth · Dec 7, 2020

I have a case where I need to look up the NPI provider against an External MS SQL database to retrieve our Provider Identifier to send to a downstream system. In the past I would use a Business Process (BPL) to connect to the outside MS SQL via JDBC and get that information for me. But I was thinking instead of creating a BPL process to do this, would it be better just to link to the outside MS SQL database table to retrieve the information in a SQL statement within a DTL?

So it is better to link to an outside database via a Linked Table wizard? or Use a BPL to retrieve the necessary data req

3
0 389
Question Ingo Steiger · Nov 11, 2020

Hallo, I need a Ensemble transformation to fill up a 6 or 7 digit Number to a 10 digit string with leading zeros.

123456 --> 0000123456

1234567 --> 0001234567

Thank you!

4
0 841
Question Paul Hula · Nov 2, 2020

Hi All,

  I know hundreds of people have done this but I'm looking for some DTL's as a start to do HL7 to FHIR, I appreciate everyone's HL7 is slightly different, but just some starter DTL's would be much appreciated?  Can anyone help?

  Regards

2
0 604
Question Scott Roth · Oct 8, 2020

Someone may have asked this before but is there a way to return the TRACE statements that we have placed in the Data transformation within the DTL Editor Testing Tool (EnsPortal.Dialog.TestTransform.cls)?  Is this something we can get in an Enhancement request in for? 

It would save sometime in troubleshooting where an error might be in the DTL.

Just wondering...

Thanks

Scott

Cache for UNIX (IBM AIX for System Power System-64) 2018.1.3 (Build 414U) Mon Oct 28 2019 11:24:02 EDT [HealthShare Modules:Core:15.032.9026 + Linkage Engine:15.032.9026]

1
0 357
Question Kyle M · Sep 21, 2020

Hi all

Another newbie question.

A small percentage of our patients have an extra hospital number which was imported from the previous PAS but is no longer in use. We only need to send MRN and NHS number and would like to suppress CMRN. Could you please advise me how to do it in DTL?

PID|1|E05088888^^^RTPMRN^MRN^CD:14248745|00550972^^^RTPCMRN^CMRN^CD:4528185~E05088888^^^RTPMRN^MRN^CD:4528185~4449999999^^^NHSNBR^NHSNMBR|

5
0 530