Well, I am finally able to start testing the socket connections......and it
works (thank you Scott Kelements!)!

Unfortunately, I am having trouble sending the ACK back to server. I build
the ACK message and the send it using Scott's WrLine. WrLine is returning
101 (an RC of 1 plus a message length of 100). So I assume this is the
proper procedure to use and that it makes the trip since it returns 101.
However, the people on the other end do not see the ACK and cannot provide
me with a log or a trace.

So, I assume my only next option is to get our network people to trace the

Does anyone have any thoughts?



Joe Wells
University of Alabama Health Services Foundation
500 22nd Street South, Suite 308
Birmingham, AL 35233

This e-mail is intended for the sole use of the individual(s) to whom it is
addressed, and may contain information that is privileged, confidential and
exempt from disclosure under applicable law. You are hereby notified that
any dissemination, duplication or distribution of this transmission by
someone other than the intended addressee or its designated agent is
strictly prohibited. If you receive this e-mail in error, please notify me
immediately by replying to this e-mail.

On 6/26/2009 at 10:47 AM, in message

<GKern@xxxxxxxxxxxxxxxx> wrote:

My first application was the socket client. Not knowing anything about
sockets, it was a learning experience to say the least. The server side
came a few years later.

So in my case my EMR vendor provided me with the ip address/port they
would be listening on (7001). You can probably use any unassigned port.
Use NETSTAT *CNN to see what's in use at the current time on your

I don't do any validation when I receive data. Basically I just parse
the string between the x'0b' and x'1c0d', and then assign a name using a

format of, for example, MercyMemorial09062611254029193.dat, which
the source and then I append a date/time stamp on it. I then write this
file to the IFS (using Scott's IFS tools), into two folders in the IFS -
one is an archive where I retain the original (for historical
purposes/testing/resends etc) and the same file goes into an 'Input'

Then I have a preprocessor that reads from the 'Input' folder and does
initial edits and any custom HL7 formatting requirements before it
attempts to send to the EMR application. If there are errors in this
process (say the demographics don't match for a lab result because of a
name misspelling or birthdate difference) I then put the unmodified HL7
into an 'Error' folder in the IFS. Otherwise if everything looks good
custom formatted/modified HL7 goes into an 'Output' folder. I then have
RPG program that trolls for the files in the Output folder and loads a
data queue that is used as input to the socket client program.

The socket client programs sends the data and waits to receive an the
ack that is also wrapped with x'0b' and x'1c0d'. Then the next HL7 is
and the process repeats itself.

Hope that helps.

Also - a neat inexpensive tool I use to test socket connections is called

7Scan. It's designed for HL7 data and allows you to view, edit, send and

receive HL7. It also lets you use it as a socket client or server so you

can test connections from your pc as either a client or server.

Regards, Jerry

Gerald Kern - MIS Project Leader
Lotus Notes/Domino Administrator
IBM Certified RPG IV Developer
The Toledo Clinic, Inc.
4235 Secor Road
Toledo, OH 43623-4299
Phone 419-479-5535

This e-mail message, including any attachments, is for the sole use of
intended recipient(s) and may contain confidential and privileged
information. Any unauthorized use, disclosure or distribution is
prohibited. If you are not the intended recipient, please inform the
sender by reply e-mail and destroy this and all copies of this message.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].