|Developing with HL7Connect|
Welcome to the HL7Connect SDK. The HL7Connect SDK is a powerful set of programming components, development tools, and Service events that can be used to solve most common problems in healthcare environments.
The SDK provides support for:
The primary components of the HL7Connect SDK are:
The HL7Connect COM Library is a stand-alone COM library. When invoked through the IHL7Connect interface, the COM library must be initialised. If may be initialised with a reference to a server, or it can be initialised to run in local mode. In local mode, the following services are not available:
When run in local mode, the COM library does not require a license, nor does it require any of the other HL7Connect infrastructure that requires a license, though these services may significantly ease the development process.
The first task when developing a solution is to decide on a general architecture. While it is possible to run the HL7Connect COM library without using HL7Connect, we recommend that you always use HL7Connect as your perimeter - so that any other system you may need communicate with communicates with HL7Connect. This insulates your solution from many problems, and gives you a transparent boundary with it's own logging and management infrastructure - this can be crucial when debugging interoperability problems on site. For this reason, all the architectures described here use HL7Connect on the perimeter.
When considering the general architecture, the first question is whether to use the COM library, or to extend HL7Connect by implementing the events using a script or a COM implementation. Each of these options has different strengths and weaknesses.
Handling Events using COM interfaces:
Handling Events using scripts:
Another advantage of the script approach is a wider choice of language paradigms. In addition to the standard object-based but loosely typed languages like VBScript and Javasript, some events can be handled using XSLT or KScript. For many people, XSLT is the langauge of choice for transforming from one XML document to another, and XSLT can used to modify incoming or outgoing messages and documents. KScript is a language specifically suited to generating XML documents, and is the most easy way to construct v2 messages or CDA documents from scratch in incoming scripted message and document interfaces.
All interaction with HL7Connect other than by COM external mode requires either a script or a COM object that handles one or more kinds of events. To assist with the development of these events, The HL7Connect Development Environment allows for the creation of Test Cases. Test cases allow a controlled set of inputs to be fed to the script or COM Object that handles the event.
The first use of test cases is to allow the same set of inputs to be fed to a script of object for debuggin purposes, repeatedly and on-demand, through the development cycle. Multiple test cases can be used to simulate multiple different types on inputs.
When the test casess demonstrate that the script or object is functioning correctly, they can be added to the Test Case Registry in the development environment, which can run a series of the test cases checking that the correct outputs are received for the stored inputs. This is an important quality measure.
Note that the Development environment cannot reproduce all the services that the HL7Connect service offers: many actions simply lead to an entry in the debug log notifying that the action was requested.
If the development environment is executed with a parameter of /exec, and a second parameter which is a test case name, rather showing visually, the development environment will execute the test case directly and then exit. This is useful when configuring external development environments such as Visual Studio to test COM objects.