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

In the previous article, we've discussed the origin of the standard HL7v2, the structure and the types of messages. Let's now look at one of the most used types of messages and an example of its structure. I'm talking about ADT.

HL7 ADT messages (Admit, Discharge, Transfer) are used to communicate basic patient information, visit information and patient state at a healthcare facility. ADT messages are one of the most widely-used and high volume HL7 message types, as it provides information for many trigger events including patient admissions, registrations, cancellations, updates, discharges, patient data merges, etc.

8 1
4 10.2K

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

For testing purposes, I would like to create an EnsLib.HL7.Message from either a %String or a file on disk and pass it into a function in a unit test (outside of an Ensemble context). EnsLib.HL7.Parser appears to do the necessary parsing, but it also sends the message via Ensemble service rather than returning it as a value. Is there a way to leverage the parsing outside of a Ensemble service? Alternatively, is there another way to create an EnsLib.HL7.Message?

1 4
0 2.9K
Question
· Apr 1, 2017
XML to Json conversion

Hello,

Are there any utilities/api in HealthConnect 2016.2.1 that will allow conversion of XML virtual document to Json format? We were thinking to convert HL7 ADT message to XML via Ensemble DTL and then send it to another BP to convert to Json format for transmission via Web Services. To my understanding there isn't anyway to represent Json as a virtual object so it can be use for direct mapping of HL7 2.x message to Json via Ensemble DTL.

Thanks

Yuriy

0 3
0 2.6K

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
· Dec 8, 2016
JSON to HL7

I have a project to convert a JSON message with two patient identifiers into an HL7 ADT^A31. Is there any documentation or training that you would think is appropriate?

Currently using Ensemble 2014.1.5 on AIX

0 1
0 2.3K

EnsLib.HL7.Message.cls provides many API methods for manipulating an HL7 message. RemoveSegmentAt(), for example, can be used to remove a segment by path or index, but only one segment at a time. There may be times that you'll need to remove all segments within a group or even many groups of segments from the HL7 message. Surely you can iterate through each segment in each group and remove them one by one, but there's a much easier way.

With just one command, like below, you can remove all OBX segments in an ORU_R01 message (msg):

4 1
0 2.3K
Article
· Sep 20, 2016 4m read
Diagnosing Framing Errors

Framing refers to the characters that mark the start and end of an HL7 message (or other types of framed messages). Most HL7 services and operations have a Framing setting that allows the user to define this framing. The most common choices are available as defaults, but with the AsciiMM/NN setting, components can be configured to recognize any framing characters.

4 0
2 2.2K
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

In the previous article, we've seen the structure of one of the most used types of HL7 message - ADT (Admit, Discharge, Transfer) and an example of ADT^A04 with the description of all its fields. Now let's look at another flow of data having to do with ordering and fulfilling the orders of tests. I'm talking about ORM (as of version 2.5 you should use specific messages to order tests, like OMG, OML, OMD, OMS, OMN, OMI, and OMP), ORL and ORU messages. In a very simplified case, the exchange of data may look like this.

Let's look at these messages in more detail.

4 0
1 2.1K
Question
· Mar 17, 2017
Convert HL7 to FHIR

Hello Greetings-

I am exploring on converting HL7 to FHIR.

1. I saw there are built in DTLs “FHIR.FromSDA” and “FHIR.ToSDA” to convert SDA -> FHIR and FHIR -> SDA. Similarly Do Intersystems have DTLs for HL7 -> FHIR and FHIR -> HL7?

2. The reason why I am asking is, I see in HSLIB namespace HS->GateWay->HL7->HL7toSDA3 and HS->GateWay->SDA3->SDA3toHL7 DTLs. Like-wise I am trying to locate HL7 -> FHIR and FHIR -> HL7. Please help me to locate them

1 3
2 2K

Hello Gentlemen,

My Business process connector receive a Oru_01 hl7 message with an ED segment inside (Base64 pdf). How is it possible to extract it and create a pdf file within?

Here is the sample of function I have. I know it doesn't work but if you could help me, it would be perfect. Here is my function, the goal would be it create the file where I want and return me the link of the file.

0 5
0 1.9K

Hi,

I have a ORU message, which has a EVN segment that I want to remove and send the message across.

I tried to clone the request as below:

s newreq = request.constructClone

s changreq = newreq.RemoveSegmentAt("EVN")

Set request = changereq

but it fails. Is there a way that I can safely remove a segment and pass it on?

Would appreciate your help in this

Regards,

Eric

0 13
0 1.6K

Hi ,

I'm using standard business service not(Customized business service). I'm not able to process the Hl7 data file which contains CRLF characters.It shows warning "Discarding Received non HL7 data". Actually it discards some segment after CRLF character. Is there any settings to overcome this problem?

Also i tried UTF-8, Ascii,Unicode.. characterset . But it won't work. Please help me .

Urgent!!!

0 11
0 1.5K

Introduction

InterSystems has recently completed a performance and scalability benchmark of IRIS for Health 2020.1, focusing on HL7 version 2 interoperability. This article describes the observed throughput for various workloads, and also provides general configuration and sizing guidelines for systems where IRIS for Health is used as an interoperability engine for HL7v2 messaging.

6 3
3 1.5K
Question
· Feb 21, 2018
HL7 segment query using SQL

I'm trying to get a count of specific message type with a specific entry and thought I could build the query in Message Viewer but this does not provide counts (as far as I am aware). So when I take the SQL from 'Show Query' it omits the segment criteria as the code shows below.

I have attached the criteria that has been excluded. Is this possible?

Thank you

0 2
0 1.4K
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

Hi.

We have created an Ensemble production that receives HL7 information via TCP Adapters, but the requirement from the vendor is that we submit an ACK message with the MSH segment mist have a date and time populated with seconds.

We are utilising the standard class for the Service Adapter (EnsLib.HL7.Service.TCPService).

HL7 Version 2.5 no modifications currently.

The messages received via the service is correctly received in ddMMyyyyhhmmss but our ACK back is only ddMMyyyyhhmm.

0 1
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