Required Programming Tasks
This section describes the necessary programming tasks a business system supplier must complete in order to be able to create a business system which successfully embeds the Noah 4 Business API.
These tasks include:
Initializing
o Setting the user
o Setting the patient
o Setting the language id
Event handling
o Cross threading issue
Launching/Connecting to and disconnecting from a NOAH 2/3 module.
Error handling
o Noah 4 exceptions
IMPORTANT: The code in these examples consists of extracts from the sample business system made by HIMSA. This means that the code is for illustration purposes only, and cannot be used directly as written in the developers business system implementation. The full sample code for this business system is available on Noah 4 Business System Development page on himsa.com.
Initializing the Business API
In order to get started, the Business API assembly dll must be installed on the development PC. This dll comes with the Noah 4 installation.
Figure: BusinessAPI.dll
The first step is to reference the dll in your development environment. If you are using Visual Studio 2010 this is done by opening your References folder, selecting the popup menu Add, and browsing to BusinessAPI.dll. This Dll will give a number of classes/objects which re-sample the object model and which the developer can use in the development of the business system. The figure below shows the Object browser in VS2010, which gives an overview for the Business API referenced.
Figure: Object browser in VS2010
The first step in order to use the BusinessAPI is to Register BusinessAPI instance with Noah before it tries to connect. Noah Apps will only be allowed to connect to Noah if they are set as the preferred apps of any of Noah AppType as part of registration. Therefore, we register BusinessAPI instance as preferred app.
Below is a sample Register class that contains Install() and Uninstall methods that register and unregister app towards Noah.
Note: The business system developers should call these methods appropriately.
public class Register
{