Data Transformation (DTL)

Syndicate content 18 

Our PAS system supplies date in a particular date format (ISO 8601 compliant) that includes seconds and milliseconds.  Because many downstream systems cannot handle milliseconds (and some don't even want seconds) many transformations are required to truncate the data.

What immediately sprang to my mind was to look for a setting on the operation to modify outbound datetime fields - obviously there isn't one, thus the need for this question.  I guess I cold write code to check the schemas for outbound messages and check/replace all the values where the field has a TS type, but my object script skills are basic and I am unsure if I could achieve this (it also seems like I could be adding a big workload to my TIE - especially if my code is not fully optimised).

(I should say this is using Healthshare as  a HL7 based Integration Engine in a UK based NHS hospital

Last answer 18 February 2019 Last comment 18 February 2019
0   0 2
60

views

0

rating

Hi All,

Actually I am trying to implement a RESt API where in I will get ZIPCODE as request and I need to call external API which will take ZIPCODE as input and give State and City in response.

But the problem is the request is in XML Format and also response is in XML format.

Example :

https://XYZ.com/ABC.dll?API=CSLookUP&XML=<CSLookupRequest USERID="USERID">
<ZipCode ID='0'>
<Zip5>20024</Zip5>
</ZipCode>
</CityStateLookupRequest>

and in Response 

<?xml version="1.0" encoding="UTF-8"?>
<CSLookupResponse>
    <ZipCode ID="0">
        <Zip5>20024</Zip5>
        <City>WASHINGTON</City>
        <State>DC</State>
    </ZipCode>
</CSLookupResponse&gt

Last answer 24 January 2019 Last comment 24 January 2019
0   0 2
83

views

0

rating

Hello.

I have a delimited flat file that I need to read and then generate an HL7 A08 message from the fields in the file.  I used the Management Portal's Record Mapper to generate the Map.Record class, then used drag & drop to map fields in the delimited flat-file to an A08 message.

But when I try testing this in the test tool, I'm getting an ERROR #6254: Tag expected . XML input. ... is not in proper format as child of Record (ending at line 2 character 11).

I can't find any real information on the error other than a mention that 6254 is an error :-)

Suggestions, anyone?

Best,

Jim Dolson

Holland Hospital

Last answer 14 December 2018 Last comment 14 December 2018
0   0 2
91

views

0

rating

The phone number field for the PID segment was customized to send email address in PID 13.4. How can I remove the email address to map only the phone number to the PID 13.1 field? 

PID|1||098456||PRINCESS^TUMBELINA^^^^||19011201|F||W|4382 POTATO DRIVE^^SUGARLAND^TX^74845^^^^980||7839854885^^^LILKIM5@OUTLOOK.COM|||S|NON|||||||||||||N|
 

Last answer 18 October 2018 Last comment 18 October 2018
0   0 2
65

views

0

rating

Hello, our Team is trying to develop Ensemble DTL to transform incoming X12 files into persistent data records. We created a persistent class and we can insert data using SQL. We tried to verify that %Save() gets called by adding %AddToSaveSet() method to persistent class and there writing to a global. We had to extend our persistent class with Ens.VDoc.Interface class or we could not see %Save() being called from Ensemble DTL. We suspect that %Save() gets some kind of error. We tried to debug by overwriting Transform() method in our DTL class. We got "<METHOD DOES NOT EXIST> 148 zTransform+2^TESTOTW.DTL2TABLE.1 Transform,Ens.DataTransformDTL" error when we called set ^TEST(-1)=##super(source,.target,.aux).

We wonder if anybody else has already achieved what we are trying and/or run into the errors we are facing and could shed some light on it for us or guide us what we need to look out for

Last answer 15 October 2018 Last comment 16 October 2018
0   0 4
112

views

0

rating

I am having an issue with the output file format on a production where quotes (" ") around column values are being removed from the imported file.  For example, my input file is a csv formatted as such: "123", " ", "ABC".  The output file format that is being generated produces: 123, , ABC.  I need the output file to retain the quotes around the data.

Is this something that can be corrected in the record map?  Or is it an issue elsewhere?

Last answer 17 September 2018 Last comment 17 September 2018
0   1 2
110

views

0

rating

Hi, guys,

I've written a DT for a partner which transfers a csv file into SDA3. 

I', using record map to gather data from a folder storing csv files and using the DT to tranfer the records into sda3 entities.

The followings are the codes of that DT:

Class POC.DT.CSV2SDA3 Extends Ens.DataTransformDTL [ DependsOn = (User.PhysicalExam.Record, POC.SDA.Container) ]

{

Parameter IGNOREMISSINGSOURCE = 1;

Parameter REPORTERRORS = 1;

Parameter TREATEMPTYREPEATINGFIELDASNULL = 0;

XData DTL [ XMLNamespace = "http://www.intersystems.com/dtl" ]

{

<transform sourceClass='User.PhysicalExam.Record' targetClass='POC.SDA.Container' create='new' language='objectscript' >

<assign value='"AddOrUpdate"' property='target.Action' action='set' />

<assign value='"TRDY"' property='target.SendingFacility' action='set' /&gt

0   0 2
0

answers

0

comments

92

views

0

rating

We have one user that is having issues in Ensemble via browser. The two issues she reported are:

- If she opens a DTL, she has to Save or Compile the DTL before she is able to edit anything in the Actions tab. Typically, you can simply open the DTL, click on a line, and edit the Actions.

- If she opens the Tools tab and clicks the Test button, she does not get a response and it eventually times out on her. Typically, clicking the Test button will open a new window where you can paste a message to test your DTL with.

These issues transcend browsers. She can close her browser and open a different browser, and the issue continues. No other users on the same server and in the same namespace have this issue. This is also a recent occurrence, as she has always been able to access this functionality with no issues

Last answer 2 August 2018 Last comment 3 August 2018
0   0 2
83

views

0

rating

There has been some confusion about how to edit Business Process Language (BPL) and Data Transformation Language (DTL) files in Atelier using the graphical editor. The following steps describe how to do this with Atelier version 1.0:

Copy the file you want to edit from the server to an Ensemble-enabled project in your Atelier workspace. To do this, find the file in the Server Explorer, right click and select Copy to project.

Open the file in the Atelier class editor just as you would any other class file.

Right-click in the class editor window and select Open diagram editor from the context menu. This action creates a second view of the same file open for editing with the BPL or DTL graphical editor. This new view occupies a new tab in the editor area

Last comment 5 June 2018
+ 5   1 4
468

views

+ 5

rating

Two fairly common requests we receive from HL7 customers are (1) how to remove all trailing delimiters for fields and segments in HL7 messages and (2) how to "find and replace" for an entire HL7 message (as opposed to one segment/field at a time).  The code sample below shows a custom function that solves for item 1 and by extension item 2 above.  In other words the same approach can be used for finding/replacing any sequence of chars in an entire HL7 message, with some tweaks to the custom function.

Here’s an example of how to actually call the function from DTL.  I recommend doing this as the last line of code in any DTL where it is used.  Note that “target” is used in both the value and property of the code below (as opposed to the DTL “source” message).

<assign value='##class(ISCSample.Custom.Function.ConversionScrub).ConversionScrub(target)' property='target' action='set' />

 

Here's the  sample class and classmethod:

Last comment 16 May 2018
+ 5   0 5
1177

views

+ 5

rating

We have a case where a vendor can send us more information in the DICOM message rather than in the HL7 result message. In theory it should be possible to take a DICOM and convert it to HL7, stupid question is has anyone done it before? Does anyone have any good examples of a DTL they did to show me how to setup the message structures and translation?

Thanks

Scott Roth

The Ohio State University Wexner Medical Center

Scott.Roth@osumc.edu

Last answer 14 March 2018 Last comment 14 March 2018
0   0 2
260

views

0

rating

I came across How to import a tab separated text file into a SQL table programmatically?, which appears to indicate that I can pass the filename and all records will be imported. However, when I put use the Import method only a single record gets imported. However, all records are imported if I use the management console to import the file by selecting it and choosing the options.

Has anyone ran into this in the past?

Last answer 17 February 2018 Last comment 14 March 2018
0   0 2
225

views

0

rating

I would need to build a Complex Record Map and then transform that into xml. But not the whole batch to one xml file - instead every repetition in that Complex Record Map would become one xml file. 

 

For Simple Record Maps this is easy to do because there are different types of Business Services that handle every record either individually or all of them as one batch but there doesn't seem to be similar options for Complex Record Maps? Instead, there is only batchtype business services.

Why is that? And what would be the best approach to transforming complex record map to several xml documents?

Last answer 7 February 2018
0   0 3
0

comments

154

views

0

rating

I am trying to come up with a way to decode the Base64 we receive in an HL7 message into a PDF file and save it in a directory on our AIX machine. I thought I had the following working at one time but I am having issues. Has anyone done this before

Last answer 19 November 2016 Last comment 25 January 2018
0   1 4
1250

views

0

rating

Is it possible to have a, b, c, d, e, and f as a counter instead of the counter being numeric? See below...Epic would like us to set OBX.4 using a alpha numeric combination.

OBX|4|ST|69548-6^Genetic Variant Assessment|1.a|Mutation IDH1:Not Detected||||||F

OBX|5|ST|69548-6^Genetic Variant Assessment|1.b|Mutation IDH2:Not Detected||||||F

OBX|6|ST|69548-6^Genetic Variant Assessment|1.c|Mutation NPM1:Not Detected||||||F

OBX|7|ST|69548-6^Genetic Variant Assessment|1.d|Mutation RUNX1:Detected||||||F

OBX|8|ST|69548-6^Genetic Variant Assessment|1.e|Mutation TET2:Detected||||||F

OBX|9|ST|69548-6^Genetic Variant Assessment|1.f|Mutation TP53:Not Detected||||||F

 

Thank

Last answer 24 January 2018 Last comment 25 January 2018
0   0 2
120

views

0

rating

I am trying to transform an Enlib.EDI.XML.Document through aXLT I know how to trans form the xml document  through a xlt stylesheet but been trying to get an Enlib.EDI.XML. Document from a procees by creating aoperation that will do the transformation of this to file if this can be done in a process all ideas welcome  so far I have come to this and I keep getting an erro

Last answer 7 December 2017 Last comment 14 December 2017
0   0 2
293

views

0

rating

So this may sound trivial, but I'm seeing conflicting information on this topic and hoping to get clarification.

 

According to Enslib.HL7.Message class definition, the maxlength of RawContent is 10,000 characters. So when using encoding like UTF-8, that is 10KB. When using Unicode, that should then be 20KB.

But then also coming across some forums and documents where 32KB is maximum size before HL7 fields are truncated.

 

What is the sure way to determine and modify an interface's maximum supported message size?

Last answer 8 November 2017 Last comment 9 November 2017
0   0 1
726

views

0

rating

I have a DTL that reads an xml file and I want transform that to a list of objects but I have a problem looping through my xml as when I try I get the first instance on the xml not the whole XML being transformed. here is my example. Here is the output

 <s01:WardOccupancy>
<s01:WardOccupancy>
<Organisation>BYG</Organisation>
</s01:WardOccupancy>
</s01:WardOccupancy>
</msg>

fro

Last comment 9 November 2017
0   0 1
0

answers

253

views

0

rating

I have a batch record mapper that reads a csv file and passes the message to a process that uses the EnsLib.MsgRouter.RoutingEngine and would like to pass the message to an operation that will output that as a XML file but so far been unlucky as the operation that I use , uses the EnsLib.EDI.XML.Operation.FileOperation which only works with the messages("BusinessOperation class for writing XML messages to a file. Works with XML messages of type EnsLib.EDI.XML.Document.") is there a way to achieve this or somewhere to read in order to achieve this I have asked before on this post but the answers I got never helped  so any ideas appreciated thanks in advance

Last answer 25 October 2017
0   0 1
0

comments

360

views

0

rating

Hello Community,

I need advice converting a comma delimited string container with multiple records into some type of recordmap that iterates through all the records.

My string container has several records and I would like to loop through the number of records in the string container and transform each record in the container individually. Number of records will vary but the number of fields per record is static (28 fields). Meaning after every 28 fields, a new record begins. The goal is to convert to individual delimited flat file records.

I am attaching sample data for clarification. Any pointer in the right direction will be hugely appreciated?

Thanks

 

Example below is 3 records in the string container.

Last answer 23 October 2017 Last comment 16 October 2017
0   0 2
206

views

0

rating

I  have a business service that brings in a xml virtual document to the production and also a csv service  that brings in a csv file and have a process that transforms both to a xml output  but I have a problem with the csv as it is giving me this error when I try to trans form it ```ERROR <Ens>ErrException: <PROPERTY DOES NOT EXIST>zOnRequest+1 ^EnsLib.MsgRouter.VDocRoutingEngine.1 *DocType``` I have read here followed the suggestion but now I do not get any errors but my message is not being routed here is the rule set that I am usin

Last answer 12 October 2017 Last comment 13 October 2017
0   0 1
207

views

0

rating

This article will describe and include an example of how to embed an external PDF file into an HL7 segment, specifically ADT_A01:2.3.1 OBX().  This can be useful when attempting to insert pictures or other external data into an HL7 message.  In this example, the name of the PDF file to be embedded is provided in the incoming HL7 message in OBX(1):ObservationValue field.


The basic stipulations for this example are as follows:

  1. Accept a PDF file
  2. Accept an HL7 message
  3. Using the name of the PDF file, embed the PDF data into the HL7 message
  4. Output the message to file

 

 

Last comment 23 August 2017
+ 8   1 1
3453

views

+ 8

rating

Hi

 

I've got a Service that get ACK Messages originated by another system. 

 

I want to get the details of a Message when the ACK is CE (Failed Message).

 

I don't know whether this is the best approach but, at the moment, I have a DTL and I would like to search the Cache Database for a Message with the Control ID on the ACK in the MSA segment.

 

Any help with this would be great.

 

Tks.

Last answer 11 July 2017 Last comment 15 August 2017
0   0 1
315

views

0

rating

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

 

Last answer 12 July 2017 Last comment 12 September 2016
0   0 1
387

views

0

rating

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

Last answer 20 June 2017
0   0 2
0

comments

439

views

0

rating

DTL Transformations and GetValueAt/SetValueAt calls on HL7 messages will truncate any fields longer than 32K.  To avoid this, the methods GetFieldStreamRaw and StoreFieldStreamRaw must be used when dealing with fields that might be larger than 32K.  OBX:5 is a frequent example.  These methods have some subtleties and must be used carefully.

This can't be done by simply dragging from left to right in a DTL.  It must be done with a code action.  Also, the StoreFieldStreamRaw call must be the last edit made to the segment because the segment becomes immutable after that.

StoreFieldStreamRaw takes 3 arguments: The stream to put in the field, the VDoc path of the field in which to store the stream, and a pRemainder argument.  If the pRemainder argument isn't specified, then all fields after the field being stored are blown away.  If pRemainder is specified, then all fields after the one being stored are replaced with what's in pRemainder

Last comment 10 June 2017
+ 7   0 8
718

views

+ 7

rating