Silverlink HL7 Interface Service

The Silverlink HL7 Interface Service is responsible for collecting HL7 messages from the Silverlink database and delivering them to 3rd party systems.

Project Location
The service is a Dotnet application stored in TFS at: $/Unity Mental health/DotNet/JacInterfaceHl7

The solution name is: JacInterfaceHl7.sln

There is a Build Process set up on our TeamCity server at http://build.silverlinksoftware.com:8080/viewType.html?buildTypeId=WaJacInterface_BuildJacInterface

The deployment files from each build are downloadable as Artefacts from the TeamCity server

Installations
At Lincs it is installed on ORACLENL1 at C:\Silverlink\JacInterfaceHl7

Architecture
The Interface is a Windows Service which runs under the name "Silverlink HL7 Interface". This should be set to start Automatically on all deployments

The Service periodically polls the database by calling the "pas.interface_msg_process.get_msg_ready" stored proc

This gives it a list of messages that need sending.

After sending each message it calls the "pas.interface_msg_process.upd_msg_sent" stored proc to update the status

The Interface opens a Socket connection to the remote server and sends the messages through this. It can only verify that it can successfully open the connection and send the message down it. There is no 2 way communication so any processing errors etc which happen at the remote end would not be known about by the Interface Service.

Configuration
The Interface is configured by changing the "JacInterfaceHl7.exe.config" file.

Changes to this file may require the service to be restarted to take effect.

In this file the most likely settings that will need changing are:
 * appSettings->timerInterval - the frequency in seconds it polls the database at
 * appSettings->remoteInterfaceAddress - the location to send the HL7 messages to
 * appSettings->remoteInterfacePort - the port to send the HL7 messages to
 * connectionStrings->SilverlinkOracleData - the Oracle Connection string of the Silverlink Database

Installation
To Install the service just unzip the deployment files to a folder on the server.

It will contain a batch file called "install_service.bat" running this will install and start the Windows Service.

It is normally best the run the batch files from an Administrator Cmd Prompt, as this makes it easier to see any feedback.

There is also an "uninstall_service.bat" file for removing the service.

Upgrading the Interface
To upgrade the interface to a new version take the following steps: It is normally best the run the batch files from an Administrator Cmd Prompt, as this makes it easier to see any feedback.
 * 1) Make a backup of the "JacInterfaceHl7.exe.config" and "Nlog.config" files (incase of accidental overwrite)
 * 2) Run "uninstall_service.bat"
 * 3) Copy in the updated files (making sure to preserve your existing config settings)
 * 4) Run "install_service.bat"

Logging
The interface writes its successes/failures to a log file.

By default this is located at [Installation Folder]\logs and runs as a 7 day rolling log

This can be altered by changing the Nlog.config file

Troubleshooting
The most likely issue to occur are connectivity problems (either to our database or the remote server)

If problems are occurring the first step would be the check the log file. It should be adding a row each time it polls the database, so you should be able to see if it is doing that part.

If there are errors in connectivity then you can check the config file, but if that is correct then it is most likely that the problem is elsewhere.

If the service appears to have hung or failed to start it can be (re)started from the Windows Services control panel. There may be details in the logs of the failure. If not it may be worth checking Windows Event Viewer for any system errors.