<OF7C747810.5C2B5EFF-ON852575E1.00543CA9-852575E1.0056C872@xxxxxxxxxxxxxxxx>On 6/26/2009 at 10:47 AM, in message
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.
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
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.