0 Followers · 237 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 Lawrence Williams · Aug 23, 2019

I am putting together a new interface to take in a CSV file and output an HL7 message.

I have used the record mapper to create the source class and I am putting together the transform, but when trying to test it I am not seeing the data populate the HL7 as intended.

Also.... if I put a <DatofBirth> in the tester, it shows up in the HL7 as I would expect..... that's what really has me scratching my head here.

4
0 1137
Question Warren Grob · Jul 29, 2020

I am having difficulties with using the ..Strip() function in my DTL to strip the slash ( / ) from the phone number portion of an x12 834.  There are very few records that have the slash in the phone number, so I am trying to filter out any characters other than numbers so that all phone numbers are formatted 1112223333.

Here is the code portion of the strip:

       Set           HomePhone             ..Strip(source.{loop2000(k1).loop2100A.PER:CommunicationNumber},"*AW","-()/").

I am then checking the length of HomePhone.

4
0 447
Question Stephen De Gabrielle · Apr 20, 2017

Hi,

Can anyone  point me to an example of a DTL & Class method that can pull a base64 encoded PDF out of a MDMT02 message?

This is really asking for two things;

- how to make a DTL that extracts a specific subfield of an HL7 2.3 message into a message of its own,

and

- how to transform an base64 encoded document into its original binary form for writing to a file.

I'd also love to see an example of an HL7 2.n MDM^T02 ==> HL73.ITK2 non-coded CDA

I've seen some snippets in the community Q&A, but I've not been able to find any examples either here, or in the documentation or training materials. 

3
1 4004
Question Goran Stefanovic · Jul 6, 2020

I need to set and use some context variables in a transformation (written in DTL), but the code is manually written.

When writing the same as BPL I define context variables and they are visible in transformations called by that process.

In something like this my.DTLtransform sets HL7 message fields to values in context variables:

Set dtl = ##class(my.DTLtransform).%New()
Set qStatus = dtl.Transform(pRequest, .msg)
 

However, when I create a business process using custom code option, I don't see an obvious option, as well as documentation covering that area.

11
1 931
Question Jonathan Anglin · Jul 7, 2020

As I've become a little more familiar with HealthShare, I'd like to start exploring different ways of doing things. To date, the bulk of my data transformations have been using DTL; only using ObjectScript for a few operations that write to external SQL tables that were largely based on examples provided by my sales engineer.

4
0 446
Question Craig Regester · Jun 17, 2020

Good day all -

I am attempting to use the Data Transformation Builder (for ease of use for my other engineers) to build up a web service request object to send to an outbound operation. The source is a custom persistent class (extends Ens.Response, %JSON.Adaptor) and has serialized sub-class data elements and the request object is a custom persistent class (extends Ens.Request, %JSON.Adaptor.)

5
0 612
Question Ting Wang · Jun 12, 2020

Hi Everyone,

We are trying to migrate old server to new infrastructure and need to sync all the DTL cls from old one to new one. There are hundreds of DTL in system and we tried to export from production but cannot select all at once which might cause some missing classes. Not able to connect to studio or atelier with that server neither. Is there any way that we are able to do mass export from system which will save some effort? Please let me know your thoughts. Thanks.

3
0 263
Question Viroj (Pat) Padyandorn · Jun 11, 2020

Hello,

In the DTL, is there a way to set a value for the HL7 data element in the code section?

For example,
set target.SetValueAt("PID:3(k1).1)") = mrn (mrn is the value returned from the SQL query)

When I ran the test utility, I got this error message.

ERROR ErrException: zTransform+27^testclass.TEST.1 *SetValueAt,EnsLib.HL7.Message -- logged as '-' number - @' set target.SetValueAt("PID:3(k1).1)") = mrn'

I tried both target.SetValueAt("PID:3(k1).1)") and target.GetValueAt("PID:3(k1).1)"). That didn’t make a difference. The code still error out.

Thank you in advance for

3
0 1178
Question Curtis Rambaransingh · Apr 20, 2020

- Currently we are receiving one NTE (See Below) from the source system

NTE|1|Result Comment|TESTING:\.br\\.br\This is a test results.  \.br\\.br\This test is a Test.

- We would like to create multiple NTE segments and send to destination system by using ".\br\"(Line Break)

NTE|1||TESTING:

NTE|2||

NTE|3||This is a test results.

NTE|4||

NTE|5||This test is a Test.

Bit we are running into compile issue on the code block.  NOt sure if there is a better way to do this.  Any help is greatly appreciated.

code:

1
0 461
Question Jack Smith · Oct 27, 2019

We have a data transformation where source is object collection (populated from a json file)  and target is EnsLib.EDI.XML.Document.

If source file is large enough, transformation fails and we get <store> error and I quickly found this:

https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=EBPLR_DTL_foreach which at the bottom in "Avoiding <STORE> Errors with Large Messages" section tells to: 

1
0 520
Question Nauris Gruduls · Mar 12, 2020

In my Data Transformation, the Target class needs to create a new List of objects (ListOfObj), depending on some conditions of Source class (Source/Target are completely distinct/different classes).

I experimented with Lists of 'primitive' data types (ListOfDT), and I could add new %String items (as an example) to a List of %String property, with "append" action in DT.

Does anyone have an example, or guidance, how to create new Lists of Objects in data transformation?

For example, if I have a 'container' class like this, it works:

2
0 922
Discussion Jeffrey Drumm · Feb 7, 2020

I'm not sure what the purpose of this is, but the Management Console causes the browser to refresh periodically. If you're in a form or an editor such as the DTL or Routing Rule editors, you may lose work unless you save frequently. This did not occur in Caché 2018 and earlier releases.

I've had a couple of incidents where I've created a number of rules in the DTL editor, answered the phone or stepped away for a few minutes, then come back to find any work since the last save erased.

I've noticed this in both 2019 and 2020 releases of IRIS.

Heads up!

4
1 575
Announcement Amir Samary · Jan 29, 2020

Hi everyone,

I am very pleased to announce that the Readmission Demo has been released as open source. Many thanks to the Solution Factory team that worked hard on making this possible.

Here are the changes:

0
2 589
Question Martin Browne · Nov 4, 2019

Hi,

I’m working on a project to add specific PID data to an ORU_R01 message by querying our patient system and adding it to the ORU. Here is what I have 
managed to do thus far:
 
-    Received ORU_R01 message
-    Created Q21 message using the PID data included in the ORU message and sent to patient system to query.
-    Received a K21 message with the required PID data
 
I’m stuck at this point now. I want to add a specific piece of the K21 PID data (highlighted below) to the original 
ORU_R01 PID and was hoping you would be able to assist. 
 

3
0 476
Question Jens Salecker · Jan 13, 2020

I have to write a DTL with the Data Transformation Builder to convert messages from HL7 ORU R01 v2.1 to HL7 ORU R01 v2.5. The incoming messages contain a text in OBX-5. This text contains LF characters (only LF - Segment separator is CR). Therefore it is not possible to parse the incoming message. While testing the transformation the OBX Segment ends at the first occurence of LF. Is there a way to replace the LF character before parsing?

example:

source:

OBX||FT|ltest1|| first line 

 second line

 …

 last line

||||||F|

target:

now:            OBX||FT|ltest1|| first line

3
0 990
Question Paul Hula · Dec 5, 2019

Hi,

   I've heard from two different sources the SMP (or parts of it) and for sure the DTL front end (in studio? via SMP?) have been rewritten to be more modern.  But on a latest IRIS Community download everything looks the same to me.  Am I missing something or is this Marketting Spin?

  Hopefully I won't get banned for this post aswell......

2
0 377
Question ED Coder · Oct 30, 2019

Hi,

I am trying to add an OR condition in the DTL but not able to. Sorry if this is a silly question, but can you advice?

I want to add a condition where if source.45 is "" or "..." then map "" to the target. But I am not able to add the OR condition

Currently I have as below

What will I need to do to add an "OR" condition to the DTL?

Would appreciate your guidance

Regards,

ED

2
0 1160
Question Scott Roth · Oct 30, 2019

I must be missing something. We have done encoded PDF's in the past with the Encoded PDF in OBX.5.5. When I have used this code in the past I was only working with 1 OBX, but I have a case where I am having multiple OBX's and having to loop through them and I am renumbering the outbound OBX.

1
0 627
Article Alberto Fuentes · Oct 23, 2019 2m read

Would you like to be sure your data transforms work as expected with a single command? And what about writing unit tests for your data transforms in a quick and simple way? 

When talking about interoperability, there are usually a lot of data transforms involved. Those data transforms are used to convert data between different systems or applications in your code, so they are running a very important job.

Testing strategies

2
1 910
Question Leon Wilson · Sep 4, 2019

Hi Community,

I am trying to remove a duplicate OBX from a result, but I am running into some issues. Let me explain.

First I had a OBX where the observation Value had the blood type in it and the following OBX had the result in it.

The clients wants the blood type and the result in one field. therefore I merged / concatenated the observation values of the two OBX's.

I tried removing the OBX:2 but just cant take the whole segment out. 

please see examples below

This is the result.

This is the concatenation of the two OBX's

Trying to remove the Negative OBX / Result in the Observation value

 

4
0 731
Question Warren Grob · Sep 30, 2019

How do I manipulate a string in Ensemble DTL (X12 document) to extract a string starting from the right, or end, of the string?

I need to have 10 digit phone numbers, however some of the source data records include the "1" for the long distance dialing and I need to exclude this.

I have tried using Right(), SubStr(), and even SubString(string,*,-10) but it will not compile.

I find it hard to believe that Ensemble does not have the ability to read a string from the right. 

Thank you for any assistance.

5
0 475