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.

12 4
5 13.7K

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

0 3
1 3.5K

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?

0 6
0 3.4K

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.

7 6
0 3.3K

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

1 7
0 2.4K

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.

10 6
6 2.4K
Question
· Jun 19, 2017
Date Filtering Functionality

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

0 14
0 2.1K
Question
· Dec 19, 2016
HL7 Section to JSON

Hi all,

I'm trying to convert a HL7 section to a XML or JSON string.

We need to save the content of PID section into a SQL Column, therefore we need to convert it into a XML o JSON string

is there any easy way to convert it?

I've tried to convert it directly into a DTL, but all my attempts have been unsuccessful

Best regards,

Francisco Lopez

1 6
0 1.3K

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

0 3
0 1.3K

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.

0 2
0 1.1K

Hello,

When creating an outbound X12 file (834, 835, 837, etc), what's the easiest way to keep a segment count to use in the SE01 element? Other mapping tools I've used either detect it's an X12 file and do this automatically, or there's an option to keep a count after each outputted segment. The Data Transformation tool within Health Connect doesn't seem to have similar functionality, but I could just be missing something. Any help would be greatly appreciated!

Thanks,

Jason

0 3
0 1.1K

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

0 3
0 1K

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

2 1
0 1K

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,

0 2
0 1K
Question
· Mar 13, 2018
DICOM to HL7

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

0 2
0 990

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(Institutional%20Claims%20only).2014.txt

It's a very small test 835 file.

My transform looks like this in the compiled class:

0 7
0 927

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.

0 2
0 911

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.

0 5
0 873

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

0 2
0 873