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 Kyle M · Sep 17, 2020

Hi

Newbie question. Could you please help me implement the following using DTL only - no programming. 

We have a problem where our system sends longer addresses e.g. block of flats in an unexpected format

e.g. address below:

Flat 22 Kings Court

49 Kings Road

Gateshead

NE10  8AW

 

Would be sent as

Flat 22^Kings Court^Gateshead^""^NE10  8AW^GBR^HOME^49 Kings Road^

 

With Road being sent right at the end after the post code and country etc. Shorter addresses are OK.

I need to have a logic which would clean it up and move these values around to have the following:

 Flat 22 Kings

3
0 467
Question Scott Roth · Jun 19, 2017

I have come across several cases where I need to set a Date filter to send only send any admit/scheduled date past a certain point. We have a couple different date comparison functions but none looking at the true date. Most of them are date + 15 or etc. Does anyone have a good date function they have written to say if x > 20170102 ?

Thanks

Scott

14
0 2466
Question Nigel Salm · Dec 3, 2019

I need to add some extensions to the HS.FHIR.vSTU3,Model.Resource.Patient class and then use those extensions to convert incoming FHIR JSON to the FHIR Patient Resource and Likewise add functionality to create A FHIR Patient (target class) from my patient database into the FHIR Patient  Resource Object (target class)

many months ago I found a tutorial that explained all of this but can no longer find that tutorial.

Yours

Nigel Salm 

3
0 757
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 1171
Question Adam Marsh · Aug 5, 2020

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>thm

4
0 656
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.

     1.  If it is less than 10 characters (not a full phone number),

4
0 485
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 mater

3
1 4074
Question Melyssa St-Hilaire · Jul 10, 2020

We have a bunch of CSV files of a few different types, which contain patient and medication data, among other things, which we need to load into Healthshare, so the information can be compiled together and then viewed from the Clinical Viewer/reports made on the data as well.

I cannot find a straightforward example or any documentation about this particular case, which I would expect to be fairly common. All I could find was this: Using a Record Map in a Production When you choose to generate an object class on the Record Mapper page, you create a class that you can use in a business service


3
0 725
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 982
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.

I'd like to trying doing all of the data transformation in a process using ObjectScript. This would be a much closer approach to my experience doing transforms using JavaScript in our other interface engine, and I think using this as a method to better learn the idiosync

4
0 477
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.)

When attempting to use a for each on one of the serialized properties of the source object, the for each works (source.Items()) but when I get into inspecting, via a conditional, the items within, it

5
0 646
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 284
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 yo

3
0 1227
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:

 set iTotCnt=$L(sNTE,"\.br\")
 for i1=1:1:iTotCnt d
 . s sTmp=$p(sNTE,i1)
 . s t

1
0 489
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: 

"As you loop over segments in a message or object collections, they are brought into memory. If these objects consume all the memory assigned to the current process, you may get

1
0 543
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:

Class Json.SalesOrderContainer Extends (%RegisteredObject,%



2
0 940
Question Yone Moreno · Feb 14, 2020

Hello,

We need to convert this structure, where we observe empty component separators "^":

MSH|^~\&|sistemaExterno|anonymized^anonymized|anonymized|anonymized|anonymized||RSP^K22^RSP_K21|anonymized|P|2.5^&^&|1||AL|AL||ASCII
MSA|AA||AA
QAK||OK
QPD|Q22^^Find Candidates||anonymized
PID|1|anonymized^1^^^^^^^^|35018^^^anonymized^PI^^^^^~anonymized^1^^TISR^HC^^^^^~292213^2^^12^JHN^^^^^~6339140^^^MPI^CIP^^^^^~""^^^MI^PPN^^^^^~""^^^MI^NNESP^^^^^|292213^^^^^^^^^|ApellidoUno35018^Nombre35018^^^^^^^&^&^^&^&|ApellidoDos35018^^^^^^^^&^&^^&^&|19541111000000|M|||""&AVDA EL PUENTE 64PLB4B&""^""^380374^38^38700^


4
0 1005
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 597
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:

  • It is now running on top of IRIS Community 2019.3.0.308.0.
  • It has synthetic data based on Synthea instead of the real data we were using before. But the machine learning models are 100% real
  • Image RRLACESrv has been renamed to “image-riskengine”
  • Image “readmissionsrv” has been renamed to “image-risksrv"
  • We refactored a lot of the code on image-riskengine to look better. Expect
0
2 611
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. 
 

I am doing this using Studio. I want to avoid using a B

3
0 500
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

expected:  OBX

3
0 1030
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 399
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 1202
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.

<code>
<![CDATA[ // OBX]]></code>
<assign value='1' property='varOBXindex' action='set' />
<assign value='1' property='varOBX1' action='set' />
<foreach property='source.{ORCgrp(1).OBRgrp(1).OBXgrp()}' key='k1' >
<if condition='source.{ORCgrp(1).OBRgrp(1).OBXgrp(k1).OBX:ValueType}="ED"' >
<true>
<assign value='



1
0 653
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

Having a look at the concept of Test Pyramid and some articles about it, we can have a quick idea that having a solid base of low level cheaper automated tests is a bett


2
1 941