Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

General HL7 question 1

Status
Not open for further replies.

OrthoDocSoft

Programmer
May 7, 2004
291
US
Folks,

I want to have my medical app share data with other DB's in my client's hospital, and I'm told the best way to do this is through and HL7 interface.

What is it, exactly, and how do I enchange info through it in VB6? Is it a box or software I have to buy? And if someone could give me some examples of VB6 code that "works" with it, I'd be grateful.

Thanks,

Ortho

[lookaround] "you cain't fix 'stupid'...
 
dillettante,

the last url was somewhat helpful, but I still don't know how to make it work with VB6.

Do you have any code snipets that would be illustative? Say, the "Hello World" of HL7?

Ortho

[lookaround] "you cain't fix 'stupid'...
 
That is what I think, you like it or not. You ask the respondent what they think of that matter. I gave you what I think. That's all.
 
<What is it, exactly, and how do I enchange info through it in VB6? Is it a box or software I have to buy? And if someone could give me some examples of VB6 code that "works" with it, I'd be grateful.

While I was unfamiliar with "HL7" when first encountering your post, I put in 5 or 10 minutes researching your questions (I found the given links quite helpful) and have come up with the following:

1. It's a data format, established in 1987, that is used to exchange clinical data.
2. You can buy an ActiveX component. Check for more information.
3. See the answer for number 2.
4. Googling to "HL7 VB6 code" yields all sorts of interesting stuff, of which looks the most interesting.

Let us know if you need more help, and I'm sure we'll all see what we can do.

Bob
 
>It's a data format, established in 1987, that is used to exchange clinical data

It's EDI, but not as we know it ...
 
Becasue it doesn't meet either of the two main EDI standards ... such as UN/EDIFACT or ANSI ASC X12
 
There are lots of formats in use besides X12. They're still EDI in the generic sense and many predated X12 by a very long time.

Formal standard EDI never got the traction people expected and lags technology by quite a bit today. EDI generically involves a document-centric interaction process and a data serialization format.

Reliable performant EDI requires the use of message queuing, rendering SOAP-style synchronous Web Service calls particularly bad at it except as a low-level connector protocol used by remote client nodes.
 
Folks,

First of all, I would like to apologize to most of you, especially Bob Rhodes, for me seeming to be unappreciative of the help you have so freely given. I was having a bad day, and something ticked me off, but that is behind me.

I can't thank most of you enough for the tremendous support you all show, especially you, Bob Rhodes. Please forgive me.

OK, with your help, this is what I know.

HL7 messages in a hospital are "beamed" out over IP addresses, and on Ports.

There are HL7 "transmitters" (doing the beaming...) and HL7 "listeners" (receiving the beams....).

The Listeners "put the messages, which are in HL7 format, into a file."

THEN you probably need to have an app that puts the data into a database, so you can deal with it more accurately, so that is an "HL7-to-MS-SQL-Server" (or any DB) translator.

And ALL of this makes sense to me.

My question for anyone who knows is:

Do you think this company, who wants about $700/copy for this setup (Listener plus translator) is about as good for the money as you can get?


Or is "Iguana 4.0" suite the best? I cannot for the life of me get a price for this, even after emailing the company, so it must be majorly expensive. Does anyone know how much it costs?

Thanks again,

Ortho


[lookaround] "you cain't fix 'stupid'...
 
I think it is simply going to be hard to get much useful detail or opinion from anyone outside the HL7 developer community. It is fairly specialized.

This is probably why the responses you have gotten here are less than directly useful. Most of us know quite little about it.

My personal experience is limited to developing a few VB6 programs that use the MLLP protocol over TCP, and that wasn't really HL7 related at all. The remote host just happened to support MLLP natively as one message based transport and the users felt comfortable with it. We did not have to parse or exchange any HL7 messages.

As far as I know most Windows HL7 development is BizTalk based (BizTalk Accelerator for HL7) though of course there are 3rd party tools, components, and SDKs and I'm sure some people roll their own for smaller projects.
 
dilettante,

"Roll your own." Great way to put it. You know, I only need about 5 pieces of information from the HL7 message.

I've seen where people use "winsock" to listen on ports (and I'm assuming IP addresses.)

Penalty for "not finding the information" would be small.

Do you think I could write a listener? I know that is a somewhat silly question to ask. But the idea of paying someone hundreds (let alone thousands) of dollars per copy for this one bit galls me.

Ortho

[lookaround] "you cain't fix 'stupid'...
 
If the data is arriving framed as MLLP messages it ought to be fairly easy. As far as I know MLLP consists of a "start" delimiter, the text of the message, and "stop" delimiter.

Start -> Single Ascii VT (vertical tab) character &H0B

Stop -> Ascii FS (field separator) character &H1C followed by CR &H0D

A message can have pretty much any characters except a VT or FS, but is mostly printable characters though it can have CRs or other control characters in it.

One weirdness you can encounter is MLLP sourced from a Unix or Linux system, where they seem to take the liberty of using a linefeed (LF &H0A) instead of CR.


There shouldn't be much to writing a simple "listener" then at all really. Using the Winsock control, you'd just set LocalPort to the assigned port and call Listen. When a connection request event came in you'd Accept it. Everything should be pretty much like writing any simple socket server in VB6.

As data arrives you need to buffer and "unblock" it, i.e. scan the accumulated data for the framing symbols (start and stop above). You ignore everything until a start, then accumulate until you receive stop and discard that. The rest is a message to display, record, etc.

If while awaiting stop you see a start you discard everything in front of it and reset and resume from there. This should be extremely rare though since TCP already manages potential data loss. I suspect start is a vestige from the daya when this stuff was sent over serial cables and modems prior to ubiquitous TCP/IP.

All of the other considerations should be those relating to any use of TCP sockets. The primary concern is to avoid the fallacy that you will always get one "data arrival" per message. Data actually arrives in fits and starts, and any one data arrival might have the last part of the current message plus the first part of a subsequent message, or even several messages.


Testing such a thing is a bit tricky though. You might find you need to write a "transmitter" program as well and debug the two against each other before trying to have a known source connect to your "listener" program. Again, watch out for silly assumptions. Testing within a PC or a LAN will not exhibit the same "bursty" characteristics you'll see with real traffic over the Internet.
 
This may help too:


It also covers an acknowledgement that is used in newer versions of the protocol.

They represent my "start" as <SB> and my "stop" as <EB><CR>, and so a message looks like:

<SB>DDDDDDDDD<EB><CR>

Where the DDDDD is message data.

Note that they point out you can get garbage you must ignore, as in:

<SB>DDDDD<EB><CR>gggggg<SB>DDDDDD<EB><CR>

.. and you are expected to discard that. This is something I failed to mention above.
 
Dilettante,

Thank you for the primer; I'm sure I'll be back with many questions, but I think I'm going to tackle this one. All my app needs is patient name, DOB, account number, and "patient history" (abbreviated, of course, and that's all!) from a list of all patients in my hospital.

If it is available in the "picker" then just enter it by hand.

You have encouraged me to try this; star for you.

By the way, I remember being less than gracious in my reply to your first reply to this post, and for that I deeply apologize. You are awesome for helping me.

Ortho

[lookaround] "you cain't fix 'stupid'...
 
No problem, I understand that we were not able to be very helpful.

Good luck, soon you'll be the HL7 expert here!
 
>a vestige from the daya when this stuff was sent over serial cables and modems

Which is about the last time I personally had to deal with EDI. Those were the days. Kids today ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top