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 Brian Schoen · Aug 30, 2016

Ensemble 2015.  Working on an a way to send NACK'd HL7 messages to a flat file for external review/troubleshooting. (Similar to the way BadMessageHandler deals with validation errors.)

I think I have the Alert piece down, but need assistance with the exact syntax to do an SQL query in the DTL (or a custom function) to pull the HL7 message Raw Content into the Alert, based on the SessionID.

(Also, anything special to write alerts to the File Operation?)

Thanks,  Brian

3
0 976
Question Ravi Akkiraju · Apr 22, 2017

Consider the below scenario:

1. HL7 Service -> Process

2. DTL makes a call to a webservice (Post) via a REST operation via SendRequestSync call.

        a. if the post is successful, end the DTL

        b. if the server that hosts the webservice is down, i would like to keep retrying with the same message and not lose any messages in the queue.

does a simple "quit 0" at the DTL will  rollback the message and will retry? please let me know how not to lose any messages if the webservice server is down.

Appreciate it.

8
1 596
Question Anthony Filaski · May 9, 2017

Hello,

Has anyone ever had issues using target class HS.SDA3.Container within a data transformation where the CareProvider values do not populate?

Basically I'm finding that XML stream output has all the SDA3 values I specify/map in the DTL except for the Appointment CareProvider data. I've mapped the values to another SDA field I know works and the correct value populates, so I know it's not an issue with the source value. I've also tried hardcoding the value and it still does not populate. I've even used the GUI in the management portal to hardcode values in the DTL, and the CareProvider fie

4
0 539
Question Randy Stewart · May 8, 2017

Suppose I have an image and need to convert that image into a PDF for inclusion in an HL7.

I know that Zen Reports can display an image in a PDF but I do not want to view the image in a web page. I just need to convert the image to PDF in a Process and then include that PDF in an HL7. The  workflow would be like this:

Get image -> Convert image into PDF -> Include PDF in HL7 OBX.

I know how to do the last part to include PDF in HL7 OBX. Just need ideas on the first part.

2
0 1345
Question Andre Cerri · Apr 24, 2017

Folks

1) What's the correct way to check for an existence of a segment?  So far I have been doing this by checking to see if a required field is non-null, and this seems to work but is a bit clumsy. In this case, it’s an X12 message being checked in an IF action in BPL:

              request.GetValueAt("NTE(1):Description")'=""

Or in a DTL, to see if a Z segment exists:

              source.{ZEF:Counter}=1

2) I have a case where I need to change from an external date format (YYYYMMDD) to internal (+$H) for a DTL to create a new object (and then persist it later). I am using:  +..ConvertDateTime(sou

3
0 1681
Question Scott Roth · Apr 11, 2017

With help from others here I had developed some code to take a Base64 PDF within a OBX.5 and save it locally to the file structure on the server.

I had to make a change to the code to return me a String so I can pass the Path back into Ensemble to use it in the message. When I made this change I am getting " ERROR #5034: Invalid status code structure ("/ensemble/data/transfer/AncillaryPDF/TMSAUDIO/Apr-11-1/980512729TMSAUDIO1046784936436537800.pdf")"

Here is the code...

ClassMethod DecodeBase64HL7ToFile(base64 As %Stream.GlobalBinary, Ancillary As %String, FileName As %String) As %String{s
3
0 1344
Question Graham Uricchio · Apr 4, 2017

I created a DTL to do HL7 mapping. The test function in the tools works the DTL perfectly but when used by the rule in my business process, the OBX segments are stripped and the MRN is gone. The assigning authority and ID type are added into the PID but the actual patient MRN is blank (3.1 value).

Here is the source code. 

<transform sourceClass='EnsLib.HL7.Message' targetClass='EnsLib.HL7.Message' sourceDocType='2.3:MDM_T02' targetDocType='2.5:MDM_T02' create='new' language='objectscript' >
<code>
<![CDATA[ //MSH SEGMENT]]></code>
<assign value='source.{MSH}' property='target.{MSH}' action='set

8
0 844
Question Paul Riker · Apr 4, 2017

I have an EMR sending double quotes "" as the value. How do I write criteria to find this match in a DTL?

PV1|1|A|||||1111111111^Doctor^MR|||||||||||||||||||||||||||||||||||||20170331|""

source.{PV1:DischargeDateTime()}="""" didn't work

2
0 788
Question Tom McDevitt · Apr 3, 2017

I am working on creating a DTL that can replace OBX segment with a string formatted NTE segment .  There is a class ImportFromString but it looks like that is not replacing the target message with the new formatted NTE. I do see  target.setvalueat class but I wanted the transformer to not be scheme base.  

ClassMethod Transform(source As EnsLib.HL7.Message, target As EnsLib.HL7.Message) As %Status
{
  set target = source.%ConstructClone(1)
  s idx=1
  s pSegCount=target.SegCount
  s pObservationValue=""
  s pObservationIdentifier=""
  s pOBXSegment=""
  FOR idx = pSegCount {
          s seg=target.GetSe

5
0 1038
Question Paul Riker · Mar 24, 2017

GT1|1|1|Test^Test||123 Building^123 Building^Brooklyn^NY^11220^United States^^^Kings|^PRN^PH^^^^^^^^^(111) 111-1111~^PRN^CP^^^^^^^^^(222) 222-2222|||""|IN|DGH^Daughter

I'm trying to clear the phone number completely.

Remove target.{GT1(1):GuarantorPhNumHome()} still gives me _~_

2
0 485
Question Ramesh Ramachandran · Jan 27, 2017

I wanted to parse an EDI 837 X12 document to extract a value from CLM segments.  We tried with the below DTL and did not get it working. Appreciate any ideas. 

<transform sourceClass='EnsLib.EDI.X12.Document' targetClass='Test.Request.EDIX12ClaimSegments' sourceDocType='HIPAA_5010:837I' targetDocType='HIPAA_5010:CLM' create='new' language='objectscript' >
<assign value='source.{loop2000A().loop2000B().loop2300().CLM:ClaimSubmittersIdentifier}' property='target.ClaimInvoiceNo' action='set' />
</transform>

1
0 864
Question Kurro Lopez · Jan 25, 2017

Hi all,

We have a big problem with spanish accent and special characters using Data Transformation (HL7 Messages).

We have some DT to transform HL7 messages to other type (OUL^R22 To OML^O21) so it copys the PID segment to the new one, but if in the PatienName field has any special character, the transformation stops and it not continues with the transformation.

This is the message
 

MSH|^~\&|B11111111|000000000C|LAB|TSFLAB|20170117163714||OUL^R22|ID1||2.5||||||UTF-8 
PID|1|1234567890134567890|00000000R||MUÑOZ LÓPEZ^JUAN^||19900101000000||||&||
OBR|1|23145687456894561321|23141211||||||
ORC|RS||4385025






1
0 1253
Question Paul Riker · Dec 13, 2016

I want to set the value in the second field of OBX-5, or OBX-5-2. My schema is not broken down to that granular level, so I can't just click OBX-5-2 to populate it. I tried a few variations without success.

target.{PIDgrpgrp().ORCgrp().OBXgrp(1).OBX:ObservationValue(1).2}

target.{PIDgrpgrp().ORCgrp().OBXgrp(1).OBX:ObservationValue(1)(2)}

target.{PIDgrpgrp().ORCgrp().OBXgrp(1).OBX:ObservationValue(1.2)}

 

Any ideas?

4
0 976
Question Scott Roth · Nov 23, 2016

I have a standard text file that is coming out of a system new line delimited. Each document will have the same field structure each time.

ID: xxxxxxxxx
Name: xxxx,xxxx   Age: xx   Sex: x

OSU Wexner Medical Center Harding Hospital
Treatment at  7/14/2016   10:39:34 AM

% Energy Set                                    50 %
Charge Delivered                             255.4 mC
Current                                       0.91 A
Stimulus Duration                              7.0 Sec
Frequency                                       40 Hz
Pulse Width                                   
7
0 1144
Question Bahram Aziz · Oct 24, 2016

Hi,

I have an Ensemble DTL which is suppose to translate the inbound XML document to an outbound XML document.

I need to test if a particular XML element exists, to perform some translation.

In the DTL I have the following,

<if condition='source.{element1.element2.element3}'>

<true>

    // do something

</true>

</if>

How do you use if statement to test the source XML document to see if a particular element exists in the source doucment.

Thanks,

2
0 1227
Question Chris Sanford · Oct 13, 2016

My organization has been tasked with parsing raw EDI 271 messages into JSON strings in order to feed a downstream application.  A few key details about the task:

  • The raw EDI 271 will be coming across as a standard format from a single outbound upstream system
  • The EDI 271 messages adhere to the 5010 standard
  • We do not need EVERY field from the EDI message, only a select number of fields.  However some of the fields we need (e.g. coverage details) are dynamic in size and will be variable in # of segments both on the EDI side as well as the receiving JSON side.
  • We will be looking to build o

6
0 2772
Question Paul Hula · Oct 10, 2016

Hello All,

   Does anyone have a specification for Telepath PMEP file formats?

They look like this

01|XXX|005|MIC|XXX Microbiology & Mycology|123456|25.08.16 15:06|
02|$$$|XX01|||L|
03|F|SURNAME|FORNAME|111222333|MRN1|01.01.1950|52 Some Lane|Somewhere|||AA11 1AB|MRN1|01.01.1950

etc etc with "05's all the way up to 10's" they are for results.  The supplier isn't being helpful, google for PMEP isn't given anything useful, hence I'm asking the friendly developers here if they've come across it and even better have any sort of file format or spec at all?

1
0 478
Question Paster-Bachar Gadi · Sep 12, 2016

Hi All

I have a BP which has a transformation. 

when I run the process I end up with the following error: 

----

ERROR <Ens>ErrBPTerminated: Terminating BP Propirion.BP.GetServices # due to error: ERROR <Ens>ErrGeneral: Object is immutable
+
ERROR <Ens>ErrGeneral: Object is immutable 

----

I have created a context named : HL7Message  type of: EnsLib.HL7.Message  and in the start of the BP assigned the request to it  (using set in assigned activity)

What did I miss ?

Thanks 

Gadi

2
0 1179
Question Duncan Priest · Aug 17, 2016

Is there an out-of-the-box or accepted standard method for loading up mappings between different code sets and then referencing these mappings (both directions) from DTL? First thought was the built in Lookup() and corresponding data tables but these only work in one direction (key -> value) and not the reverse. Obviously I can build my own classes to support a two way mapping but am wondering if there's a standard way of achieving this. The mapping should contain the code and display name from each of the code sets and allow mapping based on either code or display name.

Thanks

2
0 638
Question Laura Cavanaugh · Jun 28, 2016

Hello Community,

I am trying to create a simple Ensemble DTL transform using the GUI.  In order to test something very simple, I have created a transform that does nothing.  

I'm using test data from here: https://www.emedny.org/HIPAA/5010/5010_sample_files/835%20Sample%20(Ins…

 It's a very small test 835 file.

My transform looks like this in the compiled class:

<transform sourceClass='EnsLib.EDI.X12.Document' targetClass='EnsLib.EDI.X12.Document' sourceDocType='HIPAA_5010:835' targetDocType='HIPAA_5010:835' create='copy' language='objectscript' >
<if condition=

7
0 1138
Question Steven LeBlanc · Jul 6, 2016

Hi,

Does anyone have a sample that demonstrates how to use the Data Transformation option create='existing', in order to update an existing object by its ID?  My use-case is that I have an HL7 message coming in which contains data on a patient that may or may not already exist in a (non-HL7) table.  I want to use the PatientID from the (source) HL7 message, check if that patient exists in the (target) object, and if so, insert some new data into the existing patient, or if not, create a new patient.

I believe that to use create='existing', I need to provide the DTL with the PatientID as a param

3
0 784
Question Joseph Thottungal · Jun 16, 2016

Hi,

I am trying to use data transformation (DTL) to map a JSON to SDA. My elements in the source JSON is not one to one with SDA object. That means I have to add code to loop through these objects in order to complete the mapping. Can someone send me a sample that can look to create that? I am not very comfortable with scripting language used in Health Share. Appreciate your help.

Regards

Joseph

2
0 814
Question Paul Reesman · Apr 18, 2016

We are receiving XML documents and storing them. When we click to go into the clinician portal and again to view a patient, we can see the documents but none of the data is mapped to their respective buckets, i.e. allergies or medications.

I am thinking that I need to build an XSLT parser and change the format to SDA3, is this an appropriate approach? Or would using the Data Transformation (Ensemble -> Build -> Data Transformation) be a better idea? Lastly, if the XSLT idea is preferred, where would I call it within the stack?

1
0 469
Question Ondřej Hoferek · Apr 20, 2016

I installed Atelier on Windows in order to take a look at how the BPL and DTL graphical editors accessible via the "Open diagram editor" action work. The diagram editor is opened but I get the following error:


Message from webpage
---------------------------
Unable to load SVG diagram. Please ensure your browser is supported for portal access.

It looks like Atelier uses IE in order to display the editor even though my Windows default browser is Chrome.

I tried to change the General -> Web Browser setting to "Use external web browser" and choosing Firefox or Default system web browser. However, rega

8
0 662
Question Jenna Makin · Apr 26, 2016

What would be the preferred method to create an HL7 message from an input that is not HL7?

Would it be better to take the non-HL7 input and construct an HL7 message in the business service that then gets passed off to a routing process, or would it be best to just pass the non HL7 message to a routing process that called a data transformation to create the HL7 message?

My thought is the later, due to the fact that updates to the creation of the HL7 message are done using the graphical DTL editor rather than editing COS in the service.

1
1 841
Question Richard Housham · Apr 22, 2016

Hi this is my first post, so a little about my background. I've been programming in PHP/JavaScript for about 10 years.  
I've got quite a bit of knowledge surrounding object orientated programming and know the basics.

Last year I looked into the Mirth integration engine and did some work around that.

I've now moved jobs and I'm doing some work (surprise, surprise) with Ensemble.

I've done the tutorial and understand the basics of the web 'frontend' and what an integration engine can do. I'm now being asked to write a transformation to take a hl7 message and create a html one which is then base64'e

1
0 743