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 isabella Barnes · Apr 24, 2024

#Mapping
@Jenna Makin 
@Ashok Kumar T 
@AndreClaude Gendron 
@Saul Bloom 
@Anthony Filaski
Folks,

I need help mapping following JSON elements with HS.SDA3 Container. Could you please share if you have any mapping details.
Source ------->Target (SDA3)
Medication (Custom Persistent class with HS.SDA3.Medication)
Procedure(Custom Persistent class with HS.SDA3.Procedure)
Referral (Custom Persistent class with HS.SDA3.Referral)
Appointment (Custom Persistent class with HS.SDA3.Appointment)
Immunization (Custom Persistent class with HS.SDA3.Vaccination)
Diagnosis (Custom Persistent class with HS.SDA3

4
0 259
Question Yuhong Snyder · Apr 25, 2024

We are using the IRIS cloud. and I am working on a DTL .

so the source side timestamp is  local time for example 20240110134740,  I know it is a local time. so the requirement is I need to append the UTC at the end, like -0400 or -0500 depending on if it is daylight saving time.  

so is there function to return if current day is at daylight saving time, so I can decide if I need to append the -400 or -500? or a function to return the current UTC by location? 

3
0 203
Article Oliver Wilms · Dec 1, 2022 1m read

I participated in InterSystems Women’s Health FHIR contest, because I loved the challenge to learn a new-to-me technology. I wanted to develop an app that receives data from a mobile device like my Fitbit or a Smart Watch. I did not get access to such data except when I downloaded a spreadsheet (CSV file) showing my daily steps and sleep data. I saw in iris-fhir-template it imported some patient data to a FHIR server. I figured out how to use a Data Transformation to transform a record from a delimited file into FHIR data which I could store into the FHIR server.

You can see an online demo of

1
0 408
Question Jonathan Anglin · Jun 2, 2020

Hello All

I'm not sure what the best practice is for this. I have a DTL for returning ORUs back to a hospital in a different time zone. They have requested that various timestamps have the time zone offset added to the HL7 format (%q%k, I think). First, I just wanted to be sure the system was aware it was DST. I was able to determine if DST is in effect like this:

<assign property='tzOffset' action='set' value='"-0500"' /><code><![CDATA[ SET dst=$SYSTEM.Util.IsDST()IF dst=1 {SET tzOffset = "-0400"}]]></code><assign property='target.{MSH:7}' action='
5
0 988
Question Smythe Smythee · Feb 17, 2024

Hi Community,

Is there a way to call HL7 Data transformation directly from Business service without using Rule functionality in the production

In this scenario i need to call a data transformation in directly in business service and give the transformed message to Business operation 

Please share if you have any ideas to implement this.

Thanks,
Smythee

6
0 296
Question Nimisha Joseph · Dec 6, 2023

Hi there,

I'm working on a project where I retrieve RawHL7 message(ORU R01 2.3.1) content from a database in a BPL. I've created a context object of type Enslib.HL7.Message, and I need to populate it with the contents from the RawHL7 message so that I can use this context object as source for my DTL transformation.

Does anyone have suggestions on the best approach to achieve this? I'm looking for guidance on how to efficiently transfer the data from the RawHL7 message to the context object.

Thanks in advance for your help!

3
0 653
Article Muhammad Waseem · Oct 15, 2021 2m read

In this article I will demonstrate the following :

  • Update ReferencesRange(OBX:7) against ObservationIdentifier(OBX:3.1)[TestCode] from database by using custom utility function
  • Update Abnormal Flag(OBX:8) against ObservationIdentifier(OBX:3.1)[TestCode]  and ObservationValue(OBX:5)[Result] from database utility function
  • Route Message based on Abnormal Flag(OBX:8)

Below is the primary and transformed HL7 2.5 ORU_R01 message:
 

Step 1: First of all we need to save reference ranges in database, for this I used TestRanges Persistent class:
Step 2 :We need to create a custom function to get



6
0 1001
Question Mark OReilly · Jan 16, 2024

Does anyone have any trick to get the raw text out whenever you run a DTL test in the DTL editor? 

If not is there any plans to add this to a later version? It would help certain workflows where you just want to run a transform in the DTL to then copy and paste the message to send into a test on the operation. I am aware you can set up a file and rule to then go out to a file or operation but seems like additional workflows when there are scenarios you just want a quick copy of the message text after doing transform. Other messages you can add &RAW=1 a button for Raw or just an additional raw

2
0 258
Question Scott Roth · Jan 13, 2024

Within a DTL is it possible to access and update the Message Header properties of an EnsLib.HL7.Message?

Currently we have multiple EMR Services for each environment sending to 1 Business Process to Normalize the data, then it is sent to another Business Process to route the data. 

Since the SourceConfigName changes with every send to a Business Process, I am looking for a way to maintain the SourceConfigName of the SessionID so I know how to direct the message. Whether I pull the SourceConfigName into a field not being used in the HL7 Message, or I set another Header or Body property to the

7
0 678
Question Conor Browne · Nov 17, 2016

Hoping someone can help,

I have the "Sample FHIR Production" installed ( as described in the documentation) with the following Components:

Service: HS.Gateway.ECR.SDA3XMLFileService

Processes: HS.FHIR.FromSDA.DTL.Transaction.Process

Operations: HS.FHIR.Repository.Operations

When a patient's data gets updated in my application a new SDA3 message is generated and processed by the FromSDA DTL. The Repository Stores that data as a New patient ( i.e. when I query the Repo they have different IDs "resource":{ "resourceType":"Patient", "id":"4", ) . How do I get the record in the Repository to update rath

5
0 1086
Question Lewis Houlden · Dec 11, 2023

Hi all

I'm having trouble defining the mapping needed to take the very large base64 string in OBX:5.5, and map it to an XML virtual document property that supports Stream.GlobalCharacter. I know from within the DTL you have to use custom code to manage the segment due to its size. 

do target.StoreFieldStreamRaw(.stream,"LetterAttachment(1).Base64EncodedFile(1)", .rem)
 set tObx14Value = $piece(rem,"|",10)
 set convertedDate = ##class(Phu.Shared.Util.DateTime).ConvertHl7DateTimeToXmlDateTime(tObx14Value)
 do target.SetValueAt(convertedDate,"DocumentDetails(1).AuthoredDate(1)")
 do target.SetValu

4
0 436
Question Andy Khemraj · Dec 1, 2023

I am trying to replace OBX.2 value of ED to PDF

Here is what I have in the funcion wizard

..ReplaceStr(source.{OBRgrp().OBXgrp().OBX():ValueType},"ED","PDF")

Inbound Message

OBX|5|ED|PDFReport^PDFReport||PDF^Image^PDF^Base64^JVBERi0xLjMNCjEgMCBvYmoNCjw8DQovVHlwZSAvQ2F0YWxvZw0KL1BhZ2VzIDQgMCBSDQovT3V0bGluZXMgMiAwIFI

Desired Outbound Message

OBX|5|PDF|PDFReport^PDFReport||PDF^Image^PDF^Base64^JVBERi0xLjMNCjEgMCBvYmoNCjw8DQovVHlwZSAvQ2F0YWxvZw0KL1BhZ2VzIDQgMCBSDQovT3V0bGluZXMgMiAwIFI

1
0 320
Question Chris Lambert · Nov 30, 2023

This question originally appeared in the comments of the post: Making use of Multiple Sub Transforms in a main map || HL7
 

I'm having a similar problem trying to get PRD(1) into PV1:ReferingDoctor and PRD(2) into PV1:ConsultingDoc
Running the subtransform will populate referring doctor for the first PRD, and then the second running will delete the PV1, make a new one with only the consulting doctor populated.

Was hoping I could use a subtransform to populate the information, but looks like it has to be done at the transform level.

1
0 249
Question Thom de Groot · Nov 15, 2023

Hello,

For a particular problem we were trying to parse a relatively large *.csv file with a recordmap. We are doing this from a BPL where we start with a REST call to acquire the file. This file needs a slight transformation which we tried in a DTL. However DTL's seem to be incapable of parsing larger files. 

We see two different alternatives: The first one to write custom code to parse the file. And the second option to write SQL queries and to write the output to a csv file.  We were wondering what the best practice for parsing larger files, transforming the data, and filter the data to d

7
0 563
Question isabella Barnes · Nov 16, 2023

Can someone share some details for creating a  pipeline for converting CCDA (XML) document into Flatfile or CSV File using IRIS.

@Marc Mundt 
@David.M 
@Paul Lomayesva

Could you please help me out identifying the inbound and outbound adapters along with the DTL process for converting CCDA into CSV Files.


Thanks in  advance!!
Isabella

3
0 529
Question Ewan Whyte · Nov 2, 2023

I am receiving a FHIR bundle and I need to extract data from it and wondered if there was an easier way of doing this rather than looping through the data as suggested in Working with FHIR Data | FHIR Support in InterSystems Products | InterSystems IRIS for Health 2023.2.

Ideally it would be great if there was a DTL the accept STU3 and then extract the data from there and I did try using the HS.FHIR.DTL.vSTU3.Model.Resource.Bundle class (depreciated) but that only allowed me to see the data at the bundle level and not the resources within it (entry). Is there a way to get that resource data

3
0 867
Question Adrian Howe · Oct 16, 2023

Hello,

I have a problem attempting to store a base 64 encode stream into the OBX:5 field of a HL7 message, by using the StoreFieldStreamBase64 method.

I'm using a transformer to input the contents of a pdf within a stream container (Ens.StreamContainer). The output is a HL7 message (EnsLib.HL7.Message 2.5:ORU_R01).

The transformer is being used in a business process.

This is the code used in the transformer to encode the stream to base 64:

Try {
     Set pdfStreamObj = source.StreamGet()
   } Catch {
      Quit
   }

 //Set PDF stream object into OBX:5
   Set status = target.StoreFieldStreamBa

2
0 533
Question Michael Wood · Sep 18, 2023

I am mapping a field to the FHIR Location resource field address.line.  Using message class HS.FHIR.DTL.vR4.Model.Resource.Location

The line field is repeating

I set field as such,

This causes the error,

ERROR <Ens>ErrException: <INVALID OREF>zTransform+71^AH.AHEDSLPFD.Transforms.ReltioEntityToPFDFHIRLocation.1 -- logged as '-' number - @' If 'tIgnore { Set tSC=target.address.line.SetAt(zVALz,(1)) }'

Any suggestions on how I can format the target?

2
0 313
Discussion Luis Angel Pérez Ramos · Sep 11, 2023

I usually receive complains from our customers about the BPL and DTL web pages automatic refreshes, it's a common problem among newbies users but for veteran developers too, they forget to save the changes regularly and automatically the web page is reloaded, losing all the work done.

Maybe an autosave would fix this problem that produces a deep feeling of hate and resentment against InterSystems technology among our customers. I've added an idea in our portal, so feel free to vote it!

https://ideas.intersystems.com/ideas/DPI-I-452

12
0 337
Question Smythe Smythee · Sep 11, 2023

Hi Community,

I have SDA file as Ens.StreamContainer Message using pRequest As Ens.StreamContainer

SDA file structure looks like this 

<Name><FamilyName>Lucy</FamilyName><GivenName>Hale</GivenName><MiddleName>Park</MiddleName></Name><Gender><Code>F</Code><Description>F</Description></Gender><BirthTime>2023-09-07T00:00:00</BirthTime>

How can i change individual value from the Steam and then save changed value into the stream?

3
1 969
Question Smythe Smythee · Aug 23, 2023

Hi Community ,

I am using %Date Property for defining one csv source message class .Please refer below class

Class CSVtoHL7.Inputfile.Record Extends ,(%XML.Adaptor, Ens.Request, EnsLib.RecordMap.Base) [ Inheritance = right, ProcedureBlock ]

{

Property ID As %Integer;

Property LastName As %String;

Property FirstName As %String;

Property MiddleName As %String;

Property DOB As %Date;

Property Gender As %String;
}

Please refer to data transformation class

XData DTL [ XMLNamespace = "http://www.intersystems.com/dtl]
{
<transform sourceClass='CSVtoHL7.Inputfile.RecordtargetClass='En

14
0 741
Question Scott Roth · Jul 8, 2019

Way back when during our Siemens LCR days we had to limit the number of characters in OBX.5 to a length of 75. That was back when we had eGate.

Now I need to do the reversal of that and take loop through a string length and split the string up into multiple OBX or NTE based on a certain length. In reading documentation $EXTRACT can do this if you know the exact length, but in this case we don't. 

So how would one loop through a string and say every 75 characters create a new OBX or NTE segment?

Thanks

Scott

7
0 3114
Question Smythe Smythee · Aug 8, 2023

Hi community,

I am trying to map <assign value='source.{ORCgrp(1).RXE:7.1}' property='target.{ORCgrp(1).RXE:7.1}' action='set' /> in data transformation 

My input value for source RXE isRXE:7.1 will be like Keep orders~New orders  ~       ~ new orders

 After mapping i am getting only First repetition  value i,e is only Keep orders value  

I have tried using $EXTRACT like this <assign value='$EXTRACT(source.{ORCgrp(1).RXE:7.1},1,*)' property='target.{ORCgrp(1).RXE:7.1}' action='set' /> in data transformation  still getting First repetition value in target message

How to get full 7.1 se

3
0 269
Question Ties Voskamp · Aug 3, 2023

Hi,

Using Interoperability, I can't figure out how to create separate XML's files from a CSV-file using the GUI-features Record Maps/Complex Record Mapper -> Data Transformations. I'm familiar with reading/writing the files using File Service/Operation, but don't understand the processing-steps. The preferred method by my colleagues is to do this without any Objectscript or Embedded Python coding, but if this can only be done by some coding that's fine as well.

See example below. Any help is appreciated!

Kind regards, Ties Voskamp

Example CSV:

PONumber;PODate;ArticleID;ArticleName;MeasureOfUni
2
0 335
Question Dmitrii Baranov · Jul 19, 2023

Hello,

I want to add a couple of properties to a custom Transform class to give the user the ability to edit its properties directly in the Business Process visual editor. It can be easily done with other Production components, but I can't find in the documentation how to do the same with my Transform. Is it possible?

And another question is about how to use the 'aux' parameter of the DataTransform.Transform method if my component is non-visual?

4
0 305