Ancestor: HL7Connect.Services.Access

This is the master COM interface for the HL7Connect COM library.

This is the only COM interface that is created directly; all the other objects are derived from factories generated by this interface

The first method you must call is either InitServer or InitLocal. Once whichever of these has returned sucessfully, you are able to use any of the other methods.

interface todo:

Properties


Methods

void InitServer(string logFile, string url, string name, string password);
   Initalize the library, and connect and login to the specified HL7Connect. The server must be available and licensed with an Enterprise license or an exception will be thrown. The COM Library will continue to function if the server stops working, though some functionality that interacts with the server (messaging, etc) will be broken.

Note that the COM Library uses web services to communicate with the noominated HL7Connect service. The COM library presents a fine grained facade to the coarse grained web services interface. You can use all the same web services functionality directly - see /wsdl/IHL7ConnectControl on the HL7Connect web interface.

Snomed services are only available if Snomed-CT is configured on HL7Connect.

The logfile is where internal logging and debugging messages will go. They will not be produced if the logfile is null

void InitLocal(string logFile, string loincCache, string snomedCache, string ucumCache);
   Initalise the library in local mode only. In this mode, the library does not rely on any HL7Connect service being available, and services that are provided by the central HL7Connect are not available, and will generate an exception if you try to use them:
  • logging
  • notications
  • unique key generation
  • message/document sending and receiving
  • interface and user status management (once implemented)
Other functions, including HL7 v2, CDA and CCD functionality will work normally. Snomed and loinc services may be provided, depending on the parameters of this method:

  • loinc Cache file name - the name of the cache file for loinc.
  • snomed cache file name - the name of the cache file for snomed-CT
  • ucum cache file name - the name of the cache file for ucum
These files are found in \data in the HLConnect store on a full HL7Connect installation. if null/nil/no parameter is provided, they will not be loaded, and the corresponding services will not be available. If they are provided, the library will load them directly and the services will be available. Note that loading them is fairly quick, but will occupy the same amount of RAM in your process space as the size of the file on the disk.

  • * Note that loinc, snomed, and ucum services are not currently provided, and
these paramters should be null or empty at this time **

The logfile is where internal logging and debugging messages will go. They will not be produced if the logfile is null

void Close();
   Prepare the Library to be unloaded. You need to call this, or the library will leak when you unload it. make sure you close and _release all other interfaces in the library first

HL7Connect.Exchange.MessageIn GetMessageSender(string name);
   Create an interface on which you can send messages to HL7Connect.

The name provided must be the name of an incoming HL7 v2 interface that is defined as an incoming COM interface configured to be externally driven.

The function returns an interface that can be used to send messages to HL7Connect. You can send either a fully populated message object or a binary stream of data that is the source of the message.

HL7Connect.Exchange.DocumentIn GetDocumentSender(string name);
   Create a COM interface on which you can send documents to HL7Connect.

The name provided must be the name of an incoming CDA interface that is defined as a COM interface, configured to be externally driven.

The function returns an interface that can be used to send documents to HL7Connect. You can send either a fully populated doc object or a binary stream of data that is the source of the document.

void BeMessageReceiver(string name, HL7Connect.Exchange.MessageOut handler);
   Provide a COM interface to which HL7Connect will send messages.

The name provided must be the name of an outgoing HL7 v2 interface that is defined as a COM interface, configured to be externally driven.

You must provide an implementation of the IHL7ConnectMessageTransfer COM interface that will be called sequentially for each message to be sent to the named HL7Connect interface.

To avoid difficult COM threading problems, the thread that calls this method is used to poll the HL7Connect server for messages, and it will only return from this interface once message receiving is over. This will occur when:

  • The implementation returns tsEnd to a CheckStatus
  • the associated HL7Connect interface is stopped
void BeDocumentReceiver(string name, HL7Connect.Exchange.DocumentOut handler);
   Provide a COM interface to which HL7Connect will send documents.

The name provided must be the name of an outgoing CDA interface that is defined as a COM interface, configured to be externally driven.

You must provide an implementation of the IHL7ConnectMessageTransfer COM interface that will be called sequentially for each message to be sent to the named HL7Connect interface

To avoid difficult COM threading problems, the thread that calls this method is used to poll the HL7Connect server for documents, and it will only return from this interface once document receiving is over. This will occur when:

  • The implementation returns tsEnd to a CheckStatus
  • the associated HL7Connect interface is stopped
void NotifyWait(int iId, int iSeconds);
   By default, Hl7Connect will wait the the configured timeout for a response from the interface, not knowing the status. Set the timeout too short, and HL7Connect will abandon the message/document before you've processed it, it processing takes too long. Set the timeout too long, and HL7Connect will take ages to give up on the client when the client is not available. One way to resolve this is for to notify Hl7Connect with an estimate of how long processing will take using this method

The instance identifier is the parameter of the SendMessage or SendDocument method.

HL7Connect will wait the specified number of seconds from the time *it started waiting*.


© Kestral Computing P/L 2000 - 2003. HL7Connect v2.00-063 generated on 30-Nov 2015.
Keywords: BeDocumentReceiver, BeMessageReceiver, Close, GetDocumentSender, GetMessageSender, InitLocal, InitServer, NotifyWait, HL7Connect.Services.Library, Library