                                        README

                                    SocketAdapter
                                      Version 1.0.19

Introduction:

Socket Adapter is a stand-alone java application that serves as a gateway that sits between CHDR and VistA clients and the HDR II/CDS . For more information see SRSSocketFacade.doc 


Packaging:
The SocketAdapterStartup and SocketAdapterShutdown applications are packaged together into a single zip file.
The contents of the zip file are as follows:

- socketadapter/config/socketAdapter.properties � Sample property file that shows the various properties that have to be set up in order for the application to connect to the appropriate Weblogic server, database, NDS server [NOTE: users should either modify or create a new properties file that will allow them to connect to the appropriate Weblogic server, database, NDS server and use the modified/newly created property file in the .sh or .bat for correct execution of the application]
- socketadapter/config/log4j.xml � Log4j configuration file � defines a rolling file appender and a standard output appender. [NOTE: You may edit this file to modify the logging configuration]
- socketadapter/config/socketAdapterContext.xml � application context file that used to load resources to start up the socket adapted application.
- socketadapter/config/socketAdapterShutdownContext.xml � application context file that used to load resources for clean termination of the socket adapted application.

- socketadapter/bin/readme.txt � this readme.txt file
- socketadapter/bin/INSTALL.txt � notes for changes required when installing the application to SQA and Production.
- socketadapter/bin/encryptionReadme.txt � instructions for enabling encryption of sensitive information in the application's property file.
- socketadapter/bin/socket.adapter.policy - this is a Java policy file.- 
- socketadapter/bin/startup.sh � Shell script that should be modified and used to kick off the SocketAdapterStartup process in a Linux/Unix environment (shows all the configuration options that have to be set up in order to execute the application) [NOTE: modify the file to specify the correct property file to use, values of cds.encrypt.password.properties and cds.keystore.password used for encryption/decryption of the properties and the socktetAdapter library/jar file]
- socketadapter/bin/shutdown.sh � Shell script that can be modified and used to stop the SocketAdapter process in a Linux/Unix environment [NOTE: modify the file to specify the correct errorq library/jar file to use and JMX details]
- socketadapter/lib/*.jar � application and dependent jar files

Installation:
Unzip the ds-socket-adapter-<version>.zip into a directory of your choice. The application has the directory structure as follows:
- socketadapter/config
- socketadapter/bin
- socketadapter/lib

Make sure that the files specified in the packaging section exist.


Execution Instructions:
1. First read the encryptionReadme.txt file.
2. Make sure .keystore file is located in socketadapter folder.
3. Change to the socketadapter/config directory (cd socketadapter/config). Edit / Create a socketAdapter.properties file along the lines of the sample properties file and ensure that the appropriate database information is specified in the edited / new properties file
4. Change to the socketadapter/bin directory (cd ../bin). Modify startup.sh script to set these if not set already:
cds.run.properties.path to socketAdapter.properties, 
cds.encrypt.password.properties=true, 
cds.keystore.password=[keystorePassword].
-Dprocess.lab.message=true - Currently this flag is set to true. Turn this flag off when the Altona site informs HDR that they stopped sending the incorrect lab hl7 write messages.
5. On Unix/Linux shell, execue the startup.sh as follows: sh ./startup.sh
