ca.uhn.hl7v2.app
Class HL7ServerTestHelper
java.lang.Object
ca.uhn.hl7v2.app.HL7ServerTestHelper
public class HL7ServerTestHelper
- extends java.lang.Object
Helper class used to send messages from a flat file to
an ip and port.
Messasges are sent using MLLP and ACK protocal
- Version:
- $Revision: 1.2 $ updated on $Date: 2009/03/18 23:27:58 $ by $Author: jamesagnew $
- Author:
- Laura Bright, Neal Acharya
Method Summary |
void |
closeSocket()
|
static java.lang.String[] |
getHL7Messages(java.lang.String theSource)
Given a string that contains HL7 messages, and possibly other junk,
returns an array of the HL7 messages. |
static void |
main(java.lang.String[] theArgs)
Main method for running the application
example command lines args:
-f UHN_PRO_DEV_PATIENTS.dat -h 142.224.178.152 -p 3999 |
void |
openSocket()
|
int |
process(java.io.InputStream theMsgInputStream)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HL7ServerTestHelper
public HL7ServerTestHelper(java.lang.String host,
int port)
openSocket
public void openSocket()
throws java.io.IOException
- Throws:
java.io.IOException
closeSocket
public void closeSocket()
process
public int process(java.io.InputStream theMsgInputStream)
throws java.io.FileNotFoundException,
java.io.IOException
- Throws:
java.io.FileNotFoundException
java.io.IOException
getHL7Messages
public static java.lang.String[] getHL7Messages(java.lang.String theSource)
- Given a string that contains HL7 messages, and possibly other junk,
returns an array of the HL7 messages.
An attempt is made to recognize segments even if there is other
content between segments, for example if a log file logs segments
individually with timestamps between them.
- Parameters:
theSource
- a string containing HL7 messages
- Returns:
- the HL7 messages contained in theSource
main
public static void main(java.lang.String[] theArgs)
- Main method for running the application
example command lines args:
-f UHN_PRO_DEV_PATIENTS.dat -h 142.224.178.152 -p 3999
Copyright © 2001-2011 University Health Network. All Rights Reserved.