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

(Originally posted by @Ben Spead on June 25, 2014)

This code snippet generates a list of Ensemble Lookup Tables and Schema documents in the user's current namespace. Run the code by running the class method "test":


Class benspead.EnsTablesSchema
{
    classmethod test() {
        If ##class(%Dictionary.CompiledClass).%ExistsId("Ens.Util.LookupTableDocument") {
            // only supported in Ensemble 2012.1+
            Write !,!,"Exporting Ensemble Lookup Tables..."
            Set sc = $$$OK
            Set rs = ##class(%ResultSet).%New("Ens.Util.LookupTableDocument:List")
            Do rs.Execute()
            While rs.Next() {
                Set item=rs.Data("name")
                Write "document found: "_ item,!
            }
            Do rs.Close()
            Set rs=""
        }
        If ##class(%Dictionary.CompiledClass).%ExistsId("EnsLib.HL7.SchemaDocument") {
            Write !,!,"Exporting Ensemble HL7 Schemas..."
            Set sc = $$$OK
            Set rs = ##class(%ResultSet).%New("EnsLib.HL7.SchemaDocument:List")
            Do rs.Execute()
            While rs.Next() {
                Set item=rs.Data("name")
                Continue:$listfind($lb("2.1.HL7","2.2.HL7","2.3.HL7","2.4.HL7","2.5.HL7","2.6.HL7","2.7.HL7","2.3.1.HL7","2.5.1.HL7","2.7.1.HL7","ITK.HL7")
                                    ,item)
                Write "document found: "_ item,!
            }
            Do rs.Close()
            Set rs=""
        }
    }
}

Here's a link to the code on GitHub: https://github.com/intersystems-community/code-snippets/blob/master/src/...

1 3
0 773
Question
· Sep 17, 2020
modifying patient address in DTL

Hi

Newbie question. Could you please help me implement the following using DTL only - no programming.

We have a problem where our system sends longer addresses e.g. block of flats in an unexpected format

e.g. address below:

0 3
0 354

Hopefully somebody can help with this :

Using healthshare - Ensemble::: I have an HL7 message (ORU^R01) where I have an RTF file embeded into an OBX segment as what appears to be plain text.

example below :

How would I extract this file out and create an email and attach this RTF file as an attachment?

0 2
0 773

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
Question
· Apr 3, 2019
HL7 HTTP Response Charset

Hello,

currently we have a problem in development with the character set of the response message.

We are transmitting an HL7 message with an operation based on the EnsLib.HL7.Operation.HTTPOperation class.
We have changed this as follows.

Set pMsgIn=$$$NULLOREF, tHttpRequest=##class(%Net.HttpRequest).%New(), tHttpRequest.WriteRawMode=1, tHttpRequest.ContentType="APPLICATION/HL7-V2; charset=UTF-8"

Unfortunately, the ContentType character set is not read correctly in the response.

0 2
0 880

I am trying to split a HL7 message (RDE O11) into several messages depending on how many RXC segments there are in the message (Two RXC segments would need to two separate HL7 messages)

I have seen a couple of posts regarding this but am struggling with my BP using ObjectScript, the idea is to take the receiving message and split this before passing it onto another BP

Here is my code so far

0 2
0 339

Hi Community!

We are pleased to invite all the developers to the upcoming InterSystems IRIS for Health FHIR Contest Kick-Off Webinar! The topic of this webinar is dedicated to the FHIR Programming Contest.

On this webinar, we will talk and demo how to use the IRIS-FHIR-Template to build FHIR solutions using InterSystems IRIS for Health.

Date & Time: Tuesday, August 11 — 11:00 AM EDT

Speakers:
🗣 @Evgeny Shvarov, InterSystems Developer Ecosystem Manager
🗣 @Guillaume Rongier, InterSystems Sales Engineer
🗣 @Patrick Jamieson, InterSystems Product Manager - Health Informatics Platform

What awaits you at this webinar?

3 2
0 362

We have this intermittent issue with a particular supplier message , just wondering if anyone has further insight around the two errors we get when we see this.

We use the out of the box TCP hl7 adapter.

We first seem to get this incomplete hl7 message resulting in an error like

Discarding leftover input 'MSH|

This is not unexpected as the final obx has not dot the description of OBX:2.2 ect.

OBX|53|TX|NCDAC^

The next message will have the error

0 2
0 133

I'm receiving HL7 message containing the escape sequence \X00D\ indicating a carriage return. In the HL7 documentation I find that this is a valid escape sequence but when I read the intersystems documentation it states that only \X0D\ is valid.

What is the best way to work around this? I think that intersystems should change the UnescapeEx method in the EnsLib.HL7.Segment so that it complies with the standards.

0 2
0 877

Hello, we would need some help:

We would like to use a Transformation to convert an ORU_R30 2.3 to ORU_R30 2.5

However Ensemble does not have a HL7 Schema for ORU R_30 2.3

So then our original message is not being recognized:

→ How could we let Ensemble recognize the ORU R30 2.3 structure to be able to use a Transformation?

We have read:

0 2
0 214

We have msgs coming like below where line ending with \n then it throw error in router production but if msgs come with \r\n then router dont throw error.

any help?

EMR sending following msg.

MSH|^~&|APP|EMR|HIE|HIE|201301011226||ADT^A01|MSG00001|P|2.5|\n
EVN|A01|201301011223||\ne

Business Service read it like this as on line, and error msg shows in trace.

MSH|^~&|APP|EMR|HIE|HIE|201301011226||ADT^A01|MSG00001|P|2.5|\nEVN|A01|201301011223||\n

0 2
0 652

Hello,

I have a problem attempting to store a base 64 encode stream into the OBX:5 field of a HL7 message, by using the StoreFieldStreamBase64 method.

I'm using a transformer to input the contents of a pdf within a stream container (Ens.StreamContainer). The output is a HL7 message (EnsLib.HL7.Message 2.5:ORU_R01).

The transformer is being used in a business process.

This is the code used in the transformer to encode the stream to base 64:

0 2
0 235
Question
· Sep 7, 2018
Remove FHS segment from file

Is there any out of the box capability in Ensmeble to remove an FHS segment from a batch file? We have a client that is creating a batch of HL7 messages and they insert an FHS but there is no trailing FTS.

We are hoping to avoid custom COS code to handle this scenario.

0 2
1 392

Hi

I would like to create a new message of a particular type and append various segments programmatically. I have started with the following snippet. What I am currently finding difficult is to define a segment of a particular segment structure. I would like to append a pid segment of 2.3.1 to my message. I know I could you the importfromstring but I wanted to know whether there was a better way of achieving this.

0 2
0 532

Hi Community,

Please join the upcoming InterSystems Israel Meetup in Herzelia which will be held on November 21st, 2019!

It will take place in the Spaces Herzliya Oxygen Ltd from 9:00 a.m. to 5:30 p.m.

The event will be focused on the InterSystems IRIS: it will be divided into IRIS for Healthcare and IRIS Data Platform. A joint lunch will be also included.

Please check the draft of the agenda below:

3 2
0 345

Hi All,

I hope someone can help me with the following, it's about the usage of the class EnsLib.HL7.Service.HTTPService.

Working situation right know.

In IIS we've got a site configured who is dealing with the client certificate, etc and redirect the full request to http://localhost/csp/healthshare/NAMEPSACE/EnsLib.HL7.Service.HTTPServic... and the web gateway redirects the request to Business Service 'EnsLib.HL7.Service.HTTPService.cls'.

0 2
0 412

Hi my fellows camrades,

I have a question that seems really simple but it's quite a pain in my ass right now.

I had to rename (take a file from a directory and move it to another) which is a .hl7. Whenever this file has been displaced, I have to change the extension from .hl7 to .OK without using the rename method. Maybe using the attribut?

Do you have any ideas how I could do it?

This should follow the step i have explained right before.

I have a service to take the file but i need an operation to rename it then change his name.

0 2
0 389
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

How to import Custom Schemas from VSCode? They look like this:

<?xml version="1.0"?>
<Category name="ITK" description="xmlns:hl7='urn:hl7-org:v2xml' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'" std="1">
<MessageType name='ACK' structure='ACK' returntype='ACK' description='xsi:schemaLocation="urn:hl7-org:v2xml ACK.xsd"'/>
</Category>

Instead of wrapped XML export produced by $system.OBJ:

0 2
0 183