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 Scott Roth · Apr 2, 2025

Trying to start investigating an error we are seeing with multiple of the same messages getting sent to the same vendor. We receive an HL7 message with an RTF embedded from our EMR, send it through a DTL to just update the Patient Class, and then send it onto the Operation which is TCP.

We are starting to see this error message...

ERROR <Ens>ErrBPTerminated: Terminating BP DocOutRptRouting3M360 # due to error: ERROR <Ens>ErrException: <INVALID OREF>zOutputToIOStream+6^EnsLib.HL7.Message.1 -- logged as '-' number - @''
> ERROR <Ens>ErrException: <INVALID OREF>zOutputToIOStream+6^EnsLib.HL7.M

4
0 129
Question Padmaja Konduru · Mar 29, 2025

We are receiving the report in text format and it has special characters like ', - like that in the text. Source system is using the UTF8 encoding format hence the text is showing as ' � ' . Is there a way to convert the utf8 to actual character in the DTL.

Thank you,

6
0 270
Discussion Paul Hula · Mar 21, 2025

Hi All,

  After doing IRIS/Ensemble etc for 20 years I've come across a company who have very odd view, especially about DTL's and routers.

  They have convinced themselves to use COS for transforms (including HL7) and for routers (and one of their 3rd party providers agree!)

  Their reasons are; efficiency, compatibility, flexibility, power and re-usability.

  Of course these reasons are wrong!

  • Efficiency, difference between 1-2 lines compared to a DTL/XML going to 3-4 lines (This also assumes the COS code is well written)
  • Compatibility, surely less with COS as its subject to devel
3
1 172
Question Scott Roth · Mar 21, 2025

I was using VSCode to edit a DTL because it seemed easier to copy/paste code from parts of the DTL I was editing. I tried to add <sql> tag and code to call a SELECT statement, but when I compiled I got the following error...

ERROR <Ens>ErrInvalidDTL: Invalid DTL

  > ERROR #5490: Error running generator for method 'GetSourceDocType:osuwmc.Epic.MFN.DTL.EpicMFN949002Normalization'

ERROR: Ens.DataTransformDTL.cls(GetSourceDocType) of generated code compiling subclass 'osuwmc.Epic.MFN.DTL.EpicMFN949002Normalization'

    > ERROR #5030: An error occurred while compiling class 'osuwmc.Epic.MFN.DTL

2
0 133
Question Mark OReilly · Feb 4, 2025

When removing a segment in DTL for hl7 using foreach the segment doesn't actually get removed and leaves a blank segment. 

i.e. 

MSH|^~\&|SendingSystem|ReceivingSystem|202301241000||ADT^A01|12345|P|2.4
EVN|S|202301241000
PID|1|MRN12345|1^^^^KEEP~2^^^^Remove~3^^^^Keep|M|19800101|  
PD1|PatientAddress^Street^City^State^Zip
PV1|I|INPATIENT|BED123|DoctorID|202301241000|202301241000

This blank segment to be removed

I read the notes and thought it might be about swizzling at https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cl…

2
0 236
Question Colin Brough · Jan 10, 2025

We are using a DTL transformation to take HL7 and transform into custom XML. But the nodes in the resulting XML are appearing out of sequence - and therefore failing validation against the schema.

The XSD schema for the XML looks fine when imported into Ensemble: root node in the XSD looks like this:
And shows in Ensemble like this:

The transformation looks like this, and we can see the text from the trace elements at lines 5, 12 and 19 appear in the correct order in the event log:

HOWEVER, the resulting XML has the <allergies> nodes before the <patientNotes> nodes....:

Any ideas about

5
0 173
Question Colin Brough · Jan 13, 2025

We are using a DTL transformation to take HL7 and transform into custom XML (XML is a virtual document, held in an EnsLib.EDI.XML.Document object). The schema specifying the format of the XML says one element should occur no more than 24 times (maxOccurs="24" in the XSD schema). However, the transformation to produce one such element always produces 24 elements, all but the last one blank, when tested stand-alone. And when the sub-transform producing one element is incorporated into the full transformation to produce the whole XML object, it produces the wrong output.
Is this a bug in the Ensem

1
0 109
Question Daniel Durdin · Jan 16, 2025

Hi, I am coming unstuck with a current mapping from HL7 to XML using the DTL editor with an XML schema (imported by XSD).

My output keeps prefixing the elements with "xsd_2" despite this not being defined in the targetnamespace within my XSD file. 

Would anyone have any idea as to where this is creeping in? Any advice would be greatly appreciated. 

My XSD namespace etc are setup as follows:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           targetNamespace="http://voicetechnologies.co.uk/winvoice/importation"
           xmlns="http://voicetechnologies.co.uk/winvoice/importatio

4
0 149
Question Yuhong Snyder · Jan 22, 2025

Hello,

I hope this is a simple ask..

basically I need to create local files daily at a certain time for example 11:30pm.

1. file name needs to be like  xxx__20250113.txt , the date part should be next day's timestamp with format YYYYMMDD, so I will write about 17 files like that with different names.

2. write a dummy hard coded word for example “Dummy Word” in the file.  the file eventually will be used by other operations to add hl7 message on top of this  in it with the live interface message. 

3. this needs to be done every night at 11:45pm

So how am I going to implement this?

     1

0
0 121
Article Guillaume Rongier · Jan 10, 2025 4m read

I'm glad to announce the new version of IoP, which by the way is not just a command line. I'm saying because the new AI search engine still thinks that IoP is just a command line. But it's not. It's a whole framework for building applications on top of the interoperability framework of IRIS with a python first approach.

The new version of IoP: 3.2.0 has a lot of new features, but the most important one is the support of DTL . 🥳

For both IoP messages and jsonschema. 🎉

image

DTL Support

Starting with version 3.2.0, IoP supports DTL transformations.

DTL the Data Transformation Layer in IRIS Interoperability.

DTL transformations are used to transform data from one format to another with a graphical editor. It supports also jsonschema structures.

0
0 225
Question Yuhong Snyder · Jan 7, 2025

Hello,

is it possible to kill/suppress hl7 message in the DTL (data transformation).

in cloverleaf, it is common practice to check the value in message, for example pv1:7.9. if the value is certain word(assigning authority) then send the message over to destination, if it is not, kill the message

how would this be done in InterSystems ? does that need to be done in the rule instead? or can it be done in the data transformation? if it can be done in data transformation, how can it be done? 

Thanks

4
0 176
Question Colin Brough · Dec 10, 2024

We are building a data transformation from HL7 to custom XML. We've got an XML schema, and are using virtual documents (EnsLib.EDI.XML.Document).

We can:

  • build our transform as a single transform
  • build our transform using subtransforms where the source data for the subtransform is all in a single HL7 segment and all the output data goes into a single (complex) element of the XML, so the input type on the subtransform is the segment from the HL7 schema and the output type on the subtransform is the relevant element picked out of the XML schema:
  • but we can't (so far!) build a subtransfor


2
0 151
Article Anthony Master · Dec 12, 2024 2m read

Like many others probably find themselves, we were stuck doing live data mapping in our Interface Engine that we really didn't want to do, but had no good alternative choice. We want to only keep mappings for as long as possibly needed and then purge expired rows based upon a TTL value. We actually had 4 use cases for it ourselves before we built this. Use cases:

0
0 251
Question Yuhong Snyder · Nov 21, 2024

Has anybody encountered this before?

I did a very usual hl7 adt transformation DTL, but it is with a customized schema, like ADT_ALL, it is a structure that tries to cover all the ADT schema scenario so we can use 1 type for all ADT messages.

the DTL tests fine in DTL test, with all the segment transformed correctly, but once I put it to test, to send message through source and the message after transformation can only go to MSH, EVN, but won't transform other segment like PID etc.  

Originally I was suggested that in my DTL I didn't loop through all the (), so I changed everything to loop

5
0 161
Question Smythe Smythee · Nov 15, 2024

Hi Team,

I am converting xml message into HL7 message but the input XML message contains pdf which is converting into base 64 and getting mapped to OBX:5.5 in HL7 message and sending it to downstream 

In Downstream service i am using normal HL7 TCP class EnsLib.HL7.Service.TCPService but the message looks like below i am not sure why stream is taking as another segment in HL7 message,

Any thoughts on this?

Thanks,

Smythee

15
0 337
Article Anthony Master · Oct 17, 2024 2m read

I was working on a DTL but kept getting ERROR #5002... MAXSTRING errors. The problem was that most of the DTL GUI action steps only support the string data type when working with the segments. A %String has a limit of 3,641,144 characters and my OBX5.1 was 5,242,952 characters long as the example provided. Of course PACS admin stated ultra high quality up to and including 4K resolution files were needed, so we could not get the vendor to compress or reformat these files to compressed jpg or something similar.

Initially this vendor sends a 2.3 ORU^R01 and our EHR (Epic) is expecting a 2.3 MDM^

7
1 463
Question Anthony Master · Sep 17, 2024

I have a theory that I could use an HL7 Data Transformer in a rule without specifying a specific DocType. I want to use the same DTL for a variety of different DocTypes. Here is my very simplistic DTL so far:

Class OrdRes.TestTransform Extends Ens.DataTransformDTL [ DependsOn = EnsLib.HL7.Message ]
{
    Parameter IGNOREMISSINGSOURCE = 1;Parameter REPORTERRORS = 1;Parameter TREATEMPTYREPEATINGFIELDASNULL = 0;
    XData DTL [ XMLNamespace = "http://www.intersystems.com/dtl" ]
    {
        <transform sourceClass='EnsLib.HL7.Message' targetClass='EnsLib.HL7.Message' create='new

5
0 288
Question Scott Roth · Aug 27, 2024

I am trying to create a HS.FHIR.DTL.vR4.Model.Resource.Encounter message based on a conversion of HS.FHIRServer.Interop.Response QuickStream to a JSON %Dynamic Object. 

When I try to send the HS.FHIR.DTL.vR4.Model.Resource.Encounter onto the Router

  1. it is not showing up as a Defined Message Class to Route the message back to the SourceConfigName of the Request message that initialized the FHIR query
  2. I keep getting "ERROR <Ens>ErrBPTerminated: Terminating BP EPIC.FHIR.Process # due to error: ERROR #5002: ObjectScript error: <SUBSCRIPT>%SaveData+29 ^Ens.MessageHeader.1 ^Ens.MessageHeaderI("M

4
0 196
Question Scott Roth · Aug 23, 2024

I thought I knew how to return a Response from a Business Process back to the Source Config Name, but I guess not. 

I am working on a Proof of Concept, that the Request Message Class would determine a "Route" within a Business Process to make a FHIR call (search, read) to our External FHIR repository, and return back the HS.FHIR.DTL.vR4.Model.Resource.xxxxxxx as a Response to the Source Config Name.

I have the FHIR part working, however now that I have the data in the form of HS.FHIR.DTL.vR4.Model.Resource.xxxxxxx, I am struggling to understand how I could send it back to the Original Source

0
0 128
Question Scott Roth · Aug 9, 2024

I was looking for an easier way to build the FHIR Query String, given the Record Map request that is passed into the DTL.

I built this Function, but when I run a message through it, my Query String that is passed back into the DTL is a Reference Pointer and not the String I am looking for. 

ClassMethod BuildFHIRQueryString(record As%String, Output queryString As%String) As%Status

{

    // Assuming 'record' is a string containing the record map data

    // Define the delimiters

    Set fieldDelimiter = "|"

    Set repeatDelimiter = "~"

   

    set queryString = ""
3
1 179
Question Yone Moreno · Jul 18, 2024

Hello,

First of all thanks for your help, and thank you for your time.

We have the following task:

To generate by hand the Ens.Request with the properties and inner Data Schemes which represent this XML, in HealthShare, by hand; the XML is this one:

<DSPortal360xmlns="http://tempuri.org/DSPortal360.xsd"><Paciente><NumExpediente>6258338</NumExpediente><Informes><Fecha_Creacion>2024-07-17T11:30:05+01:00</Fecha_Creacion><Id_Visita>8177822</Id_Visita><Titulo>Visita 17/07/2024</Titulo><Desc_Tipo_Plant>99</Desc_Tipo_Plant><NumExpediente>6258338</NumExpediente

2
1 143
Question Victor Castanon · Jul 9, 2024

I'm running into an intermittent issue with some of our Custom Operations/Processes as a result of some large FHIR R4 Binaries. Essentially we get a response from an AthenaHealth FHIR endpoint that appears to be too large to be processed using the IRIS Built In Functions for FHIR:
I've replicated it on the command line here using a file (binary.json) that has the response from the FHIR Endpoint. Not sharing full contents due to PHI concerns.

HSCUSTOM>S file=##class(%Stream.FileCharacter).%New()

HSCUSTOM>Do file.LinkToFile("/data/binary.json")

HSCUSTOM>w file.Size
4033045

HSCUSTOM>Set
1
0 179
Question Scott Roth · Jul 9, 2024

Using the FHIR DEMO, I have pieced together how to make a FHIR Request using OAuth against an External FHIR Repository. When I execute the Patient search (HS.FHIRServer.Interop.Request), I get a HS.FHIRServer.Interop.Response that has a Quick Stream ID, which I then use to convert the Quick Stream to a JSON Dynamic Object. if I do a trace on the Raw JSON Object, I am able to pull out single elements, however I want to pull the raw JSON into a defined Class Structure. 

I tried using fromDao(dao As %DynamicAbstractObject) As <HS.FHIRModel.R4 subclass> outlined within Working with FHIR Data

in

2
0 303
Question Aman · Jul 2, 2024

Hello Community,

I'm a beginner and currently working on a project to convert CCDA files to FHIR using InterSystems IRIS. I have developed a web form to upload CCDA files, and I'm attempting to convert the uploaded CCDA files to FHIR. However, I am encountering an issue where the conversion process results in an empty entry.
Here's the Output it displays on HTML page:

Size of CCDA Stream: 74152
vR4
{"resourceType":"Bundle","type":"transaction","entry":[]}

Here is my code: CCDtoFHIR.csp

<!DOCTYPE html><htmllang="en"><head><metacharset="UTF-8"><metaname="viewport"content
9
0 230
Question Scott Roth · Jun 27, 2024

IRIS for UNIX (Red Hat Enterprise Linux 8 for x86-64) 2024.1 (Build 267_2U) Tue Apr 30 2024 16:06:39 EDT [HealthConnect:7.2.0-1.r1]

I have a use case where Epic is sending an A60 Allergy transaction is set at the Patient level, but we have a system called VIBE which needs the ADT at an Encounter level instead. Currently we store ADT information in a MS SQL database for years, and we are querying it to get the latest Account Number to insert into the ADT^A60 for VIBE.

This MS SQL Visit Database was built over 20 years ago and is quite cumbersome to keep maintaining. I would like us to move aw

2
0 241
Article Luis Angel Pérez Ramos · Feb 7, 2024 6m read

In this article we are going to see how we can use the WhatsApp instant messaging service from InterSystems IRIS to send messages to different recipients. To do this we must create and configure an account in Meta and configure a Business Operation to send the messages we want.

Let's look at each of these steps in more detail.

Setting up an account on Meta

This is possibly the most complicated point of the entire configuration, since we will have to configure a series of accounts until we can have the messaging functionality.

Here you can read the official Meta documentation.

First we wil

1
4 748
Question Will · May 2, 2024

Hi, 

I'm new to IS and the HL7 transformations using the DTL.  I need some clarification on the foreach action.

I want to iterate over IN1 segments, and output only segments that contain certain allergy types in IN1-2 with foreach.  Inside the foreach block, I check for allergy type "FA" in IN1-2 and, if found, send the segment with only the required fields (fields #1, #2, #3, and #5 to be exact).  Please see the foreach block below:

 

I'm puzzled how come I'm getting field repetitions in the fields I populate within the foreach block  Here are the AL1 segments in the source message

AL1|

3
0 229